Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,32 +1,22 @@
import shopify from "../../shopify_developer_app.app.mjs";
import common from "@pipedream/shopify/actions/add-product-to-custom-collection/common.mjs";
import common from "@pipedream/shopify/actions/add-product-to-custom-collection/add-product-to-custom-collection.mjs";

import { adjustPropDefinitions } from "../../common/utils.mjs";

const {
name, description, type, ...others
} = common;
const props = adjustPropDefinitions(others.props, shopify);

export default {
...common,
...others,
key: "shopify_developer_app-add-product-to-custom-collection",
name: "Add Products to Custom Collections",
description: "Adds a product or products to a custom collection or collections. [See the docs](https://shopify.dev/docs/api/admin-rest/2023-01/resources/collect#post-collects)",
version: "0.0.4",
type: "action",
version: "0.0.5",
name,
description,
type,
props: {
shopify,
productIds: {
propDefinition: [
shopify,
"productId",
],
type: "string[]",
label: "Product IDs",
},
collectionIds: {
propDefinition: [
shopify,
"collectionId",
],
type: "string[]",
label: "Collection IDs",
description: "IDs of the collections that the product will be added to",
optional: false,
},
...props,
},
};
21 changes: 14 additions & 7 deletions components/shopify_developer_app/actions/add-tags/add-tags.mjs
Original file line number Diff line number Diff line change
@@ -1,15 +1,22 @@
import shopify from "../../shopify_developer_app.app.mjs";
import common from "@pipedream/shopify/actions/add-tags/common.mjs";
import common from "@pipedream/shopify/actions/add-tags/add-tags.mjs";

import { adjustPropDefinitions } from "../../common/utils.mjs";

const {
name, description, type, ...others
} = common;
const props = adjustPropDefinitions(others.props, shopify);

export default {
...common,
name: "Add Tags",
version: "0.0.4",
...others,
key: "shopify_developer_app-add-tags",
description: "Add tags. [See the documentation](https://shopify.dev/api/admin-graphql/2022-07/mutations/tagsadd)",
type: "action",
version: "0.0.5",
name,
description,
type,
props: {
shopify,
...common.props,
...props,
},
};
86 changes: 86 additions & 0 deletions components/shopify_developer_app/actions/common/constants.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
const RESOURCE_TYPES = [
{
label: "Blog",
value: "blog",
},
{
label: "Collection",
value: "collection",
},
{
label: "Customer",
value: "customer",
},
{
label: "Draft Order",
value: "draftOrder",
},
{
label: "Page",
value: "page",
},
{
label: "Product",
value: "product",
},
{
label: "Product Variant",
value: "variants",
},
{
label: "Article",
value: "article",
},
{
label: "Order",
value: "order",
},
];

const METAFIELD_TYPES = {
"boolean": "boolean",
"collection_reference": "string",
"color": "string",
"date": "string",
"date_time": "string",
"dimension": "object",
"file_reference": "string",
"json": "object",
"metaobject_reference": "string",
"mixed_reference": "string",
"money": "object",
"multi_line_text_field": "string",
"number_decimal": "string",
"number_integer": "integer",
"page_reference": "string",
"product_reference": "string",
"rating": "object",
"single_line_text_field": "string",
"url": "string",
"variant_reference": "string",
"volume": "object",
"weight": "object",
"list.collection_reference": "string[]",
"list.color": "string[]",
"list.date": "string[]",
"list.date_time": "string[]",
"list.dimension": "string[]",
"list.file_reference": "string[]",
"list.metaobject_reference": "string[]",
"list.mixed_reference": "string[]",
"list.number_integer": "string[]",
"list.number_decimal": "string[]",
"list.page_reference": "string[]",
"list.product_reference": "string[]",
"list.rating": "string[]",
"list.single_line_text_field": "string[]",
"list.url": "string[]",
"list.variant_reference": "string[]",
"list.volume": "string[]",
"list.weight": "string[]",
};

export default {
RESOURCE_TYPES,
METAFIELD_TYPES,
};
Loading
Loading