@activepieces/piece-hootsuite 0.0.4 → 0.0.5

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.
Files changed (33) hide show
  1. package/package.json +7 -12
  2. package/src/index.js +13 -39
  3. package/src/index.d.ts +0 -4
  4. package/src/index.d.ts.map +0 -1
  5. package/src/index.js.map +0 -1
  6. package/src/lib/actions/create-message.d.ts +0 -7
  7. package/src/lib/actions/create-message.d.ts.map +0 -1
  8. package/src/lib/actions/create-message.js +0 -97
  9. package/src/lib/actions/create-message.js.map +0 -1
  10. package/src/lib/actions/delete-message.d.ts +0 -4
  11. package/src/lib/actions/delete-message.d.ts.map +0 -1
  12. package/src/lib/actions/delete-message.js +0 -37
  13. package/src/lib/actions/delete-message.js.map +0 -1
  14. package/src/lib/actions/get-message.d.ts +0 -4
  15. package/src/lib/actions/get-message.d.ts.map +0 -1
  16. package/src/lib/actions/get-message.js +0 -48
  17. package/src/lib/actions/get-message.js.map +0 -1
  18. package/src/lib/auth.d.ts +0 -2
  19. package/src/lib/auth.d.ts.map +0 -1
  20. package/src/lib/auth.js +0 -12
  21. package/src/lib/auth.js.map +0 -1
  22. package/src/lib/common/index.d.ts +0 -10
  23. package/src/lib/common/index.d.ts.map +0 -1
  24. package/src/lib/common/index.js +0 -21
  25. package/src/lib/common/index.js.map +0 -1
  26. package/src/lib/triggers/new-published-post.d.ts +0 -3
  27. package/src/lib/triggers/new-published-post.d.ts.map +0 -1
  28. package/src/lib/triggers/new-published-post.js +0 -79
  29. package/src/lib/triggers/new-published-post.js.map +0 -1
  30. package/src/lib/triggers/new-scheduled-post.d.ts +0 -3
  31. package/src/lib/triggers/new-scheduled-post.d.ts.map +0 -1
  32. package/src/lib/triggers/new-scheduled-post.js +0 -80
  33. package/src/lib/triggers/new-scheduled-post.js.map +0 -1
package/package.json CHANGED
@@ -1,16 +1,11 @@
1
1
  {
2
2
  "name": "@activepieces/piece-hootsuite",
3
- "version": "0.0.4",
3
+ "version": "0.0.5",
4
4
  "main": "./src/index.js",
5
- "types": "./src/index.d.ts",
6
- "scripts": {
7
- "build": "tsc -p tsconfig.lib.json && cp package.json dist/",
8
- "lint": "eslint 'src/**/*.ts'"
9
- },
10
- "dependencies": {
11
- "@activepieces/pieces-common": "0.12.3",
12
- "@activepieces/pieces-framework": "0.30.0",
13
- "@activepieces/shared": "0.87.1",
14
- "tslib": "2.6.2"
15
- }
5
+ "dependencies": {},
6
+ "files": [
7
+ "src/index.js",
8
+ "package.json",
9
+ "src/i18n"
10
+ ]
16
11
  }
