@activepieces/piece-bigcommerce 0.1.8 → 0.1.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +7 -12
- package/src/index.js +19 -84
- package/src/index.d.ts +0 -6
- package/src/index.d.ts.map +0 -1
- package/src/index.js.map +0 -1
- package/src/lib/actions/create-a-product.d.ts +0 -14
- package/src/lib/actions/create-a-product.d.ts.map +0 -1
- package/src/lib/actions/create-a-product.js +0 -73
- package/src/lib/actions/create-a-product.js.map +0 -1
- package/src/lib/actions/create-blog-post.d.ts +0 -16
- package/src/lib/actions/create-blog-post.d.ts.map +0 -1
- package/src/lib/actions/create-blog-post.js +0 -80
- package/src/lib/actions/create-blog-post.js.map +0 -1
- package/src/lib/actions/create-customer-address.d.ts +0 -25
- package/src/lib/actions/create-customer-address.d.ts.map +0 -1
- package/src/lib/actions/create-customer-address.js +0 -78
- package/src/lib/actions/create-customer-address.js.map +0 -1
- package/src/lib/actions/create-customer.d.ts +0 -13
- package/src/lib/actions/create-customer.d.ts.map +0 -1
- package/src/lib/actions/create-customer.js +0 -63
- package/src/lib/actions/create-customer.js.map +0 -1
- package/src/lib/actions/delete-a-product.d.ts +0 -8
- package/src/lib/actions/delete-a-product.d.ts.map +0 -1
- package/src/lib/actions/delete-a-product.js +0 -29
- package/src/lib/actions/delete-a-product.js.map +0 -1
- package/src/lib/actions/find-or-create-customer.d.ts +0 -13
- package/src/lib/actions/find-or-create-customer.d.ts.map +0 -1
- package/src/lib/actions/find-or-create-customer.js +0 -75
- package/src/lib/actions/find-or-create-customer.js.map +0 -1
- package/src/lib/actions/find-or-create-customers-address.d.ts +0 -25
- package/src/lib/actions/find-or-create-customers-address.d.ts.map +0 -1
- package/src/lib/actions/find-or-create-customers-address.js +0 -93
- package/src/lib/actions/find-or-create-customers-address.js.map +0 -1
- package/src/lib/actions/find-or-create-product.d.ts +0 -14
- package/src/lib/actions/find-or-create-product.d.ts.map +0 -1
- package/src/lib/actions/find-or-create-product.js +0 -77
- package/src/lib/actions/find-or-create-product.js.map +0 -1
- package/src/lib/actions/get-order.d.ts +0 -8
- package/src/lib/actions/get-order.d.ts.map +0 -1
- package/src/lib/actions/get-order.js +0 -29
- package/src/lib/actions/get-order.js.map +0 -1
- package/src/lib/actions/list-categories.d.ts +0 -8
- package/src/lib/actions/list-categories.d.ts.map +0 -1
- package/src/lib/actions/list-categories.js +0 -32
- package/src/lib/actions/list-categories.js.map +0 -1
- package/src/lib/actions/list-orders.d.ts +0 -9
- package/src/lib/actions/list-orders.d.ts.map +0 -1
- package/src/lib/actions/list-orders.js +0 -39
- package/src/lib/actions/list-orders.js.map +0 -1
- package/src/lib/actions/search-customer-address.d.ts +0 -17
- package/src/lib/actions/search-customer-address.d.ts.map +0 -1
- package/src/lib/actions/search-customer-address.js +0 -38
- package/src/lib/actions/search-customer-address.js.map +0 -1
- package/src/lib/actions/search-customer.d.ts +0 -10
- package/src/lib/actions/search-customer.d.ts.map +0 -1
- package/src/lib/actions/search-customer.js +0 -46
- package/src/lib/actions/search-customer.js.map +0 -1
- package/src/lib/actions/search-product.d.ts +0 -13
- package/src/lib/actions/search-product.d.ts.map +0 -1
- package/src/lib/actions/search-product.js +0 -70
- package/src/lib/actions/search-product.js.map +0 -1
- package/src/lib/actions/update-a-product.d.ts +0 -15
- package/src/lib/actions/update-a-product.d.ts.map +0 -1
- package/src/lib/actions/update-a-product.js +0 -74
- package/src/lib/actions/update-a-product.js.map +0 -1
- package/src/lib/common/auth.d.ts +0 -6
- package/src/lib/common/auth.d.ts.map +0 -1
- package/src/lib/common/auth.js +0 -48
- package/src/lib/common/auth.js.map +0 -1
- package/src/lib/common/constants.d.ts +0 -11
- package/src/lib/common/constants.d.ts.map +0 -1
- package/src/lib/common/constants.js +0 -14
- package/src/lib/common/constants.js.map +0 -1
- package/src/lib/common/props.d.ts +0 -23
- package/src/lib/common/props.d.ts.map +0 -1
- package/src/lib/common/props.js +0 -83
- package/src/lib/common/props.js.map +0 -1
- package/src/lib/common/requests.d.ts +0 -65
- package/src/lib/common/requests.d.ts.map +0 -1
- package/src/lib/common/requests.js +0 -177
- package/src/lib/common/requests.js.map +0 -1
- package/src/lib/triggers/abandoned-cart.d.ts +0 -19
- package/src/lib/triggers/abandoned-cart.d.ts.map +0 -1
- package/src/lib/triggers/abandoned-cart.js +0 -61
- package/src/lib/triggers/abandoned-cart.js.map +0 -1
- package/src/lib/triggers/cart-created.d.ts +0 -19
- package/src/lib/triggers/cart-created.d.ts.map +0 -1
- package/src/lib/triggers/cart-created.js +0 -63
- package/src/lib/triggers/cart-created.js.map +0 -1
- package/src/lib/triggers/customer-address-created.d.ts +0 -19
- package/src/lib/triggers/customer-address-created.d.ts.map +0 -1
- package/src/lib/triggers/customer-address-created.js +0 -63
- package/src/lib/triggers/customer-address-created.js.map +0 -1
- package/src/lib/triggers/customer-address-updated.d.ts +0 -19
- package/src/lib/triggers/customer-address-updated.d.ts.map +0 -1
- package/src/lib/triggers/customer-address-updated.js +0 -63
- package/src/lib/triggers/customer-address-updated.js.map +0 -1
- package/src/lib/triggers/customer-created.d.ts +0 -19
- package/src/lib/triggers/customer-created.d.ts.map +0 -1
- package/src/lib/triggers/customer-created.js +0 -65
- package/src/lib/triggers/customer-created.js.map +0 -1
- package/src/lib/triggers/customer-updated.d.ts +0 -19
- package/src/lib/triggers/customer-updated.d.ts.map +0 -1
- package/src/lib/triggers/customer-updated.js +0 -63
- package/src/lib/triggers/customer-updated.js.map +0 -1
- package/src/lib/triggers/order-created.d.ts +0 -19
- package/src/lib/triggers/order-created.d.ts.map +0 -1
- package/src/lib/triggers/order-created.js +0 -63
- package/src/lib/triggers/order-created.js.map +0 -1
- package/src/lib/triggers/order-status-updated.d.ts +0 -19
- package/src/lib/triggers/order-status-updated.d.ts.map +0 -1
- package/src/lib/triggers/order-status-updated.js +0 -63
- package/src/lib/triggers/order-status-updated.js.map +0 -1
- package/src/lib/triggers/order-updated.d.ts +0 -19
- package/src/lib/triggers/order-updated.d.ts.map +0 -1
- package/src/lib/triggers/order-updated.js +0 -63
- package/src/lib/triggers/order-updated.js.map +0 -1
- package/src/lib/triggers/product-created.d.ts +0 -19
- package/src/lib/triggers/product-created.d.ts.map +0 -1
- package/src/lib/triggers/product-created.js +0 -63
- package/src/lib/triggers/product-created.js.map +0 -1
- package/src/lib/triggers/shipment-created.d.ts +0 -19
- package/src/lib/triggers/shipment-created.d.ts.map +0 -1
- package/src/lib/triggers/shipment-created.js +0 -63
- package/src/lib/triggers/shipment-created.js.map +0 -1
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.findOrCreateProduct = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
|
-
const auth_1 = require("../common/auth");
|
|
7
|
-
const requests_1 = require("../common/requests");
|
|
8
|
-
exports.findOrCreateProduct = (0, pieces_framework_1.createAction)({
|
|
9
|
-
auth: auth_1.bigcommerceAuth,
|
|
10
|
-
name: 'findOrCreateProduct',
|
|
11
|
-
displayName: 'Find or Create Product',
|
|
12
|
-
description: 'Finds or creates a product',
|
|
13
|
-
props: {
|
|
14
|
-
name: pieces_framework_1.Property.ShortText({
|
|
15
|
-
displayName: 'Product Name',
|
|
16
|
-
required: true,
|
|
17
|
-
}),
|
|
18
|
-
sku: pieces_framework_1.Property.ShortText({
|
|
19
|
-
displayName: 'SKU',
|
|
20
|
-
required: false,
|
|
21
|
-
}),
|
|
22
|
-
type: pieces_framework_1.Property.StaticDropdown({
|
|
23
|
-
displayName: 'Product Type',
|
|
24
|
-
required: true,
|
|
25
|
-
options: {
|
|
26
|
-
options: [
|
|
27
|
-
{ label: 'Physical', value: 'physical' },
|
|
28
|
-
{ label: 'Digital', value: 'digital' },
|
|
29
|
-
],
|
|
30
|
-
},
|
|
31
|
-
}),
|
|
32
|
-
weight: pieces_framework_1.Property.Number({
|
|
33
|
-
displayName: 'Weight',
|
|
34
|
-
required: true,
|
|
35
|
-
}),
|
|
36
|
-
price: pieces_framework_1.Property.Number({
|
|
37
|
-
displayName: 'Price',
|
|
38
|
-
required: true,
|
|
39
|
-
}),
|
|
40
|
-
description: pieces_framework_1.Property.LongText({
|
|
41
|
-
displayName: 'Description',
|
|
42
|
-
required: false,
|
|
43
|
-
}),
|
|
44
|
-
brand_id: pieces_framework_1.Property.Number({
|
|
45
|
-
displayName: 'Brand ID',
|
|
46
|
-
description: 'Brand ID',
|
|
47
|
-
required: false,
|
|
48
|
-
}),
|
|
49
|
-
},
|
|
50
|
-
run(context) {
|
|
51
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
52
|
-
const params = new URLSearchParams();
|
|
53
|
-
params.append('name', context.propsValue.name);
|
|
54
|
-
const response = yield requests_1.bigCommerceApiService.fetchProducts({
|
|
55
|
-
auth: context.auth.props,
|
|
56
|
-
queryString: params.toString(),
|
|
57
|
-
});
|
|
58
|
-
if (response.data && response.data.length > 0) {
|
|
59
|
-
return { found: true, data: response.data };
|
|
60
|
-
}
|
|
61
|
-
const newProduct = yield requests_1.bigCommerceApiService.createProduct({
|
|
62
|
-
auth: context.auth.props,
|
|
63
|
-
payload: {
|
|
64
|
-
name: context.propsValue.name,
|
|
65
|
-
type: context.propsValue.type,
|
|
66
|
-
sku: context.propsValue.sku,
|
|
67
|
-
description: context.propsValue.description,
|
|
68
|
-
weight: context.propsValue.weight,
|
|
69
|
-
price: context.propsValue.price,
|
|
70
|
-
brand_id: context.propsValue.brand_id,
|
|
71
|
-
},
|
|
72
|
-
});
|
|
73
|
-
return { found: false, data: newProduct.data };
|
|
74
|
-
});
|
|
75
|
-
},
|
|
76
|
-
});
|
|
77
|
-
//# sourceMappingURL=find-or-create-product.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"find-or-create-product.js","sourceRoot":"","sources":["../../../../src/lib/actions/find-or-create-product.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AAE,CAAC;YACrC,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;YAE/C,MAAM,QAAQ,GAAG,MAAM,gCAAqB,CAAC,aAAa,CAAC;gBACzD,IAAI,EAAE,OAAO,CAAC,IAAI,CAAC,KAAK;gBACxB,WAAW,EAAE,MAAM,CAAC,QAAQ,EAAE;aAC/B,CAAC,CAAC;YAEH,IAAI,QAAQ,CAAC,IAAI,IAAI,QAAQ,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;gBAC9C,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,CAAC,IAAI,EAAE,CAAC;YAC9C,CAAC;YAED,MAAM,UAAU,GAAG,MAAM,gCAAqB,CAAC,aAAa,CAAC;gBAC3D,IAAI,EAAE,OAAO,CAAC,IAAI,CAAC,KAAK;gBACxB,OAAO,EAAE;oBACP,IAAI,EAAE,OAAO,CAAC,UAAU,CAAC,IAAI;oBAC7B,IAAI,EAAE,OAAO,CAAC,UAAU,CAAC,IAAI;oBAC7B,GAAG,EAAE,OAAO,CAAC,UAAU,CAAC,GAAG;oBAC3B,WAAW,EAAE,OAAO,CAAC,UAAU,CAAC,WAAW;oBAC3C,MAAM,EAAE,OAAO,CAAC,UAAU,CAAC,MAAM;oBACjC,KAAK,EAAE,OAAO,CAAC,UAAU,CAAC,KAAK;oBAC/B,QAAQ,EAAE,OAAO,CAAC,UAAU,CAAC,QAAQ;iBACtC;aACF,CAAC,CAAC;YAEH,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,UAAU,CAAC,IAAI,EAAE,CAAC;QACjD,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export declare const getOrder: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
2
|
-
instruction: import("@activepieces/pieces-framework/dist/src/lib/property/input/markdown-property").MarkDownProperty;
|
|
3
|
-
storeHash: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
4
|
-
accessToken: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
5
|
-
}>, {
|
|
6
|
-
orderId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
7
|
-
}>;
|
|
8
|
-
//# sourceMappingURL=get-order.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"get-order.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/get-order.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,QAAQ;;;;;;EAkBnB,CAAC"}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getOrder = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
|
-
const auth_1 = require("../common/auth");
|
|
7
|
-
const requests_1 = require("../common/requests");
|
|
8
|
-
exports.getOrder = (0, pieces_framework_1.createAction)({
|
|
9
|
-
auth: auth_1.bigcommerceAuth,
|
|
10
|
-
name: 'getOrder',
|
|
11
|
-
displayName: 'Get Order',
|
|
12
|
-
description: 'Gets details of an order',
|
|
13
|
-
props: {
|
|
14
|
-
orderId: pieces_framework_1.Property.ShortText({
|
|
15
|
-
displayName: 'Order ID',
|
|
16
|
-
description: 'The ID of the order to retrieve',
|
|
17
|
-
required: true,
|
|
18
|
-
}),
|
|
19
|
-
},
|
|
20
|
-
run(context) {
|
|
21
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
22
|
-
return yield requests_1.bigCommerceApiService.fetchOrder({
|
|
23
|
-
auth: context.auth.props,
|
|
24
|
-
orderId: context.propsValue.orderId,
|
|
25
|
-
});
|
|
26
|
-
});
|
|
27
|
-
},
|
|
28
|
-
});
|
|
29
|
-
//# sourceMappingURL=get-order.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"get-order.js","sourceRoot":"","sources":["../../../../src/lib/actions/get-order.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,yCAAiD;AACjD,iDAA2D;AAE9C,QAAA,QAAQ,GAAG,IAAA,+BAAY,EAAC;IACnC,IAAI,EAAE,sBAAe;IACrB,IAAI,EAAE,UAAU;IAChB,WAAW,EAAE,WAAW;IACxB,WAAW,EAAE,0BAA0B;IACvC,KAAK,EAAE;QACL,OAAO,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC1B,WAAW,EAAE,UAAU;YACvB,WAAW,EAAE,iCAAiC;YAC9C,QAAQ,EAAE,IAAI;SACf,CAAC;KACH;IACK,GAAG,CAAC,OAAO;;YACf,OAAO,MAAM,gCAAqB,CAAC,UAAU,CAAC;gBAC5C,IAAI,EAAE,OAAO,CAAC,IAAI,CAAC,KAAK;gBACxB,OAAO,EAAE,OAAO,CAAC,UAAU,CAAC,OAAO;aACpC,CAAC,CAAC;QACL,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export declare const listCategories: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
2
|
-
instruction: import("@activepieces/pieces-framework/dist/src/lib/property/input/markdown-property").MarkDownProperty;
|
|
3
|
-
storeHash: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
4
|
-
accessToken: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
5
|
-
}>, {
|
|
6
|
-
name: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
7
|
-
}>;
|
|
8
|
-
//# sourceMappingURL=list-categories.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"list-categories.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/list-categories.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,cAAc;;;;;;EAoBzB,CAAC"}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.listCategories = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
|
-
const auth_1 = require("../common/auth");
|
|
7
|
-
const requests_1 = require("../common/requests");
|
|
8
|
-
exports.listCategories = (0, pieces_framework_1.createAction)({
|
|
9
|
-
auth: auth_1.bigcommerceAuth,
|
|
10
|
-
name: 'listCategories',
|
|
11
|
-
displayName: 'List Categories',
|
|
12
|
-
description: 'Lists all categories',
|
|
13
|
-
props: {
|
|
14
|
-
name: pieces_framework_1.Property.ShortText({
|
|
15
|
-
displayName: 'Category Name',
|
|
16
|
-
description: 'Filter by category name',
|
|
17
|
-
required: false,
|
|
18
|
-
}),
|
|
19
|
-
},
|
|
20
|
-
run(context) {
|
|
21
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
22
|
-
const qParams = new URLSearchParams();
|
|
23
|
-
if (context.propsValue.name)
|
|
24
|
-
qParams.append('name', context.propsValue.name);
|
|
25
|
-
return yield requests_1.bigCommerceApiService.fetchCategories({
|
|
26
|
-
auth: context.auth.props,
|
|
27
|
-
queryString: qParams.toString(),
|
|
28
|
-
});
|
|
29
|
-
});
|
|
30
|
-
},
|
|
31
|
-
});
|
|
32
|
-
//# sourceMappingURL=list-categories.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"list-categories.js","sourceRoot":"","sources":["../../../../src/lib/actions/list-categories.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,yCAAiD;AACjD,iDAA2D;AAE9C,QAAA,cAAc,GAAG,IAAA,+BAAY,EAAC;IACzC,IAAI,EAAE,sBAAe;IACrB,IAAI,EAAE,gBAAgB;IACtB,WAAW,EAAE,iBAAiB;IAC9B,WAAW,EAAE,sBAAsB;IACnC,KAAK,EAAE;QACL,IAAI,EAAE,2BAAQ,CAAC,SAAS,CAAC;YACvB,WAAW,EAAE,eAAe;YAC5B,WAAW,EAAE,yBAAyB;YACtC,QAAQ,EAAE,KAAK;SAChB,CAAC;KACH;IACK,GAAG,CAAC,OAAO;;YACf,MAAM,OAAO,GAAG,IAAI,eAAe,EAAE,CAAC;YACtC,IAAI,OAAO,CAAC,UAAU,CAAC,IAAI;gBAAE,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;YAC7E,OAAO,MAAM,gCAAqB,CAAC,eAAe,CAAC;gBACjD,IAAI,EAAE,OAAO,CAAC,IAAI,CAAC,KAAK;gBACxB,WAAW,EAAE,OAAO,CAAC,QAAQ,EAAE;aAChC,CAAC,CAAC;QACL,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export declare const listOrders: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
2
|
-
instruction: import("@activepieces/pieces-framework/dist/src/lib/property/input/markdown-property").MarkDownProperty;
|
|
3
|
-
storeHash: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
4
|
-
accessToken: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
5
|
-
}>, {
|
|
6
|
-
customer_id: import("@activepieces/pieces-framework").NumberProperty<false>;
|
|
7
|
-
status_id: import("@activepieces/pieces-framework").NumberProperty<false>;
|
|
8
|
-
}>;
|
|
9
|
-
//# sourceMappingURL=list-orders.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"list-orders.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/list-orders.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,UAAU;;;;;;;EA2BrB,CAAC"}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.listOrders = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
|
-
const auth_1 = require("../common/auth");
|
|
7
|
-
const requests_1 = require("../common/requests");
|
|
8
|
-
exports.listOrders = (0, pieces_framework_1.createAction)({
|
|
9
|
-
auth: auth_1.bigcommerceAuth,
|
|
10
|
-
name: 'listOrders',
|
|
11
|
-
displayName: 'List Orders',
|
|
12
|
-
description: 'Lists all orders',
|
|
13
|
-
props: {
|
|
14
|
-
customer_id: pieces_framework_1.Property.Number({
|
|
15
|
-
displayName: 'Customer ID',
|
|
16
|
-
description: 'Filter by customer ID',
|
|
17
|
-
required: false,
|
|
18
|
-
}),
|
|
19
|
-
status_id: pieces_framework_1.Property.Number({
|
|
20
|
-
displayName: 'Status ID',
|
|
21
|
-
description: 'Filter by status ID',
|
|
22
|
-
required: false,
|
|
23
|
-
}),
|
|
24
|
-
},
|
|
25
|
-
run(context) {
|
|
26
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
27
|
-
const qParams = new URLSearchParams();
|
|
28
|
-
if (context.propsValue.customer_id !== undefined && context.propsValue.customer_id !== null)
|
|
29
|
-
qParams.append('customer_id', context.propsValue.customer_id.toString());
|
|
30
|
-
if (context.propsValue.status_id !== undefined && context.propsValue.status_id !== null)
|
|
31
|
-
qParams.append('status_id', context.propsValue.status_id.toString());
|
|
32
|
-
return yield requests_1.bigCommerceApiService.fetchOrders({
|
|
33
|
-
auth: context.auth.props,
|
|
34
|
-
queryString: qParams.toString(),
|
|
35
|
-
});
|
|
36
|
-
});
|
|
37
|
-
},
|
|
38
|
-
});
|
|
39
|
-
//# sourceMappingURL=list-orders.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"list-orders.js","sourceRoot":"","sources":["../../../../src/lib/actions/list-orders.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,yCAAiD;AACjD,iDAA2D;AAE9C,QAAA,UAAU,GAAG,IAAA,+BAAY,EAAC;IACrC,IAAI,EAAE,sBAAe;IACrB,IAAI,EAAE,YAAY;IAClB,WAAW,EAAE,aAAa;IAC1B,WAAW,EAAE,kBAAkB;IAC/B,KAAK,EAAE;QACL,WAAW,EAAE,2BAAQ,CAAC,MAAM,CAAC;YAC3B,WAAW,EAAE,aAAa;YAC1B,WAAW,EAAE,uBAAuB;YACpC,QAAQ,EAAE,KAAK;SAChB,CAAC;QACF,SAAS,EAAE,2BAAQ,CAAC,MAAM,CAAC;YACzB,WAAW,EAAE,WAAW;YACxB,WAAW,EAAE,qBAAqB;YAClC,QAAQ,EAAE,KAAK;SAChB,CAAC;KACH;IACK,GAAG,CAAC,OAAO;;YACf,MAAM,OAAO,GAAG,IAAI,eAAe,EAAE,CAAC;YACtC,IAAI,OAAO,CAAC,UAAU,CAAC,WAAW,KAAK,SAAS,IAAI,OAAO,CAAC,UAAU,CAAC,WAAW,KAAK,IAAI;gBAAE,OAAO,CAAC,MAAM,CAAC,aAAa,EAAE,OAAO,CAAC,UAAU,CAAC,WAAW,CAAC,QAAQ,EAAE,CAAC,CAAC;YACtK,IAAI,OAAO,CAAC,UAAU,CAAC,SAAS,KAAK,SAAS,IAAI,OAAO,CAAC,UAAU,CAAC,SAAS,KAAK,IAAI;gBAAE,OAAO,CAAC,MAAM,CAAC,WAAW,EAAE,OAAO,CAAC,UAAU,CAAC,SAAS,CAAC,QAAQ,EAAE,CAAC,CAAC;YAE9J,OAAO,MAAM,gCAAqB,CAAC,WAAW,CAAC;gBAC7C,IAAI,EAAE,OAAO,CAAC,IAAI,CAAC,KAAK;gBACxB,WAAW,EAAE,OAAO,CAAC,QAAQ,EAAE;aAChC,CAAC,CAAC;QACL,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
export declare const searchCustomerAddress: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
2
|
-
instruction: import("@activepieces/pieces-framework/dist/src/lib/property/input/markdown-property").MarkDownProperty;
|
|
3
|
-
storeHash: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
4
|
-
accessToken: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
5
|
-
}>, {
|
|
6
|
-
customer_ids: import("@activepieces/pieces-framework").MultiSelectDropdownProperty<unknown, false, import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
7
|
-
instruction: import("@activepieces/pieces-framework/dist/src/lib/property/input/markdown-property").MarkDownProperty;
|
|
8
|
-
storeHash: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
9
|
-
accessToken: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
10
|
-
}>> | import("@activepieces/pieces-framework").MultiSelectDropdownProperty<unknown, true, import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
11
|
-
instruction: import("@activepieces/pieces-framework/dist/src/lib/property/input/markdown-property").MarkDownProperty;
|
|
12
|
-
storeHash: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
13
|
-
accessToken: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
14
|
-
}>>;
|
|
15
|
-
name: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
16
|
-
}>;
|
|
17
|
-
//# sourceMappingURL=search-customer-address.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"search-customer-address.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/search-customer-address.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;EA8BhC,CAAC"}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.searchCustomerAddress = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
|
-
const requests_1 = require("../common/requests");
|
|
7
|
-
const auth_1 = require("../common/auth");
|
|
8
|
-
const props_1 = require("../common/props");
|
|
9
|
-
exports.searchCustomerAddress = (0, pieces_framework_1.createAction)({
|
|
10
|
-
auth: auth_1.bigcommerceAuth,
|
|
11
|
-
name: 'searchCustomerAddress',
|
|
12
|
-
displayName: 'Search Customer Address',
|
|
13
|
-
description: 'Searches for a customer’s address',
|
|
14
|
-
props: {
|
|
15
|
-
customer_ids: (0, props_1.multiCustomerDropdown)({
|
|
16
|
-
required: false,
|
|
17
|
-
}),
|
|
18
|
-
name: pieces_framework_1.Property.ShortText({
|
|
19
|
-
displayName: 'Name',
|
|
20
|
-
description: 'Customer name to search for',
|
|
21
|
-
required: false,
|
|
22
|
-
}),
|
|
23
|
-
},
|
|
24
|
-
run(context) {
|
|
25
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
26
|
-
const params = new URLSearchParams();
|
|
27
|
-
if (context.propsValue.customer_ids)
|
|
28
|
-
params.append('customer_ids:in', context.propsValue.customer_ids.join(','));
|
|
29
|
-
if (context.propsValue.name)
|
|
30
|
-
params.append('name:in', `${context.propsValue.name}`);
|
|
31
|
-
return yield requests_1.bigCommerceApiService.fetchCustomerAddresses({
|
|
32
|
-
auth: context.auth.props,
|
|
33
|
-
queryString: params.toString(),
|
|
34
|
-
});
|
|
35
|
-
});
|
|
36
|
-
},
|
|
37
|
-
});
|
|
38
|
-
//# sourceMappingURL=search-customer-address.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"search-customer-address.js","sourceRoot":"","sources":["../../../../src/lib/actions/search-customer-address.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,iDAA2D;AAC3D,yCAAiD;AACjD,2CAAwD;AAE3C,QAAA,qBAAqB,GAAG,IAAA,+BAAY,EAAC;IAChD,IAAI,EAAE,sBAAe;IACrB,IAAI,EAAE,uBAAuB;IAC7B,WAAW,EAAE,yBAAyB;IACtC,WAAW,EAAE,mCAAmC;IAChD,KAAK,EAAE;QACL,YAAY,EAAE,IAAA,6BAAqB,EAAC;YAClC,QAAQ,EAAE,KAAK;SAChB,CAAC;QACF,IAAI,EAAE,2BAAQ,CAAC,SAAS,CAAC;YACvB,WAAW,EAAE,MAAM;YACnB,WAAW,EAAE,6BAA6B;YAC1C,QAAQ,EAAE,KAAK;SAChB,CAAC;KACH;IACK,GAAG,CAAC,OAAO;;YACf,MAAM,MAAM,GAAG,IAAI,eAAe,EAAE,CAAC;YACrC,IAAI,OAAO,CAAC,UAAU,CAAC,YAAY;gBACjC,MAAM,CAAC,MAAM,CACX,iBAAiB,EAChB,OAAO,CAAC,UAAU,CAAC,YAAyB,CAAC,IAAI,CAAC,GAAG,CAAC,CACxD,CAAC;YACJ,IAAI,OAAO,CAAC,UAAU,CAAC,IAAI;gBACzB,MAAM,CAAC,MAAM,CAAC,SAAS,EAAE,GAAG,OAAO,CAAC,UAAU,CAAC,IAAI,EAAE,CAAC,CAAC;YAEzD,OAAO,MAAM,gCAAqB,CAAC,sBAAsB,CAAC;gBACxD,IAAI,EAAE,OAAO,CAAC,IAAI,CAAC,KAAK;gBACxB,WAAW,EAAE,MAAM,CAAC,QAAQ,EAAE;aAC/B,CAAC,CAAC;QACL,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export declare const searchCustomer: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
2
|
-
instruction: import("@activepieces/pieces-framework/dist/src/lib/property/input/markdown-property").MarkDownProperty;
|
|
3
|
-
storeHash: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
4
|
-
accessToken: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
5
|
-
}>, {
|
|
6
|
-
email: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
7
|
-
phone: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
8
|
-
name: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
9
|
-
}>;
|
|
10
|
-
//# sourceMappingURL=search-customer.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"search-customer.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/search-customer.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,cAAc;;;;;;;;EAoCzB,CAAC"}
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.searchCustomer = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
|
-
const auth_1 = require("../common/auth");
|
|
7
|
-
const requests_1 = require("../common/requests");
|
|
8
|
-
exports.searchCustomer = (0, pieces_framework_1.createAction)({
|
|
9
|
-
auth: auth_1.bigcommerceAuth,
|
|
10
|
-
name: 'searchCustomer',
|
|
11
|
-
displayName: 'Search Customer',
|
|
12
|
-
description: 'Searches for a registered customer',
|
|
13
|
-
props: {
|
|
14
|
-
email: pieces_framework_1.Property.ShortText({
|
|
15
|
-
displayName: 'Email',
|
|
16
|
-
description: 'Customer email to search for',
|
|
17
|
-
required: false,
|
|
18
|
-
}),
|
|
19
|
-
phone: pieces_framework_1.Property.ShortText({
|
|
20
|
-
displayName: 'Phone Number',
|
|
21
|
-
description: 'Phone Number to search for',
|
|
22
|
-
required: false,
|
|
23
|
-
}),
|
|
24
|
-
name: pieces_framework_1.Property.ShortText({
|
|
25
|
-
displayName: 'Name',
|
|
26
|
-
description: 'Customer name to search for',
|
|
27
|
-
required: false,
|
|
28
|
-
}),
|
|
29
|
-
},
|
|
30
|
-
run(context) {
|
|
31
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
32
|
-
const params = new URLSearchParams();
|
|
33
|
-
if (context.propsValue.email)
|
|
34
|
-
params.append('email:in', context.propsValue.email);
|
|
35
|
-
if (context.propsValue.name)
|
|
36
|
-
params.append('name:in', `${context.propsValue.name}`);
|
|
37
|
-
if (context.propsValue.phone)
|
|
38
|
-
params.append('phone:in', context.propsValue.phone);
|
|
39
|
-
return yield requests_1.bigCommerceApiService.fetchCustomers({
|
|
40
|
-
auth: context.auth.props,
|
|
41
|
-
queryString: params.toString(),
|
|
42
|
-
});
|
|
43
|
-
});
|
|
44
|
-
},
|
|
45
|
-
});
|
|
46
|
-
//# sourceMappingURL=search-customer.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"search-customer.js","sourceRoot":"","sources":["../../../../src/lib/actions/search-customer.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,yCAAiD;AACjD,iDAA2D;AAE9C,QAAA,cAAc,GAAG,IAAA,+BAAY,EAAC;IACzC,IAAI,EAAE,sBAAe;IACrB,IAAI,EAAE,gBAAgB;IACtB,WAAW,EAAE,iBAAiB;IAC9B,WAAW,EAAE,oCAAoC;IACjD,KAAK,EAAE;QACL,KAAK,EAAE,2BAAQ,CAAC,SAAS,CAAC;YACxB,WAAW,EAAE,OAAO;YACpB,WAAW,EAAE,8BAA8B;YAC3C,QAAQ,EAAE,KAAK;SAChB,CAAC;QACF,KAAK,EAAE,2BAAQ,CAAC,SAAS,CAAC;YACxB,WAAW,EAAE,cAAc;YAC3B,WAAW,EAAE,4BAA4B;YACzC,QAAQ,EAAE,KAAK;SAChB,CAAC;QACF,IAAI,EAAE,2BAAQ,CAAC,SAAS,CAAC;YACvB,WAAW,EAAE,MAAM;YACnB,WAAW,EAAE,6BAA6B;YAC1C,QAAQ,EAAE,KAAK;SAChB,CAAC;KACH;IACK,GAAG,CAAC,OAAO;;YACf,MAAM,MAAM,GAAG,IAAI,eAAe,EAAE,CAAC;YACrC,IAAI,OAAO,CAAC,UAAU,CAAC,KAAK;gBAC1B,MAAM,CAAC,MAAM,CAAC,UAAU,EAAE,OAAO,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;YACtD,IAAI,OAAO,CAAC,UAAU,CAAC,IAAI;gBACzB,MAAM,CAAC,MAAM,CAAC,SAAS,EAAE,GAAG,OAAO,CAAC,UAAU,CAAC,IAAI,EAAE,CAAC,CAAC;YACzD,IAAI,OAAO,CAAC,UAAU,CAAC,KAAK;gBAC1B,MAAM,CAAC,MAAM,CAAC,UAAU,EAAE,OAAO,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;YAEtD,OAAO,MAAM,gCAAqB,CAAC,cAAc,CAAC;gBAChD,IAAI,EAAE,OAAO,CAAC,IAAI,CAAC,KAAK;gBACxB,WAAW,EAAE,MAAM,CAAC,QAAQ,EAAE;aAC/B,CAAC,CAAC;QACL,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
export declare const searchProduct: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
2
|
-
instruction: import("@activepieces/pieces-framework/dist/src/lib/property/input/markdown-property").MarkDownProperty;
|
|
3
|
-
storeHash: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
4
|
-
accessToken: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
5
|
-
}>, {
|
|
6
|
-
name: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
7
|
-
sku: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
8
|
-
type: import("@activepieces/pieces-framework").StaticDropdownProperty<string, false>;
|
|
9
|
-
brand_id: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
10
|
-
weight: import("@activepieces/pieces-framework").NumberProperty<false>;
|
|
11
|
-
price: import("@activepieces/pieces-framework").NumberProperty<false>;
|
|
12
|
-
}>;
|
|
13
|
-
//# sourceMappingURL=search-product.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"search-product.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/search-product.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,aAAa;;;;;;;;;;;EA0DxB,CAAC"}
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.searchProduct = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
|
-
const auth_1 = require("../common/auth");
|
|
7
|
-
const requests_1 = require("../common/requests");
|
|
8
|
-
exports.searchProduct = (0, pieces_framework_1.createAction)({
|
|
9
|
-
auth: auth_1.bigcommerceAuth,
|
|
10
|
-
name: 'searchProduct',
|
|
11
|
-
displayName: 'Search Product',
|
|
12
|
-
description: 'Searches for a product in the catalog',
|
|
13
|
-
props: {
|
|
14
|
-
name: pieces_framework_1.Property.ShortText({
|
|
15
|
-
displayName: 'Product Name',
|
|
16
|
-
description: 'Product name to search for',
|
|
17
|
-
required: false,
|
|
18
|
-
}),
|
|
19
|
-
sku: pieces_framework_1.Property.ShortText({
|
|
20
|
-
displayName: 'SKU',
|
|
21
|
-
description: 'Product SKU to search for',
|
|
22
|
-
required: false,
|
|
23
|
-
}),
|
|
24
|
-
type: pieces_framework_1.Property.StaticDropdown({
|
|
25
|
-
displayName: 'Product Type',
|
|
26
|
-
required: false,
|
|
27
|
-
options: {
|
|
28
|
-
options: [
|
|
29
|
-
{ label: 'Physical', value: 'physical' },
|
|
30
|
-
{ label: 'Digital', value: 'digital' },
|
|
31
|
-
],
|
|
32
|
-
},
|
|
33
|
-
}),
|
|
34
|
-
brand_id: pieces_framework_1.Property.ShortText({
|
|
35
|
-
displayName: 'Brand ID',
|
|
36
|
-
description: 'Brand ID to search for',
|
|
37
|
-
required: false,
|
|
38
|
-
}),
|
|
39
|
-
weight: pieces_framework_1.Property.Number({
|
|
40
|
-
displayName: 'Weight',
|
|
41
|
-
required: false,
|
|
42
|
-
}),
|
|
43
|
-
price: pieces_framework_1.Property.Number({
|
|
44
|
-
displayName: 'Price',
|
|
45
|
-
required: false,
|
|
46
|
-
}),
|
|
47
|
-
},
|
|
48
|
-
run(context) {
|
|
49
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
50
|
-
const params = new URLSearchParams();
|
|
51
|
-
if (context.propsValue.name)
|
|
52
|
-
params.append('name', context.propsValue.name);
|
|
53
|
-
if (context.propsValue.sku)
|
|
54
|
-
params.append('sku', context.propsValue.sku);
|
|
55
|
-
if (context.propsValue.brand_id)
|
|
56
|
-
params.append('brand_id', context.propsValue.brand_id);
|
|
57
|
-
if (context.propsValue.type)
|
|
58
|
-
params.append('type', context.propsValue.type);
|
|
59
|
-
if (context.propsValue.price)
|
|
60
|
-
params.append('price', String(context.propsValue.price));
|
|
61
|
-
if (context.propsValue.weight)
|
|
62
|
-
params.append('weight', String(context.propsValue.weight));
|
|
63
|
-
return yield requests_1.bigCommerceApiService.fetchProducts({
|
|
64
|
-
auth: context.auth.props,
|
|
65
|
-
queryString: params.toString(),
|
|
66
|
-
});
|
|
67
|
-
});
|
|
68
|
-
},
|
|
69
|
-
});
|
|
70
|
-
//# sourceMappingURL=search-product.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"search-product.js","sourceRoot":"","sources":["../../../../src/lib/actions/search-product.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,yCAAiD;AACjD,iDAA2D;AAE9C,QAAA,aAAa,GAAG,IAAA,+BAAY,EAAC;IACxC,IAAI,EAAE,sBAAe;IACrB,IAAI,EAAE,eAAe;IACrB,WAAW,EAAE,gBAAgB;IAC7B,WAAW,EAAE,uCAAuC;IACpD,KAAK,EAAE;QACL,IAAI,EAAE,2BAAQ,CAAC,SAAS,CAAC;YACvB,WAAW,EAAE,cAAc;YAC3B,WAAW,EAAE,4BAA4B;YACzC,QAAQ,EAAE,KAAK;SAChB,CAAC;QACF,GAAG,EAAE,2BAAQ,CAAC,SAAS,CAAC;YACtB,WAAW,EAAE,KAAK;YA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O,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;YACjD,IAAI,OAAO,CAAC,UAAU,CAAC,KAAK;gBAC1B,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE,MAAM,CAAC,OAAO,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC;YAC3D,IAAI,OAAO,CAAC,UAAU,CAAC,MAAM;gBAC3B,MAAM,CAAC,MAAM,CAAC,QAAQ,EAAE,MAAM,CAAC,OAAO,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC;YAE7D,OAAO,MAAM,gCAAqB,CAAC,aAAa,CAAC;gBAC/C,IAAI,EAAE,OAAO,CAAC,IAAI,CAAC,KAAK;gBACxB,WAAW,EAAE,MAAM,CAAC,QAAQ,EAAE;aAC/B,CAAC,CAAC;QACL,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
export declare const updateAProduct: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
2
|
-
instruction: import("@activepieces/pieces-framework/dist/src/lib/property/input/markdown-property").MarkDownProperty;
|
|
3
|
-
storeHash: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
4
|
-
accessToken: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
5
|
-
}>, {
|
|
6
|
-
productId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
7
|
-
name: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
8
|
-
type: import("@activepieces/pieces-framework").StaticDropdownProperty<string, false>;
|
|
9
|
-
sku: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
10
|
-
description: import("@activepieces/pieces-framework").LongTextProperty<false>;
|
|
11
|
-
weight: import("@activepieces/pieces-framework").NumberProperty<false>;
|
|
12
|
-
price: import("@activepieces/pieces-framework").NumberProperty<false>;
|
|
13
|
-
brand_id: import("@activepieces/pieces-framework").NumberProperty<false>;
|
|
14
|
-
}>;
|
|
15
|
-
//# sourceMappingURL=update-a-product.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"update-a-product.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/update-a-product.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,cAAc;;;;;;;;;;;;;EAmEzB,CAAC"}
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.updateAProduct = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
|
-
const auth_1 = require("../common/auth");
|
|
7
|
-
const requests_1 = require("../common/requests");
|
|
8
|
-
exports.updateAProduct = (0, pieces_framework_1.createAction)({
|
|
9
|
-
auth: auth_1.bigcommerceAuth,
|
|
10
|
-
name: 'updateAProduct',
|
|
11
|
-
displayName: 'Update a Product',
|
|
12
|
-
description: 'Updates an existing Product',
|
|
13
|
-
props: {
|
|
14
|
-
productId: pieces_framework_1.Property.ShortText({
|
|
15
|
-
displayName: 'Product ID',
|
|
16
|
-
description: 'The ID of the product to update',
|
|
17
|
-
required: true,
|
|
18
|
-
}),
|
|
19
|
-
name: pieces_framework_1.Property.ShortText({
|
|
20
|
-
displayName: 'Product Name',
|
|
21
|
-
description: 'Name of the product',
|
|
22
|
-
required: false,
|
|
23
|
-
}),
|
|
24
|
-
type: pieces_framework_1.Property.StaticDropdown({
|
|
25
|
-
displayName: 'Product Type',
|
|
26
|
-
description: 'Type of product',
|
|
27
|
-
required: false,
|
|
28
|
-
options: {
|
|
29
|
-
options: [
|
|
30
|
-
{ label: 'Physical', value: 'physical' },
|
|
31
|
-
{ label: 'Digital', value: 'digital' },
|
|
32
|
-
],
|
|
33
|
-
},
|
|
34
|
-
}),
|
|
35
|
-
sku: pieces_framework_1.Property.ShortText({
|
|
36
|
-
displayName: 'SKU',
|
|
37
|
-
description: 'Product SKU',
|
|
38
|
-
required: false,
|
|
39
|
-
}),
|
|
40
|
-
description: pieces_framework_1.Property.LongText({
|
|
41
|
-
displayName: 'Description',
|
|
42
|
-
description: 'Product description',
|
|
43
|
-
required: false,
|
|
44
|
-
}),
|
|
45
|
-
weight: pieces_framework_1.Property.Number({
|
|
46
|
-
displayName: 'Weight',
|
|
47
|
-
description: 'Product weight',
|
|
48
|
-
required: false,
|
|
49
|
-
}),
|
|
50
|
-
price: pieces_framework_1.Property.Number({
|
|
51
|
-
displayName: 'Price',
|
|
52
|
-
description: 'Product price',
|
|
53
|
-
required: false,
|
|
54
|
-
}),
|
|
55
|
-
brand_id: pieces_framework_1.Property.Number({
|
|
56
|
-
displayName: 'Brand ID',
|
|
57
|
-
description: 'Brand ID',
|
|
58
|
-
required: false,
|
|
59
|
-
}),
|
|
60
|
-
},
|
|
61
|
-
run(context) {
|
|
62
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
63
|
-
const _a = context.propsValue, { productId } = _a, payload = tslib_1.__rest(_a, ["productId"]);
|
|
64
|
-
// Filter out null/undefined values to prevent overwriting existing data with nulls
|
|
65
|
-
const filteredPayload = Object.fromEntries(Object.entries(payload).filter(([_, v]) => v !== null && v !== undefined));
|
|
66
|
-
return yield requests_1.bigCommerceApiService.updateProduct({
|
|
67
|
-
auth: context.auth.props,
|
|
68
|
-
productId,
|
|
69
|
-
payload: filteredPayload,
|
|
70
|
-
});
|
|
71
|
-
});
|
|
72
|
-
},
|
|
73
|
-
});
|
|
74
|
-
//# sourceMappingURL=update-a-product.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"update-a-product.js","sourceRoot":"","sources":["../../../../src/lib/actions/update-a-product.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,yCAAiD;AACjD,iDAA2D;AAE9C,QAAA,cAAc,GAAG,IAAA,+BAAY,EAAC;IACzC,IAAI,EAAE,sBAAe;IACrB,IAAI,EAAE,gBAAgB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UAAU;YACvB,WAAW,EAAE,UAAU;YACvB,QAAQ,EAAE,KAAK;SAChB,CAAC;KACH;IACK,GAAG,CAAC,OAAO;;YACf,MAAM,KAA4B,OAAO,CAAC,UAAU,EAA9C,EAAE,SAAS,OAAmC,EAA9B,OAAO,sBAAvB,aAAyB,CAAqB,CAAC;YAErD,mFAAmF;YACnF,MAAM,eAAe,GAAG,MAAM,CAAC,WAAW,CACxC,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,KAAK,IAAI,IAAI,CAAC,KAAK,SAAS,CAAC,CAC1E,CAAC;YAEF,OAAO,MAAM,gCAAqB,CAAC,aAAa,CAAC;gBAC/C,IAAI,EAAE,OAAO,CAAC,IAAI,CAAC,KAAK;gBACxB,SAAS;gBACT,OAAO,EAAE,eAAe;aACzB,CAAC,CAAC;QACL,CAAC;KAAA;CACF,CAAC,CAAC"}
|
package/src/lib/common/auth.d.ts
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export declare const bigcommerceAuth: import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
2
|
-
instruction: import("@activepieces/pieces-framework/dist/src/lib/property/input/markdown-property").MarkDownProperty;
|
|
3
|
-
storeHash: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
4
|
-
accessToken: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
5
|
-
}>;
|
|
6
|
-
//# sourceMappingURL=auth.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../../../src/lib/common/auth.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,eAAe;;;;EAwC1B,CAAC"}
|
package/src/lib/common/auth.js
DELETED
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.bigcommerceAuth = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
|
-
const requests_1 = require("./requests");
|
|
7
|
-
exports.bigcommerceAuth = pieces_framework_1.PieceAuth.CustomAuth({
|
|
8
|
-
description: 'Enter your BigCommerce API credentials. ',
|
|
9
|
-
props: {
|
|
10
|
-
instruction: pieces_framework_1.Property.MarkDown({
|
|
11
|
-
value: `1. Login to https://www.bigcommerce.com/essentials/
|
|
12
|
-
2. Go to Settings
|
|
13
|
-
3. Scroll down to API
|
|
14
|
-
4. Click on "Store Level API Accounts"
|
|
15
|
-
5. Click "Create API Account" button
|
|
16
|
-
6. Enter a name and add required scopes
|
|
17
|
-
7. Save - you will get a downloaded file containing your access token and store hash`,
|
|
18
|
-
}),
|
|
19
|
-
storeHash: pieces_framework_1.Property.ShortText({
|
|
20
|
-
displayName: 'Store Hash',
|
|
21
|
-
description: 'Your BigCommerce store hash (e.g., abcd1234)',
|
|
22
|
-
required: true,
|
|
23
|
-
}),
|
|
24
|
-
accessToken: pieces_framework_1.Property.ShortText({
|
|
25
|
-
displayName: 'Access Token',
|
|
26
|
-
description: 'Your BigCommerce API access token',
|
|
27
|
-
required: true,
|
|
28
|
-
}),
|
|
29
|
-
},
|
|
30
|
-
required: true,
|
|
31
|
-
validate(context) {
|
|
32
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
33
|
-
try {
|
|
34
|
-
yield requests_1.bigCommerceApiService.fetchProducts({
|
|
35
|
-
auth: context.auth,
|
|
36
|
-
});
|
|
37
|
-
return { valid: true };
|
|
38
|
-
}
|
|
39
|
-
catch (_a) {
|
|
40
|
-
return {
|
|
41
|
-
valid: false,
|
|
42
|
-
error: 'Could not validate credentials. please check your credentials are correct.',
|
|
43
|
-
};
|
|
44
|
-
}
|
|
45
|
-
});
|
|
46
|
-
},
|
|
47
|
-
});
|
|
48
|
-
//# sourceMappingURL=auth.js.map
|