@activepieces/piece-connections 0.5.5 → 0.5.6
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 +10 -18
- package/src/index.d.ts +0 -2
- package/src/index.d.ts.map +0 -1
- package/src/index.js.map +0 -1
- package/src/lib/actions/read-connection.d.ts +0 -5
- package/src/lib/actions/read-connection.d.ts.map +0 -1
- package/src/lib/actions/read-connection.js +0 -45
- package/src/lib/actions/read-connection.js.map +0 -1
package/package.json
CHANGED
|
@@ -1,16 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@activepieces/piece-connections",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.6",
|
|
4
4
|
"main": "./src/index.js",
|
|
5
|
-
"
|
|
6
|
-
"
|
|
7
|
-
"
|
|
8
|
-
"
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
"@activepieces/pieces-common": "0.12.4",
|
|
12
|
-
"@activepieces/pieces-framework": "0.30.0",
|
|
13
|
-
"@activepieces/shared": "0.92.0",
|
|
14
|
-
"tslib": "2.6.2"
|
|
15
|
-
}
|
|
5
|
+
"dependencies": {},
|
|
6
|
+
"files": [
|
|
7
|
+
"src/index.js",
|
|
8
|
+
"package.json",
|
|
9
|
+
"src/i18n"
|
|
10
|
+
]
|
|
16
11
|
}
|
package/src/index.js
CHANGED
|
@@ -1,18 +1,10 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
logoUrl: 'https://cdn.activepieces.com/pieces/new-core/connections.svg',
|
|
12
|
-
categories: [shared_1.PieceCategory.CORE],
|
|
13
|
-
auth: pieces_framework_1.PieceAuth.None(),
|
|
14
|
-
authors: ["kishanprmr", "AbdulTheActivePiecer", "khaledmashaly", "abuaboud"],
|
|
15
|
-
actions: [read_connection_1.readConnection],
|
|
16
|
-
triggers: [],
|
|
17
|
-
});
|
|
18
|
-
//# sourceMappingURL=index.js.map
|
|
1
|
+
"use strict";var vo=Object.create;var Te=Object.defineProperty;var xo=Object.getOwnPropertyDescriptor;var _o=Object.getOwnPropertyNames;var Po=Object.getPrototypeOf,Io=Object.prototype.hasOwnProperty;var o=(e,t)=>Te(e,"name",{value:t,configurable:!0});var $o=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(r){throw t=0,r}},Qt=(e,t)=>{for(var r in t)Te(e,r,{get:t[r],enumerable:!0})},er=(e,t,r,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of _o(t))!Io.call(e,s)&&s!==r&&Te(e,s,{get:()=>t[s],enumerable:!(i=xo(t,s))||i.enumerable});return e};var Be=(e,t,r)=>(r=e!=null?vo(Po(e)):{},er(t||!e||!e.__esModule?Te(r,"default",{value:e,enumerable:!0}):r,e)),To=e=>er(Te({},"__esModule",{value:!0}),e);var bn=$o((Tn,lt)=>{(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")},i=new RegExp("^0[0-7]+$","i"),s=new RegExp("^0x[a-f0-9]+$","i"),p="%[0-9a-z]{1,}",d="(?:[0-9a-f]+::?)+",m={zoneIndex:new RegExp(p,"i"),native:new RegExp(`^(::)?(${d})?([0-9a-f]+)?(::)?(${p})?$`,"i"),deprecatedTransitional:new RegExp(`^(?:::)(${t}\\.${t}\\.${t}\\.${t}(${p})?)$`,"i"),transitional:new RegExp(`^((?:${d})|(?:::)(?:${d})?)${t}\\.${t}\\.${t}\\.${t}(${p})?$`,"i")};function v(a,c){if(a.indexOf("::")!==a.lastIndexOf("::"))return null;let g=0,l=-1,y=(a.match(m.zoneIndex)||[])[0],h,M;for(y&&(y=y.substring(1),a=a.replace(/%.+$/,""));(l=a.indexOf(":",l+1))>=0;)g++;if(a.substr(0,2)==="::"&&g--,a.substr(-2,2)==="::"&&g--,g>c)return null;for(M=c-g,h=":";M--;)h+="0:";return a=a.replace("::",h),a[0]===":"&&(a=a.slice(1)),a[a.length-1]===":"&&(a=a.slice(0,-1)),c=(function(){let qt=a.split(":"),Yt=[];for(let mt=0;mt<qt.length;mt++)Yt.push(parseInt(qt[mt],16));return Yt})(),{parts:c,zoneId:y}}o(v,"expandIPv6");function x(a,c,g,l){if(a.length!==c.length)throw new Error("ipaddr: cannot match CIDR for objects with different lengths");let y=0,h;for(;l>0;){if(h=g-l,h<0&&(h=0),a[y]>>h!==c[y]>>h)return!1;l-=g,y+=1}return!0}o(x,"matchCIDR");function I(a){if(s.test(a))return parseInt(a,16);if(a[0]==="0"&&!isNaN(parseInt(a[1],10))){if(i.test(a))return parseInt(a,8);throw new Error(`ipaddr: cannot parse ${a} as octal`)}return parseInt(a,10)}o(I,"parseIntAuto");function N(a,c){for(;a.length<c;)a=`0${a}`;return a}o(N,"padPart");let _={};_.IPv4=(function(){function a(c){if(c.length!==4)throw new Error("ipaddr: ipv4 octet count should be 4");let g,l;for(g=0;g<c.length;g++)if(l=c[g],!(0<=l&&l<=255))throw new Error("ipaddr: ipv4 octet should fit in 8 bits");this.octets=c}return o(a,"IPv4"),a.prototype.SpecialRanges={unspecified:[[new a([0,0,0,0]),8]],broadcast:[[new a([255,255,255,255]),32]],multicast:[[new a([224,0,0,0]),4]],linkLocal:[[new a([169,254,0,0]),16]],loopback:[[new a([127,0,0,0]),8]],carrierGradeNat:[[new a([100,64,0,0]),10]],private:[[new a([10,0,0,0]),8],[new a([172,16,0,0]),12],[new a([192,168,0,0]),16]],reserved:[[new a([192,0,0,0]),24],[new a([192,0,2,0]),24],[new a([192,88,99,0]),24],[new a([198,18,0,0]),15],[new a([198,51,100,0]),24],[new a([203,0,113,0]),24],[new a([240,0,0,0]),4]],as112:[[new a([192,175,48,0]),24],[new a([192,31,196,0]),24]],amt:[[new a([192,52,193,0]),24]]},a.prototype.kind=function(){return"ipv4"},a.prototype.match=function(c,g){let l;if(g===void 0&&(l=c,c=l[0],g=l[1]),c.kind()!=="ipv4")throw new Error("ipaddr: cannot match ipv4 address with non-ipv4 one");return x(this.octets,c.octets,8,g)},a.prototype.prefixLengthFromSubnetMask=function(){let c=0,g=!1,l={0:8,128:7,192:6,224:5,240:4,248:3,252:2,254:1,255:0},y,h,M;for(y=3;y>=0;y-=1)if(h=this.octets[y],h in l){if(M=l[h],g&&M!==0)return null;M!==8&&(g=!0),c+=M}else return null;return 32-c},a.prototype.range=function(){return _.subnetMatch(this,this.SpecialRanges)},a.prototype.toByteArray=function(){return this.octets.slice(0)},a.prototype.toIPv4MappedAddress=function(){return _.IPv6.parse(`::ffff:${this.toString()}`)},a.prototype.toNormalizedString=function(){return this.toString()},a.prototype.toString=function(){return this.octets.join(".")},a})(),_.IPv4.broadcastAddressFromCIDR=function(a){try{let c=this.parseCIDR(a),g=c[0].toByteArray(),l=this.subnetMaskFromPrefixLength(c[1]).toByteArray(),y=[],h=0;for(;h<4;)y.push(parseInt(g[h],10)|parseInt(l[h],10)^255),h++;return new this(y)}catch{throw new Error("ipaddr: the address does not have IPv4 CIDR format")}},_.IPv4.isIPv4=function(a){return this.parser(a)!==null},_.IPv4.isValid=function(a){try{return new this(this.parser(a)),!0}catch{return!1}},_.IPv4.isValidCIDR=function(a){try{return this.parseCIDR(a),!0}catch{return!1}},_.IPv4.isValidFourPartDecimal=function(a){return!!(_.IPv4.isValid(a)&&a.match(/^(0|[1-9]\d*)(\.(0|[1-9]\d*)){3}$/))},_.IPv4.isValidCIDRFourPartDecimal=function(a){let c=a.match(/^(.+)\/(\d+)$/);return!_.IPv4.isValidCIDR(a)||!c?!1:_.IPv4.isValidFourPartDecimal(c[1])},_.IPv4.networkAddressFromCIDR=function(a){let c,g,l,y,h;try{for(c=this.parseCIDR(a),l=c[0].toByteArray(),h=this.subnetMaskFromPrefixLength(c[1]).toByteArray(),y=[],g=0;g<4;)y.push(parseInt(l[g],10)&parseInt(h[g],10)),g++;return new this(y)}catch{throw new Error("ipaddr: the address does not have IPv4 CIDR format")}},_.IPv4.parse=function(a){let c=this.parser(a);if(c===null)throw new Error("ipaddr: string is not formatted like an IPv4 Address");return new this(c)},_.IPv4.parseCIDR=function(a){let c;if(c=a.match(/^(.+)\/(\d+)$/)){let g=parseInt(c[2]);if(g>=0&&g<=32){let l=[this.parse(c[1]),g];return Object.defineProperty(l,"toString",{value:o(function(){return this.join("/")},"value")}),l}}throw new Error("ipaddr: string is not formatted like an IPv4 CIDR range")},_.IPv4.parser=function(a){let c,g,l;if(c=a.match(r.fourOctet))return(function(){let y=c.slice(1,6),h=[];for(let M=0;M<y.length;M++)g=y[M],h.push(I(g));return h})();if(c=a.match(r.longValue)){if(l=I(c[1]),l>4294967295||l<0)throw new Error("ipaddr: address outside defined range");return(function(){let y=[],h;for(h=0;h<=24;h+=8)y.push(l>>h&255);return y})().reverse()}else return(c=a.match(r.twoOctet))?(function(){let y=c.slice(1,4),h=[];if(l=I(y[1]),l>16777215||l<0)throw new Error("ipaddr: address outside defined range");return h.push(I(y[0])),h.push(l>>16&255),h.push(l>>8&255),h.push(l&255),h})():(c=a.match(r.threeOctet))?(function(){let y=c.slice(1,5),h=[];if(l=I(y[2]),l>65535||l<0)throw new Error("ipaddr: address outside defined range");return h.push(I(y[0])),h.push(I(y[1])),h.push(l>>8&255),h.push(l&255),h})():null},_.IPv4.subnetMaskFromPrefixLength=function(a){if(a=parseInt(a),a<0||a>32)throw new Error("ipaddr: invalid IPv4 prefix length");let c=[0,0,0,0],g=0,l=Math.floor(a/8);for(;g<l;)c[g]=255,g++;return l<4&&(c[l]=Math.pow(2,a%8)-1<<8-a%8),new this(c)},_.IPv6=(function(){function a(c,g){let l,y;if(c.length===16)for(this.parts=[],l=0;l<=14;l+=2)this.parts.push(c[l]<<8|c[l+1]);else if(c.length===8)this.parts=c;else throw new Error("ipaddr: ipv6 part count should be 8 or 16");for(l=0;l<this.parts.length;l++)if(y=this.parts[l],!(0<=y&&y<=65535))throw new Error("ipaddr: ipv6 part should fit in 16 bits");g&&(this.zoneId=g)}return o(a,"IPv6"),a.prototype.SpecialRanges={unspecified:[new a([0,0,0,0,0,0,0,0]),128],linkLocal:[new a([65152,0,0,0,0,0,0,0]),10],multicast:[new a([65280,0,0,0,0,0,0,0]),8],loopback:[new a([0,0,0,0,0,0,0,1]),128],uniqueLocal:[new a([64512,0,0,0,0,0,0,0]),7],ipv4Mapped:[new a([0,0,0,0,0,65535,0,0]),96],discard:[new a([256,0,0,0,0,0,0,0]),64],rfc6145:[new a([0,0,0,0,65535,0,0,0]),96],rfc6052:[new a([100,65435,0,0,0,0,0,0]),96],"6to4":[new a([8194,0,0,0,0,0,0,0]),16],teredo:[new a([8193,0,0,0,0,0,0,0]),32],benchmarking:[new a([8193,2,0,0,0,0,0,0]),48],amt:[new a([8193,3,0,0,0,0,0,0]),32],as112v6:[[new a([8193,4,274,0,0,0,0,0]),48],[new a([9760,79,32768,0,0,0,0,0]),48]],deprecated:[new a([8193,16,0,0,0,0,0,0]),28],orchid2:[new a([8193,32,0,0,0,0,0,0]),28],droneRemoteIdProtocolEntityTags:[new a([8193,48,0,0,0,0,0,0]),28],reserved:[[new a([8193,0,0,0,0,0,0,0]),23],[new a([8193,3512,0,0,0,0,0,0]),32]]},a.prototype.isIPv4MappedAddress=function(){return this.range()==="ipv4Mapped"},a.prototype.kind=function(){return"ipv6"},a.prototype.match=function(c,g){let l;if(g===void 0&&(l=c,c=l[0],g=l[1]),c.kind()!=="ipv6")throw new Error("ipaddr: cannot match ipv6 address with non-ipv6 one");return x(this.parts,c.parts,16,g)},a.prototype.prefixLengthFromSubnetMask=function(){let c=0,g=!1,l={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},y,h;for(let M=7;M>=0;M-=1)if(y=this.parts[M],y in l){if(h=l[y],g&&h!==0)return null;h!==16&&(g=!0),c+=h}else return null;return 128-c},a.prototype.range=function(){return _.subnetMatch(this,this.SpecialRanges)},a.prototype.toByteArray=function(){let c,g=[],l=this.parts;for(let y=0;y<l.length;y++)c=l[y],g.push(c>>8),g.push(c&255);return g},a.prototype.toFixedLengthString=function(){let c=(function(){let l=[];for(let y=0;y<this.parts.length;y++)l.push(N(this.parts[y].toString(16),4));return l}).call(this).join(":"),g="";return this.zoneId&&(g=`%${this.zoneId}`),c+g},a.prototype.toIPv4Address=function(){if(!this.isIPv4MappedAddress())throw new Error("ipaddr: trying to convert a generic ipv6 address to ipv4");let c=this.parts.slice(-2),g=c[0],l=c[1];return new _.IPv4([g>>8,g&255,l>>8,l&255])},a.prototype.toNormalizedString=function(){let c=(function(){let l=[];for(let y=0;y<this.parts.length;y++)l.push(this.parts[y].toString(16));return l}).call(this).join(":"),g="";return this.zoneId&&(g=`%${this.zoneId}`),c+g},a.prototype.toRFC5952String=function(){let c=/((^|:)(0(:|$)){2,})/g,g=this.toNormalizedString(),l=0,y=-1,h;for(;h=c.exec(g);)h[0].length>y&&(l=h.index,y=h[0].length);return y<0?g:`${g.substring(0,l)}::${g.substring(l+y)}`},a.prototype.toString=function(){return this.toRFC5952String()},a})(),_.IPv6.broadcastAddressFromCIDR=function(a){try{let c=this.parseCIDR(a),g=c[0].toByteArray(),l=this.subnetMaskFromPrefixLength(c[1]).toByteArray(),y=[],h=0;for(;h<16;)y.push(parseInt(g[h],10)|parseInt(l[h],10)^255),h++;return new this(y)}catch(c){throw new Error(`ipaddr: the address does not have IPv6 CIDR format (${c})`)}},_.IPv6.isIPv6=function(a){return this.parser(a)!==null},_.IPv6.isValid=function(a){if(typeof a=="string"&&a.indexOf(":")===-1)return!1;try{let c=this.parser(a);return new this(c.parts,c.zoneId),!0}catch{return!1}},_.IPv6.isValidCIDR=function(a){if(typeof a=="string"&&a.indexOf(":")===-1)return!1;try{return this.parseCIDR(a),!0}catch{return!1}},_.IPv6.networkAddressFromCIDR=function(a){let c,g,l,y,h;try{for(c=this.parseCIDR(a),l=c[0].toByteArray(),h=this.subnetMaskFromPrefixLength(c[1]).toByteArray(),y=[],g=0;g<16;)y.push(parseInt(l[g],10)&parseInt(h[g],10)),g++;return new this(y)}catch(M){throw new Error(`ipaddr: the address does not have IPv6 CIDR format (${M})`)}},_.IPv6.parse=function(a){let c=this.parser(a);if(c.parts===null)throw new Error("ipaddr: string is not formatted like an IPv6 Address");return new this(c.parts,c.zoneId)},_.IPv6.parseCIDR=function(a){let c,g,l;if((g=a.match(/^(.+)\/(\d+)$/))&&(c=parseInt(g[2]),c>=0&&c<=128))return l=[this.parse(g[1]),c],Object.defineProperty(l,"toString",{value:o(function(){return this.join("/")},"value")}),l;throw new Error("ipaddr: string is not formatted like an IPv6 CIDR range")},_.IPv6.parser=function(a){let c,g,l,y,h,M;if(l=a.match(m.deprecatedTransitional))return this.parser(`::ffff:${l[1]}`);if(m.native.test(a))return v(a,8);if((l=a.match(m.transitional))&&(M=l[6]||"",c=l[1],l[1].endsWith("::")||(c=c.slice(0,-1)),c=v(c+M,6),c.parts)){for(h=[parseInt(l[2]),parseInt(l[3]),parseInt(l[4]),parseInt(l[5])],g=0;g<h.length;g++)if(y=h[g],!(0<=y&&y<=255))return null;return c.parts.push(h[0]<<8|h[1]),c.parts.push(h[2]<<8|h[3]),{parts:c.parts,zoneId:c.zoneId}}return null},_.IPv6.subnetMaskFromPrefixLength=function(a){if(a=parseInt(a),a<0||a>128)throw new Error("ipaddr: invalid IPv6 prefix length");let c=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],g=0,l=Math.floor(a/8);for(;g<l;)c[g]=255,g++;return l<16&&(c[l]=Math.pow(2,a%8)-1<<8-a%8),new this(c)},_.fromByteArray=function(a){let c=a.length;if(c===4)return new _.IPv4(a);if(c===16)return new _.IPv6(a);throw new Error("ipaddr: the binary input is neither an IPv6 nor IPv4 address")},_.isValid=function(a){return _.IPv6.isValid(a)||_.IPv4.isValid(a)},_.isValidCIDR=function(a){return _.IPv6.isValidCIDR(a)||_.IPv4.isValidCIDR(a)},_.parse=function(a){if(_.IPv6.isValid(a))return _.IPv6.parse(a);if(_.IPv4.isValid(a))return _.IPv4.parse(a);throw new Error("ipaddr: the address has neither IPv6 nor IPv4 format")},_.parseCIDR=function(a){try{return _.IPv6.parseCIDR(a)}catch{try{return _.IPv4.parseCIDR(a)}catch{throw new Error("ipaddr: the address has neither IPv6 nor IPv4 CIDR format")}}},_.process=function(a){let c=this.parse(a);return c.kind()==="ipv6"&&c.isIPv4MappedAddress()?c.toIPv4Address():c},_.subnetMatch=function(a,c,g){let l,y,h,M;g==null&&(g="unicast");for(y in c)if(Object.prototype.hasOwnProperty.call(c,y)){for(h=c[y],h[0]&&!(h[0]instanceof Array)&&(h=[h]),l=0;l<h.length;l++)if(M=h[l],a.kind()===M[0].kind()&&a.match.apply(a,M))return y}return g},typeof lt<"u"&<.exports?lt.exports=_:e.ipaddr=_})(Tn)});var Ha={};Qt(Ha,{connections:()=>Ga});module.exports=To(Ha);var bo=Object.freeze({status:"aborted"});function P(e,t,r){function i(m,v){if(m._zod||Object.defineProperty(m,"_zod",{value:{def:v,constr:d,traits:new Set},enumerable:!1}),m._zod.traits.has(e))return;m._zod.traits.add(e),t(m,v);let x=d.prototype,I=Object.keys(x);for(let N=0;N<I.length;N++){let _=I[N];_ in m||(m[_]=x[_].bind(m))}}o(i,"init");let s=r?.Parent??Object;class p extends s{static{o(this,"Definition")}}Object.defineProperty(p,"name",{value:e});function d(m){var v;let x=r?.Parent?new p:this;i(x,m),(v=x._zod).deferred??(v.deferred=[]);for(let I of x._zod.deferred)I();return x}return o(d,"_"),Object.defineProperty(d,"init",{value:i}),Object.defineProperty(d,Symbol.hasInstance,{value:o(m=>r?.Parent&&m instanceof r.Parent?!0:m?._zod?.traits?.has(e),"value")}),Object.defineProperty(d,"name",{value:e}),d}o(P,"$constructor");var X=class extends Error{static{o(this,"$ZodAsyncError")}constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},We=class extends Error{static{o(this,"$ZodEncodeError")}constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}},ft={};function Y(e){return e&&Object.assign(ft,e),ft}o(Y,"config");function yt(e){let t=Object.values(e).filter(i=>typeof i=="number");return Object.entries(e).filter(([i,s])=>t.indexOf(+i)===-1).map(([i,s])=>s)}o(yt,"getEnumValues");function rr(e,t){return typeof t=="bigint"?t.toString():t}o(rr,"jsonStringifyReplacer");function He(e){return{get value(){{let r=e();return Object.defineProperty(this,"value",{value:r}),r}throw new Error("cached value already set")}}}o(He,"cached");function nr(e){return e==null}o(nr,"nullish");function Ke(e){let t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}o(Ke,"cleanRegex");var tr=Symbol("evaluating");function V(e,t,r){let i;Object.defineProperty(e,t,{get(){if(i!==tr)return i===void 0&&(i=tr,i=r()),i},set(s){Object.defineProperty(e,t,{value:s})},configurable:!0})}o(V,"defineLazy");var ht="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function be(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}o(be,"isObject");var Eo=He(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let e=Function;return new e(""),!0}catch{return!1}});function or(e){if(be(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!="function")return!0;let r=t.prototype;return!(be(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}o(or,"isPlainObject");var ir=new Set(["string","number","symbol"]);function he(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}o(he,"escapeRegex");function Je(e,t,r){let i=new e._zod.constr(t??e._zod.def);return(!t||r?.parent)&&(i._zod.parent=e),i}o(Je,"clone");function j(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(j,"normalizeParams");function ar(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}o(ar,"optionalKeys");var sr={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 ve(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(ve,"aborted");function oe(e,t){return t.map(r=>{var i;return(i=r).path??(i.path=[]),r.path.unshift(e),r})}o(oe,"prefixIssues");function Ge(e){return typeof e=="string"?e:e?.message}o(Ge,"unwrapMessage");function ie(e,t,r){let i={...e,path:e.path??[]};if(!e.message){let s=Ge(e.inst?._zod.def?.error?.(e))??Ge(t?.error?.(e))??Ge(r.customError?.(e))??Ge(r.localeError?.(e))??"Invalid input";i.message=s}return delete i.inst,delete i.continue,t?.reportInput||delete i.input,i}o(ie,"finalizeIssue");function ur(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}o(ur,"getLengthableOrigin");function vt(...e){let[t,r,i]=e;return typeof t=="string"?{message:t,code:"custom",input:r,inst:i}:{...t}}o(vt,"issue");var cr=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,rr,2),Object.defineProperty(e,"toString",{value:o(()=>e.message,"value"),enumerable:!1})},"initializer"),lr=P("$ZodError",cr),Ee=P("$ZodError",cr,{Parent:Error});var So=o(e=>(t,r,i,s)=>{let p=i?Object.assign(i,{async:!1}):{async:!1},d=t._zod.run({value:r,issues:[]},p);if(d instanceof Promise)throw new X;if(d.issues.length){let m=new(s?.Err??e)(d.issues.map(v=>ie(v,p,Y())));throw ht(m,s?.callee),m}return d.value},"_parse"),Xe=So(Ee),Ao=o(e=>async(t,r,i,s)=>{let p=i?Object.assign(i,{async:!0}):{async:!0},d=t._zod.run({value:r,issues:[]},p);if(d instanceof Promise&&(d=await d),d.issues.length){let m=new(s?.Err??e)(d.issues.map(v=>ie(v,p,Y())));throw ht(m,s?.callee),m}return d.value},"_parseAsync"),qe=Ao(Ee),ko=o(e=>(t,r,i)=>{let s=i?{...i,async:!1}:{async:!1},p=t._zod.run({value:r,issues:[]},s);if(p instanceof Promise)throw new X;return p.issues.length?{success:!1,error:new(e??lr)(p.issues.map(d=>ie(d,s,Y())))}:{success:!0,data:p.value}},"_safeParse"),ze=ko(Ee),Oo=o(e=>async(t,r,i)=>{let s=i?Object.assign(i,{async:!0}):{async:!0},p=t._zod.run({value:r,issues:[]},s);return p instanceof Promise&&(p=await p),p.issues.length?{success:!1,error:new e(p.issues.map(d=>ie(d,s,Y())))}:{success:!0,data:p.value}},"_safeParseAsync"),Se=Oo(Ee);var wo="(?:(?:\\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])))",Ro=new RegExp(`^${wo}$`);var pr=o(e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},"string"),dr=/^-?\d+n?$/,mr=/^-?\d+$/,xt=/^-?\d+(?:\.\d+)?$/,fr=/^(?:true|false)$/i;var ae=P("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])}),Do={number:"number",bigint:"bigint",object:"date"};var gr=P("$ZodCheckGreaterThan",(e,t)=>{ae.init(e,t);let r=Do[typeof t.value];e._zod.onattach.push(i=>{let s=i._zod.bag,p=(t.inclusive?s.minimum:s.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>p&&(t.inclusive?s.minimum=t.value:s.exclusiveMinimum=t.value)}),e._zod.check=i=>{(t.inclusive?i.value>=t.value:i.value>t.value)||i.issues.push({origin:r,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:i.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}});var yr=P("$ZodCheckNumberFormat",(e,t)=>{ae.init(e,t),t.format=t.format||"float64";let r=t.format?.includes("int"),i=r?"int":"number",[s,p]=sr[t.format];e._zod.onattach.push(d=>{let m=d._zod.bag;m.format=t.format,m.minimum=s,m.maximum=p,r&&(m.pattern=mr)}),e._zod.check=d=>{let m=d.value;if(r){if(!Number.isInteger(m)){d.issues.push({expected:i,format:t.format,code:"invalid_type",continue:!1,input:m,inst:e});return}if(!Number.isSafeInteger(m)){m>0?d.issues.push({input:m,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:i,inclusive:!0,continue:!t.abort}):d.issues.push({input:m,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:i,inclusive:!0,continue:!t.abort});return}}m<s&&d.issues.push({origin:"number",input:m,code:"too_small",minimum:s,inclusive:!0,inst:e,continue:!t.abort}),m>p&&d.issues.push({origin:"number",input:m,code:"too_big",maximum:p,inclusive:!0,inst:e,continue:!t.abort})}});var hr=P("$ZodCheckMinLength",(e,t)=>{var r;ae.init(e,t),(r=e._zod.def).when??(r.when=i=>{let s=i.value;return!nr(s)&&s.length!==void 0}),e._zod.onattach.push(i=>{let s=i._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>s&&(i._zod.bag.minimum=t.minimum)}),e._zod.check=i=>{let s=i.value;if(s.length>=t.minimum)return;let d=ur(s);i.issues.push({origin:d,code:"too_small",minimum:t.minimum,inclusive:!0,input:s,inst:e,continue:!t.abort})}});var _t=P("$ZodCheckStringFormat",(e,t)=>{var r,i;ae.init(e,t),e._zod.onattach.push(s=>{let p=s._zod.bag;p.format=t.format,t.pattern&&(p.patterns??(p.patterns=new Set),p.patterns.add(t.pattern))}),t.pattern?(r=e._zod).check??(r.check=s=>{t.pattern.lastIndex=0,!t.pattern.test(s.value)&&s.issues.push({origin:"string",code:"invalid_format",format:t.format,input:s.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(i=e._zod).check??(i.check=()=>{})}),vr=P("$ZodCheckRegex",(e,t)=>{_t.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 _r={major:4,minor:3,patch:6};var Z=P("$ZodType",(e,t)=>{var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=_r;let i=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&i.unshift(e);for(let s of i)for(let p of s._zod.onattach)p(e);if(i.length===0)(r=e._zod).deferred??(r.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let s=o((d,m,v)=>{let x=ve(d),I;for(let N of m){if(N._zod.def.when){if(!N._zod.def.when(d))continue}else if(x)continue;let _=d.issues.length,a=N._zod.check(d);if(a instanceof Promise&&v?.async===!1)throw new X;if(I||a instanceof Promise)I=(I??Promise.resolve()).then(async()=>{await a,d.issues.length!==_&&(x||(x=ve(d,_)))});else{if(d.issues.length===_)continue;x||(x=ve(d,_))}}return I?I.then(()=>d):d},"runChecks"),p=o((d,m,v)=>{if(ve(d))return d.aborted=!0,d;let x=s(m,i,v);if(x instanceof Promise){if(v.async===!1)throw new X;return x.then(I=>e._zod.parse(I,v))}return e._zod.parse(x,v)},"handleCanaryResult");e._zod.run=(d,m)=>{if(m.skipChecks)return e._zod.parse(d,m);if(m.direction==="backward"){let x=e._zod.parse({value:d.value,issues:[]},{...m,skipChecks:!0});return x instanceof Promise?x.then(I=>p(I,d,m)):p(x,d,m)}let v=e._zod.parse(d,m);if(v instanceof Promise){if(m.async===!1)throw new X;return v.then(x=>s(x,i,m))}return s(v,i,m)}}V(e,"~standard",()=>({validate:o(s=>{try{let p=ze(e,s);return p.success?{value:p.data}:{issues:p.error?.issues}}catch{return Se(e,s).then(d=>d.success?{value:d.data}:{issues:d.error?.issues})}},"validate"),vendor:"zod",version:1}))}),et=P("$ZodString",(e,t)=>{Z.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??pr(e._zod.bag),e._zod.parse=(r,i)=>{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}}),Pt=P("$ZodStringFormat",(e,t)=>{_t.init(e,t),et.init(e,t)});var br=P("$ZodURL",(e,t)=>{Pt.init(e,t),e._zod.check=r=>{try{let i=r.value.trim(),s=new URL(i);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(s.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(s.protocol.endsWith(":")?s.protocol.slice(0,-1):s.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=s.href:r.value=i;return}catch{r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:e,continue:!t.abort})}}});var It=P("$ZodNumber",(e,t)=>{Z.init(e,t),e._zod.pattern=e._zod.bag.pattern??xt,e._zod.parse=(r,i)=>{if(t.coerce)try{r.value=Number(r.value)}catch{}let s=r.value;if(typeof s=="number"&&!Number.isNaN(s)&&Number.isFinite(s))return r;let p=typeof s=="number"?Number.isNaN(s)?"NaN":Number.isFinite(s)?void 0:"Infinity":void 0;return r.issues.push({expected:"number",code:"invalid_type",input:s,inst:e,...p?{received:p}:{}}),r}}),Er=P("$ZodNumberFormat",(e,t)=>{yr.init(e,t),It.init(e,t)}),$t=P("$ZodBoolean",(e,t)=>{Z.init(e,t),e._zod.pattern=fr,e._zod.parse=(r,i)=>{if(t.coerce)try{r.value=!!r.value}catch{}let s=r.value;return typeof s=="boolean"||r.issues.push({expected:"boolean",code:"invalid_type",input:s,inst:e}),r}}),zr=P("$ZodBigInt",(e,t)=>{Z.init(e,t),e._zod.pattern=dr,e._zod.parse=(r,i)=>{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 Sr=P("$ZodAny",(e,t)=>{Z.init(e,t),e._zod.parse=r=>r}),Ar=P("$ZodUnknown",(e,t)=>{Z.init(e,t),e._zod.parse=r=>r});var kr=P("$ZodVoid",(e,t)=>{Z.init(e,t),e._zod.parse=(r,i)=>{let s=r.value;return typeof s>"u"||r.issues.push({expected:"void",code:"invalid_type",input:s,inst:e}),r}}),Or=P("$ZodDate",(e,t)=>{Z.init(e,t),e._zod.parse=(r,i)=>{if(t.coerce)try{r.value=new Date(r.value)}catch{}let s=r.value,p=s instanceof Date;return p&&!Number.isNaN(s.getTime())||r.issues.push({expected:"date",code:"invalid_type",input:s,...p?{received:"Invalid Date"}:{},inst:e}),r}});function Pr(e,t,r){e.issues.length&&t.issues.push(...oe(r,e.issues)),t.value[r]=e.value}o(Pr,"handleArrayResult");var wr=P("$ZodArray",(e,t)=>{Z.init(e,t),e._zod.parse=(r,i)=>{let s=r.value;if(!Array.isArray(s))return r.issues.push({expected:"array",code:"invalid_type",input:s,inst:e}),r;r.value=Array(s.length);let p=[];for(let d=0;d<s.length;d++){let m=s[d],v=t.element._zod.run({value:m,issues:[]},i);v instanceof Promise?p.push(v.then(x=>Pr(x,r,d))):Pr(v,r,d)}return p.length?Promise.all(p).then(()=>r):r}});function Qe(e,t,r,i,s){if(e.issues.length){if(s&&!(r in i))return;t.issues.push(...oe(r,e.issues))}e.value===void 0?r in i&&(t.value[r]=void 0):t.value[r]=e.value}o(Qe,"handlePropertyResult");function No(e){let t=Object.keys(e.shape);for(let i of t)if(!e.shape?.[i]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${i}": expected a Zod schema`);let r=ar(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(r)}}o(No,"normalizeDef");function Co(e,t,r,i,s,p){let d=[],m=s.keySet,v=s.catchall._zod,x=v.def.type,I=v.optout==="optional";for(let N in t){if(m.has(N))continue;if(x==="never"){d.push(N);continue}let _=v.run({value:t[N],issues:[]},i);_ instanceof Promise?e.push(_.then(a=>Qe(a,r,N,t,I))):Qe(_,r,N,t,I)}return d.length&&r.issues.push({code:"unrecognized_keys",keys:d,input:t,inst:p}),e.length?Promise.all(e).then(()=>r):r}o(Co,"handleCatchall");var Rr=P("$ZodObject",(e,t)=>{if(Z.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){let m=t.shape;Object.defineProperty(t,"shape",{get:o(()=>{let v={...m};return Object.defineProperty(t,"shape",{value:v}),v},"get")})}let i=He(()=>No(t));V(e._zod,"propValues",()=>{let m=t.shape,v={};for(let x in m){let I=m[x]._zod;if(I.values){v[x]??(v[x]=new Set);for(let N of I.values)v[x].add(N)}}return v});let s=be,p=t.catchall,d;e._zod.parse=(m,v)=>{d??(d=i.value);let x=m.value;if(!s(x))return m.issues.push({expected:"object",code:"invalid_type",input:x,inst:e}),m;m.value={};let I=[],N=d.shape;for(let _ of d.keys){let a=N[_],c=a._zod.optout==="optional",g=a._zod.run({value:x[_],issues:[]},v);g instanceof Promise?I.push(g.then(l=>Qe(l,m,_,x,c))):Qe(g,m,_,x,c)}return p?Co(I,x,m,v,i.value,e):I.length?Promise.all(I).then(()=>m):m}});function Ir(e,t,r,i){for(let p of e)if(p.issues.length===0)return t.value=p.value,t;let s=e.filter(p=>!ve(p));return s.length===1?(t.value=s[0].value,s[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(p=>p.issues.map(d=>ie(d,i,Y())))}),t)}o(Ir,"handleUnionResults");var Tt=P("$ZodUnion",(e,t)=>{Z.init(e,t),V(e._zod,"optin",()=>t.options.some(s=>s._zod.optin==="optional")?"optional":void 0),V(e._zod,"optout",()=>t.options.some(s=>s._zod.optout==="optional")?"optional":void 0),V(e._zod,"values",()=>{if(t.options.every(s=>s._zod.values))return new Set(t.options.flatMap(s=>Array.from(s._zod.values)))}),V(e._zod,"pattern",()=>{if(t.options.every(s=>s._zod.pattern)){let s=t.options.map(p=>p._zod.pattern);return new RegExp(`^(${s.map(p=>Ke(p.source)).join("|")})$`)}});let r=t.options.length===1,i=t.options[0]._zod.run;e._zod.parse=(s,p)=>{if(r)return i(s,p);let d=!1,m=[];for(let v of t.options){let x=v._zod.run({value:s.value,issues:[]},p);if(x instanceof Promise)m.push(x),d=!0;else{if(x.issues.length===0)return x;m.push(x)}}return d?Promise.all(m).then(v=>Ir(v,s,e,p)):Ir(m,s,e,p)}});var Dr=P("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,Tt.init(e,t);let r=e._zod.parse;V(e._zod,"propValues",()=>{let s={};for(let p of t.options){let d=p._zod.propValues;if(!d||Object.keys(d).length===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(p)}"`);for(let[m,v]of Object.entries(d)){s[m]||(s[m]=new Set);for(let x of v)s[m].add(x)}}return s});let i=He(()=>{let s=t.options,p=new Map;for(let d of s){let m=d._zod.propValues?.[t.discriminator];if(!m||m.size===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(d)}"`);for(let v of m){if(p.has(v))throw new Error(`Duplicate discriminator value "${String(v)}"`);p.set(v,d)}}return p});e._zod.parse=(s,p)=>{let d=s.value;if(!be(d))return s.issues.push({code:"invalid_type",expected:"object",input:d,inst:e}),s;let m=i.value.get(d?.[t.discriminator]);return m?m._zod.run(s,p):t.unionFallback?r(s,p):(s.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,input:d,path:[t.discriminator],inst:e}),s)}});var Nr=P("$ZodRecord",(e,t)=>{Z.init(e,t),e._zod.parse=(r,i)=>{let s=r.value;if(!or(s))return r.issues.push({expected:"record",code:"invalid_type",input:s,inst:e}),r;let p=[],d=t.keyType._zod.values;if(d){r.value={};let m=new Set;for(let x of d)if(typeof x=="string"||typeof x=="number"||typeof x=="symbol"){m.add(typeof x=="number"?x.toString():x);let I=t.valueType._zod.run({value:s[x],issues:[]},i);I instanceof Promise?p.push(I.then(N=>{N.issues.length&&r.issues.push(...oe(x,N.issues)),r.value[x]=N.value})):(I.issues.length&&r.issues.push(...oe(x,I.issues)),r.value[x]=I.value)}let v;for(let x in s)m.has(x)||(v=v??[],v.push(x));v&&v.length>0&&r.issues.push({code:"unrecognized_keys",input:s,inst:e,keys:v})}else{r.value={};for(let m of Reflect.ownKeys(s)){if(m==="__proto__")continue;let v=t.keyType._zod.run({value:m,issues:[]},i);if(v instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof m=="string"&&xt.test(m)&&v.issues.length){let N=t.keyType._zod.run({value:Number(m),issues:[]},i);if(N instanceof Promise)throw new Error("Async schemas not supported in object keys currently");N.issues.length===0&&(v=N)}if(v.issues.length){t.mode==="loose"?r.value[m]=s[m]:r.issues.push({code:"invalid_key",origin:"record",issues:v.issues.map(N=>ie(N,i,Y())),input:m,path:[m],inst:e});continue}let I=t.valueType._zod.run({value:s[m],issues:[]},i);I instanceof Promise?p.push(I.then(N=>{N.issues.length&&r.issues.push(...oe(m,N.issues)),r.value[v.value]=N.value})):(I.issues.length&&r.issues.push(...oe(m,I.issues)),r.value[v.value]=I.value)}}return p.length?Promise.all(p).then(()=>r):r}});var Cr=P("$ZodEnum",(e,t)=>{Z.init(e,t);let r=yt(t.entries),i=new Set(r);e._zod.values=i,e._zod.pattern=new RegExp(`^(${r.filter(s=>ir.has(typeof s)).map(s=>typeof s=="string"?he(s):s.toString()).join("|")})$`),e._zod.parse=(s,p)=>{let d=s.value;return i.has(d)||s.issues.push({code:"invalid_value",values:r,input:d,inst:e}),s}}),Ur=P("$ZodLiteral",(e,t)=>{if(Z.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(i=>typeof i=="string"?he(i):i?he(i.toString()):String(i)).join("|")})$`),e._zod.parse=(i,s)=>{let p=i.value;return r.has(p)||i.issues.push({code:"invalid_value",values:t.values,input:p,inst:e}),i}});var Mr=P("$ZodTransform",(e,t)=>{Z.init(e,t),e._zod.parse=(r,i)=>{if(i.direction==="backward")throw new We(e.constructor.name);let s=t.transform(r.value,r);if(i.async)return(s instanceof Promise?s:Promise.resolve(s)).then(d=>(r.value=d,r));if(s instanceof Promise)throw new X;return r.value=s,r}});function $r(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}o($r,"handleOptionalResult");var jr=P("$ZodOptional",(e,t)=>{Z.init(e,t),e._zod.optin="optional",e._zod.optout="optional",V(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),V(e._zod,"pattern",()=>{let r=t.innerType._zod.pattern;return r?new RegExp(`^(${Ke(r.source)})?$`):void 0}),e._zod.parse=(r,i)=>{if(t.innerType._zod.optin==="optional"){let s=t.innerType._zod.run(r,i);return s instanceof Promise?s.then(p=>$r(p,r.value)):$r(s,r.value)}return r.value===void 0?r:t.innerType._zod.run(r,i)}});var Lr=P("$ZodNullable",(e,t)=>{Z.init(e,t),V(e._zod,"optin",()=>t.innerType._zod.optin),V(e._zod,"optout",()=>t.innerType._zod.optout),V(e._zod,"pattern",()=>{let r=t.innerType._zod.pattern;return r?new RegExp(`^(${Ke(r.source)}|null)$`):void 0}),V(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(r,i)=>r.value===null?r:t.innerType._zod.run(r,i)});var Zr=P("$ZodPipe",(e,t)=>{Z.init(e,t),V(e._zod,"values",()=>t.in._zod.values),V(e._zod,"optin",()=>t.in._zod.optin),V(e._zod,"optout",()=>t.out._zod.optout),V(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(r,i)=>{if(i.direction==="backward"){let p=t.out._zod.run(r,i);return p instanceof Promise?p.then(d=>Ye(d,t.in,i)):Ye(p,t.in,i)}let s=t.in._zod.run(r,i);return s instanceof Promise?s.then(p=>Ye(p,t.out,i)):Ye(s,t.out,i)}});function Ye(e,t,r){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},r)}o(Ye,"handlePipeResult");var Fr=P("$ZodCustom",(e,t)=>{ae.init(e,t),Z.init(e,t),e._zod.parse=(r,i)=>r,e._zod.check=r=>{let i=r.value,s=t.fn(i);if(s instanceof Promise)return s.then(p=>Tr(p,r,i,e));Tr(s,r,i,e)}});function Tr(e,t,r,i){if(!e){let s={code:"custom",input:r,inst:i,path:[...i._zod.def.path??[]],continue:!i._zod.def.abort};i._zod.def.params&&(s.params=i._zod.def.params),t.issues.push(vt(s))}}o(Tr,"handleRefineResult");var Br;var bt=class{static{o(this,"$ZodRegistry")}constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...r){let i=r[0];return this._map.set(t,i),i&&typeof i=="object"&&"id"in i&&this._idmap.set(i.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 i={...this.get(r)??{}};delete i.id;let s={...i,...this._map.get(t)};return Object.keys(s).length?s:void 0}return this._map.get(t)}has(t){return this._map.has(t)}};function Wr(){return new bt}o(Wr,"registry");(Br=globalThis).__zod_globalRegistry??(Br.__zod_globalRegistry=Wr());var Et=globalThis.__zod_globalRegistry;function Gr(e,t){return new e({type:"string",...j(t)})}o(Gr,"_string");function Hr(e,t){return new e({type:"string",coerce:!0,...j(t)})}o(Hr,"_coercedString");function Kr(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...j(t)})}o(Kr,"_url");function Jr(e,t){return new e({type:"number",checks:[],...j(t)})}o(Jr,"_number");function Xr(e,t){return new e({type:"number",coerce:!0,checks:[],...j(t)})}o(Xr,"_coercedNumber");function qr(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...j(t)})}o(qr,"_int");function Yr(e,t){return new e({type:"boolean",...j(t)})}o(Yr,"_boolean");function Qr(e,t){return new e({type:"boolean",coerce:!0,...j(t)})}o(Qr,"_coercedBoolean");function en(e,t){return new e({type:"bigint",coerce:!0,...j(t)})}o(en,"_coercedBigint");function tn(e){return new e({type:"any"})}o(tn,"_any");function rn(e){return new e({type:"unknown"})}o(rn,"_unknown");function nn(e,t){return new e({type:"void",...j(t)})}o(nn,"_void");function on(e,t){return new e({type:"date",coerce:!0,...j(t)})}o(on,"_coercedDate");function tt(e,t){return new gr({check:"greater_than",...j(t),value:e,inclusive:!0})}o(tt,"_gte");function J(e,t){return new hr({check:"min_length",...j(t),minimum:e})}o(J,"_minLength");function se(e,t){return new vr({check:"string_format",format:"regex",...j(t),pattern:e})}o(se,"_regex");function an(e,t,r){let i=j(r);return i.abort??(i.abort=!0),new e({type:"custom",check:"custom",fn:t,...i})}o(an,"_custom");var B=P("ZodMiniType",(e,t)=>{if(!e._zod)throw new Error("Uninitialized schema in ZodMiniType.");Z.init(e,t),e.def=t,e.type=t.type,e.parse=(r,i)=>Xe(e,r,i,{callee:e.parse}),e.safeParse=(r,i)=>ze(e,r,i),e.parseAsync=async(r,i)=>qe(e,r,i,{callee:e.parseAsync}),e.safeParseAsync=async(r,i)=>Se(e,r,i),e.check=(...r)=>e.clone({...t,checks:[...t.checks??[],...r.map(i=>typeof i=="function"?{_zod:{check:i,def:{check:"custom"},onattach:[]}}:i)]},{parent:!0}),e.with=e.check,e.clone=(r,i)=>Je(e,r,i),e.brand=()=>e,e.register=((r,i)=>(r.add(e,i),e)),e.apply=r=>r(e)}),nt=P("ZodMiniString",(e,t)=>{et.init(e,t),B.init(e,t)});function n(e){return Gr(nt,e)}o(n,"string");var sn=P("ZodMiniStringFormat",(e,t)=>{Pt.init(e,t),nt.init(e,t)});var Jo=P("ZodMiniURL",(e,t)=>{br.init(e,t),sn.init(e,t)});function un(e){return Kr(Jo,e)}o(un,"url");var ot=P("ZodMiniNumber",(e,t)=>{It.init(e,t),B.init(e,t)});function W(e){return Jr(ot,e)}o(W,"number");var Xo=P("ZodMiniNumberFormat",(e,t)=>{Er.init(e,t),ot.init(e,t)});function cn(e){return qr(Xo,e)}o(cn,"int");var zt=P("ZodMiniBoolean",(e,t)=>{$t.init(e,t),B.init(e,t)});function U(e){return Yr(zt,e)}o(U,"boolean");var ln=P("ZodMiniBigInt",(e,t)=>{zr.init(e,t),B.init(e,t)});var qo=P("ZodMiniAny",(e,t)=>{Sr.init(e,t),B.init(e,t)});function ke(){return tn(qo)}o(ke,"any");var Yo=P("ZodMiniUnknown",(e,t)=>{Ar.init(e,t),B.init(e,t)});function S(){return rn(Yo)}o(S,"unknown");var Qo=P("ZodMiniVoid",(e,t)=>{kr.init(e,t),B.init(e,t)});function pn(e){return nn(Qo,e)}o(pn,"_void");var dn=P("ZodMiniDate",(e,t)=>{Or.init(e,t),B.init(e,t)});var ei=P("ZodMiniArray",(e,t)=>{wr.init(e,t),B.init(e,t)});function O(e,t){return new ei({type:"array",element:e,...j(t)})}o(O,"array");var ti=P("ZodMiniObject",(e,t)=>{Rr.init(e,t),B.init(e,t),V(e,"shape",()=>t.shape)});function u(e,t){let r={type:"object",shape:e??{},...j(t)};return new ti(r)}o(u,"object");var ri=P("ZodMiniUnion",(e,t)=>{Tt.init(e,t),B.init(e,t)});function w(e,t){return new ri({type:"union",options:e,...j(t)})}o(w,"union");var ni=P("ZodMiniDiscriminatedUnion",(e,t)=>{Dr.init(e,t),B.init(e,t)});function ue(e,t,r){return new ni({type:"union",options:t,discriminator:e,...j(r)})}o(ue,"discriminatedUnion");var oi=P("ZodMiniRecord",(e,t)=>{Nr.init(e,t),B.init(e,t)});function A(e,t,r){return new oi({type:"record",keyType:e,valueType:t,...j(r)})}o(A,"record");var ii=P("ZodMiniEnum",(e,t)=>{Cr.init(e,t),B.init(e,t),e.options=Object.values(t.entries)});function D(e,t){let r=Array.isArray(e)?Object.fromEntries(e.map(i=>[i,i])):e;return new ii({type:"enum",entries:r,...j(t)})}o(D,"_enum");var ai=P("ZodMiniLiteral",(e,t)=>{Ur.init(e,t),B.init(e,t)});function T(e,t){return new ai({type:"literal",values:Array.isArray(e)?e:[e],...j(t)})}o(T,"literal");var si=P("ZodMiniTransform",(e,t)=>{Mr.init(e,t),B.init(e,t)});function ce(e){return new si({type:"transform",transform:e})}o(ce,"transform");var ui=P("ZodMiniOptional",(e,t)=>{jr.init(e,t),B.init(e,t)});function f(e){return new ui({type:"optional",innerType:e})}o(f,"optional");var ci=P("ZodMiniNullable",(e,t)=>{Lr.init(e,t),B.init(e,t)});function Oe(e){return new ci({type:"nullable",innerType:e})}o(Oe,"nullable");var li=P("ZodMiniPipe",(e,t)=>{Zr.init(e,t),B.init(e,t)});function le(e,t){return new li({type:"pipe",in:e,out:t})}o(le,"pipe");var pi=P("ZodMiniCustom",(e,t)=>{Fr.init(e,t),B.init(e,t)});function it(e,t){return an(pi,e??(()=>!0),t)}o(it,"custom");var we={};Qt(we,{bigint:()=>hi,boolean:()=>yi,date:()=>vi,number:()=>gi,string:()=>fi});function fi(e){return Hr(nt,e)}o(fi,"string");function gi(e){return Xr(ot,e)}o(gi,"number");function yi(e){return Qr(zt,e)}o(yi,"boolean");function hi(e){return en(ln,e)}o(hi,"bigint");function vi(e){return on(dn,e)}o(vi,"date");var At=u({retryOnFailure:u({defaultValue:f(U()),hide:f(U())}),continueOnFailure:u({defaultValue:f(U()),hide:f(U())})}),St=class{constructor(t,r,i,s,p,d,m,v,x,I,N){this.name=t;this.displayName=r;this.description=i;this.props=s;this.run=p;this.test=d;this.requireAuth=m;this.errorHandlingOptions=v;this.outputSchema=x;this.audience=I;this.aiMetadata=N}static{o(this,"IAction")}},fn=o(e=>new St(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 C=u({displayName:n(),description:f(n())}),R=o((e,t)=>u({type:T(t),required:U(),defaultValue:f(ke())}),"TPropertyValue");var G=u({...C.shape,...R(n(),"SHORT_TEXT").shape}),Q=u({...C.shape,...R(n(),"LONG_TEXT").shape});var gn=u({label:n(),value:S()}),at=u({disabled:f(U()),placeholder:f(n()),options:O(gn)});var H=u({...C.shape,options:at,...R(S(),"STATIC_DROPDOWN").shape}),ee=u({...C.shape,options:at,...R(O(S()),"STATIC_MULTI_SELECT_DROPDOWN").shape});var kt=u({...C.shape,...R(S(),"DROPDOWN").shape,refreshers:O(n())}),Re=u({...C.shape,...R(O(S()),"MULTI_SELECT_DROPDOWN").shape,refreshers:O(n())});var te=u({...C.shape,...R(U(),"CHECKBOX").shape});var re=u({...C.shape,...R(W(),"NUMBER").shape});var De=u({...C.shape,...R(S(),"FILE").shape});var Ne=u({...C.shape,...R(n(),"DATE_TIME").shape});var yn=A(n(),w([G,Q,H,Re,ee,te,re,De,Ne])),Ce=u({...C.shape,properties:yn,...R(O(S()),"ARRAY").shape});var Ue=u({...C.shape,...R(w([A(n(),S())]),"JSON").shape});var hn=w([G,H,Ue,Ce,ee]),_i=A(n(),hn),Ot=u({refreshers:O(n()),...C.shape,...R(S(),"DYNAMIC").shape});var st=u({...C.shape,...R(pn(),"MARKDOWN").shape});var Me=(r=>(r.ARCHIVE="ARCHIVE",r.REGISTRY="REGISTRY",r))(Me||{}),xe=(r=>(r.CUSTOM="CUSTOM",r.OFFICIAL="OFFICIAL",r))(xe||{}),_e=(y=>(y.ARTIFICIAL_INTELLIGENCE="ARTIFICIAL_INTELLIGENCE",y.COMMUNICATION="COMMUNICATION",y.COMMERCE="COMMERCE",y.CORE="CORE",y.UNIVERSAL_AI="UNIVERSAL_AI",y.FLOW_CONTROL="FLOW_CONTROL",y.BUSINESS_INTELLIGENCE="BUSINESS_INTELLIGENCE",y.ACCOUNTING="ACCOUNTING",y.PRODUCTIVITY="PRODUCTIVITY",y.CONTENT_AND_FILES="CONTENT_AND_FILES",y.DEVELOPER_TOOLS="DEVELOPER_TOOLS",y.CUSTOMER_SUPPORT="CUSTOMER_SUPPORT",y.FORMS_AND_SURVEYS="FORMS_AND_SURVEYS",y.HUMAN_RESOURCES="HUMAN_RESOURCES",y.PAYMENT_PROCESSING="PAYMENT_PROCESSING",y.MARKETING="MARKETING",y.SALES_AND_CRM="SALES_AND_CRM",y))(_e||{});var je=(r=>(r.AUTHORIZATION_CODE="authorization_code",r.CLIENT_CREDENTIALS="client_credentials",r))(je||{}),wt="both_client_credentials_and_authorization_code";var me=(s=>(s.POLLING="POLLING",s.WEBHOOK="WEBHOOK",s.APP_WEBHOOK="APP_WEBHOOK",s.MANUAL="MANUAL",s))(me||{}),Le=(p=>(p.NONE="NONE",p.HEADER_PRESENT="HEADER_PRESENT",p.QUERY_PRESENT="QUERY_PRESENT",p.BODY_PARAM_PRESENT="BODY_PARAM_PRESENT",p.HEAD_REQUEST="HEAD_REQUEST",p))(Le||{}),Pi=u({strategy:D(Le),paramName:f(n())}),Ze=(r=>(r.SIMULATION="SIMULATION",r.TEST_FUNCTION="TEST_FUNCTION",r))(Ze||{});var ut=(r=>(r.WEBSOCKET="WEBSOCKET",r.NONE="NONE",r))(ut||{}),vn=u({status:f(W()),body:f(S()),headers:f(A(n(),n()))}),xn=u({type:T("DELAY"),resumeDateTime:n(),requestIdToReply:f(n()),handlerId:f(n()),streamStepProgress:f(D(ut))}),_n=u({type:T("WEBHOOK"),requestId:n(),requestIdToReply:f(n()),response:vn,handlerId:f(n()),streamStepProgress:f(D(ut))}),Ii=w([xn,_n]);var $i=u({body:S(),rawBody:f(S()),headers:A(n(),n()),queryParams:A(n(),n())});function pe(e){return e==null}o(pe,"isNil");var Rt=Be(require("crypto"),1);var Ti=128,fe,Pe,bi=o(e=>{!fe||fe.length<e?(fe=Buffer.allocUnsafe(e*Ti),Rt.default.randomFillSync(fe),Pe=0):Pe+e>fe.length&&(Rt.default.randomFillSync(fe),Pe=0),Pe+=e},"fillPool"),Ei=o(e=>(bi(e|=0),fe.subarray(Pe-e,Pe)),"random"),zi=o((e,t,r)=>{let i=(2<<31-Math.clz32(e.length-1|1))-1,s=Math.ceil(1.6*i*t/e.length);return(p=t)=>{let d="";for(;;){let m=r(s),v=s;for(;v--;)if(d+=e[m[v]&i]||"",d.length===p)return d}}},"customRandom"),In=o((e,t=21)=>zi(e,t,Ei),"customAlphabet");var Si="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",$n=21,Sy=n().check(se(new RegExp(`^[0-9a-zA-Z]{${$n}}$`))),Ai=In(Si,$n);var de=le(ce(e=>e instanceof Date?e.toISOString():e),n()),K={id:n(),created:de,updated:de},L=o(e=>f(Oe(e)),"Nullable");function Dt(e){return f(Oe(D(e)))}o(Dt,"NullableEnum");var Oy=le(ce(e=>e==="true"||e===!0?!0:e==="false"||e===!1?!1:void 0),f(U())),ct=o(e=>le(ce(t=>Array.isArray(t)?t:t!==void 0?[t]:void 0),f(O(e))),"OptionalArrayFromQuery");var Dy=A(n(),S());var Fe=(I=>(I.OPENAI="openai",I.OPENROUTER="openrouter",I.ANTHROPIC="anthropic",I.AZURE="azure",I.GOOGLE="google",I.ACTIVEPIECES="activepieces",I.CLOUDFLARE_GATEWAY="cloudflare-gateway",I.CUSTOM="custom",I.BEDROCK="bedrock",I.MISTRAL="mistral",I))(Fe||{});var Gy=n().check(se(/^#[0-9A-Fa-f]{6}$/));var Ky=u({filename:n(),data:S(),type:T("file"),mimetype:f(n())});var ki=Be(bn());var th=u({...K,name:n(),permissions:O(n()),platformId:L(n()),type:n(),userCount:f(W())});var En=(i=>(i.AGENT_DECIDE="agent-decide",i.CHOOSE_YOURSELF="choose-yourself",i.LEAVE_EMPTY="leave-empty",i))(En||{}),Nt=(r=>(r.FILE="FILE",r.TABLE="TABLE",r))(Nt||{}),Ct=(i=>(i.SSE="sse",i.STREAMABLE_HTTP="streamable-http",i.SIMPLE_HTTP="http",i))(Ct||{});var Ut=(i=>(i.TEXT="text",i.NUMBER="number",i.BOOLEAN="boolean",i))(Ut||{});var Mt=(r=>(r.IN_PROGRESS="in-progress",r.COMPLETED="completed",r))(Mt||{});var Oi=u({mode:D(En),value:S()}),wi=u({auth:f(n()),fields:A(n(),Oi)}),Ri=u({pieceName:n(),pieceVersion:n(),actionName:n(),predefinedInput:f(wi)}),Di=u({type:T("PIECE"),toolName:n().check(J(1)),pieceMetadata:Ri}),Ni=u({type:T("none")}),Ci=u({type:T("access_token"),accessToken:n()}),Ui=u({type:T("api_key"),apiKey:n(),apiKeyHeader:n()}),Mi=u({type:T("headers"),headers:A(n(),n())}),ji=ue("type",[Ni,Ci,Ui,Mi]),zn=u({type:T("FLOW"),toolName:n().check(J(1)),externalFlowId:n(),flowDisplayName:f(n())}),Sn=u({type:T("MCP"),toolName:n().check(J(1)),serverUrl:un(),protocol:D(Ct),auth:ji}),An=u({type:T("KNOWLEDGE_BASE"),toolName:n().check(J(1)),sourceType:D(Nt),sourceId:n(),sourceName:n()}),Li=ue("type",[Di,zn,Sn,An]),Zi=u({displayName:n(),description:f(n()),type:D(Ut)}),kn=u({type:T("MARKDOWN"),markdown:n()}),Ie={type:T("TOOL_CALL"),input:L(A(n(),S())),output:f(S()),toolName:n(),status:D(Mt),toolCallId:n(),startTime:n(),endTime:f(n())},Sh=u(Ie),On=ue("toolCallType",[u({...Ie,toolCallType:T("PIECE"),pieceName:n(),pieceVersion:n(),actionName:n()}),u({...Ie,toolCallType:T("FLOW"),displayName:n(),externalFlowId:n()}),u({...Ie,toolCallType:T("MCP"),displayName:n(),serverUrl:n()}),u({...Ie,toolCallType:T("KNOWLEDGE_BASE"),displayName:n(),sourceType:n()}),u({...Ie,toolCallType:T("UNKNOWN"),displayName:n()})]),Fi=w([kn,On]);var jt=(r=>(r.IMAGE="image",r.TEXT="text",r))(jt||{}),ne=u({apiKey:n()}),Vi=ne,Bi=u({apiKey:n(),apiKeyHash:n()}),Wi=ne,Gi=ne,Hi=ne,Ki=ne,Ji=ne,Xi=ne,qi=ne,wn=u({accessKeyId:n().check(J(1)),secretAccessKey:n().check(J(1))}),Yi=u({}),Qi=u({}),ea=u({}),ta=u({}),ra=u({}),na=u({}),Rn=u({modelId:n(),modelName:n(),modelType:D(jt)}),Dn=u({apiKeyHeader:n(),baseUrl:n(),models:O(Rn),defaultHeaders:f(A(n(),n()))}),Nn=u({accountId:n(),gatewayId:n(),models:O(Rn),vertexProject:f(n()),vertexRegion:f(n())}),Cn=u({resourceName:n(),apiVersion:le(ce(e=>typeof e=="string"&&e.trim().length===0?void 0:e),f(n()))}),Un=u({region:n().check(J(1))}),oa=w([Vi,Hi,Ki,Ji,Xi,Gi,Wi,Bi,wn,qi]),Mn=w([Dn,Nn,Cn,Un,Yi,ea,ta,ra,Qi,na]),ia=u({id:n(),name:n(),type:D(jt)}),aa=u({id:n(),name:n(),provider:D(Fe),config:Mn,enabledForChat:U()}),sa=u({provider:D(Fe),config:Mn,auth:oa,platformId:n()});var wh={openai:"openai",anthropic:"anthropic","google-ai-studio":"google","google-vertex-ai":"google"};var ua=u({base64Url:n(),fileName:n(),extension:f(n())}),ca=u({mimeType:n(),url:n(),fileName:f(n())}),Lt=w([ua,ca]);var la=w([u({type:T("file"),value:Lt}),u({type:T("markdown"),value:n(),files:f(O(Lt))})]),pa=u({sessionId:n(),message:n(),files:f(O(n()))});var Ln=(r=>(r.ON_NEW_RECORD="ON_NEW_RECORD",r.ON_UPDATE_RECORD="ON_UPDATE_RECORD",r))(Ln||{}),Zn=(r=>(r.ENABLED="ENABLED",r.DISABLED="DISABLED",r))(Zn||{}),Zt=(i=>(i.RECORD_CREATED="RECORD_CREATED",i.RECORD_UPDATED="RECORD_UPDATED",i.RECORD_DELETED="RECORD_DELETED",i))(Zt||{});var da=w([u({...K,name:n(),externalId:n(),type:T("STATIC_DROPDOWN"),tableId:n(),projectId:n(),data:u({options:O(u({value:n()}))})}),u({...K,name:n(),externalId:n(),type:w([T("TEXT"),T("NUMBER"),T("DATE")]),tableId:n(),projectId:n()})]),ma=u({...K,name:n(),folderId:L(n()),projectId:n(),externalId:n(),status:Dt(Zn),trigger:Dt(Ln)}),fa=u({...K,tableId:n(),projectId:n(),cells:A(n(),u({updated:n(),created:n(),value:S(),fieldName:n()}))}),ga=u({events:O(D(Zt)),webhookUrl:n(),flowId:n()}),ya=u({fields:O(u({id:n(),name:n()})),rows:O(A(n(),n())),name:n()}),ha=u({projectId:n(),limit:f(we.number()),cursor:f(n()),name:f(n()),externalIds:ct(n()),folderId:f(n()),folderIds:ct(n())}),va=u({records:O(O(u({fieldId:n(),value:Vn()}))),tableId:n()}),xa=u({cells:f(O(u({fieldId:n(),value:Vn()}))),tableId:n(),agentUpdate:f(U())}),Fn=ue("operator",[ge("eq"),ge("neq"),ge("gt"),ge("gte"),ge("lt"),ge("lte"),ge("co"),jn("exists"),jn("not_exists")]),_a=u({tableId:n(),limit:f(we.number()),cursor:f(n()),filters:ct(Fn)});function Vn(){return le(ce(e=>e==null?e:String(e)),Oe(n()))}o(Vn,"coerceToString");function ge(e){return u({fieldId:n(),operator:T(e),value:n()})}o(ge,"valueFilter");function jn(e){return u({fieldId:n(),operator:T(e)})}o(jn,"existenceFilter");var Pa=u({status:f(W()),body:f(S()),headers:f(A(n(),n()))}),Ia=u({...K,deleted:L(de),ownerId:n(),displayName:n(),platformId:n(),externalId:L(n())});var Bn=u({name:n(),description:f(n()),type:n(),required:U()}),$a=u({pieceName:n(),triggerName:n(),input:u({toolName:n(),toolDescription:n(),inputSchema:O(Bn),returnsResponse:U()})});var Wn="^[0-9]+\\.[0-9]+\\.[0-9]+$",qh=new RegExp(Wn),ba="^([~^])?[0-9]+\\.[0-9]+\\.[0-9]+$",Yh=n().check(se(new RegExp(Wn))),Qh=n().check(se(new RegExp(ba))),Ea=u({packageType:T("ARCHIVE"),pieceType:D(xe),pieceName:n(),pieceVersion:n(),archiveId:n(),platformId:n()}),Gn=u({packageType:T("REGISTRY"),pieceType:T("OFFICIAL"),pieceName:n(),pieceVersion:n()}),Hn=u({packageType:T("REGISTRY"),pieceType:T("CUSTOM"),pieceName:n(),pieceVersion:n(),platformId:n()}),ev=w([Gn,Hn]),tv=w([Ea,Gn,Hn]);var za=ue("type",[u({type:T("CRON_EXPRESSION"),cronExpression:n(),timezone:n()}),u({type:T("INTERVAL"),intervalMs:cn().check(tt(6e4))})]),rv=u({...K,type:D(me),projectId:n(),flowId:n(),triggerName:n(),schedule:L(za),flowVersionId:n(),pieceName:n(),pieceVersion:n(),deleted:L(n()),simulate:U()}),Kn=(l=>(l.UNKNOWN="UNKNOWN",l.FLOW_RUN_LOG="FLOW_RUN_LOG",l.FLOW_RUN_LOG_SLICE="FLOW_RUN_LOG_SLICE",l.PACKAGE_ARCHIVE="PACKAGE_ARCHIVE",l.FLOW_STEP_FILE="FLOW_STEP_FILE",l.SAMPLE_DATA="SAMPLE_DATA",l.TRIGGER_PAYLOAD="TRIGGER_PAYLOAD",l.SAMPLE_DATA_INPUT="SAMPLE_DATA_INPUT",l.TRIGGER_EVENT_FILE="TRIGGER_EVENT_FILE",l.PROJECT_RELEASE="PROJECT_RELEASE",l.FLOW_VERSION_BACKUP="FLOW_VERSION_BACKUP",l.PLATFORM_ASSET="PLATFORM_ASSET",l.USER_PROFILE_PICTURE="USER_PROFILE_PICTURE",l.WEBHOOK_PAYLOAD="WEBHOOK_PAYLOAD",l.KNOWLEDGE_BASE="KNOWLEDGE_BASE",l.FLOW_BUNDLE="FLOW_BUNDLE",l))(Kn||{}),Jn=(r=>(r.NONE="NONE",r.ZSTD="ZSTD",r))(Jn||{}),Xn=(r=>(r.S3="S3",r.DB="DB",r))(Xn||{}),nv=u({...K,projectId:L(n()),platformId:L(n()),type:D(Kn),compression:D(Jn),data:f(S()),location:D(Xn),size:L(W()),fileName:L(n()),s3Key:L(n()),metadata:L(A(n(),n()))}),qn=(i=>(i.ADMIN="ADMIN",i.MEMBER="MEMBER",i.OPERATOR="OPERATOR",i))(qn||{}),Yn=(r=>(r.ACTIVE="ACTIVE",r.INACTIVE="INACTIVE",r))(Yn||{}),ov=u({id:n(),email:n(),firstName:n(),status:D(Yn),externalId:L(n()),platformId:L(n()),platformRole:D(qn),lastName:n(),created:de,updated:de,lastActiveDate:L(de),imageUrl:L(n())});var Ft=u({...C.shape,...R(A(n(),S()),"OBJECT").shape});var ro=u({...C.shape,...R(n(),"COLOR").shape});var Vt=w([G,Q,st,te,H,ee,kt,Re,Ot,re,Ce,Ft,Ue,Ne,De,ro]),pt={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 q=u({displayName:n(),description:f(n())});var no=u({username:n(),password:n()}),Bt=u({...q.shape,username:u({displayName:n(),description:f(n())}),password:u({displayName:n(),description:f(n())}),...R(no,"BASIC_AUTH").shape});var Oa=A(n(),w([G,Q,re,te,H])),Wt=u({...q.shape,props:Oa,...R(S(),"CUSTOM_AUTH").shape});var ye=u({...q.shape,...R(u({auth:n()}),"SECRET_TEXT").shape});var wa=A(n(),w([G,Q,ye,re,te,H,ee,st])),oo=u({...q.shape,props:wa,...R(S(),"OIDC").shape});var Gt=(r=>(r.HEADER="HEADER",r.BODY="BODY",r))(Gt||{}),io=w([G,ye,H]),ao=A(n(),io),Ra=u({props:f(A(n(),io)),authUrl:n(),tokenUrl:n(),scope:O(n()),prompt:f(w([T("none"),T("consent"),T("login"),T("omit")])),pkce:f(U()),pkceMethod:f(w([T("plain"),T("S256")])),authorizationMethod:f(D(Gt)),grantType:f(w([D(je),T(wt)])),extra:f(A(n(),n()))}),so=u({access_token:n(),props:f(ao),data:A(n(),ke())}),Ht=u({...q.shape,...Ra.shape,...R(so,"OAUTH2").shape});var $e=w([Bt,Wt,oo,Ht,ye]),Ve="Connection",Kt={SecretText(e){return{...e,valueSchema:void 0,type:"SECRET_TEXT"}},OAuth2(e){return{...e,valueSchema:void 0,type:"OAUTH2",displayName:e.displayName||Ve}},BasicAuth(e){return{...e,valueSchema:void 0,type:"BASIC_AUTH",displayName:e.displayName||Ve,required:!0}},CustomAuth(e){return{...e,valueSchema:void 0,type:"CUSTOM_AUTH",displayName:e.displayName||Ve}},OIDC(e){return{...e,valueSchema:void 0,type:"OIDC",displayName:e.displayName||Ve}},None(){}};var Cx={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 Da=u({...C.shape,...R(S(),"CUSTOM").shape,code:n()});var Ca=w([Vt,$e]),Jt=A(n(),Ca),r_=A(n(),Vt);var uo=w([u({strategy:T("CRON"),cronExpression:n()}),u({strategy:T("NONE")})]);var co="2",dt="0.82.0";var Xt=class{constructor(t,r,i,s,p,d,m,v,x=dt,I,N="",_){this.displayName=t;this.logoUrl=r;this.authors=i;this.events=s;this.categories=m;this.auth=v;this.minimumSupportedRelease=x;this.maximumSupportedRelease=I;this.description=N;this.deprecated=_;this._actions={};this._triggers={};this.getContextInfo=o(()=>({version:co}),"getContextInfo");(!Ua(x)||Ma(x,dt))&&(this.minimumSupportedRelease=dt),p.forEach(a=>this._actions[a.name]=a),d.forEach(a=>this._triggers[a.name]=a)}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}},lo=o(e=>{if(e.auth&&Array.isArray(e.auth)&&!e.auth.every((r,i,s)=>i===s.findIndex(p=>p.type===r.type)))throw new Error("Auth properties must be unique by type");return new Xt(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 Ua(e){return/^\d+\.\d+\.\d+$/.test(e)}o(Ua,"isValidSimpleSemver");function Ma(e,t){let[r,i,s]=e.split(".").map(Number),[p,d,m]=t.split(".").map(Number);return r!==p?r<p:i!==d?i<d:s<m}o(Ma,"isSemverLessThan");var ja=f(A(n(),A(n(),n()))),po=u({id:f(n()),name:n(),displayName:n(),logoUrl:n(),description:n(),authors:O(n()),platformId:f(n()),directoryPath:f(n()),auth:f(w([$e,O($e)])),version:n(),categories:f(O(D(_e))),minimumSupportedRelease:f(n()),maximumSupportedRelease:f(n()),deprecated:f(U()),i18n:ja}),La=D(["human","ai","both"]),mo=u({description:f(n()),idempotent:f(U())}),fo=u({name:n(),displayName:n(),description:n(),props:Jt,requireAuth:U(),errorHandlingOptions:f(At),outputSchema:f(it()),audience:f(La),aiMetadata:f(mo)}),go=u({name:n(),displayName:n(),description:n(),props:Jt,errorHandlingOptions:f(At),type:D(me),sampleData:S(),handshakeConfiguration:f(it()),renewConfiguration:f(uo),testStrategy:D(Ze),outputSchema:f(it()),aiMetadata:f(mo)}),Za=u({...po.shape,actions:A(n(),fo),triggers:A(n(),go)}),Fa=u({...po.shape,actions:W(),triggers:W(),suggestedActions:f(O(fo)),suggestedTriggers:f(O(go))}),yo=u({projectUsage:W(),pieceType:D(xe),packageType:D(Me),platformId:f(n()),archiveId:f(n())}),rP=u({...Za.shape,...yo.shape}),nP=u({...Fa.shape,...yo.shape}),oP=u({name:n(),version:n()});var Va=Be(require("path")),Ba=Be(require("fs/promises"));var Wa=`
|
|
2
|
+
**Advanced Piece**
|
|
3
|
+
<br>
|
|
4
|
+
Use this piece if you are unsure which connection to use beforehand, such as when the connection external ID is sent through a webhook message.
|
|
5
|
+
|
|
6
|
+
**Notes:**
|
|
7
|
+
- You can retrieve the external ID from the connection settings page by hovering over the connection name.
|
|
8
|
+
- Use this action to retrieve connection values by their external IDs from this project.
|
|
9
|
+
- After testing the step, you can use the dynamic value in the piece by clicking (X) and referring to this step.
|
|
10
|
+
`,ho=fn({audience:"both",name:"read_connection",displayName:"Read Connection",description:"Fetch connection by name",props:{info:pt.MarkDown({value:Wa}),connection_name:pt.ShortText({displayName:"Connection External ID",description:void 0,required:!0})},async run(e){let t=await e.connections.get(e.propsValue.connection_name);if(pe(t))throw new Error(JSON.stringify({message:"Connection not found",connectionName:e.propsValue.connection_name}));return t}});var Ga=lo({displayName:"Connections",description:"Read connections dynamically",minimumSupportedRelease:"0.36.1",logoUrl:"https://cdn.activepieces.com/pieces/new-core/connections.svg",categories:["CORE"],auth:Kt.None(),authors:["kishanprmr","AbdulTheActivePiecer","khaledmashaly","abuaboud"],actions:[ho],triggers:[]});0&&(module.exports={connections});
|
package/src/index.d.ts
DELETED
package/src/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,WAAW,2DAUtB,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,iDAAqD;AACrD,mEAA+D;AAElD,QAAA,WAAW,GAAG,IAAA,8BAAW,EAAC;IACrC,WAAW,EAAE,aAAa;IAC1B,WAAW,EAAE,8BAA8B;IAC3C,uBAAuB,EAAE,QAAQ;IACjC,OAAO,EAAE,8DAA8D;IACvE,UAAU,EAAE,CAAC,sBAAa,CAAC,IAAI,CAAC;IAChC,IAAI,EAAE,4BAAS,CAAC,IAAI,EAAE;IACtB,OAAO,EAAE,CAAC,YAAY,EAAC,sBAAsB,EAAC,eAAe,EAAC,UAAU,CAAC;IACzE,OAAO,EAAE,CAAC,gCAAc,CAAC;IACzB,QAAQ,EAAE,EAAE;CACb,CAAC,CAAC"}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
export declare const readConnection: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").PieceAuthProperty, {
|
|
2
|
-
info: import("@activepieces/pieces-framework/dist/src/lib/property/input/markdown-property").MarkDownProperty;
|
|
3
|
-
connection_name: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
4
|
-
}>;
|
|
5
|
-
//# sourceMappingURL=read-connection.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"read-connection.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/read-connection.ts"],"names":[],"mappings":"AAcA,eAAO,MAAM,cAAc;;;EAyBzB,CAAC"}
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.readConnection = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
|
-
const shared_1 = require("@activepieces/shared");
|
|
7
|
-
const markdown = `
|
|
8
|
-
**Advanced Piece**
|
|
9
|
-
<br>
|
|
10
|
-
Use this piece if you are unsure which connection to use beforehand, such as when the connection external ID is sent through a webhook message.
|
|
11
|
-
|
|
12
|
-
**Notes:**
|
|
13
|
-
- You can retrieve the external ID from the connection settings page by hovering over the connection name.
|
|
14
|
-
- Use this action to retrieve connection values by their external IDs from this project.
|
|
15
|
-
- After testing the step, you can use the dynamic value in the piece by clicking (X) and referring to this step.
|
|
16
|
-
`;
|
|
17
|
-
exports.readConnection = (0, pieces_framework_1.createAction)({
|
|
18
|
-
audience: 'human',
|
|
19
|
-
name: 'read_connection',
|
|
20
|
-
displayName: 'Read Connection',
|
|
21
|
-
description: 'Fetch connection by name',
|
|
22
|
-
props: {
|
|
23
|
-
info: pieces_framework_1.Property.MarkDown({
|
|
24
|
-
value: markdown,
|
|
25
|
-
}),
|
|
26
|
-
connection_name: pieces_framework_1.Property.ShortText({
|
|
27
|
-
displayName: 'Connection External ID',
|
|
28
|
-
description: undefined,
|
|
29
|
-
required: true,
|
|
30
|
-
}),
|
|
31
|
-
},
|
|
32
|
-
run(ctx) {
|
|
33
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
34
|
-
const connection = yield ctx.connections.get(ctx.propsValue.connection_name);
|
|
35
|
-
if ((0, shared_1.isNil)(connection)) {
|
|
36
|
-
throw new Error(JSON.stringify({
|
|
37
|
-
message: 'Connection not found',
|
|
38
|
-
connectionName: ctx.propsValue.connection_name,
|
|
39
|
-
}));
|
|
40
|
-
}
|
|
41
|
-
return connection;
|
|
42
|
-
});
|
|
43
|
-
},
|
|
44
|
-
});
|
|
45
|
-
//# sourceMappingURL=read-connection.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"read-connection.js","sourceRoot":"","sources":["../../../../src/lib/actions/read-connection.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,iDAA6C;AAE7C,MAAM,QAAQ,GAAG;;;;;;;;;CAShB,CAAC;AAEW,QAAA,cAAc,GAAG,IAAA,+BAAY,EAAC;IACzC,QAAQ,EAAE,OAAO;IACjB,IAAI,EAAE,iBAAiB;IACvB,WAAW,EAAE,iBAAiB;IAC9B,WAAW,EAAE,0BAA0B;IACvC,KAAK,EAAE;QACL,IAAI,EAAE,2BAAQ,CAAC,QAAQ,CAAC;YACtB,KAAK,EAAE,QAAQ;SAChB,CAAC;QACF,eAAe,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAClC,WAAW,EAAE,wBAAwB;YACrC,WAAW,EAAE,SAAS;YACtB,QAAQ,EAAE,IAAI;SACf,CAAC;KACH;IACK,GAAG,CAAC,GAAG;;YACX,MAAM,UAAU,GAAG,MAAM,GAAG,CAAC,WAAW,CAAC,GAAG,CAAC,GAAG,CAAC,UAAU,CAAC,eAAe,CAAC,CAAC;YAC7E,IAAI,IAAA,cAAK,EAAC,UAAU,CAAC,EAAE,CAAC;gBACtB,MAAM,IAAI,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC;oBAC7B,OAAO,EAAE,sBAAsB;oBAC/B,cAAc,EAAE,GAAG,CAAC,UAAU,CAAC,eAAe;iBAC/C,CAAC,CAAC,CAAC;YACN,CAAC;YACD,OAAO,UAAU,CAAC;QACpB,CAAC;KAAA;CACF,CAAC,CAAC"}
|