@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 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"create-a-product.js","sourceRoot":"","sources":["../../../../src/lib/actions/create-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;IACtB,WAAW,EAAE,kBAAkB;IAC/B,WAAW,EAAE,mBAAmB;IAChC,KAAK,EAAE;QACL,IAAI,EAAE,2BAAQ,CAAC,SAAS,CAAC;YACvB,WAAW,EAAE,cAAc;YAC3B,WAAW,EAAE,qBAAqB;YAClC,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,IAAI,EAAE,2BAAQ,CAAC,cAAc,CAAC;YAC5B,WAAW,EAAE,cAAc;YAC3B,WAAW,EAAE,iBAAiB;YAC9B,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE;gBACP,OAAO,EAAE;oBACP,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,UAAU,EAAE;oBACxC,EAAE,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,EAAE;iBACvC;aACF;SACF,CAAC;QACF,GAAG,EAAE,2BAAQ,CAAC,SAAS,CAAC;YACtB,WAAW,EAAE,KAAK;YAClB,WAAW,EAAE,aAAa;YAC1B,QAAQ,EAAE,KAAK;SAChB,CAAC;QACF,WAAW,EAAE,2BAAQ,CAAC,QAAQ,CAAC;YAC7B,WAAW,EAAE,aAAa;YAC1B,WAAW,EAAE,qBAAqB;YAClC,QAAQ,EAAE,KAAK;SAChB,CAAC;QACF,MAAM,EAAE,2BAAQ,CAAC,MAAM,CAAC;YACtB,WAAW,EAAE,QAAQ;YACrB,WAAW,EAAE,gBAAgB;YAC7B,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,KAAK,EAAE,2BAAQ,CAAC,MAAM,CAAC;YACrB,WAAW,EAAE,OAAO;YACpB,WAAW,EAAE,eAAe;YAC5B,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,QAAQ,EAAE,2BAAQ,CAAC,MAAM,CAAC;YACxB,WAAW,EAAE,UAAU;YACvB,WAAW,EAAE,UAAU;YACvB,QAAQ,EAAE,KAAK;SAChB,CAAC;KACH;IACK,GAAG,CAAC,OAAO;;YACf,OAAO,MAAM,gCAAqB,CAAC,aAAa,CAAC;gBAC/C,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;QACL,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
export declare const createBlogPost: 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
|
-
title: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
7
|
-
body: import("@activepieces/pieces-framework").LongTextProperty<true>;
|
|
8
|
-
author: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
9
|
-
url: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
10
|
-
published_date: import("@activepieces/pieces-framework").DateTimeProperty<false>;
|
|
11
|
-
meta_description: import("@activepieces/pieces-framework").LongTextProperty<false>;
|
|
12
|
-
meta_keywords: import("@activepieces/pieces-framework").LongTextProperty<false>;
|
|
13
|
-
tags: import("@activepieces/pieces-framework").ArrayProperty<false>;
|
|
14
|
-
is_published: import("@activepieces/pieces-framework").CheckboxProperty<false>;
|
|
15
|
-
}>;
|
|
16
|
-
//# sourceMappingURL=create-blog-post.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"create-blog-post.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/create-blog-post.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,cAAc;;;;;;;;;;;;;;EAuEzB,CAAC"}
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.createBlogPost = 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.createBlogPost = (0, pieces_framework_1.createAction)({
|
|
9
|
-
auth: auth_1.bigcommerceAuth,
|
|
10
|
-
name: 'createBlogPost',
|
|
11
|
-
displayName: 'Create Blog Post',
|
|
12
|
-
description: 'Creates a blog post',
|
|
13
|
-
props: {
|
|
14
|
-
title: pieces_framework_1.Property.ShortText({
|
|
15
|
-
displayName: 'Title',
|
|
16
|
-
description: 'Blog post title',
|
|
17
|
-
required: true,
|
|
18
|
-
}),
|
|
19
|
-
body: pieces_framework_1.Property.LongText({
|
|
20
|
-
displayName: 'Body',
|
|
21
|
-
description: 'Blog post content (HTML supported)',
|
|
22
|
-
required: true,
|
|
23
|
-
}),
|
|
24
|
-
author: pieces_framework_1.Property.ShortText({
|
|
25
|
-
displayName: 'Author',
|
|
26
|
-
description: 'Author name',
|
|
27
|
-
required: false,
|
|
28
|
-
}),
|
|
29
|
-
url: pieces_framework_1.Property.ShortText({
|
|
30
|
-
displayName: 'URL',
|
|
31
|
-
description: 'URL for the public blog post. Example - /blog/welcome-bigcommerce/',
|
|
32
|
-
required: false,
|
|
33
|
-
}),
|
|
34
|
-
published_date: pieces_framework_1.Property.DateTime({
|
|
35
|
-
displayName: 'Published Date',
|
|
36
|
-
description: 'Published Date for the blog post. Example - Wed, 10 Aug 2022 15:39:15 -0500',
|
|
37
|
-
required: false,
|
|
38
|
-
}),
|
|
39
|
-
meta_description: pieces_framework_1.Property.LongText({
|
|
40
|
-
displayName: 'Meta Description',
|
|
41
|
-
description: 'Description text for this blog post’s <meta/> element.',
|
|
42
|
-
required: false,
|
|
43
|
-
}),
|
|
44
|
-
meta_keywords: pieces_framework_1.Property.LongText({
|
|
45
|
-
displayName: 'Meta Keywords',
|
|
46
|
-
description: 'Comma seperated (,) Keywords for this blog post’s <meta/> element. Eg welcome, bigcommerce',
|
|
47
|
-
required: false,
|
|
48
|
-
}),
|
|
49
|
-
tags: pieces_framework_1.Property.Array({
|
|
50
|
-
displayName: 'Tags',
|
|
51
|
-
description: 'Array of tags',
|
|
52
|
-
required: false,
|
|
53
|
-
}),
|
|
54
|
-
is_published: pieces_framework_1.Property.Checkbox({
|
|
55
|
-
displayName: 'Is Published',
|
|
56
|
-
description: 'Whether the post is published',
|
|
57
|
-
required: false,
|
|
58
|
-
defaultValue: true,
|
|
59
|
-
}),
|
|
60
|
-
},
|
|
61
|
-
run(context) {
|
|
62
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
63
|
-
return yield requests_1.bigCommerceApiService.createBlogPost({
|
|
64
|
-
auth: context.auth.props,
|
|
65
|
-
payload: {
|
|
66
|
-
title: context.propsValue.title,
|
|
67
|
-
body: context.propsValue.body,
|
|
68
|
-
author: context.propsValue.author,
|
|
69
|
-
tags: context.propsValue.tags,
|
|
70
|
-
is_published: context.propsValue.is_published,
|
|
71
|
-
meta_description: context.propsValue.meta_description,
|
|
72
|
-
meta_keywords: context.propsValue.meta_keywords,
|
|
73
|
-
published_date: context.propsValue.published_date,
|
|
74
|
-
url: context.propsValue.url,
|
|
75
|
-
},
|
|
76
|
-
});
|
|
77
|
-
});
|
|
78
|
-
},
|
|
79
|
-
});
|
|
80
|
-
//# sourceMappingURL=create-blog-post.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"create-blog-post.js","sourceRoot":"","sources":["../../../../src/lib/actions/create-blog-post.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,kBAAkB;IAC/B,WAAW,EAAE,qBAAqB;IAClC,KAAK,EAAE;QACL,KAAK,EAAE,2BAAQ,CAAC,SAAS,CAAC;YACxB,WAAW,EAAE,OAAO;YACpB,WAAW,EAAE,iBAAiB;YAC9B,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,IAAI,EAAE,2BAAQ,CAAC,QAAQ,CAAC;YACtB,WAAW,EAAE,MAAM;YACnB,WAAW,EAAE,oCAAoC;YACjD,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,MAAM,EAAE,2BAAQ,CAAC,SAAS,CAAC;YACzB,WA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U,CAAC,IAAI;oBAC7B,YAAY,EAAE,OAAO,CAAC,UAAU,CAAC,YAAY;oBAC7C,gBAAgB,EAAE,OAAO,CAAC,UAAU,CAAC,gBAAgB;oBACrD,aAAa,EAAE,OAAO,CAAC,UAAU,CAAC,aAAa;oBAC/C,cAAc,EAAE,OAAO,CAAC,UAAU,CAAC,cAAc;oBACjD,GAAG,EAAE,OAAO,CAAC,UAAU,CAAC,GAAG;iBAC5B;aACF,CAAC,CAAC;QACL,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
export declare const createCustomerAddress: 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").DropdownProperty<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").DropdownProperty<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
|
-
first_name: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
16
|
-
last_name: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
17
|
-
address1: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
18
|
-
address2: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
19
|
-
city: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
20
|
-
state_or_province: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
21
|
-
postal_code: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
22
|
-
country_code: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
23
|
-
phone: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
24
|
-
}>;
|
|
25
|
-
//# sourceMappingURL=create-customer-address.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"create-customer-address.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/create-customer-address.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;EAkEhC,CAAC"}
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.createCustomerAddress = 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 props_1 = require("../common/props");
|
|
8
|
-
const requests_1 = require("../common/requests");
|
|
9
|
-
exports.createCustomerAddress = (0, pieces_framework_1.createAction)({
|
|
10
|
-
auth: auth_1.bigcommerceAuth,
|
|
11
|
-
name: 'createCustomerAddress',
|
|
12
|
-
displayName: 'Create Customer Address',
|
|
13
|
-
description: "Creates a customer's address",
|
|
14
|
-
props: {
|
|
15
|
-
customer_id: (0, props_1.customerDropdown)({
|
|
16
|
-
required: true
|
|
17
|
-
}),
|
|
18
|
-
first_name: pieces_framework_1.Property.ShortText({
|
|
19
|
-
displayName: 'First Name',
|
|
20
|
-
required: true,
|
|
21
|
-
}),
|
|
22
|
-
last_name: pieces_framework_1.Property.ShortText({
|
|
23
|
-
displayName: 'Last Name',
|
|
24
|
-
required: true,
|
|
25
|
-
}),
|
|
26
|
-
address1: pieces_framework_1.Property.ShortText({
|
|
27
|
-
displayName: 'Address Line 1',
|
|
28
|
-
required: true,
|
|
29
|
-
}),
|
|
30
|
-
address2: pieces_framework_1.Property.ShortText({
|
|
31
|
-
displayName: 'Address Line 2',
|
|
32
|
-
required: false,
|
|
33
|
-
}),
|
|
34
|
-
city: pieces_framework_1.Property.ShortText({
|
|
35
|
-
displayName: 'City',
|
|
36
|
-
required: true,
|
|
37
|
-
}),
|
|
38
|
-
state_or_province: pieces_framework_1.Property.ShortText({
|
|
39
|
-
displayName: 'State/Province',
|
|
40
|
-
required: true,
|
|
41
|
-
}),
|
|
42
|
-
postal_code: pieces_framework_1.Property.ShortText({
|
|
43
|
-
displayName: 'Postal Code',
|
|
44
|
-
required: true,
|
|
45
|
-
}),
|
|
46
|
-
country_code: pieces_framework_1.Property.ShortText({
|
|
47
|
-
displayName: 'Country Code',
|
|
48
|
-
description: 'ISO 3166-1 alpha-2 country code',
|
|
49
|
-
required: true,
|
|
50
|
-
}),
|
|
51
|
-
phone: pieces_framework_1.Property.ShortText({
|
|
52
|
-
displayName: 'Phone',
|
|
53
|
-
required: false,
|
|
54
|
-
}),
|
|
55
|
-
},
|
|
56
|
-
run(context) {
|
|
57
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
58
|
-
return yield requests_1.bigCommerceApiService.createCustomerAddress({
|
|
59
|
-
auth: context.auth.props,
|
|
60
|
-
payload: [
|
|
61
|
-
{
|
|
62
|
-
customer_id: context.propsValue.customer_id,
|
|
63
|
-
first_name: context.propsValue.first_name,
|
|
64
|
-
last_name: context.propsValue.last_name,
|
|
65
|
-
address1: context.propsValue.address1,
|
|
66
|
-
address2: context.propsValue.address2,
|
|
67
|
-
city: context.propsValue.city,
|
|
68
|
-
state_or_province: context.propsValue.state_or_province,
|
|
69
|
-
postal_code: context.propsValue.postal_code,
|
|
70
|
-
country_code: context.propsValue.country_code,
|
|
71
|
-
phone: context.propsValue.phone,
|
|
72
|
-
},
|
|
73
|
-
],
|
|
74
|
-
});
|
|
75
|
-
});
|
|
76
|
-
},
|
|
77
|
-
});
|
|
78
|
-
//# sourceMappingURL=create-customer-address.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"create-customer-address.js","sourceRoot":"","sources":["../../../../src/lib/actions/create-customer-address.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,yCAAiD;AACjD,2CAAmD;AACnD,iDAA2D;AAE9C,QAAA,qBAAqB,GAAG,IAAA,+BAAY,EAAC;IAChD,IAAI,EAAE,sBAAe;IACrB,IAAI,EAAE,uBAAuB;IAC7B,WAAW,EAAE,yBAAyB;IACtC,WAAW,EAAE,8BAA8B;IAC3C,KAAK,EAAE;QACL,WAAW,EAAE,IAAA,wBAAgB,EAAC;YAC5B,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,UAAU,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC7B,WAAW,EAAE,YAAY;YACzB,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,SAAS,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC5B,WAAW,EAAE,WAAW;YACxB,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,QAAQ,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC3B,WAAW,EAAE,gBAAgB;YAC7B,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,QAAQ,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC3B,WAAW,EAAE,gBAAgB;YAC7B,QAAQ,EAAE,KAAK;SAChB,CAAC;QACF,IAAI,EAAE,2BAAQ,CAAC,SAAS,CAAC;YACvB,WAAW,EAAE,MAAM;YACnB,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,iBAAiB,EAAE,2BAA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ces/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<true>;
|
|
7
|
-
first_name: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
8
|
-
last_name: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
9
|
-
company: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
10
|
-
phone: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
11
|
-
notes: import("@activepieces/pieces-framework").LongTextProperty<false>;
|
|
12
|
-
}>;
|
|
13
|
-
//# sourceMappingURL=create-customer.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"create-customer.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/create-customer.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,cAAc;;;;;;;;;;;EAoDzB,CAAC"}
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.createCustomer = 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.createCustomer = (0, pieces_framework_1.createAction)({
|
|
9
|
-
auth: auth_1.bigcommerceAuth,
|
|
10
|
-
name: 'createCustomer',
|
|
11
|
-
displayName: 'Create Customer',
|
|
12
|
-
description: 'Creates a customer',
|
|
13
|
-
props: {
|
|
14
|
-
email: pieces_framework_1.Property.ShortText({
|
|
15
|
-
displayName: 'Email',
|
|
16
|
-
description: 'Customer email address',
|
|
17
|
-
required: true,
|
|
18
|
-
}),
|
|
19
|
-
first_name: pieces_framework_1.Property.ShortText({
|
|
20
|
-
displayName: 'First Name',
|
|
21
|
-
description: 'Customer first name',
|
|
22
|
-
required: true,
|
|
23
|
-
}),
|
|
24
|
-
last_name: pieces_framework_1.Property.ShortText({
|
|
25
|
-
displayName: 'Last Name',
|
|
26
|
-
description: 'Customer last name',
|
|
27
|
-
required: true,
|
|
28
|
-
}),
|
|
29
|
-
company: pieces_framework_1.Property.ShortText({
|
|
30
|
-
displayName: 'Company',
|
|
31
|
-
description: 'Customer company name',
|
|
32
|
-
required: false,
|
|
33
|
-
}),
|
|
34
|
-
phone: pieces_framework_1.Property.ShortText({
|
|
35
|
-
displayName: 'Phone',
|
|
36
|
-
description: 'Customer phone number',
|
|
37
|
-
required: false,
|
|
38
|
-
}),
|
|
39
|
-
notes: pieces_framework_1.Property.LongText({
|
|
40
|
-
displayName: 'Notes',
|
|
41
|
-
description: 'Customer notes',
|
|
42
|
-
required: false,
|
|
43
|
-
}),
|
|
44
|
-
},
|
|
45
|
-
run(context) {
|
|
46
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
47
|
-
return yield requests_1.bigCommerceApiService.createCustomer({
|
|
48
|
-
auth: context.auth.props,
|
|
49
|
-
payload: [
|
|
50
|
-
{
|
|
51
|
-
email: context.propsValue.email,
|
|
52
|
-
first_name: context.propsValue.first_name,
|
|
53
|
-
last_name: context.propsValue.last_name,
|
|
54
|
-
company: context.propsValue.company,
|
|
55
|
-
phone: context.propsValue.phone,
|
|
56
|
-
notes: context.propsValue.notes,
|
|
57
|
-
},
|
|
58
|
-
],
|
|
59
|
-
});
|
|
60
|
-
});
|
|
61
|
-
},
|
|
62
|
-
});
|
|
63
|
-
//# sourceMappingURL=create-customer.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"create-customer.js","sourceRoot":"","sources":["../../../../src/lib/actions/create-customer.ts"],"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OAAO,CAAC,UAAU,CAAC,UAAU;wBACzC,SAAS,EAAE,OAAO,CAAC,UAAU,CAAC,SAAS;wBACvC,OAAO,EAAE,OAAO,CAAC,UAAU,CAAC,OAAO;wBACnC,KAAK,EAAE,OAAO,CAAC,UAAU,CAAC,KAAK;wBAC/B,KAAK,EAAE,OAAO,CAAC,UAAU,CAAC,KAAK;qBAChC;iBACF;aACF,CAAC,CAAC;QACL,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export declare const deleteAProduct: 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
|
-
}>;
|
|
8
|
-
//# sourceMappingURL=delete-a-product.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"delete-a-product.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/delete-a-product.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,cAAc;;;;;;EAkBzB,CAAC"}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.deleteAProduct = 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.deleteAProduct = (0, pieces_framework_1.createAction)({
|
|
9
|
-
auth: auth_1.bigcommerceAuth,
|
|
10
|
-
name: 'deleteAProduct',
|
|
11
|
-
displayName: 'Delete a Product',
|
|
12
|
-
description: 'Deletes an existing Product',
|
|
13
|
-
props: {
|
|
14
|
-
productId: pieces_framework_1.Property.ShortText({
|
|
15
|
-
displayName: 'Product ID',
|
|
16
|
-
description: 'The ID of the product to delete',
|
|
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.deleteProduct({
|
|
23
|
-
auth: context.auth.props,
|
|
24
|
-
productId: context.propsValue.productId,
|
|
25
|
-
});
|
|
26
|
-
});
|
|
27
|
-
},
|
|
28
|
-
});
|
|
29
|
-
//# sourceMappingURL=delete-a-product.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"delete-a-product.js","sourceRoot":"","sources":["../../../../src/lib/actions/delete-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;IACtB,WAAW,EAAE,kBAAkB;IAC/B,WAAW,EAAE,6BAA6B;IAC1C,KAAK,EAAE;QACL,SAAS,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC5B,WAAW,EAAE,YAAY;YACzB,WAAW,EAAE,iCAAiC;YAC9C,QAAQ,EAAE,IAAI;SACf,CAAC;KACH;IACK,GAAG,CAAC,OAAO;;YACf,OAAO,MAAM,gCAAqB,CAAC,aAAa,CAAC;gBAC/C,IAAI,EAAE,OAAO,CAAC,IAAI,CAAC,KAAK;gBACxB,SAAS,EAAE,OAAO,CAAC,UAAU,CAAC,SAAS;aACxC,CAAC,CAAC;QACL,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
export declare const findOrCreateCustomer: 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<true>;
|
|
7
|
-
first_name: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
8
|
-
last_name: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
9
|
-
company: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
10
|
-
phone: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
11
|
-
notes: import("@activepieces/pieces-framework").LongTextProperty<false>;
|
|
12
|
-
}>;
|
|
13
|
-
//# sourceMappingURL=find-or-create-customer.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"find-or-create-customer.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/find-or-create-customer.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,oBAAoB;;;;;;;;;;;EAsE/B,CAAC"}
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.findOrCreateCustomer = 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.findOrCreateCustomer = (0, pieces_framework_1.createAction)({
|
|
9
|
-
auth: auth_1.bigcommerceAuth,
|
|
10
|
-
name: 'findOrCreateCustomer',
|
|
11
|
-
displayName: 'Find or Create Customer',
|
|
12
|
-
description: 'Finds or creates a customer',
|
|
13
|
-
props: {
|
|
14
|
-
email: pieces_framework_1.Property.ShortText({
|
|
15
|
-
displayName: 'Email',
|
|
16
|
-
description: 'Customer email address',
|
|
17
|
-
required: true,
|
|
18
|
-
}),
|
|
19
|
-
first_name: pieces_framework_1.Property.ShortText({
|
|
20
|
-
displayName: 'First Name',
|
|
21
|
-
description: 'Customer first name',
|
|
22
|
-
required: true,
|
|
23
|
-
}),
|
|
24
|
-
last_name: pieces_framework_1.Property.ShortText({
|
|
25
|
-
displayName: 'Last Name',
|
|
26
|
-
description: 'Customer last name',
|
|
27
|
-
required: true,
|
|
28
|
-
}),
|
|
29
|
-
company: pieces_framework_1.Property.ShortText({
|
|
30
|
-
displayName: 'Company',
|
|
31
|
-
description: 'Customer company name',
|
|
32
|
-
required: false,
|
|
33
|
-
}),
|
|
34
|
-
phone: pieces_framework_1.Property.ShortText({
|
|
35
|
-
displayName: 'Phone',
|
|
36
|
-
description: 'Customer phone number',
|
|
37
|
-
required: false,
|
|
38
|
-
}),
|
|
39
|
-
notes: pieces_framework_1.Property.LongText({
|
|
40
|
-
displayName: 'Notes',
|
|
41
|
-
description: 'Customer notes',
|
|
42
|
-
required: false,
|
|
43
|
-
}),
|
|
44
|
-
},
|
|
45
|
-
run(context) {
|
|
46
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
47
|
-
const params = new URLSearchParams();
|
|
48
|
-
params.append('email:in', context.propsValue.email);
|
|
49
|
-
if (context.propsValue.phone)
|
|
50
|
-
params.append('phone:in', context.propsValue.phone);
|
|
51
|
-
const response = yield requests_1.bigCommerceApiService.fetchCustomers({
|
|
52
|
-
auth: context.auth.props,
|
|
53
|
-
queryString: params.toString(),
|
|
54
|
-
});
|
|
55
|
-
if (response.data && response.data.length > 0) {
|
|
56
|
-
return { found: true, data: response.data };
|
|
57
|
-
}
|
|
58
|
-
const newCustomer = yield requests_1.bigCommerceApiService.createCustomer({
|
|
59
|
-
auth: context.auth.props,
|
|
60
|
-
payload: [
|
|
61
|
-
{
|
|
62
|
-
email: context.propsValue.email,
|
|
63
|
-
first_name: context.propsValue.first_name,
|
|
64
|
-
last_name: context.propsValue.last_name,
|
|
65
|
-
company: context.propsValue.company,
|
|
66
|
-
phone: context.propsValue.phone,
|
|
67
|
-
notes: context.propsValue.notes,
|
|
68
|
-
},
|
|
69
|
-
],
|
|
70
|
-
});
|
|
71
|
-
return { found: false, data: newCustomer.data };
|
|
72
|
-
});
|
|
73
|
-
},
|
|
74
|
-
});
|
|
75
|
-
//# sourceMappingURL=find-or-create-customer.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"find-or-create-customer.js","sourceRoot":"","sources":["../../../../src/lib/actions/find-or-create-customer.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,yCAAiD;AACjD,iDAA2D;AAE9C,QAAA,oBAAoB,GAAG,IAAA,+BAAY,EAAC;IAC/C,IAAI,EAAE,sBAAe;IACrB,IAAI,EAAE,sBAAsB;IAC5B,WAAW,EAAE,yBAAyB;IACtC,WAAW,EAAE,6BAA6B;IAC1C,KAAK,EAAE;QACL,KAAK,EAAE,2BAAQ,CAAC,SAAS,CAAC;YACxB,WAAW,EAAE,OAAO;YACpB,WAAW,EAAE,wBAAwB;YACrC,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,UAAU,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC7B,WAAW,EAAE,YAAY;YACzB,WAAW,EAAE,qBAAqB;YAClC,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,SAAS,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC5B,WAAW,EAAE,WAAW;YACxB,WAAW,EAAE,oBAAoB;YACjC,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,OAAO,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC1B,WAAW,EAAE,SAAS;YACtB,WAAW,EAAE,uBAAuB;YACpC,QAAQ,EAAE,KAAK;SAChB,CAAC;QACF,KAAK,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC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AC,UAAU,CAAC,KAAK;wBAC/B,KAAK,EAAE,OAAO,CAAC,UAAU,CAAC,KAAK;qBAChC;iBACF;aACF,CAAC,CAAC;YAEH,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,WAAW,CAAC,IAAI,EAAE,CAAC;QAClD,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
export declare const findOrCreateCustomersAddress: 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").DropdownProperty<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").DropdownProperty<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
|
-
first_name: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
16
|
-
last_name: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
17
|
-
address1: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
18
|
-
address2: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
19
|
-
city: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
20
|
-
state_or_province: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
21
|
-
postal_code: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
22
|
-
country_code: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
23
|
-
phone: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
24
|
-
}>;
|
|
25
|
-
//# sourceMappingURL=find-or-create-customers-address.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"find-or-create-customers-address.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/find-or-create-customers-address.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;EAyFvC,CAAC"}
|
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.findOrCreateCustomersAddress = 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 props_1 = require("../common/props");
|
|
8
|
-
const requests_1 = require("../common/requests");
|
|
9
|
-
exports.findOrCreateCustomersAddress = (0, pieces_framework_1.createAction)({
|
|
10
|
-
auth: auth_1.bigcommerceAuth,
|
|
11
|
-
name: 'findOrCreateCustomersAddress',
|
|
12
|
-
displayName: 'Find or Create Customer’s Address',
|
|
13
|
-
description: 'Finds or creates a customer’s address',
|
|
14
|
-
props: {
|
|
15
|
-
customer_id: (0, props_1.customerDropdown)({
|
|
16
|
-
required: true,
|
|
17
|
-
}),
|
|
18
|
-
first_name: pieces_framework_1.Property.ShortText({
|
|
19
|
-
displayName: 'First Name',
|
|
20
|
-
required: true,
|
|
21
|
-
}),
|
|
22
|
-
last_name: pieces_framework_1.Property.ShortText({
|
|
23
|
-
displayName: 'Last Name',
|
|
24
|
-
required: true,
|
|
25
|
-
}),
|
|
26
|
-
address1: pieces_framework_1.Property.ShortText({
|
|
27
|
-
displayName: 'Address Line 1',
|
|
28
|
-
required: true,
|
|
29
|
-
}),
|
|
30
|
-
address2: pieces_framework_1.Property.ShortText({
|
|
31
|
-
displayName: 'Address Line 2',
|
|
32
|
-
required: false,
|
|
33
|
-
}),
|
|
34
|
-
city: pieces_framework_1.Property.ShortText({
|
|
35
|
-
displayName: 'City',
|
|
36
|
-
required: true,
|
|
37
|
-
}),
|
|
38
|
-
state_or_province: pieces_framework_1.Property.ShortText({
|
|
39
|
-
displayName: 'State/Province',
|
|
40
|
-
required: true,
|
|
41
|
-
}),
|
|
42
|
-
postal_code: pieces_framework_1.Property.ShortText({
|
|
43
|
-
displayName: 'Postal Code',
|
|
44
|
-
required: true,
|
|
45
|
-
}),
|
|
46
|
-
country_code: pieces_framework_1.Property.ShortText({
|
|
47
|
-
displayName: 'Country Code',
|
|
48
|
-
description: 'ISO 3166-1 alpha-2 country code',
|
|
49
|
-
required: true,
|
|
50
|
-
}),
|
|
51
|
-
phone: pieces_framework_1.Property.ShortText({
|
|
52
|
-
displayName: 'Phone',
|
|
53
|
-
required: false,
|
|
54
|
-
}),
|
|
55
|
-
},
|
|
56
|
-
run(context) {
|
|
57
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
58
|
-
const params = new URLSearchParams();
|
|
59
|
-
params.append('customer_id:in', context.propsValue.customer_id);
|
|
60
|
-
const response = yield requests_1.bigCommerceApiService.fetchCustomerAddresses({
|
|
61
|
-
auth: context.auth.props,
|
|
62
|
-
queryString: params.toString(),
|
|
63
|
-
});
|
|
64
|
-
if (response.data && response.data.length > 0) {
|
|
65
|
-
const existingAddress = response.data.find((addr) => addr.address1 === context.propsValue.address1 &&
|
|
66
|
-
addr.city === context.propsValue.city &&
|
|
67
|
-
addr.postal_code === context.propsValue.postal_code);
|
|
68
|
-
if (existingAddress) {
|
|
69
|
-
return { found: true, data: existingAddress };
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
const newAddress = yield requests_1.bigCommerceApiService.createCustomerAddress({
|
|
73
|
-
auth: context.auth.props,
|
|
74
|
-
payload: [
|
|
75
|
-
{
|
|
76
|
-
customer_id: context.propsValue.customer_id,
|
|
77
|
-
first_name: context.propsValue.first_name,
|
|
78
|
-
last_name: context.propsValue.last_name,
|
|
79
|
-
address1: context.propsValue.address1,
|
|
80
|
-
address2: context.propsValue.address2,
|
|
81
|
-
city: context.propsValue.city,
|
|
82
|
-
state_or_province: context.propsValue.state_or_province,
|
|
83
|
-
postal_code: context.propsValue.postal_code,
|
|
84
|
-
country_code: context.propsValue.country_code,
|
|
85
|
-
phone: context.propsValue.phone,
|
|
86
|
-
},
|
|
87
|
-
],
|
|
88
|
-
});
|
|
89
|
-
return { found: false, data: newAddress.data };
|
|
90
|
-
});
|
|
91
|
-
},
|
|
92
|
-
});
|
|
93
|
-
//# sourceMappingURL=find-or-create-customers-address.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"find-or-create-customers-address.js","sourceRoot":"","sources":["../../../../src/lib/actions/find-or-create-customers-address.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,yCAAiD;AACjD,2CAAmD;AACnD,iDAA2D;AAE9C,QAAA,4BAA4B,GAAG,IAAA,+BAAY,EAAC;IACvD,IAAI,EAAE,sBAAe;IACrB,IAAI,EAAE,8BAA8B;IACpC,WAAW,EAAE,mCAAmC;IAChD,WAAW,EAAE,uCAAuC;IACpD,KAAK,EAAE;QACL,WAAW,EAAE,IAAA,wBAAgB,EAAC;YAC5B,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,UAAU,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC7B,WAAW,EAAE,YAAY;YACzB,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,SAAS,EAAE,2BAAQ,CAAC,S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A;CACF,CAAC,CAAC"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
export declare const findOrCreateProduct: 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<true>;
|
|
7
|
-
sku: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
8
|
-
type: import("@activepieces/pieces-framework").StaticDropdownProperty<string, true>;
|
|
9
|
-
weight: import("@activepieces/pieces-framework").NumberProperty<true>;
|
|
10
|
-
price: import("@activepieces/pieces-framework").NumberProperty<true>;
|
|
11
|
-
description: import("@activepieces/pieces-framework").LongTextProperty<false>;
|
|
12
|
-
brand_id: import("@activepieces/pieces-framework").NumberProperty<false>;
|
|
13
|
-
}>;
|
|
14
|
-
//# sourceMappingURL=find-or-create-product.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"find-or-create-product.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/find-or-create-product.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,mBAAmB;;;;;;;;;;;;EAsE9B,CAAC"}
|