diff --git a/components/webflow_v2/actions/common/constants.mjs b/components/webflow/actions/common/constants.mjs similarity index 100% rename from components/webflow_v2/actions/common/constants.mjs rename to components/webflow/actions/common/constants.mjs diff --git a/components/webflow_v2/actions/create-collection-item/create-collection-item.mjs b/components/webflow/actions/create-collection-item/create-collection-item.mjs similarity index 85% rename from components/webflow_v2/actions/create-collection-item/create-collection-item.mjs rename to components/webflow/actions/create-collection-item/create-collection-item.mjs index b9d091eb708e8..39e88712aedd2 100644 --- a/components/webflow_v2/actions/create-collection-item/create-collection-item.mjs +++ b/components/webflow/actions/create-collection-item/create-collection-item.mjs @@ -1,10 +1,10 @@ -import app from "../../webflow_v2.app.mjs"; +import app from "../../webflow.app.mjs"; export default { - key: "webflow_v2-create-collection-item", + key: "webflow-create-collection-item", name: "Create Collection Item", - description: "Create new collection item. [See the docs here](https://developers.webflow.com/#create-new-collection-item)", - version: "0.0.1", + description: "Create new collection item. [See the documentation](https://developers.webflow.com/data/reference/cms/collection-items/staged-items/create-item)", + version: "1.0.0", type: "action", props: { app, diff --git a/components/webflow_v2/actions/delete-collection-item/delete-collection-item.mjs b/components/webflow/actions/delete-collection-item/delete-collection-item.mjs similarity index 73% rename from components/webflow_v2/actions/delete-collection-item/delete-collection-item.mjs rename to components/webflow/actions/delete-collection-item/delete-collection-item.mjs index be0d12f906afa..63f253fdb7305 100644 --- a/components/webflow_v2/actions/delete-collection-item/delete-collection-item.mjs +++ b/components/webflow/actions/delete-collection-item/delete-collection-item.mjs @@ -1,10 +1,10 @@ -import app from "../../webflow_v2.app.mjs"; +import app from "../../webflow.app.mjs"; export default { - key: "webflow_v2-delete-collection-item", + key: "webflow-delete-collection-item", name: "Delete Collection Item", - description: "Delete Item of a Collection. [See the docs here](https://developers.webflow.com/#remove-collection-item)", - version: "0.0.1", + description: "Delete Item of a Collection. [See the documentation](https://developers.webflow.com/data/reference/cms/collection-items/staged-items/delete-item)", + version: "1.0.0", type: "action", props: { app, diff --git a/components/webflow_v2/actions/fulfill-order/fulfill-order.mjs b/components/webflow/actions/fulfill-order/fulfill-order.mjs similarity index 75% rename from components/webflow_v2/actions/fulfill-order/fulfill-order.mjs rename to components/webflow/actions/fulfill-order/fulfill-order.mjs index 036cf7e9fde82..98f5f0fc7b7e8 100644 --- a/components/webflow_v2/actions/fulfill-order/fulfill-order.mjs +++ b/components/webflow/actions/fulfill-order/fulfill-order.mjs @@ -1,10 +1,10 @@ -import app from "../../webflow_v2.app.mjs"; +import app from "../../webflow.app.mjs"; export default { - key: "webflow_v2-fulfill-order", + key: "webflow-fulfill-order", name: "Fulfill Order", - description: "Fulfill an order. [See the docs here](https://developers.webflow.com/#fulfill-order)", - version: "0.0.1", + description: "Fulfill an order. [See the documentation](https://developers.webflow.com/data/reference/ecommerce/orders/update-fulfill)", + version: "1.0.0", type: "action", props: { app, diff --git a/components/webflow_v2/actions/get-collection-item/get-collection-item.mjs b/components/webflow/actions/get-collection-item/get-collection-item.mjs similarity index 73% rename from components/webflow_v2/actions/get-collection-item/get-collection-item.mjs rename to components/webflow/actions/get-collection-item/get-collection-item.mjs index 7d687378800b4..b490e71b315a0 100644 --- a/components/webflow_v2/actions/get-collection-item/get-collection-item.mjs +++ b/components/webflow/actions/get-collection-item/get-collection-item.mjs @@ -1,10 +1,10 @@ -import app from "../../webflow_v2.app.mjs"; +import app from "../../webflow.app.mjs"; export default { - key: "webflow_v2-get-collection-item", + key: "webflow-get-collection-item", name: "Get Collection Item", - description: "Get a Collection Item. [See the docs here](https://developers.webflow.com/#get-single-item)", - version: "0.0.1", + description: "Get a Collection Item. [See the documentation](https://developers.webflow.com/data/reference/cms/collection-items/staged-items/get-item)", + version: "1.0.0", type: "action", props: { app, diff --git a/components/webflow_v2/actions/get-collection/get-collection.mjs b/components/webflow/actions/get-collection/get-collection.mjs similarity index 69% rename from components/webflow_v2/actions/get-collection/get-collection.mjs rename to components/webflow/actions/get-collection/get-collection.mjs index ad69e2dc63b75..d13e9eb27a44b 100644 --- a/components/webflow_v2/actions/get-collection/get-collection.mjs +++ b/components/webflow/actions/get-collection/get-collection.mjs @@ -1,10 +1,10 @@ -import app from "../../webflow_v2.app.mjs"; +import app from "../../webflow.app.mjs"; export default { - key: "webflow_v2-get-collection", + key: "webflow-get-collection", name: "Get Collection", - description: "Get a collection. [See the docs here](https://developers.webflow.com/#get-collection-with-full-schema)", - version: "0.0.1", + description: "Get a collection. [See the documentation](https://developers.webflow.com/data/reference/cms/collections/get)", + version: "1.0.0", type: "action", props: { app, diff --git a/components/webflow_v2/actions/get-item-inventory/get-item-inventory.mjs b/components/webflow/actions/get-item-inventory/get-item-inventory.mjs similarity index 80% rename from components/webflow_v2/actions/get-item-inventory/get-item-inventory.mjs rename to components/webflow/actions/get-item-inventory/get-item-inventory.mjs index 85538cbb6b318..a92077ebbc176 100644 --- a/components/webflow_v2/actions/get-item-inventory/get-item-inventory.mjs +++ b/components/webflow/actions/get-item-inventory/get-item-inventory.mjs @@ -1,10 +1,10 @@ -import app from "../../webflow_v2.app.mjs"; +import app from "../../webflow.app.mjs"; export default { - key: "webflow_v2-get-item-inventory", + key: "webflow-get-item-inventory", name: "Get Item Inventory", - description: "Get the inventory of a specific item. [See the docs here](https://developers.webflow.com/#item-inventory)", - version: "0.0.1", + description: "Get the inventory of a specific item. [See the documentation](https://developers.webflow.com/data/reference/ecommerce/inventory/list)", + version: "1.0.0", type: "action", props: { app, diff --git a/components/webflow_v2/actions/get-order/get-order.mjs b/components/webflow/actions/get-order/get-order.mjs similarity index 66% rename from components/webflow_v2/actions/get-order/get-order.mjs rename to components/webflow/actions/get-order/get-order.mjs index fa8aa041b7970..be7d9dbc0c326 100644 --- a/components/webflow_v2/actions/get-order/get-order.mjs +++ b/components/webflow/actions/get-order/get-order.mjs @@ -1,10 +1,10 @@ -import app from "../../webflow_v2.app.mjs"; +import app from "../../webflow.app.mjs"; export default { - key: "webflow_v2-get-order", + key: "webflow-get-order", name: "Get Order", - description: "Get info on an order. [See the docs here](https://developers.webflow.com/#get-order)", - version: "0.0.1", + description: "Get info on an order. [See the documentation](https://developers.webflow.com/data/reference/ecommerce/orders/get)", + version: "1.0.0", type: "action", props: { app, diff --git a/components/webflow_v2/actions/get-site/get-site.mjs b/components/webflow/actions/get-site/get-site.mjs similarity index 62% rename from components/webflow_v2/actions/get-site/get-site.mjs rename to components/webflow/actions/get-site/get-site.mjs index ddcfeaff96918..9821d61fc4dbd 100644 --- a/components/webflow_v2/actions/get-site/get-site.mjs +++ b/components/webflow/actions/get-site/get-site.mjs @@ -1,10 +1,10 @@ -import app from "../../webflow_v2.app.mjs"; +import app from "../../webflow.app.mjs"; export default { - key: "webflow_v2-get-site", + key: "webflow-get-site", name: "Get Site", - description: "Get a site. [See the docs here](https://developers.webflow.com/#get-specific-site)", - version: "0.0.1", + description: "Get a site. [See the documentation](https://developers.webflow.com/data/reference/sites/get)", + version: "1.0.0", type: "action", props: { app, diff --git a/components/webflow_v2/actions/list-collection-items/list-collection-items.mjs b/components/webflow/actions/list-collection-items/list-collection-items.mjs similarity index 67% rename from components/webflow_v2/actions/list-collection-items/list-collection-items.mjs rename to components/webflow/actions/list-collection-items/list-collection-items.mjs index 7801319f5dcc9..cfb3a5d5ad0c0 100644 --- a/components/webflow_v2/actions/list-collection-items/list-collection-items.mjs +++ b/components/webflow/actions/list-collection-items/list-collection-items.mjs @@ -1,10 +1,10 @@ -import app from "../../webflow_v2.app.mjs"; +import app from "../../webflow.app.mjs"; export default { - key: "webflow_v2-list-collection-items", + key: "webflow-list-collection-items", name: "List Collection Items", - description: "List Items of a collection. [See the docs here](https://developers.webflow.com/#get-all-items-for-a-collection)", - version: "0.0.1", + description: "List Items of a collection. [See the documentation](https://developers.webflow.com/data/reference/cms/collection-items/bulk-items/list-items)", + version: "1.0.0", type: "action", props: { app, diff --git a/components/webflow_v2/actions/list-collections/list-collections.mjs b/components/webflow/actions/list-collections/list-collections.mjs similarity index 61% rename from components/webflow_v2/actions/list-collections/list-collections.mjs rename to components/webflow/actions/list-collections/list-collections.mjs index 3cc625e8fd03d..553356edbb313 100644 --- a/components/webflow_v2/actions/list-collections/list-collections.mjs +++ b/components/webflow/actions/list-collections/list-collections.mjs @@ -1,10 +1,10 @@ -import app from "../../webflow_v2.app.mjs"; +import app from "../../webflow.app.mjs"; export default { - key: "webflow_v2-list-collections", + key: "webflow-list-collections", name: "List Collections", - description: "List collections. [See the docs here](https://developers.webflow.com/#list-collections)", - version: "0.0.1", + description: "List collections. [See the documentation](https://developers.webflow.com/data/reference/cms/collections/list)", + version: "1.0.0", type: "action", props: { app, diff --git a/components/webflow_v2/actions/list-orders/list-orders.mjs b/components/webflow/actions/list-orders/list-orders.mjs similarity index 75% rename from components/webflow_v2/actions/list-orders/list-orders.mjs rename to components/webflow/actions/list-orders/list-orders.mjs index 4768ee641b631..7ea54510b95bc 100644 --- a/components/webflow_v2/actions/list-orders/list-orders.mjs +++ b/components/webflow/actions/list-orders/list-orders.mjs @@ -1,11 +1,11 @@ -import app from "../../webflow_v2.app.mjs"; +import app from "../../webflow.app.mjs"; import constants from "../common/constants.mjs"; export default { - key: "webflow_v2-list-orders", + key: "webflow-list-orders", name: "List Orders", - description: "List orders. [See the docs here](https://developers.webflow.com/#get-all-orders)", - version: "0.0.1", + description: "List orders. [See the documentation](https://developers.webflow.com/data/reference/ecommerce/orders/list)", + version: "1.0.0", type: "action", props: { app, diff --git a/components/webflow_v2/actions/list-sites/list-sites.mjs b/components/webflow/actions/list-sites/list-sites.mjs similarity index 54% rename from components/webflow_v2/actions/list-sites/list-sites.mjs rename to components/webflow/actions/list-sites/list-sites.mjs index c14fbb796c54d..2f5dadf3164ac 100644 --- a/components/webflow_v2/actions/list-sites/list-sites.mjs +++ b/components/webflow/actions/list-sites/list-sites.mjs @@ -1,10 +1,10 @@ -import app from "../../webflow_v2.app.mjs"; +import app from "../../webflow.app.mjs"; export default { - key: "webflow_v2-list-sites", + key: "webflow-list-sites", name: "List Sites", - description: "List sites. [See the docs here](https://developers.webflow.com/#list-sites)", - version: "0.0.1", + description: "List sites. [See the documentation](https://developers.webflow.com/data/reference/sites/list)", + version: "1.0.0", type: "action", props: { app, diff --git a/components/webflow_v2/actions/publish-site/publish-site.mjs b/components/webflow/actions/publish-site/publish-site.mjs similarity index 70% rename from components/webflow_v2/actions/publish-site/publish-site.mjs rename to components/webflow/actions/publish-site/publish-site.mjs index 9b252874b3678..e6b512095fe0e 100644 --- a/components/webflow_v2/actions/publish-site/publish-site.mjs +++ b/components/webflow/actions/publish-site/publish-site.mjs @@ -1,10 +1,10 @@ -import app from "../../webflow_v2.app.mjs"; +import app from "../../webflow.app.mjs"; export default { - key: "webflow_v2-publish-site", + key: "webflow-publish-site", name: "Publish Site", - description: "Publish a site. [See the docs here](https://developers.webflow.com/#publish-site)", - version: "0.0.1", + description: "Publish a site. [See the documentation](https://developers.webflow.com/data/reference/sites/publish)", + version: "1.0.0", type: "action", props: { app, diff --git a/components/webflow_v2/actions/refund-order/refund-order.mjs b/components/webflow/actions/refund-order/refund-order.mjs similarity index 66% rename from components/webflow_v2/actions/refund-order/refund-order.mjs rename to components/webflow/actions/refund-order/refund-order.mjs index 4a63293db6cc1..9773dfb450acf 100644 --- a/components/webflow_v2/actions/refund-order/refund-order.mjs +++ b/components/webflow/actions/refund-order/refund-order.mjs @@ -1,10 +1,10 @@ -import app from "../../webflow_v2.app.mjs"; +import app from "../../webflow.app.mjs"; export default { - key: "webflow_v2-refund-order", + key: "webflow-refund-order", name: "Refund Order", - description: "Refund an order. [See the docs here](https://developers.webflow.com/#refund-order)", - version: "0.0.1", + description: "Refund an order. [See the documentation](https://developers.webflow.com/data/reference/ecommerce/orders/refund)", + version: "1.0.0", type: "action", props: { app, diff --git a/components/webflow_v2/actions/unfulfill-order/unfulfill-order.mjs b/components/webflow/actions/unfulfill-order/unfulfill-order.mjs similarity index 65% rename from components/webflow_v2/actions/unfulfill-order/unfulfill-order.mjs rename to components/webflow/actions/unfulfill-order/unfulfill-order.mjs index e8f649395edd4..a2b706ccf194d 100644 --- a/components/webflow_v2/actions/unfulfill-order/unfulfill-order.mjs +++ b/components/webflow/actions/unfulfill-order/unfulfill-order.mjs @@ -1,10 +1,10 @@ -import app from "../../webflow_v2.app.mjs"; +import app from "../../webflow.app.mjs"; export default { - key: "webflow_v2-unfulfill-order", + key: "webflow-unfulfill-order", name: "Unfulfill Order", - description: "Unfulfill an order. [See the docs here](https://developers.webflow.com/#unfulfill-order)", - version: "0.0.1", + description: "Unfulfill an order. [See the documentation](https://developers.webflow.com/data/reference/ecommerce/orders/update-unfulfill)", + version: "1.0.0", type: "action", props: { app, diff --git a/components/webflow_v2/actions/update-collection-item/update-collection-item.mjs b/components/webflow/actions/update-collection-item/update-collection-item.mjs similarity index 92% rename from components/webflow_v2/actions/update-collection-item/update-collection-item.mjs rename to components/webflow/actions/update-collection-item/update-collection-item.mjs index bc4d0cbb75575..b2ac774fc4a58 100644 --- a/components/webflow_v2/actions/update-collection-item/update-collection-item.mjs +++ b/components/webflow/actions/update-collection-item/update-collection-item.mjs @@ -1,11 +1,11 @@ -import app from "../../webflow_v2.app.mjs"; +import app from "../../webflow.app.mjs"; export default { - key: "webflow_v2-update-collection-item", + key: "webflow-update-collection-item", name: "Update Collection Item", description: - "Update collection item. [See the documentation](https://developers.webflow.com/#update-collection-item)", - version: "0.0.1", + "Update collection item. [See the documentation](https://developers.webflow.com/data/reference/cms/collection-items/bulk-items/update-items)", + version: "1.0.0", type: "action", props: { app, diff --git a/components/webflow_v2/actions/update-item-inventory/update-item-inventory.mjs b/components/webflow/actions/update-item-inventory/update-item-inventory.mjs similarity index 90% rename from components/webflow_v2/actions/update-item-inventory/update-item-inventory.mjs rename to components/webflow/actions/update-item-inventory/update-item-inventory.mjs index 059c39d0e6c19..dff9dfa1a9114 100644 --- a/components/webflow_v2/actions/update-item-inventory/update-item-inventory.mjs +++ b/components/webflow/actions/update-item-inventory/update-item-inventory.mjs @@ -1,9 +1,9 @@ -import app from "../../webflow_v2.app.mjs"; +import app from "../../webflow.app.mjs"; export default { - key: "webflow_v2-update-item-inventory", + key: "webflow-update-item-inventory", name: "Update Item Inventory", - description: "Update the inventory of a specific item. [See the docs here](https://developers.webflow.com/#update-item-inventory)", + description: "Update the inventory of a specific item. [See the documentation](https://developers.webflow.com/data/reference/ecommerce/inventory/update)", version: "0.0.5", type: "action", props: { diff --git a/components/webflow_v2/actions/update-order/update-order.mjs b/components/webflow/actions/update-order/update-order.mjs similarity index 81% rename from components/webflow_v2/actions/update-order/update-order.mjs rename to components/webflow/actions/update-order/update-order.mjs index ddb3f0d44e350..8fee7c34eadfb 100644 --- a/components/webflow_v2/actions/update-order/update-order.mjs +++ b/components/webflow/actions/update-order/update-order.mjs @@ -1,10 +1,10 @@ -import app from "../../webflow_v2.app.mjs"; +import app from "../../webflow.app.mjs"; export default { - key: "webflow_v2-update-order", + key: "webflow-update-order", name: "Update Order", - description: "Update an order. [See the docs here](https://developers.webflow.com/#update-order)", - version: "0.0.1", + description: "Update an order. [See the documentation](https://developers.webflow.com/data/reference/ecommerce/orders/update)", + version: "1.0.0", type: "action", props: { app, diff --git a/components/webflow_v2/common/constants.mjs b/components/webflow/common/constants.mjs similarity index 100% rename from components/webflow_v2/common/constants.mjs rename to components/webflow/common/constants.mjs diff --git a/components/webflow/package.json b/components/webflow/package.json index b044275f45f89..3d396544cca56 100644 --- a/components/webflow/package.json +++ b/components/webflow/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/webflow", - "version": "0.4.6", + "version": "1.0.0", "description": "Pipedream Webflow Components", "main": "webflow.app.mjs", "keywords": [ @@ -10,10 +10,9 @@ "homepage": "https://pipedream.com/apps/webflow", "author": "Pipedream (https://pipedream.com/)", "dependencies": { - "@pipedream/platform": "^1.1.0", - "webflow-api": "1.3.1" + "@pipedream/platform": "^3.0.3", + "webflow-api": "2.4.2" }, - "gitHead": "e12480b94cc03bed4808ebc6b13e7fdb3a1ba535", "publishConfig": { "access": "public" } diff --git a/components/webflow_v2/sources/changed-collection-item/changed-collection-item.mjs b/components/webflow/sources/changed-collection-item/changed-collection-item.mjs similarity index 77% rename from components/webflow_v2/sources/changed-collection-item/changed-collection-item.mjs rename to components/webflow/sources/changed-collection-item/changed-collection-item.mjs index 1464dce2ba8b6..af5fb423a689d 100644 --- a/components/webflow_v2/sources/changed-collection-item/changed-collection-item.mjs +++ b/components/webflow/sources/changed-collection-item/changed-collection-item.mjs @@ -2,10 +2,10 @@ import common from "../common/common.mjs"; export default { type: "source", - key: "webflow_v2-changed-collection-item", + key: "webflow-changed-collection-item", name: "Collection Item Updated", - description: "Emit new event when a collection item is changed. [See the docs here](https://developers.webflow.com/#model16)", - version: "0.0.1", + description: "Emit new event when a collection item is changed. [See the documentation](https://developers.webflow.com/data/reference/webhooks/events/collection-item-changed)", + version: "1.0.0", ...common, methods: { ...common.methods, diff --git a/components/webflow_v2/sources/changed-ecommerce-inventory/changed-ecommerce-inventory.mjs b/components/webflow/sources/changed-ecommerce-inventory/changed-ecommerce-inventory.mjs similarity index 73% rename from components/webflow_v2/sources/changed-ecommerce-inventory/changed-ecommerce-inventory.mjs rename to components/webflow/sources/changed-ecommerce-inventory/changed-ecommerce-inventory.mjs index 155e43314e540..42c59245108b3 100644 --- a/components/webflow_v2/sources/changed-ecommerce-inventory/changed-ecommerce-inventory.mjs +++ b/components/webflow/sources/changed-ecommerce-inventory/changed-ecommerce-inventory.mjs @@ -2,10 +2,10 @@ import common from "../common/common.mjs"; export default { type: "source", - key: "webflow_v2-changed-ecommerce-inventory", + key: "webflow-changed-ecommerce-inventory", name: "E-commerce Inventory Updated", - description: "Emit new event when an e-commerce inventory level changes. [See the docs here](https://developers.webflow.com/#item-inventory)", - version: "0.0.1", + description: "Emit new event when an e-commerce inventory level changes. [See the documentation](https://developers.webflow.com/data/reference/webhooks/events/ecomm-inventory-changed)", + version: "1.0.0", ...common, methods: { ...common.methods, diff --git a/components/webflow_v2/sources/changed-ecommerce-order/changed-ecommerce-order.mjs b/components/webflow/sources/changed-ecommerce-order/changed-ecommerce-order.mjs similarity index 73% rename from components/webflow_v2/sources/changed-ecommerce-order/changed-ecommerce-order.mjs rename to components/webflow/sources/changed-ecommerce-order/changed-ecommerce-order.mjs index 19833b42f3002..787e0e3fb8a5f 100644 --- a/components/webflow_v2/sources/changed-ecommerce-order/changed-ecommerce-order.mjs +++ b/components/webflow/sources/changed-ecommerce-order/changed-ecommerce-order.mjs @@ -2,10 +2,10 @@ import common from "../common/common.mjs"; export default { type: "source", - key: "webflow_v2-changed-ecommerce-order", + key: "webflow-changed-ecommerce-order", name: "E-commerce Order Updated", - description: "Emit new event when an e-commerce order is changed. [See the docs here](https://developers.webflow.com/#order-model)", - version: "0.0.1", + description: "Emit new event when an e-commerce order is changed. [See the documentation](https://developers.webflow.com/data/reference/webhooks/events/ecomm-order-changed)", + version: "1.0.0", ...common, methods: { ...common.methods, diff --git a/components/webflow_v2/sources/common/common.mjs b/components/webflow/sources/common/common.mjs similarity index 97% rename from components/webflow_v2/sources/common/common.mjs rename to components/webflow/sources/common/common.mjs index c5d08ccdce861..880a0ea6fadc2 100644 --- a/components/webflow_v2/sources/common/common.mjs +++ b/components/webflow/sources/common/common.mjs @@ -1,4 +1,4 @@ -import app from "../../webflow_v2.app.mjs"; +import app from "../../webflow.app.mjs"; import { v4 as uuid } from "uuid"; import constants from "../../common/constants.mjs"; diff --git a/components/webflow_v2/sources/new-collection-item/new-collection-item.mjs b/components/webflow/sources/new-collection-item/new-collection-item.mjs similarity index 76% rename from components/webflow_v2/sources/new-collection-item/new-collection-item.mjs rename to components/webflow/sources/new-collection-item/new-collection-item.mjs index 463871690e238..76259c853a34d 100644 --- a/components/webflow_v2/sources/new-collection-item/new-collection-item.mjs +++ b/components/webflow/sources/new-collection-item/new-collection-item.mjs @@ -2,10 +2,10 @@ import common from "../common/common.mjs"; export default { type: "source", - key: "webflow_v2-new-collection-item", + key: "webflow-new-collection-item", name: "New Collection Item Created", - description: "Emit new event when a collection item is created. [See the docs here](https://developers.webflow.com/#item-model)", - version: "0.0.1", + description: "Emit new event when a collection item is created. [See the documentation](https://developers.webflow.com/data/reference/webhooks/events/collection-item-created)", + version: "1.0.0", ...common, methods: { ...common.methods, diff --git a/components/webflow_v2/sources/new-deleted-collection-item/new-deleted-collection-item.mjs b/components/webflow/sources/new-deleted-collection-item/new-deleted-collection-item.mjs similarity index 72% rename from components/webflow_v2/sources/new-deleted-collection-item/new-deleted-collection-item.mjs rename to components/webflow/sources/new-deleted-collection-item/new-deleted-collection-item.mjs index 4c0463ff7bafe..ca212b49798d9 100644 --- a/components/webflow_v2/sources/new-deleted-collection-item/new-deleted-collection-item.mjs +++ b/components/webflow/sources/new-deleted-collection-item/new-deleted-collection-item.mjs @@ -2,10 +2,10 @@ import common from "../common/common.mjs"; export default { type: "source", - key: "webflow_v2-new-deleted-collection-item", + key: "webflow-new-deleted-collection-item", name: "Collection Item Deleted", - description: "Emit new event when a collection item is deleted. [See the docs here](https://developers.webflow.com/#item-model)", - version: "0.0.1", + description: "Emit new event when a collection item is deleted. [See the documentation](https://developers.webflow.com/data/reference/webhooks/events/collection-item-deleted)", + version: "1.0.0", ...common, methods: { ...common.methods, diff --git a/components/webflow_v2/sources/new-ecommerce-order/new-ecommerce-order.mjs b/components/webflow/sources/new-ecommerce-order/new-ecommerce-order.mjs similarity index 83% rename from components/webflow_v2/sources/new-ecommerce-order/new-ecommerce-order.mjs rename to components/webflow/sources/new-ecommerce-order/new-ecommerce-order.mjs index 9b1c8adb29ec8..c744572d87a88 100644 --- a/components/webflow_v2/sources/new-ecommerce-order/new-ecommerce-order.mjs +++ b/components/webflow/sources/new-ecommerce-order/new-ecommerce-order.mjs @@ -2,11 +2,11 @@ import common from "../common/common.mjs"; export default { type: "source", - key: "webflow_v2-new-ecommerce-order", + key: "webflow-new-ecommerce-order", name: "New E-commerce Order", description: - "Emit new event when an e-commerce order is created. [See the docs here](https://developers.webflow.com/#order-model)", - version: "0.0.1", + "Emit new event when an e-commerce order is created. [See the documentation](https://developers.webflow.com/data/reference/webhooks/events/ecomm-new-order)", + version: "1.0.0", ...common, hooks: { ...common.hooks, diff --git a/components/webflow_v2/sources/new-form-submission/new-form-submission.mjs b/components/webflow/sources/new-form-submission/new-form-submission.mjs similarity index 78% rename from components/webflow_v2/sources/new-form-submission/new-form-submission.mjs rename to components/webflow/sources/new-form-submission/new-form-submission.mjs index 461a0411ad526..62532cde64114 100644 --- a/components/webflow_v2/sources/new-form-submission/new-form-submission.mjs +++ b/components/webflow/sources/new-form-submission/new-form-submission.mjs @@ -3,10 +3,10 @@ import sampleEmit from "./test-event.mjs"; export default { type: "source", - key: "webflow_v2-new-form-submission", + key: "webflow-new-form-submission", name: "New Form Submission", - description: "Emit new event when a form is submitted. [See the docs here](https://developers.webflow.com/#trigger-types)", - version: "0.0.1", + description: "Emit new event when a form is submitted. [See the documentation](https://developers.webflow.com/data/reference/webhooks/events/form-submission)", + version: "1.0.0", ...common, methods: { ...common.methods, diff --git a/components/webflow_v2/sources/new-form-submission/test-event.mjs b/components/webflow/sources/new-form-submission/test-event.mjs similarity index 100% rename from components/webflow_v2/sources/new-form-submission/test-event.mjs rename to components/webflow/sources/new-form-submission/test-event.mjs diff --git a/components/webflow_v2/sources/new-site-published/new-site-published.mjs b/components/webflow/sources/new-site-published/new-site-published.mjs similarity index 76% rename from components/webflow_v2/sources/new-site-published/new-site-published.mjs rename to components/webflow/sources/new-site-published/new-site-published.mjs index a1f1e5aaee9a8..82ce8390261ea 100644 --- a/components/webflow_v2/sources/new-site-published/new-site-published.mjs +++ b/components/webflow/sources/new-site-published/new-site-published.mjs @@ -2,10 +2,10 @@ import common from "../common/common.mjs"; export default { type: "source", - key: "webflow_v2-new-site-published", + key: "webflow-new-site-published", name: "Site Published", - description: "Emit new event when a site is published. [See the docs here](https://developers.webflow.com/#trigger-types)", - version: "0.0.1", + description: "Emit new event when a site is published. [See the documentation](https://developers.webflow.com/data/reference/webhooks/events/site-publish)", + version: "1.0.0", ...common, methods: { ...common.methods, diff --git a/components/webflow/webflow.app.mjs b/components/webflow/webflow.app.mjs index 74375c31d64f0..e604219812030 100644 --- a/components/webflow/webflow.app.mjs +++ b/components/webflow/webflow.app.mjs @@ -1,7 +1,4 @@ -// Webflow version support here: https://www.npmjs.com/package/webflow-api?activeTab=versions -// @note: this is pinned to Webflow 1.3.1 -// because the upgrade to version 2 requires a new app -import Webflow from "webflow-api@1.3.1"; +import { WebflowClient } from "webflow-api"; import constants from "./common/constants.mjs"; export default { @@ -9,64 +6,66 @@ export default { app: "webflow", propDefinitions: { domains: { - label: "Domain", - description: "The list of domains.", + label: "Custom Domains", + description: "Select one or more custom domains to publish.", type: "string[]", async options({ siteId }) { - const domains = await this.getDomains(siteId); - - return domains.map((domain) => domain.name); + const domains = await this.listDomains(siteId); + return domains.map((id, url) => ({ + label: url, + id, + })); }, }, sites: { label: "Site", - description: "The list of sites", + description: "Select a site or provide a custom site ID.", type: "string", async options() { - const sites = await this.getSites(); + const sites = await this.listSites(); return sites.map((site) => ({ - label: site.name, - value: site._id, + label: site.displayName || site.shortName, + value: site.id, })); }, }, collections: { label: "Collection", - description: "The list of collection of a site", + description: "Select a collection or provide a custom collection ID.", type: "string", async options({ siteId }) { - const collections = await this.getCollections(siteId); + const collections = await this.listCollections(siteId); return collections.map((collection) => ({ - label: collection.name, - value: collection._id, + label: collection.displayName || collection.slug, + value: collection.id, })); }, }, items: { label: "Item", - description: "The list of items of a collection", + description: "Select an item or provide a custom item ID.", type: "string", async options({ collectionId, page, }) { - const items = await this.getItems(page, collectionId); + const items = await this.listCollectionItems(page, collectionId); return items.map((item) => ({ - label: item.name, - value: item._id, + label: item.fieldData?.name || item.fieldData?.slug, + value: item.id, })); }, }, orders: { label: "Order", - description: "The list of orders of a site", + description: "Select an order, or provide a custom order ID.", type: "string", async options({ siteId, page, }) { - const items = await this.getOrders({ + const items = await this.listOrders({ page, siteId, }); @@ -76,179 +75,96 @@ export default { }, }, methods: { - /** - * Get the auth access token; - * - * @returns {string} The base auth access token. - */ _authToken() { return this.$auth.oauth_access_token; }, - /** - * Create a Webflow API client; - * - * @returns {params} The Webflow API client. - */ - _createApiClient() { - return new Webflow({ - token: this._authToken(), + webflowClient() { + return new WebflowClient({ + accessToken: this._authToken(), }); }, - /** - * Create a Webflow webhook; - * - * @param {siteId} ID of the site to be monitored. - * @param {url} URL to webhook return. - * @param {triggerType} Type of event that will be triggered. - * @param {filter} Filters to be applied in webhook. - * - * @returns {params} The Webflow webhook. - */ - async createWebhook(siteId, url, triggerType, filter = {}) { - const apiClient = this._createApiClient(); - - return apiClient.createWebhook({ - siteId, - triggerType, - url, - filter, - }); + async createWebhook(siteId, data) { + return this.webflowClient().webhooks.create(siteId, data); }, - /** - * Remove a Webflow webhook; - * - * @param {siteId} ID of the site. - * @param {webhookId} ID of the webhook. - */ - async removeWebhook(siteId, webhookId) { - const apiClient = this._createApiClient(); - return apiClient.removeWebhook({ - siteId, - webhookId, - }); + async removeWebhook(webhookId) { + return this.webflowClient().webhooks.delete(webhookId); }, - /** - * Get an order; - * - * @param {options} Options to filter the order. - * - * @returns {params} An order. - */ - async getOrder({ - siteId, orderId, - }) { - const apiClient = this._createApiClient(); - - return apiClient.get(`/sites/${siteId}/order/${orderId}`); - }, - /** - * Get a list of orders; - * - * @param {options} Options to filter the orders. - * - * @returns {params} A list of orders. - */ - async getOrders({ - page, siteId, status, + async getOrder(siteId, orderId) { + return this.webflowClient().orders.get(siteId, orderId); + }, + async listOrders({ + page: offset = 0, siteId, status, }) { - const apiClient = this._createApiClient(); - - return apiClient.get(`/sites/${siteId}/orders`, { - status: status, - offset: page ?? 0, - limit: constants.LIMIT, + const response = await this.webflowClient().orders.list(siteId, { + offset, + status, }); + return response?.orders; }, - /** - * Get a list of domains; - * - * @param {options} Options to filter the domains. - * - * @returns {params} A list of domains. - */ - async getDomains(siteId) { - const webflow = this._createApiClient(); - - return await webflow.domains({ - siteId, - }); + async listDomains(siteId) { + const response = await this.webflowClient().sites.getCustomDomain(siteId); + return response?.customDomains; }, - /** - * Get a site; - * - * @param {options} Options to filter the site. - * - * @returns {params} A site. - */ - async getSite(siteId) { - const webflow = this._createApiClient(); - - return await webflow.site({ - siteId, - }); + getSite(siteId) { + return this.webflowClient().sites.get(siteId); }, - /** - * Get a list of sites; - * - * @param {options} Options to filter the sites. - * - * @returns {params} A list of sites. - */ - async getSites() { - const webflow = this._createApiClient(); - - return await webflow.sites(); - }, - /** - * Get a collection; - * - * @param {options} Options to filter the collection. - * - * @returns {params} A collection. - */ - async getCollection(collectionId) { - const webflow = this._createApiClient(); - - return await webflow.collection({ - collectionId, - }); + async listSites() { + const response = await this.webflowClient().sites.list(); + return response?.sites; }, - /** - * Get a list of collections; - * - * @param {options} Options to filter the collections. - * - * @returns {params} A list of collections. - */ - async getCollections(siteId) { - const webflow = this._createApiClient(); - + getCollection(collectionId) { + return this.webflowClient().collections.get(collectionId); + }, + async listCollections(siteId) { if (!siteId) return []; - return await webflow.collections({ - siteId: siteId, - }); + const response = await this.webflowClient().collections.list(siteId); + return response?.collections; }, - /** - * Get a list of items; - * - * @param {options} Options to filter the items. - * - * @returns {params} A list of items. - */ - async getItems(page = 0, collectionId) { - const webflow = this._createApiClient(); - + async listCollectionItems(page = 0, collectionId) { if (!collectionId) return []; - const response = await webflow.items({ - collectionId, - }, { + const response = await this.webflowClient().collections.items.listItems(collectionId, { limit: constants.LIMIT, offset: page, }); - return response; + return response?.items; + }, + getCollectionItem(collectionId, itemId) { + return this.webflowClient().collections.items.getItem(collectionId, itemId); + }, + deleteCollectionItem(collectionId, itemId) { + return this.webflowClient().collections.items.deleteItem(collectionId, itemId); + }, + createCollectionItem(collectionId, data) { + return this.webflowClient().collections.items.createItem(collectionId, data); + }, + updateCollectionItem(collectionId, itemId, data) { + return this.webflowClient().collections.items.updateItem(collectionId, itemId, data); + }, + getCollectionItemInventory(collectionId, itemId) { + return this.webflowClient().inventory.list(collectionId, itemId); + }, + updateCollectionItemInventory(collectionId, itemId, data) { + return this.webflowClient().inventory.update(collectionId, itemId, data); + }, + publishSite(siteId, customDomains) { + return this.webflowClient().sites.publish(siteId, { + customDomains, + }); + }, + fulfillOrder(siteId, orderId, data) { + return this.webflowClient().orders.updateFulfill(siteId, orderId, data); + }, + unfulfillOrder(siteId, orderId) { + return this.webflowClient().orders.updateUnfulfill(siteId, orderId); + }, + refundOrder(siteId, orderId) { + return this.webflowClient().orders.refund(siteId, orderId); + }, + updateOrder(siteId, orderId, data) { + return this.webflowClient().orders.update(siteId, orderId, data); }, }, }; diff --git a/components/webflow_v2/package.json b/components/webflow_v2/package.json deleted file mode 100644 index b2808e9dcb729..0000000000000 --- a/components/webflow_v2/package.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "name": "@pipedream/webflow_v2", - "version": "0.1.0", - "description": "Pipedream Webflow (v2) Components", - "main": "webflow_v2.app.mjs", - "keywords": [ - "pipedream", - "webflow_v2" - ], - "homepage": "https://pipedream.com/apps/webflow_v2", - "author": "Pipedream (https://pipedream.com/)", - "dependencies": { - "@pipedream/platform": "^3.0.3", - "webflow-api": "2.4.2" - }, - "publishConfig": { - "access": "public" - } -} diff --git a/components/webflow_v2/webflow_v2.app.mjs b/components/webflow_v2/webflow_v2.app.mjs deleted file mode 100644 index a0683c658dce7..0000000000000 --- a/components/webflow_v2/webflow_v2.app.mjs +++ /dev/null @@ -1,170 +0,0 @@ -import { WebflowClient } from "webflow-api"; -import constants from "./common/constants.mjs"; - -export default { - type: "app", - app: "webflow_v2", - propDefinitions: { - domains: { - label: "Custom Domains", - description: "Select one or more custom domains to publish.", - type: "string[]", - async options({ siteId }) { - const domains = await this.listDomains(siteId); - return domains.map((id, url) => ({ - label: url, - id, - })); - }, - }, - sites: { - label: "Site", - description: "Select a site or provide a custom site ID.", - type: "string", - async options() { - const sites = await this.listSites(); - - return sites.map((site) => ({ - label: site.displayName || site.shortName, - value: site.id, - })); - }, - }, - collections: { - label: "Collection", - description: "Select a collection or provide a custom collection ID.", - type: "string", - async options({ siteId }) { - const collections = await this.listCollections(siteId); - - return collections.map((collection) => ({ - label: collection.displayName || collection.slug, - value: collection.id, - })); - }, - }, - items: { - label: "Item", - description: "Select an item or provide a custom item ID.", - type: "string", - async options({ - collectionId, page, - }) { - const items = await this.listCollectionItems(page, collectionId); - - return items.map((item) => ({ - label: item.fieldData?.name || item.fieldData?.slug, - value: item.id, - })); - }, - }, - orders: { - label: "Order", - description: "Select an order, or provide a custom order ID.", - type: "string", - async options({ - siteId, page, - }) { - const items = await this.listOrders({ - page, - siteId, - }); - - return items.map((item) => item.orderId); - }, - }, - }, - methods: { - _authToken() { - return this.$auth.oauth_access_token; - }, - webflowClient() { - return new WebflowClient({ - accessToken: this._authToken(), - }); - }, - async createWebhook(siteId, data) { - return this.webflowClient().webhooks.create(siteId, data); - }, - async removeWebhook(webhookId) { - return this.webflowClient().webhooks.delete(webhookId); - }, - async getOrder(siteId, orderId) { - return this.webflowClient().orders.get(siteId, orderId); - }, - async listOrders({ - page: offset = 0, siteId, status, - }) { - const response = await this.webflowClient().orders.list(siteId, { - offset, - status, - }); - return response?.orders; - }, - async listDomains(siteId) { - const response = await this.webflowClient().sites.getCustomDomain(siteId); - return response?.customDomains; - }, - getSite(siteId) { - return this.webflowClient().sites.get(siteId); - }, - async listSites() { - const response = await this.webflowClient().sites.list(); - return response?.sites; - }, - getCollection(collectionId) { - return this.webflowClient().collections.get(collectionId); - }, - async listCollections(siteId) { - if (!siteId) return []; - - const response = await this.webflowClient().collections.list(siteId); - return response?.collections; - }, - async listCollectionItems(page = 0, collectionId) { - if (!collectionId) return []; - - const response = await this.webflowClient().collections.items.listItems(collectionId, { - limit: constants.LIMIT, - offset: page, - }); - - return response?.items; - }, - getCollectionItem(collectionId, itemId) { - return this.webflowClient().collections.items.getItem(collectionId, itemId); - }, - deleteCollectionItem(collectionId, itemId) { - return this.webflowClient().collections.items.deleteItem(collectionId, itemId); - }, - createCollectionItem(collectionId, data) { - return this.webflowClient().collections.items.createItem(collectionId, data); - }, - updateCollectionItem(collectionId, itemId, data) { - return this.webflowClient().collections.items.updateItem(collectionId, itemId, data); - }, - getCollectionItemInventory(collectionId, itemId) { - return this.webflowClient().inventory.list(collectionId, itemId); - }, - updateCollectionItemInventory(collectionId, itemId, data) { - return this.webflowClient().inventory.update(collectionId, itemId, data); - }, - publishSite(siteId, customDomains) { - return this.webflowClient().sites.publish(siteId, { - customDomains, - }); - }, - fulfillOrder(siteId, orderId, data) { - return this.webflowClient().orders.updateFulfill(siteId, orderId, data); - }, - unfulfillOrder(siteId, orderId) { - return this.webflowClient().orders.updateUnfulfill(siteId, orderId); - }, - refundOrder(siteId, orderId) { - return this.webflowClient().orders.refund(siteId, orderId); - }, - updateOrder(siteId, orderId, data) { - return this.webflowClient().orders.update(siteId, orderId, data); - }, - }, -}; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 644468cb00f53..f59e45263b249 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -11314,15 +11314,6 @@ importers: components/weaviate: {} components/webflow: - dependencies: - '@pipedream/platform': - specifier: ^1.1.0 - version: 1.6.6 - webflow-api: - specifier: 1.3.1 - version: 1.3.1 - - components/webflow_v2: dependencies: '@pipedream/platform': specifier: ^3.0.3 @@ -23784,9 +23775,6 @@ packages: resolution: {integrity: sha512-d2JWLCivmZYTSIoge9MsgFCZrt571BikcWGYkjC1khllbTeDlGqZ2D8vD8E/lJa8WGWbb7Plm8/XJYV7IJHZZw==} engines: {node: '>= 8'} - webflow-api@1.3.1: - resolution: {integrity: sha512-ij/Y7t7VqeS2doOhHaCSToKkZeItFwkgCS003mqbG6d51eUmihcJ2ri4SOiR3zTxmUYZO+sg1sF+aAqsY7tgiA==} - webflow-api@2.4.2: resolution: {integrity: sha512-+znE6V6E6YULwZIGIk8NLFZaimGFH7xVEAjCeivHz4gV13Zcg4FRXyhWxxTHnOYBwKjcjDoaWl8ZK1H9mUA5mQ==} @@ -40002,12 +39990,6 @@ snapshots: web-streams-polyfill@3.3.3: {} - webflow-api@1.3.1: - dependencies: - axios: 1.7.7(debug@3.2.7) - transitivePeerDependencies: - - debug - webflow-api@2.4.2: dependencies: form-data: 4.0.1