From ae484832d7e681be2ecae0383e74a070a2aeb72c Mon Sep 17 00:00:00 2001 From: Alyson Freitas Date: Fri, 26 Aug 2022 11:13:01 -0300 Subject: [PATCH 1/3] wildberries - list orders action --- .../actions/list-orders/list-orders.ts | 99 +++++++++++++++++++ components/wildberries/app/wildberries.app.ts | 45 ++++++++- components/wildberries/package.json | 9 +- components/wildberries/tsconfig.json | 21 ++++ pnpm-lock.yaml | 32 +++--- 5 files changed, 187 insertions(+), 19 deletions(-) create mode 100644 components/wildberries/actions/list-orders/list-orders.ts create mode 100644 components/wildberries/tsconfig.json diff --git a/components/wildberries/actions/list-orders/list-orders.ts b/components/wildberries/actions/list-orders/list-orders.ts new file mode 100644 index 0000000000000..8b5341e34a8d2 --- /dev/null +++ b/components/wildberries/actions/list-orders/list-orders.ts @@ -0,0 +1,99 @@ +import app from "../../app/wildberries.app"; +import { defineAction } from "@pipedream/types"; + +export default defineAction({ + name: "List Orders", + description: "Returns a list of orders. [See docs](https://suppliers-api.wildberries.ru/swagger/index.html#/Marketplace/get_api_v2_orders)", + key: "wildberries-list-orders", + version: "0.0.2", + type: "action", + props: { + app, + dateStart: { + type: "string", + label: "Starting date", + description: "Starting date for querying", + }, + dateEnd: { + type: "string", + label: "End date", + description: "Ending date for querying", + optional: true, + }, + status: { + type: "integer", + label: "Status", + description: "Select by status", + optional: true, + options: [ + { + label: "New order", + value: 0, + }, + { + label: "Accepted the order", + value: 1, + }, + { + label: "Assembly task completed", + value: 2, + }, + { + label: "Assembly order rejected", + value: 3, + }, + { + label: "On delivery by courier", + value: 5, + }, + { + label: "The client received the goods (courier delivery and pickup)", + value: 6, + }, + { + label: "The client did not accept the goods (courier delivery and pickup)", + value: 7, + }, + { + label: "Goods for pickup from the store accepted for work", + value: 8, + }, + { + label: "Product for self-pickup from the store is ready for pickup", + value: 9, + }, + ], + }, + take: { + type: "integer", + label: "Take", + description: "How many records to return at a time.", + default: 10, + }, + skip: { + type: "integer", + label: "Skip", + description: "How many records to skip.", + default: 0, + }, + orderId: { + type: "integer", + label: "Order Id", + description: "Select by order id", + optional: true, + }, + }, + async run({ $ }) { + const params = { + date_start: this.dateStart, + date_end: this.dateEnd, + status: this.status, + take: this.take, + skip: this.skip, + id: this.orderId, + }; + const ordersWrapper = await this.app.listOrders($, params); + $.export("$summary", `Successfully fetched ${ordersWrapper.orders.length} orders`); + return ordersWrapper; + }, +}); diff --git a/components/wildberries/app/wildberries.app.ts b/components/wildberries/app/wildberries.app.ts index 2e31c59b0e260..61fed87c764fd 100644 --- a/components/wildberries/app/wildberries.app.ts +++ b/components/wildberries/app/wildberries.app.ts @@ -1,13 +1,50 @@ import { defineApp } from "@pipedream/types"; +import { axios } from "@pipedream/platform"; export default defineApp({ type: "app", app: "wildberries", propDefinitions: {}, methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); + _getBaseUrl() { + return "https://suppliers-api.wildberries.ru/api/v2"; + }, + _getHeaders() { + return { + "content-type": "application/json", + "Authorization": `Bearer ${this.$auth.api_key}`, + }; + }, + _getRequestParams(opts) { + return { + ...opts, + url: this._getBaseUrl() + opts.path, + headers: this._getHeaders(), + }; + }, + async listOrders($ = this, params) { + const response = await axios($, this._getRequestParams({ + method: "GET", + path: "/orders", + params: this.filterEmptyValues(params), + })); + return response; + }, + filterEmptyValues(obj) { + return Object.entries(obj) + .reduce((reduction, + [ + key, + value, + ]) => { + if (value === undefined || value === null) { + return reduction; + } + return { + ...reduction, + [key]: value, + }; + }, {}); }, }, -}); \ No newline at end of file +}); diff --git a/components/wildberries/package.json b/components/wildberries/package.json index dce6577b43783..17f36118a0161 100644 --- a/components/wildberries/package.json +++ b/components/wildberries/package.json @@ -7,11 +7,16 @@ "pipedream", "wildberries" ], - "files": ["dist"], + "files": [ + "dist" + ], "homepage": "https://pipedream.com/apps/wildberries", "author": "Pipedream (https://pipedream.com/)", "license": "MIT", "publishConfig": { "access": "public" + }, + "dependencies": { + "@pipedream/platform": "^1.1.1" } -} \ No newline at end of file +} diff --git a/components/wildberries/tsconfig.json b/components/wildberries/tsconfig.json new file mode 100644 index 0000000000000..335fa6f1cf6ec --- /dev/null +++ b/components/wildberries/tsconfig.json @@ -0,0 +1,21 @@ +{ + "compilerOptions": { + "lib": ["es2020"], + "module": "ES2020", + "target": "ES2020", + "moduleResolution": "node", + "listEmittedFiles": true, // Used as a part of the build task, since we need to pass emitted files to our post-build script + "composite": true, + "outDir": "dist", + "allowSyntheticDefaultImports": true, + }, + "allowJs": true, + "include": [ + "app", + "actions", + "sources" + ], + "exclude": [ + "dist", + ] + } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 38a93d7e09eca..61a82f41ccdf6 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1378,6 +1378,9 @@ importers: components/pretix: specifiers: {} + components/productboard: + specifiers: {} + components/profitwell: specifiers: {} @@ -2043,7 +2046,10 @@ importers: specifiers: {} components/wildberries: - specifiers: {} + specifiers: + '@pipedream/platform': ^1.1.1 + dependencies: + '@pipedream/platform': 1.1.1 components/wistia: specifiers: @@ -5114,22 +5120,22 @@ packages: kuler: 2.0.0 dev: false - /@definitelytyped/header-parser/0.0.125: - resolution: {integrity: sha512-tZArX/8jGkFUIxAz/H0YAicEtY7dF6ZmFL0/PDhK6JKpiUaoDgDRy/0G0e18fLZ4LcxhbK4HYX8VeYgyg3SfGw==} + /@definitelytyped/header-parser/0.0.126: + resolution: {integrity: sha512-gOCZqdH0PNhC0q+3HZtB2ju8eDSrE9dN2kaoJP6Fbsv/oPLv3wOIWHvO2VP9+zMK5ZKdamOF7K0Wu+Mf51D9HQ==} dependencies: - '@definitelytyped/typescript-versions': 0.0.125 + '@definitelytyped/typescript-versions': 0.0.126 '@types/parsimmon': 1.10.6 parsimmon: 1.18.1 dev: true - /@definitelytyped/typescript-versions/0.0.125: - resolution: {integrity: sha512-3HVTcXACY5u5N+AF4RS2BeDx0+L5tlsWPitEWxnjTlurJcsiXVL3QqYS4xbguf7NmK8vP1vMvykC3C3WlXbiOw==} + /@definitelytyped/typescript-versions/0.0.126: + resolution: {integrity: sha512-9lH5Gc/dO4JkvdMbtXh6824qy5D3P108ZAcaQiLpcZiH5KgE4fWeUF6bk5WpXp4iRWe5d5Ncyyge1vcM+R90dw==} dev: true - /@definitelytyped/utils/0.0.125: - resolution: {integrity: sha512-C2mFFlmsqi0nQvup8+PsCGk+N1+KFWMHok/KXzijZvuTfEHqeWiIrAMScImu2IQ+JflnvXglSYtmoL/OdvCwvw==} + /@definitelytyped/utils/0.0.126: + resolution: {integrity: sha512-P6fFx6PoiRGLr/MgxlpcN5yHJHjIlkC1qy/h0HnU6w6wydLtogZ1mRF1WYYEAovJa42TYFVZLvR/MCuCZwtlAg==} dependencies: - '@definitelytyped/typescript-versions': 0.0.125 + '@definitelytyped/typescript-versions': 0.0.126 '@qiwi/npm-registry-client': 8.9.1 '@types/node': 14.18.22 charm: 1.0.2 @@ -10594,7 +10600,7 @@ packages: peerDependencies: typescript: '*' dependencies: - '@definitelytyped/header-parser': 0.0.125 + '@definitelytyped/header-parser': 0.0.126 command-exists: 1.2.9 rimraf: 3.0.2 semver: 6.3.0 @@ -10610,9 +10616,9 @@ packages: peerDependencies: typescript: '>= 3.0.0-dev || >= 3.1.0-dev || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.7.0-dev || >= 3.8.0-dev || >= 3.9.0-dev || >= 4.0.0-dev' dependencies: - '@definitelytyped/header-parser': 0.0.125 - '@definitelytyped/typescript-versions': 0.0.125 - '@definitelytyped/utils': 0.0.125 + '@definitelytyped/header-parser': 0.0.126 + '@definitelytyped/typescript-versions': 0.0.126 + '@definitelytyped/utils': 0.0.126 dts-critic: 3.3.11_typescript@4.7.4 fs-extra: 6.0.1 json-stable-stringify: 1.0.1 From 7810c936d91c04d077de0395fe9acb76a1817ddb Mon Sep 17 00:00:00 2001 From: Alyson Freitas Date: Sat, 27 Aug 2022 19:06:55 -0300 Subject: [PATCH 2/3] wildberries - list order stickers (regular and by pdf), update order status, improving list orders --- .../wildberries/actions/common/common.ts | 44 ++++++++++++ .../list-order-stickers.ts | 42 +++++++++++ .../actions/list-orders/list-orders.ts | 70 +++++-------------- .../update-order-status.ts | 46 ++++++++++++ components/wildberries/app/wildberries.app.ts | 42 ++++++++++- 5 files changed, 192 insertions(+), 52 deletions(-) create mode 100644 components/wildberries/actions/common/common.ts create mode 100644 components/wildberries/actions/list-order-stickers/list-order-stickers.ts create mode 100644 components/wildberries/actions/update-order-status/update-order-status.ts diff --git a/components/wildberries/actions/common/common.ts b/components/wildberries/actions/common/common.ts new file mode 100644 index 0000000000000..792fcfebbb683 --- /dev/null +++ b/components/wildberries/actions/common/common.ts @@ -0,0 +1,44 @@ +export default { + stickersRequestType: [ + "code128", + "qr", + ], + orderStatus: [ + { + label: "New order", + value: "0", + }, + { + label: "Accepted the order", + value: "1", + }, + { + label: "Assembly task completed", + value: "2", + }, + { + label: "Assembly order rejected", + value: "3", + }, + { + label: "On delivery by courier", + value: "5", + }, + { + label: "The client received the goods (courier delivery and pickup)", + value: "6", + }, + { + label: "The client did not accept the goods (courier delivery and pickup)", + value: "7", + }, + { + label: "Goods for pickup from the store accepted for work", + value: "8", + }, + { + label: "Product for self-pickup from the store is ready for pickup", + value: "9", + }, + ], +}; diff --git a/components/wildberries/actions/list-order-stickers/list-order-stickers.ts b/components/wildberries/actions/list-order-stickers/list-order-stickers.ts new file mode 100644 index 0000000000000..2429b72aff25e --- /dev/null +++ b/components/wildberries/actions/list-order-stickers/list-order-stickers.ts @@ -0,0 +1,42 @@ +import app from "../../app/wildberries.app"; +import common from "../common/common"; +import { defineAction } from "@pipedream/types"; + +export default defineAction({ + name: "List Order Stickers", + description: "List order stickers. [See docs](https://suppliers-api.wildberries.ru/swagger/index.html#/Marketplace/post_api_v2_orders_stickers)", + key: "wildberries-list-order-stickers", + version: "0.0.1", + type: "action", + props: { + app, + orderIds: { + propDefinition: [ + app, + "orderIds", + ], + }, + type: { + label: "Type", + type: "string", + description: "Sticker type, default: code128.", + default: "code128", + options: common.stickersRequestType, + }, + asPdf: { + type: "boolean", + label: "List as PDF", + description: "Set true for use the PDF API [See docs](https://suppliers-api.wildberries.ru/swagger/index.html#/Marketplace/post_api_v2_orders_stickers_pdf).", + default: false, + }, + }, + async run({ $ }) { + const params = { + orderIds: this.orderIds, + type: this.type, + }; + const response = await this.app.listOrderStickers($, params, this.asPdf); + $.export("$summary", `Successfully listed stickers for ${this.orderIds.length} orders.`); + return response; + }, +}); diff --git a/components/wildberries/actions/list-orders/list-orders.ts b/components/wildberries/actions/list-orders/list-orders.ts index 8b5341e34a8d2..9657045ec100a 100644 --- a/components/wildberries/actions/list-orders/list-orders.ts +++ b/components/wildberries/actions/list-orders/list-orders.ts @@ -5,64 +5,28 @@ export default defineAction({ name: "List Orders", description: "Returns a list of orders. [See docs](https://suppliers-api.wildberries.ru/swagger/index.html#/Marketplace/get_api_v2_orders)", key: "wildberries-list-orders", - version: "0.0.2", + version: "0.0.1", type: "action", props: { app, dateStart: { type: "string", label: "Starting date", - description: "Starting date for querying", + description: "Starting date for querying in [RFC3339](https://www.rfc-editor.org/rfc/rfc3339) format.", }, dateEnd: { type: "string", - label: "End date", - description: "Ending date for querying", + label: "Ending date", + description: "Ending date for querying in [RFC3339](https://www.rfc-editor.org/rfc/rfc3339) format.", optional: true, }, status: { - type: "integer", - label: "Status", - description: "Select by status", - optional: true, - options: [ - { - label: "New order", - value: 0, - }, - { - label: "Accepted the order", - value: 1, - }, - { - label: "Assembly task completed", - value: 2, - }, - { - label: "Assembly order rejected", - value: 3, - }, - { - label: "On delivery by courier", - value: 5, - }, - { - label: "The client received the goods (courier delivery and pickup)", - value: 6, - }, - { - label: "The client did not accept the goods (courier delivery and pickup)", - value: 7, - }, - { - label: "Goods for pickup from the store accepted for work", - value: 8, - }, - { - label: "Product for self-pickup from the store is ready for pickup", - value: 9, - }, + propDefinition: [ + app, + "status", ], + optional: true, + description: "Select by status", }, take: { type: "integer", @@ -77,8 +41,10 @@ export default defineAction({ default: 0, }, orderId: { - type: "integer", - label: "Order Id", + propDefinition: [ + app, + "orderId", + ], description: "Select by order id", optional: true, }, @@ -87,13 +53,15 @@ export default defineAction({ const params = { date_start: this.dateStart, date_end: this.dateEnd, - status: this.status, + status: typeof (this.status) !== "undefined" ? + parseInt(this.status) : + null, take: this.take, skip: this.skip, id: this.orderId, }; - const ordersWrapper = await this.app.listOrders($, params); - $.export("$summary", `Successfully fetched ${ordersWrapper.orders.length} orders`); - return ordersWrapper; + const response = await this.app.listOrders($, params); + $.export("$summary", `Successfully fetched ${response.orders.length} orders`); + return response; }, }); diff --git a/components/wildberries/actions/update-order-status/update-order-status.ts b/components/wildberries/actions/update-order-status/update-order-status.ts new file mode 100644 index 0000000000000..7b08b5b715059 --- /dev/null +++ b/components/wildberries/actions/update-order-status/update-order-status.ts @@ -0,0 +1,46 @@ +import app from "../../app/wildberries.app"; +import { defineAction } from "@pipedream/types"; + +export default defineAction({ + name: "Update Order Status", + description: "Update a order status. [See docs](https://suppliers-api.wildberries.ru/swagger/index.html#/Marketplace/put_api_v2_orders)", + key: "wildberries-update-order-status", + version: "0.0.1", + type: "action", + props: { + app, + orderId: { + propDefinition: [ + app, + "orderId", + ], + }, + status: { + propDefinition: [ + app, + "status", + ], + }, + sgtin: { + type: "any", + label: "SGTIN", + description: "Array required only for pharmaceutical products when they are transferred to status `Customer received the goods`.\n\n**Example:** `[{ code: string, numerator: integer, denominator: integer, sid: integer }]`\n\n[See docs](https://suppliers-api.wildberries.ru/swagger/index.html#/Marketplace/put_api_v2_orders)", + optional: true, + }, + }, + async run({ $ }) { + const params = { + orderId: this.orderId, + status: parseInt(this.status), + sgtin: null, + }; + if (this.sgtin && !Array.isArray(this.sgtin)) { + params.sgtin = [ + this.sgtin, + ]; + } + const response = await this.app.updateOrderStatus($, params); + $.export("$summary", `Successfully updated the status for order: ${this.orderId}`); + return response; + }, +}); diff --git a/components/wildberries/app/wildberries.app.ts b/components/wildberries/app/wildberries.app.ts index 61fed87c764fd..50edcdcf17b5e 100644 --- a/components/wildberries/app/wildberries.app.ts +++ b/components/wildberries/app/wildberries.app.ts @@ -1,10 +1,28 @@ import { defineApp } from "@pipedream/types"; import { axios } from "@pipedream/platform"; +import common from "../actions/common/common"; export default defineApp({ type: "app", app: "wildberries", - propDefinitions: {}, + propDefinitions: { + orderId: { + type: "integer", + label: "Order id", + description: "Set the Order Id.", + }, + orderIds: { + type: "integer[]", + label: "Order ids", + description: "Array of order ids.\n\n**Example:**`[8423848, 6436344]`", + }, + status: { + label: "Status", + type: "string", + description: "Set the new status of the order.", + options: common.orderStatus, + }, + }, methods: { _getBaseUrl() { return "https://suppliers-api.wildberries.ru/api/v2"; @@ -30,6 +48,28 @@ export default defineApp({ })); return response; }, + async updateOrderStatus($ = this, params) { + const response = await axios($, this._getRequestParams({ + method: "PUT", + path: "/orders", + data: [ + this.filterEmptyValues(params), + ], + })); + return response; + }, + async listOrderStickers($ = this, params, asPdf) { + let path = "/orders/stickers"; + if (asPdf) { + path += "/pdf"; + } + const response = await axios($, this._getRequestParams({ + method: "POST", + path, + data: this.filterEmptyValues(params), + })); + return response; + }, filterEmptyValues(obj) { return Object.entries(obj) .reduce((reduction, From 8f2bde8bff7656decfc64fcc7bc34552c37c0538 Mon Sep 17 00:00:00 2001 From: Alyson Freitas Date: Tue, 30 Aug 2022 22:54:18 -0300 Subject: [PATCH 3/3] wildberries requested changes --- .../actions/common/{common.ts => constants.ts} | 4 ++-- .../actions/list-order-stickers/list-order-stickers.ts | 10 +++++----- .../wildberries/actions/list-orders/list-orders.ts | 2 +- .../actions/update-order-status/update-order-status.ts | 6 +++--- components/wildberries/app/wildberries.app.ts | 4 ++-- 5 files changed, 13 insertions(+), 13 deletions(-) rename components/wildberries/actions/common/{common.ts => constants.ts} (94%) diff --git a/components/wildberries/actions/common/common.ts b/components/wildberries/actions/common/constants.ts similarity index 94% rename from components/wildberries/actions/common/common.ts rename to components/wildberries/actions/common/constants.ts index 792fcfebbb683..fc42da2b6446f 100644 --- a/components/wildberries/actions/common/common.ts +++ b/components/wildberries/actions/common/constants.ts @@ -1,9 +1,9 @@ export default { - stickersRequestType: [ + STICKERS_REQUEST_TYPE: [ "code128", "qr", ], - orderStatus: [ + ORDER_STATUSES: [ { label: "New order", value: "0", diff --git a/components/wildberries/actions/list-order-stickers/list-order-stickers.ts b/components/wildberries/actions/list-order-stickers/list-order-stickers.ts index 2429b72aff25e..3934e0dd32d8a 100644 --- a/components/wildberries/actions/list-order-stickers/list-order-stickers.ts +++ b/components/wildberries/actions/list-order-stickers/list-order-stickers.ts @@ -1,10 +1,10 @@ import app from "../../app/wildberries.app"; -import common from "../common/common"; +import constants from "../common/constants"; import { defineAction } from "@pipedream/types"; export default defineAction({ name: "List Order Stickers", - description: "List order stickers. [See docs](https://suppliers-api.wildberries.ru/swagger/index.html#/Marketplace/post_api_v2_orders_stickers)", + description: "List order stickers. [See docs here](https://suppliers-api.wildberries.ru/swagger/index.html#/Marketplace/post_api_v2_orders_stickers)", key: "wildberries-list-order-stickers", version: "0.0.1", type: "action", @@ -19,14 +19,14 @@ export default defineAction({ type: { label: "Type", type: "string", - description: "Sticker type, default: code128.", + description: "Sticker type, default: `code128`.", default: "code128", - options: common.stickersRequestType, + options: constants.STICKERS_REQUEST_TYPE, }, asPdf: { type: "boolean", label: "List as PDF", - description: "Set true for use the PDF API [See docs](https://suppliers-api.wildberries.ru/swagger/index.html#/Marketplace/post_api_v2_orders_stickers_pdf).", + description: "Set true for use the PDF API [See docs here](https://suppliers-api.wildberries.ru/swagger/index.html#/Marketplace/post_api_v2_orders_stickers_pdf).", default: false, }, }, diff --git a/components/wildberries/actions/list-orders/list-orders.ts b/components/wildberries/actions/list-orders/list-orders.ts index 9657045ec100a..5f9bfd8b0336d 100644 --- a/components/wildberries/actions/list-orders/list-orders.ts +++ b/components/wildberries/actions/list-orders/list-orders.ts @@ -3,7 +3,7 @@ import { defineAction } from "@pipedream/types"; export default defineAction({ name: "List Orders", - description: "Returns a list of orders. [See docs](https://suppliers-api.wildberries.ru/swagger/index.html#/Marketplace/get_api_v2_orders)", + description: "Returns a list of orders. [See docs here](https://suppliers-api.wildberries.ru/swagger/index.html#/Marketplace/get_api_v2_orders)", key: "wildberries-list-orders", version: "0.0.1", type: "action", diff --git a/components/wildberries/actions/update-order-status/update-order-status.ts b/components/wildberries/actions/update-order-status/update-order-status.ts index 7b08b5b715059..da498b9dd4b00 100644 --- a/components/wildberries/actions/update-order-status/update-order-status.ts +++ b/components/wildberries/actions/update-order-status/update-order-status.ts @@ -3,7 +3,7 @@ import { defineAction } from "@pipedream/types"; export default defineAction({ name: "Update Order Status", - description: "Update a order status. [See docs](https://suppliers-api.wildberries.ru/swagger/index.html#/Marketplace/put_api_v2_orders)", + description: "Update a order status. [See docs here](https://suppliers-api.wildberries.ru/swagger/index.html#/Marketplace/put_api_v2_orders)", key: "wildberries-update-order-status", version: "0.0.1", type: "action", @@ -24,7 +24,7 @@ export default defineAction({ sgtin: { type: "any", label: "SGTIN", - description: "Array required only for pharmaceutical products when they are transferred to status `Customer received the goods`.\n\n**Example:** `[{ code: string, numerator: integer, denominator: integer, sid: integer }]`\n\n[See docs](https://suppliers-api.wildberries.ru/swagger/index.html#/Marketplace/put_api_v2_orders)", + description: "Array required only for pharmaceutical products when they are transferred to status `Customer received the goods`.\n\n**Example:** `[{ code: string, numerator: integer, denominator: integer, sid: integer }]`\n\n[See docs here](https://suppliers-api.wildberries.ru/swagger/index.html#/Marketplace/put_api_v2_orders)", optional: true, }, }, @@ -32,7 +32,7 @@ export default defineAction({ const params = { orderId: this.orderId, status: parseInt(this.status), - sgtin: null, + sgtin: this.sgtin, }; if (this.sgtin && !Array.isArray(this.sgtin)) { params.sgtin = [ diff --git a/components/wildberries/app/wildberries.app.ts b/components/wildberries/app/wildberries.app.ts index 50edcdcf17b5e..37890edfda053 100644 --- a/components/wildberries/app/wildberries.app.ts +++ b/components/wildberries/app/wildberries.app.ts @@ -1,6 +1,6 @@ import { defineApp } from "@pipedream/types"; import { axios } from "@pipedream/platform"; -import common from "../actions/common/common"; +import constants from "../actions/common/constants"; export default defineApp({ type: "app", @@ -20,7 +20,7 @@ export default defineApp({ label: "Status", type: "string", description: "Set the new status of the order.", - options: common.orderStatus, + options: constants.ORDER_STATUSES, }, }, methods: {