package/src/index.js CHANGED
@@ -1,39 +1,13 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.hootsuiteAuth = exports.hootsuite = 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 shared_1 = require("@activepieces/shared");
8
- const create_message_1 = require("./lib/actions/create-message");
9
- const get_message_1 = require("./lib/actions/get-message");
10
- const delete_message_1 = require("./lib/actions/delete-message");
11
- const new_scheduled_post_1 = require("./lib/triggers/new-scheduled-post");
12
- const new_published_post_1 = require("./lib/triggers/new-published-post");
13
- const auth_1 = require("./lib/auth");
14
- Object.defineProperty(exports, "hootsuiteAuth", { enumerable: true, get: function () { return auth_1.hootsuiteAuth; } });
15
- exports.hootsuite = (0, pieces_framework_1.createPiece)({
16
- displayName: 'Hootsuite',
17
- description: 'Social media management — schedule posts and manage multiple networks from one dashboard.',
18
- minimumSupportedRelease: '0.36.1',
19
- logoUrl: 'https://cdn.activepieces.com/pieces/hootsuite.png',
20
- categories: [shared_1.PieceCategory.MARKETING],
21
- auth: auth_1.hootsuiteAuth,
22
- authors: ['onyedikachi-david'],
23
- actions: [
24
- create_message_1.createMessageAction,
25
- get_message_1.getMessageAction,
26
- delete_message_1.deleteMessageAction,
27
- (0, pieces_common_1.createCustomApiCallAction)({
28
- baseUrl: () => 'https://platform.hootsuite.com/v1',
29
- auth: auth_1.hootsuiteAuth,
30
- authMapping: (auth) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
31
- return ({
32
- Authorization: `Bearer ${auth.access_token}`,
33
- });
34
- }),
35
- }),
36
- ],
37
- triggers: [new_scheduled_post_1.newScheduledPostTrigger, new_published_post_1.newPublishedPostTrigger],
38
- });
39
- //# sourceMappingURL=index.js.map
1
+ "use strict";var Fs=Object.create;var Je=Object.defineProperty;var Bs=Object.getOwnPropertyDescriptor;var Vs=Object.getOwnPropertyNames;var Zs=Object.getPrototypeOf,Hs=Object.prototype.hasOwnProperty;var o=(e,t)=>Je(e,"name",{value:t,configurable:!0});var E=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),gn=(e,t)=>{for(var r in t)Je(e,r,{get:t[r],enumerable:!0})},yn=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Vs(t))!Hs.call(e,i)&&i!==r&&Je(e,i,{get:()=>t[i],enumerable:!(n=Bs(t,i))||n.enumerable});return e};var Re=(e,t,r)=>(r=e!=null?Fs(Zs(e)):{},yn(t||!e||!e.__esModule?Je(r,"default",{value:e,enumerable:!0}):r,e)),Ws=e=>yn(Je({},"__esModule",{value:!0}),e);var Do=E((Ro,Lt)=>{(function(e){"use strict";let t="(0?\\d+|0x[a-f0-9]+)",r={fourOctet:new RegExp(`^${t}\\.${t}\\.${t}\\.${t}$`,"i"),threeOctet:new RegExp(`^${t}\\.${t}\\.${t}$`,"i"),twoOctet:new RegExp(`^${t}\\.${t}$`,"i"),longValue:new RegExp(`^${t}$`,"i")},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 f(s,d){if(s.indexOf("::")!==s.lastIndexOf("::"))return null;let g=0,m=-1,v=(s.match(p.zoneIndex)||[])[0],_,M;for(v&&(v=v.substring(1),s=s.replace(/%.+$/,""));(m=s.indexOf(":",m+1))>=0;)g++;if(s.substr(0,2)==="::"&&g--,s.substr(-2,2)==="::"&&g--,g>d)return null;for(M=d-g,_=":";M--;)_+="0:";return s=s.replace("::",_),s[0]===":"&&(s=s.slice(1)),s[s.length-1]===":"&&(s=s.slice(0,-1)),d=function(){let te=s.split(":"),ie=[];for(let Ke=0;Ke<te.length;Ke++)ie.push(parseInt(te[Ke],16));return ie}(),{parts:d,zoneId:v}}o(f,"expandIPv6");function y(s,d,g,m){if(s.length!==d.length)throw new Error("ipaddr: cannot match CIDR for objects with different lengths");let v=0,_;for(;m>0;){if(_=g-m,_<0&&(_=0),s[v]>>_!==d[v]>>_)return!1;m-=g,v+=1}return!0}o(y,"matchCIDR");function x(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(x,"parseIntAuto");function b(s,d){for(;s.length<d;)s=`0${s}`;return s}o(b,"padPart");let P={};P.IPv4=function(){function s(d){if(d.length!==4)throw new Error("ipaddr: ipv4 octet count should be 4");let g,m;for(g=0;g<d.length;g++)if(m=d[g],!(0<=m&&m<=255))throw new Error("ipaddr: ipv4 octet should fit in 8 bits");this.octets=d}return o(s,"IPv4"),s.prototype.SpecialRanges={unspecified:[[new s([0,0,0,0]),8]],broadcast:[[new s([255,255,255,255]),32]],multicast:[[new s([224,0,0,0]),4]],linkLocal:[[new s([169,254,0,0]),16]],loopback:[[new s([127,0,0,0]),8]],carrierGradeNat:[[new s([100,64,0,0]),10]],private:[[new s([10,0,0,0]),8],[new s([172,16,0,0]),12],[new s([192,168,0,0]),16]],reserved:[[new s([192,0,0,0]),24],[new s([192,0,2,0]),24],[new s([192,88,99,0]),24],[new s([198,18,0,0]),15],[new s([198,51,100,0]),24],[new s([203,0,113,0]),24],[new s([240,0,0,0]),4]],as112:[[new s([192,175,48,0]),24],[new s([192,31,196,0]),24]],amt:[[new s([192,52,193,0]),24]]},s.prototype.kind=function(){return"ipv4"},s.prototype.match=function(d,g){let m;if(g===void 0&&(m=d,d=m[0],g=m[1]),d.kind()!=="ipv4")throw new Error("ipaddr: cannot match ipv4 address with non-ipv4 one");return y(this.octets,d.octets,8,g)},s.prototype.prefixLengthFromSubnetMask=function(){let d=0,g=!1,m={0:8,128:7,192:6,224:5,240:4,248:3,252:2,254:1,255:0},v,_,M;for(v=3;v>=0;v-=1)if(_=this.octets[v],_ in m){if(M=m[_],g&&M!==0)return null;M!==8&&(g=!0),d+=M}else return null;return 32-d},s.prototype.range=function(){return P.subnetMatch(this,this.SpecialRanges)},s.prototype.toByteArray=function(){return this.octets.slice(0)},s.prototype.toIPv4MappedAddress=function(){return P.IPv6.parse(`::ffff:${this.toString()}`)},s.prototype.toNormalizedString=function(){return this.toString()},s.prototype.toString=function(){return this.octets.join(".")},s}(),P.IPv4.broadcastAddressFromCIDR=function(s){try{let d=this.parseCIDR(s),g=d[0].toByteArray(),m=this.subnetMaskFromPrefixLength(d[1]).toByteArray(),v=[],_=0;for(;_<4;)v.push(parseInt(g[_],10)|parseInt(m[_],10)^255),_++;return new this(v)}catch{throw new Error("ipaddr: the address does not have IPv4 CIDR format")}},P.IPv4.isIPv4=function(s){return this.parser(s)!==null},P.IPv4.isValid=function(s){try{return new this(this.parser(s)),!0}catch{return!1}},P.IPv4.isValidCIDR=function(s){try{return this.parseCIDR(s),!0}catch{return!1}},P.IPv4.isValidFourPartDecimal=function(s){return!!(P.IPv4.isValid(s)&&s.match(/^(0|[1-9]\d*)(\.(0|[1-9]\d*)){3}$/))},P.IPv4.isValidCIDRFourPartDecimal=function(s){let d=s.match(/^(.+)\/(\d+)$/);return!P.IPv4.isValidCIDR(s)||!d?!1:P.IPv4.isValidFourPartDecimal(d[1])},P.IPv4.networkAddressFromCIDR=function(s){let d,g,m,v,_;try{for(d=this.parseCIDR(s),m=d[0].toByteArray(),_=this.subnetMaskFromPrefixLength(d[1]).toByteArray(),v=[],g=0;g<4;)v.push(parseInt(m[g],10)&parseInt(_[g],10)),g++;return new this(v)}catch{throw new Error("ipaddr: the address does not have IPv4 CIDR format")}},P.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)},P.IPv4.parseCIDR=function(s){let d;if(d=s.match(/^(.+)\/(\d+)$/)){let g=parseInt(d[2]);if(g>=0&&g<=32){let m=[this.parse(d[1]),g];return Object.defineProperty(m,"toString",{value:o(function(){return this.join("/")},"value")}),m}}throw new Error("ipaddr: string is not formatted like an IPv4 CIDR range")},P.IPv4.parser=function(s){let d,g,m;if(d=s.match(r.fourOctet))return function(){let v=d.slice(1,6),_=[];for(let M=0;M<v.length;M++)g=v[M],_.push(x(g));return _}();if(d=s.match(r.longValue)){if(m=x(d[1]),m>4294967295||m<0)throw new Error("ipaddr: address outside defined range");return function(){let v=[],_;for(_=0;_<=24;_+=8)v.push(m>>_&255);return v}().reverse()}else return(d=s.match(r.twoOctet))?function(){let v=d.slice(1,4),_=[];if(m=x(v[1]),m>16777215||m<0)throw new Error("ipaddr: address outside defined range");return _.push(x(v[0])),_.push(m>>16&255),_.push(m>>8&255),_.push(m&255),_}():(d=s.match(r.threeOctet))?function(){let v=d.slice(1,5),_=[];if(m=x(v[2]),m>65535||m<0)throw new Error("ipaddr: address outside defined range");return _.push(x(v[0])),_.push(x(v[1])),_.push(m>>8&255),_.push(m&255),_}():null},P.IPv4.subnetMaskFromPrefixLength=function(s){if(s=parseInt(s),s<0||s>32)throw new Error("ipaddr: invalid IPv4 prefix length");let d=[0,0,0,0],g=0,m=Math.floor(s/8);for(;g<m;)d[g]=255,g++;return m<4&&(d[m]=Math.pow(2,s%8)-1<<8-s%8),new this(d)},P.IPv6=function(){function s(d,g){let m,v;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(v=this.parts[m],!(0<=v&&v<=65535))throw new Error("ipaddr: ipv6 part should fit in 16 bits");g&&(this.zoneId=g)}return o(s,"IPv6"),s.prototype.SpecialRanges={unspecified:[new s([0,0,0,0,0,0,0,0]),128],linkLocal:[new s([65152,0,0,0,0,0,0,0]),10],multicast:[new s([65280,0,0,0,0,0,0,0]),8],loopback:[new s([0,0,0,0,0,0,0,1]),128],uniqueLocal:[new s([64512,0,0,0,0,0,0,0]),7],ipv4Mapped:[new s([0,0,0,0,0,65535,0,0]),96],discard:[new s([256,0,0,0,0,0,0,0]),64],rfc6145:[new s([0,0,0,0,65535,0,0,0]),96],rfc6052:[new s([100,65435,0,0,0,0,0,0]),96],"6to4":[new s([8194,0,0,0,0,0,0,0]),16],teredo:[new s([8193,0,0,0,0,0,0,0]),32],benchmarking:[new s([8193,2,0,0,0,0,0,0]),48],amt:[new s([8193,3,0,0,0,0,0,0]),32],as112v6:[[new s([8193,4,274,0,0,0,0,0]),48],[new s([9760,79,32768,0,0,0,0,0]),48]],deprecated:[new s([8193,16,0,0,0,0,0,0]),28],orchid2:[new s([8193,32,0,0,0,0,0,0]),28],droneRemoteIdProtocolEntityTags:[new s([8193,48,0,0,0,0,0,0]),28],reserved:[[new s([8193,0,0,0,0,0,0,0]),23],[new s([8193,3512,0,0,0,0,0,0]),32]]},s.prototype.isIPv4MappedAddress=function(){return this.range()==="ipv4Mapped"},s.prototype.kind=function(){return"ipv6"},s.prototype.match=function(d,g){let m;if(g===void 0&&(m=d,d=m[0],g=m[1]),d.kind()!=="ipv6")throw new Error("ipaddr: cannot match ipv6 address with non-ipv6 one");return y(this.parts,d.parts,16,g)},s.prototype.prefixLengthFromSubnetMask=function(){let d=0,g=!1,m={0:16,32768:15,49152:14,57344:13,61440:12,63488:11,64512:10,65024:9,65280:8,65408:7,65472:6,65504:5,65520:4,65528:3,65532:2,65534:1,65535:0},v,_;for(let M=7;M>=0;M-=1)if(v=this.parts[M],v in m){if(_=m[v],g&&_!==0)return null;_!==16&&(g=!0),d+=_}else return null;return 128-d},s.prototype.range=function(){return P.subnetMatch(this,this.SpecialRanges)},s.prototype.toByteArray=function(){let d,g=[],m=this.parts;for(let v=0;v<m.length;v++)d=m[v],g.push(d>>8),g.push(d&255);return g},s.prototype.toFixedLengthString=function(){let d=function(){let m=[];for(let v=0;v<this.parts.length;v++)m.push(b(this.parts[v].toString(16),4));return m}.call(this).join(":"),g="";return this.zoneId&&(g=`%${this.zoneId}`),d+g},s.prototype.toIPv4Address=function(){if(!this.isIPv4MappedAddress())throw new Error("ipaddr: trying to convert a generic ipv6 address to ipv4");let d=this.parts.slice(-2),g=d[0],m=d[1];return new P.IPv4([g>>8,g&255,m>>8,m&255])},s.prototype.toNormalizedString=function(){let d=function(){let m=[];for(let v=0;v<this.parts.length;v++)m.push(this.parts[v].toString(16));return m}.call(this).join(":"),g="";return this.zoneId&&(g=`%${this.zoneId}`),d+g},s.prototype.toRFC5952String=function(){let d=/((^|:)(0(:|$)){2,})/g,g=this.toNormalizedString(),m=0,v=-1,_;for(;_=d.exec(g);)_[0].length>v&&(m=_.index,v=_[0].length);return v<0?g:`${g.substring(0,m)}::${g.substring(m+v)}`},s.prototype.toString=function(){return this.toRFC5952String()},s}(),P.IPv6.broadcastAddressFromCIDR=function(s){try{let d=this.parseCIDR(s),g=d[0].toByteArray(),m=this.subnetMaskFromPrefixLength(d[1]).toByteArray(),v=[],_=0;for(;_<16;)v.push(parseInt(g[_],10)|parseInt(m[_],10)^255),_++;return new this(v)}catch(d){throw new Error(`ipaddr: the address does not have IPv6 CIDR format (${d})`)}},P.IPv6.isIPv6=function(s){return this.parser(s)!==null},P.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}},P.IPv6.isValidCIDR=function(s){if(typeof s=="string"&&s.indexOf(":")===-1)return!1;try{return this.parseCIDR(s),!0}catch{return!1}},P.IPv6.networkAddressFromCIDR=function(s){let d,g,m,v,_;try{for(d=this.parseCIDR(s),m=d[0].toByteArray(),_=this.subnetMaskFromPrefixLength(d[1]).toByteArray(),v=[],g=0;g<16;)v.push(parseInt(m[g],10)&parseInt(_[g],10)),g++;return new this(v)}catch(M){throw new Error(`ipaddr: the address does not have IPv6 CIDR format (${M})`)}},P.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)},P.IPv6.parseCIDR=function(s){let d,g,m;if((g=s.match(/^(.+)\/(\d+)$/))&&(d=parseInt(g[2]),d>=0&&d<=128))return m=[this.parse(g[1]),d],Object.defineProperty(m,"toString",{value:o(function(){return this.join("/")},"value")}),m;throw new Error("ipaddr: string is not formatted like an IPv6 CIDR range")},P.IPv6.parser=function(s){let d,g,m,v,_,M;if(m=s.match(p.deprecatedTransitional))return this.parser(`::ffff:${m[1]}`);if(p.native.test(s))return f(s,8);if((m=s.match(p.transitional))&&(M=m[6]||"",d=m[1],m[1].endsWith("::")||(d=d.slice(0,-1)),d=f(d+M,6),d.parts)){for(_=[parseInt(m[2]),parseInt(m[3]),parseInt(m[4]),parseInt(m[5])],g=0;g<_.length;g++)if(v=_[g],!(0<=v&&v<=255))return null;return d.parts.push(_[0]<<8|_[1]),d.parts.push(_[2]<<8|_[3]),{parts:d.parts,zoneId:d.zoneId}}return null},P.IPv6.subnetMaskFromPrefixLength=function(s){if(s=parseInt(s),s<0||s>128)throw new Error("ipaddr: invalid IPv6 prefix length");let d=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],g=0,m=Math.floor(s/8);for(;g<m;)d[g]=255,g++;return m<16&&(d[m]=Math.pow(2,s%8)-1<<8-s%8),new this(d)},P.fromByteArray=function(s){let d=s.length;if(d===4)return new P.IPv4(s);if(d===16)return new P.IPv6(s);throw new Error("ipaddr: the binary input is neither an IPv6 nor IPv4 address")},P.isValid=function(s){return P.IPv6.isValid(s)||P.IPv4.isValid(s)},P.isValidCIDR=function(s){return P.IPv6.isValidCIDR(s)||P.IPv4.isValidCIDR(s)},P.parse=function(s){if(P.IPv6.isValid(s))return P.IPv6.parse(s);if(P.IPv4.isValid(s))return P.IPv4.parse(s);throw new Error("ipaddr: the address has neither IPv6 nor IPv4 format")},P.parseCIDR=function(s){try{return P.IPv6.parseCIDR(s)}catch{try{return P.IPv4.parseCIDR(s)}catch{throw new Error("ipaddr: the address has neither IPv6 nor IPv4 CIDR format")}}},P.process=function(s){let d=this.parse(s);return d.kind()==="ipv6"&&d.isIPv4MappedAddress()?d.toIPv4Address():d},P.subnetMatch=function(s,d,g){let m,v,_,M;g==null&&(g="unicast");for(v in d)if(Object.prototype.hasOwnProperty.call(d,v)){for(_=d[v],_[0]&&!(_[0]instanceof Array)&&(_=[_]),m=0;m<_.length;m++)if(M=_[m],s.kind()===M[0].kind()&&s.match.apply(s,M))return v}return g},typeof Lt<"u"&&Lt.exports?Lt.exports=P:e.ipaddr=P})(Ro)});var ki=E((KS,zi)=>{var Ai=require("stream").Stream,_l=require("util");zi.exports=se;function se(){this.source=null,this.dataSize=0,this.maxDataSize=1024*1024,this.pauseStream=!0,this._maxDataSizeExceeded=!1,this._released=!1,this._bufferedEvents=[]}o(se,"DelayedStream");_l.inherits(se,Ai);se.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(se.prototype,"readable",{configurable:!0,enumerable:!0,get:o(function(){return this.source.readable},"get")});se.prototype.setEncoding=function(){return this.source.setEncoding.apply(this.source,arguments)};se.prototype.resume=function(){this._released||this.release(),this.source.resume()};se.prototype.pause=function(){this.source.pause()};se.prototype.release=function(){this._released=!0,this._bufferedEvents.forEach(function(e){this.emit.apply(this,e)}.bind(this)),this._bufferedEvents=[]};se.prototype.pipe=function(){var e=Ai.prototype.pipe.apply(this,arguments);return this.resume(),e};se.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)};se.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 Di=E((XS,Ri)=>{var bl=require("util"),wi=require("stream").Stream,Oi=ki();Ri.exports=G;function G(){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(G,"CombinedStream");bl.inherits(G,wi);G.create=function(e){var t=new this;e=e||{};for(var r in e)t[r]=e[r];return t};G.isStreamLike=function(e){return typeof e!="function"&&typeof e!="string"&&typeof e!="boolean"&&typeof e!="number"&&!Buffer.isBuffer(e)};G.prototype.append=function(e){var t=G.isStreamLike(e);if(t){if(!(e instanceof Oi)){var r=Oi.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};G.prototype.pipe=function(e,t){return wi.prototype.pipe.call(this,e,t),this.resume(),e};G.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}};G.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=G.isStreamLike(r);n&&(r.on("data",this._checkDataSize.bind(this)),this._handleErrors(r)),this._pipeNext(r)}.bind(this))};G.prototype._pipeNext=function(e){this._currentStream=e;var t=G.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()};G.prototype._handleErrors=function(e){var t=this;e.on("error",function(r){t._emitError(r)})};G.prototype.write=function(e){this.emit("data",e)};G.prototype.pause=function(){this.pauseStreams&&(this.pauseStreams&&this._currentStream&&typeof this._currentStream.pause=="function"&&this._currentStream.pause(),this.emit("pause"))};G.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")};G.prototype.end=function(){this._reset(),this.emit("end")};G.prototype.destroy=function(){this._reset(),this.emit("close")};G.prototype._reset=function(){this.writable=!1,this._streams=[],this._currentStream=null};G.prototype._checkDataSize=function(){if(this._updateDataSize(),!(this.dataSize<=this.maxDataSize)){var e="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this._emitError(new Error(e))}};G.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)};G.prototype._emitError=function(e){this._reset(),this.emit("error",e)}});var Ci=E((QS,Ni)=>{"use strict";Ni.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 ji=E(ee=>{"use strict";var qt=Ci(),Il=require("path").extname,Ui=/^\s*([^;\s]*)(?:;|\s|$)/,Tl=/^text\//i;ee.charset=Mi;ee.charsets={lookup:Mi};ee.contentType=El;ee.extension=$l;ee.extensions=Object.create(null);ee.lookup=Sl;ee.types=Object.create(null);Al(ee.extensions,ee.types);function Mi(e){if(!e||typeof e!="string")return!1;var t=Ui.exec(e),r=t&&qt[t[1].toLowerCase()];return r&&r.charset?r.charset:t&&Tl.test(t[1])?"UTF-8":!1}o(Mi,"charset");function El(e){if(!e||typeof e!="string")return!1;var t=e.indexOf("/")===-1?ee.lookup(e):e;if(!t)return!1;if(t.indexOf("charset")===-1){var r=ee.charset(t);r&&(t+="; charset="+r.toLowerCase())}return t}o(El,"contentType");function $l(e){if(!e||typeof e!="string")return!1;var t=Ui.exec(e),r=t&&ee.extensions[t[1].toLowerCase()];return!r||!r.length?!1:r[0]}o($l,"extension");function Sl(e){if(!e||typeof e!="string")return!1;var t=Il("x."+e).toLowerCase().substr(1);return t&&ee.types[t]||!1}o(Sl,"lookup");function Al(e,t){var r=["nginx","apache",void 0,"iana"];Object.keys(qt).forEach(o(function(i){var u=qt[i],c=u.extensions;if(!(!c||!c.length)){e[i]=c;for(var p=0;p<c.length;p++){var f=c[p];if(t[f]){var y=r.indexOf(qt[t[f]].source),x=r.indexOf(u.source);if(t[f]!=="application/octet-stream"&&(y>x||y===x&&t[f].substr(0,12)==="application/"))continue}t[f]=i}}},"forEachMimeType"))}o(Al,"populateMaps")});var Fi=E((rA,Li)=>{Li.exports=zl;function zl(e){var t=typeof setImmediate=="function"?setImmediate:typeof process=="object"&&typeof process.nextTick=="function"?process.nextTick:null;t?t(e):setTimeout(e,0)}o(zl,"defer")});var Hr=E((oA,Vi)=>{var Bi=Fi();Vi.exports=kl;function kl(e){var t=!1;return Bi(function(){t=!0}),o(function(n,i){t?e(n,i):Bi(o(function(){e(n,i)},"nextTick_callback"))},"async_callback")}o(kl,"async")});var Wr=E((aA,Zi)=>{Zi.exports=Ol;function Ol(e){Object.keys(e.jobs).forEach(wl.bind(e)),e.jobs={}}o(Ol,"abort");function wl(e){typeof this.jobs[e]=="function"&&this.jobs[e]()}o(wl,"clean")});var Gr=E((uA,Wi)=>{var Hi=Hr(),Rl=Wr();Wi.exports=Dl;function Dl(e,t,r,n){var i=r.keyedList?r.keyedList[r.index]:r.index;r.jobs[i]=Nl(t,i,e[i],function(u,c){i in r.jobs&&(delete r.jobs[i],u?Rl(r):r.results[i]=c,n(u,r.results))})}o(Dl,"iterate");function Nl(e,t,r,n){var i;return e.length==2?i=e(r,Hi(n)):i=e(r,t,Hi(n)),i}o(Nl,"runJob")});var qr=E((lA,Gi)=>{Gi.exports=Cl;function Cl(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(Cl,"state")});var Kr=E((dA,qi)=>{var Ul=Wr(),Ml=Hr();qi.exports=jl;function jl(e){Object.keys(this.jobs).length&&(this.index=this.size,Ul(this),Ml(e)(null,this.results))}o(jl,"terminator")});var Ji=E((fA,Ki)=>{var Ll=Gr(),Fl=qr(),Bl=Kr();Ki.exports=Vl;function Vl(e,t,r){for(var n=Fl(e);n.index<(n.keyedList||e).length;)Ll(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 Bl.bind(n,r)}o(Vl,"parallel")});var Jr=E((yA,Kt)=>{var Xi=Gr(),Zl=qr(),Hl=Kr();Kt.exports=Wl;Kt.exports.ascending=Yi;Kt.exports.descending=Gl;function Wl(e,t,r,n){var i=Zl(e,r);return Xi(e,t,i,o(function u(c,p){if(c){n(c,p);return}if(i.index++,i.index<(i.keyedList||e).length){Xi(e,t,i,u);return}n(null,i.results)},"iteratorHandler")),Hl.bind(i,n)}o(Wl,"serialOrdered");function Yi(e,t){return e<t?-1:e>t?1:0}o(Yi,"ascending");function Gl(e,t){return-1*Yi(e,t)}o(Gl,"descending")});var ea=E((vA,Qi)=>{var ql=Jr();Qi.exports=Kl;function Kl(e,t,r){return ql(e,t,null,r)}o(Kl,"serial")});var ra=E((PA,ta)=>{ta.exports={parallel:Ji(),serial:ea(),serialOrdered:Jr()}});var Xr=E((_A,na)=>{"use strict";na.exports=Object});var ia=E((bA,oa)=>{"use strict";oa.exports=Error});var sa=E((IA,aa)=>{"use strict";aa.exports=EvalError});var ca=E((TA,ua)=>{"use strict";ua.exports=RangeError});var pa=E((EA,la)=>{"use strict";la.exports=ReferenceError});var ma=E(($A,da)=>{"use strict";da.exports=SyntaxError});var Jt=E((SA,fa)=>{"use strict";fa.exports=TypeError});var ya=E((AA,ga)=>{"use strict";ga.exports=URIError});var va=E((zA,ha)=>{"use strict";ha.exports=Math.abs});var Pa=E((kA,xa)=>{"use strict";xa.exports=Math.floor});var ba=E((OA,_a)=>{"use strict";_a.exports=Math.max});var Ta=E((wA,Ia)=>{"use strict";Ia.exports=Math.min});var $a=E((RA,Ea)=>{"use strict";Ea.exports=Math.pow});var Aa=E((DA,Sa)=>{"use strict";Sa.exports=Math.round});var ka=E((NA,za)=>{"use strict";za.exports=Number.isNaN||o(function(t){return t!==t},"isNaN")});var wa=E((UA,Oa)=>{"use strict";var Jl=ka();Oa.exports=o(function(t){return Jl(t)||t===0?t:t<0?-1:1},"sign")});var Da=E((jA,Ra)=>{"use strict";Ra.exports=Object.getOwnPropertyDescriptor});var Yr=E((LA,Na)=>{"use strict";var Xt=Da();if(Xt)try{Xt([],"length")}catch{Xt=null}Na.exports=Xt});var Ua=E((FA,Ca)=>{"use strict";var Yt=Object.defineProperty||!1;if(Yt)try{Yt({},"a",{value:1})}catch{Yt=!1}Ca.exports=Yt});var Qr=E((BA,Ma)=>{"use strict";Ma.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 Fa=E((ZA,La)=>{"use strict";var ja=typeof Symbol<"u"&&Symbol,Xl=Qr();La.exports=o(function(){return typeof ja!="function"||typeof Symbol!="function"||typeof ja("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:Xl()},"hasNativeSymbols")});var en=E((WA,Ba)=>{"use strict";Ba.exports=typeof Reflect<"u"&&Reflect.getPrototypeOf||null});var tn=E((GA,Va)=>{"use strict";var Yl=Xr();Va.exports=Yl.getPrototypeOf||null});var Wa=E((qA,Ha)=>{"use strict";var Ql="Function.prototype.bind called on incompatible ",ep=Object.prototype.toString,tp=Math.max,rp="[object Function]",Za=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"),np=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"),op=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");Ha.exports=o(function(t){var r=this;if(typeof r!="function"||ep.apply(r)!==rp)throw new TypeError(Ql+r);for(var n=np(arguments,1),i,u=o(function(){if(this instanceof i){var x=r.apply(this,Za(n,arguments));return Object(x)===x?x:this}return r.apply(t,Za(n,arguments))},"binder"),c=tp(0,r.length-n.length),p=[],f=0;f<c;f++)p[f]="$"+f;if(i=Function("binder","return function ("+op(p,",")+"){ return binder.apply(this,arguments); }")(u),r.prototype){var y=o(function(){},"Empty");y.prototype=r.prototype,i.prototype=new y,y.prototype=null}return i},"bind")});var Ze=E((JA,Ga)=>{"use strict";var ip=Wa();Ga.exports=Function.prototype.bind||ip});var Qt=E((XA,qa)=>{"use strict";qa.exports=Function.prototype.call});var rn=E((YA,Ka)=>{"use strict";Ka.exports=Function.prototype.apply});var Xa=E((QA,Ja)=>{"use strict";Ja.exports=typeof Reflect<"u"&&Reflect&&Reflect.apply});var Qa=E((ez,Ya)=>{"use strict";var ap=Ze(),sp=rn(),up=Qt(),cp=Xa();Ya.exports=cp||ap.call(up,sp)});var ts=E((tz,es)=>{"use strict";var lp=Ze(),pp=Jt(),dp=Qt(),mp=Qa();es.exports=o(function(t){if(t.length<1||typeof t[0]!="function")throw new pp("a function is required");return mp(lp,dp,t)},"callBindBasic")});var ss=E((nz,as)=>{"use strict";var fp=ts(),rs=Yr(),os;try{os=[].__proto__===Array.prototype}catch(e){if(!e||typeof e!="object"||!("code"in e)||e.code!=="ERR_PROTO_ACCESS")throw e}var nn=!!os&&rs&&rs(Object.prototype,"__proto__"),is=Object,ns=is.getPrototypeOf;as.exports=nn&&typeof nn.get=="function"?fp([nn.get]):typeof ns=="function"?o(function(t){return ns(t==null?t:is(t))},"getDunder"):!1});var ds=E((iz,ps)=>{"use strict";var us=en(),cs=tn(),ls=ss();ps.exports=us?o(function(t){return us(t)},"getProto"):cs?o(function(t){if(!t||typeof t!="object"&&typeof t!="function")throw new TypeError("getProto: not an object");return cs(t)},"getProto"):ls?o(function(t){return ls(t)},"getProto"):null});var on=E((sz,ms)=>{"use strict";var gp=Function.prototype.call,yp=Object.prototype.hasOwnProperty,hp=Ze();ms.exports=hp.call(gp,yp)});var Ps=E((uz,xs)=>{"use strict";var U,vp=Xr(),xp=ia(),Pp=sa(),_p=ca(),bp=pa(),qe=ma(),Ge=Jt(),Ip=ya(),Tp=va(),Ep=Pa(),$p=ba(),Sp=Ta(),Ap=$a(),zp=Aa(),kp=wa(),hs=Function,an=o(function(e){try{return hs('"use strict"; return ('+e+").constructor;")()}catch{}},"getEvalledConstructor"),vt=Yr(),Op=Ua(),sn=o(function(){throw new Ge},"throwTypeError"),wp=vt?function(){try{return arguments.callee,sn}catch{try{return vt(arguments,"callee").get}catch{return sn}}}():sn,He=Fa()(),J=ds(),Rp=tn(),Dp=en(),vs=rn(),xt=Qt(),We={},Np=typeof Uint8Array>"u"||!J?U:J(Uint8Array),we={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?U:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?U:ArrayBuffer,"%ArrayIteratorPrototype%":He&&J?J([][Symbol.iterator]()):U,"%AsyncFromSyncIteratorPrototype%":U,"%AsyncFunction%":We,"%AsyncGenerator%":We,"%AsyncGeneratorFunction%":We,"%AsyncIteratorPrototype%":We,"%Atomics%":typeof Atomics>"u"?U:Atomics,"%BigInt%":typeof BigInt>"u"?U:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?U:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?U:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?U:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":xp,"%eval%":eval,"%EvalError%":Pp,"%Float16Array%":typeof Float16Array>"u"?U:Float16Array,"%Float32Array%":typeof Float32Array>"u"?U:Float32Array,"%Float64Array%":typeof Float64Array>"u"?U:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?U:FinalizationRegistry,"%Function%":hs,"%GeneratorFunction%":We,"%Int8Array%":typeof Int8Array>"u"?U:Int8Array,"%Int16Array%":typeof Int16Array>"u"?U:Int16Array,"%Int32Array%":typeof Int32Array>"u"?U:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":He&&J?J(J([][Symbol.iterator]())):U,"%JSON%":typeof JSON=="object"?JSON:U,"%Map%":typeof Map>"u"?U:Map,"%MapIteratorPrototype%":typeof Map>"u"||!He||!J?U:J(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":vp,"%Object.getOwnPropertyDescriptor%":vt,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?U:Promise,"%Proxy%":typeof Proxy>"u"?U:Proxy,"%RangeError%":_p,"%ReferenceError%":bp,"%Reflect%":typeof Reflect>"u"?U:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?U:Set,"%SetIteratorPrototype%":typeof Set>"u"||!He||!J?U:J(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?U:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":He&&J?J(""[Symbol.iterator]()):U,"%Symbol%":He?Symbol:U,"%SyntaxError%":qe,"%ThrowTypeError%":wp,"%TypedArray%":Np,"%TypeError%":Ge,"%Uint8Array%":typeof Uint8Array>"u"?U:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?U:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?U:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?U:Uint32Array,"%URIError%":Ip,"%WeakMap%":typeof WeakMap>"u"?U:WeakMap,"%WeakRef%":typeof WeakRef>"u"?U:WeakRef,"%WeakSet%":typeof WeakSet>"u"?U:WeakSet,"%Function.prototype.call%":xt,"%Function.prototype.apply%":vs,"%Object.defineProperty%":Op,"%Object.getPrototypeOf%":Rp,"%Math.abs%":Tp,"%Math.floor%":Ep,"%Math.max%":$p,"%Math.min%":Sp,"%Math.pow%":Ap,"%Math.round%":zp,"%Math.sign%":kp,"%Reflect.getPrototypeOf%":Dp};if(J)try{null.error}catch(e){fs=J(J(e)),we["%Error.prototype%"]=fs}var fs,Cp=o(function e(t){var r;if(t==="%AsyncFunction%")r=an("async function () {}");else if(t==="%GeneratorFunction%")r=an("function* () {}");else if(t==="%AsyncGeneratorFunction%")r=an("async function* () {}");else if(t==="%AsyncGenerator%"){var n=e("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if(t==="%AsyncIteratorPrototype%"){var i=e("%AsyncGenerator%");i&&J&&(r=J(i.prototype))}return we[t]=r,r},"doEval"),gs={__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=Ze(),er=on(),Up=Pt.call(xt,Array.prototype.concat),Mp=Pt.call(vs,Array.prototype.splice),ys=Pt.call(xt,String.prototype.replace),tr=Pt.call(xt,String.prototype.slice),jp=Pt.call(xt,RegExp.prototype.exec),Lp=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Fp=/\\(\\)?/g,Bp=o(function(t){var r=tr(t,0,1),n=tr(t,-1);if(r==="%"&&n!=="%")throw new qe("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&r!=="%")throw new qe("invalid intrinsic syntax, expected opening `%`");var i=[];return ys(t,Lp,function(u,c,p,f){i[i.length]=p?ys(f,Fp,"$1"):c||u}),i},"stringToPath"),Vp=o(function(t,r){var n=t,i;if(er(gs,n)&&(i=gs[n],n="%"+i[0]+"%"),er(we,n)){var u=we[n];if(u===We&&(u=Cp(n)),typeof u>"u"&&!r)throw new Ge("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:i,name:n,value:u}}throw new qe("intrinsic "+t+" does not exist!")},"getBaseIntrinsic");xs.exports=o(function(t,r){if(typeof t!="string"||t.length===0)throw new Ge("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof r!="boolean")throw new Ge('"allowMissing" argument must be a boolean');if(jp(/^%?[^%]*%?$/,t)===null)throw new qe("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=Bp(t),i=n.length>0?n[0]:"",u=Vp("%"+i+"%",r),c=u.name,p=u.value,f=!1,y=u.alias;y&&(i=y[0],Mp(n,Up([0,1],y)));for(var x=1,b=!0;x<n.length;x+=1){var P=n[x],s=tr(P,0,1),d=tr(P,-1);if((s==='"'||s==="'"||s==="`"||d==='"'||d==="'"||d==="`")&&s!==d)throw new qe("property names with quotes must have matching quotes");if((P==="constructor"||!b)&&(f=!0),i+="."+P,c="%"+i+"%",er(we,c))p=we[c];else if(p!=null){if(!(P in p)){if(!r)throw new Ge("base intrinsic for "+t+" exists, but the property is not available.");return}if(vt&&x+1>=n.length){var g=vt(p,P);b=!!g,b&&"get"in g&&!("originalValue"in g.get)?p=g.get:p=p[P]}else b=er(p,P),p=p[P];b&&!f&&(we[c]=p)}}return p},"GetIntrinsic")});var bs=E((lz,_s)=>{"use strict";var Zp=Qr();_s.exports=o(function(){return Zp()&&!!Symbol.toStringTag},"hasToStringTagShams")});var Es=E((dz,Ts)=>{"use strict";var Hp=Ps(),Is=Hp("%Object.defineProperty%",!0),Wp=bs()(),Gp=on(),qp=Jt(),rr=Wp?Symbol.toStringTag:null;Ts.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 qp("if provided, the `overrideIfSet` and `nonConfigurable` options must be booleans");rr&&(n||!Gp(t,rr))&&(Is?Is(t,rr,{configurable:!i,enumerable:!1,value:r,writable:!1}):t[rr]=r)},"setToStringTag")});var Ss=E((fz,$s)=>{"use strict";var Kp=Function.prototype.call,Jp=Object.prototype.hasOwnProperty,Xp=Ze();$s.exports=Xp.call(Kp,Jp)});var zs=E((gz,As)=>{"use strict";As.exports=function(e,t){return Object.keys(t).forEach(function(r){e[r]=e[r]||t[r]}),e}});var ws=E((yz,Os)=>{"use strict";var pn=Di(),Yp=require("util"),un=require("path"),Qp=require("http"),ed=require("https"),td=require("url").parse,rd=require("fs"),nd=require("stream").Stream,od=require("crypto"),cn=ji(),id=ra(),ad=Es(),Se=Ss(),ln=zs();function ks(e){return String(e).replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/"/g,"%22")}o(ks,"escapeHeaderParam");function j(e){if(!(this instanceof j))return new j(e);this._overheadLength=0,this._valueLength=0,this._valuesToMeasure=[],pn.call(this),e=e||{};for(var t in e)this[t]=e[t]}o(j,"FormData");Yp.inherits(j,pn);j.LINE_BREAK=`\r
2
+ `;j.DEFAULT_CONTENT_TYPE="application/octet-stream";j.prototype.append=function(e,t,r){r=r||{},typeof r=="string"&&(r={filename:r});var n=pn.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)};j.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)+j.LINE_BREAK.length,!(!t||!t.path&&!(t.readable&&Se(t,"httpVersion"))&&!(t instanceof nd))&&(r.knownLength||this._valuesToMeasure.push(t))};j.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)):rd.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")};j.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="'+ks(e)+'"'].concat(n||[]),"Content-Type":[].concat(i||[])};typeof r.header=="object"&&ln(c,r.header);var p;for(var f in c)if(Se(c,f)){if(p=c[f],p==null)continue;Array.isArray(p)||(p=[p]),p.length&&(u+=f+": "+p.join("; ")+j.LINE_BREAK)}return"--"+this.getBoundary()+j.LINE_BREAK+u+j.LINE_BREAK};j.prototype._getContentDisposition=function(e,t){var r;if(typeof t.filepath=="string"?r=un.normalize(t.filepath).replace(/\\/g,"/"):t.filename||e&&(e.name||e.path)?r=un.basename(t.filename||e&&(e.name||e.path)):e&&e.readable&&Se(e,"httpVersion")&&(r=un.basename(e.client._httpMessage.path||"")),r)return'filename="'+ks(r)+'"'};j.prototype._getContentType=function(e,t){var r=t.contentType;return!r&&e&&e.name&&(r=cn.lookup(e.name)),!r&&e&&e.path&&(r=cn.lookup(e.path)),!r&&e&&e.readable&&Se(e,"httpVersion")&&(r=e.headers["content-type"]),!r&&(t.filepath||t.filename)&&(r=cn.lookup(t.filepath||t.filename)),!r&&e&&typeof e=="object"&&(r=j.DEFAULT_CONTENT_TYPE),r};j.prototype._multiPartFooter=function(){return function(e){var t=j.LINE_BREAK,r=this._streams.length===0;r&&(t+=this._lastBoundary()),e(t)}.bind(this)};j.prototype._lastBoundary=function(){return"--"+this.getBoundary()+"--"+j.LINE_BREAK};j.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};j.prototype.setBoundary=function(e){if(typeof e!="string")throw new TypeError("FormData boundary must be a string");this._boundary=e};j.prototype.getBoundary=function(){return this._boundary||this._generateBoundary(),this._boundary};j.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(j.LINE_BREAK)])));return Buffer.concat([e,Buffer.from(this._lastBoundary())])};j.prototype._generateBoundary=function(){this._boundary="--------------------------"+od.randomBytes(12).toString("hex")};j.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};j.prototype.hasKnownLength=function(){var e=!0;return this._valuesToMeasure.length&&(e=!1),e};j.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}id.parallel(this._valuesToMeasure,this._lengthRetriever,function(r,n){if(r){e(r);return}n.forEach(function(i){t+=i}),e(null,t)})};j.prototype.submit=function(e,t){var r,n,i={method:"post"};return typeof e=="string"?(e=td(e),n=ln({port:e.port,path:e.pathname,host:e.hostname,protocol:e.protocol},i)):(n=ln(e,i),n.port||(n.port=n.protocol==="https:"?443:80)),n.headers=this.getHeaders(e.headers),n.protocol==="https:"?r=ed.request(n):r=Qp.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,f=o(function(y,x){return r.removeListener("error",f),r.removeListener("response",p),t.call(this,y,x)},"callback");p=f.bind(this,null),r.on("error",f),r.on("response",p)}}.bind(this)),r};j.prototype._error=function(e){this.error||(this.error=e,this.pause(),this.emit("error",e))};j.prototype.toString=function(){return"[object FormData]"};ad(j.prototype,"FormData");Os.exports=j});var vd={};gn(vd,{hootsuite:()=>hd,hootsuiteAuth:()=>Q});module.exports=Ws(vd);var Gs=Object.freeze({status:"aborted"});function I(e,t,r){function n(p,f){if(p._zod||Object.defineProperty(p,"_zod",{value:{def:f,constr:c,traits:new Set},enumerable:!1}),p._zod.traits.has(e))return;p._zod.traits.add(e),t(p,f);let y=c.prototype,x=Object.keys(y);for(let b=0;b<x.length;b++){let P=x[b];P in p||(p[P]=y[P].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 f;let y=r?.Parent?new u:this;n(y,p),(f=y._zod).deferred??(f.deferred=[]);for(let x of y._zod.deferred)x();return y}return o(c,"_"),Object.defineProperty(c,"init",{value:n}),Object.defineProperty(c,Symbol.hasInstance,{value:o(p=>r?.Parent&&p instanceof r.Parent?!0:p?._zod?.traits?.has(e),"value")}),Object.defineProperty(c,"name",{value:e}),c}o(I,"$constructor");var qs=Symbol("zod_brand"),ce=class extends Error{static{o(this,"$ZodAsyncError")}constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},bt=class extends Error{static{o(this,"$ZodEncodeError")}constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}},ar={};function me(e){return e&&Object.assign(ar,e),ar}o(me,"config");function ur(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(ur,"getEnumValues");function vn(e,t){return typeof t=="bigint"?t.toString():t}o(vn,"jsonStringifyReplacer");function Tt(e){return{get value(){{let r=e();return Object.defineProperty(this,"value",{value:r}),r}throw new Error("cached value already set")}}}o(Tt,"cached");function xn(e){return e==null}o(xn,"nullish");function Et(e){let t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}o(Et,"cleanRegex");var hn=Symbol("evaluating");function q(e,t,r){let n;Object.defineProperty(e,t,{get(){if(n!==hn)return n===void 0&&(n=hn,n=r()),n},set(i){Object.defineProperty(e,t,{value:i})},configurable:!0})}o(q,"defineLazy");var cr="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Xe(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}o(Xe,"isObject");var Ks=Tt(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let e=Function;return new e(""),!0}catch{return!1}});function Pn(e){if(Xe(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!="function")return!0;let r=t.prototype;return!(Xe(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}o(Pn,"isPlainObject");var _n=new Set(["string","number","symbol"]);function De(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}o(De,"escapeRegex");function $t(e,t,r){let n=new e._zod.constr(t??e._zod.def);return(!t||r?.parent)&&(n._zod.parent=e),n}o($t,"clone");function Z(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(Z,"normalizeParams");function bn(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}o(bn,"optionalKeys");var Js={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 Ne(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(Ne,"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 It(e){return typeof e=="string"?e:e?.message}o(It,"unwrapMessage");function _e(e,t,r){let n={...e,path:e.path??[]};if(!e.message){let i=It(e.inst?._zod.def?.error?.(e))??It(t?.error?.(e))??It(r.customError?.(e))??It(r.localeError?.(e))??"Invalid input";n.message=i}return delete n.inst,delete n.continue,t?.reportInput||delete n.input,n}o(_e,"finalizeIssue");function In(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}o(In,"getLengthableOrigin");function lr(...e){let[t,r,n]=e;return typeof t=="string"?{message:t,code:"custom",input:r,inst:n}:{...t}}o(lr,"issue");var Tn=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,vn,2),Object.defineProperty(e,"toString",{value:o(()=>e.message,"value"),enumerable:!1})},"initializer"),En=I("$ZodError",Tn),Ye=I("$ZodError",Tn,{Parent:Error});var Ys=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 ce;if(c.issues.length){let p=new(i?.Err??e)(c.issues.map(f=>_e(f,u,me())));throw cr(p,i?.callee),p}return c.value},"_parse"),St=Ys(Ye),Qs=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(f=>_e(f,u,me())));throw cr(p,i?.callee),p}return c.value},"_parseAsync"),At=Qs(Ye),eu=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 ce;return u.issues.length?{success:!1,error:new(e??En)(u.issues.map(c=>_e(c,i,me())))}:{success:!0,data:u.value}},"_safeParse"),Qe=eu(Ye),tu=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=>_e(c,i,me())))}:{success:!0,data:u.value}},"_safeParseAsync"),et=tu(Ye);var ru="(?:(?:\\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])))",nu=new RegExp(`^${ru}$`);var $n=o(e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},"string"),Sn=/^-?\d+n?$/;var pr=/^-?\d+(?:\.\d+)?$/,An=/^(?:true|false)$/i;var Ce=I("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])});var zn=I("$ZodCheckMinLength",(e,t)=>{var r;Ce.init(e,t),(r=e._zod.def).when??(r.when=n=>{let i=n.value;return!xn(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=In(i);n.issues.push({origin:c,code:"too_small",minimum:t.minimum,inclusive:!0,input:i,inst:e,continue:!t.abort})}});var dr=I("$ZodCheckStringFormat",(e,t)=>{var r,n;Ce.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=()=>{})}),kn=I("$ZodCheckRegex",(e,t)=>{dr.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 wn={major:4,minor:3,patch:6};var H=I("$ZodType",(e,t)=>{var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=wn;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,f)=>{let y=Ne(c),x;for(let b of p){if(b._zod.def.when){if(!b._zod.def.when(c))continue}else if(y)continue;let P=c.issues.length,s=b._zod.check(c);if(s instanceof Promise&&f?.async===!1)throw new ce;if(x||s instanceof Promise)x=(x??Promise.resolve()).then(async()=>{await s,c.issues.length!==P&&(y||(y=Ne(c,P)))});else{if(c.issues.length===P)continue;y||(y=Ne(c,P))}}return x?x.then(()=>c):c},"runChecks"),u=o((c,p,f)=>{if(Ne(c))return c.aborted=!0,c;let y=i(p,n,f);if(y instanceof Promise){if(f.async===!1)throw new ce;return y.then(x=>e._zod.parse(x,f))}return e._zod.parse(y,f)},"handleCanaryResult");e._zod.run=(c,p)=>{if(p.skipChecks)return e._zod.parse(c,p);if(p.direction==="backward"){let y=e._zod.parse({value:c.value,issues:[]},{...p,skipChecks:!0});return y instanceof Promise?y.then(x=>u(x,c,p)):u(y,c,p)}let f=e._zod.parse(c,p);if(f instanceof Promise){if(p.async===!1)throw new ce;return f.then(y=>i(y,n,p))}return i(f,n,p)}}q(e,"~standard",()=>({validate:o(i=>{try{let u=Qe(e,i);return u.success?{value:u.data}:{issues:u.error?.issues}}catch{return et(e,i).then(c=>c.success?{value:c.data}:{issues:c.error?.issues})}},"validate"),vendor:"zod",version:1}))}),Ot=I("$ZodString",(e,t)=>{H.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??$n(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}}),mr=I("$ZodStringFormat",(e,t)=>{dr.init(e,t),Ot.init(e,t)});var Un=I("$ZodURL",(e,t)=>{mr.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 Mn=I("$ZodNumber",(e,t)=>{H.init(e,t),e._zod.pattern=e._zod.bag.pattern??pr,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 fr=I("$ZodBoolean",(e,t)=>{H.init(e,t),e._zod.pattern=An,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}}),jn=I("$ZodBigInt",(e,t)=>{H.init(e,t),e._zod.pattern=Sn,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 Ln=I("$ZodAny",(e,t)=>{H.init(e,t),e._zod.parse=r=>r}),Fn=I("$ZodUnknown",(e,t)=>{H.init(e,t),e._zod.parse=r=>r});var Bn=I("$ZodVoid",(e,t)=>{H.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}}),Vn=I("$ZodDate",(e,t)=>{H.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 Rn(e,t,r){e.issues.length&&t.issues.push(...Pe(r,e.issues)),t.value[r]=e.value}o(Rn,"handleArrayResult");var Zn=I("$ZodArray",(e,t)=>{H.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],f=t.element._zod.run({value:p,issues:[]},n);f instanceof Promise?u.push(f.then(y=>Rn(y,r,c))):Rn(f,r,c)}return u.length?Promise.all(u).then(()=>r):r}});function kt(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(kt,"handlePropertyResult");function ou(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=bn(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(r)}}o(ou,"normalizeDef");function iu(e,t,r,n,i,u){let c=[],p=i.keySet,f=i.catchall._zod,y=f.def.type,x=f.optout==="optional";for(let b in t){if(p.has(b))continue;if(y==="never"){c.push(b);continue}let P=f.run({value:t[b],issues:[]},n);P instanceof Promise?e.push(P.then(s=>kt(s,r,b,t,x))):kt(P,r,b,t,x)}return c.length&&r.issues.push({code:"unrecognized_keys",keys:c,input:t,inst:u}),e.length?Promise.all(e).then(()=>r):r}o(iu,"handleCatchall");var Hn=I("$ZodObject",(e,t)=>{if(H.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){let p=t.shape;Object.defineProperty(t,"shape",{get:o(()=>{let f={...p};return Object.defineProperty(t,"shape",{value:f}),f},"get")})}let n=Tt(()=>ou(t));q(e._zod,"propValues",()=>{let p=t.shape,f={};for(let y in p){let x=p[y]._zod;if(x.values){f[y]??(f[y]=new Set);for(let b of x.values)f[y].add(b)}}return f});let i=Xe,u=t.catchall,c;e._zod.parse=(p,f)=>{c??(c=n.value);let y=p.value;if(!i(y))return p.issues.push({expected:"object",code:"invalid_type",input:y,inst:e}),p;p.value={};let x=[],b=c.shape;for(let P of c.keys){let s=b[P],d=s._zod.optout==="optional",g=s._zod.run({value:y[P],issues:[]},f);g instanceof Promise?x.push(g.then(m=>kt(m,p,P,y,d))):kt(g,p,P,y,d)}return u?iu(x,y,p,f,n.value,e):x.length?Promise.all(x).then(()=>p):p}});function Dn(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=>!Ne(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=>_e(c,n,me())))}),t)}o(Dn,"handleUnionResults");var gr=I("$ZodUnion",(e,t)=>{H.init(e,t),q(e._zod,"optin",()=>t.options.some(i=>i._zod.optin==="optional")?"optional":void 0),q(e._zod,"optout",()=>t.options.some(i=>i._zod.optout==="optional")?"optional":void 0),q(e._zod,"values",()=>{if(t.options.every(i=>i._zod.values))return new Set(t.options.flatMap(i=>Array.from(i._zod.values)))}),q(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=>Et(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 f of t.options){let y=f._zod.run({value:i.value,issues:[]},u);if(y instanceof Promise)p.push(y),c=!0;else{if(y.issues.length===0)return y;p.push(y)}}return c?Promise.all(p).then(f=>Dn(f,i,e,u)):Dn(p,i,e,u)}});var Wn=I("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,gr.init(e,t);let r=e._zod.parse;q(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,f]of Object.entries(c)){i[p]||(i[p]=new Set);for(let y of f)i[p].add(y)}}return i});let n=Tt(()=>{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 f of p){if(u.has(f))throw new Error(`Duplicate discriminator value "${String(f)}"`);u.set(f,c)}}return u});e._zod.parse=(i,u)=>{let c=i.value;if(!Xe(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 Gn=I("$ZodRecord",(e,t)=>{H.init(e,t),e._zod.parse=(r,n)=>{let i=r.value;if(!Pn(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 y of c)if(typeof y=="string"||typeof y=="number"||typeof y=="symbol"){p.add(typeof y=="number"?y.toString():y);let x=t.valueType._zod.run({value:i[y],issues:[]},n);x instanceof Promise?u.push(x.then(b=>{b.issues.length&&r.issues.push(...Pe(y,b.issues)),r.value[y]=b.value})):(x.issues.length&&r.issues.push(...Pe(y,x.issues)),r.value[y]=x.value)}let f;for(let y in i)p.has(y)||(f=f??[],f.push(y));f&&f.length>0&&r.issues.push({code:"unrecognized_keys",input:i,inst:e,keys:f})}else{r.value={};for(let p of Reflect.ownKeys(i)){if(p==="__proto__")continue;let f=t.keyType._zod.run({value:p,issues:[]},n);if(f instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof p=="string"&&pr.test(p)&&f.issues.length){let b=t.keyType._zod.run({value:Number(p),issues:[]},n);if(b instanceof Promise)throw new Error("Async schemas not supported in object keys currently");b.issues.length===0&&(f=b)}if(f.issues.length){t.mode==="loose"?r.value[p]=i[p]:r.issues.push({code:"invalid_key",origin:"record",issues:f.issues.map(b=>_e(b,n,me())),input:p,path:[p],inst:e});continue}let x=t.valueType._zod.run({value:i[p],issues:[]},n);x instanceof Promise?u.push(x.then(b=>{b.issues.length&&r.issues.push(...Pe(p,b.issues)),r.value[f.value]=b.value})):(x.issues.length&&r.issues.push(...Pe(p,x.issues)),r.value[f.value]=x.value)}}return u.length?Promise.all(u).then(()=>r):r}});var qn=I("$ZodEnum",(e,t)=>{H.init(e,t);let r=ur(t.entries),n=new Set(r);e._zod.values=n,e._zod.pattern=new RegExp(`^(${r.filter(i=>_n.has(typeof i)).map(i=>typeof i=="string"?De(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}}),Kn=I("$ZodLiteral",(e,t)=>{if(H.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"?De(n):n?De(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 Jn=I("$ZodTransform",(e,t)=>{H.init(e,t),e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new bt(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 ce;return r.value=i,r}});function Nn(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}o(Nn,"handleOptionalResult");var Xn=I("$ZodOptional",(e,t)=>{H.init(e,t),e._zod.optin="optional",e._zod.optout="optional",q(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),q(e._zod,"pattern",()=>{let r=t.innerType._zod.pattern;return r?new RegExp(`^(${Et(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=>Nn(u,r.value)):Nn(i,r.value)}return r.value===void 0?r:t.innerType._zod.run(r,n)}});var Yn=I("$ZodNullable",(e,t)=>{H.init(e,t),q(e._zod,"optin",()=>t.innerType._zod.optin),q(e._zod,"optout",()=>t.innerType._zod.optout),q(e._zod,"pattern",()=>{let r=t.innerType._zod.pattern;return r?new RegExp(`^(${Et(r.source)}|null)$`):void 0}),q(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 Qn=I("$ZodPipe",(e,t)=>{H.init(e,t),q(e._zod,"values",()=>t.in._zod.values),q(e._zod,"optin",()=>t.in._zod.optin),q(e._zod,"optout",()=>t.out._zod.optout),q(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=>zt(c,t.in,n)):zt(u,t.in,n)}let i=t.in._zod.run(r,n);return i instanceof Promise?i.then(u=>zt(u,t.out,n)):zt(i,t.out,n)}});function zt(e,t,r){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},r)}o(zt,"handlePipeResult");var eo=I("$ZodCustom",(e,t)=>{Ce.init(e,t),H.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=>Cn(u,r,n,e));Cn(i,r,n,e)}});function Cn(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(lr(i))}}o(Cn,"handleRefineResult");var ro,cu=Symbol("ZodOutput"),lu=Symbol("ZodInput"),yr=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 no(){return new yr}o(no,"registry");(ro=globalThis).__zod_globalRegistry??(ro.__zod_globalRegistry=no());var hr=globalThis.__zod_globalRegistry;function oo(e,t){return new e({type:"string",...Z(t)})}o(oo,"_string");function io(e,t){return new e({type:"string",coerce:!0,...Z(t)})}o(io,"_coercedString");function ao(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...Z(t)})}o(ao,"_url");function so(e,t){return new e({type:"number",checks:[],...Z(t)})}o(so,"_number");function uo(e,t){return new e({type:"number",coerce:!0,checks:[],...Z(t)})}o(uo,"_coercedNumber");function co(e,t){return new e({type:"boolean",...Z(t)})}o(co,"_boolean");function lo(e,t){return new e({type:"boolean",coerce:!0,...Z(t)})}o(lo,"_coercedBoolean");function po(e,t){return new e({type:"bigint",coerce:!0,...Z(t)})}o(po,"_coercedBigint");function mo(e){return new e({type:"any"})}o(mo,"_any");function fo(e){return new e({type:"unknown"})}o(fo,"_unknown");function go(e,t){return new e({type:"void",...Z(t)})}o(go,"_void");function yo(e,t){return new e({type:"date",coerce:!0,...Z(t)})}o(yo,"_coercedDate");function ae(e,t){return new zn({check:"min_length",...Z(t),minimum:e})}o(ae,"_minLength");function be(e,t){return new kn({check:"string_format",format:"regex",...Z(t),pattern:e})}o(be,"_regex");function ho(e,t,r){let n=Z(r);return n.abort??(n.abort=!0),new e({type:"custom",check:"custom",fn:t,...n})}o(ho,"_custom");var K=I("ZodMiniType",(e,t)=>{if(!e._zod)throw new Error("Uninitialized schema in ZodMiniType.");H.init(e,t),e.def=t,e.type=t.type,e.parse=(r,n)=>St(e,r,n,{callee:e.parse}),e.safeParse=(r,n)=>Qe(e,r,n),e.parseAsync=async(r,n)=>At(e,r,n,{callee:e.parseAsync}),e.safeParseAsync=async(r,n)=>et(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)=>$t(e,r,n),e.brand=()=>e,e.register=(r,n)=>(r.add(e,n),e),e.apply=r=>r(e)}),Rt=I("ZodMiniString",(e,t)=>{Ot.init(e,t),K.init(e,t)});function a(e){return oo(Rt,e)}o(a,"string");var vo=I("ZodMiniStringFormat",(e,t)=>{mr.init(e,t),Rt.init(e,t)});var Pu=I("ZodMiniURL",(e,t)=>{Un.init(e,t),vo.init(e,t)});function xo(e){return ao(Pu,e)}o(xo,"url");var vr=I("ZodMiniNumber",(e,t)=>{Mn.init(e,t),K.init(e,t)});function Y(e){return so(vr,e)}o(Y,"number");var xr=I("ZodMiniBoolean",(e,t)=>{fr.init(e,t),K.init(e,t)});function B(e){return co(xr,e)}o(B,"boolean");var Po=I("ZodMiniBigInt",(e,t)=>{jn.init(e,t),K.init(e,t)});var _u=I("ZodMiniAny",(e,t)=>{Ln.init(e,t),K.init(e,t)});function rt(){return mo(_u)}o(rt,"any");var bu=I("ZodMiniUnknown",(e,t)=>{Fn.init(e,t),K.init(e,t)});function k(){return fo(bu)}o(k,"unknown");var Iu=I("ZodMiniVoid",(e,t)=>{Bn.init(e,t),K.init(e,t)});function _o(e){return go(Iu,e)}o(_o,"_void");var bo=I("ZodMiniDate",(e,t)=>{Vn.init(e,t),K.init(e,t)});var Tu=I("ZodMiniArray",(e,t)=>{Zn.init(e,t),K.init(e,t)});function R(e,t){return new Tu({type:"array",element:e,...Z(t)})}o(R,"array");var Eu=I("ZodMiniObject",(e,t)=>{Hn.init(e,t),K.init(e,t),q(e,"shape",()=>t.shape)});function l(e,t){let r={type:"object",shape:e??{},...Z(t)};return new Eu(r)}o(l,"object");var $u=I("ZodMiniUnion",(e,t)=>{gr.init(e,t),K.init(e,t)});function D(e,t){return new $u({type:"union",options:e,...Z(t)})}o(D,"union");var Su=I("ZodMiniDiscriminatedUnion",(e,t)=>{Wn.init(e,t),K.init(e,t)});function Ue(e,t,r){return new Su({type:"union",options:t,discriminator:e,...Z(r)})}o(Ue,"discriminatedUnion");var Au=I("ZodMiniRecord",(e,t)=>{Gn.init(e,t),K.init(e,t)});function O(e,t,r){return new Au({type:"record",keyType:e,valueType:t,...Z(r)})}o(O,"record");var zu=I("ZodMiniEnum",(e,t)=>{qn.init(e,t),K.init(e,t),e.options=Object.values(t.entries)});function C(e,t){let r=Array.isArray(e)?Object.fromEntries(e.map(n=>[n,n])):e;return new zu({type:"enum",entries:r,...Z(t)})}o(C,"_enum");var ku=I("ZodMiniLiteral",(e,t)=>{Kn.init(e,t),K.init(e,t)});function $(e,t){return new ku({type:"literal",values:Array.isArray(e)?e:[e],...Z(t)})}o($,"literal");var Ou=I("ZodMiniTransform",(e,t)=>{Jn.init(e,t),K.init(e,t)});function Ie(e){return new Ou({type:"transform",transform:e})}o(Ie,"transform");var wu=I("ZodMiniOptional",(e,t)=>{Xn.init(e,t),K.init(e,t)});function h(e){return new wu({type:"optional",innerType:e})}o(h,"optional");var Ru=I("ZodMiniNullable",(e,t)=>{Yn.init(e,t),K.init(e,t)});function nt(e){return new Ru({type:"nullable",innerType:e})}o(nt,"nullable");var Du=I("ZodMiniPipe",(e,t)=>{Qn.init(e,t),K.init(e,t)});function Te(e,t){return new Du({type:"pipe",in:e,out:t})}o(Te,"pipe");var Nu=I("ZodMiniCustom",(e,t)=>{eo.init(e,t),K.init(e,t)});function Dt(e,t){return ho(Nu,e??(()=>!0),t)}o(Dt,"custom");var ot={};gn(ot,{bigint:()=>Bu,boolean:()=>Fu,date:()=>Vu,number:()=>Lu,string:()=>ju});function ju(e){return io(Rt,e)}o(ju,"string");function Lu(e){return uo(vr,e)}o(Lu,"number");function Fu(e){return lo(xr,e)}o(Fu,"boolean");function Bu(e){return po(Po,e)}o(Bu,"bigint");function Vu(e){return yo(bo,e)}o(Vu,"date");var _r=l({retryOnFailure:l({defaultValue:h(B()),hide:h(B())}),continueOnFailure:l({defaultValue:h(B()),hide:h(B())})}),Pr=class{constructor(t,r,n,i,u,c,p,f,y,x,b){this.name=t;this.displayName=r;this.description=n;this.props=i;this.run=u;this.test=c;this.requireAuth=p;this.errorHandlingOptions=f;this.outputSchema=y;this.audience=x;this.aiMetadata=b}static{o(this,"IAction")}},Ee=o(e=>new Pr(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 L=l({displayName:a(),description:h(a())}),N=o((e,t)=>l({type:$(t),required:B(),defaultValue:h(rt())}),"TPropertyValue");var re=l({...L.shape,...N(a(),"SHORT_TEXT").shape}),fe=l({...L.shape,...N(a(),"LONG_TEXT").shape});var To=l({label:a(),value:k()}),Nt=l({disabled:h(B()),placeholder:h(a()),options:R(To)});var ne=l({...L.shape,options:Nt,...N(k(),"STATIC_DROPDOWN").shape}),ge=l({...L.shape,options:Nt,...N(R(k()),"STATIC_MULTI_SELECT_DROPDOWN").shape});var br=l({...L.shape,...N(k(),"DROPDOWN").shape,refreshers:R(a())}),it=l({...L.shape,...N(R(k()),"MULTI_SELECT_DROPDOWN").shape,refreshers:R(a())});var ye=l({...L.shape,...N(B(),"CHECKBOX").shape});var he=l({...L.shape,...N(Y(),"NUMBER").shape});var at=l({...L.shape,...N(k(),"FILE").shape});var st=l({...L.shape,...N(a(),"DATE_TIME").shape});var Eo=O(a(),D([re,fe,ne,it,ge,ye,he,at,st])),ut=l({...L.shape,properties:Eo,...N(R(k()),"ARRAY").shape});var ct=l({...L.shape,...N(D([O(a(),k())]),"JSON").shape});var $o=D([re,ne,ct,ut,ge]),Hu=O(a(),$o),Ir=l({refreshers:R(a()),...L.shape,...N(k(),"DYNAMIC").shape});var Ct=l({...L.shape,...N(_o(),"MARKDOWN").shape});var lt=(r=>(r.ARCHIVE="ARCHIVE",r.REGISTRY="REGISTRY",r))(lt||{}),Me=(r=>(r.CUSTOM="CUSTOM",r.OFFICIAL="OFFICIAL",r))(Me||{}),je=(v=>(v.ARTIFICIAL_INTELLIGENCE="ARTIFICIAL_INTELLIGENCE",v.COMMUNICATION="COMMUNICATION",v.COMMERCE="COMMERCE",v.CORE="CORE",v.UNIVERSAL_AI="UNIVERSAL_AI",v.FLOW_CONTROL="FLOW_CONTROL",v.BUSINESS_INTELLIGENCE="BUSINESS_INTELLIGENCE",v.ACCOUNTING="ACCOUNTING",v.PRODUCTIVITY="PRODUCTIVITY",v.CONTENT_AND_FILES="CONTENT_AND_FILES",v.DEVELOPER_TOOLS="DEVELOPER_TOOLS",v.CUSTOMER_SUPPORT="CUSTOMER_SUPPORT",v.FORMS_AND_SURVEYS="FORMS_AND_SURVEYS",v.HUMAN_RESOURCES="HUMAN_RESOURCES",v.PAYMENT_PROCESSING="PAYMENT_PROCESSING",v.MARKETING="MARKETING",v.SALES_AND_CRM="SALES_AND_CRM",v))(je||{});var pt=(r=>(r.AUTHORIZATION_CODE="authorization_code",r.CLIENT_CREDENTIALS="client_credentials",r))(pt||{}),Tr="both_client_credentials_and_authorization_code";var ve=(i=>(i.POLLING="POLLING",i.WEBHOOK="WEBHOOK",i.APP_WEBHOOK="APP_WEBHOOK",i.MANUAL="MANUAL",i))(ve||{}),dt=(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))(dt||{}),Wu=l({strategy:C(dt),paramName:h(a())}),mt=(r=>(r.SIMULATION="SIMULATION",r.TEST_FUNCTION="TEST_FUNCTION",r))(mt||{});var Ut=(r=>(r.WEBSOCKET="WEBSOCKET",r.NONE="NONE",r))(Ut||{}),So=l({status:h(Y()),body:h(k()),headers:h(O(a(),a()))}),Ao=l({type:$("DELAY"),resumeDateTime:a(),requestIdToReply:h(a()),handlerId:h(a()),streamStepProgress:h(C(Ut))}),zo=l({type:$("WEBHOOK"),requestId:a(),requestIdToReply:h(a()),response:So,handlerId:h(a()),streamStepProgress:h(C(Ut))}),Gu=D([Ao,zo]);var qu=l({body:k(),rawBody:h(k()),headers:O(a(),a()),queryParams:O(a(),a())});function X(e){return e==null}o(X,"isNil");function ft(e){return e==null?!0:typeof e=="string"||Array.isArray(e)?e.length===0:typeof e=="object"?Object.keys(e).length===0:!1}o(ft,"isEmpty");function Mt(e,t){if(e==null)throw new Error(`${t} is null or undefined`)}o(Mt,"assertNotNullOrUndefined");var Er=Re(require("crypto"),1);var Ku=128,ze,Le,Ju=o(e=>{!ze||ze.length<e?(ze=Buffer.allocUnsafe(e*Ku),Er.default.randomFillSync(ze),Le=0):Le+e>ze.length&&(Er.default.randomFillSync(ze),Le=0),Le+=e},"fillPool"),Xu=o(e=>(Ju(e|=0),ze.subarray(Le-e,Le)),"random"),Yu=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),f=i;for(;f--;)if(c+=e[p[f]&n]||"",c.length===u)return c}}},"customRandom"),Oo=o((e,t=21)=>Yu(e,t,Xu),"customAlphabet");var Qu="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",wo=21,tb=a().check(be(new RegExp(`^[0-9a-zA-Z]{${wo}}$`))),ec=Oo(Qu,wo);var $e=Te(Ie(e=>e instanceof Date?e.toISOString():e),a()),oe={id:a(),created:$e,updated:$e},V=o(e=>h(nt(e)),"Nullable");function $r(e){return h(nt(C(e)))}o($r,"NullableEnum");var ob=Te(Ie(e=>e==="true"||e===!0?!0:e==="false"||e===!1?!1:void 0),h(B())),jt=o(e=>Te(Ie(t=>Array.isArray(t)?t:t!==void 0?[t]:void 0),h(R(e))),"OptionalArrayFromQuery");var sb=O(a(),k());var gt=(x=>(x.OPENAI="openai",x.OPENROUTER="openrouter",x.ANTHROPIC="anthropic",x.AZURE="azure",x.GOOGLE="google",x.ACTIVEPIECES="activepieces",x.CLOUDFLARE_GATEWAY="cloudflare-gateway",x.CUSTOM="custom",x.BEDROCK="bedrock",x.MISTRAL="mistral",x))(gt||{});var xb=a().check(be(/^#[0-9A-Fa-f]{6}$/));var _b=l({filename:a(),data:k(),type:$("file"),mimetype:h(a())});var tc=Re(Do());var Ab=l({...oe,name:a(),permissions:R(a()),platformId:V(a()),type:a(),userCount:h(Y())});var No=(n=>(n.AGENT_DECIDE="agent-decide",n.CHOOSE_YOURSELF="choose-yourself",n.LEAVE_EMPTY="leave-empty",n))(No||{}),Sr=(r=>(r.FILE="FILE",r.TABLE="TABLE",r))(Sr||{}),Ar=(n=>(n.SSE="sse",n.STREAMABLE_HTTP="streamable-http",n.SIMPLE_HTTP="http",n))(Ar||{});var zr=(n=>(n.TEXT="text",n.NUMBER="number",n.BOOLEAN="boolean",n))(zr||{});var kr=(r=>(r.IN_PROGRESS="in-progress",r.COMPLETED="completed",r))(kr||{});var rc=l({mode:C(No),value:k()}),nc=l({auth:h(a()),fields:O(a(),rc)}),oc=l({pieceName:a(),pieceVersion:a(),actionName:a(),predefinedInput:h(nc)}),ic=l({type:$("PIECE"),toolName:a().check(ae(1)),pieceMetadata:oc}),ac=l({type:$("none")}),sc=l({type:$("access_token"),accessToken:a()}),uc=l({type:$("api_key"),apiKey:a(),apiKeyHeader:a()}),cc=l({type:$("headers"),headers:O(a(),a())}),lc=Ue("type",[ac,sc,uc,cc]),Co=l({type:$("FLOW"),toolName:a().check(ae(1)),externalFlowId:a(),flowDisplayName:h(a())}),Uo=l({type:$("MCP"),toolName:a().check(ae(1)),serverUrl:xo(),protocol:C(Ar),auth:lc}),Mo=l({type:$("KNOWLEDGE_BASE"),toolName:a().check(ae(1)),sourceType:C(Sr),sourceId:a(),sourceName:a()}),pc=Ue("type",[ic,Co,Uo,Mo]),dc=l({displayName:a(),description:h(a()),type:C(zr)}),jo=l({type:$("MARKDOWN"),markdown:a()}),Fe={type:$("TOOL_CALL"),input:V(O(a(),k())),output:h(k()),toolName:a(),status:C(kr),toolCallId:a(),startTime:a(),endTime:h(a())},tI=l(Fe),Lo=Ue("toolCallType",[l({...Fe,toolCallType:$("PIECE"),pieceName:a(),pieceVersion:a(),actionName:a()}),l({...Fe,toolCallType:$("FLOW"),displayName:a(),externalFlowId:a()}),l({...Fe,toolCallType:$("MCP"),displayName:a(),serverUrl:a()}),l({...Fe,toolCallType:$("KNOWLEDGE_BASE"),displayName:a(),sourceType:a()}),l({...Fe,toolCallType:$("UNKNOWN"),displayName:a()})]),mc=D([jo,Lo]);var Or=(r=>(r.IMAGE="image",r.TEXT="text",r))(Or||{}),xe=l({apiKey:a()}),fc=xe,gc=l({apiKey:a(),apiKeyHash:a()}),yc=xe,hc=xe,vc=xe,xc=xe,Pc=xe,_c=xe,bc=xe,Fo=l({accessKeyId:a().check(ae(1)),secretAccessKey:a().check(ae(1))}),Ic=l({}),Tc=l({}),Ec=l({}),$c=l({}),Sc=l({}),Ac=l({}),Bo=l({modelId:a(),modelName:a(),modelType:C(Or)}),Vo=l({apiKeyHeader:a(),baseUrl:a(),models:R(Bo),defaultHeaders:h(O(a(),a()))}),Zo=l({accountId:a(),gatewayId:a(),models:R(Bo),vertexProject:h(a()),vertexRegion:h(a())}),Ho=l({resourceName:a(),apiVersion:Te(Ie(e=>typeof e=="string"&&e.trim().length===0?void 0:e),h(a()))}),Wo=l({region:a().check(ae(1))}),zc=D([fc,vc,xc,Pc,_c,hc,yc,gc,Fo,bc]),Go=D([Vo,Zo,Ho,Wo,Ic,Ec,$c,Sc,Tc,Ac]),kc=l({id:a(),name:a(),type:C(Or)}),Oc=l({id:a(),name:a(),provider:C(gt),config:Go,enabledForChat:B()}),wc=l({provider:C(gt),config:Go,auth:zc,platformId:a()});var iI={openai:"openai",anthropic:"anthropic","google-ai-studio":"google","google-vertex-ai":"google"};var Rc=l({base64Url:a(),fileName:a(),extension:h(a())}),Dc=l({mimeType:a(),url:a(),fileName:h(a())}),wr=D([Rc,Dc]);var Nc=D([l({type:$("file"),value:wr}),l({type:$("markdown"),value:a(),files:h(R(wr))})]),Cc=l({sessionId:a(),message:a(),files:h(R(a()))});var Ko=(r=>(r.ON_NEW_RECORD="ON_NEW_RECORD",r.ON_UPDATE_RECORD="ON_UPDATE_RECORD",r))(Ko||{}),Jo=(r=>(r.ENABLED="ENABLED",r.DISABLED="DISABLED",r))(Jo||{}),Rr=(n=>(n.RECORD_CREATED="RECORD_CREATED",n.RECORD_UPDATED="RECORD_UPDATED",n.RECORD_DELETED="RECORD_DELETED",n))(Rr||{});var Uc=D([l({...oe,name:a(),externalId:a(),type:$("STATIC_DROPDOWN"),tableId:a(),projectId:a(),data:l({options:R(l({value:a()}))})}),l({...oe,name:a(),externalId:a(),type:D([$("TEXT"),$("NUMBER"),$("DATE")]),tableId:a(),projectId:a()})]),Mc=l({...oe,name:a(),folderId:V(a()),projectId:a(),externalId:a(),status:$r(Jo),trigger:$r(Ko)}),jc=l({...oe,tableId:a(),projectId:a(),cells:O(a(),l({updated:a(),created:a(),value:k(),fieldName:a()}))}),Lc=l({events:R(C(Rr)),webhookUrl:a(),flowId:a()}),Fc=l({fields:R(l({id:a(),name:a()})),rows:R(O(a(),a())),name:a()}),Bc=l({projectId:a(),limit:h(ot.number()),cursor:h(a()),name:h(a()),externalIds:jt(a()),folderId:h(a()),folderIds:jt(a())}),Vc=l({records:R(R(l({fieldId:a(),value:Yo()}))),tableId:a()}),Zc=l({cells:h(R(l({fieldId:a(),value:Yo()}))),tableId:a(),agentUpdate:h(B())}),Xo=Ue("operator",[ke("eq"),ke("neq"),ke("gt"),ke("gte"),ke("lt"),ke("lte"),ke("co"),qo("exists"),qo("not_exists")]),Hc=l({tableId:a(),limit:h(ot.number()),cursor:h(a()),filters:jt(Xo)});function Yo(){return Te(Ie(e=>e==null?e:String(e)),nt(a()))}o(Yo,"coerceToString");function ke(e){return l({fieldId:a(),operator:$(e),value:a()})}o(ke,"valueFilter");function qo(e){return l({fieldId:a(),operator:$(e)})}o(qo,"existenceFilter");var Wc=l({status:h(Y()),body:h(k()),headers:h(O(a(),a()))}),Gc=l({...oe,deleted:V($e),ownerId:a(),displayName:a(),platformId:a(),externalId:V(a())});var Qo=l({name:a(),description:h(a()),type:a(),required:B()}),qc=l({pieceName:a(),triggerName:a(),input:l({toolName:a(),toolDescription:a(),inputSchema:R(Qo),returnsResponse:B()})});var ei="^[0-9]+\\.[0-9]+\\.[0-9]+$",TI=new RegExp(ei),Jc="^([~^])?[0-9]+\\.[0-9]+\\.[0-9]+$",EI=a().check(be(new RegExp(ei))),$I=a().check(be(new RegExp(Jc))),Xc=l({packageType:$("ARCHIVE"),pieceType:C(Me),pieceName:a(),pieceVersion:a(),archiveId:a(),platformId:a()}),ti=l({packageType:$("REGISTRY"),pieceType:$("OFFICIAL"),pieceName:a(),pieceVersion:a()}),ri=l({packageType:$("REGISTRY"),pieceType:$("CUSTOM"),pieceName:a(),pieceVersion:a(),platformId:a()}),SI=D([ti,ri]),AI=D([Xc,ti,ri]),ni=(t=>(t.CRON_EXPRESSION="CRON_EXPRESSION",t))(ni||{}),Yc=l({type:C(ni),cronExpression:a(),timezone:a()}),zI=l({...oe,type:C(ve),projectId:a(),flowId:a(),triggerName:a(),schedule:V(Yc),flowVersionId:a(),pieceName:a(),pieceVersion:a(),deleted:V(a()),simulate:B()}),oi=(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))(oi||{}),ii=(r=>(r.NONE="NONE",r.ZSTD="ZSTD",r))(ii||{}),ai=(r=>(r.S3="S3",r.DB="DB",r))(ai||{}),kI=l({...oe,projectId:V(a()),platformId:V(a()),type:C(oi),compression:C(ii),data:h(k()),location:C(ai),size:V(Y()),fileName:V(a()),s3Key:V(a()),metadata:V(O(a(),a()))}),si=(n=>(n.ADMIN="ADMIN",n.MEMBER="MEMBER",n.OPERATOR="OPERATOR",n))(si||{}),ui=(r=>(r.ACTIVE="ACTIVE",r.INACTIVE="INACTIVE",r))(ui||{}),OI=l({id:a(),email:a(),firstName:a(),status:C(ui),externalId:V(a()),platformId:V(a()),platformRole:C(si),lastName:a(),created:$e,updated:$e,lastActiveDate:V($e),imageUrl:V(a())});var Dr=l({...L.shape,...N(O(a(),k()),"OBJECT").shape});var di=l({...L.shape,...N(a(),"COLOR").shape});var Nr=D([re,fe,Ct,ye,ne,ge,br,it,Ir,he,ut,Dr,ct,st,at,di]),F={ShortText(e){return{...e,valueSchema:void 0,type:"SHORT_TEXT"}},Checkbox(e){return{...e,valueSchema:void 0,type:"CHECKBOX"}},LongText(e){return{...e,valueSchema:void 0,type:"LONG_TEXT"}},MarkDown(e){return{displayName:"Markdown",required:!1,description:e.value,type:"MARKDOWN",valueSchema:void 0,variant:e.variant??"INFO"}},Number(e){return{...e,valueSchema:void 0,type:"NUMBER"}},Json(e){return{...e,valueSchema:void 0,type:"JSON"}},Array(e){return{...e,valueSchema:void 0,type:"ARRAY"}},Object(e){return{...e,valueSchema:void 0,type:"OBJECT"}},Dropdown(e){return{...e,valueSchema:void 0,type:"DROPDOWN"}},StaticDropdown(e){return{...e,valueSchema:void 0,type:"STATIC_DROPDOWN"}},MultiSelectDropdown(e){return{...e,valueSchema:void 0,type:"MULTI_SELECT_DROPDOWN"}},DynamicProperties(e){return{...e,valueSchema:void 0,type:"DYNAMIC"}},StaticMultiSelectDropdown(e){return{...e,valueSchema:void 0,type:"STATIC_MULTI_SELECT_DROPDOWN"}},DateTime(e){return{...e,valueSchema:void 0,type:"DATE_TIME"}},File(e){return{...e,valueSchema:void 0,type:"FILE"}},Custom(e){let t=e.code.toString();return{...e,code:t,valueSchema:void 0,type:"CUSTOM"}},Color(e){return{...e,valueSchema:void 0,type:"COLOR"}}};var le=l({displayName:a(),description:h(a())});var mi=l({username:a(),password:a()}),Cr=l({...le.shape,username:l({displayName:a(),description:h(a())}),password:l({displayName:a(),description:h(a())}),...N(mi,"BASIC_AUTH").shape});var rl=O(a(),D([re,fe,he,ye,ne])),Ur=l({...le.shape,props:rl,...N(k(),"CUSTOM_AUTH").shape});var Oe=l({...le.shape,...N(l({auth:a()}),"SECRET_TEXT").shape});var nl=O(a(),D([re,fe,Oe,he,ye,ne,ge,Ct])),fi=l({...le.shape,props:nl,...N(k(),"OIDC").shape});var Mr=(r=>(r.HEADER="HEADER",r.BODY="BODY",r))(Mr||{}),gi=D([re,Oe,ne]),yi=O(a(),gi),ol=l({props:h(O(a(),gi)),authUrl:a(),tokenUrl:a(),scope:R(a()),prompt:h(D([$("none"),$("consent"),$("login"),$("omit")])),pkce:h(B()),pkceMethod:h(D([$("plain"),$("S256")])),authorizationMethod:h(C(Mr)),grantType:h(D([C(pt),$(Tr)])),extra:h(O(a(),a()))}),hi=l({access_token:a(),props:h(yi),data:O(a(),rt())}),jr=l({...le.shape,...ol.shape,...N(hi,"OAUTH2").shape});var Be=D([Cr,Ur,fi,jr,Oe]),yt="Connection",Lr={SecretText(e){return{...e,valueSchema:void 0,type:"SECRET_TEXT"}},OAuth2(e){return{...e,valueSchema:void 0,type:"OAUTH2",displayName:e.displayName||yt}},BasicAuth(e){return{...e,valueSchema:void 0,type:"BASIC_AUTH",displayName:e.displayName||yt,required:!0}},CustomAuth(e){return{...e,valueSchema:void 0,type:"CUSTOM_AUTH",displayName:e.displayName||yt}},OIDC(e){return{...e,valueSchema:void 0,type:"OIDC",displayName:e.displayName||yt}},None(){}};var cE={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 il=l({...L.shape,...N(k(),"CUSTOM").shape,code:a()});var al=D([Nr,Be]),Fr=O(a(),al),zE=O(a(),Nr);var vi=D([l({strategy:$("CRON"),cronExpression:a()}),l({strategy:$("NONE")})]),Ve=class{constructor(t,r,n,i,u,c,p,f,y,x,b,P,s,d,g,m,v,_,M){this.name=t;this.displayName=r;this.description=n;this.requireAuth=i;this.props=u;this.type=c;this.handshakeConfiguration=p;this.onHandshake=f;this.renewConfiguration=y;this.onRenew=x;this.onEnable=b;this.onDisable=P;this.onStart=s;this.run=d;this.test=g;this.sampleData=m;this.testStrategy=v;this.outputSchema=_;this.aiMetadata=M}static{o(this,"ITrigger")}},Ft=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,X(e.sampleData)&&X(e.test)?"SIMULATION":"TEST_FUNCTION",e.outputSchema,e.aiMetadata)}},"createTrigger");var xi="2",Bt="0.82.0";var Br=class{constructor(t,r,n,i,u,c,p,f,y=Bt,x,b=""){this.displayName=t;this.logoUrl=r;this.authors=n;this.events=i;this.categories=p;this.auth=f;this.minimumSupportedRelease=y;this.maximumSupportedRelease=x;this.description=b;this._actions={};this._triggers={};this.getContextInfo=o(()=>({version:xi}),"getContextInfo");(!sl(y)||ul(y,Bt))&&(this.minimumSupportedRelease=Bt),u.forEach(P=>this._actions[P.name]=P),c.forEach(P=>this._triggers[P.name]=P)}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}},Pi=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 Br(e.displayName,e.logoUrl,e.authors??[],e.events,e.actions,e.triggers,e.categories??[],e.auth,e.minimumSupportedRelease,e.maximumSupportedRelease,e.description)},"createPiece");function sl(e){return/^\d+\.\d+\.\d+$/.test(e)}o(sl,"isValidSimpleSemver");function ul(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(ul,"isSemverLessThan");var cl=h(O(a(),O(a(),a()))),_i=l({id:h(a()),name:a(),displayName:a(),logoUrl:a(),description:a(),authors:R(a()),platformId:h(a()),directoryPath:h(a()),auth:h(D([Be,R(Be)])),version:a(),categories:h(R(C(je))),minimumSupportedRelease:h(a()),maximumSupportedRelease:h(a()),i18n:cl}),ll=C(["human","ai","both"]),bi=l({description:h(a()),idempotent:h(B())}),Ii=l({name:a(),displayName:a(),description:a(),props:Fr,requireAuth:B(),errorHandlingOptions:h(_r),outputSchema:h(Dt()),audience:h(ll),aiMetadata:h(bi)}),Ti=l({name:a(),displayName:a(),description:a(),props:Fr,errorHandlingOptions:h(_r),type:C(ve),sampleData:k(),handshakeConfiguration:h(Dt()),renewConfiguration:h(vi),testStrategy:C(mt),outputSchema:h(Dt()),aiMetadata:h(bi)}),pl=l({..._i.shape,actions:O(a(),Ii),triggers:O(a(),Ti)}),dl=l({..._i.shape,actions:Y(),triggers:Y(),suggestedActions:h(R(Ti)),suggestedTriggers:h(R(Ii))}),Ei=l({projectUsage:Y(),tags:h(R(a())),pieceType:C(Me),packageType:C(lt),platformId:h(a()),archiveId:h(a())}),z$=l({...pl.shape,...Ei.shape}),k$=l({...dl.shape,...Ei.shape}),O$=l({name:a(),version:a()});var ml=Re(require("path")),fl=Re(require("fs/promises"));var Vt=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 Zt=class{static{o(this,"DelegatingAuthenticationConverter")}constructor(t=new Vr,r=new Zr){this.converters={BEARER_TOKEN:t,BASIC:r}}convert(t,r){return this.converters[t.type].convert(t,r)}},Vr=class{static{o(this,"BearerTokenAuthenticationConverter")}convert(t,r){return r.Authorization=`Bearer ${t.token}`,r}},Zr=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 Wt=class extends Vt{static{o(this,"FetchHttpClient")}constructor(t="",r=new Zt){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[M,te]of Object.entries(c))i.append(M,te);let p=i.toString(),f=p?`${n}?${p}`:n,y=t.responseType??"json",x=t.followRedirects??!0,b=t.retries??0,{body:P,extraHeaders:s,isStream:d}=gl(t.body,u),g=hl({...u,...s}),m=await yl(async()=>{let M=new AbortController,te=t.timeout&&t.timeout>0?setTimeout(()=>M.abort(),t.timeout):void 0;try{let ie={method:t.method.toString(),headers:g,body:P,redirect:x?"follow":"manual",signal:M.signal};return d&&(ie.duplex="half"),r?.dispatcher!==void 0&&(ie.dispatcher=r.dispatcher),await fetch(f,ie)}finally{te!==void 0&&clearTimeout(te)}},b),v=x?300:400;if(m.status<200||m.status>=v){let M=await $i(m,y),te=new Ht(t.body,{status:m.status,responseBody:M});throw console.error("[HttpClient#(sanitized error message)] Request failed:",te),te}let _=await $i(m,y);return{status:m.status,headers:vl(m.headers),body:_}}};function gl(e,t){return Pl(e)?{body:void 0,extraHeaders:{},isStream:!1}:xl(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(gl,"serializeBody");async function $i(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($i,"parseResponseBody");async function yl(e,t){let r;for(let n=0;n<=t;n++)try{let i=await e();if(i.status>=500&&n<t){await Si(n);continue}return i}catch(i){if(r=i,n<t){await Si(n);continue}throw i}throw r}o(yl,"sendWithRetries");function Si(e){let t=Math.min(1e3*2**e,3e4);return new Promise(r=>setTimeout(r,t))}o(Si,"backoff");function hl(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(hl,"normalizeHeaders");function vl(e){let t={};return e.forEach((r,n)=>{t[n]=r}),t}o(vl,"toHttpHeaders");function xl(e){return typeof e=="object"&&e!==null&&typeof e.getHeaders=="function"&&typeof e.pipe=="function"}o(xl,"isNodeFormData");function Pl(e){return e==null}o(Pl,"isNil");var Gt=new Wt;var ht=(c=>(c.GET="GET",c.POST="POST",c.PATCH="PATCH",c.PUT="PUT",c.DELETE="DELETE",c.HEAD="HEAD",c))(ht||{});var sd=Re(require("fs")),Rs=Re(ws());var ud={"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 cd(e){let t=e.split(";")[0].trim().toLowerCase();return ud[t]??""}o(cd,"contentTypeToExtension");var ld=o(({baseUrl:e,relativePath:t})=>{let r=e.endsWith("/")?e:`${e}/`,n=t.startsWith("/")?t.slice(1):t;return`${r}${n}`},"joinBaseUrlWithRelativePath"),pd=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 Ds({auth:e,baseUrl:t,authMapping:r,description:n,displayName:i,name:u,props:c,extraProps:p,authLocation:f="headers"}){return Ee({audience:"human",name:u||"custom_api_call",displayName:i||"Custom API Call",description:n||"Make a custom API call to a specific endpoint",auth:e,requireAuth:!!e,props:{url:F.DynamicProperties({auth:e,displayName:"",required:!0,refreshers:[],props:o(async({auth:y})=>({url:F.ShortText({displayName:"URL",description:`You can either use the full URL or the relative path to the base URL
3
+ i.e ${pd(t,y)}/resource or /resource`,required:!0,defaultValue:y?t(y):"",...c?.url??{}})}),"props")}),method:F.StaticDropdown({displayName:"Method",required:!0,options:{options:Object.values(ht).map(y=>({label:y,value:y}))},...c?.method??{}}),headers:F.Object({displayName:"Headers",description:"Authorization headers are injected automatically from your connection.",required:!0,...c?.headers??{}}),queryParams:F.Object({displayName:"Query Parameters",required:!0,...c?.queryParams??{}}),body_type:F.StaticDropdown({displayName:"Body Type",required:!1,defaultValue:"none",options:{disabled:!1,options:[{label:"None",value:"none"},{label:"JSON",value:"json"},{label:"Form Data",value:"form_data"},{label:"Raw",value:"raw"}]}}),body:F.DynamicProperties({auth:e,displayName:"Body",refreshers:["body_type"],required:!1,props:o(async({body_type:y})=>{if(!y)return{};let x=y,b={};switch(x){case"none":break;case"json":b.data=F.Json({displayName:"JSON Body",required:!0,...c?.body??{}});break;case"raw":b.data=F.LongText({displayName:"Raw Body",required:!0});break;case"form_data":b.data=F.Array({displayName:"Form Data",required:!0,properties:{fieldName:F.ShortText({displayName:"Field Name",required:!0}),fieldType:F.StaticDropdown({displayName:"Field Type",required:!0,options:{disabled:!1,options:[{label:"Text",value:"text"},{label:"File",value:"file"}]}}),textFieldValue:F.LongText({displayName:"Text Field Value",required:!1}),fileFieldValue:F.File({displayName:"File Field Value",required:!1})}});break}return b},"props")}),response_is_binary:F.Checkbox({displayName:"Response is Binary ?",description:"Enable for files like PDFs, images, etc.",required:!1,defaultValue:!1}),failsafe:F.Checkbox({displayName:"No Error on Failure",required:!1,...c?.failsafe??{}}),timeout:F.Number({displayName:"Timeout (in seconds)",required:!1,...c?.timeout??{}}),followRedirects:F.Checkbox({displayName:"Follow redirects",required:!1,defaultValue:!1}),...p},run:o(async y=>{let{method:x,url:b,headers:P,queryParams:s,body:d,body_type:g,failsafe:m,timeout:v,response_is_binary:_,followRedirects:M}=y.propsValue;Mt(x,"Method"),Mt(b,"URL");let te=X(r)?{}:await r(y.auth,y.propsValue),ie=b.url,Ke=ie.startsWith("http://")||ie.startsWith("https://")?ie:ld({baseUrl:t(y.auth),relativePath:ie}),Ae={method:x,url:Ke,headers:{...P??{},...f==="headers"||!X(f)?te:{}},queryParams:{...f==="queryParams"?te:{},...s??{}},timeout:v?v*1e3:0,followRedirects:M};if(_&&(Ae.responseType="arraybuffer"),d)if(g&&g!=="none"){let de=d.data;if(g==="form_data"){let Ls=de,_t=new Rs.default;for(let{fieldName:dn,fieldType:mn,textFieldValue:fn,fileFieldValue:ir}of Ls)mn==="text"&&!ft(fn)?_t.append(dn,fn):mn==="file"&&!ft(ir)&&_t.append(dn,ir.data,{filename:ir?.filename});Ae.body=_t,Ae.headers={...Ae.headers,..._t.getHeaders()}}else Ae.body=de}else g||(Ae.body=d);try{let de=await Gt.sendRequest(Ae);return await dd(y.files,de.body,de.status,de.headers,_)}catch(de){if(m)return de.errorMessage();throw de}},"run")})}o(Ds,"createCustomApiCallAction");var dd=o(async(e,t,r,n,i)=>{let u;if(i&&md(t)){let c=Array.isArray(n?.["content-type"])?n["content-type"][0]:n?.["content-type"],p=cd(c??"")||"txt",f;t instanceof ArrayBuffer?f=Buffer.from(new Uint8Array(t)):Buffer.isBuffer(t)?f=t:f=Buffer.from(t),u=await e.write({fileName:`output.${p}`,data:f})}else u=t;return{status:r,headers:n,body:u}},"handleBinaryResponse"),md=o(e=>e instanceof ArrayBuffer||Buffer.isBuffer(e),"isBinaryBody");var pe={async poll(e,{store:t,auth:r,propsValue:n,maxItemsToPoll:i,files:u,server:c}){switch(e.strategy){case 0:{let p=await t.get("lastPoll");if(X(p))throw new Error("lastPoll doesn't exist in the store.");let f=await e.items({store:t,auth:r,propsValue:n,lastFetchEpochMS:p,server:c}),y=f.reduce((x,b)=>Math.max(x,b.epochMilliSeconds),p);return await t.put("lastPoll",y),f.filter(x=>x.epochMilliSeconds>p).map(x=>x.data)}case 1:{let p=await t.get("lastItem"),f=await e.items({store:t,auth:r,propsValue:n,lastItemId:p,files:u,server:c}),y=f.findIndex(P=>P.id===p),x=[];X(p)||y==-1?x=f??[]:x=f?.slice(0,y)??[],X(i)||(x=x.slice(-i));let b=x?.[0]?.id;return X(b)||await t.put("lastItem",b),x.map(P=>P.data)}}},async onEnable(e,{store:t,auth:r,propsValue:n,server:i}){switch(e.strategy){case 0:{await t.put("lastPoll",Date.now());break}case 1:{let c=(await e.items({store:t,auth:r,propsValue:n,lastItemId:null,server:i}))?.[0]?.id;X(c)?await t.delete("lastItem"):await t.put("lastItem",c);break}}},async onDisable(e,t){switch(e.strategy){case 0:case 1:return}},async test(e,{auth:t,propsValue:r,store:n,files:i,server:u}){let c=[];switch(e.strategy){case 0:{c=await e.items({store:n,auth:t,propsValue:r,lastFetchEpochMS:0,server:u});break}case 1:{c=await e.items({store:n,auth:t,propsValue:r,lastItemId:null,files:i,server:u});break}}return fd(c.map(p=>p.data))}};function fd(e){return e.length<=5?e:e.slice(0,5)}o(fd,"getFirstFiveOrAll");var Q=Lr.OAuth2({description:"Connect your Hootsuite account. Create an OAuth2 app and get your client credentials at https://developer.hootsuite.com.",required:!0,authUrl:"https://platform.hootsuite.com/oauth2/auth",tokenUrl:"https://platform.hootsuite.com/oauth2/token",scope:["offline","post"]});var gd="https://platform.hootsuite.com/v1";async function ue({auth:e,method:t,path:r,body:n,queryParams:i}){return Gt.sendRequest({method:t,url:`${gd}${r}`,authentication:{type:"BEARER_TOKEN",token:e.access_token},body:n,queryParams:i})}o(ue,"hootsuiteApiCall");var Ns=Ee({auth:Q,name:"create_message",displayName:"Schedule Post",description:"Schedules or immediately publishes a post to one or more social media profiles.",audience:"both",aiMetadata:{description:"Publishes a post to one or more connected Hootsuite social profiles, either immediately or scheduled for a future time depending on whether a scheduled time is provided (leave it empty to post now; a future time must be at least 5 minutes ahead and in UTC). Use to create and distribute social media content across networks. Not idempotent: each call creates a new post, so repeating it produces duplicate posts. Requires the target social profile IDs and the post text.",idempotent:!1},props:{socialProfileIds:F.MultiSelectDropdown({displayName:"Social Profiles",description:"Select the social media profiles to post to.",refreshers:[],required:!0,auth:Q,options:o(async({auth:e})=>{if(!e)return{disabled:!0,options:[],placeholder:"Please connect your Hootsuite account first"};try{return{disabled:!1,options:(await ue({auth:e,method:"GET",path:"/socialProfiles"})).body.data.map(r=>({label:`${r.socialNetworkUsername??r.id} (${r.type})`,value:r.id}))}}catch{return{disabled:!0,options:[],placeholder:"Failed to load profiles. Check your connection."}}},"options")}),text:F.LongText({displayName:"Post Text",description:"The text content of your post.",required:!0}),scheduledSendTime:F.DateTime({displayName:"Scheduled Time",description:"When to publish the post (UTC, must be at least 5 minutes in the future). Leave empty to post immediately.",required:!1}),emailNotification:F.Checkbox({displayName:"Email Notification",description:"Send an email notification when the post is published.",required:!1,defaultValue:!1})},async run(e){let{socialProfileIds:t,text:r,scheduledSendTime:n,emailNotification:i}=e.propsValue,u={text:r,socialProfileIds:t,emailNotification:i};n&&(u.scheduledSendTime=new Date(n).toISOString());let p=(await ue({auth:e.auth,method:"POST",path:"/messages",body:u})).body.data;return{id:p.id,state:p.state,scheduled_send_time:p.scheduledSendTime??null,text:p.text??r,social_profile_ids:(p.socialProfileIds??t).join(", "),post_url:p.postUrl??null,errors:p.errors??[]}}});var Cs=Ee({auth:Q,name:"get_message",displayName:"Get Post Details",description:"Retrieves the details of a specific scheduled or published post by its ID.",audience:"both",aiMetadata:{description:"Looks up a single Hootsuite post by its ID and returns its current details and state (e.g. scheduled, sent, errored). Use to inspect or confirm a post created earlier or referenced from the dashboard. Idempotent read-only lookup. Requires the post ID, obtainable from a Schedule Post output or the Hootsuite dashboard URL.",idempotent:!0},props:{messageId:F.ShortText({displayName:"Post ID",description:'The unique ID of the post. You can get this from a previous "Schedule Post" action output or from the Hootsuite dashboard URL.',required:!0})},async run(e){let r=(await ue({auth:e.auth,method:"GET",path:`/messages/${e.propsValue.messageId}`})).body.data;return{id:r.id,state:r.state,text:r.text??null,scheduled_send_time:r.scheduledSendTime??null,send_time:r.sendTime??null,social_profile_ids:(r.socialProfileIds??[]).join(", "),post_url:r.postUrl??null,tags:r.tags??[],email_notification:r.emailNotification??null,location:r.location??null,errors:r.errors??[]}}});var Us=Ee({auth:Q,name:"delete_message",displayName:"Delete Post",description:"Permanently deletes a post. Only posts in a deletable state (e.g. SCHEDULED) can be removed.",audience:"both",aiMetadata:{description:"Permanently deletes a Hootsuite post by its ID. Use to cancel or remove a scheduled post before it sends. Only posts in a deletable state (e.g. SCHEDULED) can be removed; already-sent posts cannot. Not idempotent: the first call removes the post and subsequent calls with the same ID will fail since it no longer exists.",idempotent:!1},props:{messageId:F.ShortText({displayName:"Post ID",description:'The unique ID of the post to delete. You can get this from the "Schedule Post" or "Get Post Details" action.',required:!0})},async run(e){return await ue({auth:e.auth,method:"DELETE",path:`/messages/${e.propsValue.messageId}`}),{success:!0,deleted_message_id:e.propsValue.messageId}}});var nr={strategy:1,items:o(async({auth:e})=>((await ue({auth:e,method:"GET",path:"/messages",queryParams:{state:"SCHEDULED",limit:"50"}})).body.data??[]).sort((r,n)=>new Date(n.scheduledSendTime).getTime()-new Date(r.scheduledSendTime).getTime()).map(r=>({id:r.id,data:{id:r.id,state:r.state,scheduled_send_time:r.scheduledSendTime,text:r.text??null,social_profile_ids:(r.socialProfileIds??[]).join(", ")}})),"items")},Ms=Ft({auth:Q,name:"new_scheduled_post",displayName:"New Scheduled Post",description:"Triggers when a new post is scheduled in Hootsuite.",aiMetadata:{description:"Fires when a new post enters the SCHEDULED state in Hootsuite, representing content queued for future publishing. Fires at scheduling time, not when the post actually sends."},props:{},sampleData:{id:"msg_abc123",state:"SCHEDULED",scheduled_send_time:"2024-06-01T10:00:00Z",text:"Check out our latest blog post!",social_profile_ids:"profile_1, profile_2"},type:"POLLING",async test(e){return pe.test(nr,e)},async onEnable(e){await pe.onEnable(nr,e)},async onDisable(e){await pe.onDisable(nr,e)},async run(e){return pe.poll(nr,e)}});var or={strategy:0,items:o(async({auth:e})=>((await ue({auth:e,method:"GET",path:"/messages",queryParams:{state:"SENT",limit:"50"}})).body.data??[]).filter(r=>!!r.sendTime).map(r=>({epochMilliSeconds:new Date(r.sendTime).getTime(),data:{id:r.id,state:r.state,send_time:r.sendTime,text:r.text??null,post_url:r.postUrl??null,social_profile_ids:(r.socialProfileIds??[]).join(", ")}})),"items")},js=Ft({auth:Q,name:"new_published_post",displayName:"New Published Post",description:"Triggers when a post is published (sent) in Hootsuite.",aiMetadata:{description:"Fires when a post transitions to the SENT state in Hootsuite, representing content that has actually been published to its social networks."},props:{},sampleData:{id:"msg_xyz456",state:"SENT",send_time:"2024-06-01T10:00:00Z",text:"Check out our latest blog post!",post_url:"https://twitter.com/example/status/123456",social_profile_ids:"profile_1"},type:"POLLING",async test(e){return pe.test(or,e)},async onEnable(e){await pe.onEnable(or,e)},async onDisable(e){await pe.onDisable(or,e)},async run(e){return pe.poll(or,e)}});var hd=Pi({displayName:"Hootsuite",description:"Social media management \u2014 schedule posts and manage multiple networks from one dashboard.",minimumSupportedRelease:"0.36.1",logoUrl:"https://cdn.activepieces.com/pieces/hootsuite.png",categories:["MARKETING"],auth:Q,authors:["onyedikachi-david"],actions:[Ns,Cs,Us,Ds({baseUrl:o(()=>"https://platform.hootsuite.com/v1","baseUrl"),auth:Q,authMapping:o(async e=>({Authorization:`Bearer ${e.access_token}`}),"authMapping")})],triggers:[Ms,js]});0&&(module.exports={hootsuite,hootsuiteAuth});
4
+ /*! Bundled license information:
5
+
6
+ mime-types/index.js:
7
+ (*!
8
+ * mime-types
9
+ * Copyright(c) 2014 Jonathan Ong
10
+ * Copyright(c) 2015 Douglas Christopher Wilson
11
+ * MIT Licensed
12
+ *)
13
+ */
package/src/index.d.ts DELETED
@@ -1,4 +0,0 @@
1
- import { hootsuiteAuth } from './lib/auth';
2
- export declare const hootsuite: import("@activepieces/pieces-framework").Piece<import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props>>;
3
- export { hootsuiteAuth };
4
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAE3C,eAAO,MAAM,SAAS,+JAqBpB,CAAC;AAEH,OAAO,EAAE,aAAa,EAAE,CAAC"}
package/src/index.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;AAAA,qEAA6D;AAC7D,+DAAwE;AAExE,iDAAqD;AACrD,iEAAmE;AACnE,2DAA6D;AAC7D,iEAAmE;AACnE,0EAA4E;AAC5E,0EAA4E;AAC5E,qCAA2C;AAyBlC,8FAzBA,oBAAa,OAyBA;AAvBT,QAAA,SAAS,GAAG,IAAA,8BAAW,EAAC;IACnC,WAAW,EAAE,WAAW;IACxB,WAAW,EAAE,2FAA2F;IACxG,uBAAuB,EAAE,QAAQ;IACjC,OAAO,EAAE,mDAAmD;IAC5D,UAAU,EAAE,CAAC,sBAAa,CAAC,SAAS,CAAC;IACrC,IAAI,EAAE,oBAAa;IACnB,OAAO,EAAE,CAAC,mBAAmB,CAAC;IAC9B,OAAO,EAAE;QACP,oCAAmB;QACnB,8BAAgB;QAChB,oCAAmB;QACnB,IAAA,yCAAyB,EAAC;YACxB,OAAO,EAAE,GAAG,EAAE,CAAC,mCAAmC;YAClD,IAAI,EAAE,oBAAa;YACnB,WAAW,EAAE,CAAO,IAAI,EAAE,EAAE;gBAAC,OAAA,CAAC;oBAC5B,aAAa,EAAE,UAAW,IAA4B,CAAC,YAAY,EAAE;iBACtE,CAAC,CAAA;cAAA;SACH,CAAC;KACH;IACD,QAAQ,EAAE,CAAC,4CAAuB,EAAE,4CAAuB,CAAC;CAC7D,CAAC,CAAC"}
@@ -1,7 +0,0 @@
1
- export declare const createMessageAction: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props>, {
2
- socialProfileIds: import("@activepieces/pieces-framework").MultiSelectDropdownProperty<string, true, import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props>>;
3
- text: import("@activepieces/pieces-framework").LongTextProperty<true>;
4
- scheduledSendTime: import("@activepieces/pieces-framework").DateTimeProperty<false>;
5
- emailNotification: import("@activepieces/pieces-framework").CheckboxProperty<false>;
6
- }>;
7
- //# sourceMappingURL=create-message.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"create-message.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/create-message.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,mBAAmB;;;;;EAmF9B,CAAC"}
@@ -1,97 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.createMessageAction = 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("../auth");
8
- const common_1 = require("../common");
9
- exports.createMessageAction = (0, pieces_framework_1.createAction)({
10
- auth: auth_1.hootsuiteAuth,
11
- name: 'create_message',
12
- displayName: 'Schedule Post',
13
- description: 'Schedules or immediately publishes a post to one or more social media profiles.',
14
- audience: 'both',
15
- aiMetadata: { description: 'Publishes a post to one or more connected Hootsuite social profiles, either immediately or scheduled for a future time depending on whether a scheduled time is provided (leave it empty to post now; a future time must be at least 5 minutes ahead and in UTC). Use to create and distribute social media content across networks. Not idempotent: each call creates a new post, so repeating it produces duplicate posts. Requires the target social profile IDs and the post text.', idempotent: false },
16
- props: {
17
- socialProfileIds: pieces_framework_1.Property.MultiSelectDropdown({
18
- displayName: 'Social Profiles',
19
- description: 'Select the social media profiles to post to.',
20
- refreshers: [],
21
- required: true,
22
- auth: auth_1.hootsuiteAuth,
23
- options: (_a) => tslib_1.__awaiter(void 0, [_a], void 0, function* ({ auth }) {
24
- if (!auth) {
25
- return { disabled: true, options: [], placeholder: 'Please connect your Hootsuite account first' };
26
- }
27
- try {
28
- const response = yield (0, common_1.hootsuiteApiCall)({
29
- auth,
30
- method: pieces_common_1.HttpMethod.GET,
31
- path: '/socialProfiles',
32
- });
33
- return {
34
- disabled: false,
35
- options: response.body.data.map((p) => {
36
- var _a;
37
- return ({
38
- label: `${(_a = p.socialNetworkUsername) !== null && _a !== void 0 ? _a : p.id} (${p.type})`,
39
- value: p.id,
40
- });
41
- }),
42
- };
43
- }
44
- catch (_b) {
45
- return { disabled: true, options: [], placeholder: 'Failed to load profiles. Check your connection.' };
46
- }
47
- }),
48
- }),
49
- text: pieces_framework_1.Property.LongText({
50
- displayName: 'Post Text',
51
- description: 'The text content of your post.',
52
- required: true,
53
- }),
54
- scheduledSendTime: pieces_framework_1.Property.DateTime({
55
- displayName: 'Scheduled Time',
56
- description: 'When to publish the post (UTC, must be at least 5 minutes in the future). Leave empty to post immediately.',
57
- required: false,
58
- }),
59
- emailNotification: pieces_framework_1.Property.Checkbox({
60
- displayName: 'Email Notification',
61
- description: 'Send an email notification when the post is published.',
62
- required: false,
63
- defaultValue: false,
64
- }),
65
- },
66
- run(context) {
67
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
68
- var _a, _b, _c, _d, _e;
69
- const { socialProfileIds, text, scheduledSendTime, emailNotification } = context.propsValue;
70
- const body = {
71
- text,
72
- socialProfileIds,
73
- emailNotification,
74
- };
75
- if (scheduledSendTime) {
76
- body['scheduledSendTime'] = new Date(scheduledSendTime).toISOString();
77
- }
78
- const response = yield (0, common_1.hootsuiteApiCall)({
79
- auth: context.auth,
80
- method: pieces_common_1.HttpMethod.POST,
81
- path: '/messages',
82
- body,
83
- });
84
- const msg = response.body.data;
85
- return {
86
- id: msg.id,
87
- state: msg.state,
88
- scheduled_send_time: (_a = msg.scheduledSendTime) !== null && _a !== void 0 ? _a : null,
89
- text: (_b = msg.text) !== null && _b !== void 0 ? _b : text,
90
- social_profile_ids: ((_c = msg.socialProfileIds) !== null && _c !== void 0 ? _c : socialProfileIds).join(', '),
91
- post_url: (_d = msg.postUrl) !== null && _d !== void 0 ? _d : null,
92
- errors: (_e = msg.errors) !== null && _e !== void 0 ? _e : [],
93
- };
94
- });
95
- },
96
- });
97
- //# sourceMappingURL=create-message.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"create-message.js","sourceRoot":"","sources":["../../../../src/lib/actions/create-message.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,+DAAyD;AACzD,kCAAwC;AACxC,sCAA6C;AAEhC,QAAA,mBAAmB,GAAG,IAAA,+BAAY,EAAC;IAC9C,IAAI,EAAE,oBAAa;IACnB,IAAI,EAAE,gBAAgB;IACtB,WAAW,EAAE,eAAe;IAC5B,WAAW,EAAE,iFAAiF;IAC9F,QAAQ,EAAE,MAAM;IAChB,UAAU,EAAE,EAAE,WAAW,EAAE,wdAAwd,EAAE,UAAU,EAAE,KAAK,EAAE;IACxgB,KAAK,EAAE;QACL,gBAAgB,EAAE,2BAAQ,CAAC,mBAAmB,CAAC;YAC7C,WAAW,EAAE,iBAAiB;YAC9B,WAAW,EAAE,8CAA8C;YAC3D,UAAU,EAAE,EAAE;YACd,QAAQ,EAAE,IAAI;YACd,IAAI,EAAE,oBAAa;YACnB,OAAO,EAAE,KAAiB,EAAE,oDAAZ,EAAE,IAAI,EAAE;gBACtB,IAAI,CAAC,IAAI,EAAE,CAAC;oBACV,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,EAAE,WAAW,EAAE,6CAA6C,EAAE,CAAC;gBACrG,CAAC;gBACD,IAAI,CAAC;oBACH,MAAM,QAAQ,GAAG,MAAM,IAAA,yBAAgB,EAAyB;wBAC9D,IAAI;wBACJ,MAAM,EAAE,0BAAU,CAAC,GAAG;wBACtB,IAAI,EAAE,iBAAiB;qBACxB,CAAC,CAAC;oBACH,OAAO;wBACL,QAAQ,EAAE,KAAK;wBACf,OAAO,EAAE,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE;;4BAAC,OAAA,CAAC;gCACtC,KAAK,EAAE,GAAG,MAAA,CAAC,CAAC,qBAAqB,mCAAI,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,IAAI,GAAG;gCACvD,KAAK,EAAE,CAAC,CAAC,EAAE;6BACZ,CAAC,CAAA;yBAAA,CAAC;qBACJ,CAAC;gBACJ,CAAC;gBAAC,WAAM,CAAC;oBACP,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,EAAE,WAAW,EAAE,iDAAiD,EAAE,CAAC;gBACzG,CAAC;YACH,CAAC,CAAA;SACF,CAAC;QACF,IAAI,EAAE,2BAAQ,CAAC,QAAQ,CAAC;YACtB,WAAW,EAAE,WAAW;YACxB,WAAW,EAAE,gCAAgC;YAC7C,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,iBAAiB,EAAE,2BAAQ,CAAC,QAAQ,CAAC;YACnC,WAAW,EAAE,gBAAgB;YAC7B,WAAW,EAAE,4GAA4G;YACzH,QAAQ,EAAE,KAAK;SAChB,CAAC;QACF,iBAAiB,EAAE,2BAAQ,CAAC,QAAQ,CAAC;YACnC,WAAW,EAAE,oBAAoB;YACjC,WAAW,EAAE,wDAAwD;YACrE,QAAQ,EAAE,KAAK;YACf,YAAY,EAAE,KAAK;SACpB,CAAC;KACH;IACK,GAAG,CAAC,OAAO;;;YACf,MAAM,EAAE,gBAAgB,EAAE,IAAI,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,GAAG,OAAO,CAAC,UAAU,CAAC;YAE5F,MAAM,IAAI,GAA4B;gBACpC,IAAI;gBACJ,gBAAgB;gBAChB,iBAAiB;aAClB,CAAC;YACF,IAAI,iBAAiB,EAAE,CAAC;gBACtB,IAAI,CAAC,mBAAmB,CAAC,GAAG,IAAI,IAAI,CAAC,iBAAiB,CAAC,CAAC,WAAW,EAAE,CAAC;YACxE,CAAC;YAED,MAAM,QAAQ,GAAG,MAAM,IAAA,yBAAgB,EAAkB;gBACvD,IAAI,EAAE,OAAO,CAAC,IAAI;gBAClB,MAAM,EAAE,0BAAU,CAAC,IAAI;gBACvB,IAAI,EAAE,WAAW;gBACjB,IAAI;aACL,CAAC,CAAC;YAEH,MAAM,GAAG,GAAG,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC;YAC/B,OAAO;gBACL,EAAE,EAAE,GAAG,CAAC,EAAE;gBACV,KAAK,EAAE,GAAG,CAAC,KAAK;gBAChB,mBAAmB,EAAE,MAAA,GAAG,CAAC,iBAAiB,mCAAI,IAAI;gBAClD,IAAI,EAAE,MAAA,GAAG,CAAC,IAAI,mCAAI,IAAI;gBACtB,kBAAkB,EAAE,CAAC,MAAA,GAAG,CAAC,gBAAgB,mCAAI,gBAAgB,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC;gBACzE,QAAQ,EAAE,MAAA,GAAG,CAAC,OAAO,mCAAI,IAAI;gBAC7B,MAAM,EAAE,MAAA,GAAG,CAAC,MAAM,mCAAI,EAAE;aACzB,CAAC;QACJ,CAAC;KAAA;CACF,CAAC,CAAC"}
@@ -1,4 +0,0 @@
1
- export declare const deleteMessageAction: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props>, {
2
- messageId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
3
- }>;
4
- //# sourceMappingURL=delete-message.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"delete-message.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/delete-message.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,mBAAmB;;EA0B9B,CAAC"}
@@ -1,37 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.deleteMessageAction = 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("../auth");
8
- const common_1 = require("../common");
9
- exports.deleteMessageAction = (0, pieces_framework_1.createAction)({
10
- auth: auth_1.hootsuiteAuth,
11
- name: 'delete_message',
12
- displayName: 'Delete Post',
13
- description: 'Permanently deletes a post. Only posts in a deletable state (e.g. SCHEDULED) can be removed.',
14
- audience: 'both',
15
- aiMetadata: { description: 'Permanently deletes a Hootsuite post by its ID. Use to cancel or remove a scheduled post before it sends. Only posts in a deletable state (e.g. SCHEDULED) can be removed; already-sent posts cannot. Not idempotent: the first call removes the post and subsequent calls with the same ID will fail since it no longer exists.', idempotent: false },
16
- props: {
17
- messageId: pieces_framework_1.Property.ShortText({
18
- displayName: 'Post ID',
19
- description: 'The unique ID of the post to delete. You can get this from the "Schedule Post" or "Get Post Details" action.',
20
- required: true,
21
- }),
22
- },
23
- run(context) {
24
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
25
- yield (0, common_1.hootsuiteApiCall)({
26
- auth: context.auth,
27
- method: pieces_common_1.HttpMethod.DELETE,
28
- path: `/messages/${context.propsValue.messageId}`,
29
- });
30
- return {
31
- success: true,
32
- deleted_message_id: context.propsValue.messageId,
33
- };
34
- });
35
- },
36
- });
37
- //# sourceMappingURL=delete-message.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"delete-message.js","sourceRoot":"","sources":["../../../../src/lib/actions/delete-message.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,+DAAyD;AACzD,kCAAwC;AACxC,sCAA6C;AAEhC,QAAA,mBAAmB,GAAG,IAAA,+BAAY,EAAC;IAC9C,IAAI,EAAE,oBAAa;IACnB,IAAI,EAAE,gBAAgB;IACtB,WAAW,EAAE,aAAa;IAC1B,WAAW,EAAE,8FAA8F;IAC3G,QAAQ,EAAE,MAAM;IAChB,UAAU,EAAE,EAAE,WAAW,EAAE,kUAAkU,EAAE,UAAU,EAAE,KAAK,EAAE;IAClX,KAAK,EAAE;QACL,SAAS,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC5B,WAAW,EAAE,SAAS;YACtB,WAAW,EAAE,8GAA8G;YAC3H,QAAQ,EAAE,IAAI;SACf,CAAC;KACH;IACK,GAAG,CAAC,OAAO;;YACf,MAAM,IAAA,yBAAgB,EAAC;gBACrB,IAAI,EAAE,OAAO,CAAC,IAAI;gBAClB,MAAM,EAAE,0BAAU,CAAC,MAAM;gBACzB,IAAI,EAAE,aAAa,OAAO,CAAC,UAAU,CAAC,SAAS,EAAE;aAClD,CAAC,CAAC;YAEH,OAAO;gBACL,OAAO,EAAE,IAAI;gBACb,kBAAkB,EAAE,OAAO,CAAC,UAAU,CAAC,SAAS;aACjD,CAAC;QACJ,CAAC;KAAA;CACF,CAAC,CAAC"}
@@ -1,4 +0,0 @@
1
- export declare const getMessageAction: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props>, {
2
- messageId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
3
- }>;
4
- //# sourceMappingURL=get-message.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"get-message.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/get-message.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,gBAAgB;;EAoC3B,CAAC"}
@@ -1,48 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getMessageAction = 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("../auth");
8
- const common_1 = require("../common");
9
- exports.getMessageAction = (0, pieces_framework_1.createAction)({
10
- auth: auth_1.hootsuiteAuth,
11
- name: 'get_message',
12
- displayName: 'Get Post Details',
13
- description: 'Retrieves the details of a specific scheduled or published post by its ID.',
14
- audience: 'both',
15
- aiMetadata: { description: 'Looks up a single Hootsuite post by its ID and returns its current details and state (e.g. scheduled, sent, errored). Use to inspect or confirm a post created earlier or referenced from the dashboard. Idempotent read-only lookup. Requires the post ID, obtainable from a Schedule Post output or the Hootsuite dashboard URL.', idempotent: true },
16
- props: {
17
- messageId: pieces_framework_1.Property.ShortText({
18
- displayName: 'Post ID',
19
- description: 'The unique ID of the post. You can get this from a previous "Schedule Post" action output or from the Hootsuite dashboard URL.',
20
- required: true,
21
- }),
22
- },
23
- run(context) {
24
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
25
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
26
- const response = yield (0, common_1.hootsuiteApiCall)({
27
- auth: context.auth,
28
- method: pieces_common_1.HttpMethod.GET,
29
- path: `/messages/${context.propsValue.messageId}`,
30
- });
31
- const msg = response.body.data;
32
- return {
33
- id: msg.id,
34
- state: msg.state,
35
- text: (_a = msg.text) !== null && _a !== void 0 ? _a : null,
36
- scheduled_send_time: (_b = msg.scheduledSendTime) !== null && _b !== void 0 ? _b : null,
37
- send_time: (_c = msg.sendTime) !== null && _c !== void 0 ? _c : null,
38
- social_profile_ids: ((_d = msg.socialProfileIds) !== null && _d !== void 0 ? _d : []).join(', '),
39
- post_url: (_e = msg.postUrl) !== null && _e !== void 0 ? _e : null,
40
- tags: (_f = msg.tags) !== null && _f !== void 0 ? _f : [],
41
- email_notification: (_g = msg.emailNotification) !== null && _g !== void 0 ? _g : null,
42
- location: (_h = msg.location) !== null && _h !== void 0 ? _h : null,
43
- errors: (_j = msg.errors) !== null && _j !== void 0 ? _j : [],
44
- };
45
- });
46
- },
47
- });
48
- //# sourceMappingURL=get-message.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"get-message.js","sourceRoot":"","sources":["../../../../src/lib/actions/get-message.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,+DAAyD;AACzD,kCAAwC;AACxC,sCAA6C;AAEhC,QAAA,gBAAgB,GAAG,IAAA,+BAAY,EAAC;IAC3C,IAAI,EAAE,oBAAa;IACnB,IAAI,EAAE,aAAa;IACnB,WAAW,EAAE,kBAAkB;IAC/B,WAAW,EAAE,4EAA4E;IACzF,QAAQ,EAAE,MAAM;IAChB,UAAU,EAAE,EAAE,WAAW,EAAE,oUAAoU,EAAE,UAAU,EAAE,IAAI,EAAE;IACnX,KAAK,EAAE;QACL,SAAS,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC5B,WAAW,EAAE,SAAS;YACtB,WAAW,EAAE,gIAAgI;YAC7I,QAAQ,EAAE,IAAI;SACf,CAAC;KACH;IACK,GAAG,CAAC,OAAO;;;YACf,MAAM,QAAQ,GAAG,MAAM,IAAA,yBAAgB,EAAkB;gBACvD,IAAI,EAAE,OAAO,CAAC,IAAI;gBAClB,MAAM,EAAE,0BAAU,CAAC,GAAG;gBACtB,IAAI,EAAE,aAAa,OAAO,CAAC,UAAU,CAAC,SAAS,EAAE;aAClD,CAAC,CAAC;YAEH,MAAM,GAAG,GAAG,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC;YAC/B,OAAO;gBACL,EAAE,EAAE,GAAG,CAAC,EAAE;gBACV,KAAK,EAAE,GAAG,CAAC,KAAK;gBAChB,IAAI,EAAE,MAAA,GAAG,CAAC,IAAI,mCAAI,IAAI;gBACtB,mBAAmB,EAAE,MAAA,GAAG,CAAC,iBAAiB,mCAAI,IAAI;gBAClD,SAAS,EAAE,MAAA,GAAG,CAAC,QAAQ,mCAAI,IAAI;gBAC/B,kBAAkB,EAAE,CAAC,MAAA,GAAG,CAAC,gBAAgB,mCAAI,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC;gBAC3D,QAAQ,EAAE,MAAA,GAAG,CAAC,OAAO,mCAAI,IAAI;gBAC7B,IAAI,EAAE,MAAA,GAAG,CAAC,IAAI,mCAAI,EAAE;gBACpB,kBAAkB,EAAE,MAAA,GAAG,CAAC,iBAAiB,mCAAI,IAAI;gBACjD,QAAQ,EAAE,MAAA,GAAG,CAAC,QAAQ,mCAAI,IAAI;gBAC9B,MAAM,EAAE,MAAA,GAAG,CAAC,MAAM,mCAAI,EAAE;aACzB,CAAC;QACJ,CAAC;KAAA;CACF,CAAC,CAAC"}
package/src/lib/auth.d.ts DELETED
@@ -1,2 +0,0 @@
1
- export declare const hootsuiteAuth: import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props>;
2
- //# sourceMappingURL=auth.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../../src/lib/auth.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,aAAa,+GAOxB,CAAC"}
package/src/lib/auth.js DELETED
@@ -1,12 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.hootsuiteAuth = void 0;
4
- const pieces_framework_1 = require("@activepieces/pieces-framework");
5
- exports.hootsuiteAuth = pieces_framework_1.PieceAuth.OAuth2({
6
- description: 'Connect your Hootsuite account. Create an OAuth2 app and get your client credentials at https://developer.hootsuite.com.',
7
- required: true,
8
- authUrl: 'https://platform.hootsuite.com/oauth2/auth',
9
- tokenUrl: 'https://platform.hootsuite.com/oauth2/token',
10
- scope: ['offline', 'post'],
11
- });
12
- //# sourceMappingURL=auth.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"auth.js","sourceRoot":"","sources":["../../../src/lib/auth.ts"],"names":[],"mappings":";;;AAAA,qEAA2D;AAE9C,QAAA,aAAa,GAAG,4BAAS,CAAC,MAAM,CAAC;IAC5C,WAAW,EACT,0HAA0H;IAC5H,QAAQ,EAAE,IAAI;IACd,OAAO,EAAE,4CAA4C;IACrD,QAAQ,EAAE,6CAA6C;IACvD,KAAK,EAAE,CAAC,SAAS,EAAE,MAAM,CAAC;CAC3B,CAAC,CAAC"}
@@ -1,10 +0,0 @@
1
- import { HttpMethod, HttpMessageBody, HttpResponse } from '@activepieces/pieces-common';
2
- import { OAuth2PropertyValue } from '@activepieces/pieces-framework';
3
- export declare function hootsuiteApiCall<T extends HttpMessageBody>({ auth, method, path, body, queryParams, }: {
4
- auth: OAuth2PropertyValue;
5
- method: HttpMethod;
6
- path: string;
7
- body?: unknown;
8
- queryParams?: Record<string, string>;
9
- }): Promise<HttpResponse<T>>;
10
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/common/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,UAAU,EACV,eAAe,EACf,YAAY,EAEb,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AAIrE,wBAAsB,gBAAgB,CAAC,CAAC,SAAS,eAAe,EAAE,EAChE,IAAI,EACJ,MAAM,EACN,IAAI,EACJ,IAAI,EACJ,WAAW,GACZ,EAAE;IACD,IAAI,EAAE,mBAAmB,CAAC;IAC1B,MAAM,EAAE,UAAU,CAAC;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACtC,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAW3B"}
@@ -1,21 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.hootsuiteApiCall = hootsuiteApiCall;
4
- const tslib_1 = require("tslib");
5
- const pieces_common_1 = require("@activepieces/pieces-common");
6
- const BASE_URL = 'https://platform.hootsuite.com/v1';
7
- function hootsuiteApiCall(_a) {
8
- return tslib_1.__awaiter(this, arguments, void 0, function* ({ auth, method, path, body, queryParams, }) {
9
- return pieces_common_1.httpClient.sendRequest({
10
- method,
11
- url: `${BASE_URL}${path}`,
12
- authentication: {
13
- type: pieces_common_1.AuthenticationType.BEARER_TOKEN,
14
- token: auth.access_token,
15
- },
16
- body,
17
- queryParams,
18
- });
19
- });
20
- }
21
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/lib/common/index.ts"],"names":[],"mappings":";;AAWA,4CAuBC;;AAlCD,+DAMqC;AAGrC,MAAM,QAAQ,GAAG,mCAAmC,CAAC;AAErD,SAAsB,gBAAgB;iEAA4B,EAChE,IAAI,EACJ,MAAM,EACN,IAAI,EACJ,IAAI,EACJ,WAAW,GAOZ;QACC,OAAO,0BAAU,CAAC,WAAW,CAAI;YAC/B,MAAM;YACN,GAAG,EAAE,GAAG,QAAQ,GAAG,IAAI,EAAE;YACzB,cAAc,EAAE;gBACd,IAAI,EAAE,kCAAkB,CAAC,YAAY;gBACrC,KAAK,EAAE,IAAI,CAAC,YAAY;aACzB;YACD,IAAI;YACJ,WAAW;SACZ,CAAC,CAAC;IACL,CAAC;CAAA"}
@@ -1,3 +0,0 @@
1
- import { TriggerStrategy } from '@activepieces/pieces-framework';
2
- export declare const newPublishedPostTrigger: import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.WEBHOOK, import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props>, {}> | import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.POLLING, import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props>, {}> | import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.MANUAL, import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props>, {}> | import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.APP_WEBHOOK, import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props>, {}>;
3
- //# sourceMappingURL=new-published-post.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"new-published-post.d.ts","sourceRoot":"","sources":["../../../../src/lib/triggers/new-published-post.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,eAAe,EAEhB,MAAM,gCAAgC,CAAC;AA0CxC,eAAO,MAAM,uBAAuB,kwBA8BlC,CAAC"}
@@ -1,79 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.newPublishedPostTrigger = 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("../auth");
8
- const common_1 = require("../common");
9
- const polling = {
10
- strategy: pieces_common_1.DedupeStrategy.TIMEBASED,
11
- items: (_a) => tslib_1.__awaiter(void 0, [_a], void 0, function* ({ auth }) {
12
- var _b;
13
- const response = yield (0, common_1.hootsuiteApiCall)({
14
- auth,
15
- method: pieces_common_1.HttpMethod.GET,
16
- path: '/messages',
17
- queryParams: {
18
- state: 'SENT',
19
- limit: '50',
20
- },
21
- });
22
- return ((_b = response.body.data) !== null && _b !== void 0 ? _b : [])
23
- .filter((msg) => !!msg.sendTime)
24
- .map((msg) => {
25
- var _a, _b, _c;
26
- return ({
27
- epochMilliSeconds: new Date(msg.sendTime).getTime(),
28
- data: {
29
- id: msg.id,
30
- state: msg.state,
31
- send_time: msg.sendTime,
32
- text: (_a = msg.text) !== null && _a !== void 0 ? _a : null,
33
- post_url: (_b = msg.postUrl) !== null && _b !== void 0 ? _b : null,
34
- social_profile_ids: ((_c = msg.socialProfileIds) !== null && _c !== void 0 ? _c : []).join(', '),
35
- },
36
- });
37
- });
38
- }),
39
- };
40
- exports.newPublishedPostTrigger = (0, pieces_framework_1.createTrigger)({
41
- auth: auth_1.hootsuiteAuth,
42
- name: 'new_published_post',
43
- displayName: 'New Published Post',
44
- description: 'Triggers when a post is published (sent) in Hootsuite.',
45
- aiMetadata: {
46
- description: 'Fires when a post transitions to the SENT state in Hootsuite, representing content that has actually been published to its social networks.',
47
- },
48
- props: {},
49
- sampleData: {
50
- id: 'msg_xyz456',
51
- state: 'SENT',
52
- send_time: '2024-06-01T10:00:00Z',
53
- text: 'Check out our latest blog post!',
54
- post_url: 'https://twitter.com/example/status/123456',
55
- social_profile_ids: 'profile_1',
56
- },
57
- type: pieces_framework_1.TriggerStrategy.POLLING,
58
- test(context) {
59
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
60
- return pieces_common_1.pollingHelper.test(polling, context);
61
- });
62
- },
63
- onEnable(context) {
64
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
65
- yield pieces_common_1.pollingHelper.onEnable(polling, context);
66
- });
67
- },
68
- onDisable(context) {
69
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
70
- yield pieces_common_1.pollingHelper.onDisable(polling, context);
71
- });
72
- },
73
- run(context) {
74
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
75
- return pieces_common_1.pollingHelper.poll(polling, context);
76
- });
77
- },
78
- });
79
- //# sourceMappingURL=new-published-post.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"new-published-post.js","sourceRoot":"","sources":["../../../../src/lib/triggers/new-published-post.ts"],"names":[],"mappings":";;;;AAAA,qEAIwC;AACxC,+DAKqC;AACrC,kCAAwC;AACxC,sCAA6C;AAE7C,MAAM,OAAO,GAGT;IACF,QAAQ,EAAE,8BAAc,CAAC,SAAS;IAClC,KAAK,EAAE,KAAiB,EAAE,oDAAZ,EAAE,IAAI,EAAE;;QACpB,MAAM,QAAQ,GAAG,MAAM,IAAA,yBAAgB,EAAmB;YACxD,IAAI;YACJ,MAAM,EAAE,0BAAU,CAAC,GAAG;YACtB,IAAI,EAAE,WAAW;YACjB,WAAW,EAAE;gBACX,KAAK,EAAE,MAAM;gBACb,KAAK,EAAE,IAAI;aACZ;SACF,CAAC,CAAC;QAEH,OAAO,CAAC,MAAA,QAAQ,CAAC,IAAI,CAAC,IAAI,mCAAI,EAAE,CAAC;aAC9B,MAAM,CAAC,CAAC,GAAG,EAAkD,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,QAAQ,CAAC;aAC/E,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE;;YAAC,OAAA,CAAC;gBACb,iBAAiB,EAAE,IAAI,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,OAAO,EAAE;gBACnD,IAAI,EAAE;oBACJ,EAAE,EAAE,GAAG,CAAC,EAAE;oBACV,KAAK,EAAE,GAAG,CAAC,KAAK;oBAChB,SAAS,EAAE,GAAG,CAAC,QAAQ;oBACvB,IAAI,EAAE,MAAA,GAAG,CAAC,IAAI,mCAAI,IAAI;oBACtB,QAAQ,EAAE,MAAA,GAAG,CAAC,OAAO,mCAAI,IAAI;oBAC7B,kBAAkB,EAAE,CAAC,MAAA,GAAG,CAAC,gBAAgB,mCAAI,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC;iBAC5D;aACF,CAAC,CAAA;SAAA,CAAC,CAAC;IACR,CAAC,CAAA;CACF,CAAC;AAEW,QAAA,uBAAuB,GAAG,IAAA,gCAAa,EAAC;IACnD,IAAI,EAAE,oBAAa;IACnB,IAAI,EAAE,oBAAoB;IAC1B,WAAW,EAAE,oBAAoB;IACjC,WAAW,EAAE,wDAAwD;IACrE,UAAU,EAAE;QACV,WAAW,EAAE,6IAA6I;KAC3J;IACD,KAAK,EAAE,EAAE;IACT,UAAU,EAAE;QACV,EAAE,EAAE,YAAY;QAChB,KAAK,EAAE,MAAM;QACb,SAAS,EAAE,sBAAsB;QACjC,IAAI,EAAE,iCAAiC;QACvC,QAAQ,EAAE,2CAA2C;QACrD,kBAAkB,EAAE,WAAW;KAChC;IACD,IAAI,EAAE,kCAAe,CAAC,OAAO;IACvB,IAAI,CAAC,OAAO;;YAChB,OAAO,6BAAa,CAAC,IAAI,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;QAC9C,CAAC;KAAA;IACK,QAAQ,CAAC,OAAO;;YACpB,MAAM,6BAAa,CAAC,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;QACjD,CAAC;KAAA;IACK,SAAS,CAAC,OAAO;;YACrB,MAAM,6BAAa,CAAC,SAAS,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;QAClD,CAAC;KAAA;IACK,GAAG,CAAC,OAAO;;YACf,OAAO,6BAAa,CAAC,IAAI,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;QAC9C,CAAC;KAAA;CACF,CAAC,CAAC"}
@@ -1,3 +0,0 @@
1
- import { TriggerStrategy } from '@activepieces/pieces-framework';
2
- export declare const newScheduledPostTrigger: import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.WEBHOOK, import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props>, {}> | import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.POLLING, import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props>, {}> | import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.MANUAL, import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props>, {}> | import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.APP_WEBHOOK, import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props>, {}>;
3
- //# sourceMappingURL=new-scheduled-post.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"new-scheduled-post.d.ts","sourceRoot":"","sources":["../../../../src/lib/triggers/new-scheduled-post.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,eAAe,EAEhB,MAAM,gCAAgC,CAAC;AA4CxC,eAAO,MAAM,uBAAuB,kwBA6BlC,CAAC"}
@@ -1,80 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.newScheduledPostTrigger = 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("../auth");
8
- const common_1 = require("../common");
9
- const polling = {
10
- // LAST_ITEM is correct here: we want to fire when a post is newly created/scheduled,
11
- // not when its scheduled time arrives. TIMEBASED with scheduledSendTime would fire
12
- // based on due-time, causing posts scheduled for earlier dates to be missed.
13
- strategy: pieces_common_1.DedupeStrategy.LAST_ITEM,
14
- items: (_a) => tslib_1.__awaiter(void 0, [_a], void 0, function* ({ auth }) {
15
- var _b;
16
- const response = yield (0, common_1.hootsuiteApiCall)({
17
- auth,
18
- method: pieces_common_1.HttpMethod.GET,
19
- path: '/messages',
20
- queryParams: {
21
- state: 'SCHEDULED',
22
- limit: '50',
23
- },
24
- });
25
- return ((_b = response.body.data) !== null && _b !== void 0 ? _b : [])
26
- .sort((a, b) => new Date(b.scheduledSendTime).getTime() - new Date(a.scheduledSendTime).getTime())
27
- .map((msg) => {
28
- var _a, _b;
29
- return ({
30
- id: msg.id,
31
- data: {
32
- id: msg.id,
33
- state: msg.state,
34
- scheduled_send_time: msg.scheduledSendTime,
35
- text: (_a = msg.text) !== null && _a !== void 0 ? _a : null,
36
- social_profile_ids: ((_b = msg.socialProfileIds) !== null && _b !== void 0 ? _b : []).join(', '),
37
- },
38
- });
39
- });
40
- }),
41
- };
42
- exports.newScheduledPostTrigger = (0, pieces_framework_1.createTrigger)({
43
- auth: auth_1.hootsuiteAuth,
44
- name: 'new_scheduled_post',
45
- displayName: 'New Scheduled Post',
46
- description: 'Triggers when a new post is scheduled in Hootsuite.',
47
- aiMetadata: {
48
- description: 'Fires when a new post enters the SCHEDULED state in Hootsuite, representing content queued for future publishing. Fires at scheduling time, not when the post actually sends.',
49
- },
50
- props: {},
51
- sampleData: {
52
- id: 'msg_abc123',
53
- state: 'SCHEDULED',
54
- scheduled_send_time: '2024-06-01T10:00:00Z',
55
- text: 'Check out our latest blog post!',
56
- social_profile_ids: 'profile_1, profile_2',
57
- },
58
- type: pieces_framework_1.TriggerStrategy.POLLING,
59
- test(context) {
60
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
61
- return pieces_common_1.pollingHelper.test(polling, context);
62
- });
63
- },
64
- onEnable(context) {
65
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
66
- yield pieces_common_1.pollingHelper.onEnable(polling, context);
67
- });
68
- },
69
- onDisable(context) {
70
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
71
- yield pieces_common_1.pollingHelper.onDisable(polling, context);
72
- });
73
- },
74
- run(context) {
75
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
76
- return pieces_common_1.pollingHelper.poll(polling, context);
77
- });
78
- },
79
- });
80
- //# sourceMappingURL=new-scheduled-post.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"new-scheduled-post.js","sourceRoot":"","sources":["../../../../src/lib/triggers/new-scheduled-post.ts"],"names":[],"mappings":";;;;AAAA,qEAIwC;AACxC,+DAKqC;AACrC,kCAAwC;AACxC,sCAA6C;AAE7C,MAAM,OAAO,GAGT;IACF,qFAAqF;IACrF,mFAAmF;IACnF,6EAA6E;IAC7E,QAAQ,EAAE,8BAAc,CAAC,SAAS;IAClC,KAAK,EAAE,KAAiB,EAAE,oDAAZ,EAAE,IAAI,EAAE;;QACpB,MAAM,QAAQ,GAAG,MAAM,IAAA,yBAAgB,EAAmB;YACxD,IAAI;YACJ,MAAM,EAAE,0BAAU,CAAC,GAAG;YACtB,IAAI,EAAE,WAAW;YACjB,WAAW,EAAE;gBACX,KAAK,EAAE,WAAW;gBAClB,KAAK,EAAE,IAAI;aACZ;SACF,CAAC,CAAC;QAEH,OAAO,CAAC,MAAA,QAAQ,CAAC,IAAI,CAAC,IAAI,mCAAI,EAAE,CAAC;aAC9B,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,IAAI,IAAI,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC,OAAO,EAAE,GAAG,IAAI,IAAI,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC,OAAO,EAAE,CAAC;aACjG,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE;;YAAC,OAAA,CAAC;gBACb,EAAE,EAAE,GAAG,CAAC,EAAE;gBACV,IAAI,EAAE;oBACJ,EAAE,EAAE,GAAG,CAAC,EAAE;oBACV,KAAK,EAAE,GAAG,CAAC,KAAK;oBAChB,mBAAmB,EAAE,GAAG,CAAC,iBAAiB;oBAC1C,IAAI,EAAE,MAAA,GAAG,CAAC,IAAI,mCAAI,IAAI;oBACtB,kBAAkB,EAAE,CAAC,MAAA,GAAG,CAAC,gBAAgB,mCAAI,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC;iBAC5D;aACF,CAAC,CAAA;SAAA,CAAC,CAAC;IACR,CAAC,CAAA;CACF,CAAC;AAEW,QAAA,uBAAuB,GAAG,IAAA,gCAAa,EAAC;IACnD,IAAI,EAAE,oBAAa;IACnB,IAAI,EAAE,oBAAoB;IAC1B,WAAW,EAAE,oBAAoB;IACjC,WAAW,EAAE,qDAAqD;IAClE,UAAU,EAAE;QACV,WAAW,EAAE,+KAA+K;KAC7L;IACD,KAAK,EAAE,EAAE;IACT,UAAU,EAAE;QACV,EAAE,EAAE,YAAY;QAChB,KAAK,EAAE,WAAW;QAClB,mBAAmB,EAAE,sBAAsB;QAC3C,IAAI,EAAE,iCAAiC;QACvC,kBAAkB,EAAE,sBAAsB;KAC3C;IACD,IAAI,EAAE,kCAAe,CAAC,OAAO;IACvB,IAAI,CAAC,OAAO;;YAChB,OAAO,6BAAa,CAAC,IAAI,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;QAC9C,CAAC;KAAA;IACK,QAAQ,CAAC,OAAO;;YACpB,MAAM,6BAAa,CAAC,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;QACjD,CAAC;KAAA;IACK,SAAS,CAAC,OAAO;;YACrB,MAAM,6BAAa,CAAC,SAAS,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;QAClD,CAAC;KAAA;IACK,GAAG,CAAC,OAAO;;YACf,OAAO,6BAAa,CAAC,IAAI,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;QAC9C,CAAC;KAAA;CACF,CAAC,CAAC"}