@agnocon/piece-bigcommerce 0.1.11
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/LICENSE.MIT-AP +24 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +86 -0
- package/dist/index.js.map +1 -0
- package/dist/lib/actions/create-a-product.d.ts +14 -0
- package/dist/lib/actions/create-a-product.d.ts.map +1 -0
- package/dist/lib/actions/create-a-product.js +80 -0
- package/dist/lib/actions/create-a-product.js.map +1 -0
- package/dist/lib/actions/create-blog-post.d.ts +16 -0
- package/dist/lib/actions/create-blog-post.d.ts.map +1 -0
- package/dist/lib/actions/create-blog-post.js +87 -0
- package/dist/lib/actions/create-blog-post.js.map +1 -0
- package/dist/lib/actions/create-customer-address.d.ts +25 -0
- package/dist/lib/actions/create-customer-address.d.ts.map +1 -0
- package/dist/lib/actions/create-customer-address.js +85 -0
- package/dist/lib/actions/create-customer-address.js.map +1 -0
- package/dist/lib/actions/create-customer.d.ts +13 -0
- package/dist/lib/actions/create-customer.d.ts.map +1 -0
- package/dist/lib/actions/create-customer.js +70 -0
- package/dist/lib/actions/create-customer.js.map +1 -0
- package/dist/lib/actions/delete-a-product.d.ts +8 -0
- package/dist/lib/actions/delete-a-product.d.ts.map +1 -0
- package/dist/lib/actions/delete-a-product.js +36 -0
- package/dist/lib/actions/delete-a-product.js.map +1 -0
- package/dist/lib/actions/find-or-create-customer.d.ts +13 -0
- package/dist/lib/actions/find-or-create-customer.d.ts.map +1 -0
- package/dist/lib/actions/find-or-create-customer.js +82 -0
- package/dist/lib/actions/find-or-create-customer.js.map +1 -0
- package/dist/lib/actions/find-or-create-customers-address.d.ts +25 -0
- package/dist/lib/actions/find-or-create-customers-address.d.ts.map +1 -0
- package/dist/lib/actions/find-or-create-customers-address.js +100 -0
- package/dist/lib/actions/find-or-create-customers-address.js.map +1 -0
- package/dist/lib/actions/find-or-create-product.d.ts +14 -0
- package/dist/lib/actions/find-or-create-product.d.ts.map +1 -0
- package/dist/lib/actions/find-or-create-product.js +84 -0
- package/dist/lib/actions/find-or-create-product.js.map +1 -0
- package/dist/lib/actions/get-order.d.ts +8 -0
- package/dist/lib/actions/get-order.d.ts.map +1 -0
- package/dist/lib/actions/get-order.js +36 -0
- package/dist/lib/actions/get-order.js.map +1 -0
- package/dist/lib/actions/list-categories.d.ts +8 -0
- package/dist/lib/actions/list-categories.d.ts.map +1 -0
- package/dist/lib/actions/list-categories.js +39 -0
- package/dist/lib/actions/list-categories.js.map +1 -0
- package/dist/lib/actions/list-orders.d.ts +9 -0
- package/dist/lib/actions/list-orders.d.ts.map +1 -0
- package/dist/lib/actions/list-orders.js +46 -0
- package/dist/lib/actions/list-orders.js.map +1 -0
- package/dist/lib/actions/search-customer-address.d.ts +17 -0
- package/dist/lib/actions/search-customer-address.d.ts.map +1 -0
- package/dist/lib/actions/search-customer-address.js +45 -0
- package/dist/lib/actions/search-customer-address.js.map +1 -0
- package/dist/lib/actions/search-customer.d.ts +10 -0
- package/dist/lib/actions/search-customer.d.ts.map +1 -0
- package/dist/lib/actions/search-customer.js +53 -0
- package/dist/lib/actions/search-customer.js.map +1 -0
- package/dist/lib/actions/search-product.d.ts +13 -0
- package/dist/lib/actions/search-product.d.ts.map +1 -0
- package/dist/lib/actions/search-product.js +77 -0
- package/dist/lib/actions/search-product.js.map +1 -0
- package/dist/lib/actions/update-a-product.d.ts +15 -0
- package/dist/lib/actions/update-a-product.d.ts.map +1 -0
- package/dist/lib/actions/update-a-product.js +81 -0
- package/dist/lib/actions/update-a-product.js.map +1 -0
- package/dist/lib/common/auth.d.ts +6 -0
- package/dist/lib/common/auth.d.ts.map +1 -0
- package/dist/lib/common/auth.js +50 -0
- package/dist/lib/common/auth.js.map +1 -0
- package/dist/lib/common/constants.d.ts +11 -0
- package/dist/lib/common/constants.d.ts.map +1 -0
- package/dist/lib/common/constants.js +14 -0
- package/dist/lib/common/constants.js.map +1 -0
- package/dist/lib/common/props.d.ts +23 -0
- package/dist/lib/common/props.d.ts.map +1 -0
- package/dist/lib/common/props.js +85 -0
- package/dist/lib/common/props.js.map +1 -0
- package/dist/lib/common/requests.d.ts +65 -0
- package/dist/lib/common/requests.d.ts.map +1 -0
- package/dist/lib/common/requests.js +179 -0
- package/dist/lib/common/requests.js.map +1 -0
- package/dist/lib/triggers/abandoned-cart.d.ts +19 -0
- package/dist/lib/triggers/abandoned-cart.d.ts.map +1 -0
- package/dist/lib/triggers/abandoned-cart.js +66 -0
- package/dist/lib/triggers/abandoned-cart.js.map +1 -0
- package/dist/lib/triggers/cart-created.d.ts +19 -0
- package/dist/lib/triggers/cart-created.d.ts.map +1 -0
- package/dist/lib/triggers/cart-created.js +68 -0
- package/dist/lib/triggers/cart-created.js.map +1 -0
- package/dist/lib/triggers/customer-address-created.d.ts +19 -0
- package/dist/lib/triggers/customer-address-created.d.ts.map +1 -0
- package/dist/lib/triggers/customer-address-created.js +68 -0
- package/dist/lib/triggers/customer-address-created.js.map +1 -0
- package/dist/lib/triggers/customer-address-updated.d.ts +19 -0
- package/dist/lib/triggers/customer-address-updated.d.ts.map +1 -0
- package/dist/lib/triggers/customer-address-updated.js +68 -0
- package/dist/lib/triggers/customer-address-updated.js.map +1 -0
- package/dist/lib/triggers/customer-created.d.ts +19 -0
- package/dist/lib/triggers/customer-created.d.ts.map +1 -0
- package/dist/lib/triggers/customer-created.js +70 -0
- package/dist/lib/triggers/customer-created.js.map +1 -0
- package/dist/lib/triggers/customer-updated.d.ts +19 -0
- package/dist/lib/triggers/customer-updated.d.ts.map +1 -0
- package/dist/lib/triggers/customer-updated.js +68 -0
- package/dist/lib/triggers/customer-updated.js.map +1 -0
- package/dist/lib/triggers/order-created.d.ts +19 -0
- package/dist/lib/triggers/order-created.d.ts.map +1 -0
- package/dist/lib/triggers/order-created.js +68 -0
- package/dist/lib/triggers/order-created.js.map +1 -0
- package/dist/lib/triggers/order-status-updated.d.ts +19 -0
- package/dist/lib/triggers/order-status-updated.d.ts.map +1 -0
- package/dist/lib/triggers/order-status-updated.js +68 -0
- package/dist/lib/triggers/order-status-updated.js.map +1 -0
- package/dist/lib/triggers/order-updated.d.ts +19 -0
- package/dist/lib/triggers/order-updated.d.ts.map +1 -0
- package/dist/lib/triggers/order-updated.js +68 -0
- package/dist/lib/triggers/order-updated.js.map +1 -0
- package/dist/lib/triggers/product-created.d.ts +19 -0
- package/dist/lib/triggers/product-created.d.ts.map +1 -0
- package/dist/lib/triggers/product-created.js +68 -0
- package/dist/lib/triggers/product-created.js.map +1 -0
- package/dist/lib/triggers/shipment-created.d.ts +19 -0
- package/dist/lib/triggers/shipment-created.d.ts.map +1 -0
- package/dist/lib/triggers/shipment-created.js +68 -0
- package/dist/lib/triggers/shipment-created.js.map +1 -0
- package/package.json +46 -0
- package/src/index.ts +81 -0
- package/src/lib/actions/create-a-product.ts +73 -0
- package/src/lib/actions/create-blog-post.ts +82 -0
- package/src/lib/actions/create-customer-address.ts +78 -0
- package/src/lib/actions/create-customer.ts +63 -0
- package/src/lib/actions/delete-a-product.ts +29 -0
- package/src/lib/actions/find-or-create-customer.ts +81 -0
- package/src/lib/actions/find-or-create-customers-address.ts +101 -0
- package/src/lib/actions/find-or-create-product.ts +81 -0
- package/src/lib/actions/get-order.ts +29 -0
- package/src/lib/actions/list-categories.ts +31 -0
- package/src/lib/actions/list-orders.ts +38 -0
- package/src/lib/actions/search-customer-address.ts +42 -0
- package/src/lib/actions/search-customer.ts +47 -0
- package/src/lib/actions/search-product.ts +69 -0
- package/src/lib/actions/update-a-product.ts +78 -0
- package/src/lib/common/auth.ts +44 -0
- package/src/lib/common/constants.ts +15 -0
- package/src/lib/common/props.ts +90 -0
- package/src/lib/common/requests.ts +252 -0
- package/src/lib/triggers/abandoned-cart.ts +58 -0
- package/src/lib/triggers/cart-created.ts +60 -0
- package/src/lib/triggers/customer-address-created.ts +60 -0
- package/src/lib/triggers/customer-address-updated.ts +60 -0
- package/src/lib/triggers/customer-created.ts +62 -0
- package/src/lib/triggers/customer-updated.ts +60 -0
- package/src/lib/triggers/order-created.ts +60 -0
- package/src/lib/triggers/order-status-updated.ts +60 -0
- package/src/lib/triggers/order-updated.ts +60 -0
- package/src/lib/triggers/product-created.ts +60 -0
- package/src/lib/triggers/shipment-created.ts +61 -0
package/LICENSE.MIT-AP
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) Activepieces AB
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
22
|
+
|
|
23
|
+
Derived helpers in this folder are adapted from Activepieces (MIT) for use
|
|
24
|
+
inside CX without depending on @activepieces/* packages at runtime.
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare const bigcommerce: import("@agnocon/pieces-framework").Piece<import("@agnocon/pieces-framework").CustomAuthProperty<{
|
|
2
|
+
instruction: import("@agnocon/pieces-framework/dist/lib/property/input/markdown-property").MarkDownProperty;
|
|
3
|
+
storeHash: import("@agnocon/pieces-framework").ShortTextProperty<true>;
|
|
4
|
+
accessToken: import("@agnocon/pieces-framework").ShortTextProperty<true>;
|
|
5
|
+
}>>;
|
|
6
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAiCA,eAAO,MAAM,WAAW;;;;GAiDtB,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.bigcommerce = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
// Vendored from Activepieces packages/pieces/community/bigcommerce/src/index.ts (MIT).
|
|
6
|
+
// Generated by packages/scripts/vendor-ap.mjs - do not edit by hand.
|
|
7
|
+
const pieces_framework_1 = require("@agnocon/pieces-framework");
|
|
8
|
+
const abandoned_cart_1 = require("./lib/triggers/abandoned-cart");
|
|
9
|
+
const cart_created_1 = require("./lib/triggers/cart-created");
|
|
10
|
+
const customer_address_created_1 = require("./lib/triggers/customer-address-created");
|
|
11
|
+
const customer_address_updated_1 = require("./lib/triggers/customer-address-updated");
|
|
12
|
+
const customer_created_1 = require("./lib/triggers/customer-created");
|
|
13
|
+
const customer_updated_1 = require("./lib/triggers/customer-updated");
|
|
14
|
+
const order_created_1 = require("./lib/triggers/order-created");
|
|
15
|
+
const order_updated_1 = require("./lib/triggers/order-updated");
|
|
16
|
+
const order_status_updated_1 = require("./lib/triggers/order-status-updated");
|
|
17
|
+
const product_created_1 = require("./lib/triggers/product-created");
|
|
18
|
+
const shipment_created_1 = require("./lib/triggers/shipment-created");
|
|
19
|
+
const create_customer_1 = require("./lib/actions/create-customer");
|
|
20
|
+
const auth_1 = require("./lib/common/auth");
|
|
21
|
+
const create_a_product_1 = require("./lib/actions/create-a-product");
|
|
22
|
+
const update_a_product_1 = require("./lib/actions/update-a-product");
|
|
23
|
+
const delete_a_product_1 = require("./lib/actions/delete-a-product");
|
|
24
|
+
const get_order_1 = require("./lib/actions/get-order");
|
|
25
|
+
const list_orders_1 = require("./lib/actions/list-orders");
|
|
26
|
+
const list_categories_1 = require("./lib/actions/list-categories");
|
|
27
|
+
const create_blog_post_1 = require("./lib/actions/create-blog-post");
|
|
28
|
+
const create_customer_address_1 = require("./lib/actions/create-customer-address");
|
|
29
|
+
const pieces_common_1 = require("@agnocon/pieces-common");
|
|
30
|
+
const constants_1 = require("./lib/common/constants");
|
|
31
|
+
const search_customer_1 = require("./lib/actions/search-customer");
|
|
32
|
+
const search_product_1 = require("./lib/actions/search-product");
|
|
33
|
+
const search_customer_address_1 = require("./lib/actions/search-customer-address");
|
|
34
|
+
const find_or_create_customer_1 = require("./lib/actions/find-or-create-customer");
|
|
35
|
+
const find_or_create_product_1 = require("./lib/actions/find-or-create-product");
|
|
36
|
+
const find_or_create_customers_address_1 = require("./lib/actions/find-or-create-customers-address");
|
|
37
|
+
exports.bigcommerce = (0, pieces_framework_1.createPiece)({
|
|
38
|
+
displayName: 'BigCommerce',
|
|
39
|
+
description: 'BigCommerce is a leading e-commerce platform that enables businesses to create and manage online stores.',
|
|
40
|
+
auth: auth_1.bigcommerceAuth,
|
|
41
|
+
minimumSupportedRelease: '0.36.1',
|
|
42
|
+
logoUrl: 'https://cdn.activepieces.com/pieces/bigcommerce.png',
|
|
43
|
+
authors: ['gs03-dev', 'sanket-a11y', 'Angelebeats'],
|
|
44
|
+
actions: [
|
|
45
|
+
create_customer_1.createCustomer,
|
|
46
|
+
create_a_product_1.createAProduct,
|
|
47
|
+
update_a_product_1.updateAProduct,
|
|
48
|
+
delete_a_product_1.deleteAProduct,
|
|
49
|
+
get_order_1.getOrder,
|
|
50
|
+
list_orders_1.listOrders,
|
|
51
|
+
list_categories_1.listCategories,
|
|
52
|
+
create_blog_post_1.createBlogPost,
|
|
53
|
+
create_customer_address_1.createCustomerAddress,
|
|
54
|
+
search_customer_1.searchCustomer,
|
|
55
|
+
search_product_1.searchProduct,
|
|
56
|
+
search_customer_address_1.searchCustomerAddress,
|
|
57
|
+
find_or_create_customer_1.findOrCreateCustomer,
|
|
58
|
+
find_or_create_product_1.findOrCreateProduct,
|
|
59
|
+
find_or_create_customers_address_1.findOrCreateCustomersAddress,
|
|
60
|
+
(0, pieces_common_1.createCustomApiCallAction)({
|
|
61
|
+
auth: auth_1.bigcommerceAuth,
|
|
62
|
+
baseUrl: (auth) => auth ? (0, constants_1.GET_BASE_URL)(auth.props.storeHash) : '',
|
|
63
|
+
authMapping: (auth) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
64
|
+
return {
|
|
65
|
+
'X-Auth-Token': auth.props.accessToken,
|
|
66
|
+
'Content-Type': 'application/json',
|
|
67
|
+
Accept: 'application/json',
|
|
68
|
+
};
|
|
69
|
+
}),
|
|
70
|
+
}),
|
|
71
|
+
],
|
|
72
|
+
triggers: [
|
|
73
|
+
abandoned_cart_1.abandonedCart,
|
|
74
|
+
cart_created_1.cartCreated,
|
|
75
|
+
customer_address_created_1.customerAddressCreated,
|
|
76
|
+
customer_address_updated_1.customerAddressUpdated,
|
|
77
|
+
customer_created_1.customerCreated,
|
|
78
|
+
customer_updated_1.customerUpdated,
|
|
79
|
+
order_created_1.orderCreated,
|
|
80
|
+
order_updated_1.orderUpdated,
|
|
81
|
+
order_status_updated_1.orderStatusUpdated,
|
|
82
|
+
product_created_1.productCreated,
|
|
83
|
+
shipment_created_1.shipmentCreated,
|
|
84
|
+
],
|
|
85
|
+
});
|
|
86
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3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,OAAO;oBACL,cAAc,EAAE,IAAI,CAAC,KAAK,CAAC,WAAW;oBACtC,cAAc,EAAE,kBAAkB;oBAClC,MAAM,EAAE,kBAAkB;iBAC3B,CAAC;YACJ,CAAC,CAAA;SACF,CAAC;KACH;IACD,QAAQ,EAAE;QACR,8BAAa;QACb,0BAAW;QACX,iDAAsB;QACtB,iDAAsB;QACtB,kCAAe;QACf,kCAAe;QACf,4BAAY;QACZ,4BAAY;QACZ,yCAAkB;QAClB,gCAAc;QACd,kCAAe;KAChB;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export declare const createAProduct: import("@agnocon/pieces-framework").IAction<import("@agnocon/pieces-framework").CustomAuthProperty<{
|
|
2
|
+
instruction: import("@agnocon/pieces-framework/dist/lib/property/input/markdown-property").MarkDownProperty;
|
|
3
|
+
storeHash: import("@agnocon/pieces-framework").ShortTextProperty<true>;
|
|
4
|
+
accessToken: import("@agnocon/pieces-framework").ShortTextProperty<true>;
|
|
5
|
+
}>, {
|
|
6
|
+
name: import("@agnocon/pieces-framework").ShortTextProperty<true>;
|
|
7
|
+
type: import("@agnocon/pieces-framework").StaticDropdownProperty<string, true>;
|
|
8
|
+
sku: import("@agnocon/pieces-framework").ShortTextProperty<false>;
|
|
9
|
+
description: import("@agnocon/pieces-framework").LongTextProperty<false>;
|
|
10
|
+
weight: import("@agnocon/pieces-framework").NumberProperty<true>;
|
|
11
|
+
price: import("@agnocon/pieces-framework").NumberProperty<true>;
|
|
12
|
+
brand_id: import("@agnocon/pieces-framework").NumberProperty<false>;
|
|
13
|
+
}>;
|
|
14
|
+
//# sourceMappingURL=create-a-product.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-a-product.d.ts","sourceRoot":"","sources":["../../../src/lib/actions/create-a-product.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,cAAc;;;;;;;;;;;;EAoEzB,CAAC"}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createAProduct = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
// Vendored from Activepieces packages/pieces/community/bigcommerce/src/lib/actions/create-a-product.ts (MIT).
|
|
6
|
+
// Generated by packages/scripts/vendor-ap.mjs - do not edit by hand.
|
|
7
|
+
const pieces_framework_1 = require("@agnocon/pieces-framework");
|
|
8
|
+
const auth_1 = require("../common/auth");
|
|
9
|
+
const requests_1 = require("../common/requests");
|
|
10
|
+
exports.createAProduct = (0, pieces_framework_1.createAction)({
|
|
11
|
+
auth: auth_1.bigcommerceAuth,
|
|
12
|
+
name: 'createAProduct',
|
|
13
|
+
displayName: 'Create a Product',
|
|
14
|
+
description: 'Creates a Product',
|
|
15
|
+
audience: 'both',
|
|
16
|
+
aiMetadata: {
|
|
17
|
+
description: 'Creates a new catalog product in a BigCommerce store. Use to add an item to the store. Requires name, type (physical or digital), weight, and price; SKU, description, and brand_id are optional. Not idempotent: each call adds a new product, so search the catalog first if it may already exist.',
|
|
18
|
+
idempotent: false,
|
|
19
|
+
},
|
|
20
|
+
props: {
|
|
21
|
+
name: pieces_framework_1.Property.ShortText({
|
|
22
|
+
displayName: 'Product Name',
|
|
23
|
+
description: 'Name of the product',
|
|
24
|
+
required: true,
|
|
25
|
+
}),
|
|
26
|
+
type: pieces_framework_1.Property.StaticDropdown({
|
|
27
|
+
displayName: 'Product Type',
|
|
28
|
+
description: 'Type of product',
|
|
29
|
+
required: true,
|
|
30
|
+
options: {
|
|
31
|
+
options: [
|
|
32
|
+
{ label: 'Physical', value: 'physical' },
|
|
33
|
+
{ label: 'Digital', value: 'digital' },
|
|
34
|
+
],
|
|
35
|
+
},
|
|
36
|
+
}),
|
|
37
|
+
sku: pieces_framework_1.Property.ShortText({
|
|
38
|
+
displayName: 'SKU',
|
|
39
|
+
description: 'Product SKU',
|
|
40
|
+
required: false,
|
|
41
|
+
}),
|
|
42
|
+
description: pieces_framework_1.Property.LongText({
|
|
43
|
+
displayName: 'Description',
|
|
44
|
+
description: 'Product description',
|
|
45
|
+
required: false,
|
|
46
|
+
}),
|
|
47
|
+
weight: pieces_framework_1.Property.Number({
|
|
48
|
+
displayName: 'Weight',
|
|
49
|
+
description: 'Product weight',
|
|
50
|
+
required: true,
|
|
51
|
+
}),
|
|
52
|
+
price: pieces_framework_1.Property.Number({
|
|
53
|
+
displayName: 'Price',
|
|
54
|
+
description: 'Product price',
|
|
55
|
+
required: true,
|
|
56
|
+
}),
|
|
57
|
+
brand_id: pieces_framework_1.Property.Number({
|
|
58
|
+
displayName: 'Brand ID',
|
|
59
|
+
description: 'Brand ID',
|
|
60
|
+
required: false,
|
|
61
|
+
}),
|
|
62
|
+
},
|
|
63
|
+
run(context) {
|
|
64
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
65
|
+
return yield requests_1.bigCommerceApiService.createProduct({
|
|
66
|
+
auth: context.auth.props,
|
|
67
|
+
payload: {
|
|
68
|
+
name: context.propsValue.name,
|
|
69
|
+
type: context.propsValue.type,
|
|
70
|
+
sku: context.propsValue.sku,
|
|
71
|
+
description: context.propsValue.description,
|
|
72
|
+
weight: context.propsValue.weight,
|
|
73
|
+
price: context.propsValue.price,
|
|
74
|
+
brand_id: context.propsValue.brand_id,
|
|
75
|
+
},
|
|
76
|
+
});
|
|
77
|
+
});
|
|
78
|
+
},
|
|
79
|
+
});
|
|
80
|
+
//# sourceMappingURL=create-a-product.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-a-product.js","sourceRoot":"","sources":["../../../src/lib/actions/create-a-product.ts"],"names":[],"mappings":";;;;AAAA,8GAA8G;AAC9G,qEAAqE;AACrE,gEAAmE;AACnE,yCAAiD;AACjD,iDAA2D;AAE9C,QAAA,cAAc,GAAG,IAAA,+BAAY,EAAC;IACzC,IAAI,EAAE,sBAAe;IACrB,IAAI,EAAE,gBAAgB;IACtB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E,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"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export declare const createBlogPost: import("@agnocon/pieces-framework").IAction<import("@agnocon/pieces-framework").CustomAuthProperty<{
|
|
2
|
+
instruction: import("@agnocon/pieces-framework/dist/lib/property/input/markdown-property").MarkDownProperty;
|
|
3
|
+
storeHash: import("@agnocon/pieces-framework").ShortTextProperty<true>;
|
|
4
|
+
accessToken: import("@agnocon/pieces-framework").ShortTextProperty<true>;
|
|
5
|
+
}>, {
|
|
6
|
+
title: import("@agnocon/pieces-framework").ShortTextProperty<true>;
|
|
7
|
+
body: import("@agnocon/pieces-framework").LongTextProperty<true>;
|
|
8
|
+
author: import("@agnocon/pieces-framework").ShortTextProperty<false>;
|
|
9
|
+
url: import("@agnocon/pieces-framework").ShortTextProperty<false>;
|
|
10
|
+
published_date: import("@agnocon/pieces-framework").DateTimeProperty<false>;
|
|
11
|
+
meta_description: import("@agnocon/pieces-framework").LongTextProperty<false>;
|
|
12
|
+
meta_keywords: import("@agnocon/pieces-framework").LongTextProperty<false>;
|
|
13
|
+
tags: import("@agnocon/pieces-framework").ArrayProperty<false>;
|
|
14
|
+
is_published: import("@agnocon/pieces-framework").CheckboxProperty<false>;
|
|
15
|
+
}>;
|
|
16
|
+
//# sourceMappingURL=create-blog-post.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-blog-post.d.ts","sourceRoot":"","sources":["../../../src/lib/actions/create-blog-post.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,cAAc;;;;;;;;;;;;;;EA6EzB,CAAC"}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createBlogPost = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
// Vendored from Activepieces packages/pieces/community/bigcommerce/src/lib/actions/create-blog-post.ts (MIT).
|
|
6
|
+
// Generated by packages/scripts/vendor-ap.mjs - do not edit by hand.
|
|
7
|
+
const pieces_framework_1 = require("@agnocon/pieces-framework");
|
|
8
|
+
const auth_1 = require("../common/auth");
|
|
9
|
+
const requests_1 = require("../common/requests");
|
|
10
|
+
exports.createBlogPost = (0, pieces_framework_1.createAction)({
|
|
11
|
+
auth: auth_1.bigcommerceAuth,
|
|
12
|
+
name: 'createBlogPost',
|
|
13
|
+
displayName: 'Create Blog Post',
|
|
14
|
+
description: 'Creates a blog post',
|
|
15
|
+
audience: 'both',
|
|
16
|
+
aiMetadata: {
|
|
17
|
+
description: "Creates a blog post in a BigCommerce store's blog. Requires a title and body (HTML supported); author, URL, published date, meta description/keywords, tags, and a published flag are optional. Use to publish store blog content. Not idempotent: each call creates a new post.",
|
|
18
|
+
idempotent: false,
|
|
19
|
+
},
|
|
20
|
+
props: {
|
|
21
|
+
title: pieces_framework_1.Property.ShortText({
|
|
22
|
+
displayName: 'Title',
|
|
23
|
+
description: 'Blog post title',
|
|
24
|
+
required: true,
|
|
25
|
+
}),
|
|
26
|
+
body: pieces_framework_1.Property.LongText({
|
|
27
|
+
displayName: 'Body',
|
|
28
|
+
description: 'Blog post content (HTML supported)',
|
|
29
|
+
required: true,
|
|
30
|
+
}),
|
|
31
|
+
author: pieces_framework_1.Property.ShortText({
|
|
32
|
+
displayName: 'Author',
|
|
33
|
+
description: 'Author name',
|
|
34
|
+
required: false,
|
|
35
|
+
}),
|
|
36
|
+
url: pieces_framework_1.Property.ShortText({
|
|
37
|
+
displayName: 'URL',
|
|
38
|
+
description: 'URL for the public blog post. Example - /blog/welcome-bigcommerce/',
|
|
39
|
+
required: false,
|
|
40
|
+
}),
|
|
41
|
+
published_date: pieces_framework_1.Property.DateTime({
|
|
42
|
+
displayName: 'Published Date',
|
|
43
|
+
description: 'Published Date for the blog post. Example - Wed, 10 Aug 2022 15:39:15 -0500',
|
|
44
|
+
required: false,
|
|
45
|
+
}),
|
|
46
|
+
meta_description: pieces_framework_1.Property.LongText({
|
|
47
|
+
displayName: 'Meta Description',
|
|
48
|
+
description: 'Description text for this blog post’s <meta/> element.',
|
|
49
|
+
required: false,
|
|
50
|
+
}),
|
|
51
|
+
meta_keywords: pieces_framework_1.Property.LongText({
|
|
52
|
+
displayName: 'Meta Keywords',
|
|
53
|
+
description: 'Comma seperated (,) Keywords for this blog post’s <meta/> element. Eg welcome, bigcommerce',
|
|
54
|
+
required: false,
|
|
55
|
+
}),
|
|
56
|
+
tags: pieces_framework_1.Property.Array({
|
|
57
|
+
displayName: 'Tags',
|
|
58
|
+
description: 'Array of tags',
|
|
59
|
+
required: false,
|
|
60
|
+
}),
|
|
61
|
+
is_published: pieces_framework_1.Property.Checkbox({
|
|
62
|
+
displayName: 'Is Published',
|
|
63
|
+
description: 'Whether the post is published',
|
|
64
|
+
required: false,
|
|
65
|
+
defaultValue: true,
|
|
66
|
+
}),
|
|
67
|
+
},
|
|
68
|
+
run(context) {
|
|
69
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
70
|
+
return yield requests_1.bigCommerceApiService.createBlogPost({
|
|
71
|
+
auth: context.auth.props,
|
|
72
|
+
payload: {
|
|
73
|
+
title: context.propsValue.title,
|
|
74
|
+
body: context.propsValue.body,
|
|
75
|
+
author: context.propsValue.author,
|
|
76
|
+
tags: context.propsValue.tags,
|
|
77
|
+
is_published: context.propsValue.is_published,
|
|
78
|
+
meta_description: context.propsValue.meta_description,
|
|
79
|
+
meta_keywords: context.propsValue.meta_keywords,
|
|
80
|
+
published_date: context.propsValue.published_date,
|
|
81
|
+
url: context.propsValue.url,
|
|
82
|
+
},
|
|
83
|
+
});
|
|
84
|
+
});
|
|
85
|
+
},
|
|
86
|
+
});
|
|
87
|
+
//# sourceMappingURL=create-blog-post.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-blog-post.js","sourceRoot":"","sources":["../../../src/lib/actions/create-blog-post.ts"],"names":[],"mappings":";;;;AAAA,8GAA8G;AAC9G,qEAAqE;AACrE,gEAAmE;AACnE,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,QAAQ,EAAE,MAAM;IAChB,UAAU,EAAE;QACV,WAAW,EACT,kRAAkR;QACpR,UAAU,EAAE,KAAK;KAClB;IACD,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,WAAW,EAAE,QAAQ;YACrB,WAAW,EAAE,aAAa;YAC1B,QAAQ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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"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export declare const createCustomerAddress: import("@agnocon/pieces-framework").IAction<import("@agnocon/pieces-framework").CustomAuthProperty<{
|
|
2
|
+
instruction: import("@agnocon/pieces-framework/dist/lib/property/input/markdown-property").MarkDownProperty;
|
|
3
|
+
storeHash: import("@agnocon/pieces-framework").ShortTextProperty<true>;
|
|
4
|
+
accessToken: import("@agnocon/pieces-framework").ShortTextProperty<true>;
|
|
5
|
+
}>, {
|
|
6
|
+
customer_id: import("@agnocon/pieces-framework").DropdownProperty<unknown, false, import("@agnocon/pieces-framework").CustomAuthProperty<{
|
|
7
|
+
instruction: import("@agnocon/pieces-framework/dist/lib/property/input/markdown-property").MarkDownProperty;
|
|
8
|
+
storeHash: import("@agnocon/pieces-framework").ShortTextProperty<true>;
|
|
9
|
+
accessToken: import("@agnocon/pieces-framework").ShortTextProperty<true>;
|
|
10
|
+
}>> | import("@agnocon/pieces-framework").DropdownProperty<unknown, true, import("@agnocon/pieces-framework").CustomAuthProperty<{
|
|
11
|
+
instruction: import("@agnocon/pieces-framework/dist/lib/property/input/markdown-property").MarkDownProperty;
|
|
12
|
+
storeHash: import("@agnocon/pieces-framework").ShortTextProperty<true>;
|
|
13
|
+
accessToken: import("@agnocon/pieces-framework").ShortTextProperty<true>;
|
|
14
|
+
}>>;
|
|
15
|
+
first_name: import("@agnocon/pieces-framework").ShortTextProperty<true>;
|
|
16
|
+
last_name: import("@agnocon/pieces-framework").ShortTextProperty<true>;
|
|
17
|
+
address1: import("@agnocon/pieces-framework").ShortTextProperty<true>;
|
|
18
|
+
address2: import("@agnocon/pieces-framework").ShortTextProperty<false>;
|
|
19
|
+
city: import("@agnocon/pieces-framework").ShortTextProperty<true>;
|
|
20
|
+
state_or_province: import("@agnocon/pieces-framework").ShortTextProperty<true>;
|
|
21
|
+
postal_code: import("@agnocon/pieces-framework").ShortTextProperty<true>;
|
|
22
|
+
country_code: import("@agnocon/pieces-framework").ShortTextProperty<true>;
|
|
23
|
+
phone: import("@agnocon/pieces-framework").ShortTextProperty<false>;
|
|
24
|
+
}>;
|
|
25
|
+
//# sourceMappingURL=create-customer-address.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-customer-address.d.ts","sourceRoot":"","sources":["../../../src/lib/actions/create-customer-address.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;EAwEhC,CAAC"}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createCustomerAddress = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
// Vendored from Activepieces packages/pieces/community/bigcommerce/src/lib/actions/create-customer-address.ts (MIT).
|
|
6
|
+
// Generated by packages/scripts/vendor-ap.mjs - do not edit by hand.
|
|
7
|
+
const pieces_framework_1 = require("@agnocon/pieces-framework");
|
|
8
|
+
const auth_1 = require("../common/auth");
|
|
9
|
+
const props_1 = require("../common/props");
|
|
10
|
+
const requests_1 = require("../common/requests");
|
|
11
|
+
exports.createCustomerAddress = (0, pieces_framework_1.createAction)({
|
|
12
|
+
auth: auth_1.bigcommerceAuth,
|
|
13
|
+
name: 'createCustomerAddress',
|
|
14
|
+
displayName: 'Create Customer Address',
|
|
15
|
+
description: "Creates a customer's address",
|
|
16
|
+
audience: 'both',
|
|
17
|
+
aiMetadata: {
|
|
18
|
+
description: 'Adds a new address to an existing BigCommerce customer, identified by customer_id (selected from a dropdown of store customers). Requires name, address line 1, city, state/province, postal code, and an ISO 3166-1 alpha-2 country code. Use to attach a shipping or billing address to a customer. Not idempotent: each call appends a new address even if an identical one exists, so use Find or Create Customer’s Address to avoid duplicates.',
|
|
19
|
+
idempotent: false,
|
|
20
|
+
},
|
|
21
|
+
props: {
|
|
22
|
+
customer_id: (0, props_1.customerDropdown)({
|
|
23
|
+
required: true
|
|
24
|
+
}),
|
|
25
|
+
first_name: pieces_framework_1.Property.ShortText({
|
|
26
|
+
displayName: 'First Name',
|
|
27
|
+
required: true,
|
|
28
|
+
}),
|
|
29
|
+
last_name: pieces_framework_1.Property.ShortText({
|
|
30
|
+
displayName: 'Last Name',
|
|
31
|
+
required: true,
|
|
32
|
+
}),
|
|
33
|
+
address1: pieces_framework_1.Property.ShortText({
|
|
34
|
+
displayName: 'Address Line 1',
|
|
35
|
+
required: true,
|
|
36
|
+
}),
|
|
37
|
+
address2: pieces_framework_1.Property.ShortText({
|
|
38
|
+
displayName: 'Address Line 2',
|
|
39
|
+
required: false,
|
|
40
|
+
}),
|
|
41
|
+
city: pieces_framework_1.Property.ShortText({
|
|
42
|
+
displayName: 'City',
|
|
43
|
+
required: true,
|
|
44
|
+
}),
|
|
45
|
+
state_or_province: pieces_framework_1.Property.ShortText({
|
|
46
|
+
displayName: 'State/Province',
|
|
47
|
+
required: true,
|
|
48
|
+
}),
|
|
49
|
+
postal_code: pieces_framework_1.Property.ShortText({
|
|
50
|
+
displayName: 'Postal Code',
|
|
51
|
+
required: true,
|
|
52
|
+
}),
|
|
53
|
+
country_code: pieces_framework_1.Property.ShortText({
|
|
54
|
+
displayName: 'Country Code',
|
|
55
|
+
description: 'ISO 3166-1 alpha-2 country code',
|
|
56
|
+
required: true,
|
|
57
|
+
}),
|
|
58
|
+
phone: pieces_framework_1.Property.ShortText({
|
|
59
|
+
displayName: 'Phone',
|
|
60
|
+
required: false,
|
|
61
|
+
}),
|
|
62
|
+
},
|
|
63
|
+
run(context) {
|
|
64
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
65
|
+
return yield requests_1.bigCommerceApiService.createCustomerAddress({
|
|
66
|
+
auth: context.auth.props,
|
|
67
|
+
payload: [
|
|
68
|
+
{
|
|
69
|
+
customer_id: context.propsValue.customer_id,
|
|
70
|
+
first_name: context.propsValue.first_name,
|
|
71
|
+
last_name: context.propsValue.last_name,
|
|
72
|
+
address1: context.propsValue.address1,
|
|
73
|
+
address2: context.propsValue.address2,
|
|
74
|
+
city: context.propsValue.city,
|
|
75
|
+
state_or_province: context.propsValue.state_or_province,
|
|
76
|
+
postal_code: context.propsValue.postal_code,
|
|
77
|
+
country_code: context.propsValue.country_code,
|
|
78
|
+
phone: context.propsValue.phone,
|
|
79
|
+
},
|
|
80
|
+
],
|
|
81
|
+
});
|
|
82
|
+
});
|
|
83
|
+
},
|
|
84
|
+
});
|
|
85
|
+
//# sourceMappingURL=create-customer-address.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-customer-address.js","sourceRoot":"","sources":["../../../src/lib/actions/create-customer-address.ts"],"names":[],"mappings":";;;;AAAA,qHAAqH;AACrH,qEAAqE;AACrE,gEAAmE;AACnE,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,QAAQ,EAAE,MAAM;IAChB,UAAU,EAAE;QACV,WAAW,EACT,sbAAsb;QACxb,UAAU,EAAE,KAAK;KAClB;IACD,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,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AQ;wBACrC,QAAQ,EAAE,OAAO,CAAC,UAAU,CAAC,QAAQ;wBACrC,IAAI,EAAE,OAAO,CAAC,UAAU,CAAC,IAAI;wBAC7B,iBAAiB,EAAE,OAAO,CAAC,UAAU,CAAC,iBAAiB;wBACvD,WAAW,EAAE,OAAO,CAAC,UAAU,CAAC,WAAW;wBAC3C,YAAY,EAAE,OAAO,CAAC,UAAU,CAAC,YAAY;wBAC7C,KAAK,EAAE,OAAO,CAAC,UAAU,CAAC,KAAK;qBAChC;iBACF;aACF,CAAC,CAAC;QACL,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export declare const createCustomer: import("@agnocon/pieces-framework").IAction<import("@agnocon/pieces-framework").CustomAuthProperty<{
|
|
2
|
+
instruction: import("@agnocon/pieces-framework/dist/lib/property/input/markdown-property").MarkDownProperty;
|
|
3
|
+
storeHash: import("@agnocon/pieces-framework").ShortTextProperty<true>;
|
|
4
|
+
accessToken: import("@agnocon/pieces-framework").ShortTextProperty<true>;
|
|
5
|
+
}>, {
|
|
6
|
+
email: import("@agnocon/pieces-framework").ShortTextProperty<true>;
|
|
7
|
+
first_name: import("@agnocon/pieces-framework").ShortTextProperty<true>;
|
|
8
|
+
last_name: import("@agnocon/pieces-framework").ShortTextProperty<true>;
|
|
9
|
+
company: import("@agnocon/pieces-framework").ShortTextProperty<false>;
|
|
10
|
+
phone: import("@agnocon/pieces-framework").ShortTextProperty<false>;
|
|
11
|
+
notes: import("@agnocon/pieces-framework").LongTextProperty<false>;
|
|
12
|
+
}>;
|
|
13
|
+
//# sourceMappingURL=create-customer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-customer.d.ts","sourceRoot":"","sources":["../../../src/lib/actions/create-customer.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,cAAc;;;;;;;;;;;EA0DzB,CAAC"}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createCustomer = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
// Vendored from Activepieces packages/pieces/community/bigcommerce/src/lib/actions/create-customer.ts (MIT).
|
|
6
|
+
// Generated by packages/scripts/vendor-ap.mjs - do not edit by hand.
|
|
7
|
+
const pieces_framework_1 = require("@agnocon/pieces-framework");
|
|
8
|
+
const auth_1 = require("../common/auth");
|
|
9
|
+
const requests_1 = require("../common/requests");
|
|
10
|
+
exports.createCustomer = (0, pieces_framework_1.createAction)({
|
|
11
|
+
auth: auth_1.bigcommerceAuth,
|
|
12
|
+
name: 'createCustomer',
|
|
13
|
+
displayName: 'Create Customer',
|
|
14
|
+
description: 'Creates a customer',
|
|
15
|
+
audience: 'both',
|
|
16
|
+
aiMetadata: {
|
|
17
|
+
description: 'Creates a new customer record in a BigCommerce store from an email plus first/last name (company, phone, and notes optional). Use to register a shopper or contact. Not idempotent: each call adds a new customer, and BigCommerce rejects a duplicate email rather than returning the existing one, so call Search Customer or Find or Create Customer first if the customer may already exist.',
|
|
18
|
+
idempotent: false,
|
|
19
|
+
},
|
|
20
|
+
props: {
|
|
21
|
+
email: pieces_framework_1.Property.ShortText({
|
|
22
|
+
displayName: 'Email',
|
|
23
|
+
description: 'Customer email address',
|
|
24
|
+
required: true,
|
|
25
|
+
}),
|
|
26
|
+
first_name: pieces_framework_1.Property.ShortText({
|
|
27
|
+
displayName: 'First Name',
|
|
28
|
+
description: 'Customer first name',
|
|
29
|
+
required: true,
|
|
30
|
+
}),
|
|
31
|
+
last_name: pieces_framework_1.Property.ShortText({
|
|
32
|
+
displayName: 'Last Name',
|
|
33
|
+
description: 'Customer last name',
|
|
34
|
+
required: true,
|
|
35
|
+
}),
|
|
36
|
+
company: pieces_framework_1.Property.ShortText({
|
|
37
|
+
displayName: 'Company',
|
|
38
|
+
description: 'Customer company name',
|
|
39
|
+
required: false,
|
|
40
|
+
}),
|
|
41
|
+
phone: pieces_framework_1.Property.ShortText({
|
|
42
|
+
displayName: 'Phone',
|
|
43
|
+
description: 'Customer phone number',
|
|
44
|
+
required: false,
|
|
45
|
+
}),
|
|
46
|
+
notes: pieces_framework_1.Property.LongText({
|
|
47
|
+
displayName: 'Notes',
|
|
48
|
+
description: 'Customer notes',
|
|
49
|
+
required: false,
|
|
50
|
+
}),
|
|
51
|
+
},
|
|
52
|
+
run(context) {
|
|
53
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
54
|
+
return yield requests_1.bigCommerceApiService.createCustomer({
|
|
55
|
+
auth: context.auth.props,
|
|
56
|
+
payload: [
|
|
57
|
+
{
|
|
58
|
+
email: context.propsValue.email,
|
|
59
|
+
first_name: context.propsValue.first_name,
|
|
60
|
+
last_name: context.propsValue.last_name,
|
|
61
|
+
company: context.propsValue.company,
|
|
62
|
+
phone: context.propsValue.phone,
|
|
63
|
+
notes: context.propsValue.notes,
|
|
64
|
+
},
|
|
65
|
+
],
|
|
66
|
+
});
|
|
67
|
+
});
|
|
68
|
+
},
|
|
69
|
+
});
|
|
70
|
+
//# sourceMappingURL=create-customer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-customer.js","sourceRoot":"","sources":["../../../src/lib/actions/create-customer.ts"],"names":[],"mappings":";;;;AAAA,6GAA6G;AAC7G,qEAAqE;AACrE,gEAAmE;AACnE,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,oBAAoB;IACjC,QAAQ,EAAE,MAAM;IAChB,UAAU,EAAE;QACV,WAAW,EACT,kYAAkY;QACpY,UAAU,EAAE,KAAK;KAClB;IACD,KAAK,EAAE;QACL,KAAK,EAAE,2BAAQ,CAAC,SAAS,CAAC;YACxB,WAAW,EAAE,O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C"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare const deleteAProduct: import("@agnocon/pieces-framework").IAction<import("@agnocon/pieces-framework").CustomAuthProperty<{
|
|
2
|
+
instruction: import("@agnocon/pieces-framework/dist/lib/property/input/markdown-property").MarkDownProperty;
|
|
3
|
+
storeHash: import("@agnocon/pieces-framework").ShortTextProperty<true>;
|
|
4
|
+
accessToken: import("@agnocon/pieces-framework").ShortTextProperty<true>;
|
|
5
|
+
}>, {
|
|
6
|
+
productId: import("@agnocon/pieces-framework").ShortTextProperty<true>;
|
|
7
|
+
}>;
|
|
8
|
+
//# sourceMappingURL=delete-a-product.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"delete-a-product.d.ts","sourceRoot":"","sources":["../../../src/lib/actions/delete-a-product.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,cAAc;;;;;;EAwBzB,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.deleteAProduct = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
// Vendored from Activepieces packages/pieces/community/bigcommerce/src/lib/actions/delete-a-product.ts (MIT).
|
|
6
|
+
// Generated by packages/scripts/vendor-ap.mjs - do not edit by hand.
|
|
7
|
+
const pieces_framework_1 = require("@agnocon/pieces-framework");
|
|
8
|
+
const auth_1 = require("../common/auth");
|
|
9
|
+
const requests_1 = require("../common/requests");
|
|
10
|
+
exports.deleteAProduct = (0, pieces_framework_1.createAction)({
|
|
11
|
+
auth: auth_1.bigcommerceAuth,
|
|
12
|
+
name: 'deleteAProduct',
|
|
13
|
+
displayName: 'Delete a Product',
|
|
14
|
+
description: 'Deletes an existing Product',
|
|
15
|
+
audience: 'both',
|
|
16
|
+
aiMetadata: {
|
|
17
|
+
description: 'Permanently deletes a catalog product from a BigCommerce store by its productId. Use to remove an item from the store. This is destructive and cannot be undone. Effectively idempotent: deleting an already-removed product has no further effect, though the call may error if the id no longer exists.',
|
|
18
|
+
idempotent: true,
|
|
19
|
+
},
|
|
20
|
+
props: {
|
|
21
|
+
productId: pieces_framework_1.Property.ShortText({
|
|
22
|
+
displayName: 'Product ID',
|
|
23
|
+
description: 'The ID of the product to delete',
|
|
24
|
+
required: true,
|
|
25
|
+
}),
|
|
26
|
+
},
|
|
27
|
+
run(context) {
|
|
28
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
29
|
+
return yield requests_1.bigCommerceApiService.deleteProduct({
|
|
30
|
+
auth: context.auth.props,
|
|
31
|
+
productId: context.propsValue.productId,
|
|
32
|
+
});
|
|
33
|
+
});
|
|
34
|
+
},
|
|
35
|
+
});
|
|
36
|
+
//# sourceMappingURL=delete-a-product.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"delete-a-product.js","sourceRoot":"","sources":["../../../src/lib/actions/delete-a-product.ts"],"names":[],"mappings":";;;;AAAA,8GAA8G;AAC9G,qEAAqE;AACrE,gEAAmE;AACnE,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,QAAQ,EAAE,MAAM;IAChB,UAAU,EAAE;QACV,WAAW,EACT,2SAA2S;QAC7S,UAAU,EAAE,IAAI;KACjB;IACD,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"}
|