@activepieces/piece-wrike 0.1.4 → 0.1.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/i18n/de.json +159 -0
- package/src/i18n/es.json +159 -0
- package/src/i18n/fr.json +159 -0
- package/src/i18n/ja.json +159 -0
- package/src/i18n/nl.json +159 -0
- package/src/i18n/pt.json +159 -0
- package/src/i18n/translation.json +159 -0
- package/src/i18n/zh.json +159 -0
- package/src/index.js +23 -52
- package/src/index.d.ts +0 -1
- package/src/index.js.map +0 -1
- package/src/lib/actions/add-comment.d.ts +0 -6
- package/src/lib/actions/add-comment.js +0 -61
- package/src/lib/actions/add-comment.js.map +0 -1
- package/src/lib/actions/create-folder.d.ts +0 -10
- package/src/lib/actions/create-folder.js +0 -107
- package/src/lib/actions/create-folder.js.map +0 -1
- package/src/lib/actions/create-project.d.ts +0 -9
- package/src/lib/actions/create-project.js +0 -100
- package/src/lib/actions/create-project.js.map +0 -1
- package/src/lib/actions/create-task.d.ts +0 -12
- package/src/lib/actions/create-task.js +0 -142
- package/src/lib/actions/create-task.js.map +0 -1
- package/src/lib/actions/find-folder.d.ts +0 -9
- package/src/lib/actions/find-folder.js +0 -108
- package/src/lib/actions/find-folder.js.map +0 -1
- package/src/lib/actions/find-task.d.ts +0 -12
- package/src/lib/actions/find-task.js +0 -156
- package/src/lib/actions/find-task.js.map +0 -1
- package/src/lib/actions/update-task.d.ts +0 -12
- package/src/lib/actions/update-task.js +0 -142
- package/src/lib/actions/update-task.js.map +0 -1
- package/src/lib/actions/upload-attachment.d.ts +0 -6
- package/src/lib/actions/upload-attachment.js +0 -64
- package/src/lib/actions/upload-attachment.js.map +0 -1
- package/src/lib/common/auth.d.ts +0 -1
- package/src/lib/common/auth.js +0 -22
- package/src/lib/common/auth.js.map +0 -1
- package/src/lib/common/client.d.ts +0 -12
- package/src/lib/common/client.js +0 -24
- package/src/lib/common/client.js.map +0 -1
- package/src/lib/triggers/new-folder.d.ts +0 -10
- package/src/lib/triggers/new-folder.js +0 -81
- package/src/lib/triggers/new-folder.js.map +0 -1
- package/src/lib/triggers/new-subtask.d.ts +0 -10
- package/src/lib/triggers/new-subtask.js +0 -82
- package/src/lib/triggers/new-subtask.js.map +0 -1
- package/src/lib/triggers/new-task.d.ts +0 -10
- package/src/lib/triggers/new-task.js +0 -81
- package/src/lib/triggers/new-task.js.map +0 -1
package/src/index.js
CHANGED
|
@@ -1,52 +1,23 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
const add_comment_1 = require("./lib/actions/add-comment");
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
logoUrl: "https://cdn.activepieces.com/pieces/wrike.png",
|
|
25
|
-
categories: [shared_1.PieceCategory.PRODUCTIVITY],
|
|
26
|
-
authors: ['owuzo', 'sanket-a11y'],
|
|
27
|
-
actions: [
|
|
28
|
-
create_task_1.createTask,
|
|
29
|
-
update_task_1.updateTask,
|
|
30
|
-
create_folder_1.createFolder,
|
|
31
|
-
create_project_1.createProject,
|
|
32
|
-
add_comment_1.addComment,
|
|
33
|
-
upload_attachment_1.uploadAttachment,
|
|
34
|
-
find_task_1.findTask,
|
|
35
|
-
find_folder_1.findFolder,
|
|
36
|
-
(0, pieces_common_1.createCustomApiCallAction)({
|
|
37
|
-
baseUrl: () => 'https://www.wrike.com/api/v4',
|
|
38
|
-
auth: auth_1.wrikeAuth,
|
|
39
|
-
authMapping: (auth) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
40
|
-
return ({
|
|
41
|
-
Authorization: `Bearer ${auth.access_token}`,
|
|
42
|
-
});
|
|
43
|
-
}),
|
|
44
|
-
}),
|
|
45
|
-
],
|
|
46
|
-
triggers: [
|
|
47
|
-
new_task_1.newTask,
|
|
48
|
-
new_folder_1.newFolder,
|
|
49
|
-
new_subtask_1.newSubtask,
|
|
50
|
-
],
|
|
51
|
-
});
|
|
52
|
-
//# sourceMappingURL=index.js.map
|
|
1
|
+
"use strict";var Hs=Object.create;var Ye=Object.defineProperty;var qs=Object.getOwnPropertyDescriptor;var Ws=Object.getOwnPropertyNames;var Gs=Object.getPrototypeOf,Ks=Object.prototype.hasOwnProperty;var o=(e,t)=>Ye(e,"name",{value:t,configurable:!0});var $=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),dn=(e,t)=>{for(var r in t)Ye(e,r,{get:t[r],enumerable:!0})},mn=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Ws(t))!Ks.call(e,i)&&i!==r&&Ye(e,i,{get:()=>t[i],enumerable:!(n=qs(t,i))||n.enumerable});return e};var Re=(e,t,r)=>(r=e!=null?Hs(Gs(e)):{},mn(t||!e||!e.__esModule?Ye(r,"default",{value:e,enumerable:!0}):r,e)),Js=e=>mn(Ye({},"__esModule",{value:!0}),e);var wo=$((ko,Ft)=>{(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 g(s,d){if(s.indexOf("::")!==s.lastIndexOf("::"))return null;let h=0,m=-1,P=(s.match(p.zoneIndex)||[])[0],b,j;for(P&&(P=P.substring(1),s=s.replace(/%.+$/,""));(m=s.indexOf(":",m+1))>=0;)h++;if(s.substr(0,2)==="::"&&h--,s.substr(-2,2)==="::"&&h--,h>d)return null;for(j=d-h,b=":";j--;)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 ne=s.split(":"),se=[];for(let Xe=0;Xe<ne.length;Xe++)se.push(parseInt(ne[Xe],16));return se}(),{parts:d,zoneId:P}}o(g,"expandIPv6");function f(s,d,h,m){if(s.length!==d.length)throw new Error("ipaddr: cannot match CIDR for objects with different lengths");let P=0,b;for(;m>0;){if(b=h-m,b<0&&(b=0),s[P]>>b!==d[P]>>b)return!1;m-=h,P+=1}return!0}o(f,"matchCIDR");function _(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(_,"parseIntAuto");function I(s,d){for(;s.length<d;)s=`0${s}`;return s}o(I,"padPart");let y={};y.IPv4=function(){function s(d){if(d.length!==4)throw new Error("ipaddr: ipv4 octet count should be 4");let h,m;for(h=0;h<d.length;h++)if(m=d[h],!(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,h){let m;if(h===void 0&&(m=d,d=m[0],h=m[1]),d.kind()!=="ipv4")throw new Error("ipaddr: cannot match ipv4 address with non-ipv4 one");return f(this.octets,d.octets,8,h)},s.prototype.prefixLengthFromSubnetMask=function(){let d=0,h=!1,m={0:8,128:7,192:6,224:5,240:4,248:3,252:2,254:1,255:0},P,b,j;for(P=3;P>=0;P-=1)if(b=this.octets[P],b in m){if(j=m[b],h&&j!==0)return null;j!==8&&(h=!0),d+=j}else return null;return 32-d},s.prototype.range=function(){return y.subnetMatch(this,this.SpecialRanges)},s.prototype.toByteArray=function(){return this.octets.slice(0)},s.prototype.toIPv4MappedAddress=function(){return y.IPv6.parse(`::ffff:${this.toString()}`)},s.prototype.toNormalizedString=function(){return this.toString()},s.prototype.toString=function(){return this.octets.join(".")},s}(),y.IPv4.broadcastAddressFromCIDR=function(s){try{let d=this.parseCIDR(s),h=d[0].toByteArray(),m=this.subnetMaskFromPrefixLength(d[1]).toByteArray(),P=[],b=0;for(;b<4;)P.push(parseInt(h[b],10)|parseInt(m[b],10)^255),b++;return new this(P)}catch{throw new Error("ipaddr: the address does not have IPv4 CIDR format")}},y.IPv4.isIPv4=function(s){return this.parser(s)!==null},y.IPv4.isValid=function(s){try{return new this(this.parser(s)),!0}catch{return!1}},y.IPv4.isValidCIDR=function(s){try{return this.parseCIDR(s),!0}catch{return!1}},y.IPv4.isValidFourPartDecimal=function(s){return!!(y.IPv4.isValid(s)&&s.match(/^(0|[1-9]\d*)(\.(0|[1-9]\d*)){3}$/))},y.IPv4.isValidCIDRFourPartDecimal=function(s){let d=s.match(/^(.+)\/(\d+)$/);return!y.IPv4.isValidCIDR(s)||!d?!1:y.IPv4.isValidFourPartDecimal(d[1])},y.IPv4.networkAddressFromCIDR=function(s){let d,h,m,P,b;try{for(d=this.parseCIDR(s),m=d[0].toByteArray(),b=this.subnetMaskFromPrefixLength(d[1]).toByteArray(),P=[],h=0;h<4;)P.push(parseInt(m[h],10)&parseInt(b[h],10)),h++;return new this(P)}catch{throw new Error("ipaddr: the address does not have IPv4 CIDR format")}},y.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)},y.IPv4.parseCIDR=function(s){let d;if(d=s.match(/^(.+)\/(\d+)$/)){let h=parseInt(d[2]);if(h>=0&&h<=32){let m=[this.parse(d[1]),h];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")},y.IPv4.parser=function(s){let d,h,m;if(d=s.match(r.fourOctet))return function(){let P=d.slice(1,6),b=[];for(let j=0;j<P.length;j++)h=P[j],b.push(_(h));return b}();if(d=s.match(r.longValue)){if(m=_(d[1]),m>4294967295||m<0)throw new Error("ipaddr: address outside defined range");return function(){let P=[],b;for(b=0;b<=24;b+=8)P.push(m>>b&255);return P}().reverse()}else return(d=s.match(r.twoOctet))?function(){let P=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 P=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},y.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],h=0,m=Math.floor(s/8);for(;h<m;)d[h]=255,h++;return m<4&&(d[m]=Math.pow(2,s%8)-1<<8-s%8),new this(d)},y.IPv6=function(){function s(d,h){let m,P;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(P=this.parts[m],!(0<=P&&P<=65535))throw new Error("ipaddr: ipv6 part should fit in 16 bits");h&&(this.zoneId=h)}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,h){let m;if(h===void 0&&(m=d,d=m[0],h=m[1]),d.kind()!=="ipv6")throw new Error("ipaddr: cannot match ipv6 address with non-ipv6 one");return f(this.parts,d.parts,16,h)},s.prototype.prefixLengthFromSubnetMask=function(){let d=0,h=!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},P,b;for(let j=7;j>=0;j-=1)if(P=this.parts[j],P in m){if(b=m[P],h&&b!==0)return null;b!==16&&(h=!0),d+=b}else return null;return 128-d},s.prototype.range=function(){return y.subnetMatch(this,this.SpecialRanges)},s.prototype.toByteArray=function(){let d,h=[],m=this.parts;for(let P=0;P<m.length;P++)d=m[P],h.push(d>>8),h.push(d&255);return h},s.prototype.toFixedLengthString=function(){let d=function(){let m=[];for(let P=0;P<this.parts.length;P++)m.push(I(this.parts[P].toString(16),4));return m}.call(this).join(":"),h="";return this.zoneId&&(h=`%${this.zoneId}`),d+h},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),h=d[0],m=d[1];return new y.IPv4([h>>8,h&255,m>>8,m&255])},s.prototype.toNormalizedString=function(){let d=function(){let m=[];for(let P=0;P<this.parts.length;P++)m.push(this.parts[P].toString(16));return m}.call(this).join(":"),h="";return this.zoneId&&(h=`%${this.zoneId}`),d+h},s.prototype.toRFC5952String=function(){let d=/((^|:)(0(:|$)){2,})/g,h=this.toNormalizedString(),m=0,P=-1,b;for(;b=d.exec(h);)b[0].length>P&&(m=b.index,P=b[0].length);return P<0?h:`${h.substring(0,m)}::${h.substring(m+P)}`},s.prototype.toString=function(){return this.toRFC5952String()},s}(),y.IPv6.broadcastAddressFromCIDR=function(s){try{let d=this.parseCIDR(s),h=d[0].toByteArray(),m=this.subnetMaskFromPrefixLength(d[1]).toByteArray(),P=[],b=0;for(;b<16;)P.push(parseInt(h[b],10)|parseInt(m[b],10)^255),b++;return new this(P)}catch(d){throw new Error(`ipaddr: the address does not have IPv6 CIDR format (${d})`)}},y.IPv6.isIPv6=function(s){return this.parser(s)!==null},y.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}},y.IPv6.isValidCIDR=function(s){if(typeof s=="string"&&s.indexOf(":")===-1)return!1;try{return this.parseCIDR(s),!0}catch{return!1}},y.IPv6.networkAddressFromCIDR=function(s){let d,h,m,P,b;try{for(d=this.parseCIDR(s),m=d[0].toByteArray(),b=this.subnetMaskFromPrefixLength(d[1]).toByteArray(),P=[],h=0;h<16;)P.push(parseInt(m[h],10)&parseInt(b[h],10)),h++;return new this(P)}catch(j){throw new Error(`ipaddr: the address does not have IPv6 CIDR format (${j})`)}},y.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)},y.IPv6.parseCIDR=function(s){let d,h,m;if((h=s.match(/^(.+)\/(\d+)$/))&&(d=parseInt(h[2]),d>=0&&d<=128))return m=[this.parse(h[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")},y.IPv6.parser=function(s){let d,h,m,P,b,j;if(m=s.match(p.deprecatedTransitional))return this.parser(`::ffff:${m[1]}`);if(p.native.test(s))return g(s,8);if((m=s.match(p.transitional))&&(j=m[6]||"",d=m[1],m[1].endsWith("::")||(d=d.slice(0,-1)),d=g(d+j,6),d.parts)){for(b=[parseInt(m[2]),parseInt(m[3]),parseInt(m[4]),parseInt(m[5])],h=0;h<b.length;h++)if(P=b[h],!(0<=P&&P<=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},y.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],h=0,m=Math.floor(s/8);for(;h<m;)d[h]=255,h++;return m<16&&(d[m]=Math.pow(2,s%8)-1<<8-s%8),new this(d)},y.fromByteArray=function(s){let d=s.length;if(d===4)return new y.IPv4(s);if(d===16)return new y.IPv6(s);throw new Error("ipaddr: the binary input is neither an IPv6 nor IPv4 address")},y.isValid=function(s){return y.IPv6.isValid(s)||y.IPv4.isValid(s)},y.isValidCIDR=function(s){return y.IPv6.isValidCIDR(s)||y.IPv4.isValidCIDR(s)},y.parse=function(s){if(y.IPv6.isValid(s))return y.IPv6.parse(s);if(y.IPv4.isValid(s))return y.IPv4.parse(s);throw new Error("ipaddr: the address has neither IPv6 nor IPv4 format")},y.parseCIDR=function(s){try{return y.IPv6.parseCIDR(s)}catch{try{return y.IPv4.parseCIDR(s)}catch{throw new Error("ipaddr: the address has neither IPv6 nor IPv4 CIDR format")}}},y.process=function(s){let d=this.parse(s);return d.kind()==="ipv6"&&d.isIPv4MappedAddress()?d.toIPv4Address():d},y.subnetMatch=function(s,d,h){let m,P,b,j;h==null&&(h="unicast");for(P in d)if(Object.prototype.hasOwnProperty.call(d,P)){for(b=d[P],b[0]&&!(b[0]instanceof Array)&&(b=[b]),m=0;m<b.length;m++)if(j=b[m],s.kind()===j[0].kind()&&s.match.apply(s,j))return P}return h},typeof Ft<"u"&&Ft.exports?Ft.exports=y:e.ipaddr=y})(ko)});var Si=$((XS,$i)=>{var Ei=require("stream").Stream,Ep=require("util");$i.exports=pe;function pe(){this.source=null,this.dataSize=0,this.maxDataSize=1024*1024,this.pauseStream=!0,this._maxDataSizeExceeded=!1,this._released=!1,this._bufferedEvents=[]}o(pe,"DelayedStream");Ep.inherits(pe,Ei);pe.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(pe.prototype,"readable",{configurable:!0,enumerable:!0,get:o(function(){return this.source.readable},"get")});pe.prototype.setEncoding=function(){return this.source.setEncoding.apply(this.source,arguments)};pe.prototype.resume=function(){this._released||this.release(),this.source.resume()};pe.prototype.pause=function(){this.source.pause()};pe.prototype.release=function(){this._released=!0,this._bufferedEvents.forEach(function(e){this.emit.apply(this,e)}.bind(this)),this._bufferedEvents=[]};pe.prototype.pipe=function(){var e=Ei.prototype.pipe.apply(this,arguments);return this.resume(),e};pe.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)};pe.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 wi=$((QS,ki)=>{var $p=require("util"),zi=require("stream").Stream,Ai=Si();ki.exports=K;function K(){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(K,"CombinedStream");$p.inherits(K,zi);K.create=function(e){var t=new this;e=e||{};for(var r in e)t[r]=e[r];return t};K.isStreamLike=function(e){return typeof e!="function"&&typeof e!="string"&&typeof e!="boolean"&&typeof e!="number"&&!Buffer.isBuffer(e)};K.prototype.append=function(e){var t=K.isStreamLike(e);if(t){if(!(e instanceof Ai)){var r=Ai.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};K.prototype.pipe=function(e,t){return zi.prototype.pipe.call(this,e,t),this.resume(),e};K.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}};K.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=K.isStreamLike(r);n&&(r.on("data",this._checkDataSize.bind(this)),this._handleErrors(r)),this._pipeNext(r)}.bind(this))};K.prototype._pipeNext=function(e){this._currentStream=e;var t=K.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()};K.prototype._handleErrors=function(e){var t=this;e.on("error",function(r){t._emitError(r)})};K.prototype.write=function(e){this.emit("data",e)};K.prototype.pause=function(){this.pauseStreams&&(this.pauseStreams&&this._currentStream&&typeof this._currentStream.pause=="function"&&this._currentStream.pause(),this.emit("pause"))};K.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")};K.prototype.end=function(){this._reset(),this.emit("end")};K.prototype.destroy=function(){this._reset(),this.emit("close")};K.prototype._reset=function(){this.writable=!1,this._streams=[],this._currentStream=null};K.prototype._checkDataSize=function(){if(this._updateDataSize(),!(this.dataSize<=this.maxDataSize)){var e="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this._emitError(new Error(e))}};K.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)};K.prototype._emitError=function(e){this._reset(),this.emit("error",e)}});var Di=$((tA,Oi)=>{"use strict";Oi.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 Ci=$(re=>{"use strict";var Wt=Di(),Sp=require("path").extname,Ri=/^\s*([^;\s]*)(?:;|\s|$)/,Ap=/^text\//i;re.charset=Ni;re.charsets={lookup:Ni};re.contentType=zp;re.extension=kp;re.extensions=Object.create(null);re.lookup=wp;re.types=Object.create(null);Op(re.extensions,re.types);function Ni(e){if(!e||typeof e!="string")return!1;var t=Ri.exec(e),r=t&&Wt[t[1].toLowerCase()];return r&&r.charset?r.charset:t&&Ap.test(t[1])?"UTF-8":!1}o(Ni,"charset");function zp(e){if(!e||typeof e!="string")return!1;var t=e.indexOf("/")===-1?re.lookup(e):e;if(!t)return!1;if(t.indexOf("charset")===-1){var r=re.charset(t);r&&(t+="; charset="+r.toLowerCase())}return t}o(zp,"contentType");function kp(e){if(!e||typeof e!="string")return!1;var t=Ri.exec(e),r=t&&re.extensions[t[1].toLowerCase()];return!r||!r.length?!1:r[0]}o(kp,"extension");function wp(e){if(!e||typeof e!="string")return!1;var t=Sp("x."+e).toLowerCase().substr(1);return t&&re.types[t]||!1}o(wp,"lookup");function Op(e,t){var r=["nginx","apache",void 0,"iana"];Object.keys(Wt).forEach(o(function(i){var u=Wt[i],c=u.extensions;if(!(!c||!c.length)){e[i]=c;for(var p=0;p<c.length;p++){var g=c[p];if(t[g]){var f=r.indexOf(Wt[t[g]].source),_=r.indexOf(u.source);if(t[g]!=="application/octet-stream"&&(f>_||f===_&&t[g].substr(0,12)==="application/"))continue}t[g]=i}}},"forEachMimeType"))}o(Op,"populateMaps")});var Mi=$((oA,Ui)=>{Ui.exports=Dp;function Dp(e){var t=typeof setImmediate=="function"?setImmediate:typeof process=="object"&&typeof process.nextTick=="function"?process.nextTick:null;t?t(e):setTimeout(e,0)}o(Dp,"defer")});var Br=$((aA,Li)=>{var ji=Mi();Li.exports=Rp;function Rp(e){var t=!1;return ji(function(){t=!0}),o(function(n,i){t?e(n,i):ji(o(function(){e(n,i)},"nextTick_callback"))},"async_callback")}o(Rp,"async")});var Zr=$((uA,Fi)=>{Fi.exports=Np;function Np(e){Object.keys(e.jobs).forEach(Cp.bind(e)),e.jobs={}}o(Np,"abort");function Cp(e){typeof this.jobs[e]=="function"&&this.jobs[e]()}o(Cp,"clean")});var Vr=$((pA,Zi)=>{var Bi=Br(),Up=Zr();Zi.exports=Mp;function Mp(e,t,r,n){var i=r.keyedList?r.keyedList[r.index]:r.index;r.jobs[i]=jp(t,i,e[i],function(u,c){i in r.jobs&&(delete r.jobs[i],u?Up(r):r.results[i]=c,n(u,r.results))})}o(Mp,"iterate");function jp(e,t,r,n){var i;return e.length==2?i=e(r,Bi(n)):i=e(r,t,Bi(n)),i}o(jp,"runJob")});var Hr=$((dA,Vi)=>{Vi.exports=Lp;function Lp(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(Lp,"state")});var qr=$((fA,Hi)=>{var Fp=Zr(),Bp=Br();Hi.exports=Zp;function Zp(e){Object.keys(this.jobs).length&&(this.index=this.size,Fp(this),Bp(e)(null,this.results))}o(Zp,"terminator")});var Wi=$((yA,qi)=>{var Vp=Vr(),Hp=Hr(),qp=qr();qi.exports=Wp;function Wp(e,t,r){for(var n=Hp(e);n.index<(n.keyedList||e).length;)Vp(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 qp.bind(n,r)}o(Wp,"parallel")});var Wr=$((vA,Gt)=>{var Gi=Vr(),Gp=Hr(),Kp=qr();Gt.exports=Jp;Gt.exports.ascending=Ki;Gt.exports.descending=Xp;function Jp(e,t,r,n){var i=Gp(e,r);return Gi(e,t,i,o(function u(c,p){if(c){n(c,p);return}if(i.index++,i.index<(i.keyedList||e).length){Gi(e,t,i,u);return}n(null,i.results)},"iteratorHandler")),Kp.bind(i,n)}o(Jp,"serialOrdered");function Ki(e,t){return e<t?-1:e>t?1:0}o(Ki,"ascending");function Xp(e,t){return-1*Ki(e,t)}o(Xp,"descending")});var Xi=$((_A,Ji)=>{var Yp=Wr();Ji.exports=Qp;function Qp(e,t,r){return Yp(e,t,null,r)}o(Qp,"serial")});var Qi=$((bA,Yi)=>{Yi.exports={parallel:Wi(),serial:Xi(),serialOrdered:Wr()}});var Gr=$((IA,ea)=>{"use strict";ea.exports=Object});var ra=$((TA,ta)=>{"use strict";ta.exports=Error});var oa=$((EA,na)=>{"use strict";na.exports=EvalError});var aa=$(($A,ia)=>{"use strict";ia.exports=RangeError});var ua=$((SA,sa)=>{"use strict";sa.exports=ReferenceError});var pa=$((AA,ca)=>{"use strict";ca.exports=SyntaxError});var Kt=$((zA,la)=>{"use strict";la.exports=TypeError});var ma=$((kA,da)=>{"use strict";da.exports=URIError});var ga=$((wA,fa)=>{"use strict";fa.exports=Math.abs});var ha=$((OA,ya)=>{"use strict";ya.exports=Math.floor});var xa=$((DA,va)=>{"use strict";va.exports=Math.max});var Pa=$((RA,_a)=>{"use strict";_a.exports=Math.min});var Ia=$((NA,ba)=>{"use strict";ba.exports=Math.pow});var Ea=$((CA,Ta)=>{"use strict";Ta.exports=Math.round});var Sa=$((UA,$a)=>{"use strict";$a.exports=Number.isNaN||o(function(t){return t!==t},"isNaN")});var za=$((jA,Aa)=>{"use strict";var el=Sa();Aa.exports=o(function(t){return el(t)||t===0?t:t<0?-1:1},"sign")});var wa=$((FA,ka)=>{"use strict";ka.exports=Object.getOwnPropertyDescriptor});var Kr=$((BA,Oa)=>{"use strict";var Jt=wa();if(Jt)try{Jt([],"length")}catch{Jt=null}Oa.exports=Jt});var Ra=$((ZA,Da)=>{"use strict";var Xt=Object.defineProperty||!1;if(Xt)try{Xt({},"a",{value:1})}catch{Xt=!1}Da.exports=Xt});var Jr=$((VA,Na)=>{"use strict";Na.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 Ma=$((qA,Ua)=>{"use strict";var Ca=typeof Symbol<"u"&&Symbol,tl=Jr();Ua.exports=o(function(){return typeof Ca!="function"||typeof Symbol!="function"||typeof Ca("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:tl()},"hasNativeSymbols")});var Xr=$((GA,ja)=>{"use strict";ja.exports=typeof Reflect<"u"&&Reflect.getPrototypeOf||null});var Yr=$((KA,La)=>{"use strict";var rl=Gr();La.exports=rl.getPrototypeOf||null});var Za=$((JA,Ba)=>{"use strict";var nl="Function.prototype.bind called on incompatible ",ol=Object.prototype.toString,il=Math.max,al="[object Function]",Fa=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"),sl=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"),ul=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");Ba.exports=o(function(t){var r=this;if(typeof r!="function"||ol.apply(r)!==al)throw new TypeError(nl+r);for(var n=sl(arguments,1),i,u=o(function(){if(this instanceof i){var _=r.apply(this,Fa(n,arguments));return Object(_)===_?_:this}return r.apply(t,Fa(n,arguments))},"binder"),c=il(0,r.length-n.length),p=[],g=0;g<c;g++)p[g]="$"+g;if(i=Function("binder","return function ("+ul(p,",")+"){ return binder.apply(this,arguments); }")(u),r.prototype){var f=o(function(){},"Empty");f.prototype=r.prototype,i.prototype=new f,f.prototype=null}return i},"bind")});var qe=$((YA,Va)=>{"use strict";var cl=Za();Va.exports=Function.prototype.bind||cl});var Yt=$((QA,Ha)=>{"use strict";Ha.exports=Function.prototype.call});var Qr=$((ez,qa)=>{"use strict";qa.exports=Function.prototype.apply});var Ga=$((tz,Wa)=>{"use strict";Wa.exports=typeof Reflect<"u"&&Reflect&&Reflect.apply});var Ja=$((rz,Ka)=>{"use strict";var pl=qe(),ll=Qr(),dl=Yt(),ml=Ga();Ka.exports=ml||pl.call(dl,ll)});var Ya=$((nz,Xa)=>{"use strict";var fl=qe(),gl=Kt(),yl=Yt(),hl=Ja();Xa.exports=o(function(t){if(t.length<1||typeof t[0]!="function")throw new gl("a function is required");return hl(fl,yl,t)},"callBindBasic")});var os=$((iz,ns)=>{"use strict";var vl=Ya(),Qa=Kr(),ts;try{ts=[].__proto__===Array.prototype}catch(e){if(!e||typeof e!="object"||!("code"in e)||e.code!=="ERR_PROTO_ACCESS")throw e}var en=!!ts&&Qa&&Qa(Object.prototype,"__proto__"),rs=Object,es=rs.getPrototypeOf;ns.exports=en&&typeof en.get=="function"?vl([en.get]):typeof es=="function"?o(function(t){return es(t==null?t:rs(t))},"getDunder"):!1});var cs=$((sz,us)=>{"use strict";var is=Xr(),as=Yr(),ss=os();us.exports=is?o(function(t){return is(t)},"getProto"):as?o(function(t){if(!t||typeof t!="object"&&typeof t!="function")throw new TypeError("getProto: not an object");return as(t)},"getProto"):ss?o(function(t){return ss(t)},"getProto"):null});var tn=$((cz,ps)=>{"use strict";var xl=Function.prototype.call,_l=Object.prototype.hasOwnProperty,Pl=qe();ps.exports=Pl.call(xl,_l)});var hs=$((pz,ys)=>{"use strict";var M,bl=Gr(),Il=ra(),Tl=oa(),El=aa(),$l=ua(),Je=pa(),Ke=Kt(),Sl=ma(),Al=ga(),zl=ha(),kl=xa(),wl=Pa(),Ol=Ia(),Dl=Ea(),Rl=za(),fs=Function,rn=o(function(e){try{return fs('"use strict"; return ('+e+").constructor;")()}catch{}},"getEvalledConstructor"),xt=Kr(),Nl=Ra(),nn=o(function(){throw new Ke},"throwTypeError"),Cl=xt?function(){try{return arguments.callee,nn}catch{try{return xt(arguments,"callee").get}catch{return nn}}}():nn,We=Ma()(),Q=cs(),Ul=Yr(),Ml=Xr(),gs=Qr(),_t=Yt(),Ge={},jl=typeof Uint8Array>"u"||!Q?M:Q(Uint8Array),De={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?M:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?M:ArrayBuffer,"%ArrayIteratorPrototype%":We&&Q?Q([][Symbol.iterator]()):M,"%AsyncFromSyncIteratorPrototype%":M,"%AsyncFunction%":Ge,"%AsyncGenerator%":Ge,"%AsyncGeneratorFunction%":Ge,"%AsyncIteratorPrototype%":Ge,"%Atomics%":typeof Atomics>"u"?M:Atomics,"%BigInt%":typeof BigInt>"u"?M:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?M:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?M:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?M:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Il,"%eval%":eval,"%EvalError%":Tl,"%Float16Array%":typeof Float16Array>"u"?M:Float16Array,"%Float32Array%":typeof Float32Array>"u"?M:Float32Array,"%Float64Array%":typeof Float64Array>"u"?M:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?M:FinalizationRegistry,"%Function%":fs,"%GeneratorFunction%":Ge,"%Int8Array%":typeof Int8Array>"u"?M:Int8Array,"%Int16Array%":typeof Int16Array>"u"?M:Int16Array,"%Int32Array%":typeof Int32Array>"u"?M:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":We&&Q?Q(Q([][Symbol.iterator]())):M,"%JSON%":typeof JSON=="object"?JSON:M,"%Map%":typeof Map>"u"?M:Map,"%MapIteratorPrototype%":typeof Map>"u"||!We||!Q?M:Q(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":bl,"%Object.getOwnPropertyDescriptor%":xt,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?M:Promise,"%Proxy%":typeof Proxy>"u"?M:Proxy,"%RangeError%":El,"%ReferenceError%":$l,"%Reflect%":typeof Reflect>"u"?M:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?M:Set,"%SetIteratorPrototype%":typeof Set>"u"||!We||!Q?M:Q(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?M:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":We&&Q?Q(""[Symbol.iterator]()):M,"%Symbol%":We?Symbol:M,"%SyntaxError%":Je,"%ThrowTypeError%":Cl,"%TypedArray%":jl,"%TypeError%":Ke,"%Uint8Array%":typeof Uint8Array>"u"?M:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?M:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?M:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?M:Uint32Array,"%URIError%":Sl,"%WeakMap%":typeof WeakMap>"u"?M:WeakMap,"%WeakRef%":typeof WeakRef>"u"?M:WeakRef,"%WeakSet%":typeof WeakSet>"u"?M:WeakSet,"%Function.prototype.call%":_t,"%Function.prototype.apply%":gs,"%Object.defineProperty%":Nl,"%Object.getPrototypeOf%":Ul,"%Math.abs%":Al,"%Math.floor%":zl,"%Math.max%":kl,"%Math.min%":wl,"%Math.pow%":Ol,"%Math.round%":Dl,"%Math.sign%":Rl,"%Reflect.getPrototypeOf%":Ml};if(Q)try{null.error}catch(e){ls=Q(Q(e)),De["%Error.prototype%"]=ls}var ls,Ll=o(function e(t){var r;if(t==="%AsyncFunction%")r=rn("async function () {}");else if(t==="%GeneratorFunction%")r=rn("function* () {}");else if(t==="%AsyncGeneratorFunction%")r=rn("async function* () {}");else if(t==="%AsyncGenerator%"){var n=e("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if(t==="%AsyncIteratorPrototype%"){var i=e("%AsyncGenerator%");i&&Q&&(r=Q(i.prototype))}return De[t]=r,r},"doEval"),ds={__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"]},Pt=qe(),Qt=tn(),Fl=Pt.call(_t,Array.prototype.concat),Bl=Pt.call(gs,Array.prototype.splice),ms=Pt.call(_t,String.prototype.replace),er=Pt.call(_t,String.prototype.slice),Zl=Pt.call(_t,RegExp.prototype.exec),Vl=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Hl=/\\(\\)?/g,ql=o(function(t){var r=er(t,0,1),n=er(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 ms(t,Vl,function(u,c,p,g){i[i.length]=p?ms(g,Hl,"$1"):c||u}),i},"stringToPath"),Wl=o(function(t,r){var n=t,i;if(Qt(ds,n)&&(i=ds[n],n="%"+i[0]+"%"),Qt(De,n)){var u=De[n];if(u===Ge&&(u=Ll(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");ys.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(Zl(/^%?[^%]*%?$/,t)===null)throw new Je("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=ql(t),i=n.length>0?n[0]:"",u=Wl("%"+i+"%",r),c=u.name,p=u.value,g=!1,f=u.alias;f&&(i=f[0],Bl(n,Fl([0,1],f)));for(var _=1,I=!0;_<n.length;_+=1){var y=n[_],s=er(y,0,1),d=er(y,-1);if((s==='"'||s==="'"||s==="`"||d==='"'||d==="'"||d==="`")&&s!==d)throw new Je("property names with quotes must have matching quotes");if((y==="constructor"||!I)&&(g=!0),i+="."+y,c="%"+i+"%",Qt(De,c))p=De[c];else if(p!=null){if(!(y in p)){if(!r)throw new Ke("base intrinsic for "+t+" exists, but the property is not available.");return}if(xt&&_+1>=n.length){var h=xt(p,y);I=!!h,I&&"get"in h&&!("originalValue"in h.get)?p=h.get:p=p[y]}else I=Qt(p,y),p=p[y];I&&!g&&(De[c]=p)}}return p},"GetIntrinsic")});var xs=$((dz,vs)=>{"use strict";var Gl=Jr();vs.exports=o(function(){return Gl()&&!!Symbol.toStringTag},"hasToStringTagShams")});var bs=$((fz,Ps)=>{"use strict";var Kl=hs(),_s=Kl("%Object.defineProperty%",!0),Jl=xs()(),Xl=tn(),Yl=Kt(),tr=Jl?Symbol.toStringTag:null;Ps.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 Yl("if provided, the `overrideIfSet` and `nonConfigurable` options must be booleans");tr&&(n||!Xl(t,tr))&&(_s?_s(t,tr,{configurable:!i,enumerable:!1,value:r,writable:!1}):t[tr]=r)},"setToStringTag")});var Ts=$((yz,Is)=>{"use strict";var Ql=Function.prototype.call,ed=Object.prototype.hasOwnProperty,td=qe();Is.exports=td.call(Ql,ed)});var $s=$((hz,Es)=>{"use strict";Es.exports=function(e,t){return Object.keys(t).forEach(function(r){e[r]=e[r]||t[r]}),e}});var zs=$((vz,As)=>{"use strict";var un=wi(),rd=require("util"),on=require("path"),nd=require("http"),od=require("https"),id=require("url").parse,ad=require("fs"),sd=require("stream").Stream,ud=require("crypto"),an=Ci(),cd=Qi(),pd=bs(),Se=Ts(),sn=$s();function Ss(e){return String(e).replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/"/g,"%22")}o(Ss,"escapeHeaderParam");function L(e){if(!(this instanceof L))return new L(e);this._overheadLength=0,this._valueLength=0,this._valuesToMeasure=[],un.call(this),e=e||{};for(var t in e)this[t]=e[t]}o(L,"FormData");rd.inherits(L,un);L.LINE_BREAK=`\r
|
|
2
|
+
`;L.DEFAULT_CONTENT_TYPE="application/octet-stream";L.prototype.append=function(e,t,r){r=r||{},typeof r=="string"&&(r={filename:r});var n=un.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)};L.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)+L.LINE_BREAK.length,!(!t||!t.path&&!(t.readable&&Se(t,"httpVersion"))&&!(t instanceof sd))&&(r.knownLength||this._valuesToMeasure.push(t))};L.prototype._lengthRetriever=function(e,t){Se(e,"fd")?e.end!=null&&e.end!=1/0&&e.start!=null?t(null,e.end+1-(e.start?e.start:0)):ad.stat(e.path,function(r,n){if(r){t(r);return}var i=n.size-(e.start?e.start:0);t(null,i)}):Se(e,"httpVersion")?t(null,Number(e.headers["content-length"])):Se(e,"httpModule")?(e.on("response",function(r){e.pause(),t(null,Number(r.headers["content-length"]))}),e.resume()):t("Unknown stream")};L.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="'+Ss(e)+'"'].concat(n||[]),"Content-Type":[].concat(i||[])};typeof r.header=="object"&&sn(c,r.header);var p;for(var g in c)if(Se(c,g)){if(p=c[g],p==null)continue;Array.isArray(p)||(p=[p]),p.length&&(u+=g+": "+p.join("; ")+L.LINE_BREAK)}return"--"+this.getBoundary()+L.LINE_BREAK+u+L.LINE_BREAK};L.prototype._getContentDisposition=function(e,t){var r;if(typeof t.filepath=="string"?r=on.normalize(t.filepath).replace(/\\/g,"/"):t.filename||e&&(e.name||e.path)?r=on.basename(t.filename||e&&(e.name||e.path)):e&&e.readable&&Se(e,"httpVersion")&&(r=on.basename(e.client._httpMessage.path||"")),r)return'filename="'+Ss(r)+'"'};L.prototype._getContentType=function(e,t){var r=t.contentType;return!r&&e&&e.name&&(r=an.lookup(e.name)),!r&&e&&e.path&&(r=an.lookup(e.path)),!r&&e&&e.readable&&Se(e,"httpVersion")&&(r=e.headers["content-type"]),!r&&(t.filepath||t.filename)&&(r=an.lookup(t.filepath||t.filename)),!r&&e&&typeof e=="object"&&(r=L.DEFAULT_CONTENT_TYPE),r};L.prototype._multiPartFooter=function(){return function(e){var t=L.LINE_BREAK,r=this._streams.length===0;r&&(t+=this._lastBoundary()),e(t)}.bind(this)};L.prototype._lastBoundary=function(){return"--"+this.getBoundary()+"--"+L.LINE_BREAK};L.prototype.getHeaders=function(e){var t,r={"content-type":"multipart/form-data; boundary="+this.getBoundary()};for(t in e)Se(e,t)&&(r[t.toLowerCase()]=e[t]);return r};L.prototype.setBoundary=function(e){if(typeof e!="string")throw new TypeError("FormData boundary must be a string");this._boundary=e};L.prototype.getBoundary=function(){return this._boundary||this._generateBoundary(),this._boundary};L.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(L.LINE_BREAK)])));return Buffer.concat([e,Buffer.from(this._lastBoundary())])};L.prototype._generateBoundary=function(){this._boundary="--------------------------"+ud.randomBytes(12).toString("hex")};L.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};L.prototype.hasKnownLength=function(){var e=!0;return this._valuesToMeasure.length&&(e=!1),e};L.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}cd.parallel(this._valuesToMeasure,this._lengthRetriever,function(r,n){if(r){e(r);return}n.forEach(function(i){t+=i}),e(null,t)})};L.prototype.submit=function(e,t){var r,n,i={method:"post"};return typeof e=="string"?(e=id(e),n=sn({port:e.port,path:e.pathname,host:e.hostname,protocol:e.protocol},i)):(n=sn(e,i),n.port||(n.port=n.protocol==="https:"?443:80)),n.headers=this.getHeaders(e.headers),n.protocol==="https:"?r=od.request(n):r=nd.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,g=o(function(f,_){return r.removeListener("error",g),r.removeListener("response",p),t.call(this,f,_)},"callback");p=g.bind(this,null),r.on("error",g),r.on("response",p)}}.bind(this)),r};L.prototype._error=function(e){this.error||(this.error=e,this.pause(),this.emit("error",e))};L.prototype.toString=function(){return"[object FormData]"};pd(L.prototype,"FormData");As.exports=L});var _d={};dn(_d,{wrike:()=>xd});module.exports=Js(_d);var Xs=Object.freeze({status:"aborted"});function T(e,t,r){function n(p,g){if(p._zod||Object.defineProperty(p,"_zod",{value:{def:g,constr:c,traits:new Set},enumerable:!1}),p._zod.traits.has(e))return;p._zod.traits.add(e),t(p,g);let f=c.prototype,_=Object.keys(f);for(let I=0;I<_.length;I++){let y=_[I];y in p||(p[y]=f[y].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 g;let f=r?.Parent?new u:this;n(f,p),(g=f._zod).deferred??(g.deferred=[]);for(let _ of f._zod.deferred)_();return f}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(T,"$constructor");var Ys=Symbol("zod_brand"),le=class extends Error{static{o(this,"$ZodAsyncError")}constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},It=class extends Error{static{o(this,"$ZodEncodeError")}constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}},nr={};function ge(e){return e&&Object.assign(nr,e),nr}o(ge,"config");function ir(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(ir,"getEnumValues");function gn(e,t){return typeof t=="bigint"?t.toString():t}o(gn,"jsonStringifyReplacer");function Et(e){return{get value(){{let r=e();return Object.defineProperty(this,"value",{value:r}),r}throw new Error("cached value already set")}}}o(Et,"cached");function yn(e){return e==null}o(yn,"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 fn=Symbol("evaluating");function J(e,t,r){let n;Object.defineProperty(e,t,{get(){if(n!==fn)return n===void 0&&(n=fn,n=r()),n},set(i){Object.defineProperty(e,t,{value:i})},configurable:!0})}o(J,"defineLazy");var ar="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Qe(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}o(Qe,"isObject");var Qs=Et(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let e=Function;return new e(""),!0}catch{return!1}});function hn(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(hn,"isPlainObject");var vn=new Set(["string","number","symbol"]);function Ne(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}o(Ne,"escapeRegex");function St(e,t,r){let n=new e._zod.constr(t??e._zod.def);return(!t||r?.parent)&&(n._zod.parent=e),n}o(St,"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 xn(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}o(xn,"optionalKeys");var eu={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 Ce(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(Ce,"aborted");function Pe(e,t){return t.map(r=>{var n;return(n=r).path??(n.path=[]),r.path.unshift(e),r})}o(Pe,"prefixIssues");function Tt(e){return typeof e=="string"?e:e?.message}o(Tt,"unwrapMessage");function be(e,t,r){let n={...e,path:e.path??[]};if(!e.message){let i=Tt(e.inst?._zod.def?.error?.(e))??Tt(t?.error?.(e))??Tt(r.customError?.(e))??Tt(r.localeError?.(e))??"Invalid input";n.message=i}return delete n.inst,delete n.continue,t?.reportInput||delete n.input,n}o(be,"finalizeIssue");function _n(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}o(_n,"getLengthableOrigin");function sr(...e){let[t,r,n]=e;return typeof t=="string"?{message:t,code:"custom",input:r,inst:n}:{...t}}o(sr,"issue");var Pn=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,gn,2),Object.defineProperty(e,"toString",{value:o(()=>e.message,"value"),enumerable:!1})},"initializer"),bn=T("$ZodError",Pn),et=T("$ZodError",Pn,{Parent:Error});var ru=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 le;if(c.issues.length){let p=new(i?.Err??e)(c.issues.map(g=>be(g,u,ge())));throw ar(p,i?.callee),p}return c.value},"_parse"),At=ru(et),nu=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(g=>be(g,u,ge())));throw ar(p,i?.callee),p}return c.value},"_parseAsync"),zt=nu(et),ou=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 le;return u.issues.length?{success:!1,error:new(e??bn)(u.issues.map(c=>be(c,i,ge())))}:{success:!0,data:u.value}},"_safeParse"),tt=ou(et),iu=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=>be(c,i,ge())))}:{success:!0,data:u.value}},"_safeParseAsync"),rt=iu(et);var au="(?:(?:\\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])))",su=new RegExp(`^${au}$`);var In=o(e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},"string"),Tn=/^-?\d+n?$/;var ur=/^-?\d+(?:\.\d+)?$/,En=/^(?:true|false)$/i;var Ue=T("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])});var $n=T("$ZodCheckMinLength",(e,t)=>{var r;Ue.init(e,t),(r=e._zod.def).when??(r.when=n=>{let i=n.value;return!yn(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=_n(i);n.issues.push({origin:c,code:"too_small",minimum:t.minimum,inclusive:!0,input:i,inst:e,continue:!t.abort})}});var cr=T("$ZodCheckStringFormat",(e,t)=>{var r,n;Ue.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=()=>{})}),Sn=T("$ZodCheckRegex",(e,t)=>{cr.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 zn={major:4,minor:3,patch:6};var W=T("$ZodType",(e,t)=>{var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=zn;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,g)=>{let f=Ce(c),_;for(let I of p){if(I._zod.def.when){if(!I._zod.def.when(c))continue}else if(f)continue;let y=c.issues.length,s=I._zod.check(c);if(s instanceof Promise&&g?.async===!1)throw new le;if(_||s instanceof Promise)_=(_??Promise.resolve()).then(async()=>{await s,c.issues.length!==y&&(f||(f=Ce(c,y)))});else{if(c.issues.length===y)continue;f||(f=Ce(c,y))}}return _?_.then(()=>c):c},"runChecks"),u=o((c,p,g)=>{if(Ce(c))return c.aborted=!0,c;let f=i(p,n,g);if(f instanceof Promise){if(g.async===!1)throw new le;return f.then(_=>e._zod.parse(_,g))}return e._zod.parse(f,g)},"handleCanaryResult");e._zod.run=(c,p)=>{if(p.skipChecks)return e._zod.parse(c,p);if(p.direction==="backward"){let f=e._zod.parse({value:c.value,issues:[]},{...p,skipChecks:!0});return f instanceof Promise?f.then(_=>u(_,c,p)):u(f,c,p)}let g=e._zod.parse(c,p);if(g instanceof Promise){if(p.async===!1)throw new le;return g.then(f=>i(f,n,p))}return i(g,n,p)}}J(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}))}),Ot=T("$ZodString",(e,t)=>{W.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??In(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}}),pr=T("$ZodStringFormat",(e,t)=>{cr.init(e,t),Ot.init(e,t)});var Rn=T("$ZodURL",(e,t)=>{pr.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 Nn=T("$ZodNumber",(e,t)=>{W.init(e,t),e._zod.pattern=e._zod.bag.pattern??ur,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}});var lr=T("$ZodBoolean",(e,t)=>{W.init(e,t),e._zod.pattern=En,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}}),Cn=T("$ZodBigInt",(e,t)=>{W.init(e,t),e._zod.pattern=Tn,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 Un=T("$ZodAny",(e,t)=>{W.init(e,t),e._zod.parse=r=>r}),Mn=T("$ZodUnknown",(e,t)=>{W.init(e,t),e._zod.parse=r=>r});var jn=T("$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}}),Ln=T("$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 kn(e,t,r){e.issues.length&&t.issues.push(...Pe(r,e.issues)),t.value[r]=e.value}o(kn,"handleArrayResult");var Fn=T("$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],g=t.element._zod.run({value:p,issues:[]},n);g instanceof Promise?u.push(g.then(f=>kn(f,r,c))):kn(g,r,c)}return u.length?Promise.all(u).then(()=>r):r}});function wt(e,t,r,n,i){if(e.issues.length){if(i&&!(r in n))return;t.issues.push(...Pe(r,e.issues))}e.value===void 0?r in n&&(t.value[r]=void 0):t.value[r]=e.value}o(wt,"handlePropertyResult");function uu(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=xn(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(r)}}o(uu,"normalizeDef");function cu(e,t,r,n,i,u){let c=[],p=i.keySet,g=i.catchall._zod,f=g.def.type,_=g.optout==="optional";for(let I in t){if(p.has(I))continue;if(f==="never"){c.push(I);continue}let y=g.run({value:t[I],issues:[]},n);y instanceof Promise?e.push(y.then(s=>wt(s,r,I,t,_))):wt(y,r,I,t,_)}return c.length&&r.issues.push({code:"unrecognized_keys",keys:c,input:t,inst:u}),e.length?Promise.all(e).then(()=>r):r}o(cu,"handleCatchall");var Bn=T("$ZodObject",(e,t)=>{if(W.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){let p=t.shape;Object.defineProperty(t,"shape",{get:o(()=>{let g={...p};return Object.defineProperty(t,"shape",{value:g}),g},"get")})}let n=Et(()=>uu(t));J(e._zod,"propValues",()=>{let p=t.shape,g={};for(let f in p){let _=p[f]._zod;if(_.values){g[f]??(g[f]=new Set);for(let I of _.values)g[f].add(I)}}return g});let i=Qe,u=t.catchall,c;e._zod.parse=(p,g)=>{c??(c=n.value);let f=p.value;if(!i(f))return p.issues.push({expected:"object",code:"invalid_type",input:f,inst:e}),p;p.value={};let _=[],I=c.shape;for(let y of c.keys){let s=I[y],d=s._zod.optout==="optional",h=s._zod.run({value:f[y],issues:[]},g);h instanceof Promise?_.push(h.then(m=>wt(m,p,y,f,d))):wt(h,p,y,f,d)}return u?cu(_,f,p,g,n.value,e):_.length?Promise.all(_).then(()=>p):p}});function wn(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=>!Ce(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=>be(c,n,ge())))}),t)}o(wn,"handleUnionResults");var dr=T("$ZodUnion",(e,t)=>{W.init(e,t),J(e._zod,"optin",()=>t.options.some(i=>i._zod.optin==="optional")?"optional":void 0),J(e._zod,"optout",()=>t.options.some(i=>i._zod.optout==="optional")?"optional":void 0),J(e._zod,"values",()=>{if(t.options.every(i=>i._zod.values))return new Set(t.options.flatMap(i=>Array.from(i._zod.values)))}),J(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 g of t.options){let f=g._zod.run({value:i.value,issues:[]},u);if(f instanceof Promise)p.push(f),c=!0;else{if(f.issues.length===0)return f;p.push(f)}}return c?Promise.all(p).then(g=>wn(g,i,e,u)):wn(p,i,e,u)}});var Zn=T("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,dr.init(e,t);let r=e._zod.parse;J(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,g]of Object.entries(c)){i[p]||(i[p]=new Set);for(let f of g)i[p].add(f)}}return i});let n=Et(()=>{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 g of p){if(u.has(g))throw new Error(`Duplicate discriminator value "${String(g)}"`);u.set(g,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 Vn=T("$ZodRecord",(e,t)=>{W.init(e,t),e._zod.parse=(r,n)=>{let i=r.value;if(!hn(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 f of c)if(typeof f=="string"||typeof f=="number"||typeof f=="symbol"){p.add(typeof f=="number"?f.toString():f);let _=t.valueType._zod.run({value:i[f],issues:[]},n);_ instanceof Promise?u.push(_.then(I=>{I.issues.length&&r.issues.push(...Pe(f,I.issues)),r.value[f]=I.value})):(_.issues.length&&r.issues.push(...Pe(f,_.issues)),r.value[f]=_.value)}let g;for(let f in i)p.has(f)||(g=g??[],g.push(f));g&&g.length>0&&r.issues.push({code:"unrecognized_keys",input:i,inst:e,keys:g})}else{r.value={};for(let p of Reflect.ownKeys(i)){if(p==="__proto__")continue;let g=t.keyType._zod.run({value:p,issues:[]},n);if(g instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof p=="string"&&ur.test(p)&&g.issues.length){let I=t.keyType._zod.run({value:Number(p),issues:[]},n);if(I instanceof Promise)throw new Error("Async schemas not supported in object keys currently");I.issues.length===0&&(g=I)}if(g.issues.length){t.mode==="loose"?r.value[p]=i[p]:r.issues.push({code:"invalid_key",origin:"record",issues:g.issues.map(I=>be(I,n,ge())),input:p,path:[p],inst:e});continue}let _=t.valueType._zod.run({value:i[p],issues:[]},n);_ instanceof Promise?u.push(_.then(I=>{I.issues.length&&r.issues.push(...Pe(p,I.issues)),r.value[g.value]=I.value})):(_.issues.length&&r.issues.push(...Pe(p,_.issues)),r.value[g.value]=_.value)}}return u.length?Promise.all(u).then(()=>r):r}});var Hn=T("$ZodEnum",(e,t)=>{W.init(e,t);let r=ir(t.entries),n=new Set(r);e._zod.values=n,e._zod.pattern=new RegExp(`^(${r.filter(i=>vn.has(typeof i)).map(i=>typeof i=="string"?Ne(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}}),qn=T("$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"?Ne(n):n?Ne(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 Wn=T("$ZodTransform",(e,t)=>{W.init(e,t),e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new It(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 le;return r.value=i,r}});function On(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}o(On,"handleOptionalResult");var Gn=T("$ZodOptional",(e,t)=>{W.init(e,t),e._zod.optin="optional",e._zod.optout="optional",J(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),J(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=>On(u,r.value)):On(i,r.value)}return r.value===void 0?r:t.innerType._zod.run(r,n)}});var Kn=T("$ZodNullable",(e,t)=>{W.init(e,t),J(e._zod,"optin",()=>t.innerType._zod.optin),J(e._zod,"optout",()=>t.innerType._zod.optout),J(e._zod,"pattern",()=>{let r=t.innerType._zod.pattern;return r?new RegExp(`^(${$t(r.source)}|null)$`):void 0}),J(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 Jn=T("$ZodPipe",(e,t)=>{W.init(e,t),J(e._zod,"values",()=>t.in._zod.values),J(e._zod,"optin",()=>t.in._zod.optin),J(e._zod,"optout",()=>t.out._zod.optout),J(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 Xn=T("$ZodCustom",(e,t)=>{Ue.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=>Dn(u,r,n,e));Dn(i,r,n,e)}});function Dn(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(sr(i))}}o(Dn,"handleRefineResult");var Qn,mu=Symbol("ZodOutput"),fu=Symbol("ZodInput"),mr=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 eo(){return new mr}o(eo,"registry");(Qn=globalThis).__zod_globalRegistry??(Qn.__zod_globalRegistry=eo());var fr=globalThis.__zod_globalRegistry;function to(e,t){return new e({type:"string",...q(t)})}o(to,"_string");function ro(e,t){return new e({type:"string",coerce:!0,...q(t)})}o(ro,"_coercedString");function no(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...q(t)})}o(no,"_url");function oo(e,t){return new e({type:"number",checks:[],...q(t)})}o(oo,"_number");function io(e,t){return new e({type:"number",coerce:!0,checks:[],...q(t)})}o(io,"_coercedNumber");function ao(e,t){return new e({type:"boolean",...q(t)})}o(ao,"_boolean");function so(e,t){return new e({type:"boolean",coerce:!0,...q(t)})}o(so,"_coercedBoolean");function uo(e,t){return new e({type:"bigint",coerce:!0,...q(t)})}o(uo,"_coercedBigint");function co(e){return new e({type:"any"})}o(co,"_any");function po(e){return new e({type:"unknown"})}o(po,"_unknown");function lo(e,t){return new e({type:"void",...q(t)})}o(lo,"_void");function mo(e,t){return new e({type:"date",coerce:!0,...q(t)})}o(mo,"_coercedDate");function ue(e,t){return new $n({check:"min_length",...q(t),minimum:e})}o(ue,"_minLength");function Ie(e,t){return new Sn({check:"string_format",format:"regex",...q(t),pattern:e})}o(Ie,"_regex");function fo(e,t,r){let n=q(r);return n.abort??(n.abort=!0),new e({type:"custom",check:"custom",fn:t,...n})}o(fo,"_custom");var X=T("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)=>At(e,r,n,{callee:e.parse}),e.safeParse=(r,n)=>tt(e,r,n),e.parseAsync=async(r,n)=>zt(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)=>St(e,r,n),e.brand=()=>e,e.register=(r,n)=>(r.add(e,n),e),e.apply=r=>r(e)}),Rt=T("ZodMiniString",(e,t)=>{Ot.init(e,t),X.init(e,t)});function a(e){return to(Rt,e)}o(a,"string");var go=T("ZodMiniStringFormat",(e,t)=>{pr.init(e,t),Rt.init(e,t)});var Tu=T("ZodMiniURL",(e,t)=>{Rn.init(e,t),go.init(e,t)});function yo(e){return no(Tu,e)}o(yo,"url");var gr=T("ZodMiniNumber",(e,t)=>{Nn.init(e,t),X.init(e,t)});function ee(e){return oo(gr,e)}o(ee,"number");var yr=T("ZodMiniBoolean",(e,t)=>{lr.init(e,t),X.init(e,t)});function B(e){return ao(yr,e)}o(B,"boolean");var ho=T("ZodMiniBigInt",(e,t)=>{Cn.init(e,t),X.init(e,t)});var Eu=T("ZodMiniAny",(e,t)=>{Un.init(e,t),X.init(e,t)});function ot(){return co(Eu)}o(ot,"any");var $u=T("ZodMiniUnknown",(e,t)=>{Mn.init(e,t),X.init(e,t)});function w(){return po($u)}o(w,"unknown");var Su=T("ZodMiniVoid",(e,t)=>{jn.init(e,t),X.init(e,t)});function vo(e){return lo(Su,e)}o(vo,"_void");var xo=T("ZodMiniDate",(e,t)=>{Ln.init(e,t),X.init(e,t)});var Au=T("ZodMiniArray",(e,t)=>{Fn.init(e,t),X.init(e,t)});function R(e,t){return new Au({type:"array",element:e,...q(t)})}o(R,"array");var zu=T("ZodMiniObject",(e,t)=>{Bn.init(e,t),X.init(e,t),J(e,"shape",()=>t.shape)});function l(e,t){let r={type:"object",shape:e??{},...q(t)};return new zu(r)}o(l,"object");var ku=T("ZodMiniUnion",(e,t)=>{dr.init(e,t),X.init(e,t)});function N(e,t){return new ku({type:"union",options:e,...q(t)})}o(N,"union");var wu=T("ZodMiniDiscriminatedUnion",(e,t)=>{Zn.init(e,t),X.init(e,t)});function Me(e,t,r){return new wu({type:"union",options:t,discriminator:e,...q(r)})}o(Me,"discriminatedUnion");var Ou=T("ZodMiniRecord",(e,t)=>{Vn.init(e,t),X.init(e,t)});function O(e,t,r){return new Ou({type:"record",keyType:e,valueType:t,...q(r)})}o(O,"record");var Du=T("ZodMiniEnum",(e,t)=>{Hn.init(e,t),X.init(e,t),e.options=Object.values(t.entries)});function U(e,t){let r=Array.isArray(e)?Object.fromEntries(e.map(n=>[n,n])):e;return new Du({type:"enum",entries:r,...q(t)})}o(U,"_enum");var Ru=T("ZodMiniLiteral",(e,t)=>{qn.init(e,t),X.init(e,t)});function S(e,t){return new Ru({type:"literal",values:Array.isArray(e)?e:[e],...q(t)})}o(S,"literal");var Nu=T("ZodMiniTransform",(e,t)=>{Wn.init(e,t),X.init(e,t)});function Te(e){return new Nu({type:"transform",transform:e})}o(Te,"transform");var Cu=T("ZodMiniOptional",(e,t)=>{Gn.init(e,t),X.init(e,t)});function v(e){return new Cu({type:"optional",innerType:e})}o(v,"optional");var Uu=T("ZodMiniNullable",(e,t)=>{Kn.init(e,t),X.init(e,t)});function it(e){return new Uu({type:"nullable",innerType:e})}o(it,"nullable");var Mu=T("ZodMiniPipe",(e,t)=>{Jn.init(e,t),X.init(e,t)});function Ee(e,t){return new Mu({type:"pipe",in:e,out:t})}o(Ee,"pipe");var ju=T("ZodMiniCustom",(e,t)=>{Xn.init(e,t),X.init(e,t)});function Nt(e,t){return fo(ju,e??(()=>!0),t)}o(Nt,"custom");var at={};dn(at,{bigint:()=>qu,boolean:()=>Hu,date:()=>Wu,number:()=>Vu,string:()=>Zu});function Zu(e){return ro(Rt,e)}o(Zu,"string");function Vu(e){return io(gr,e)}o(Vu,"number");function Hu(e){return so(yr,e)}o(Hu,"boolean");function qu(e){return uo(ho,e)}o(qu,"bigint");function Wu(e){return mo(xo,e)}o(Wu,"date");var vr=l({retryOnFailure:l({defaultValue:v(B()),hide:v(B())}),continueOnFailure:l({defaultValue:v(B()),hide:v(B())})}),hr=class{constructor(t,r,n,i,u,c,p,g,f,_,I){this.name=t;this.displayName=r;this.description=n;this.props=i;this.run=u;this.test=c;this.requireAuth=p;this.errorHandlingOptions=g;this.outputSchema=f;this.audience=_;this.aiMetadata=I}static{o(this,"IAction")}},Y=o(e=>new hr(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 F=l({displayName:a(),description:v(a())}),C=o((e,t)=>l({type:S(t),required:B(),defaultValue:v(ot())}),"TPropertyValue");var oe=l({...F.shape,...C(a(),"SHORT_TEXT").shape}),ye=l({...F.shape,...C(a(),"LONG_TEXT").shape});var Po=l({label:a(),value:w()}),Ct=l({disabled:v(B()),placeholder:v(a()),options:R(Po)});var ie=l({...F.shape,options:Ct,...C(w(),"STATIC_DROPDOWN").shape}),he=l({...F.shape,options:Ct,...C(R(w()),"STATIC_MULTI_SELECT_DROPDOWN").shape});var xr=l({...F.shape,...C(w(),"DROPDOWN").shape,refreshers:R(a())}),st=l({...F.shape,...C(R(w()),"MULTI_SELECT_DROPDOWN").shape,refreshers:R(a())});var ve=l({...F.shape,...C(B(),"CHECKBOX").shape});var xe=l({...F.shape,...C(ee(),"NUMBER").shape});var ut=l({...F.shape,...C(w(),"FILE").shape});var ct=l({...F.shape,...C(a(),"DATE_TIME").shape});var bo=O(a(),N([oe,ye,ie,st,he,ve,xe,ut,ct])),pt=l({...F.shape,properties:bo,...C(R(w()),"ARRAY").shape});var lt=l({...F.shape,...C(N([O(a(),w())]),"JSON").shape});var Io=N([oe,ie,lt,pt,he]),Ku=O(a(),Io),_r=l({refreshers:R(a()),...F.shape,...C(w(),"DYNAMIC").shape});var Ut=l({...F.shape,...C(vo(),"MARKDOWN").shape});var dt=(r=>(r.ARCHIVE="ARCHIVE",r.REGISTRY="REGISTRY",r))(dt||{}),je=(r=>(r.CUSTOM="CUSTOM",r.OFFICIAL="OFFICIAL",r))(je||{}),Le=(P=>(P.ARTIFICIAL_INTELLIGENCE="ARTIFICIAL_INTELLIGENCE",P.COMMUNICATION="COMMUNICATION",P.COMMERCE="COMMERCE",P.CORE="CORE",P.UNIVERSAL_AI="UNIVERSAL_AI",P.FLOW_CONTROL="FLOW_CONTROL",P.BUSINESS_INTELLIGENCE="BUSINESS_INTELLIGENCE",P.ACCOUNTING="ACCOUNTING",P.PRODUCTIVITY="PRODUCTIVITY",P.CONTENT_AND_FILES="CONTENT_AND_FILES",P.DEVELOPER_TOOLS="DEVELOPER_TOOLS",P.CUSTOMER_SUPPORT="CUSTOMER_SUPPORT",P.FORMS_AND_SURVEYS="FORMS_AND_SURVEYS",P.HUMAN_RESOURCES="HUMAN_RESOURCES",P.PAYMENT_PROCESSING="PAYMENT_PROCESSING",P.MARKETING="MARKETING",P.SALES_AND_CRM="SALES_AND_CRM",P))(Le||{});var mt=(r=>(r.AUTHORIZATION_CODE="authorization_code",r.CLIENT_CREDENTIALS="client_credentials",r))(mt||{}),Pr="both_client_credentials_and_authorization_code";var de=(i=>(i.POLLING="POLLING",i.WEBHOOK="WEBHOOK",i.APP_WEBHOOK="APP_WEBHOOK",i.MANUAL="MANUAL",i))(de||{}),ft=(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))(ft||{}),Ju=l({strategy:U(ft),paramName:v(a())}),gt=(r=>(r.SIMULATION="SIMULATION",r.TEST_FUNCTION="TEST_FUNCTION",r))(gt||{});var Mt=(r=>(r.WEBSOCKET="WEBSOCKET",r.NONE="NONE",r))(Mt||{}),To=l({status:v(ee()),body:v(w()),headers:v(O(a(),a()))}),Eo=l({type:S("DELAY"),resumeDateTime:a(),requestIdToReply:v(a()),handlerId:v(a()),streamStepProgress:v(U(Mt))}),$o=l({type:S("WEBHOOK"),requestId:a(),requestIdToReply:v(a()),response:To,handlerId:v(a()),streamStepProgress:v(U(Mt))}),Xu=N([Eo,$o]);var Yu=l({body:w(),rawBody:v(w()),headers:O(a(),a()),queryParams:O(a(),a())});function ce(e){return e==null}o(ce,"isNil");function yt(e){return e==null?!0:typeof e=="string"||Array.isArray(e)?e.length===0:typeof e=="object"?Object.keys(e).length===0:!1}o(yt,"isEmpty");function jt(e,t){if(e==null)throw new Error(`${t} is null or undefined`)}o(jt,"assertNotNullOrUndefined");var br=Re(require("crypto"),1);var Qu=128,ze,Fe,ec=o(e=>{!ze||ze.length<e?(ze=Buffer.allocUnsafe(e*Qu),br.default.randomFillSync(ze),Fe=0):Fe+e>ze.length&&(br.default.randomFillSync(ze),Fe=0),Fe+=e},"fillPool"),tc=o(e=>(ec(e|=0),ze.subarray(Fe-e,Fe)),"random"),rc=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),g=i;for(;g--;)if(c+=e[p[g]&n]||"",c.length===u)return c}}},"customRandom"),Ao=o((e,t=21)=>rc(e,t,tc),"customAlphabet");var nc="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",zo=21,nb=a().check(Ie(new RegExp(`^[0-9a-zA-Z]{${zo}}$`))),oc=Ao(nc,zo);var $e=Ee(Te(e=>e instanceof Date?e.toISOString():e),a()),ae={id:a(),created:$e,updated:$e},H=o(e=>v(it(e)),"Nullable");function Ir(e){return v(it(U(e)))}o(Ir,"NullableEnum");var ab=Ee(Te(e=>e==="true"||e===!0?!0:e==="false"||e===!1?!1:void 0),v(B())),Lt=o(e=>Ee(Te(t=>Array.isArray(t)?t:t!==void 0?[t]:void 0),v(R(e))),"OptionalArrayFromQuery");var cb=O(a(),w());var ht=(_=>(_.OPENAI="openai",_.OPENROUTER="openrouter",_.ANTHROPIC="anthropic",_.AZURE="azure",_.GOOGLE="google",_.ACTIVEPIECES="activepieces",_.CLOUDFLARE_GATEWAY="cloudflare-gateway",_.CUSTOM="custom",_.BEDROCK="bedrock",_.MISTRAL="mistral",_))(ht||{});var Pb=a().check(Ie(/^#[0-9A-Fa-f]{6}$/));var Ib=l({filename:a(),data:w(),type:S("file"),mimetype:v(a())});var ic=Re(wo());var kb=l({...ae,name:a(),permissions:R(a()),platformId:H(a()),type:a(),userCount:v(ee())});var Oo=(n=>(n.AGENT_DECIDE="agent-decide",n.CHOOSE_YOURSELF="choose-yourself",n.LEAVE_EMPTY="leave-empty",n))(Oo||{}),Tr=(r=>(r.FILE="FILE",r.TABLE="TABLE",r))(Tr||{}),Er=(n=>(n.SSE="sse",n.STREAMABLE_HTTP="streamable-http",n.SIMPLE_HTTP="http",n))(Er||{});var $r=(n=>(n.TEXT="text",n.NUMBER="number",n.BOOLEAN="boolean",n))($r||{});var Sr=(r=>(r.IN_PROGRESS="in-progress",r.COMPLETED="completed",r))(Sr||{});var ac=l({mode:U(Oo),value:w()}),sc=l({auth:v(a()),fields:O(a(),ac)}),uc=l({pieceName:a(),pieceVersion:a(),actionName:a(),predefinedInput:v(sc)}),cc=l({type:S("PIECE"),toolName:a().check(ue(1)),pieceMetadata:uc}),pc=l({type:S("none")}),lc=l({type:S("access_token"),accessToken:a()}),dc=l({type:S("api_key"),apiKey:a(),apiKeyHeader:a()}),mc=l({type:S("headers"),headers:O(a(),a())}),fc=Me("type",[pc,lc,dc,mc]),Do=l({type:S("FLOW"),toolName:a().check(ue(1)),externalFlowId:a(),flowDisplayName:v(a())}),Ro=l({type:S("MCP"),toolName:a().check(ue(1)),serverUrl:yo(),protocol:U(Er),auth:fc}),No=l({type:S("KNOWLEDGE_BASE"),toolName:a().check(ue(1)),sourceType:U(Tr),sourceId:a(),sourceName:a()}),gc=Me("type",[cc,Do,Ro,No]),yc=l({displayName:a(),description:v(a()),type:U($r)}),Co=l({type:S("MARKDOWN"),markdown:a()}),Be={type:S("TOOL_CALL"),input:H(O(a(),w())),output:v(w()),toolName:a(),status:U(Sr),toolCallId:a(),startTime:a(),endTime:v(a())},nI=l(Be),Uo=Me("toolCallType",[l({...Be,toolCallType:S("PIECE"),pieceName:a(),pieceVersion:a(),actionName:a()}),l({...Be,toolCallType:S("FLOW"),displayName:a(),externalFlowId:a()}),l({...Be,toolCallType:S("MCP"),displayName:a(),serverUrl:a()}),l({...Be,toolCallType:S("KNOWLEDGE_BASE"),displayName:a(),sourceType:a()}),l({...Be,toolCallType:S("UNKNOWN"),displayName:a()})]),hc=N([Co,Uo]);var Ar=(r=>(r.IMAGE="image",r.TEXT="text",r))(Ar||{}),_e=l({apiKey:a()}),vc=_e,xc=l({apiKey:a(),apiKeyHash:a()}),_c=_e,Pc=_e,bc=_e,Ic=_e,Tc=_e,Ec=_e,$c=_e,Mo=l({accessKeyId:a().check(ue(1)),secretAccessKey:a().check(ue(1))}),Sc=l({}),Ac=l({}),zc=l({}),kc=l({}),wc=l({}),Oc=l({}),jo=l({modelId:a(),modelName:a(),modelType:U(Ar)}),Lo=l({apiKeyHeader:a(),baseUrl:a(),models:R(jo),defaultHeaders:v(O(a(),a()))}),Fo=l({accountId:a(),gatewayId:a(),models:R(jo),vertexProject:v(a()),vertexRegion:v(a())}),Bo=l({resourceName:a(),apiVersion:Ee(Te(e=>typeof e=="string"&&e.trim().length===0?void 0:e),v(a()))}),Zo=l({region:a().check(ue(1))}),Dc=N([vc,bc,Ic,Tc,Ec,Pc,_c,xc,Mo,$c]),Vo=N([Lo,Fo,Bo,Zo,Sc,zc,kc,wc,Ac,Oc]),Rc=l({id:a(),name:a(),type:U(Ar)}),Nc=l({id:a(),name:a(),provider:U(ht),config:Vo,enabledForChat:B()}),Cc=l({provider:U(ht),config:Vo,auth:Dc,platformId:a()});var sI={openai:"openai",anthropic:"anthropic","google-ai-studio":"google","google-vertex-ai":"google"};var Uc=l({base64Url:a(),fileName:a(),extension:v(a())}),Mc=l({mimeType:a(),url:a(),fileName:v(a())}),zr=N([Uc,Mc]);var jc=N([l({type:S("file"),value:zr}),l({type:S("markdown"),value:a(),files:v(R(zr))})]),Lc=l({sessionId:a(),message:a(),files:v(R(a()))});var qo=(r=>(r.ON_NEW_RECORD="ON_NEW_RECORD",r.ON_UPDATE_RECORD="ON_UPDATE_RECORD",r))(qo||{}),Wo=(r=>(r.ENABLED="ENABLED",r.DISABLED="DISABLED",r))(Wo||{}),kr=(n=>(n.RECORD_CREATED="RECORD_CREATED",n.RECORD_UPDATED="RECORD_UPDATED",n.RECORD_DELETED="RECORD_DELETED",n))(kr||{});var Fc=N([l({...ae,name:a(),externalId:a(),type:S("STATIC_DROPDOWN"),tableId:a(),projectId:a(),data:l({options:R(l({value:a()}))})}),l({...ae,name:a(),externalId:a(),type:N([S("TEXT"),S("NUMBER"),S("DATE")]),tableId:a(),projectId:a()})]),Bc=l({...ae,name:a(),folderId:H(a()),projectId:a(),externalId:a(),status:Ir(Wo),trigger:Ir(qo)}),Zc=l({...ae,tableId:a(),projectId:a(),cells:O(a(),l({updated:a(),created:a(),value:w(),fieldName:a()}))}),Vc=l({events:R(U(kr)),webhookUrl:a(),flowId:a()}),Hc=l({fields:R(l({id:a(),name:a()})),rows:R(O(a(),a())),name:a()}),qc=l({projectId:a(),limit:v(at.number()),cursor:v(a()),name:v(a()),externalIds:Lt(a()),folderId:v(a()),folderIds:Lt(a())}),Wc=l({records:R(R(l({fieldId:a(),value:Ko()}))),tableId:a()}),Gc=l({cells:v(R(l({fieldId:a(),value:Ko()}))),tableId:a(),agentUpdate:v(B())}),Go=Me("operator",[ke("eq"),ke("neq"),ke("gt"),ke("gte"),ke("lt"),ke("lte"),ke("co"),Ho("exists"),Ho("not_exists")]),Kc=l({tableId:a(),limit:v(at.number()),cursor:v(a()),filters:Lt(Go)});function Ko(){return Ee(Te(e=>e==null?e:String(e)),it(a()))}o(Ko,"coerceToString");function ke(e){return l({fieldId:a(),operator:S(e),value:a()})}o(ke,"valueFilter");function Ho(e){return l({fieldId:a(),operator:S(e)})}o(Ho,"existenceFilter");var Jc=l({status:v(ee()),body:v(w()),headers:v(O(a(),a()))}),Xc=l({...ae,deleted:H($e),ownerId:a(),displayName:a(),platformId:a(),externalId:H(a())});var Jo=l({name:a(),description:v(a()),type:a(),required:B()}),Yc=l({pieceName:a(),triggerName:a(),input:l({toolName:a(),toolDescription:a(),inputSchema:R(Jo),returnsResponse:B()})});var Xo="^[0-9]+\\.[0-9]+\\.[0-9]+$",$I=new RegExp(Xo),ep="^([~^])?[0-9]+\\.[0-9]+\\.[0-9]+$",SI=a().check(Ie(new RegExp(Xo))),AI=a().check(Ie(new RegExp(ep))),tp=l({packageType:S("ARCHIVE"),pieceType:U(je),pieceName:a(),pieceVersion:a(),archiveId:a(),platformId:a()}),Yo=l({packageType:S("REGISTRY"),pieceType:S("OFFICIAL"),pieceName:a(),pieceVersion:a()}),Qo=l({packageType:S("REGISTRY"),pieceType:S("CUSTOM"),pieceName:a(),pieceVersion:a(),platformId:a()}),zI=N([Yo,Qo]),kI=N([tp,Yo,Qo]),ei=(t=>(t.CRON_EXPRESSION="CRON_EXPRESSION",t))(ei||{}),rp=l({type:U(ei),cronExpression:a(),timezone:a()}),wI=l({...ae,type:U(de),projectId:a(),flowId:a(),triggerName:a(),schedule:H(rp),flowVersionId:a(),pieceName:a(),pieceVersion:a(),deleted:H(a()),simulate:B()}),ti=(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))(ti||{}),ri=(r=>(r.NONE="NONE",r.ZSTD="ZSTD",r))(ri||{}),ni=(r=>(r.S3="S3",r.DB="DB",r))(ni||{}),OI=l({...ae,projectId:H(a()),platformId:H(a()),type:U(ti),compression:U(ri),data:v(w()),location:U(ni),size:H(ee()),fileName:H(a()),s3Key:H(a()),metadata:H(O(a(),a()))}),oi=(n=>(n.ADMIN="ADMIN",n.MEMBER="MEMBER",n.OPERATOR="OPERATOR",n))(oi||{}),ii=(r=>(r.ACTIVE="ACTIVE",r.INACTIVE="INACTIVE",r))(ii||{}),DI=l({id:a(),email:a(),firstName:a(),status:U(ii),externalId:H(a()),platformId:H(a()),platformRole:U(oi),lastName:a(),created:$e,updated:$e,lastActiveDate:H($e),imageUrl:H(a())});var wr=l({...F.shape,...C(O(a(),w()),"OBJECT").shape});var ci=l({...F.shape,...C(a(),"COLOR").shape});var Or=N([oe,ye,Ut,ve,ie,he,xr,st,_r,xe,pt,wr,lt,ct,ut,ci]),x={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 me=l({displayName:a(),description:v(a())});var pi=l({username:a(),password:a()}),Dr=l({...me.shape,username:l({displayName:a(),description:v(a())}),password:l({displayName:a(),description:v(a())}),...C(pi,"BASIC_AUTH").shape});var ap=O(a(),N([oe,ye,xe,ve,ie])),Rr=l({...me.shape,props:ap,...C(w(),"CUSTOM_AUTH").shape});var we=l({...me.shape,...C(l({auth:a()}),"SECRET_TEXT").shape});var sp=O(a(),N([oe,ye,we,xe,ve,ie,he,Ut])),li=l({...me.shape,props:sp,...C(w(),"OIDC").shape});var Nr=(r=>(r.HEADER="HEADER",r.BODY="BODY",r))(Nr||{}),di=N([oe,we,ie]),mi=O(a(),di),up=l({props:v(O(a(),di)),authUrl:a(),tokenUrl:a(),scope:R(a()),prompt:v(N([S("none"),S("consent"),S("login"),S("omit")])),pkce:v(B()),pkceMethod:v(N([S("plain"),S("S256")])),authorizationMethod:v(U(Nr)),grantType:v(N([U(mt),S(Pr)])),extra:v(O(a(),a()))}),fi=l({access_token:a(),props:v(mi),data:O(a(),ot())}),Cr=l({...me.shape,...up.shape,...C(fi,"OAUTH2").shape});var Ze=N([Dr,Rr,li,Cr,we]),vt="Connection",Ur={SecretText(e){return{...e,valueSchema:void 0,type:"SECRET_TEXT"}},OAuth2(e){return{...e,valueSchema:void 0,type:"OAUTH2",displayName:e.displayName||vt}},BasicAuth(e){return{...e,valueSchema:void 0,type:"BASIC_AUTH",displayName:e.displayName||vt,required:!0}},CustomAuth(e){return{...e,valueSchema:void 0,type:"CUSTOM_AUTH",displayName:e.displayName||vt}},OIDC(e){return{...e,valueSchema:void 0,type:"OIDC",displayName:e.displayName||vt}},None(){}};var lE={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 cp=l({...F.shape,...C(w(),"CUSTOM").shape,code:a()});var pp=N([Or,Ze]),Mr=O(a(),pp),wE=O(a(),Or);var gi=N([l({strategy:S("CRON"),cronExpression:a()}),l({strategy:S("NONE")})]),Ve=class{constructor(t,r,n,i,u,c,p,g,f,_,I,y,s,d,h,m,P,b,j){this.name=t;this.displayName=r;this.description=n;this.requireAuth=i;this.props=u;this.type=c;this.handshakeConfiguration=p;this.onHandshake=g;this.renewConfiguration=f;this.onRenew=_;this.onEnable=I;this.onDisable=y;this.onStart=s;this.run=d;this.test=h;this.sampleData=m;this.testStrategy=P;this.outputSchema=b;this.aiMetadata=j}static{o(this,"ITrigger")}},He=o(e=>{switch(e.type){case"WEBHOOK":return new Ve(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 Ve(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 Ve(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 Ve(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,ce(e.sampleData)&&ce(e.test)?"SIMULATION":"TEST_FUNCTION",e.outputSchema,e.aiMetadata)}},"createTrigger");var yi="2",Bt="0.82.0";var jr=class{constructor(t,r,n,i,u,c,p,g,f=Bt,_,I=""){this.displayName=t;this.logoUrl=r;this.authors=n;this.events=i;this.categories=p;this.auth=g;this.minimumSupportedRelease=f;this.maximumSupportedRelease=_;this.description=I;this._actions={};this._triggers={};this.getContextInfo=o(()=>({version:yi}),"getContextInfo");(!lp(f)||dp(f,Bt))&&(this.minimumSupportedRelease=Bt),u.forEach(y=>this._actions[y.name]=y),c.forEach(y=>this._triggers[y.name]=y)}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,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 jr(e.displayName,e.logoUrl,e.authors??[],e.events,e.actions,e.triggers,e.categories??[],e.auth,e.minimumSupportedRelease,e.maximumSupportedRelease,e.description)},"createPiece");function lp(e){return/^\d+\.\d+\.\d+$/.test(e)}o(lp,"isValidSimpleSemver");function dp(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(dp,"isSemverLessThan");var mp=v(O(a(),O(a(),a()))),vi=l({id:v(a()),name:a(),displayName:a(),logoUrl:a(),description:a(),authors:R(a()),platformId:v(a()),directoryPath:v(a()),auth:v(N([Ze,R(Ze)])),version:a(),categories:v(R(U(Le))),minimumSupportedRelease:v(a()),maximumSupportedRelease:v(a()),i18n:mp}),fp=U(["human","ai","both"]),xi=l({description:v(a()),idempotent:v(B())}),_i=l({name:a(),displayName:a(),description:a(),props:Mr,requireAuth:B(),errorHandlingOptions:v(vr),outputSchema:v(Nt()),audience:v(fp),aiMetadata:v(xi)}),Pi=l({name:a(),displayName:a(),description:a(),props:Mr,errorHandlingOptions:v(vr),type:U(de),sampleData:w(),handshakeConfiguration:v(Nt()),renewConfiguration:v(gi),testStrategy:U(gt),outputSchema:v(Nt()),aiMetadata:v(xi)}),gp=l({...vi.shape,actions:O(a(),_i),triggers:O(a(),Pi)}),yp=l({...vi.shape,actions:ee(),triggers:ee(),suggestedActions:v(R(Pi)),suggestedTriggers:v(R(_i))}),bi=l({projectUsage:ee(),tags:v(R(a())),pieceType:U(je),packageType:U(dt),platformId:v(a()),archiveId:v(a())}),w$=l({...gp.shape,...bi.shape}),O$=l({...yp.shape,...bi.shape}),D$=l({name:a(),version:a()});var hp=Re(require("path")),vp=Re(require("fs/promises"));var Zt=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"};if(t.authentication&&this.populateAuthentication(t.authentication,r),t.body)switch(t.headers?.["Content-Type"]){case"text/csv":r["Content-Type"]="text/csv";break;default:r["Content-Type"]="application/json";break}return t.headers&&(r={...r,...t.headers}),r}populateAuthentication(t,r){this.authenticationConverter.convert(t,r)}};var Vt=class{static{o(this,"DelegatingAuthenticationConverter")}constructor(t=new Lr,r=new Fr){this.converters={BEARER_TOKEN:t,BASIC:r}}convert(t,r){return this.converters[t.type].convert(t,r)}},Lr=class{static{o(this,"BearerTokenAuthenticationConverter")}convert(t,r){return r.Authorization=`Bearer ${t.token}`,r}},Fr=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 Ht=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}}};var qt=class extends Zt{static{o(this,"FetchHttpClient")}constructor(t="",r=new Vt){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[j,ne]of Object.entries(c))i.append(j,ne);let p=i.toString(),g=p?`${n}?${p}`:n,f=t.responseType??"json",_=t.followRedirects??!0,I=t.retries??0,{body:y,extraHeaders:s,isStream:d}=xp(t.body,u),h=Pp({...u,...s}),m=await _p(async()=>{let j=new AbortController,ne=t.timeout&&t.timeout>0?setTimeout(()=>j.abort(),t.timeout):void 0;try{let se={method:t.method.toString(),headers:h,body:y,redirect:_?"follow":"manual",signal:j.signal};return d&&(se.duplex="half"),r?.dispatcher!==void 0&&(se.dispatcher=r.dispatcher),await fetch(g,se)}finally{ne!==void 0&&clearTimeout(ne)}},I),P=_?300:400;if(m.status<200||m.status>=P){let j=await Ii(m,f),ne=new Ht(t.body,{status:m.status,responseBody:j});throw console.error("[HttpClient#(sanitized error message)] Request failed:",ne),ne}let b=await Ii(m,f);return{status:m.status,headers:bp(m.headers),body:b}}};function xp(e,t){return Tp(e)?{body:void 0,extraHeaders:{},isStream:!1}:Ip(e)?{body:e,extraHeaders:e.getHeaders(),isStream:!0}: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(xp,"serializeBody");async function Ii(e,t){switch(t){case"arraybuffer":return Buffer.from(await e.arrayBuffer());case"blob":return await e.blob();case"text":return await e.text();case"json":default:{let r=await e.text();if(r.length===0)return;try{return JSON.parse(r)}catch{return r}}}}o(Ii,"parseResponseBody");async function _p(e,t){let r;for(let n=0;n<=t;n++)try{let i=await e();if(i.status>=500&&n<t){await Ti(n);continue}return i}catch(i){if(r=i,n<t){await Ti(n);continue}throw i}throw r}o(_p,"sendWithRetries");function Ti(e){let t=Math.min(1e3*2**e,3e4);return new Promise(r=>setTimeout(r,t))}o(Ti,"backoff");function Pp(e){let t={};for(let[r,n]of Object.entries(e))n!==void 0&&(t[r]=Array.isArray(n)?n.join(", "):n);return t}o(Pp,"normalizeHeaders");function bp(e){let t={};return e.forEach((r,n)=>{t[n]=r}),t}o(bp,"toHttpHeaders");function Ip(e){return typeof e=="object"&&e!==null&&typeof e.getHeaders=="function"&&typeof e.pipe=="function"}o(Ip,"isNodeFormData");function Tp(e){return e==null}o(Tp,"isNil");var te=new qt;var Oe=(c=>(c.GET="GET",c.POST="POST",c.PATCH="PATCH",c.PUT="PUT",c.DELETE="DELETE",c.HEAD="HEAD",c))(Oe||{});var ld=Re(require("fs")),ks=Re(zs());var dd={"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 md(e){let t=e.split(";")[0].trim().toLowerCase();return dd[t]??""}o(md,"contentTypeToExtension");var fd=o(({baseUrl:e,relativePath:t})=>{let r=e.endsWith("/")?e:`${e}/`,n=t.startsWith("/")?t.slice(1):t;return`${r}${n}`},"joinBaseUrlWithRelativePath"),gd=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 ws({auth:e,baseUrl:t,authMapping:r,description:n,displayName:i,name:u,props:c,extraProps:p,authLocation:g="headers"}){return Y({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:x.DynamicProperties({auth:e,displayName:"",required:!0,refreshers:[],props:o(async({auth:f})=>({url:x.ShortText({displayName:"URL",description:`You can either use the full URL or the relative path to the base URL
|
|
3
|
+
i.e ${gd(t,f)}/resource or /resource`,required:!0,defaultValue:f?t(f):"",...c?.url??{}})}),"props")}),method:x.StaticDropdown({displayName:"Method",required:!0,options:{options:Object.values(Oe).map(f=>({label:f,value:f}))},...c?.method??{}}),headers:x.Object({displayName:"Headers",description:"Authorization headers are injected automatically from your connection.",required:!0,...c?.headers??{}}),queryParams:x.Object({displayName:"Query Parameters",required:!0,...c?.queryParams??{}}),body_type:x.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:x.DynamicProperties({auth:e,displayName:"Body",refreshers:["body_type"],required:!1,props:o(async({body_type:f})=>{if(!f)return{};let _=f,I={};switch(_){case"none":break;case"json":I.data=x.Json({displayName:"JSON Body",required:!0,...c?.body??{}});break;case"raw":I.data=x.LongText({displayName:"Raw Body",required:!0});break;case"form_data":I.data=x.Array({displayName:"Form Data",required:!0,properties:{fieldName:x.ShortText({displayName:"Field Name",required:!0}),fieldType:x.StaticDropdown({displayName:"Field Type",required:!0,options:{disabled:!1,options:[{label:"Text",value:"text"},{label:"File",value:"file"}]}}),textFieldValue:x.LongText({displayName:"Text Field Value",required:!1}),fileFieldValue:x.File({displayName:"File Field Value",required:!1})}});break}return I},"props")}),response_is_binary:x.Checkbox({displayName:"Response is Binary ?",description:"Enable for files like PDFs, images, etc.",required:!1,defaultValue:!1}),failsafe:x.Checkbox({displayName:"No Error on Failure",required:!1,...c?.failsafe??{}}),timeout:x.Number({displayName:"Timeout (in seconds)",required:!1,...c?.timeout??{}}),followRedirects:x.Checkbox({displayName:"Follow redirects",required:!1,defaultValue:!1}),...p},run:o(async f=>{let{method:_,url:I,headers:y,queryParams:s,body:d,body_type:h,failsafe:m,timeout:P,response_is_binary:b,followRedirects:j}=f.propsValue;jt(_,"Method"),jt(I,"URL");let ne=ce(r)?{}:await r(f.auth,f.propsValue),se=I.url,Xe=se.startsWith("http://")||se.startsWith("https://")?se:fd({baseUrl:t(f.auth),relativePath:se}),Ae={method:_,url:Xe,headers:{...y??{},...g==="headers"||!ce(g)?ne:{}},queryParams:{...g==="queryParams"?ne:{},...s??{}},timeout:P?P*1e3:0,followRedirects:j};if(b&&(Ae.responseType="arraybuffer"),d)if(h&&h!=="none"){let fe=d.data;if(h==="form_data"){let Vs=fe,bt=new ks.default;for(let{fieldName:cn,fieldType:pn,textFieldValue:ln,fileFieldValue:rr}of Vs)pn==="text"&&!yt(ln)?bt.append(cn,ln):pn==="file"&&!yt(rr)&&bt.append(cn,rr.data,{filename:rr?.filename});Ae.body=bt,Ae.headers={...Ae.headers,...bt.getHeaders()}}else Ae.body=fe}else h||(Ae.body=d);try{let fe=await te.sendRequest(Ae);return await yd(f.files,fe.body,fe.status,fe.headers,b)}catch(fe){if(m)return fe.errorMessage();throw fe}},"run")})}o(ws,"createCustomApiCallAction");var yd=o(async(e,t,r,n,i)=>{let u;if(i&&hd(t)){let c=Array.isArray(n?.["content-type"])?n["content-type"][0]:n?.["content-type"],p=md(c??"")||"txt",g;t instanceof ArrayBuffer?g=Buffer.from(new Uint8Array(t)):Buffer.isBuffer(t)?g=t:g=Buffer.from(t),u=await e.write({fileName:`output.${p}`,data:g})}else u=t;return{status:r,headers:n,body:u}},"handleBinaryResponse"),hd=o(e=>e instanceof ArrayBuffer||Buffer.isBuffer(e),"isBinaryBody");var V=Ur.OAuth2({description:`
|
|
4
|
+
To obtain your OAuth2 credentials:
|
|
5
|
+
|
|
6
|
+
1. Go to Wrike (https://www.wrike.com/)
|
|
7
|
+
2. Sign in to your account or create one
|
|
8
|
+
3. Go to Apps & Integrations (https://www.wrike.com/apps/)
|
|
9
|
+
4. Click "Create new app" or use an existing one
|
|
10
|
+
5. For local development, add \`http://localhost:4200/redirect\` to the allowed redirect URIs
|
|
11
|
+
6. For production, add \`https://cloud.activepieces.com/redirect\` to the allowed redirect URIs
|
|
12
|
+
7. Copy the Client ID and Client Secret
|
|
13
|
+
`,authUrl:"https://login.wrike.com/oauth2/authorize/v4",tokenUrl:"https://login.wrike.com/oauth2/token",required:!0,scope:[]});var Os="https://www.wrike.com/api/v4",Z={baseUrl:Os,async apiCall({auth:e,method:t,resourceUri:r,body:n=void 0,queryParams:i=void 0}){return await te.sendRequest({method:t,url:`${Os}${r}`,body:n,queryParams:i,authentication:{type:"BEARER_TOKEN",token:e.access_token}})}};var Ds=Y({name:"create_task",displayName:"Create Task",description:"Create a new task in Wrike",audience:"both",aiMetadata:{description:"Create a task inside a specific Wrike folder, with optional status, importance, assignees (user IDs), start/due dates, duration, and custom fields. Use when an agent needs to add work items to a Wrike project or folder. Requires the target folder ID; each call creates a distinct task, so it is not idempotent.",idempotent:!1},auth:V,props:{folderId:x.ShortText({displayName:"Folder ID",description:"The ID of the folder where the task will be created",required:!0}),title:x.ShortText({displayName:"Task Title",description:"The title of the task",required:!0}),description:x.LongText({displayName:"Description",description:"The description of the task",required:!1}),status:x.StaticDropdown({displayName:"Status",description:"The status of the task",required:!1,options:{options:[{label:"Active",value:"Active"},{label:"Completed",value:"Completed"},{label:"Deferred",value:"Deferred"},{label:"Cancelled",value:"Cancelled"}]}}),importance:x.StaticDropdown({displayName:"Importance",description:"The importance/priority of the task",required:!1,options:{options:[{label:"Low",value:"Low"},{label:"Normal",value:"Normal"},{label:"High",value:"High"},{label:"Critical",value:"Critical"}]}}),assignees:x.Array({displayName:"Assignees",description:"User IDs to assign to the task",required:!1,properties:{userId:x.ShortText({displayName:"User ID",required:!0})}}),start_date:x.DateTime({displayName:"Start Date",description:"Task start date (format: YYYY-MM-DD)",required:!1}),due_date:x.DateTime({displayName:"Due Date",description:"Task due date (format: YYYY-MM-DD)",required:!1}),duration:x.Number({displayName:"Duration",description:"Task duration in minutes",required:!1}),customFields:x.Array({displayName:"Custom Fields",description:"Custom field values for the task",required:!1,properties:{fieldId:x.ShortText({displayName:"Field ID",description:"Custom field identifier",required:!0}),value:x.ShortText({displayName:"Value",description:"Field value",required:!0})}})},async run(e){let t=e.propsValue,{folderId:r,title:n,description:i,status:u,importance:c,assignees:p,start_date:g,due_date:f,duration:_,customFields:I}=t,y={title:n};i&&(y.description=i),u&&(y.status=u),c&&(y.importance=c),p&&p.length>0&&(y.responsibles=p.map(h=>h.userId));let s={};return g&&(s.start=g),f&&(s.due=f),_&&(s.duration=_),Object.keys(s).length>0&&(y.dates=s),I&&I.length>0&&(y.customFields=I.map(h=>({id:h.fieldId,value:h.value}))),(await Z.apiCall({auth:e.auth,method:"POST",resourceUri:`/folders/${r}/tasks`,body:y})).body}});var Rs=Y({name:"update_task",displayName:"Update Task",description:"Update fields of an existing task in Wrike",audience:"both",aiMetadata:{description:"Update an existing Wrike task identified by its task ID, setting only the provided fields (title, description, status, importance, assignees, dates, duration, custom fields); supplied assignees replace the existing ones. Use when an agent needs to modify a known task rather than create one. Requires the task ID; re-running with the same input leaves the task in the same state, so it is idempotent.",idempotent:!0},auth:V,props:{taskId:x.ShortText({displayName:"Task ID",description:"The ID of the task to update",required:!0}),title:x.ShortText({displayName:"Task Title",description:"The new title of the task",required:!1}),description:x.LongText({displayName:"Description",description:"The new description of the task",required:!1}),status:x.StaticDropdown({displayName:"Status",description:"The new status of the task",required:!1,options:{options:[{label:"Active",value:"Active"},{label:"Completed",value:"Completed"},{label:"Deferred",value:"Deferred"},{label:"Cancelled",value:"Cancelled"}]}}),importance:x.StaticDropdown({displayName:"Importance",description:"The new importance/priority of the task",required:!1,options:{options:[{label:"Low",value:"Low"},{label:"Normal",value:"Normal"},{label:"High",value:"High"},{label:"Critical",value:"Critical"}]}}),assignees:x.Array({displayName:"Assignees",description:"User IDs to assign to the task (replaces existing assignees)",required:!1,properties:{userId:x.ShortText({displayName:"User ID",required:!0})}}),start_date:x.DateTime({displayName:"Start Date",description:"Task start date (format: YYYY-MM-DD)",required:!1}),due_date:x.DateTime({displayName:"Due Date",description:"Task due date (format: YYYY-MM-DD)",required:!1}),duration:x.Number({displayName:"Duration",description:"Task duration in minutes",required:!1}),customFields:x.Array({displayName:"Custom Fields",description:"Custom field values to update for the task",required:!1,properties:{fieldId:x.ShortText({displayName:"Field ID",description:"Custom field identifier",required:!0}),value:x.ShortText({displayName:"Value",description:"New field value",required:!0})}})},async run(e){let t=e.propsValue,{taskId:r,title:n,description:i,status:u,importance:c,assignees:p,start_date:g,due_date:f,duration:_,customFields:I}=t,y={};n&&(y.title=n),i!==void 0&&(y.description=i),u&&(y.status=u),c&&(y.importance=c),p&&p.length>0&&(y.responsibles=p.map(h=>h.userId));let s={};return g&&(s.start=g),f&&(s.due=f),_&&(s.duration=_),Object.keys(s).length>0&&(y.dates=s),I&&I.length>0&&(y.customFields=I.map(h=>({id:h.fieldId,value:h.value}))),(await Z.apiCall({auth:e.auth,method:"PUT",resourceUri:`/tasks/${r}`,body:y})).body}});var Ns=Y({name:"create_folder",displayName:"Create Folder",description:"Create a new folder in Wrike",audience:"both",aiMetadata:{description:"Create a folder in Wrike, either at root level or nested under a parent folder ID; enabling the project option turns it into a project with owner and start/end dates instead of a plain folder. Use when an agent needs to set up a new container for tasks. Each call creates a new folder, so it is not idempotent.",idempotent:!1},auth:V,props:{parentFolderId:x.ShortText({displayName:"Parent Folder ID",description:"The ID of the parent folder where the new folder will be created. Leave empty to create at root level.",required:!1}),title:x.ShortText({displayName:"Folder Title",description:"The title of the folder",required:!0}),description:x.LongText({displayName:"Description",description:"The description of the folder",required:!1}),shareds:x.Array({displayName:"Shared Users",description:"User IDs to share the folder with",required:!1,properties:{userId:x.ShortText({displayName:"User ID",required:!0})}}),project:x.Checkbox({displayName:"Create as Project",description:"Whether this folder should be created as a project with additional project settings",required:!1,defaultValue:!1}),projectOwnerId:x.ShortText({displayName:"Project Owner ID",description:"The ID of the user who will own the project (required when creating as project)",required:!1}),projectStartDate:x.DateTime({displayName:"Project Start Date",description:"The start date of the project (format: YYYY-MM-DD)",required:!1}),projectEndDate:x.DateTime({displayName:"Project End Date",description:"The end date of the project (format: YYYY-MM-DD)",required:!1})},async run(e){let t=e.propsValue,{parentFolderId:r,title:n,description:i,shareds:u,project:c,projectOwnerId:p,projectStartDate:g,projectEndDate:f}=t,_={title:n};if(i&&(_.description=i),u&&u.length>0&&(_.shareds=u.map(s=>s.userId)),c){let s={};p?s.ownerIds=[p]:s.ownerIds=[e.auth.access_token.split(".")[0]],g&&(s.startDate=g.split("T")[0]),f&&(s.endDate=f.split("T")[0]),_.project=s}let I="/folders";return r&&(I=`/folders/${r}/folders`),(await Z.apiCall({auth:e.auth,method:"POST",resourceUri:I,body:_})).body}});var Cs=Y({name:"create_project",displayName:"Create Project",description:"Create a new project in Wrike",audience:"both",aiMetadata:{description:"Create a project in Wrike (a folder configured as a project) at root level or under a parent folder ID, with optional owners, shared users, and start/end dates. Use when an agent needs a project container rather than a plain folder. Each call creates a new project, so it is not idempotent.",idempotent:!1},auth:V,props:{parentFolderId:x.ShortText({displayName:"Parent Folder ID",description:"The ID of the parent folder where the project will be created. Leave empty to create at root level.",required:!1}),title:x.ShortText({displayName:"Project Title",description:"The title of the project",required:!0}),description:x.LongText({displayName:"Description",description:"The description of the project",required:!1}),ownerIds:x.Array({displayName:"Owner IDs",description:"User IDs who will own the project",required:!1,properties:{userId:x.ShortText({displayName:"User ID",required:!0})}}),shareds:x.Array({displayName:"Shared Users",description:"User IDs to share the project with",required:!1,properties:{userId:x.ShortText({displayName:"User ID",required:!0})}}),start_date:x.DateTime({displayName:"Start Date",description:"Project start date (format: YYYY-MM-DD)",required:!1}),end_date:x.DateTime({displayName:"End Date",description:"Project end date (format: YYYY-MM-DD)",required:!1})},async run(e){let t=e.propsValue,{parentFolderId:r,title:n,description:i,ownerIds:u,shareds:c,start_date:p,end_date:g}=t,f={title:n,project:{}};u&&u.length>0&&(f.project.ownerIds=u.map(y=>y.userId)),i&&(f.description=i),c&&c.length>0&&(f.shareds=c.map(y=>y.userId)),(p||g)&&(f.project.dates={},p&&(f.project.dates.start=p.split("T")[0]),g&&(f.project.dates.end=g.split("T")[0]));let _="/folders";return r&&(_=`/folders/${r}/folders`),(await Z.apiCall({auth:e.auth,method:"POST",resourceUri:_,body:f})).body}});var Us=Y({name:"add_comment",displayName:"Add Comment",description:"Add a comment or internal note to a task or folder",audience:"both",aiMetadata:{description:"Post a comment on a Wrike task or folder, selected via the entity type and entity ID; the comment text can be HTML or plain text. Use when an agent needs to annotate or leave a note on an item. Each call appends a new comment, so it is not idempotent.",idempotent:!1},auth:V,props:{entityType:x.StaticDropdown({displayName:"Entity Type",description:"Select whether you want to add the comment to a task or folder",required:!0,options:{options:[{label:"Task",value:"tasks"},{label:"Folder",value:"folders"}]}}),entityId:x.ShortText({displayName:"Entity ID",description:"The ID of the task or folder to add the comment to",required:!0}),text:x.LongText({displayName:"Comment Text",description:"The text content of the comment",required:!0}),plainText:x.Checkbox({displayName:"Plain Text",description:"Whether the comment should be treated as plain text (no HTML formatting). Default is HTML formatting.",required:!1,defaultValue:!1})},async run(e){let t={text:e.propsValue.text};return e.propsValue.plainText!==void 0&&(t.plainText=e.propsValue.plainText),(await Z.apiCall({auth:e.auth,method:"POST",resourceUri:`/${e.propsValue.entityType}/${e.propsValue.entityId}/comments`,body:t})).body}});var Ms=Y({name:"upload_attachment",displayName:"Upload Attachment",description:"Upload a file and attach it to a task or folder",audience:"both",aiMetadata:{description:"Upload a file and attach it to a Wrike task or folder, chosen via the entity type and entity ID, with an optional custom file name. Use when an agent needs to add a document or asset to an item. Each call uploads a new attachment, so it is not idempotent.",idempotent:!1},auth:V,props:{entityType:x.StaticDropdown({displayName:"Entity Type",description:"Select whether to attach the file to a task or folder",required:!0,options:{options:[{label:"Task",value:"tasks"},{label:"Folder",value:"folders"}]}}),entityId:x.ShortText({displayName:"Entity ID",description:"The ID of the task or folder to attach the file to",required:!0}),file:x.File({displayName:"File",description:"The file to upload and attach",required:!0}),fileName:x.ShortText({displayName:"File Name",description:"Optional custom name for the uploaded file",required:!1})},async run(e){let t=e.propsValue,{entityType:r,entityId:n,file:i,fileName:u}=t;return(await te.sendRequest({method:"POST",url:`${Z.baseUrl}/${r}/${n}/attachments`,body:i.data,authentication:{type:"BEARER_TOKEN",token:e.auth.access_token},headers:{"Content-Type":"application/octet-stream","X-Requested-With":"XMLHttpRequest","X-File-Name":u||i.filename}})).body}});var js=Y({name:"find_task",displayName:"Find Task",description:"Retrieve a task by its ID or lookup fields",audience:"both",aiMetadata:{description:"Look up Wrike tasks: pass a task ID to fetch that exact task (other criteria are ignored), or omit it to search/filter by title, folder, status, importance, assignees, or authors with sorting and page size. Use when an agent needs to find or read tasks before acting on them. Read-only and idempotent.",idempotent:!0},auth:V,props:{taskId:x.ShortText({displayName:"Task ID",description:"The ID of the task to retrieve. If provided, other search criteria will be ignored.",required:!1}),title:x.ShortText({displayName:"Task Title",description:"Search for tasks by title (partial match)",required:!1}),folderId:x.ShortText({displayName:"Folder ID",description:"Search for tasks within a specific folder",required:!1}),status:x.StaticDropdown({displayName:"Status",description:"Filter tasks by status",required:!1,options:{options:[{label:"Active",value:"Active"},{label:"Completed",value:"Completed"},{label:"Deferred",value:"Deferred"},{label:"Cancelled",value:"Cancelled"}]}}),importance:x.StaticDropdown({displayName:"Importance",description:"Filter tasks by importance/priority",required:!1,options:{options:[{label:"Low",value:"Low"},{label:"Normal",value:"Normal"},{label:"High",value:"High"},{label:"Critical",value:"Critical"}]}}),assignees:x.Array({displayName:"Assignee IDs",description:"Filter tasks by assignee user IDs",required:!1,properties:{userId:x.ShortText({displayName:"User ID",required:!0})}}),authors:x.Array({displayName:"Author IDs",description:"Filter tasks by author user IDs",required:!1,properties:{userId:x.ShortText({displayName:"User ID",required:!0})}}),pageSize:x.Number({displayName:"Page Size",description:"Maximum number of tasks to return (max 1000)",required:!1,defaultValue:100}),sortField:x.StaticDropdown({displayName:"Sort Field",description:"Field to sort tasks by",required:!1,options:{options:[{label:"Created Date",value:"CreatedDate"},{label:"Updated Date",value:"UpdatedDate"},{label:"Due Date",value:"DueDate"},{label:"Start Date",value:"StartDate"},{label:"Completed Date",value:"CompletedDate"},{label:"Title",value:"Title"},{label:"Status",value:"Status"},{label:"Importance",value:"Importance"}]}}),sortOrder:x.StaticDropdown({displayName:"Sort Order",description:"Sort order for results",required:!1,options:{options:[{label:"Ascending",value:"Asc"},{label:"Descending",value:"Desc"}]}})},async run(e){let t=e.propsValue,{taskId:r,title:n,folderId:i,status:u,importance:c,assignees:p,authors:g,pageSize:f,sortField:_,sortOrder:I}=t;if(r)return(await Z.apiCall({auth:e.auth,method:"GET",resourceUri:`/tasks/${r}`})).body;let y={};return n&&(y.title=n),i&&(y.folderId=i),u&&(y.status=u),c&&(y.importance=c),f&&(y.pageSize=f.toString()),_&&(y.sortField=_),I&&(y.sortOrder=I),p&&p.length>0&&(y.responsibles=p.map(d=>d.userId).join(",")),g&&g.length>0&&(y.authors=g.map(d=>d.userId).join(",")),(await Z.apiCall({auth:e.auth,method:"GET",resourceUri:"/tasks",queryParams:y})).body}});var Ls=Y({name:"find_folder",displayName:"Find Folder / Project",description:"Retrieve folder / project metadata by ID or name",audience:"both",aiMetadata:{description:"Look up Wrike folders or projects: pass a folder ID to fetch that exact one (other criteria are ignored), or omit it to search/filter by title, parent folders, authors, owners, or the projects-only flag. Use when an agent needs to resolve or read folder/project metadata before acting. Read-only and idempotent.",idempotent:!0},auth:V,props:{folderId:x.ShortText({displayName:"Folder ID",description:"The ID of the folder/project to retrieve. If provided, other search criteria will be ignored.",required:!1}),title:x.ShortText({displayName:"Title",description:"Search for folders/projects by title (partial match)",required:!1}),parentIds:x.Array({displayName:"Parent IDs",description:"Search for folders/projects within specific parent folders",required:!1,properties:{folderId:x.ShortText({displayName:"Folder ID",required:!0})}}),project:x.Checkbox({displayName:"Is Project",description:"Filter to only return projects (folders marked as projects)",required:!1}),pageSize:x.Number({displayName:"Page Size",description:"Maximum number of folders/projects to return (max 1000)",required:!1,defaultValue:100}),authors:x.Array({displayName:"Author IDs",description:"Filter by authors (users who created the folders)",required:!1,properties:{userId:x.ShortText({displayName:"User ID",required:!0})}}),owners:x.Array({displayName:"Owner IDs",description:"Filter by owners (users who own the projects)",required:!1,properties:{userId:x.ShortText({displayName:"User ID",required:!0})}})},async run(e){let t=e.propsValue,{folderId:r,title:n,parentIds:i,project:u,pageSize:c,authors:p,owners:g}=t;if(r)return(await Z.apiCall({auth:e.auth,method:"GET",resourceUri:`/folders/${r}`})).body;let f={};return n&&(f.title=n),i&&i.length>0&&(f.parentIds=i.map(I=>I.folderId).join(",")),u!==void 0&&(f.project=u.toString()),c&&(f.pageSize=c.toString()),p&&p.length>0&&(f.authors=p.map(I=>I.userId).join(",")),g&&g.length>0&&(f.owners=g.map(I=>I.userId).join(",")),(await Z.apiCall({auth:e.auth,method:"GET",resourceUri:"/folders",queryParams:f})).body}});var Fs=He({name:"new_task",displayName:"New Task",description:"Fires when a new task is created in Wrike (optionally within a folder).",aiMetadata:{description:"Fires when a new task is created in Wrike, registered via a webhook on the TaskCreated event; can be scoped to a single folder so it only fires for tasks created there."},auth:V,type:"WEBHOOK",props:{folderId:x.ShortText({displayName:"Folder ID",description:"Optional: Only trigger for tasks created in this specific folder",required:!1})},sampleData:{webhookId:"IEAAABC6JAAAABAS",eventAuthorId:"KUAAABKU",eventType:"TaskCreated",taskId:"IEAAABC6KQAB5FKW",lastUpdatedDate:"2016-10-10T11:33:28Z"},onEnable:o(async e=>{let t=e.webhookUrl,{folderId:r}=e.propsValue,n={hookUrl:t};r&&(n.folderId=r);let i={method:"POST",url:`${Z.baseUrl}/webhooks`,body:n,headers:{Authorization:`Bearer ${e.auth.access_token}`,"Content-Type":"application/json"}},{status:u,body:c}=await te.sendRequest(i);if(u!==200)throw new Error(`Failed to register webhook. Status: ${u}, Body: ${JSON.stringify(c)}`);await e.store.put("webhook_id",c.data[0].id)},"onEnable"),onDisable:o(async e=>{let t=await e.store.get("webhook_id");if(t){let r={method:"DELETE",url:`${Z.baseUrl}/webhooks/${t}`,headers:{Authorization:`Bearer ${e.auth.access_token}`}};try{await te.sendRequest(r),await e.store.delete("webhook_id")}catch(n){console.warn("Failed to unregister webhook:",n)}}},"onDisable"),run:o(async e=>{let t=e.payload.body;return t&&t.eventType==="TaskCreated"?t.data:[]},"run")});var Bs=He({name:"new_folder",displayName:"New Folder",description:"Fires when a new folder (or project) is created in Wrike.",aiMetadata:{description:"Fires when a new folder or project is created in Wrike, registered via a webhook on the FolderCreated event; can be scoped to a single parent folder so it only fires for folders created underneath it."},auth:V,type:"WEBHOOK",props:{parentFolderId:x.ShortText({displayName:"Parent Folder ID",description:"Optional: Only trigger for folders created in this specific parent folder",required:!1})},sampleData:{folderId:"IEAAABDMI4AB5FML",webhookId:"IEAAABDMJAAAABA7",eventAuthorId:"KUAAABLG",eventType:"FolderCreated",lastUpdatedDate:"2024-09-05T07:49:34Z"},onEnable:o(async e=>{let t=e.webhookUrl,{parentFolderId:r}=e.propsValue,n={hookUrl:t};r&&(n.folderId=r);let i={method:"POST",url:`${Z.baseUrl}/webhooks`,body:n,headers:{Authorization:`Bearer ${e.auth.access_token}`,"Content-Type":"application/json"}},{status:u,body:c}=await te.sendRequest(i);if(u!==200)throw new Error(`Failed to register webhook. Status: ${u}, Body: ${JSON.stringify(c)}`);await e.store.put("webhook_id",c.data[0].id)},"onEnable"),onDisable:o(async e=>{let t=await e.store.get("webhook_id");if(t){let r={method:"DELETE",url:`${Z.baseUrl}/webhooks/${t}`,headers:{Authorization:`Bearer ${e.auth.access_token}`}};try{await te.sendRequest(r),await e.store.delete("webhook_id")}catch(n){console.warn("Failed to unregister webhook:",n)}}},"onDisable"),run:o(async e=>{let t=e.payload.body;return t&&t.eventType==="FolderCreated"?t:[]},"run")});var Zs=He({name:"new_subtask_created",displayName:"New Subtask Created",description:"Triggers when a subtask is created.",aiMetadata:{description:"Fires when a task gains a parent in Wrike (the TaskParentsAdded event), representing a subtask being created under another task; can be scoped to a single parent task so it only fires for subtasks added beneath it."},auth:V,type:"WEBHOOK",props:{parentTaskId:x.ShortText({displayName:"Parent Task ID",description:"Optional: Only trigger for subtasks created under this specific parent task",required:!1})},sampleData:{addedParents:["IEAAABDCI4AB5FLD","IEAAABDCI4AB5FLE"],taskId:"IEAAABDCKQAB5FLC",webhookId:"IEAAABDCJAAAABAW",eventAuthorId:"KUAAABKY",eventType:"TaskParentsAdded",lastUpdatedDate:"2024-09-05T07:22:25Z"},onEnable:o(async e=>{let t=e.webhookUrl,{parentTaskId:r}=e.propsValue,n={hookUrl:t};r&&(n.taskId=r);let i={method:"POST",url:`${Z.baseUrl}/webhooks`,body:n,headers:{Authorization:`Bearer ${e.auth.access_token}`,"Content-Type":"application/json"}},{status:u,body:c}=await te.sendRequest(i);if(u!==200)throw new Error(`Failed to register webhook. Status: ${u}, Body: ${JSON.stringify(c)}`);await e.store.put("webhook_id",c.data[0].id)},"onEnable"),onDisable:o(async e=>{let t=await e.store.get("webhook_id");if(t){let r={method:"DELETE",url:`${Z.baseUrl}/webhooks/${t}`,headers:{Authorization:`Bearer ${e.auth.access_token}`}};try{await te.sendRequest(r),await e.store.delete("webhook_id")}catch(n){console.warn("Failed to unregister webhook:",n)}}},"onDisable"),run:o(async e=>{let t=e.payload.body;return t&&t.eventType==="TaskParentsAdded"?t:[t]},"run")});var xd=hi({displayName:"Wrike",auth:V,minimumSupportedRelease:"0.36.1",logoUrl:"https://cdn.activepieces.com/pieces/wrike.png",categories:["PRODUCTIVITY"],authors:["owuzo","sanket-a11y"],actions:[Ds,Rs,Ns,Cs,Us,Ms,js,Ls,ws({baseUrl:o(()=>"https://www.wrike.com/api/v4","baseUrl"),auth:V,authMapping:o(async e=>({Authorization:`Bearer ${e.access_token}`}),"authMapping")})],triggers:[Fs,Bs,Zs]});0&&(module.exports={wrike});
|
|
14
|
+
/*! Bundled license information:
|
|
15
|
+
|
|
16
|
+
mime-types/index.js:
|
|
17
|
+
(*!
|
|
18
|
+
* mime-types
|
|
19
|
+
* Copyright(c) 2014 Jonathan Ong
|
|
20
|
+
* Copyright(c) 2015 Douglas Christopher Wilson
|
|
21
|
+
* MIT Licensed
|
|
22
|
+
*)
|
|
23
|
+
*/
|
package/src/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const wrike: import("@activepieces/pieces-framework").Piece<import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props>>;
|
package/src/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;AACA,+DAAwE;AACxE,qEAAwE;AACxE,iDAAqD;AACrD,4CAA8C;AAC9C,2DAAuD;AACvD,2DAAuD;AACvD,+DAA2D;AAC3D,iEAA6D;AAC7D,2DAAuD;AACvD,uEAAmE;AACnE,uDAAmD;AACnD,2DAAuD;AACvD,sDAAkD;AAClD,0DAAsD;AACtD,4DAAwD;AAE3C,QAAA,KAAK,GAAG,IAAA,8BAAW,EAAC;IAC/B,WAAW,EAAE,OAAO;IACpB,IAAI,EAAE,gBAAS;IACf,uBAAuB,EAAE,QAAQ;IACjC,OAAO,EAAE,+CAA+C;IACxD,UAAU,EAAE,CAAC,sBAAa,CAAC,YAAY,CAAC;IACxC,OAAO,EAAE,CAAC,OAAO,EAAC,aAAa,CAAC;IAChC,OAAO,EAAE;QACP,wBAAU;QACV,wBAAU;QACV,4BAAY;QACZ,8BAAa;QACb,wBAAU;QACV,oCAAgB;QAChB,oBAAQ;QACR,wBAAU;QACV,IAAA,yCAAyB,EAAC;YACxB,OAAO,EAAE,GAAG,EAAE,CAAC,8BAA8B;YAC7C,IAAI,EAAE,gBAAS;YACf,WAAW,EAAE,CAAO,IAAI,EAAE,EAAE;gBAAC,OAAA,CAAC;oBAC5B,aAAa,EAAE,UAAW,IAAY,CAAC,YAAY,EAAE;iBACtD,CAAC,CAAA;cAAA;SACH,CAAC;KACH;IACD,QAAQ,EAAE;QACR,kBAAO;QACP,sBAAS;QACT,wBAAU;KACX;CACF,CAAC,CAAC"}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export declare const addComment: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props>, {
|
|
2
|
-
entityType: import("@activepieces/pieces-framework").StaticDropdownProperty<string, true>;
|
|
3
|
-
entityId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
4
|
-
text: import("@activepieces/pieces-framework").LongTextProperty<true>;
|
|
5
|
-
plainText: import("@activepieces/pieces-framework").CheckboxProperty<false>;
|
|
6
|
-
}>;
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.addComment = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
|
-
const pieces_common_1 = require("@activepieces/pieces-common");
|
|
7
|
-
const auth_1 = require("../common/auth");
|
|
8
|
-
const client_1 = require("../common/client");
|
|
9
|
-
exports.addComment = (0, pieces_framework_1.createAction)({
|
|
10
|
-
name: 'add_comment',
|
|
11
|
-
displayName: 'Add Comment',
|
|
12
|
-
description: 'Add a comment or internal note to a task or folder',
|
|
13
|
-
auth: auth_1.wrikeAuth,
|
|
14
|
-
props: {
|
|
15
|
-
entityType: pieces_framework_1.Property.StaticDropdown({
|
|
16
|
-
displayName: 'Entity Type',
|
|
17
|
-
description: 'Select whether you want to add the comment to a task or folder',
|
|
18
|
-
required: true,
|
|
19
|
-
options: {
|
|
20
|
-
options: [
|
|
21
|
-
{ label: 'Task', value: 'tasks' },
|
|
22
|
-
{ label: 'Folder', value: 'folders' },
|
|
23
|
-
],
|
|
24
|
-
},
|
|
25
|
-
}),
|
|
26
|
-
entityId: pieces_framework_1.Property.ShortText({
|
|
27
|
-
displayName: 'Entity ID',
|
|
28
|
-
description: 'The ID of the task or folder to add the comment to',
|
|
29
|
-
required: true,
|
|
30
|
-
}),
|
|
31
|
-
text: pieces_framework_1.Property.LongText({
|
|
32
|
-
displayName: 'Comment Text',
|
|
33
|
-
description: 'The text content of the comment',
|
|
34
|
-
required: true,
|
|
35
|
-
}),
|
|
36
|
-
plainText: pieces_framework_1.Property.Checkbox({
|
|
37
|
-
displayName: 'Plain Text',
|
|
38
|
-
description: 'Whether the comment should be treated as plain text (no HTML formatting). Default is HTML formatting.',
|
|
39
|
-
required: false,
|
|
40
|
-
defaultValue: false,
|
|
41
|
-
}),
|
|
42
|
-
},
|
|
43
|
-
run(context) {
|
|
44
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
45
|
-
const commentData = {
|
|
46
|
-
text: context.propsValue['text'],
|
|
47
|
-
};
|
|
48
|
-
if (context.propsValue['plainText'] !== undefined) {
|
|
49
|
-
commentData['plainText'] = context.propsValue['plainText'];
|
|
50
|
-
}
|
|
51
|
-
const response = yield client_1.wrikeCommon.apiCall({
|
|
52
|
-
auth: context.auth,
|
|
53
|
-
method: pieces_common_1.HttpMethod.POST,
|
|
54
|
-
resourceUri: `/${context.propsValue['entityType']}/${context.propsValue['entityId']}/comments`,
|
|
55
|
-
body: commentData,
|
|
56
|
-
});
|
|
57
|
-
return response.body;
|
|
58
|
-
});
|
|
59
|
-
},
|
|
60
|
-
});
|
|
61
|
-
//# sourceMappingURL=add-comment.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"add-comment.js","sourceRoot":"","sources":["../../../../src/lib/actions/add-comment.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,+DAAyD;AACzD,yCAA2C;AAC3C,6CAA+C;AAElC,QAAA,UAAU,GAAG,IAAA,+BAAY,EAAC;IACnC,IAAI,EAAE,aAAa;IACnB,WAAW,EAAE,aAAa;IAC1B,WAAW,EAAE,oDAAoD;IACjE,IAAI,EAAE,gBAAS;IACf,KAAK,EAAE;QACH,UAAU,EAAE,2BAAQ,CAAC,cAAc,CAAC;YAChC,WAAW,EAAE,aAAa;YAC1B,WAAW,EAAE,gEAAgE;YAC7E,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE;gBACL,OAAO,EAAE;oBACL,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE;oBACjC,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,SAAS,EAAE;iBACxC;aACJ;SACJ,CAAC;QACF,QAAQ,EAAE,2BAAQ,CAAC,SAAS,CAAC;YACzB,WAAW,EAAE,WAAW;YACxB,WAAW,EAAE,oDAAoD;YACjE,QAAQ,EAAE,IAAI;SACjB,CAAC;QACF,IAAI,EAAE,2BAAQ,CAAC,QAAQ,CAAC;YACpB,WAAW,EAAE,cAAc;YAC3B,WAAW,EAAE,iCAAiC;YAC9C,QAAQ,EAAE,IAAI;SACjB,CAAC;QACF,SAAS,EAAE,2BAAQ,CAAC,QAAQ,CAAC;YACzB,WAAW,EAAE,YAAY;YACzB,WAAW,EAAE,uGAAuG;YACpH,QAAQ,EAAE,KAAK;YACf,YAAY,EAAE,KAAK;SACtB,CAAC;KACL;IACK,GAAG,CAAC,OAAO;;YACb,MAAM,WAAW,GAAwB;gBACrC,IAAI,EAAE,OAAO,CAAC,UAAU,CAAC,MAAM,CAAC;aACnC,CAAC;YAEF,IAAI,OAAO,CAAC,UAAU,CAAC,WAAW,CAAC,KAAK,SAAS,EAAE,CAAC;gBAChD,WAAW,CAAC,WAAW,CAAC,GAAG,OAAO,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC;YAC/D,CAAC;YAED,MAAM,QAAQ,GAAG,MAAM,oBAAW,CAAC,OAAO,CAAC;gBACvC,IAAI,EAAE,OAAO,CAAC,IAAI;gBAClB,MAAM,EAAE,0BAAU,CAAC,IAAI;gBACvB,WAAW,EAAE,IAAI,OAAO,CAAC,UAAU,CAAC,YAAY,CAAC,IAAI,OAAO,CAAC,UAAU,CAAC,UAAU,CAAC,WAAW;gBAC9F,IAAI,EAAE,WAAW;aACpB,CAAC,CAAC;YAEH,OAAO,QAAQ,CAAC,IAAI,CAAC;QACzB,CAAC;KAAA;CACJ,CAAC,CAAC"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export declare const createFolder: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props>, {
|
|
2
|
-
parentFolderId: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
3
|
-
title: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
4
|
-
description: import("@activepieces/pieces-framework").LongTextProperty<false>;
|
|
5
|
-
shareds: import("@activepieces/pieces-framework").ArrayProperty<true> | import("@activepieces/pieces-framework").ArrayProperty<false>;
|
|
6
|
-
project: import("@activepieces/pieces-framework").CheckboxProperty<false>;
|
|
7
|
-
projectOwnerId: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
8
|
-
projectStartDate: import("@activepieces/pieces-framework").DateTimeProperty<false>;
|
|
9
|
-
projectEndDate: import("@activepieces/pieces-framework").DateTimeProperty<false>;
|
|
10
|
-
}>;
|