AI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents
TypeScript ai-agentai-agent-toolsai-agentsai-agents-frameworkmcpmcp-servermcp-toolsmcpsn8n-alternativeno-code-automationworkflowworkflow-automationworkflows
feat(shopify): let AI agents manage blogs, pages, themes, metafields and metaobjects (#16090)
Odai Ahmad7af67d9051de
diff --git a/bun.lock b/bun.lockindex db7065c01e2..7709264c587 100644--- a/bun.lock+++ b/bun.lock@@ -8313,7 +8313,7 @@},"packages/pieces/community/shopify": {"name": "@activepieces/piece-shopify",- "version": "0.7.0",+ "version": "0.8.0","dependencies": {"@activepieces/core-piece-types": "workspace:*","@activepieces/core-utils": "workspace:*",diff --git a/packages/pieces/community/shopify/package.json b/packages/pieces/community/shopify/package.jsonindex 34b16a8450d..003b6e85ab4 100644--- a/packages/pieces/community/shopify/package.json+++ b/packages/pieces/community/shopify/package.json@@ -1,6 +1,6 @@{"name": "@activepieces/piece-shopify",- "version": "0.7.0",+ "version": "0.8.0","main": "./dist/src/index.js","types": "./dist/src/index.d.ts","scripts": {diff --git a/packages/pieces/community/shopify/src/i18n/translation.json b/packages/pieces/community/shopify/src/i18n/translation.jsonindex 7a99615a132..68045ff36c4 100644--- a/packages/pieces/community/shopify/src/i18n/translation.json+++ b/packages/pieces/community/shopify/src/i18n/translation.json@@ -39,14 +39,17 @@"Calculate Requested Order Edit": "Calculate Requested Order Edit","List Requested Order Edits": "List Requested Order Edits","Adjust Inventory Quantities": "Adjust Inventory Quantities",+ "Approve Blog Comment": "Approve Blog Comment","Archive Order": "Archive Order","Attach Media to Variants": "Attach Media to Variants",+ "Bulk Delete Metaobject Entries": "Bulk Delete Metaobject Entries","Calculate Refund": "Calculate Refund","Cancel Fulfillment Order": "Cancel Fulfillment Order","Cancel Fulfillment": "Cancel Fulfillment","Capture Order Payment": "Capture Order Payment","Complete Draft Order": "Complete Draft Order","Count Abandoned Checkouts": "Count Abandoned Checkouts",+ "Count Blogs": "Count Blogs","Count Collections": "Count Collections","Count Customer Segments": "Count Customer Segments","Count Customers": "Count Customers",@@ -55,8 +58,12 @@"Count Draft Orders": "Count Draft Orders","Count Gift Cards": "Count Gift Cards","Count Locations": "Count Locations",+ "Count Online Store Pages": "Count Online Store Pages","Count Products": "Count Products",+ "Count URL Redirects": "Count URL Redirects",+ "Create Blog Article": "Create Blog Article","Create Amount-Off Discount Code": "Create Amount-Off Discount Code",+ "Create Blog": "Create Blog","Create Buy X Get Y Discount Code": "Create Buy X Get Y Discount Code","Create Collection": "Create Collection","Create Customer Address": "Create Customer Address",@@ -65,29 +72,45 @@"Create Fulfillment": "Create Fulfillment","Create Gift Card": "Create Gift Card","Create Order Risk Assessment": "Create Order Risk Assessment",+ "Create Online Store Page": "Create Online Store Page","Create Product Options": "Create Product Options","Create Product Variants": "Create Product Variants","Create Refund": "Create Refund","Create Smart Collection": "Create Smart Collection",+ "Create Theme": "Create Theme",+ "Create URL Redirect": "Create URL Redirect","Deactivate Gift Card": "Deactivate Gift Card","Stop Stocking Item at Location": "Stop Stocking Item at Location",+ "Delete Blog Article": "Delete Blog Article",+ "Delete Blog": "Delete Blog","Delete Collection": "Delete Collection",+ "Delete Blog Comment": "Delete Blog Comment","Delete Customer Address": "Delete Customer Address","Delete Customer": "Delete Customer","Start Deleting Discount Redeem Codes": "Start Deleting Discount Redeem Codes","Delete Discount": "Delete Discount","Delete Draft Order": "Delete Draft Order","Delete Fulfillment Service": "Delete Fulfillment Service",+ "Delete Metafields": "Delete Metafields",+ "Delete Metaobject Definition": "Delete Metaobject Definition",+ "Delete Metaobject Entry": "Delete Metaobject Entry","Delete Order": "Delete Order",+ "Delete Online Store Page": "Delete Online Store Page","Remove Product Media": "Remove Product Media","Delete Product Options": "Delete Product Options","Delete Product Variants": "Delete Product Variants","Delete Product": "Delete Product",+ "Delete Theme Files": "Delete Theme Files",+ "Delete Theme": "Delete Theme",+ "Delete URL Redirect": "Delete URL Redirect","Detach Media from Variants": "Detach Media from Variants","Duplicate Product": "Duplicate Product",+ "Enable Standard Metaobject Definition": "Enable Standard Metaobject Definition","Find Discount By Code": "Find Discount By Code","Generate Customer Activation URL": "Generate Customer Activation URL","Get Abandonment": "Get Abandonment",+ "Get Blog Article": "Get Blog Article",+ "Get Blog": "Get Blog","Get Checkout Abandonment": "Get Checkout Abandonment","Get Collection by Handle": "Get Collection by Handle","Get Collection": "Get Collection",@@ -101,18 +124,31 @@"Get Inventory Item": "Get Inventory Item","Get Job Status": "Get Job Status","Get Location": "Get Location",+ "Get Metafield Definition": "Get Metafield Definition",+ "Get Metafield": "Get Metafield",+ "Get Metaobject Entry": "Get Metaobject Entry",+ "Get Online Store Settings": "Get Online Store Settings","Get Order Risk Assessments": "Get Order Risk Assessments","Get Order Transaction": "Get Order Transaction","Get Order": "Get Order",+ "Get Online Store Page": "Get Online Store Page","Get Product Duplicate Job": "Get Product Duplicate Job","Get Product Media": "Get Product Media","Get Publication": "Get Publication","Get Refund": "Get Refund","Get Shop": "Get Shop",+ "Get Theme File": "Get Theme File",+ "Get Theme": "Get Theme",+ "Get URL Redirect": "Get URL Redirect","Hold Fulfillment Order": "Hold Fulfillment Order","List Abandoned Checkouts": "List Abandoned Checkouts",+ "List Article Authors": "List Article Authors",+ "List Article Tags": "List Article Tags",+ "List Blog Articles": "List Blog Articles",+ "List Blogs": "List Blogs","List Carrier Services": "List Carrier Services","List Collection Products": "List Collection Products",+ "List Blog Comments": "List Blog Comments","List Customer Addresses": "List Customer Addresses","List Customer Orders": "List Customer Orders","List Delivery Profiles": "List Delivery Profiles",@@ -125,18 +161,32 @@"Search Inventory Items": "Search Inventory Items","List Inventory Levels": "List Inventory Levels","List Locations": "List Locations",+ "List Metafield Types": "List Metafield Types",+ "List Metafield Definitions": "List Metafield Definitions",+ "List Metafields": "List Metafields",+ "List Metaobject Definitions": "List Metaobject Definitions",+ "List Metaobject Entries": "List Metaobject Entries","List Order Fulfillment Orders": "List Order Fulfillment Orders","List Order Fulfillments": "List Order Fulfillments","List Order Refunds": "List Order Refunds","List Order Transactions": "List Order Transactions",+ "List Online Store Pages": "List Online Store Pages","List Product Media": "List Product Media","List Product Variants": "List Product Variants","List Publications": "List Publications","List Sales Channels": "List Sales Channels",+ "List Standard Metafield Templates": "List Standard Metafield Templates","List Tender Transactions": "List Tender Transactions",+ "List Theme Files": "List Theme Files",+ "List Themes": "List Themes",+ "List URL Redirects": "List URL Redirects",+ "Mark Blog Comment as Not Spam": "Mark Blog Comment as Not Spam",+ "Mark Blog Comment as Spam": "Mark Blog Comment as Spam","Mark Order as Paid": "Mark Order as Paid","Move Fulfillment Order": "Move Fulfillment Order",+ "Pin Metafield Definition": "Pin Metafield Definition","Publish Product or Collection": "Publish Product or Collection",+ "Publish Theme": "Publish Theme","Release Fulfillment Order Hold": "Release Fulfillment Order Hold","Remove Products from Collection": "Remove Products from Collection","Remove Tags": "Remove Tags",@@ -155,11 +205,14 @@"Set Default Customer Address": "Set Default Customer Address","Set Fulfillment Orders Deadline": "Set Fulfillment Orders Deadline","Set Inventory Quantities": "Set Inventory Quantities",+ "Set Metafields": "Set Metafields","Set Product (Full State)": "Set Product (Full State)","Start Order Cancellation": "Start Order Cancellation","Unarchive Order": "Unarchive Order","Unpublish Product or Collection": "Unpublish Product or Collection",+ "Update Blog Article": "Update Blog Article","Update Amount-Off Discount Code": "Update Amount-Off Discount Code",+ "Update Blog": "Update Blog","Update Collection": "Update Collection","Update Customer Address": "Update Customer Address","Update Draft Order": "Update Draft Order",@@ -167,10 +220,16 @@"Update Fulfillment Tracking": "Update Fulfillment Tracking","Update Gift Card": "Update Gift Card","Update Inventory Item": "Update Inventory Item",+ "Update Metafield Definition": "Update Metafield Definition","Update Order Details": "Update Order Details",+ "Update Online Store Page": "Update Online Store Page","Update Product Media": "Update Product Media","Update Product Option": "Update Product Option","Update Product Variants": "Update Product Variants",+ "Rename Theme": "Rename Theme",+ "Update URL Redirect": "Update URL Redirect",+ "Create or Update Metaobject Entry": "Create or Update Metaobject Entry",+ "Create or Update Theme Files": "Create or Update Theme Files","Void Payment Authorization": "Void Payment Authorization","Custom API Call": "Custom API Call","Adjust inventory level of an item at a location.": "Adjust inventory level of an item at a location.",@@ -203,7 +262,7 @@"Start adding up to 250 new redeem codes to a code discount (runs in the background).": "Start adding up to 250 new redeem codes to a code discount (runs in the background).","Add images, videos or 3D models to a product from public URLs.": "Add images, videos or 3D models to a product from public URLs.","Add products to a collection by hand.": "Add products to a collection by hand.",- "Add tags to an order, draft order, customer or product.": "Add tags to an order, draft order, customer or product.",+ "Add tags to an order, draft order, customer, product or blog article.": "Add tags to an order, draft order, customer, product or blog article.","List every shipping zone of one location group in a delivery profile, with countries and rates.": "List every shipping zone of one location group in a delivery profile, with countries and rates.","Email a customer a secure link to add a new payment method for an order, draft order or subscription contract.": "Email a customer a secure link to add a new payment method for an order, draft order or subscription contract.","Mark a buyer request to edit an order as completed.": "Mark a buyer request to edit an order as completed.",@@ -212,14 +271,17 @@"Preview the money effect of removing line items from an order, without changing anything.": "Preview the money effect of removing line items from an order, without changing anything.","List the edits a buyer requested on an order, such as removing unfulfilled items.": "List the edits a buyer requested on an order, such as removing unfulfilled items.","Increase or decrease stock by a relative amount at one or more locations.": "Increase or decrease stock by a relative amount at one or more locations.",+ "Approve a blog comment so it is published on the article.": "Approve a blog comment so it is published on the article.","Close (archive) an order.": "Close (archive) an order.","Show existing product media on specific variants (for example the red photo on the red variant).": "Show existing product media on specific variants (for example the red photo on the red variant).",+ "Start deleting many metaobject entries: listed ids, or every entry of one type.": "Start deleting many metaobject entries: listed ids, or every entry of one type.","Preview the refund Shopify suggests for an order, without refunding.": "Preview the refund Shopify suggests for an order, without refunding.","Cancel a fulfillment order that was sent to a fulfillment service; a replacement is created.": "Cancel a fulfillment order that was sent to a fulfillment service; a replacement is created.","Cancel a fulfillment so its items become unfulfilled again.": "Cancel a fulfillment so its items become unfulfilled again.","Capture money from an authorized payment on an order.": "Capture money from an authorized payment on an order.","Turn a draft order into a real order.": "Turn a draft order into a real order.","Count abandoned checkouts, optionally filtered.": "Count abandoned checkouts, optionally filtered.",+ "Count the blogs of the online store, optionally filtered.": "Count the blogs of the online store, optionally filtered.","Count collections, optionally filtered.": "Count collections, optionally filtered.","Count the customer segments defined in the store.": "Count the customer segments defined in the store.","Count customers, optionally filtered.": "Count customers, optionally filtered.",@@ -228,8 +290,12 @@"Count draft orders, optionally filtered.": "Count draft orders, optionally filtered.","Count gift cards, optionally filtered.": "Count gift cards, optionally filtered.","Count the store's locations, optionally filtered.": "Count the store's locations, optionally filtered.",+ "Count the online store's content pages.": "Count the online store's content pages.","Count products, optionally filtered.": "Count products, optionally filtered.",+ "Count the online store's URL redirects, optionally filtered.": "Count the online store's URL redirects, optionally filtered.",+ "Write a new article in an existing blog.": "Write a new article in an existing blog.","Create a percentage or fixed-amount discount that customers apply with a code.": "Create a percentage or fixed-amount discount that customers apply with a code.",+ "Create a new blog on the online store.": "Create a new blog on the online store.","Create a \"buy X, get Y\" discount that customers apply with a code.": "Create a \"buy X, get Y\" discount that customers apply with a code.","Create a manual collection, optionally with an initial list of products.": "Create a manual collection, optionally with an initial list of products.","Add a new address to a customer.": "Add a new address to a customer.",@@ -241,30 +307,46 @@"Issue a new gift card with an initial balance.": "Issue a new gift card with an initial balance.","Record a fraud risk assessment with supporting facts on an order.": "Record a fraud risk assessment with supporting facts on an order.","Create a real order with one or more line items.": "Create a real order with one or more line items.",+ "Create a content page on the online store.": "Create a content page on the online store.","Add new options (such as Size or Color) and their values to a product.": "Add new options (such as Size or Color) and their values to a product.","Create a new product with its title, description, vendor, type, tags and status.": "Create a new product with its title, description, vendor, type, tags and status.","Add one or more variants to a product.": "Add one or more variants to a product.","Refund money and/or line items on an order.": "Refund money and/or line items on an order.","Create a rule-based collection that automatically includes products matching conditions.": "Create a rule-based collection that automatically includes products matching conditions.",+ "Import a theme from a ZIP file URL as an unpublished theme.": "Import a theme from a ZIP file URL as an unpublished theme.",+ "Redirect an old online store path to a new URL.": "Redirect an old online store path to a new URL.","Permanently disable a gift card so it can no longer be used.": "Permanently disable a gift card so it can no longer be used.","Stop tracking an inventory item at a location.": "Stop tracking an inventory item at a location.",+ "Permanently delete a blog article.": "Permanently delete a blog article.",+ "Permanently delete a blog and its articles.": "Permanently delete a blog and its articles.","Permanently delete a collection. The products in it are not deleted.": "Permanently delete a collection. The products in it are not deleted.",+ "Permanently delete a blog comment.": "Permanently delete a blog comment.","Delete a saved address from a customer.": "Delete a saved address from a customer.","Permanently delete a customer who has no orders.": "Permanently delete a customer who has no orders.","Start deleting redeem codes from a code discount (runs in the background).": "Start deleting redeem codes from a code discount (runs in the background).","Permanently delete a code discount or an automatic discount.": "Permanently delete a code discount or an automatic discount.","Permanently delete a draft order.": "Permanently delete a draft order.","Delete a fulfillment service and decide what happens to its location's inventory.": "Delete a fulfillment service and decide what happens to its location's inventory.",+ "Delete metafields by owner, namespace and key.": "Delete metafields by owner, namespace and key.",+ "Permanently delete a metaobject type and every entry of it.": "Permanently delete a metaobject type and every entry of it.",+ "Permanently delete one metaobject entry.": "Permanently delete one metaobject entry.","Permanently delete an archived or cancelled order.": "Permanently delete an archived or cancelled order.",+ "Permanently delete an online store content page.": "Permanently delete an online store content page.","Remove images, videos or 3D models from a product.": "Remove images, videos or 3D models from a product.","Delete one or more options from a product.": "Delete one or more options from a product.","Permanently delete one or more variants of a product.": "Permanently delete one or more variants of a product.","Permanently delete a product with all its variants and media.": "Permanently delete a product with all its variants and media.",+ "Permanently delete files from a theme (up to 50 per call).": "Permanently delete files from a theme (up to 50 per call).",+ "Permanently delete an unpublished theme.": "Permanently delete an unpublished theme.",+ "Delete a URL redirect.": "Delete a URL redirect.","Stop showing specific product media on specific variants.": "Stop showing specific product media on specific variants.","Create a copy of a product under a new title.": "Create a copy of a product under a new title.",+ "Add one of Shopify's standard metaobject types to the store.": "Add one of Shopify's standard metaobject types to the store.","Look up the code discount that a redeem code belongs to.": "Look up the code discount that a redeem code belongs to.","Create a one-time account activation link for a customer.": "Create a one-time account activation link for a customer.","Get a customer abandonment (browse, cart or checkout) by id.": "Get a customer abandonment (browse, cart or checkout) by id.",+ "Get one blog article with its body and comment count.": "Get one blog article with its body and comment count.",+ "Get one blog with its article count and recent article tags.": "Get one blog with its article count and recent article tags.","Get the abandonment record of an abandoned checkout.": "Get the abandonment record of an abandoned checkout.","Get one collection by its URL handle.": "Get one collection by its URL handle.","Get one collection with its membership sources and conditions.": "Get one collection with its membership sources and conditions.",@@ -279,9 +361,14 @@"Get one inventory item with its SKU, cost, tracking and shipping details.": "Get one inventory item with its SKU, cost, tracking and shipping details.","Check whether an asynchronous Shopify job has finished.": "Check whether an asynchronous Shopify job has finished.","Get one store location with its address and capabilities.": "Get one store location with its address and capabilities.",+ "Get one metafield definition by owner type, namespace and key.": "Get one metafield definition by owner type, namespace and key.",+ "Get one metafield by its id.": "Get one metafield by its id.",+ "Get one metaobject entry with all its field values.": "Get one metaobject entry with all its field values.",+ "Check whether the online store is password protected.": "Check whether the online store is password protected.","Get the fraud risk recommendation and assessments of an order.": "Get the fraud risk recommendation and assessments of an order.","Get one payment transaction by id.": "Get one payment transaction by id.","Get one order with its totals, addresses and line items.": "Get one order with its totals, addresses and line items.",+ "Get one online store content page with its full body.": "Get one online store content page with its full body.","Get one product with its options, variants and media.": "Get one product with its options, variants and media.","Check whether a product duplication job has finished.": "Check whether a product duplication job has finished.","Get one product image, video or 3D model by id.": "Get one product image, video or 3D model by id.",@@ -289,10 +376,18 @@"Get one publication (sales channel or catalog) by id.": "Get one publication (sales channel or catalog) by id.","Get one refund by id.": "Get one refund by id.","Get the store name, domain, currency, timezone and plan.": "Get the store name, domain, currency, timezone and plan.",+ "Read one file (template, section, snippet, asset) of a theme.": "Read one file (template, section, snippet, asset) of a theme.",+ "Get one theme with its role and processing state.": "Get one theme with its role and processing state.",+ "Get one URL redirect.": "Get one URL redirect.","Put a fulfillment order (or some of its items) on hold so it is not shipped yet.": "Put a fulfillment order (or some of its items) on hold so it is not shipped yet.","List checkouts that customers started but did not complete.": "List checkouts that customers started but did not complete.",+ "List the author names used on blog articles.": "List the author names used on blog articles.",+ "List the tags used on blog articles.": "List the tags used on blog articles.",+ "List or search blog articles, optionally within one blog.": "List or search blog articles, optionally within one blog.",+ "List or search the blogs of the online store.": "List or search the blogs of the online store.","List the carrier-calculated shipping rate services set up on the store.": "List the carrier-calculated shipping rate services set up on the store.","List the products in a collection, one page at a time.": "List the products in a collection, one page at a time.",+ "List or search blog comments, for example those waiting for moderation.": "List or search blog comments, for example those waiting for moderation.","List the saved addresses of one customer.": "List the saved addresses of one customer.","List the orders of one customer, one page at a time.": "List the orders of one customer, one page at a time.","List the shipping profiles with their zones, countries and rates.": "List the shipping profiles with their zones, countries and rates.",@@ -305,21 +400,35 @@"Search inventory items by SKU or id, one page at a time.": "Search inventory items by SKU or id, one page at a time.","List stock quantities of one item across locations, or of all items at one location.": "List stock quantities of one item across locations, or of all items at one location.","List the store's locations (warehouses, shops, fulfillment services), one page at a time.": "List the store's locations (warehouses, shops, fulfillment services), one page at a time.",+ "List every metafield type Shopify supports, with its validations.": "List every metafield type Shopify supports, with its validations.",+ "List the metafield definitions (custom field schemas) for one resource type.": "List the metafield definitions (custom field schemas) for one resource type.",+ "List the metafields of one product, customer, order or other resource.": "List the metafields of one product, customer, order or other resource.",+ "List the store's metaobject types with their fields.": "List the store's metaobject types with their fields.",+ "List or search the entries of one metaobject type.": "List or search the entries of one metaobject type.","List the fulfillment orders of an order: what still has to be shipped, from which location.": "List the fulfillment orders of an order: what still has to be shipped, from which location.","List the fulfillments (shipments) of an order with their tracking.": "List the fulfillments (shipments) of an order with their tracking.","List every refund made on an order.": "List every refund made on an order.","List every payment transaction on an order.": "List every payment transaction on an order.",+ "List or search the online store's content pages (About, Contact, FAQ, ...).": "List or search the online store's content pages (About, Contact, FAQ, ...).","List the images, videos and 3D models of a product, one page at a time.": "List the images, videos and 3D models of a product, one page at a time.","List the variants of one product, one page at a time.": "List the variants of one product, one page at a time.","List the publications (sales channels and catalogs) products can be published to.": "List the publications (sales channels and catalogs) products can be published to.","List the sales channels installed on the store.": "List the sales channels installed on the store.",+ "List Shopify's standard metafield definition templates.": "List Shopify's standard metafield definition templates.","List money actually received or paid out across all orders.": "List money actually received or paid out across all orders.",+ "List the file paths of a theme, optionally filtered by path pattern.": "List the file paths of a theme, optionally filtered by path pattern.",+ "List the online store's themes, optionally by role or name.": "List the online store's themes, optionally by role or name.",+ "List or search the online store's URL redirects.": "List or search the online store's URL redirects.",+ "Restore a blog comment that was marked as spam.": "Restore a blog comment that was marked as spam.",+ "Mark a blog comment as spam so it is hidden.": "Mark a blog comment as spam so it is hidden.","Record the outstanding balance of an order as paid manually.": "Record the outstanding balance of an order as paid manually.","Ship a fulfillment order (or some of its items) from a different location.": "Ship a fulfillment order (or some of its items) from a different location.",+ "Pin a metafield definition so its field shows on the resource page in the Shopify admin.": "Pin a metafield definition so its field shows on the resource page in the Shopify admin.","Publish a product or collection to one or more sales channels or catalogs.": "Publish a product or collection to one or more sales channels or catalogs.",+ "Make a theme the live theme of the online store.": "Make a theme the live theme of the online store.","Release holds on a fulfillment order so it can be shipped.": "Release holds on a fulfillment order so it can be shipped.","Remove hand-picked products from a collection.": "Remove hand-picked products from a collection.",- "Remove tags from an order, draft order, customer or product.": "Remove tags from an order, draft order, customer or product.",+ "Remove tags from an order, draft order, customer, product or blog article.": "Remove tags from an order, draft order, customer, product or blog article.","Start moving products to new positions inside a manually sorted collection (runs in the background).": "Start moving products to new positions inside a manually sorted collection (runs in the background).","Start moving product media to new positions (runs in the background).": "Start moving product media to new positions (runs in the background).","Set the order of a product's options and, optionally, of their values.": "Set the order of a product's options and, optionally, of their values.",@@ -335,11 +444,14 @@"Make one of a customer's saved addresses the default.": "Make one of a customer's saved addresses the default.","Set the date by which one or more fulfillment orders must be fulfilled.": "Set the date by which one or more fulfillment orders must be fulfilled.","Set stock to an absolute number at one or more locations.": "Set stock to an absolute number at one or more locations.",+ "Create or update up to 25 metafields on products, customers, orders and other resources.": "Create or update up to 25 metafields on products, customers, orders and other resources.","Create or overwrite a whole product, including all its options and variants, in one call.": "Create or overwrite a whole product, including all its options and variants, in one call.","Cancel an order asynchronously and get a job to poll.": "Cancel an order asynchronously and get a job to poll.","Reopen a closed (archived) order.": "Reopen a closed (archived) order.","Remove a product or collection from one or more sales channels or catalogs.": "Remove a product or collection from one or more sales channels or catalogs.",+ "Change an article's title, body, author, tags, image, publish state or blog.": "Change an article's title, body, author, tags, image, publish state or blog.","Change an existing percentage or fixed-amount discount code.": "Change an existing percentage or fixed-amount discount code.",+ "Change a blog's title, handle, comment policy or template.": "Change a blog's title, handle, comment policy or template.","Change a collection's title, description, handle, sort order, image or SEO, and add or remove its rule conditions.": "Change a collection's title, description, handle, sort order, image or SEO, and add or remove its rule conditions.","Change fields of a saved customer address.": "Change fields of a saved customer address.","Change the name, email, phone, note, tags, locale or tax exemption of a customer.": "Change the name, email, phone, note, tags, locale or tax exemption of a customer.",@@ -348,11 +460,17 @@"Change the carrier, tracking numbers or tracking URLs of a fulfillment.": "Change the carrier, tracking numbers or tracking URLs of a fulfillment.","Change a gift card's note, expiry date, owner or recipient.": "Change a gift card's note, expiry date, owner or recipient.","Change the SKU, unit cost, tracking, shipping, weight or customs data of an inventory item.": "Change the SKU, unit cost, tracking, shipping, weight or customs data of an inventory item.",+ "Change a metafield definition's name, description or validation rules.": "Change a metafield definition's name, description or validation rules.","Change the email, phone, note, tags or PO number of an order.": "Change the email, phone, note, tags or PO number of an order.",+ "Change a content page's title, body, handle, template or publish state.": "Change a content page's title, body, handle, template or publish state.","Change the title, description, vendor, type, status, handle, tags, category, SEO or collections of a product.": "Change the title, description, vendor, type, status, handle, tags, category, SEO or collections of a product.","Change the alt text, filename or image of an existing media file.": "Change the alt text, filename or image of an existing media file.","Rename or move a product option and add, rename or delete its values.": "Rename or move a product option and add, rename or delete its values.","Change the price, SKU, barcode, stock policy or option values of one or more variants of a product.": "Change the price, SKU, barcode, stock policy or option values of one or more variants of a product.",+ "Rename a theme.": "Rename a theme.",+ "Change the old path or the target of a URL redirect.": "Change the old path or the target of a URL redirect.",+ "Create a metaobject entry, or update the fields you send on an existing one, by type and handle.": "Create a metaobject entry, or update the fields you send on an existing one, by type and handle.",+ "Create theme files or overwrite existing ones (up to 50 per call).": "Create theme files or overwrite existing ones (up to 50 per call).","Void an uncaptured payment authorization on an order.": "Void an uncaptured payment authorization on an order.","Make a custom API call to a specific endpoint": "Make a custom API call to a specific endpoint","Inventory Item": "Inventory Item",@@ -426,7 +544,11 @@"Reason": "Reason","Changes": "Changes","Reference Document URI": "Reference Document URI",+ "Comment ID": "Comment ID","Variant Media": "Variant Media",+ "Delete Scope": "Delete Scope",+ "Metaobject IDs": "Metaobject IDs",+ "Metaobject Type": "Metaobject Type","Line Items to Refund": "Line Items to Refund","Refund All Shipping": "Refund All Shipping","Shipping Amount": "Shipping Amount",@@ -439,6 +561,16 @@"Payment Gateway ID": "Payment Gateway ID","Source Name": "Source Name","Search Query": "Search Query",+ "Blog ID": "Blog ID",+ "Author Name": "Author Name",+ "Body (HTML)": "Body (HTML)",+ "Summary (HTML)": "Summary (HTML)",+ "Published": "Published",+ "Publish Date": "Publish Date",+ "Handle": "Handle",+ "Image URL": "Image URL",+ "Image Alt Text": "Image Alt Text",+ "Template Suffix": "Template Suffix","Code": "Code","Value Type": "Value Type","Value": "Value",@@ -458,6 +590,7 @@"Combines With Product Discounts": "Combines With Product Discounts","Combines With Order Discounts": "Combines With Order Discounts","Combines With Shipping Discounts": "Combines With Shipping Discounts",+ "Comment Policy": "Comment Policy","Customer Buys": "Customer Buys","Buys Value": "Buys Value","Buys Product IDs": "Buys Product IDs",@@ -470,11 +603,7 @@"Gets Collection IDs": "Gets Collection IDs","Uses Per Order Limit": "Uses Per Order Limit","Description (HTML)": "Description (HTML)",- "Handle": "Handle","Product Sort Order": "Product Sort Order",- "Image URL": "Image URL",- "Image Alt Text": "Image Alt Text",- "Template Suffix": "Template Suffix","SEO Title": "SEO Title","SEO Description": "SEO Description","Company": "Company",@@ -545,41 +674,67 @@"Refund Transactions": "Refund Transactions","Match": "Match","Conditions": "Conditions",+ "Theme ZIP URL": "Theme ZIP URL",+ "Name": "Name",+ "Role": "Role",+ "Old Path": "Old Path",+ "Target": "Target","Gift Card ID": "Gift Card ID",+ "Article ID": "Article ID","Address ID": "Address ID","Code IDs": "Code IDs","Search": "Search","Fulfillment Service ID": "Fulfillment Service ID","Inventory Action": "Inventory Action","Destination Location ID": "Destination Location ID",+ "Metafields": "Metafields",+ "Metaobject Definition ID": "Metaobject Definition ID",+ "Metaobject ID": "Metaobject ID",+ "Page ID": "Page ID","Media IDs": "Media IDs","Option IDs": "Option IDs",+ "Theme ID": "Theme ID",+ "File Paths": "File Paths",+ "URL Redirect ID": "URL Redirect ID","New Title": "New Title","Copy Images": "Copy Images","Copy Translations": "Copy Translations",+ "Standard Type": "Standard Type","Abandonment ID": "Abandonment ID","Abandoned Checkout ID": "Abandoned Checkout ID","Bulk Creation ID": "Bulk Creation ID","Line Items Cursor": "Line Items Cursor","Job ID": "Job ID",+ "Owner Type": "Owner Type",+ "Namespace": "Namespace",+ "Key": "Key",+ "Metafield ID": "Metafield ID","Transaction ID": "Transaction ID","Media ID": "Media ID","Variant ID": "Variant ID","Publication ID": "Publication ID","Refund ID": "Refund ID",+ "File Path": "File Path","Reason Notes": "Reason Notes","External ID": "External ID","Notify Merchant": "Notify Merchant","Sort By": "Sort By","Reverse Order": "Reverse Order",+ "Limit": "Limit",+ "Sort": "Sort","Merchant Owned Only": "Merchant Owned Only","Fulfillment Order Line Item IDs": "Fulfillment Order Line Item IDs","Include Inactive": "Include Inactive","Include Legacy": "Include Legacy",+ "Pinned Status": "Pinned Status",+ "Owner ID": "Owner ID","Catalog Type": "Catalog Type",+ "Exclude Activated": "Exclude Activated",+ "File Paths or Patterns": "File Paths or Patterns",+ "Roles": "Roles",+ "Names": "Names","New Location ID": "New Location ID","Publication IDs": "Publication IDs",- "Publish Date": "Publish Date","Release Scope": "Release Scope","Hold IDs": "Hold IDs","Moves": "Moves",@@ -597,6 +752,10 @@"Refund Method": "Refund Method","Store Credit Expiry": "Store Credit Expiry","Staff Note": "Staff Note",+ "Redirect Old Handle": "Redirect Old Handle",+ "Move to Blog ID": "Move to Blog ID",+ "Clear Body": "Clear Body",+ "Clear Tags": "Clear Tags","Remove End Date": "Remove End Date","Product IDs To Add": "Product IDs To Add","Product IDs To Remove": "Product IDs To Remove",@@ -609,11 +768,11 @@"Segment IDs To Add": "Segment IDs To Add","Segment IDs To Remove": "Segment IDs To Remove","Remove Usage Limit": "Remove Usage Limit",- "Redirect Old Handle": "Redirect Old Handle",+ "Redirect Old Blog URL": "Redirect Old Blog URL",+ "Redirect Old Article URLs": "Redirect Old Article URLs","Conditions Source ID": "Conditions Source ID","Condition IDs to Delete": "Condition IDs to Delete","Clear Note": "Clear Note",- "Clear Tags": "Clear Tags","Payment Terms Template ID": "Payment Terms Template ID","Payment Terms Issued At": "Payment Terms Issued At","Payment Due At": "Payment Due At",@@ -628,6 +787,8 @@"HS Code": "HS Code","Weight": "Weight","Weight Unit": "Weight Unit",+ "Validations": "Validations",+ "Remove All Validations": "Remove All Validations","Collections to Join": "Collections to Join","Collections to Leave": "Collections to Leave","Alt Text": "Alt Text",@@ -639,6 +800,8 @@"Values to Add": "Values to Add","Values to Rename": "Values to Rename","Value IDs to Delete": "Value IDs to Delete",+ "Fields": "Fields",+ "Files": "Files","Method": "Method","Headers": "Headers","Query Parameters": "Query Parameters",@@ -703,8 +866,12 @@"Why the stock changes; shown in the inventory history.": "Why the stock changes; shown in the inventory history.","One entry per inventory item and location.": "One entry per inventory item and location.","Optional URI of the document behind the change, for example \"gid://my-app/PurchaseOrder/PO-1\".": "Optional URI of the document behind the change, for example \"gid://my-app/PurchaseOrder/PO-1\".",+ "The comment id, numeric or \"gid://shopify/Comment/…\". Find it with list_comments.": "The comment id, numeric or \"gid://shopify/Comment/…\". Find it with list_comments.","The product id, numeric or \"gid://shopify/Product/…\".": "The product id, numeric or \"gid://shopify/Product/…\".","Which media to attach to which variant, one entry per pair.": "Which media to attach to which variant, one entry per pair.",+ "BY_IDS deletes only the listed entries; ALL_OF_TYPE deletes every entry of the type.": "BY_IDS deletes only the listed entries; ALL_OF_TYPE deletes every entry of the type.",+ "For BY_IDS: entry ids, numeric or \"gid://shopify/Metaobject/…\", 1 to 250.": "For BY_IDS: entry ids, numeric or \"gid://shopify/Metaobject/…\", 1 to 250.",+ "For ALL_OF_TYPE: the metaobject type whose entries are all deleted, for example \"designer\".": "For ALL_OF_TYPE: the metaobject type whose entries are all deleted, for example \"designer\".","Line items and quantities to refund. Line item ids come from get_order.": "Line items and quantities to refund. Line item ids come from get_order.","Include the full shipping cost in the suggestion. Off by default.": "Include the full shipping cost in the suggestion. Off by default.","Refund only this much shipping, for example 4.50. Ignored when refunding all shipping.": "Refund only this much shipping, for example 4.50. Ignored when refunding all shipping.",@@ -720,6 +887,7 @@"Optional manual payment gateway to record the payment against, as a full id such as \"gid://shopify/PaymentGateway/1\".": "Optional manual payment gateway to record the payment against, as a full id such as \"gid://shopify/PaymentGateway/1\".","Optional channel label stored on the order, for example \"phone\".": "Optional channel label stored on the order, for example \"phone\".","Shopify search syntax, for example \"created_at:>=2026-09-01\". Leave empty to count all.": "Shopify search syntax, for example \"created_at:>=2026-09-01\". Leave empty to count all.",+ "Shopify blog search syntax, for example \"title:News\". Leave empty to count all.": "Shopify blog search syntax, for example \"title:News\". Leave empty to count all.","Shopify collection search syntax, for example \"collection_type:custom\". Leave empty to count all.": "Shopify collection search syntax, for example \"collection_type:custom\". Leave empty to count all.","Filter by created_at, updated_at or id, for example \"created_at:>2026-01-01\". Leave empty to count all.": "Filter by created_at, updated_at or id, for example \"created_at:>2026-01-01\". Leave empty to count all.","Optional Shopify search syntax on the codes, for example \"times_used:0\". Leave empty to count all.": "Optional Shopify search syntax on the codes, for example \"times_used:0\". Leave empty to count all.",@@ -728,6 +896,19 @@"Shopify gift card search syntax, for example \"status:enabled\". Leave empty to count all.": "Shopify gift card search syntax, for example \"status:enabled\". Leave empty to count all.","Shopify location search syntax, for example \"name:Warehouse*\". Leave empty to count all.": "Shopify location search syntax, for example \"name:Warehouse*\". Leave empty to count all.","Shopify product search syntax, for example \"status:active\" or \"tag:sale\". Leave empty to count all.": "Shopify product search syntax, for example \"status:active\" or \"tag:sale\". Leave empty to count all.",+ "Shopify redirect search syntax, for example \"path:/collections\". Leave empty to count all.": "Shopify redirect search syntax, for example \"path:/collections\". Leave empty to count all.",+ "The blog to write in, numeric or \"gid://shopify/Blog/…\". Find it with list_blogs.": "The blog to write in, numeric or \"gid://shopify/Blog/…\". Find it with list_blogs.",+ "Article title, for example \"Our summer collection is here\".": "Article title, for example \"Our summer collection is here\".",+ "Name shown as the author, for example \"Jane Doe\".": "Name shown as the author, for example \"Jane Doe\".",+ "Article content, HTML allowed, for example \"<p>Hello</p>\".": "Article content, HTML allowed, for example \"<p>Hello</p>\".",+ "Short excerpt shown in blog listings, HTML allowed.": "Short excerpt shown in blog listings, HTML allowed.",+ "Tags for the article, for example [\"news\", \"summer\"].": "Tags for the article, for example [\"news\", \"summer\"].",+ "Yes publishes the article on the storefront. Leave empty or No to keep it hidden.": "Yes publishes the article on the storefront. Leave empty or No to keep it hidden.",+ "Publication date and time, ISO 8601, for example \"2026-10-01T09:00:00Z\". It does not publish or schedule the article on its own; Published must be Yes as well.": "Publication date and time, ISO 8601, for example \"2026-10-01T09:00:00Z\". It does not publish or schedule the article on its own; Published must be Yes as well.",+ "URL handle, for example \"summer-collection\". Leave empty to generate it from the title.": "URL handle, for example \"summer-collection\". Leave empty to generate it from the title.",+ "Public URL of the featured image, for example \"https://example.com/banner.jpg\".": "Public URL of the featured image, for example \"https://example.com/banner.jpg\".",+ "Alternative text for the featured image. Needs image_url.": "Alternative text for the featured image. Needs image_url.",+ "Theme template suffix, for example \"wide\". Leave empty for the default template.": "Theme template suffix, for example \"wide\". Leave empty for the default template.","Internal title shown in the admin, for example \"Spring sale 15%\".": "Internal title shown in the admin, for example \"Spring sale 15%\".","The code customers enter at checkout, for example \"SPRING15\".": "The code customers enter at checkout, for example \"SPRING15\".","Percentage off or a fixed amount off.": "Percentage off or a fixed amount off.",@@ -750,6 +931,10 @@"Can be combined with order discounts. Off by default.": "Can be combined with order discounts. Off by default.","Can be combined with shipping discounts. Off by default.": "Can be combined with shipping discounts. Off by default.","Optional tags for the discount, for example \"spring\".": "Optional tags for the discount, for example \"spring\".",+ "Blog title, for example \"News\".": "Blog title, for example \"News\".",+ "URL handle, for example \"news\". Leave empty to generate it from the title.": "URL handle, for example \"news\". Leave empty to generate it from the title.",+ "Whether readers can comment on articles. Leave empty for the Shopify default.": "Whether readers can comment on articles. Leave empty for the Shopify default.",+ "Theme template suffix, for example \"wide\" for blog.wide.json. Leave empty for the default template.": "Theme template suffix, for example \"wide\" for blog.wide.json. Leave empty for the default template.","Internal title shown in the admin, for example \"Buy 2 shirts, get 1 cap free\".": "Internal title shown in the admin, for example \"Buy 2 shirts, get 1 cap free\".","The code customers enter at checkout, for example \"B2G1CAP\".": "The code customers enter at checkout, for example \"B2G1CAP\".","What the customer must buy to unlock the offer: a number of items or a minimum spend.": "What the customer must buy to unlock the offer: a number of items or a minimum spend.",@@ -875,6 +1060,12 @@"Set only when importing an order that was already shipped: the location id (from list_locations) it shipped from. The order is then created fulfilled for all line items. Leave empty for an unfulfilled order.": "Set only when importing an order that was already shipped: the location id (from list_locations) it shipped from. The order is then created fulfilled for all line items. Leave empty for an unfulfilled order.","Tracking numbers of the imported fulfillment, one per package, for example [\"1Z999AA10123456784\", \"1Z999AA10123456785\"]. Needs fulfillment_location_id.": "Tracking numbers of the imported fulfillment, one per package, for example [\"1Z999AA10123456784\", \"1Z999AA10123456785\"]. Needs fulfillment_location_id.","Carrier of the tracking numbers, for example \"UPS\", \"USPS\" or \"DHL Express\". Needs fulfillment_location_id.": "Carrier of the tracking numbers, for example \"UPS\", \"USPS\" or \"DHL Express\". Needs fulfillment_location_id.",+ "Page title, for example \"Frequently asked questions\".": "Page title, for example \"Frequently asked questions\".",+ "Page content, HTML allowed, for example \"<h2>Shipping</h2><p>We ship worldwide.</p>\".": "Page content, HTML allowed, for example \"<h2>Shipping</h2><p>We ship worldwide.</p>\".",+ "URL handle, for example \"faq\". Leave empty to generate it from the title.": "URL handle, for example \"faq\". Leave empty to generate it from the title.",+ "Yes publishes the page on the storefront. Leave empty or No to keep it hidden.": "Yes publishes the page on the storefront. Leave empty or No to keep it hidden.",+ "Publication date and time, ISO 8601, for example \"2026-10-01T09:00:00Z\". It does not publish or schedule the page on its own; Published must be Yes as well.": "Publication date and time, ISO 8601, for example \"2026-10-01T09:00:00Z\". It does not publish or schedule the page on its own; Published must be Yes as well.",+ "Theme template suffix, for example \"contact\" for page.contact.json. Leave empty for the default template.": "Theme template suffix, for example \"contact\" for page.contact.json. Leave empty for the default template.","The options to add, for example Color with values \"Red, Blue\".": "The options to add, for example Color with values \"Red, Blue\".","What happens to variants. Defaults to leaving existing variants as they are.": "What happens to variants. Defaults to leaving existing variants as they are.","Product title, for example \"Organic Cotton T-Shirt\".": "Product title, for example \"Organic Cotton T-Shirt\".",@@ -900,7 +1091,14 @@"Shop currency code for price conditions, for example \"USD\".": "Shop currency code for price conditions, for example \"USD\".","URL handle, for example \"summer-items\". Generated from the title when empty.": "URL handle, for example \"summer-items\". Generated from the title when empty.","Theme template suffix, for example \"sale\".": "Theme template suffix, for example \"sale\".",+ "Public URL of the theme ZIP file, for example \"https://example.com/themes/my-theme.zip\".": "Public URL of the theme ZIP file, for example \"https://example.com/themes/my-theme.zip\".",+ "Name for the new theme, for example \"Autumn 2026\". Leave empty to use the name in the ZIP.": "Name for the new theme, for example \"Autumn 2026\". Leave empty to use the name in the ZIP.",+ "UNPUBLISHED (default) or DEVELOPMENT for a temporary theme. A theme can never be created live.": "UNPUBLISHED (default) or DEVELOPMENT for a temporary theme. A theme can never be created live.",+ "The path to redirect from, starting with \"/\", for example \"/old-page\" or \"/collections/summer-2025\".": "The path to redirect from, starting with \"/\", for example \"/old-page\" or \"/collections/summer-2025\".",+ "Where to send visitors: a path such as \"/pages/new-page\" or a full URL such as \"https://example.com/new\".": "Where to send visitors: a path such as \"/pages/new-page\" or a full URL such as \"https://example.com/new\".","The gift card to deactivate, numeric or \"gid://shopify/GiftCard/…\". Find it with search_gift_cards.": "The gift card to deactivate, numeric or \"gid://shopify/GiftCard/…\". Find it with search_gift_cards.",+ "The article id, numeric or \"gid://shopify/Article/…\". Find it with list_articles.": "The article id, numeric or \"gid://shopify/Article/…\". Find it with list_articles.",+ "The blog id, numeric or \"gid://shopify/Blog/…\". Find it with list_blogs.": "The blog id, numeric or \"gid://shopify/Blog/…\". Find it with list_blogs.","The customer id, numeric or \"gid://shopify/Customer/…\".": "The customer id, numeric or \"gid://shopify/Customer/…\".","The address id from list_customer_addresses, for example \"gid://shopify/MailingAddress/1053318585?model_name=CustomerAddress\" or its number.": "The address id from list_customer_addresses, for example \"gid://shopify/MailingAddress/1053318585?model_name=CustomerAddress\" or its number.","The redeem code ids to delete, for example \"gid://shopify/DiscountRedeemCode/241951653\" (from list_discount_redeem_codes). Leave empty when using search.": "The redeem code ids to delete, for example \"gid://shopify/DiscountRedeemCode/241951653\" (from list_discount_redeem_codes). Leave empty when using search.",@@ -909,18 +1107,26 @@"The fulfillment service, numeric or \"gid://shopify/FulfillmentService/…\". Find it with list_fulfillment_services.": "The fulfillment service, numeric or \"gid://shopify/FulfillmentService/…\". Find it with list_fulfillment_services.","What happens to the service location and its inventory: TRANSFER to another location, KEEP as a regular location, or DELETE.": "What happens to the service location and its inventory: TRANSFER to another location, KEEP as a regular location, or DELETE.","Required with TRANSFER, not allowed otherwise: the active merchant-managed location that receives the inventory, numeric or \"gid://shopify/Location/…\". Find it with list_locations.": "Required with TRANSFER, not allowed otherwise: the active merchant-managed location that receives the inventory, numeric or \"gid://shopify/Location/…\". Find it with list_locations.",+ "One entry per metafield to delete, 1 to 25.": "One entry per metafield to delete, 1 to 25.",+ "The definition id, numeric or \"gid://shopify/MetaobjectDefinition/…\". Find it with list_metaobject_definitions.": "The definition id, numeric or \"gid://shopify/MetaobjectDefinition/…\". Find it with list_metaobject_definitions.",+ "The entry id, numeric or \"gid://shopify/Metaobject/…\". Find it with list_metaobjects.": "The entry id, numeric or \"gid://shopify/Metaobject/…\". Find it with list_metaobjects.",+ "The page id, numeric or \"gid://shopify/Page/…\". Find it with list_pages.": "The page id, numeric or \"gid://shopify/Page/…\". Find it with list_pages.","The product to remove the media from, numeric or \"gid://shopify/Product/…\".": "The product to remove the media from, numeric or \"gid://shopify/Product/…\".","Ids of the media to remove, for example [\"gid://shopify/MediaImage/1072273219\"].": "Ids of the media to remove, for example [\"gid://shopify/MediaImage/1072273219\"].","Ids of the options to delete, for example [\"gid://shopify/ProductOption/1064576516\"].": "Ids of the options to delete, for example [\"gid://shopify/ProductOption/1064576516\"].","What happens to variants when the options are removed.": "What happens to variants when the options are removed.","The product the variants belong to, numeric or \"gid://shopify/Product/…\".": "The product the variants belong to, numeric or \"gid://shopify/Product/…\".","Ids of the variants to delete, numeric or \"gid://shopify/ProductVariant/…\".": "Ids of the variants to delete, numeric or \"gid://shopify/ProductVariant/…\".",+ "The theme id, numeric or \"gid://shopify/OnlineStoreTheme/…\". Find it with list_themes.": "The theme id, numeric or \"gid://shopify/OnlineStoreTheme/…\". Find it with list_themes.",+ "Paths of the files to delete, 1 to 50, for example [\"snippets/old-banner.liquid\"].": "Paths of the files to delete, 1 to 50, for example [\"snippets/old-banner.liquid\"].",+ "The redirect id, numeric or \"gid://shopify/UrlRedirect/…\". Find it with list_url_redirects.": "The redirect id, numeric or \"gid://shopify/UrlRedirect/…\". Find it with list_url_redirects.","Which media to detach from which variant, one entry per pair.": "Which media to detach from which variant, one entry per pair.","The product to copy, numeric or \"gid://shopify/Product/…\". Find it with search_products.": "The product to copy, numeric or \"gid://shopify/Product/…\". Find it with search_products.","Title of the copy, for example \"Organic Cotton T-Shirt (Copy)\".": "Title of the copy, for example \"Organic Cotton T-Shirt (Copy)\".","Status of the copy. Leave empty to keep the status of the original.": "Status of the copy. Leave empty to keep the status of the original.","Also copy the product images (runs in the background). Off by default.": "Also copy the product images (runs in the background). Off by default.","Also copy the product translations. Off by default.": "Also copy the product translations. Off by default.",+ "The standard metaobject type to enable, for example \"shopify--color-pattern\".": "The standard metaobject type to enable, for example \"shopify--color-pattern\".","The redeem code, for example \"SPRING15\".": "The redeem code, for example \"SPRING15\".","The abandonment id, numeric or \"gid://shopify/Abandonment/…\".": "The abandonment id, numeric or \"gid://shopify/Abandonment/…\".","The abandoned checkout id, numeric or \"gid://shopify/AbandonedCheckout/…\". Find it with list_abandoned_checkouts.": "The abandoned checkout id, numeric or \"gid://shopify/AbandonedCheckout/…\". Find it with list_abandoned_checkouts.",@@ -934,6 +1140,10 @@"The gift card id, numeric or \"gid://shopify/GiftCard/…\". Find it with search_gift_cards.": "The gift card id, numeric or \"gid://shopify/GiftCard/…\". Find it with search_gift_cards.","The job id returned by the start action, for example \"gid://shopify/Job/dc9b2604-c73b-45c6-8942-e235bac987e8\". A bare UUID such as \"dc9b2604-c73b-45c6-8942-e235bac987e8\" is also accepted.": "The job id returned by the start action, for example \"gid://shopify/Job/dc9b2604-c73b-45c6-8942-e235bac987e8\". A bare UUID such as \"dc9b2604-c73b-45c6-8942-e235bac987e8\" is also accepted.","The location id, numeric or \"gid://shopify/Location/…\". Find it with list_locations.": "The location id, numeric or \"gid://shopify/Location/…\". Find it with list_locations.",+ "The resource type of the definition, for example PRODUCT.": "The resource type of the definition, for example PRODUCT.",+ "The definition namespace, for example \"custom\".": "The definition namespace, for example \"custom\".",+ "The definition key, for example \"care_instructions\".": "The definition key, for example \"care_instructions\".",+ "The metafield id, numeric or \"gid://shopify/Metafield/…\". Find it with list_metafields.": "The metafield id, numeric or \"gid://shopify/Metafield/…\". Find it with list_metafields.","The transaction id, numeric such as \"389404469\" or \"gid://shopify/OrderTransaction/389404469\". Find it with list_order_transactions.": "The transaction id, numeric such as \"389404469\" or \"gid://shopify/OrderTransaction/389404469\". Find it with list_order_transactions.","The order id: a numeric id such as \"450789469\" or a full id such as \"gid://shopify/Order/450789469\". Find it with search_orders.": "The order id: a numeric id such as \"450789469\" or a full id such as \"gid://shopify/Order/450789469\". Find it with search_orders.","The product id: a numeric id such as \"632910392\" or a full id such as \"gid://shopify/Product/632910392\". Find it with search_products.": "The product id: a numeric id such as \"632910392\" or a full id such as \"gid://shopify/Product/632910392\". Find it with search_products.",@@ -942,6 +1152,8 @@"The variant id: numeric such as \"808950810\" or \"gid://shopify/ProductVariant/808950810\". Find it with list_product_variants.": "The variant id: numeric such as \"808950810\" or \"gid://shopify/ProductVariant/808950810\". Find it with list_product_variants.","The publication id, numeric or \"gid://shopify/Publication/…\". Find it with list_publications.": "The publication id, numeric or \"gid://shopify/Publication/…\". Find it with list_publications.","The refund id, numeric or \"gid://shopify/Refund/…\". Find it with list_order_refunds.": "The refund id, numeric or \"gid://shopify/Refund/…\". Find it with list_order_refunds.",+ "The theme id, numeric or \"gid://shopify/OnlineStoreTheme/…\". Find it with list_themes (role MAIN is the live theme).": "The theme id, numeric or \"gid://shopify/OnlineStoreTheme/…\". Find it with list_themes (role MAIN is the live theme).",+ "Path of the file inside the theme, for example \"templates/index.json\" or \"sections/header.liquid\". Find it with list_theme_files.": "Path of the file inside the theme, for example \"templates/index.json\" or \"sections/header.liquid\". Find it with list_theme_files.","The fulfillment order to hold, numeric or \"gid://shopify/FulfillmentOrder/…\". Find it with list_order_fulfillment_orders.": "The fulfillment order to hold, numeric or \"gid://shopify/FulfillmentOrder/…\". Find it with list_order_fulfillment_orders.","Why the fulfillment order is held.": "Why the fulfillment order is held.","Optional details shown with the hold, for example \"Waiting for the customer to confirm the address\".": "Optional details shown with the hold, for example \"Waiting for the customer to confirm the address\".",@@ -953,11 +1165,18 @@"Field to sort by. Defaults to the checkout id.": "Field to sort by. Defaults to the checkout id.","Return results in reverse sort order (for example newest first).": "Return results in reverse sort order (for example newest first).","How many records to return, 1 to 100. Defaults to 50.": "How many records to return, 1 to 100. Defaults to 50.",- "Optional Shopify search syntax, for example \"active:true\" or \"id:123\". Leave empty to list all.": "Optional Shopify search syntax, for example \"active:true\" or \"id:123\". Leave empty to list all.",- "Field to sort by. Defaults to the id.": "Field to sort by. Defaults to the id.","How many records to return, 1 to 250. Defaults to 50.": "How many records to return, 1 to 250. Defaults to 50.",+ "How many tags to return, 1 to 250.": "How many tags to return, 1 to 250.",+ "Alphabetical (default) or most used first.": "Alphabetical (default) or most used first.",+ "Only list articles of this blog, numeric or \"gid://shopify/Blog/…\". Leave empty for every blog.": "Only list articles of this blog, numeric or \"gid://shopify/Blog/…\". Leave empty for every blog.",+ "Shopify article search syntax, for example \"tag:news published_status:published\" or \"title:summer\". Leave empty to list all.": "Shopify article search syntax, for example \"tag:news published_status:published\" or \"title:summer\". Leave empty to list all.",+ "Field to sort by. Defaults to the id.": "Field to sort by. Defaults to the id.",+ "How many records to return, 1 to 160. Defaults to 50.": "How many records to return, 1 to 160. Defaults to 50.",+ "Shopify blog search syntax, for example \"title:News\" or \"handle:news\". Leave empty to list all.": "Shopify blog search syntax, for example \"title:News\" or \"handle:news\". Leave empty to list all.",+ "Optional Shopify search syntax, for example \"active:true\" or \"id:123\". Leave empty to list all.": "Optional Shopify search syntax, for example \"active:true\" or \"id:123\". Leave empty to list all.","Field to sort by. Defaults to the collection's own sort order.": "Field to sort by. Defaults to the collection's own sort order.","How many records to return, 1 to 80. Defaults to 50.": "How many records to return, 1 to 80. Defaults to 50.",+ "Shopify comment search syntax, for example \"status:pending\" or \"published_status:published\". Leave empty to list all.": "Shopify comment search syntax, for example \"status:pending\" or \"published_status:published\". Leave empty to list all.","Optional order search syntax to narrow the list, for example \"financial_status:paid\" or \"created_at:>=2026-01-01\".": "Optional order search syntax to narrow the list, for example \"financial_status:paid\" or \"created_at:>=2026-01-01\".","Field to sort by. Defaults to the order id.": "Field to sort by. Defaults to the order id.","How many records to return, 1 to 40. Defaults to 40.": "How many records to return, 1 to 40. Defaults to 40.",@@ -982,19 +1201,37 @@"Also return deactivated locations. Off by default.": "Also return deactivated locations. Off by default.","Also return legacy fulfillment-service locations. Off by default.": "Also return legacy fulfillment-service locations. Off by default.","Field to sort by. Defaults to the name.": "Field to sort by. Defaults to the name.",+ "The resource type the definitions belong to, for example PRODUCT.": "The resource type the definitions belong to, for example PRODUCT.",+ "Only definitions in this namespace, for example \"custom\".": "Only definitions in this namespace, for example \"custom\".",+ "Only the definition with this key.": "Only the definition with this key.",+ "Only pinned or only unpinned definitions. Leave empty for all.": "Only pinned or only unpinned definitions. Leave empty for all.",+ "Free-text search over the definitions, for example \"care\". Leave empty for all.": "Free-text search over the definitions, for example \"care\". Leave empty for all.",+ "Full id of the resource, for example \"gid://shopify/Product/123\" or \"gid://shopify/Customer/456\".": "Full id of the resource, for example \"gid://shopify/Product/123\" or \"gid://shopify/Customer/456\".",+ "Only return metafields in this namespace, for example \"custom\". Leave empty for all.": "Only return metafields in this namespace, for example \"custom\". Leave empty for all.",+ "How many records to return, 1 to 30. Defaults to 30.": "How many records to return, 1 to 30. Defaults to 30.",+ "The metaobject definition type, for example \"designer\". Find it with list_metaobject_definitions.": "The metaobject definition type, for example \"designer\". Find it with list_metaobject_definitions.",+ "Shopify metaobject search syntax, for example \"display_name:Ada\" or \"fields.country:France\". Leave empty to list all.": "Shopify metaobject search syntax, for example \"display_name:Ada\" or \"fields.country:France\". Leave empty to list all.",+ "How many records to return, 1 to 50. Defaults to 50.": "How many records to return, 1 to 50. Defaults to 50.","Optional Shopify search syntax on the fulfillment orders, for example \"status:open\". Leave empty to list all.": "Optional Shopify search syntax on the fulfillment orders, for example \"status:open\". Leave empty to list all.","How many records to return, 1 to 4. Defaults to 4.": "How many records to return, 1 to 4. Defaults to 4.",- "How many records to return, 1 to 50. Defaults to 50.": "How many records to return, 1 to 50. Defaults to 50.",+ "Shopify page search syntax, for example \"title:FAQ\" or \"published_status:unpublished\". Leave empty to list all.": "Shopify page search syntax, for example \"title:FAQ\" or \"published_status:unpublished\". Leave empty to list all.","Field to sort by. Defaults to position.": "Field to sort by. Defaults to position.","How many records to return, 1 to 130. Defaults to 50.": "How many records to return, 1 to 130. Defaults to 50.","Only list publications of this catalog type. Leave empty for all.": "Only list publications of this catalog type. Leave empty for all.",+ "Yes hides templates the store has already enabled. Leave empty to include them.": "Yes hides templates the store has already enabled. Leave empty to include them.","Shopify search syntax, for example \"processed_at:>=2026-09-01\" or \"test:false\". Leave empty for all.": "Shopify search syntax, for example \"processed_at:>=2026-09-01\" or \"test:false\". Leave empty for all.",+ "Only list these paths, up to 50; * matches any characters, for example [\"templates/*.json\", \"layout/theme.liquid\"]. Leave empty for every file.": "Only list these paths, up to 50; * matches any characters, for example [\"templates/*.json\", \"layout/theme.liquid\"]. Leave empty for every file.",+ "Only return themes with these roles, for example MAIN for the live theme. Leave empty for all.": "Only return themes with these roles, for example MAIN for the live theme. Leave empty for all.",+ "Only return themes with these exact names, for example [\"Dawn\"].": "Only return themes with these exact names, for example [\"Dawn\"].",+ "Shopify redirect search syntax, for example \"path:/old-page\" or \"target:/pages/new\". Leave empty to list all.": "Shopify redirect search syntax, for example \"path:/old-page\" or \"target:/pages/new\". Leave empty to list all.",+ "The comment id, numeric or \"gid://shopify/Comment/…\". Find it with list_comments (\"status:spam\").": "The comment id, numeric or \"gid://shopify/Comment/…\". Find it with list_comments (\"status:spam\").","The location that should ship the items, numeric or \"gid://shopify/Location/…\". Find a movable one with list_fulfillment_order_move_locations.": "The location that should ship the items, numeric or \"gid://shopify/Location/…\". Find a movable one with list_fulfillment_order_move_locations.","Optional partial move: the fulfillment order line items and quantities to move. Leave empty to move the whole fulfillment order.": "Optional partial move: the fulfillment order line items and quantities to move. Leave empty to move the whole fulfillment order.","Whether the id is a product or a collection.": "Whether the id is a product or a collection.","The product or collection id, numeric or a full id such as \"gid://shopify/Product/632910392\".": "The product or collection id, numeric or a full id such as \"gid://shopify/Product/632910392\".","Publications to publish to, for example [\"gid://shopify/Publication/762454635\"].": "Publications to publish to, for example [\"gid://shopify/Publication/762454635\"].","Optional future date and time to publish at. Leave empty to publish now.": "Optional future date and time to publish at. Leave empty to publish now.",+ "The theme to make live, numeric or \"gid://shopify/OnlineStoreTheme/…\". Find it with list_themes.": "The theme to make live, numeric or \"gid://shopify/OnlineStoreTheme/…\". Find it with list_themes.","The held fulfillment order, numeric or \"gid://shopify/FulfillmentOrder/…\". Find it with list_order_fulfillment_orders.": "The held fulfillment order, numeric or \"gid://shopify/FulfillmentOrder/…\". Find it with list_order_fulfillment_orders.","Release only the listed holds, or every hold on the fulfillment order.": "Release only the listed holds, or every hold on the fulfillment order.","The holds to release, for example \"gid://shopify/FulfillmentHold/123\". Required with LISTED_HOLDS, must be empty with ALL_HOLDS.": "The holds to release, for example \"gid://shopify/FulfillmentHold/123\". Required with LISTED_HOLDS, must be empty with ALL_HOLDS.",@@ -1026,6 +1263,7 @@"The date and time by which they must be fulfilled, ISO 8601, for example \"2026-10-01T17:00:00Z\".": "The date and time by which they must be fulfilled, ISO 8601, for example \"2026-10-01T17:00:00Z\".","Which quantity to set.": "Which quantity to set.","Optional URI of the document behind the change, for example \"gid://my-app/CycleCount/CC-1\".": "Optional URI of the document behind the change, for example \"gid://my-app/CycleCount/CC-1\".",+ "One entry per metafield to set, 1 to 25.": "One entry per metafield to set, 1 to 25.","The product to overwrite, numeric or \"gid://shopify/Product/…\". Leave empty (and no handle) to create a new product.": "The product to overwrite, numeric or \"gid://shopify/Product/…\". Leave empty (and no handle) to create a new product.","Alternative to Product ID: the handle of an existing product to overwrite, for example \"organic-cotton-t-shirt\". If no product has this handle the call fails; it never creates a product.": "Alternative to Product ID: the handle of an existing product to overwrite, for example \"organic-cotton-t-shirt\". If no product has this handle the call fails; it never creates a product.","Product title. Required when creating a new product.": "Product title. Required when creating a new product.",@@ -1043,6 +1281,20 @@"Email the customer about the cancellation. Off by default.": "Email the customer about the cancellation. Off by default.","Internal note about the cancellation, not shown to the customer.": "Internal note about the cancellation, not shown to the customer.","Publications to unpublish from, for example [\"gid://shopify/Publication/762454635\"].": "Publications to unpublish from, for example [\"gid://shopify/Publication/762454635\"].",+ "New title.": "New title.",+ "New article content, HTML allowed. Replaces the whole body.": "New article content, HTML allowed. Replaces the whole body.",+ "New excerpt, HTML allowed.": "New excerpt, HTML allowed.",+ "New author name.": "New author name.",+ "The complete new tag list. Replaces every existing tag; leave empty to keep the current tags (use clear_tags to remove all).": "The complete new tag list. Replaces every existing tag; leave empty to keep the current tags (use clear_tags to remove all).",+ "Yes publishes the article, No hides it. Leave empty to keep the current state.": "Yes publishes the article, No hides it. Leave empty to keep the current state.",+ "New publication date and time, ISO 8601.": "New publication date and time, ISO 8601.",+ "New URL handle, for example \"summer-collection-2026\".": "New URL handle, for example \"summer-collection-2026\".",+ "When changing the handle, create a redirect from the old URL. Leave empty for the Shopify default.": "When changing the handle, create a redirect from the old URL. Leave empty for the Shopify default.",+ "Move the article to this blog, numeric or \"gid://shopify/Blog/…\".": "Move the article to this blog, numeric or \"gid://shopify/Blog/…\".",+ "Public URL of a new featured image.": "Public URL of a new featured image.",+ "New theme template suffix.": "New theme template suffix.",+ "Remove the existing content. Leave body_html empty when using this.": "Remove the existing content. Leave body_html empty when using this.",+ "Remove every tag. Leave tags empty when using this.": "Remove every tag. Leave tags empty when using this.","The code discount id, for example \"gid://shopify/DiscountCodeNode/123\" or \"123\". Get it from list_discounts, get_discount or find_discount_by_code.": "The code discount id, for example \"gid://shopify/DiscountCodeNode/123\" or \"123\". Get it from list_discounts, get_discount or find_discount_by_code.","New internal title. Leave empty to keep it.": "New internal title. Leave empty to keep it.","New code customers enter. Leave empty to keep it.": "New code customers enter. Leave empty to keep it.",@@ -1071,11 +1323,14 @@"Yes: each customer can use it once. No: no per-customer limit. Leave unset to keep it.": "Yes: each customer can use it once. No: no per-customer limit. Leave unset to keep it.","Set all three combines_with choices together; they replace the current combinations.": "Set all three combines_with choices together; they replace the current combinations.","The complete new tag list; replaces the current tags. Leave empty to keep them.": "The complete new tag list; replaces the current tags. Leave empty to keep them.",- "New title.": "New title.",+ "New blog title.": "New blog title.",+ "New URL handle, for example \"company-news\".": "New URL handle, for example \"company-news\".",+ "When changing the handle, create a redirect from the old blog URL. Leave empty for the Shopify default.": "When changing the handle, create a redirect from the old blog URL. Leave empty for the Shopify default.",+ "When changing the handle, also redirect the old URLs of the blog's articles. Leave empty for the Shopify default.": "When changing the handle, also redirect the old URLs of the blog's articles. Leave empty for the Shopify default.",+ "New comment policy. Leave empty to keep the current one.": "New comment policy. Leave empty to keep the current one.",+ "New theme template suffix, for example \"wide\". Leave empty to keep the current one.": "New theme template suffix, for example \"wide\". Leave empty to keep the current one.","New description, HTML allowed. Replaces the existing description.": "New description, HTML allowed. Replaces the existing description.","New URL handle.": "New URL handle.",- "When changing the handle, create a redirect from the old URL. Leave empty for the Shopify default.": "When changing the handle, create a redirect from the old URL. Leave empty for the Shopify default.",- "New theme template suffix.": "New theme template suffix.","Public URL of a new collection image.": "Public URL of a new collection image.","Alt text for the new image. Only used together with an image URL.": "Alt text for the new image. Only used together with an image URL.","New page title for search engines.": "New page title for search engines.",@@ -1091,10 +1346,8 @@"New first name.": "New first name.","New last name.": "New last name.","New internal note. Replaces the existing note.": "New internal note. Replaces the existing note.",- "The complete new tag list. Replaces every existing tag; leave empty to keep the current tags (use clear_tags to remove all).": "The complete new tag list. Replaces every existing tag; leave empty to keep the current tags (use clear_tags to remove all).","Set whether the customer is exempt from taxes. Leave empty to keep the current setting.": "Set whether the customer is exempt from taxes. Leave empty to keep the current setting.","Remove the existing note. Leave note empty when using this.": "Remove the existing note. Leave note empty when using this.",- "Remove every tag. Leave tags empty when using this.": "Remove every tag. Leave tags empty when using this.","The complete new list of line items. Replaces every existing line item; leave empty to keep the current items.": "The complete new list of line items. Replaces every existing line item; leave empty to keep the current items.","Three-letter currency for the unit prices given in line items, for example \"USD\".": "Three-letter currency for the unit prices given in line items, for example \"USD\".","Customer the draft is for, numeric or \"gid://shopify/Customer/…\".": "Customer the draft is for, numeric or \"gid://shopify/Customer/…\".",@@ -1130,9 +1383,16 @@"Harmonized System code for customs, for example \"6109.10\".": "Harmonized System code for customs, for example \"6109.10\".","Item weight, for example 0.25. Set together with the weight unit.": "Item weight, for example 0.25. Set together with the weight unit.","Unit of the weight.": "Unit of the weight.",+ "New display name, for example \"Care instructions\".": "New display name, for example \"Care instructions\".",+ "New description shown to staff.": "New description shown to staff.",+ "The complete new list of validation rules; replaces every existing rule. Leave empty to keep the current rules.": "The complete new list of validation rules; replaces every existing rule. Leave empty to keep the current rules.",+ "Yes removes every validation rule. Cannot be combined with validations.": "Yes removes every validation rule. Cannot be combined with validations.","New contact email, for example \"[email protected]\".": "New contact email, for example \"[email protected]\".","New contact phone in E.164 format, for example \"+16135551111\".": "New contact phone in E.164 format, for example \"+16135551111\".","The complete new tag list, for example [\"wholesale\", \"priority\"]. Replaces every existing tag; leave empty to keep the current tags (use clear_tags to remove all).": "The complete new tag list, for example [\"wholesale\", \"priority\"]. Replaces every existing tag; leave empty to keep the current tags (use clear_tags to remove all).",+ "New page content, HTML allowed. Replaces the whole body.": "New page content, HTML allowed. Replaces the whole body.",+ "New URL handle, for example \"shipping-faq\".": "New URL handle, for example \"shipping-faq\".",+ "Yes publishes the page, No hides it. Leave empty to keep the current state.": "Yes publishes the page, No hides it. Leave empty to keep the current state.","New product title.": "New product title.","New vendor name.": "New vendor name.","New product type.": "New product type.",@@ -1154,6 +1414,14 @@"Ids of option values to delete.": "Ids of option values to delete.","How variants follow value changes. Leave empty for the Shopify default (leave variants as they are).": "How variants follow value changes. Leave empty for the Shopify default (leave variants as they are).","The variants to change, one entry per variant. Fields left empty keep their values.": "The variants to change, one entry per variant. Fields left empty keep their values.",+ "The new theme name, for example \"Dawn - holiday edit\".": "The new theme name, for example \"Dawn - holiday edit\".",+ "New path to redirect from, starting with \"/\".": "New path to redirect from, starting with \"/\".",+ "New target path or full URL.": "New target path or full URL.",+ "Unique handle of the entry within its type, for example \"ada-lovelace\". Reusing an existing handle updates that entry.": "Unique handle of the entry within its type, for example \"ada-lovelace\". Reusing an existing handle updates that entry.",+ "Field values to write; fields you leave out keep their current values.": "Field values to write; fields you leave out keep their current values.",+ "DRAFT hides the entry from the storefront, ACTIVE shows it. Only for publishable types; leave empty to keep the current status.": "DRAFT hides the entry from the storefront, ACTIVE shows it. Only for publishable types; leave empty to keep the current status.",+ "Online store template suffix for the entry's page. Only for types with the online store capability.": "Online store template suffix for the entry's page. Only for types with the online store capability.",+ "One entry per file, 1 to 50, each path at most once.": "One entry per file, 1 to 50, each path at most once.","The AUTHORIZATION transaction to void, numeric or \"gid://shopify/OrderTransaction/…\". Find it with list_order_transactions.": "The AUTHORIZATION transaction to void, numeric or \"gid://shopify/OrderTransaction/…\". Find it with list_order_transactions.","Authorization headers are injected automatically from your connection.": "Authorization headers are injected automatically from your connection.","Appended to the URL as ?key=value.": "Appended to the URL as ?key=value.",@@ -1165,6 +1433,7 @@"Draft": "Draft","Archived": "Archived","Draft order": "Draft order",+ "Blog article": "Blog article","Subscription contract": "Subscription contract","Available": "Available","Damaged": "Damaged",@@ -1186,6 +1455,8 @@"Reservation updated": "Reservation updated","Reservation deleted": "Reservation deleted","Other": "Other",+ "Only the listed entry ids": "Only the listed entry ids",+ "Every entry of the type": "Every entry of the type","Yes": "Yes","No": "No","Percentage": "Percentage",@@ -1198,6 +1469,9 @@"Customer segments": "Customer segments","Minimum subtotal": "Minimum subtotal","Minimum quantity of items": "Minimum quantity of items",+ "Comments closed": "Comments closed",+ "Comments held for moderation": "Comments held for moderation",+ "Comments published automatically": "Comments published automatically","Minimum purchase amount": "Minimum purchase amount","Manual": "Manual","Best selling": "Best selling",@@ -1250,12 +1524,31 @@"Keep the standalone placeholder variant": "Keep the standalone placeholder variant","All conditions": "All conditions","Any condition": "Any condition",+ "Unpublished": "Unpublished",+ "Development": "Development","Transfer inventory to another location": "Transfer inventory to another location","Keep the location and its inventory": "Keep the location and its inventory","Delete the location and its inventory": "Delete the location and its inventory","Refuse if any variant would be deleted": "Refuse if any variant would be deleted","Default (only options with a single value)": "Default (only options with a single value)","Delete duplicate variants, keep the lowest position": "Delete duplicate variants, keep the lowest position",+ "PRODUCT": "PRODUCT",+ "PRODUCTVARIANT": "PRODUCTVARIANT",+ "COLLECTION": "COLLECTION",+ "CUSTOMER": "CUSTOMER",+ "ORDER": "ORDER",+ "DRAFTORDER": "DRAFTORDER",+ "COMPANY": "COMPANY",+ "COMPANY_LOCATION": "COMPANY_LOCATION",+ "LOCATION": "LOCATION",+ "MARKET": "MARKET",+ "PAGE": "PAGE",+ "BLOG": "BLOG",+ "ARTICLE": "ARTICLE",+ "SHOP": "SHOP",+ "DISCOUNT": "DISCOUNT",+ "SELLING_PLAN": "SELLING_PLAN",+ "GIFT_CARD_TRANSACTION": "GIFT_CARD_TRANSACTION","Awaiting payment": "Awaiting payment","High risk of fraud": "High risk of fraud","Incorrect address": "Incorrect address",@@ -1268,7 +1561,12 @@"Total price": "Total price","Relevance (with a query)": "Relevance (with a query)","ID": "ID",+ "Alphabetical": "Alphabetical",+ "Most used first": "Most used first",+ "Published at": "Published at","Updated at": "Updated at",+ "Author": "Author",+ "Blog title": "Blog title","Collection default": "Collection default","Created": "Created","Processed at": "Processed at",@@ -1277,11 +1575,19 @@"Ends at": "Ends at","Number": "Number","Happened at": "Happened at",- "Name": "Name",+ "Any": "Any",+ "Pinned": "Pinned",+ "Unpinned": "Unpinned",+ "Pinned position": "Pinned position",+ "Display name": "Display name","Inventory quantity": "Inventory quantity","App (sales channel)": "App (sales channel)","Market": "Market","Company location (B2B)": "Company location (B2B)",+ "Live theme (MAIN)": "Live theme (MAIN)",+ "Demo": "Demo",+ "Locked": "Locked",+ "Path": "Path","Only the listed holds": "Only the listed holds","All holds on the fulfillment order": "All holds on the fulfillment order","Balance": "Balance",@@ -1291,7 +1597,6 @@"Disabled at": "Disabled at","Financial status": "Financial status","Fulfillment status": "Fulfillment status",- "Published at": "Published at","Inventory total": "Inventory total","Product type": "Product type","On hand": "On hand",diff --git a/packages/pieces/community/shopify/src/index.ts b/packages/pieces/community/shopify/src/index.tsindex 057d494f8e7..7b4fa10f464 100644--- a/packages/pieces/community/shopify/src/index.ts+++ b/packages/pieces/community/shopify/src/index.ts@@ -40,14 +40,17 @@ import { shopifyAiCreateRequestedOrderEdit } from './lib/actions/ai/create-requeimport { shopifyAiCalculateRequestedOrderEdit } from './lib/actions/ai/calculate-requested-order-edit';import { shopifyAiListRequestedOrderEdits } from './lib/actions/ai/list-requested-order-edits';import { shopifyAiAdjustInventoryQuantities } from './lib/actions/ai/adjust-inventory-quantities';+import { shopifyAiApproveComment } from './lib/actions/ai/approve-comment';import { shopifyAiArchiveOrder } from './lib/actions/ai/archive-order';import { shopifyAiAttachVariantMedia } from './lib/actions/ai/attach-variant-media';+import { shopifyAiBulkDeleteMetaobjects } from './lib/actions/ai/bulk-delete-metaobjects';import { shopifyAiCalculateRefund } from './lib/actions/ai/calculate-refund';import { shopifyAiCancelFulfillmentOrder } from './lib/actions/ai/cancel-fulfillment-order';import { shopifyAiCancelFulfillment } from './lib/actions/ai/cancel-fulfillment';import { shopifyAiCaptureOrderPayment } from './lib/actions/ai/capture-order-payment';import { shopifyAiCompleteDraftOrder } from './lib/actions/ai/complete-draft-order';import { shopifyAiCountAbandonedCheckouts } from './lib/actions/ai/count-abandoned-checkouts';+import { shopifyAiCountBlogs } from './lib/actions/ai/count-blogs';import { shopifyAiCountCollections } from './lib/actions/ai/count-collections';import { shopifyAiCountCustomerSegments } from './lib/actions/ai/count-customer-segments';import { shopifyAiCountCustomers } from './lib/actions/ai/count-customers';@@ -56,8 +59,12 @@ import { shopifyAiCountDiscounts } from './lib/actions/ai/count-discounts';import { shopifyAiCountDraftOrders } from './lib/actions/ai/count-draft-orders';import { shopifyAiCountGiftCards } from './lib/actions/ai/count-gift-cards';import { shopifyAiCountLocations } from './lib/actions/ai/count-locations';+import { shopifyAiCountPages } from './lib/actions/ai/count-pages';import { shopifyAiCountProducts } from './lib/actions/ai/count-products';+import { shopifyAiCountUrlRedirects } from './lib/actions/ai/count-url-redirects';+import { shopifyAiCreateArticle } from './lib/actions/ai/create-article';import { shopifyAiCreateBasicDiscountCode } from './lib/actions/ai/create-basic-discount-code';+import { shopifyAiCreateBlog } from './lib/actions/ai/create-blog';import { shopifyAiCreateBxgyDiscountCode } from './lib/actions/ai/create-bxgy-discount-code';import { shopifyAiCreateCollection } from './lib/actions/ai/create-collection';import { shopifyAiCreateCustomerAddress } from './lib/actions/ai/create-customer-address';@@ -69,30 +76,46 @@ import { shopifyAiCreateFulfillment } from './lib/actions/ai/create-fulfillment'import { shopifyAiCreateGiftCard } from './lib/actions/ai/create-gift-card';import { shopifyAiCreateOrderRiskAssessment } from './lib/actions/ai/create-order-risk-assessment';import { shopifyAiCreateOrderWithLineItems } from './lib/actions/ai/create-order-with-line-items';+import { shopifyAiCreatePage } from './lib/actions/ai/create-page';import { shopifyAiCreateProductOptions } from './lib/actions/ai/create-product-options';import { shopifyAiCreateProductRecord } from './lib/actions/ai/create-product-record';import { shopifyAiCreateProductVariants } from './lib/actions/ai/create-product-variants';import { shopifyAiCreateRefund } from './lib/actions/ai/create-refund';import { shopifyAiCreateSmartCollection } from './lib/actions/ai/create-smart-collection';+import { shopifyAiCreateTheme } from './lib/actions/ai/create-theme';+import { shopifyAiCreateUrlRedirect } from './lib/actions/ai/create-url-redirect';import { shopifyAiDeactivateGiftCard } from './lib/actions/ai/deactivate-gift-card';import { shopifyAiDeactivateInventoryAtLocation } from './lib/actions/ai/deactivate-inventory-at-location';+import { shopifyAiDeleteArticle } from './lib/actions/ai/delete-article';+import { shopifyAiDeleteBlog } from './lib/actions/ai/delete-blog';import { shopifyAiDeleteCollection } from './lib/actions/ai/delete-collection';+import { shopifyAiDeleteComment } from './lib/actions/ai/delete-comment';import { shopifyAiDeleteCustomerAddress } from './lib/actions/ai/delete-customer-address';import { shopifyAiDeleteCustomer } from './lib/actions/ai/delete-customer';import { shopifyAiDeleteDiscountRedeemCodes } from './lib/actions/ai/delete-discount-redeem-codes';import { shopifyAiDeleteDiscount } from './lib/actions/ai/delete-discount';import { shopifyAiDeleteDraftOrder } from './lib/actions/ai/delete-draft-order';import { shopifyAiDeleteFulfillmentService } from './lib/actions/ai/delete-fulfillment-service';+import { shopifyAiDeleteMetafields } from './lib/actions/ai/delete-metafields';+import { shopifyAiDeleteMetaobjectDefinition } from './lib/actions/ai/delete-metaobject-definition';+import { shopifyAiDeleteMetaobject } from './lib/actions/ai/delete-metaobject';import { shopifyAiDeleteOrder } from './lib/actions/ai/delete-order';+import { shopifyAiDeletePage } from './lib/actions/ai/delete-page';import { shopifyAiDeleteProductMedia } from './lib/actions/ai/delete-product-media';import { shopifyAiDeleteProductOptions } from './lib/actions/ai/delete-product-options';import { shopifyAiDeleteProductVariants } from './lib/actions/ai/delete-product-variants';import { shopifyAiDeleteProduct } from './lib/actions/ai/delete-product';+import { shopifyAiDeleteThemeFiles } from './lib/actions/ai/delete-theme-files';+import { shopifyAiDeleteTheme } from './lib/actions/ai/delete-theme';+import { shopifyAiDeleteUrlRedirect } from './lib/actions/ai/delete-url-redirect';import { shopifyAiDetachVariantMedia } from './lib/actions/ai/detach-variant-media';import { shopifyAiDuplicateProduct } from './lib/actions/ai/duplicate-product';+import { shopifyAiEnableStandardMetaobjectDefinition } from './lib/actions/ai/enable-standard-metaobject-definition';import { shopifyAiFindDiscountByCode } from './lib/actions/ai/find-discount-by-code';import { shopifyAiGenerateCustomerActivationUrl } from './lib/actions/ai/generate-customer-activation-url';import { shopifyAiGetAbandonment } from './lib/actions/ai/get-abandonment';+import { shopifyAiGetArticle } from './lib/actions/ai/get-article';+import { shopifyAiGetBlog } from './lib/actions/ai/get-blog';import { shopifyAiGetCheckoutAbandonment } from './lib/actions/ai/get-checkout-abandonment';import { shopifyAiGetCollectionByHandle } from './lib/actions/ai/get-collection-by-handle';import { shopifyAiGetCollection } from './lib/actions/ai/get-collection';@@ -107,9 +130,14 @@ import { shopifyAiGetGrantedAccessScopes } from './lib/actions/ai/get-granted-acimport { shopifyAiGetInventoryItem } from './lib/actions/ai/get-inventory-item';import { shopifyAiGetJob } from './lib/actions/ai/get-job';import { shopifyAiGetLocation } from './lib/actions/ai/get-location';+import { shopifyAiGetMetafieldDefinition } from './lib/actions/ai/get-metafield-definition';+import { shopifyAiGetMetafield } from './lib/actions/ai/get-metafield';+import { shopifyAiGetMetaobject } from './lib/actions/ai/get-metaobject';+import { shopifyAiGetOnlineStoreSettings } from './lib/actions/ai/get-online-store-settings';import { shopifyAiGetOrderRiskAssessments } from './lib/actions/ai/get-order-risk-assessments';import { shopifyAiGetOrderTransaction } from './lib/actions/ai/get-order-transaction';import { shopifyAiGetOrder } from './lib/actions/ai/get-order';+import { shopifyAiGetPage } from './lib/actions/ai/get-page';import { shopifyAiGetProductDetails } from './lib/actions/ai/get-product-details';import { shopifyAiGetProductDuplicateJob } from './lib/actions/ai/get-product-duplicate-job';import { shopifyAiGetProductMedia } from './lib/actions/ai/get-product-media';@@ -117,10 +145,18 @@ import { shopifyAiGetProductVariantDetails } from './lib/actions/ai/get-product-import { shopifyAiGetPublication } from './lib/actions/ai/get-publication';import { shopifyAiGetRefund } from './lib/actions/ai/get-refund';import { shopifyAiGetShop } from './lib/actions/ai/get-shop';+import { shopifyAiGetThemeFile } from './lib/actions/ai/get-theme-file';+import { shopifyAiGetTheme } from './lib/actions/ai/get-theme';+import { shopifyAiGetUrlRedirect } from './lib/actions/ai/get-url-redirect';import { shopifyAiHoldFulfillmentOrder } from './lib/actions/ai/hold-fulfillment-order';import { shopifyAiListAbandonedCheckouts } from './lib/actions/ai/list-abandoned-checkouts';+import { shopifyAiListArticleAuthors } from './lib/actions/ai/list-article-authors';+import { shopifyAiListArticleTags } from './lib/actions/ai/list-article-tags';+import { shopifyAiListArticles } from './lib/actions/ai/list-articles';+import { shopifyAiListBlogs } from './lib/actions/ai/list-blogs';import { shopifyAiListCarrierServices } from './lib/actions/ai/list-carrier-services';import { shopifyAiListCollectionProducts } from './lib/actions/ai/list-collection-products';+import { shopifyAiListComments } from './lib/actions/ai/list-comments';import { shopifyAiListCustomerAddresses } from './lib/actions/ai/list-customer-addresses';import { shopifyAiListCustomerOrders } from './lib/actions/ai/list-customer-orders';import { shopifyAiListDeliveryProfiles } from './lib/actions/ai/list-delivery-profiles';@@ -133,18 +169,32 @@ import { shopifyAiListFulfillmentServices } from './lib/actions/ai/list-fulfillmimport { shopifyAiListInventoryItems } from './lib/actions/ai/list-inventory-items';import { shopifyAiListInventoryLevels } from './lib/actions/ai/list-inventory-levels';import { shopifyAiListLocations } from './lib/actions/ai/list-locations';+import { shopifyAiListMetafieldDefinitionTypes } from './lib/actions/ai/list-metafield-definition-types';+import { shopifyAiListMetafieldDefinitions } from './lib/actions/ai/list-metafield-definitions';+import { shopifyAiListMetafields } from './lib/actions/ai/list-metafields';+import { shopifyAiListMetaobjectDefinitions } from './lib/actions/ai/list-metaobject-definitions';+import { shopifyAiListMetaobjects } from './lib/actions/ai/list-metaobjects';import { shopifyAiListOrderFulfillmentOrders } from './lib/actions/ai/list-order-fulfillment-orders';import { shopifyAiListOrderFulfillments } from './lib/actions/ai/list-order-fulfillments';import { shopifyAiListOrderRefunds } from './lib/actions/ai/list-order-refunds';import { shopifyAiListOrderTransactions } from './lib/actions/ai/list-order-transactions';+import { shopifyAiListPages } from './lib/actions/ai/list-pages';import { shopifyAiListProductMedia } from './lib/actions/ai/list-product-media';import { shopifyAiListProductVariants } from './lib/actions/ai/list-product-variants';import { shopifyAiListPublications } from './lib/actions/ai/list-publications';import { shopifyAiListSalesChannels } from './lib/actions/ai/list-sales-channels';+import { shopifyAiListStandardMetafieldDefinitionTemplates } from './lib/actions/ai/list-standard-metafield-definition-templates';import { shopifyAiListTenderTransactions } from './lib/actions/ai/list-tender-transactions';+import { shopifyAiListThemeFiles } from './lib/actions/ai/list-theme-files';+import { shopifyAiListThemes } from './lib/actions/ai/list-themes';+import { shopifyAiListUrlRedirects } from './lib/actions/ai/list-url-redirects';+import { shopifyAiMarkCommentNotSpam } from './lib/actions/ai/mark-comment-not-spam';+import { shopifyAiMarkCommentSpam } from './lib/actions/ai/mark-comment-spam';import { shopifyAiMarkOrderAsPaid } from './lib/actions/ai/mark-order-as-paid';import { shopifyAiMoveFulfillmentOrder } from './lib/actions/ai/move-fulfillment-order';+import { shopifyAiPinMetafieldDefinition } from './lib/actions/ai/pin-metafield-definition';import { shopifyAiPublishResource } from './lib/actions/ai/publish-resource';+import { shopifyAiPublishTheme } from './lib/actions/ai/publish-theme';import { shopifyAiReleaseFulfillmentOrderHold } from './lib/actions/ai/release-fulfillment-order-hold';import { shopifyAiRemoveProductsFromCollection } from './lib/actions/ai/remove-products-from-collection';import { shopifyAiRemoveTags } from './lib/actions/ai/remove-tags';@@ -163,11 +213,14 @@ import { shopifyAiSendDraftOrderInvoice } from './lib/actions/ai/send-draft-ordeimport { shopifyAiSetDefaultCustomerAddress } from './lib/actions/ai/set-default-customer-address';import { shopifyAiSetFulfillmentOrdersDeadline } from './lib/actions/ai/set-fulfillment-orders-deadline';import { shopifyAiSetInventoryQuantities } from './lib/actions/ai/set-inventory-quantities';+import { shopifyAiSetMetafields } from './lib/actions/ai/set-metafields';import { shopifyAiSetProduct } from './lib/actions/ai/set-product';import { shopifyAiStartOrderCancellation } from './lib/actions/ai/start-order-cancellation';import { shopifyAiUnarchiveOrder } from './lib/actions/ai/unarchive-order';import { shopifyAiUnpublishResource } from './lib/actions/ai/unpublish-resource';+import { shopifyAiUpdateArticle } from './lib/actions/ai/update-article';import { shopifyAiUpdateBasicDiscountCode } from './lib/actions/ai/update-basic-discount-code';+import { shopifyAiUpdateBlog } from './lib/actions/ai/update-blog';import { shopifyAiUpdateCollection } from './lib/actions/ai/update-collection';import { shopifyAiUpdateCustomerAddress } from './lib/actions/ai/update-customer-address';import { shopifyAiUpdateCustomerProfile } from './lib/actions/ai/update-customer-profile';@@ -176,11 +229,17 @@ import { shopifyAiUpdateFreeShippingDiscountCode } from './lib/actions/ai/updateimport { shopifyAiUpdateFulfillmentTracking } from './lib/actions/ai/update-fulfillment-tracking';import { shopifyAiUpdateGiftCard } from './lib/actions/ai/update-gift-card';import { shopifyAiUpdateInventoryItem } from './lib/actions/ai/update-inventory-item';+import { shopifyAiUpdateMetafieldDefinition } from './lib/actions/ai/update-metafield-definition';import { shopifyAiUpdateOrderDetails } from './lib/actions/ai/update-order-details';+import { shopifyAiUpdatePage } from './lib/actions/ai/update-page';import { shopifyAiUpdateProductFields } from './lib/actions/ai/update-product-fields';import { shopifyAiUpdateProductMedia } from './lib/actions/ai/update-product-media';import { shopifyAiUpdateProductOption } from './lib/actions/ai/update-product-option';import { shopifyAiUpdateProductVariants } from './lib/actions/ai/update-product-variants';+import { shopifyAiUpdateTheme } from './lib/actions/ai/update-theme';+import { shopifyAiUpdateUrlRedirect } from './lib/actions/ai/update-url-redirect';+import { shopifyAiUpsertMetaobject } from './lib/actions/ai/upsert-metaobject';+import { shopifyAiUpsertThemeFiles } from './lib/actions/ai/upsert-theme-files';import { shopifyAiVoidOrderTransaction } from './lib/actions/ai/void-order-transaction';import { newAbandonedCheckout } from './lib/triggers/new-abandoned-checkout';import { newCancelledOrder } from './lib/triggers/new-cancelled-order';@@ -239,14 +298,17 @@ export const shopify = createPiece({shopifyAiCalculateRequestedOrderEdit,shopifyAiListRequestedOrderEdits,shopifyAiAdjustInventoryQuantities,+ shopifyAiApproveComment,shopifyAiArchiveOrder,shopifyAiAttachVariantMedia,+ shopifyAiBulkDeleteMetaobjects,shopifyAiCalculateRefund,shopifyAiCancelFulfillmentOrder,shopifyAiCancelFulfillment,shopifyAiCaptureOrderPayment,shopifyAiCompleteDraftOrder,shopifyAiCountAbandonedCheckouts,+ shopifyAiCountBlogs,shopifyAiCountCollections,shopifyAiCountCustomerSegments,shopifyAiCountCustomers,@@ -255,8 +317,12 @@ export const shopify = createPiece({shopifyAiCountDraftOrders,shopifyAiCountGiftCards,shopifyAiCountLocations,+ shopifyAiCountPages,shopifyAiCountProducts,+ shopifyAiCountUrlRedirects,+ shopifyAiCreateArticle,shopifyAiCreateBasicDiscountCode,+ shopifyAiCreateBlog,shopifyAiCreateBxgyDiscountCode,shopifyAiCreateCollection,shopifyAiCreateCustomerAddress,@@ -268,30 +334,46 @@ export const shopify = createPiece({shopifyAiCreateGiftCard,shopifyAiCreateOrderRiskAssessment,shopifyAiCreateOrderWithLineItems,+ shopifyAiCreatePage,shopifyAiCreateProductOptions,shopifyAiCreateProductRecord,shopifyAiCreateProductVariants,shopifyAiCreateRefund,shopifyAiCreateSmartCollection,+ shopifyAiCreateTheme,+ shopifyAiCreateUrlRedirect,shopifyAiDeactivateGiftCard,shopifyAiDeactivateInventoryAtLocation,+ shopifyAiDeleteArticle,+ shopifyAiDeleteBlog,shopifyAiDeleteCollection,+ shopifyAiDeleteComment,shopifyAiDeleteCustomerAddress,shopifyAiDeleteCustomer,shopifyAiDeleteDiscountRedeemCodes,shopifyAiDeleteDiscount,shopifyAiDeleteDraftOrder,shopifyAiDeleteFulfillmentService,+ shopifyAiDeleteMetafields,+ shopifyAiDeleteMetaobjectDefinition,+ shopifyAiDeleteMetaobject,shopifyAiDeleteOrder,+ shopifyAiDeletePage,shopifyAiDeleteProductMedia,shopifyAiDeleteProductOptions,shopifyAiDeleteProductVariants,shopifyAiDeleteProduct,+ shopifyAiDeleteThemeFiles,+ shopifyAiDeleteTheme,+ shopifyAiDeleteUrlRedirect,shopifyAiDetachVariantMedia,shopifyAiDuplicateProduct,+ shopifyAiEnableStandardMetaobjectDefinition,shopifyAiFindDiscountByCode,shopifyAiGenerateCustomerActivationUrl,shopifyAiGetAbandonment,+ shopifyAiGetArticle,+ shopifyAiGetBlog,shopifyAiGetCheckoutAbandonment,shopifyAiGetCollectionByHandle,shopifyAiGetCollection,@@ -306,9 +388,14 @@ export const shopify = createPiece({shopifyAiGetInventoryItem,shopifyAiGetJob,shopifyAiGetLocation,+ shopifyAiGetMetafieldDefinition,+ shopifyAiGetMetafield,+ shopifyAiGetMetaobject,+ shopifyAiGetOnlineStoreSettings,shopifyAiGetOrderRiskAssessments,shopifyAiGetOrderTransaction,shopifyAiGetOrder,+ shopifyAiGetPage,shopifyAiGetProductDetails,shopifyAiGetProductDuplicateJob,shopifyAiGetProductMedia,@@ -316,10 +403,18 @@ export const shopify = createPiece({shopifyAiGetPublication,shopifyAiGetRefund,shopifyAiGetShop,+ shopifyAiGetThemeFile,+ shopifyAiGetTheme,+ shopifyAiGetUrlRedirect,shopifyAiHoldFulfillmentOrder,shopifyAiListAbandonedCheckouts,+ shopifyAiListArticleAuthors,+ shopifyAiListArticleTags,+ shopifyAiListArticles,+ shopifyAiListBlogs,shopifyAiListCarrierServices,shopifyAiListCollectionProducts,+ shopifyAiListComments,shopifyAiListCustomerAddresses,shopifyAiListCustomerOrders,shopifyAiListDeliveryProfiles,@@ -332,18 +427,32 @@ export const shopify = createPiece({shopifyAiListInventoryItems,shopifyAiListInventoryLevels,shopifyAiListLocations,+ shopifyAiListMetafieldDefinitionTypes,+ shopifyAiListMetafieldDefinitions,+ shopifyAiListMetafields,+ shopifyAiListMetaobjectDefinitions,+ shopifyAiListMetaobjects,shopifyAiListOrderFulfillmentOrders,shopifyAiListOrderFulfillments,shopifyAiListOrderRefunds,shopifyAiListOrderTransactions,+ shopifyAiListPages,shopifyAiListProductMedia,shopifyAiListProductVariants,shopifyAiListPublications,shopifyAiListSalesChannels,+ shopifyAiListStandardMetafieldDefinitionTemplates,shopifyAiListTenderTransactions,+ shopifyAiListThemeFiles,+ shopifyAiListThemes,+ shopifyAiListUrlRedirects,+ shopifyAiMarkCommentNotSpam,+ shopifyAiMarkCommentSpam,shopifyAiMarkOrderAsPaid,shopifyAiMoveFulfillmentOrder,+ shopifyAiPinMetafieldDefinition,shopifyAiPublishResource,+ shopifyAiPublishTheme,shopifyAiReleaseFulfillmentOrderHold,shopifyAiRemoveProductsFromCollection,shopifyAiRemoveTags,@@ -362,11 +471,14 @@ export const shopify = createPiece({shopifyAiSetDefaultCustomerAddress,shopifyAiSetFulfillmentOrdersDeadline,shopifyAiSetInventoryQuantities,+ shopifyAiSetMetafields,shopifyAiSetProduct,shopifyAiStartOrderCancellation,shopifyAiUnarchiveOrder,shopifyAiUnpublishResource,+ shopifyAiUpdateArticle,shopifyAiUpdateBasicDiscountCode,+ shopifyAiUpdateBlog,shopifyAiUpdateCollection,shopifyAiUpdateCustomerAddress,shopifyAiUpdateCustomerProfile,@@ -375,11 +487,17 @@ export const shopify = createPiece({shopifyAiUpdateFulfillmentTracking,shopifyAiUpdateGiftCard,shopifyAiUpdateInventoryItem,+ shopifyAiUpdateMetafieldDefinition,shopifyAiUpdateOrderDetails,+ shopifyAiUpdatePage,shopifyAiUpdateProductFields,shopifyAiUpdateProductMedia,shopifyAiUpdateProductOption,shopifyAiUpdateProductVariants,+ shopifyAiUpdateTheme,+ shopifyAiUpdateUrlRedirect,+ shopifyAiUpsertMetaobject,+ shopifyAiUpsertThemeFiles,shopifyAiVoidOrderTransaction,createCustomApiCallAction({baseUrl: (auth) => {diff --git a/packages/pieces/community/shopify/src/lib/actions/ai/add-tags.ts b/packages/pieces/community/shopify/src/lib/actions/ai/add-tags.tsindex a5ed85155ab..3bd1d586423 100644--- a/packages/pieces/community/shopify/src/lib/actions/ai/add-tags.ts+++ b/packages/pieces/community/shopify/src/lib/actions/ai/add-tags.ts@@ -8,11 +8,11 @@ export const shopifyAiAddTags = createAction({name: 'add_tags',classification: 'WRITE',displayName: 'Add Tags',- description: 'Add tags to an order, draft order, customer or product.',+ description: 'Add tags to an order, draft order, customer, product or blog article.',audience: 'ai',aiMetadata: {description:- 'Adds one or more tags to an order, draft order, customer or product while keeping its existing tags; prefer this over sending a full tag list to an update action. Adding a tag that is already present changes nothing, so repeating is safe. Returns the resulting tag list.',+ 'Adds one or more tags to an order, draft order, customer, product or blog article while keeping its existing tags; prefer this over sending a full tag list to an update action. Adding a tag that is already present changes nothing, so repeating is safe. Returns the resulting tag list. Blog articles need the write_content access scope.',idempotent: true,},outputSchema: addTagsOutputSchema,@@ -27,6 +27,7 @@ export const shopifyAiAddTags = createAction({{ label: 'Draft order', value: 'DraftOrder' },{ label: 'Customer', value: 'Customer' },{ label: 'Product', value: 'Product' },+ { label: 'Blog article', value: 'Article' },],},}),@@ -64,7 +65,7 @@ export const shopifyAiAddTags = createAction({});const TAGGED_NODE_FRAGMENTS =- '... on Order { tags } ... on DraftOrder { tags } ... on Customer { tags } ... on Product { tags }';+ '... on Order { tags } ... on DraftOrder { tags } ... on Customer { tags } ... on Product { tags } ... on Article { tags }';type TaggedNode = {id: string;diff --git a/packages/pieces/community/shopify/src/lib/actions/ai/approve-comment.ts b/packages/pieces/community/shopify/src/lib/actions/ai/approve-comment.tsnew file mode 100644index 00000000000..36d6a031fee--- /dev/null+++ b/packages/pieces/community/shopify/src/lib/actions/ai/approve-comment.ts@@ -0,0 +1,49 @@+import { createAction, Property } from '@activepieces/pieces-framework';+import { shopifyAuth } from '../../..';+import {+ GqlComment,+ shopifyFields,+ shopifyGraphqlClient,+ shopifyMappers,+} from '../../common/graphql';+import { commentOutputSchema } from '../../output-schemas/content';++export const shopifyAiApproveComment = createAction({+ auth: shopifyAuth,+ name: 'approve_comment',+ classification: 'WRITE',+ displayName: 'Approve Blog Comment',+ description: 'Approve a blog comment so it is published on the article.',+ audience: 'ai',+ aiMetadata: {+ description:+ 'Approves one blog comment (for example one listed by list_comments with "status:pending") so it shows on the article, and returns the comment with its new status. Approving an already published comment leaves it published, so repeating is safe. Author details may be null without protected customer data access. Needs the write_content access scope.',+ idempotent: true,+ },+ outputSchema: commentOutputSchema,+ props: {+ comment_id: Property.ShortText({+ displayName: 'Comment ID',+ description: 'The comment id, numeric or "gid://shopify/Comment/…". Find it with list_comments.',+ required: true,+ }),+ },+ async run({ auth, propsValue }) {+ const id = shopifyGraphqlClient.toGid({ type: 'Comment', id: propsValue.comment_id });+ const { data, redactedFields } = await shopifyGraphqlClient.request<{+ commentApprove: { comment: GqlComment | null } | null;+ }>({+ auth,+ query: `mutation ApproveComment($id: ID!) { commentApprove(id: $id) { comment { ${shopifyFields.COMMENT_FIELDS} } userErrors { field message code } } }`,+ variables: { id },+ });+ const comment = data.commentApprove?.comment;+ if (!comment) {+ throw new Error('Shopify did not return the approved comment.');+ }+ return {+ ...shopifyMappers.mapComment(comment),+ redacted_fields: redactedFields,+ };+ },+});diff --git a/packages/pieces/community/shopify/src/lib/actions/ai/bulk-delete-metaobjects.ts b/packages/pieces/community/shopify/src/lib/actions/ai/bulk-delete-metaobjects.tsnew file mode 100644index 00000000000..731079b5070--- /dev/null+++ b/packages/pieces/community/shopify/src/lib/actions/ai/bulk-delete-metaobjects.ts@@ -0,0 +1,95 @@+import { createAction, Property } from '@activepieces/pieces-framework';+import { shopifyAuth } from '../../..';+import { GqlJob, shopifyGraphqlClient, shopifyValues } from '../../common/graphql';+import { bulkDeleteMetaobjectsOutputSchema } from '../../output-schemas/content';++const MAX_IDS = 250;++export const shopifyAiBulkDeleteMetaobjects = createAction({+ auth: shopifyAuth,+ name: 'bulk_delete_metaobjects',+ classification: 'DESTRUCTIVE',+ displayName: 'Bulk Delete Metaobject Entries',+ description: 'Start deleting many metaobject entries: listed ids, or every entry of one type.',+ audience: 'ai',+ aiMetadata: {+ description:+ 'Starts a background job that permanently deletes metaobject entries and their metafields, and returns only the job; poll get_job with job_id until done is true. scope decides what goes: BY_IDS deletes the listed entry ids (1 to 250); ALL_OF_TYPE deletes EVERY entry of the given type (the type definition itself stays). Cannot be undone. Each call starts a new job, so do not repeat it while the first job runs. Needs the write_metaobjects access scope.',+ idempotent: false,+ },+ outputSchema: bulkDeleteMetaobjectsOutputSchema,+ props: {+ scope: Property.StaticDropdown({+ displayName: 'Delete Scope',+ description: 'BY_IDS deletes only the listed entries; ALL_OF_TYPE deletes every entry of the type.',+ required: true,+ options: {+ options: [+ { label: 'Only the listed entry ids', value: 'BY_IDS' },+ { label: 'Every entry of the type', value: 'ALL_OF_TYPE' },+ ],+ },+ }),+ metaobject_ids: Property.Array({+ displayName: 'Metaobject IDs',+ description: 'For BY_IDS: entry ids, numeric or "gid://shopify/Metaobject/…", 1 to 250.',+ required: false,+ }),+ type: Property.ShortText({+ displayName: 'Metaobject Type',+ description: 'For ALL_OF_TYPE: the metaobject type whose entries are all deleted, for example "designer".',+ required: false,+ }),+ },+ async run({ auth, propsValue }) {+ const ids = shopifyValues.toGidList({ type: 'Metaobject', value: propsValue.metaobject_ids }) ?? [];+ const type = shopifyValues.nonEmpty(propsValue.type);+ const where = buildWhere({ scope: propsValue.scope, ids: [...new Set(ids)], type });+ const { data, redactedFields } = await shopifyGraphqlClient.request<{+ metaobjectBulkDelete: { job?: GqlJob | null } | null;+ }>({+ auth,+ query: `mutation BulkDeleteMetaobjects($where: MetaobjectBulkDeleteWhereCondition!) { metaobjectBulkDelete(where: $where) { job { id done } userErrors { field message code } } }`,+ variables: { where },+ });+ return {+ job_id: data.metaobjectBulkDelete?.job?.id ?? null,+ done: data.metaobjectBulkDelete?.job?.done ?? null,+ scope: propsValue.scope,+ redacted_fields: redactedFields,+ };+ },+});++function buildWhere({+ scope,+ ids,+ type,+}: {+ scope: string;+ ids: string[];+ type: string | undefined;+}): { ids: string[] } | { type: string } {+ if (scope === 'BY_IDS') {+ if (type) {+ throw new Error('scope BY_IDS takes metaobject_ids only; remove type. Nothing was deleted.');+ }+ if (ids.length === 0) {+ throw new Error('scope BY_IDS needs at least one metaobject id. Nothing was deleted.');+ }+ if (ids.length > MAX_IDS) {+ throw new Error(`At most ${MAX_IDS} ids per call; split them over several calls. Nothing was deleted.`);+ }+ return { ids };+ }+ if (scope === 'ALL_OF_TYPE') {+ if (ids.length > 0) {+ throw new Error('scope ALL_OF_TYPE takes a type only; remove metaobject_ids. Nothing was deleted.');+ }+ if (!type) {+ throw new Error('scope ALL_OF_TYPE needs the metaobject type. Nothing was deleted.');+ }+ return { type };+ }+ throw new Error('scope must be BY_IDS or ALL_OF_TYPE. Nothing was deleted.');+}diff --git a/packages/pieces/community/shopify/src/lib/actions/ai/count-blogs.ts b/packages/pieces/community/shopify/src/lib/actions/ai/count-blogs.tsnew file mode 100644index 00000000000..a969ab46139--- /dev/null+++ b/packages/pieces/community/shopify/src/lib/actions/ai/count-blogs.ts@@ -0,0 +1,43 @@+import { createAction } from '@activepieces/pieces-framework';+import { shopifyAuth } from '../../..';+import {+ GqlCount,+ shopifyGraphqlClient,+ shopifyProps,+ shopifyValues,+} from '../../common/graphql';+import { contentCountOutputSchema } from '../../output-schemas/content';++export const shopifyAiCountBlogs = createAction({+ auth: shopifyAuth,+ name: 'count_blogs',+ classification: 'READ',+ displayName: 'Count Blogs',+ description: 'Count the blogs of the online store, optionally filtered.',+ audience: 'ai',+ aiMetadata: {+ description:+ 'Counts the online store\'s blogs, optionally filtered with search syntax such as "title:News". Shopify stops counting at 10,000 by default; precision is AT_LEAST when it did. Use list_blogs to see them. Needs the read_content access scope. Read-only.',+ idempotent: true,+ },+ outputSchema: contentCountOutputSchema,+ props: {+ query: shopifyProps.searchQuery(+ 'Shopify blog search syntax, for example "title:News". Leave empty to count all.'+ ),+ },+ async run({ auth, propsValue }) {+ const { data, redactedFields } = await shopifyGraphqlClient.request<{+ blogsCount: GqlCount | null;+ }>({+ auth,+ query: `query CountBlogs($query: String) { blogsCount(query: $query) { count precision } }`,+ variables: { query: shopifyValues.nonEmpty(propsValue.query) },+ });+ return {+ count: data.blogsCount?.count ?? 0,+ precision: data.blogsCount?.precision ?? null,+ redacted_fields: redactedFields,+ };+ },+});diff --git a/packages/pieces/community/shopify/src/lib/actions/ai/count-pages.ts b/packages/pieces/community/shopify/src/lib/actions/ai/count-pages.tsnew file mode 100644index 00000000000..e193df52f77--- /dev/null+++ b/packages/pieces/community/shopify/src/lib/actions/ai/count-pages.ts@@ -0,0 +1,33 @@+import { createAction } from '@activepieces/pieces-framework';+import { shopifyAuth } from '../../..';+import { GqlCount, shopifyGraphqlClient } from '../../common/graphql';+import { contentCountOutputSchema } from '../../output-schemas/content';++export const shopifyAiCountPages = createAction({+ auth: shopifyAuth,+ name: 'count_pages',+ classification: 'READ',+ displayName: 'Count Online Store Pages',+ description: 'Count the online store\'s content pages.',+ audience: 'ai',+ aiMetadata: {+ description:+ 'Counts all online store content pages, published and hidden alike (Shopify offers no filter for this count). Shopify stops counting at 10,000 by default; precision is AT_LEAST when it did. Use list_pages to see or filter them. Needs the read_content access scope. Read-only.',+ idempotent: true,+ },+ outputSchema: contentCountOutputSchema,+ props: {},+ async run({ auth }) {+ const { data, redactedFields } = await shopifyGraphqlClient.request<{+ pagesCount: GqlCount | null;+ }>({+ auth,+ query: `query CountPages { pagesCount { count precision } }`,+ });+ return {+ count: data.pagesCount?.count ?? 0,+ precision: data.pagesCount?.precision ?? null,+ redacted_fields: redactedFields,+ };+ },+});diff --git a/packages/pieces/community/shopify/src/lib/actions/ai/count-url-redirects.ts b/packages/pieces/community/shopify/src/lib/actions/ai/count-url-redirects.tsnew file mode 100644index 00000000000..aaee1f13b6e--- /dev/null+++ b/packages/pieces/community/shopify/src/lib/actions/ai/count-url-redirects.ts@@ -0,0 +1,43 @@+import { createAction } from '@activepieces/pieces-framework';+import { shopifyAuth } from '../../..';+import {+ GqlCount,+ shopifyGraphqlClient,+ shopifyProps,+ shopifyValues,+} from '../../common/graphql';+import { contentCountOutputSchema } from '../../output-schemas/content';++export const shopifyAiCountUrlRedirects = createAction({+ auth: shopifyAuth,+ name: 'count_url_redirects',+ classification: 'READ',+ displayName: 'Count URL Redirects',+ description: 'Count the online store\'s URL redirects, optionally filtered.',+ audience: 'ai',+ aiMetadata: {+ description:+ 'Counts the online store\'s URL redirects, optionally filtered with search syntax such as "path:/collections". Shopify stops counting at 10,000 by default; precision is AT_LEAST when it did. Use list_url_redirects to see them. Needs the read_online_store_navigation access scope. Read-only.',+ idempotent: true,+ },+ outputSchema: contentCountOutputSchema,+ props: {+ query: shopifyProps.searchQuery(+ 'Shopify redirect search syntax, for example "path:/collections". Leave empty to count all.'+ ),+ },+ async run({ auth, propsValue }) {+ const { data, redactedFields } = await shopifyGraphqlClient.request<{+ urlRedirectsCount: GqlCount | null;+ }>({+ auth,+ query: `query CountUrlRedirects($query: String) { urlRedirectsCount(query: $query) { count precision } }`,+ variables: { query: shopifyValues.nonEmpty(propsValue.query) },+ });+ return {+ count: data.urlRedirectsCount?.count ?? 0,+ precision: data.urlRedirectsCount?.precision ?? null,+ redacted_fields: redactedFields,+ };+ },+});diff --git a/packages/pieces/community/shopify/src/lib/actions/ai/create-article.ts b/packages/pieces/community/shopify/src/lib/actions/ai/create-article.tsnew file mode 100644index 00000000000..40a6c95a7e0--- /dev/null+++ b/packages/pieces/community/shopify/src/lib/actions/ai/create-article.ts@@ -0,0 +1,128 @@+import { createAction, Property } from '@activepieces/pieces-framework';+import { shopifyAuth } from '../../..';+import {+ GqlArticle,+ shopifyFields,+ shopifyGraphqlClient,+ shopifyMappers,+ shopifyProps,+ shopifyValues,+} from '../../common/graphql';+import { articleOutputSchema } from '../../output-schemas/content';++export const shopifyAiCreateArticle = createAction({+ auth: shopifyAuth,+ name: 'create_article',+ classification: 'WRITE',+ displayName: 'Create Blog Article',+ description: 'Write a new article in an existing blog.',+ audience: 'ai',+ aiMetadata: {+ description:+ 'Creates an article in an existing blog and returns it with its id. Needs the blog id (from list_blogs), a title and an author name; the body is HTML. The article is created hidden unless is_published is Yes, so nothing goes live by accident. publish_date alone does not publish or schedule the article; is_published must be Yes as well. Each call creates another article, so do not repeat it after a success. Needs the write_content access scope.',+ idempotent: false,+ },+ outputSchema: articleOutputSchema,+ props: {+ blog_id: Property.ShortText({+ displayName: 'Blog ID',+ description: 'The blog to write in, numeric or "gid://shopify/Blog/…". Find it with list_blogs.',+ required: true,+ }),+ title: Property.ShortText({+ displayName: 'Title',+ description: 'Article title, for example "Our summer collection is here".',+ required: true,+ }),+ author_name: Property.ShortText({+ displayName: 'Author Name',+ description: 'Name shown as the author, for example "Jane Doe".',+ required: true,+ }),+ body_html: Property.LongText({+ displayName: 'Body (HTML)',+ description: 'Article content, HTML allowed, for example "<p>Hello</p>".',+ required: false,+ }),+ summary_html: Property.LongText({+ displayName: 'Summary (HTML)',+ description: 'Short excerpt shown in blog listings, HTML allowed.',+ required: false,+ }),+ tags: Property.Array({+ displayName: 'Tags',+ description: 'Tags for the article, for example ["news", "summer"].',+ required: false,+ }),+ is_published: shopifyProps.booleanChoice({+ displayName: 'Published',+ description: 'Yes publishes the article on the storefront. Leave empty or No to keep it hidden.',+ }),+ publish_date: Property.DateTime({+ displayName: 'Publish Date',+ description: 'Publication date and time, ISO 8601, for example "2026-10-01T09:00:00Z". It does not publish or schedule the article on its own; Published must be Yes as well.',+ required: false,+ }),+ handle: Property.ShortText({+ displayName: 'Handle',+ description: 'URL handle, for example "summer-collection". Leave empty to generate it from the title.',+ required: false,+ }),+ image_url: Property.ShortText({+ displayName: 'Image URL',+ description: 'Public URL of the featured image, for example "https://example.com/banner.jpg".',+ required: false,+ }),+ image_alt_text: Property.ShortText({+ displayName: 'Image Alt Text',+ description: 'Alternative text for the featured image. Needs image_url.',+ required: false,+ }),+ template_suffix: Property.ShortText({+ displayName: 'Template Suffix',+ description: 'Theme template suffix, for example "wide". Leave empty for the default template.',+ required: false,+ }),+ },+ async run({ auth, propsValue }) {+ const title = shopifyValues.nonEmpty(propsValue.title);+ const authorName = shopifyValues.nonEmpty(propsValue.author_name);+ if (!title || !authorName) {+ throw new Error('An article needs a title and an author_name. Nothing was created.');+ }+ const imageUrl = shopifyValues.nonEmpty(propsValue.image_url);+ const imageAltText = shopifyValues.nonEmpty(propsValue.image_alt_text);+ if (imageAltText && !imageUrl) {+ throw new Error('image_alt_text needs image_url. Nothing was created.');+ }+ const tags = shopifyValues.readStringList(propsValue.tags);+ const article = shopifyValues.compact({+ blogId: shopifyGraphqlClient.toGid({ type: 'Blog', id: propsValue.blog_id }),+ title,+ author: { name: authorName },+ body: shopifyValues.nonEmpty(propsValue.body_html),+ summary: shopifyValues.nonEmpty(propsValue.summary_html),+ tags: tags && tags.length > 0 ? tags : undefined,+ isPublished: shopifyValues.toBooleanChoice(propsValue.is_published) ?? false,+ publishDate: shopifyValues.nonEmpty(propsValue.publish_date),+ handle: shopifyValues.nonEmpty(propsValue.handle),+ image: imageUrl ? shopifyValues.compact({ url: imageUrl, altText: imageAltText }) : undefined,+ templateSuffix: shopifyValues.nonEmpty(propsValue.template_suffix),+ });+ const { data, redactedFields } = await shopifyGraphqlClient.request<{+ articleCreate: { article: GqlArticle | null } | null;+ }>({+ auth,+ query: `mutation CreateArticle($article: ArticleCreateInput!) { articleCreate(article: $article) { article { ${shopifyFields.ARTICLE_FIELDS} } userErrors { field message code } } }`,+ variables: { article },+ });+ const created = data.articleCreate?.article;+ if (!created) {+ throw new Error('Shopify did not return the created article.');+ }+ return {+ ...shopifyMappers.mapArticle(created),+ redacted_fields: redactedFields,+ };+ },+});diff --git a/packages/pieces/community/shopify/src/lib/actions/ai/create-blog.ts b/packages/pieces/community/shopify/src/lib/actions/ai/create-blog.tsnew file mode 100644index 00000000000..7d840c0131a--- /dev/null+++ b/packages/pieces/community/shopify/src/lib/actions/ai/create-blog.ts@@ -0,0 +1,81 @@+import { createAction, Property } from '@activepieces/pieces-framework';+import { shopifyAuth } from '../../..';+import {+ GqlBlog,+ shopifyFields,+ shopifyGraphqlClient,+ shopifyMappers,+ shopifyValues,+} from '../../common/graphql';+import { blogOutputSchema } from '../../output-schemas/content';++export const shopifyAiCreateBlog = createAction({+ auth: shopifyAuth,+ name: 'create_blog',+ classification: 'WRITE',+ displayName: 'Create Blog',+ description: 'Create a new blog on the online store.',+ audience: 'ai',+ aiMetadata: {+ description:+ 'Creates a blog on the online store and returns it with its id. Only the title is required; the handle is generated from the title when left empty. comment_policy decides whether readers can comment (CLOSED, MODERATED or AUTO_PUBLISHED); when empty Shopify\'s default applies. Each call creates another blog, so do not repeat it after a success. Needs the write_content access scope.',+ idempotent: false,+ },+ outputSchema: blogOutputSchema,+ props: {+ title: Property.ShortText({+ displayName: 'Title',+ description: 'Blog title, for example "News".',+ required: true,+ }),+ handle: Property.ShortText({+ displayName: 'Handle',+ description: 'URL handle, for example "news". Leave empty to generate it from the title.',+ required: false,+ }),+ comment_policy: Property.StaticDropdown({+ displayName: 'Comment Policy',+ description: 'Whether readers can comment on articles. Leave empty for the Shopify default.',+ required: false,+ options: {+ options: [+ { label: 'Comments closed', value: 'CLOSED' },+ { label: 'Comments held for moderation', value: 'MODERATED' },+ { label: 'Comments published automatically', value: 'AUTO_PUBLISHED' },+ ],+ },+ }),+ template_suffix: Property.ShortText({+ displayName: 'Template Suffix',+ description: 'Theme template suffix, for example "wide" for blog.wide.json. Leave empty for the default template.',+ required: false,+ }),+ },+ async run({ auth, propsValue }) {+ const title = shopifyValues.nonEmpty(propsValue.title);+ if (!title) {+ throw new Error('A blog title is required. Nothing was created.');+ }+ const blog = shopifyValues.compact({+ title,+ handle: shopifyValues.nonEmpty(propsValue.handle),+ commentPolicy: propsValue.comment_policy,+ templateSuffix: shopifyValues.nonEmpty(propsValue.template_suffix),+ });+ const { data, redactedFields } = await shopifyGraphqlClient.request<{+ blogCreate: { blog: GqlBlog | null } | null;+ }>({+ auth,+ query: `mutation CreateBlog($blog: BlogCreateInput!) { blogCreate(blog: $blog) { blog { ${shopifyFields.BLOG_FIELDS} } userErrors { field message code } } }`,+ variables: { blog },+ });+ const created = data.blogCreate?.blog;+ if (!created) {+ throw new Error('Shopify did not return the created blog.');+ }+ return {+ ...shopifyMappers.mapBlog(created),+ redacted_fields: redactedFields,+ };+ },+});diff --git a/packages/pieces/community/shopify/src/lib/actions/ai/create-page.ts b/packages/pieces/community/shopify/src/lib/actions/ai/create-page.tsnew file mode 100644index 00000000000..54f9b702fed--- /dev/null+++ b/packages/pieces/community/shopify/src/lib/actions/ai/create-page.ts@@ -0,0 +1,86 @@+import { createAction, Property } from '@activepieces/pieces-framework';+import { shopifyAuth } from '../../..';+import {+ GqlPage,+ shopifyFields,+ shopifyGraphqlClient,+ shopifyMappers,+ shopifyProps,+ shopifyValues,+} from '../../common/graphql';+import { pageOutputSchema } from '../../output-schemas/content';++export const shopifyAiCreatePage = createAction({+ auth: shopifyAuth,+ name: 'create_page',+ classification: 'WRITE',+ displayName: 'Create Online Store Page',+ description: 'Create a content page on the online store.',+ audience: 'ai',+ aiMetadata: {+ description:+ 'Creates an online store content page (for example an FAQ or About us page) and returns it with its id. Only the title is required; the body is HTML and the handle is generated from the title when left empty. The page is created hidden unless is_published is Yes, so nothing goes live by accident. publish_date alone does not publish or schedule the page; is_published must be Yes as well. Each call creates another page, so do not repeat it after a success. Needs the write_content access scope.',+ idempotent: false,+ },+ outputSchema: pageOutputSchema,+ props: {+ title: Property.ShortText({+ displayName: 'Title',+ description: 'Page title, for example "Frequently asked questions".',+ required: true,+ }),+ body_html: Property.LongText({+ displayName: 'Body (HTML)',+ description: 'Page content, HTML allowed, for example "<h2>Shipping</h2><p>We ship worldwide.</p>".',+ required: false,+ }),+ handle: Property.ShortText({+ displayName: 'Handle',+ description: 'URL handle, for example "faq". Leave empty to generate it from the title.',+ required: false,+ }),+ is_published: shopifyProps.booleanChoice({+ displayName: 'Published',+ description: 'Yes publishes the page on the storefront. Leave empty or No to keep it hidden.',+ }),+ publish_date: Property.DateTime({+ displayName: 'Publish Date',+ description: 'Publication date and time, ISO 8601, for example "2026-10-01T09:00:00Z". It does not publish or schedule the page on its own; Published must be Yes as well.',+ required: false,+ }),+ template_suffix: Property.ShortText({+ displayName: 'Template Suffix',+ description: 'Theme template suffix, for example "contact" for page.contact.json. Leave empty for the default template.',+ required: false,+ }),+ },+ async run({ auth, propsValue }) {+ const title = shopifyValues.nonEmpty(propsValue.title);+ if (!title) {+ throw new Error('A page title is required. Nothing was created.');+ }+ const page = shopifyValues.compact({+ title,+ body: shopifyValues.nonEmpty(propsValue.body_html),+ handle: shopifyValues.nonEmpty(propsValue.handle),+ isPublished: shopifyValues.toBooleanChoice(propsValue.is_published) ?? false,+ publishDate: shopifyValues.nonEmpty(propsValue.publish_date),+ templateSuffix: shopifyValues.nonEmpty(propsValue.template_suffix),+ });+ const { data, redactedFields } = await shopifyGraphqlClient.request<{+ pageCreate: { page: GqlPage | null } | null;+ }>({+ auth,+ query: `mutation CreatePage($page: PageCreateInput!) { pageCreate(page: $page) { page { ${shopifyFields.PAGE_FIELDS} } userErrors { field message code } } }`,+ variables: { page },+ });+ const created = data.pageCreate?.page;+ if (!created) {+ throw new Error('Shopify did not return the created page.');+ }+ return {+ ...shopifyMappers.mapPage(created),+ redacted_fields: redactedFields,+ };+ },+});diff --git a/packages/pieces/community/shopify/src/lib/actions/ai/create-theme.ts b/packages/pieces/community/shopify/src/lib/actions/ai/create-theme.tsnew file mode 100644index 00000000000..66d7a6dea04--- /dev/null+++ b/packages/pieces/community/shopify/src/lib/actions/ai/create-theme.ts@@ -0,0 +1,73 @@+import { createAction, Property } from '@activepieces/pieces-framework';+import { shopifyAuth } from '../../..';+import {+ GqlTheme,+ shopifyFields,+ shopifyGraphqlClient,+ shopifyMappers,+ shopifyValues,+} from '../../common/graphql';+import { themeOutputSchema } from '../../output-schemas/content';++export const shopifyAiCreateTheme = createAction({+ auth: shopifyAuth,+ name: 'create_theme',+ classification: 'WRITE',+ displayName: 'Create Theme',+ description: 'Import a theme from a ZIP file URL as an unpublished theme.',+ audience: 'ai',+ aiMetadata: {+ description:+ 'Imports a theme from a public ZIP file URL and returns it. The new theme is never live: its role is UNPUBLISHED (default) or DEVELOPMENT, and it is processed in the background (processing is true until get_theme shows it finished). A store holds at most 20 themes. Each call creates another theme. Shopify documents that modifying themes needs the write_themes access scope AND an exemption granted by Shopify; without the exemption the call is refused with an access error, so report that instead of retrying.',+ idempotent: false,+ },+ outputSchema: themeOutputSchema,+ props: {+ source: Property.ShortText({+ displayName: 'Theme ZIP URL',+ description: 'Public URL of the theme ZIP file, for example "https://example.com/themes/my-theme.zip".',+ required: true,+ }),+ name: Property.ShortText({+ displayName: 'Name',+ description: 'Name for the new theme, for example "Autumn 2026". Leave empty to use the name in the ZIP.',+ required: false,+ }),+ role: Property.StaticDropdown({+ displayName: 'Role',+ description: 'UNPUBLISHED (default) or DEVELOPMENT for a temporary theme. A theme can never be created live.',+ required: false,+ options: {+ options: [+ { label: 'Unpublished', value: 'UNPUBLISHED' },+ { label: 'Development', value: 'DEVELOPMENT' },+ ],+ },+ }),+ },+ async run({ auth, propsValue }) {+ const source = shopifyValues.nonEmpty(propsValue.source);+ if (!source || !/^https?:\/\//i.test(source)) {+ throw new Error('source must be a public http(s) URL of a theme ZIP file. Nothing was created.');+ }+ const { data, redactedFields } = await shopifyGraphqlClient.request<{+ themeCreate: { theme: GqlTheme | null } | null;+ }>({+ auth,+ query: `mutation CreateTheme($source: URL!, $name: String, $role: ThemeRole) { themeCreate(source: $source, name: $name, role: $role) { theme { ${shopifyFields.THEME_FIELDS} } userErrors { field message code } } }`,+ variables: {+ source,+ name: shopifyValues.nonEmpty(propsValue.name),+ role: propsValue.role ?? 'UNPUBLISHED',+ },+ });+ const theme = data.themeCreate?.theme;+ if (!theme) {+ throw new Error('Shopify did not return the created theme.');+ }+ return {+ ...shopifyMappers.mapTheme(theme),+ redacted_fields: redactedFields,+ };+ },+});diff --git a/packages/pieces/community/shopify/src/lib/actions/ai/create-url-redirect.ts b/packages/pieces/community/shopify/src/lib/actions/ai/create-url-redirect.tsnew file mode 100644index 00000000000..3ddb99b54e9--- /dev/null+++ b/packages/pieces/community/shopify/src/lib/actions/ai/create-url-redirect.ts@@ -0,0 +1,59 @@+import { createAction, Property } from '@activepieces/pieces-framework';+import { shopifyAuth } from '../../..';+import {+ GqlUrlRedirect,+ shopifyFields,+ shopifyGraphqlClient,+ shopifyMappers,+ shopifyValues,+} from '../../common/graphql';+import { urlRedirectOutputSchema } from '../../output-schemas/content';++export const shopifyAiCreateUrlRedirect = createAction({+ auth: shopifyAuth,+ name: 'create_url_redirect',+ classification: 'WRITE',+ displayName: 'Create URL Redirect',+ description: 'Redirect an old online store path to a new URL.',+ audience: 'ai',+ aiMetadata: {+ description:+ 'Creates a URL redirect so visitors of an old storefront path (for example "/old-page") are sent to a target path or full URL (for example "/pages/new-page"). The redirect is live immediately. Shopify refuses a second redirect for the same path, so check list_url_redirects with "path:<path>" before retrying. Needs the write_online_store_navigation access scope.',+ idempotent: false,+ },+ outputSchema: urlRedirectOutputSchema,+ props: {+ path: Property.ShortText({+ displayName: 'Old Path',+ description: 'The path to redirect from, starting with "/", for example "/old-page" or "/collections/summer-2025".',+ required: true,+ }),+ target: Property.ShortText({+ displayName: 'Target',+ description: 'Where to send visitors: a path such as "/pages/new-page" or a full URL such as "https://example.com/new".',+ required: true,+ }),+ },+ async run({ auth, propsValue }) {+ const path = shopifyValues.nonEmpty(propsValue.path);+ const target = shopifyValues.nonEmpty(propsValue.target);+ if (!path || !target) {+ throw new Error('A redirect needs both a path and a target. Nothing was created.');+ }+ const { data, redactedFields } = await shopifyGraphqlClient.request<{+ urlRedirectCreate: { urlRedirect: GqlUrlRedirect | null } | null;+ }>({+ auth,+ query: `mutation CreateUrlRedirect($urlRedirect: UrlRedirectInput!) { urlRedirectCreate(urlRedirect: $urlRedirect) { urlRedirect { ${shopifyFields.URL_REDIRECT_FIELDS} } userErrors { field message code } } }`,+ variables: { urlRedirect: { path, target } },+ });+ const created = data.urlRedirectCreate?.urlRedirect;+ if (!created) {+ throw new Error('Shopify did not return the created redirect.');+ }+ return {+ ...shopifyMappers.mapUrlRedirect(created),+ redacted_fields: redactedFields,+ };+ },+});diff --git a/packages/pieces/community/shopify/src/lib/actions/ai/delete-article.ts b/packages/pieces/community/shopify/src/lib/actions/ai/delete-article.tsnew file mode 100644index 00000000000..c0e3bd0e983--- /dev/null+++ b/packages/pieces/community/shopify/src/lib/actions/ai/delete-article.ts@@ -0,0 +1,40 @@+import { createAction, Property } from '@activepieces/pieces-framework';+import { shopifyAuth } from '../../..';+import { shopifyGraphqlClient } from '../../common/graphql';+import { deleteArticleOutputSchema } from '../../output-schemas/content';++export const shopifyAiDeleteArticle = createAction({+ auth: shopifyAuth,+ name: 'delete_article',+ classification: 'DESTRUCTIVE',+ displayName: 'Delete Blog Article',+ description: 'Permanently delete a blog article.',+ audience: 'ai',+ aiMetadata: {+ description:+ 'Permanently deletes one blog article together with its comments, and its URL stops working. To only hide it, use update_article with is_published No instead. Cannot be undone; a repeat call fails because the article is gone. Needs the write_content access scope.',+ idempotent: false,+ },+ outputSchema: deleteArticleOutputSchema,+ props: {+ article_id: Property.ShortText({+ displayName: 'Article ID',+ description: 'The article id, numeric or "gid://shopify/Article/…". Find it with list_articles.',+ required: true,+ }),+ },+ async run({ auth, propsValue }) {+ const id = shopifyGraphqlClient.toGid({ type: 'Article', id: propsValue.article_id });+ const { data, redactedFields } = await shopifyGraphqlClient.request<{+ articleDelete: { deletedArticleId?: string | null } | null;+ }>({+ auth,+ query: `mutation DeleteArticle($id: ID!) { articleDelete(id: $id) { deletedArticleId userErrors { field message code } } }`,+ variables: { id },+ });+ return {+ deleted_article_id: data.articleDelete?.deletedArticleId ?? id,+ redacted_fields: redactedFields,+ };+ },+});diff --git a/packages/pieces/community/shopify/src/lib/actions/ai/delete-blog.ts b/packages/pieces/community/shopify/src/lib/actions/ai/delete-blog.tsnew file mode 100644index 00000000000..41b4d439801--- /dev/null+++ b/packages/pieces/community/shopify/src/lib/actions/ai/delete-blog.ts@@ -0,0 +1,40 @@+import { createAction, Property } from '@activepieces/pieces-framework';+import { shopifyAuth } from '../../..';+import { shopifyGraphqlClient } from '../../common/graphql';+import { deleteBlogOutputSchema } from '../../output-schemas/content';++export const shopifyAiDeleteBlog = createAction({+ auth: shopifyAuth,+ name: 'delete_blog',+ classification: 'DESTRUCTIVE',+ displayName: 'Delete Blog',+ description: 'Permanently delete a blog and its articles.',+ audience: 'ai',+ aiMetadata: {+ description:+ 'Permanently deletes one blog, and the blog URL stops working. Its articles and their comments may be deleted with it (not yet confirmed on a store), so treat them as lost. Cannot be undone; check the blog with get_blog (articles_count) first. A repeat call fails because the blog is gone. Needs the write_content access scope.',+ idempotent: false,+ },+ outputSchema: deleteBlogOutputSchema,+ props: {+ blog_id: Property.ShortText({+ displayName: 'Blog ID',+ description: 'The blog id, numeric or "gid://shopify/Blog/…". Find it with list_blogs.',+ required: true,+ }),+ },+ async run({ auth, propsValue }) {+ const id = shopifyGraphqlClient.toGid({ type: 'Blog', id: propsValue.blog_id });+ const { data, redactedFields } = await shopifyGraphqlClient.request<{+ blogDelete: { deletedBlogId?: string | null } | null;+ }>({+ auth,+ query: `mutation DeleteBlog($id: ID!) { blogDelete(id: $id) { deletedBlogId userErrors { field message code } } }`,+ variables: { id },+ });+ return {+ deleted_blog_id: data.blogDelete?.deletedBlogId ?? id,+ redacted_fields: redactedFields,+ };+ },+});diff --git a/packages/pieces/community/shopify/src/lib/actions/ai/delete-comment.ts b/packages/pieces/community/shopify/src/lib/actions/ai/delete-comment.tsnew file mode 100644index 00000000000..db203e12127--- /dev/null+++ b/packages/pieces/community/shopify/src/lib/actions/ai/delete-comment.ts@@ -0,0 +1,40 @@+import { createAction, Property } from '@activepieces/pieces-framework';+import { shopifyAuth } from '../../..';+import { shopifyGraphqlClient } from '../../common/graphql';+import { deleteCommentOutputSchema } from '../../output-schemas/content';++export const shopifyAiDeleteComment = createAction({+ auth: shopifyAuth,+ name: 'delete_comment',+ classification: 'DESTRUCTIVE',+ displayName: 'Delete Blog Comment',+ description: 'Permanently delete a blog comment.',+ audience: 'ai',+ aiMetadata: {+ description:+ 'Permanently deletes one blog comment. To hide unwanted comments reversibly, use mark_comment_spam instead. Cannot be undone; a repeat call fails because the comment is gone. Needs the write_content access scope.',+ idempotent: false,+ },+ outputSchema: deleteCommentOutputSchema,+ props: {+ comment_id: Property.ShortText({+ displayName: 'Comment ID',+ description: 'The comment id, numeric or "gid://shopify/Comment/…". Find it with list_comments.',+ required: true,+ }),+ },+ async run({ auth, propsValue }) {+ const id = shopifyGraphqlClient.toGid({ type: 'Comment', id: propsValue.comment_id });+ const { data, redactedFields } = await shopifyGraphqlClient.request<{+ commentDelete: { deletedCommentId?: string | null } | null;+ }>({+ auth,+ query: `mutation DeleteComment($id: ID!) { commentDelete(id: $id) { deletedCommentId userErrors { field message code } } }`,+ variables: { id },+ });+ return {+ deleted_comment_id: data.commentDelete?.deletedCommentId ?? id,+ redacted_fields: redactedFields,+ };+ },+});diff --git a/packages/pieces/community/shopify/src/lib/actions/ai/delete-metafields.ts b/packages/pieces/community/shopify/src/lib/actions/ai/delete-metafields.tsnew file mode 100644index 00000000000..c26be83740e--- /dev/null+++ b/packages/pieces/community/shopify/src/lib/actions/ai/delete-metafields.ts@@ -0,0 +1,116 @@+import { createAction, Property } from '@activepieces/pieces-framework';+import { shopifyAuth } from '../../..';+import { shopifyFields, shopifyGraphqlClient, shopifyValues } from '../../common/graphql';+import { deleteMetafieldsOutputSchema } from '../../output-schemas/content';++export const shopifyAiDeleteMetafields = createAction({+ auth: shopifyAuth,+ name: 'delete_metafields',+ classification: 'DESTRUCTIVE',+ displayName: 'Delete Metafields',+ description: 'Delete metafields by owner, namespace and key.',+ audience: 'ai',+ aiMetadata: {+ description:+ 'Permanently deletes up to 25 metafield values, each identified by the owner\'s full id, namespace and key. The metafield definition (if any) is kept; only the stored values go. A metafield that does not exist is reported in not_found instead of failing, so repeating the call is safe. Cannot be undone; read values with list_metafields first if they may be needed. Needs the write access scope of each owner type (for example write_products for products).',+ idempotent: true,+ },+ outputSchema: deleteMetafieldsOutputSchema,+ props: {+ metafields: Property.Array({+ displayName: 'Metafields',+ description: 'One entry per metafield to delete, 1 to 25.',+ required: true,+ properties: {+ owner_id: Property.ShortText({+ displayName: 'Owner ID',+ description: 'Full id of the resource that owns the metafield, for example "gid://shopify/Product/123".',+ required: true,+ }),+ namespace: Property.ShortText({+ displayName: 'Namespace',+ description: 'Metafield namespace, for example "custom".',+ required: true,+ }),+ key: Property.ShortText({+ displayName: 'Key',+ description: 'Metafield key, for example "care_instructions".',+ required: true,+ }),+ },+ }),+ },+ async run({ auth, propsValue }) {+ const identifiers = buildIdentifiers(propsValue.metafields);+ const { data, redactedFields } = await shopifyGraphqlClient.request<{+ metafieldsDelete: {+ deletedMetafields?: ({ ownerId?: string | null; namespace?: string | null; key?: string | null } | null)[] | null;+ } | null;+ }>({+ auth,+ query: `mutation DeleteMetafields($metafields: [MetafieldIdentifierInput!]!) { metafieldsDelete(metafields: $metafields) { deletedMetafields { ownerId namespace key } userErrors { field message } } }`,+ variables: { metafields: identifiers },+ });+ const results = data.metafieldsDelete?.deletedMetafields ?? [];+ const deletedKeys = new Set(+ results+ .filter((entry) => entry !== null)+ .map((entry) => identifierKey({ ownerId: entry.ownerId ?? '', namespace: entry.namespace ?? '', key: entry.key ?? '' }))+ );+ const deleted = identifiers.filter((identifier) => deletedKeys.has(identifierKey(identifier)));+ const notFound = identifiers.filter((identifier) => !deletedKeys.has(identifierKey(identifier)));+ return {+ deleted: deleted.map(toOutput),+ not_found: notFound.map(toOutput),+ deleted_count: deleted.length,+ redacted_fields: redactedFields,+ };+ },+});++function identifierKey({ ownerId, namespace, key }: Identifier): string {+ return `${ownerId}|${namespace}|${key}`;+}++function buildIdentifiers(value: unknown): Identifier[] {+ const rows = shopifyValues.readRecords(value);+ if (rows.length === 0) {+ throw new Error('Provide at least one metafield. Nothing was deleted.');+ }+ if (rows.length > shopifyFields.MAX_METAFIELDS_PER_CALL) {+ throw new Error(+ `At most ${shopifyFields.MAX_METAFIELDS_PER_CALL} metafields per call; split them over several calls. Nothing was deleted.`+ );+ }+ return rows.map((row, index) => {+ const namespace = shopifyValues.readText(row['namespace']);+ const key = shopifyValues.readText(row['key']);+ if (!namespace || !key) {+ throw new Error(`metafields[${index}] needs a namespace and a key. Nothing was deleted.`);+ }+ return {+ ownerId: shopifyValues.requireGid({+ value: shopifyValues.readText(row['owner_id']),+ label: `metafields[${index}].owner_id`,+ example: 'gid://shopify/Product/123',+ hint: 'the owner type cannot be guessed from a bare number.',+ }),+ namespace,+ key,+ };+ });+}++function toOutput(identifier: Identifier) {+ return {+ owner_id: identifier.ownerId,+ namespace: identifier.namespace,+ key: identifier.key,+ };+}++type Identifier = {+ ownerId: string;+ namespace: string;+ key: string;+};diff --git a/packages/pieces/community/shopify/src/lib/actions/ai/delete-metaobject-definition.ts b/packages/pieces/community/shopify/src/lib/actions/ai/delete-metaobject-definition.tsnew file mode 100644index 00000000000..c441bc7be8e--- /dev/null+++ b/packages/pieces/community/shopify/src/lib/actions/ai/delete-metaobject-definition.ts@@ -0,0 +1,40 @@+import { createAction, Property } from '@activepieces/pieces-framework';+import { shopifyAuth } from '../../..';+import { shopifyGraphqlClient } from '../../common/graphql';+import { deleteMetaobjectDefinitionOutputSchema } from '../../output-schemas/content';++export const shopifyAiDeleteMetaobjectDefinition = createAction({+ auth: shopifyAuth,+ name: 'delete_metaobject_definition',+ classification: 'DESTRUCTIVE',+ displayName: 'Delete Metaobject Definition',+ description: 'Permanently delete a metaobject type and every entry of it.',+ audience: 'ai',+ aiMetadata: {+ description:+ 'Permanently deletes one metaobject definition (a custom content type) AND every entry of that type; references to those entries from metafields break. Check metaobjects_count with list_metaobject_definitions and confirm before calling. To remove only some entries use delete_metaobject or bulk_delete_metaobjects. Cannot be undone; a repeat call fails because the definition is gone. Needs the write_metaobject_definitions access scope.',+ idempotent: false,+ },+ outputSchema: deleteMetaobjectDefinitionOutputSchema,+ props: {+ metaobject_definition_id: Property.ShortText({+ displayName: 'Metaobject Definition ID',+ description: 'The definition id, numeric or "gid://shopify/MetaobjectDefinition/…". Find it with list_metaobject_definitions.',+ required: true,+ }),+ },+ async run({ auth, propsValue }) {+ const id = shopifyGraphqlClient.toGid({ type: 'MetaobjectDefinition', id: propsValue.metaobject_definition_id });+ const { data, redactedFields } = await shopifyGraphqlClient.request<{+ metaobjectDefinitionDelete: { deletedId?: string | null } | null;+ }>({+ auth,+ query: `mutation DeleteMetaobjectDefinition($id: ID!) { metaobjectDefinitionDelete(id: $id) { deletedId userErrors { field message code } } }`,+ variables: { id },+ });+ return {+ deleted_metaobject_definition_id: data.metaobjectDefinitionDelete?.deletedId ?? id,+ redacted_fields: redactedFields,+ };+ },+});diff --git a/packages/pieces/community/shopify/src/lib/actions/ai/delete-metaobject.ts b/packages/pieces/community/shopify/src/lib/actions/ai/delete-metaobject.tsnew file mode 100644index 00000000000..a7e7c5fc632--- /dev/null+++ b/packages/pieces/community/shopify/src/lib/actions/ai/delete-metaobject.ts@@ -0,0 +1,40 @@+import { createAction, Property } from '@activepieces/pieces-framework';+import { shopifyAuth } from '../../..';+import { shopifyGraphqlClient } from '../../common/graphql';+import { deleteMetaobjectOutputSchema } from '../../output-schemas/content';++export const shopifyAiDeleteMetaobject = createAction({+ auth: shopifyAuth,+ name: 'delete_metaobject',+ classification: 'DESTRUCTIVE',+ displayName: 'Delete Metaobject Entry',+ description: 'Permanently delete one metaobject entry.',+ audience: 'ai',+ aiMetadata: {+ description:+ 'Permanently deletes one metaobject entry. Metafields and other entries that reference it lose that reference. To hide an entry of a publishable type instead, use upsert_metaobject with status DRAFT. Cannot be undone; a repeat call fails because the entry is gone. Needs the write_metaobjects access scope.',+ idempotent: false,+ },+ outputSchema: deleteMetaobjectOutputSchema,+ props: {+ metaobject_id: Property.ShortText({+ displayName: 'Metaobject ID',+ description: 'The entry id, numeric or "gid://shopify/Metaobject/…". Find it with list_metaobjects.',+ required: true,+ }),+ },+ async run({ auth, propsValue }) {+ const id = shopifyGraphqlClient.toGid({ type: 'Metaobject', id: propsValue.metaobject_id });+ const { data, redactedFields } = await shopifyGraphqlClient.request<{+ metaobjectDelete: { deletedId?: string | null } | null;+ }>({+ auth,+ query: `mutation DeleteMetaobject($id: ID!) { metaobjectDelete(id: $id) { deletedId userErrors { field message code } } }`,+ variables: { id },+ });+ return {+ deleted_metaobject_id: data.metaobjectDelete?.deletedId ?? id,+ redacted_fields: redactedFields,+ };+ },+});diff --git a/packages/pieces/community/shopify/src/lib/actions/ai/delete-page.ts b/packages/pieces/community/shopify/src/lib/actions/ai/delete-page.tsnew file mode 100644index 00000000000..6b2aa40cec7--- /dev/null+++ b/packages/pieces/community/shopify/src/lib/actions/ai/delete-page.ts@@ -0,0 +1,40 @@+import { createAction, Property } from '@activepieces/pieces-framework';+import { shopifyAuth } from '../../..';+import { shopifyGraphqlClient } from '../../common/graphql';+import { deletePageOutputSchema } from '../../output-schemas/content';++export const shopifyAiDeletePage = createAction({+ auth: shopifyAuth,+ name: 'delete_page',+ classification: 'DESTRUCTIVE',+ displayName: 'Delete Online Store Page',+ description: 'Permanently delete an online store content page.',+ audience: 'ai',+ aiMetadata: {+ description:+ 'Permanently deletes one online store content page, and its URL stops working (menus linking to it break). To only hide it, use update_page with is_published No instead. Cannot be undone; a repeat call fails because the page is gone. Needs the write_content access scope.',+ idempotent: false,+ },+ outputSchema: deletePageOutputSchema,+ props: {+ page_id: Property.ShortText({+ displayName: 'Page ID',+ description: 'The page id, numeric or "gid://shopify/Page/…". Find it with list_pages.',+ required: true,+ }),+ },+ async run({ auth, propsValue }) {+ const id = shopifyGraphqlClient.toGid({ type: 'Page', id: propsValue.page_id });+ const { data, redactedFields } = await shopifyGraphqlClient.request<{+ pageDelete: { deletedPageId?: string | null } | null;+ }>({+ auth,+ query: `mutation DeletePage($id: ID!) { pageDelete(id: $id) { deletedPageId userErrors { field message code } } }`,+ variables: { id },+ });+ return {+ deleted_page_id: data.pageDelete?.deletedPageId ?? id,+ redacted_fields: redactedFields,+ };+ },+});diff --git a/packages/pieces/community/shopify/src/lib/actions/ai/delete-theme-files.ts b/packages/pieces/community/shopify/src/lib/actions/ai/delete-theme-files.tsnew file mode 100644index 00000000000..372098d39b1--- /dev/null+++ b/packages/pieces/community/shopify/src/lib/actions/ai/delete-theme-files.ts@@ -0,0 +1,63 @@+import { createAction, Property } from '@activepieces/pieces-framework';+import { shopifyAuth } from '../../..';+import {+ GqlThemeFileResult,+ shopifyFields,+ shopifyGraphqlClient,+ shopifyMappers,+ shopifyValues,+} from '../../common/graphql';+import { deleteThemeFilesOutputSchema } from '../../output-schemas/content';++export const shopifyAiDeleteThemeFiles = createAction({+ auth: shopifyAuth,+ name: 'delete_theme_files',+ classification: 'DESTRUCTIVE',+ displayName: 'Delete Theme Files',+ description: 'Permanently delete files from a theme (up to 50 per call).',+ audience: 'ai',+ aiMetadata: {+ description:+ 'Permanently deletes up to 50 files from one theme by path. Deleting a file that a template or section still uses breaks that part of the storefront, and on the live theme (role MAIN, see get_theme) the change is immediate; say so before doing it. Read a file with get_theme_file first if it may be needed again. Cannot be undone; a repeat call may fail for files that are already gone (not yet confirmed on a store). Shopify documents that modifying theme files needs the write_themes access scope AND an exemption granted by Shopify; without the exemption the call is refused with an access error, so report that instead of retrying.',+ idempotent: false,+ },+ outputSchema: deleteThemeFilesOutputSchema,+ props: {+ theme_id: Property.ShortText({+ displayName: 'Theme ID',+ description: 'The theme id, numeric or "gid://shopify/OnlineStoreTheme/…". Find it with list_themes.',+ required: true,+ }),+ filenames: Property.Array({+ displayName: 'File Paths',+ description: 'Paths of the files to delete, 1 to 50, for example ["snippets/old-banner.liquid"].',+ required: true,+ }),+ },+ async run({ auth, propsValue }) {+ const files = [...new Set(shopifyValues.readStringList(propsValue.filenames) ?? [])];+ if (files.length === 0) {+ throw new Error('Provide at least one file path. Nothing was deleted.');+ }+ if (files.length > shopifyFields.MAX_THEME_FILES_PER_CALL) {+ throw new Error(+ `At most ${shopifyFields.MAX_THEME_FILES_PER_CALL} files per call; split them over several calls. Nothing was deleted.`+ );+ }+ const themeId = shopifyGraphqlClient.toGid({ type: 'OnlineStoreTheme', id: propsValue.theme_id });+ const { data, redactedFields } = await shopifyGraphqlClient.request<{+ themeFilesDelete: { deletedThemeFiles?: GqlThemeFileResult[] | null } | null;+ }>({+ auth,+ query: `mutation DeleteThemeFiles($themeId: ID!, $files: [String!]!) { themeFilesDelete(themeId: $themeId, files: $files) { deletedThemeFiles { ${shopifyFields.THEME_FILE_RESULT_FIELDS} } userErrors { field message code filename } } }`,+ variables: { themeId, files },+ });+ const deleted = (data.themeFilesDelete?.deletedThemeFiles ?? []).map(shopifyMappers.mapThemeFileResult);+ return {+ theme_id: themeId,+ deleted_files: deleted,+ count: deleted.length,+ redacted_fields: redactedFields,+ };+ },+});diff --git a/packages/pieces/community/shopify/src/lib/actions/ai/delete-theme.ts b/packages/pieces/community/shopify/src/lib/actions/ai/delete-theme.tsnew file mode 100644index 00000000000..b3a706af81f--- /dev/null+++ b/packages/pieces/community/shopify/src/lib/actions/ai/delete-theme.ts@@ -0,0 +1,40 @@+import { createAction, Property } from '@activepieces/pieces-framework';+import { shopifyAuth } from '../../..';+import { shopifyGraphqlClient } from '../../common/graphql';+import { deleteThemeOutputSchema } from '../../output-schemas/content';++export const shopifyAiDeleteTheme = createAction({+ auth: shopifyAuth,+ name: 'delete_theme',+ classification: 'DESTRUCTIVE',+ displayName: 'Delete Theme',+ description: 'Permanently delete an unpublished theme.',+ audience: 'ai',+ aiMetadata: {+ description:+ 'Permanently deletes one theme with all its files and customizations. Shopify may refuse to delete the live (MAIN) theme (not yet confirmed on a store), so never try it: check the role with get_theme first. Cannot be undone; a repeat call fails because the theme is gone. Shopify documents that modifying themes needs the write_themes access scope AND an exemption granted by Shopify; without the exemption the call is refused with an access error, so report that instead of retrying.',+ idempotent: false,+ },+ outputSchema: deleteThemeOutputSchema,+ props: {+ theme_id: Property.ShortText({+ displayName: 'Theme ID',+ description: 'The theme id, numeric or "gid://shopify/OnlineStoreTheme/…". Find it with list_themes.',+ required: true,+ }),+ },+ async run({ auth, propsValue }) {+ const id = shopifyGraphqlClient.toGid({ type: 'OnlineStoreTheme', id: propsValue.theme_id });+ const { data, redactedFields } = await shopifyGraphqlClient.request<{+ themeDelete: { deletedThemeId?: string | null } | null;+ }>({+ auth,+ query: `mutation DeleteTheme($id: ID!) { themeDelete(id: $id) { deletedThemeId userErrors { field message code } } }`,+ variables: { id },+ });+ return {+ deleted_theme_id: data.themeDelete?.deletedThemeId ?? id,+ redacted_fields: redactedFields,+ };+ },+});diff --git a/packages/pieces/community/shopify/src/lib/actions/ai/delete-url-redirect.ts b/packages/pieces/community/shopify/src/lib/actions/ai/delete-url-redirect.tsnew file mode 100644index 00000000000..888748b0517--- /dev/null+++ b/packages/pieces/community/shopify/src/lib/actions/ai/delete-url-redirect.ts@@ -0,0 +1,40 @@+import { createAction, Property } from '@activepieces/pieces-framework';+import { shopifyAuth } from '../../..';+import { shopifyGraphqlClient } from '../../common/graphql';+import { deleteUrlRedirectOutputSchema } from '../../output-schemas/content';++export const shopifyAiDeleteUrlRedirect = createAction({+ auth: shopifyAuth,+ name: 'delete_url_redirect',+ classification: 'DESTRUCTIVE',+ displayName: 'Delete URL Redirect',+ description: 'Delete a URL redirect.',+ audience: 'ai',+ aiMetadata: {+ description:+ 'Deletes one URL redirect; visitors of its old path get the page at that path again (often a 404). Recreate it with create_url_redirect if needed. A repeat call fails because the redirect is gone. Needs the write_online_store_navigation access scope.',+ idempotent: false,+ },+ outputSchema: deleteUrlRedirectOutputSchema,+ props: {+ url_redirect_id: Property.ShortText({+ displayName: 'URL Redirect ID',+ description: 'The redirect id, numeric or "gid://shopify/UrlRedirect/…". Find it with list_url_redirects.',+ required: true,+ }),+ },+ async run({ auth, propsValue }) {+ const id = shopifyGraphqlClient.toGid({ type: 'UrlRedirect', id: propsValue.url_redirect_id });+ const { data, redactedFields } = await shopifyGraphqlClient.request<{+ urlRedirectDelete: { deletedUrlRedirectId?: string | null } | null;+ }>({+ auth,+ query: `mutation DeleteUrlRedirect($id: ID!) { urlRedirectDelete(id: $id) { deletedUrlRedirectId userErrors { field message code } } }`,+ variables: { id },+ });+ return {+ deleted_url_redirect_id: data.urlRedirectDelete?.deletedUrlRedirectId ?? id,+ redacted_fields: redactedFields,+ };+ },+});diff --git a/packages/pieces/community/shopify/src/lib/actions/ai/enable-standard-metaobject-definition.ts b/packages/pieces/community/shopify/src/lib/actions/ai/enable-standard-metaobject-definition.tsnew file mode 100644index 00000000000..ad29b694f91--- /dev/null+++ b/packages/pieces/community/shopify/src/lib/actions/ai/enable-standard-metaobject-definition.ts@@ -0,0 +1,53 @@+import { createAction, Property } from '@activepieces/pieces-framework';+import { shopifyAuth } from '../../..';+import {+ GqlMetaobjectDefinition,+ shopifyFields,+ shopifyGraphqlClient,+ shopifyMappers,+ shopifyValues,+} from '../../common/graphql';+import { metaobjectDefinitionOutputSchema } from '../../output-schemas/content';++export const shopifyAiEnableStandardMetaobjectDefinition = createAction({+ auth: shopifyAuth,+ name: 'enable_standard_metaobject_definition',+ classification: 'WRITE',+ displayName: 'Enable Standard Metaobject Definition',+ description: 'Add one of Shopify\'s standard metaobject types to the store.',+ audience: 'ai',+ aiMetadata: {+ description:+ 'Enables one of Shopify\'s standard metaobject definitions from its template by type (for example "shopify--color-pattern"), creating that content type with its standard fields, and returns the new definition. If the type is already enabled, Shopify returns the existing definition unchanged, so repeating the call is safe. Needs the write_metaobject_definitions access scope.',+ idempotent: true,+ },+ outputSchema: metaobjectDefinitionOutputSchema,+ props: {+ type: Property.ShortText({+ displayName: 'Standard Type',+ description: 'The standard metaobject type to enable, for example "shopify--color-pattern".',+ required: true,+ }),+ },+ async run({ auth, propsValue }) {+ const type = shopifyValues.nonEmpty(propsValue.type);+ if (!type) {+ throw new Error('A standard metaobject type is required, for example "shopify--color-pattern". Nothing was changed.');+ }+ const { data, redactedFields } = await shopifyGraphqlClient.request<{+ standardMetaobjectDefinitionEnable: { metaobjectDefinition: GqlMetaobjectDefinition | null } | null;+ }>({+ auth,+ query: `mutation EnableStandardMetaobjectDefinition($type: String!) { standardMetaobjectDefinitionEnable(type: $type) { metaobjectDefinition { ${shopifyFields.METAOBJECT_DEFINITION_FIELDS} } userErrors { field message code } } }`,+ variables: { type },+ });+ const definition = data.standardMetaobjectDefinitionEnable?.metaobjectDefinition;+ if (!definition) {+ throw new Error('Shopify did not return the enabled metaobject definition.');+ }+ return {+ ...shopifyMappers.mapMetaobjectDefinition(definition),+ redacted_fields: redactedFields,+ };+ },+});diff --git a/packages/pieces/community/shopify/src/lib/actions/ai/get-article.ts b/packages/pieces/community/shopify/src/lib/actions/ai/get-article.tsnew file mode 100644index 00000000000..c6f5e2decc2--- /dev/null+++ b/packages/pieces/community/shopify/src/lib/actions/ai/get-article.ts@@ -0,0 +1,48 @@+import { createAction, Property } from '@activepieces/pieces-framework';+import { shopifyAuth } from '../../..';+import {+ GqlArticle,+ shopifyFields,+ shopifyGraphqlClient,+ shopifyMappers,+} from '../../common/graphql';+import { articleOutputSchema } from '../../output-schemas/content';++export const shopifyAiGetArticle = createAction({+ auth: shopifyAuth,+ name: 'get_article',+ classification: 'READ',+ displayName: 'Get Blog Article',+ description: 'Get one blog article with its body and comment count.',+ audience: 'ai',+ aiMetadata: {+ description:+ 'Returns one blog article: title, handle, author, blog, full body HTML, summary, tags, publish state and date, image, template suffix and comments_count. list_comments returns the store\'s comments, each with its article_id. Needs the read_content access scope. Read-only.',+ idempotent: true,+ },+ outputSchema: articleOutputSchema,+ props: {+ article_id: Property.ShortText({+ displayName: 'Article ID',+ description: 'The article id, numeric or "gid://shopify/Article/…". Find it with list_articles.',+ required: true,+ }),+ },+ async run({ auth, propsValue }) {+ const id = shopifyGraphqlClient.toGid({ type: 'Article', id: propsValue.article_id });+ const { data, redactedFields } = await shopifyGraphqlClient.request<{+ article: GqlArticle | null;+ }>({+ auth,+ query: `query GetArticle($id: ID!) { article(id: $id) { ${shopifyFields.ARTICLE_FIELDS} } }`,+ variables: { id },+ });+ if (!data.article) {+ throw new Error(`Article ${id} was not found.`);+ }+ return {+ ...shopifyMappers.mapArticle(data.article),+ redacted_fields: redactedFields,+ };+ },+});diff --git a/packages/pieces/community/shopify/src/lib/actions/ai/get-blog.ts b/packages/pieces/community/shopify/src/lib/actions/ai/get-blog.tsnew file mode 100644index 00000000000..c357b5d315d--- /dev/null+++ b/packages/pieces/community/shopify/src/lib/actions/ai/get-blog.ts@@ -0,0 +1,48 @@+import { createAction, Property } from '@activepieces/pieces-framework';+import { shopifyAuth } from '../../..';+import {+ GqlBlog,+ shopifyFields,+ shopifyGraphqlClient,+ shopifyMappers,+} from '../../common/graphql';+import { getBlogOutputSchema } from '../../output-schemas/content';++export const shopifyAiGetBlog = createAction({+ auth: shopifyAuth,+ name: 'get_blog',+ classification: 'READ',+ displayName: 'Get Blog',+ description: 'Get one blog with its article count and recent article tags.',+ audience: 'ai',+ aiMetadata: {+ description:+ 'Returns one blog: title, handle, comment policy, template suffix, feed, articles_count and recent_article_tags (the tags used by the blog\'s 200 most recent articles). Use list_articles with this blog id to read its articles. Needs the read_content access scope. Read-only.',+ idempotent: true,+ },+ outputSchema: getBlogOutputSchema,+ props: {+ blog_id: Property.ShortText({+ displayName: 'Blog ID',+ description: 'The blog id, numeric or "gid://shopify/Blog/…". Find it with list_blogs.',+ required: true,+ }),+ },+ async run({ auth, propsValue }) {+ const id = shopifyGraphqlClient.toGid({ type: 'Blog', id: propsValue.blog_id });+ const { data, redactedFields } = await shopifyGraphqlClient.request<{+ blog: GqlBlog | null;+ }>({+ auth,+ query: `query GetBlog($id: ID!) { blog(id: $id) { ${shopifyFields.BLOG_DETAIL_FIELDS} } }`,+ variables: { id },+ });+ if (!data.blog) {+ throw new Error(`Blog ${id} was not found.`);+ }+ return {+ ...shopifyMappers.mapBlogDetail(data.blog),+ redacted_fields: redactedFields,+ };+ },+});diff --git a/packages/pieces/community/shopify/src/lib/actions/ai/get-metafield-definition.ts b/packages/pieces/community/shopify/src/lib/actions/ai/get-metafield-definition.tsnew file mode 100644index 00000000000..d97cf9809b1--- /dev/null+++ b/packages/pieces/community/shopify/src/lib/actions/ai/get-metafield-definition.ts@@ -0,0 +1,78 @@+import { createAction, Property } from '@activepieces/pieces-framework';+import { shopifyAuth } from '../../..';+import {+ GqlMetafieldDefinition,+ shopifyFields,+ shopifyGraphqlClient,+ shopifyMappers,+ shopifyProps,+ shopifyValues,+} from '../../common/graphql';+import { metafieldDefinitionOutputSchema } from '../../output-schemas/content';++export const shopifyAiGetMetafieldDefinition = createAction({+ auth: shopifyAuth,+ name: 'get_metafield_definition',+ classification: 'READ',+ displayName: 'Get Metafield Definition',+ description: 'Get one metafield definition by owner type, namespace and key.',+ audience: 'ai',+ aiMetadata: {+ description:+ 'Returns one metafield definition identified by owner type, namespace and key: name, type, description, validations (for example min, max, choices, regex), validation status, pinned position, access, capabilities and how many values exist. Read it before update_metafield_definition, because sending validations there replaces the whole list. Needs the read access scope of the owner type (for example read_products). Read-only.',+ idempotent: true,+ },+ outputSchema: metafieldDefinitionOutputSchema,+ props: {+ owner_type: shopifyProps.metafieldOwnerType({+ required: true,+ description: 'The resource type of the definition, for example PRODUCT.',+ }),+ namespace: Property.ShortText({+ displayName: 'Namespace',+ description: 'The definition namespace, for example "custom".',+ required: true,+ }),+ key: Property.ShortText({+ displayName: 'Key',+ description: 'The definition key, for example "care_instructions".',+ required: true,+ }),+ },+ async run({ auth, propsValue }) {+ const identifier = readIdentifier(propsValue);+ const { data, redactedFields } = await shopifyGraphqlClient.request<{+ metafieldDefinition: GqlMetafieldDefinition | null;+ }>({+ auth,+ query: `query GetMetafieldDefinition($identifier: MetafieldDefinitionIdentifierInput!) { metafieldDefinition(identifier: $identifier) { ${shopifyFields.METAFIELD_DEFINITION_FIELDS} } }`,+ variables: { identifier },+ });+ if (!data.metafieldDefinition) {+ throw new Error(+ `No ${identifier.ownerType} metafield definition ${identifier.namespace}.${identifier.key} was found. Use list_metafield_definitions to see the existing ones.`+ );+ }+ return {+ ...shopifyMappers.mapMetafieldDefinition(data.metafieldDefinition),+ redacted_fields: redactedFields,+ };+ },+});++function readIdentifier({+ owner_type,+ namespace,+ key,+}: {+ owner_type: string | undefined;+ namespace: string | undefined;+ key: string | undefined;+}) {+ const cleanNamespace = shopifyValues.nonEmpty(namespace);+ const cleanKey = shopifyValues.nonEmpty(key);+ if (!owner_type || !cleanNamespace || !cleanKey) {+ throw new Error('owner_type, namespace and key are all required.');+ }+ return { ownerType: owner_type, namespace: cleanNamespace, key: cleanKey };+}diff --git a/packages/pieces/community/shopify/src/lib/actions/ai/get-metafield.ts b/packages/pieces/community/shopify/src/lib/actions/ai/get-metafield.tsnew file mode 100644index 00000000000..149c8bd3792--- /dev/null+++ b/packages/pieces/community/shopify/src/lib/actions/ai/get-metafield.ts@@ -0,0 +1,48 @@+import { createAction, Property } from '@activepieces/pieces-framework';+import { shopifyAuth } from '../../..';+import {+ GqlMetafield,+ shopifyFields,+ shopifyGraphqlClient,+ shopifyMappers,+} from '../../common/graphql';+import { metafieldOutputSchema } from '../../output-schemas/content';++export const shopifyAiGetMetafield = createAction({+ auth: shopifyAuth,+ name: 'get_metafield',+ classification: 'READ',+ displayName: 'Get Metafield',+ description: 'Get one metafield by its id.',+ audience: 'ai',+ aiMetadata: {+ description:+ 'Returns one metafield by its id: namespace, key, type, value, compare_digest, owner type and owner id, and its definition. To read metafields by owner, namespace and key, use list_metafields instead. Needs the read access scope of the owner type (for example read_products). Read-only.',+ idempotent: true,+ },+ outputSchema: metafieldOutputSchema,+ props: {+ metafield_id: Property.ShortText({+ displayName: 'Metafield ID',+ description: 'The metafield id, numeric or "gid://shopify/Metafield/…". Find it with list_metafields.',+ required: true,+ }),+ },+ async run({ auth, propsValue }) {+ const id = shopifyGraphqlClient.toGid({ type: 'Metafield', id: propsValue.metafield_id });+ const { data, redactedFields } = await shopifyGraphqlClient.request<{+ node: (GqlMetafield & { __typename?: string }) | null;+ }>({+ auth,+ query: `query GetMetafield($id: ID!) { node(id: $id) { __typename ... on Metafield { ${shopifyFields.METAFIELD_FIELDS} } } }`,+ variables: { id },+ });+ if (!data.node || data.node.__typename !== 'Metafield') {+ throw new Error(`Metafield ${id} was not found.`);+ }+ return {+ ...shopifyMappers.mapMetafield(data.node),+ redacted_fields: redactedFields,+ };+ },+});diff --git a/packages/pieces/community/shopify/src/lib/actions/ai/get-metaobject.ts b/packages/pieces/community/shopify/src/lib/actions/ai/get-metaobject.tsnew file mode 100644index 00000000000..76fb5f069c5--- /dev/null+++ b/packages/pieces/community/shopify/src/lib/actions/ai/get-metaobject.ts@@ -0,0 +1,48 @@+import { createAction, Property } from '@activepieces/pieces-framework';+import { shopifyAuth } from '../../..';+import {+ GqlMetaobject,+ shopifyFields,+ shopifyGraphqlClient,+ shopifyMappers,+} from '../../common/graphql';+import { metaobjectOutputSchema } from '../../output-schemas/content';++export const shopifyAiGetMetaobject = createAction({+ auth: shopifyAuth,+ name: 'get_metaobject',+ classification: 'READ',+ displayName: 'Get Metaobject Entry',+ description: 'Get one metaobject entry with all its field values.',+ audience: 'ai',+ aiMetadata: {+ description:+ 'Returns one metaobject entry by id: type, handle, display name, publish status (DRAFT or ACTIVE when the type is publishable), online store template suffix, its definition, every field value (fields and a values map keyed by field key) and dates. Needs the read_metaobjects access scope. Read-only.',+ idempotent: true,+ },+ outputSchema: metaobjectOutputSchema,+ props: {+ metaobject_id: Property.ShortText({+ displayName: 'Metaobject ID',+ description: 'The entry id, numeric or "gid://shopify/Metaobject/…". Find it with list_metaobjects.',+ required: true,+ }),+ },+ async run({ auth, propsValue }) {+ const id = shopifyGraphqlClient.toGid({ type: 'Metaobject', id: propsValue.metaobject_id });+ const { data, redactedFields } = await shopifyGraphqlClient.request<{+ metaobject: GqlMetaobject | null;+ }>({+ auth,+ query: `query GetMetaobject($id: ID!) { metaobject(id: $id) { ${shopifyFields.METAOBJECT_FIELDS} } }`,+ variables: { id },+ });+ if (!data.metaobject) {+ throw new Error(`Metaobject ${id} was not found.`);+ }+ return {+ ...shopifyMappers.mapMetaobject(data.metaobject),+ redacted_fields: redactedFields,+ };+ },+});diff --git a/packages/pieces/community/shopify/src/lib/actions/ai/get-online-store-settings.ts b/packages/pieces/community/shopify/src/lib/actions/ai/get-online-store-settings.tsnew file mode 100644index 00000000000..6301c8be8a8--- /dev/null+++ b/packages/pieces/community/shopify/src/lib/actions/ai/get-online-store-settings.ts@@ -0,0 +1,32 @@+import { createAction } from '@activepieces/pieces-framework';+import { shopifyAuth } from '../../..';+import { shopifyGraphqlClient } from '../../common/graphql';+import { onlineStoreSettingsOutputSchema } from '../../output-schemas/content';++export const shopifyAiGetOnlineStoreSettings = createAction({+ auth: shopifyAuth,+ name: 'get_online_store_settings',+ classification: 'READ',+ displayName: 'Get Online Store Settings',+ description: 'Check whether the online store is password protected.',+ audience: 'ai',+ aiMetadata: {+ description:+ 'Returns the online store channel settings Shopify exposes: password_protection_enabled is true while the storefront is locked behind a password (typical before launch or on development stores), so shoppers cannot see pages, articles or products yet. The required access scope is not documented. Read-only.',+ idempotent: true,+ },+ outputSchema: onlineStoreSettingsOutputSchema,+ props: {},+ async run({ auth }) {+ const { data, redactedFields } = await shopifyGraphqlClient.request<{+ onlineStore: { passwordProtection?: { enabled?: boolean | null } | null } | null;+ }>({+ auth,+ query: `query GetOnlineStoreSettings { onlineStore { passwordProtection { enabled } } }`,+ });+ return {+ password_protection_enabled: data.onlineStore?.passwordProtection?.enabled ?? null,+ redacted_fields: redactedFields,+ };+ },+});diff --git a/packages/pieces/community/shopify/src/lib/actions/ai/get-page.ts b/packages/pieces/community/shopify/src/lib/actions/ai/get-page.tsnew file mode 100644index 00000000000..21852096411--- /dev/null+++ b/packages/pieces/community/shopify/src/lib/actions/ai/get-page.ts@@ -0,0 +1,48 @@+import { createAction, Property } from '@activepieces/pieces-framework';+import { shopifyAuth } from '../../..';+import {+ GqlPage,+ shopifyFields,+ shopifyGraphqlClient,+ shopifyMappers,+} from '../../common/graphql';+import { pageOutputSchema } from '../../output-schemas/content';++export const shopifyAiGetPage = createAction({+ auth: shopifyAuth,+ name: 'get_page',+ classification: 'READ',+ displayName: 'Get Online Store Page',+ description: 'Get one online store content page with its full body.',+ audience: 'ai',+ aiMetadata: {+ description:+ 'Returns one online store content page: title, handle, full body HTML, body summary, publish state and date, and template suffix. Needs the read_content access scope. Read-only.',+ idempotent: true,+ },+ outputSchema: pageOutputSchema,+ props: {+ page_id: Property.ShortText({+ displayName: 'Page ID',+ description: 'The page id, numeric or "gid://shopify/Page/…". Find it with list_pages.',+ required: true,+ }),+ },+ async run({ auth, propsValue }) {+ const id = shopifyGraphqlClient.toGid({ type: 'Page', id: propsValue.page_id });+ const { data, redactedFields } = await shopifyGraphqlClient.request<{+ page: GqlPage | null;+ }>({+ auth,+ query: `query GetPage($id: ID!) { page(id: $id) { ${shopifyFields.PAGE_FIELDS} } }`,+ variables: { id },+ });+ if (!data.page) {+ throw new Error(`Page ${id} was not found.`);+ }+ return {+ ...shopifyMappers.mapPage(data.page),+ redacted_fields: redactedFields,+ };+ },+});diff --git a/packages/pieces/community/shopify/src/lib/actions/ai/get-theme-file.ts b/packages/pieces/community/shopify/src/lib/actions/ai/get-theme-file.tsnew file mode 100644index 00000000000..156efe41c06--- /dev/null+++ b/packages/pieces/community/shopify/src/lib/actions/ai/get-theme-file.ts@@ -0,0 +1,77 @@+import { createAction, Property } from '@activepieces/pieces-framework';+import { shopifyAuth } from '../../..';+import {+ GqlThemeFile,+ shopifyFields,+ shopifyGraphqlClient,+ shopifyMappers,+ shopifyValues,+} from '../../common/graphql';+import { getThemeFileOutputSchema } from '../../output-schemas/content';++export const shopifyAiGetThemeFile = createAction({+ auth: shopifyAuth,+ name: 'get_theme_file',+ classification: 'READ',+ displayName: 'Get Theme File',+ description: 'Read one file (template, section, snippet, asset) of a theme.',+ audience: 'ai',+ aiMetadata: {+ description:+ 'Reads one file of a theme by its path, for example "templates/index.json", "sections/header.liquid", "snippets/price.liquid", "config/settings_data.json" or "assets/base.css"; use list_theme_files to find the exact paths. Text files return content; binary files return content_base64 or a url (body_type says which). Returns size, checksum_md5 and dates too. Fails when the file does not exist. Needs the read_themes access scope. Read-only.',+ idempotent: true,+ },+ outputSchema: getThemeFileOutputSchema,+ props: {+ theme_id: Property.ShortText({+ displayName: 'Theme ID',+ description: 'The theme id, numeric or "gid://shopify/OnlineStoreTheme/…". Find it with list_themes (role MAIN is the live theme).',+ required: true,+ }),+ filename: Property.ShortText({+ displayName: 'File Path',+ description: 'Path of the file inside the theme, for example "templates/index.json" or "sections/header.liquid". Find it with list_theme_files.',+ required: true,+ }),+ },+ async run({ auth, propsValue }) {+ const filename = shopifyValues.nonEmpty(propsValue.filename);+ if (!filename) {+ throw new Error('A file path is required, for example "templates/index.json".');+ }+ const id = shopifyGraphqlClient.toGid({ type: 'OnlineStoreTheme', id: propsValue.theme_id });+ const { data, redactedFields } = await shopifyGraphqlClient.request<{+ theme: {+ id: string;+ name?: string | null;+ role?: string | null;+ files?: {+ nodes?: GqlThemeFile[] | null;+ userErrors?: { filename?: string | null; code?: string | null }[] | null;+ } | null;+ } | null;+ }>({+ auth,+ query: `query GetThemeFile($id: ID!, $filenames: [String!]) { theme(id: $id) { id name role files(filenames: $filenames, first: 1) { nodes { ${shopifyFields.THEME_FILE_FIELDS} } userErrors { filename code } } } }`,+ variables: { id, filenames: [filename] },+ primaryPaths: ['theme.files'],+ });+ if (!data.theme) {+ throw new Error(`Theme ${id} was not found.`);+ }+ const file = (data.theme.files?.nodes ?? [])[0];+ if (!file) {+ const problem = (data.theme.files?.userErrors ?? [])[0];+ throw new Error(+ `File "${filename}" was not read from theme ${id}${problem?.code ? ` (${problem.code})` : ''}. Check the path, for example "templates/index.json".`+ );+ }+ return {+ theme_id: data.theme.id,+ theme_name: data.theme.name ?? null,+ theme_role: data.theme.role ?? null,+ ...shopifyMappers.mapThemeFile(file),+ redacted_fields: redactedFields,+ };+ },+});diff --git a/packages/pieces/community/shopify/src/lib/actions/ai/get-theme.ts b/packages/pieces/community/shopify/src/lib/actions/ai/get-theme.tsnew file mode 100644index 00000000000..5e783e1cade--- /dev/null+++ b/packages/pieces/community/shopify/src/lib/actions/ai/get-theme.ts@@ -0,0 +1,48 @@+import { createAction, Property } from '@activepieces/pieces-framework';+import { shopifyAuth } from '../../..';+import {+ GqlTheme,+ shopifyFields,+ shopifyGraphqlClient,+ shopifyMappers,+} from '../../common/graphql';+import { themeOutputSchema } from '../../output-schemas/content';++export const shopifyAiGetTheme = createAction({+ auth: shopifyAuth,+ name: 'get_theme',+ classification: 'READ',+ displayName: 'Get Theme',+ description: 'Get one theme with its role and processing state.',+ audience: 'ai',+ aiMetadata: {+ description:+ 'Returns one theme: name, role (MAIN is the live theme), whether it is still processing or failed to process, its Theme Store id and dates. Check the role before changing a theme or its files. Needs the read_themes access scope. Read-only.',+ idempotent: true,+ },+ outputSchema: themeOutputSchema,+ props: {+ theme_id: Property.ShortText({+ displayName: 'Theme ID',+ description: 'The theme id, numeric or "gid://shopify/OnlineStoreTheme/…". Find it with list_themes.',+ required: true,+ }),+ },+ async run({ auth, propsValue }) {+ const id = shopifyGraphqlClient.toGid({ type: 'OnlineStoreTheme', id: propsValue.theme_id });+ const { data, redactedFields } = await shopifyGraphqlClient.request<{+ theme: GqlTheme | null;+ }>({+ auth,+ query: `query GetTheme($id: ID!) { theme(id: $id) { ${shopifyFields.THEME_FIELDS} } }`,+ variables: { id },+ });+ if (!data.theme) {+ throw new Error(`Theme ${id} was not found.`);+ }+ return {+ ...shopifyMappers.mapTheme(data.theme),+ redacted_fields: redactedFields,+ };+ },+});diff --git a/packages/pieces/community/shopify/src/lib/actions/ai/get-url-redirect.ts b/packages/pieces/community/shopify/src/lib/actions/ai/get-url-redirect.tsnew file mode 100644index 00000000000..f2b5ff8db19--- /dev/null+++ b/packages/pieces/community/shopify/src/lib/actions/ai/get-url-redirect.ts@@ -0,0 +1,48 @@+import { createAction, Property } from '@activepieces/pieces-framework';+import { shopifyAuth } from '../../..';+import {+ GqlUrlRedirect,+ shopifyFields,+ shopifyGraphqlClient,+ shopifyMappers,+} from '../../common/graphql';+import { urlRedirectOutputSchema } from '../../output-schemas/content';++export const shopifyAiGetUrlRedirect = createAction({+ auth: shopifyAuth,+ name: 'get_url_redirect',+ classification: 'READ',+ displayName: 'Get URL Redirect',+ description: 'Get one URL redirect.',+ audience: 'ai',+ aiMetadata: {+ description:+ 'Returns one URL redirect: the old path visitors arrive on and the target they are sent to. Use list_url_redirects with "path:/old-page" to find one by path. Needs the read_online_store_navigation access scope. Read-only.',+ idempotent: true,+ },+ outputSchema: urlRedirectOutputSchema,+ props: {+ url_redirect_id: Property.ShortText({+ displayName: 'URL Redirect ID',+ description: 'The redirect id, numeric or "gid://shopify/UrlRedirect/…". Find it with list_url_redirects.',+ required: true,+ }),+ },+ async run({ auth, propsValue }) {+ const id = shopifyGraphqlClient.toGid({ type: 'UrlRedirect', id: propsValue.url_redirect_id });+ const { data, redactedFields } = await shopifyGraphqlClient.request<{+ urlRedirect: GqlUrlRedirect | null;+ }>({+ auth,+ query: `query GetUrlRedirect($id: ID!) { urlRedirect(id: $id) { ${shopifyFields.URL_REDIRECT_FIELDS} } }`,+ variables: { id },+ });+ if (!data.urlRedirect) {+ throw new Error(`URL redirect ${id} was not found.`);+ }+ return {+ ...shopifyMappers.mapUrlRedirect(data.urlRedirect),+ redacted_fields: redactedFields,+ };+ },+});diff --git a/packages/pieces/community/shopify/src/lib/actions/ai/list-article-authors.ts b/packages/pieces/community/shopify/src/lib/actions/ai/list-article-authors.tsnew file mode 100644index 00000000000..44f25842439--- /dev/null+++ b/packages/pieces/community/shopify/src/lib/actions/ai/list-article-authors.ts@@ -0,0 +1,51 @@+import { createAction } from '@activepieces/pieces-framework';+import { shopifyAuth } from '../../..';+import {+ GqlConnection,+ shopifyFields,+ shopifyGraphqlClient,+ shopifyMappers,+ shopifyProps,+ shopifyValues,+} from '../../common/graphql';+import { listArticleAuthorsOutputSchema } from '../../output-schemas/content';++const MAX_PAGE_SIZE = 250;++export const shopifyAiListArticleAuthors = createAction({+ auth: shopifyAuth,+ name: 'list_article_authors',+ classification: 'SEARCH',+ displayName: 'List Article Authors',+ description: 'List the author names used on blog articles.',+ audience: 'ai',+ aiMetadata: {+ description:+ 'Lists the distinct author names used on the store\'s blog articles, for example to reuse an existing author_name in create_article or to filter list_articles with "author:<name>". Paged: pass end_cursor back as the cursor while has_next_page is true. Needs the read_content access scope. Read-only.',+ idempotent: true,+ },+ outputSchema: listArticleAuthorsOutputSchema,+ props: {+ reverse: shopifyProps.reverse(),+ first: shopifyProps.first({ max: MAX_PAGE_SIZE }),+ after: shopifyProps.after(),+ },+ async run({ auth, propsValue }) {+ const { data, redactedFields } = await shopifyGraphqlClient.request<{+ articleAuthors: GqlConnection<{ name?: string | null }>;+ }>({+ auth,+ query: `query ListArticleAuthors($first: Int!, $after: String, $reverse: Boolean) { articleAuthors(first: $first, after: $after, reverse: $reverse) { nodes { name } ${shopifyFields.PAGE_INFO_FIELDS} } }`,+ variables: {+ first: shopifyValues.readFirst({ value: propsValue.first, max: MAX_PAGE_SIZE }),+ after: shopifyValues.nonEmpty(propsValue.after),+ reverse: propsValue.reverse ?? false,+ },+ });+ return shopifyMappers.toPage({+ connection: data.articleAuthors,+ map: (author) => ({ name: author.name ?? null }),+ redactedFields,+ });+ },+});diff --git a/packages/pieces/community/shopify/src/lib/actions/ai/list-article-tags.ts b/packages/pieces/community/shopify/src/lib/actions/ai/list-article-tags.tsnew file mode 100644index 00000000000..8a3c9c4acb7--- /dev/null+++ b/packages/pieces/community/shopify/src/lib/actions/ai/list-article-tags.ts@@ -0,0 +1,60 @@+import { createAction, Property } from '@activepieces/pieces-framework';+import { shopifyAuth } from '../../..';+import { shopifyGraphqlClient } from '../../common/graphql';+import { listArticleTagsOutputSchema } from '../../output-schemas/content';++const MAX_TAGS = 250;++export const shopifyAiListArticleTags = createAction({+ auth: shopifyAuth,+ name: 'list_article_tags',+ classification: 'SEARCH',+ displayName: 'List Article Tags',+ description: 'List the tags used on blog articles.',+ audience: 'ai',+ aiMetadata: {+ description:+ 'Lists the tags used across the store\'s blog articles, sorted alphabetically or by popularity. This list has no paging: limit sets how many tags come back (1 to 250), and truncated is true when the result filled the limit, meaning more tags may exist. For the tags of one blog use get_blog (recent_article_tags). Needs the read_content access scope. Read-only.',+ idempotent: true,+ },+ outputSchema: listArticleTagsOutputSchema,+ props: {+ limit: Property.Number({+ displayName: 'Limit',+ description: `How many tags to return, 1 to ${MAX_TAGS}.`,+ required: true,+ defaultValue: 50,+ }),+ sort: Property.StaticDropdown({+ displayName: 'Sort',+ description: 'Alphabetical (default) or most used first.',+ required: false,+ options: {+ options: [+ { label: 'Alphabetical', value: 'ALPHABETICAL' },+ { label: 'Most used first', value: 'POPULAR' },+ ],+ },+ }),+ },+ async run({ auth, propsValue }) {+ const limit = propsValue.limit;+ if (!Number.isInteger(limit) || limit < 1 || limit > MAX_TAGS) {+ throw new Error(`limit must be a whole number between 1 and ${MAX_TAGS}.`);+ }+ const { data, redactedFields } = await shopifyGraphqlClient.request<{+ articleTags: string[] | null;+ }>({+ auth,+ query: `query ListArticleTags($limit: Int!, $sort: ArticleTagSort) { articleTags(limit: $limit, sort: $sort) }`,+ variables: { limit, sort: propsValue.sort },+ });+ const items = data.articleTags ?? [];+ return {+ items,+ count: items.length,+ truncated: items.length >= limit,+ redacted_fields: redactedFields,+ };+ },+});diff --git a/packages/pieces/community/shopify/src/lib/actions/ai/list-articles.ts b/packages/pieces/community/shopify/src/lib/actions/ai/list-articles.tsnew file mode 100644index 00000000000..6477a511ca6--- /dev/null+++ b/packages/pieces/community/shopify/src/lib/actions/ai/list-articles.ts@@ -0,0 +1,82 @@+import { createAction, Property } from '@activepieces/pieces-framework';+import { shopifyAuth } from '../../..';+import {+ GqlArticle,+ GqlConnection,+ shopifyFields,+ shopifyGraphqlClient,+ shopifyMappers,+ shopifyProps,+ shopifyValues,+} from '../../common/graphql';+import { listArticlesOutputSchema } from '../../output-schemas/content';++const MAX_PAGE_SIZE = 160;++export const shopifyAiListArticles = createAction({+ auth: shopifyAuth,+ name: 'list_articles',+ classification: 'SEARCH',+ displayName: 'List Blog Articles',+ description: 'List or search blog articles, optionally within one blog.',+ audience: 'ai',+ aiMetadata: {+ description:+ 'Lists blog articles with title, handle, author, blog, summary, tags, publish state, image and comment count (not the full body; use get_article for that). Set blog_id to stay within one blog, and/or filter with Shopify search syntax such as "tag:news", "author:Jane", "published_status:published" or "updated_at:>2026-01-01". Paged: pass end_cursor back as the cursor while has_next_page is true. Needs the read_content access scope. Read-only.',+ idempotent: true,+ },+ outputSchema: listArticlesOutputSchema,+ props: {+ blog_id: Property.ShortText({+ displayName: 'Blog ID',+ description: 'Only list articles of this blog, numeric or "gid://shopify/Blog/…". Leave empty for every blog.',+ required: false,+ }),+ query: shopifyProps.searchQuery(+ 'Shopify article search syntax, for example "tag:news published_status:published" or "title:summer". Leave empty to list all.'+ ),+ sort_key: Property.StaticDropdown({+ displayName: 'Sort By',+ description: 'Field to sort by. Defaults to the id.',+ required: false,+ options: {+ options: [+ { label: 'ID', value: 'ID' },+ { label: 'Title', value: 'TITLE' },+ { label: 'Published at', value: 'PUBLISHED_AT' },+ { label: 'Updated at', value: 'UPDATED_AT' },+ { label: 'Author', value: 'AUTHOR' },+ { label: 'Blog title', value: 'BLOG_TITLE' },+ ],+ },+ }),+ reverse: shopifyProps.reverse(),+ first: shopifyProps.first({ max: MAX_PAGE_SIZE }),+ after: shopifyProps.after(),+ },+ async run({ auth, propsValue }) {+ const blogId = shopifyValues.legacyIdFilter(propsValue.blog_id);+ const query = shopifyValues.joinSearch([+ blogId ? `blog_id:${blogId}` : undefined,+ shopifyValues.nonEmpty(propsValue.query),+ ]);+ const { data, redactedFields } = await shopifyGraphqlClient.request<{+ articles: GqlConnection<GqlArticle>;+ }>({+ auth,+ query: `query ListArticles($first: Int!, $after: String, $query: String, $sortKey: ArticleSortKeys, $reverse: Boolean) { articles(first: $first, after: $after, query: $query, sortKey: $sortKey, reverse: $reverse) { nodes { ${shopifyFields.ARTICLE_SUMMARY_FIELDS} } ${shopifyFields.PAGE_INFO_FIELDS} } }`,+ variables: {+ first: shopifyValues.readFirst({ value: propsValue.first, max: MAX_PAGE_SIZE }),+ after: shopifyValues.nonEmpty(propsValue.after),+ query,+ sortKey: propsValue.sort_key,+ reverse: propsValue.reverse ?? false,+ },+ });+ return shopifyMappers.toPage({+ connection: data.articles,+ map: shopifyMappers.mapArticleSummary,+ redactedFields,+ });+ },+});diff --git a/packages/pieces/community/shopify/src/lib/actions/ai/list-blogs.ts b/packages/pieces/community/shopify/src/lib/actions/ai/list-blogs.tsnew file mode 100644index 00000000000..50b19c8fcd8--- /dev/null+++ b/packages/pieces/community/shopify/src/lib/actions/ai/list-blogs.ts@@ -0,0 +1,69 @@+import { createAction, Property } from '@activepieces/pieces-framework';+import { shopifyAuth } from '../../..';+import {+ GqlBlog,+ GqlConnection,+ shopifyFields,+ shopifyGraphqlClient,+ shopifyMappers,+ shopifyProps,+ shopifyValues,+} from '../../common/graphql';+import { listBlogsOutputSchema } from '../../output-schemas/content';++const MAX_PAGE_SIZE = 250;++export const shopifyAiListBlogs = createAction({+ auth: shopifyAuth,+ name: 'list_blogs',+ classification: 'SEARCH',+ displayName: 'List Blogs',+ description: 'List or search the blogs of the online store.',+ audience: 'ai',+ aiMetadata: {+ description:+ 'Lists the online store\'s blogs with title, handle, comment policy, article count and feed. Optionally filter with Shopify search syntax such as "title:News" or "handle:news". Paged: pass end_cursor back as the cursor while has_next_page is true. Use get_blog for the recent article tags of one blog. Needs the read_content access scope. Read-only.',+ idempotent: true,+ },+ outputSchema: listBlogsOutputSchema,+ props: {+ query: shopifyProps.searchQuery(+ 'Shopify blog search syntax, for example "title:News" or "handle:news". Leave empty to list all.'+ ),+ sort_key: Property.StaticDropdown({+ displayName: 'Sort By',+ description: 'Field to sort by. Defaults to the id.',+ required: false,+ options: {+ options: [+ { label: 'ID', value: 'ID' },+ { label: 'Title', value: 'TITLE' },+ { label: 'Handle', value: 'HANDLE' },+ ],+ },+ }),+ reverse: shopifyProps.reverse(),+ first: shopifyProps.first({ max: MAX_PAGE_SIZE }),+ after: shopifyProps.after(),+ },+ async run({ auth, propsValue }) {+ const { data, redactedFields } = await shopifyGraphqlClient.request<{+ blogs: GqlConnection<GqlBlog>;+ }>({+ auth,+ query: `query ListBlogs($first: Int!, $after: String, $query: String, $sortKey: BlogSortKeys, $reverse: Boolean) { blogs(first: $first, after: $after, query: $query, sortKey: $sortKey, reverse: $reverse) { nodes { ${shopifyFields.BLOG_FIELDS} } ${shopifyFields.PAGE_INFO_FIELDS} } }`,+ variables: {+ first: shopifyValues.readFirst({ value: propsValue.first, max: MAX_PAGE_SIZE }),+ after: shopifyValues.nonEmpty(propsValue.after),+ query: shopifyValues.nonEmpty(propsValue.query),+ sortKey: propsValue.sort_key,+ reverse: propsValue.reverse ?? false,+ },+ });+ return shopifyMappers.toPage({+ connection: data.blogs,+ map: shopifyMappers.mapBlog,+ redactedFields,+ });+ },+});diff --git a/packages/pieces/community/shopify/src/lib/actions/ai/list-comments.ts b/packages/pieces/community/shopify/src/lib/actions/ai/list-comments.tsnew file mode 100644index 00000000000..31e0c525ffc--- /dev/null+++ b/packages/pieces/community/shopify/src/lib/actions/ai/list-comments.ts@@ -0,0 +1,68 @@+import { createAction, Property } from '@activepieces/pieces-framework';+import { shopifyAuth } from '../../..';+import {+ GqlComment,+ GqlConnection,+ shopifyFields,+ shopifyGraphqlClient,+ shopifyMappers,+ shopifyProps,+ shopifyValues,+} from '../../common/graphql';+import { listCommentsOutputSchema } from '../../output-schemas/content';++const MAX_PAGE_SIZE = 250;++export const shopifyAiListComments = createAction({+ auth: shopifyAuth,+ name: 'list_comments',+ classification: 'SEARCH',+ displayName: 'List Blog Comments',+ description: 'List or search blog comments, for example those waiting for moderation.',+ audience: 'ai',+ aiMetadata: {+ description:+ 'Lists blog comments across the store with status (PENDING, UNAPPROVED, PUBLISHED, SPAM, REMOVED), body, author name and email, IP, the article it belongs to and dates. Filter with Shopify search syntax such as "status:pending", "published_status:unpublished" or "created_at:>2026-01-01". Paged: pass end_cursor back as the cursor while has_next_page is true. Author name, email and IP are protected customer data and may be null on stores without that access (listed in redacted_fields). Needs the read_content access scope. Read-only.',+ idempotent: true,+ },+ outputSchema: listCommentsOutputSchema,+ props: {+ query: shopifyProps.searchQuery(+ 'Shopify comment search syntax, for example "status:pending" or "published_status:published". Leave empty to list all.'+ ),+ sort_key: Property.StaticDropdown({+ displayName: 'Sort By',+ description: 'Field to sort by. Defaults to the id.',+ required: false,+ options: {+ options: [+ { label: 'ID', value: 'ID' },+ { label: 'Created at', value: 'CREATED_AT' },+ ],+ },+ }),+ reverse: shopifyProps.reverse(),+ first: shopifyProps.first({ max: MAX_PAGE_SIZE }),+ after: shopifyProps.after(),+ },+ async run({ auth, propsValue }) {+ const { data, redactedFields } = await shopifyGraphqlClient.request<{+ comments: GqlConnection<GqlComment>;+ }>({+ auth,+ query: `query ListComments($first: Int!, $after: String, $query: String, $sortKey: CommentSortKeys, $reverse: Boolean) { comments(first: $first, after: $after, query: $query, sortKey: $sortKey, reverse: $reverse) { nodes { ${shopifyFields.COMMENT_FIELDS} } ${shopifyFields.PAGE_INFO_FIELDS} } }`,+ variables: {+ first: shopifyValues.readFirst({ value: propsValue.first, max: MAX_PAGE_SIZE }),+ after: shopifyValues.nonEmpty(propsValue.after),+ query: shopifyValues.nonEmpty(propsValue.query),+ sortKey: propsValue.sort_key,+ reverse: propsValue.reverse ?? false,+ },+ });+ return shopifyMappers.toPage({+ connection: data.comments,+ map: shopifyMappers.mapComment,+ redactedFields,+ });+ },+});diff --git a/packages/pieces/community/shopify/src/lib/actions/ai/list-metafield-definition-types.ts b/packages/pieces/community/shopify/src/lib/actions/ai/list-metafield-definition-types.tsnew file mode 100644index 00000000000..dffbb350b55--- /dev/null+++ b/packages/pieces/community/shopify/src/lib/actions/ai/list-metafield-definition-types.ts@@ -0,0 +1,39 @@+import { createAction } from '@activepieces/pieces-framework';+import { shopifyAuth } from '../../..';+import {+ GqlMetafieldDefinitionType,+ shopifyFields,+ shopifyGraphqlClient,+ shopifyMappers,+} from '../../common/graphql';+import { listMetafieldDefinitionTypesOutputSchema } from '../../output-schemas/content';++export const shopifyAiListMetafieldDefinitionTypes = createAction({+ auth: shopifyAuth,+ name: 'list_metafield_definition_types',+ classification: 'SEARCH',+ displayName: 'List Metafield Types',+ description: 'List every metafield type Shopify supports, with its validations.',+ audience: 'ai',+ aiMetadata: {+ description:+ 'Lists every metafield type Shopify supports (for example single_line_text_field, number_integer, date, json, product_reference and their list.* variants) with its category and the validation rules it accepts. Use the name as the type in set_metafields, and the validation names in update_metafield_definition. Returns the full list in one call (no paging). No access scope needed. Read-only.',+ idempotent: true,+ },+ outputSchema: listMetafieldDefinitionTypesOutputSchema,+ props: {},+ async run({ auth }) {+ const { data, redactedFields } = await shopifyGraphqlClient.request<{+ metafieldDefinitionTypes: GqlMetafieldDefinitionType[] | null;+ }>({+ auth,+ query: `query ListMetafieldDefinitionTypes { metafieldDefinitionTypes { ${shopifyFields.METAFIELD_DEFINITION_TYPE_FIELDS} } }`,+ });+ const items = (data.metafieldDefinitionTypes ?? []).map(shopifyMappers.mapMetafieldDefinitionType);+ return {+ items,+ count: items.length,+ redacted_fields: redactedFields,+ };+ },+});diff --git a/packages/pieces/community/shopify/src/lib/actions/ai/list-metafield-definitions.ts b/packages/pieces/community/shopify/src/lib/actions/ai/list-metafield-definitions.tsnew file mode 100644index 00000000000..3c2e2c61cab--- /dev/null+++ b/packages/pieces/community/shopify/src/lib/actions/ai/list-metafield-definitions.ts@@ -0,0 +1,98 @@+import { createAction, Property } from '@activepieces/pieces-framework';+import { shopifyAuth } from '../../..';+import {+ GqlConnection,+ GqlMetafieldDefinition,+ shopifyFields,+ shopifyGraphqlClient,+ shopifyMappers,+ shopifyProps,+ shopifyValues,+} from '../../common/graphql';+import { listMetafieldDefinitionsOutputSchema } from '../../output-schemas/content';++const MAX_PAGE_SIZE = 45;++export const shopifyAiListMetafieldDefinitions = createAction({+ auth: shopifyAuth,+ name: 'list_metafield_definitions',+ classification: 'SEARCH',+ displayName: 'List Metafield Definitions',+ description: 'List the metafield definitions (custom field schemas) for one resource type.',+ audience: 'ai',+ aiMetadata: {+ description:+ 'Lists the metafield definitions for one owner type (for example PRODUCT or CUSTOMER): name, namespace, key, type, description, validations, pinned position, access and capabilities, and how many values exist. Use it to learn which namespace, key and type set_metafields expects. Optionally filter by namespace, key, pinned status or a search query. Paged: pass end_cursor back as the cursor while has_next_page is true. Needs the read access scope of the owner type (for example read_products). Read-only.',+ idempotent: true,+ },+ outputSchema: listMetafieldDefinitionsOutputSchema,+ props: {+ owner_type: shopifyProps.metafieldOwnerType({+ required: true,+ description: 'The resource type the definitions belong to, for example PRODUCT.',+ }),+ namespace: Property.ShortText({+ displayName: 'Namespace',+ description: 'Only definitions in this namespace, for example "custom".',+ required: false,+ }),+ key: Property.ShortText({+ displayName: 'Key',+ description: 'Only the definition with this key.',+ required: false,+ }),+ pinned_status: Property.StaticDropdown({+ displayName: 'Pinned Status',+ description: 'Only pinned or only unpinned definitions. Leave empty for all.',+ required: false,+ options: {+ options: [+ { label: 'Any', value: 'ANY' },+ { label: 'Pinned', value: 'PINNED' },+ { label: 'Unpinned', value: 'UNPINNED' },+ ],+ },+ }),+ query: shopifyProps.searchQuery('Free-text search over the definitions, for example "care". Leave empty for all.'),+ sort_key: Property.StaticDropdown({+ displayName: 'Sort By',+ description: 'Field to sort by. Defaults to the id.',+ required: false,+ options: {+ options: [+ { label: 'ID', value: 'ID' },+ { label: 'Name', value: 'NAME' },+ { label: 'Pinned position', value: 'PINNED_POSITION' },+ { label: 'Relevance (with a query)', value: 'RELEVANCE' },+ ],+ },+ }),+ reverse: shopifyProps.reverse(),+ first: shopifyProps.first({ max: MAX_PAGE_SIZE }),+ after: shopifyProps.after(),+ },+ async run({ auth, propsValue }) {+ const { data, redactedFields } = await shopifyGraphqlClient.request<{+ metafieldDefinitions: GqlConnection<GqlMetafieldDefinition>;+ }>({+ auth,+ query: `query ListMetafieldDefinitions($ownerType: MetafieldOwnerType!, $first: Int!, $after: String, $namespace: String, $key: String, $pinnedStatus: MetafieldDefinitionPinnedStatus, $query: String, $sortKey: MetafieldDefinitionSortKeys, $reverse: Boolean) { metafieldDefinitions(ownerType: $ownerType, first: $first, after: $after, namespace: $namespace, key: $key, pinnedStatus: $pinnedStatus, query: $query, sortKey: $sortKey, reverse: $reverse) { nodes { ${shopifyFields.METAFIELD_DEFINITION_FIELDS} } ${shopifyFields.PAGE_INFO_FIELDS} } }`,+ variables: {+ ownerType: propsValue.owner_type,+ first: shopifyValues.readFirst({ value: propsValue.first, max: MAX_PAGE_SIZE }),+ after: shopifyValues.nonEmpty(propsValue.after),+ namespace: shopifyValues.nonEmpty(propsValue.namespace),+ key: shopifyValues.nonEmpty(propsValue.key),+ pinnedStatus: propsValue.pinned_status,+ query: shopifyValues.nonEmpty(propsValue.query),+ sortKey: propsValue.sort_key,+ reverse: propsValue.reverse ?? false,+ },+ });+ return shopifyMappers.toPage({+ connection: data.metafieldDefinitions,+ map: shopifyMappers.mapMetafieldDefinition,+ redactedFields,+ });+ },+});diff --git a/packages/pieces/community/shopify/src/lib/actions/ai/list-metafields.ts b/packages/pieces/community/shopify/src/lib/actions/ai/list-metafields.tsnew file mode 100644index 00000000000..74fae065c53--- /dev/null+++ b/packages/pieces/community/shopify/src/lib/actions/ai/list-metafields.ts@@ -0,0 +1,78 @@+import { createAction, Property } from '@activepieces/pieces-framework';+import { shopifyAuth } from '../../..';+import {+ GqlConnection,+ GqlMetafield,+ shopifyFields,+ shopifyGraphqlClient,+ shopifyMappers,+ shopifyProps,+ shopifyValues,+} from '../../common/graphql';+import { listMetafieldsOutputSchema } from '../../output-schemas/content';++const MAX_PAGE_SIZE = 250;++export const shopifyAiListMetafields = createAction({+ auth: shopifyAuth,+ name: 'list_metafields',+ classification: 'SEARCH',+ displayName: 'List Metafields',+ description: 'List the metafields of one product, customer, order or other resource.',+ audience: 'ai',+ aiMetadata: {+ description:+ 'Lists the metafields stored on one resource (product, variant, collection, customer, order, draft order, company, location, market, page, blog, article, the shop and more), each with namespace, key, type, value, compare_digest and its definition. Pass the owner\'s full id, for example "gid://shopify/Product/123" (use the shop id from get_shop for shop metafields); optionally only one namespace. Paged: pass end_cursor back as the cursor while has_next_page is true. Needs the read access scope of the owner type (for example read_products). Read-only.',+ idempotent: true,+ },+ outputSchema: listMetafieldsOutputSchema,+ props: {+ owner_id: Property.ShortText({+ displayName: 'Owner ID',+ description: 'Full id of the resource, for example "gid://shopify/Product/123" or "gid://shopify/Customer/456".',+ required: true,+ }),+ namespace: Property.ShortText({+ displayName: 'Namespace',+ description: 'Only return metafields in this namespace, for example "custom". Leave empty for all.',+ required: false,+ }),+ first: shopifyProps.first({ max: MAX_PAGE_SIZE }),+ after: shopifyProps.after(),+ },+ async run({ auth, propsValue }) {+ const ownerId = shopifyValues.requireGid({+ value: propsValue.owner_id,+ label: 'owner_id',+ example: 'gid://shopify/Product/123',+ hint: 'the owner type cannot be guessed from a bare number.',+ });+ const { data, redactedFields } = await shopifyGraphqlClient.request<{+ node: { id?: string | null; metafields?: GqlConnection<GqlMetafield> | null } | null;+ }>({+ auth,+ query: `query ListMetafields($id: ID!, $first: Int!, $after: String, $namespace: String) { node(id: $id) { id ... on HasMetafields { metafields(first: $first, after: $after, namespace: $namespace) { nodes { ${shopifyFields.METAFIELD_FIELDS} } ${shopifyFields.PAGE_INFO_FIELDS} } } } }`,+ variables: {+ id: ownerId,+ first: shopifyValues.readFirst({ value: propsValue.first, max: MAX_PAGE_SIZE }),+ after: shopifyValues.nonEmpty(propsValue.after),+ namespace: shopifyValues.nonEmpty(propsValue.namespace),+ },+ primaryPaths: ['node.metafields'],+ });+ if (!data.node) {+ throw new Error(`Resource ${ownerId} was not found.`);+ }+ if (!data.node.metafields) {+ throw new Error(`Resource ${ownerId} cannot have metafields.`);+ }+ return {+ owner_id: ownerId,+ ...shopifyMappers.toPage({+ connection: data.node.metafields,+ map: shopifyMappers.mapMetafield,+ redactedFields,+ }),+ };+ },+});diff --git a/packages/pieces/community/shopify/src/lib/actions/ai/list-metaobject-definitions.ts b/packages/pieces/community/shopify/src/lib/actions/ai/list-metaobject-definitions.tsnew file mode 100644index 00000000000..613c272f1c9--- /dev/null+++ b/packages/pieces/community/shopify/src/lib/actions/ai/list-metaobject-definitions.ts@@ -0,0 +1,52 @@+import { createAction } from '@activepieces/pieces-framework';+import { shopifyAuth } from '../../..';+import {+ GqlConnection,+ GqlMetaobjectDefinition,+ shopifyFields,+ shopifyGraphqlClient,+ shopifyMappers,+ shopifyProps,+ shopifyValues,+} from '../../common/graphql';+import { listMetaobjectDefinitionsOutputSchema } from '../../output-schemas/content';++const MAX_PAGE_SIZE = 30;++export const shopifyAiListMetaobjectDefinitions = createAction({+ auth: shopifyAuth,+ name: 'list_metaobject_definitions',+ classification: 'SEARCH',+ displayName: 'List Metaobject Definitions',+ description: 'List the store\'s metaobject types with their fields.',+ audience: 'ai',+ aiMetadata: {+ description:+ 'Lists the store\'s metaobject definitions (custom content types such as "designer" or "shopify--color-pattern"): type, name, description, entry count, capabilities (publishable, translatable, renderable, online store), access and every field definition (key, name, type, required). Use it to learn the type and field keys for list_metaobjects and upsert_metaobject. Paged: pass end_cursor back as the cursor while has_next_page is true. Needs the read_metaobject_definitions access scope. Read-only.',+ idempotent: true,+ },+ outputSchema: listMetaobjectDefinitionsOutputSchema,+ props: {+ reverse: shopifyProps.reverse(),+ first: shopifyProps.first({ max: MAX_PAGE_SIZE }),+ after: shopifyProps.after(),+ },+ async run({ auth, propsValue }) {+ const { data, redactedFields } = await shopifyGraphqlClient.request<{+ metaobjectDefinitions: GqlConnection<GqlMetaobjectDefinition>;+ }>({+ auth,+ query: `query ListMetaobjectDefinitions($first: Int!, $after: String, $reverse: Boolean) { metaobjectDefinitions(first: $first, after: $after, reverse: $reverse) { nodes { ${shopifyFields.METAOBJECT_DEFINITION_FIELDS} } ${shopifyFields.PAGE_INFO_FIELDS} } }`,+ variables: {+ first: shopifyValues.readFirst({ value: propsValue.first, max: MAX_PAGE_SIZE }),+ after: shopifyValues.nonEmpty(propsValue.after),+ reverse: propsValue.reverse ?? false,+ },+ });+ return shopifyMappers.toPage({+ connection: data.metaobjectDefinitions,+ map: shopifyMappers.mapMetaobjectDefinition,+ redactedFields,+ });+ },+});diff --git a/packages/pieces/community/shopify/src/lib/actions/ai/list-metaobjects.ts b/packages/pieces/community/shopify/src/lib/actions/ai/list-metaobjects.tsnew file mode 100644index 00000000000..7794bdd8aee--- /dev/null+++ b/packages/pieces/community/shopify/src/lib/actions/ai/list-metaobjects.ts@@ -0,0 +1,80 @@+import { createAction, Property } from '@activepieces/pieces-framework';+import { shopifyAuth } from '../../..';+import {+ GqlConnection,+ GqlMetaobject,+ shopifyFields,+ shopifyGraphqlClient,+ shopifyMappers,+ shopifyProps,+ shopifyValues,+} from '../../common/graphql';+import { listMetaobjectsOutputSchema } from '../../output-schemas/content';++const MAX_PAGE_SIZE = 50;++export const shopifyAiListMetaobjects = createAction({+ auth: shopifyAuth,+ name: 'list_metaobjects',+ classification: 'SEARCH',+ displayName: 'List Metaobject Entries',+ description: 'List or search the entries of one metaobject type.',+ audience: 'ai',+ aiMetadata: {+ description:+ 'Lists the entries of one metaobject type (for example "designer" or "shopify--color-pattern"; see list_metaobject_definitions for the types) with handle, display name, publish status, every field value (fields and a values map keyed by field key) and dates. Filter with Shopify search syntax such as "display_name:Ada" or "fields.country:France". Paged: pass end_cursor back as the cursor while has_next_page is true. Needs the read_metaobjects access scope. Read-only.',+ idempotent: true,+ },+ outputSchema: listMetaobjectsOutputSchema,+ props: {+ type: Property.ShortText({+ displayName: 'Metaobject Type',+ description: 'The metaobject definition type, for example "designer". Find it with list_metaobject_definitions.',+ required: true,+ }),+ query: shopifyProps.searchQuery(+ 'Shopify metaobject search syntax, for example "display_name:Ada" or "fields.country:France". Leave empty to list all.'+ ),+ sort_key: Property.StaticDropdown({+ displayName: 'Sort By',+ description: 'Field to sort by. Defaults to the id.',+ required: false,+ options: {+ options: [+ { label: 'ID', value: 'id' },+ { label: 'Display name', value: 'display_name' },+ { label: 'Updated at', value: 'updated_at' },+ { label: 'Type', value: 'type' },+ ],+ },+ }),+ reverse: shopifyProps.reverse(),+ first: shopifyProps.first({ max: MAX_PAGE_SIZE }),+ after: shopifyProps.after(),+ },+ async run({ auth, propsValue }) {+ const type = shopifyValues.nonEmpty(propsValue.type);+ if (!type) {+ throw new Error('A metaobject type is required, for example "designer".');+ }+ const { data, redactedFields } = await shopifyGraphqlClient.request<{+ metaobjects: GqlConnection<GqlMetaobject>;+ }>({+ auth,+ query: `query ListMetaobjects($type: String!, $first: Int!, $after: String, $query: String, $sortKey: String, $reverse: Boolean) { metaobjects(type: $type, first: $first, after: $after, query: $query, sortKey: $sortKey, reverse: $reverse) { nodes { ${shopifyFields.METAOBJECT_FIELDS} } ${shopifyFields.PAGE_INFO_FIELDS} } }`,+ variables: {+ type,+ first: shopifyValues.readFirst({ value: propsValue.first, max: MAX_PAGE_SIZE }),+ after: shopifyValues.nonEmpty(propsValue.after),+ query: shopifyValues.nonEmpty(propsValue.query),+ sortKey: propsValue.sort_key,+ reverse: propsValue.reverse ?? false,+ },+ });+ return shopifyMappers.toPage({+ connection: data.metaobjects,+ map: shopifyMappers.mapMetaobject,+ redactedFields,+ });+ },+});diff --git a/packages/pieces/community/shopify/src/lib/actions/ai/list-pages.ts b/packages/pieces/community/shopify/src/lib/actions/ai/list-pages.tsnew file mode 100644index 00000000000..92ef7b033b2--- /dev/null+++ b/packages/pieces/community/shopify/src/lib/actions/ai/list-pages.ts@@ -0,0 +1,70 @@+import { createAction, Property } from '@activepieces/pieces-framework';+import { shopifyAuth } from '../../..';+import {+ GqlConnection,+ GqlPage,+ shopifyFields,+ shopifyGraphqlClient,+ shopifyMappers,+ shopifyProps,+ shopifyValues,+} from '../../common/graphql';+import { listPagesOutputSchema } from '../../output-schemas/content';++const MAX_PAGE_SIZE = 250;++export const shopifyAiListPages = createAction({+ auth: shopifyAuth,+ name: 'list_pages',+ classification: 'SEARCH',+ displayName: 'List Online Store Pages',+ description: 'List or search the online store\'s content pages (About, Contact, FAQ, ...).',+ audience: 'ai',+ aiMetadata: {+ description:+ 'Lists the online store\'s content pages (such as About us, FAQ or Shipping policy pages) with title, handle, a plain-text body summary, publish state and template suffix; use get_page for the full body. Filter with Shopify search syntax such as "title:FAQ", "handle:about-us" or "published_status:published". Paged: pass end_cursor back as the cursor while has_next_page is true. Needs the read_content access scope. Read-only.',+ idempotent: true,+ },+ outputSchema: listPagesOutputSchema,+ props: {+ query: shopifyProps.searchQuery(+ 'Shopify page search syntax, for example "title:FAQ" or "published_status:unpublished". Leave empty to list all.'+ ),+ sort_key: Property.StaticDropdown({+ displayName: 'Sort By',+ description: 'Field to sort by. Defaults to the id.',+ required: false,+ options: {+ options: [+ { label: 'ID', value: 'ID' },+ { label: 'Title', value: 'TITLE' },+ { label: 'Published at', value: 'PUBLISHED_AT' },+ { label: 'Updated at', value: 'UPDATED_AT' },+ ],+ },+ }),+ reverse: shopifyProps.reverse(),+ first: shopifyProps.first({ max: MAX_PAGE_SIZE }),+ after: shopifyProps.after(),+ },+ async run({ auth, propsValue }) {+ const { data, redactedFields } = await shopifyGraphqlClient.request<{+ pages: GqlConnection<GqlPage>;+ }>({+ auth,+ query: `query ListPages($first: Int!, $after: String, $query: String, $sortKey: PageSortKeys, $reverse: Boolean) { pages(first: $first, after: $after, query: $query, sortKey: $sortKey, reverse: $reverse) { nodes { ${shopifyFields.PAGE_SUMMARY_FIELDS} } ${shopifyFields.PAGE_INFO_FIELDS} } }`,+ variables: {+ first: shopifyValues.readFirst({ value: propsValue.first, max: MAX_PAGE_SIZE }),+ after: shopifyValues.nonEmpty(propsValue.after),+ query: shopifyValues.nonEmpty(propsValue.query),+ sortKey: propsValue.sort_key,+ reverse: propsValue.reverse ?? false,+ },+ });+ return shopifyMappers.toPage({+ connection: data.pages,+ map: shopifyMappers.mapPageSummary,+ redactedFields,+ });+ },+});diff --git a/packages/pieces/community/shopify/src/lib/actions/ai/list-standard-metafield-definition-templates.ts b/packages/pieces/community/shopify/src/lib/actions/ai/list-standard-metafield-definition-templates.tsnew file mode 100644index 00000000000..6e6ec1a6970--- /dev/null+++ b/packages/pieces/community/shopify/src/lib/actions/ai/list-standard-metafield-definition-templates.ts@@ -0,0 +1,57 @@+import { createAction } from '@activepieces/pieces-framework';+import { shopifyAuth } from '../../..';+import {+ GqlConnection,+ GqlStandardMetafieldTemplate,+ shopifyFields,+ shopifyGraphqlClient,+ shopifyMappers,+ shopifyProps,+ shopifyValues,+} from '../../common/graphql';+import { listStandardMetafieldDefinitionTemplatesOutputSchema } from '../../output-schemas/content';++const MAX_PAGE_SIZE = 60;++export const shopifyAiListStandardMetafieldDefinitionTemplates = createAction({+ auth: shopifyAuth,+ name: 'list_standard_metafield_definition_templates',+ classification: 'SEARCH',+ displayName: 'List Standard Metafield Templates',+ description: 'List Shopify\'s standard metafield definition templates.',+ audience: 'ai',+ aiMetadata: {+ description:+ 'Lists Shopify\'s ready-made standard metafield definitions (for example product subtitle, care guide or ingredients) with namespace, key, name, type, the owner types they apply to and their validations. exclude_activated Yes hides templates the store already uses. Paged: pass end_cursor back as the cursor while has_next_page is true. No access scope needed. Read-only.',+ idempotent: true,+ },+ outputSchema: listStandardMetafieldDefinitionTemplatesOutputSchema,+ props: {+ exclude_activated: shopifyProps.booleanChoice({+ displayName: 'Exclude Activated',+ description: 'Yes hides templates the store has already enabled. Leave empty to include them.',+ }),+ reverse: shopifyProps.reverse(),+ first: shopifyProps.first({ max: MAX_PAGE_SIZE }),+ after: shopifyProps.after(),+ },+ async run({ auth, propsValue }) {+ const { data, redactedFields } = await shopifyGraphqlClient.request<{+ standardMetafieldDefinitionTemplates: GqlConnection<GqlStandardMetafieldTemplate>;+ }>({+ auth,+ query: `query ListStandardMetafieldDefinitionTemplates($first: Int!, $after: String, $excludeActivated: Boolean, $reverse: Boolean) { standardMetafieldDefinitionTemplates(first: $first, after: $after, excludeActivated: $excludeActivated, reverse: $reverse) { nodes { ${shopifyFields.STANDARD_METAFIELD_TEMPLATE_FIELDS} } ${shopifyFields.PAGE_INFO_FIELDS} } }`,+ variables: {+ first: shopifyValues.readFirst({ value: propsValue.first, max: MAX_PAGE_SIZE }),+ after: shopifyValues.nonEmpty(propsValue.after),+ excludeActivated: shopifyValues.toBooleanChoice(propsValue.exclude_activated),+ reverse: propsValue.reverse ?? false,+ },+ });+ return shopifyMappers.toPage({+ connection: data.standardMetafieldDefinitionTemplates,+ map: shopifyMappers.mapStandardMetafieldTemplate,+ redactedFields,+ });+ },+});diff --git a/packages/pieces/community/shopify/src/lib/actions/ai/list-theme-files.ts b/packages/pieces/community/shopify/src/lib/actions/ai/list-theme-files.tsnew file mode 100644index 00000000000..344c975a666--- /dev/null+++ b/packages/pieces/community/shopify/src/lib/actions/ai/list-theme-files.ts@@ -0,0 +1,91 @@+import { createAction, Property } from '@activepieces/pieces-framework';+import { shopifyAuth } from '../../..';+import {+ GqlConnection,+ GqlThemeFileSummary,+ shopifyFields,+ shopifyGraphqlClient,+ shopifyMappers,+ shopifyProps,+ shopifyValues,+} from '../../common/graphql';+import { listThemeFilesOutputSchema } from '../../output-schemas/content';++const MAX_PAGE_SIZE = 250;++export const shopifyAiListThemeFiles = createAction({+ auth: shopifyAuth,+ name: 'list_theme_files',+ classification: 'SEARCH',+ displayName: 'List Theme Files',+ description: 'List the file paths of a theme, optionally filtered by path pattern.',+ audience: 'ai',+ aiMetadata: {+ description:+ 'Lists the files of one theme without their content: path (filename), content_type, size, checksum_md5 and dates. Use it to find the path to pass to get_theme_file, upsert_theme_files or delete_theme_files. Optional filenames narrows the list to up to 50 paths or patterns, where * matches any characters (for example "templates/*.json" or "sections/*"). Paged: pass end_cursor back as the cursor while has_next_page is true; Shopify may return fewer files than the page size to stay within its payload limit, so rely on has_next_page rather than the count. Any per-path problem Shopify reports (for example NOT_FOUND) comes back in file_errors with the filename and code. Needs the read_themes access scope. Read-only.',+ idempotent: true,+ },+ outputSchema: listThemeFilesOutputSchema,+ props: {+ theme_id: Property.ShortText({+ displayName: 'Theme ID',+ description: 'The theme id, numeric or "gid://shopify/OnlineStoreTheme/…". Find it with list_themes (role MAIN is the live theme).',+ required: true,+ }),+ filenames: Property.Array({+ displayName: 'File Paths or Patterns',+ description: 'Only list these paths, up to 50; * matches any characters, for example ["templates/*.json", "layout/theme.liquid"]. Leave empty for every file.',+ required: false,+ }),+ first: shopifyProps.first({ max: MAX_PAGE_SIZE }),+ after: shopifyProps.after(),+ },+ async run({ auth, propsValue }) {+ const filenames = [...new Set(shopifyValues.readStringList(propsValue.filenames) ?? [])];+ if (filenames.length > shopifyFields.MAX_THEME_FILES_PER_CALL) {+ throw new Error(+ `At most ${shopifyFields.MAX_THEME_FILES_PER_CALL} paths or patterns per call; use a pattern such as "sections/*" or split them over several calls.`+ );+ }+ const first = shopifyValues.readFirst({ value: propsValue.first, max: MAX_PAGE_SIZE });+ const id = shopifyGraphqlClient.toGid({ type: 'OnlineStoreTheme', id: propsValue.theme_id });+ const { data, redactedFields } = await shopifyGraphqlClient.request<{+ theme: {+ id: string;+ name?: string | null;+ role?: string | null;+ files?: (GqlConnection<GqlThemeFileSummary> & {+ userErrors?: { filename?: string | null; code?: string | null }[] | null;+ }) | null;+ } | null;+ }>({+ auth,+ query: `query ListThemeFiles($id: ID!, $first: Int!, $after: String, $filenames: [String!]) { theme(id: $id) { id name role files(first: $first, after: $after, filenames: $filenames) { nodes { ${shopifyFields.THEME_FILE_SUMMARY_FIELDS} } ${shopifyFields.PAGE_INFO_FIELDS} userErrors { filename code } } } }`,+ variables: {+ id,+ first,+ after: shopifyValues.nonEmpty(propsValue.after),+ filenames: filenames.length > 0 ? filenames : undefined,+ },+ primaryPaths: ['theme.files'],+ });+ if (!data.theme) {+ throw new Error(`Theme ${id} was not found. Use list_themes to see the theme ids.`);+ }+ const page = shopifyMappers.toPage({+ connection: data.theme.files,+ map: shopifyMappers.mapThemeFileSummary,+ redactedFields,+ });+ return {+ theme_id: data.theme.id,+ theme_name: data.theme.name ?? null,+ theme_role: data.theme.role ?? null,+ ...page,+ file_errors: (data.theme.files?.userErrors ?? []).map((problem) => ({+ filename: problem.filename ?? null,+ code: problem.code ?? null,+ })),+ };+ },+});diff --git a/packages/pieces/community/shopify/src/lib/actions/ai/list-themes.ts b/packages/pieces/community/shopify/src/lib/actions/ai/list-themes.tsnew file mode 100644index 00000000000..43a8e99668c--- /dev/null+++ b/packages/pieces/community/shopify/src/lib/actions/ai/list-themes.ts@@ -0,0 +1,76 @@+import { createAction, Property } from '@activepieces/pieces-framework';+import { shopifyAuth } from '../../..';+import {+ GqlConnection,+ GqlTheme,+ shopifyFields,+ shopifyGraphqlClient,+ shopifyMappers,+ shopifyProps,+ shopifyValues,+} from '../../common/graphql';+import { listThemesOutputSchema } from '../../output-schemas/content';++const MAX_PAGE_SIZE = 250;++export const shopifyAiListThemes = createAction({+ auth: shopifyAuth,+ name: 'list_themes',+ classification: 'SEARCH',+ displayName: 'List Themes',+ description: 'List the online store\'s themes, optionally by role or name.',+ audience: 'ai',+ aiMetadata: {+ description:+ 'Lists the online store\'s themes with name, role and processing state. The theme with role MAIN is the live theme shoppers see; UNPUBLISHED and DEVELOPMENT themes are drafts. Filter by roles and/or exact names. Paged: pass end_cursor back as the cursor while has_next_page is true. Needs the read_themes access scope. Read-only.',+ idempotent: true,+ },+ outputSchema: listThemesOutputSchema,+ props: {+ roles: Property.StaticMultiSelectDropdown({+ displayName: 'Roles',+ description: 'Only return themes with these roles, for example MAIN for the live theme. Leave empty for all.',+ required: false,+ options: {+ options: [+ { label: 'Live theme (MAIN)', value: 'MAIN' },+ { label: 'Unpublished', value: 'UNPUBLISHED' },+ { label: 'Development', value: 'DEVELOPMENT' },+ { label: 'Demo', value: 'DEMO' },+ { label: 'Archived', value: 'ARCHIVED' },+ { label: 'Locked', value: 'LOCKED' },+ ],+ },+ }),+ names: Property.Array({+ displayName: 'Names',+ description: 'Only return themes with these exact names, for example ["Dawn"].',+ required: false,+ }),+ reverse: shopifyProps.reverse(),+ first: shopifyProps.first({ max: MAX_PAGE_SIZE }),+ after: shopifyProps.after(),+ },+ async run({ auth, propsValue }) {+ const names = shopifyValues.readStringList(propsValue.names);+ const roles = propsValue.roles ?? [];+ const { data, redactedFields } = await shopifyGraphqlClient.request<{+ themes: GqlConnection<GqlTheme> | null;+ }>({+ auth,+ query: `query ListThemes($first: Int!, $after: String, $roles: [ThemeRole!], $names: [String!], $reverse: Boolean) { themes(first: $first, after: $after, roles: $roles, names: $names, reverse: $reverse) { nodes { ${shopifyFields.THEME_FIELDS} } ${shopifyFields.PAGE_INFO_FIELDS} } }`,+ variables: {+ first: shopifyValues.readFirst({ value: propsValue.first, max: MAX_PAGE_SIZE }),+ after: shopifyValues.nonEmpty(propsValue.after),+ roles: roles.length > 0 ? roles : undefined,+ names: names && names.length > 0 ? names : undefined,+ reverse: propsValue.reverse ?? false,+ },+ });+ return shopifyMappers.toPage({+ connection: data.themes,+ map: shopifyMappers.mapTheme,+ redactedFields,+ });+ },+});diff --git a/packages/pieces/community/shopify/src/lib/actions/ai/list-url-redirects.ts b/packages/pieces/community/shopify/src/lib/actions/ai/list-url-redirects.tsnew file mode 100644index 00000000000..d23ab101a1c--- /dev/null+++ b/packages/pieces/community/shopify/src/lib/actions/ai/list-url-redirects.ts@@ -0,0 +1,69 @@+import { createAction, Property } from '@activepieces/pieces-framework';+import { shopifyAuth } from '../../..';+import {+ GqlConnection,+ GqlUrlRedirect,+ shopifyFields,+ shopifyGraphqlClient,+ shopifyMappers,+ shopifyProps,+ shopifyValues,+} from '../../common/graphql';+import { listUrlRedirectsOutputSchema } from '../../output-schemas/content';++const MAX_PAGE_SIZE = 250;++export const shopifyAiListUrlRedirects = createAction({+ auth: shopifyAuth,+ name: 'list_url_redirects',+ classification: 'SEARCH',+ displayName: 'List URL Redirects',+ description: 'List or search the online store\'s URL redirects.',+ audience: 'ai',+ aiMetadata: {+ description:+ 'Lists the online store\'s URL redirects, each with its old path and target. Filter with Shopify search syntax such as "path:/old-page" or "target:/collections/sale". Paged: pass end_cursor back as the cursor while has_next_page is true. Needs the read_online_store_navigation access scope. Read-only.',+ idempotent: true,+ },+ outputSchema: listUrlRedirectsOutputSchema,+ props: {+ query: shopifyProps.searchQuery(+ 'Shopify redirect search syntax, for example "path:/old-page" or "target:/pages/new". Leave empty to list all.'+ ),+ sort_key: Property.StaticDropdown({+ displayName: 'Sort By',+ description: 'Field to sort by. Defaults to the id.',+ required: false,+ options: {+ options: [+ { label: 'ID', value: 'ID' },+ { label: 'Path', value: 'PATH' },+ { label: 'Relevance (with a query)', value: 'RELEVANCE' },+ ],+ },+ }),+ reverse: shopifyProps.reverse(),+ first: shopifyProps.first({ max: MAX_PAGE_SIZE }),+ after: shopifyProps.after(),+ },+ async run({ auth, propsValue }) {+ const { data, redactedFields } = await shopifyGraphqlClient.request<{+ urlRedirects: GqlConnection<GqlUrlRedirect>;+ }>({+ auth,+ query: `query ListUrlRedirects($first: Int!, $after: String, $query: String, $sortKey: UrlRedirectSortKeys, $reverse: Boolean) { urlRedirects(first: $first, after: $after, query: $query, sortKey: $sortKey, reverse: $reverse) { nodes { ${shopifyFields.URL_REDIRECT_FIELDS} } ${shopifyFields.PAGE_INFO_FIELDS} } }`,+ variables: {+ first: shopifyValues.readFirst({ value: propsValue.first, max: MAX_PAGE_SIZE }),+ after: shopifyValues.nonEmpty(propsValue.after),+ query: shopifyValues.nonEmpty(propsValue.query),+ sortKey: propsValue.sort_key,+ reverse: propsValue.reverse ?? false,+ },+ });+ return shopifyMappers.toPage({+ connection: data.urlRedirects,+ map: shopifyMappers.mapUrlRedirect,+ redactedFields,+ });+ },+});diff --git a/packages/pieces/community/shopify/src/lib/actions/ai/mark-comment-not-spam.ts b/packages/pieces/community/shopify/src/lib/actions/ai/mark-comment-not-spam.tsnew file mode 100644index 00000000000..7bf98005cc6--- /dev/null+++ b/packages/pieces/community/shopify/src/lib/actions/ai/mark-comment-not-spam.ts@@ -0,0 +1,49 @@+import { createAction, Property } from '@activepieces/pieces-framework';+import { shopifyAuth } from '../../..';+import {+ GqlComment,+ shopifyFields,+ shopifyGraphqlClient,+ shopifyMappers,+} from '../../common/graphql';+import { commentOutputSchema } from '../../output-schemas/content';++export const shopifyAiMarkCommentNotSpam = createAction({+ auth: shopifyAuth,+ name: 'mark_comment_not_spam',+ classification: 'WRITE',+ displayName: 'Mark Blog Comment as Not Spam',+ description: 'Restore a blog comment that was marked as spam.',+ audience: 'ai',+ aiMetadata: {+ description:+ 'Marks one blog comment as not spam, undoing mark_comment_spam, and returns the comment with its new status (it may still need approve_comment to be published, depending on the blog\'s comment policy). Repeating leaves the same state, so it is safe. Author details may be null without protected customer data access. Needs the write_content access scope.',+ idempotent: true,+ },+ outputSchema: commentOutputSchema,+ props: {+ comment_id: Property.ShortText({+ displayName: 'Comment ID',+ description: 'The comment id, numeric or "gid://shopify/Comment/…". Find it with list_comments ("status:spam").',+ required: true,+ }),+ },+ async run({ auth, propsValue }) {+ const id = shopifyGraphqlClient.toGid({ type: 'Comment', id: propsValue.comment_id });+ const { data, redactedFields } = await shopifyGraphqlClient.request<{+ commentNotSpam: { comment: GqlComment | null } | null;+ }>({+ auth,+ query: `mutation MarkCommentNotSpam($id: ID!) { commentNotSpam(id: $id) { comment { ${shopifyFields.COMMENT_FIELDS} } userErrors { field message code } } }`,+ variables: { id },+ });+ const comment = data.commentNotSpam?.comment;+ if (!comment) {+ throw new Error('Shopify did not return the comment.');+ }+ return {+ ...shopifyMappers.mapComment(comment),+ redacted_fields: redactedFields,+ };+ },+});diff --git a/packages/pieces/community/shopify/src/lib/actions/ai/mark-comment-spam.ts b/packages/pieces/community/shopify/src/lib/actions/ai/mark-comment-spam.tsnew file mode 100644index 00000000000..20412e8388c--- /dev/null+++ b/packages/pieces/community/shopify/src/lib/actions/ai/mark-comment-spam.ts@@ -0,0 +1,49 @@+import { createAction, Property } from '@activepieces/pieces-framework';+import { shopifyAuth } from '../../..';+import {+ GqlComment,+ shopifyFields,+ shopifyGraphqlClient,+ shopifyMappers,+} from '../../common/graphql';+import { commentOutputSchema } from '../../output-schemas/content';++export const shopifyAiMarkCommentSpam = createAction({+ auth: shopifyAuth,+ name: 'mark_comment_spam',+ classification: 'WRITE',+ displayName: 'Mark Blog Comment as Spam',+ description: 'Mark a blog comment as spam so it is hidden.',+ audience: 'ai',+ aiMetadata: {+ description:+ 'Marks one blog comment as spam, which hides it from the article, and returns the comment with its new status. Reversible with mark_comment_not_spam. Marking a comment that is already spam leaves it as spam, so repeating is safe. Author details may be null without protected customer data access. Needs the write_content access scope.',+ idempotent: true,+ },+ outputSchema: commentOutputSchema,+ props: {+ comment_id: Property.ShortText({+ displayName: 'Comment ID',+ description: 'The comment id, numeric or "gid://shopify/Comment/…". Find it with list_comments.',+ required: true,+ }),+ },+ async run({ auth, propsValue }) {+ const id = shopifyGraphqlClient.toGid({ type: 'Comment', id: propsValue.comment_id });+ const { data, redactedFields } = await shopifyGraphqlClient.request<{+ commentSpam: { comment: GqlComment | null } | null;+ }>({+ auth,+ query: `mutation MarkCommentSpam($id: ID!) { commentSpam(id: $id) { comment { ${shopifyFields.COMMENT_FIELDS} } userErrors { field message code } } }`,+ variables: { id },+ });+ const comment = data.commentSpam?.comment;+ if (!comment) {+ throw new Error('Shopify did not return the comment.');+ }+ return {+ ...shopifyMappers.mapComment(comment),+ redacted_fields: redactedFields,+ };+ },+});diff --git a/packages/pieces/community/shopify/src/lib/actions/ai/pin-metafield-definition.ts b/packages/pieces/community/shopify/src/lib/actions/ai/pin-metafield-definition.tsnew file mode 100644index 00000000000..9cafebda5b2--- /dev/null+++ b/packages/pieces/community/shopify/src/lib/actions/ai/pin-metafield-definition.ts@@ -0,0 +1,92 @@+import { createAction, Property } from '@activepieces/pieces-framework';+import { shopifyAuth } from '../../..';+import {+ GqlMetafieldDefinition,+ shopifyFields,+ shopifyGraphqlClient,+ shopifyMappers,+ shopifyProps,+ shopifyValues,+} from '../../common/graphql';+import { pinMetafieldDefinitionOutputSchema } from '../../output-schemas/content';++const ALREADY_PINNED = 'ALREADY_PINNED';++export const shopifyAiPinMetafieldDefinition = createAction({+ auth: shopifyAuth,+ name: 'pin_metafield_definition',+ classification: 'WRITE',+ displayName: 'Pin Metafield Definition',+ description: 'Pin a metafield definition so its field shows on the resource page in the Shopify admin.',+ audience: 'ai',+ aiMetadata: {+ description:+ 'Pins one metafield definition, identified by owner type, namespace and key, so its field appears on that resource\'s page in the Shopify admin (for example on every product page); returns the definition with its pinned_position. If the definition is already pinned, Shopify refuses the pin with ALREADY_PINNED; this action then reads the definition and returns it unchanged with already_pinned true, so repeating the call is safe and ends in the same state. Shopify limits how many definitions can be pinned per owner type and refuses beyond that (PINNED_LIMIT_REACHED). Needs the write access scope of the owner type (for example write_products).',+ idempotent: true,+ },+ outputSchema: pinMetafieldDefinitionOutputSchema,+ props: {+ owner_type: shopifyProps.metafieldOwnerType({+ required: true,+ description: 'The resource type of the definition, for example PRODUCT.',+ }),+ namespace: Property.ShortText({+ displayName: 'Namespace',+ description: 'The definition namespace, for example "custom".',+ required: true,+ }),+ key: Property.ShortText({+ displayName: 'Key',+ description: 'The definition key, for example "care_instructions".',+ required: true,+ }),+ },+ async run({ auth, propsValue }) {+ const namespace = shopifyValues.nonEmpty(propsValue.namespace);+ const key = shopifyValues.nonEmpty(propsValue.key);+ if (!propsValue.owner_type || !namespace || !key) {+ throw new Error('owner_type, namespace and key are all required. Nothing was changed.');+ }+ const identifier = { ownerType: propsValue.owner_type, namespace, key };+ const { data, redactedFields } = await shopifyGraphqlClient.request<{+ metafieldDefinitionPin: {+ pinnedDefinition?: GqlMetafieldDefinition | null;+ userErrors?: { code?: string | null }[] | null;+ } | null;+ }>({+ auth,+ query: `mutation PinMetafieldDefinition($identifier: MetafieldDefinitionIdentifierInput!) { metafieldDefinitionPin(identifier: $identifier) { pinnedDefinition { ${shopifyFields.METAFIELD_DEFINITION_FIELDS} } userErrors { field message code } } }`,+ variables: { identifier },+ toleratedUserErrorCodes: [ALREADY_PINNED],+ });+ const payload = data.metafieldDefinitionPin;+ if (payload?.pinnedDefinition) {+ return {+ ...shopifyMappers.mapMetafieldDefinition(payload.pinnedDefinition),+ already_pinned: false,+ redacted_fields: redactedFields,+ };+ }+ const alreadyPinned = (payload?.userErrors ?? []).some((error) => error.code === ALREADY_PINNED);+ if (!alreadyPinned) {+ throw new Error('Shopify did not return the pinned metafield definition.');+ }+ const current = await shopifyGraphqlClient.request<{+ metafieldDefinition: GqlMetafieldDefinition | null;+ }>({+ auth,+ query: `query GetMetafieldDefinition($identifier: MetafieldDefinitionIdentifierInput!) { metafieldDefinition(identifier: $identifier) { ${shopifyFields.METAFIELD_DEFINITION_FIELDS} } }`,+ variables: { identifier },+ });+ if (!current.data.metafieldDefinition) {+ throw new Error(+ `Shopify reported ${identifier.ownerType} metafield definition ${namespace}.${key} as already pinned, but it could not be read back. Use list_metafield_definitions to check it.`+ );+ }+ return {+ ...shopifyMappers.mapMetafieldDefinition(current.data.metafieldDefinition),+ already_pinned: true,+ redacted_fields: [...redactedFields, ...current.redactedFields],+ };+ },+});diff --git a/packages/pieces/community/shopify/src/lib/actions/ai/publish-theme.ts b/packages/pieces/community/shopify/src/lib/actions/ai/publish-theme.tsnew file mode 100644index 00000000000..789f9e859c2--- /dev/null+++ b/packages/pieces/community/shopify/src/lib/actions/ai/publish-theme.ts@@ -0,0 +1,49 @@+import { createAction, Property } from '@activepieces/pieces-framework';+import { shopifyAuth } from '../../..';+import {+ GqlTheme,+ shopifyFields,+ shopifyGraphqlClient,+ shopifyMappers,+} from '../../common/graphql';+import { themeOutputSchema } from '../../output-schemas/content';++export const shopifyAiPublishTheme = createAction({+ auth: shopifyAuth,+ name: 'publish_theme',+ classification: 'WRITE',+ displayName: 'Publish Theme',+ description: 'Make a theme the live theme of the online store.',+ audience: 'ai',+ aiMetadata: {+ description:+ 'Publishes one theme as the live theme (role MAIN): it replaces the storefront every shopper sees immediately, and the theme that was live stops being live. Before calling, run list_themes with role MAIN and note the current live theme\'s id and name, because publishing that theme again is the only way back; then tell the user which theme goes live and which one it replaces, and only continue once they agree. The theme should have finished processing (processing false, see get_theme). Returns the published theme with its role. Publishing the theme that is already live should leave the same state, which is still to be confirmed on a store. Shopify documents that modifying themes needs the write_themes access scope AND an exemption granted by Shopify; without the exemption the call is refused with an access error, so report that instead of retrying.',+ idempotent: true,+ },+ outputSchema: themeOutputSchema,+ props: {+ theme_id: Property.ShortText({+ displayName: 'Theme ID',+ description: 'The theme to make live, numeric or "gid://shopify/OnlineStoreTheme/…". Find it with list_themes.',+ required: true,+ }),+ },+ async run({ auth, propsValue }) {+ const id = shopifyGraphqlClient.toGid({ type: 'OnlineStoreTheme', id: propsValue.theme_id });+ const { data, redactedFields } = await shopifyGraphqlClient.request<{+ themePublish: { theme: GqlTheme | null } | null;+ }>({+ auth,+ query: `mutation PublishTheme($id: ID!) { themePublish(id: $id) { theme { ${shopifyFields.THEME_FIELDS} } userErrors { field message code } } }`,+ variables: { id },+ });+ const theme = data.themePublish?.theme;+ if (!theme) {+ throw new Error('Shopify did not return the published theme.');+ }+ return {+ ...shopifyMappers.mapTheme(theme),+ redacted_fields: redactedFields,+ };+ },+});diff --git a/packages/pieces/community/shopify/src/lib/actions/ai/remove-tags.ts b/packages/pieces/community/shopify/src/lib/actions/ai/remove-tags.tsindex ad38d7c39bc..5f42ddca049 100644--- a/packages/pieces/community/shopify/src/lib/actions/ai/remove-tags.ts+++ b/packages/pieces/community/shopify/src/lib/actions/ai/remove-tags.ts@@ -8,11 +8,11 @@ export const shopifyAiRemoveTags = createAction({name: 'remove_tags',classification: 'WRITE',displayName: 'Remove Tags',- description: 'Remove tags from an order, draft order, customer or product.',+ description: 'Remove tags from an order, draft order, customer, product or blog article.',audience: 'ai',aiMetadata: {description:- 'Removes one or more tags from an order, draft order, customer or product and keeps the others; prefer this over sending a full tag list to an update action. Removing a tag that is not present changes nothing, so repeating is safe. Returns the resulting tag list.',+ 'Removes one or more tags from an order, draft order, customer, product or blog article and keeps the others; prefer this over sending a full tag list to an update action. Removing a tag that is not present changes nothing, so repeating is safe. Returns the resulting tag list. Blog articles need the write_content access scope.',idempotent: true,},outputSchema: removeTagsOutputSchema,@@ -27,6 +27,7 @@ export const shopifyAiRemoveTags = createAction({{ label: 'Draft order', value: 'DraftOrder' },{ label: 'Customer', value: 'Customer' },{ label: 'Product', value: 'Product' },+ { label: 'Blog article', value: 'Article' },],},}),@@ -64,7 +65,7 @@ export const shopifyAiRemoveTags = createAction({});const TAGGED_NODE_FRAGMENTS =- '... on Order { tags } ... on DraftOrder { tags } ... on Customer { tags } ... on Product { tags }';+ '... on Order { tags } ... on DraftOrder { tags } ... on Customer { tags } ... on Product { tags } ... on Article { tags }';type TaggedNode = {id: string;diff --git a/packages/pieces/community/shopify/src/lib/actions/ai/set-metafields.ts b/packages/pieces/community/shopify/src/lib/actions/ai/set-metafields.tsnew file mode 100644index 00000000000..6d906182284--- /dev/null+++ b/packages/pieces/community/shopify/src/lib/actions/ai/set-metafields.ts@@ -0,0 +1,113 @@+import { createAction, Property } from '@activepieces/pieces-framework';+import { shopifyAuth } from '../../..';+import {+ GqlMetafield,+ shopifyFields,+ shopifyGraphqlClient,+ shopifyMappers,+ shopifyValues,+} from '../../common/graphql';+import { setMetafieldsOutputSchema } from '../../output-schemas/content';++export const shopifyAiSetMetafields = createAction({+ auth: shopifyAuth,+ name: 'set_metafields',+ classification: 'WRITE',+ displayName: 'Set Metafields',+ description: 'Create or update up to 25 metafields on products, customers, orders and other resources.',+ audience: 'ai',+ aiMetadata: {+ description:+ 'Sets up to 25 metafield values in one all-or-nothing call: a metafield that does not exist is created and an existing one (same owner, namespace and key) gets the new value. Each entry needs the owner\'s full id (for example "gid://shopify/Product/123"; ids from this piece\'s get/list actions are already in this form), a namespace, a key and the value as a string (lists and references as a JSON string, for example "[\\"a\\",\\"b\\"]"). type (for example "single_line_text_field", "number_integer", "json", "list.single_line_text_field") is required for a new metafield without a definition. Optional compare_digest (from list_metafields or get_metafield) makes that entry fail if the value changed since you read it. A retry that reuses the same compare_digest after an earlier call went through fails as stale, even though the stored value is yours: re-read with get_metafield or list_metafields first and send the new compare_digest. Setting the same values again leaves the same state. Needs the write access scope of each owner type (for example write_products for products).',+ idempotent: true,+ },+ outputSchema: setMetafieldsOutputSchema,+ props: {+ metafields: Property.Array({+ displayName: 'Metafields',+ description: 'One entry per metafield to set, 1 to 25.',+ required: true,+ properties: {+ owner_id: Property.ShortText({+ displayName: 'Owner ID',+ description: 'Full id of the resource that owns the metafield, for example "gid://shopify/Product/123" or "gid://shopify/Customer/456".',+ required: true,+ }),+ namespace: Property.ShortText({+ displayName: 'Namespace',+ description: 'Metafield namespace, for example "custom".',+ required: true,+ }),+ key: Property.ShortText({+ displayName: 'Key',+ description: 'Metafield key, for example "care_instructions".',+ required: true,+ }),+ value: Property.LongText({+ displayName: 'Value',+ description: 'The value as a string, for example "Hand wash only", "42" or "[\\"red\\",\\"blue\\"]" for a list.',+ required: true,+ }),+ type: Property.ShortText({+ displayName: 'Type',+ description: 'Metafield type, for example "single_line_text_field". Required for a new metafield that has no definition; see list_metafield_definition_types.',+ required: false,+ }),+ compare_digest: Property.ShortText({+ displayName: 'Compare Digest',+ description: 'Optional compare_digest from a previous read; the write fails if the stored value changed since.',+ required: false,+ }),+ },+ }),+ },+ async run({ auth, propsValue }) {+ const metafields = buildMetafields(propsValue.metafields);+ const { data, redactedFields } = await shopifyGraphqlClient.request<{+ metafieldsSet: { metafields?: GqlMetafield[] | null } | null;+ }>({+ auth,+ query: `mutation SetMetafields($metafields: [MetafieldsSetInput!]!) { metafieldsSet(metafields: $metafields) { metafields { ${shopifyFields.METAFIELD_FIELDS} } userErrors { field message code elementIndex } } }`,+ variables: { metafields },+ });+ const items = (data.metafieldsSet?.metafields ?? []).map(shopifyMappers.mapMetafield);+ return {+ metafields: items,+ count: items.length,+ redacted_fields: redactedFields,+ };+ },+});++function buildMetafields(value: unknown): Record<string, unknown>[] {+ const rows = shopifyValues.readRecords(value);+ if (rows.length === 0) {+ throw new Error('Provide at least one metafield. Nothing was changed.');+ }+ if (rows.length > shopifyFields.MAX_METAFIELDS_PER_CALL) {+ throw new Error(+ `At most ${shopifyFields.MAX_METAFIELDS_PER_CALL} metafields per call; split them over several calls. Nothing was changed.`+ );+ }+ return rows.map((row, index) => {+ const namespace = shopifyValues.readText(row['namespace']);+ const key = shopifyValues.readText(row['key']);+ const content = row['value'];+ if (!namespace || !key || content === undefined || content === null) {+ throw new Error(`metafields[${index}] needs a namespace, a key and a value. Nothing was changed.`);+ }+ return shopifyValues.compact({+ ownerId: shopifyValues.requireGid({+ value: shopifyValues.readText(row['owner_id']),+ label: `metafields[${index}].owner_id`,+ example: 'gid://shopify/Product/123',+ hint: 'the owner type cannot be guessed from a bare number.',+ }),+ namespace,+ key,+ value: typeof content === 'string' ? content : JSON.stringify(content),+ type: shopifyValues.readText(row['type']),+ compareDigest: shopifyValues.readText(row['compare_digest']),+ });+ });+}diff --git a/packages/pieces/community/shopify/src/lib/actions/ai/update-article.ts b/packages/pieces/community/shopify/src/lib/actions/ai/update-article.tsnew file mode 100644index 00000000000..72cfb175e97--- /dev/null+++ b/packages/pieces/community/shopify/src/lib/actions/ai/update-article.ts@@ -0,0 +1,154 @@+import { createAction, Property } from '@activepieces/pieces-framework';+import { shopifyAuth } from '../../..';+import {+ GqlArticle,+ shopifyFields,+ shopifyGraphqlClient,+ shopifyMappers,+ shopifyProps,+ shopifyValues,+} from '../../common/graphql';+import { articleOutputSchema } from '../../output-schemas/content';++export const shopifyAiUpdateArticle = createAction({+ auth: shopifyAuth,+ name: 'update_article',+ classification: 'WRITE',+ displayName: 'Update Blog Article',+ description: 'Change an article\'s title, body, author, tags, image, publish state or blog.',+ audience: 'ai',+ aiMetadata: {+ description:+ 'Updates one blog article and returns it. Only the fields you supply are sent; at least one is required. Sending tags replaces all of the article\'s tags, so send the complete list, or use add_tags / remove_tags for single tags. is_published Yes makes the article visible on the storefront and No hides it. blog_id moves the article to another blog. Repeating the same update leaves the same state. Needs the write_content access scope. To empty the body or remove every tag, set clear_body or clear_tags instead of sending an empty value.',+ idempotent: true,+ },+ outputSchema: articleOutputSchema,+ props: {+ article_id: Property.ShortText({+ displayName: 'Article ID',+ description: 'The article id, numeric or "gid://shopify/Article/…". Find it with list_articles.',+ required: true,+ }),+ title: Property.ShortText({+ displayName: 'Title',+ description: 'New title.',+ required: false,+ }),+ body_html: Property.LongText({+ displayName: 'Body (HTML)',+ description: 'New article content, HTML allowed. Replaces the whole body.',+ required: false,+ }),+ summary_html: Property.LongText({+ displayName: 'Summary (HTML)',+ description: 'New excerpt, HTML allowed.',+ required: false,+ }),+ author_name: Property.ShortText({+ displayName: 'Author Name',+ description: 'New author name.',+ required: false,+ }),+ tags: Property.Array({+ displayName: 'Tags',+ description: 'The complete new tag list. Replaces every existing tag; leave empty to keep the current tags (use clear_tags to remove all).',+ required: false,+ }),+ is_published: shopifyProps.booleanChoice({+ displayName: 'Published',+ description: 'Yes publishes the article, No hides it. Leave empty to keep the current state.',+ }),+ publish_date: Property.DateTime({+ displayName: 'Publish Date',+ description: 'New publication date and time, ISO 8601.',+ required: false,+ }),+ handle: Property.ShortText({+ displayName: 'Handle',+ description: 'New URL handle, for example "summer-collection-2026".',+ required: false,+ }),+ redirect_new_handle: shopifyProps.booleanChoice({+ displayName: 'Redirect Old Handle',+ description: 'When changing the handle, create a redirect from the old URL. Leave empty for the Shopify default.',+ }),+ blog_id: Property.ShortText({+ displayName: 'Move to Blog ID',+ description: 'Move the article to this blog, numeric or "gid://shopify/Blog/…".',+ required: false,+ }),+ image_url: Property.ShortText({+ displayName: 'Image URL',+ description: 'Public URL of a new featured image.',+ required: false,+ }),+ image_alt_text: Property.ShortText({+ displayName: 'Image Alt Text',+ description: 'Alternative text for the featured image. Needs image_url.',+ required: false,+ }),+ template_suffix: Property.ShortText({+ displayName: 'Template Suffix',+ description: 'New theme template suffix.',+ required: false,+ }),+ clear_body: Property.Checkbox({+ displayName: 'Clear Body',+ description: 'Remove the existing content. Leave body_html empty when using this.',+ required: false,+ defaultValue: false,+ }),+ clear_tags: Property.Checkbox({+ displayName: 'Clear Tags',+ description: 'Remove every tag. Leave tags empty when using this.',+ required: false,+ defaultValue: false,+ }),+ },+ async run({ auth, propsValue }) {+ const imageUrl = shopifyValues.nonEmpty(propsValue.image_url);+ const imageAltText = shopifyValues.nonEmpty(propsValue.image_alt_text);+ if (imageAltText && !imageUrl) {+ throw new Error('image_alt_text needs image_url. Nothing was changed.');+ }+ const authorName = shopifyValues.nonEmpty(propsValue.author_name);+ const blogId = shopifyValues.nonEmpty(propsValue.blog_id);+ const tags = shopifyValues.readStringList(propsValue.tags);+ const changes = shopifyValues.compact({+ title: shopifyValues.nonEmpty(propsValue.title),+ body: shopifyValues.readClearable({ value: shopifyValues.nonEmpty(propsValue.body_html), clear: propsValue.clear_body, name: 'body_html', empty: '' }),+ summary: shopifyValues.nonEmpty(propsValue.summary_html),+ author: authorName ? { name: authorName } : undefined,+ tags: shopifyValues.readClearable({ value: tags && tags.length > 0 ? tags : undefined, clear: propsValue.clear_tags, name: 'tags', empty: [] }),+ isPublished: shopifyValues.toBooleanChoice(propsValue.is_published),+ publishDate: shopifyValues.nonEmpty(propsValue.publish_date),+ handle: shopifyValues.nonEmpty(propsValue.handle),+ blogId: blogId ? shopifyGraphqlClient.toGid({ type: 'Blog', id: blogId }) : undefined,+ image: imageUrl ? shopifyValues.compact({ url: imageUrl, altText: imageAltText }) : undefined,+ templateSuffix: shopifyValues.nonEmpty(propsValue.template_suffix),+ });+ if (Object.keys(changes).length === 0) {+ throw new Error('Nothing to update: provide at least one field to change. Nothing was changed.');+ }+ const article = shopifyValues.compact({+ ...changes,+ redirectNewHandle: shopifyValues.toBooleanChoice(propsValue.redirect_new_handle),+ });+ const id = shopifyGraphqlClient.toGid({ type: 'Article', id: propsValue.article_id });+ const { data, redactedFields } = await shopifyGraphqlClient.request<{+ articleUpdate: { article: GqlArticle | null } | null;+ }>({+ auth,+ query: `mutation UpdateArticle($id: ID!, $article: ArticleUpdateInput!) { articleUpdate(id: $id, article: $article) { article { ${shopifyFields.ARTICLE_FIELDS} } userErrors { field message code } } }`,+ variables: { id, article },+ });+ const updated = data.articleUpdate?.article;+ if (!updated) {+ throw new Error('Shopify did not return the updated article.');+ }+ return {+ ...shopifyMappers.mapArticle(updated),+ redacted_fields: redactedFields,+ };+ },+});diff --git a/packages/pieces/community/shopify/src/lib/actions/ai/update-blog.ts b/packages/pieces/community/shopify/src/lib/actions/ai/update-blog.tsnew file mode 100644index 00000000000..60f199427b5--- /dev/null+++ b/packages/pieces/community/shopify/src/lib/actions/ai/update-blog.ts@@ -0,0 +1,100 @@+import { createAction, Property } from '@activepieces/pieces-framework';+import { shopifyAuth } from '../../..';+import {+ GqlBlog,+ shopifyFields,+ shopifyGraphqlClient,+ shopifyMappers,+ shopifyProps,+ shopifyValues,+} from '../../common/graphql';+import { blogOutputSchema } from '../../output-schemas/content';++export const shopifyAiUpdateBlog = createAction({+ auth: shopifyAuth,+ name: 'update_blog',+ classification: 'WRITE',+ displayName: 'Update Blog',+ description: 'Change a blog\'s title, handle, comment policy or template.',+ audience: 'ai',+ aiMetadata: {+ description:+ 'Updates one blog and returns it. Only the fields you supply are sent; at least one is required. Changing the handle changes the blog URL; redirect_new_handle and redirect_articles decide whether redirects are created from the old blog and article URLs (leave empty for the Shopify default). Articles are not touched. Repeating the same update leaves the same state. Needs the write_content access scope.',+ idempotent: true,+ },+ outputSchema: blogOutputSchema,+ props: {+ blog_id: Property.ShortText({+ displayName: 'Blog ID',+ description: 'The blog id, numeric or "gid://shopify/Blog/…". Find it with list_blogs.',+ required: true,+ }),+ title: Property.ShortText({+ displayName: 'Title',+ description: 'New blog title.',+ required: false,+ }),+ handle: Property.ShortText({+ displayName: 'Handle',+ description: 'New URL handle, for example "company-news".',+ required: false,+ }),+ redirect_new_handle: shopifyProps.booleanChoice({+ displayName: 'Redirect Old Blog URL',+ description: 'When changing the handle, create a redirect from the old blog URL. Leave empty for the Shopify default.',+ }),+ redirect_articles: shopifyProps.booleanChoice({+ displayName: 'Redirect Old Article URLs',+ description: 'When changing the handle, also redirect the old URLs of the blog\'s articles. Leave empty for the Shopify default.',+ }),+ comment_policy: Property.StaticDropdown({+ displayName: 'Comment Policy',+ description: 'New comment policy. Leave empty to keep the current one.',+ required: false,+ options: {+ options: [+ { label: 'Comments closed', value: 'CLOSED' },+ { label: 'Comments held for moderation', value: 'MODERATED' },+ { label: 'Comments published automatically', value: 'AUTO_PUBLISHED' },+ ],+ },+ }),+ template_suffix: Property.ShortText({+ displayName: 'Template Suffix',+ description: 'New theme template suffix, for example "wide". Leave empty to keep the current one.',+ required: false,+ }),+ },+ async run({ auth, propsValue }) {+ const changes = shopifyValues.compact({+ title: shopifyValues.nonEmpty(propsValue.title),+ handle: shopifyValues.nonEmpty(propsValue.handle),+ commentPolicy: propsValue.comment_policy,+ templateSuffix: shopifyValues.nonEmpty(propsValue.template_suffix),+ });+ if (Object.keys(changes).length === 0) {+ throw new Error('Nothing to update: provide at least one field to change. Nothing was changed.');+ }+ const blog = shopifyValues.compact({+ ...changes,+ redirectNewHandle: shopifyValues.toBooleanChoice(propsValue.redirect_new_handle),+ redirectArticles: shopifyValues.toBooleanChoice(propsValue.redirect_articles),+ });+ const id = shopifyGraphqlClient.toGid({ type: 'Blog', id: propsValue.blog_id });+ const { data, redactedFields } = await shopifyGraphqlClient.request<{+ blogUpdate: { blog: GqlBlog | null } | null;+ }>({+ auth,+ query: `mutation UpdateBlog($id: ID!, $blog: BlogUpdateInput!) { blogUpdate(id: $id, blog: $blog) { blog { ${shopifyFields.BLOG_FIELDS} } userErrors { field message code } } }`,+ variables: { id, blog },+ });+ const updated = data.blogUpdate?.blog;+ if (!updated) {+ throw new Error('Shopify did not return the updated blog.');+ }+ return {+ ...shopifyMappers.mapBlog(updated),+ redacted_fields: redactedFields,+ };+ },+});diff --git a/packages/pieces/community/shopify/src/lib/actions/ai/update-metafield-definition.ts b/packages/pieces/community/shopify/src/lib/actions/ai/update-metafield-definition.tsnew file mode 100644index 00000000000..8933c5ddff5--- /dev/null+++ b/packages/pieces/community/shopify/src/lib/actions/ai/update-metafield-definition.ts@@ -0,0 +1,130 @@+import { createAction, Property } from '@activepieces/pieces-framework';+import { shopifyAuth } from '../../..';+import {+ GqlJob,+ GqlMetafieldDefinition,+ shopifyFields,+ shopifyGraphqlClient,+ shopifyMappers,+ shopifyProps,+ shopifyValues,+} from '../../common/graphql';+import { updateMetafieldDefinitionOutputSchema } from '../../output-schemas/content';++export const shopifyAiUpdateMetafieldDefinition = createAction({+ auth: shopifyAuth,+ name: 'update_metafield_definition',+ classification: 'WRITE',+ displayName: 'Update Metafield Definition',+ description: 'Change a metafield definition\'s name, description or validation rules.',+ audience: 'ai',+ aiMetadata: {+ description:+ 'Updates one metafield definition, identified by owner type, namespace and key (these and the type cannot be changed). Only the fields you supply are sent; at least one is required. Sending validations REPLACES the whole validation list, so read the current list with get_metafield_definition and send every rule you want to keep; remove_all_validations Yes clears them. Changing validations makes Shopify re-check existing values in the background (validation_job_id, poll with get_job) and values that break the new rules become invalid. Repeating the same update leaves the same state. Needs the write access scope of the owner type (for example write_products).',+ idempotent: true,+ },+ outputSchema: updateMetafieldDefinitionOutputSchema,+ props: {+ owner_type: shopifyProps.metafieldOwnerType({+ required: true,+ description: 'The resource type of the definition, for example PRODUCT.',+ }),+ namespace: Property.ShortText({+ displayName: 'Namespace',+ description: 'The definition namespace, for example "custom".',+ required: true,+ }),+ key: Property.ShortText({+ displayName: 'Key',+ description: 'The definition key, for example "care_instructions".',+ required: true,+ }),+ name: Property.ShortText({+ displayName: 'Name',+ description: 'New display name, for example "Care instructions".',+ required: false,+ }),+ description: Property.LongText({+ displayName: 'Description',+ description: 'New description shown to staff.',+ required: false,+ }),+ validations: Property.Array({+ displayName: 'Validations',+ description:+ 'The complete new list of validation rules; replaces every existing rule. Leave empty to keep the current rules.',+ required: false,+ properties: {+ name: Property.ShortText({+ displayName: 'Rule Name',+ description: 'Validation name supported by the type, for example "min", "max", "regex" or "choices".',+ required: true,+ }),+ value: Property.ShortText({+ displayName: 'Rule Value',+ description: 'Rule value as a string, for example "1", "100" or "[\\"S\\",\\"M\\",\\"L\\"]" for choices.',+ required: true,+ }),+ },+ }),+ remove_all_validations: shopifyProps.booleanChoice({+ displayName: 'Remove All Validations',+ description: 'Yes removes every validation rule. Cannot be combined with validations.',+ }),+ },+ async run({ auth, propsValue }) {+ const namespace = shopifyValues.nonEmpty(propsValue.namespace);+ const key = shopifyValues.nonEmpty(propsValue.key);+ if (!propsValue.owner_type || !namespace || !key) {+ throw new Error('owner_type, namespace and key are all required. Nothing was changed.');+ }+ const validations = readValidations(propsValue.validations);+ const clearValidations = shopifyValues.toBooleanChoice(propsValue.remove_all_validations) === true;+ if (clearValidations && validations) {+ throw new Error('Send either validations or remove_all_validations, not both. Nothing was changed.');+ }+ const changes = shopifyValues.compact({+ name: shopifyValues.nonEmpty(propsValue.name),+ description: shopifyValues.nonEmpty(propsValue.description),+ validations: clearValidations ? [] : validations,+ });+ if (Object.keys(changes).length === 0) {+ throw new Error('Nothing to update: provide a name, description or validations. Nothing was changed.');+ }+ const { data, redactedFields } = await shopifyGraphqlClient.request<{+ metafieldDefinitionUpdate: {+ updatedDefinition?: GqlMetafieldDefinition | null;+ validationJob?: GqlJob | null;+ } | null;+ }>({+ auth,+ query: `mutation UpdateMetafieldDefinition($definition: MetafieldDefinitionUpdateInput!) { metafieldDefinitionUpdate(definition: $definition) { updatedDefinition { ${shopifyFields.METAFIELD_DEFINITION_FIELDS} } validationJob { id done } userErrors { field message code } } }`,+ variables: { definition: { ownerType: propsValue.owner_type, namespace, key, ...changes } },+ });+ const updated = data.metafieldDefinitionUpdate?.updatedDefinition;+ if (!updated) {+ throw new Error('Shopify did not return the updated metafield definition.');+ }+ return {+ ...shopifyMappers.mapMetafieldDefinition(updated),+ validation_job_id: data.metafieldDefinitionUpdate?.validationJob?.id ?? null,+ validation_job_done: data.metafieldDefinitionUpdate?.validationJob?.done ?? null,+ redacted_fields: redactedFields,+ };+ },+});++function readValidations(value: unknown): { name: string; value: string }[] | undefined {+ const rows = shopifyValues.readRecords(value);+ if (rows.length === 0) {+ return undefined;+ }+ return rows.map((row, index) => {+ const name = shopifyValues.readText(row['name']);+ const ruleValue = shopifyValues.readText(row['value']);+ if (!name || ruleValue === undefined) {+ throw new Error(`validations[${index}] needs a name and a value. Nothing was changed.`);+ }+ return { name, value: ruleValue };+ });+}diff --git a/packages/pieces/community/shopify/src/lib/actions/ai/update-page.ts b/packages/pieces/community/shopify/src/lib/actions/ai/update-page.tsnew file mode 100644index 00000000000..2afe1d833c2--- /dev/null+++ b/packages/pieces/community/shopify/src/lib/actions/ai/update-page.ts@@ -0,0 +1,105 @@+import { createAction, Property } from '@activepieces/pieces-framework';+import { shopifyAuth } from '../../..';+import {+ GqlPage,+ shopifyFields,+ shopifyGraphqlClient,+ shopifyMappers,+ shopifyProps,+ shopifyValues,+} from '../../common/graphql';+import { pageOutputSchema } from '../../output-schemas/content';++export const shopifyAiUpdatePage = createAction({+ auth: shopifyAuth,+ name: 'update_page',+ classification: 'WRITE',+ displayName: 'Update Online Store Page',+ description: 'Change a content page\'s title, body, handle, template or publish state.',+ audience: 'ai',+ aiMetadata: {+ description:+ 'Updates one online store content page and returns it. Only the fields you supply are sent; at least one is required. A new body replaces the whole body. is_published Yes makes the page visible on the storefront and No hides it. Repeating the same update leaves the same state. Needs the write_content access scope. To empty the page content, set clear_body instead of sending an empty body_html.',+ idempotent: true,+ },+ outputSchema: pageOutputSchema,+ props: {+ page_id: Property.ShortText({+ displayName: 'Page ID',+ description: 'The page id, numeric or "gid://shopify/Page/…". Find it with list_pages.',+ required: true,+ }),+ title: Property.ShortText({+ displayName: 'Title',+ description: 'New title.',+ required: false,+ }),+ body_html: Property.LongText({+ displayName: 'Body (HTML)',+ description: 'New page content, HTML allowed. Replaces the whole body.',+ required: false,+ }),+ handle: Property.ShortText({+ displayName: 'Handle',+ description: 'New URL handle, for example "shipping-faq".',+ required: false,+ }),+ redirect_new_handle: shopifyProps.booleanChoice({+ displayName: 'Redirect Old Handle',+ description: 'When changing the handle, create a redirect from the old URL. Leave empty for the Shopify default.',+ }),+ is_published: shopifyProps.booleanChoice({+ displayName: 'Published',+ description: 'Yes publishes the page, No hides it. Leave empty to keep the current state.',+ }),+ publish_date: Property.DateTime({+ displayName: 'Publish Date',+ description: 'New publication date and time, ISO 8601.',+ required: false,+ }),+ template_suffix: Property.ShortText({+ displayName: 'Template Suffix',+ description: 'New theme template suffix.',+ required: false,+ }),+ clear_body: Property.Checkbox({+ displayName: 'Clear Body',+ description: 'Remove the existing content. Leave body_html empty when using this.',+ required: false,+ defaultValue: false,+ }),+ },+ async run({ auth, propsValue }) {+ const changes = shopifyValues.compact({+ title: shopifyValues.nonEmpty(propsValue.title),+ body: shopifyValues.readClearable({ value: shopifyValues.nonEmpty(propsValue.body_html), clear: propsValue.clear_body, name: 'body_html', empty: '' }),+ handle: shopifyValues.nonEmpty(propsValue.handle),+ isPublished: shopifyValues.toBooleanChoice(propsValue.is_published),+ publishDate: shopifyValues.nonEmpty(propsValue.publish_date),+ templateSuffix: shopifyValues.nonEmpty(propsValue.template_suffix),+ });+ if (Object.keys(changes).length === 0) {+ throw new Error('Nothing to update: provide at least one field to change. Nothing was changed.');+ }+ const page = shopifyValues.compact({+ ...changes,+ redirectNewHandle: shopifyValues.toBooleanChoice(propsValue.redirect_new_handle),+ });+ const id = shopifyGraphqlClient.toGid({ type: 'Page', id: propsValue.page_id });+ const { data, redactedFields } = await shopifyGraphqlClient.request<{+ pageUpdate: { page: GqlPage | null } | null;+ }>({+ auth,+ query: `mutation UpdatePage($id: ID!, $page: PageUpdateInput!) { pageUpdate(id: $id, page: $page) { page { ${shopifyFields.PAGE_FIELDS} } userErrors { field message code } } }`,+ variables: { id, page },+ });+ const updated = data.pageUpdate?.page;+ if (!updated) {+ throw new Error('Shopify did not return the updated page.');+ }+ return {+ ...shopifyMappers.mapPage(updated),+ redacted_fields: redactedFields,+ };+ },+});diff --git a/packages/pieces/community/shopify/src/lib/actions/ai/update-theme.ts b/packages/pieces/community/shopify/src/lib/actions/ai/update-theme.tsnew file mode 100644index 00000000000..e2c4cbf80e6--- /dev/null+++ b/packages/pieces/community/shopify/src/lib/actions/ai/update-theme.ts@@ -0,0 +1,59 @@+import { createAction, Property } from '@activepieces/pieces-framework';+import { shopifyAuth } from '../../..';+import {+ GqlTheme,+ shopifyFields,+ shopifyGraphqlClient,+ shopifyMappers,+ shopifyValues,+} from '../../common/graphql';+import { themeOutputSchema } from '../../output-schemas/content';++export const shopifyAiUpdateTheme = createAction({+ auth: shopifyAuth,+ name: 'update_theme',+ classification: 'WRITE',+ displayName: 'Rename Theme',+ description: 'Rename a theme.',+ audience: 'ai',+ aiMetadata: {+ description:+ 'Renames one theme and returns it; the name is the only theme setting this action changes; to make a theme the live theme use publish_theme instead. Renaming to the same name again leaves the same state. Shopify documents that modifying themes needs the write_themes access scope AND an exemption granted by Shopify; without the exemption the call is refused with an access error, so report that instead of retrying.',+ idempotent: true,+ },+ outputSchema: themeOutputSchema,+ props: {+ theme_id: Property.ShortText({+ displayName: 'Theme ID',+ description: 'The theme id, numeric or "gid://shopify/OnlineStoreTheme/…". Find it with list_themes.',+ required: true,+ }),+ name: Property.ShortText({+ displayName: 'New Name',+ description: 'The new theme name, for example "Dawn - holiday edit".',+ required: true,+ }),+ },+ async run({ auth, propsValue }) {+ const name = shopifyValues.nonEmpty(propsValue.name);+ if (!name) {+ throw new Error('A new theme name is required. Nothing was changed.');+ }+ const id = shopifyGraphqlClient.toGid({ type: 'OnlineStoreTheme', id: propsValue.theme_id });+ const { data, redactedFields } = await shopifyGraphqlClient.request<{+ themeUpdate: { theme: GqlTheme | null } | null;+ }>({+ auth,+ query: `mutation UpdateTheme($id: ID!, $input: OnlineStoreThemeInput!) { themeUpdate(id: $id, input: $input) { theme { ${shopifyFields.THEME_FIELDS} } userErrors { field message code } } }`,+ variables: { id, input: { name } },+ });+ const theme = data.themeUpdate?.theme;+ if (!theme) {+ throw new Error('Shopify did not return the updated theme.');+ }+ return {+ ...shopifyMappers.mapTheme(theme),+ redacted_fields: redactedFields,+ };+ },+});diff --git a/packages/pieces/community/shopify/src/lib/actions/ai/update-url-redirect.ts b/packages/pieces/community/shopify/src/lib/actions/ai/update-url-redirect.tsnew file mode 100644index 00000000000..a5f54bd8e39--- /dev/null+++ b/packages/pieces/community/shopify/src/lib/actions/ai/update-url-redirect.ts@@ -0,0 +1,67 @@+import { createAction, Property } from '@activepieces/pieces-framework';+import { shopifyAuth } from '../../..';+import {+ GqlUrlRedirect,+ shopifyFields,+ shopifyGraphqlClient,+ shopifyMappers,+ shopifyValues,+} from '../../common/graphql';+import { urlRedirectOutputSchema } from '../../output-schemas/content';++export const shopifyAiUpdateUrlRedirect = createAction({+ auth: shopifyAuth,+ name: 'update_url_redirect',+ classification: 'WRITE',+ displayName: 'Update URL Redirect',+ description: 'Change the old path or the target of a URL redirect.',+ audience: 'ai',+ aiMetadata: {+ description:+ 'Changes one URL redirect and returns it. Send a new path, a new target, or both; what you leave empty keeps its value. The change is live immediately. Repeating the same update leaves the same state. Needs the write_online_store_navigation access scope.',+ idempotent: true,+ },+ outputSchema: urlRedirectOutputSchema,+ props: {+ url_redirect_id: Property.ShortText({+ displayName: 'URL Redirect ID',+ description: 'The redirect id, numeric or "gid://shopify/UrlRedirect/…". Find it with list_url_redirects.',+ required: true,+ }),+ path: Property.ShortText({+ displayName: 'Old Path',+ description: 'New path to redirect from, starting with "/".',+ required: false,+ }),+ target: Property.ShortText({+ displayName: 'Target',+ description: 'New target path or full URL.',+ required: false,+ }),+ },+ async run({ auth, propsValue }) {+ const urlRedirect = shopifyValues.compact({+ path: shopifyValues.nonEmpty(propsValue.path),+ target: shopifyValues.nonEmpty(propsValue.target),+ });+ if (Object.keys(urlRedirect).length === 0) {+ throw new Error('Nothing to update: provide a new path or target. Nothing was changed.');+ }+ const id = shopifyGraphqlClient.toGid({ type: 'UrlRedirect', id: propsValue.url_redirect_id });+ const { data, redactedFields } = await shopifyGraphqlClient.request<{+ urlRedirectUpdate: { urlRedirect: GqlUrlRedirect | null } | null;+ }>({+ auth,+ query: `mutation UpdateUrlRedirect($id: ID!, $urlRedirect: UrlRedirectInput!) { urlRedirectUpdate(id: $id, urlRedirect: $urlRedirect) { urlRedirect { ${shopifyFields.URL_REDIRECT_FIELDS} } userErrors { field message code } } }`,+ variables: { id, urlRedirect },+ });+ const updated = data.urlRedirectUpdate?.urlRedirect;+ if (!updated) {+ throw new Error('Shopify did not return the updated redirect.');+ }+ return {+ ...shopifyMappers.mapUrlRedirect(updated),+ redacted_fields: redactedFields,+ };+ },+});diff --git a/packages/pieces/community/shopify/src/lib/actions/ai/upsert-metaobject.ts b/packages/pieces/community/shopify/src/lib/actions/ai/upsert-metaobject.tsnew file mode 100644index 00000000000..08183e8b7ba--- /dev/null+++ b/packages/pieces/community/shopify/src/lib/actions/ai/upsert-metaobject.ts@@ -0,0 +1,123 @@+import { createAction, Property } from '@activepieces/pieces-framework';+import { shopifyAuth } from '../../..';+import {+ GqlMetaobject,+ shopifyFields,+ shopifyGraphqlClient,+ shopifyMappers,+ shopifyValues,+} from '../../common/graphql';+import { metaobjectOutputSchema } from '../../output-schemas/content';++export const shopifyAiUpsertMetaobject = createAction({+ auth: shopifyAuth,+ name: 'upsert_metaobject',+ classification: 'WRITE',+ displayName: 'Create or Update Metaobject Entry',+ description: 'Create a metaobject entry, or update the fields you send on an existing one, by type and handle.',+ audience: 'ai',+ aiMetadata: {+ description:+ 'Creates or updates one metaobject entry keyed by type + handle: when no entry of that type has the handle it is created, otherwise it is updated. Only the fields you send are written; every other field keeps its current value (a patch, never a full replacement), so send just the keys you want to change. Field keys come from the type\'s definition (list_metaobject_definitions); values are strings, with lists and references as JSON strings. status (DRAFT or ACTIVE) and template_suffix are sent only when you set them; they apply only to types with the publishable or online store capability, and a new entry otherwise gets Shopify\'s default status. Sending the same values again leaves the same state. Needs the write_metaobjects access scope.',+ idempotent: true,+ },+ outputSchema: metaobjectOutputSchema,+ props: {+ type: Property.ShortText({+ displayName: 'Metaobject Type',+ description: 'The metaobject definition type, for example "designer". Find it with list_metaobject_definitions.',+ required: true,+ }),+ handle: Property.ShortText({+ displayName: 'Handle',+ description: 'Unique handle of the entry within its type, for example "ada-lovelace". Reusing an existing handle updates that entry.',+ required: true,+ }),+ fields: Property.Array({+ displayName: 'Fields',+ description: 'Field values to write; fields you leave out keep their current values.',+ required: false,+ properties: {+ key: Property.ShortText({+ displayName: 'Field Key',+ description: 'Field key from the definition, for example "name" or "country".',+ required: true,+ }),+ value: Property.LongText({+ displayName: 'Value',+ description: 'Field value as a string, for example "Ada Lovelace", "42" or "[\\"gid://shopify/Product/1\\"]" for a list of references.',+ required: true,+ }),+ },+ }),+ status: Property.StaticDropdown({+ displayName: 'Status',+ description: 'DRAFT hides the entry from the storefront, ACTIVE shows it. Only for publishable types; leave empty to keep the current status.',+ required: false,+ options: {+ options: [+ { label: 'Draft', value: 'DRAFT' },+ { label: 'Active', value: 'ACTIVE' },+ ],+ },+ }),+ template_suffix: Property.ShortText({+ displayName: 'Template Suffix',+ description: 'Online store template suffix for the entry\'s page. Only for types with the online store capability.',+ required: false,+ }),+ },+ async run({ auth, propsValue }) {+ const type = shopifyValues.nonEmpty(propsValue.type);+ const handle = shopifyValues.nonEmpty(propsValue.handle);+ if (!type || !handle) {+ throw new Error('A metaobject type and handle are required. Nothing was changed.');+ }+ const fields = readFields(propsValue.fields);+ const templateSuffix = shopifyValues.nonEmpty(propsValue.template_suffix);+ const capabilities = shopifyValues.compact({+ publishable: propsValue.status ? { status: propsValue.status } : undefined,+ onlineStore: templateSuffix ? { templateSuffix } : undefined,+ });+ const metaobject = shopifyValues.compact({+ fields: fields.length > 0 ? fields : undefined,+ capabilities: Object.keys(capabilities).length > 0 ? capabilities : undefined,+ });+ if (Object.keys(metaobject).length === 0) {+ throw new Error('Nothing to write: provide at least one field, a status or a template_suffix. Nothing was changed.');+ }+ const { data, redactedFields } = await shopifyGraphqlClient.request<{+ metaobjectUpsert: { metaobject: GqlMetaobject | null } | null;+ }>({+ auth,+ query: `mutation UpsertMetaobject($handle: MetaobjectHandleInput!, $metaobject: MetaobjectUpsertInput!) { metaobjectUpsert(handle: $handle, metaobject: $metaobject) { metaobject { ${shopifyFields.METAOBJECT_FIELDS} } userErrors { field message code elementKey elementIndex } } }`,+ variables: { handle: { type, handle }, metaobject },+ });+ const saved = data.metaobjectUpsert?.metaobject;+ if (!saved) {+ throw new Error('Shopify did not return the metaobject entry.');+ }+ return {+ ...shopifyMappers.mapMetaobject(saved),+ redacted_fields: redactedFields,+ };+ },+});++function readFields(value: unknown): { key: string; value: string }[] {+ const rows = shopifyValues.readRecords(value);+ const fields = rows.map((row, index) => {+ const key = shopifyValues.readText(row['key']);+ const content = row['value'];+ if (!key || content === undefined || content === null) {+ throw new Error(`fields[${index}] needs a key and a value. Nothing was changed.`);+ }+ return { key, value: typeof content === 'string' ? content : JSON.stringify(content) };+ });+ const keys = fields.map((field) => field.key);+ const duplicate = keys.find((key, index) => keys.indexOf(key) !== index);+ if (duplicate) {+ throw new Error(`Field "${duplicate}" is listed more than once; send each key once. Nothing was changed.`);+ }+ return fields;+}diff --git a/packages/pieces/community/shopify/src/lib/actions/ai/upsert-theme-files.ts b/packages/pieces/community/shopify/src/lib/actions/ai/upsert-theme-files.tsnew file mode 100644index 00000000000..57621a26b07--- /dev/null+++ b/packages/pieces/community/shopify/src/lib/actions/ai/upsert-theme-files.ts@@ -0,0 +1,117 @@+import { createAction, Property } from '@activepieces/pieces-framework';+import { shopifyAuth } from '../../..';+import {+ GqlJob,+ GqlThemeFileResult,+ shopifyFields,+ shopifyGraphqlClient,+ shopifyMappers,+ shopifyValues,+} from '../../common/graphql';+import { upsertThemeFilesOutputSchema } from '../../output-schemas/content';++export const shopifyAiUpsertThemeFiles = createAction({+ auth: shopifyAuth,+ name: 'upsert_theme_files',+ classification: 'WRITE',+ displayName: 'Create or Update Theme Files',+ description: 'Create theme files or overwrite existing ones (up to 50 per call).',+ audience: 'ai',+ aiMetadata: {+ description:+ 'Writes up to 50 files into one theme: a file that does not exist is created, and a file with the same path is overwritten completely (its previous content is not returned, so read it first with get_theme_file if you may need it). Writing to the live theme (role MAIN, see get_theme) changes the storefront immediately; say so before doing it, and prefer an unpublished copy. Returns the written files and, when Shopify finishes the write in the background, a job_id to poll with get_job. Sending the same files again leaves the same content. Shopify documents that modifying theme files needs the write_themes access scope AND an exemption granted by Shopify; without the exemption the call is refused with an access error, so report that instead of retrying.',+ idempotent: true,+ },+ outputSchema: upsertThemeFilesOutputSchema,+ props: {+ theme_id: Property.ShortText({+ displayName: 'Theme ID',+ description: 'The theme id, numeric or "gid://shopify/OnlineStoreTheme/…". Find it with list_themes.',+ required: true,+ }),+ files: Property.Array({+ displayName: 'Files',+ description: 'One entry per file, 1 to 50, each path at most once.',+ required: true,+ properties: {+ filename: Property.ShortText({+ displayName: 'File Path',+ description: 'Path inside the theme, for example "templates/index.json" or "snippets/promo-banner.liquid".',+ required: true,+ }),+ body_type: Property.StaticDropdown({+ displayName: 'Content Type',+ description: 'TEXT for text files (Liquid, JSON, CSS, JS), BASE64 for binary content, URL to copy a file from a public URL.',+ required: true,+ options: {+ options: [+ { label: 'Text', value: 'TEXT' },+ { label: 'Base64', value: 'BASE64' },+ { label: 'URL', value: 'URL' },+ ],+ },+ }),+ value: Property.LongText({+ displayName: 'Content',+ description: 'The full file content (TEXT), the base64 string (BASE64) or the public file URL (URL).',+ required: true,+ }),+ },+ }),+ },+ async run({ auth, propsValue }) {+ const files = buildFiles(propsValue.files);+ const themeId = shopifyGraphqlClient.toGid({ type: 'OnlineStoreTheme', id: propsValue.theme_id });+ const { data, redactedFields } = await shopifyGraphqlClient.request<{+ themeFilesUpsert: {+ job?: GqlJob | null;+ upsertedThemeFiles?: GqlThemeFileResult[] | null;+ } | null;+ }>({+ auth,+ query: `mutation UpsertThemeFiles($themeId: ID!, $files: [OnlineStoreThemeFilesUpsertFileInput!]!) { themeFilesUpsert(themeId: $themeId, files: $files) { job { id done } upsertedThemeFiles { ${shopifyFields.THEME_FILE_RESULT_FIELDS} } userErrors { field message code filename } } }`,+ variables: { themeId, files },+ });+ const upserted = (data.themeFilesUpsert?.upsertedThemeFiles ?? []).map(shopifyMappers.mapThemeFileResult);+ return {+ theme_id: themeId,+ files: upserted,+ count: upserted.length,+ job_id: data.themeFilesUpsert?.job?.id ?? null,+ job_done: data.themeFilesUpsert?.job?.done ?? null,+ redacted_fields: redactedFields,+ };+ },+});++function buildFiles(value: unknown): { filename: string; body: { type: string; value: string } }[] {+ const rows = shopifyValues.readRecords(value);+ if (rows.length === 0) {+ throw new Error('Provide at least one file. Nothing was changed.');+ }+ if (rows.length > shopifyFields.MAX_THEME_FILES_PER_CALL) {+ throw new Error(+ `At most ${shopifyFields.MAX_THEME_FILES_PER_CALL} files per call; split the files over several calls. Nothing was changed.`+ );+ }+ const files = rows.map((row, index) => {+ const filename = shopifyValues.readText(row['filename']);+ const type = shopifyValues.readText(row['body_type']);+ const content = typeof row['value'] === 'string' ? row['value'] : undefined;+ if (!filename || content === undefined) {+ throw new Error(`files[${index}] needs a filename and a value. Nothing was changed.`);+ }+ if (!type || !BODY_TYPES.includes(type)) {+ throw new Error(`files[${index}].body_type must be TEXT, BASE64 or URL. Nothing was changed.`);+ }+ return { filename, body: { type, value: content } };+ });+ const names = files.map((file) => file.filename);+ const duplicate = names.find((name, index) => names.indexOf(name) !== index);+ if (duplicate) {+ throw new Error(`File "${duplicate}" is listed more than once; send each path once. Nothing was changed.`);+ }+ return files;+}++const BODY_TYPES = ['TEXT', 'BASE64', 'URL'];diff --git a/packages/pieces/community/shopify/src/lib/common/auth.ts b/packages/pieces/community/shopify/src/lib/common/auth.tsindex 259354e145c..abdcd00b793 100644--- a/packages/pieces/community/shopify/src/lib/common/auth.ts+++ b/packages/pieces/community/shopify/src/lib/common/auth.ts@@ -23,7 +23,7 @@ You can find your shop name in the URL. For example, if the URL is \`https://exa1. Log in to your Shopify admin.2. Go to **Settings** -> **Apps and sales channels** -> **Develop apps**.3. Open your existing custom app.-4. Under **Configuration**, check that the Admin API scopes include: \`read_orders\`, \`write_orders\`, \`read_customers\`, \`write_customers\`, \`read_products\`, \`write_products\`, \`read_draft_orders\`, \`write_draft_orders\`, \`read_locations\`, \`read_inventory\`, \`write_inventory\`, \`read_themes\`, \`write_fulfillments\`, \`read_publications\`, \`write_publications\`, \`write_files\`, \`read_merchant_managed_fulfillment_orders\`, \`write_merchant_managed_fulfillment_orders\`, \`read_fulfillments\`, \`read_shipping\`, \`read_discounts\`, \`write_discounts\`, \`read_gift_cards\`, \`write_gift_cards\`.+4. Under **Configuration**, check that the Admin API scopes include: \`read_orders\`, \`write_orders\`, \`read_customers\`, \`write_customers\`, \`read_products\`, \`write_products\`, \`read_draft_orders\`, \`write_draft_orders\`, \`read_locations\`, \`read_inventory\`, \`write_inventory\`, \`read_themes\`, \`write_fulfillments\`, \`read_publications\`, \`write_publications\`, \`write_files\`, \`read_merchant_managed_fulfillment_orders\`, \`write_merchant_managed_fulfillment_orders\`, \`read_fulfillments\`, \`read_shipping\`, \`read_discounts\`, \`write_discounts\`, \`read_gift_cards\`, \`write_gift_cards\`, \`write_themes\`, \`read_content\`, \`write_content\`, \`read_online_store_navigation\`, \`write_online_store_navigation\`, \`read_metaobjects\`, \`write_metaobjects\`, \`read_metaobject_definitions\`, \`write_metaobject_definitions\`.5. Under **API credentials**, copy the **Admin API access token**.`;@@ -33,7 +33,7 @@ Use this option for apps created in the Shopify **Dev Dashboard** (all new apps**Important:** the app and the store must belong to the **same Shopify organization**, otherwise Shopify rejects the connection.1. Go to the [Shopify Dev Dashboard](https://dev.shopify.com/dashboard) and click **Create app**. Give it a name.-2. Create a version of the app and, under **Access** -> **Scopes**, select these Admin API scopes: \`read_orders\`, \`write_orders\`, \`read_customers\`, \`write_customers\`, \`read_products\`, \`write_products\`, \`read_draft_orders\`, \`write_draft_orders\`, \`read_locations\`, \`read_inventory\`, \`write_inventory\`, \`read_themes\`, \`write_fulfillments\`, \`read_publications\`, \`write_publications\`, \`write_files\`, \`read_merchant_managed_fulfillment_orders\`, \`write_merchant_managed_fulfillment_orders\`, \`read_fulfillments\`, \`read_shipping\`, \`read_discounts\`, \`write_discounts\`, \`read_gift_cards\`, \`write_gift_cards\`.+2. Create a version of the app and, under **Access** -> **Scopes**, select these Admin API scopes: \`read_orders\`, \`write_orders\`, \`read_customers\`, \`write_customers\`, \`read_products\`, \`write_products\`, \`read_draft_orders\`, \`write_draft_orders\`, \`read_locations\`, \`read_inventory\`, \`write_inventory\`, \`read_themes\`, \`write_fulfillments\`, \`read_publications\`, \`write_publications\`, \`write_files\`, \`read_merchant_managed_fulfillment_orders\`, \`write_merchant_managed_fulfillment_orders\`, \`read_fulfillments\`, \`read_shipping\`, \`read_discounts\`, \`write_discounts\`, \`read_gift_cards\`, \`write_gift_cards\`, \`write_themes\`, \`read_content\`, \`write_content\`, \`read_online_store_navigation\`, \`write_online_store_navigation\`, \`read_metaobjects\`, \`write_metaobjects\`, \`read_metaobject_definitions\`, \`write_metaobject_definitions\`.3. Release a version with these scopes and install/approve it on the store: from the app's **Home** page, click **Install app** and install it on your store (reinstall it if it was installed before the scopes were added). The store must be in the same organization as the app.4. Open the app's **Settings** page and copy the **Client ID** and **Client secret**.5. Enter your shop name below (for \`https://example.myshopify.com\`, enter **example**), then paste the client ID and client secret.diff --git a/packages/pieces/community/shopify/src/lib/common/graphql.ts b/packages/pieces/community/shopify/src/lib/common/graphql.tsindex e71affb320d..17e83fc2fc6 100644--- a/packages/pieces/community/shopify/src/lib/common/graphql.ts+++ b/packages/pieces/community/shopify/src/lib/common/graphql.ts@@ -224,6 +224,11 @@ function toGraphqlError(errors: ShopifyGraphqlError[]): Error {(entry) => entry.extensions?.code === 'ACCESS_DENIED');if (denied) {+ if (/exemption/i.test(denied.message ?? '')) {+ return new Error(+ `Shopify denied access: this operation needs an exemption granted by Shopify in addition to the access scope, so adding scopes or reinstalling the app will not fix it. Do not retry. Shopify said: ${denied.message ?? ''}`.trim()+ );+ }const scope = readRequiredScope(denied);const scopeText = scope ? `the "${scope}" access scope` : 'an access scope';return new Error(@@ -2732,6 +2737,349 @@ function idListProp({});}+function mapBlog(blog: GqlBlog) {+ return {+ id: blog.id,+ title: blog.title ?? null,+ handle: blog.handle ?? null,+ comment_policy: blog.commentPolicy ?? null,+ template_suffix: blog.templateSuffix ?? null,+ articles_count: blog.articlesCount?.count ?? null,+ feed_path: blog.feed?.path ?? null,+ feed_location: blog.feed?.location ?? null,+ created_at: blog.createdAt ?? null,+ updated_at: blog.updatedAt ?? null,+ };+}++function mapBlogDetail(blog: GqlBlog) {+ return {+ ...mapBlog(blog),+ recent_article_tags: blog.tags ?? [],+ };+}++function mapArticleSummary(article: GqlArticle) {+ return {+ id: article.id,+ title: article.title ?? null,+ handle: article.handle ?? null,+ author_name: article.author?.name ?? null,+ blog_id: article.blog?.id ?? null,+ blog_title: article.blog?.title ?? null,+ summary_html: article.summary ?? null,+ tags: joinTags(article.tags),+ is_published: article.isPublished ?? null,+ published_at: article.publishedAt ?? null,+ template_suffix: article.templateSuffix ?? null,+ image_url: article.image?.url ?? null,+ image_alt_text: article.image?.altText ?? null,+ comments_count: article.commentsCount?.count ?? null,+ created_at: article.createdAt ?? null,+ updated_at: article.updatedAt ?? null,+ };+}++function mapArticle(article: GqlArticle) {+ return {+ ...mapArticleSummary(article),+ body_html: article.body ?? null,+ };+}++function mapComment(comment: GqlComment) {+ return {+ id: comment.id,+ status: comment.status ?? null,+ body: comment.body ?? null,+ body_html: comment.bodyHtml ?? null,+ is_published: comment.isPublished ?? null,+ published_at: comment.publishedAt ?? null,+ author_name: comment.author?.name ?? null,+ author_email: comment.author?.email ?? null,+ ip: comment.ip ?? null,+ user_agent: comment.userAgent ?? null,+ article_id: comment.article?.id ?? null,+ article_title: comment.article?.title ?? null,+ created_at: comment.createdAt ?? null,+ updated_at: comment.updatedAt ?? null,+ };+}++function mapPageSummary(page: GqlPage) {+ return {+ id: page.id,+ title: page.title ?? null,+ handle: page.handle ?? null,+ body_summary: page.bodySummary ?? null,+ is_published: page.isPublished ?? null,+ published_at: page.publishedAt ?? null,+ template_suffix: page.templateSuffix ?? null,+ created_at: page.createdAt ?? null,+ updated_at: page.updatedAt ?? null,+ };+}++function mapPage(page: GqlPage) {+ return {+ ...mapPageSummary(page),+ body_html: page.body ?? null,+ };+}++function mapUrlRedirect(redirect: GqlUrlRedirect) {+ return {+ id: redirect.id,+ path: redirect.path ?? null,+ target: redirect.target ?? null,+ };+}++function mapTheme(theme: GqlTheme) {+ return {+ id: theme.id,+ name: theme.name ?? null,+ role: theme.role ?? null,+ prefix: theme.prefix ?? null,+ processing: theme.processing ?? null,+ processing_failed: theme.processingFailed ?? null,+ theme_store_id: theme.themeStoreId ?? null,+ created_at: theme.createdAt ?? null,+ updated_at: theme.updatedAt ?? null,+ };+}++function mapThemeFile(file: GqlThemeFile) {+ const body = file.body ?? {};+ return {+ filename: file.filename ?? null,+ content_type: file.contentType ?? null,+ size: readNumber(file.size) ?? null,+ checksum_md5: file.checksumMd5 ?? null,+ body_type: themeFileBodyType(body.__typename),+ content: body.content ?? null,+ content_base64: body.contentBase64 ?? null,+ url: body.url ?? null,+ created_at: file.createdAt ?? null,+ updated_at: file.updatedAt ?? null,+ };+}++function themeFileBodyType(typename: string | null | undefined): string | null {+ const types: Record<string, string> = {+ OnlineStoreThemeFileBodyText: 'TEXT',+ OnlineStoreThemeFileBodyBase64: 'BASE64',+ OnlineStoreThemeFileBodyUrl: 'URL',+ };+ return typename ? types[typename] ?? null : null;+}++function mapThemeFileResult(file: GqlThemeFileResult) {+ return {+ filename: file.filename ?? null,+ size: readNumber(file.size) ?? null,+ checksum_md5: file.checksumMd5 ?? null,+ created_at: file.createdAt ?? null,+ updated_at: file.updatedAt ?? null,+ };+}++function mapThemeFileSummary(file: GqlThemeFileSummary) {+ return {+ filename: file.filename ?? null,+ content_type: file.contentType ?? null,+ size: readNumber(file.size) ?? null,+ checksum_md5: file.checksumMd5 ?? null,+ created_at: file.createdAt ?? null,+ updated_at: file.updatedAt ?? null,+ };+}++function mapMetafield(metafield: GqlMetafield) {+ return {+ id: metafield.id,+ legacy_resource_id: metafield.legacyResourceId ?? null,+ namespace: metafield.namespace ?? null,+ key: metafield.key ?? null,+ type: metafield.type ?? null,+ value: metafield.value ?? null,+ compare_digest: metafield.compareDigest ?? null,+ translatable: metafield.translatable ?? null,+ owner_type: metafield.ownerType ?? null,+ owner_id: metafield.owner?.id ?? null,+ definition_id: metafield.definition?.id ?? null,+ definition_name: metafield.definition?.name ?? null,+ created_at: metafield.createdAt ?? null,+ updated_at: metafield.updatedAt ?? null,+ };+}++function mapValidation(validation: GqlValidation) {+ return {+ name: validation.name ?? null,+ type: validation.type ?? null,+ value: validation.value ?? null,+ };+}++function mapMetafieldDefinition(definition: GqlMetafieldDefinition) {+ return {+ id: definition.id,+ name: definition.name ?? null,+ namespace: definition.namespace ?? null,+ key: definition.key ?? null,+ description: definition.description ?? null,+ owner_type: definition.ownerType ?? null,+ type: definition.type?.name ?? null,+ type_category: definition.type?.category ?? null,+ pinned_position: definition.pinnedPosition ?? null,+ validation_status: definition.validationStatus ?? null,+ validations: (definition.validations ?? []).map(mapValidation),+ metafields_count: definition.metafieldsCount ?? null,+ admin_access: definition.access?.admin ?? null,+ storefront_access: definition.access?.storefront ?? null,+ customer_account_access: definition.access?.customerAccount ?? null,+ admin_filterable: definition.capabilities?.adminFilterable?.enabled ?? null,+ smart_collection_condition: definition.capabilities?.smartCollectionCondition?.enabled ?? null,+ unique_values: definition.capabilities?.uniqueValues?.enabled ?? null,+ };+}++function mapMetafieldDefinitionType(type: GqlMetafieldDefinitionType) {+ return {+ name: type.name ?? null,+ category: type.category ?? null,+ supports_definition_migrations: type.supportsDefinitionMigrations ?? null,+ supported_validations: (type.supportedValidations ?? []).map((validation) => ({+ name: validation.name ?? null,+ type: validation.type ?? null,+ })),+ };+}++function mapStandardMetafieldTemplate(template: GqlStandardMetafieldTemplate) {+ return {+ id: template.id,+ namespace: template.namespace ?? null,+ key: template.key ?? null,+ name: template.name ?? null,+ description: template.description ?? null,+ owner_types: template.ownerTypes ?? [],+ type: template.type?.name ?? null,+ visible_to_storefront_api: template.visibleToStorefrontApi ?? null,+ validations: (template.validations ?? []).map(mapValidation),+ };+}++function mapMetaobject(metaobject: GqlMetaobject) {+ const fields = (metaobject.fields ?? []).map((field) => ({+ key: field.key ?? null,+ type: field.type ?? null,+ value: field.value ?? null,+ }));+ const values: Record<string, string | null> = {};+ for (const field of fields) {+ if (field.key) {+ values[field.key] = field.value;+ }+ }+ return {+ id: metaobject.id,+ type: metaobject.type ?? null,+ handle: metaobject.handle ?? null,+ display_name: metaobject.displayName ?? null,+ status: metaobject.capabilities?.publishable?.status ?? null,+ template_suffix: metaobject.capabilities?.onlineStore?.templateSuffix ?? null,+ definition_id: metaobject.definition?.id ?? null,+ definition_name: metaobject.definition?.name ?? null,+ fields,+ values,+ created_at: metaobject.createdAt ?? null,+ updated_at: metaobject.updatedAt ?? null,+ };+}++function mapMetaobjectDefinition(definition: GqlMetaobjectDefinition) {+ return {+ id: definition.id,+ type: definition.type ?? null,+ name: definition.name ?? null,+ description: definition.description ?? null,+ display_name_key: definition.displayNameKey ?? null,+ metaobjects_count: definition.metaobjectsCount ?? null,+ has_thumbnail_field: definition.hasThumbnailField ?? null,+ publishable: definition.capabilities?.publishable?.enabled ?? null,+ translatable: definition.capabilities?.translatable?.enabled ?? null,+ renderable: definition.capabilities?.renderable?.enabled ?? null,+ online_store: definition.capabilities?.onlineStore?.enabled ?? null,+ admin_access: definition.access?.admin ?? null,+ storefront_access: definition.access?.storefront ?? null,+ field_definitions: (definition.fieldDefinitions ?? []).map((field) => ({+ key: field.key ?? null,+ name: field.name ?? null,+ description: field.description ?? null,+ required: field.required ?? null,+ type: field.type?.name ?? null,+ })),+ created_at: definition.createdAt ?? null,+ updated_at: definition.updatedAt ?? null,+ };+}++function requireGid({+ value,+ label,+ example,+ hint,+}: {+ value: string | undefined | null;+ label: string;+ example: string;+ hint: string;+}): string {+ const trimmed = (value ?? '').trim();+ if (!/^gid:\/\/shopify\/[A-Za-z]+\/[^/\s]+$/.test(trimmed)) {+ throw new Error(+ `${label} "${trimmed}" is not a full Shopify id. Pass the complete id, for example "${example}"; ${hint} Nothing was changed.`+ );+ }+ return trimmed;+}++function legacyIdFilter(value: string | undefined | null): string | undefined {+ const trimmed = nonEmpty(value);+ if (!trimmed) {+ return undefined;+ }+ const match = /(\d+)$/.exec(trimmed);+ if (!match) {+ throw new Error(`"${trimmed}" is not a numeric or gid://shopify/… id.`);+ }+ return match[1];+}++function joinSearch(parts: (string | undefined)[]): string | undefined {+ const present = parts.filter((part): part is string => part !== undefined && part.length > 0);+ return present.length > 0 ? present.join(' ') : undefined;+}++function metafieldOwnerTypeProp({+ required,+ description,+}: {+ required: boolean;+ description: string;+}) {+ return Property.StaticDropdown({+ displayName: 'Owner Type',+ description,+ required,+ options: {+ options: METAFIELD_OWNER_TYPES.map((value) => ({ label: value, value })),+ },+ });+}+const MONEY_FIELDS = 'shopMoney { amount currencyCode }';const MONEY_WITH_PRESENTMENT_FIELDS =@@ -2942,6 +3290,78 @@ const DISCOUNT_ID_KINDS: Record<string, DiscountIdKind> = {const MAX_REDEEM_CODES_PER_CALL = 250;+const BLOG_FIELDS =+ 'id title handle commentPolicy templateSuffix createdAt updatedAt feed { path location } articlesCount { count }';++const BLOG_DETAIL_FIELDS = `${BLOG_FIELDS} tags`;++const ARTICLE_SUMMARY_FIELDS =+ 'id title handle summary tags isPublished publishedAt templateSuffix createdAt updatedAt author { name } blog { id title } image { url altText } commentsCount { count }';++const ARTICLE_FIELDS = `${ARTICLE_SUMMARY_FIELDS} body`;++const COMMENT_FIELDS =+ 'id status body bodyHtml isPublished publishedAt createdAt updatedAt ip userAgent author { name email } article { id title }';++const PAGE_SUMMARY_FIELDS =+ 'id title handle bodySummary isPublished publishedAt templateSuffix createdAt updatedAt';++const PAGE_FIELDS = `${PAGE_SUMMARY_FIELDS} body`;++const URL_REDIRECT_FIELDS = 'id path target';++const THEME_FIELDS =+ 'id name role prefix processing processingFailed themeStoreId createdAt updatedAt';++const THEME_FILE_FIELDS =+ 'filename contentType size checksumMd5 createdAt updatedAt body { __typename ... on OnlineStoreThemeFileBodyText { content } ... on OnlineStoreThemeFileBodyBase64 { contentBase64 } ... on OnlineStoreThemeFileBodyUrl { url } }';++const THEME_FILE_RESULT_FIELDS = 'filename size checksumMd5 createdAt updatedAt';++const THEME_FILE_SUMMARY_FIELDS = 'filename contentType size checksumMd5 createdAt updatedAt';++const METAFIELD_FIELDS =+ 'id legacyResourceId namespace key type value compareDigest translatable ownerType createdAt updatedAt owner { __typename ... on Node { id } } definition { id name }';++const METAFIELD_DEFINITION_FIELDS =+ 'id name namespace key description ownerType pinnedPosition validationStatus metafieldsCount type { name category } validations { name type value } access { admin storefront customerAccount } capabilities { adminFilterable { enabled } smartCollectionCondition { enabled } uniqueValues { enabled } }';++const METAFIELD_DEFINITION_TYPE_FIELDS =+ 'name category supportsDefinitionMigrations supportedValidations { name type }';++const STANDARD_METAFIELD_TEMPLATE_FIELDS =+ 'id namespace key name description ownerTypes visibleToStorefrontApi type { name } validations { name type value }';++const METAOBJECT_FIELDS =+ 'id type handle displayName createdAt updatedAt definition { id name } capabilities { publishable { status } onlineStore { templateSuffix } } fields { key type value }';++const METAOBJECT_DEFINITION_FIELDS =+ 'id type name description displayNameKey metaobjectsCount hasThumbnailField createdAt updatedAt access { admin storefront } capabilities { publishable { enabled } translatable { enabled } renderable { enabled } onlineStore { enabled } } fieldDefinitions { key name description required type { name } }';++const METAFIELD_OWNER_TYPES = [+ 'PRODUCT',+ 'PRODUCTVARIANT',+ 'COLLECTION',+ 'CUSTOMER',+ 'ORDER',+ 'DRAFTORDER',+ 'COMPANY',+ 'COMPANY_LOCATION',+ 'LOCATION',+ 'MARKET',+ 'PAGE',+ 'BLOG',+ 'ARTICLE',+ 'SHOP',+ 'DISCOUNT',+ 'SELLING_PLAN',+ 'GIFT_CARD_TRANSACTION',+];++const MAX_METAFIELDS_PER_CALL = 25;++const MAX_THEME_FILES_PER_CALL = 50;+export const shopifyFields = {MONEY_FIELDS,@@ -2990,6 +3410,27 @@ export const shopifyFields = {CODE_DISCOUNT_DETAIL_FIELDS,CODE_DISCOUNT_TYPES,MAX_REDEEM_CODES_PER_CALL,+ BLOG_FIELDS,+ BLOG_DETAIL_FIELDS,+ ARTICLE_SUMMARY_FIELDS,+ ARTICLE_FIELDS,+ COMMENT_FIELDS,+ PAGE_SUMMARY_FIELDS,+ PAGE_FIELDS,+ URL_REDIRECT_FIELDS,+ THEME_FIELDS,+ THEME_FILE_FIELDS,+ THEME_FILE_RESULT_FIELDS,+ THEME_FILE_SUMMARY_FIELDS,+ METAFIELD_FIELDS,+ METAFIELD_DEFINITION_FIELDS,+ METAFIELD_DEFINITION_TYPE_FIELDS,+ STANDARD_METAFIELD_TEMPLATE_FIELDS,+ METAOBJECT_FIELDS,+ METAOBJECT_DEFINITION_FIELDS,+ METAFIELD_OWNER_TYPES,+ MAX_METAFIELDS_PER_CALL,+ MAX_THEME_FILES_PER_CALL,};export const shopifyGraphqlClient = {@@ -3043,6 +3484,9 @@ export const shopifyValues = {readIsoDate,nonEmptyList,clearableValue,+ requireGid,+ legacyIdFilter,+ joinSearch,};export const shopifyMappers = {@@ -3085,6 +3529,24 @@ export const shopifyMappers = {mapDiscountNode,mapDiscountRedeemCode,mapDiscountBulkCreation,+ mapBlog,+ mapBlogDetail,+ mapArticleSummary,+ mapArticle,+ mapComment,+ mapPageSummary,+ mapPage,+ mapUrlRedirect,+ mapTheme,+ mapThemeFile,+ mapThemeFileResult,+ mapThemeFileSummary,+ mapMetafield,+ mapMetafieldDefinition,+ mapMetafieldDefinitionType,+ mapStandardMetafieldTemplate,+ mapMetaobject,+ mapMetaobjectDefinition,};export const shopifyProps = {@@ -3104,6 +3566,7 @@ export const shopifyProps = {productStatus: productStatusProp,fulfillmentOrderLineItems: fulfillmentOrderLineItemsProp,idList: idListProp,+ metafieldOwnerType: metafieldOwnerTypeProp,};export type ShopifyGraphqlParams = {@@ -3987,3 +4450,213 @@ export type GqlDiscountRedeemCodeBulkCreation = {};export type DiscountIdKind = 'code' | 'automatic' | 'node';++export type GqlBlog = {+ id: string;+ title?: string | null;+ handle?: string | null;+ commentPolicy?: string | null;+ templateSuffix?: string | null;+ createdAt?: string | null;+ updatedAt?: string | null;+ feed?: { path?: string | null; location?: string | null } | null;+ articlesCount?: GqlCount | null;+ tags?: string[] | null;+};++export type GqlArticle = {+ id: string;+ title?: string | null;+ handle?: string | null;+ summary?: string | null;+ body?: string | null;+ tags?: string[] | null;+ isPublished?: boolean | null;+ publishedAt?: string | null;+ templateSuffix?: string | null;+ createdAt?: string | null;+ updatedAt?: string | null;+ author?: { name?: string | null } | null;+ blog?: { id?: string | null; title?: string | null } | null;+ image?: { url?: string | null; altText?: string | null } | null;+ commentsCount?: GqlCount | null;+};++export type GqlComment = {+ id: string;+ status?: string | null;+ body?: string | null;+ bodyHtml?: string | null;+ isPublished?: boolean | null;+ publishedAt?: string | null;+ createdAt?: string | null;+ updatedAt?: string | null;+ ip?: string | null;+ userAgent?: string | null;+ author?: { name?: string | null; email?: string | null } | null;+ article?: { id?: string | null; title?: string | null } | null;+};++export type GqlPage = {+ id: string;+ title?: string | null;+ handle?: string | null;+ body?: string | null;+ bodySummary?: string | null;+ isPublished?: boolean | null;+ publishedAt?: string | null;+ templateSuffix?: string | null;+ createdAt?: string | null;+ updatedAt?: string | null;+};++export type GqlUrlRedirect = {+ id: string;+ path?: string | null;+ target?: string | null;+};++export type GqlTheme = {+ id: string;+ name?: string | null;+ role?: string | null;+ prefix?: string | null;+ processing?: boolean | null;+ processingFailed?: boolean | null;+ themeStoreId?: number | null;+ createdAt?: string | null;+ updatedAt?: string | null;+};++export type GqlThemeFile = {+ filename?: string | null;+ contentType?: string | null;+ size?: string | null;+ checksumMd5?: string | null;+ createdAt?: string | null;+ updatedAt?: string | null;+ body?: {+ __typename?: string;+ content?: string | null;+ contentBase64?: string | null;+ url?: string | null;+ } | null;+};++export type GqlThemeFileResult = {+ filename?: string | null;+ size?: string | null;+ checksumMd5?: string | null;+ createdAt?: string | null;+ updatedAt?: string | null;+};++export type GqlThemeFileSummary = GqlThemeFileResult & {+ contentType?: string | null;+};++export type GqlMetafield = {+ id: string;+ legacyResourceId?: string | null;+ namespace?: string | null;+ key?: string | null;+ type?: string | null;+ value?: string | null;+ translatable?: boolean | null;+ compareDigest?: string | null;+ ownerType?: string | null;+ createdAt?: string | null;+ updatedAt?: string | null;+ owner?: { __typename?: string; id?: string | null } | null;+ definition?: { id?: string | null; name?: string | null } | null;+};++export type GqlValidation = {+ name?: string | null;+ type?: string | null;+ value?: string | null;+};++export type GqlMetafieldDefinition = {+ id: string;+ name?: string | null;+ namespace?: string | null;+ key?: string | null;+ description?: string | null;+ ownerType?: string | null;+ pinnedPosition?: number | null;+ validationStatus?: string | null;+ metafieldsCount?: number | null;+ type?: { name?: string | null; category?: string | null } | null;+ validations?: GqlValidation[] | null;+ access?: {+ admin?: string | null;+ storefront?: string | null;+ customerAccount?: string | null;+ } | null;+ capabilities?: {+ adminFilterable?: { enabled?: boolean | null } | null;+ smartCollectionCondition?: { enabled?: boolean | null } | null;+ uniqueValues?: { enabled?: boolean | null } | null;+ } | null;+};++export type GqlMetafieldDefinitionType = {+ name?: string | null;+ category?: string | null;+ supportsDefinitionMigrations?: boolean | null;+ supportedValidations?: { name?: string | null; type?: string | null }[] | null;+};++export type GqlStandardMetafieldTemplate = {+ id: string;+ namespace?: string | null;+ key?: string | null;+ name?: string | null;+ description?: string | null;+ ownerTypes?: string[] | null;+ visibleToStorefrontApi?: boolean | null;+ type?: { name?: string | null } | null;+ validations?: GqlValidation[] | null;+};++export type GqlMetaobject = {+ id: string;+ type?: string | null;+ handle?: string | null;+ displayName?: string | null;+ createdAt?: string | null;+ updatedAt?: string | null;+ definition?: { id?: string | null; name?: string | null } | null;+ capabilities?: {+ publishable?: { status?: string | null } | null;+ onlineStore?: { templateSuffix?: string | null } | null;+ } | null;+ fields?: { key?: string | null; type?: string | null; value?: string | null }[] | null;+};++export type GqlMetaobjectDefinition = {+ id: string;+ type?: string | null;+ name?: string | null;+ description?: string | null;+ displayNameKey?: string | null;+ metaobjectsCount?: number | null;+ hasThumbnailField?: boolean | null;+ createdAt?: string | null;+ updatedAt?: string | null;+ access?: { admin?: string | null; storefront?: string | null } | null;+ capabilities?: {+ publishable?: { enabled?: boolean | null } | null;+ translatable?: { enabled?: boolean | null } | null;+ renderable?: { enabled?: boolean | null } | null;+ onlineStore?: { enabled?: boolean | null } | null;+ } | null;+ fieldDefinitions?: {+ key?: string | null;+ name?: string | null;+ description?: string | null;+ required?: boolean | null;+ type?: { name?: string | null } | null;+ }[] | null;+};diff --git a/packages/pieces/community/shopify/src/lib/output-schemas/content.ts b/packages/pieces/community/shopify/src/lib/output-schemas/content.tsnew file mode 100644index 00000000000..319566b5681--- /dev/null+++ b/packages/pieces/community/shopify/src/lib/output-schemas/content.ts@@ -0,0 +1,724 @@+import { OutputSchema, OutputSchemaField } from '@activepieces/pieces-framework';++const redactedFieldsField: OutputSchemaField = {+ key: 'redacted_fields',+ label: 'Redacted Fields',+ description:+ 'Response paths Shopify withheld, for example because the app is not approved for protected customer data.',+};++const pagingFields: OutputSchema['fields'] = [+ { key: 'count', label: 'Count', format: 'number' },+ { key: 'has_next_page', label: 'Has Next Page', format: 'boolean' },+ {+ key: 'end_cursor',+ label: 'End Cursor',+ description: 'Pass back as the cursor to read the next page.',+ },+ redactedFieldsField,+];++const blogFields: OutputSchema['fields'] = [+ { key: 'id', label: 'Blog ID' },+ { key: 'title', label: 'Title' },+ { key: 'handle', label: 'Handle' },+ {+ key: 'comment_policy',+ label: 'Comment Policy',+ description: 'CLOSED, MODERATED or AUTO_PUBLISHED.',+ },+ { key: 'template_suffix', label: 'Template Suffix' },+ { key: 'articles_count', label: 'Articles Count', format: 'number' },+ { key: 'feed_path', label: 'Feed Path' },+ { key: 'feed_location', label: 'Feed Location', format: 'url' },+ { key: 'created_at', label: 'Created At', format: 'datetime' },+ { key: 'updated_at', label: 'Updated At', format: 'datetime' },+];++const articleSummaryFields: OutputSchema['fields'] = [+ { key: 'id', label: 'Article ID' },+ { key: 'title', label: 'Title' },+ { key: 'handle', label: 'Handle' },+ { key: 'author_name', label: 'Author Name' },+ { key: 'blog_id', label: 'Blog ID' },+ { key: 'blog_title', label: 'Blog Title' },+ { key: 'summary_html', label: 'Summary', format: 'html' },+ { key: 'tags', label: 'Tags', description: 'Comma-separated tags.' },+ { key: 'is_published', label: 'Is Published', format: 'boolean' },+ { key: 'published_at', label: 'Published At', format: 'datetime' },+ { key: 'template_suffix', label: 'Template Suffix' },+ { key: 'image_url', label: 'Image', format: 'image' },+ { key: 'image_alt_text', label: 'Image Alt Text' },+ { key: 'comments_count', label: 'Comments Count', format: 'number' },+ { key: 'created_at', label: 'Created At', format: 'datetime' },+ { key: 'updated_at', label: 'Updated At', format: 'datetime' },+];++const commentFields: OutputSchema['fields'] = [+ { key: 'id', label: 'Comment ID' },+ {+ key: 'status',+ label: 'Status',+ description: 'PENDING, PUBLISHED, SPAM, REMOVED or UNAPPROVED.',+ },+ { key: 'body', label: 'Body' },+ { key: 'body_html', label: 'Body HTML', format: 'html' },+ { key: 'is_published', label: 'Is Published', format: 'boolean' },+ { key: 'published_at', label: 'Published At', format: 'datetime' },+ { key: 'author_name', label: 'Author Name' },+ { key: 'author_email', label: 'Author Email', format: 'email' },+ { key: 'ip', label: 'IP Address' },+ { key: 'user_agent', label: 'User Agent' },+ { key: 'article_id', label: 'Article ID' },+ { key: 'article_title', label: 'Article Title' },+ { key: 'created_at', label: 'Created At', format: 'datetime' },+ { key: 'updated_at', label: 'Updated At', format: 'datetime' },+];++const pageSummaryFields: OutputSchema['fields'] = [+ { key: 'id', label: 'Page ID' },+ { key: 'title', label: 'Title' },+ { key: 'handle', label: 'Handle' },+ { key: 'body_summary', label: 'Body Summary' },+ { key: 'is_published', label: 'Is Published', format: 'boolean' },+ { key: 'published_at', label: 'Published At', format: 'datetime' },+ { key: 'template_suffix', label: 'Template Suffix' },+ { key: 'created_at', label: 'Created At', format: 'datetime' },+ { key: 'updated_at', label: 'Updated At', format: 'datetime' },+];++const urlRedirectFields: OutputSchema['fields'] = [+ { key: 'id', label: 'URL Redirect ID' },+ { key: 'path', label: 'Path' },+ { key: 'target', label: 'Target' },+];++const themeFields: OutputSchema['fields'] = [+ { key: 'id', label: 'Theme ID' },+ { key: 'name', label: 'Name' },+ {+ key: 'role',+ label: 'Role',+ description: 'MAIN is the live theme; others are UNPUBLISHED, DEVELOPMENT and similar.',+ },+ { key: 'prefix', label: 'Preview Prefix' },+ { key: 'processing', label: 'Processing', format: 'boolean' },+ { key: 'processing_failed', label: 'Processing Failed', format: 'boolean' },+ { key: 'theme_store_id', label: 'Theme Store ID', format: 'number' },+ { key: 'created_at', label: 'Created At', format: 'datetime' },+ { key: 'updated_at', label: 'Updated At', format: 'datetime' },+];++const themeReferenceFields: OutputSchema['fields'] = [+ { key: 'theme_id', label: 'Theme ID' },+ { key: 'theme_name', label: 'Theme Name' },+ { key: 'theme_role', label: 'Theme Role' },+];++const themeFileSummaryFields: OutputSchema['fields'] = [+ { key: 'filename', label: 'Filename' },+ { key: 'content_type', label: 'Content Type' },+ { key: 'size', label: 'Size', format: 'filesize' },+ { key: 'checksum_md5', label: 'Checksum MD5' },+ { key: 'created_at', label: 'Created At', format: 'datetime' },+ { key: 'updated_at', label: 'Updated At', format: 'datetime' },+];++const themeFileResultFields: OutputSchema['fields'] = themeFileSummaryFields.filter(+ (field) => field.key !== 'content_type'+);++const validationFields: OutputSchema['fields'] = [+ { key: 'name', label: 'Name' },+ { key: 'type', label: 'Type' },+ { key: 'value', label: 'Value' },+];++const metafieldDefinitionFields: OutputSchema['fields'] = [+ { key: 'id', label: 'Definition ID' },+ { key: 'name', label: 'Name' },+ { key: 'namespace', label: 'Namespace' },+ { key: 'key', label: 'Key' },+ { key: 'description', label: 'Description' },+ { key: 'owner_type', label: 'Owner Type' },+ { key: 'type', label: 'Type' },+ { key: 'type_category', label: 'Type Category' },+ { key: 'pinned_position', label: 'Pinned Position', format: 'number' },+ { key: 'validation_status', label: 'Validation Status' },+ {+ key: 'validations',+ label: 'Validations',+ labelKey: 'name',+ listItems: validationFields,+ },+ { key: 'metafields_count', label: 'Metafields Count', format: 'number' },+ { key: 'admin_access', label: 'Admin Access' },+ { key: 'storefront_access', label: 'Storefront Access' },+ { key: 'customer_account_access', label: 'Customer Account Access' },+ { key: 'admin_filterable', label: 'Admin Filterable', format: 'boolean' },+ {+ key: 'smart_collection_condition',+ label: 'Smart Collection Condition',+ format: 'boolean',+ },+ { key: 'unique_values', label: 'Unique Values', format: 'boolean' },+];++const metafieldFields: OutputSchema['fields'] = [+ { key: 'id', label: 'Metafield ID' },+ { key: 'legacy_resource_id', label: 'Legacy Resource ID' },+ { key: 'namespace', label: 'Namespace' },+ { key: 'key', label: 'Key' },+ { key: 'type', label: 'Type' },+ {+ key: 'value',+ label: 'Value',+ description: 'Always a string; list and JSON types hold JSON text.',+ },+ {+ key: 'compare_digest',+ label: 'Compare Digest',+ description: 'Pass back to set_metafields to refuse the write if the value changed meanwhile.',+ },+ {+ key: 'translatable',+ label: 'Translatable',+ format: 'boolean',+ description: 'Whether the value can be translated into other languages.',+ },+ { key: 'owner_type', label: 'Owner Type' },+ { key: 'owner_id', label: 'Owner ID' },+ { key: 'definition_id', label: 'Definition ID' },+ { key: 'definition_name', label: 'Definition Name' },+ { key: 'created_at', label: 'Created At', format: 'datetime' },+ { key: 'updated_at', label: 'Updated At', format: 'datetime' },+];++const metafieldIdentifierFields: OutputSchema['fields'] = [+ { key: 'owner_id', label: 'Owner ID' },+ { key: 'namespace', label: 'Namespace' },+ { key: 'key', label: 'Key' },+];++const metaobjectDefinitionFields: OutputSchema['fields'] = [+ { key: 'id', label: 'Definition ID' },+ { key: 'type', label: 'Type' },+ { key: 'name', label: 'Name' },+ { key: 'description', label: 'Description' },+ { key: 'display_name_key', label: 'Display Name Key' },+ { key: 'metaobjects_count', label: 'Metaobjects Count', format: 'number' },+ { key: 'has_thumbnail_field', label: 'Has Thumbnail Field', format: 'boolean' },+ { key: 'publishable', label: 'Publishable', format: 'boolean' },+ { key: 'translatable', label: 'Translatable', format: 'boolean' },+ { key: 'renderable', label: 'Renderable', format: 'boolean' },+ { key: 'online_store', label: 'Online Store', format: 'boolean' },+ { key: 'admin_access', label: 'Admin Access' },+ { key: 'storefront_access', label: 'Storefront Access' },+ {+ key: 'field_definitions',+ label: 'Field Definitions',+ labelKey: 'name',+ listItems: [+ { key: 'key', label: 'Key' },+ { key: 'name', label: 'Name' },+ { key: 'description', label: 'Description' },+ { key: 'required', label: 'Required', format: 'boolean' },+ { key: 'type', label: 'Type' },+ ],+ },+ { key: 'created_at', label: 'Created At', format: 'datetime' },+ { key: 'updated_at', label: 'Updated At', format: 'datetime' },+];++const metaobjectFields: OutputSchema['fields'] = [+ { key: 'id', label: 'Metaobject ID' },+ { key: 'type', label: 'Type' },+ { key: 'handle', label: 'Handle' },+ { key: 'display_name', label: 'Display Name' },+ {+ key: 'status',+ label: 'Status',+ description: 'ACTIVE or DRAFT for publishable types, otherwise empty.',+ },+ { key: 'template_suffix', label: 'Template Suffix' },+ { key: 'definition_id', label: 'Definition ID' },+ { key: 'definition_name', label: 'Definition Name' },+ {+ key: 'fields',+ label: 'Fields',+ labelKey: 'key',+ listItems: [+ { key: 'key', label: 'Key' },+ { key: 'type', label: 'Type' },+ { key: 'value', label: 'Value' },+ ],+ },+ {+ key: 'values',+ label: 'Values',+ dynamicKey: true,+ description: 'Field values keyed by field key.',+ },+ { key: 'created_at', label: 'Created At', format: 'datetime' },+ { key: 'updated_at', label: 'Updated At', format: 'datetime' },+];++export const contentCountOutputSchema: OutputSchema = {+ fields: [+ { key: 'count', label: 'Count', format: 'number' },+ {+ key: 'precision',+ label: 'Precision',+ description: 'EXACT, or AT_LEAST when Shopify capped the count.',+ },+ redactedFieldsField,+ ],+};++export const onlineStoreSettingsOutputSchema: OutputSchema = {+ fields: [+ {+ key: 'password_protection_enabled',+ label: 'Password Protection Enabled',+ format: 'boolean',+ },+ redactedFieldsField,+ ],+};++export const blogOutputSchema: OutputSchema = {+ fields: [...blogFields, redactedFieldsField],+};++export const getBlogOutputSchema: OutputSchema = {+ fields: [+ ...blogFields,+ { key: 'recent_article_tags', label: 'Recent Article Tags' },+ redactedFieldsField,+ ],+};++export const listBlogsOutputSchema: OutputSchema = {+ fields: [+ { key: 'items', label: 'Blogs', labelKey: 'title', listItems: blogFields },+ ...pagingFields,+ ],+};++export const deleteBlogOutputSchema: OutputSchema = {+ fields: [{ key: 'deleted_blog_id', label: 'Deleted Blog ID' }, redactedFieldsField],+};++export const articleOutputSchema: OutputSchema = {+ fields: [+ ...articleSummaryFields,+ { key: 'body_html', label: 'Body HTML', format: 'html' },+ redactedFieldsField,+ ],+};++export const listArticlesOutputSchema: OutputSchema = {+ fields: [+ {+ key: 'items',+ label: 'Articles',+ labelKey: 'title',+ listItems: articleSummaryFields,+ },+ ...pagingFields,+ ],+};++export const listArticleAuthorsOutputSchema: OutputSchema = {+ fields: [+ {+ key: 'items',+ label: 'Authors',+ labelKey: 'name',+ listItems: [{ key: 'name', label: 'Name' }],+ },+ ...pagingFields,+ ],+};++export const listArticleTagsOutputSchema: OutputSchema = {+ fields: [+ { key: 'items', label: 'Tags' },+ { key: 'count', label: 'Count', format: 'number' },+ {+ key: 'truncated',+ label: 'Truncated',+ format: 'boolean',+ description: 'True when the store has more tags than the limit returned.',+ },+ redactedFieldsField,+ ],+};++export const deleteArticleOutputSchema: OutputSchema = {+ fields: [+ { key: 'deleted_article_id', label: 'Deleted Article ID' },+ redactedFieldsField,+ ],+};++export const listCommentsOutputSchema: OutputSchema = {+ fields: [+ {+ key: 'items',+ label: 'Comments',+ labelKey: 'author_name',+ listItems: commentFields,+ },+ ...pagingFields,+ ],+};++export const commentOutputSchema: OutputSchema = {+ fields: [...commentFields, redactedFieldsField],+};++export const deleteCommentOutputSchema: OutputSchema = {+ fields: [+ { key: 'deleted_comment_id', label: 'Deleted Comment ID' },+ redactedFieldsField,+ ],+};++export const pageOutputSchema: OutputSchema = {+ fields: [+ ...pageSummaryFields,+ { key: 'body_html', label: 'Body HTML', format: 'html' },+ redactedFieldsField,+ ],+};++export const listPagesOutputSchema: OutputSchema = {+ fields: [+ { key: 'items', label: 'Pages', labelKey: 'title', listItems: pageSummaryFields },+ ...pagingFields,+ ],+};++export const deletePageOutputSchema: OutputSchema = {+ fields: [{ key: 'deleted_page_id', label: 'Deleted Page ID' }, redactedFieldsField],+};++export const urlRedirectOutputSchema: OutputSchema = {+ fields: [...urlRedirectFields, redactedFieldsField],+};++export const listUrlRedirectsOutputSchema: OutputSchema = {+ fields: [+ {+ key: 'items',+ label: 'URL Redirects',+ labelKey: 'path',+ listItems: urlRedirectFields,+ },+ ...pagingFields,+ ],+};++export const deleteUrlRedirectOutputSchema: OutputSchema = {+ fields: [+ { key: 'deleted_url_redirect_id', label: 'Deleted URL Redirect ID' },+ redactedFieldsField,+ ],+};++export const themeOutputSchema: OutputSchema = {+ fields: [...themeFields, redactedFieldsField],+};++export const listThemesOutputSchema: OutputSchema = {+ fields: [+ { key: 'items', label: 'Themes', labelKey: 'name', listItems: themeFields },+ ...pagingFields,+ ],+};++export const listThemeFilesOutputSchema: OutputSchema = {+ fields: [+ ...themeReferenceFields,+ {+ key: 'items',+ label: 'Files',+ labelKey: 'filename',+ listItems: themeFileSummaryFields,+ },+ ...pagingFields,+ {+ key: 'file_errors',+ label: 'File Errors',+ labelKey: 'filename',+ listItems: [+ { key: 'filename', label: 'Filename' },+ { key: 'code', label: 'Code' },+ ],+ },+ ],+};++export const getThemeFileOutputSchema: OutputSchema = {+ fields: [+ ...themeReferenceFields,+ ...themeFileSummaryFields,+ {+ key: 'body_type',+ label: 'Body Type',+ description: 'TEXT (content), BASE64 (content_base64) or URL (url).',+ },+ { key: 'content', label: 'Content' },+ { key: 'content_base64', label: 'Content (Base64)' },+ { key: 'url', label: 'URL', format: 'url' },+ redactedFieldsField,+ ],+};++export const deleteThemeOutputSchema: OutputSchema = {+ fields: [{ key: 'deleted_theme_id', label: 'Deleted Theme ID' }, redactedFieldsField],+};++export const upsertThemeFilesOutputSchema: OutputSchema = {+ fields: [+ { key: 'theme_id', label: 'Theme ID' },+ {+ key: 'files',+ label: 'Files',+ labelKey: 'filename',+ listItems: themeFileResultFields,+ },+ { key: 'count', label: 'Count', format: 'number' },+ {+ key: 'job_id',+ label: 'Job ID',+ description: 'Background write job, when Shopify finishes the write later; poll it with get_job.',+ },+ { key: 'job_done', label: 'Job Done', format: 'boolean' },+ redactedFieldsField,+ ],+};++export const deleteThemeFilesOutputSchema: OutputSchema = {+ fields: [+ { key: 'theme_id', label: 'Theme ID' },+ {+ key: 'deleted_files',+ label: 'Deleted Files',+ labelKey: 'filename',+ listItems: themeFileResultFields,+ },+ { key: 'count', label: 'Count', format: 'number' },+ redactedFieldsField,+ ],+};++export const listMetafieldDefinitionTypesOutputSchema: OutputSchema = {+ fields: [+ {+ key: 'items',+ label: 'Types',+ labelKey: 'name',+ listItems: [+ { key: 'name', label: 'Name' },+ { key: 'category', label: 'Category' },+ {+ key: 'supports_definition_migrations',+ label: 'Supports Definition Migrations',+ format: 'boolean',+ },+ {+ key: 'supported_validations',+ label: 'Supported Validations',+ labelKey: 'name',+ listItems: [+ { key: 'name', label: 'Name' },+ { key: 'type', label: 'Type' },+ ],+ },+ ],+ },+ { key: 'count', label: 'Count', format: 'number' },+ redactedFieldsField,+ ],+};++export const listStandardMetafieldDefinitionTemplatesOutputSchema: OutputSchema = {+ fields: [+ {+ key: 'items',+ label: 'Templates',+ labelKey: 'name',+ listItems: [+ { key: 'id', label: 'Template ID' },+ { key: 'namespace', label: 'Namespace' },+ { key: 'key', label: 'Key' },+ { key: 'name', label: 'Name' },+ { key: 'description', label: 'Description' },+ { key: 'owner_types', label: 'Owner Types' },+ { key: 'type', label: 'Type' },+ {+ key: 'visible_to_storefront_api',+ label: 'Visible To Storefront API',+ format: 'boolean',+ },+ {+ key: 'validations',+ label: 'Validations',+ labelKey: 'name',+ listItems: validationFields,+ },+ ],+ },+ ...pagingFields,+ ],+};++export const listMetafieldDefinitionsOutputSchema: OutputSchema = {+ fields: [+ {+ key: 'items',+ label: 'Metafield Definitions',+ labelKey: 'name',+ listItems: metafieldDefinitionFields,+ },+ ...pagingFields,+ ],+};++export const metafieldDefinitionOutputSchema: OutputSchema = {+ fields: [...metafieldDefinitionFields, redactedFieldsField],+};++export const updateMetafieldDefinitionOutputSchema: OutputSchema = {+ fields: [+ ...metafieldDefinitionFields,+ {+ key: 'validation_job_id',+ label: 'Validation Job ID',+ description: 'Background job that re-validates existing values; poll it with get_job.',+ },+ { key: 'validation_job_done', label: 'Validation Job Done', format: 'boolean' },+ redactedFieldsField,+ ],+};++export const pinMetafieldDefinitionOutputSchema: OutputSchema = {+ fields: [+ ...metafieldDefinitionFields,+ { key: 'already_pinned', label: 'Already Pinned', format: 'boolean' },+ redactedFieldsField,+ ],+};++export const setMetafieldsOutputSchema: OutputSchema = {+ fields: [+ {+ key: 'metafields',+ label: 'Metafields',+ labelKey: 'key',+ listItems: metafieldFields,+ },+ { key: 'count', label: 'Count', format: 'number' },+ redactedFieldsField,+ ],+};++export const listMetafieldsOutputSchema: OutputSchema = {+ fields: [+ { key: 'owner_id', label: 'Owner ID' },+ {+ key: 'items',+ label: 'Metafields',+ labelKey: 'key',+ listItems: metafieldFields,+ },+ ...pagingFields,+ ],+};++export const metafieldOutputSchema: OutputSchema = {+ fields: [...metafieldFields, redactedFieldsField],+};++export const deleteMetafieldsOutputSchema: OutputSchema = {+ fields: [+ {+ key: 'deleted',+ label: 'Deleted',+ labelKey: 'key',+ listItems: metafieldIdentifierFields,+ },+ {+ key: 'not_found',+ label: 'Not Found',+ labelKey: 'key',+ listItems: metafieldIdentifierFields,+ },+ { key: 'deleted_count', label: 'Deleted Count', format: 'number' },+ redactedFieldsField,+ ],+};++export const listMetaobjectDefinitionsOutputSchema: OutputSchema = {+ fields: [+ {+ key: 'items',+ label: 'Metaobject Definitions',+ labelKey: 'name',+ listItems: metaobjectDefinitionFields,+ },+ ...pagingFields,+ ],+};++export const metaobjectDefinitionOutputSchema: OutputSchema = {+ fields: [...metaobjectDefinitionFields, redactedFieldsField],+};++export const metaobjectOutputSchema: OutputSchema = {+ fields: [...metaobjectFields, redactedFieldsField],+};++export const listMetaobjectsOutputSchema: OutputSchema = {+ fields: [+ {+ key: 'items',+ label: 'Metaobjects',+ labelKey: 'display_name',+ listItems: metaobjectFields,+ },+ ...pagingFields,+ ],+};++export const deleteMetaobjectOutputSchema: OutputSchema = {+ fields: [+ { key: 'deleted_metaobject_id', label: 'Deleted Metaobject ID' },+ redactedFieldsField,+ ],+};++export const bulkDeleteMetaobjectsOutputSchema: OutputSchema = {+ fields: [+ {+ key: 'job_id',+ label: 'Job ID',+ description: 'Background deletion job; poll it with get_job.',+ },+ { key: 'done', label: 'Done', format: 'boolean' },+ { key: 'scope', label: 'Scope', description: 'BY_IDS or ALL_OF_TYPE.' },+ redactedFieldsField,+ ],+};++export const deleteMetaobjectDefinitionOutputSchema: OutputSchema = {+ fields: [+ {+ key: 'deleted_metaobject_definition_id',+ label: 'Deleted Metaobject Definition ID',+ },+ redactedFieldsField,+ ],+};diff --git a/packages/pieces/community/shopify/test/w4-content.test.ts b/packages/pieces/community/shopify/test/w4-content.test.tsnew file mode 100644index 00000000000..a71e2d0bbeb--- /dev/null+++ b/packages/pieces/community/shopify/test/w4-content.test.ts@@ -0,0 +1,164 @@+import { afterEach, describe, expect, it, vi } from 'vitest';+import '../src';+import { shopifyAiBulkDeleteMetaobjects } from '../src/lib/actions/ai/bulk-delete-metaobjects';+import { shopifyAiDeleteMetafields } from '../src/lib/actions/ai/delete-metafields';+import { shopifyAiUpdateArticle } from '../src/lib/actions/ai/update-article';+import { shopifyAiUpdatePage } from '../src/lib/actions/ai/update-page';+import { mockShopify, runAction } from './helpers';++const BULK_DELETED = { data: { metaobjectBulkDelete: { job: { id: 'gid://shopify/Job/1', done: false }, userErrors: [] } } };++const PRODUCT = 'gid://shopify/Product/1';++afterEach(() => {+ vi.restoreAllMocks();+});++describe('bulk_delete_metaobjects guard', () => {+ it.each([+ { label: 'BY_IDS with a type', propsValue: { scope: 'BY_IDS', metaobject_ids: ['1'], type: 'designer' }, message: 'scope BY_IDS takes metaobject_ids only; remove type' },+ { label: 'BY_IDS without ids', propsValue: { scope: 'BY_IDS' }, message: 'scope BY_IDS needs at least one metaobject id' },+ { label: 'ALL_OF_TYPE with ids', propsValue: { scope: 'ALL_OF_TYPE', metaobject_ids: ['1'], type: 'designer' }, message: 'scope ALL_OF_TYPE takes a type only; remove metaobject_ids' },+ { label: 'ALL_OF_TYPE without a type', propsValue: { scope: 'ALL_OF_TYPE' }, message: 'scope ALL_OF_TYPE needs the metaobject type' },+ { label: 'an unknown scope', propsValue: { scope: 'EVERYTHING', type: 'designer' }, message: 'scope must be BY_IDS or ALL_OF_TYPE' },+ {+ label: 'more than 250 ids',+ propsValue: { scope: 'BY_IDS', metaobject_ids: Array.from({ length: 251 }, (_, index) => String(index + 1)) },+ message: 'At most 250 ids per call',+ },+ ])('refuses $label before calling Shopify', async ({ propsValue, message }) => {+ const sent = mockShopify({ replies: [] });++ await expect(runAction({ action: shopifyAiBulkDeleteMetaobjects, propsValue })).rejects.toThrow(message);+ expect(sent).toHaveLength(0);+ });++ it('sends exactly the given ids, deduplicated', async () => {+ const sent = mockShopify({ replies: [BULK_DELETED] });++ const result = await runAction({+ action: shopifyAiBulkDeleteMetaobjects,+ propsValue: { scope: 'BY_IDS', metaobject_ids: ['1', 'gid://shopify/Metaobject/2', '1'] },+ });++ expect(sent[0].variables).toEqual({ where: { ids: ['gid://shopify/Metaobject/1', 'gid://shopify/Metaobject/2'] } });+ expect(result).toEqual({ job_id: 'gid://shopify/Job/1', done: false, scope: 'BY_IDS', redacted_fields: [] });+ });++ it('accepts exactly 250 ids', async () => {+ const sent = mockShopify({ replies: [BULK_DELETED] });+ const ids = Array.from({ length: 250 }, (_, index) => String(index + 1));++ await runAction({ action: shopifyAiBulkDeleteMetaobjects, propsValue: { scope: 'BY_IDS', metaobject_ids: ids } });++ expect(sent[0].variables).toEqual({ where: { ids: ids.map((id) => `gid://shopify/Metaobject/${id}`) } });+ });++ it('sends only the type for ALL_OF_TYPE', async () => {+ const sent = mockShopify({ replies: [BULK_DELETED] });++ await runAction({ action: shopifyAiBulkDeleteMetaobjects, propsValue: { scope: 'ALL_OF_TYPE', type: 'designer' } });++ expect(sent[0].variables).toEqual({ where: { type: 'designer' } });+ });+});++describe('delete_metafields', () => {+ const METAFIELDS = [+ { owner_id: PRODUCT, namespace: 'custom', key: 'a' },+ { owner_id: PRODUCT, namespace: 'custom', key: 'b' },+ { owner_id: PRODUCT, namespace: 'custom', key: 'c' },+ ];++ it('sends the identifiers and matches results by identifier, not by position', async () => {+ const sent = mockShopify({+ replies: [+ {+ data: {+ metafieldsDelete: {+ deletedMetafields: [+ { ownerId: PRODUCT, namespace: 'custom', key: 'c' },+ null,+ { ownerId: PRODUCT, namespace: 'custom', key: 'a' },+ ],+ userErrors: [],+ },+ },+ },+ ],+ });++ const result = await runAction({ action: shopifyAiDeleteMetafields, propsValue: { metafields: METAFIELDS } });++ expect(sent[0].variables).toEqual({+ metafields: [+ { ownerId: PRODUCT, namespace: 'custom', key: 'a' },+ { ownerId: PRODUCT, namespace: 'custom', key: 'b' },+ { ownerId: PRODUCT, namespace: 'custom', key: 'c' },+ ],+ });+ expect(result).toEqual({+ deleted: [+ { owner_id: PRODUCT, namespace: 'custom', key: 'a' },+ { owner_id: PRODUCT, namespace: 'custom', key: 'c' },+ ],+ not_found: [{ owner_id: PRODUCT, namespace: 'custom', key: 'b' }],+ deleted_count: 2,+ redacted_fields: [],+ });+ });++ it('reports omitted identifiers as not found', async () => {+ mockShopify({+ replies: [{ data: { metafieldsDelete: { deletedMetafields: [{ ownerId: PRODUCT, namespace: 'custom', key: 'b' }], userErrors: [] } } }],+ });++ const result = await runAction({ action: shopifyAiDeleteMetafields, propsValue: { metafields: METAFIELDS } });++ expect(result).toMatchObject({+ deleted: [{ owner_id: PRODUCT, namespace: 'custom', key: 'b' }],+ not_found: [+ { owner_id: PRODUCT, namespace: 'custom', key: 'a' },+ { owner_id: PRODUCT, namespace: 'custom', key: 'c' },+ ],+ deleted_count: 1,+ });+ });+});++describe('content clear flags', () => {+ const ARTICLE_UPDATED = { data: { articleUpdate: { article: { id: 'gid://shopify/Article/4' }, userErrors: [] } } };++ it('update_article sends an empty body for clear_body', async () => {+ const sent = mockShopify({ replies: [ARTICLE_UPDATED] });++ await runAction({ action: shopifyAiUpdateArticle, propsValue: { article_id: '4', clear_body: true } });++ expect(sent[0].variables).toEqual({ id: 'gid://shopify/Article/4', article: { body: '' } });+ });++ it('update_article sends empty tags for clear_tags', async () => {+ const sent = mockShopify({ replies: [ARTICLE_UPDATED] });++ await runAction({ action: shopifyAiUpdateArticle, propsValue: { article_id: '4', clear_tags: true } });++ expect(sent[0].variables).toEqual({ id: 'gid://shopify/Article/4', article: { tags: [] } });+ });++ it('update_article refuses body_html together with clear_body before calling Shopify', async () => {+ const sent = mockShopify({ replies: [] });++ await expect(+ runAction({ action: shopifyAiUpdateArticle, propsValue: { article_id: '4', body_html: '<p>Hi</p>', clear_body: true } })+ ).rejects.toThrow('Give either body_html or clear_body, not both');+ expect(sent).toHaveLength(0);+ });++ it('update_page sends an empty body for clear_body', async () => {+ const sent = mockShopify({ replies: [{ data: { pageUpdate: { page: { id: 'gid://shopify/Page/6' }, userErrors: [] } } }] });++ await runAction({ action: shopifyAiUpdatePage, propsValue: { page_id: '6', clear_body: true } });++ expect(sent[0].variables).toEqual({ id: 'gid://shopify/Page/6', page: { body: '' } });+ });+});