@activepieces/piece-bigcommerce 0.1.9 → 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/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 -78
- 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 -85
- 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 -83
- 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 -68
- 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 -34
- 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 -80
- 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 -98
- 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 -82
- 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 -34
- 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 -37
- 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 -44
- 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 -43
- 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 -51
- 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 -75
- 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 -79
- 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 -64
- 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 -66
- 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 -66
- 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 -66
- 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 -68
- 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 -66
- 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 -66
- 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 -66
- 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 -66
- 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 -66
- 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 -66
- package/src/lib/triggers/shipment-created.js.map +0 -1
package/package.json
CHANGED
|
@@ -1,17 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@activepieces/piece-bigcommerce",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.11",
|
|
4
4
|
"type": "commonjs",
|
|
5
5
|
"main": "./src/index.js",
|
|
6
|
-
"
|
|
7
|
-
"
|
|
8
|
-
"
|
|
9
|
-
"
|
|
10
|
-
"
|
|
11
|
-
|
|
12
|
-
},
|
|
13
|
-
"scripts": {
|
|
14
|
-
"build": "tsc -p tsconfig.lib.json && cp package.json dist/",
|
|
15
|
-
"lint": "eslint 'src/**/*.ts'"
|
|
16
|
-
}
|
|
6
|
+
"dependencies": {},
|
|
7
|
+
"files": [
|
|
8
|
+
"src/index.js",
|
|
9
|
+
"package.json",
|
|
10
|
+
"src/i18n"
|
|
11
|
+
]
|
|
17
12
|
}
|
package/src/index.js
CHANGED
|
@@ -1,84 +1,19 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
const customer_address_updated_1 = require("./lib/triggers/customer-address-updated");
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
const update_a_product_1 = require("./lib/actions/update-a-product");
|
|
21
|
-
const delete_a_product_1 = require("./lib/actions/delete-a-product");
|
|
22
|
-
const get_order_1 = require("./lib/actions/get-order");
|
|
23
|
-
const list_orders_1 = require("./lib/actions/list-orders");
|
|
24
|
-
const list_categories_1 = require("./lib/actions/list-categories");
|
|
25
|
-
const create_blog_post_1 = require("./lib/actions/create-blog-post");
|
|
26
|
-
const create_customer_address_1 = require("./lib/actions/create-customer-address");
|
|
27
|
-
const pieces_common_1 = require("@activepieces/pieces-common");
|
|
28
|
-
const constants_1 = require("./lib/common/constants");
|
|
29
|
-
const search_customer_1 = require("./lib/actions/search-customer");
|
|
30
|
-
const search_product_1 = require("./lib/actions/search-product");
|
|
31
|
-
const search_customer_address_1 = require("./lib/actions/search-customer-address");
|
|
32
|
-
const find_or_create_customer_1 = require("./lib/actions/find-or-create-customer");
|
|
33
|
-
const find_or_create_product_1 = require("./lib/actions/find-or-create-product");
|
|
34
|
-
const find_or_create_customers_address_1 = require("./lib/actions/find-or-create-customers-address");
|
|
35
|
-
exports.bigcommerce = (0, pieces_framework_1.createPiece)({
|
|
36
|
-
displayName: 'BigCommerce',
|
|
37
|
-
description: 'BigCommerce is a leading e-commerce platform that enables businesses to create and manage online stores.',
|
|
38
|
-
auth: auth_1.bigcommerceAuth,
|
|
39
|
-
minimumSupportedRelease: '0.36.1',
|
|
40
|
-
logoUrl: 'https://cdn.activepieces.com/pieces/bigcommerce.png',
|
|
41
|
-
authors: ['gs03-dev', 'sanket-a11y', 'Angelebeats'],
|
|
42
|
-
actions: [
|
|
43
|
-
create_customer_1.createCustomer,
|
|
44
|
-
create_a_product_1.createAProduct,
|
|
45
|
-
update_a_product_1.updateAProduct,
|
|
46
|
-
delete_a_product_1.deleteAProduct,
|
|
47
|
-
get_order_1.getOrder,
|
|
48
|
-
list_orders_1.listOrders,
|
|
49
|
-
list_categories_1.listCategories,
|
|
50
|
-
create_blog_post_1.createBlogPost,
|
|
51
|
-
create_customer_address_1.createCustomerAddress,
|
|
52
|
-
search_customer_1.searchCustomer,
|
|
53
|
-
search_product_1.searchProduct,
|
|
54
|
-
search_customer_address_1.searchCustomerAddress,
|
|
55
|
-
find_or_create_customer_1.findOrCreateCustomer,
|
|
56
|
-
find_or_create_product_1.findOrCreateProduct,
|
|
57
|
-
find_or_create_customers_address_1.findOrCreateCustomersAddress,
|
|
58
|
-
(0, pieces_common_1.createCustomApiCallAction)({
|
|
59
|
-
auth: auth_1.bigcommerceAuth,
|
|
60
|
-
baseUrl: (auth) => auth ? (0, constants_1.GET_BASE_URL)(auth.props.storeHash) : '',
|
|
61
|
-
authMapping: (auth) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
62
|
-
return {
|
|
63
|
-
'X-Auth-Token': auth.props.accessToken,
|
|
64
|
-
'Content-Type': 'application/json',
|
|
65
|
-
Accept: 'application/json',
|
|
66
|
-
};
|
|
67
|
-
}),
|
|
68
|
-
}),
|
|
69
|
-
],
|
|
70
|
-
triggers: [
|
|
71
|
-
abandoned_cart_1.abandonedCart,
|
|
72
|
-
cart_created_1.cartCreated,
|
|
73
|
-
customer_address_created_1.customerAddressCreated,
|
|
74
|
-
customer_address_updated_1.customerAddressUpdated,
|
|
75
|
-
customer_created_1.customerCreated,
|
|
76
|
-
customer_updated_1.customerUpdated,
|
|
77
|
-
order_created_1.orderCreated,
|
|
78
|
-
order_updated_1.orderUpdated,
|
|
79
|
-
order_status_updated_1.orderStatusUpdated,
|
|
80
|
-
product_created_1.productCreated,
|
|
81
|
-
shipment_created_1.shipmentCreated,
|
|
82
|
-
],
|
|
83
|
-
});
|
|
84
|
-
//# sourceMappingURL=index.js.map
|
|
1
|
+
"use strict";var Du=Object.create;var Ye=Object.defineProperty;var Uu=Object.getOwnPropertyDescriptor;var Mu=Object.getOwnPropertyNames;var Lu=Object.getPrototypeOf,ju=Object.prototype.hasOwnProperty;var o=(e,t)=>Ye(e,"name",{value:t,configurable:!0});var A=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(r){throw t=0,r}},On=(e,t)=>{for(var r in t)Ye(e,r,{get:t[r],enumerable:!0})},kn=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Mu(t))!ju.call(e,i)&&i!==r&&Ye(e,i,{get:()=>t[i],enumerable:!(n=Uu(t,i))||n.enumerable});return e};var Me=(e,t,r)=>(r=e!=null?Du(Lu(e)):{},kn(t||!e||!e.__esModule?Ye(r,"default",{value:e,enumerable:!0}):r,e)),Bu=e=>kn(Ye({},"__esModule",{value:!0}),e);var ri=A((ti,Ht)=>{(function(e){"use strict";let t="(0?\\d+|0x[a-f0-9]+)",r={fourOctet:new RegExp(`^${t}\\.${t}\\.${t}\\.${t}$`,"i"),threeOctet:new RegExp(`^${t}\\.${t}\\.${t}$`,"i"),twoOctet:new RegExp(`^${t}\\.${t}$`,"i"),longValue:new RegExp(`^${t}$`,"i")},n=new RegExp("^0[0-7]+$","i"),i=new RegExp("^0x[a-f0-9]+$","i"),u="%[0-9a-z]{1,}",c="(?:[0-9a-f]+::?)+",p={zoneIndex:new RegExp(u,"i"),native:new RegExp(`^(::)?(${c})?([0-9a-f]+)?(::)?(${u})?$`,"i"),deprecatedTransitional:new RegExp(`^(?:::)(${t}\\.${t}\\.${t}\\.${t}(${u})?)$`,"i"),transitional:new RegExp(`^((?:${c})|(?:::)(?:${c})?)${t}\\.${t}\\.${t}\\.${t}(${u})?$`,"i")};function h(s,d){if(s.indexOf("::")!==s.lastIndexOf("::"))return null;let g=0,m=-1,_=(s.match(p.zoneIndex)||[])[0],b,B;for(_&&(_=_.substring(1),s=s.replace(/%.+$/,""));(m=s.indexOf(":",m+1))>=0;)g++;if(s.substr(0,2)==="::"&&g--,s.substr(-2,2)==="::"&&g--,g>d)return null;for(B=d-g,b=":";B--;)b+="0:";return s=s.replace("::",b),s[0]===":"&&(s=s.slice(1)),s[s.length-1]===":"&&(s=s.slice(0,-1)),d=(function(){let ie=s.split(":"),pe=[];for(let Xe=0;Xe<ie.length;Xe++)pe.push(parseInt(ie[Xe],16));return pe})(),{parts:d,zoneId:_}}o(h,"expandIPv6");function v(s,d,g,m){if(s.length!==d.length)throw new Error("ipaddr: cannot match CIDR for objects with different lengths");let _=0,b;for(;m>0;){if(b=g-m,b<0&&(b=0),s[_]>>b!==d[_]>>b)return!1;m-=g,_+=1}return!0}o(v,"matchCIDR");function P(s){if(i.test(s))return parseInt(s,16);if(s[0]==="0"&&!isNaN(parseInt(s[1],10))){if(n.test(s))return parseInt(s,8);throw new Error(`ipaddr: cannot parse ${s} as octal`)}return parseInt(s,10)}o(P,"parseIntAuto");function $(s,d){for(;s.length<d;)s=`0${s}`;return s}o($,"padPart");let x={};x.IPv4=(function(){function s(d){if(d.length!==4)throw new Error("ipaddr: ipv4 octet count should be 4");let g,m;for(g=0;g<d.length;g++)if(m=d[g],!(0<=m&&m<=255))throw new Error("ipaddr: ipv4 octet should fit in 8 bits");this.octets=d}return o(s,"IPv4"),s.prototype.SpecialRanges={unspecified:[[new s([0,0,0,0]),8]],broadcast:[[new s([255,255,255,255]),32]],multicast:[[new s([224,0,0,0]),4]],linkLocal:[[new s([169,254,0,0]),16]],loopback:[[new s([127,0,0,0]),8]],carrierGradeNat:[[new s([100,64,0,0]),10]],private:[[new s([10,0,0,0]),8],[new s([172,16,0,0]),12],[new s([192,168,0,0]),16]],reserved:[[new s([192,0,0,0]),24],[new s([192,0,2,0]),24],[new s([192,88,99,0]),24],[new s([198,18,0,0]),15],[new s([198,51,100,0]),24],[new s([203,0,113,0]),24],[new s([240,0,0,0]),4]],as112:[[new s([192,175,48,0]),24],[new s([192,31,196,0]),24]],amt:[[new s([192,52,193,0]),24]]},s.prototype.kind=function(){return"ipv4"},s.prototype.match=function(d,g){let m;if(g===void 0&&(m=d,d=m[0],g=m[1]),d.kind()!=="ipv4")throw new Error("ipaddr: cannot match ipv4 address with non-ipv4 one");return v(this.octets,d.octets,8,g)},s.prototype.prefixLengthFromSubnetMask=function(){let d=0,g=!1,m={0:8,128:7,192:6,224:5,240:4,248:3,252:2,254:1,255:0},_,b,B;for(_=3;_>=0;_-=1)if(b=this.octets[_],b in m){if(B=m[b],g&&B!==0)return null;B!==8&&(g=!0),d+=B}else return null;return 32-d},s.prototype.range=function(){return x.subnetMatch(this,this.SpecialRanges)},s.prototype.toByteArray=function(){return this.octets.slice(0)},s.prototype.toIPv4MappedAddress=function(){return x.IPv6.parse(`::ffff:${this.toString()}`)},s.prototype.toNormalizedString=function(){return this.toString()},s.prototype.toString=function(){return this.octets.join(".")},s})(),x.IPv4.broadcastAddressFromCIDR=function(s){try{let d=this.parseCIDR(s),g=d[0].toByteArray(),m=this.subnetMaskFromPrefixLength(d[1]).toByteArray(),_=[],b=0;for(;b<4;)_.push(parseInt(g[b],10)|parseInt(m[b],10)^255),b++;return new this(_)}catch{throw new Error("ipaddr: the address does not have IPv4 CIDR format")}},x.IPv4.isIPv4=function(s){return this.parser(s)!==null},x.IPv4.isValid=function(s){try{return new this(this.parser(s)),!0}catch{return!1}},x.IPv4.isValidCIDR=function(s){try{return this.parseCIDR(s),!0}catch{return!1}},x.IPv4.isValidFourPartDecimal=function(s){return!!(x.IPv4.isValid(s)&&s.match(/^(0|[1-9]\d*)(\.(0|[1-9]\d*)){3}$/))},x.IPv4.isValidCIDRFourPartDecimal=function(s){let d=s.match(/^(.+)\/(\d+)$/);return!x.IPv4.isValidCIDR(s)||!d?!1:x.IPv4.isValidFourPartDecimal(d[1])},x.IPv4.networkAddressFromCIDR=function(s){let d,g,m,_,b;try{for(d=this.parseCIDR(s),m=d[0].toByteArray(),b=this.subnetMaskFromPrefixLength(d[1]).toByteArray(),_=[],g=0;g<4;)_.push(parseInt(m[g],10)&parseInt(b[g],10)),g++;return new this(_)}catch{throw new Error("ipaddr: the address does not have IPv4 CIDR format")}},x.IPv4.parse=function(s){let d=this.parser(s);if(d===null)throw new Error("ipaddr: string is not formatted like an IPv4 Address");return new this(d)},x.IPv4.parseCIDR=function(s){let d;if(d=s.match(/^(.+)\/(\d+)$/)){let g=parseInt(d[2]);if(g>=0&&g<=32){let m=[this.parse(d[1]),g];return Object.defineProperty(m,"toString",{value:o(function(){return this.join("/")},"value")}),m}}throw new Error("ipaddr: string is not formatted like an IPv4 CIDR range")},x.IPv4.parser=function(s){let d,g,m;if(d=s.match(r.fourOctet))return(function(){let _=d.slice(1,6),b=[];for(let B=0;B<_.length;B++)g=_[B],b.push(P(g));return b})();if(d=s.match(r.longValue)){if(m=P(d[1]),m>4294967295||m<0)throw new Error("ipaddr: address outside defined range");return(function(){let _=[],b;for(b=0;b<=24;b+=8)_.push(m>>b&255);return _})().reverse()}else return(d=s.match(r.twoOctet))?(function(){let _=d.slice(1,4),b=[];if(m=P(_[1]),m>16777215||m<0)throw new Error("ipaddr: address outside defined range");return b.push(P(_[0])),b.push(m>>16&255),b.push(m>>8&255),b.push(m&255),b})():(d=s.match(r.threeOctet))?(function(){let _=d.slice(1,5),b=[];if(m=P(_[2]),m>65535||m<0)throw new Error("ipaddr: address outside defined range");return b.push(P(_[0])),b.push(P(_[1])),b.push(m>>8&255),b.push(m&255),b})():null},x.IPv4.subnetMaskFromPrefixLength=function(s){if(s=parseInt(s),s<0||s>32)throw new Error("ipaddr: invalid IPv4 prefix length");let d=[0,0,0,0],g=0,m=Math.floor(s/8);for(;g<m;)d[g]=255,g++;return m<4&&(d[m]=Math.pow(2,s%8)-1<<8-s%8),new this(d)},x.IPv6=(function(){function s(d,g){let m,_;if(d.length===16)for(this.parts=[],m=0;m<=14;m+=2)this.parts.push(d[m]<<8|d[m+1]);else if(d.length===8)this.parts=d;else throw new Error("ipaddr: ipv6 part count should be 8 or 16");for(m=0;m<this.parts.length;m++)if(_=this.parts[m],!(0<=_&&_<=65535))throw new Error("ipaddr: ipv6 part should fit in 16 bits");g&&(this.zoneId=g)}return o(s,"IPv6"),s.prototype.SpecialRanges={unspecified:[new s([0,0,0,0,0,0,0,0]),128],linkLocal:[new s([65152,0,0,0,0,0,0,0]),10],multicast:[new s([65280,0,0,0,0,0,0,0]),8],loopback:[new s([0,0,0,0,0,0,0,1]),128],uniqueLocal:[new s([64512,0,0,0,0,0,0,0]),7],ipv4Mapped:[new s([0,0,0,0,0,65535,0,0]),96],discard:[new s([256,0,0,0,0,0,0,0]),64],rfc6145:[new s([0,0,0,0,65535,0,0,0]),96],rfc6052:[new s([100,65435,0,0,0,0,0,0]),96],"6to4":[new s([8194,0,0,0,0,0,0,0]),16],teredo:[new s([8193,0,0,0,0,0,0,0]),32],benchmarking:[new s([8193,2,0,0,0,0,0,0]),48],amt:[new s([8193,3,0,0,0,0,0,0]),32],as112v6:[[new s([8193,4,274,0,0,0,0,0]),48],[new s([9760,79,32768,0,0,0,0,0]),48]],deprecated:[new s([8193,16,0,0,0,0,0,0]),28],orchid2:[new s([8193,32,0,0,0,0,0,0]),28],droneRemoteIdProtocolEntityTags:[new s([8193,48,0,0,0,0,0,0]),28],reserved:[[new s([8193,0,0,0,0,0,0,0]),23],[new s([8193,3512,0,0,0,0,0,0]),32]]},s.prototype.isIPv4MappedAddress=function(){return this.range()==="ipv4Mapped"},s.prototype.kind=function(){return"ipv6"},s.prototype.match=function(d,g){let m;if(g===void 0&&(m=d,d=m[0],g=m[1]),d.kind()!=="ipv6")throw new Error("ipaddr: cannot match ipv6 address with non-ipv6 one");return v(this.parts,d.parts,16,g)},s.prototype.prefixLengthFromSubnetMask=function(){let d=0,g=!1,m={0:16,32768:15,49152:14,57344:13,61440:12,63488:11,64512:10,65024:9,65280:8,65408:7,65472:6,65504:5,65520:4,65528:3,65532:2,65534:1,65535:0},_,b;for(let B=7;B>=0;B-=1)if(_=this.parts[B],_ in m){if(b=m[_],g&&b!==0)return null;b!==16&&(g=!0),d+=b}else return null;return 128-d},s.prototype.range=function(){return x.subnetMatch(this,this.SpecialRanges)},s.prototype.toByteArray=function(){let d,g=[],m=this.parts;for(let _=0;_<m.length;_++)d=m[_],g.push(d>>8),g.push(d&255);return g},s.prototype.toFixedLengthString=function(){let d=(function(){let m=[];for(let _=0;_<this.parts.length;_++)m.push($(this.parts[_].toString(16),4));return m}).call(this).join(":"),g="";return this.zoneId&&(g=`%${this.zoneId}`),d+g},s.prototype.toIPv4Address=function(){if(!this.isIPv4MappedAddress())throw new Error("ipaddr: trying to convert a generic ipv6 address to ipv4");let d=this.parts.slice(-2),g=d[0],m=d[1];return new x.IPv4([g>>8,g&255,m>>8,m&255])},s.prototype.toNormalizedString=function(){let d=(function(){let m=[];for(let _=0;_<this.parts.length;_++)m.push(this.parts[_].toString(16));return m}).call(this).join(":"),g="";return this.zoneId&&(g=`%${this.zoneId}`),d+g},s.prototype.toRFC5952String=function(){let d=/((^|:)(0(:|$)){2,})/g,g=this.toNormalizedString(),m=0,_=-1,b;for(;b=d.exec(g);)b[0].length>_&&(m=b.index,_=b[0].length);return _<0?g:`${g.substring(0,m)}::${g.substring(m+_)}`},s.prototype.toString=function(){return this.toRFC5952String()},s})(),x.IPv6.broadcastAddressFromCIDR=function(s){try{let d=this.parseCIDR(s),g=d[0].toByteArray(),m=this.subnetMaskFromPrefixLength(d[1]).toByteArray(),_=[],b=0;for(;b<16;)_.push(parseInt(g[b],10)|parseInt(m[b],10)^255),b++;return new this(_)}catch(d){throw new Error(`ipaddr: the address does not have IPv6 CIDR format (${d})`)}},x.IPv6.isIPv6=function(s){return this.parser(s)!==null},x.IPv6.isValid=function(s){if(typeof s=="string"&&s.indexOf(":")===-1)return!1;try{let d=this.parser(s);return new this(d.parts,d.zoneId),!0}catch{return!1}},x.IPv6.isValidCIDR=function(s){if(typeof s=="string"&&s.indexOf(":")===-1)return!1;try{return this.parseCIDR(s),!0}catch{return!1}},x.IPv6.networkAddressFromCIDR=function(s){let d,g,m,_,b;try{for(d=this.parseCIDR(s),m=d[0].toByteArray(),b=this.subnetMaskFromPrefixLength(d[1]).toByteArray(),_=[],g=0;g<16;)_.push(parseInt(m[g],10)&parseInt(b[g],10)),g++;return new this(_)}catch(B){throw new Error(`ipaddr: the address does not have IPv6 CIDR format (${B})`)}},x.IPv6.parse=function(s){let d=this.parser(s);if(d.parts===null)throw new Error("ipaddr: string is not formatted like an IPv6 Address");return new this(d.parts,d.zoneId)},x.IPv6.parseCIDR=function(s){let d,g,m;if((g=s.match(/^(.+)\/(\d+)$/))&&(d=parseInt(g[2]),d>=0&&d<=128))return m=[this.parse(g[1]),d],Object.defineProperty(m,"toString",{value:o(function(){return this.join("/")},"value")}),m;throw new Error("ipaddr: string is not formatted like an IPv6 CIDR range")},x.IPv6.parser=function(s){let d,g,m,_,b,B;if(m=s.match(p.deprecatedTransitional))return this.parser(`::ffff:${m[1]}`);if(p.native.test(s))return h(s,8);if((m=s.match(p.transitional))&&(B=m[6]||"",d=m[1],m[1].endsWith("::")||(d=d.slice(0,-1)),d=h(d+B,6),d.parts)){for(b=[parseInt(m[2]),parseInt(m[3]),parseInt(m[4]),parseInt(m[5])],g=0;g<b.length;g++)if(_=b[g],!(0<=_&&_<=255))return null;return d.parts.push(b[0]<<8|b[1]),d.parts.push(b[2]<<8|b[3]),{parts:d.parts,zoneId:d.zoneId}}return null},x.IPv6.subnetMaskFromPrefixLength=function(s){if(s=parseInt(s),s<0||s>128)throw new Error("ipaddr: invalid IPv6 prefix length");let d=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],g=0,m=Math.floor(s/8);for(;g<m;)d[g]=255,g++;return m<16&&(d[m]=Math.pow(2,s%8)-1<<8-s%8),new this(d)},x.fromByteArray=function(s){let d=s.length;if(d===4)return new x.IPv4(s);if(d===16)return new x.IPv6(s);throw new Error("ipaddr: the binary input is neither an IPv6 nor IPv4 address")},x.isValid=function(s){return x.IPv6.isValid(s)||x.IPv4.isValid(s)},x.isValidCIDR=function(s){return x.IPv6.isValidCIDR(s)||x.IPv4.isValidCIDR(s)},x.parse=function(s){if(x.IPv6.isValid(s))return x.IPv6.parse(s);if(x.IPv4.isValid(s))return x.IPv4.parse(s);throw new Error("ipaddr: the address has neither IPv6 nor IPv4 format")},x.parseCIDR=function(s){try{return x.IPv6.parseCIDR(s)}catch{try{return x.IPv4.parseCIDR(s)}catch{throw new Error("ipaddr: the address has neither IPv6 nor IPv4 CIDR format")}}},x.process=function(s){let d=this.parse(s);return d.kind()==="ipv6"&&d.isIPv4MappedAddress()?d.toIPv4Address():d},x.subnetMatch=function(s,d,g){let m,_,b,B;g==null&&(g="unicast");for(_ in d)if(Object.prototype.hasOwnProperty.call(d,_)){for(b=d[_],b[0]&&!(b[0]instanceof Array)&&(b=[b]),m=0;m<b.length;m++)if(B=b[m],s.kind()===B[0].kind()&&s.match.apply(s,B))return _}return g},typeof Ht<"u"&&Ht.exports?Ht.exports=x:e.ipaddr=x})(ti)});var na=A((xz,ra)=>{var ta=require("stream").Stream,Tl=require("util");ra.exports=de;function de(){this.source=null,this.dataSize=0,this.maxDataSize=1024*1024,this.pauseStream=!0,this._maxDataSizeExceeded=!1,this._released=!1,this._bufferedEvents=[]}o(de,"DelayedStream");Tl.inherits(de,ta);de.create=function(e,t){var r=new this;t=t||{};for(var n in t)r[n]=t[n];r.source=e;var i=e.emit;return e.emit=function(){return r._handleEmit(arguments),i.apply(e,arguments)},e.on("error",function(){}),r.pauseStream&&e.pause(),r};Object.defineProperty(de.prototype,"readable",{configurable:!0,enumerable:!0,get:o(function(){return this.source.readable},"get")});de.prototype.setEncoding=function(){return this.source.setEncoding.apply(this.source,arguments)};de.prototype.resume=function(){this._released||this.release(),this.source.resume()};de.prototype.pause=function(){this.source.pause()};de.prototype.release=function(){this._released=!0,this._bufferedEvents.forEach(function(e){this.emit.apply(this,e)}.bind(this)),this._bufferedEvents=[]};de.prototype.pipe=function(){var e=ta.prototype.pipe.apply(this,arguments);return this.resume(),e};de.prototype._handleEmit=function(e){if(this._released){this.emit.apply(this,e);return}e[0]==="data"&&(this.dataSize+=e[1].length,this._checkIfMaxDataSizeExceeded()),this._bufferedEvents.push(e)};de.prototype._checkIfMaxDataSizeExceeded=function(){if(!this._maxDataSizeExceeded&&!(this.dataSize<=this.maxDataSize)){this._maxDataSizeExceeded=!0;var e="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this.emit("error",new Error(e))}}});var sa=A((bz,aa)=>{var Il=require("util"),ia=require("stream").Stream,oa=na();aa.exports=X;function X(){this.writable=!1,this.readable=!0,this.dataSize=0,this.maxDataSize=2*1024*1024,this.pauseStreams=!0,this._released=!1,this._streams=[],this._currentStream=null,this._insideLoop=!1,this._pendingNext=!1}o(X,"CombinedStream");Il.inherits(X,ia);X.create=function(e){var t=new this;e=e||{};for(var r in e)t[r]=e[r];return t};X.isStreamLike=function(e){return typeof e!="function"&&typeof e!="string"&&typeof e!="boolean"&&typeof e!="number"&&!Buffer.isBuffer(e)};X.prototype.append=function(e){var t=X.isStreamLike(e);if(t){if(!(e instanceof oa)){var r=oa.create(e,{maxDataSize:1/0,pauseStream:this.pauseStreams});e.on("data",this._checkDataSize.bind(this)),e=r}this._handleErrors(e),this.pauseStreams&&e.pause()}return this._streams.push(e),this};X.prototype.pipe=function(e,t){return ia.prototype.pipe.call(this,e,t),this.resume(),e};X.prototype._getNext=function(){if(this._currentStream=null,this._insideLoop){this._pendingNext=!0;return}this._insideLoop=!0;try{do this._pendingNext=!1,this._realGetNext();while(this._pendingNext)}finally{this._insideLoop=!1}};X.prototype._realGetNext=function(){var e=this._streams.shift();if(typeof e>"u"){this.end();return}if(typeof e!="function"){this._pipeNext(e);return}var t=e;t(function(r){var n=X.isStreamLike(r);n&&(r.on("data",this._checkDataSize.bind(this)),this._handleErrors(r)),this._pipeNext(r)}.bind(this))};X.prototype._pipeNext=function(e){this._currentStream=e;var t=X.isStreamLike(e);if(t){e.on("end",this._getNext.bind(this)),e.pipe(this,{end:!1});return}var r=e;this.write(r),this._getNext()};X.prototype._handleErrors=function(e){var t=this;e.on("error",function(r){t._emitError(r)})};X.prototype.write=function(e){this.emit("data",e)};X.prototype.pause=function(){this.pauseStreams&&(this.pauseStreams&&this._currentStream&&typeof this._currentStream.pause=="function"&&this._currentStream.pause(),this.emit("pause"))};X.prototype.resume=function(){this._released||(this._released=!0,this.writable=!0,this._getNext()),this.pauseStreams&&this._currentStream&&typeof this._currentStream.resume=="function"&&this._currentStream.resume(),this.emit("resume")};X.prototype.end=function(){this._reset(),this.emit("end")};X.prototype.destroy=function(){this._reset(),this.emit("close")};X.prototype._reset=function(){this.writable=!1,this._streams=[],this._currentStream=null};X.prototype._checkDataSize=function(){if(this._updateDataSize(),!(this.dataSize<=this.maxDataSize)){var e="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this._emitError(new Error(e))}};X.prototype._updateDataSize=function(){this.dataSize=0;var e=this;this._streams.forEach(function(t){t.dataSize&&(e.dataSize+=t.dataSize)}),this._currentStream&&this._currentStream.dataSize&&(this.dataSize+=this._currentStream.dataSize)};X.prototype._emitError=function(e){this._reset(),this.emit("error",e)}});var ca=A((Iz,ua)=>{"use strict";ua.exports={"application/json":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["json","map"]},"application/xml":{source:"iana",compressible:!0,extensions:["xml"]},"application/javascript":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["js","mjs"]},"application/pdf":{source:"iana",compressible:!1,extensions:["pdf"]},"application/zip":{source:"iana",compressible:!1,extensions:["zip"]},"application/gzip":{source:"iana",compressible:!1,extensions:["gz"]},"application/octet-stream":{source:"iana",compressible:!1,extensions:["bin","dat"]},"application/msword":{source:"iana",extensions:["doc"]},"application/vnd.openxmlformats-officedocument.wordprocessingml.document":{source:"iana",extensions:["docx"]},"application/vnd.ms-excel":{source:"iana",extensions:["xls"]},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{source:"iana",extensions:["xlsx"]},"application/vnd.ms-powerpoint":{source:"iana",extensions:["ppt"]},"application/vnd.openxmlformats-officedocument.presentationml.presentation":{source:"iana",extensions:["pptx"]},"application/csv":{compressible:!0,extensions:["csv"]},"application/rtf":{source:"iana",compressible:!0,extensions:["rtf"]},"application/x-tar":{source:"apache",compressible:!0,extensions:["tar"]},"application/x-7z-compressed":{source:"apache",compressible:!1,extensions:["7z"]},"application/wasm":{source:"iana",compressible:!0,extensions:["wasm"]},"text/plain":{source:"iana",compressible:!0,charset:"UTF-8",extensions:["txt","text","log"]},"text/html":{source:"iana",compressible:!0,charset:"UTF-8",extensions:["html","htm"]},"text/css":{source:"iana",compressible:!0,charset:"UTF-8",extensions:["css"]},"text/csv":{source:"iana",compressible:!0,charset:"UTF-8",extensions:["csv"]},"text/markdown":{source:"iana",compressible:!0,charset:"UTF-8",extensions:["md","markdown"]},"text/xml":{source:"iana",compressible:!0,extensions:["xml"]},"text/yaml":{compressible:!0,extensions:["yaml","yml"]},"image/png":{source:"iana",compressible:!1,extensions:["png"]},"image/jpeg":{source:"iana",compressible:!1,extensions:["jpeg","jpg","jpe"]},"image/gif":{source:"iana",compressible:!1,extensions:["gif"]},"image/webp":{source:"apache",compressible:!1,extensions:["webp"]},"image/svg+xml":{source:"iana",compressible:!0,extensions:["svg","svgz"]},"image/bmp":{source:"iana",compressible:!0,extensions:["bmp"]},"image/tiff":{source:"iana",compressible:!1,extensions:["tiff","tif"]},"image/x-icon":{source:"apache",compressible:!0,extensions:["ico"]},"image/heic":{source:"iana",compressible:!1,extensions:["heic"]},"image/avif":{source:"iana",compressible:!1,extensions:["avif"]},"audio/mpeg":{source:"iana",compressible:!1,extensions:["mp3","mpga"]},"audio/wav":{compressible:!1,extensions:["wav"]},"audio/ogg":{source:"iana",compressible:!1,extensions:["ogg","oga"]},"audio/webm":{source:"apache",compressible:!1,extensions:["weba"]},"audio/mp4":{source:"iana",compressible:!1,extensions:["m4a"]},"video/mp4":{source:"iana",compressible:!1,extensions:["mp4","m4v"]},"video/mpeg":{source:"iana",compressible:!1,extensions:["mpeg","mpg"]},"video/webm":{source:"iana",compressible:!1,extensions:["webm"]},"video/quicktime":{source:"iana",compressible:!1,extensions:["mov","qt"]},"video/x-msvideo":{source:"iana",compressible:!1,extensions:["avi"]},"font/woff":{source:"iana",compressible:!1,extensions:["woff"]},"font/woff2":{source:"iana",compressible:!1,extensions:["woff2"]},"font/ttf":{source:"iana",compressible:!0,extensions:["ttf"]},"font/otf":{source:"iana",compressible:!0,extensions:["otf"]},"application/ld+json":{source:"iana",compressible:!0,extensions:["jsonld"]},"application/x-www-form-urlencoded":{source:"iana",compressible:!0},"multipart/form-data":{source:"iana"},"application/vnd.api+json":{source:"iana",compressible:!0},"application/manifest+json":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["webmanifest"]},"application/ics":{compressible:!0,extensions:["ics"]},"text/calendar":{source:"iana",compressible:!0,extensions:["ics","ifb"]},"application/x-ndjson":{compressible:!0,extensions:["ndjson"]}}});var da=A(ne=>{"use strict";var Yt=ca(),El=require("path").extname,pa=/^\s*([^;\s]*)(?:;|\s|$)/,Sl=/^text\//i;ne.charset=la;ne.charsets={lookup:la};ne.contentType=Al;ne.extension=$l;ne.extensions=Object.create(null);ne.lookup=zl;ne.types=Object.create(null);wl(ne.extensions,ne.types);function la(e){if(!e||typeof e!="string")return!1;var t=pa.exec(e),r=t&&Yt[t[1].toLowerCase()];return r&&r.charset?r.charset:t&&Sl.test(t[1])?"UTF-8":!1}o(la,"charset");function Al(e){if(!e||typeof e!="string")return!1;var t=e.indexOf("/")===-1?ne.lookup(e):e;if(!t)return!1;if(t.indexOf("charset")===-1){var r=ne.charset(t);r&&(t+="; charset="+r.toLowerCase())}return t}o(Al,"contentType");function $l(e){if(!e||typeof e!="string")return!1;var t=pa.exec(e),r=t&&ne.extensions[t[1].toLowerCase()];return!r||!r.length?!1:r[0]}o($l,"extension");function zl(e){if(!e||typeof e!="string")return!1;var t=El("x."+e).toLowerCase().substr(1);return t&&ne.types[t]||!1}o(zl,"lookup");function wl(e,t){var r=["nginx","apache",void 0,"iana"];Object.keys(Yt).forEach(o(function(i){var u=Yt[i],c=u.extensions;if(!(!c||!c.length)){e[i]=c;for(var p=0;p<c.length;p++){var h=c[p];if(t[h]){var v=r.indexOf(Yt[t[h]].source),P=r.indexOf(u.source);if(t[h]!=="application/octet-stream"&&(v>P||v===P&&t[h].substr(0,12)==="application/"))continue}t[h]=i}}},"forEachMimeType"))}o(wl,"populateMaps")});var fa=A((Az,ma)=>{ma.exports=Ol;function Ol(e){var t=typeof setImmediate=="function"?setImmediate:typeof process=="object"&&typeof process.nextTick=="function"?process.nextTick:null;t?t(e):setTimeout(e,0)}o(Ol,"defer")});var Jr=A((zz,ya)=>{var ga=fa();ya.exports=kl;function kl(e){var t=!1;return ga(function(){t=!0}),o(function(n,i){t?e(n,i):ga(o(function(){e(n,i)},"nextTick_callback"))},"async_callback")}o(kl,"async")});var Xr=A((Oz,ha)=>{ha.exports=Rl;function Rl(e){Object.keys(e.jobs).forEach(Nl.bind(e)),e.jobs={}}o(Rl,"abort");function Nl(e){typeof this.jobs[e]=="function"&&this.jobs[e]()}o(Nl,"clean")});var Yr=A((Rz,_a)=>{var va=Jr(),Cl=Xr();_a.exports=Dl;function Dl(e,t,r,n){var i=r.keyedList?r.keyedList[r.index]:r.index;r.jobs[i]=Ul(t,i,e[i],function(u,c){i in r.jobs&&(delete r.jobs[i],u?Cl(r):r.results[i]=c,n(u,r.results))})}o(Dl,"iterate");function Ul(e,t,r,n){var i;return e.length==2?i=e(r,va(n)):i=e(r,t,va(n)),i}o(Ul,"runJob")});var Qr=A((Cz,xa)=>{xa.exports=Ml;function Ml(e,t){var r=!Array.isArray(e),n={index:0,keyedList:r||t?Object.keys(e):null,jobs:{},results:r?{}:[],size:r?Object.keys(e).length:e.length};return t&&n.keyedList.sort(r?t:function(i,u){return t(e[i],e[u])}),n}o(Ml,"state")});var en=A((Uz,Pa)=>{var Ll=Xr(),jl=Jr();Pa.exports=Bl;function Bl(e){Object.keys(this.jobs).length&&(this.index=this.size,Ll(this),jl(e)(null,this.results))}o(Bl,"terminator")});var Ta=A((Lz,ba)=>{var Fl=Yr(),Vl=Qr(),Zl=en();ba.exports=Hl;function Hl(e,t,r){for(var n=Vl(e);n.index<(n.keyedList||e).length;)Fl(e,t,n,function(i,u){if(i){r(i,u);return}if(Object.keys(n.jobs).length===0){r(null,n.results);return}}),n.index++;return Zl.bind(n,r)}o(Hl,"parallel")});var tn=A((Bz,Qt)=>{var Ia=Yr(),ql=Qr(),Gl=en();Qt.exports=Wl;Qt.exports.ascending=Ea;Qt.exports.descending=Kl;function Wl(e,t,r,n){var i=ql(e,r);return Ia(e,t,i,o(function u(c,p){if(c){n(c,p);return}if(i.index++,i.index<(i.keyedList||e).length){Ia(e,t,i,u);return}n(null,i.results)},"iteratorHandler")),Gl.bind(i,n)}o(Wl,"serialOrdered");function Ea(e,t){return e<t?-1:e>t?1:0}o(Ea,"ascending");function Kl(e,t){return-1*Ea(e,t)}o(Kl,"descending")});var Aa=A((Vz,Sa)=>{var Jl=tn();Sa.exports=Xl;function Xl(e,t,r){return Jl(e,t,null,r)}o(Xl,"serial")});var za=A((Hz,$a)=>{$a.exports={parallel:Ta(),serial:Aa(),serialOrdered:tn()}});var rn=A((qz,wa)=>{"use strict";wa.exports=Object});var ka=A((Gz,Oa)=>{"use strict";Oa.exports=Error});var Na=A((Wz,Ra)=>{"use strict";Ra.exports=EvalError});var Da=A((Kz,Ca)=>{"use strict";Ca.exports=RangeError});var Ma=A((Jz,Ua)=>{"use strict";Ua.exports=ReferenceError});var ja=A((Xz,La)=>{"use strict";La.exports=SyntaxError});var er=A((Yz,Ba)=>{"use strict";Ba.exports=TypeError});var Va=A((Qz,Fa)=>{"use strict";Fa.exports=URIError});var Ha=A((ew,Za)=>{"use strict";Za.exports=Math.abs});var Ga=A((tw,qa)=>{"use strict";qa.exports=Math.floor});var Ka=A((rw,Wa)=>{"use strict";Wa.exports=Math.max});var Xa=A((nw,Ja)=>{"use strict";Ja.exports=Math.min});var Qa=A((ow,Ya)=>{"use strict";Ya.exports=Math.pow});var ts=A((iw,es)=>{"use strict";es.exports=Math.round});var ns=A((aw,rs)=>{"use strict";rs.exports=Number.isNaN||o(function(t){return t!==t},"isNaN")});var is=A((uw,os)=>{"use strict";var Yl=ns();os.exports=o(function(t){return Yl(t)||t===0?t:t<0?-1:1},"sign")});var ss=A((pw,as)=>{"use strict";as.exports=Object.getOwnPropertyDescriptor});var nn=A((lw,us)=>{"use strict";var tr=ss();if(tr)try{tr([],"length")}catch{tr=null}us.exports=tr});var ps=A((dw,cs)=>{"use strict";var rr=Object.defineProperty||!1;if(rr)try{rr({},"a",{value:1})}catch{rr=!1}cs.exports=rr});var on=A((mw,ls)=>{"use strict";ls.exports=o(function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},r=Symbol("test"),n=Object(r);if(typeof r=="string"||Object.prototype.toString.call(r)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var i=42;t[r]=i;for(var u in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var c=Object.getOwnPropertySymbols(t);if(c.length!==1||c[0]!==r||!Object.prototype.propertyIsEnumerable.call(t,r))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var p=Object.getOwnPropertyDescriptor(t,r);if(p.value!==i||p.enumerable!==!0)return!1}return!0},"hasSymbols")});var fs=A((gw,ms)=>{"use strict";var ds=typeof Symbol<"u"&&Symbol,Ql=on();ms.exports=o(function(){return typeof ds!="function"||typeof Symbol!="function"||typeof ds("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:Ql()},"hasNativeSymbols")});var an=A((hw,gs)=>{"use strict";gs.exports=typeof Reflect<"u"&&Reflect.getPrototypeOf||null});var sn=A((vw,ys)=>{"use strict";var ed=rn();ys.exports=ed.getPrototypeOf||null});var _s=A((_w,vs)=>{"use strict";var td="Function.prototype.bind called on incompatible ",rd=Object.prototype.toString,nd=Math.max,od="[object Function]",hs=o(function(t,r){for(var n=[],i=0;i<t.length;i+=1)n[i]=t[i];for(var u=0;u<r.length;u+=1)n[u+t.length]=r[u];return n},"concatty"),id=o(function(t,r){for(var n=[],i=r||0,u=0;i<t.length;i+=1,u+=1)n[u]=t[i];return n},"slicy"),ad=o(function(e,t){for(var r="",n=0;n<e.length;n+=1)r+=e[n],n+1<e.length&&(r+=t);return r},"joiny");vs.exports=o(function(t){var r=this;if(typeof r!="function"||rd.apply(r)!==od)throw new TypeError(td+r);for(var n=id(arguments,1),i,u=o(function(){if(this instanceof i){var P=r.apply(this,hs(n,arguments));return Object(P)===P?P:this}return r.apply(t,hs(n,arguments))},"binder"),c=nd(0,r.length-n.length),p=[],h=0;h<c;h++)p[h]="$"+h;if(i=Function("binder","return function ("+ad(p,",")+"){ return binder.apply(this,arguments); }")(u),r.prototype){var v=o(function(){},"Empty");v.prototype=r.prototype,i.prototype=new v,v.prototype=null}return i},"bind")});var qe=A((Pw,xs)=>{"use strict";var sd=_s();xs.exports=Function.prototype.bind||sd});var nr=A((bw,Ps)=>{"use strict";Ps.exports=Function.prototype.call});var un=A((Tw,bs)=>{"use strict";bs.exports=Function.prototype.apply});var Is=A((Iw,Ts)=>{"use strict";Ts.exports=typeof Reflect<"u"&&Reflect&&Reflect.apply});var Ss=A((Ew,Es)=>{"use strict";var ud=qe(),cd=un(),pd=nr(),ld=Is();Es.exports=ld||ud.call(pd,cd)});var $s=A((Sw,As)=>{"use strict";var dd=qe(),md=er(),fd=nr(),gd=Ss();As.exports=o(function(t){if(t.length<1||typeof t[0]!="function")throw new md("a function is required");return gd(dd,fd,t)},"callBindBasic")});var Ns=A(($w,Rs)=>{"use strict";var yd=$s(),zs=nn(),Os;try{Os=[].__proto__===Array.prototype}catch(e){if(!e||typeof e!="object"||!("code"in e)||e.code!=="ERR_PROTO_ACCESS")throw e}var cn=!!Os&&zs&&zs(Object.prototype,"__proto__"),ks=Object,ws=ks.getPrototypeOf;Rs.exports=cn&&typeof cn.get=="function"?yd([cn.get]):typeof ws=="function"?o(function(t){return ws(t==null?t:ks(t))},"getDunder"):!1});var Ls=A((ww,Ms)=>{"use strict";var Cs=an(),Ds=sn(),Us=Ns();Ms.exports=Cs?o(function(t){return Cs(t)},"getProto"):Ds?o(function(t){if(!t||typeof t!="object"&&typeof t!="function")throw new TypeError("getProto: not an object");return Ds(t)},"getProto"):Us?o(function(t){return Us(t)},"getProto"):null});var pn=A((kw,js)=>{"use strict";var hd=Function.prototype.call,vd=Object.prototype.hasOwnProperty,_d=qe();js.exports=_d.call(hd,vd)});var Gs=A((Rw,qs)=>{"use strict";var j,xd=rn(),Pd=ka(),bd=Na(),Td=Da(),Id=Ma(),Je=ja(),Ke=er(),Ed=Va(),Sd=Ha(),Ad=Ga(),$d=Ka(),zd=Xa(),wd=Qa(),Od=ts(),kd=is(),Zs=Function,ln=o(function(e){try{return Zs('"use strict"; return ('+e+").constructor;")()}catch{}},"getEvalledConstructor"),Pt=nn(),Rd=ps(),dn=o(function(){throw new Ke},"throwTypeError"),Nd=Pt?(function(){try{return arguments.callee,dn}catch{try{return Pt(arguments,"callee").get}catch{return dn}}})():dn,Ge=fs()(),te=Ls(),Cd=sn(),Dd=an(),Hs=un(),bt=nr(),We={},Ud=typeof Uint8Array>"u"||!te?j:te(Uint8Array),De={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?j:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?j:ArrayBuffer,"%ArrayIteratorPrototype%":Ge&&te?te([][Symbol.iterator]()):j,"%AsyncFromSyncIteratorPrototype%":j,"%AsyncFunction%":We,"%AsyncGenerator%":We,"%AsyncGeneratorFunction%":We,"%AsyncIteratorPrototype%":We,"%Atomics%":typeof Atomics>"u"?j:Atomics,"%BigInt%":typeof BigInt>"u"?j:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?j:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?j:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?j:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Pd,"%eval%":eval,"%EvalError%":bd,"%Float16Array%":typeof Float16Array>"u"?j:Float16Array,"%Float32Array%":typeof Float32Array>"u"?j:Float32Array,"%Float64Array%":typeof Float64Array>"u"?j:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?j:FinalizationRegistry,"%Function%":Zs,"%GeneratorFunction%":We,"%Int8Array%":typeof Int8Array>"u"?j:Int8Array,"%Int16Array%":typeof Int16Array>"u"?j:Int16Array,"%Int32Array%":typeof Int32Array>"u"?j:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Ge&&te?te(te([][Symbol.iterator]())):j,"%JSON%":typeof JSON=="object"?JSON:j,"%Map%":typeof Map>"u"?j:Map,"%MapIteratorPrototype%":typeof Map>"u"||!Ge||!te?j:te(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":xd,"%Object.getOwnPropertyDescriptor%":Pt,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?j:Promise,"%Proxy%":typeof Proxy>"u"?j:Proxy,"%RangeError%":Td,"%ReferenceError%":Id,"%Reflect%":typeof Reflect>"u"?j:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?j:Set,"%SetIteratorPrototype%":typeof Set>"u"||!Ge||!te?j:te(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?j:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Ge&&te?te(""[Symbol.iterator]()):j,"%Symbol%":Ge?Symbol:j,"%SyntaxError%":Je,"%ThrowTypeError%":Nd,"%TypedArray%":Ud,"%TypeError%":Ke,"%Uint8Array%":typeof Uint8Array>"u"?j:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?j:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?j:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?j:Uint32Array,"%URIError%":Ed,"%WeakMap%":typeof WeakMap>"u"?j:WeakMap,"%WeakRef%":typeof WeakRef>"u"?j:WeakRef,"%WeakSet%":typeof WeakSet>"u"?j:WeakSet,"%Function.prototype.call%":bt,"%Function.prototype.apply%":Hs,"%Object.defineProperty%":Rd,"%Object.getPrototypeOf%":Cd,"%Math.abs%":Sd,"%Math.floor%":Ad,"%Math.max%":$d,"%Math.min%":zd,"%Math.pow%":wd,"%Math.round%":Od,"%Math.sign%":kd,"%Reflect.getPrototypeOf%":Dd};if(te)try{null.error}catch(e){Bs=te(te(e)),De["%Error.prototype%"]=Bs}var Bs,Md=o(function e(t){var r;if(t==="%AsyncFunction%")r=ln("async function () {}");else if(t==="%GeneratorFunction%")r=ln("function* () {}");else if(t==="%AsyncGeneratorFunction%")r=ln("async function* () {}");else if(t==="%AsyncGenerator%"){var n=e("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if(t==="%AsyncIteratorPrototype%"){var i=e("%AsyncGenerator%");i&&te&&(r=te(i.prototype))}return De[t]=r,r},"doEval"),Fs={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},Tt=qe(),or=pn(),Ld=Tt.call(bt,Array.prototype.concat),jd=Tt.call(Hs,Array.prototype.splice),Vs=Tt.call(bt,String.prototype.replace),ir=Tt.call(bt,String.prototype.slice),Bd=Tt.call(bt,RegExp.prototype.exec),Fd=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Vd=/\\(\\)?/g,Zd=o(function(t){var r=ir(t,0,1),n=ir(t,-1);if(r==="%"&&n!=="%")throw new Je("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&r!=="%")throw new Je("invalid intrinsic syntax, expected opening `%`");var i=[];return Vs(t,Fd,function(u,c,p,h){i[i.length]=p?Vs(h,Vd,"$1"):c||u}),i},"stringToPath"),Hd=o(function(t,r){var n=t,i;if(or(Fs,n)&&(i=Fs[n],n="%"+i[0]+"%"),or(De,n)){var u=De[n];if(u===We&&(u=Md(n)),typeof u>"u"&&!r)throw new Ke("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:i,name:n,value:u}}throw new Je("intrinsic "+t+" does not exist!")},"getBaseIntrinsic");qs.exports=o(function(t,r){if(typeof t!="string"||t.length===0)throw new Ke("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof r!="boolean")throw new Ke('"allowMissing" argument must be a boolean');if(Bd(/^%?[^%]*%?$/,t)===null)throw new Je("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=Zd(t),i=n.length>0?n[0]:"",u=Hd("%"+i+"%",r),c=u.name,p=u.value,h=!1,v=u.alias;v&&(i=v[0],jd(n,Ld([0,1],v)));for(var P=1,$=!0;P<n.length;P+=1){var x=n[P],s=ir(x,0,1),d=ir(x,-1);if((s==='"'||s==="'"||s==="`"||d==='"'||d==="'"||d==="`")&&s!==d)throw new Je("property names with quotes must have matching quotes");if((x==="constructor"||!$)&&(h=!0),i+="."+x,c="%"+i+"%",or(De,c))p=De[c];else if(p!=null){if(!(x in p)){if(!r)throw new Ke("base intrinsic for "+t+" exists, but the property is not available.");return}if(Pt&&P+1>=n.length){var g=Pt(p,x);$=!!g,$&&"get"in g&&!("originalValue"in g.get)?p=g.get:p=p[x]}else $=or(p,x),p=p[x];$&&!h&&(De[c]=p)}}return p},"GetIntrinsic")});var Ks=A((Cw,Ws)=>{"use strict";var qd=on();Ws.exports=o(function(){return qd()&&!!Symbol.toStringTag},"hasToStringTagShams")});var Ys=A((Uw,Xs)=>{"use strict";var Gd=Gs(),Js=Gd("%Object.defineProperty%",!0),Wd=Ks()(),Kd=pn(),Jd=er(),ar=Wd?Symbol.toStringTag:null;Xs.exports=o(function(t,r){var n=arguments.length>2&&!!arguments[2]&&arguments[2].force,i=arguments.length>2&&!!arguments[2]&&arguments[2].nonConfigurable;if(typeof n<"u"&&typeof n!="boolean"||typeof i<"u"&&typeof i!="boolean")throw new Jd("if provided, the `overrideIfSet` and `nonConfigurable` options must be booleans");ar&&(n||!Kd(t,ar))&&(Js?Js(t,ar,{configurable:!i,enumerable:!1,value:r,writable:!1}):t[ar]=r)},"setToStringTag")});var eu=A((Lw,Qs)=>{"use strict";var Xd=Function.prototype.call,Yd=Object.prototype.hasOwnProperty,Qd=qe();Qs.exports=Qd.call(Xd,Yd)});var ru=A((jw,tu)=>{"use strict";tu.exports=function(e,t){return Object.keys(t).forEach(function(r){e[r]=e[r]||t[r]}),e}});var iu=A((Bw,ou)=>{"use strict";var yn=sa(),em=require("util"),mn=require("path"),tm=require("http"),rm=require("https"),nm=require("url").parse,om=require("fs"),im=require("stream").Stream,am=require("crypto"),fn=da(),sm=za(),um=Ys(),ke=eu(),gn=ru();function nu(e){return String(e).replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/"/g,"%22")}o(nu,"escapeHeaderParam");function F(e){if(!(this instanceof F))return new F(e);this._overheadLength=0,this._valueLength=0,this._valuesToMeasure=[],yn.call(this),e=e||{};for(var t in e)this[t]=e[t]}o(F,"FormData");em.inherits(F,yn);F.LINE_BREAK=`\r
|
|
2
|
+
`;F.DEFAULT_CONTENT_TYPE="application/octet-stream";F.prototype.append=function(e,t,r){r=r||{},typeof r=="string"&&(r={filename:r});var n=yn.prototype.append.bind(this);if((typeof t=="number"||t==null)&&(t=String(t)),Array.isArray(t)){this._error(new Error("Arrays are not supported."));return}var i=this._multiPartHeader(e,t,r),u=this._multiPartFooter();n(i),n(t),n(u),this._trackLength(i,t,r)};F.prototype._trackLength=function(e,t,r){var n=0;r.knownLength!=null?n+=Number(r.knownLength):Buffer.isBuffer(t)?n=t.length:typeof t=="string"&&(n=Buffer.byteLength(t)),this._valueLength+=n,this._overheadLength+=Buffer.byteLength(e)+F.LINE_BREAK.length,!(!t||!t.path&&!(t.readable&&ke(t,"httpVersion"))&&!(t instanceof im))&&(r.knownLength||this._valuesToMeasure.push(t))};F.prototype._lengthRetriever=function(e,t){ke(e,"fd")?e.end!=null&&e.end!=1/0&&e.start!=null?t(null,e.end+1-(e.start?e.start:0)):om.stat(e.path,function(r,n){if(r){t(r);return}var i=n.size-(e.start?e.start:0);t(null,i)}):ke(e,"httpVersion")?t(null,Number(e.headers["content-length"])):ke(e,"httpModule")?(e.on("response",function(r){e.pause(),t(null,Number(r.headers["content-length"]))}),e.resume()):t("Unknown stream")};F.prototype._multiPartHeader=function(e,t,r){if(typeof r.header=="string")return r.header;var n=this._getContentDisposition(t,r),i=this._getContentType(t,r),u="",c={"Content-Disposition":["form-data",'name="'+nu(e)+'"'].concat(n||[]),"Content-Type":[].concat(i||[])};typeof r.header=="object"&&gn(c,r.header);var p;for(var h in c)if(ke(c,h)){if(p=c[h],p==null)continue;Array.isArray(p)||(p=[p]),p.length&&(u+=h+": "+p.join("; ")+F.LINE_BREAK)}return"--"+this.getBoundary()+F.LINE_BREAK+u+F.LINE_BREAK};F.prototype._getContentDisposition=function(e,t){var r;if(typeof t.filepath=="string"?r=mn.normalize(t.filepath).replace(/\\/g,"/"):t.filename||e&&(e.name||e.path)?r=mn.basename(t.filename||e&&(e.name||e.path)):e&&e.readable&&ke(e,"httpVersion")&&(r=mn.basename(e.client._httpMessage.path||"")),r)return'filename="'+nu(r)+'"'};F.prototype._getContentType=function(e,t){var r=t.contentType;return!r&&e&&e.name&&(r=fn.lookup(e.name)),!r&&e&&e.path&&(r=fn.lookup(e.path)),!r&&e&&e.readable&&ke(e,"httpVersion")&&(r=e.headers["content-type"]),!r&&(t.filepath||t.filename)&&(r=fn.lookup(t.filepath||t.filename)),!r&&e&&typeof e=="object"&&(r=F.DEFAULT_CONTENT_TYPE),r};F.prototype._multiPartFooter=function(){return function(e){var t=F.LINE_BREAK,r=this._streams.length===0;r&&(t+=this._lastBoundary()),e(t)}.bind(this)};F.prototype._lastBoundary=function(){return"--"+this.getBoundary()+"--"+F.LINE_BREAK};F.prototype.getHeaders=function(e){var t,r={"content-type":"multipart/form-data; boundary="+this.getBoundary()};for(t in e)ke(e,t)&&(r[t.toLowerCase()]=e[t]);return r};F.prototype.setBoundary=function(e){if(typeof e!="string")throw new TypeError("FormData boundary must be a string");this._boundary=e};F.prototype.getBoundary=function(){return this._boundary||this._generateBoundary(),this._boundary};F.prototype.getBuffer=function(){for(var e=new Buffer.alloc(0),t=this.getBoundary(),r=0,n=this._streams.length;r<n;r++)typeof this._streams[r]!="function"&&(Buffer.isBuffer(this._streams[r])?e=Buffer.concat([e,this._streams[r]]):e=Buffer.concat([e,Buffer.from(this._streams[r])]),(typeof this._streams[r]!="string"||this._streams[r].substring(2,t.length+2)!==t)&&(e=Buffer.concat([e,Buffer.from(F.LINE_BREAK)])));return Buffer.concat([e,Buffer.from(this._lastBoundary())])};F.prototype._generateBoundary=function(){this._boundary="--------------------------"+am.randomBytes(12).toString("hex")};F.prototype.getLengthSync=function(){var e=this._overheadLength+this._valueLength;return this._streams.length&&(e+=this._lastBoundary().length),this.hasKnownLength()||this._error(new Error("Cannot calculate proper length in synchronous way.")),e};F.prototype.hasKnownLength=function(){var e=!0;return this._valuesToMeasure.length&&(e=!1),e};F.prototype.getLength=function(e){var t=this._overheadLength+this._valueLength;if(this._streams.length&&(t+=this._lastBoundary().length),!this._valuesToMeasure.length){process.nextTick(e.bind(this,null,t));return}sm.parallel(this._valuesToMeasure,this._lengthRetriever,function(r,n){if(r){e(r);return}n.forEach(function(i){t+=i}),e(null,t)})};F.prototype.submit=function(e,t){var r,n,i={method:"post"};return typeof e=="string"?(e=nm(e),n=gn({port:e.port,path:e.pathname,host:e.hostname,protocol:e.protocol},i)):(n=gn(e,i),n.port||(n.port=n.protocol==="https:"?443:80)),n.headers=this.getHeaders(e.headers),n.protocol==="https:"?r=rm.request(n):r=tm.request(n),this.getLength(function(u,c){if(u&&u!=="Unknown stream"){this._error(u);return}if(c&&r.setHeader("Content-Length",c),this.pipe(r),t){var p,h=o(function(v,P){return r.removeListener("error",h),r.removeListener("response",p),t.call(this,v,P)},"callback");p=h.bind(this,null),r.on("error",h),r.on("response",p)}}.bind(this)),r};F.prototype._error=function(e){this.error||(this.error=e,this.pause(),this.emit("error",e))};F.prototype.toString=function(){return"[object FormData]"};um(F.prototype,"FormData");ou.exports=F});var Lm={};On(Lm,{bigcommerce:()=>Mm});module.exports=Bu(Lm);var Fu=Object.freeze({status:"aborted"});function I(e,t,r){function n(p,h){if(p._zod||Object.defineProperty(p,"_zod",{value:{def:h,constr:c,traits:new Set},enumerable:!1}),p._zod.traits.has(e))return;p._zod.traits.add(e),t(p,h);let v=c.prototype,P=Object.keys(v);for(let $=0;$<P.length;$++){let x=P[$];x in p||(p[x]=v[x].bind(p))}}o(n,"init");let i=r?.Parent??Object;class u extends i{static{o(this,"Definition")}}Object.defineProperty(u,"name",{value:e});function c(p){var h;let v=r?.Parent?new u:this;n(v,p),(h=v._zod).deferred??(h.deferred=[]);for(let P of v._zod.deferred)P();return v}return o(c,"_"),Object.defineProperty(c,"init",{value:n}),Object.defineProperty(c,Symbol.hasInstance,{value:o(p=>r?.Parent&&p instanceof r.Parent?!0:p?._zod?.traits?.has(e),"value")}),Object.defineProperty(c,"name",{value:e}),c}o(I,"$constructor");var me=class extends Error{static{o(this,"$ZodAsyncError")}constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},Et=class extends Error{static{o(this,"$ZodEncodeError")}constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}},lr={};function he(e){return e&&Object.assign(lr,e),lr}o(he,"config");function mr(e){let t=Object.values(e).filter(n=>typeof n=="number");return Object.entries(e).filter(([n,i])=>t.indexOf(+n)===-1).map(([n,i])=>i)}o(mr,"getEnumValues");function Nn(e,t){return typeof t=="bigint"?t.toString():t}o(Nn,"jsonStringifyReplacer");function At(e){return{get value(){{let r=e();return Object.defineProperty(this,"value",{value:r}),r}throw new Error("cached value already set")}}}o(At,"cached");function Cn(e){return e==null}o(Cn,"nullish");function $t(e){let t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}o($t,"cleanRegex");var Rn=Symbol("evaluating");function Y(e,t,r){let n;Object.defineProperty(e,t,{get(){if(n!==Rn)return n===void 0&&(n=Rn,n=r()),n},set(i){Object.defineProperty(e,t,{value:i})},configurable:!0})}o(Y,"defineLazy");var fr="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Qe(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}o(Qe,"isObject");var Vu=At(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let e=Function;return new e(""),!0}catch{return!1}});function Dn(e){if(Qe(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!="function")return!0;let r=t.prototype;return!(Qe(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}o(Dn,"isPlainObject");var Un=new Set(["string","number","symbol"]);function Le(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}o(Le,"escapeRegex");function zt(e,t,r){let n=new e._zod.constr(t??e._zod.def);return(!t||r?.parent)&&(n._zod.parent=e),n}o(zt,"clone");function q(e){let t=e;if(!t)return{};if(typeof t=="string")return{error:o(()=>t,"error")};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:o(()=>t.error,"error")}:t}o(q,"normalizeParams");function Mn(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}o(Mn,"optionalKeys");var Ln={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function je(e,t=0){if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue!==!0)return!0;return!1}o(je,"aborted");function Ie(e,t){return t.map(r=>{var n;return(n=r).path??(n.path=[]),r.path.unshift(e),r})}o(Ie,"prefixIssues");function St(e){return typeof e=="string"?e:e?.message}o(St,"unwrapMessage");function Ee(e,t,r){let n={...e,path:e.path??[]};if(!e.message){let i=St(e.inst?._zod.def?.error?.(e))??St(t?.error?.(e))??St(r.customError?.(e))??St(r.localeError?.(e))??"Invalid input";n.message=i}return delete n.inst,delete n.continue,t?.reportInput||delete n.input,n}o(Ee,"finalizeIssue");function jn(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}o(jn,"getLengthableOrigin");function gr(...e){let[t,r,n]=e;return typeof t=="string"?{message:t,code:"custom",input:r,inst:n}:{...t}}o(gr,"issue");var Bn=o((e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,Nn,2),Object.defineProperty(e,"toString",{value:o(()=>e.message,"value"),enumerable:!1})},"initializer"),Fn=I("$ZodError",Bn),et=I("$ZodError",Bn,{Parent:Error});var Hu=o(e=>(t,r,n,i)=>{let u=n?Object.assign(n,{async:!1}):{async:!1},c=t._zod.run({value:r,issues:[]},u);if(c instanceof Promise)throw new me;if(c.issues.length){let p=new(i?.Err??e)(c.issues.map(h=>Ee(h,u,he())));throw fr(p,i?.callee),p}return c.value},"_parse"),wt=Hu(et),qu=o(e=>async(t,r,n,i)=>{let u=n?Object.assign(n,{async:!0}):{async:!0},c=t._zod.run({value:r,issues:[]},u);if(c instanceof Promise&&(c=await c),c.issues.length){let p=new(i?.Err??e)(c.issues.map(h=>Ee(h,u,he())));throw fr(p,i?.callee),p}return c.value},"_parseAsync"),Ot=qu(et),Gu=o(e=>(t,r,n)=>{let i=n?{...n,async:!1}:{async:!1},u=t._zod.run({value:r,issues:[]},i);if(u instanceof Promise)throw new me;return u.issues.length?{success:!1,error:new(e??Fn)(u.issues.map(c=>Ee(c,i,he())))}:{success:!0,data:u.value}},"_safeParse"),tt=Gu(et),Wu=o(e=>async(t,r,n)=>{let i=n?Object.assign(n,{async:!0}):{async:!0},u=t._zod.run({value:r,issues:[]},i);return u instanceof Promise&&(u=await u),u.issues.length?{success:!1,error:new e(u.issues.map(c=>Ee(c,i,he())))}:{success:!0,data:u.value}},"_safeParseAsync"),rt=Wu(et);var Ku="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",Ju=new RegExp(`^${Ku}$`);var Vn=o(e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},"string"),Zn=/^-?\d+n?$/,Hn=/^-?\d+$/,yr=/^-?\d+(?:\.\d+)?$/,qn=/^(?:true|false)$/i;var Se=I("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])}),Xu={number:"number",bigint:"bigint",object:"date"};var Gn=I("$ZodCheckGreaterThan",(e,t)=>{Se.init(e,t);let r=Xu[typeof t.value];e._zod.onattach.push(n=>{let i=n._zod.bag,u=(t.inclusive?i.minimum:i.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>u&&(t.inclusive?i.minimum=t.value:i.exclusiveMinimum=t.value)}),e._zod.check=n=>{(t.inclusive?n.value>=t.value:n.value>t.value)||n.issues.push({origin:r,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:n.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}});var Wn=I("$ZodCheckNumberFormat",(e,t)=>{Se.init(e,t),t.format=t.format||"float64";let r=t.format?.includes("int"),n=r?"int":"number",[i,u]=Ln[t.format];e._zod.onattach.push(c=>{let p=c._zod.bag;p.format=t.format,p.minimum=i,p.maximum=u,r&&(p.pattern=Hn)}),e._zod.check=c=>{let p=c.value;if(r){if(!Number.isInteger(p)){c.issues.push({expected:n,format:t.format,code:"invalid_type",continue:!1,input:p,inst:e});return}if(!Number.isSafeInteger(p)){p>0?c.issues.push({input:p,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:n,inclusive:!0,continue:!t.abort}):c.issues.push({input:p,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:n,inclusive:!0,continue:!t.abort});return}}p<i&&c.issues.push({origin:"number",input:p,code:"too_small",minimum:i,inclusive:!0,inst:e,continue:!t.abort}),p>u&&c.issues.push({origin:"number",input:p,code:"too_big",maximum:u,inclusive:!0,inst:e,continue:!t.abort})}});var Kn=I("$ZodCheckMinLength",(e,t)=>{var r;Se.init(e,t),(r=e._zod.def).when??(r.when=n=>{let i=n.value;return!Cn(i)&&i.length!==void 0}),e._zod.onattach.push(n=>{let i=n._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>i&&(n._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{let i=n.value;if(i.length>=t.minimum)return;let c=jn(i);n.issues.push({origin:c,code:"too_small",minimum:t.minimum,inclusive:!0,input:i,inst:e,continue:!t.abort})}});var hr=I("$ZodCheckStringFormat",(e,t)=>{var r,n;Se.init(e,t),e._zod.onattach.push(i=>{let u=i._zod.bag;u.format=t.format,t.pattern&&(u.patterns??(u.patterns=new Set),u.patterns.add(t.pattern))}),t.pattern?(r=e._zod).check??(r.check=i=>{t.pattern.lastIndex=0,!t.pattern.test(i.value)&&i.issues.push({origin:"string",code:"invalid_format",format:t.format,input:i.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(n=e._zod).check??(n.check=()=>{})}),Jn=I("$ZodCheckRegex",(e,t)=>{hr.init(e,t),e._zod.check=r=>{t.pattern.lastIndex=0,!t.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}});var Yn={major:4,minor:3,patch:6};var W=I("$ZodType",(e,t)=>{var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Yn;let n=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&n.unshift(e);for(let i of n)for(let u of i._zod.onattach)u(e);if(n.length===0)(r=e._zod).deferred??(r.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let i=o((c,p,h)=>{let v=je(c),P;for(let $ of p){if($._zod.def.when){if(!$._zod.def.when(c))continue}else if(v)continue;let x=c.issues.length,s=$._zod.check(c);if(s instanceof Promise&&h?.async===!1)throw new me;if(P||s instanceof Promise)P=(P??Promise.resolve()).then(async()=>{await s,c.issues.length!==x&&(v||(v=je(c,x)))});else{if(c.issues.length===x)continue;v||(v=je(c,x))}}return P?P.then(()=>c):c},"runChecks"),u=o((c,p,h)=>{if(je(c))return c.aborted=!0,c;let v=i(p,n,h);if(v instanceof Promise){if(h.async===!1)throw new me;return v.then(P=>e._zod.parse(P,h))}return e._zod.parse(v,h)},"handleCanaryResult");e._zod.run=(c,p)=>{if(p.skipChecks)return e._zod.parse(c,p);if(p.direction==="backward"){let v=e._zod.parse({value:c.value,issues:[]},{...p,skipChecks:!0});return v instanceof Promise?v.then(P=>u(P,c,p)):u(v,c,p)}let h=e._zod.parse(c,p);if(h instanceof Promise){if(p.async===!1)throw new me;return h.then(v=>i(v,n,p))}return i(h,n,p)}}Y(e,"~standard",()=>({validate:o(i=>{try{let u=tt(e,i);return u.success?{value:u.data}:{issues:u.error?.issues}}catch{return rt(e,i).then(c=>c.success?{value:c.data}:{issues:c.error?.issues})}},"validate"),vendor:"zod",version:1}))}),Nt=I("$ZodString",(e,t)=>{W.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??Vn(e._zod.bag),e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=String(r.value)}catch{}return typeof r.value=="string"||r.issues.push({expected:"string",code:"invalid_type",input:r.value,inst:e}),r}}),vr=I("$ZodStringFormat",(e,t)=>{hr.init(e,t),Nt.init(e,t)});var no=I("$ZodURL",(e,t)=>{vr.init(e,t),e._zod.check=r=>{try{let n=r.value.trim(),i=new URL(n);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(i.hostname)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:r.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(i.protocol.endsWith(":")?i.protocol.slice(0,-1):i.protocol)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:r.value,inst:e,continue:!t.abort})),t.normalize?r.value=i.href:r.value=n;return}catch{r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:e,continue:!t.abort})}}});var _r=I("$ZodNumber",(e,t)=>{W.init(e,t),e._zod.pattern=e._zod.bag.pattern??yr,e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=Number(r.value)}catch{}let i=r.value;if(typeof i=="number"&&!Number.isNaN(i)&&Number.isFinite(i))return r;let u=typeof i=="number"?Number.isNaN(i)?"NaN":Number.isFinite(i)?void 0:"Infinity":void 0;return r.issues.push({expected:"number",code:"invalid_type",input:i,inst:e,...u?{received:u}:{}}),r}}),oo=I("$ZodNumberFormat",(e,t)=>{Wn.init(e,t),_r.init(e,t)}),xr=I("$ZodBoolean",(e,t)=>{W.init(e,t),e._zod.pattern=qn,e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=!!r.value}catch{}let i=r.value;return typeof i=="boolean"||r.issues.push({expected:"boolean",code:"invalid_type",input:i,inst:e}),r}}),io=I("$ZodBigInt",(e,t)=>{W.init(e,t),e._zod.pattern=Zn,e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=BigInt(r.value)}catch{}return typeof r.value=="bigint"||r.issues.push({expected:"bigint",code:"invalid_type",input:r.value,inst:e}),r}});var ao=I("$ZodAny",(e,t)=>{W.init(e,t),e._zod.parse=r=>r}),so=I("$ZodUnknown",(e,t)=>{W.init(e,t),e._zod.parse=r=>r});var uo=I("$ZodVoid",(e,t)=>{W.init(e,t),e._zod.parse=(r,n)=>{let i=r.value;return typeof i>"u"||r.issues.push({expected:"void",code:"invalid_type",input:i,inst:e}),r}}),co=I("$ZodDate",(e,t)=>{W.init(e,t),e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=new Date(r.value)}catch{}let i=r.value,u=i instanceof Date;return u&&!Number.isNaN(i.getTime())||r.issues.push({expected:"date",code:"invalid_type",input:i,...u?{received:"Invalid Date"}:{},inst:e}),r}});function Qn(e,t,r){e.issues.length&&t.issues.push(...Ie(r,e.issues)),t.value[r]=e.value}o(Qn,"handleArrayResult");var po=I("$ZodArray",(e,t)=>{W.init(e,t),e._zod.parse=(r,n)=>{let i=r.value;if(!Array.isArray(i))return r.issues.push({expected:"array",code:"invalid_type",input:i,inst:e}),r;r.value=Array(i.length);let u=[];for(let c=0;c<i.length;c++){let p=i[c],h=t.element._zod.run({value:p,issues:[]},n);h instanceof Promise?u.push(h.then(v=>Qn(v,r,c))):Qn(h,r,c)}return u.length?Promise.all(u).then(()=>r):r}});function Rt(e,t,r,n,i){if(e.issues.length){if(i&&!(r in n))return;t.issues.push(...Ie(r,e.issues))}e.value===void 0?r in n&&(t.value[r]=void 0):t.value[r]=e.value}o(Rt,"handlePropertyResult");function Yu(e){let t=Object.keys(e.shape);for(let n of t)if(!e.shape?.[n]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${n}": expected a Zod schema`);let r=Mn(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(r)}}o(Yu,"normalizeDef");function Qu(e,t,r,n,i,u){let c=[],p=i.keySet,h=i.catchall._zod,v=h.def.type,P=h.optout==="optional";for(let $ in t){if(p.has($))continue;if(v==="never"){c.push($);continue}let x=h.run({value:t[$],issues:[]},n);x instanceof Promise?e.push(x.then(s=>Rt(s,r,$,t,P))):Rt(x,r,$,t,P)}return c.length&&r.issues.push({code:"unrecognized_keys",keys:c,input:t,inst:u}),e.length?Promise.all(e).then(()=>r):r}o(Qu,"handleCatchall");var lo=I("$ZodObject",(e,t)=>{if(W.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){let p=t.shape;Object.defineProperty(t,"shape",{get:o(()=>{let h={...p};return Object.defineProperty(t,"shape",{value:h}),h},"get")})}let n=At(()=>Yu(t));Y(e._zod,"propValues",()=>{let p=t.shape,h={};for(let v in p){let P=p[v]._zod;if(P.values){h[v]??(h[v]=new Set);for(let $ of P.values)h[v].add($)}}return h});let i=Qe,u=t.catchall,c;e._zod.parse=(p,h)=>{c??(c=n.value);let v=p.value;if(!i(v))return p.issues.push({expected:"object",code:"invalid_type",input:v,inst:e}),p;p.value={};let P=[],$=c.shape;for(let x of c.keys){let s=$[x],d=s._zod.optout==="optional",g=s._zod.run({value:v[x],issues:[]},h);g instanceof Promise?P.push(g.then(m=>Rt(m,p,x,v,d))):Rt(g,p,x,v,d)}return u?Qu(P,v,p,h,n.value,e):P.length?Promise.all(P).then(()=>p):p}});function eo(e,t,r,n){for(let u of e)if(u.issues.length===0)return t.value=u.value,t;let i=e.filter(u=>!je(u));return i.length===1?(t.value=i[0].value,i[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(u=>u.issues.map(c=>Ee(c,n,he())))}),t)}o(eo,"handleUnionResults");var Pr=I("$ZodUnion",(e,t)=>{W.init(e,t),Y(e._zod,"optin",()=>t.options.some(i=>i._zod.optin==="optional")?"optional":void 0),Y(e._zod,"optout",()=>t.options.some(i=>i._zod.optout==="optional")?"optional":void 0),Y(e._zod,"values",()=>{if(t.options.every(i=>i._zod.values))return new Set(t.options.flatMap(i=>Array.from(i._zod.values)))}),Y(e._zod,"pattern",()=>{if(t.options.every(i=>i._zod.pattern)){let i=t.options.map(u=>u._zod.pattern);return new RegExp(`^(${i.map(u=>$t(u.source)).join("|")})$`)}});let r=t.options.length===1,n=t.options[0]._zod.run;e._zod.parse=(i,u)=>{if(r)return n(i,u);let c=!1,p=[];for(let h of t.options){let v=h._zod.run({value:i.value,issues:[]},u);if(v instanceof Promise)p.push(v),c=!0;else{if(v.issues.length===0)return v;p.push(v)}}return c?Promise.all(p).then(h=>eo(h,i,e,u)):eo(p,i,e,u)}});var mo=I("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,Pr.init(e,t);let r=e._zod.parse;Y(e._zod,"propValues",()=>{let i={};for(let u of t.options){let c=u._zod.propValues;if(!c||Object.keys(c).length===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(u)}"`);for(let[p,h]of Object.entries(c)){i[p]||(i[p]=new Set);for(let v of h)i[p].add(v)}}return i});let n=At(()=>{let i=t.options,u=new Map;for(let c of i){let p=c._zod.propValues?.[t.discriminator];if(!p||p.size===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(c)}"`);for(let h of p){if(u.has(h))throw new Error(`Duplicate discriminator value "${String(h)}"`);u.set(h,c)}}return u});e._zod.parse=(i,u)=>{let c=i.value;if(!Qe(c))return i.issues.push({code:"invalid_type",expected:"object",input:c,inst:e}),i;let p=n.value.get(c?.[t.discriminator]);return p?p._zod.run(i,u):t.unionFallback?r(i,u):(i.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,input:c,path:[t.discriminator],inst:e}),i)}});var fo=I("$ZodRecord",(e,t)=>{W.init(e,t),e._zod.parse=(r,n)=>{let i=r.value;if(!Dn(i))return r.issues.push({expected:"record",code:"invalid_type",input:i,inst:e}),r;let u=[],c=t.keyType._zod.values;if(c){r.value={};let p=new Set;for(let v of c)if(typeof v=="string"||typeof v=="number"||typeof v=="symbol"){p.add(typeof v=="number"?v.toString():v);let P=t.valueType._zod.run({value:i[v],issues:[]},n);P instanceof Promise?u.push(P.then($=>{$.issues.length&&r.issues.push(...Ie(v,$.issues)),r.value[v]=$.value})):(P.issues.length&&r.issues.push(...Ie(v,P.issues)),r.value[v]=P.value)}let h;for(let v in i)p.has(v)||(h=h??[],h.push(v));h&&h.length>0&&r.issues.push({code:"unrecognized_keys",input:i,inst:e,keys:h})}else{r.value={};for(let p of Reflect.ownKeys(i)){if(p==="__proto__")continue;let h=t.keyType._zod.run({value:p,issues:[]},n);if(h instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof p=="string"&&yr.test(p)&&h.issues.length){let $=t.keyType._zod.run({value:Number(p),issues:[]},n);if($ instanceof Promise)throw new Error("Async schemas not supported in object keys currently");$.issues.length===0&&(h=$)}if(h.issues.length){t.mode==="loose"?r.value[p]=i[p]:r.issues.push({code:"invalid_key",origin:"record",issues:h.issues.map($=>Ee($,n,he())),input:p,path:[p],inst:e});continue}let P=t.valueType._zod.run({value:i[p],issues:[]},n);P instanceof Promise?u.push(P.then($=>{$.issues.length&&r.issues.push(...Ie(p,$.issues)),r.value[h.value]=$.value})):(P.issues.length&&r.issues.push(...Ie(p,P.issues)),r.value[h.value]=P.value)}}return u.length?Promise.all(u).then(()=>r):r}});var go=I("$ZodEnum",(e,t)=>{W.init(e,t);let r=mr(t.entries),n=new Set(r);e._zod.values=n,e._zod.pattern=new RegExp(`^(${r.filter(i=>Un.has(typeof i)).map(i=>typeof i=="string"?Le(i):i.toString()).join("|")})$`),e._zod.parse=(i,u)=>{let c=i.value;return n.has(c)||i.issues.push({code:"invalid_value",values:r,input:c,inst:e}),i}}),yo=I("$ZodLiteral",(e,t)=>{if(W.init(e,t),t.values.length===0)throw new Error("Cannot create literal schema with no valid values");let r=new Set(t.values);e._zod.values=r,e._zod.pattern=new RegExp(`^(${t.values.map(n=>typeof n=="string"?Le(n):n?Le(n.toString()):String(n)).join("|")})$`),e._zod.parse=(n,i)=>{let u=n.value;return r.has(u)||n.issues.push({code:"invalid_value",values:t.values,input:u,inst:e}),n}});var ho=I("$ZodTransform",(e,t)=>{W.init(e,t),e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new Et(e.constructor.name);let i=t.transform(r.value,r);if(n.async)return(i instanceof Promise?i:Promise.resolve(i)).then(c=>(r.value=c,r));if(i instanceof Promise)throw new me;return r.value=i,r}});function to(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}o(to,"handleOptionalResult");var vo=I("$ZodOptional",(e,t)=>{W.init(e,t),e._zod.optin="optional",e._zod.optout="optional",Y(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),Y(e._zod,"pattern",()=>{let r=t.innerType._zod.pattern;return r?new RegExp(`^(${$t(r.source)})?$`):void 0}),e._zod.parse=(r,n)=>{if(t.innerType._zod.optin==="optional"){let i=t.innerType._zod.run(r,n);return i instanceof Promise?i.then(u=>to(u,r.value)):to(i,r.value)}return r.value===void 0?r:t.innerType._zod.run(r,n)}});var _o=I("$ZodNullable",(e,t)=>{W.init(e,t),Y(e._zod,"optin",()=>t.innerType._zod.optin),Y(e._zod,"optout",()=>t.innerType._zod.optout),Y(e._zod,"pattern",()=>{let r=t.innerType._zod.pattern;return r?new RegExp(`^(${$t(r.source)}|null)$`):void 0}),Y(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(r,n)=>r.value===null?r:t.innerType._zod.run(r,n)});var xo=I("$ZodPipe",(e,t)=>{W.init(e,t),Y(e._zod,"values",()=>t.in._zod.values),Y(e._zod,"optin",()=>t.in._zod.optin),Y(e._zod,"optout",()=>t.out._zod.optout),Y(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(r,n)=>{if(n.direction==="backward"){let u=t.out._zod.run(r,n);return u instanceof Promise?u.then(c=>kt(c,t.in,n)):kt(u,t.in,n)}let i=t.in._zod.run(r,n);return i instanceof Promise?i.then(u=>kt(u,t.out,n)):kt(i,t.out,n)}});function kt(e,t,r){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},r)}o(kt,"handlePipeResult");var Po=I("$ZodCustom",(e,t)=>{Se.init(e,t),W.init(e,t),e._zod.parse=(r,n)=>r,e._zod.check=r=>{let n=r.value,i=t.fn(n);if(i instanceof Promise)return i.then(u=>ro(u,r,n,e));ro(i,r,n,e)}});function ro(e,t,r,n){if(!e){let i={code:"custom",input:r,inst:n,path:[...n._zod.def.path??[]],continue:!n._zod.def.abort};n._zod.def.params&&(i.params=n._zod.def.params),t.issues.push(gr(i))}}o(ro,"handleRefineResult");var To;var br=class{static{o(this,"$ZodRegistry")}constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...r){let n=r[0];return this._map.set(t,n),n&&typeof n=="object"&&"id"in n&&this._idmap.set(n.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){let r=this._map.get(t);return r&&typeof r=="object"&&"id"in r&&this._idmap.delete(r.id),this._map.delete(t),this}get(t){let r=t._zod.parent;if(r){let n={...this.get(r)??{}};delete n.id;let i={...n,...this._map.get(t)};return Object.keys(i).length?i:void 0}return this._map.get(t)}has(t){return this._map.has(t)}};function Io(){return new br}o(Io,"registry");(To=globalThis).__zod_globalRegistry??(To.__zod_globalRegistry=Io());var Tr=globalThis.__zod_globalRegistry;function Eo(e,t){return new e({type:"string",...q(t)})}o(Eo,"_string");function So(e,t){return new e({type:"string",coerce:!0,...q(t)})}o(So,"_coercedString");function Ao(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...q(t)})}o(Ao,"_url");function $o(e,t){return new e({type:"number",checks:[],...q(t)})}o($o,"_number");function zo(e,t){return new e({type:"number",coerce:!0,checks:[],...q(t)})}o(zo,"_coercedNumber");function wo(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...q(t)})}o(wo,"_int");function Oo(e,t){return new e({type:"boolean",...q(t)})}o(Oo,"_boolean");function ko(e,t){return new e({type:"boolean",coerce:!0,...q(t)})}o(ko,"_coercedBoolean");function Ro(e,t){return new e({type:"bigint",coerce:!0,...q(t)})}o(Ro,"_coercedBigint");function No(e){return new e({type:"any"})}o(No,"_any");function Co(e){return new e({type:"unknown"})}o(Co,"_unknown");function Do(e,t){return new e({type:"void",...q(t)})}o(Do,"_void");function Uo(e,t){return new e({type:"date",coerce:!0,...q(t)})}o(Uo,"_coercedDate");function Ct(e,t){return new Gn({check:"greater_than",...q(t),value:e,inclusive:!0})}o(Ct,"_gte");function le(e,t){return new Kn({check:"min_length",...q(t),minimum:e})}o(le,"_minLength");function Ae(e,t){return new Jn({check:"string_format",format:"regex",...q(t),pattern:e})}o(Ae,"_regex");function Mo(e,t,r){let n=q(r);return n.abort??(n.abort=!0),new e({type:"custom",check:"custom",fn:t,...n})}o(Mo,"_custom");var Q=I("ZodMiniType",(e,t)=>{if(!e._zod)throw new Error("Uninitialized schema in ZodMiniType.");W.init(e,t),e.def=t,e.type=t.type,e.parse=(r,n)=>wt(e,r,n,{callee:e.parse}),e.safeParse=(r,n)=>tt(e,r,n),e.parseAsync=async(r,n)=>Ot(e,r,n,{callee:e.parseAsync}),e.safeParseAsync=async(r,n)=>rt(e,r,n),e.check=(...r)=>e.clone({...t,checks:[...t.checks??[],...r.map(n=>typeof n=="function"?{_zod:{check:n,def:{check:"custom"},onattach:[]}}:n)]},{parent:!0}),e.with=e.check,e.clone=(r,n)=>zt(e,r,n),e.brand=()=>e,e.register=((r,n)=>(r.add(e,n),e)),e.apply=r=>r(e)}),Ut=I("ZodMiniString",(e,t)=>{Nt.init(e,t),Q.init(e,t)});function a(e){return Eo(Ut,e)}o(a,"string");var Lo=I("ZodMiniStringFormat",(e,t)=>{vr.init(e,t),Ut.init(e,t)});var dc=I("ZodMiniURL",(e,t)=>{no.init(e,t),Lo.init(e,t)});function jo(e){return Ao(dc,e)}o(jo,"url");var Mt=I("ZodMiniNumber",(e,t)=>{_r.init(e,t),Q.init(e,t)});function re(e){return $o(Mt,e)}o(re,"number");var mc=I("ZodMiniNumberFormat",(e,t)=>{oo.init(e,t),Mt.init(e,t)});function Bo(e){return wo(mc,e)}o(Bo,"int");var Ir=I("ZodMiniBoolean",(e,t)=>{xr.init(e,t),Q.init(e,t)});function H(e){return Oo(Ir,e)}o(H,"boolean");var Fo=I("ZodMiniBigInt",(e,t)=>{io.init(e,t),Q.init(e,t)});var fc=I("ZodMiniAny",(e,t)=>{ao.init(e,t),Q.init(e,t)});function ot(){return No(fc)}o(ot,"any");var gc=I("ZodMiniUnknown",(e,t)=>{so.init(e,t),Q.init(e,t)});function R(){return Co(gc)}o(R,"unknown");var yc=I("ZodMiniVoid",(e,t)=>{uo.init(e,t),Q.init(e,t)});function Vo(e){return Do(yc,e)}o(Vo,"_void");var Zo=I("ZodMiniDate",(e,t)=>{co.init(e,t),Q.init(e,t)});var hc=I("ZodMiniArray",(e,t)=>{po.init(e,t),Q.init(e,t)});function D(e,t){return new hc({type:"array",element:e,...q(t)})}o(D,"array");var vc=I("ZodMiniObject",(e,t)=>{lo.init(e,t),Q.init(e,t),Y(e,"shape",()=>t.shape)});function l(e,t){let r={type:"object",shape:e??{},...q(t)};return new vc(r)}o(l,"object");var _c=I("ZodMiniUnion",(e,t)=>{Pr.init(e,t),Q.init(e,t)});function U(e,t){return new _c({type:"union",options:e,...q(t)})}o(U,"union");var xc=I("ZodMiniDiscriminatedUnion",(e,t)=>{mo.init(e,t),Q.init(e,t)});function $e(e,t,r){return new xc({type:"union",options:t,discriminator:e,...q(r)})}o($e,"discriminatedUnion");var Pc=I("ZodMiniRecord",(e,t)=>{fo.init(e,t),Q.init(e,t)});function N(e,t,r){return new Pc({type:"record",keyType:e,valueType:t,...q(r)})}o(N,"record");var bc=I("ZodMiniEnum",(e,t)=>{go.init(e,t),Q.init(e,t),e.options=Object.values(t.entries)});function L(e,t){let r=Array.isArray(e)?Object.fromEntries(e.map(n=>[n,n])):e;return new bc({type:"enum",entries:r,...q(t)})}o(L,"_enum");var Tc=I("ZodMiniLiteral",(e,t)=>{yo.init(e,t),Q.init(e,t)});function z(e,t){return new Tc({type:"literal",values:Array.isArray(e)?e:[e],...q(t)})}o(z,"literal");var Ic=I("ZodMiniTransform",(e,t)=>{ho.init(e,t),Q.init(e,t)});function ze(e){return new Ic({type:"transform",transform:e})}o(ze,"transform");var Ec=I("ZodMiniOptional",(e,t)=>{vo.init(e,t),Q.init(e,t)});function y(e){return new Ec({type:"optional",innerType:e})}o(y,"optional");var Sc=I("ZodMiniNullable",(e,t)=>{_o.init(e,t),Q.init(e,t)});function it(e){return new Sc({type:"nullable",innerType:e})}o(it,"nullable");var Ac=I("ZodMiniPipe",(e,t)=>{xo.init(e,t),Q.init(e,t)});function we(e,t){return new Ac({type:"pipe",in:e,out:t})}o(we,"pipe");var $c=I("ZodMiniCustom",(e,t)=>{Po.init(e,t),Q.init(e,t)});function Lt(e,t){return Mo($c,e??(()=>!0),t)}o(Lt,"custom");var at={};On(at,{bigint:()=>Nc,boolean:()=>Rc,date:()=>Cc,number:()=>kc,string:()=>Oc});function Oc(e){return So(Ut,e)}o(Oc,"string");function kc(e){return zo(Mt,e)}o(kc,"number");function Rc(e){return ko(Ir,e)}o(Rc,"boolean");function Nc(e){return Ro(Fo,e)}o(Nc,"bigint");function Cc(e){return Uo(Zo,e)}o(Cc,"date");var Sr=l({retryOnFailure:l({defaultValue:y(H()),hide:y(H())}),continueOnFailure:l({defaultValue:y(H()),hide:y(H())})}),Er=class{constructor(t,r,n,i,u,c,p,h,v,P,$){this.name=t;this.displayName=r;this.description=n;this.props=i;this.run=u;this.test=c;this.requireAuth=p;this.errorHandlingOptions=h;this.outputSchema=v;this.audience=P;this.aiMetadata=$}static{o(this,"IAction")}},V=o(e=>new Er(e.name,e.displayName,e.description,e.props,e.run,e.test??e.run,e.requireAuth??!0,e.errorHandlingOptions??{continueOnFailure:{defaultValue:!1},retryOnFailure:{defaultValue:!1}},e.outputSchema,e.audience,e.aiMetadata),"createAction");var Z=l({displayName:a(),description:y(a())}),M=o((e,t)=>l({type:z(t),required:H(),defaultValue:y(ot())}),"TPropertyValue");var ae=l({...Z.shape,...M(a(),"SHORT_TEXT").shape}),ve=l({...Z.shape,...M(a(),"LONG_TEXT").shape});var qo=l({label:a(),value:R()}),jt=l({disabled:y(H()),placeholder:y(a()),options:D(qo)});var se=l({...Z.shape,options:jt,...M(R(),"STATIC_DROPDOWN").shape}),_e=l({...Z.shape,options:jt,...M(D(R()),"STATIC_MULTI_SELECT_DROPDOWN").shape});var Ar=l({...Z.shape,...M(R(),"DROPDOWN").shape,refreshers:D(a())}),st=l({...Z.shape,...M(D(R()),"MULTI_SELECT_DROPDOWN").shape,refreshers:D(a())});var xe=l({...Z.shape,...M(H(),"CHECKBOX").shape});var Pe=l({...Z.shape,...M(re(),"NUMBER").shape});var ut=l({...Z.shape,streaming:y(H()),...M(R(),"FILE").shape});var ct=l({...Z.shape,...M(a(),"DATE_TIME").shape});var Go=N(a(),U([ae,ve,se,st,_e,xe,Pe,ut,ct])),pt=l({...Z.shape,properties:Go,...M(D(R()),"ARRAY").shape});var lt=l({...Z.shape,...M(U([N(a(),R())]),"JSON").shape});var Wo=U([ae,se,lt,pt,_e]),Uc=N(a(),Wo),$r=l({refreshers:D(a()),...Z.shape,...M(R(),"DYNAMIC").shape});var Bt=l({...Z.shape,...M(Vo(),"MARKDOWN").shape});var dt=(r=>(r.ARCHIVE="ARCHIVE",r.REGISTRY="REGISTRY",r))(dt||{}),Be=(r=>(r.CUSTOM="CUSTOM",r.OFFICIAL="OFFICIAL",r))(Be||{}),mt=(_=>(_.ARTIFICIAL_INTELLIGENCE="ARTIFICIAL_INTELLIGENCE",_.COMMUNICATION="COMMUNICATION",_.COMMERCE="COMMERCE",_.CORE="CORE",_.UNIVERSAL_AI="UNIVERSAL_AI",_.FLOW_CONTROL="FLOW_CONTROL",_.BUSINESS_INTELLIGENCE="BUSINESS_INTELLIGENCE",_.ACCOUNTING="ACCOUNTING",_.PRODUCTIVITY="PRODUCTIVITY",_.CONTENT_AND_FILES="CONTENT_AND_FILES",_.DEVELOPER_TOOLS="DEVELOPER_TOOLS",_.CUSTOMER_SUPPORT="CUSTOMER_SUPPORT",_.FORMS_AND_SURVEYS="FORMS_AND_SURVEYS",_.HUMAN_RESOURCES="HUMAN_RESOURCES",_.PAYMENT_PROCESSING="PAYMENT_PROCESSING",_.MARKETING="MARKETING",_.SALES_AND_CRM="SALES_AND_CRM",_))(mt||{});var ft=(r=>(r.AUTHORIZATION_CODE="authorization_code",r.CLIENT_CREDENTIALS="client_credentials",r))(ft||{}),zr="both_client_credentials_and_authorization_code";var ee=(i=>(i.POLLING="POLLING",i.WEBHOOK="WEBHOOK",i.APP_WEBHOOK="APP_WEBHOOK",i.MANUAL="MANUAL",i))(ee||{}),gt=(u=>(u.NONE="NONE",u.HEADER_PRESENT="HEADER_PRESENT",u.QUERY_PRESENT="QUERY_PRESENT",u.BODY_PARAM_PRESENT="BODY_PARAM_PRESENT",u.HEAD_REQUEST="HEAD_REQUEST",u))(gt||{}),Mc=l({strategy:L(gt),paramName:y(a())}),yt=(r=>(r.SIMULATION="SIMULATION",r.TEST_FUNCTION="TEST_FUNCTION",r))(yt||{});var Ft=(r=>(r.WEBSOCKET="WEBSOCKET",r.NONE="NONE",r))(Ft||{}),Ko=l({status:y(re()),body:y(R()),headers:y(N(a(),a()))}),Jo=l({type:z("DELAY"),resumeDateTime:a(),requestIdToReply:y(a()),handlerId:y(a()),streamStepProgress:y(L(Ft))}),Xo=l({type:z("WEBHOOK"),requestId:a(),requestIdToReply:y(a()),response:Ko,handlerId:y(a()),streamStepProgress:y(L(Ft))}),Lc=U([Jo,Xo]);var jc=l({body:R(),rawBody:y(R()),headers:N(a(),a()),queryParams:N(a(),a())});function ue(e){return e==null}o(ue,"isNil");function ht(e){return e==null?!0:typeof e=="string"||Array.isArray(e)?e.length===0:typeof e=="object"?Object.keys(e).length===0:!1}o(ht,"isEmpty");function Vt(e,t){if(e==null)throw new Error(`${t} is null or undefined`)}o(Vt,"assertNotNullOrUndefined");var wr=Me(require("crypto"),1);var Bc=128,Re,Fe,Fc=o(e=>{!Re||Re.length<e?(Re=Buffer.allocUnsafe(e*Bc),wr.default.randomFillSync(Re),Fe=0):Fe+e>Re.length&&(wr.default.randomFillSync(Re),Fe=0),Fe+=e},"fillPool"),Vc=o(e=>(Fc(e|=0),Re.subarray(Fe-e,Fe)),"random"),Zc=o((e,t,r)=>{let n=(2<<31-Math.clz32(e.length-1|1))-1,i=Math.ceil(1.6*n*t/e.length);return(u=t)=>{let c="";for(;;){let p=r(i),h=i;for(;h--;)if(c+=e[p[h]&n]||"",c.length===u)return c}}},"customRandom"),Qo=o((e,t=21)=>Zc(e,t,Vc),"customAlphabet");var Hc="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",ei=21,xT=a().check(Ae(new RegExp(`^[0-9a-zA-Z]{${ei}}$`))),qc=Qo(Hc,ei);var Oe=we(ze(e=>e instanceof Date?e.toISOString():e),a()),ce={id:a(),created:Oe,updated:Oe},G=o(e=>y(it(e)),"Nullable");function Or(e){return y(it(L(e)))}o(Or,"NullableEnum");var TT=we(ze(e=>e==="true"||e===!0?!0:e==="false"||e===!1?!1:void 0),y(H())),Zt=o(e=>we(ze(t=>Array.isArray(t)?t:t!==void 0?[t]:void 0),y(D(e))),"OptionalArrayFromQuery");var ST=N(a(),R());var vt=(P=>(P.OPENAI="openai",P.OPENROUTER="openrouter",P.ANTHROPIC="anthropic",P.AZURE="azure",P.GOOGLE="google",P.ACTIVEPIECES="activepieces",P.CLOUDFLARE_GATEWAY="cloudflare-gateway",P.CUSTOM="custom",P.BEDROCK="bedrock",P.MISTRAL="mistral",P))(vt||{});var MT=a().check(Ae(/^#[0-9A-Fa-f]{6}$/));var jT=l({filename:a(),data:R(),type:z("file"),mimetype:y(a())});var Gc=Me(ri());var GT=l({...ce,name:a(),permissions:D(a()),platformId:G(a()),type:a(),userCount:y(re())});var ni=(n=>(n.AGENT_DECIDE="agent-decide",n.CHOOSE_YOURSELF="choose-yourself",n.LEAVE_EMPTY="leave-empty",n))(ni||{}),kr=(r=>(r.FILE="FILE",r.TABLE="TABLE",r))(kr||{}),Rr=(n=>(n.SSE="sse",n.STREAMABLE_HTTP="streamable-http",n.SIMPLE_HTTP="http",n))(Rr||{});var Nr=(n=>(n.TEXT="text",n.NUMBER="number",n.BOOLEAN="boolean",n))(Nr||{});var Cr=(r=>(r.IN_PROGRESS="in-progress",r.COMPLETED="completed",r))(Cr||{});var Wc=l({mode:L(ni),value:R()}),Kc=l({auth:y(a()),fields:N(a(),Wc)}),Jc=l({pieceName:a(),pieceVersion:a(),actionName:a(),predefinedInput:y(Kc)}),Xc=l({type:z("PIECE"),toolName:a().check(le(1)),pieceMetadata:Jc}),Yc=l({type:z("none")}),Qc=l({type:z("access_token"),accessToken:a()}),ep=l({type:z("api_key"),apiKey:a(),apiKeyHeader:a()}),tp=l({type:z("headers"),headers:N(a(),a())}),rp=$e("type",[Yc,Qc,ep,tp]),oi=l({type:z("FLOW"),toolName:a().check(le(1)),externalFlowId:a(),flowDisplayName:y(a())}),ii=l({type:z("MCP"),toolName:a().check(le(1)),serverUrl:jo(),protocol:L(Rr),auth:rp}),ai=l({type:z("KNOWLEDGE_BASE"),toolName:a().check(le(1)),sourceType:L(kr),sourceId:a(),sourceName:a()}),np=$e("type",[Xc,oi,ii,ai]),op=l({displayName:a(),description:y(a()),type:L(Nr)}),si=l({type:z("MARKDOWN"),markdown:a()}),Ve={type:z("TOOL_CALL"),input:G(N(a(),R())),output:y(R()),toolName:a(),status:L(Cr),toolCallId:a(),startTime:a(),endTime:y(a())},II=l(Ve),ui=$e("toolCallType",[l({...Ve,toolCallType:z("PIECE"),pieceName:a(),pieceVersion:a(),actionName:a()}),l({...Ve,toolCallType:z("FLOW"),displayName:a(),externalFlowId:a()}),l({...Ve,toolCallType:z("MCP"),displayName:a(),serverUrl:a()}),l({...Ve,toolCallType:z("KNOWLEDGE_BASE"),displayName:a(),sourceType:a()}),l({...Ve,toolCallType:z("UNKNOWN"),displayName:a()})]),ip=U([si,ui]);var Dr=(r=>(r.IMAGE="image",r.TEXT="text",r))(Dr||{}),be=l({apiKey:a()}),ap=be,sp=l({apiKey:a(),apiKeyHash:a()}),up=be,cp=be,pp=be,lp=be,dp=be,mp=be,fp=be,mi=l({accessKeyId:a().check(le(1)),secretAccessKey:a().check(le(1))}),gp=l({}),yp=l({}),hp=l({}),vp=l({}),_p=l({}),xp=l({}),fi=l({modelId:a(),modelName:a(),modelType:L(Dr)}),gi=l({apiKeyHeader:a(),baseUrl:a(),models:D(fi),defaultHeaders:y(N(a(),a()))}),yi=l({accountId:a(),gatewayId:a(),models:D(fi),vertexProject:y(a()),vertexRegion:y(a())}),hi=l({resourceName:a(),apiVersion:we(ze(e=>typeof e=="string"&&e.trim().length===0?void 0:e),y(a()))}),vi=l({region:a().check(le(1))}),Pp=U([ap,pp,lp,dp,mp,cp,up,sp,mi,fp]),_i=U([gi,yi,hi,vi,gp,hp,vp,_p,yp,xp]),bp=l({id:a(),name:a(),type:L(Dr)}),Tp=l({id:a(),name:a(),provider:L(vt),config:_i,enabledForChat:H()}),Ip=l({provider:L(vt),config:_i,auth:Pp,platformId:a()});var $I={openai:"openai",anthropic:"anthropic","google-ai-studio":"google","google-vertex-ai":"google"},ci=["gpt-5.5","gpt-5.4-mini","gpt-5.4-nano","gpt-4.1","gpt-4.1-mini"],Ep=["claude-sonnet-4-6","claude-opus-4-7","claude-haiku-4-5"],Sp=["claude-sonnet-4.6","claude-opus-4.7","claude-haiku-4.5"],pi=["gemini-2.5-pro","gemini-2.5-flash","gemini-3.1-pro-preview","gemini-3-flash-preview"],Ap=["grok-4.20","grok-4.1-fast"],$p={openai:ci,anthropic:Ep,google:pi,activepieces:[...Sp.map(e=>`anthropic/${e}`),...ci.map(e=>`openai/${e}`),...pi.map(e=>`google/${e}`),...Ap.map(e=>`x-ai/${e}`)]};var li=128e3,zp={openai:128e3,anthropic:2e5,google:1048576,bedrock:2e5,azure:128e3,openrouter:128e3,activepieces:2e5,mistral:128e3};function wp({provider:e}){return e?zp[e]??li:li}o(wp,"getMaxContextTokens");var di={openai:"text-embedding-3-small",google:"text-embedding-004",azure:"text-embedding-3-small",activepieces:"text-embedding-3-small",openrouter:"openai/text-embedding-3-small"},Op={anthropic:"native",google:"native",openrouter:"plugin",activepieces:"plugin"},kp=new Set(["anthropic","mistral"]);function fe(e){return{chatModels:$p[e],maxContextTokens:wp({provider:e}),defaultEmbeddingModel:di[e],supportsEmbedding:di[e]!==void 0,supportsImageGeneration:!kp.has(e),webSearch:Op[e]}}o(fe,"buildProviderCapabilities");var Rp={openai:fe("openai"),anthropic:fe("anthropic"),openrouter:fe("openrouter"),azure:fe("azure"),google:fe("google"),"cloudflare-gateway":fe("cloudflare-gateway"),custom:fe("custom"),bedrock:fe("bedrock"),mistral:fe("mistral"),activepieces:fe("activepieces")};var Np=l({base64Url:a(),fileName:a(),extension:y(a())}),Cp=l({mimeType:a(),url:a(),fileName:y(a())}),Ur=U([Np,Cp]);var Dp=U([l({type:z("file"),value:Ur}),l({type:z("markdown"),value:a(),files:y(D(Ur))})]),Up=l({sessionId:a(),message:a(),files:y(D(a()))});var Pi=(r=>(r.ON_NEW_RECORD="ON_NEW_RECORD",r.ON_UPDATE_RECORD="ON_UPDATE_RECORD",r))(Pi||{}),bi=(r=>(r.ENABLED="ENABLED",r.DISABLED="DISABLED",r))(bi||{}),Mr=(n=>(n.RECORD_CREATED="RECORD_CREATED",n.RECORD_UPDATED="RECORD_UPDATED",n.RECORD_DELETED="RECORD_DELETED",n))(Mr||{});var Mp=U([l({...ce,name:a(),externalId:a(),type:z("STATIC_DROPDOWN"),tableId:a(),projectId:a(),data:l({options:D(l({value:a()}))})}),l({...ce,name:a(),externalId:a(),type:U([z("TEXT"),z("NUMBER"),z("DATE")]),tableId:a(),projectId:a()})]),Lp=l({...ce,name:a(),folderId:G(a()),projectId:a(),externalId:a(),status:Or(bi),trigger:Or(Pi)}),jp=l({...ce,tableId:a(),projectId:a(),cells:N(a(),l({updated:a(),created:a(),value:R(),fieldName:a()}))}),Bp=l({events:D(L(Mr)),webhookUrl:a(),flowId:a()}),Fp=l({fields:D(l({id:a(),name:a()})),rows:D(N(a(),a())),name:a()}),Vp=l({projectId:a(),limit:y(at.number()),cursor:y(a()),name:y(a()),externalIds:Zt(a()),folderId:y(a()),folderIds:Zt(a())}),Zp=l({records:D(D(l({fieldId:a(),value:Ii()}))),tableId:a()}),Hp=l({cells:y(D(l({fieldId:a(),value:Ii()}))),tableId:a(),agentUpdate:y(H())}),Ti=$e("operator",[Ne("eq"),Ne("neq"),Ne("gt"),Ne("gte"),Ne("lt"),Ne("lte"),Ne("co"),xi("exists"),xi("not_exists")]),qp=l({tableId:a(),limit:y(at.number()),cursor:y(a()),filters:Zt(Ti)});function Ii(){return we(ze(e=>e==null?e:String(e)),it(a()))}o(Ii,"coerceToString");function Ne(e){return l({fieldId:a(),operator:z(e),value:a()})}o(Ne,"valueFilter");function xi(e){return l({fieldId:a(),operator:z(e)})}o(xi,"existenceFilter");var Gp=l({status:y(re()),body:y(R()),headers:y(N(a(),a()))}),Wp=l({...ce,deleted:G(Oe),ownerId:a(),displayName:a(),platformId:a(),externalId:G(a())});var Ei=l({name:a(),description:y(a()),type:a(),required:H()}),Kp=l({pieceName:a(),triggerName:a(),input:l({toolName:a(),toolDescription:a(),inputSchema:D(Ei),returnsResponse:H()})});var Si="^[0-9]+\\.[0-9]+\\.[0-9]+$",GI=new RegExp(Si),Xp="^([~^])?[0-9]+\\.[0-9]+\\.[0-9]+$",WI=a().check(Ae(new RegExp(Si))),KI=a().check(Ae(new RegExp(Xp))),Yp=l({packageType:z("ARCHIVE"),pieceType:L(Be),pieceName:a(),pieceVersion:a(),archiveId:a(),platformId:a()}),Ai=l({packageType:z("REGISTRY"),pieceType:z("OFFICIAL"),pieceName:a(),pieceVersion:a()}),$i=l({packageType:z("REGISTRY"),pieceType:z("CUSTOM"),pieceName:a(),pieceVersion:a(),platformId:a()}),JI=U([Ai,$i]),XI=U([Yp,Ai,$i]);var Qp=$e("type",[l({type:z("CRON_EXPRESSION"),cronExpression:a(),timezone:a()}),l({type:z("INTERVAL"),intervalMs:Bo().check(Ct(6e4))})]),YI=l({...ce,type:L(ee),projectId:a(),flowId:a(),triggerName:a(),schedule:G(Qp),flowVersionId:a(),pieceName:a(),pieceVersion:a(),deleted:G(a()),simulate:H()}),zi=(m=>(m.UNKNOWN="UNKNOWN",m.FLOW_RUN_LOG="FLOW_RUN_LOG",m.FLOW_RUN_LOG_SLICE="FLOW_RUN_LOG_SLICE",m.PACKAGE_ARCHIVE="PACKAGE_ARCHIVE",m.FLOW_STEP_FILE="FLOW_STEP_FILE",m.SAMPLE_DATA="SAMPLE_DATA",m.TRIGGER_PAYLOAD="TRIGGER_PAYLOAD",m.SAMPLE_DATA_INPUT="SAMPLE_DATA_INPUT",m.TRIGGER_EVENT_FILE="TRIGGER_EVENT_FILE",m.PROJECT_RELEASE="PROJECT_RELEASE",m.FLOW_VERSION_BACKUP="FLOW_VERSION_BACKUP",m.PLATFORM_ASSET="PLATFORM_ASSET",m.USER_PROFILE_PICTURE="USER_PROFILE_PICTURE",m.WEBHOOK_PAYLOAD="WEBHOOK_PAYLOAD",m.KNOWLEDGE_BASE="KNOWLEDGE_BASE",m.FLOW_BUNDLE="FLOW_BUNDLE",m))(zi||{}),wi=(r=>(r.NONE="NONE",r.ZSTD="ZSTD",r))(wi||{}),Oi=(r=>(r.S3="S3",r.DB="DB",r))(Oi||{}),QI=l({...ce,projectId:G(a()),platformId:G(a()),type:L(zi),compression:L(wi),data:y(R()),location:L(Oi),size:G(re()),fileName:G(a()),s3Key:G(a()),metadata:G(N(a(),a()))}),ki=(n=>(n.ADMIN="ADMIN",n.MEMBER="MEMBER",n.OPERATOR="OPERATOR",n))(ki||{}),Ri=(r=>(r.ACTIVE="ACTIVE",r.INACTIVE="INACTIVE",r))(Ri||{}),eE=l({id:a(),email:a(),firstName:a(),status:L(Ri),externalId:G(a()),platformId:G(a()),platformRole:L(ki),lastName:a(),created:Oe,updated:Oe,lastActiveDate:G(Oe),imageUrl:G(a())});var Lr=l({...Z.shape,...M(N(a(),R()),"OBJECT").shape});var Ui=l({...Z.shape,...M(a(),"COLOR").shape});var jr=U([ae,ve,Bt,xe,se,_e,Ar,st,$r,Pe,pt,Lr,lt,ct,ut,Ui]),f={ShortText(e){return{...e,valueSchema:void 0,type:"SHORT_TEXT"}},Checkbox(e){return{...e,valueSchema:void 0,type:"CHECKBOX"}},LongText(e){return{...e,valueSchema:void 0,type:"LONG_TEXT"}},MarkDown(e){return{displayName:"Markdown",required:!1,description:e.value,type:"MARKDOWN",valueSchema:void 0,variant:e.variant??"INFO"}},Number(e){return{...e,valueSchema:void 0,type:"NUMBER"}},Json(e){return{...e,valueSchema:void 0,type:"JSON"}},Array(e){return{...e,valueSchema:void 0,type:"ARRAY"}},Object(e){return{...e,valueSchema:void 0,type:"OBJECT"}},Dropdown(e){return{...e,valueSchema:void 0,type:"DROPDOWN"}},StaticDropdown(e){return{...e,valueSchema:void 0,type:"STATIC_DROPDOWN"}},MultiSelectDropdown(e){return{...e,valueSchema:void 0,type:"MULTI_SELECT_DROPDOWN"}},DynamicProperties(e){return{...e,valueSchema:void 0,type:"DYNAMIC"}},StaticMultiSelectDropdown(e){return{...e,valueSchema:void 0,type:"STATIC_MULTI_SELECT_DROPDOWN"}},DateTime(e){return{...e,valueSchema:void 0,type:"DATE_TIME"}},File(e){return{...e,valueSchema:void 0,type:"FILE"}},Custom(e){let t=e.code.toString();return{...e,code:t,valueSchema:void 0,type:"CUSTOM"}},Color(e){return{...e,valueSchema:void 0,type:"COLOR"}}};var ge=l({displayName:a(),description:y(a())});var Mi=l({username:a(),password:a()}),Br=l({...ge.shape,username:l({displayName:a(),description:y(a())}),password:l({displayName:a(),description:y(a())}),...M(Mi,"BASIC_AUTH").shape});var nl=N(a(),U([ae,ve,Pe,xe,se])),Fr=l({...ge.shape,props:nl,...M(R(),"CUSTOM_AUTH").shape});var Ce=l({...ge.shape,...M(l({auth:a()}),"SECRET_TEXT").shape});var ol=N(a(),U([ae,ve,Ce,Pe,xe,se,_e,Bt])),Li=l({...ge.shape,props:ol,...M(R(),"OIDC").shape});var Vr=(r=>(r.HEADER="HEADER",r.BODY="BODY",r))(Vr||{}),ji=U([ae,Ce,se]),Bi=N(a(),ji),il=l({props:y(N(a(),ji)),authUrl:a(),tokenUrl:a(),scope:D(a()),prompt:y(U([z("none"),z("consent"),z("login"),z("omit")])),pkce:y(H()),pkceMethod:y(U([z("plain"),z("S256")])),authorizationMethod:y(L(Vr)),grantType:y(U([L(ft),z(zr)])),extra:y(N(a(),a()))}),Fi=l({access_token:a(),props:y(Bi),data:N(a(),ot())}),Zr=l({...ge.shape,...il.shape,...M(Fi,"OAUTH2").shape});var Ze=U([Br,Fr,Li,Zr,Ce]),_t="Connection",Hr={SecretText(e){return{...e,valueSchema:void 0,type:"SECRET_TEXT"}},OAuth2(e){return{...e,valueSchema:void 0,type:"OAUTH2",displayName:e.displayName||_t}},BasicAuth(e){return{...e,valueSchema:void 0,type:"BASIC_AUTH",displayName:e.displayName||_t,required:!0}},CustomAuth(e){return{...e,valueSchema:void 0,type:"CUSTOM_AUTH",displayName:e.displayName||_t}},OIDC(e){return{...e,valueSchema:void 0,type:"OIDC",displayName:e.displayName||_t}},None(){}};var kS={OAUTH2:"OAUTH2",CLOUD_OAUTH2:"OAUTH2",PLATFORM_OAUTH2:"OAUTH2",BASIC_AUTH:"BASIC_AUTH",CUSTOM_AUTH:"CUSTOM_AUTH",OIDC:"OIDC",SECRET_TEXT:"SECRET_TEXT",NO_AUTH:void 0};var al=l({...Z.shape,...M(R(),"CUSTOM").shape,code:a()});var sl=U([jr,Ze]),qr=N(a(),sl),YS=N(a(),jr);var Vi=U([l({strategy:z("CRON"),cronExpression:a()}),l({strategy:z("NONE")})]),He=class{constructor(t,r,n,i,u,c,p,h,v,P,$,x,s,d,g,m,_,b,B){this.name=t;this.displayName=r;this.description=n;this.requireAuth=i;this.props=u;this.type=c;this.handshakeConfiguration=p;this.onHandshake=h;this.renewConfiguration=v;this.onRenew=P;this.onEnable=$;this.onDisable=x;this.onStart=s;this.run=d;this.test=g;this.sampleData=m;this.testStrategy=_;this.outputSchema=b;this.aiMetadata=B}static{o(this,"ITrigger")}},J=o(e=>{switch(e.type){case"WEBHOOK":return new He(e.name,e.displayName,e.description,e.requireAuth??!0,e.props,e.type,e.handshakeConfiguration??{strategy:"NONE"},e.onHandshake??(async()=>({status:200})),e.renewConfiguration??{strategy:"NONE"},e.onRenew??(async()=>Promise.resolve()),e.onEnable,e.onDisable,e.onStart??(async()=>Promise.resolve()),e.run,e.test??(()=>Promise.resolve([e.sampleData])),e.sampleData,e.test?"TEST_FUNCTION":"SIMULATION",e.outputSchema,e.aiMetadata);case"POLLING":return new He(e.name,e.displayName,e.description,e.requireAuth??!0,e.props,e.type,{strategy:"NONE"},async()=>({status:200}),{strategy:"NONE"},(async()=>Promise.resolve()),e.onEnable,e.onDisable,e.onStart??(async()=>Promise.resolve()),e.run,e.test??(()=>Promise.resolve([e.sampleData])),e.sampleData,"TEST_FUNCTION",e.outputSchema,e.aiMetadata);case"MANUAL":return new He(e.name,e.displayName,e.description,e.requireAuth??!0,e.props,e.type,{strategy:"NONE"},async()=>({status:200}),{strategy:"NONE"},(async()=>Promise.resolve()),e.onEnable,e.onDisable,e.onStart??(async()=>Promise.resolve()),e.run,e.test??(()=>Promise.resolve([e.sampleData])),e.sampleData,"TEST_FUNCTION",e.outputSchema,e.aiMetadata);case"APP_WEBHOOK":return new He(e.name,e.displayName,e.description,e.requireAuth??!0,e.props,e.type,{strategy:"NONE"},async()=>({status:200}),{strategy:"NONE"},(async()=>Promise.resolve()),e.onEnable,e.onDisable,e.onStart??(async()=>Promise.resolve()),e.run,e.test??(()=>Promise.resolve([e.sampleData])),e.sampleData,ue(e.sampleData)&&ue(e.test)?"SIMULATION":"TEST_FUNCTION",e.outputSchema,e.aiMetadata)}},"createTrigger");var Zi="2",qt="0.82.0";var Gr=class{constructor(t,r,n,i,u,c,p,h,v=qt,P,$="",x){this.displayName=t;this.logoUrl=r;this.authors=n;this.events=i;this.categories=p;this.auth=h;this.minimumSupportedRelease=v;this.maximumSupportedRelease=P;this.description=$;this.deprecated=x;this._actions={};this._triggers={};this.getContextInfo=o(()=>({version:Zi}),"getContextInfo");(!ul(v)||cl(v,qt))&&(this.minimumSupportedRelease=qt),u.forEach(s=>this._actions[s.name]=s),c.forEach(s=>this._triggers[s.name]=s)}static{o(this,"Piece")}metadata(){return{displayName:this.displayName,logoUrl:this.logoUrl,actions:this._actions,triggers:this._triggers,categories:this.categories,description:this.description,authors:this.authors,auth:this.auth,minimumSupportedRelease:this.minimumSupportedRelease,maximumSupportedRelease:this.maximumSupportedRelease,deprecated:this.deprecated,contextInfo:this.getContextInfo?.()}}getAction(t){return this._actions[t]}getTrigger(t){return this._triggers[t]}actions(){return this._actions}triggers(){return this._triggers}},Hi=o(e=>{if(e.auth&&Array.isArray(e.auth)&&!e.auth.every((r,n,i)=>n===i.findIndex(u=>u.type===r.type)))throw new Error("Auth properties must be unique by type");return new Gr(e.displayName,e.logoUrl,e.authors??[],e.events,e.actions,e.triggers,e.categories??[],e.auth,e.minimumSupportedRelease,e.maximumSupportedRelease,e.description,e.deprecated)},"createPiece");function ul(e){return/^\d+\.\d+\.\d+$/.test(e)}o(ul,"isValidSimpleSemver");function cl(e,t){let[r,n,i]=e.split(".").map(Number),[u,c,p]=t.split(".").map(Number);return r!==u?r<u:n!==c?n<c:i<p}o(cl,"isSemverLessThan");var pl=y(N(a(),N(a(),a()))),qi=l({id:y(a()),name:a(),displayName:a(),logoUrl:a(),description:a(),authors:D(a()),platformId:y(a()),directoryPath:y(a()),auth:y(U([Ze,D(Ze)])),version:a(),categories:y(D(L(mt))),minimumSupportedRelease:y(a()),maximumSupportedRelease:y(a()),deprecated:y(H()),i18n:pl}),ll=L(["human","ai","both"]),Gi=l({description:y(a()),idempotent:y(H())}),Wi=l({name:a(),displayName:a(),description:a(),props:qr,requireAuth:H(),errorHandlingOptions:y(Sr),outputSchema:y(Lt()),audience:y(ll),aiMetadata:y(Gi)}),Ki=l({name:a(),displayName:a(),description:a(),props:qr,errorHandlingOptions:y(Sr),type:L(ee),sampleData:R(),handshakeConfiguration:y(Lt()),renewConfiguration:y(Vi),testStrategy:L(yt),outputSchema:y(Lt()),aiMetadata:y(Gi)}),dl=l({...qi.shape,actions:N(a(),Wi),triggers:N(a(),Ki)}),ml=l({...qi.shape,actions:re(),triggers:re(),suggestedActions:y(D(Wi)),suggestedTriggers:y(D(Ki))}),Ji=l({projectUsage:re(),pieceType:L(Be),packageType:L(dt),platformId:y(a()),archiveId:y(a())}),YA=l({...dl.shape,...Ji.shape}),QA=l({...ml.shape,...Ji.shape}),e$=l({name:a(),version:a()});var fl=Me(require("path")),gl=Me(require("fs/promises"));var ea=require("node:stream");var Gt=class{constructor(t,r){this.baseUrl=t;this.authenticationConverter=r}static{o(this,"BaseHttpClient")}getUrl(t){let r=new URL(`${this.baseUrl}${t.url}`),n=`${r.origin}${r.pathname}`,i=new URLSearchParams;return r.searchParams.forEach((u,c)=>{i.append(c,u)}),{urlWithoutQueryParams:n,queryParams:i}}getHeaders(t){let r={Accept:"application/json"};return t.authentication&&this.populateAuthentication(t.authentication,r),t.body&&(t.headers?.["Content-Type"]==="text/csv"?r["Content-Type"]="text/csv":r["Content-Type"]="application/json"),t.headers&&(r={...r,...t.headers}),r}populateAuthentication(t,r){this.authenticationConverter.convert(t,r)}};var Wt=class{static{o(this,"DelegatingAuthenticationConverter")}constructor(t=new Wr,r=new Kr){this.converters={BEARER_TOKEN:t,BASIC:r}}convert(t,r){return this.converters[t.type].convert(t,r)}},Wr=class{static{o(this,"BearerTokenAuthenticationConverter")}convert(t,r){return r.Authorization=`Bearer ${t.token}`,r}},Kr=class{static{o(this,"BasicTokenAuthenticationConverter")}convert(t,r){let n=`${t.username}:${t.password}`,i=Buffer.from(n).toString("base64");return r.Authorization=`Basic ${i}`,r}};var xt=class extends Error{constructor(r,n){let i=n.status||500,u=Buffer.isBuffer(n.responseBody)?n.responseBody.toString():n.responseBody;super(JSON.stringify({response:{status:i,body:u},request:{body:r}}));this.requestBody=r;this.status=i,this.responseBody=u}static{o(this,"HttpError")}errorMessage(){return{response:{status:this.status,body:this.responseBody},request:{body:this.requestBody}}}get response(){return{status:this.status,body:this.responseBody}}get request(){return{body:this.requestBody}}};function Xi({error:e,requestBody:t}){return e instanceof xt?e.errorMessage():{response:{status:0,body:e instanceof Error?e.message:String(e)},request:{body:t}}}o(Xi,"toFailsafeOutput");var Kt=(c=>(c.GET="GET",c.POST="POST",c.PATCH="PATCH",c.PUT="PUT",c.DELETE="DELETE",c.HEAD="HEAD",c))(Kt||{});var Jt=class extends Gt{static{o(this,"FetchHttpClient")}constructor(t="",r=new Wt){super(t,r)}async sendRequest(t,r){process.env.NODE_TLS_REJECT_UNAUTHORIZED="0";let{urlWithoutQueryParams:n,queryParams:i}=this.getUrl(t),u=this.getHeaders(t),c=t.queryParams??{};for(let[B,ie]of Object.entries(c))i.append(B,ie);let p=i.toString(),h=p?`${n}?${p}`:n,v=t.responseType??"json",P=t.followRedirects??!0,$=t.retries??0,{body:x,extraHeaders:s,isStream:d}=yl(t.method)?hl(t.body,u):{body:void 0,extraHeaders:{},isStream:!1},g=_l({...u,...s}),m=await vl(async()=>{let B=new AbortController,ie=t.timeout&&t.timeout>0?setTimeout(()=>B.abort(),t.timeout):void 0;try{let pe={method:t.method.toString(),headers:g,body:x,redirect:P?"follow":"manual",signal:B.signal};return d&&(pe.duplex="half"),r?.dispatcher!==void 0&&(pe.dispatcher=r.dispatcher),await fetch(h,pe)}finally{ie!==void 0&&clearTimeout(ie)}},$),_=P?300:400;if(m.status<200||m.status>=_){let B=await Yi(m,v),ie=new xt(t.body,{status:m.status,responseBody:B});throw console.error("[HttpClient#(sanitized error message)] Request failed:",ie),ie}let b=await Yi(m,v);return{status:m.status,headers:xl(m.headers),body:b}}};function yl(e){return e!=="GET"&&e!=="HEAD"}o(yl,"acceptsRequestBody");function hl(e,t){if(bl(e))return{body:void 0,extraHeaders:{},isStream:!1};if(Pl(e)){let n=new ea.PassThrough;return e.on("error",i=>n.destroy(i)),e.pipe(n),{body:n,extraHeaders:e.getHeaders(),isStream:!0}}return typeof e=="string"||Buffer.isBuffer(e)||e instanceof URLSearchParams||e instanceof ArrayBuffer||typeof FormData<"u"&&e instanceof FormData||typeof Blob<"u"&&e instanceof Blob?{body:e,extraHeaders:{},isStream:!1}:(t["Content-Type"]??t["content-type"]??"").includes("application/x-www-form-urlencoded")?{body:new URLSearchParams(e).toString(),extraHeaders:{},isStream:!1}:{body:JSON.stringify(e),extraHeaders:{},isStream:!1}}o(hl,"serializeBody");async function Yi(e,t){switch(t){case"arraybuffer":return Buffer.from(await e.arrayBuffer());case"blob":return await e.blob();case"text":return await e.text();default:{let r=await e.text();if(r.length===0)return;try{return JSON.parse(r)}catch{return r}}}}o(Yi,"parseResponseBody");async function vl(e,t){let r;for(let n=0;n<=t;n++)try{let i=await e();if(i.status>=500&&n<t){await Qi(n);continue}return i}catch(i){if(r=i,n<t){await Qi(n);continue}throw i}throw r}o(vl,"sendWithRetries");function Qi(e){let t=Math.min(1e3*2**e,3e4);return new Promise(r=>setTimeout(r,t))}o(Qi,"backoff");function _l(e){let t={};for(let[r,n]of Object.entries(e))n!==void 0&&(t[r.toLowerCase()]=Array.isArray(n)?n.join(", "):n);return t}o(_l,"normalizeHeaders");function xl(e){let t={};return e.forEach((r,n)=>{t[n]=r}),t}o(xl,"toHttpHeaders");function Pl(e){return typeof e=="object"&&e!==null&&typeof e.getHeaders=="function"&&typeof e.pipe=="function"&&typeof e.on=="function"}o(Pl,"isNodeFormData");function bl(e){return e==null}o(bl,"isNil");var Xt=new Jt;var cm=Me(require("fs")),au=Me(iu());var pm={"application/json":"json","application/pdf":"pdf","application/xml":"xml","text/xml":"xml","application/zip":"zip","application/gzip":"gz","application/x-tar":"tar","application/octet-stream":"bin","application/msword":"doc","application/vnd.openxmlformats-officedocument.wordprocessingml.document":"docx","application/vnd.ms-excel":"xls","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":"xlsx","application/vnd.ms-powerpoint":"ppt","application/vnd.openxmlformats-officedocument.presentationml.presentation":"pptx","application/rtf":"rtf","application/javascript":"js","application/x-www-form-urlencoded":"bin","text/plain":"txt","text/html":"html","text/css":"css","text/csv":"csv","text/calendar":"ics","text/markdown":"md","image/png":"png","image/jpeg":"jpeg","image/jpg":"jpg","image/gif":"gif","image/webp":"webp","image/svg+xml":"svg","image/bmp":"bmp","image/tiff":"tiff","image/x-icon":"ico","image/vnd.microsoft.icon":"ico","image/heic":"heic","audio/mpeg":"mp3","audio/mp4":"m4a","audio/wav":"wav","audio/x-wav":"wav","audio/ogg":"ogg","audio/webm":"weba","video/mp4":"mp4","video/mpeg":"mpeg","video/webm":"webm","video/quicktime":"mov","video/x-msvideo":"avi","font/woff":"woff","font/woff2":"woff2","font/ttf":"ttf","font/otf":"otf"};function lm(e){let t=e.split(";")[0].trim().toLowerCase();return pm[t]??""}o(lm,"contentTypeToExtension");var dm=o(({baseUrl:e,relativePath:t})=>{let r=e.endsWith("/")?e:`${e}/`,n=t.startsWith("/")?t.slice(1):t;return`${r}${n}`},"joinBaseUrlWithRelativePath"),mm=o((e,t)=>{let r="https://api.example.com";try{let n=t?e(t):void 0;return(n?.endsWith("/")?n.slice(0,-1):n)??r}catch{return r}},"getBaseUrlForDescription");function su({auth:e,baseUrl:t,authMapping:r,description:n,displayName:i,name:u,props:c,extraProps:p,authLocation:h="headers"}){return V({audience:"human",name:u||"custom_api_call",displayName:i||"Custom API Call",description:n||"Make a custom API call to a specific endpoint",auth:e,requireAuth:!!e,props:{url:f.DynamicProperties({auth:e,displayName:"",required:!0,refreshers:[],props:o(async({auth:v})=>({url:f.ShortText({displayName:"URL",description:`You can either use the full URL or the relative path to the base URL
|
|
3
|
+
i.e ${mm(t,v)}/resource or /resource`,required:!0,defaultValue:v?t(v):"",...c?.url??{}})}),"props")}),method:f.StaticDropdown({displayName:"Method",required:!0,options:{options:Object.values(Kt).map(v=>({label:v,value:v}))},...c?.method??{}}),headers:f.Object({displayName:"Headers",description:"Authorization headers are injected automatically from your connection.",required:!0,...c?.headers??{}}),queryParams:f.Object({displayName:"Query Parameters",required:!0,...c?.queryParams??{}}),body_type:f.StaticDropdown({displayName:"Body Type",required:!1,defaultValue:"none",options:{disabled:!1,options:[{label:"None",value:"none"},{label:"JSON",value:"json"},{label:"Form Data",value:"form_data"},{label:"Raw",value:"raw"}]}}),body:f.DynamicProperties({auth:e,displayName:"Body",refreshers:["body_type"],required:!1,props:o(async({body_type:v})=>{if(!v)return{};let P=v,$={};switch(P){case"none":break;case"json":$.data=f.Json({displayName:"JSON Body",required:!0,...c?.body??{}});break;case"raw":$.data=f.LongText({displayName:"Raw Body",required:!0});break;case"form_data":$.data=f.Array({displayName:"Form Data",required:!0,properties:{fieldName:f.ShortText({displayName:"Field Name",required:!0}),fieldType:f.StaticDropdown({displayName:"Field Type",required:!0,options:{disabled:!1,options:[{label:"Text",value:"text"},{label:"File",value:"file"}]}}),textFieldValue:f.LongText({displayName:"Text Field Value",required:!1}),fileFieldValue:f.File({displayName:"File Field Value",required:!1})}});break}return $},"props")}),response_is_binary:f.Checkbox({displayName:"Response is Binary ?",description:"Enable for files like PDFs, images, etc.",required:!1,defaultValue:!1}),failsafe:f.Checkbox({displayName:"No Error on Failure",required:!1,...c?.failsafe??{}}),timeout:f.Number({displayName:"Timeout (in seconds)",required:!1,...c?.timeout??{}}),followRedirects:f.Checkbox({displayName:"Follow redirects",required:!1,defaultValue:!1}),...p},run:o(async v=>{let{method:P,url:$,headers:x,queryParams:s,body:d,body_type:g,failsafe:m,timeout:_,response_is_binary:b,followRedirects:B}=v.propsValue;Vt(P,"Method"),Vt($,"URL");let ie=ue(r)?{}:await r(v.auth,v.propsValue),pe=$.url,Xe=pe.startsWith("http://")||pe.startsWith("https://")?pe:dm({baseUrl:t(v.auth),relativePath:pe}),Te={method:P,url:Xe,headers:{...x??{},...h==="headers"||!ue(h)?ie:{}},queryParams:{...h==="queryParams"?ie:{},...s??{}},timeout:_?_*1e3:0,followRedirects:B};if(b&&(Te.responseType="arraybuffer"),d)if(g&&g!=="none"){let ye=d.data;if(g==="form_data"){let Cu=ye,It=new au.default;for(let{fieldName:$n,fieldType:zn,textFieldValue:wn,fileFieldValue:pr}of Cu)zn==="text"&&!ht(wn)?It.append($n,wn):zn==="file"&&!ht(pr)&&It.append($n,pr.data,{filename:pr?.filename});Te.body=It,Te.headers={...Te.headers,...It.getHeaders()}}else Te.body=ye}else g||(Te.body=d);try{let ye=await Xt.sendRequest(Te);return await fm(v.files,ye.body,ye.status,ye.headers,b)}catch(ye){if(m)return Xi({error:ye,requestBody:Te.body});throw ye}},"run")})}o(su,"createCustomApiCallAction");var fm=o(async(e,t,r,n,i)=>{let u;if(i&&gm(t)){let c=Array.isArray(n?.["content-type"])?n["content-type"][0]:n?.["content-type"],p=lm(c??"")||"txt",h;t instanceof ArrayBuffer?h=Buffer.from(new Uint8Array(t)):Buffer.isBuffer(t)?h=t:h=Buffer.from(t),u=await e.write({fileName:`output.${p}`,data:h})}else u=t;return{status:r,headers:n,body:u}},"handleBinaryResponse"),gm=o(e=>e instanceof ArrayBuffer||Buffer.isBuffer(e),"isBinaryBody");var sr=o(e=>`https://api.bigcommerce.com/stores/${e}`,"GET_BASE_URL");function Ue(e){return{disabled:!0,options:[],placeholder:e}}o(Ue,"handleDropdownError");async function oe({method:e,path:t,body:r,auth:n,filter:i=!1}){let u=sr(n.storeHash),c=i&&r?Array.isArray(r)?r.map(p=>ur(p)):ur(r):r;return await Xt.sendRequest({method:e,url:`${u}${t}`,headers:{"X-Auth-Token":n.accessToken,"Content-Type":"application/json",Accept:"application/json"},body:c}).then(p=>p.body).catch(p=>{throw new Error(`Error in request to ${t}: ${p.message||JSON.stringify(p)}`)})}o(oe,"fireHttpRequest");var T={async createWebhook({auth:e,payload:t}){return await oe({auth:e,path:"/v3/hooks",method:"POST",body:t})},async createCustomer({auth:e,payload:t}){return await oe({auth:e,path:"/v3/customers",method:"POST",body:t})},async fetchCustomers({auth:e,queryString:t}){return await oe({auth:e,path:`/v3/customers${t?`?${t}`:""}`,method:"GET"})},async fetchCustomerAddresses({auth:e,queryString:t}){return await oe({auth:e,path:`/v3/customers/addresses${t?`?${t}`:""}`,method:"GET"})},async fetchProducts({auth:e,queryString:t}){return await oe({auth:e,path:`/v3/catalog/products${t?`?${t}`:""}`,method:"GET"})},async createProduct({auth:e,payload:t}){return await oe({auth:e,path:"/v3/catalog/products",method:"POST",body:t,filter:!0})},async updateProduct({auth:e,productId:t,payload:r}){return await oe({auth:e,path:`/v3/catalog/products/${t}`,method:"PUT",body:r,filter:!0})},async deleteProduct({auth:e,productId:t}){return await oe({auth:e,path:`/v3/catalog/products/${t}`,method:"DELETE"})},async fetchOrders({auth:e,queryString:t}){return await oe({auth:e,path:`/v2/orders${t?`?${t}`:""}`,method:"GET"})},async fetchOrder({auth:e,orderId:t}){return await oe({auth:e,path:`/v2/orders/${t}`,method:"GET"})},async fetchCategories({auth:e,queryString:t}){return await oe({auth:e,path:`/v3/catalog/categories${t?`?${t}`:""}`,method:"GET"})},async createBlogPost({auth:e,payload:t}){return await oe({auth:e,path:"/v2/blog/posts",method:"POST",body:t})},async createCustomerAddress({auth:e,payload:t}){return await oe({auth:e,path:"/v3/customers/addresses",method:"POST",body:t})},async deleteWebhook({auth:e,webhookId:t}){return await oe({auth:e,path:`/v3/hooks/${t}`,method:"DELETE"})}};function ur(e){if(e!=null)return typeof e!="object"?e:Array.isArray(e)?e.map(ur):Object.fromEntries(Object.entries(e).filter(([t,r])=>r!=null).map(([t,r])=>[t,ur(r)]))}o(ur,"filterNulls");var E=Hr.CustomAuth({description:"Enter your BigCommerce API credentials. ",props:{instruction:f.MarkDown({value:`1. Login to https://www.bigcommerce.com/essentials/
|
|
4
|
+
2. Go to Settings
|
|
5
|
+
3. Scroll down to API
|
|
6
|
+
4. Click on "Store Level API Accounts"
|
|
7
|
+
5. Click "Create API Account" button
|
|
8
|
+
6. Enter a name and add required scopes
|
|
9
|
+
7. Save - you will get a downloaded file containing your access token and store hash`}),storeHash:f.ShortText({displayName:"Store Hash",description:"Your BigCommerce store hash (e.g., abcd1234)",required:!0}),accessToken:f.ShortText({displayName:"Access Token",description:"Your BigCommerce API access token",required:!0})},required:!0,async validate(e){try{return await T.fetchProducts({auth:e.auth}),{valid:!0}}catch{return{valid:!1,error:"Could not validate credentials. please check your credentials are correct."}}}});var ym="abandoned cart",hn=`${ym}-trigger-store-key`,hm="store/cart/abandoned",uu=J({auth:E,name:"abandonedCart",displayName:"Abandoned Cart",description:"Triggers when a cart is abandoned",aiMetadata:{description:"Fires when a shopper abandons a cart in the BigCommerce store (the cart sits inactive without checkout completing). The event identifies the affected cart; use it to drive abandoned-cart recovery flows."},props:{},sampleData:{producer:"stores/dxqdddcaklwsso",hash:"3610addd127e330084ddddd7ddd09b78abfd1a85",created_at:1761809622,store_id:"1003425529",scope:"store/cart/abandoned",data:{type:"cart",id:"ss-598f-4c95-813b-0ess950562770d"}},type:"WEBHOOK",async onEnable(e){let t=await T.createWebhook({auth:e.auth.props,payload:{scope:hm,destination:e.webhookUrl,is_active:!0}});await e.store.put(hn,t.data.id)},async onDisable(e){let t=await e.store.get(hn);t&&await T.deleteWebhook({auth:e.auth.props,webhookId:t}).then(async()=>{await e.store.delete(hn)})},async run(e){return[e.payload.body]}});var vm="cart created",vn=`${vm}-trigger-store-key`,_m="store/cart/created",cu=J({auth:E,name:"cartCreated",displayName:"Cart Created",description:"Triggers when a new cart is created",aiMetadata:{description:"Fires when a new shopping cart is created in the BigCommerce store (a shopper adds the first item to a fresh cart). The event identifies the new cart."},props:{},sampleData:{producer:"stores/dxqdddcaklwsso",hash:"3610addd127e330084ddddd7ddd09b78abfd1a85",created_at:1761809622,store_id:"1003425529",scope:"store/cart/created",data:{type:"cart",id:"ss-598f-4c95-813b-0ess950562770d"}},type:"WEBHOOK",async onEnable(e){let t=await T.createWebhook({auth:e.auth.props,payload:{scope:_m,destination:e.webhookUrl,is_active:!0}});await e.store.put(vn,t.data.id)},async onDisable(e){let t=await e.store.get(vn);t&&await T.deleteWebhook({auth:e.auth.props,webhookId:t}).then(async()=>{await e.store.delete(vn)})},async run(e){return[e.payload.body]}});var xm="customer address created",_n=`${xm}-trigger-store-key`,Pm="store/customer/address/created",pu=J({auth:E,name:"customerAddressCreated",displayName:"Customer Address Created",description:"Triggers when a new customer address is created",aiMetadata:{description:"Fires when a new address is added to a customer in the BigCommerce store. The event identifies the affected customer."},props:{},sampleData:{producer:"stores/xqcaklwsso",hash:"d7b899890f5e0e98a3e074f018b14b07d5d89360",created_at:1761808595,store_id:"1003425529",scope:"store/customer/address/created",data:{type:"customer",id:2}},type:"WEBHOOK",async onEnable(e){let t=await T.createWebhook({auth:e.auth.props,payload:{scope:Pm,destination:e.webhookUrl,is_active:!0}});await e.store.put(_n,t.data.id)},async onDisable(e){let t=await e.store.get(_n);t&&await T.deleteWebhook({auth:e.auth.props,webhookId:t}).then(async()=>{await e.store.delete(_n)})},async run(e){return[e.payload.body]}});var bm="customer address updated",xn=`${bm}-trigger-store-key`,Tm="store/customer/address/updated",lu=J({auth:E,name:"customerAddressUpdated",displayName:"Customer Address Updated",description:"Triggers when a new customer address is updated",aiMetadata:{description:"Fires when an existing customer address is updated in the BigCommerce store. The event identifies the affected customer."},props:{},sampleData:{producer:"stores/xqcaklwsso",hash:"d7b899890f5e0e98a3e074f018b14b07d5d89360",created_at:1761808595,store_id:"1003425529",scope:"store/customer/address/updated",data:{type:"customer",id:2}},type:"WEBHOOK",async onEnable(e){let t=await T.createWebhook({auth:e.auth.props,payload:{scope:Tm,destination:e.webhookUrl,is_active:!0}});await e.store.put(xn,t.data.id)},async onDisable(e){let t=await e.store.get(xn);t&&await T.deleteWebhook({auth:e.auth.props,webhookId:t}).then(async()=>{await e.store.delete(xn)})},async run(e){return[e.payload.body]}});var Im="customer created",Pn=`${Im}-trigger-store-key`,Em="store/customer/created",du=J({auth:E,name:"customerCreated",displayName:"Customer Created",description:"Triggers when a new customer is created",aiMetadata:{description:"Fires when a new customer is created in the BigCommerce store. The event identifies the new customer."},props:{},sampleData:{producer:"stores/xqcaklwsso",hash:"d7b899890f5e0e98a3e074f018b14b07d5d89360",created_at:1761808595,store_id:"1003425529",scope:"store/customer/created",data:{type:"customer",id:2,origin_channel_id:1,channel_ids:[1]}},type:"WEBHOOK",async onEnable(e){let t=await T.createWebhook({auth:e.auth.props,payload:{scope:Em,destination:e.webhookUrl,is_active:!0}});await e.store.put(Pn,t.data.id)},async onDisable(e){let t=await e.store.get(Pn);t&&await T.deleteWebhook({auth:e.auth.props,webhookId:t}).then(async()=>{await e.store.delete(Pn)})},async run(e){return[e.payload.body]}});var Sm="customer updated",bn=`${Sm}-trigger-store-key`,Am="store/customer/updated",mu=J({auth:E,name:"customerUpdated",displayName:"Customer Updated",description:"Triggers when a customer is updated",aiMetadata:{description:"Fires when an existing customer record is updated in the BigCommerce store. The event identifies the affected customer."},props:{},sampleData:{producer:"stores/xqcaklwsso",hash:"d7b899890f5e0e98a3e074f018b14b07d5d89360",created_at:1761808595,store_id:"1003425529",scope:"store/customer/updated",data:{type:"customer",id:2}},type:"WEBHOOK",async onEnable(e){let t=await T.createWebhook({auth:e.auth.props,payload:{scope:Am,destination:e.webhookUrl,is_active:!0}});await e.store.put(bn,t.data.id)},async onDisable(e){let t=await e.store.get(bn);t&&await T.deleteWebhook({auth:e.auth.props,webhookId:t}).then(async()=>{await e.store.delete(bn)})},async run(e){return[e.payload.body]}});var $m="order created",Tn=`${$m}-trigger-store-key`,zm="store/order/created",fu=J({auth:E,name:"orderCreated",displayName:"Order Created",description:"Triggers when a new order is created",aiMetadata:{description:"Fires when a new order is created in the BigCommerce store. The event identifies the new order; pair with Get Order to fetch its full details."},props:{},sampleData:{producer:"stores/xqcaklwsso",hash:"d7b899890f5e0e98a3e074f018b14b07d5d89360",created_at:1761808595,store_id:"1003425529",scope:"store/order/created",data:{type:"order",id:2}},type:"WEBHOOK",async onEnable(e){let t=await T.createWebhook({auth:e.auth.props,payload:{scope:zm,destination:e.webhookUrl,is_active:!0}});await e.store.put(Tn,t.data.id)},async onDisable(e){let t=await e.store.get(Tn);t&&await T.deleteWebhook({auth:e.auth.props,webhookId:t}).then(async()=>{await e.store.delete(Tn)})},async run(e){return[e.payload.body]}});var wm="order updated",In=`${wm}-trigger-store-key`,Om="store/order/updated",gu=J({auth:E,name:"orderUpdated",displayName:"Order Updated",description:"Triggers when an order is updated",aiMetadata:{description:"Fires when an existing order is updated in the BigCommerce store (any change to the order, not just its status). The event identifies the affected order; pair with Get Order for full details."},props:{},sampleData:{producer:"stores/xqcaklwsso",hash:"d7b899890f5e0e98a3e074f018b14b07d5d89360",created_at:1761808595,store_id:"1003425529",scope:"store/order/updated",data:{type:"order",id:2}},type:"WEBHOOK",async onEnable(e){let t=await T.createWebhook({auth:e.auth.props,payload:{scope:Om,destination:e.webhookUrl,is_active:!0}});await e.store.put(In,t.data.id)},async onDisable(e){let t=await e.store.get(In);t&&await T.deleteWebhook({auth:e.auth.props,webhookId:t}).then(async()=>{await e.store.delete(In)})},async run(e){return[e.payload.body]}});var km="order status updated",En=`${km}-trigger-store-key`,Rm="store/order/statusUpdated",yu=J({auth:E,name:"orderStatusUpdated",displayName:"Order Status Updated",description:"Triggers when an order status has changed",aiMetadata:{description:"Fires specifically when an order\u2019s status changes in the BigCommerce store (e.g. moves to shipped or completed). Use this instead of Order Updated when you only care about status transitions. The event identifies the affected order."},props:{},sampleData:{producer:"stores/xqcaklwsso",hash:"d7b899890f5e0e98a3e074f018b14b07d5d89360",created_at:1761808595,store_id:"1003425529",scope:"store/order/statusUpdated",data:{type:"order",id:2}},type:"WEBHOOK",async onEnable(e){let t=await T.createWebhook({auth:e.auth.props,payload:{scope:Rm,destination:e.webhookUrl,is_active:!0}});await e.store.put(En,t.data.id)},async onDisable(e){let t=await e.store.get(En);t&&await T.deleteWebhook({auth:e.auth.props,webhookId:t}).then(async()=>{await e.store.delete(En)})},async run(e){return[e.payload.body]}});var Nm="product created",Sn=`${Nm}-trigger-store-key`,Cm="store/product/created",hu=J({auth:E,name:"productCreated",displayName:"Product Created",description:"Triggers when a new product is created",aiMetadata:{description:"Fires when a new product is added to the BigCommerce store catalog. The event identifies the new product."},props:{},sampleData:{producer:"stores/xqcaklwsso",hash:"c6db17090e98d2c58c0cb1988b5e9ace48215e22",created_at:1761808831,store_id:"1003425529",scope:"store/product/created",data:{type:"product",id:113}},type:"WEBHOOK",async onEnable(e){let t=await T.createWebhook({auth:e.auth.props,payload:{scope:Cm,destination:e.webhookUrl,is_active:!0}});await e.store.put(Sn,t.data.id)},async onDisable(e){let t=await e.store.get(Sn);t&&await T.deleteWebhook({auth:e.auth.props,webhookId:t}).then(async()=>{await e.store.delete(Sn)})},async run(e){return[e.payload.body]}});var Dm="shipment created",An=`${Dm}-trigger-store-key`,Um="store/shipment/created",vu=J({auth:E,name:"shipmentCreated",displayName:"Shipment Created",description:"Triggers when a new shipment is created",aiMetadata:{description:"Fires when a new shipment is created for an order in the BigCommerce store (items are shipped/fulfilled). The event identifies the new shipment."},props:{},sampleData:{producer:"stores/xqcaklwsso",hash:"d7b899890f5e0e98a3e074f018b14b07d5d89360",created_at:1761808595,store_id:"1003425529",scope:"store/shipment/created",data:{type:"shipment",id:2}},type:"WEBHOOK",async onEnable(e){let t=await T.createWebhook({auth:e.auth.props,payload:{scope:Um,destination:e.webhookUrl,is_active:!0}});await e.store.put(An,t.data.id)},async onDisable(e){let t=await e.store.get(An);t&&await T.deleteWebhook({auth:e.auth.props,webhookId:t}).then(async()=>{await e.store.delete(An)})},async run(e){return[e.payload.body]}});var _u=V({auth:E,name:"createCustomer",displayName:"Create Customer",description:"Creates a customer",audience:"both",aiMetadata:{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.",idempotent:!1},props:{email:f.ShortText({displayName:"Email",description:"Customer email address",required:!0}),first_name:f.ShortText({displayName:"First Name",description:"Customer first name",required:!0}),last_name:f.ShortText({displayName:"Last Name",description:"Customer last name",required:!0}),company:f.ShortText({displayName:"Company",description:"Customer company name",required:!1}),phone:f.ShortText({displayName:"Phone",description:"Customer phone number",required:!1}),notes:f.LongText({displayName:"Notes",description:"Customer notes",required:!1})},async run(e){return await T.createCustomer({auth:e.auth.props,payload:[{email:e.propsValue.email,first_name:e.propsValue.first_name,last_name:e.propsValue.last_name,company:e.propsValue.company,phone:e.propsValue.phone,notes:e.propsValue.notes}]})}});var xu=V({auth:E,name:"createAProduct",displayName:"Create a Product",description:"Creates a Product",audience:"both",aiMetadata:{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.",idempotent:!1},props:{name:f.ShortText({displayName:"Product Name",description:"Name of the product",required:!0}),type:f.StaticDropdown({displayName:"Product Type",description:"Type of product",required:!0,options:{options:[{label:"Physical",value:"physical"},{label:"Digital",value:"digital"}]}}),sku:f.ShortText({displayName:"SKU",description:"Product SKU",required:!1}),description:f.LongText({displayName:"Description",description:"Product description",required:!1}),weight:f.Number({displayName:"Weight",description:"Product weight",required:!0}),price:f.Number({displayName:"Price",description:"Product price",required:!0}),brand_id:f.Number({displayName:"Brand ID",description:"Brand ID",required:!1})},async run(e){return await T.createProduct({auth:e.auth.props,payload:{name:e.propsValue.name,type:e.propsValue.type,sku:e.propsValue.sku,description:e.propsValue.description,weight:e.propsValue.weight,price:e.propsValue.price,brand_id:e.propsValue.brand_id}})}});var Pu=V({auth:E,name:"updateAProduct",displayName:"Update a Product",description:"Updates an existing Product",audience:"both",aiMetadata:{description:"Updates an existing catalog product in a BigCommerce store, identified by its productId. Only the fields you supply are sent (null/undefined values are dropped so existing data is preserved), so use it for partial edits to name, type, SKU, description, weight, price, or brand. Idempotent: re-applying the same field values leaves the product in the same state.",idempotent:!0},props:{productId:f.ShortText({displayName:"Product ID",description:"The ID of the product to update",required:!0}),name:f.ShortText({displayName:"Product Name",description:"Name of the product",required:!1}),type:f.StaticDropdown({displayName:"Product Type",description:"Type of product",required:!1,options:{options:[{label:"Physical",value:"physical"},{label:"Digital",value:"digital"}]}}),sku:f.ShortText({displayName:"SKU",description:"Product SKU",required:!1}),description:f.LongText({displayName:"Description",description:"Product description",required:!1}),weight:f.Number({displayName:"Weight",description:"Product weight",required:!1}),price:f.Number({displayName:"Price",description:"Product price",required:!1}),brand_id:f.Number({displayName:"Brand ID",description:"Brand ID",required:!1})},async run(e){let{productId:t,...r}=e.propsValue,n=Object.fromEntries(Object.entries(r).filter(([i,u])=>u!=null));return await T.updateProduct({auth:e.auth.props,productId:t,payload:n})}});var bu=V({auth:E,name:"deleteAProduct",displayName:"Delete a Product",description:"Deletes an existing Product",audience:"both",aiMetadata:{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.",idempotent:!0},props:{productId:f.ShortText({displayName:"Product ID",description:"The ID of the product to delete",required:!0})},async run(e){return await T.deleteProduct({auth:e.auth.props,productId:e.propsValue.productId})}});var Tu=V({auth:E,name:"getOrder",displayName:"Get Order",description:"Gets details of an order",audience:"both",aiMetadata:{description:"Retrieves the full details of a single BigCommerce order by its orderId. Use when you already have an order id (e.g. from an order trigger or List Orders) and need its data. Idempotent read-only lookup with no side effects.",idempotent:!0},props:{orderId:f.ShortText({displayName:"Order ID",description:"The ID of the order to retrieve",required:!0})},async run(e){return await T.fetchOrder({auth:e.auth.props,orderId:e.propsValue.orderId})}});var Iu=V({auth:E,name:"listOrders",displayName:"List Orders",description:"Lists all orders",audience:"both",aiMetadata:{description:"Lists orders from a BigCommerce store. With no filters it returns all orders; optionally narrow by customer_id and/or status_id to a subset. Use to browse or find orders when you do not have a specific order id. Idempotent read-only query with no side effects.",idempotent:!0},props:{customer_id:f.Number({displayName:"Customer ID",description:"Filter by customer ID",required:!1}),status_id:f.Number({displayName:"Status ID",description:"Filter by status ID",required:!1})},async run(e){let t=new URLSearchParams;return e.propsValue.customer_id!==void 0&&e.propsValue.customer_id!==null&&t.append("customer_id",e.propsValue.customer_id.toString()),e.propsValue.status_id!==void 0&&e.propsValue.status_id!==null&&t.append("status_id",e.propsValue.status_id.toString()),await T.fetchOrders({auth:e.auth.props,queryString:t.toString()})}});var Eu=V({auth:E,name:"listCategories",displayName:"List Categories",description:"Lists all categories",audience:"both",aiMetadata:{description:"Lists product categories from a BigCommerce store. With no name filter it returns all categories; provide a name to filter to matching categories. Use to discover category names or ids before assigning products. Idempotent read-only query with no side effects.",idempotent:!0},props:{name:f.ShortText({displayName:"Category Name",description:"Filter by category name",required:!1})},async run(e){let t=new URLSearchParams;return e.propsValue.name&&t.append("name",e.propsValue.name),await T.fetchCategories({auth:e.auth.props,queryString:t.toString()})}});var Su=V({auth:E,name:"createBlogPost",displayName:"Create Blog Post",description:"Creates a blog post",audience:"both",aiMetadata:{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.",idempotent:!1},props:{title:f.ShortText({displayName:"Title",description:"Blog post title",required:!0}),body:f.LongText({displayName:"Body",description:"Blog post content (HTML supported)",required:!0}),author:f.ShortText({displayName:"Author",description:"Author name",required:!1}),url:f.ShortText({displayName:"URL",description:"URL for the public blog post. Example - /blog/welcome-bigcommerce/",required:!1}),published_date:f.DateTime({displayName:"Published Date",description:"Published Date for the blog post. Example - Wed, 10 Aug 2022 15:39:15 -0500",required:!1}),meta_description:f.LongText({displayName:"Meta Description",description:"Description text for this blog post\u2019s <meta/> element.",required:!1}),meta_keywords:f.LongText({displayName:"Meta Keywords",description:"Comma seperated (,) Keywords for this blog post\u2019s <meta/> element. Eg welcome, bigcommerce",required:!1}),tags:f.Array({displayName:"Tags",description:"Array of tags",required:!1}),is_published:f.Checkbox({displayName:"Is Published",description:"Whether the post is published",required:!1,defaultValue:!0})},async run(e){return await T.createBlogPost({auth:e.auth.props,payload:{title:e.propsValue.title,body:e.propsValue.body,author:e.propsValue.author,tags:e.propsValue.tags,is_published:e.propsValue.is_published,meta_description:e.propsValue.meta_description,meta_keywords:e.propsValue.meta_keywords,published_date:e.propsValue.published_date,url:e.propsValue.url}})}});var cr=o(({required:e})=>f.Dropdown({auth:E,displayName:"Customer",description:"Select the customer",required:e,refreshers:["auth"],options:o(async({auth:t})=>{if(!t)return Ue("Please connect your account first");try{let r=await T.fetchCustomers({auth:t.props}),n=Array.isArray(r?.data)?r.data:[];return n.length===0?Ue("No customers found"):{disabled:!1,options:n.map(u=>({label:[u.first_name,u.last_name].filter(p=>typeof p=="string"&&p.trim()!=="").join(" ")||u.email||u.id,value:u.id}))}}catch{return Ue("Failed to load customers")}},"options")}),"customerDropdown"),Au=o(({required:e})=>f.MultiSelectDropdown({auth:E,displayName:"Customers",description:"Select the customers",required:e,refreshers:["auth"],options:o(async({auth:t})=>{if(!t)return Ue("Please connect your account first");try{let r=await T.fetchCustomers({auth:t.props}),n=Array.isArray(r?.data)?r.data:[];return n.length===0?Ue("No customers found"):{disabled:!1,options:n.map(u=>({label:[u.first_name,u.last_name].filter(p=>typeof p=="string"&&p.trim()!=="").join(" ")||u.email||u.id,value:u.id}))}}catch{return Ue("Failed to load customers")}},"options")}),"multiCustomerDropdown");var $u=V({auth:E,name:"createCustomerAddress",displayName:"Create Customer Address",description:"Creates a customer's address",audience:"both",aiMetadata:{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\u2019s Address to avoid duplicates.",idempotent:!1},props:{customer_id:cr({required:!0}),first_name:f.ShortText({displayName:"First Name",required:!0}),last_name:f.ShortText({displayName:"Last Name",required:!0}),address1:f.ShortText({displayName:"Address Line 1",required:!0}),address2:f.ShortText({displayName:"Address Line 2",required:!1}),city:f.ShortText({displayName:"City",required:!0}),state_or_province:f.ShortText({displayName:"State/Province",required:!0}),postal_code:f.ShortText({displayName:"Postal Code",required:!0}),country_code:f.ShortText({displayName:"Country Code",description:"ISO 3166-1 alpha-2 country code",required:!0}),phone:f.ShortText({displayName:"Phone",required:!1})},async run(e){return await T.createCustomerAddress({auth:e.auth.props,payload:[{customer_id:e.propsValue.customer_id,first_name:e.propsValue.first_name,last_name:e.propsValue.last_name,address1:e.propsValue.address1,address2:e.propsValue.address2,city:e.propsValue.city,state_or_province:e.propsValue.state_or_province,postal_code:e.propsValue.postal_code,country_code:e.propsValue.country_code,phone:e.propsValue.phone}]})}});var zu=V({auth:E,name:"searchCustomer",displayName:"Search Customer",description:"Searches for a registered customer",audience:"both",aiMetadata:{description:"Searches registered customers in a BigCommerce store by email, phone, and/or name. With no filters it returns all customers; supplying any filter narrows to matches. Use to look up a customer or check whether one exists before creating it. Idempotent read-only query with no side effects.",idempotent:!0},props:{email:f.ShortText({displayName:"Email",description:"Customer email to search for",required:!1}),phone:f.ShortText({displayName:"Phone Number",description:"Phone Number to search for",required:!1}),name:f.ShortText({displayName:"Name",description:"Customer name to search for",required:!1})},async run(e){let t=new URLSearchParams;return e.propsValue.email&&t.append("email:in",e.propsValue.email),e.propsValue.name&&t.append("name:in",`${e.propsValue.name}`),e.propsValue.phone&&t.append("phone:in",e.propsValue.phone),await T.fetchCustomers({auth:e.auth.props,queryString:t.toString()})}});var wu=V({auth:E,name:"searchProduct",displayName:"Search Product",description:"Searches for a product in the catalog",audience:"both",aiMetadata:{description:"Searches the BigCommerce product catalog by name, SKU, type, brand, weight, and/or price. With no filters it returns all products; supplying any filter narrows to matches. Use to find a product or its id, or to check whether one exists before creating it. Idempotent read-only query with no side effects.",idempotent:!0},props:{name:f.ShortText({displayName:"Product Name",description:"Product name to search for",required:!1}),sku:f.ShortText({displayName:"SKU",description:"Product SKU to search for",required:!1}),type:f.StaticDropdown({displayName:"Product Type",required:!1,options:{options:[{label:"Physical",value:"physical"},{label:"Digital",value:"digital"}]}}),brand_id:f.ShortText({displayName:"Brand ID",description:"Brand ID to search for",required:!1}),weight:f.Number({displayName:"Weight",required:!1}),price:f.Number({displayName:"Price",required:!1})},async run(e){let t=new URLSearchParams;return e.propsValue.name&&t.append("name",e.propsValue.name),e.propsValue.sku&&t.append("sku",e.propsValue.sku),e.propsValue.brand_id&&t.append("brand_id",e.propsValue.brand_id),e.propsValue.type&&t.append("type",e.propsValue.type),e.propsValue.price&&t.append("price",String(e.propsValue.price)),e.propsValue.weight&&t.append("weight",String(e.propsValue.weight)),await T.fetchProducts({auth:e.auth.props,queryString:t.toString()})}});var Ou=V({auth:E,name:"searchCustomerAddress",displayName:"Search Customer Address",description:"Searches for a customer\u2019s address",audience:"both",aiMetadata:{description:"Searches customer addresses in a BigCommerce store, optionally filtered by one or more customer ids and/or a name. With no filters it returns all addresses; supplying filters narrows to matches. Use to look up addresses belonging to specific customers. Idempotent read-only query with no side effects.",idempotent:!0},props:{customer_ids:Au({required:!1}),name:f.ShortText({displayName:"Name",description:"Customer name to search for",required:!1})},async run(e){let t=new URLSearchParams;return e.propsValue.customer_ids&&t.append("customer_ids:in",e.propsValue.customer_ids.join(",")),e.propsValue.name&&t.append("name:in",`${e.propsValue.name}`),await T.fetchCustomerAddresses({auth:e.auth.props,queryString:t.toString()})}});var ku=V({auth:E,name:"findOrCreateCustomer",displayName:"Find or Create Customer",description:"Finds or creates a customer",audience:"both",aiMetadata:{description:"Looks up a BigCommerce customer by email (and phone if given) and returns the match if found, otherwise creates a new customer from the supplied details. Use this instead of Create Customer when the customer may already exist, to avoid duplicate-email errors. Idempotent: repeated calls match the same existing record rather than creating duplicates.",idempotent:!0},props:{email:f.ShortText({displayName:"Email",description:"Customer email address",required:!0}),first_name:f.ShortText({displayName:"First Name",description:"Customer first name",required:!0}),last_name:f.ShortText({displayName:"Last Name",description:"Customer last name",required:!0}),company:f.ShortText({displayName:"Company",description:"Customer company name",required:!1}),phone:f.ShortText({displayName:"Phone",description:"Customer phone number",required:!1}),notes:f.LongText({displayName:"Notes",description:"Customer notes",required:!1})},async run(e){let t=new URLSearchParams;t.append("email:in",e.propsValue.email),e.propsValue.phone&&t.append("phone:in",e.propsValue.phone);let r=await T.fetchCustomers({auth:e.auth.props,queryString:t.toString()});return r.data&&r.data.length>0?{found:!0,data:r.data}:{found:!1,data:(await T.createCustomer({auth:e.auth.props,payload:[{email:e.propsValue.email,first_name:e.propsValue.first_name,last_name:e.propsValue.last_name,company:e.propsValue.company,phone:e.propsValue.phone,notes:e.propsValue.notes}]})).data}}});var Ru=V({auth:E,name:"findOrCreateProduct",displayName:"Find or Create Product",description:"Finds or creates a product",audience:"both",aiMetadata:{description:"Looks up a catalog product by exact name and returns the match if found, otherwise creates a new product from the supplied details (type, weight, and price required). Use instead of Create a Product when the item may already exist, to avoid duplicates. Idempotent: repeated calls match the same existing product by name rather than creating duplicates.",idempotent:!0},props:{name:f.ShortText({displayName:"Product Name",required:!0}),sku:f.ShortText({displayName:"SKU",required:!1}),type:f.StaticDropdown({displayName:"Product Type",required:!0,options:{options:[{label:"Physical",value:"physical"},{label:"Digital",value:"digital"}]}}),weight:f.Number({displayName:"Weight",required:!0}),price:f.Number({displayName:"Price",required:!0}),description:f.LongText({displayName:"Description",required:!1}),brand_id:f.Number({displayName:"Brand ID",description:"Brand ID",required:!1})},async run(e){let t=new URLSearchParams;t.append("name",e.propsValue.name);let r=await T.fetchProducts({auth:e.auth.props,queryString:t.toString()});return r.data&&r.data.length>0?{found:!0,data:r.data}:{found:!1,data:(await T.createProduct({auth:e.auth.props,payload:{name:e.propsValue.name,type:e.propsValue.type,sku:e.propsValue.sku,description:e.propsValue.description,weight:e.propsValue.weight,price:e.propsValue.price,brand_id:e.propsValue.brand_id}})).data}}});var Nu=V({auth:E,name:"findOrCreateCustomersAddress",displayName:"Find or Create Customer\u2019s Address",description:"Finds or creates a customer\u2019s address",audience:"both",aiMetadata:{description:"For a given customer_id, looks up that customer\u2019s addresses and returns the one matching the supplied address line 1, city, and postal code if it exists, otherwise creates a new address from the supplied details. Use instead of Create Customer Address when the address may already be on file, to avoid duplicates. Idempotent: repeated calls reuse the matching address rather than appending duplicates.",idempotent:!0},props:{customer_id:cr({required:!0}),first_name:f.ShortText({displayName:"First Name",required:!0}),last_name:f.ShortText({displayName:"Last Name",required:!0}),address1:f.ShortText({displayName:"Address Line 1",required:!0}),address2:f.ShortText({displayName:"Address Line 2",required:!1}),city:f.ShortText({displayName:"City",required:!0}),state_or_province:f.ShortText({displayName:"State/Province",required:!0}),postal_code:f.ShortText({displayName:"Postal Code",required:!0}),country_code:f.ShortText({displayName:"Country Code",description:"ISO 3166-1 alpha-2 country code",required:!0}),phone:f.ShortText({displayName:"Phone",required:!1})},async run(e){let t=new URLSearchParams;t.append("customer_id:in",e.propsValue.customer_id);let r=await T.fetchCustomerAddresses({auth:e.auth.props,queryString:t.toString()});if(r.data&&r.data.length>0){let i=r.data.find(u=>u.address1===e.propsValue.address1&&u.city===e.propsValue.city&&u.postal_code===e.propsValue.postal_code);if(i)return{found:!0,data:i}}return{found:!1,data:(await T.createCustomerAddress({auth:e.auth.props,payload:[{customer_id:e.propsValue.customer_id,first_name:e.propsValue.first_name,last_name:e.propsValue.last_name,address1:e.propsValue.address1,address2:e.propsValue.address2,city:e.propsValue.city,state_or_province:e.propsValue.state_or_province,postal_code:e.propsValue.postal_code,country_code:e.propsValue.country_code,phone:e.propsValue.phone}]})).data}}});var Mm=Hi({displayName:"BigCommerce",description:"BigCommerce is a leading e-commerce platform that enables businesses to create and manage online stores.",auth:E,minimumSupportedRelease:"0.36.1",logoUrl:"https://cdn.activepieces.com/pieces/bigcommerce.png",authors:["gs03-dev","sanket-a11y","Angelebeats"],actions:[_u,xu,Pu,bu,Tu,Iu,Eu,Su,$u,zu,wu,Ou,ku,Ru,Nu,su({auth:E,baseUrl:o(e=>e?sr(e.props.storeHash):"","baseUrl"),authMapping:o(async e=>({"X-Auth-Token":e.props.accessToken,"Content-Type":"application/json",Accept:"application/json"}),"authMapping")})],triggers:[uu,cu,pu,lu,du,mu,fu,gu,yu,hu,vu]});0&&(module.exports={bigcommerce});
|
|
10
|
+
/*! Bundled license information:
|
|
11
|
+
|
|
12
|
+
mime-types/index.js:
|
|
13
|
+
(*!
|
|
14
|
+
* mime-types
|
|
15
|
+
* Copyright(c) 2014 Jonathan Ong
|
|
16
|
+
* Copyright(c) 2015 Douglas Christopher Wilson
|
|
17
|
+
* MIT Licensed
|
|
18
|
+
*)
|
|
19
|
+
*/
|
package/src/index.d.ts
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export declare const bigcommerce: import("@activepieces/pieces-framework").Piece<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=index.d.ts.map
|
package/src/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AA+BA,eAAO,MAAM,WAAW;;;;GAiDtB,CAAC"}
|
package/src/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,kEAA8D;AAC9D,8DAA0D;AAC1D,sFAAiF;AACjF,sFAAiF;AACjF,sEAAkE;AAClE,sEAAkE;AAClE,gEAA4D;AAC5D,gEAA4D;AAC5D,8EAAyE;AACzE,oEAAgE;AAChE,sEAAkE;AAClE,mEAA+D;AAC/D,4CAAoD;AACpD,qEAAgE;AAChE,qEAAgE;AAChE,qEAAgE;AAChE,uDAAmD;AACnD,2DAAuD;AACvD,mEAA+D;AAC/D,qEAAgE;AAChE,mFAA8E;AAC9E,+DAAwE;AACxE,sDAAuE;AACvE,mEAA+D;AAC/D,iEAA6D;AAC7D,mFAA8E;AAC9E,mFAA6E;AAC7E,iFAA2E;AAC3E,qGAA8F;AAEjF,QAAA,WAAW,GAAG,IAAA,8BAAW,EAAC;IACrC,WAAW,EAAE,aAAa;IAC1B,WAAW,EACT,0GAA0G;IAC5G,IAAI,EAAE,sBAAe;IACrB,uBAAuB,EAAE,QAAQ;IACjC,OAAO,EAAE,qDAAqD;IAC9D,OAAO,EAAE,CAAC,UAAU,EAAE,aAAa,EAAE,aAAa,CAAC;IACnD,OAAO,EAAE;QACP,gCAAc;QACd,iCAAc;QACd,iCAAc;QACd,iCAAc;QACd,oBAAQ;QACR,wBAAU;QACV,gCAAc;QACd,iCAAc;QACd,+CAAqB;QACrB,gCAAc;QACd,8BAAa;QACb,+CAAqB;QACrB,8CAAoB;QACpB,4CAAmB;QACnB,+DAA4B;QAC5B,IAAA,yCAAyB,EAAC;YACxB,IAAI,EAAE,sBAAe;YACrB,OAAO,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC,IAAA,wBAAY,EAAC,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,EAAE;YACjE,WAAW,EAAE,CAAO,IAAS,EAAE,EAAE;gBAC/B,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"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
export declare const createAProduct: 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
|
-
type: import("@activepieces/pieces-framework").StaticDropdownProperty<string, true>;
|
|
8
|
-
sku: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
9
|
-
description: import("@activepieces/pieces-framework").LongTextProperty<false>;
|
|
10
|
-
weight: import("@activepieces/pieces-framework").NumberProperty<true>;
|
|
11
|
-
price: import("@activepieces/pieces-framework").NumberProperty<true>;
|
|
12
|
-
brand_id: import("@activepieces/pieces-framework").NumberProperty<false>;
|
|
13
|
-
}>;
|
|
14
|
-
//# sourceMappingURL=create-a-product.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"create-a-product.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/create-a-product.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,cAAc;;;;;;;;;;;;EAoEzB,CAAC"}
|