@oomol-lab/open-flow 0.1.0-beta.80 → 0.1.0-beta.81

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.
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- var Rw=Object.defineProperty;var Aw=(e)=>e;function Pw(e,t){this[e]=Aw.bind(null,t)}var co=(e,t)=>{for(var n in t)Rw(e,n,{get:t[n],enumerable:!0,configurable:!0,set:Pw.bind(t,n)})};var Ct={};co(Ct,{anyString:()=>na,base64:()=>Ks,base64url:()=>Ws,bigint:()=>oa,boolean:()=>ia,browserEmail:()=>pv,cidrv4:()=>Us,cidrv6:()=>Bs,creditCard:()=>Io,cuid:()=>As,cuid2:()=>Ps,currencyCode:()=>Ys,date:()=>Xs,datetime:()=>ta,domain:()=>Gs,duration:()=>qs,e164:()=>Qs,email:()=>Ls,emoji:()=>Ms,extendedDuration:()=>iv,guid:()=>Vs,hex:()=>ua,hostname:()=>Hs,html5Email:()=>lv,httpProtocol:()=>Xn,iban:()=>Co,idnEmail:()=>dv,integer:()=>er,ipv4:()=>Fs,ipv6:()=>Zs,ksuid:()=>Ns,lowercase:()=>ca,mac:()=>Js,md5_base64:()=>hv,md5_base64url:()=>yv,md5_hex:()=>gv,nanoid:()=>zs,nanoidOfLength:()=>Ds,null:()=>sa,number:()=>Jt,rfc5322Email:()=>uv,sha1_base64:()=>wv,sha1_base64url:()=>vv,sha1_hex:()=>bv,sha256_base64:()=>kv,sha256_base64url:()=>Sv,sha256_hex:()=>xv,sha384_base64:()=>Cv,sha384_base64url:()=>Ev,sha384_hex:()=>Iv,sha512_base64:()=>jv,sha512_base64url:()=>_v,sha512_hex:()=>Ov,string:()=>ra,time:()=>ea,ulid:()=>Ts,undefined:()=>aa,unicodeEmail:()=>jd,uppercase:()=>la,uuid:()=>Zt,uuid4:()=>sv,uuid6:()=>av,uuid7:()=>cv,xid:()=>$s});var ll={};co(ll,{ZodAny:()=>ig,ZodArray:()=>ug,ZodBase64:()=>Yc,ZodBase64URL:()=>Xc,ZodBigInt:()=>ol,ZodBigIntFormat:()=>il,ZodBoolean:()=>rl,ZodCIDRv4:()=>Gc,ZodCIDRv6:()=>Qc,ZodCUID:()=>Zc,ZodCUID2:()=>Jc,ZodCatch:()=>Rg,ZodCodec:()=>hi,ZodCreditCard:()=>Xm,ZodCustom:()=>yi,ZodCustomStringFormat:()=>wn,ZodDate:()=>lg,ZodDefault:()=>Ig,ZodDiscriminatedUnion:()=>pg,ZodE164:()=>el,ZodEmail:()=>Vc,ZodEmoji:()=>Mc,ZodEnum:()=>yr,ZodExactOptional:()=>al,ZodFile:()=>vg,ZodFunction:()=>Lg,ZodGUID:()=>Lc,ZodIBAN:()=>eg,ZodIPv4:()=>Wc,ZodIPv6:()=>Hc,ZodISODate:()=>hn,ZodISODateTime:()=>gn,ZodISODuration:()=>bn,ZodISOTime:()=>yn,ZodInstanceOf:()=>Zg,ZodIntersection:()=>fg,ZodJWT:()=>tl,ZodKSUID:()=>Kc,ZodLazy:()=>Dg,ZodLiteral:()=>wg,ZodMAC:()=>Ym,ZodMap:()=>yg,ZodNaN:()=>Pg,ZodNanoID:()=>Fc,ZodNever:()=>ag,ZodNonOptional:()=>cl,ZodNull:()=>rg,ZodNullable:()=>Sg,ZodNumber:()=>nl,ZodNumberFormat:()=>vn,ZodObject:()=>pi,ZodOptional:()=>mi,ZodPipe:()=>gi,ZodPrefault:()=>Eg,ZodPreprocess:()=>Tg,ZodPromise:()=>Vg,ZodReadonly:()=>$g,ZodRecord:()=>hr,ZodSet:()=>bg,ZodString:()=>qc,ZodStringFormat:()=>ce,ZodSuccess:()=>_g,ZodSymbol:()=>tg,ZodTemplateLiteral:()=>zg,ZodTransform:()=>xg,ZodTuple:()=>gg,ZodType:()=>K,ZodULID:()=>Uc,ZodURL:()=>di,ZodUUID:()=>wt,ZodUndefined:()=>ng,ZodUnion:()=>fi,ZodUnknown:()=>sg,ZodVoid:()=>cg,ZodXID:()=>Bc,ZodXor:()=>dg,_ZodString:()=>Dc,_default:()=>Cg,_function:()=>wk,any:()=>ek,array:()=>R,base64:()=>$x,base64url:()=>Nx,bigint:()=>Hx,boolean:()=>ye,catch:()=>Ag,check:()=>vk,cidrv4:()=>Px,cidrv6:()=>Tx,codec:()=>gk,creditCard:()=>Dx,cuid:()=>Ix,cuid2:()=>Cx,currencyCode:()=>Zx,custom:()=>xk,date:()=>nk,describe:()=>kk,discriminatedUnion:()=>rt,e164:()=>zx,email:()=>mx,emoji:()=>kx,enum:()=>F,exactOptional:()=>kg,file:()=>dk,float32:()=>Ux,float64:()=>Bx,function:()=>wk,guid:()=>gx,hash:()=>Jx,hex:()=>Fx,hostname:()=>Mx,httpUrl:()=>xx,iban:()=>qx,instanceof:()=>Ik,int:()=>ke,int32:()=>Kx,int64:()=>Gx,intersection:()=>mg,invertCodec:()=>hk,ipv4:()=>_x,ipv6:()=>Ax,json:()=>Ae,jwt:()=>Vx,keyof:()=>rk,ksuid:()=>jx,lazy:()=>qg,literal:()=>w,looseObject:()=>ok,looseRecord:()=>ak,mac:()=>Rx,map:()=>ck,meta:()=>Sk,nan:()=>mk,nanoid:()=>Sx,nativeEnum:()=>uk,never:()=>nt,nonoptional:()=>jg,null:()=>og,nullable:()=>ui,nullish:()=>pk,number:()=>U,object:()=>E,optional:()=>li,partialRecord:()=>sk,pipe:()=>zc,prefault:()=>Og,preprocess:()=>Jg,promise:()=>bk,readonly:()=>Ng,record:()=>oe,refine:()=>Mg,set:()=>lk,strictObject:()=>x,string:()=>_,stringFormat:()=>Lx,stringbool:()=>Ck,success:()=>fk,superRefine:()=>Fg,symbol:()=>Yx,templateLiteral:()=>yk,transform:()=>sl,tuple:()=>hg,uint32:()=>Wx,uint64:()=>Qx,ulid:()=>Ex,undefined:()=>Xx,union:()=>Y,unknown:()=>lt,url:()=>vx,uuid:()=>hx,uuidv4:()=>yx,uuidv6:()=>bx,uuidv7:()=>wx,void:()=>tk,xid:()=>Ox,xor:()=>ik});var ai={};co(ai,{endsWith:()=>Qo,gt:()=>Ot,gte:()=>tt,includes:()=>Ho,length:()=>cr,lowercase:()=>Ko,lt:()=>Et,lte:()=>et,maxLength:()=>ar,maxSize:()=>un,mime:()=>Xo,minLength:()=>Ut,minSize:()=>jt,multipleOf:()=>ln,negative:()=>lm,nonnegative:()=>dm,nonpositive:()=>um,normalize:()=>ei,overwrite:()=>bt,positive:()=>cm,properties:()=>Yo,property:()=>pm,regex:()=>Bo,size:()=>sr,slugify:()=>oi,startsWith:()=>Go,toLowerCase:()=>ni,toUpperCase:()=>ri,trim:()=>ti,uppercase:()=>Wo});var br={};co(br,{ZodISODate:()=>hn,ZodISODateTime:()=>gn,ZodISODuration:()=>bn,ZodISOTime:()=>yn,date:()=>Ok,datetime:()=>Ek,duration:()=>_k,time:()=>jk});var Zu="0.1.0-beta.80";var ms=["en","zh-CN","zh-TW","ja","ko","ru","fr"],Ju="en";var fs=new Map(ms.map((e)=>[e.toLowerCase(),e])),$w=new Set(["hk","mo","tw"]);function Uu(e){return typeof e=="string"&&fs.get(e.toLowerCase())==e}function lo(e,t="en"){for(let n of e){let r=n==null?void 0:Nw(n);if(r!=null)return r}return t}function Nw(e){let t=e.trim().toLowerCase();if(t.length==0)return;let n=fs.get(t);if(n!=null)return n;let r=t.split("-");if(r[0]=="zh"){if(r.includes("hant"))return"zh-TW";if(r.includes("hans"))return"zh-CN";return r.some((o)=>$w.has(o))?"zh-TW":"zh-CN"}return fs.get(r[0])}function Bu(e){return{en:"Imported workflow","zh-CN":"\u5BFC\u5165\u7684\u5DE5\u4F5C\u6D41","zh-TW":"\u532F\u5165\u7684\u5DE5\u4F5C\u6D41",ja:"\u30A4\u30F3\u30DD\u30FC\u30C8\u3057\u305F\u30EF\u30FC\u30AF\u30D5\u30ED\u30FC",ko:"\uAC00\uC838\uC628 \uC6CC\uD06C\uD50C\uB85C",fr:"Workflow import\xE9",ru:"\u0418\u043C\u043F\u043E\u0440\u0442\u0438\u0440\u043E\u0432\u0430\u043D\u043D\u044B\u0439 \u043F\u0440\u043E\u0446\u0435\u0441\u0441"}[e]}import{spawn as wE}from"child_process";import{readFile as vE}from"fs/promises";import{setTimeout as xE}from"timers/promises";var on="open-flow-engine/v10";var rn=(e)=>`export const engineContract = ${JSON.stringify(e)}
2
+ var Rw=Object.defineProperty;var Aw=(e)=>e;function Pw(e,t){this[e]=Aw.bind(null,t)}var co=(e,t)=>{for(var n in t)Rw(e,n,{get:t[n],enumerable:!0,configurable:!0,set:Pw.bind(t,n)})};var Ct={};co(Ct,{anyString:()=>na,base64:()=>Ks,base64url:()=>Ws,bigint:()=>oa,boolean:()=>ia,browserEmail:()=>pv,cidrv4:()=>Us,cidrv6:()=>Bs,creditCard:()=>Io,cuid:()=>As,cuid2:()=>Ps,currencyCode:()=>Ys,date:()=>Xs,datetime:()=>ta,domain:()=>Gs,duration:()=>qs,e164:()=>Qs,email:()=>Ls,emoji:()=>Ms,extendedDuration:()=>iv,guid:()=>Vs,hex:()=>ua,hostname:()=>Hs,html5Email:()=>lv,httpProtocol:()=>Xn,iban:()=>Co,idnEmail:()=>dv,integer:()=>er,ipv4:()=>Fs,ipv6:()=>Zs,ksuid:()=>Ns,lowercase:()=>ca,mac:()=>Js,md5_base64:()=>hv,md5_base64url:()=>yv,md5_hex:()=>gv,nanoid:()=>zs,nanoidOfLength:()=>Ds,null:()=>sa,number:()=>Jt,rfc5322Email:()=>uv,sha1_base64:()=>wv,sha1_base64url:()=>vv,sha1_hex:()=>bv,sha256_base64:()=>kv,sha256_base64url:()=>Sv,sha256_hex:()=>xv,sha384_base64:()=>Cv,sha384_base64url:()=>Ev,sha384_hex:()=>Iv,sha512_base64:()=>jv,sha512_base64url:()=>_v,sha512_hex:()=>Ov,string:()=>ra,time:()=>ea,ulid:()=>Ts,undefined:()=>aa,unicodeEmail:()=>jd,uppercase:()=>la,uuid:()=>Zt,uuid4:()=>sv,uuid6:()=>av,uuid7:()=>cv,xid:()=>$s});var ll={};co(ll,{ZodAny:()=>ig,ZodArray:()=>ug,ZodBase64:()=>Yc,ZodBase64URL:()=>Xc,ZodBigInt:()=>ol,ZodBigIntFormat:()=>il,ZodBoolean:()=>rl,ZodCIDRv4:()=>Gc,ZodCIDRv6:()=>Qc,ZodCUID:()=>Zc,ZodCUID2:()=>Jc,ZodCatch:()=>Rg,ZodCodec:()=>hi,ZodCreditCard:()=>Xm,ZodCustom:()=>yi,ZodCustomStringFormat:()=>wn,ZodDate:()=>lg,ZodDefault:()=>Ig,ZodDiscriminatedUnion:()=>pg,ZodE164:()=>el,ZodEmail:()=>Vc,ZodEmoji:()=>Mc,ZodEnum:()=>yr,ZodExactOptional:()=>al,ZodFile:()=>vg,ZodFunction:()=>Lg,ZodGUID:()=>Lc,ZodIBAN:()=>eg,ZodIPv4:()=>Wc,ZodIPv6:()=>Hc,ZodISODate:()=>hn,ZodISODateTime:()=>gn,ZodISODuration:()=>bn,ZodISOTime:()=>yn,ZodInstanceOf:()=>Zg,ZodIntersection:()=>fg,ZodJWT:()=>tl,ZodKSUID:()=>Kc,ZodLazy:()=>Dg,ZodLiteral:()=>wg,ZodMAC:()=>Ym,ZodMap:()=>yg,ZodNaN:()=>Pg,ZodNanoID:()=>Fc,ZodNever:()=>ag,ZodNonOptional:()=>cl,ZodNull:()=>rg,ZodNullable:()=>Sg,ZodNumber:()=>nl,ZodNumberFormat:()=>vn,ZodObject:()=>pi,ZodOptional:()=>mi,ZodPipe:()=>gi,ZodPrefault:()=>Eg,ZodPreprocess:()=>Tg,ZodPromise:()=>Vg,ZodReadonly:()=>$g,ZodRecord:()=>hr,ZodSet:()=>bg,ZodString:()=>qc,ZodStringFormat:()=>ce,ZodSuccess:()=>_g,ZodSymbol:()=>tg,ZodTemplateLiteral:()=>zg,ZodTransform:()=>xg,ZodTuple:()=>gg,ZodType:()=>K,ZodULID:()=>Uc,ZodURL:()=>di,ZodUUID:()=>wt,ZodUndefined:()=>ng,ZodUnion:()=>fi,ZodUnknown:()=>sg,ZodVoid:()=>cg,ZodXID:()=>Bc,ZodXor:()=>dg,_ZodString:()=>Dc,_default:()=>Cg,_function:()=>wk,any:()=>ek,array:()=>R,base64:()=>$x,base64url:()=>Nx,bigint:()=>Hx,boolean:()=>ye,catch:()=>Ag,check:()=>vk,cidrv4:()=>Px,cidrv6:()=>Tx,codec:()=>gk,creditCard:()=>Dx,cuid:()=>Ix,cuid2:()=>Cx,currencyCode:()=>Zx,custom:()=>xk,date:()=>nk,describe:()=>kk,discriminatedUnion:()=>rt,e164:()=>zx,email:()=>mx,emoji:()=>kx,enum:()=>F,exactOptional:()=>kg,file:()=>dk,float32:()=>Ux,float64:()=>Bx,function:()=>wk,guid:()=>gx,hash:()=>Jx,hex:()=>Fx,hostname:()=>Mx,httpUrl:()=>xx,iban:()=>qx,instanceof:()=>Ik,int:()=>ke,int32:()=>Kx,int64:()=>Gx,intersection:()=>mg,invertCodec:()=>hk,ipv4:()=>_x,ipv6:()=>Ax,json:()=>Ae,jwt:()=>Vx,keyof:()=>rk,ksuid:()=>jx,lazy:()=>qg,literal:()=>w,looseObject:()=>ok,looseRecord:()=>ak,mac:()=>Rx,map:()=>ck,meta:()=>Sk,nan:()=>mk,nanoid:()=>Sx,nativeEnum:()=>uk,never:()=>nt,nonoptional:()=>jg,null:()=>og,nullable:()=>ui,nullish:()=>pk,number:()=>U,object:()=>E,optional:()=>li,partialRecord:()=>sk,pipe:()=>zc,prefault:()=>Og,preprocess:()=>Jg,promise:()=>bk,readonly:()=>Ng,record:()=>oe,refine:()=>Mg,set:()=>lk,strictObject:()=>x,string:()=>_,stringFormat:()=>Lx,stringbool:()=>Ck,success:()=>fk,superRefine:()=>Fg,symbol:()=>Yx,templateLiteral:()=>yk,transform:()=>sl,tuple:()=>hg,uint32:()=>Wx,uint64:()=>Qx,ulid:()=>Ex,undefined:()=>Xx,union:()=>Y,unknown:()=>lt,url:()=>vx,uuid:()=>hx,uuidv4:()=>yx,uuidv6:()=>bx,uuidv7:()=>wx,void:()=>tk,xid:()=>Ox,xor:()=>ik});var ai={};co(ai,{endsWith:()=>Qo,gt:()=>Ot,gte:()=>tt,includes:()=>Ho,length:()=>cr,lowercase:()=>Ko,lt:()=>Et,lte:()=>et,maxLength:()=>ar,maxSize:()=>un,mime:()=>Xo,minLength:()=>Ut,minSize:()=>jt,multipleOf:()=>ln,negative:()=>lm,nonnegative:()=>dm,nonpositive:()=>um,normalize:()=>ei,overwrite:()=>bt,positive:()=>cm,properties:()=>Yo,property:()=>pm,regex:()=>Bo,size:()=>sr,slugify:()=>oi,startsWith:()=>Go,toLowerCase:()=>ni,toUpperCase:()=>ri,trim:()=>ti,uppercase:()=>Wo});var br={};co(br,{ZodISODate:()=>hn,ZodISODateTime:()=>gn,ZodISODuration:()=>bn,ZodISOTime:()=>yn,date:()=>Ok,datetime:()=>Ek,duration:()=>_k,time:()=>jk});var Zu="0.1.0-beta.81";var ms=["en","zh-CN","zh-TW","ja","ko","ru","fr"],Ju="en";var fs=new Map(ms.map((e)=>[e.toLowerCase(),e])),$w=new Set(["hk","mo","tw"]);function Uu(e){return typeof e=="string"&&fs.get(e.toLowerCase())==e}function lo(e,t="en"){for(let n of e){let r=n==null?void 0:Nw(n);if(r!=null)return r}return t}function Nw(e){let t=e.trim().toLowerCase();if(t.length==0)return;let n=fs.get(t);if(n!=null)return n;let r=t.split("-");if(r[0]=="zh"){if(r.includes("hant"))return"zh-TW";if(r.includes("hans"))return"zh-CN";return r.some((o)=>$w.has(o))?"zh-TW":"zh-CN"}return fs.get(r[0])}function Bu(e){return{en:"Imported workflow","zh-CN":"\u5BFC\u5165\u7684\u5DE5\u4F5C\u6D41","zh-TW":"\u532F\u5165\u7684\u5DE5\u4F5C\u6D41",ja:"\u30A4\u30F3\u30DD\u30FC\u30C8\u3057\u305F\u30EF\u30FC\u30AF\u30D5\u30ED\u30FC",ko:"\uAC00\uC838\uC628 \uC6CC\uD06C\uD50C\uB85C",fr:"Workflow import\xE9",ru:"\u0418\u043C\u043F\u043E\u0440\u0442\u0438\u0440\u043E\u0432\u0430\u043D\u043D\u044B\u0439 \u043F\u0440\u043E\u0446\u0435\u0441\u0441"}[e]}import{spawn as wE}from"child_process";import{readFile as vE}from"fs/promises";import{setTimeout as xE}from"timers/promises";var on="open-flow-engine/v10";var rn=(e)=>`export const engineContract = ${JSON.stringify(e)}
3
3
  export function identity(value) { return value }
4
4
  `,uo={workflowTools:!0,httpRequests:!0,waitAutoContinue:!0,webhookResponses:!0,platformExports:new Set(["engineContract","identity"]),platformModule:"open-flow:platform",platformSource:rn("open-flow-engine/v8")},po={...uo,builtinModules:new Set(["assert","assert/strict","buffer","console","constants","crypto","events","fs","fs/promises","os","path","path/posix","process","punycode","querystring","stream","stream/promises","stream/web","string_decoder","timers","timers/promises","url","util","zlib"].flatMap((e)=>[e,`node:${e}`])),platformSource:rn("open-flow-engine/v8/nodejs-compat-v1")},Ku={...po,codeFetch:!0,platformSource:rn("open-flow-engine/v9")},zw={...Ku,flowState:!0,platformSource:rn("open-flow-engine/v10")};function Wu(e){if(e=="open-flow-engine/v10")return zw;if(e=="open-flow-engine/v9")return Ku;if(e=="open-flow-engine/v8")return uo;if(e=="open-flow-engine/v8/nodejs-compat-v1")return po;if(e=="open-flow-engine/v7"||e=="open-flow-engine/v7/nodejs-compat-v1")return{...e.endsWith("/nodejs-compat-v1")?po:uo,workflowTools:!1,httpRequests:!1,platformSource:rn(e)};if(e=="open-flow-engine/v6"||e=="open-flow-engine/v6/nodejs-compat-v1")return{...e=="open-flow-engine/v6"?uo:po,workflowTools:!1,httpRequests:!1,waitAutoContinue:!1,webhookResponses:!1,platformSource:rn(e)};return}function Bn(e){let t=Object.values(e).filter((r)=>typeof r==="number");return Object.entries(e).filter(([r,o])=>t.indexOf(+r)===-1).map(([r,o])=>o)}function hs(e,t="|"){return e.map((n)=>vs(n)).join(t)}function Kn(e,t){if(typeof t==="bigint")return t.toString();return t}class Gu{constructor(e){this._getter=e,this._value=void 0}get value(){let e=this._getter;if(e!==void 0)this._value=e(),this._getter=void 0;return this._value}}function Wn(e){return new Gu(e)}function ys(e){return e===null||e===void 0}function It(e){let t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}function Qu(e,t){let n=e/t,r=Math.round(n),o=4*Number.EPSILON*Math.max(Math.abs(n),1);if(Math.abs(n-r)<o)return 0;return n-r}var Hu=Symbol("evaluating");function Yu(e,t,n){let r=void 0;Object.defineProperty(e,t,{get(){if(r===Hu)return;if(r===void 0)r=Hu,r=n();return r},set(o){Object.defineProperty(e,t,{value:o})},configurable:!0})}function _e(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function Hn(e){let t=Object.getOwnPropertyDescriptor(e,"shape");return t?.get?t.get.raw:t?.value}function gt(e){return Hn(e._zod.def)??e._zod.def.shape}function Xu(e,t,n){Object.defineProperty(e,t,{get(){let r=n();return _e(this,t,r),r},enumerable:!0,configurable:!0})}function ed(e,t,n){if(t in e)_e(e,t,n);else e[t]=n}function Mt(e,t,n,r){let o=gt(t);for(let i of n){let s=Object.getOwnPropertyDescriptor(o,i);if(!s.enumerable)continue;if(s.get)Xu(e,i,()=>{let a=t._zod.def.shape[i];return r?r(a,i):a});else ed(e,i,r?r(s.value,i):s.value)}}function Dw(e,t){for(let n of Reflect.ownKeys(t)){let r=Object.getOwnPropertyDescriptor(t,n);if(!r.enumerable)continue;if(r.get)Xu(e,n,()=>t[n]);else ed(e,n,r.value)}}function Je(...e){let t={};for(let n of e){let r=Object.getOwnPropertyDescriptors(n);Object.assign(t,r)}return Object.defineProperties({},t)}function td(e){return JSON.stringify(e)}function nd(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}var bs="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function sn(e){return typeof e==="object"&&e!==null&&!Array.isArray(e)}var rd=Wn(()=>{if(je.jitless)return!1;if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{return new Function(""),!0}catch(e){return!1}});function yt(e){if(sn(e)===!1)return!1;let t=e.constructor;if(t===void 0)return!0;if(typeof t!=="function")return!0;let n=t.prototype;if(sn(n)===!1)return!1;if(Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)return!1;return!0}function ws(e){if(yt(e))return{...e};if(Array.isArray(e))return[...e];if(e instanceof Map)return new Map(e);if(e instanceof Set)return new Set(e);return e}var fo=new Set(["string","number","symbol"]),od=new Set(["string","number","bigint","boolean","symbol","undefined"]);function Xe(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function at(e,t,n){let r=new e._zod.constr(t??e._zod.def);if(!t||n?.parent)r._zod.parent=e;return r}function O(e){let t=e;if(!t)return{};if(typeof t==="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");t.error=t.message}if(delete t.message,typeof t.error==="string")return{...t,error:()=>t.error};return t}function vs(e){if(typeof e==="bigint")return e.toString()+"n";if(typeof e==="string")return`"${e}"`;return`${e}`}function id(e){return Object.keys(e).filter((t)=>e[t]._zod.optin!==void 0&&e[t]._zod.optout==="optional")}var mo=(()=>({safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-340282346638528860000000000000000000000,340282346638528860000000000000000000000],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]}))(),go={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function qw(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(".pick() cannot be used on object schemas containing refinements");let i={};return Mt(i,e,ho(e,t)),at(e,Je(n,{shape:i,checks:[]}))}function ho(e,t){let n=gt(e),r=[];for(let o of Reflect.ownKeys(t)){if(!Object.getOwnPropertyDescriptor(n,o)?.enumerable)throw Error(`Unrecognized key: "${String(o)}"`);if(t[o])r.push(o)}return r}function Vw(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(".omit() cannot be used on object schemas containing refinements");let i=new Set(ho(e,t)),s={};return Mt(s,e,Reflect.ownKeys(gt(e)).filter((a)=>!i.has(a))),at(e,Je(n,{shape:s,checks:[]}))}function Lw(e,t){if(!yt(t))throw Error("Invalid input to extend: expected a plain object");let n=e._zod.def.checks;if(n&&n.length>0){let o=gt(e);for(let i of Reflect.ownKeys(t))if(Object.getOwnPropertyDescriptor(o,i)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return at(e,Je(e._zod.def,{shape:sd(e,t)}))}function sd(e,t){let n={};return Mt(n,e,Reflect.ownKeys(gt(e))),Dw(n,t),n}function Mw(e,t){if(!yt(t))throw Error("Invalid input to safeExtend: expected a plain object");return at(e,Je(e._zod.def,{shape:sd(e,t)}))}function Fw(e,t){if(!t?._zod?.def)throw Error("Invalid input to merge: expected an object schema. To merge a plain shape, use `.extend()`.");if(e._zod.def.checks?.length)throw Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");let n={};Mt(n,e,Reflect.ownKeys(gt(e))),Mt(n,t,Reflect.ownKeys(gt(t)));let r=Je(e._zod.def,{shape:n,get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]});return at(e,r)}function ad(e,t,n,r="partial"){let i=t._zod.def.checks;if(i&&i.length>0)throw Error(`.${r}() cannot be used on object schemas containing refinements`);let a=n?new Set(ho(t,n)):void 0,c={};return Mt(c,t,Reflect.ownKeys(gt(t)),e&&((l,u)=>a&&!a.has(u)?l:new e({type:"optional",innerType:l}))),at(t,Je(t._zod.def,{shape:c,checks:[]}))}function Zw(e,t,n){let r=n?new Set(ho(t,n)):void 0,o={};return Mt(o,t,Reflect.ownKeys(gt(t)),(i,s)=>r&&!r.has(s)?i:new e({type:"nonoptional",innerType:i})),at(t,Je(t._zod.def,{shape:o}))}function Ve(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function cd(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue===!1)return!0;return!1}function Ue(e,t){return t.map((n)=>{var r;return(r=n).path??(r.path=[]),n.path.unshift(e),n})}function Un(e){return typeof e==="string"?e:e?.message}function xs(e,t,n){var r;for(let o=t;o<e.length;o++)(r=e[o]).schema??(r.schema=n)}function Be(e,t,n){var r;let o=e.inst?._zod?.traits;if(o?.has("$ZodType"))if(o.has("$ZodCheck"))(r=e).schema??(r.schema=e.inst);else e.schema=e.inst;let i=e.schema!==e.inst?e.schema?._zod.def?.error:void 0,s=e.message?e.message:Un(e.inst?._zod.def?.error?.(e))??Un(i?.(e))??Un(t?.error?.(e))??Un(n.customError?.(e))??Un(n.localeError?.(e))??"Invalid input",a={};for(let c of Object.keys(e)){if(c==="inst"||c==="schema"||c==="continue"||c==="input"||c==="__proto__")continue;a[c]=e[c]}if(a.path??(a.path=[]),a.message=s,t?.reportInput)a.input=e.input;return a}function yo(e){if(e instanceof Set)return"set";if(e instanceof Map)return"map";if(e instanceof File)return"file";return"unknown"}var Jw=/[\uD800-\uDBFF]/;function bo(e){let t=e.length;if(!Jw.test(e))return t;let n=t;for(let r=0;r<t-1;r++)if((e.charCodeAt(r)&64512)===55296&&(e.charCodeAt(r+1)&64512)===56320)n--,r++;return n}function wo(e){if(Array.isArray(e))return"array";if(typeof e==="string")return"string";return"unknown"}function ld(e){let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"nan":"number";case"object":{if(e===null)return"null";if(Array.isArray(e))return"array";let n=e;if(n&&Object.getPrototypeOf(n)!==Object.prototype&&"constructor"in n&&n.constructor)return n.constructor.name}}return t}function Ft(...e){let[t,n,r]=e;if(typeof t==="string")return{message:t,code:"custom",input:n,inst:r};return{...t}}function ud(e,t){for(let n in t){let r=Object.getOwnPropertyDescriptor(t,n);if(r.get)Object.defineProperty(e,n,{...r,enumerable:!1});else Uw(e,n,r.value)}}function ht(e,t,n,r=!0){return Object.defineProperty(e,t,{configurable:!0,writable:!0,enumerable:r,value:n}),n}function Gn(e,t,n){return ht(e,t,n,!1)}function vo(e,t){for(let n in e){let r=e[n];Object.defineProperty(t,n,{configurable:!0,enumerable:!0,get(){return ht(this,n,r(this))},set(o){ht(this,n,o)}})}return t}function Uw(e,t,n){Object.defineProperty(e,t,{configurable:!0,get(){return this==null?n:ht(this,t,n.bind(this))},set(r){ht(this,t,r)}})}function Bw(e,t){let n=Object.getPrototypeOf(e);return t in n?void 0:n}var gs,St=!1,Kw={configurable:!0,get(){St=!0;return}};function H(e,t,n){let r=Object.getPrototypeOf(e._zod);if(t in r&&gs!==e._zod){gs=void 0;return}gs=e._zod,Object.defineProperty(r,t,{configurable:!0,get(){Object.defineProperty(this,t,Kw);let o=St;St=!1;try{let i=n(this);if(St)delete this[t];else Object.defineProperty(this,t,{configurable:!0,writable:!0,value:i});return St=St||o,i}catch(i){throw delete this[t],St=St||o,i}},set(o){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:o})}})}function Ww(e,t,n,r){let o=Bw(e,t);if(!o)return;Object.defineProperty(o,t,{configurable:!0,get(){let i={configurable:!0,writable:!0,enumerable:r,value:void 0};return Object.defineProperty(this,t,i),i.value=n(this),Object.defineProperty(this,t,i),i.value},set(i){Object.defineProperty(this,t,{configurable:!0,writable:!0,enumerable:r,value:i})}})}var Hw="~constantCatch";function dd(e){let t=()=>e;return t[Hw]=!0,t}var pd;var ks={value:void 0,enumerable:!1},fd="captureStackTrace"in Error?Error:null;function Gw(e){let t=fd;if(t){let n=t.stackTraceLimit;if(typeof n==="number"){try{t.stackTraceLimit=0}catch{return fd=null,new e}try{return new e}finally{t.stackTraceLimit=n}}}return new e}function m(e,t,n,r){let o={};function i(h){this.def=h,this.constr=d,this.traits=new Set}i.prototype=o;let s=n,a=s&&new WeakSet;function c(h,g){if(!h._zod){ks.value=new i(g);try{Object.defineProperty(h,"_zod",ks)}finally{ks.value=void 0}}else if(h._zod.traits.has(e))return;if(h._zod.traits.add(e),t(h,g),a){let S=Object.getPrototypeOf(h),A=h._zod.constr.prototype,N=S;while(N&&N!==A)N=Object.getPrototypeOf(N);let M=N??S;if(!a.has(M))a.add(M),ud(M,s)}let y=d.prototype;for(let S in y){if(!Object.prototype.hasOwnProperty.call(y,S))continue;if(!(S in h))h[S]=y[S].bind(h)}}let l=r?.Parent??Object;class u extends l{}Object.defineProperty(u,"name",{value:e});function d(h){let g=r?.Parent?Gw(u):this;c(g,h);let y=g._zod.deferred;if(y){for(let A of y)A();g._zod.deferred=void 0}let S=globalThis.__zod_globalConfig?.postProcessor;if(S)S(g);return g}return Object.defineProperty(d,"init",{value:c}),Object.defineProperty(d,Symbol.hasInstance,{value:(h)=>{if(r?.Parent&&h instanceof r.Parent)return!0;return h?._zod?.traits?.has(e)}}),Object.defineProperty(d,"name",{value:e}),d}class ct extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class an extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`);this.name="ZodEncodeError"}}(pd=globalThis).__zod_globalConfig??(pd.__zod_globalConfig={});var je=globalThis.__zod_globalConfig;function Re(e){if(e)Object.assign(je,e);return je}function Qw(){let e=this._zod;return e.message??(e.message=JSON.stringify(e.def,Kn,2)),e.message}function Yw(e){this._zod.message=e}var Xw={get:Qw,set:Yw,enumerable:!0,configurable:!0},Is={value:void 0,enumerable:!1},md=new WeakSet([Object.prototype,Error.prototype]),gd=(e,t)=>{e.name="$ZodError",Is.value=t,Object.defineProperty(e,"issues",Is),Is.value=void 0,Object.defineProperty(e,"message",Xw);let n=Object.getPrototypeOf(e);if(!md.has(n))md.add(n),Object.defineProperty(n,"toString",{configurable:!0,enumerable:!1,get(){let r=()=>this.message;return Object.defineProperty(this,"toString",{value:r,configurable:!0,writable:!0}),r},set(r){Object.defineProperty(this,"toString",{value:r,configurable:!0,writable:!0})}})},hd=m("$ZodError",gd),Cs=m("$ZodError",gd,void 0,{Parent:Error});function ev(e,t,n){if(!Object.prototype.hasOwnProperty.call(e,t))if(t==="__proto__")Object.defineProperty(e,t,{value:n(),writable:!0,enumerable:!0,configurable:!0});else e[t]=n();return e[t]}function yd(e,t=(n)=>n.message){let n={},r=[];for(let o of e.issues)if(o.path.length>0)ev(n,o.path[0],()=>[]).push(t(o));else r.push(t(o));return{formErrors:r,fieldErrors:n}}function bd(e,t=(n)=>n.message){let n={_errors:[]},r=(o,i=[])=>{for(let s of o.issues)if(s.code==="invalid_union"&&s.errors.length)s.errors.map((a)=>r({issues:a},[...i,...s.path]));else if(s.code==="invalid_key")r({issues:s.issues},[...i,...s.path]);else if(s.code==="invalid_element")r({issues:s.issues},[...i,...s.path]);else{let a=[...i,...s.path];if(a.length===0)n._errors.push(t(s));else{let c=n,l=0;while(l<a.length){let u=a[l],d=l===a.length-1;if(u==="_errors"){if(d)c._errors.push(t(s));l++;continue}if(!Object.prototype.hasOwnProperty.call(c,u))Object.defineProperty(c,u,{value:{_errors:[]},enumerable:!0,writable:!0,configurable:!0});let h=c[u];if(d)h._errors.push(t(s));c=h,l++}}}};return r(e),n}function xo(e,t){return{callee:t?.callee??e,Err:t?.Err}}var Qn=(e)=>{let t=(n,r,o,i)=>{let s=o?{...o,async:!1}:{async:!1},a=n._zod.run({value:r,issues:[]},s);if(a instanceof Promise)throw new ct;if(a.issues.length){let c=new(i?.Err??e)(a.issues.map((l)=>Be(l,s,Re())));throw bs(c,i?.callee??t),c}return a.value};return t},Es=Qn(Cs),Yn=(e)=>{let t=async(n,r,o,i)=>{let s=o?{...o,async:!0}:{async:!0},a=n._zod.run({value:r,issues:[]},s);if(a instanceof Promise)a=await a;if(a.issues.length){let c=new(i?.Err??e)(a.issues.map((l)=>Be(l,s,Re())));throw bs(c,i?.callee??t),c}return a.value};return t},Os=Yn(Cs),ko=(e)=>(t,n,r)=>{let o=r?{...r,async:!1}:{async:!1},i=t._zod.run({value:n,issues:[]},o);if(i instanceof Promise)throw new ct;return i.issues.length?wd(e,i.issues,o):{success:!0,data:i.value}};function wd(e,t,n){let r;return{success:!1,get error(){if(!r)r=new e(t.map((o)=>Be(o,n,Re()))),t=void 0,n=void 0;return r},set error(o){r=o,t=void 0,n=void 0}}}var So=(e)=>async(t,n,r)=>{let o=r?{...r,async:!0}:{async:!0},i=t._zod.run({value:n,issues:[]},o);if(i instanceof Promise)i=await i;return i.issues.length?wd(e,i.issues,o):{success:!0,data:i.value}};var nv=Symbol.for("zod.compile.invalid"),rv=Symbol.for("zod.compile.fallback"),js=(e,t,n)=>{let r=e._zod.bag.validator;if(r!==void 0){if(r(t)!==nv)return!0;if(r.definite===!0&&n===void 0)return!1}return ov(e,t,n)};function ov(e,t,n){let r=n?{...n,async:!1,abortEarly:!0}:{async:!1,abortEarly:!0},o=e._zod.bag.fallbackRun,i;if(o)r[rv]=!0,i=o({value:t,issues:[]},r);else i=e._zod.run({value:t,issues:[]},r);if(i instanceof Promise)throw new ct;return i.issues.length===0}var _s=async(e,t,n)=>{let r=n?{...n,async:!0,abortEarly:!0}:{async:!0,abortEarly:!0},o=e._zod.run({value:t,issues:[]},r);if(o instanceof Promise)o=await o;return o.issues.length===0},vd=(e)=>{let t=Qn(e),n=(r,o,i,s)=>{let a=i?{...i,direction:"backward"}:{direction:"backward"};return t(r,o,a,xo(n,s))};return n};var xd=(e)=>{let t=Qn(e),n=(r,o,i,s)=>t(r,o,i,xo(n,s));return n};var kd=(e)=>{let t=Yn(e),n=async(r,o,i,s)=>{let a=i?{...i,direction:"backward"}:{direction:"backward"};return await t(r,o,a,xo(n,s))};return n};var Sd=(e)=>{let t=Yn(e),n=async(r,o,i,s)=>await t(r,o,i,xo(n,s));return n};var Id=(e)=>(t,n,r)=>{let o=r?{...r,direction:"backward"}:{direction:"backward"};return ko(e)(t,n,o)};var Cd=(e)=>(t,n,r)=>ko(e)(t,n,r);var Ed=(e)=>async(t,n,r)=>{let o=r?{...r,direction:"backward"}:{direction:"backward"};return So(e)(t,n,o)};var Od=(e)=>async(t,n,r)=>So(e)(t,n,r);var As=/^[cC][0-9a-z]{6,}$/,Ps=/^[0-9a-z]+$/,Ts=/^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/,$s=/^[0-9a-vA-V]{20}$/,Ns=/^[A-Za-z0-9]{27}$/,zs=/^[a-zA-Z0-9_-]{21}$/;function Ds(e){return new RegExp(`^[a-zA-Z0-9_-]{${e}}$`)}var qs=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,iv=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,Vs=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,Zt=(e)=>{if(!e)return/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/;return new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`)},sv=Zt(4),av=Zt(6),cv=Zt(7),Ls=/^(?:[A-Za-z0-9_'+\-]+\.)*[A-Za-z0-9_'+\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,lv=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,uv=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,jd=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,dv=jd,pv=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,fv="^(?=[\\s\\S]*[\\p{Extended_Pictographic}\\p{Regional_Indicator}\\u20E3])[\\p{Extended_Pictographic}\\p{Emoji_Component}]+$";function Ms(){return new RegExp(fv,"u")}var Fs=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Zs=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,Js=(e)=>{let t=Xe(e??":");return new RegExp(`^(?:[0-9A-F]{2}${t}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${t}){5}[0-9a-f]{2}$`)},Us=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,Bs=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Ks=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Ws=/^(?:[A-Za-z0-9_-]{4})*(?:[A-Za-z0-9_-]{2,3})?$/,Hs=/^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/,Gs=/^(?=.{1,253}$)([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,63}$/,Xn=/^https?$/,Qs=/^\+[1-9]\d{6,14}$/,Io=/^\d(?:[ -]?\d){11,18}$/,Ys=/^(?:AED|AFN|ALL|AMD|AOA|ARS|AUD|AWG|AZN|BAM|BBD|BDT|BHD|BIF|BMD|BND|BOB|BOV|BRL|BSD|BTN|BWP|BYN|BZD|CAD|CDF|CHE|CHF|CHW|CLF|CLP|CNY|COP|COU|CRC|CUP|CVE|CZK|DJF|DKK|DOP|DZD|EGP|ERN|ETB|EUR|FJD|FKP|GBP|GEL|GHS|GIP|GMD|GNF|GTQ|GYD|HKD|HNL|HTG|HUF|IDR|ILS|INR|IQD|IRR|ISK|JMD|JOD|JPY|KES|KGS|KHR|KMF|KPW|KRW|KWD|KYD|KZT|LAK|LBP|LKR|LRD|LSL|LYD|MAD|MDL|MGA|MKD|MMK|MNT|MOP|MRU|MUR|MVR|MWK|MXN|MXV|MYR|MZN|NAD|NGN|NIO|NOK|NPR|NZD|OMR|PAB|PEN|PGK|PHP|PKR|PLN|PYG|QAR|RON|RSD|RUB|RWF|SAR|SBD|SCR|SDG|SEK|SGD|SHP|SLE|SOS|SRD|SSP|STN|SVC|SYP|SZL|THB|TJS|TMT|TND|TOP|TRY|TTD|TWD|TZS|UAH|UGX|USD|USN|UYI|UYU|UYW|UZS|VED|VES|VND|VUV|WST|XAD|XAF|XAG|XAU|XBA|XBB|XBC|XBD|XCD|XCG|XDR|XOF|XPD|XPF|XPT|XSU|XTS|XUA|XXX|YER|ZAR|ZMW|ZWG)$/,Co=/^[A-Z]{2}(?!00|01|99)\d{2}[A-Z0-9]{11,30}$/,_d="(?:(?:\\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])))";function mv(e){return new RegExp(`^${e}$`)}var Xs=mv(_d);function Rs(e){return typeof e.precision==="number"?e.precision===-1?"(?:[01]\\d|2[0-3]):[0-5]\\d":e.precision===0?"(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d":`(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d\\.\\d{${e.precision}}`:e.seconds?"(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?":"(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?"}function ea(e){return new RegExp(`^${Rs(e)}$`)}function ta(e){let t=["Z"];if(e.offset)t.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");let n=`${Rs({precision:e.precision,seconds:!0})}(?:${t.join("|")})`,r=e.local?`${n}|${Rs({precision:e.precision})}`:n;return new RegExp(`^${_d}T(?:${r})$`)}var na=/^[\s\S]{0,}$/,ra=(e)=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},oa=/^-?\d+n?$/,er=/^-?\d+$/,Jt=/^-?\d+(?:\.\d+)?$/,ia=/^(?:true|false)$/i,sa=/^null$/i;var aa=/^undefined$/i;var ca=/^[^A-Z]*$/,la=/^[^a-z]*$/,ua=/^[0-9a-fA-F]*$/;function tr(e,t){return new RegExp(`^[A-Za-z0-9+/]{${e}}${t}$`)}function nr(e){return new RegExp(`^[A-Za-z0-9_-]{${e}}$`)}var gv=/^[0-9a-fA-F]{32}$/,hv=tr(22,"=="),yv=nr(22),bv=/^[0-9a-fA-F]{40}$/,wv=tr(27,"="),vv=nr(27),xv=/^[0-9a-fA-F]{64}$/,kv=tr(43,"="),Sv=nr(43),Iv=/^[0-9a-fA-F]{96}$/,Cv=tr(64,""),Ev=nr(64),Ov=/^[0-9a-fA-F]{128}$/,jv=tr(86,"=="),_v=nr(86);var ue=m("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),da=(e)=>{let t=e.value;return!ys(t)&&t.size!==void 0},pa=(e)=>{let t=e.value;return!ys(t)&&t.length!==void 0},Eo={number:"number",bigint:"bigint",object:"date"},fa=m("$ZodCheckLessThan",(e,t)=>{ue.init(e,t);let n=Eo[typeof t.value];e._zod.check=(r)=>{if(t.inclusive?r.value<=t.value:r.value<t.value)return;r.issues.push({origin:Eo[typeof r.value]??n,code:"too_big",maximum:typeof t.value==="object"?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),ma=m("$ZodCheckGreaterThan",(e,t)=>{ue.init(e,t);let n=Eo[typeof t.value];e._zod.check=(r)=>{if(t.inclusive?r.value>=t.value:r.value>t.value)return;r.issues.push({origin:Eo[typeof r.value]??n,code:"too_small",minimum:typeof t.value==="object"?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Rd=m("$ZodCheckMultipleOf",(e,t)=>{ue.init(e,t),e._zod.check=(n)=>{if(typeof n.value!==typeof t.value)throw Error("Cannot mix number and bigint in multiple_of check.");if(typeof n.value==="bigint"?t.value!==BigInt(0)&&n.value%t.value===BigInt(0):Qu(n.value,t.value)===0)return;n.issues.push({origin:typeof n.value,code:"not_multiple_of",divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),Ad=m("$ZodCheckNumberFormat",(e,t)=>{ue.init(e,t),t.format=t.format||"float64";let n=t.format?.includes("int"),r=n?"int":"number",[o,i]=mo[t.format];e._zod.check=(s)=>{let a=s.value;if(n){if(!Number.isInteger(a)){s.issues.push({expected:r,format:t.format,code:"invalid_type",continue:!1,input:a,inst:e});return}if(!Number.isSafeInteger(a)){if(a>0)s.issues.push({input:a,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:r,inclusive:!0,continue:!t.abort});else s.issues.push({input:a,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:r,inclusive:!0,continue:!t.abort});return}}if(a<o)s.issues.push({origin:"number",input:a,code:"too_small",minimum:o,inclusive:!0,inst:e,continue:!t.abort});if(a>i)s.issues.push({origin:"number",input:a,code:"too_big",maximum:i,inclusive:!0,inst:e,continue:!t.abort})}}),Pd=m("$ZodCheckBigIntFormat",(e,t)=>{ue.init(e,t);let[n,r]=go[t.format];e._zod.check=(o)=>{let i=o.value;if(i<n)o.issues.push({origin:"bigint",input:i,code:"too_small",minimum:n,inclusive:!0,inst:e,continue:!t.abort});if(i>r)o.issues.push({origin:"bigint",input:i,code:"too_big",maximum:r,inclusive:!0,inst:e,continue:!t.abort})}}),Td=m("$ZodCheckMaxSize",(e,t)=>{var n;ue.init(e,t),(n=e._zod.def).when??(n.when=da),e._zod.check=(r)=>{let o=r.value;if(o.size<=t.maximum)return;r.issues.push({origin:yo(o),code:"too_big",maximum:t.maximum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),$d=m("$ZodCheckMinSize",(e,t)=>{var n;ue.init(e,t),(n=e._zod.def).when??(n.when=da),e._zod.check=(r)=>{let o=r.value;if(o.size>=t.minimum)return;r.issues.push({origin:yo(o),code:"too_small",minimum:t.minimum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),Nd=m("$ZodCheckSizeEquals",(e,t)=>{var n;ue.init(e,t),(n=e._zod.def).when??(n.when=da),e._zod.check=(r)=>{let o=r.value,i=o.size;if(i===t.size)return;let s=i>t.size;r.issues.push({origin:yo(o),...s?{code:"too_big",maximum:t.size}:{code:"too_small",minimum:t.size},inclusive:!0,exact:!0,input:r.value,inst:e,continue:!t.abort})}}),zd=m("$ZodCheckMaxLength",(e,t)=>{var n;ue.init(e,t),(n=e._zod.def).when??(n.when=pa),e._zod.check=(r)=>{let o=r.value,i=o.length;if((typeof o==="string"&&i>t.maximum?bo(o):i)<=t.maximum)return;let a=wo(o);r.issues.push({origin:a,code:"too_big",maximum:t.maximum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),Dd=m("$ZodCheckMinLength",(e,t)=>{var n;ue.init(e,t),(n=e._zod.def).when??(n.when=pa),e._zod.check=(r)=>{let o=r.value,i=o.length;if((typeof o==="string"&&i>=t.minimum&&i<t.minimum*2?bo(o):i)>=t.minimum)return;let a=wo(o);r.issues.push({origin:a,code:"too_small",minimum:t.minimum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),qd=m("$ZodCheckLengthEquals",(e,t)=>{var n;ue.init(e,t),(n=e._zod.def).when??(n.when=pa),e._zod.check=(r)=>{let o=r.value,i=o.length,s=typeof o==="string"&&i>=t.length&&i<=t.length*2?bo(o):i;if(s===t.length)return;let a=wo(o),c=s>t.length;r.issues.push({origin:a,...c?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:r.value,inst:e,continue:!t.abort})}}),rr=m("$ZodCheckStringFormat",(e,t)=>{var n,r;if(ue.init(e,t),t.pattern)(n=e._zod).check??(n.check=(o)=>{if(t.pattern.lastIndex=0,t.pattern.test(o.value))return;o.issues.push({origin:"string",code:"invalid_format",format:t.format,input:o.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})});else(r=e._zod).check??(r.check=()=>{})}),Vd=m("$ZodCheckRegex",(e,t)=>{rr.init(e,t),e._zod.check=(n)=>{if(t.pattern.lastIndex=0,t.pattern.test(n.value))return;n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),Ld=m("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=ca),rr.init(e,t)}),Md=m("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=la),rr.init(e,t)}),Fd=m("$ZodCheckIncludes",(e,t)=>{ue.init(e,t);let n=Xe(t.includes),r=new RegExp(typeof t.position==="number"?`^.{${t.position},}${n}`:n);t.pattern=r,e._zod.check=(o)=>{if(o.value.includes(t.includes,t.position))return;o.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:o.value,inst:e,continue:!t.abort})}}),Zd=m("$ZodCheckStartsWith",(e,t)=>{ue.init(e,t);let n=new RegExp(`^${Xe(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.check=(r)=>{if(r.value.startsWith(t.prefix))return;r.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:r.value,inst:e,continue:!t.abort})}}),Jd=m("$ZodCheckEndsWith",(e,t)=>{ue.init(e,t);let n=new RegExp(`.*${Xe(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.check=(r)=>{if(r.value.endsWith(t.suffix))return;r.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:r.value,inst:e,continue:!t.abort})}});function Oo(e,t,n){if(e.issues.length)t.issues.push(...Ue(n,e.issues))}var Ud=m("$ZodCheckProperty",(e,t)=>{ue.init(e,t),e._zod.check=(n)=>{let r=t.schema._zod.run({value:n.value[t.property],issues:[]},{});if(r instanceof Promise)return r.then((o)=>Oo(o,n,t.property));Oo(r,n,t.property);return}}),Bd=m("$ZodCheckProperties",(e,t)=>{ue.init(e,t),Gn(e,Symbol.iterator,function*(){yield e});let n;e._zod.check=(r)=>{if(r.value==null){r.issues.push({expected:"object",code:"invalid_type",input:r.value,inst:e});return}n??(n=Reflect.ownKeys(t.shape).map((s)=>[s,t.shape[s]]));let o=r.value,i;for(let[s,a]of n){let c=a._zod.run({value:o[s],issues:[]},{});if(c instanceof Promise)i??(i=[]),i.push(c.then((l)=>Oo(l,r,s)));else Oo(c,r,s)}if(i)return Promise.all(i).then(()=>{return});return}}),Kd=m("$ZodCheckMimeType",(e,t)=>{ue.init(e,t);let n=new Set(t.mime);e._zod.check=(r)=>{if(n.has(r.value.type))return;r.issues.push({code:"invalid_value",values:t.mime,input:r.value.type,inst:e,continue:!t.abort})}}),Wd=m("$ZodCheckOverwrite",(e,t)=>{ue.init(e,t),e._zod.check=(n)=>{n.value=t.tx(n.value)}});class ga{constructor(e=[],t={}){this.content=[],this.indent=0,this.args=e,this.closed=t}indented(e){this.indent+=1;try{e(this)}finally{this.indent-=1}}write(e){if(typeof e==="function"){e(this,{execution:"sync"}),e(this,{execution:"async"});return}let n=e.split(`
5
5
  `).filter((i)=>i),r=Math.min(...n.map((i)=>i.length-i.trimStart().length)),o=n.map((i)=>i.slice(r)).map((i)=>" ".repeat(this.indent*2)+i);for(let i of o)this.content.push(i)}compile(){let e=Function,t=this?.content??[""];return new e(...Object.keys(this.closed),`return function (${this.args.join(", ")}) {
@@ -61,7 +61,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
61
61
  `}function Yy(e){return e.replace(/(?:\.openflow)?\.json$/i,"")}var MI=rt("kind",[x({kind:w("admin-delegation")}),x({kind:w("policy"),ruleId:_().min(1).nullable()})]);function Bi(e){return MI.parse(e)}function tb(e){let t=v(e);if(!Array.isArray(t.bots))return p("Leina bots: expected an array.");let n=t.bots.map((r)=>{let o=v(r);if(!Array.isArray(o.platforms))return p("Leina platforms: expected an array.");return{leinaId:f(o.leinaId),name:f(o.name),status:f(o.status),platforms:o.platforms.map(f)}});if(new Set(n.map((r)=>r.leinaId)).size!=n.length)return p("Leina bots: duplicate identifiers.");return n}function FI(e){let t=v(e);if(L(t,["actionIds","allActions","triggerIds","allTriggers","configured","proxy"]),!Array.isArray(t.actionIds))return p("permissions.actionIds: expected an array.");if(!Array.isArray(t.triggerIds))return p("permissions.triggerIds: expected an array.");if(typeof t.allActions!="boolean")return p("permissions.allActions: expected a boolean.");if(typeof t.allTriggers!="boolean")return p("permissions.allTriggers: expected a boolean.");if(typeof t.configured!="boolean")return p("permissions.configured: expected a boolean.");if(typeof t.proxy!="boolean")return p("permissions.proxy: expected a boolean.");let n=t.actionIds.map(f),r=t.triggerIds.map(f);if(new Set(n).size!=n.length)return p("permissions.actionIds: duplicate IDs.");if(t.allActions&&n.length!=0)return p("permissions.actionIds: must be empty when allActions is true.");if(new Set(r).size!=r.length)return p("permissions.triggerIds: duplicate IDs.");if(t.allTriggers&&r.length!=0)return p("permissions.triggerIds: must be empty when allTriggers is true.");if(t.proxy&&(!t.allActions||!t.allTriggers||t.configured))return p("permissions.proxy: requires allActions=true, allTriggers=true and configured=false.");return{actionIds:n,triggerIds:r,allTriggers:t.allTriggers,allActions:t.allActions,configured:t.configured,proxy:t.proxy}}function nb(e,t){let n=v(e),{policyRevision:r,status:o,isDefault:i}=n,s=Object.hasOwn(n,"displayName")&&!Object.hasOwn(n,"connectionDisplayName"),a=t&&Object.hasOwn(n,"permissions")?FI(n.permissions):void 0,c=n.permissionGroupName;if(L(n,["accessBindingId","connectionId","source",s?"displayName":"connectionDisplayName","providerId",...t?[]:["status"]]),r!==void 0&&typeof r!="string")return p("policyRevision: expected a string.");if(t&&i!==void 0&&typeof i!="boolean")return p("isDefault: expected a boolean.");if(c!==void 0&&c!==null&&typeof c!="string")return p("permissionGroupName: expected a string or null.");if(!t&&o!="active"&&o!="forbidden"&&o!="invalid"&&o!="missing")return p();let l;try{l=Bi(n.source)}catch{return p("source: expected { kind: 'admin-delegation' } or { kind: 'policy', ruleId: string | null }.")}return{accessBindingId:f(n.accessBindingId),connectionId:f(n.connectionId),source:l,connectionDisplayName:f(s?n.displayName:n.connectionDisplayName),...t&&typeof i=="boolean"?{isDefault:i}:{},...a==null?{}:{permissions:a},...c===void 0?{}:{permissionGroupName:c},...r==null?{}:{policyRevision:r},providerId:f(n.providerId),...t?{}:{status:o}}}function uu(e){if(e!="implicit"&&e!="selectable")return p("mode: expected implicit or selectable.");return e}function Tn(e){let t=v(e);L(t,["accessRevision","bindings","mode","sharedAccessDigest","version"]);let n=ie(t.accessRevision);if(t.version!=1||n<0||!Array.isArray(t.bindings))return p();if("providerIds"in t&&!Array.isArray(t.providerIds))return p();let r=t.providerIds==null?void 0:t.providerIds.map((s)=>f(s));if(r!=null&&new Set(r).size!=r.length)return p();let o=t.discardedBindingCount==null?0:ie(t.discardedBindingCount);if(o<0)return p();let i=[];for(let s of t.bindings)try{i.push(nb(s,!1))}catch(a){if(!(a instanceof Te)||a.code!="response.invalid")throw a;if(s!=null&&typeof s=="object"&&!Array.isArray(s)&&typeof s.accessBindingId=="string"&&s.accessBindingId.length>0&&typeof s.providerId=="string"&&s.providerId.length>0)i.push({accessBindingId:s.accessBindingId,providerId:s.providerId,connectionId:null,source:null,status:"invalid",connectionDisplayName:typeof s.connectionDisplayName=="string"&&s.connectionDisplayName.length>0?s.connectionDisplayName:typeof s.displayName=="string"&&s.displayName.length>0?s.displayName:s.providerId,permissionGroupName:typeof s.permissionGroupName=="string"?s.permissionGroupName:null});else o++}if(new Set(i.map((s)=>s.accessBindingId)).size!=i.length)return p();return{accessRevision:n,...o==0?{}:{discardedBindingCount:o},...r==null?{}:{providerIds:r},bindings:i,mode:uu(t.mode),sharedAccessDigest:f(t.sharedAccessDigest),version:1}}function Xy(e){if(!Array.isArray(e))return p();let t=e.map((n)=>{let r=v(n);L(r,["accessBindingId","connectionId","providerId","source","connectionDisplayName"]);let o;try{o=Bi(r.source)}catch{return p()}if(r.permissionGroupName!=null&&typeof r.permissionGroupName!="string")return p();return{accessBindingId:f(r.accessBindingId),connectionId:f(r.connectionId),providerId:f(r.providerId),source:o,connectionDisplayName:f(r.connectionDisplayName),..."permissionGroupName"in r?{permissionGroupName:r.permissionGroupName}:{}}});if(new Set(t.map((n)=>n.accessBindingId)).size!=t.length)return p();return t}function du(e){let t=v(e);if(L(t,["mode","sharedAccessDigest","sharedBindings","selectedBindings","version"]),t.version!=2)return p();let n=uu(t.mode),r=Xy(t.sharedBindings),o=Xy(t.selectedBindings);if(n=="implicit"&&(r.length>0||o.length>0))return p();return{mode:n,sharedAccessDigest:f(t.sharedAccessDigest),sharedBindings:r,selectedBindings:o,version:2}}function ZI(e,t){let n=v(e);if(L(n,["candidates","mode","providerId","version"]),n.version!=1)return p("version: expected 1.");if(f(n.providerId)!=t)return p("providerId: does not match the requested provider.");if(!Array.isArray(n.candidates))return p("candidates: expected an array.");let r=n.candidates.map((o)=>nb(o,!0));if(r.some((o)=>o.providerId!=t))return p("candidates[].providerId: does not match the requested provider.");if(new Set(r.map((o)=>o.accessBindingId)).size!=r.length)return p("candidates[].accessBindingId: duplicate IDs.");return{candidates:r,mode:uu(n.mode),providerId:t,version:1}}function rb(e,t){let n=v(e);if(L(n,["results","version"]),n.version!=1)return p("version: expected 1.");if(!Array.isArray(n.results))return p("results: expected an array.");let r=new Set(t),o=n.results.map((i)=>{let s=v(i),a=f(s.providerId);if(!r.delete(a))return p("results[].providerId: duplicate or unrequested provider.");if(!Object.hasOwn(s,"error"))return ZI(s,a);L(s,["providerId","error"]);let c=v(s.error);return L(c,["code","message"]),{providerId:a,error:{code:f(c.code),message:f(c.message)}}});if(r.size!=0)return p("results: missing requested providers.");return{results:o,version:1}}function $n(e){let t=v(e);if(L(t,[...Object.hasOwn(t,"providerAccountId")?["providerAccountId"]:[],...Object.hasOwn(t,"alias")?["alias"]:[],...Object.hasOwn(t,"builtInAccount")?["builtInAccount"]:[],"connectionId","displayName","isDefault","serviceId","status"]),t.builtInAccount!==void 0&&typeof t.builtInAccount!="boolean")return p();let n=t.status;if(n!="active"&&n!="disconnected"&&n!="error"&&n!="reauth_required")return p();if(typeof t.isDefault!="boolean")return p();return{...t.providerAccountId===void 0?{}:{providerAccountId:f(t.providerAccountId)},...t.alias===void 0?{}:{alias:f(t.alias)},...t.builtInAccount===void 0?{}:{builtInAccount:t.builtInAccount},connectionId:f(t.connectionId),displayName:f(t.displayName),isDefault:t.isDefault,serviceId:f(t.serviceId),status:n}}function ob(e,t=!1){let n=v(e),r=n.description,o=t&&Object.hasOwn(n,"value");if(L(n,["jsonSchema","nullable",...r==null?[]:["description"],...o?["value"]:[]]),r!=null&&typeof r!="string")return p();if(typeof n.nullable!="boolean")return p();return{...r==null?{}:{description:r},jsonSchema:ve(n.jsonSchema),nullable:n.nullable,...o?{value:ve(n.value)}:{}}}function JI(e){return ob(e,!0)}function eb(e,t){return Object.fromEntries(Object.entries(v(e)).map(([n,r])=>[n,t(r)]))}function UI(e){let t=v(e),{homepageUrl:n,icon:r}=t;if(L(t,["actionId",...Object.hasOwn(t,"operationType")?["operationType"]:[],...Object.hasOwn(t,"inputSchema")?["inputSchema"]:[],...Object.hasOwn(t,"outputSchema")?["outputSchema"]:[],"authenticated","description",...n==null?[]:["homepageUrl"],...r==null?[]:["icon"],..."iconSprite"in t?["iconSprite"]:[],..."iconSpritePosition"in t?["iconSpritePosition"]:[],"inputs","name","outputs","serviceId","serviceName"]),n!=null&&typeof n!="string"||r!=null&&typeof r!="string")return p();return{...t.inputSchema===void 0?{}:{inputSchema:ve(t.inputSchema)},...t.outputSchema===void 0?{}:{outputSchema:ve(t.outputSchema)},actionId:f(t.actionId),...t.operationType==null?{}:{operationType:f(t.operationType)},authenticated:typeof t.authenticated=="boolean"?t.authenticated:p(),description:typeof t.description=="string"?t.description:p(),...n==null?{}:{homepageUrl:n},...r==null?{}:{icon:r},...Zi(t.iconSprite,t.iconSpritePosition),inputs:eb(t.inputs,JI),name:f(t.name),outputs:eb(t.outputs,ob),serviceId:f(t.serviceId),serviceName:f(t.serviceName)}}function Ki(e){let{defaultConnection:t,...n}=v(e),r=UI(n);if(t==null)return r;let o=$n(t);if(o.serviceId!=r.serviceId||o.status!="active")return p();return{...r,defaultConnection:o}}function ib(e){let t=v(e),{homepageUrl:n,icon:r}=t;if(t.noSetup!==void 0&&typeof t.noSetup!="boolean")return p();if(L(t,[...Object.hasOwn(t,"noSetup")?["noSetup"]:[],"serviceId","serviceName",...n==null?[]:["homepageUrl"],...r==null?[]:["icon"],..."iconSprite"in t?["iconSprite"]:[],..."iconSpritePosition"in t?["iconSpritePosition"]:[]]),n!=null&&typeof n!="string"||r!=null&&typeof r!="string")return p();return{...n==null?{}:{homepageUrl:n},...r==null?{}:{icon:r},...Zi(t.iconSprite,t.iconSpritePosition),serviceId:f(t.serviceId),serviceName:f(t.serviceName),...t.noSetup===void 0?{}:{noSetup:t.noSetup}}}function pu(e){return{actionId:e.actionId,authenticated:e.authenticated,...e.defaultConnection==null?{}:{defaultConnection:{connectionId:e.defaultConnection.connectionId,displayName:e.defaultConnection.displayName,status:e.defaultConnection.status}},description:e.description,name:e.name,serviceId:e.serviceId,serviceName:e.serviceName}}var Nn=_().min(1).max(256),ab=E({appId:Nn.nullable(),workspaceId:Nn.optional(),installationId:Nn.optional(),organizationId:Nn.optional(),projectId:Nn.optional(),projectKey:Nn.optional(),subscriptionStatus:F(["idle","pending","ready","error"]).optional(),lastError:_().optional(),signingSecretConfigured:ye().optional(),manageSubscriptions:ye().nullable(),verificationTokenConfigured:ye().nullable(),encryptKeyConfigured:ye().nullable(),verifiedAt:_().nullable()});var zn=_().min(1).max(256),WI=_().regex(/^[a-z][a-z0-9_.:]{0,127}$/),HI=_().trim().min(1).max(128),cb=E({version:w(1),sourceId:zn,revision:ke().positive(),name:HI,provider:F(["feishu","feishu_app_bot","slackbot","intercom","sentry","zoom","fireflies","jira"]),...ab.shape,connectionId:zn,teamId:zn.nullable(),enabled:ye(),eventTypes:R(WI),endpointUrl:_().nullable(),lastReceivedAt:_().nullable(),updatedAt:_(),consumers:R(E({flowId:zn,flowName:_(),triggerNodeId:zn}))});function Wi(e){return cb.parse(e)}function fu(e){return E({version:w(1),sources:R(cb),teamId:zn.nullable().optional()}).parse(e)}function mu(e){let t=v(e);if(L(t,["version","locale","definitions","display"]),t.version!=3||!Uu(t.locale)||!Array.isArray(t.definitions))return p();let n=t.definitions.map(Jr),r=v(t.display),o=new Set(n.map((s)=>s.key));if(o.size!=n.length||Object.keys(r).length!=o.size)return p();let i=Object.fromEntries(n.map((s)=>{let{key:a}=s,c=v(r[a]);return L(c,["configInputs","configInputLabels","displayName","description","outputs"]),[a,{configInputs:lb(c.configInputs,s.configInputs.flatMap((l)=>("handle"in l)?[l.handle]:[])),configInputLabels:GI(c.configInputLabels,s.configInputs.flatMap((l)=>("handle"in l)?[l.handle]:[])),displayName:f(c.displayName),description:f(c.description),outputs:lb(c.outputs,s.outputs.map((l)=>l.handle))}]}));return{version:3,locale:t.locale,definitions:n,display:i}}function lb(e,t){let n=v(e);return zy(n,t),Object.fromEntries(Object.entries(n).map(([r,o])=>[r,f(o)]))}function GI(e,t){let n=v(e);if(Object.keys(n).some((r)=>!t.includes(r)))return p();return Object.fromEntries(Object.entries(n).map(([r,o])=>{let i=f(o);return i.trim().length==0?p():[r,i]}))}function gu(e,t){if(t==null)return e;let n=t.toLowerCase();return e.filter((r)=>[r.description,r.displayName,r.key,r.name,r.provider,r.type].some((o)=>o.toLowerCase().includes(n)))}var QI=x({pointer:_().max(4096).default(""),offset:U().int().nonnegative().default(0),limit:U().int().min(1).max(100).default(20),maxBytes:U().int().min(1).max(1048576).default(15000)});var YI=Ae(),ub=E({pointer:_(),type:F(["object","array","string","number","boolean","null"]),length:U().int().nonnegative().optional(),complete:ye(),value:YI.optional()}),XI=ub.extend({offset:U().int().nonnegative(),nextOffset:U().int().positive().optional(),entries:R(ub).optional()}),db=E({resultId:_().min(1),callId:_().min(1),toolId:_().min(1),source:rt("kind",[E({kind:w("connector"),action:_().min(1)}),E({kind:w("code")}),E({kind:w("workflow"),flowId:_().min(1)})]),bytes:U().int().nonnegative(),digest:_().regex(/^[a-f0-9]{64}$/),createdAt:_().datetime()}),eC=E({version:w(1),runId:_(),results:R(db),nextAfter:_().optional()}),tC=E({version:w(1),runId:_(),result:db,page:XI});function hu(e){return eC.parse(e)}function yu(e){return tC.parse(e)}function pb(e){if(!Array.isArray(e))return p();return e.map((t)=>typeof t=="string"||Number.isSafeInteger(t)?t:p())}function nC(e){let t=v(e),n=f(t.kind);if(n=="artifact"||n=="binary"||n=="nullable")return{kind:n};if(n=="schema")return{kind:n,path:t.path==null?void 0:pb(t.path)};if(n!="keyword"||typeof t.keyword!="string"||!Ei(t.keyword))return p();return{kind:n,keyword:t.keyword,path:pb(t.path),source:t.source===void 0?void 0:ve(t.source),target:t.target===void 0?void 0:ve(t.target)}}function rC(e){let t=v(e),n=t.values==null?void 0:v(t.values);return{code:f(t.code),column:ie(t.column),...t.fields===void 0?{}:{fields:Array.isArray(t.fields)?t.fields.map(f):p()},line:ie(t.line),message:f(t.message),mismatch:t.mismatch==null?void 0:nC(t.mismatch),path:typeof t.path=="string"?t.path:p(),...n==null?{}:{values:Object.fromEntries(Object.entries(n).map(([r,o])=>[r,typeof o=="string"||typeof o=="number"?o:p()]))}}}function fb(e){let t=v(e);if(t.version!=1||typeof t.valid!="boolean"||!Array.isArray(t.diagnostics))return p();return{closureDigest:f(t.closureDigest),diagnostics:t.diagnostics.map(rC),engineContract:f(t.engineContract),flowId:f(t.flowId),modelVersion:ie(t.modelVersion),revisionDigest:f(t.revisionDigest),revisionId:f(t.revisionId),valid:t.valid,version:1}}var mb=(e)=>e==null?"":`?flowId=${encodeURIComponent(e)}`;function gb(e,t){let n=new URLSearchParams({...e==null?{}:{flowId:e},...t==null?{}:{locale:t}}).toString();return{path:`/v1/connector/providers${n?`?${n}`:""}`,decode:(r)=>{let o=v(r);if(L(o,["providers","version"]),o.version!=1||!Array.isArray(o.providers))return p();return o.providers.map(ib)}}}function hb(e,t,n){let r=new URLSearchParams({...t==null?{}:{flowId:t},...n==null?{}:{locale:n}}).toString();return{path:`/v1/connector/actions/${encodeURIComponent(e)}${r?`?${r}`:""}`,decode:(o)=>{let i=v(o);if(L(i,["action","version"]),i.version!=1)return p();return Ki(i.action)}}}function yb(e){return{path:`/v1/connector/connections${mb(e)}`,decode:(t)=>{let n=v(t);if(L(n,["connections","version"]),n.version!=1||!Array.isArray(n.connections))return p();return n.connections.map($n)}}}function bb(e,t){return{path:`/v1/connector/connections/${encodeURIComponent(e)}${mb(t)}`,decode:(n)=>{let r=v(n);if(L(r,["connections","serviceId","version"]),r.version!=1||f(r.serviceId)!=e||!Array.isArray(r.connections))return p();return r.connections.map($n)}}}function Wr(e){return Array.isArray(e)?e.map(f):p()}function oC(e){let t=v(e),n=t.draft===null?null:v(t.draft),r=v(t.sharedAccess);if(n!=null&&!Array.isArray(n.connections))return p();if(!Array.isArray(r.bindings))return p();let o=ie(r.accessRevision);if(o<0)return p();return{draft:n==null?null:{...n.calledFlowIds===void 0?{}:{calledFlowIds:Wr(n.calledFlowIds)},variableNames:Wr(n.variableNames),errorSourceFlowIds:Wr(n.errorSourceFlowIds),connections:n.connections.map((i)=>{let s=v(i);return{providerId:f(s.providerId),connectionId:f(s.connectionId)}})},sharedAccess:{accessRevision:o,providerIds:Wr(r.providerIds),bindings:r.bindings.map((i)=>{let s=v(i);return{providerId:f(s.providerId),connectionId:s.connectionId===null?null:f(s.connectionId),accessBindingId:f(s.accessBindingId)}})}}}function mt(e){let t=v(e),n=t.status;if(t.version!=1)return p();if(n!="active"&&n!="retiring")return p();let r=t.live==null?void 0:v(t.live);if(r!=null&&(typeof r.enabled!="boolean"||typeof r.hasStart!="boolean"))return p();return{...r==null?{}:{live:{enabled:r.enabled,hasStart:r.hasStart,publicationId:f(r.publicationId),revisionId:f(r.revisionId)}},tagIds:t.tagIds===void 0?[]:Wr(t.tagIds),createdAt:f(t.createdAt),...t.connectorTeamId==null?{}:{connectorTeamId:f(t.connectorTeamId)},draftRevisionId:f(t.draftRevisionId),resourceReferences:oC(t.resourceReferences),flowId:f(t.flowId),name:f(t.name),status:n,updatedAt:f(t.updatedAt),version:1}}function iC(e){let t=v(e),n=ie(t.referenceCount);if(n<0)return p();return{...mt(t),referenceCount:n}}function wb(e){let t=v(e);if(t.version!=1||!Array.isArray(t.flows))return p();let{nextCursor:n,total:r}=t;if(n!=null&&typeof n!="string")return p();if(r!=null&&!Number.isSafeInteger(r))return p();return{...n==null?{}:{nextCursor:n},flows:t.flows.map(iC),...r==null?{}:{total:r},version:1}}function Hi(e){let t=v(e);if(L(t,["name","updatedAt","value","version"]),t.version!=1||typeof t.value!="string")return p();let n=f(t.updatedAt);try{if(new Date(n).toISOString()!=n)return p()}catch{return p()}return{name:f(t.name),updatedAt:n,value:t.value,version:1}}function vb(e){let t=v(e),{referenceCount:n,...r}=t,o=ie(n);if(o<0)return p();return{...Hi(r),referenceCount:o}}function xb(e){let t=v(e);if(typeof t.enabled!="boolean")return p();return{flowId:f(t.flowId),flowName:f(t.flowName),nodeId:f(t.nodeId),nodeName:f(t.nodeName),enabled:t.enabled}}function kb(e){let t=v(e);if(L(t,["version","references"]),t.version!=1||!Array.isArray(t.references))return p();return{version:1,references:t.references.map((n)=>{let r=v(n);if(L(r,["flowId","flowName","draft","live"]),typeof r.draft!="boolean")return p();let o=r.live===null?null:v(r.live);if(o!=null){if(L(o,["publicationId","enabled"]),typeof o.enabled!="boolean")return p()}return{flowId:f(r.flowId),flowName:f(r.flowName),draft:r.draft,live:o==null?null:{publicationId:f(o.publicationId),enabled:o.enabled}}})}}function bu(e){let t=v(e),n=t.parentRevisionId;if(t.version!=1||n!==null&&typeof n!="string")return p();return{actorId:f(t.actorId),createdAt:f(t.createdAt),digest:f(t.digest),flowId:f(t.flowId),modelVersion:ie(t.modelVersion),parentRevisionId:n,revisionId:f(t.revisionId),version:1}}function Hr(e){let t=v(e);try{return{...bu(t),content:Rn(t.content)}}catch{return p()}}function Sb(e){let t=v(e),n=v(t.content),r=v(v(n.document).graph),o=Object.entries(v(r.nodes)).flatMap(([i,s])=>{let a=v(s);if(a.kind=="outputs"||Object.hasOwn(a,"inputs"))return[];let c=f(a.kind);if(a.name!==void 0&&typeof a.name!="string")return p();return[{triggerId:f(i),kind:c,...a.name===void 0?{}:{name:a.name}}]});return{...bu(t),triggers:o}}function Gi(e){let t=v(e);if(t.version!=1||ie(t.revision)<1)return p();return{revision:ie(t.revision),updatedAt:f(t.updatedAt),value:Object.fromEntries(Object.entries(v(t.value)).map(([n,r])=>[n,ve(r)])),version:1}}function Gr(e){let t=v(e);if(t.version!=1)return p();return{revision:bu(t.revision),version:1}}function Ib(e){let t=v(e);if(t.version!=1||t.kind!="snapshot")return p();return{draft:Hr(t.draft),kind:"snapshot",version:1}}var sC=["canceled","completed","failed","indeterminate"],Qi=[...sC,"queued","running","starting","waiting"];var aC=new Set(Qi);function Yi(e){return typeof e=="string"&&aC.has(e)?e:p()}function Ob(e){let t=v(e),{source:n,startedAt:r,finishedAt:o}=t;if(t.version!=1||n!="draft"&&n!="live")return p();if(r!=null&&typeof r!="string")return p();if(o!=null&&typeof o!="string")return p();return{createdAt:f(t.createdAt),...o==null?{}:{finishedAt:o},flowId:f(t.flowId),revisionId:f(t.revisionId),runId:f(t.runId),source:n,...r==null?{}:{startedAt:r},status:Yi(t.status),version:1}}function cC(e){let t=v(e);L(t,["actions","expiresAt","nodeId","prompt","waitId","waitingSince"]);let n=t.actions;if(!Array.isArray(n)||!(n.length==1&&n[0]=="continue"||n.length==2&&n[0]=="approve"&&n[1]=="reject"))return p();return{actions:n,...t.autoContinueAt===void 0?{}:{autoContinueAt:f(t.autoContinueAt)},expiresAt:f(t.expiresAt),nodeId:f(t.nodeId),prompt:f(t.prompt),waitId:f(t.waitId),waitingSince:f(t.waitingSince)}}function Cb(e){let t=v(e);return{flowId:f(t.flowId),runId:f(t.runId),nodeId:f(t.nodeId),executionId:f(t.executionId),...t.callId==null?{}:{callId:f(t.callId)}}}function lC(e){let t=v(e);if(!["workbench","cli","mcp","api","trigger","workflow"].includes(t.channel))return p();return{channel:t.channel,...t.actorId===void 0?{}:{actorId:f(t.actorId)}}}function Xi(e){let t=v(e),n=Ob(t),r=t.eventsExpiresAt;if(r!=null&&typeof r!="string")return p();if(t.waiting!==void 0||!Array.isArray(t.waits))return p();let o=t.waits.map(cC);if(new Set(o.map((a)=>a.waitId)).size!=o.length||n.status=="waiting"&&o.length==0&&(!Array.isArray(t.calls)||t.calls.length==0)||["completed","failed","canceled","indeterminate"].includes(n.status)&&o.length>0)return p();if(t.occurrenceId!==void 0&&t.triggerNodeId===void 0)return p();let i={status:n.status,waits:o};if(t.calls!==void 0&&!Array.isArray(t.calls))return p();let s={...n,...t.initiator===void 0?{}:{initiator:lC(t.initiator)},...uC(t),...t.triggerNodeId===void 0?{}:{triggerNodeId:f(t.triggerNodeId)},...t.caller===void 0?{}:{caller:Cb(t.caller)},...t.calls===void 0?{}:{calls:t.calls.map((a)=>Object.assign(Cb(a),{status:v(a).status===null?null:Yi(v(a).status)}))},closureDigest:f(t.closureDigest),engineContract:f(t.engineContract),engineDigest:f(t.engineDigest),...r==null?{}:{eventsExpiresAt:r},modelVersion:ie(t.modelVersion),sharedAccessDigest:f(t.sharedAccessDigest),revisionDigest:f(t.revisionDigest),...i};switch(n.source){case"draft":return{...s,source:"draft"};case"live":return{...s,publicationId:f(t.publicationId),source:"live",...t.occurrenceId===void 0?{}:{occurrenceId:f(t.occurrenceId),triggerNodeId:f(t.triggerNodeId)}}}}function jb(e){let t=v(e),n=t.nextCursor;if(t.version!=1||!Array.isArray(t.runs))return p();if(n!=null&&typeof n!="string")return p();return{flowId:f(t.flowId),...n==null?{}:{nextCursor:n},runs:t.runs.map(Ob),version:1}}function _b(e){let t=v(e),n=Yi(t.status);if(t.version!=1||typeof t.cancelAccepted!="boolean"||n=="queued"||n=="starting"||n=="running"||n=="waiting")return p();return{cancelAccepted:t.cancelAccepted,runId:f(t.runId),status:n,version:1}}function Rb(e){let t=v(e);L(t,["action","comment","resolutionAccepted","resolvedAt","runId","status","version","waitId"]);let{action:n,resolvedAt:r}=t;if(t.version!=1||typeof t.resolutionAccepted!="boolean"||t.comment!==null&&typeof t.comment!="string"||n!==null&&n!="approve"&&n!="continue"&&n!="reject"||r!==null&&typeof r!="string"||n===null!=(r===null)||t.resolutionAccepted&&n===null)return p();return{action:n,comment:t.comment,resolutionAccepted:t.resolutionAccepted,resolvedAt:r,runId:f(t.runId),status:Yi(t.status),version:1,waitId:f(t.waitId)}}function Ab(e){let t=v(e),n=t.status;if(t.version!=1)return p();let r={finishedAt:f(t.finishedAt),runId:f(t.runId),version:1};if(n=="completed"){if(!Object.hasOwn(t,"result"))return p();return{...r,result:t.result,status:"completed"}}if(n=="canceled")return{...r,status:"canceled"};if(n=="failed"){let o=v(t.error);return{...r,error:Eb(o),status:"failed"}}if(n=="indeterminate"){let o=v(t.error);return{...r,error:Eb(o),status:"indeterminate"}}return p()}function uC(e){let t=e.errorSource==null?void 0:v(e.errorSource);if(e.errorDispatches!=null&&!Array.isArray(e.errorDispatches))return p();return{...t==null?{}:{errorSource:{flowId:f(t.flowId),runId:f(t.runId)}},...e.errorDispatches==null?{}:{errorDispatches:e.errorDispatches.map((n)=>{let r=v(n),o=f(r.flowId);switch(r.status){case"pending":return{status:"pending",flowId:o};case"dispatched":return{status:"dispatched",flowId:o,runId:f(r.runId)};case"failed":return{status:"failed",flowId:o,message:f(r.message)};default:return p()}})}}}function Eb(e){return{code:f(e.code),message:f(e.message),...e.nodeId===void 0?{}:{nodeId:f(e.nodeId)},...e.jobId===void 0?{}:{jobId:f(e.jobId)},...e.path===void 0?{}:{path:(Array.isArray(e.path)?e.path:p()).map(f)}}}function es(){let e=globalThis.crypto;if(e!=null){try{if(typeof e.randomUUID=="function")return e.randomUUID()}catch{}if(typeof e.getRandomValues=="function"){let t=e.getRandomValues(new Uint8Array(16));t[6]=(t[6]??0)&15|64,t[8]=(t[8]??0)&63|128;let n=Array.from(t,(r)=>r.toString(16).padStart(2,"0")).join("");return`${n.slice(0,8)}-${n.slice(8,12)}-${n.slice(12,16)}-${n.slice(16,20)}-${n.slice(20)}`}}return`${Date.now().toString(36)}-${Math.random().toString(36).slice(2)}`}function wu(e={}){return{query:e.query?.trim().toLowerCase()??"",tagIds:[...new Set(e.tagIds??[])].toSorted(),untagged:e.untagged??!1}}function ts(e){let t=v(e);if(t.version!=1)return p();return{tagId:f(t.tagId),name:f(t.name),version:1}}function Pb(e){let t=v(e),n=ie(t.referenceCount);if(n<0)return p();return{...ts(t),referenceCount:n}}function $b(e){return e?.kind=="run.completed"||e?.kind=="run.failed"||e?.kind=="run.canceled"||e?.kind=="run.indeterminate"}function dC(e){let t=v(e),n=ie(t.sequence);if(n<0)return p();let r={createdAt:f(t.createdAt),sequence:n},o=v(t.payload),i=t.kind;switch(i){case"run.queued":return{...r,kind:i,payload:{}};case"run.started":return{...r,kind:i,payload:{flowId:f(o.flowId),scopeId:f(o.scopeId),...o.parentScopeId===void 0?{}:{parentScopeId:f(o.parentScopeId)}}};case"run.progress":return{...r,kind:i,payload:{flowId:f(o.flowId),scopeId:f(o.scopeId),progress:Tb(o.progress)}};case"run.waiting":if(!Array.isArray(o.waitIds))return p();return{...r,kind:i,payload:{waitIds:o.waitIds.map((s)=>f(s))}};case"wait.created":{let s=o.autoContinueAt===void 0?{}:{autoContinueAt:f(o.autoContinueAt)};return{...r,kind:i,payload:{...s,expiresAt:f(o.expiresAt),nodeId:f(o.nodeId),waitId:f(o.waitId),waitingSince:f(o.waitingSince)}}}case"run.resolved":{let{action:s,source:a}=o;if(a!==void 0&&a!=="manual"&&a!=="automatic")return p();let c=a===void 0?{}:{source:a};if(s!=="approve"&&s!=="continue"&&s!=="reject")return p();if(o.comment!==null&&typeof o.comment!="string")return p();return{...r,kind:i,payload:{...c,action:s,comment:o.comment,resolvedAt:f(o.resolvedAt),waitId:f(o.waitId)}}}case"run.completed":case"run.canceled":case"run.failed":case"run.indeterminate":return{...r,kind:i,payload:{result:ve(o.result)}};case"run.events-truncated":return{...r,kind:i,payload:Object.fromEntries(Object.entries(o).map(([s,a])=>[s,ve(a)]))};case"node.started":case"node.completed":case"node.failed":case"node.log":case"node.progress":case"node.artifact":{let s={flowId:f(o.flowId),scopeId:f(o.scopeId),nodeId:f(o.nodeId),executionId:f(o.executionId)};switch(i){case"node.started":{let a=o.nodeKind;if(a!==void 0&&a!=="approval"&&a!=="condition"&&a!=="connector"&&a!=="javascript"&&a!=="decision"&&a!=="openapi"&&a!=="http-request"&&a!=="skip-duplicates"&&a!=="llm"&&a!=="agent"&&a!=="value"&&a!=="outputs"&&a!=="webhook-response"&&a!=="workflow"&&a!=="wait")return p();return{...r,kind:i,payload:{...s,...a===void 0?{}:{nodeKind:a},...o.nodeTitle===void 0?{}:{nodeTitle:f(o.nodeTitle)},...o.operation===void 0?{}:{operation:f(o.operation)}}}}case"node.completed":return{...r,kind:i,payload:{...s,...o.systemOutputs===void 0?{}:{systemOutputs:Object.fromEntries(Object.entries(v(o.systemOutputs)).map(([a,c])=>[a,ve(c)]))},outputs:Object.fromEntries(Object.entries(v(o.outputs)).map(([a,c])=>[a,ve(c)]))}};case"node.failed":{let a=v(o.error);return{...r,kind:i,payload:{...s,...o.handled===!0?{handled:!0}:{},...o.systemOutputs===void 0?{}:{systemOutputs:Object.fromEntries(Object.entries(v(o.systemOutputs)).map(([c,l])=>[c,ve(l)]))},error:{code:f(a.code),message:f(a.message)}}}}case"node.log":{let a=o.level;if(a!=="debug"&&a!=="info"&&a!=="warn"&&a!=="error")return p();return{...r,kind:i,payload:{...s,level:a,message:f(o.message)}}}case"node.progress":return{...r,kind:i,payload:{...s,progress:Tb(o.progress)}};case"node.artifact":{let a=v(o.artifact),c=ie(a.size),l=f(a.digest);if(a.kind!="artifact"||c<0||!/^sha256:[0-9a-f]{64}$/.test(l))return p();return{...r,kind:i,payload:{...s,artifact:{kind:"artifact",id:f(a.id),name:f(a.name),size:c,digest:l,...a.mediaType===void 0?{}:{mediaType:f(a.mediaType)}}}}}}}default:return p()}}function Tb(e){return typeof e=="number"&&Number.isFinite(e)&&e>=0&&e<=100?e:p()}function pC(e){let t=v(e),n=t.eventsExpiresAt,r=ie(t.nextAfter);if(t.version!=1||!Array.isArray(t.events)||typeof t.done!="boolean"||typeof t.historyComplete!="boolean")return p();if(n!=null&&typeof n!="string")return p();if(r<0)return p();return{done:t.done,events:t.events.map(dC),...n==null?{}:{eventsExpiresAt:n},historyComplete:t.historyComplete,nextAfter:r,runId:f(t.runId),version:1}}var j=encodeURIComponent;function en(e){return`${e}-${es()}`}class vu{constructor(e,t="api"){this.channel=t,this.requestControl=e}async loadOpenApiDocument(e,t){let n=v(await this.request("/v1/openapi/document",{method:"POST",body:JSON.stringify({url:e,version:1}),signal:t}));if(n.version!=1)return p();return ve(n.document)}async listFlows(e={}){let t=new URLSearchParams,n=wu(e);if(n.query)t.set("query",n.query);if(n.tagIds.length)t.set("tagIds",n.tagIds.join(","));if(n.untagged)t.set("untagged","true");if(e.cursor!=null)t.set("cursor",e.cursor);if(e.limit!=null)t.set("limit",String(e.limit));if(e.includeTotal!=null)t.set("includeTotal",String(e.includeTotal));let r=t.size==0?"":`?${t}`;return wb(await this.request(`/v1/flows${r}`,e.signal==null?void 0:{signal:e.signal}))}async listEventSources(e,t){return fu(await this.request("/v1/event-sources"+(e==null?"":`?flowId=${j(e)}`),{signal:t}))}async listEventSourceConnections(e,t,n="feishu"){let r=v(await this.request(`/v1/event-sources/connections?kind=${n}${e==null?"":`&teamId=${j(e)}`}`,{signal:t}));if(L(r,["version","connections"]),r.version!=1||!Array.isArray(r.connections))return p();return r.connections.map($n)}async createEventSource(e){return Wi(await this.request("/v1/event-sources",{method:"POST",body:JSON.stringify(e)}))}async updateEventSource(e,t){return Wi(await this.request(`/v1/event-sources/${j(e)}`,{method:"PUT",body:JSON.stringify(t)}))}async deleteEventSource(e,t){await this.request(`/v1/event-sources/${j(e)}`,{method:"DELETE",body:JSON.stringify({version:1,expectedRevision:t})})}async listVariables(){let e=v(await this.request("/v1/variables"));if(L(e,["variables","version"]),e.version!=1||!Array.isArray(e.variables))return p();return{variables:e.variables.map(vb),version:1}}async getFlowReferences(e,t={}){let n=new URLSearchParams({direction:t.direction??"incoming",offset:String(t.offset??0),limit:String(t.limit??50)});return Gh.parse(await this.request(`/v1/flows/${j(e)}/references?${n}`,{signal:t.signal}))}async getWorkflowContract(e,t){return Hh.parse(await this.request(`/v1/flows/${j(e)}/call-contract`,{signal:t}))}async getVariableReferences(e,t){return kb(await this.request(`/v1/variables/${j(e)}/references`,{signal:t}))}async getVariable(e){return Hi(await this.request(`/v1/variables/${j(e)}`))}async putVariable(e,t){return Hi(await this.request(`/v1/variables/${j(e)}`,{body:JSON.stringify({value:t}),method:"PUT"}))}async deleteVariable(e){let t=v(await this.request(`/v1/variables/${j(e)}`,{method:"DELETE"}));if(L(t,["version"]),t.version!=1)return p()}async exportFlow(e){let t=await this.request(`/v1/flows/${j(e)}/export`);try{return Ui(t)}catch{return p()}}async importFlow(e,t={}){return mt(await this.request("/v1/flows/import",{method:"POST",headers:{"Idempotency-Key":t.idempotencyKey??`flow-${es()}`},body:JSON.stringify({file:e,name:t.name,teamId:t.teamId,tagIds:t.tagIds,version:1})}))}async createFlow(e,t=`flow-${es()}`,n,r,o){return mt(await this.request("/v1/flows",{body:JSON.stringify({name:e,...n==null?{}:{teamId:n},...r==null?{}:{tagIds:r},...o==null?{}:{presentation:o},version:1}),headers:{"idempotency-key":t},method:"POST"}))}async broadcastCanvas(e,t){let n=v(await this.request(`/v1/flows/${j(e)}/canvas`,{method:"POST",body:JSON.stringify({version:1,command:t})}));if(L(n,["version","flowId","broadcast"]),n.version!=1||n.broadcast!==!0||n.flowId!==e)return p();return{version:1,flowId:f(n.flowId),broadcast:!0}}async getFlow(e){return mt(await this.request(`/v1/flows/${j(e)}`))}async getErrorListeners(e,t){let n=v(await this.request(`/v1/flows/${j(e)}/error-listeners`,{signal:t}));if(n.version!=1||!Array.isArray(n.listeners))return p();return n.listeners.map(xb)}async listTags(e){let t=v(await this.request("/v1/tags",{signal:e}));if(t.version!=1||!Array.isArray(t.tags))return p();return{tags:t.tags.map(Pb),version:1}}async createTag(e){return ts(await this.request("/v1/tags",{method:"POST",body:JSON.stringify({name:e,version:1})}))}async renameTag(e,t){return ts(await this.request(`/v1/tags/${j(e)}`,{method:"PATCH",body:JSON.stringify({name:t,version:1})}))}async deleteTag(e){if(v(await this.request(`/v1/tags/${j(e)}`,{method:"DELETE"})).version!=1)p()}async setFlowTags(e,t){return mt(await this.request(`/v1/flows/${j(e)}/tags`,{method:"PUT",body:JSON.stringify({tagIds:t,version:1})}))}async updateFlow(e,t){return mt(await this.request(`/v1/flows/${j(e)}`,{method:"PATCH",body:JSON.stringify({...t,version:1})}))}async getFlowState(e,t){let n=fl.safeParse(await this.request(`/v1/flows/${j(e)}/state?scope=${t}`));return n.success&&n.data.scope===t?n.data:p()}async getFlowStateSummary(e,t,n){let r=Xg.safeParse(await this.request(`/v1/flows/${j(e)}/state/summary?scope=${t}`,{signal:n}));return r.success&&r.data.scope===t?r.data:p()}async getFlowStateValues(e,t,n,r){let o=eh.safeParse(await this.request(`/v1/flows/${j(e)}/state/read`,{method:"POST",body:JSON.stringify({version:1,scope:t,keys:n}),signal:r}));return o.success&&o.data.scope===t&&o.data.values.length===n.length&&o.data.values.every((i,s)=>i.key===n[s])?o.data:p()}async clearFlowState(e,t,n){let r=v(await this.request(`/v1/flows/${j(e)}/state?scope=${t}${n==null?"":`&key=${encodeURIComponent(n)}`}`,{method:"DELETE"}));if(r.version!==1||r.cleared!==!0)p()}async clearFlowDedupe(e,t,n){let r=v(await this.request(`/v1/flows/${j(e)}/dedupe?scope=${t}&space=${encodeURIComponent(n)}`,{method:"DELETE"}));if(r.version!==1||r.cleared!==!0)p()}async clearAllFlowDedupe(e,t){let n=v(await this.request(`/v1/flows/${j(e)}/dedupe/all?scope=${t}`,{method:"DELETE"}));if(n.version!==1||n.cleared!==!0)p()}async renameFlow(e,t){return this.updateFlow(e,{name:t})}async deleteFlow(e){return mt(await this.request(`/v1/flows/${j(e)}`,{method:"DELETE"}))}async listTriggerKeys(e,t){let n=v(await this.request(`/v1/trigger-keys${t==null?"":`?locale=${encodeURIComponent(t)}`}`,{signal:e}));if(n.version!=1||!Array.isArray(n.keys))return p();return n.keys.map(iu)}async listTriggerDefinitions(e){let t=v(await this.request("/v1/trigger-keys/catalog",{signal:e}));if(t.version!=2||!Array.isArray(t.definitions))return p();return t.definitions.map(Jr)}async readCatalog(e,t,n){let r=new Headers;if(t)r.set("if-none-match",t);let o=await this.response(e.path,{headers:r,signal:n},!0),i=o.headers.get("etag")?.trim()||null;if(o.status==304)return{modified:!1,etag:i};return{modified:!0,data:e.decode(await o.json()),etag:i}}async getTriggerCatalog(e,t,n){let r=new Headers;if(t?.etag)r.set("if-none-match",t.etag);let o=await this.response(`/v1/trigger-keys/catalog?locale=${encodeURIComponent(e)}`,{headers:r,signal:n},!0);if(o.status==304){if(t==null)return p();return{...t,etag:o.headers.get("etag")?.trim()||t.etag}}return{data:mu(await o.json()),etag:o.headers.get("etag")?.trim()||null}}async getTriggerKey(e,t){let n=v(await this.request(`/v1/trigger-keys/${j(e)}`,{signal:t}));if(n.version!=1)return p();return Jr(n.definition)}async listFlowTriggerBindings(e,t){let n=v(await this.request(`/v1/flows/${j(e)}/triggers`,{signal:t}));if(n.version!=1||f(n.flowId)!=e||!Array.isArray(n.bindings))return p();return n.bindings.map(Ur)}async getFlowTriggerBinding(e,t){return Vy(await this.request(`/v1/flows/${j(e)}/triggers/${j(t)}`))}async listFlowTriggerActivities(e,t,n={}){let r=new URLSearchParams;if(n.cursor!=null)r.set("cursor",n.cursor);if(n.limit!=null)r.set("limit",String(n.limit));let o=r.size==0?"":`?${r}`;return Ly(await this.request(`/v1/flows/${j(e)}/triggers/${j(t)}/activities${o}`))}async testFlowPollTrigger(e,t){return My(await this.request(`/v1/flows/${j(e)}/triggers/${j(t)}/test`,{body:JSON.stringify({version:1}),method:"POST"}))}async getEditor(e){let t=v(await this.request(`/v1/flows/${j(e)}/editor`));if(t.version!=1)return p();let n={flow:mt(t.flow),draft:Hr(t.draft),live:ou(t.live),presentation:Gi(t.presentation),version:1};if(n.flow.flowId!=e||n.draft.flowId!=e||n.live.flowId!=e||n.flow.draftRevisionId!=n.draft.revisionId)return p();return n}async getPublicationPresentation(e,t,n){let r=v(await this.request(`/v1/flows/${j(e)}/publications/${j(t)}/presentation`,{signal:n}));if(r.version!=1)return p();return{version:1,presentation:r.presentation===null?null:Gi(r.presentation)}}async getPresentation(e){return Gi(await this.request(`/v1/flows/${j(e)}/presentation`))}async getDraft(e){return Hr(await this.request(`/v1/flows/${j(e)}/draft`))}async syncDraft(e){return Ib(await this.request(`/v1/flows/${j(e)}/draft/sync`))}async getRevision(e,t,n){return Hr(await this.request(`/v1/flows/${j(e)}/revisions/${j(t)}`,{signal:n}))}async getRevisionTriggers(e,t,n){let r=Sb(await this.request(`/v1/flows/${j(e)}/revisions/${j(t)}`,{signal:n}));if(r.flowId!=e||r.revisionId!=t)return p();return r}async listTriggerConfigOptions(e,t,n,r){let o=v(await this.request(`/v1/flows/${j(e)}/triggers/${j(t)}/options/${j(n)}`,{signal:r}));if(L(o,["options","version"]),o.version!=1||!Array.isArray(o.options)||o.options.length>1000)return p();return o.options.map((i)=>{let s=v(i);L(s,["value","label",...s.color==null?[]:["color"]]);let a=s.color==null?void 0:f(s.color);if(a!=null&&!/^#[0-9a-fA-F]{6}$/.test(a))return p();return a==null?{value:f(s.value),label:f(s.label)}:{value:f(s.value),label:f(s.label),color:a}})}async listConnectorTeams(e){let t=v(await this.request("/v1/connector/teams",{signal:e}));if(L(t,["enabled","teams","version"]),t.version!=1||typeof t.enabled!="boolean"||!Array.isArray(t.teams))return p();return{enabled:t.enabled,teams:t.teams.map((n)=>{let r=v(n);if(L(r,["id","name","systemCreated"]),typeof r.systemCreated!="boolean")return p();return{id:f(r.id),name:f(r.name),systemCreated:r.systemCreated}}),version:1}}async listConnectorProviders(e,t,n){let r=gb(t,n);return this.connectorRequest(r.path,"providers",e,r.decode)}async listLeinaBots(e,t){return tb(await this.request(`/v1/connector/leina/bots?flowId=${j(e)}`,{signal:t}))}async removeConnectionUsage(e,t,n,r,o){return Gr(await this.request(`/v1/flows/${j(e)}/connection-usage/remove`,{method:"POST",headers:{"idempotency-key":o},body:JSON.stringify({connectionId:t,expectedRevisionId:n,expectedAccessRevision:r,version:1})}))}async getConnectorAccess(e,t){return Tn(await this.request(`/v1/flows/${j(e)}/connector-access`,{signal:t}))}async getPublishedConnectorAccess(e,t,n){return du(await this.request(`/v1/flows/${j(e)}/connector-access?publicationId=${j(t)}`,{signal:n}))}async listProviderAccessBindingCandidates(e,t,n){return rb(await this.request(`/v1/flows/${j(e)}/connector-access/candidates/query`,{method:"POST",body:JSON.stringify({providerIds:t,version:1}),signal:n}),t)}async setConnectorService(e,t,n,r){return Tn(await this.request(`/v1/flows/${j(e)}/connector-access/${j(t)}/service`,{body:JSON.stringify({expectedAccessRevision:r,version:1}),method:n?"PUT":"DELETE"}))}async addProviderAccessBinding(e,t,n,r){return Tn(await this.request(`/v1/flows/${j(e)}/connector-access/${j(t)}`,{body:JSON.stringify({accessBindingId:n,expectedAccessRevision:r,version:1}),method:"PUT"}))}async removeProviderAccessBinding(e,t,n,r){return Tn(await this.request(`/v1/flows/${j(e)}/connector-access/${j(t)}`,{body:JSON.stringify({accessBindingId:n,expectedAccessRevision:r,version:1}),method:"DELETE"}))}async listConnectorActions(e,t,n,r){return await this.connectorActions({...r==null?{}:{locale:r},...n==null?{}:{flowId:n},...e==null?{}:{service:e}},t)}async searchConnectorActions(e,t,n,r){return await this.connectorActions({...r==null?{}:{locale:r},...n==null?{}:{flowId:n},q:e.trim()},t)}async getConnectorAction(e,t,n,r,o=!1){let i=hb(e,n,r);return this.connectorRequest(i.path,"actions",t,i.decode,o)}async listAllConnectorConnections(e,t,n=!1){let r=yb(t);return this.connectorRequest(r.path,"connections",e,r.decode,n)}async listConnectorConnections(e,t,n,r=!1){let o=bb(e,n);return this.connectorRequest(o.path,"connections",t,o.decode,r)}async createConnectorConnectionPage(e,t,n){let r=new URLSearchParams;if(t!=null)r.set("flowId",t);if(n!=null)r.set("teamId",n);let o=v(await this.request(`/v1/connector/connections/${j(e)}/page${r.size==0?"":`?${r}`}`,{body:JSON.stringify({version:1}),method:"POST"}));if(L(o,["url","version"]),o.version!=1)return p();try{let i=new URL(f(o.url));if(i.protocol!="http:"&&i.protocol!="https:")return p();return i.href}catch{return p()}}async readAuthoring(e,t={}){return Ty.parse(await this.request(`/v1/flows/${j(e)}/authoring/read`,{method:"POST",body:JSON.stringify(t)}))}async searchAuthoring(e,t){return $y.parse(await this.request(`/v1/flows/${j(e)}/authoring/search`,{method:"POST",body:JSON.stringify(t)}))}async authoringSchema(e,t){return v(await this.request(`/v1/flows/${j(e)}/authoring/schema`,{method:"POST",body:JSON.stringify(t)}))}async editAuthoring(e,t){return Py.parse(await this.request(`/v1/flows/${j(e)}/authoring/edit`,{method:"POST",headers:{"idempotency-key":t.requestId},body:JSON.stringify(t)}))}async checkAuthoring(e,t){return Ay.parse(await this.request(`/v1/flows/${j(e)}/authoring/check`,{method:"POST",body:JSON.stringify({revisionId:t})}))}async changeDraft(e,t,n,r=en("change")){return Gr(await this.request(`/v1/flows/${j(e)}/draft/changes`,{body:JSON.stringify({expectedRevisionId:t,operations:n,version:1}),headers:{"idempotency-key":r},method:"POST"}))}async repairDraft(e,t,n=en("repair")){return Gr(await this.request(`/v1/flows/${j(e)}/draft/repair`,{body:JSON.stringify({expectedRevisionId:t,version:1}),headers:{"idempotency-key":n},method:"POST"}))}async upgradeDraft(e,t,n={}){return Gr(await this.request(`/v1/flows/${j(e)}/draft/upgrade`,{body:JSON.stringify({expectedRevisionId:t,version:1}),headers:{"idempotency-key":n.idempotencyKey??en("upgrade")},method:"POST"}))}async checkFlow(e,t){return fb(await this.request(`/v1/flows/${j(e)}/revisions/${j(t)}/check`,{body:JSON.stringify({engineContract:on,version:1}),method:"POST"}))}async getLiveDetails(e,t){let n=Zy(await this.request(`/v1/flows/${j(e)}/live/details`,{signal:t}));if(n.flowId!=e)return p();return n}async getLive(e,t){return ou(await this.request(`/v1/flows/${j(e)}/live`,{signal:t}))}async listPublications(e,t={},n){let r=new URLSearchParams;if(t.cursor!=null)r.set("cursor",t.cursor);if(t.limit!=null)r.set("limit",String(t.limit));if(t.includeTotal!=null)r.set("includeTotal",String(t.includeTotal));let o=r.size==0?"":`?${r}`;return Dy(await this.request(`/v1/flows/${j(e)}/publications${o}`,{signal:n}))}async createDraftRun(e,t,n){let r=Xi(await this.request(`/v1/flows/${j(e)}/revisions/${j(t)}/runs`,{body:JSON.stringify({engineContract:on,inputs:n.inputs??{},trigger:n.trigger,version:2}),headers:{"idempotency-key":n.idempotencyKey??en("run"),"x-open-flow-client":this.channel},method:"POST"}));return r.source=="draft"?r:p()}async createLiveRun(e,t){let n=Xi(await this.request("/v1/runs",{body:JSON.stringify({inputs:t.inputs??{},trigger:t.trigger,publicationId:e,version:2}),headers:{"idempotency-key":t.idempotencyKey??en("run"),"x-open-flow-client":this.channel},method:"POST"}));return n.source=="live"?n:p()}async setFlowEnabled(e,t,n){return mt(await this.request(`/v1/flows/${j(e)}/enabled`,{method:"PUT",body:JSON.stringify({enabled:n,expectedPublicationId:t,version:1})}))}async publishFlow(e,t,n,r={}){return ru(await this.request(`/v1/flows/${j(e)}/revisions/${j(t)}/publications`,{body:JSON.stringify({engineContract:on,expectedLivePublicationId:n,version:1}),headers:{"idempotency-key":r.idempotencyKey??en("publication")},method:"POST"}))}async getPublishOperation(e,t,n){return ru(await this.request(`/v1/flows/${j(e)}/publish-operations/${j(t)}`,{signal:n}))}async rollbackFlow(e,t,n,r={}){return Pn(await this.request(`/v1/flows/${j(e)}/publications/${j(t)}/rollback`,{body:JSON.stringify({expectedLivePublicationId:n,version:1}),headers:{"idempotency-key":r.idempotencyKey??en("publication")},method:"POST"}))}async getRun(e,t){return Xi(await this.request(`/v1/runs/${j(e)}`,{signal:t}))}async listRuns(e,t={}){let n=new URLSearchParams;if(t.cursor!=null)n.set("cursor",t.cursor);if(t.limit!=null)n.set("limit",String(t.limit));if(t.status!=null)n.set("status",t.status);if(t.pendingWait!=null)n.set("pendingWait",String(t.pendingWait));if(t.source!=null)n.set("source",t.source);if(t.createdFrom!=null)n.set("createdFrom",t.createdFrom);if(t.createdBefore!=null)n.set("createdBefore",t.createdBefore);if(t.runId!=null)n.set("runId",t.runId);let r=n.size==0?"":`?${n}`;return jb(await this.request(`/v1/flows/${j(e)}/runs${r}`))}async getRunEvents(e,t={},n){let r=new URLSearchParams;if(t.after!=null)r.set("after",String(t.after));if(t.limit!=null)r.set("limit",String(t.limit));let o=r.size==0?"":`?${r}`;return pC(await this.request(`/v1/runs/${j(e)}/events${o}`,{signal:n}))}async listRunResults(e,t,n){return hu(await this.request(`/v1/runs/${j(e)}/results${t==null?"":`?after=${encodeURIComponent(t)}`}`,{signal:n}))}async readRunResult(e,t,n={},r){let o=new URLSearchParams(Object.entries(n).map(([i,s])=>[i,String(s)]));return yu(await this.request(`/v1/runs/${j(e)}/results/${j(t)}?${o}`,{signal:r}))}async downloadRunResult(e,t,n){return(await this.response(`/v1/runs/${j(e)}/results/${j(t)}/content`,{signal:n})).blob()}async getRunResult(e,t){return Ab(await this.request(`/v1/runs/${j(e)}/result`,{signal:t}))}async cancelRun(e){return _b(await this.request(`/v1/runs/${j(e)}/cancel`,{body:JSON.stringify({version:1}),method:"POST"}))}async resolveRunWait(e,t,n,r){return Rb(await this.request(`/v1/runs/${j(e)}/waits/${j(t)}/resolve`,{body:JSON.stringify({action:n,comment:r,version:1}),method:"POST"}))}async connectorActions(e,t){let n=Object.entries(e).map(([o,i])=>`${j(o)}=${j(i)}`).join("&"),r=n==""?"":`?${n}`;return this.connectorRequest(`/v1/connector/actions${r}`,"actions",t,(o)=>{let i=v(o);if(L(i,["actions","version"]),i.version!=1||!Array.isArray(i.actions))return p();return i.actions.map(Ki)})}async connectorRequest(e,t,n,r,o=!1){return r(await this.request(e,{signal:n}))}async response(e,t,n=!1){let r=new Headers(t.headers);if(t.body!=null)r.set("content-type","application/json");let o=await this.requestControl(e,{...t,headers:r});if(!o.ok&&!(n&&o.status==304)){let i;try{i=await o.json()}catch{return p()}let s=v(i).error,a=s==null?void 0:v(s);throw new Te(o.status,typeof a?.code=="string"?a.code:"request.failed",typeof a?.message=="string"?a.message:`Request failed with status ${o.status}.`,a?.details==null?void 0:v(a.details))}return o}async request(e,t={}){let n=await this.response(e,t);try{return await n.json()}catch{return p()}}}import{randomUUID as bC}from"crypto";class C extends Error{constructor(e,t,n){super(t);this.code=e,this.details=n,this.name="CliError"}}function ns(e,t){let n=e.trim();if(Kr(n)!=null)throw new C("cli.invalid-arguments",`${t} name must be between 1 and ${cu} characters and use only letters, numbers, spaces, hyphens, or underscores.`);return n}var fC=100,xu=100,ku=100,mC=new Set(["canceled","completed","failed","indeterminate"]);async function gC(e){let t=[],n=new Set,r;do{let o=await e.listFlows({cursor:r,limit:fC});if(t.push(...o.flows),r=o.nextCursor,r!=null&&n.has(r))throw new C("page.invalid-cursor","The deployment returned a repeated Flow cursor.");if(r!=null)n.add(r)}while(r!=null);return t}function hC(e,t){let n=e.find((o)=>o.flowId==t);if(n!=null)return n;let r=e.filter((o)=>o.name==t);if(r.length==1)return r[0];if(r.length>1)throw new C("flow.ambiguous",`Flow name ${JSON.stringify(t)} is ambiguous.`,{candidates:r.map(({flowId:o,name:i})=>({flowId:o,name:i}))});throw new C("flow.not-found",`Flow ${JSON.stringify(t)} was not found.`)}async function xe(e,t){try{return await e.getFlow(t)}catch(n){if(!(n instanceof Te)||n.code!="flow.invalid"&&n.code!="flow.not-found")throw n}return hC(await gC(e),t)}async function Nb(e,t,n){if(n.expectedRevision!=null&&n.expectedRevision!=t.draftRevisionId&&!n.options.includes("idempotency-key"))throw new C("flow.revision-conflict","The Flow Draft changed. Inspect it before submitting a new mutation.",{expectedRevisionId:n.expectedRevision,actualRevisionId:t.draftRevisionId,flowId:t.flowId});let r=await e.getRevision(t.flowId,n.expectedRevision??t.draftRevisionId);return{draft:r,flow:t,graph:r.content.document.graph}}function yC(e,t){let n=e.find((o)=>o.actionId==t);if(n!=null)return n;let r=e.filter((o)=>o.name==t);if(r.length==1)return r[0];if(r.length>1)throw new C("connector.action-ambiguous",`Connector Action name ${JSON.stringify(t)} is ambiguous.`,{candidates:r.map(({actionId:o,name:i,serviceId:s})=>({actionId:o,name:i,serviceId:s}))});throw new C("connector.action-not-found",`Connector Action ${JSON.stringify(t)} was not found.`)}async function zb(e,t,n){try{return await e.getConnectorAction(t,void 0,n)}catch(r){if(!(r instanceof Te)||r.status!=404)throw r}return yC(await e.searchConnectorActions(t,void 0,n),t)}function Su(e){return`${e.displayName} ${e.key} ${e.provider} ${e.type}`}async function Db(e,t){try{return await e.getTriggerKey(t)}catch(o){if(!(o instanceof Te)||o.status!=404)throw o}let r=(await e.listTriggerKeys()).filter((o)=>o.name==t||o.displayName==t);if(r.length==1)return await e.getTriggerKey(r[0].key);if(r.length>1)throw new C("trigger-key.ambiguous",`Trigger Key name ${JSON.stringify(t)} is ambiguous.`,{candidates:r.map(({displayName:o,key:i,provider:s})=>({displayName:o,key:i,provider:s}))});throw new C("trigger-key.not-found",`Trigger Key ${JSON.stringify(t)} was not found.`)}function qb(e){return`${e.displayName} ${e.connectionId} ${e.serviceId} ${e.status}${e.isDefault?"\tdefault":""}`}function Iu(e){return`${e.name} ${e.actionId} ${e.serviceName} ${e.serviceId}`}function le(e,t,n){if(e.length!=t)throw new C("cli.invalid-arguments",`Usage: ${n}`)}function Z(e,t,n,r){e.stdout.write(t?`${JSON.stringify(n)}
62
62
  `:`${r}
63
63
  `)}function qt(e){return`${e.name} ${e.flowId} ${e.status}`}function Qr(e){return`${e.operation} ${e.publicationId} ${e.revisionId} ${e.createdAt}`}function Yr(e){let t=e.source=="draft"?"":` ${e.publicationId}`;return`${e.source} ${e.status} ${e.runId} ${e.revisionId}${t}${e.waits.length==0?"":`
64
- ${JSON.stringify(e.waits)}`}`}function Vb(e){return`${e.source} ${e.status} ${e.runId} ${e.revisionId}`}function Lb(e){return`${e.sequence} ${e.kind} ${JSON.stringify(e.payload)}`}async function Dn(e,t,n,r){try{if(e=="-")return await r.readStdin();if(!e.startsWith("@"))return e;let o=e.slice(1);if(o.length==0)throw new C("cli.invalid-arguments",`${t} @ requires a file path.`);return await r.readFile(o)}catch(o){if(o instanceof C)throw o;throw new C(n,o instanceof Error?o.message:String(o))}}async function Xr(e,t){if(e==null)return{};let n=await Dn(e,"input","flow.authoring-unreadable",t),r;try{r=JSON.parse(n)}catch{throw new C("cli.invalid-arguments","Input must be valid JSON.")}if(r==null||typeof r!="object"||Array.isArray(r))throw new C("cli.invalid-arguments","Input must be a JSON object.");return r}async function Mb(e,t){if(e.input==null)return{};let n=await Dn(e.input,"--input","run.input-unreadable",t),r;try{r=JSON.parse(n)}catch{throw new C("run.input-invalid","Run input must be valid JSON.")}if(r==null||typeof r!="object"||Array.isArray(r))throw new C("run.input-invalid","Run input must be an object keyed by node ID.");for(let o of Object.values(r))if(o==null||typeof o!="object"||Array.isArray(o))throw new C("run.input-invalid","Each Run input node must contain an object keyed by input handle.");return r}async function eo(e,t,n){let r=new Set,o;do{let i=await e.listPublications(t,{cursor:o,limit:xu}),s=i.publications.find((a)=>a.publicationId==n);if(s!=null)return s;if(o=i.nextCursor,o!=null&&r.has(o))throw new C("page.invalid-cursor","The deployment returned a repeated Publication cursor.");if(o!=null)r.add(o)}while(o!=null);throw new C("publication.not-found",`Publication ${JSON.stringify(n)} was not found.`)}async function Cu(e,t,n,r=60000){let o=Date.now()+r,i=t;while(!mC.has(i.status)&&i.waits.length==0){let s=o-Date.now();if(s<=0)return{run:i,timedOut:!0};if(await n.wait(Math.min(1000,s)),Date.now()>=o)return{run:i,timedOut:!0};try{i=await e.getRun(i.runId,AbortSignal.timeout(Math.max(1,o-Date.now())))}catch(a){if(Date.now()>=o||a instanceof Error&&a.name=="TimeoutError")return{run:i,timedOut:!0};throw new C("run.wait-failed",a instanceof Error?a.message:String(a),{runId:i.runId})}}return{run:i,timedOut:!1}}function to(e,t=!1){if(t)return 3;if(e.waits.length>0)return 2;return e.status=="failed"||e.status=="canceled"||e.status=="indeterminate"?1:0}function Fb(e){return new C(e.code,e.message,{status:e.status,...e.details})}async function Eu(e,t,n,r,o=60000){let i=Date.now()+o,s=n;while(s.status=="pending"){let a=i-Date.now();if(a<=0)return{operation:s,timedOut:!0};if(await r.wait(Math.min(1000,a)),Date.now()>=i)return{operation:s,timedOut:!0};try{s=await e.getPublishOperation(t,s.operationId,AbortSignal.timeout(Math.max(1,i-Date.now())))}catch(c){if(Date.now()>=i||c instanceof Error&&c.name=="TimeoutError")return{operation:s,timedOut:!0};throw new C("publication.wait-failed",c instanceof Error?c.message:String(c),{flowId:t,operationId:s.operationId})}}return{operation:s,timedOut:!1}}var wC=new Set(Qi);function Zb(e){let t,n,r,o=bC(),i,s=[],a=[],c,l,u,d,h,g,y,S,A,N,M,D,fe,me,se,qe,Vt,tn,Lt,Mn=!1,Fn,so=!1,ss,as,qu=[],Vu="draft",cs,ls,us,ds,ps,Lu=[],Mu=!1,Fu=!1;for(let nn=0;nn<e.length;nn+=1){let Zn=e[nn],ao=Zn.startsWith("--")?Zn.indexOf("="):-1,P=ao<0?Zn:Zn.slice(0,ao),Jn=ao<0?void 0:Zn.slice(ao+1);if(Jn!=null&&["--json","--follow","--wait","--yes","--pending-wait"].includes(P))throw new C("cli.invalid-arguments",`${P} does not accept a value.`);if(P.startsWith("--")){let V=P.slice(2);if(a.includes(V)&&V!="set"&&V!="unset")throw new C("cli.invalid-arguments",`Duplicate option --${V}.`);a.push(V)}if(["--scope","--key","--space"].includes(P)){let V=Jn??e[++nn];if(V==null||V.startsWith("--"))throw new C("cli.invalid-arguments",`${P} requires a value.`);if(P==="--scope")t=V;else if(P==="--key")n=V;else r=V}else if(P=="--json")so=!0;else if(P=="--follow")Mn=!0;else if(P=="--wait")Mu=!0;else if(P=="--yes")Fu=!0;else if(P=="--pending-wait")cs=!0;else if(P=="--idempotency-key"||P=="--expected-publication"||P=="--revision"||P=="--publication"||P=="--pointer"||P=="--offset"||P=="--max-bytes"||P=="--code"||P=="--connection"||P=="--cron"||P=="--description"||P=="--every"||P=="--expected-revision"||P=="--file"||P=="--flow"||P=="--name"||P=="--source"||P=="--input"||P=="--trigger"||P=="--outputs"||P=="--status"||P=="--cursor"||P=="--limit"||P=="--after"||P=="--comment"||P=="--timeout"||P=="--timezone"||P=="--set"||P=="--unset"){let V=Jn??e[nn+1];if(V==null||V.length==0||Jn==null&&V.startsWith("-")&&V!="-")throw new C("cli.invalid-arguments",`${P} requires a value.`);if(Jn==null)nn++;if(P=="--idempotency-key")o=V;else if(P=="--expected-publication")i=V;else if(P=="--revision")u=V;else if(P=="--publication")d=V;else if(P=="--pointer")h=V;else if(P=="--after")A=V;else if(P=="--code")M=V;else if(P=="--connection")D=V;else if(P=="--cron")fe=V;else if(P=="--description")se=V;else if(P=="--every")qe=V;else if(P=="--expected-revision")Vt=V;else if(P=="--file")tn=V;else if(P=="--flow")Lt=V;else if(P=="--name")as=V;else if(P=="--comment")us=V;else if(P=="--input")Fn=V;else if(P=="--trigger")c=V;else if(P=="--outputs")l=V;else if(P=="--cursor")me=V;else if(P=="--timezone")ps=V;else if(P=="--set")qu.push(V);else if(P=="--unset")Lu.push(V);else if(P=="--source"){if(V!="draft"&&V!="live")throw new C("cli.invalid-arguments","--source must be draft or live.");Vu=V}else if(P=="--status"){if(!wC.has(V))throw new C("cli.invalid-arguments",`Unknown Run status ${JSON.stringify(V)}.`);ls=V}else{let kt=Number(V),_w=P=="--offset"?0:1;if(!Number.isSafeInteger(kt)||kt<_w||P=="--limit"&&kt>100||P=="--max-bytes"&&kt>1048576)throw new C("cli.invalid-arguments",`${P} has an invalid value.`);if(P=="--limit")ss=kt;else if(P=="--offset")g=kt;else if(P=="--max-bytes")y=kt;else ds=kt}}else if(P.startsWith("-"))throw new C("cli.invalid-arguments",`Unknown option ${JSON.stringify(P)}.`);else s.push(P)}if(A!=null){if(s[0]=="runs"&&s[1]=="results")S=A;else if(N=Number(A),!Number.isSafeInteger(N)||N<0)throw new C("cli.invalid-arguments","--after must be a non-negative event sequence.")}return{scope:t,key:n,space:r,idempotencyKey:o,...S==null?{}:{resultAfter:S},...y==null?{}:{maxBytes:y},...g==null?{}:{offset:g},...h==null?{}:{pointer:h},...u==null?{}:{revision:u},...d==null?{}:{publication:d},...us==null?{}:{comment:us},...i==null?{}:{expectedPublication:i},...N==null?{}:{after:N},...M==null?{}:{code:M},...D==null?{}:{connection:D},...fe==null?{}:{cron:fe},...me==null?{}:{cursor:me},...se==null?{}:{description:se},...qe==null?{}:{every:qe},...Vt==null?{}:{expectedRevision:Vt},...tn==null?{}:{file:tn},...Lt==null?{}:{flow:Lt},follow:Mn,...Fn==null?{}:{input:Fn},json:so,...ss==null?{}:{limit:ss},...as==null?{}:{name:as},positionals:s,options:a,...c==null?{}:{trigger:c},...l==null?{}:{outputs:l},sets:qu,source:Vu,...ls==null?{}:{status:ls},...cs==null?{}:{pendingWait:cs},...ds==null?{}:{timeoutMs:ds},...ps==null?{}:{timezone:ps},unsets:Lu,wait:Mu,yes:Fu}}var vC=0.1,xC=3,no=rt("type",[x({type:w("focus"),nodeId:_().min(1)}),x({type:w("zoom"),zoom:U().min(vC).max(xC)}),x({type:w("pan"),dx:U(),dy:U()}),x({type:w("fit")})]);var Ou=_().trim().refine((e)=>[...e].length<=2000,"Wait comment must contain at most 2,000 Unicode code points.").nullable().optional();var qn=_().min(1),DC=Ae(),qC=x({kind:w("graph.trigger.create"),nodeId:qn,key:qn,connectionId:qn.optional(),name:qn.optional(),config:oe(qn,DC),schedule:zt.readonly().optional()});function ju(e){return Ht(e),R(lt()).min(1).parse(e).map((t,n)=>{let{kind:r}=Fr(t,n,E({kind:qn}).parse);return r=="graph.trigger.create"?Fr(t,n,qC.parse):yy(t,n)})}var Jb=[{snapshot:{configInputs:[{handle:"baseId",jsonSchema:{type:"string",pattern:"^app[A-Za-z0-9]{14}$"},nullable:!1},{handle:"formula",jsonSchema:{type:"string"},nullable:!1,value:""},{handle:"tableIdOrName",jsonSchema:{type:"string",minLength:1,maxLength:255},nullable:!1},{handle:"triggerField",jsonSchema:{type:"string",minLength:1,maxLength:255,pattern:"^[^}]*$"},nullable:!1},{handle:"view",jsonSchema:{type:"string"},nullable:!1,value:""},{group:"Advanced settings",collapsed:!0},{handle:"fields",jsonSchema:{type:"array",items:{type:"string",minLength:1}},nullable:!1,value:[]},{handle:"maxRecordsPerPoll",jsonSchema:{type:"integer",minimum:1,maximum:1000},nullable:!1,value:200}],definitionVersion:2,description:"Polls an Airtable table and triggers when a record is created or updated, ordered by a time field.",displayName:"Record Created or Updated",key:"airtable.on_record_changed",name:"on_record_changed",outputs:[{handle:"events",jsonSchema:{type:"array",items:{type:"object",properties:{baseId:{type:"string"},createdTime:{type:"string"},fields:{type:"object"},recordId:{type:"string"},tableIdOrName:{type:"string"},triggerField:{type:"string"},triggerFieldValue:{type:"string"}},additionalProperties:!1,required:["baseId","tableIdOrName","recordId","createdTime","triggerField","triggerFieldValue","fields"]}},nullable:!1}],provider:"airtable",type:"poll"},options:!1},{snapshot:{key:"asana.on_task_event",provider:"asana",name:"on_task_event",displayName:"Project Task Event",description:"Receives tasks added to a project, completion changes, and selected custom field changes. Task details represent current state, not historical state.",definitionVersion:2,type:"integration",endpoint:{methods:["POST"],body:{formats:["json"],allowArray:!1,allowEmpty:!0},successStatus:200},configInputs:[{handle:"projectId",jsonSchema:{type:"string",minLength:1,title:"Project ID"},nullable:!1},{handle:"eventTypes",jsonSchema:{type:"array",items:{type:"string",enum:["task.added","task.completed","task.field_changed"]},minItems:1,uniqueItems:!0,title:"Events"},nullable:!1,value:["task.added","task.completed"]},{handle:"customFieldId",jsonSchema:{type:"string",minLength:1,title:"Custom field ID"},nullable:!0}],outputs:[{handle:"projectId",jsonSchema:{type:"string"},nullable:!1},{handle:"events",jsonSchema:{type:"array",items:{type:"object",properties:{event:{type:"string"},task:{type:"object"},change:{type:"object"}},required:["event","task","change"]}},nullable:!1}]},callback:{headers:["x-hook-secret","x-hook-signature"],query:[]},options:!1},{snapshot:{key:"calendly.on_booking_event",provider:"calendly",name:"on_booking_event",displayName:"Booking Created or Canceled",description:"Receives bookings and cancellations, preserving reschedule links. Requires a Personal Access Token connection.",definitionVersion:2,type:"integration",endpoint:{methods:["POST"],body:{formats:["json"],allowArray:!1,allowEmpty:!1},successStatus:200},configInputs:[{handle:"scope",jsonSchema:{type:"string",enum:["user","organization"],title:"Scope"},nullable:!1,value:"user"},{handle:"eventTypes",jsonSchema:{type:"array",items:{type:"string",enum:["invitee.created","invitee.canceled"]},minItems:1,uniqueItems:!0,title:"Events"},nullable:!1,value:["invitee.created","invitee.canceled"]}],outputs:[{handle:"event",jsonSchema:{type:"string",enum:["invitee.created","invitee.canceled"]},nullable:!1},{handle:"inviteeUri",jsonSchema:{type:"string"},nullable:!1},{handle:"createdAt",jsonSchema:{type:"string"},nullable:!1},{handle:"body",jsonSchema:{type:"object"},nullable:!1}]},callback:{headers:["calendly-webhook-signature"],query:[]},options:!1},{snapshot:{key:"clickup.on_task_event",provider:"clickup",name:"on_task_event",displayName:"Task Event",description:"Receives task creation, status changes, and new comments in a ClickUp Workspace or List.",definitionVersion:2,type:"integration",endpoint:{methods:["POST"],body:{formats:["json"],allowArray:!1,allowEmpty:!1},successStatus:200},configInputs:[{handle:"workspaceId",jsonSchema:{type:"string",pattern:"^[0-9]+$",title:"Workspace ID"},nullable:!1},{handle:"listId",jsonSchema:{type:"string",pattern:"^[0-9]+$",title:"List ID"},nullable:!0},{handle:"eventTypes",jsonSchema:{type:"array",items:{type:"string",enum:["taskCreated","taskStatusUpdated","taskCommentPosted"]},minItems:1,uniqueItems:!0,title:"Events"},nullable:!1,value:["taskCreated","taskStatusUpdated","taskCommentPosted"]}],outputs:[{handle:"event",jsonSchema:{type:"string",enum:["taskCreated","taskStatusUpdated","taskCommentPosted"]},nullable:!1},{handle:"taskId",jsonSchema:{type:"string"},nullable:!1},{handle:"body",jsonSchema:{type:"object"},nullable:!1}]},callback:{headers:["x-signature"],query:[]},options:!1},{snapshot:{key:"feishu_app_bot.on_event",provider:"feishu_app_bot",name:"on_event",displayName:"Application Event",description:"Receives selected Feishu application events through a shared event source.",definitionVersion:2,type:"integration",endpoint:{methods:["POST"],body:{formats:["json"],allowArray:!1,allowEmpty:!1},successStatus:200},configInputs:[{handle:"sourceId",jsonSchema:{type:"string",pattern:"^source_[0-9a-f]{32}$",title:"Event source"},nullable:!1},{handle:"eventTypes",jsonSchema:{type:"array",items:{type:"string",pattern:"^[a-z][a-z0-9_.]{0,127}$"},minItems:1,maxItems:200,uniqueItems:!0,title:"Event types"},nullable:!1},{handle:"chatIds",jsonSchema:{type:"array",items:{type:"string",minLength:1,maxLength:256},maxItems:100,uniqueItems:!0,title:"Chat IDs"},nullable:!0,description:"Leave empty to receive events from all chats available to the source."},{handle:"resource",jsonSchema:{type:"object",properties:{kind:{type:"string",enum:["document","calendar","approval"]},id:{type:"string",minLength:1,maxLength:256},documentType:{type:"string",enum:["doc","docx","sheet","bitable","file","folder"]}},additionalProperties:!1,required:["kind","id"],title:"Resource subscription"},nullable:!0}],outputs:[{handle:"event",jsonSchema:{type:"string"},nullable:!1},{handle:"deliveryId",jsonSchema:{type:"string"},nullable:!1},{handle:"appId",jsonSchema:{type:"string"},nullable:!1},{handle:"tenantKey",jsonSchema:{type:"string"},nullable:!1},{handle:"occurredAt",jsonSchema:{type:"string"},nullable:!0},{handle:"body",jsonSchema:{type:"object"},nullable:!1}]},source:{createSchema:{$schema:"https://json-schema.org/draft/2020-12/schema",type:"object",properties:{kind:{type:"string",const:"feishu"},version:{type:"number",const:1},name:{type:"string",minLength:1,maxLength:128},connectionId:{type:"string",minLength:1,maxLength:256},teamId:{anyOf:[{type:"string",minLength:1,maxLength:256},{type:"null"}]},verificationToken:{type:"string",minLength:1,maxLength:256},encryptKey:{type:"string",minLength:1,maxLength:256},eventTypes:{minItems:1,maxItems:200,type:"array",items:{type:"string",pattern:"^[a-z][a-z0-9_.:]{0,127}$"}},manageSubscriptions:{type:"boolean"}},required:["version","name","connectionId","teamId","verificationToken","encryptKey","eventTypes","manageSubscriptions"],additionalProperties:!1},updateSchema:{$schema:"https://json-schema.org/draft/2020-12/schema",type:"object",properties:{version:{type:"number",const:1},expectedRevision:{type:"integer",exclusiveMinimum:0,maximum:9007199254740991},name:{type:"string",minLength:1,maxLength:128},enabled:{type:"boolean"},eventTypes:{minItems:1,maxItems:200,type:"array",items:{type:"string",pattern:"^[a-z][a-z0-9_.:]{0,127}$"}},verificationToken:{type:"string",minLength:1,maxLength:256},signingSecret:{type:"string",minLength:1,maxLength:256},encryptKey:{type:"string",minLength:1,maxLength:256}},required:["version","expectedRevision","name","enabled","eventTypes"],additionalProperties:!1},kind:"feishu",provider:"feishu_app_bot",triggerId:"feishu_app_bot.on_event",maximumBodyBytes:65536,applicationIngress:!1,managed:!1},options:!1,eventSource:"feishu"},{snapshot:{key:"fireflies.on_meeting_ready",provider:"fireflies",name:"on_meeting_ready",displayName:"Meeting Transcript or Summary Ready",description:"Receives separate transcript and summary readiness events through Fireflies Webhooks V2 after checking meeting access.",definitionVersion:2,type:"integration",endpoint:{methods:["POST"],body:{formats:["json"],allowArray:!1,allowEmpty:!1},successStatus:200},configInputs:[{handle:"sourceId",jsonSchema:{type:"string",pattern:"^source_[0-9a-f]{32}$",title:"Event source"},nullable:!1},{handle:"eventTypes",jsonSchema:{type:"array",items:{type:"string",enum:["meeting.transcribed","meeting.summarized"]},minItems:1,maxItems:2,uniqueItems:!0,title:"Events"},nullable:!1,value:["meeting.transcribed","meeting.summarized"]}],outputs:[{handle:"event",jsonSchema:{type:"string"},nullable:!1},{handle:"deliveryId",jsonSchema:{type:"string"},nullable:!1},{handle:"accountId",jsonSchema:{type:"string"},nullable:!1},{handle:"meetingId",jsonSchema:{type:"string"},nullable:!1},{handle:"body",jsonSchema:{type:"object"},nullable:!1}]},callback:{headers:[],query:[]},source:{createSchema:{$schema:"https://json-schema.org/draft/2020-12/schema",type:"object",properties:{kind:{type:"string",const:"fireflies"},version:{type:"number",const:1},name:{type:"string",minLength:1,maxLength:128},connectionId:{type:"string",minLength:1,maxLength:256},teamId:{anyOf:[{type:"string",minLength:1,maxLength:256},{type:"null"}]},signingSecret:{type:"string",minLength:1,maxLength:256},eventTypes:{minItems:1,maxItems:2,type:"array",items:{type:"string",enum:["meeting.transcribed","meeting.summarized"]}}},required:["kind","version","name","connectionId","teamId","signingSecret","eventTypes"],additionalProperties:!1},updateSchema:{$schema:"https://json-schema.org/draft/2020-12/schema",type:"object",properties:{version:{type:"number",const:1},expectedRevision:{type:"integer",exclusiveMinimum:0,maximum:9007199254740991},name:{type:"string",minLength:1,maxLength:128},enabled:{type:"boolean"},eventTypes:{minItems:1,maxItems:200,type:"array",items:{type:"string",pattern:"^[a-z][a-z0-9_.:]{0,127}$"}},verificationToken:{type:"string",minLength:1,maxLength:256},signingSecret:{type:"string",minLength:1,maxLength:256},encryptKey:{type:"string",minLength:1,maxLength:256}},required:["version","expectedRevision","name","enabled","eventTypes"],additionalProperties:!1},kind:"fireflies",provider:"fireflies",triggerId:"fireflies.on_meeting_ready",maximumBodyBytes:65536,applicationIngress:!1,managed:!1},options:!1,eventSource:"fireflies"},{snapshot:{configInputs:[{handle:"events",jsonSchema:{type:"array",items:{type:"string",enum:["*","branch_protection_configuration","branch_protection_rule","check_run","check_suite","code_scanning_alert","commit_comment","create","custom_property_values","delete","dependabot_alert","deploy_key","deployment","deployment_status","discussion","discussion_comment","fork","gollum","issue_comment","issue_dependencies","issues","label","member","meta","milestone","package","page_build","project","project_card","project_column","public","pull_request","pull_request_review","pull_request_review_comment","pull_request_review_thread","push","registry_package","release","repository","repository_advisory","repository_import","repository_ruleset","repository_vulnerability_alert","secret_scanning_alert","secret_scanning_alert_location","secret_scanning_scan","security_and_analysis","star","status","sub_issues","team_add","watch","workflow_job","workflow_run"]},minItems:1,uniqueItems:!0},nullable:!1},{handle:"insecureSsl",jsonSchema:{type:"boolean"},nullable:!1,value:!1},{handle:"owner",jsonSchema:{type:"string",pattern:"^[a-zA-Z0-9](?:[a-zA-Z0-9]|-(?=[a-zA-Z0-9])){0,38}$"},nullable:!1},{handle:"repo",jsonSchema:{type:"string",pattern:"^(?!\\.{1,2}$)[a-zA-Z0-9._-]{1,100}$"},nullable:!1}],definitionVersion:2,description:"Triggers when selected GitHub webhook events occur in a repository.",displayName:"Repository Event",endpoint:{body:{allowArray:!1,allowEmpty:!1,formats:["json"]},methods:["POST"],successStatus:202},key:"github.on_repo_event",name:"on_repo_event",outputs:[{handle:"body",jsonSchema:{type:"object"},nullable:!1},{handle:"deliveryId",jsonSchema:{type:"string"},nullable:!1},{handle:"event",jsonSchema:{type:"string"},nullable:!1}],provider:"github",type:"integration"},callback:{headers:["x-github-delivery","x-github-event","x-hub-signature-256"],query:[]},options:!1},{snapshot:{configInputs:[{handle:"owner",jsonSchema:{type:"string",pattern:"^[a-zA-Z0-9](?:[a-zA-Z0-9]|-(?=[a-zA-Z0-9])){0,38}$"},nullable:!1},{handle:"repo",jsonSchema:{type:"string",pattern:"^(?!\\.{1,2}$)[a-zA-Z0-9._-]{1,100}$"},nullable:!1},{handle:"number",jsonSchema:{type:"integer",minimum:1},nullable:!1,description:"Number of the pull request to watch."}],definitionVersion:2,description:"Watches one pull request using notifications and periodic checks. Starts from its current state; reports observed changes, not every intermediate transition or review event.",displayName:"Watch Pull Request",endpoint:{body:{allowArray:!1,allowEmpty:!1,formats:["json"]},methods:["POST"],successStatus:202},key:"github.watch_pull_request",name:"watch_pull_request",provider:"github",type:"integration",outputs:[{handle:"pullRequest",jsonSchema:{type:"object",properties:{id:{type:"integer"},number:{type:"integer"},title:{type:"string"},url:{type:"string"},state:{type:"string",enum:["open","closed"]},draft:{type:"boolean"},merged:{type:"boolean"},updatedAt:{type:"string"},headSha:{type:"string"},baseSha:{type:"string"}},additionalProperties:!1,required:["id","number","title","url","state","draft","merged","updatedAt","headSha","baseSha"]},nullable:!1},{handle:"version",jsonSchema:{type:"string"},nullable:!1}]},callback:{headers:["x-github-delivery","x-github-event","x-hub-signature-256"],query:[]},options:!1,intervalMs:300000},{snapshot:{configInputs:[{handle:"events",jsonSchema:{type:"array",items:{type:"string",enum:["push","tag_push","issues","confidential_issues","note","confidential_note","merge_requests","job","pipeline","wiki_page","deployment","feature_flag","releases","milestone","emoji","resource_access_token","resource_deploy_token"]},minItems:1,uniqueItems:!0},nullable:!1},{handle:"insecureSsl",jsonSchema:{type:"boolean"},nullable:!1,value:!1},{handle:"project",jsonSchema:{type:"string",minLength:1,maxLength:255,pattern:"^(?:[0-9]+|(?!\\.{1,2}(?:/|$))[A-Za-z0-9_.][A-Za-z0-9_.-]*(?:/(?!\\.{1,2}(?:/|$))[A-Za-z0-9_.][A-Za-z0-9_.-]*)*)$"},nullable:!1},{handle:"pushBranchFilter",jsonSchema:{type:"string",maxLength:255},nullable:!1,value:""}],definitionVersion:2,description:"Triggers when selected GitLab webhook events occur in a project.",displayName:"Project Event",endpoint:{body:{allowArray:!1,allowEmpty:!1,formats:["json"]},methods:["POST"],successStatus:202},key:"gitlab.on_project_event",name:"on_project_event",outputs:[{handle:"body",jsonSchema:{type:"object"},nullable:!1},{handle:"deliveryId",jsonSchema:{type:"string"},nullable:!1},{handle:"event",jsonSchema:{type:"string"},nullable:!1},{handle:"gitlabEvent",jsonSchema:{type:"string"},nullable:!1}],provider:"gitlab",type:"integration"},callback:{headers:["idempotency-key","x-gitlab-event","x-gitlab-token"],query:[]},options:!1},{snapshot:{configInputs:[{handle:"labelNamesOrIds",jsonSchema:{type:"array",items:{type:"string",minLength:1}},nullable:!1,description:"Only trigger on messages carrying all of these labels, referenced by name or ID.",value:[]},{handle:"readStatus",jsonSchema:{type:"string",enum:["Read","Unread","All"]},nullable:!1,value:"All"},{handle:"search",jsonSchema:{type:"string"},nullable:!1,description:"Gmail search-syntax query the message must match.",value:""},{handle:"sender",jsonSchema:{type:"string"},nullable:!1,description:"Only trigger on messages whose sender matches this address or name.",value:""},{group:"Advanced settings",collapsed:!0},{handle:"includeDrafts",jsonSchema:{type:"boolean"},nullable:!1,value:!1,description:"Also trigger on draft messages."},{handle:"includeSpamAndTrash",jsonSchema:{type:"boolean"},nullable:!1,value:!1,description:"Also trigger on messages in SPAM and TRASH."},{handle:"maxMessagesPerPoll",jsonSchema:{type:"integer",minimum:1,maximum:100},nullable:!1,value:25}],definitionVersion:2,description:"Polls the Gmail mailbox and triggers when a new message is received.",displayName:"New Message Received",key:"gmail.on_message_received",name:"on_message_received",outputs:[{handle:"events",jsonSchema:{type:"array",items:{type:"object",properties:{historyId:{type:["string","null"]},labelIds:{type:"array",items:{type:"string"}},messageId:{type:"string"},messageTimestamp:{type:"string"},sender:{type:"string"},subject:{type:"string"},threadId:{type:"string"},to:{type:"string"}},additionalProperties:!1,required:["messageId","threadId","historyId","labelIds","subject","sender","to","messageTimestamp"]}},nullable:!1}],provider:"gmail",type:"poll"},options:!1},{snapshot:{configInputs:[{handle:"calendarId",jsonSchema:{type:"string",minLength:1,maxLength:1024},nullable:!1},{handle:"changes",jsonSchema:{type:"array",items:{type:"string",enum:["created","updated","cancelled"]},minItems:1,uniqueItems:!0},nullable:!1,value:["created","updated","cancelled"]},{handle:"matchTerm",jsonSchema:{type:"string"},nullable:!1,value:""},{group:"Advanced settings",collapsed:!0},{handle:"maxEventsPerPoll",jsonSchema:{type:"integer",minimum:1,maximum:500},nullable:!1,value:100}],definitionVersion:2,description:"Polls a Google Calendar and triggers when an event is created, updated or cancelled.",displayName:"Event Changed",key:"googlecalendar.on_event_changed",name:"on_event_changed",outputs:[{handle:"events",jsonSchema:{type:"array",items:{type:"object",properties:{attendeeEmails:{type:"array",items:{type:"string"}},calendarId:{type:"string"},changeType:{type:"string",enum:["created","updated","cancelled"]},created:{type:["string","null"]},creatorEmail:{type:["string","null"]},description:{type:["string","null"]},end:{type:["object","null"]},eventId:{type:"string"},eventType:{type:["string","null"]},htmlLink:{type:["string","null"]},isAllDay:{type:"boolean"},location:{type:["string","null"]},organizerEmail:{type:["string","null"]},recurringEventId:{type:["string","null"]},start:{type:["object","null"]},status:{type:"string"},summary:{type:["string","null"]},updated:{type:["string","null"]}},additionalProperties:!1,required:["changeType","calendarId","eventId","status","summary","description","location","htmlLink","start","end","isAllDay","organizerEmail","creatorEmail","attendeeEmails","recurringEventId","eventType","created","updated"]}},nullable:!1}],provider:"googlecalendar",type:"poll"},options:!1},{snapshot:{configInputs:[{handle:"driveId",jsonSchema:{type:"string",minLength:1,maxLength:256},nullable:!0,description:"Optional shared drive ID. Omit it to monitor the connected account."},{handle:"includeCorpusRemovals",jsonSchema:{type:"boolean"},nullable:!1,value:!1,description:"Include the accessible file resource when an item leaves the change corpus."},{handle:"includeItemsFromAllDrives",jsonSchema:{type:"boolean"},nullable:!1,value:!0,description:"Include items from My Drive and shared drives."},{handle:"includeRemoved",jsonSchema:{type:"boolean"},nullable:!1,value:!0,description:"Include changes caused by deletion or loss of access."},{handle:"pageSize",jsonSchema:{type:"integer",minimum:1,maximum:100},nullable:!1,value:100,description:"Maximum changes included in one Flow Run."},{handle:"restrictToMyDrive",jsonSchema:{type:"boolean"},nullable:!1,value:!1,description:"Restrict changes to the My Drive hierarchy."}],definitionVersion:2,description:"Uses a Google Drive changes.watch channel and triggers when Drive changes are available.",displayName:"Changes Detected",endpoint:{body:{allowArray:!1,allowEmpty:!0,formats:["json"]},methods:["POST"],successStatus:204},key:"googledrive.changes_detected",name:"changes_detected",outputs:[{handle:"events",jsonSchema:{type:"array",items:{type:"object",properties:{changeId:{type:"string"},changeType:{type:["string","null"]},driveId:{type:["string","null"]},file:{type:["object","null"]},fileId:{type:["string","null"]},notification:{type:"object",properties:{changedTypes:{type:"array",items:{type:"string"}},messageNumber:{type:["string","null"]},resourceState:{type:"string"},resourceUri:{type:["string","null"]}},additionalProperties:!1,required:["resourceState","changedTypes","messageNumber","resourceUri"]},removed:{type:"boolean"},time:{type:["string","null"]}},additionalProperties:!1,required:["changeId","changeType","removed","time","fileId","driveId","file","notification"]}},nullable:!1}],provider:"googledrive",type:"integration"},callback:{headers:["x-goog-changed","x-goog-channel-id","x-goog-channel-token","x-goog-message-number","x-goog-resource-id","x-goog-resource-state","x-goog-resource-uri"],query:[]},options:!1},{snapshot:{configInputs:[{handle:"changeType",jsonSchema:{type:"string",enum:["created","updated"]},nullable:!1},{handle:"driveId",jsonSchema:{type:"string",pattern:"^[A-Za-z0-9_-]{0,512}$"},nullable:!1,value:""},{handle:"folderId",jsonSchema:{type:"string",pattern:"^[A-Za-z0-9_-]{2,512}$"},nullable:!1},{handle:"itemTypes",jsonSchema:{type:"array",items:{type:"string",enum:["file","folder"]},minItems:1,uniqueItems:!0},nullable:!1,value:["file"]},{handle:"mimeTypes",jsonSchema:{type:"array",items:{type:"string",minLength:1}},nullable:!1,value:[]},{handle:"namePrefix",jsonSchema:{type:"string"},nullable:!1,value:""},{group:"Advanced settings",collapsed:!0},{handle:"maxFilesPerPoll",jsonSchema:{type:"integer",minimum:1,maximum:200},nullable:!1,value:50}],definitionVersion:2,description:"Polls one Google Drive folder and triggers when a file or folder directly inside it is created or updated.",displayName:"File or Folder Change in a Folder",key:"googledrive.on_file_change",name:"on_file_change",outputs:[{handle:"events",jsonSchema:{type:"array",items:{type:"object",properties:{createdTime:{type:["string","null"]},driveId:{type:["string","null"]},eventType:{type:"string",enum:["file_created","file_updated","folder_created","folder_updated"]},fileId:{type:"string"},itemType:{type:"string",enum:["file","folder"]},lastModifyingUser:{type:["object","null"]},mimeType:{type:"string"},modifiedTime:{type:["string","null"]},name:{type:"string"},parents:{type:"array",items:{type:"string"}},size:{type:"string"},webViewLink:{type:["string","null"]}},additionalProperties:!1,required:["eventType","itemType","fileId","name","mimeType","createdTime","modifiedTime","parents","webViewLink","driveId","lastModifyingUser"]}},nullable:!1}],provider:"googledrive",type:"poll"},options:!1},{snapshot:{configInputs:[{handle:"driveId",jsonSchema:{type:"string",minLength:1,maxLength:256},nullable:!0,description:"Optional shared drive ID. Omit it to monitor the connected account."},{handle:"includeCorpusRemovals",jsonSchema:{type:"boolean"},nullable:!1,value:!1,description:"Include the accessible file resource when an item leaves the change corpus."},{handle:"includeItemsFromAllDrives",jsonSchema:{type:"boolean"},nullable:!1,value:!0,description:"Include items from My Drive and shared drives."},{handle:"includeRemoved",jsonSchema:{type:"boolean"},nullable:!1,value:!0,description:"Include changes caused by deletion or loss of access."},{handle:"pageSize",jsonSchema:{type:"integer",minimum:1,maximum:100},nullable:!1,value:100,description:"Maximum changes included in one Flow Run."},{handle:"restrictToMyDrive",jsonSchema:{type:"boolean"},nullable:!1,value:!1,description:"Restrict changes to the My Drive hierarchy."}],definitionVersion:2,description:"Monitors Drive changes using notifications and periodic scans of the same change stream.",displayName:"Watch Changes",endpoint:{body:{allowArray:!1,allowEmpty:!0,formats:["json"]},methods:["POST"],successStatus:204},key:"googledrive.watch_changes",name:"watch_changes",outputs:[{handle:"events",jsonSchema:{type:"array",items:{type:"object"}},nullable:!1}],provider:"googledrive",type:"integration"},callback:{headers:["x-goog-changed","x-goog-channel-id","x-goog-channel-token","x-goog-message-number","x-goog-resource-id","x-goog-resource-state","x-goog-resource-uri"],query:[]},options:!1,intervalMs:300000},{snapshot:{configInputs:[{handle:"columnRange",jsonSchema:{type:"string",pattern:"^[A-Za-z]{1,3}(?::[A-Za-z]{1,3})?$"},nullable:!1,value:"A:ZZZ"},{handle:"sheet",jsonSchema:{type:"string",minLength:1},nullable:!1},{handle:"spreadsheetId",jsonSchema:{type:"string",minLength:1},nullable:!1},{group:"Advanced settings",collapsed:!0},{handle:"dateTimeRender",jsonSchema:{type:"string",enum:["FORMATTED_STRING","SERIAL_NUMBER"]},nullable:!1,value:"FORMATTED_STRING"},{handle:"firstDataRow",jsonSchema:{type:"integer",minimum:1},nullable:!1,value:2},{handle:"headerRow",jsonSchema:{type:"integer",minimum:1},nullable:!1,value:1},{handle:"maxRowsPerPoll",jsonSchema:{type:"integer",minimum:1,maximum:500},nullable:!1,value:100},{handle:"valueRender",jsonSchema:{type:"string",enum:["UNFORMATTED_VALUE","FORMATTED_VALUE","FORMULA"]},nullable:!1,value:"UNFORMATTED_VALUE"}],definitionVersion:2,description:"Polls a sheet and triggers once for every new row appended below the last row already seen.",displayName:"New Row Added",key:"googlesheets.on_row_added",name:"on_row_added",outputs:[{handle:"events",jsonSchema:{type:"array",items:{type:"object",properties:{row:{type:"object"},rowNumber:{type:"integer"},sheetId:{type:"integer"},sheetTitle:{type:"string"},spreadsheetId:{type:"string"},values:{type:"array",items:{}}},additionalProperties:!1,required:["spreadsheetId","sheetId","sheetTitle","rowNumber","row","values"]}},nullable:!1}],provider:"googlesheets",type:"poll"},options:!1},{snapshot:{key:"intercom.on_conversation_event",provider:"intercom",name:"on_conversation_event",displayName:"Customer Conversation or Ticket",description:"Receives customer conversations, customer replies and new tickets from a verified Intercom application event source. Administrator replies are excluded.",definitionVersion:2,type:"integration",endpoint:{methods:["POST"],body:{formats:["json"],allowArray:!1,allowEmpty:!1},successStatus:200},configInputs:[{handle:"sourceId",jsonSchema:{type:"string",pattern:"^source_[0-9a-f]{32}$",title:"Event source"},nullable:!1},{handle:"eventTypes",jsonSchema:{type:"array",items:{type:"string",enum:["conversation.user.created","conversation.user.replied","ticket.created"]},minItems:1,maxItems:3,uniqueItems:!0,title:"Events"},nullable:!1,value:["conversation.user.created","conversation.user.replied","ticket.created"]}],outputs:[{handle:"event",jsonSchema:{type:"string"},nullable:!1},{handle:"deliveryId",jsonSchema:{type:"string"},nullable:!1},{handle:"workspaceId",jsonSchema:{type:"string"},nullable:!1},{handle:"objectId",jsonSchema:{type:"string"},nullable:!1},{handle:"body",jsonSchema:{type:"object",properties:{},additionalProperties:!0},nullable:!1}]},callback:{headers:[],query:[]},source:{createSchema:{$schema:"https://json-schema.org/draft/2020-12/schema",type:"object",properties:{kind:{type:"string",const:"intercom"},version:{type:"number",const:1},name:{type:"string",minLength:1,maxLength:128},connectionId:{type:"string",minLength:1,maxLength:256},teamId:{anyOf:[{type:"string",minLength:1,maxLength:256},{type:"null"}]},appId:{type:"string",minLength:1,maxLength:256},signingSecret:{type:"string",minLength:1,maxLength:256},eventTypes:{minItems:1,maxItems:3,type:"array",items:{type:"string",enum:["conversation.user.created","conversation.user.replied","ticket.created"]}}},required:["kind","version","name","connectionId","teamId","appId","signingSecret","eventTypes"],additionalProperties:!1},updateSchema:{$schema:"https://json-schema.org/draft/2020-12/schema",type:"object",properties:{version:{type:"number",const:1},expectedRevision:{type:"integer",exclusiveMinimum:0,maximum:9007199254740991},name:{type:"string",minLength:1,maxLength:128},enabled:{type:"boolean"},eventTypes:{minItems:1,maxItems:200,type:"array",items:{type:"string",pattern:"^[a-z][a-z0-9_.:]{0,127}$"}},verificationToken:{type:"string",minLength:1,maxLength:256},signingSecret:{type:"string",minLength:1,maxLength:256},encryptKey:{type:"string",minLength:1,maxLength:256}},required:["version","expectedRevision","name","enabled","eventTypes"],additionalProperties:!1},kind:"intercom",provider:"intercom",triggerId:"intercom.on_conversation_event",maximumBodyBytes:65536,applicationIngress:!0,managed:!1},options:!1,eventSource:"intercom"},{snapshot:{key:"jira.on_issue_event",provider:"jira",name:"on_issue_event",displayName:"Issue or Comment Event",description:"Receives Jira Cloud issue creation, issue updates and new comments through a shared project webhook with automatic renewal.",definitionVersion:2,type:"integration",endpoint:{methods:["POST"],body:{formats:["json"],allowArray:!1,allowEmpty:!1},successStatus:200},configInputs:[{handle:"sourceId",jsonSchema:{type:"string",pattern:"^source_[0-9a-f]{32}$",title:"Event source"},nullable:!1},{handle:"eventTypes",jsonSchema:{type:"array",items:{type:"string",enum:["jira:issue_created","jira:issue_updated","comment_created"]},minItems:1,maxItems:3,uniqueItems:!0,title:"Events"},nullable:!1,value:["jira:issue_created","jira:issue_updated","comment_created"]}],outputs:[{handle:"event",jsonSchema:{type:"string"},nullable:!1},{handle:"deliveryId",jsonSchema:{type:"string"},nullable:!1},{handle:"cloudId",jsonSchema:{type:"string"},nullable:!1},{handle:"issueId",jsonSchema:{type:"string"},nullable:!1},{handle:"body",jsonSchema:{type:"object"},nullable:!1}]},callback:{headers:[],query:[]},source:{createSchema:{$schema:"https://json-schema.org/draft/2020-12/schema",type:"object",properties:{kind:{type:"string",const:"jira"},version:{type:"number",const:1},name:{type:"string",minLength:1,maxLength:128},connectionId:{type:"string",minLength:1,maxLength:256},teamId:{anyOf:[{type:"string",minLength:1,maxLength:256},{type:"null"}]},project:{type:"string",minLength:1,maxLength:256},eventTypes:{minItems:1,maxItems:3,type:"array",items:{type:"string",enum:["jira:issue_created","jira:issue_updated","comment_created"]}}},required:["kind","version","name","connectionId","teamId","project","eventTypes"],additionalProperties:!1},updateSchema:{$schema:"https://json-schema.org/draft/2020-12/schema",type:"object",properties:{version:{type:"number",const:1},expectedRevision:{type:"integer",exclusiveMinimum:0,maximum:9007199254740991},name:{type:"string",minLength:1,maxLength:128},enabled:{type:"boolean"},eventTypes:{minItems:1,maxItems:200,type:"array",items:{type:"string",pattern:"^[a-z][a-z0-9_.:]{0,127}$"}},verificationToken:{type:"string",minLength:1,maxLength:256},signingSecret:{type:"string",minLength:1,maxLength:256},encryptKey:{type:"string",minLength:1,maxLength:256}},required:["version","expectedRevision","name","enabled","eventTypes"],additionalProperties:!1},kind:"jira",provider:"jira",triggerId:"jira.on_issue_event",maximumBodyBytes:65536,applicationIngress:!1,managed:!0},options:!1,eventSource:"jira"},{snapshot:{configInputs:[{handle:"teamId",jsonSchema:{type:"string",pattern:"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$",title:"Team ID"},nullable:!1,description:"Linear Team UUID. Use Copy model UUID in Linear to find it."},{handle:"stateIds",jsonSchema:{type:"array",items:{type:"string",pattern:"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},maxItems:50,uniqueItems:!0,title:"Issue statuses"},nullable:!1,value:[],description:"Choose statuses from the selected Team. Empty means all statuses. Matches the current status, not every transition into it."}],definitionVersion:2,description:"Watches new and updated issues in a Linear team with periodic checks. Starts from now without running existing issues. Reports observed current states, not deletions or every intermediate status change.",displayName:"Issue Created or Updated",key:"linear.on_issue_changed",name:"on_issue_changed",outputs:[{handle:"events",jsonSchema:{type:"array",items:{type:"object",properties:{id:{type:"string"},identifier:{type:"string"},title:{type:"string"},url:{type:"string"},teamId:{type:"string"},createdAt:{type:"string"},updatedAt:{type:"string"},state:{type:"object",properties:{id:{type:"string"},name:{type:"string"},type:{type:"string"}},additionalProperties:!1,required:["id","name","type"]}},additionalProperties:!1,required:["id","identifier","title","url","teamId","createdAt","updatedAt","state"]}},nullable:!1}],provider:"linear",type:"poll"},options:!0},{snapshot:{configInputs:[{handle:"dataSourceId",jsonSchema:{type:"string",pattern:"^(?:|[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12})$"},nullable:!1,value:""},{handle:"databaseId",jsonSchema:{type:"string",pattern:"^[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12}$"},nullable:!1},{handle:"events",jsonSchema:{type:"array",items:{type:"string",enum:["page_added","page_updated"]},minItems:1,uniqueItems:!0},nullable:!1,value:["page_added"]},{group:"Advanced settings",collapsed:!0},{handle:"includeProperties",jsonSchema:{type:"boolean"},nullable:!1,value:!0},{handle:"maxItemsPerPoll",jsonSchema:{type:"integer",minimum:1,maximum:100},nullable:!1,value:25}],definitionVersion:2,description:"Polls a Notion database and triggers when a page is added to it or an existing page is edited.",displayName:"Database Page Added or Updated",key:"notion.on_database_page_event",name:"on_database_page_event",outputs:[{handle:"events",jsonSchema:{type:"array",items:{type:"object",properties:{createdBy:{type:"object"},createdTime:{type:"string"},dataSourceId:{type:"string"},databaseId:{type:"string"},event:{type:"string",enum:["page_added","page_updated"]},lastEditedBy:{type:"object"},lastEditedTime:{type:"string"},pageId:{type:"string"},properties:{type:"object"},title:{type:"string"},url:{type:"string"}},additionalProperties:!1,required:["event","pageId","databaseId","dataSourceId","url","title","createdTime","lastEditedTime","createdBy","lastEditedBy"]}},nullable:!1}],provider:"notion",type:"poll"},options:!1},{snapshot:{configInputs:[{handle:"events",jsonSchema:{type:"array",items:{type:"string",enum:["created","updated","deleted"]},minItems:1,uniqueItems:!0},nullable:!1,value:["created","updated"]},{handle:"itemId",jsonSchema:{type:"string"},nullable:!1,value:""},{handle:"itemTypes",jsonSchema:{type:"array",items:{type:"string",enum:["file","folder"]},minItems:1,uniqueItems:!0},nullable:!1,value:["file"]},{handle:"parentFolderId",jsonSchema:{type:"string"},nullable:!1,value:""},{group:"Advanced settings",collapsed:!0},{handle:"maxItemsPerPoll",jsonSchema:{type:"integer",minimum:1,maximum:200},nullable:!1,value:50}],definitionVersion:2,description:"Polls the OneDrive change feed and triggers when a file or folder is created, updated or deleted.",displayName:"File or Folder Changed",key:"one_drive.on_item_changed",name:"on_item_changed",outputs:[{handle:"events",jsonSchema:{type:"array",items:{type:"object",properties:{changeType:{type:"string",enum:["created","updated","deleted"]},createdDateTime:{type:["string","null"]},driveId:{type:["string","null"]},eTag:{type:["string","null"]},itemId:{type:"string"},itemType:{type:"string",enum:["file","folder"]},lastModifiedDateTime:{type:["string","null"]},mimeType:{type:["string","null"]},name:{type:"string"},parentFolderId:{type:["string","null"]},size:{type:["number","null"]},webUrl:{type:"string"}},additionalProperties:!1,required:["itemId","name","changeType","itemType","size","mimeType","webUrl","parentFolderId","driveId","createdDateTime","lastModifiedDateTime","eTag"]}},nullable:!1}],provider:"one_drive",type:"poll"},options:!1},{snapshot:{configInputs:[{handle:"folder",jsonSchema:{type:"string",pattern:"^[A-Za-z0-9_=-]*$"},nullable:!1,value:"inbox",description:"A well-known mail folder name, folder ID, or an empty string for the whole mailbox."},{handle:"readStatus",jsonSchema:{type:"string",enum:["All","Read","Unread"]},nullable:!1,value:"All"},{handle:"senderAddress",jsonSchema:{type:"string"},nullable:!1,value:"",description:"Exact sender address, or empty for any sender."},{handle:"subjectContains",jsonSchema:{type:"string"},nullable:!1,value:"",description:"Case-insensitive subject text."},{handle:"withAttachmentsOnly",jsonSchema:{type:"boolean"},nullable:!1,value:!1},{group:"Advanced settings",collapsed:!0},{handle:"includeDrafts",jsonSchema:{type:"boolean"},nullable:!1,value:!1},{handle:"maxMessagesPerPoll",jsonSchema:{type:"integer",minimum:1,maximum:100},nullable:!1,value:25}],definitionVersion:2,description:"Polls a Microsoft Outlook mail folder and triggers when a new message arrives.",displayName:"New Message Received",key:"outlook.on_message_received",name:"on_message_received",outputs:[{handle:"events",jsonSchema:{type:"array",items:{type:"object",properties:{bodyPreview:{type:"string"},categories:{type:"array",items:{type:"string"}},conversationId:{type:"string"},from:{type:"string"},fromName:{type:"string"},hasAttachments:{type:"boolean"},importance:{type:"string"},internetMessageId:{type:"string"},isDraft:{type:"boolean"},isRead:{type:"boolean"},messageId:{type:"string"},parentFolderId:{type:"string"},receivedDateTime:{type:"string"},subject:{type:"string"},to:{type:"array",items:{type:"string"}},webLink:{type:"string"}},additionalProperties:!1,required:["messageId","internetMessageId","conversationId","subject","bodyPreview","from","fromName","to","receivedDateTime","hasAttachments","isRead","isDraft","importance","categories","parentFolderId","webLink"]}},nullable:!1}],provider:"outlook",type:"poll"},options:!1},{snapshot:{key:"pandadoc.on_document_event",provider:"pandadoc",name:"on_document_event",displayName:"Document Status Changed",description:"Receives document status changes in the connected workspace, optionally only when the entire document is completed.",definitionVersion:2,type:"integration",endpoint:{methods:["POST"],body:{formats:["json"],allowArray:!0,allowEmpty:!1},successStatus:200},configInputs:[{handle:"completedOnly",jsonSchema:{type:"boolean",title:"Completed documents only"},nullable:!1,value:!0}],outputs:[{handle:"events",nullable:!1,jsonSchema:{type:"array",items:{type:"object",properties:{event:{type:"string"},data:{type:"object"}},required:["event","data"]}}}]},callback:{headers:[],query:["signature"]},options:!1},{snapshot:{key:"pipedrive.on_crm_event",provider:"pipedrive",name:"on_crm_event",displayName:"Deal or Contact Event",description:"Receives new deals or contacts, or actual changes to a deal stage or status using Pipedrive Webhooks v2.",definitionVersion:2,type:"integration",endpoint:{methods:["POST"],body:{formats:["json"],allowArray:!1,allowEmpty:!1},successStatus:200},configInputs:[{handle:"eventType",jsonSchema:{type:"string",enum:["deal.created","deal.stage_changed","deal.status_changed","person.created"],title:"Event"},nullable:!1,value:"deal.created"}],outputs:[{handle:"event",jsonSchema:{type:"string",enum:["deal.created","deal.stage_changed","deal.status_changed","person.created"]},nullable:!1},{handle:"deliveryId",jsonSchema:{type:"string"},nullable:!1},{handle:"objectId",jsonSchema:{type:"string"},nullable:!1},{handle:"body",jsonSchema:{type:"object"},nullable:!1}]},callback:{headers:["authorization"],query:[]},options:!1},{snapshot:{key:"resend.on_email_event",provider:"resend",name:"on_email_event",displayName:"Email Received, Bounced or Complained",description:"Receives inbound email, bounce, and complaint notifications. Read message bodies and attachments with Actions.",definitionVersion:2,type:"integration",endpoint:{methods:["POST"],body:{formats:["json"],allowArray:!1,allowEmpty:!1},successStatus:200},configInputs:[{handle:"eventTypes",jsonSchema:{type:"array",items:{type:"string",enum:["email.received","email.bounced","email.complained"]},minItems:1,uniqueItems:!0,title:"Events"},nullable:!1,value:["email.received","email.bounced","email.complained"]}],outputs:[{handle:"event",jsonSchema:{type:"string",enum:["email.received","email.bounced","email.complained"]},nullable:!1},{handle:"deliveryId",jsonSchema:{type:"string"},nullable:!1},{handle:"emailId",jsonSchema:{type:"string"},nullable:!1},{handle:"createdAt",jsonSchema:{type:"string"},nullable:!1},{handle:"body",jsonSchema:{type:"object"},nullable:!1}]},callback:{headers:["svix-id","svix-signature","svix-timestamp"],query:[]},options:!1},{snapshot:{key:"sentry.on_issue_alert",provider:"sentry",name:"on_issue_alert",displayName:"Issue Alert",description:"Receives Issue Alert Rule notifications from a verified Sentry Custom Integration installation.",definitionVersion:2,type:"integration",endpoint:{methods:["POST"],body:{formats:["json"],allowArray:!1,allowEmpty:!1},successStatus:200},configInputs:[{handle:"projectIds",jsonSchema:{type:"array",items:{type:"string",pattern:"^[0-9]+$"},uniqueItems:!0,title:"Project IDs"},nullable:!0},{handle:"ruleNames",jsonSchema:{type:"array",items:{type:"string",minLength:1},uniqueItems:!0,title:"Alert rule names"},nullable:!0},{handle:"sourceId",jsonSchema:{type:"string",pattern:"^source_[0-9a-f]{32}$",title:"Event source"},nullable:!1},{handle:"eventTypes",jsonSchema:{type:"array",items:{type:"string",enum:["issue.alert"]},minItems:1,maxItems:1,uniqueItems:!0,title:"Events"},nullable:!1,value:["issue.alert"]}],outputs:[{handle:"event",jsonSchema:{type:"string"},nullable:!1},{handle:"deliveryId",jsonSchema:{type:"string"},nullable:!1},{handle:"organizationId",jsonSchema:{type:"string"},nullable:!1},{handle:"issueId",jsonSchema:{type:"string"},nullable:!1},{handle:"body",jsonSchema:{type:"object"},nullable:!1}]},callback:{headers:[],query:[]},source:{createSchema:{$schema:"https://json-schema.org/draft/2020-12/schema",type:"object",properties:{kind:{type:"string",const:"sentry"},version:{type:"number",const:1},name:{type:"string",minLength:1,maxLength:128},connectionId:{type:"string",minLength:1,maxLength:256},teamId:{anyOf:[{type:"string",minLength:1,maxLength:256},{type:"null"}]},appId:{type:"string",minLength:1,maxLength:256},installationId:{type:"string",minLength:1,maxLength:256},organizationId:{type:"string",minLength:1,maxLength:256},signingSecret:{type:"string",minLength:1,maxLength:256},eventTypes:{minItems:1,maxItems:1,type:"array",items:{type:"string",const:"issue.alert"}}},required:["kind","version","name","connectionId","teamId","appId","installationId","organizationId","signingSecret","eventTypes"],additionalProperties:!1},updateSchema:{$schema:"https://json-schema.org/draft/2020-12/schema",type:"object",properties:{version:{type:"number",const:1},expectedRevision:{type:"integer",exclusiveMinimum:0,maximum:9007199254740991},name:{type:"string",minLength:1,maxLength:128},enabled:{type:"boolean"},eventTypes:{minItems:1,maxItems:200,type:"array",items:{type:"string",pattern:"^[a-z][a-z0-9_.:]{0,127}$"}},verificationToken:{type:"string",minLength:1,maxLength:256},signingSecret:{type:"string",minLength:1,maxLength:256},encryptKey:{type:"string",minLength:1,maxLength:256}},required:["version","expectedRevision","name","enabled","eventTypes"],additionalProperties:!1},kind:"sentry",provider:"sentry",triggerId:"sentry.on_issue_alert",maximumBodyBytes:65536,applicationIngress:!0,managed:!1},options:!1,eventSource:"sentry"},{snapshot:{configInputs:[{handle:"topics",jsonSchema:{type:"array",items:{type:"string",enum:["app/scopes_update","app/uninstalled","app_purchases_one_time/update","app_subscriptions/approaching_capped_amount","app_subscriptions/update","bulk_operations/finish","carts/create","carts/update","channels/delete","checkout_and_accounts_configurations/update","checkouts/create","checkouts/delete","checkouts/update","collection_listings/add","collection_listings/remove","collection_listings/update","collection_publications/create","collection_publications/delete","collection_publications/update","collections/create","collections/delete","collections/update","companies/create","companies/delete","companies/update","company_contact_roles/assign","company_contact_roles/revoke","company_contacts/create","company_contacts/delete","company_contacts/update","company_locations/create","company_locations/delete","company_locations/update","customer.joined_segment","customer.left_segment","customer.tags_added","customer.tags_removed","customer_account_settings/update","customer_groups/create","customer_groups/delete","customer_groups/update","customers/create","customers/delete","customers/disable","customers/enable","customers/purchasing_summary","customers/update","customers_email_marketing_consent/update","customers_marketing_consent/update","delivery_promise_settings/update","disputes/create","disputes/update","domains/create","domains/destroy","domains/update","draft_orders/create","draft_orders/delete","draft_orders/update","fulfillment_events/create","fulfillment_events/delete","fulfillment_holds/added","fulfillment_holds/released","fulfillment_orders/cancellation_request_accepted","fulfillment_orders/cancellation_request_rejected","fulfillment_orders/cancellation_request_submitted","fulfillment_orders/cancelled","fulfillment_orders/fulfillment_request_accepted","fulfillment_orders/fulfillment_request_rejected","fulfillment_orders/fulfillment_request_submitted","fulfillment_orders/fulfillment_service_failed_to_complete","fulfillment_orders/hold_released","fulfillment_orders/line_items_prepared_for_local_delivery","fulfillment_orders/line_items_prepared_for_pickup","fulfillment_orders/manually_reported_progress_stopped","fulfillment_orders/merged","fulfillment_orders/moved","fulfillment_orders/order_routing_complete","fulfillment_orders/placed_on_hold","fulfillment_orders/progress_reported","fulfillment_orders/rescheduled","fulfillment_orders/scheduled_fulfillment_order_ready","fulfillment_orders/split","fulfillments/create","fulfillments/update","inventory_items/create","inventory_items/delete","inventory_items/update","inventory_levels/connect","inventory_levels/disconnect","inventory_levels/update","locales/create","locales/destroy","locales/update","locations/activate","locations/create","locations/deactivate","locations/delete","locations/update","machine_translation_batch/completed","metafield_definitions/create","metafield_definitions/delete","metafield_definitions/update","order_transactions/create","orders/cancelled","orders/create","orders/delete","orders/edited","orders/fulfilled","orders/link_requested","orders/paid","orders/partially_fulfilled","orders/risk_assessment_changed","orders/shopify_protect_eligibility_changed","orders/updated","payment_schedules/due","payment_terms/create","payment_terms/delete","payment_terms/update","product_feeds/create","product_feeds/full_sync","product_feeds/full_sync_finish","product_feeds/incremental_sync","product_feeds/update","product_listings/add","product_listings/remove","product_listings/update","product_publications/create","product_publications/delete","product_publications/update","products/create","products/delete","products/update","profiles/create","profiles/delete","profiles/update","publications/delete","refunds/create","returns/approve","returns/cancel","returns/close","returns/decline","returns/process","returns/reopen","returns/request","returns/update","reverse_deliveries/attach_deliverable","reverse_fulfillment_orders/dispose","scheduled_product_listings/add","scheduled_product_listings/remove","scheduled_product_listings/update","segments/create","segments/delete","segments/update","selling_plan_groups/create","selling_plan_groups/delete","selling_plan_groups/update","shop/update","subscription_billing_attempts/challenged","subscription_billing_attempts/failure","subscription_billing_attempts/success","subscription_billing_cycle_edits/create","subscription_billing_cycle_edits/delete","subscription_billing_cycle_edits/update","subscription_billing_cycles/skip","subscription_billing_cycles/unskip","subscription_contracts/activate","subscription_contracts/cancel","subscription_contracts/create","subscription_contracts/expire","subscription_contracts/fail","subscription_contracts/pause","subscription_contracts/update","tax_partners/update","tax_summaries/create","tender_transactions/create","themes/create","themes/delete","themes/publish","themes/update","variants/in_stock","variants/out_of_stock"]},minItems:1,maxItems:20,uniqueItems:!0},nullable:!1}],definitionVersion:2,description:"Triggers when selected Shopify webhook topics occur in the connected store.",displayName:"Store Event",endpoint:{body:{allowArray:!1,allowEmpty:!1,formats:["json"]},methods:["POST"],successStatus:202},key:"shopify.on_shop_event",name:"on_shop_event",outputs:[{handle:"apiVersion",jsonSchema:{type:"string"},nullable:!1},{handle:"body",jsonSchema:{type:"object"},nullable:!1},{handle:"eventId",jsonSchema:{type:"string"},nullable:!1},{handle:"shopDomain",jsonSchema:{type:"string"},nullable:!1},{handle:"topic",jsonSchema:{type:"string"},nullable:!1},{handle:"triggeredAt",jsonSchema:{type:"string"},nullable:!1},{handle:"webhookId",jsonSchema:{type:"string"},nullable:!1}],provider:"shopify",type:"integration"},callback:{headers:["x-shopify-api-version","x-shopify-event-id","x-shopify-shop-domain","x-shopify-topic","x-shopify-triggered-at","x-shopify-webhook-id"],query:["open_flow_callback"]},options:!1},{snapshot:{configInputs:[{handle:"channelId",jsonSchema:{type:"string",pattern:"^[CDG][A-Z0-9]{2,31}$"},nullable:!1,description:"Slack conversation ID to watch, e.g. C0122KQ70S7E."},{handle:"fromUserIds",jsonSchema:{type:"array",items:{type:"string",pattern:"^[UW][A-Z0-9]{2,31}$"}},nullable:!1,value:[],description:"Only trigger on messages written by these Slack user IDs. Empty means any author."},{handle:"ignoreUserIds",jsonSchema:{type:"array",items:{type:"string",pattern:"^[UW][A-Z0-9]{2,31}$"}},nullable:!1,value:[],description:"Never trigger on messages written by these Slack user IDs."},{handle:"textContains",jsonSchema:{type:"string"},nullable:!1,value:"",description:"Only trigger when message text contains this string, case-insensitively."},{group:"Advanced settings",collapsed:!0},{handle:"includeBotMessages",jsonSchema:{type:"boolean"},nullable:!1,value:!1,description:"Also trigger on messages posted by bots and apps."},{handle:"includeSystemMessages",jsonSchema:{type:"boolean"},nullable:!1,value:!1,description:"Also trigger on Slack system notices."},{handle:"maxMessagesPerPoll",jsonSchema:{type:"integer",minimum:1,maximum:100},nullable:!1,value:15,description:"Maximum number of messages processed per poll."}],definitionVersion:2,description:"Polls one Slack conversation and triggers when a new message is posted to it.",displayName:"New Channel Message",key:"slack.on_message_posted",name:"on_message_posted",outputs:[{handle:"events",jsonSchema:{type:"array",items:{type:"object",properties:{botId:{type:["string","null"]},channelId:{type:"string"},files:{type:"array",items:{type:"object",properties:{id:{type:"string"},mimetype:{type:"string"},name:{type:"string"}},additionalProperties:!1,required:["id","name","mimetype"]}},messageTs:{type:"string"},subtype:{type:["string","null"]},text:{type:"string"},threadTs:{type:["string","null"]},userId:{type:["string","null"]}},additionalProperties:!1,required:["channelId","messageTs","threadTs","userId","botId","subtype","text","files"]}},nullable:!1}],provider:"slack",type:"poll"},options:!1},{snapshot:{key:"slackbot.on_event",provider:"slackbot",name:"on_event",displayName:"Mention or Direct Message",description:"Receives user mentions and new direct messages through a shared Slack application event source. Slack Connect events are excluded.",definitionVersion:2,type:"integration",endpoint:{methods:["POST"],body:{formats:["json"],allowArray:!1,allowEmpty:!1},successStatus:200},configInputs:[{handle:"sourceId",jsonSchema:{type:"string",pattern:"^source_[0-9a-f]{32}$",title:"Event source"},nullable:!1},{handle:"eventTypes",jsonSchema:{type:"array",items:{type:"string",enum:["app_mention","message.im"]},minItems:1,maxItems:2,uniqueItems:!0,title:"Events"},nullable:!1,value:["app_mention","message.im"]},{handle:"channelIds",jsonSchema:{type:"array",items:{type:"string",minLength:1},maxItems:100,uniqueItems:!0,title:"Channel IDs"},nullable:!0}],outputs:[{handle:"event",jsonSchema:{type:"string"},nullable:!1},{handle:"deliveryId",jsonSchema:{type:"string"},nullable:!1},{handle:"appId",jsonSchema:{type:"string"},nullable:!1},{handle:"teamId",jsonSchema:{type:"string"},nullable:!1},{handle:"channel",jsonSchema:{type:"string"},nullable:!1},{handle:"user",jsonSchema:{type:"string"},nullable:!1},{handle:"text",jsonSchema:{type:"string"},nullable:!1},{handle:"ts",jsonSchema:{type:"string"},nullable:!1},{handle:"threadTs",jsonSchema:{type:"string"},nullable:!0},{handle:"body",jsonSchema:{type:"object"},nullable:!1}]},callback:{headers:[],query:[]},source:{createSchema:{$schema:"https://json-schema.org/draft/2020-12/schema",type:"object",properties:{kind:{type:"string",const:"slack"},version:{type:"number",const:1},name:{type:"string",minLength:1,maxLength:128},connectionId:{type:"string",minLength:1,maxLength:256},teamId:{anyOf:[{type:"string",minLength:1,maxLength:256},{type:"null"}]},appId:{type:"string",pattern:"^A[A-Z0-9]+$"},workspaceId:{type:"string",pattern:"^T[A-Z0-9]+$"},signingSecret:{type:"string",minLength:1,maxLength:256},eventTypes:{minItems:1,maxItems:2,type:"array",items:{type:"string",enum:["app_mention","message.im"]}}},required:["kind","version","name","connectionId","teamId","appId","workspaceId","signingSecret","eventTypes"],additionalProperties:!1},updateSchema:{$schema:"https://json-schema.org/draft/2020-12/schema",type:"object",properties:{version:{type:"number",const:1},expectedRevision:{type:"integer",exclusiveMinimum:0,maximum:9007199254740991},name:{type:"string",minLength:1,maxLength:128},enabled:{type:"boolean"},eventTypes:{minItems:1,maxItems:200,type:"array",items:{type:"string",pattern:"^[a-z][a-z0-9_.:]{0,127}$"}},verificationToken:{type:"string",minLength:1,maxLength:256},signingSecret:{type:"string",minLength:1,maxLength:256},encryptKey:{type:"string",minLength:1,maxLength:256}},required:["version","expectedRevision","name","enabled","eventTypes"],additionalProperties:!1},kind:"slack",provider:"slackbot",triggerId:"slackbot.on_event",maximumBodyBytes:65536,applicationIngress:!0,managed:!1},options:!1,eventSource:"slack"},{snapshot:{configInputs:[{handle:"apiVersion",jsonSchema:{type:"string",maxLength:40},nullable:!1,value:""},{handle:"events",jsonSchema:{type:"array",items:{type:"string",maxLength:120,pattern:"^(\\*|[a-z0-9_]+(?:\\.[a-z0-9_]+)+)$"},minItems:1,uniqueItems:!0},nullable:!1},{handle:"includeConnectedAccounts",jsonSchema:{type:"boolean"},nullable:!1,value:!1}],definitionVersion:2,description:"Triggers when selected Stripe events happen on the connected account.",displayName:"Account Event",endpoint:{body:{allowArray:!1,allowEmpty:!1,formats:["json"]},methods:["POST"],successStatus:202},key:"stripe.on_event",name:"on_event",outputs:[{handle:"body",jsonSchema:{type:"object"},nullable:!1},{handle:"event",jsonSchema:{type:"string"},nullable:!1},{handle:"eventId",jsonSchema:{type:"string"},nullable:!1},{handle:"livemode",jsonSchema:{type:"boolean"},nullable:!1}],provider:"stripe",type:"integration"},callback:{headers:["stripe-signature"],query:[]},options:!1},{snapshot:{configInputs:[{handle:"formId",jsonSchema:{type:"string",minLength:1,maxLength:128,title:"Form"},nullable:!1,description:"Choose a form accessible to this Connection."}],definitionVersion:2,description:"Receives new Tally form submissions through a signed, automatically managed webhook.",displayName:"Form Response",endpoint:{body:{allowArray:!1,allowEmpty:!1,formats:["json"]},methods:["POST"],successStatus:200},key:"tally.on_form_response",name:"on_form_response",outputs:[{handle:"response",nullable:!1,jsonSchema:{type:"object",properties:{eventId:{type:"string"},createdAt:{type:"string"},formId:{type:"string"},submissionId:{type:"string"},responseId:{type:"string"},fields:{type:"array",items:{type:"object",properties:{key:{type:"string"},type:{type:"string"},label:{type:["string","null"]},value:{},options:{type:"array",items:{type:"object"}}},required:["key","type","label","value"]}}},required:["eventId","createdAt","formId","submissionId","responseId","fields"]}}],provider:"tally",type:"integration"},callback:{headers:["tally-signature"],query:[]},options:!0},{snapshot:{configInputs:[{handle:"chatIds",jsonSchema:{type:"array",items:{type:"string",pattern:"^-?[0-9]{1,20}$"},maxItems:100,uniqueItems:!0},nullable:!1,value:[],description:"Only accept updates from these numeric Telegram chat IDs. Empty means every chat."},{handle:"dropPendingUpdates",jsonSchema:{type:"boolean"},nullable:!1,value:!0,description:"Discard updates queued before the webhook is created or resumed."},{handle:"updates",jsonSchema:{type:"array",items:{enum:["*","message","edited_message","channel_post","edited_channel_post","business_connection","business_message","edited_business_message","deleted_business_messages","guest_message","message_reaction","message_reaction_count","inline_query","chosen_inline_result","callback_query","shipping_query","pre_checkout_query","purchased_paid_media","poll","poll_answer","my_chat_member","chat_member","chat_join_request","chat_boost","removed_chat_boost","managed_bot","subscription"]},minItems:1,uniqueItems:!0},nullable:!1,description:"Telegram update types that trigger a Run. Use * for the Telegram default set."},{handle:"userIds",jsonSchema:{type:"array",items:{type:"string",pattern:"^[0-9]{1,20}$"},maxItems:100,uniqueItems:!0},nullable:!1,value:[],description:"Only accept updates from these numeric Telegram user IDs. Empty means every user."}],definitionVersion:2,description:"Triggers when the connected Telegram bot receives a selected update.",displayName:"Bot Update",endpoint:{body:{allowArray:!1,allowEmpty:!1,formats:["json"]},methods:["POST"],successStatus:200},key:"telegram.on_update",name:"on_update",outputs:[{handle:"body",jsonSchema:{type:"object"},nullable:!1},{handle:"deliveryId",jsonSchema:{type:"string"},nullable:!1},{handle:"event",jsonSchema:{type:"string"},nullable:!1}],provider:"telegram",type:"integration"},callback:{headers:["x-telegram-bot-api-secret-token"],query:[]},options:!1},{snapshot:{key:"typeform.on_form_response",provider:"typeform",name:"on_form_response",displayName:"Completed Form Response",description:"Receives complete Typeform submissions through an automatically managed signed webhook.",definitionVersion:2,type:"integration",endpoint:{methods:["POST"],body:{formats:["json"],allowArray:!1,allowEmpty:!1},successStatus:200},configInputs:[{handle:"formId",jsonSchema:{type:"string",minLength:1,maxLength:128,title:"Form ID"},nullable:!1}],outputs:[{handle:"response",nullable:!1,jsonSchema:{type:"object",properties:{eventId:{type:"string"},form_id:{type:"string"},token:{type:"string"},submitted_at:{type:"string"},answers:{type:"array",items:{type:"object"}},definition:{type:"object"}},required:["eventId","form_id","token","submitted_at","answers"]}}]},callback:{headers:["typeform-signature"],query:[]},options:!1},{snapshot:{key:"vercel.on_deployment_event",provider:"vercel",name:"on_deployment_event",displayName:"Deployment Ready or Failed",description:"Receives successful and failed deployments for a Vercel project.",definitionVersion:2,type:"integration",endpoint:{methods:["POST"],body:{formats:["json"],allowArray:!1,allowEmpty:!1},successStatus:200},configInputs:[{handle:"teamId",jsonSchema:{type:"string",minLength:1,maxLength:256,title:"Team ID"},nullable:!1},{handle:"projectId",jsonSchema:{type:"string",minLength:1,maxLength:256,title:"Project ID"},nullable:!1},{handle:"environment",jsonSchema:{type:"string",enum:["all","production","preview"],title:"Environment"},nullable:!1,value:"all"}],outputs:[{handle:"event",jsonSchema:{type:"string",enum:["deployment.ready","deployment.error"]},nullable:!1},{handle:"deliveryId",jsonSchema:{type:"string"},nullable:!1},{handle:"deploymentId",jsonSchema:{type:"string"},nullable:!1},{handle:"projectId",jsonSchema:{type:"string"},nullable:!1},{handle:"body",jsonSchema:{type:"object"},nullable:!1}]},callback:{headers:["x-vercel-signature"],query:[]},options:!1},{snapshot:{configInputs:[{handle:"events",jsonSchema:{type:"array",items:{type:"string",enum:["coupon.created","coupon.updated","coupon.deleted","coupon.restored","customer.created","customer.updated","customer.deleted","order.created","order.updated","order.deleted","order.restored","product.created","product.updated","product.deleted","product.restored","product.published"]},minItems:1,maxItems:16,uniqueItems:!0},nullable:!1},{handle:"webhookName",jsonSchema:{type:"string",minLength:1,maxLength:120},nullable:!1,value:"OOMOL Trigger"}],definitionVersion:2,description:"Triggers when selected WooCommerce store events occur.",displayName:"Store Event",endpoint:{body:{allowArray:!1,allowEmpty:!1,formats:["json"]},methods:["POST"],successStatus:202},key:"woocommerce.on_store_event",name:"on_store_event",outputs:[{handle:"body",jsonSchema:{type:"object"},nullable:!1},{handle:"deliveryId",jsonSchema:{type:"string"},nullable:!1},{handle:"event",jsonSchema:{type:"string"},nullable:!1},{handle:"resource",jsonSchema:{type:"string"},nullable:!1},{handle:"source",jsonSchema:{type:"string"},nullable:!1},{handle:"topic",jsonSchema:{type:"string"},nullable:!1},{handle:"webhookId",jsonSchema:{type:"string"},nullable:!1}],provider:"woocommerce",type:"integration"},callback:{headers:["x-wc-webhook-delivery-id","x-wc-webhook-event","x-wc-webhook-id","x-wc-webhook-resource","x-wc-webhook-signature","x-wc-webhook-source","x-wc-webhook-topic"],query:[]},options:!1},{snapshot:{configInputs:[{handle:"events",jsonSchema:{type:"array",items:{type:"string",enum:["zen:event-type:ticket.agent_assignment_changed","zen:event-type:ticket.attachment_linked_to_comment","zen:event-type:ticket.attachment_redacted_from_comment","zen:event-type:ticket.brand_changed","zen:event-type:ticket.comment_added","zen:event-type:ticket.comment_made_private","zen:event-type:ticket.comment_redacted","zen:event-type:ticket.created","zen:event-type:ticket.csat_received","zen:event-type:ticket.csat_requested","zen:event-type:ticket.custom_field_changed","zen:event-type:ticket.custom_status_changed","zen:event-type:ticket.description_changed","zen:event-type:ticket.email_ccs_changed","zen:event-type:ticket.external_id_changed","zen:event-type:ticket.followers_changed","zen:event-type:ticket.form_changed","zen:event-type:ticket.group_assignment_changed","zen:event-type:ticket.marked_as_spam","zen:event-type:ticket.merged","zen:event-type:ticket.next_sla_breach_changed","zen:event-type:ticket.ola_policy_changed","zen:event-type:ticket.organization_changed","zen:event-type:ticket.permanently_deleted","zen:event-type:ticket.priority_changed","zen:event-type:ticket.problem_link_changed","zen:event-type:ticket.requester_changed","zen:event-type:ticket.schedule_changed","zen:event-type:ticket.sla_policy_changed","zen:event-type:ticket.soft_deleted","zen:event-type:ticket.status_changed","zen:event-type:ticket.subject_changed","zen:event-type:ticket.submitter_changed","zen:event-type:ticket.tags_changed","zen:event-type:ticket.task_due_at_changed","zen:event-type:ticket.type_changed","zen:event-type:ticket.undeleted","zen:event-type:organization.created","zen:event-type:organization.custom_field_changed","zen:event-type:organization.deleted","zen:event-type:organization.external_id_changed","zen:event-type:organization.name_changed","zen:event-type:organization.tags_changed","zen:event-type:user.active_changed","zen:event-type:user.alias_changed","zen:event-type:user.created","zen:event-type:user.custom_field_changed","zen:event-type:user.custom_role_changed","zen:event-type:user.default_group_changed","zen:event-type:user.deleted","zen:event-type:user.details_changed","zen:event-type:user.external_id_changed","zen:event-type:user.group_membership_created","zen:event-type:user.group_membership_deleted","zen:event-type:user.identity_changed","zen:event-type:user.identity_created","zen:event-type:user.identity_deleted","zen:event-type:user.last_login_changed","zen:event-type:user.merged","zen:event-type:user.name_changed","zen:event-type:user.notes_changed","zen:event-type:user.only_private_comments_changed","zen:event-type:user.organization_membership_created","zen:event-type:user.organization_membership_deleted","zen:event-type:user.password_changed","zen:event-type:user.photo_changed","zen:event-type:user.role_changed","zen:event-type:user.suspended_changed","zen:event-type:user.tags_changed","zen:event-type:user.time_zone_changed"]},minItems:1,uniqueItems:!0},nullable:!1}],definitionVersion:2,description:"Triggers when one of the selected Zendesk account events occurs.",displayName:"Event Subscription",endpoint:{body:{allowArray:!1,allowEmpty:!1,formats:["json"]},methods:["POST"],successStatus:202},key:"zendesk.on_event",name:"on_event",outputs:[{handle:"body",jsonSchema:{type:"object"},nullable:!1},{handle:"deliveryId",jsonSchema:{type:"string"},nullable:!1},{handle:"event",jsonSchema:{type:"string"},nullable:!1},{handle:"subject",jsonSchema:{type:"string"},nullable:!1}],provider:"zendesk",type:"integration"},callback:{headers:["x-zendesk-webhook-signature","x-zendesk-webhook-signature-timestamp"],query:[]},options:!1},{snapshot:{key:"zoom.on_recording_ready",provider:"zoom",name:"on_recording_ready",displayName:"Cloud Recording Ready",description:"Receives completed cloud recordings hosted by the connected Zoom user through a verified application event source.",definitionVersion:2,type:"integration",endpoint:{methods:["POST"],body:{formats:["json"],allowArray:!1,allowEmpty:!1},successStatus:200},configInputs:[{handle:"sourceId",jsonSchema:{type:"string",pattern:"^source_[0-9a-f]{32}$",title:"Event source"},nullable:!1},{handle:"eventTypes",jsonSchema:{type:"array",items:{type:"string",enum:["recording.completed"]},minItems:1,maxItems:1,uniqueItems:!0,title:"Events"},nullable:!1,value:["recording.completed"]}],outputs:[{handle:"event",jsonSchema:{type:"string"},nullable:!1},{handle:"deliveryId",jsonSchema:{type:"string"},nullable:!1},{handle:"accountId",jsonSchema:{type:"string"},nullable:!1},{handle:"meetingUuid",jsonSchema:{type:"string"},nullable:!1},{handle:"body",jsonSchema:{type:"object"},nullable:!1}]},callback:{headers:[],query:[]},source:{createSchema:{$schema:"https://json-schema.org/draft/2020-12/schema",type:"object",properties:{kind:{type:"string",const:"zoom"},version:{type:"number",const:1},name:{type:"string",minLength:1,maxLength:128},connectionId:{type:"string",minLength:1,maxLength:256},teamId:{anyOf:[{type:"string",minLength:1,maxLength:256},{type:"null"}]},appId:{type:"string",minLength:1,maxLength:256},signingSecret:{type:"string",minLength:1,maxLength:256},eventTypes:{minItems:1,maxItems:1,type:"array",items:{type:"string",const:"recording.completed"}}},required:["kind","version","name","connectionId","teamId","appId","signingSecret","eventTypes"],additionalProperties:!1},updateSchema:{$schema:"https://json-schema.org/draft/2020-12/schema",type:"object",properties:{version:{type:"number",const:1},expectedRevision:{type:"integer",exclusiveMinimum:0,maximum:9007199254740991},name:{type:"string",minLength:1,maxLength:128},enabled:{type:"boolean"},eventTypes:{minItems:1,maxItems:200,type:"array",items:{type:"string",pattern:"^[a-z][a-z0-9_.:]{0,127}$"}},verificationToken:{type:"string",minLength:1,maxLength:256},signingSecret:{type:"string",minLength:1,maxLength:256},encryptKey:{type:"string",minLength:1,maxLength:256}},required:["version","expectedRevision","name","enabled","eventTypes"],additionalProperties:!1},kind:"zoom",provider:"zoom",triggerId:"zoom.on_recording_ready",maximumBodyBytes:65536,applicationIngress:!0,managed:!1},options:!1,eventSource:"zoom"}];function Ub(e){return Hg(e).extend({name:_().trim().min(1).max(128)})}var Bb=Jb.flatMap((e)=>("source"in e)&&e.source!=null?[e.source]:[]),Kb=Y(Bb.map((e)=>Ub(e.createSchema))),Wb=Ub(Bb[0].updateSchema),Hb=x({version:w(1),expectedRevision:ke().positive()});var Gb={start:"A Start node with a required message parameter. Supply it through trigger.outputs.",error:"A Flow Error node. Select upstream Flows, then publish and enable this Flow to listen for failures in their automatic runs.",webhook:"A Webhook start node.","webhook-response":"An HTTP response node with body, statusCode and headers inputs. Select it from a reachable Webhook.",cron:"An hourly scheduled start node.",poll:"Gmail polling by key; replace CONNECTION_ID with an active Gmail connection.",integration:"Telegram webhook integration by key; replace CONNECTION_ID with an active Telegram connection.",decision:"AI Decision evaluates named questions against target and returns a complete answer object per output. Configure target before running.","skip-duplicates":"Skip items already recorded by successful Runs. Configure identity fields; an empty list uses each string or numeric item. History is private to the node and only commits after Run success.","http-request":"A single HTTP request. Bind url and request inputs; outputs are body, statusCode and headers.",openapi:"A fixed JSON API operation. Replace the example document and URL before running.",connector:"A Connector Task and its node. Replace ACTION_ID, CONNECTION_ID and port definitions using connector_get / connector show. Set connectionId to an empty string to defer account configuration; execution will require an account.",code:"A JavaScript module and its node. Use Code for custom computation; use Connector Tasks for existing actions.",condition:"A condition with true and false execution branches.",value:"A fixed value node.",approval:"An Approval with approve and reject decision branches and a built-in notification output.",wait:"A Wait with a continue action and a built-in notification output.",agent:"An Agent with code computation enabled. Configure a model available in the deployment.","llm-chat":"An LLM chat Task and its node; configure a model available in the deployment.","llm-json":"An LLM JSON Task and its node; configure a model available in the deployment.","poll-notification":"Gmail events \u2192 JavaScript text formatting \u2192 Connector notification. Replace connection/action IDs and match the notification input ports."},LC=Object.keys(Gb),MC=LC.map((e)=>({name:e,description:Gb[e]}));var Z1=x({comment:Ou}),Vn=Ae(),Se=_().min(1),he=w(1),ro=Se.refine((e)=>e==e.trim()&&Kr(e)==null,"Flow name is invalid."),oo=R(Se).transform((e)=>[...new Set(e)].toSorted()),ZC=Se.transform((e)=>e.trim()).refine((e)=>Kr(e)==null,"Tag name is invalid."),Qb=oe(_(),oe(_(),Vn)),Yb=x({nodeId:Se,outputs:oe(_(),Vn)}),X={readFlowState:Qg.extend({version:he}),canvas:x({command:no,version:he}),authoringCheck:eu,authoringEdit:Zr,authoringRead:Li,authoringSearch:Mi,authoringSchema:_y,loadOpenApiDocument:x({url:_().min(1).max(8192),version:he}),createEventSource:Kb,updateEventSource:Wb,eventSourceRevision:Hb,importFlow:x({file:Vn,name:ro.optional(),teamId:Se.optional(),tagIds:oo.optional(),version:he}),createFlow:x({name:ro,teamId:Se.optional(),tagIds:oo.optional(),presentation:oe(_(),Vn).optional(),version:he}),saveTag:x({name:ZC,version:he}),setFlowTags:x({tagIds:oo,version:he}),updateFlow:Y([x({name:ro,tagIds:oo.optional(),version:he}),x({name:ro.optional(),tagIds:oo,version:he})]),renameFlow:x({name:ro,version:he}),changeDraft:x({expectedRevisionId:Se,operations:R(Vn).min(1),version:he}),repairDraft:x({expectedRevisionId:Se,version:he}),upgradeDraft:x({expectedRevisionId:Se,version:he}),setEnabled:x({enabled:ye(),expectedPublicationId:Se,version:he}),updatePresentation:x({expectedRevision:ke().positive(),value:oe(_(),Vn),version:he}),checkFlow:x({engineContract:Se,version:he}),publishFlow:x({engineContract:Se,expectedLivePublicationId:Se.nullable(),version:he}),rollbackFlow:x({expectedLivePublicationId:Se,version:he}),createDraftRun:x({engineContract:Se,inputs:Qb,trigger:Yb,version:w(2)}),createLiveRun:x({publicationId:Se,inputs:Qb,trigger:Yb,version:w(2)}),resolveWait:x({action:F(["approve","continue","reject"]),comment:Ou,version:he}),putVariable:x({value:_().refine((e)=>new TextEncoder().encode(e).byteLength<=65536,"Variable value is too large.")}),queryConnectorAccessCandidates:x({providerIds:R(Se.max(256)).min(1).refine((e)=>new Set(e).size==e.length,"Duplicate provider IDs."),version:he}),removeConnectionUsage:x({connectionId:Se,expectedRevisionId:Se,expectedAccessRevision:ke().nonnegative(),version:he}),setConnectorService:x({expectedAccessRevision:ke().nonnegative(),version:he}),addProviderAccessBinding:x({accessBindingId:Se,expectedAccessRevision:ke().nonnegative(),version:he}),removeProviderAccessBinding:x({accessBindingId:Se,expectedAccessRevision:ke().nonnegative(),version:he}),versionOnly:x({version:he})};function te(e){return(t)=>e.parse(t)}var J1={readFlowState:te(X.readFlowState),canvas:te(X.canvas),authoringCheck:te(X.authoringCheck),authoringEdit:te(X.authoringEdit),authoringRead:te(X.authoringRead),authoringSearch:te(X.authoringSearch),authoringSchema:te(X.authoringSchema),loadOpenApiDocument:te(X.loadOpenApiDocument),createEventSource:te(X.createEventSource),updateEventSource:te(X.updateEventSource),eventSourceRevision:te(X.eventSourceRevision),importFlow:te(X.importFlow),createFlow:te(X.createFlow),saveTag:te(X.saveTag),setFlowTags:te(X.setFlowTags),updateFlow:te(X.updateFlow),renameFlow:te(X.renameFlow),changeDraft(e){let t=X.changeDraft.parse(e);return{...t,operations:ju(t.operations)}},repairDraft:te(X.repairDraft),upgradeDraft:te(X.upgradeDraft),setEnabled:te(X.setEnabled),updatePresentation:te(X.updatePresentation),checkFlow:te(X.checkFlow),publishFlow:te(X.publishFlow),rollbackFlow:te(X.rollbackFlow),createDraftRun:te(X.createDraftRun),createLiveRun:te(X.createLiveRun),resolveWait:te(X.resolveWait),putVariable:te(X.putVariable),queryConnectorAccessCandidates:te(X.queryConnectorAccessCandidates),removeConnectionUsage:te(X.removeConnectionUsage),setConnectorService:te(X.setConnectorService),addProviderAccessBinding:te(X.addProviderAccessBinding),removeProviderAccessBinding:te(X.removeProviderAccessBinding),versionOnly:te(X.versionOnly)};var _u=["expected-revision","idempotency-key"],Ru=["cursor","limit"],Xb=[["state show","<flow> --scope <draft|live> [--key <key>]",["scope","key"]],["state clear","<flow> --scope <draft|live> [--key <key>] --yes",["scope","key","yes"]],["dedupe clear","<flow> --scope <draft|live> --space <space> --yes",["scope","space","yes"]],["canvas","<flow> (--input JSON|@file|- | --file path|-)",["input","file"]],["read","<flow> [--input JSON|@file|- | --file path|-]",["input","file"]],["search","<flow> (--input JSON|@file|- | --file path|-)",["input","file"]],["edit","<flow> (--input JSON|@file|- | --file path|-)",["input","file"]],["list","[--cursor <cursor>] [--limit <count>]",Ru],["export","<flow>",[]],["import","--file <path|->",["file","name","idempotency-key"]],["create","<name>",["idempotency-key"]],["show","<flow>",[]],["live","<flow>",[]],["rename","<flow> <new-name>",[]],["delete","<flow> --yes",["yes"]],["check","<flow> [--revision <revisionId>]",["revision"]],["enable","<flow> --expected-publication <publicationId>",["expected-publication"]],["disable","<flow> --expected-publication <publicationId>",["expected-publication"]],["connector code-access","<flow> [--publication <publicationId>]",["publication"]],["connector candidates","<flow> <provider> [provider ...]",[]],["connector code-allow","<flow> <provider> <binding> <access-revision>",[]],["connector code-remove","<flow> <provider> <binding> <access-revision>",[]],["connector remove-usage","<flow> <connection> <access-revision>",_u],["connector providers","[--flow <flow>]",["flow"]],["connector teams","",[]],["connector search","<query> [--flow <flow>]",["flow"]],["connector show","<action> [--flow <flow>]",["flow"]],["connector connections","<service> [--flow <flow>]",["flow"]],["event-source list","",[]],["trigger search","[query]",[]],["trigger show","<key>",[]],["run","<flow>",[..._u,"expected-publication","source","trigger","outputs","input","wait","timeout"]],["runs list","--flow <flow>",["flow","status","pending-wait",...Ru]],["runs show","<run>",[]],["runs wait","<run>",["timeout"]],["runs resolve","<run> <wait> <continue|approve|reject>",["comment"]],["runs events","<run>",["after","limit","follow","timeout"]],["runs result","<run>",[]],["runs results","<run> [--after <resultId>]",["after"]],["runs read-result","<run> <result>",["pointer","offset","limit","max-bytes"]],["runs download-result","<run> <result>",[]],["runs cancel","<run>",[]],["publish","<flow>",[..._u,"expected-publication","timeout"]],["publications list","<flow>",Ru],["publications show","<flow> <publication>",[]],["publications wait","<flow> <operation>",["timeout"]],["publications operation","<flow> <operation>",[]],["rollback","<flow> <publication>",["expected-publication","idempotency-key"]],["open","[flow]",[]],["workbench","[flow]",[]],["schema","[read|search|edit|check|node-type]",["flow","input"]]],JC={scope:{description:"Required State scope; never defaults to live.",type:"string",enum:["draft","live"]},key:{description:"Business state key to read or clear; omit to inspect metadata or clear all business values.",type:"string"},space:{description:"Deduplication space: flow or node:<nodeId>.",type:"string"},revision:{description:"Exact Revision to read or check; defaults to the current Draft.",type:"string"},publication:{description:"Exact Publication ID whose fixed Code connections are read; defaults to the Draft.",type:"string"},pointer:{description:"JSON Pointer within the stored result; defaults to the root.",type:"string"},offset:{description:"Page offset at the selected pointer.",type:"integer",minimum:0,default:0},"max-bytes":{description:"Maximum result page bytes.",type:"integer",minimum:1,maximum:1048576,default:15000},"expected-revision":{description:"Base Revision ID from read. Required with an explicit idempotency key for draft edits and draft runs.",type:"string"},"expected-publication":{description:"Fixed Publication ID. Use none when publishing without a Live Publication.",type:"string"},"idempotency-key":{description:"Stable identity of one mutation. Reuse only with the identical arguments and base identity.",type:"string"},source:{description:"Execution source.",type:"string",enum:["draft","live"],default:"draft"},trigger:{description:"Exact Trigger ID or unambiguous name. The Start node is selected automatically; a sole legacy Manual Trigger remains supported.",type:"string"},timeout:{description:"Wait budget in milliseconds; expiration does not cancel the operation. For node set, the node execution timeout.",type:"integer",minimum:1,default:60000},limit:{description:"Maximum items in one page.",type:"integer",minimum:1,maximum:100,default:100},after:{description:"Resume events after this sequence number; use nextAfter from the preceding response.",type:"integer",minimum:0,default:0},cursor:{description:"Opaque nextCursor from the preceding page; keep the same filters.",type:"string"},comment:{description:"Optional plain-text Wait decision comment (up to 2,000 Unicode code points).",type:"string"},"pending-wait":{description:"List runs with unresolved waits, including running and queued runs.",type:"boolean"},status:{description:"Filter runs by status.",type:"string",enum:["queued","starting","running","waiting","completed","failed","canceled","indeterminate"]},file:{description:"Authoring request or workflow JSON file path, or - for stdin.",type:"string"},code:{description:"JavaScript source, @file, or - for stdin.",type:"string"},input:{description:"Authoring request JSON; literal JSON, @file, or -. For run, node ID to input values.",type:"string"},outputs:{description:"Start parameters or other Trigger outputs: literal JSON, @file, or -. Defaults to {}.",type:"string"},set:{description:"handle=value; repeat for multiple fields. Values use port schemas, JSON, @file, or -.",type:"string"},unset:{description:"Input/config handle to remove; repeat for multiple fields.",type:"string"},connection:{description:"Exact active Connection ID, unambiguous display name, or default.",type:"string"},flow:{description:"Exact Flow ID or unambiguous name; fixes Connector Team scope.",type:"string"},name:{description:"Display name.",type:"string"},description:{description:"Trigger description.",type:"string"},cron:{description:"Cron expression; combine with --timezone. Mutually exclusive with --every.",type:"string"},timezone:{description:"IANA time zone for --cron.",type:"string"},every:{description:"Interval such as 5m, 1h, or 1d. Mutually exclusive with --cron.",type:"string"},wait:{description:"Wait until terminal, waiting for an action, or the wait budget expires."},follow:{description:"Stream event pages as NDJSON with --json; stop on terminal, Wait, or timeout."},yes:{description:"Confirm the requested deletion."},json:{description:"Machine-readable JSON results and errors; NDJSON for followed events."},help:{description:"Show this command contract without contacting the host."}};function Au(e,t="oo flow"){let n=e.join(" ");return Xb.filter(([r])=>n==""||r==n||r.startsWith(`${n} `)).map(([r,o,i])=>({command:r,usage:`${t} ${r} ${o} [--json]`,options:[...i,"json","help"].map((s)=>Object.assign({name:`--${s}`,value:!["json","help","wait","follow","yes","pending-wait"].includes(s),repeatable:s=="set"||s=="unset"},JC[s],r=="runs results"&&s=="after"?{type:"string",minimum:void 0,default:void 0,description:"Result ID from nextAfter on the preceding page."}:{},r=="runs read-result"&&s=="limit"?{default:20}:{}))}))}function ew(e){return Xb.find(([t])=>t==e.slice(0,t.split(" ").length).join(" "))?.[2]}function tw(e="edits"){let t=tu(e);if(t!=null)return t;if(e=="edits")return nu();if(e=="outputs")return{$schema:"https://json-schema.org/draft/2020-12/schema",type:"object",description:"Named Start parameters or other Trigger outputs. Start uses the workflow inputDefs returned by flow read; other triggers define their own output contracts. Omitted nullable Start parameters become null; required parameters must be supplied."};if(qi.includes(e))return nu(e);if(e=="input")return{$schema:"https://json-schema.org/draft/2020-12/schema",type:"object",additionalProperties:{type:"object",additionalProperties:!0},description:"Node ID -> input handle -> JSON value."};return}function Pu(e){if(e=="canvas")return{request:mn(no,{io:"input"}),guidance:"Broadcast transient viewport commands; success does not confirm execution. No Presentation save, offline queue or replay. Pan uses screen pixels; zoom is an absolute ratio (0.1\u20133); fit includes all nodes. Repeating pan moves again; do not automatically retry an uncertain response.",examples:[{type:"focus",nodeId:"NODE_ID"},{type:"zoom",zoom:0.8},{type:"pan",dx:200,dy:-100},{type:"fit"}]};return tu(e)}function nw(e,t="oo flow"){if(e=="export")return[`${t} export FLOW_ID > template.openflow.json`];if(e=="import")return[`${t} import --file template.openflow.json --name "Imported workflow" --idempotency-key IMPORT_KEY --json`];if(e=="schema")return[`${t} schema read --json`,`${t} schema agent --json`,`${t} schema --flow FLOW_ID --input '{"action":"ACTION_ID"}' --json`];let n=Pu(e);if(n==null)return UC(t);if(e=="check")return[`${t} check FLOW_ID --revision REVISION --json`];return n.examples.map((r)=>`${t} ${e} FLOW_ID${Object.keys(r).length==0?"":` --input '${JSON.stringify(r)}'`} --json`)}function UC(e){return[`${e} list --limit 20 --json`,`${e} read FLOW_ID --json`,`${e} live FLOW_ID --json`,`${e} schema code --json`,`${e} edit FLOW_ID --file edits.json --json`,`${e} connector search email --flow FLOW_ID --json`,`${e} run FLOW_ID --expected-revision REVISION_ID --idempotency-key RUN_KEY --wait --timeout 60000 --json`,`${e} runs wait RUN_ID --timeout 60000 --json`,`${e} runs resolve RUN_ID WAIT_ID approve --json`,`${e} runs events RUN_ID --after 0 --follow --timeout 60000 --json`]}import{basename as KC}from"path";async function rw(e,t,n,r,o){let[i,s,a,...c]=n;switch(i){case"code-access":case"candidates":case"code-allow":case"code-remove":case"remove-usage":{let l=i=="code-access"?1:i=="candidates"?2:i=="remove-usage"?3:4;if(i=="candidates"?n.length<l+1:n.length!=l+1)throw new C("cli.invalid-arguments",`Invalid arguments for connector ${i}. See --help.`);let u=BC(t),d;if(i=="code-access")d=r.publication==null?await e.getConnectorAccess(u):await e.getPublishedConnectorAccess(u,r.publication);else if(i=="candidates")d=await e.listProviderAccessBindingCandidates(u,n.slice(2));else{let h=Number(n.at(-1));if(!Number.isSafeInteger(h)||h<0)throw new C("cli.invalid-arguments","Access revision must be a nonnegative integer.");if(i=="remove-usage"){let g=await Nb(e,t,r);d=await e.removeConnectionUsage(u,a,g.draft.revisionId,h,r.idempotencyKey)}else if(i=="code-allow")d=await e.addProviderAccessBinding(u,a,c[0],h);else d=await e.removeProviderAccessBinding(u,a,c[0],h)}Z(o,r.json,{...d,kind:`connector.${i}`},JSON.stringify(d,null,2));return}case"providers":{if(s!=null)throw new C("cli.invalid-arguments",`Usage: ${o.commandPrefix??"oo flow"} connector providers [--flow <flow>] [--json]`);let l=await e.listConnectorProviders(void 0,t?.flowId);Z(o,r.json,{providers:l,kind:"connector.providers",version:1},l.map((u)=>`${u.serviceName} ${u.serviceId}`).join(`
64
+ ${JSON.stringify(e.waits)}`}`}function Vb(e){return`${e.source} ${e.status} ${e.runId} ${e.revisionId}`}function Lb(e){return`${e.sequence} ${e.kind} ${JSON.stringify(e.payload)}`}async function Dn(e,t,n,r){try{if(e=="-")return await r.readStdin();if(!e.startsWith("@"))return e;let o=e.slice(1);if(o.length==0)throw new C("cli.invalid-arguments",`${t} @ requires a file path.`);return await r.readFile(o)}catch(o){if(o instanceof C)throw o;throw new C(n,o instanceof Error?o.message:String(o))}}async function Xr(e,t){if(e==null)return{};let n=await Dn(e,"input","flow.authoring-unreadable",t),r;try{r=JSON.parse(n)}catch{throw new C("cli.invalid-arguments","Input must be valid JSON.")}if(r==null||typeof r!="object"||Array.isArray(r))throw new C("cli.invalid-arguments","Input must be a JSON object.");return r}async function Mb(e,t){if(e.input==null)return{};let n=await Dn(e.input,"--input","run.input-unreadable",t),r;try{r=JSON.parse(n)}catch{throw new C("run.input-invalid","Run input must be valid JSON.")}if(r==null||typeof r!="object"||Array.isArray(r))throw new C("run.input-invalid","Run input must be an object keyed by node ID.");for(let o of Object.values(r))if(o==null||typeof o!="object"||Array.isArray(o))throw new C("run.input-invalid","Each Run input node must contain an object keyed by input handle.");return r}async function eo(e,t,n){let r=new Set,o;do{let i=await e.listPublications(t,{cursor:o,limit:xu}),s=i.publications.find((a)=>a.publicationId==n);if(s!=null)return s;if(o=i.nextCursor,o!=null&&r.has(o))throw new C("page.invalid-cursor","The deployment returned a repeated Publication cursor.");if(o!=null)r.add(o)}while(o!=null);throw new C("publication.not-found",`Publication ${JSON.stringify(n)} was not found.`)}async function Cu(e,t,n,r=60000){let o=Date.now()+r,i=t;while(!mC.has(i.status)&&i.waits.length==0){let s=o-Date.now();if(s<=0)return{run:i,timedOut:!0};if(await n.wait(Math.min(1000,s)),Date.now()>=o)return{run:i,timedOut:!0};try{i=await e.getRun(i.runId,AbortSignal.timeout(Math.max(1,o-Date.now())))}catch(a){if(Date.now()>=o||a instanceof Error&&a.name=="TimeoutError")return{run:i,timedOut:!0};throw new C("run.wait-failed",a instanceof Error?a.message:String(a),{runId:i.runId})}}return{run:i,timedOut:!1}}function to(e,t=!1){if(t)return 3;if(e.waits.length>0)return 2;return e.status=="failed"||e.status=="canceled"||e.status=="indeterminate"?1:0}function Fb(e){return new C(e.code,e.message,{status:e.status,...e.details})}async function Eu(e,t,n,r,o=60000){let i=Date.now()+o,s=n;while(s.status=="pending"){let a=i-Date.now();if(a<=0)return{operation:s,timedOut:!0};if(await r.wait(Math.min(1000,a)),Date.now()>=i)return{operation:s,timedOut:!0};try{s=await e.getPublishOperation(t,s.operationId,AbortSignal.timeout(Math.max(1,i-Date.now())))}catch(c){if(Date.now()>=i||c instanceof Error&&c.name=="TimeoutError")return{operation:s,timedOut:!0};throw new C("publication.wait-failed",c instanceof Error?c.message:String(c),{flowId:t,operationId:s.operationId})}}return{operation:s,timedOut:!1}}var wC=new Set(Qi);function Zb(e){let t,n,r,o=bC(),i,s=[],a=[],c,l,u,d,h,g,y,S,A,N,M,D,fe,me,se,qe,Vt,tn,Lt,Mn=!1,Fn,so=!1,ss,as,qu=[],Vu="draft",cs,ls,us,ds,ps,Lu=[],Mu=!1,Fu=!1;for(let nn=0;nn<e.length;nn+=1){let Zn=e[nn],ao=Zn.startsWith("--")?Zn.indexOf("="):-1,P=ao<0?Zn:Zn.slice(0,ao),Jn=ao<0?void 0:Zn.slice(ao+1);if(Jn!=null&&["--json","--follow","--wait","--yes","--pending-wait"].includes(P))throw new C("cli.invalid-arguments",`${P} does not accept a value.`);if(P.startsWith("--")){let V=P.slice(2);if(a.includes(V)&&V!="set"&&V!="unset")throw new C("cli.invalid-arguments",`Duplicate option --${V}.`);a.push(V)}if(["--scope","--key","--space"].includes(P)){let V=Jn??e[++nn];if(V==null||V.startsWith("--"))throw new C("cli.invalid-arguments",`${P} requires a value.`);if(P==="--scope")t=V;else if(P==="--key")n=V;else r=V}else if(P=="--json")so=!0;else if(P=="--follow")Mn=!0;else if(P=="--wait")Mu=!0;else if(P=="--yes")Fu=!0;else if(P=="--pending-wait")cs=!0;else if(P=="--idempotency-key"||P=="--expected-publication"||P=="--revision"||P=="--publication"||P=="--pointer"||P=="--offset"||P=="--max-bytes"||P=="--code"||P=="--connection"||P=="--cron"||P=="--description"||P=="--every"||P=="--expected-revision"||P=="--file"||P=="--flow"||P=="--name"||P=="--source"||P=="--input"||P=="--trigger"||P=="--outputs"||P=="--status"||P=="--cursor"||P=="--limit"||P=="--after"||P=="--comment"||P=="--timeout"||P=="--timezone"||P=="--set"||P=="--unset"){let V=Jn??e[nn+1];if(V==null||V.length==0||Jn==null&&V.startsWith("-")&&V!="-")throw new C("cli.invalid-arguments",`${P} requires a value.`);if(Jn==null)nn++;if(P=="--idempotency-key")o=V;else if(P=="--expected-publication")i=V;else if(P=="--revision")u=V;else if(P=="--publication")d=V;else if(P=="--pointer")h=V;else if(P=="--after")A=V;else if(P=="--code")M=V;else if(P=="--connection")D=V;else if(P=="--cron")fe=V;else if(P=="--description")se=V;else if(P=="--every")qe=V;else if(P=="--expected-revision")Vt=V;else if(P=="--file")tn=V;else if(P=="--flow")Lt=V;else if(P=="--name")as=V;else if(P=="--comment")us=V;else if(P=="--input")Fn=V;else if(P=="--trigger")c=V;else if(P=="--outputs")l=V;else if(P=="--cursor")me=V;else if(P=="--timezone")ps=V;else if(P=="--set")qu.push(V);else if(P=="--unset")Lu.push(V);else if(P=="--source"){if(V!="draft"&&V!="live")throw new C("cli.invalid-arguments","--source must be draft or live.");Vu=V}else if(P=="--status"){if(!wC.has(V))throw new C("cli.invalid-arguments",`Unknown Run status ${JSON.stringify(V)}.`);ls=V}else{let kt=Number(V),_w=P=="--offset"?0:1;if(!Number.isSafeInteger(kt)||kt<_w||P=="--limit"&&kt>100||P=="--max-bytes"&&kt>1048576)throw new C("cli.invalid-arguments",`${P} has an invalid value.`);if(P=="--limit")ss=kt;else if(P=="--offset")g=kt;else if(P=="--max-bytes")y=kt;else ds=kt}}else if(P.startsWith("-"))throw new C("cli.invalid-arguments",`Unknown option ${JSON.stringify(P)}.`);else s.push(P)}if(A!=null){if(s[0]=="runs"&&s[1]=="results")S=A;else if(N=Number(A),!Number.isSafeInteger(N)||N<0)throw new C("cli.invalid-arguments","--after must be a non-negative event sequence.")}return{scope:t,key:n,space:r,idempotencyKey:o,...S==null?{}:{resultAfter:S},...y==null?{}:{maxBytes:y},...g==null?{}:{offset:g},...h==null?{}:{pointer:h},...u==null?{}:{revision:u},...d==null?{}:{publication:d},...us==null?{}:{comment:us},...i==null?{}:{expectedPublication:i},...N==null?{}:{after:N},...M==null?{}:{code:M},...D==null?{}:{connection:D},...fe==null?{}:{cron:fe},...me==null?{}:{cursor:me},...se==null?{}:{description:se},...qe==null?{}:{every:qe},...Vt==null?{}:{expectedRevision:Vt},...tn==null?{}:{file:tn},...Lt==null?{}:{flow:Lt},follow:Mn,...Fn==null?{}:{input:Fn},json:so,...ss==null?{}:{limit:ss},...as==null?{}:{name:as},positionals:s,options:a,...c==null?{}:{trigger:c},...l==null?{}:{outputs:l},sets:qu,source:Vu,...ls==null?{}:{status:ls},...cs==null?{}:{pendingWait:cs},...ds==null?{}:{timeoutMs:ds},...ps==null?{}:{timezone:ps},unsets:Lu,wait:Mu,yes:Fu}}var vC=0.1,xC=3,no=rt("type",[x({type:w("focus"),nodeId:_().min(1)}),x({type:w("zoom"),zoom:U().min(vC).max(xC)}),x({type:w("pan"),dx:U(),dy:U()}),x({type:w("fit")})]);var Ou=_().trim().refine((e)=>[...e].length<=2000,"Wait comment must contain at most 2,000 Unicode code points.").nullable().optional();var qn=_().min(1),DC=Ae(),qC=x({kind:w("graph.trigger.create"),nodeId:qn,key:qn,connectionId:qn.optional(),name:qn.optional(),config:oe(qn,DC),schedule:zt.readonly().optional()});function ju(e){return Ht(e),R(lt()).min(1).parse(e).map((t,n)=>{let{kind:r}=Fr(t,n,E({kind:qn}).parse);return r=="graph.trigger.create"?Fr(t,n,qC.parse):yy(t,n)})}var Jb=[{snapshot:{configInputs:[{handle:"baseId",jsonSchema:{type:"string",pattern:"^app[A-Za-z0-9]{14}$"},nullable:!1},{handle:"formula",jsonSchema:{type:"string"},nullable:!1,value:""},{handle:"tableIdOrName",jsonSchema:{type:"string",minLength:1,maxLength:255},nullable:!1},{handle:"triggerField",jsonSchema:{type:"string",minLength:1,maxLength:255,pattern:"^[^}]*$"},nullable:!1},{handle:"view",jsonSchema:{type:"string"},nullable:!1,value:""},{group:"Advanced settings",collapsed:!0},{handle:"fields",jsonSchema:{type:"array",items:{type:"string",minLength:1}},nullable:!1,value:[]},{handle:"maxRecordsPerPoll",jsonSchema:{type:"integer",minimum:1,maximum:1000},nullable:!1,value:200}],definitionVersion:2,description:"Polls an Airtable table and triggers when a record is created or updated, ordered by a time field.",displayName:"Record Created or Updated",key:"airtable.on_record_changed",name:"on_record_changed",outputs:[{handle:"events",jsonSchema:{type:"array",items:{type:"object",properties:{baseId:{type:"string"},createdTime:{type:"string"},fields:{type:"object"},recordId:{type:"string"},tableIdOrName:{type:"string"},triggerField:{type:"string"},triggerFieldValue:{type:"string"}},additionalProperties:!1,required:["baseId","tableIdOrName","recordId","createdTime","triggerField","triggerFieldValue","fields"]}},nullable:!1}],provider:"airtable",type:"poll"},options:!1},{snapshot:{key:"asana.on_task_event",provider:"asana",name:"on_task_event",displayName:"Project Task Event",description:"Receives tasks added to a project, completion changes, and selected custom field changes. Task details represent current state, not historical state.",definitionVersion:2,type:"integration",endpoint:{methods:["POST"],body:{formats:["json"],allowArray:!1,allowEmpty:!0},successStatus:200},configInputs:[{handle:"projectId",jsonSchema:{type:"string",minLength:1,title:"Project ID"},nullable:!1},{handle:"eventTypes",jsonSchema:{type:"array",items:{type:"string",enum:["task.added","task.completed","task.field_changed"]},minItems:1,uniqueItems:!0,title:"Events"},nullable:!1,value:["task.added","task.completed"]},{handle:"customFieldId",jsonSchema:{type:"string",minLength:1,title:"Custom field ID"},nullable:!0}],outputs:[{handle:"projectId",jsonSchema:{type:"string"},nullable:!1},{handle:"events",jsonSchema:{type:"array",items:{type:"object",properties:{event:{type:"string"},task:{type:"object"},change:{type:"object"}},required:["event","task","change"]}},nullable:!1}]},callback:{headers:["x-hook-secret","x-hook-signature"],query:[]},options:!1},{snapshot:{key:"calendly.on_booking_event",provider:"calendly",name:"on_booking_event",displayName:"Booking Created or Canceled",description:"Receives bookings and cancellations, preserving reschedule links. Requires a Personal Access Token connection.",definitionVersion:2,type:"integration",endpoint:{methods:["POST"],body:{formats:["json"],allowArray:!1,allowEmpty:!1},successStatus:200},configInputs:[{handle:"scope",jsonSchema:{type:"string",enum:["user","organization"],title:"Scope"},nullable:!1,value:"user"},{handle:"eventTypes",jsonSchema:{type:"array",items:{type:"string",enum:["invitee.created","invitee.canceled"]},minItems:1,uniqueItems:!0,title:"Events"},nullable:!1,value:["invitee.created","invitee.canceled"]}],outputs:[{handle:"event",jsonSchema:{type:"string",enum:["invitee.created","invitee.canceled"]},nullable:!1},{handle:"inviteeUri",jsonSchema:{type:"string"},nullable:!1},{handle:"createdAt",jsonSchema:{type:"string"},nullable:!1},{handle:"body",jsonSchema:{type:"object"},nullable:!1}]},callback:{headers:["calendly-webhook-signature"],query:[]},options:!1},{snapshot:{key:"clickup.on_task_event",provider:"clickup",name:"on_task_event",displayName:"Task Event",description:"Receives task creation, status changes, and new comments in a ClickUp Workspace or List.",definitionVersion:2,type:"integration",endpoint:{methods:["POST"],body:{formats:["json"],allowArray:!1,allowEmpty:!1},successStatus:200},configInputs:[{handle:"workspaceId",jsonSchema:{type:"string",pattern:"^[0-9]+$",title:"Workspace ID"},nullable:!1},{handle:"listId",jsonSchema:{type:"string",pattern:"^[0-9]+$",title:"List ID"},nullable:!0},{handle:"eventTypes",jsonSchema:{type:"array",items:{type:"string",enum:["taskCreated","taskStatusUpdated","taskCommentPosted"]},minItems:1,uniqueItems:!0,title:"Events"},nullable:!1,value:["taskCreated","taskStatusUpdated","taskCommentPosted"]}],outputs:[{handle:"event",jsonSchema:{type:"string",enum:["taskCreated","taskStatusUpdated","taskCommentPosted"]},nullable:!1},{handle:"taskId",jsonSchema:{type:"string"},nullable:!1},{handle:"body",jsonSchema:{type:"object"},nullable:!1}]},callback:{headers:["x-signature"],query:[]},options:!1},{snapshot:{key:"feishu_app_bot.on_event",provider:"feishu_app_bot",name:"on_event",displayName:"Application Event",description:"Receives selected Feishu application events through a shared event source.",definitionVersion:2,type:"integration",endpoint:{methods:["POST"],body:{formats:["json"],allowArray:!1,allowEmpty:!1},successStatus:200},configInputs:[{handle:"sourceId",jsonSchema:{type:"string",pattern:"^source_[0-9a-f]{32}$",title:"Event source"},nullable:!1},{handle:"eventTypes",jsonSchema:{type:"array",items:{type:"string",pattern:"^[a-z][a-z0-9_.]{0,127}$"},minItems:1,maxItems:200,uniqueItems:!0,title:"Event types"},nullable:!1},{handle:"chatIds",jsonSchema:{type:"array",items:{type:"string",minLength:1,maxLength:256},maxItems:100,uniqueItems:!0,title:"Chat IDs"},nullable:!0,description:"Leave empty to receive events from all chats available to the source."},{handle:"resource",jsonSchema:{type:"object",properties:{kind:{type:"string",enum:["document","calendar","approval"]},id:{type:"string",minLength:1,maxLength:256},documentType:{type:"string",enum:["doc","docx","sheet","bitable","file","folder"]}},additionalProperties:!1,required:["kind","id"],title:"Resource subscription"},nullable:!0}],outputs:[{handle:"event",jsonSchema:{type:"string"},nullable:!1},{handle:"deliveryId",jsonSchema:{type:"string"},nullable:!1},{handle:"appId",jsonSchema:{type:"string"},nullable:!1},{handle:"tenantKey",jsonSchema:{type:"string"},nullable:!1},{handle:"occurredAt",jsonSchema:{type:"string"},nullable:!0},{handle:"body",jsonSchema:{type:"object"},nullable:!1}]},source:{createSchema:{$schema:"https://json-schema.org/draft/2020-12/schema",type:"object",properties:{kind:{type:"string",const:"feishu"},version:{type:"number",const:1},name:{type:"string",minLength:1,maxLength:128},connectionId:{type:"string",minLength:1,maxLength:256},teamId:{anyOf:[{type:"string",minLength:1,maxLength:256},{type:"null"}]},verificationToken:{type:"string",minLength:1,maxLength:256},encryptKey:{type:"string",minLength:1,maxLength:256},eventTypes:{minItems:1,maxItems:200,type:"array",items:{type:"string",pattern:"^[a-z][a-z0-9_.:]{0,127}$"}},manageSubscriptions:{type:"boolean"}},required:["version","name","connectionId","teamId","verificationToken","encryptKey","eventTypes","manageSubscriptions"],additionalProperties:!1},updateSchema:{$schema:"https://json-schema.org/draft/2020-12/schema",type:"object",properties:{version:{type:"number",const:1},expectedRevision:{type:"integer",exclusiveMinimum:0,maximum:9007199254740991},name:{type:"string",minLength:1,maxLength:128},enabled:{type:"boolean"},eventTypes:{minItems:1,maxItems:200,type:"array",items:{type:"string",pattern:"^[a-z][a-z0-9_.:]{0,127}$"}},verificationToken:{type:"string",minLength:1,maxLength:256},signingSecret:{type:"string",minLength:1,maxLength:256},encryptKey:{type:"string",minLength:1,maxLength:256}},required:["version","expectedRevision","name","enabled","eventTypes"],additionalProperties:!1},kind:"feishu",provider:"feishu_app_bot",triggerId:"feishu_app_bot.on_event",maximumBodyBytes:65536,applicationIngress:!1,managed:!1},options:!1,eventSource:"feishu"},{snapshot:{key:"fireflies.on_meeting_ready",provider:"fireflies",name:"on_meeting_ready",displayName:"Meeting Transcript or Summary Ready",description:"Receives separate transcript and summary readiness events through Fireflies Webhooks V2 after checking meeting access.",definitionVersion:2,type:"integration",endpoint:{methods:["POST"],body:{formats:["json"],allowArray:!1,allowEmpty:!1},successStatus:200},configInputs:[{handle:"sourceId",jsonSchema:{type:"string",pattern:"^source_[0-9a-f]{32}$",title:"Event source"},nullable:!1},{handle:"eventTypes",jsonSchema:{type:"array",items:{type:"string",enum:["meeting.transcribed","meeting.summarized"]},minItems:1,maxItems:2,uniqueItems:!0,title:"Events"},nullable:!1,value:["meeting.transcribed","meeting.summarized"]}],outputs:[{handle:"event",jsonSchema:{type:"string"},nullable:!1},{handle:"deliveryId",jsonSchema:{type:"string"},nullable:!1},{handle:"accountId",jsonSchema:{type:"string"},nullable:!1},{handle:"meetingId",jsonSchema:{type:"string"},nullable:!1},{handle:"body",jsonSchema:{type:"object"},nullable:!1}]},callback:{headers:[],query:[]},source:{createSchema:{$schema:"https://json-schema.org/draft/2020-12/schema",type:"object",properties:{kind:{type:"string",const:"fireflies"},version:{type:"number",const:1},name:{type:"string",minLength:1,maxLength:128},connectionId:{type:"string",minLength:1,maxLength:256},teamId:{anyOf:[{type:"string",minLength:1,maxLength:256},{type:"null"}]},signingSecret:{type:"string",minLength:1,maxLength:256},eventTypes:{minItems:1,maxItems:2,type:"array",items:{type:"string",enum:["meeting.transcribed","meeting.summarized"]}}},required:["kind","version","name","connectionId","teamId","signingSecret","eventTypes"],additionalProperties:!1},updateSchema:{$schema:"https://json-schema.org/draft/2020-12/schema",type:"object",properties:{version:{type:"number",const:1},expectedRevision:{type:"integer",exclusiveMinimum:0,maximum:9007199254740991},name:{type:"string",minLength:1,maxLength:128},enabled:{type:"boolean"},eventTypes:{minItems:1,maxItems:200,type:"array",items:{type:"string",pattern:"^[a-z][a-z0-9_.:]{0,127}$"}},verificationToken:{type:"string",minLength:1,maxLength:256},signingSecret:{type:"string",minLength:1,maxLength:256},encryptKey:{type:"string",minLength:1,maxLength:256}},required:["version","expectedRevision","name","enabled","eventTypes"],additionalProperties:!1},kind:"fireflies",provider:"fireflies",triggerId:"fireflies.on_meeting_ready",maximumBodyBytes:65536,applicationIngress:!1,managed:!1},options:!1,eventSource:"fireflies"},{snapshot:{configInputs:[{handle:"events",jsonSchema:{type:"array",items:{type:"string",enum:["*","branch_protection_configuration","branch_protection_rule","check_run","check_suite","code_scanning_alert","commit_comment","create","custom_property_values","delete","dependabot_alert","deploy_key","deployment","deployment_status","discussion","discussion_comment","fork","gollum","issue_comment","issue_dependencies","issues","label","member","meta","milestone","package","page_build","project","project_card","project_column","public","pull_request","pull_request_review","pull_request_review_comment","pull_request_review_thread","push","registry_package","release","repository","repository_advisory","repository_import","repository_ruleset","repository_vulnerability_alert","secret_scanning_alert","secret_scanning_alert_location","secret_scanning_scan","security_and_analysis","star","status","sub_issues","team_add","watch","workflow_job","workflow_run"]},minItems:1,uniqueItems:!0},nullable:!1},{handle:"insecureSsl",jsonSchema:{type:"boolean"},nullable:!1,value:!1},{handle:"owner",jsonSchema:{type:"string",pattern:"^[a-zA-Z0-9](?:[a-zA-Z0-9]|-(?=[a-zA-Z0-9])){0,38}$"},nullable:!1},{handle:"repo",jsonSchema:{type:"string",pattern:"^(?!\\.{1,2}$)[a-zA-Z0-9._-]{1,100}$"},nullable:!1}],definitionVersion:2,description:"Triggers when selected GitHub webhook events occur in a repository.",displayName:"Repository Event",endpoint:{body:{allowArray:!1,allowEmpty:!1,formats:["json"]},methods:["POST"],successStatus:202},key:"github.on_repo_event",name:"on_repo_event",outputs:[{handle:"body",jsonSchema:{type:"object"},nullable:!1},{handle:"deliveryId",jsonSchema:{type:"string"},nullable:!1},{handle:"event",jsonSchema:{type:"string"},nullable:!1}],provider:"github",type:"integration"},callback:{headers:["x-github-delivery","x-github-event","x-hub-signature-256"],query:[]},options:!1},{snapshot:{configInputs:[{handle:"owner",jsonSchema:{type:"string",pattern:"^[a-zA-Z0-9](?:[a-zA-Z0-9]|-(?=[a-zA-Z0-9])){0,38}$"},nullable:!1},{handle:"repo",jsonSchema:{type:"string",pattern:"^(?!\\.{1,2}$)[a-zA-Z0-9._-]{1,100}$"},nullable:!1},{handle:"number",jsonSchema:{type:"integer",minimum:1},nullable:!1,description:"Number of the pull request to watch."}],definitionVersion:2,description:"Watches one pull request using notifications and periodic checks. Starts from its current state; reports observed changes, not every intermediate transition or review event.",displayName:"Watch Pull Request",endpoint:{body:{allowArray:!1,allowEmpty:!1,formats:["json"]},methods:["POST"],successStatus:202},key:"github.watch_pull_request",name:"watch_pull_request",provider:"github",type:"integration",outputs:[{handle:"pullRequest",jsonSchema:{type:"object",properties:{id:{type:"integer"},number:{type:"integer"},title:{type:"string"},url:{type:"string"},state:{type:"string",enum:["open","closed"]},draft:{type:"boolean"},merged:{type:"boolean"},updatedAt:{type:"string"},headSha:{type:"string"},baseSha:{type:"string"}},additionalProperties:!1,required:["id","number","title","url","state","draft","merged","updatedAt","headSha","baseSha"]},nullable:!1},{handle:"version",jsonSchema:{type:"string"},nullable:!1}]},callback:{headers:["x-github-delivery","x-github-event","x-hub-signature-256"],query:[]},options:!1,intervalMs:300000},{snapshot:{configInputs:[{handle:"events",jsonSchema:{type:"array",items:{type:"string",enum:["push","tag_push","issues","confidential_issues","note","confidential_note","merge_requests","job","pipeline","wiki_page","deployment","feature_flag","releases","milestone","emoji","resource_access_token","resource_deploy_token"]},minItems:1,uniqueItems:!0},nullable:!1},{handle:"insecureSsl",jsonSchema:{type:"boolean"},nullable:!1,value:!1},{handle:"project",jsonSchema:{type:"string",minLength:1,maxLength:255,pattern:"^(?:[0-9]+|(?!\\.{1,2}(?:/|$))[A-Za-z0-9_.][A-Za-z0-9_.-]*(?:/(?!\\.{1,2}(?:/|$))[A-Za-z0-9_.][A-Za-z0-9_.-]*)*)$"},nullable:!1},{handle:"pushBranchFilter",jsonSchema:{type:"string",maxLength:255},nullable:!1,value:""}],definitionVersion:2,description:"Triggers when selected GitLab webhook events occur in a project.",displayName:"Project Event",endpoint:{body:{allowArray:!1,allowEmpty:!1,formats:["json"]},methods:["POST"],successStatus:202},key:"gitlab.on_project_event",name:"on_project_event",outputs:[{handle:"body",jsonSchema:{type:"object"},nullable:!1},{handle:"deliveryId",jsonSchema:{type:"string"},nullable:!1},{handle:"event",jsonSchema:{type:"string"},nullable:!1},{handle:"gitlabEvent",jsonSchema:{type:"string"},nullable:!1}],provider:"gitlab",type:"integration"},callback:{headers:["idempotency-key","x-gitlab-event","x-gitlab-token"],query:[]},options:!1},{snapshot:{configInputs:[{handle:"labelNamesOrIds",jsonSchema:{type:"array",items:{type:"string",minLength:1}},nullable:!1,description:"Only trigger on messages carrying all of these labels, referenced by name or ID.",value:[]},{handle:"readStatus",jsonSchema:{type:"string",enum:["Read","Unread","All"]},nullable:!1,value:"All"},{handle:"search",jsonSchema:{type:"string"},nullable:!1,description:"Gmail search-syntax query the message must match.",value:""},{handle:"sender",jsonSchema:{type:"string"},nullable:!1,description:"Only trigger on messages whose sender matches this address or name.",value:""},{group:"Advanced settings",collapsed:!0},{handle:"includeDrafts",jsonSchema:{type:"boolean"},nullable:!1,value:!1,description:"Also trigger on draft messages."},{handle:"includeSpamAndTrash",jsonSchema:{type:"boolean"},nullable:!1,value:!1,description:"Also trigger on messages in SPAM and TRASH."},{handle:"maxMessagesPerPoll",jsonSchema:{type:"integer",minimum:1,maximum:100},nullable:!1,value:25}],definitionVersion:2,description:"Polls the Gmail mailbox and triggers when a new message is received.",displayName:"New Message Received",key:"gmail.on_message_received",name:"on_message_received",outputs:[{handle:"events",jsonSchema:{type:"array",items:{type:"object",properties:{historyId:{type:["string","null"]},labelIds:{type:"array",items:{type:"string"}},messageId:{type:"string"},messageTimestamp:{type:"string"},sender:{type:"string"},subject:{type:"string"},threadId:{type:"string"},to:{type:"string"}},additionalProperties:!1,required:["messageId","threadId","historyId","labelIds","subject","sender","to","messageTimestamp"]}},nullable:!1}],provider:"gmail",type:"poll"},options:!1},{snapshot:{configInputs:[{handle:"calendarId",jsonSchema:{type:"string",minLength:1,maxLength:1024},nullable:!1},{handle:"changes",jsonSchema:{type:"array",items:{type:"string",enum:["created","updated","cancelled"]},minItems:1,uniqueItems:!0},nullable:!1,value:["created","updated","cancelled"]},{handle:"matchTerm",jsonSchema:{type:"string"},nullable:!1,value:""},{group:"Advanced settings",collapsed:!0},{handle:"maxEventsPerPoll",jsonSchema:{type:"integer",minimum:1,maximum:500},nullable:!1,value:100}],definitionVersion:2,description:"Polls a Google Calendar and triggers when an event is created, updated or cancelled.",displayName:"Event Changed",key:"googlecalendar.on_event_changed",name:"on_event_changed",outputs:[{handle:"events",jsonSchema:{type:"array",items:{type:"object",properties:{attendeeEmails:{type:"array",items:{type:"string"}},calendarId:{type:"string"},changeType:{type:"string",enum:["created","updated","cancelled"]},created:{type:["string","null"]},creatorEmail:{type:["string","null"]},description:{type:["string","null"]},end:{type:["object","null"]},eventId:{type:"string"},eventType:{type:["string","null"]},htmlLink:{type:["string","null"]},isAllDay:{type:"boolean"},location:{type:["string","null"]},organizerEmail:{type:["string","null"]},recurringEventId:{type:["string","null"]},start:{type:["object","null"]},status:{type:"string"},summary:{type:["string","null"]},updated:{type:["string","null"]}},additionalProperties:!1,required:["changeType","calendarId","eventId","status","summary","description","location","htmlLink","start","end","isAllDay","organizerEmail","creatorEmail","attendeeEmails","recurringEventId","eventType","created","updated"]}},nullable:!1}],provider:"googlecalendar",type:"poll"},options:!1},{snapshot:{configInputs:[{handle:"driveId",jsonSchema:{type:"string",minLength:1,maxLength:256},nullable:!0,description:"Optional shared drive ID. Omit it to monitor the connected account."},{handle:"includeCorpusRemovals",jsonSchema:{type:"boolean"},nullable:!1,value:!1,description:"Include the accessible file resource when an item leaves the change corpus."},{handle:"includeItemsFromAllDrives",jsonSchema:{type:"boolean"},nullable:!1,value:!0,description:"Include items from My Drive and shared drives."},{handle:"includeRemoved",jsonSchema:{type:"boolean"},nullable:!1,value:!0,description:"Include changes caused by deletion or loss of access."},{handle:"pageSize",jsonSchema:{type:"integer",minimum:1,maximum:100},nullable:!1,value:100,description:"Maximum changes included in one Flow Run."},{handle:"restrictToMyDrive",jsonSchema:{type:"boolean"},nullable:!1,value:!1,description:"Restrict changes to the My Drive hierarchy."}],definitionVersion:2,description:"Uses a Google Drive changes.watch channel and triggers when Drive changes are available.",displayName:"Changes Detected",endpoint:{body:{allowArray:!1,allowEmpty:!0,formats:["json"]},methods:["POST"],successStatus:204},key:"googledrive.changes_detected",name:"changes_detected",outputs:[{handle:"events",jsonSchema:{type:"array",items:{type:"object",properties:{changeId:{type:"string"},changeType:{type:["string","null"]},driveId:{type:["string","null"]},file:{type:["object","null"]},fileId:{type:["string","null"]},notification:{type:"object",properties:{changedTypes:{type:"array",items:{type:"string"}},messageNumber:{type:["string","null"]},resourceState:{type:"string"},resourceUri:{type:["string","null"]}},additionalProperties:!1,required:["resourceState","changedTypes","messageNumber","resourceUri"]},removed:{type:"boolean"},time:{type:["string","null"]}},additionalProperties:!1,required:["changeId","changeType","removed","time","fileId","driveId","file","notification"]}},nullable:!1}],provider:"googledrive",type:"integration"},callback:{headers:["x-goog-changed","x-goog-channel-id","x-goog-channel-token","x-goog-message-number","x-goog-resource-id","x-goog-resource-state","x-goog-resource-uri"],query:[]},options:!1},{snapshot:{configInputs:[{handle:"changeType",jsonSchema:{type:"string",enum:["created","updated"]},nullable:!1},{handle:"driveId",jsonSchema:{type:"string",pattern:"^[A-Za-z0-9_-]{0,512}$"},nullable:!1,value:""},{handle:"folderId",jsonSchema:{type:"string",pattern:"^[A-Za-z0-9_-]{2,512}$"},nullable:!1},{handle:"itemTypes",jsonSchema:{type:"array",items:{type:"string",enum:["file","folder"]},minItems:1,uniqueItems:!0},nullable:!1,value:["file"]},{handle:"mimeTypes",jsonSchema:{type:"array",items:{type:"string",minLength:1}},nullable:!1,value:[]},{handle:"namePrefix",jsonSchema:{type:"string"},nullable:!1,value:""},{group:"Advanced settings",collapsed:!0},{handle:"maxFilesPerPoll",jsonSchema:{type:"integer",minimum:1,maximum:200},nullable:!1,value:50}],definitionVersion:2,description:"Polls one Google Drive folder and triggers when a file or folder directly inside it is created or updated.",displayName:"File or Folder Change in a Folder",key:"googledrive.on_file_change",name:"on_file_change",outputs:[{handle:"events",jsonSchema:{type:"array",items:{type:"object",properties:{createdTime:{type:["string","null"]},driveId:{type:["string","null"]},eventType:{type:"string",enum:["file_created","file_updated","folder_created","folder_updated"]},fileId:{type:"string"},itemType:{type:"string",enum:["file","folder"]},lastModifyingUser:{type:["object","null"]},mimeType:{type:"string"},modifiedTime:{type:["string","null"]},name:{type:"string"},parents:{type:"array",items:{type:"string"}},size:{type:"string"},webViewLink:{type:["string","null"]}},additionalProperties:!1,required:["eventType","itemType","fileId","name","mimeType","createdTime","modifiedTime","parents","webViewLink","driveId","lastModifyingUser"]}},nullable:!1}],provider:"googledrive",type:"poll"},options:!1},{snapshot:{configInputs:[{handle:"driveId",jsonSchema:{type:"string",minLength:1,maxLength:256},nullable:!0,description:"Optional shared drive ID. Omit it to monitor the connected account."},{handle:"includeCorpusRemovals",jsonSchema:{type:"boolean"},nullable:!1,value:!1,description:"Include the accessible file resource when an item leaves the change corpus."},{handle:"includeItemsFromAllDrives",jsonSchema:{type:"boolean"},nullable:!1,value:!0,description:"Include items from My Drive and shared drives."},{handle:"includeRemoved",jsonSchema:{type:"boolean"},nullable:!1,value:!0,description:"Include changes caused by deletion or loss of access."},{handle:"pageSize",jsonSchema:{type:"integer",minimum:1,maximum:100},nullable:!1,value:100,description:"Maximum changes included in one Flow Run."},{handle:"restrictToMyDrive",jsonSchema:{type:"boolean"},nullable:!1,value:!1,description:"Restrict changes to the My Drive hierarchy."}],definitionVersion:2,description:"Monitors Drive changes using notifications and periodic scans of the same change stream.",displayName:"Watch Changes",endpoint:{body:{allowArray:!1,allowEmpty:!0,formats:["json"]},methods:["POST"],successStatus:204},key:"googledrive.watch_changes",name:"watch_changes",outputs:[{handle:"events",jsonSchema:{type:"array",items:{type:"object"}},nullable:!1}],provider:"googledrive",type:"integration"},callback:{headers:["x-goog-changed","x-goog-channel-id","x-goog-channel-token","x-goog-message-number","x-goog-resource-id","x-goog-resource-state","x-goog-resource-uri"],query:[]},options:!1,intervalMs:300000},{snapshot:{configInputs:[{handle:"columnRange",jsonSchema:{type:"string",pattern:"^[A-Za-z]{1,3}(?::[A-Za-z]{1,3})?$"},nullable:!1,value:"A:ZZZ"},{handle:"sheet",jsonSchema:{type:"string",minLength:1},nullable:!1},{handle:"spreadsheetId",jsonSchema:{type:"string",minLength:1},nullable:!1},{group:"Advanced settings",collapsed:!0},{handle:"dateTimeRender",jsonSchema:{type:"string",enum:["FORMATTED_STRING","SERIAL_NUMBER"]},nullable:!1,value:"FORMATTED_STRING"},{handle:"firstDataRow",jsonSchema:{type:"integer",minimum:1},nullable:!1,value:2},{handle:"headerRow",jsonSchema:{type:"integer",minimum:1},nullable:!1,value:1},{handle:"maxRowsPerPoll",jsonSchema:{type:"integer",minimum:1,maximum:500},nullable:!1,value:100},{handle:"valueRender",jsonSchema:{type:"string",enum:["UNFORMATTED_VALUE","FORMATTED_VALUE","FORMULA"]},nullable:!1,value:"UNFORMATTED_VALUE"}],definitionVersion:2,description:"Polls a sheet and triggers once for every new row appended below the last row already seen.",displayName:"New Row Added",key:"googlesheets.on_row_added",name:"on_row_added",outputs:[{handle:"events",jsonSchema:{type:"array",items:{type:"object",properties:{row:{type:"object"},rowNumber:{type:"integer"},sheetId:{type:"integer"},sheetTitle:{type:"string"},spreadsheetId:{type:"string"},values:{type:"array",items:{}}},additionalProperties:!1,required:["spreadsheetId","sheetId","sheetTitle","rowNumber","row","values"]}},nullable:!1}],provider:"googlesheets",type:"poll"},options:!1},{snapshot:{key:"intercom.on_conversation_event",provider:"intercom",name:"on_conversation_event",displayName:"Customer Conversation or Ticket",description:"Receives customer conversations, customer replies and new tickets from a verified Intercom application event source. Administrator replies are excluded.",definitionVersion:2,type:"integration",endpoint:{methods:["POST"],body:{formats:["json"],allowArray:!1,allowEmpty:!1},successStatus:200},configInputs:[{handle:"sourceId",jsonSchema:{type:"string",pattern:"^source_[0-9a-f]{32}$",title:"Event source"},nullable:!1},{handle:"eventTypes",jsonSchema:{type:"array",items:{type:"string",enum:["conversation.user.created","conversation.user.replied","ticket.created"]},minItems:1,maxItems:3,uniqueItems:!0,title:"Events"},nullable:!1,value:["conversation.user.created","conversation.user.replied","ticket.created"]}],outputs:[{handle:"event",jsonSchema:{type:"string"},nullable:!1},{handle:"deliveryId",jsonSchema:{type:"string"},nullable:!1},{handle:"workspaceId",jsonSchema:{type:"string"},nullable:!1},{handle:"objectId",jsonSchema:{type:"string"},nullable:!1},{handle:"body",jsonSchema:{type:"object",properties:{},additionalProperties:!0},nullable:!1}]},callback:{headers:[],query:[]},source:{createSchema:{$schema:"https://json-schema.org/draft/2020-12/schema",type:"object",properties:{kind:{type:"string",const:"intercom"},version:{type:"number",const:1},name:{type:"string",minLength:1,maxLength:128},connectionId:{type:"string",minLength:1,maxLength:256},teamId:{anyOf:[{type:"string",minLength:1,maxLength:256},{type:"null"}]},appId:{type:"string",minLength:1,maxLength:256},signingSecret:{type:"string",minLength:1,maxLength:256},eventTypes:{minItems:1,maxItems:3,type:"array",items:{type:"string",enum:["conversation.user.created","conversation.user.replied","ticket.created"]}}},required:["kind","version","name","connectionId","teamId","appId","signingSecret","eventTypes"],additionalProperties:!1},updateSchema:{$schema:"https://json-schema.org/draft/2020-12/schema",type:"object",properties:{version:{type:"number",const:1},expectedRevision:{type:"integer",exclusiveMinimum:0,maximum:9007199254740991},name:{type:"string",minLength:1,maxLength:128},enabled:{type:"boolean"},eventTypes:{minItems:1,maxItems:200,type:"array",items:{type:"string",pattern:"^[a-z][a-z0-9_.:]{0,127}$"}},verificationToken:{type:"string",minLength:1,maxLength:256},signingSecret:{type:"string",minLength:1,maxLength:256},encryptKey:{type:"string",minLength:1,maxLength:256}},required:["version","expectedRevision","name","enabled","eventTypes"],additionalProperties:!1},kind:"intercom",provider:"intercom",triggerId:"intercom.on_conversation_event",maximumBodyBytes:65536,applicationIngress:!0,managed:!1},options:!1,eventSource:"intercom"},{snapshot:{key:"jira.on_issue_event",provider:"jira",name:"on_issue_event",displayName:"Issue or Comment Event",description:"Receives Jira Cloud issue creation, issue updates and new comments through a shared project webhook with automatic renewal.",definitionVersion:2,type:"integration",endpoint:{methods:["POST"],body:{formats:["json"],allowArray:!1,allowEmpty:!1},successStatus:200},configInputs:[{handle:"sourceId",jsonSchema:{type:"string",pattern:"^source_[0-9a-f]{32}$",title:"Event source"},nullable:!1},{handle:"eventTypes",jsonSchema:{type:"array",items:{type:"string",enum:["jira:issue_created","jira:issue_updated","comment_created"]},minItems:1,maxItems:3,uniqueItems:!0,title:"Events"},nullable:!1,value:["jira:issue_created","jira:issue_updated","comment_created"]}],outputs:[{handle:"event",jsonSchema:{type:"string"},nullable:!1},{handle:"deliveryId",jsonSchema:{type:"string"},nullable:!1},{handle:"cloudId",jsonSchema:{type:"string"},nullable:!1},{handle:"issueId",jsonSchema:{type:"string"},nullable:!1},{handle:"body",jsonSchema:{type:"object"},nullable:!1}]},callback:{headers:[],query:[]},source:{createSchema:{$schema:"https://json-schema.org/draft/2020-12/schema",type:"object",properties:{kind:{type:"string",const:"jira"},version:{type:"number",const:1},name:{type:"string",minLength:1,maxLength:128},connectionId:{type:"string",minLength:1,maxLength:256},teamId:{anyOf:[{type:"string",minLength:1,maxLength:256},{type:"null"}]},project:{type:"string",minLength:1,maxLength:256},eventTypes:{minItems:1,maxItems:3,type:"array",items:{type:"string",enum:["jira:issue_created","jira:issue_updated","comment_created"]}}},required:["kind","version","name","connectionId","teamId","project","eventTypes"],additionalProperties:!1},updateSchema:{$schema:"https://json-schema.org/draft/2020-12/schema",type:"object",properties:{version:{type:"number",const:1},expectedRevision:{type:"integer",exclusiveMinimum:0,maximum:9007199254740991},name:{type:"string",minLength:1,maxLength:128},enabled:{type:"boolean"},eventTypes:{minItems:1,maxItems:200,type:"array",items:{type:"string",pattern:"^[a-z][a-z0-9_.:]{0,127}$"}},verificationToken:{type:"string",minLength:1,maxLength:256},signingSecret:{type:"string",minLength:1,maxLength:256},encryptKey:{type:"string",minLength:1,maxLength:256}},required:["version","expectedRevision","name","enabled","eventTypes"],additionalProperties:!1},kind:"jira",provider:"jira",triggerId:"jira.on_issue_event",maximumBodyBytes:65536,applicationIngress:!1,managed:!0},options:!1,eventSource:"jira"},{snapshot:{configInputs:[{handle:"teamId",jsonSchema:{type:"string",pattern:"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$",title:"Team ID"},nullable:!1,description:"Linear Team UUID. Use Copy model UUID in Linear to find it."},{handle:"stateIds",jsonSchema:{type:"array",items:{type:"string",pattern:"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},maxItems:50,uniqueItems:!0,title:"Issue statuses"},nullable:!1,value:[],description:"Choose statuses from the selected Team. Empty means all statuses. Matches the current status, not every transition into it."}],definitionVersion:2,description:"Watches new and updated issues in a Linear team with periodic checks. Starts from now without running existing issues. Reports observed current states, not deletions or every intermediate status change.",displayName:"Issue Created or Updated",key:"linear.on_issue_changed",name:"on_issue_changed",outputs:[{handle:"events",jsonSchema:{type:"array",items:{type:"object",properties:{id:{type:"string"},identifier:{type:"string"},title:{type:"string"},url:{type:"string"},teamId:{type:"string"},createdAt:{type:"string"},updatedAt:{type:"string"},state:{type:"object",properties:{id:{type:"string"},name:{type:"string"},type:{type:"string"}},additionalProperties:!1,required:["id","name","type"]}},additionalProperties:!1,required:["id","identifier","title","url","teamId","createdAt","updatedAt","state"]}},nullable:!1}],provider:"linear",type:"poll"},options:!0},{snapshot:{configInputs:[{handle:"dataSourceId",jsonSchema:{type:"string",pattern:"^(?:|[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12})$"},nullable:!1,value:""},{handle:"databaseId",jsonSchema:{type:"string",pattern:"^[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12}$"},nullable:!1},{handle:"events",jsonSchema:{type:"array",items:{type:"string",enum:["page_added","page_updated"]},minItems:1,uniqueItems:!0},nullable:!1,value:["page_added"]},{group:"Advanced settings",collapsed:!0},{handle:"includeProperties",jsonSchema:{type:"boolean"},nullable:!1,value:!0},{handle:"maxItemsPerPoll",jsonSchema:{type:"integer",minimum:1,maximum:100},nullable:!1,value:25}],definitionVersion:2,description:"Polls a Notion database and triggers when a page is added to it or an existing page is edited.",displayName:"Database Page Added or Updated",key:"notion.on_database_page_event",name:"on_database_page_event",outputs:[{handle:"events",jsonSchema:{type:"array",items:{type:"object",properties:{createdBy:{type:"object"},createdTime:{type:"string"},dataSourceId:{type:"string"},databaseId:{type:"string"},event:{type:"string",enum:["page_added","page_updated"]},lastEditedBy:{type:"object"},lastEditedTime:{type:"string"},pageId:{type:"string"},properties:{type:"object"},title:{type:"string"},url:{type:"string"}},additionalProperties:!1,required:["event","pageId","databaseId","dataSourceId","url","title","createdTime","lastEditedTime","createdBy","lastEditedBy"]}},nullable:!1}],provider:"notion",type:"poll"},options:!1},{snapshot:{configInputs:[{handle:"events",jsonSchema:{type:"array",items:{type:"string",enum:["created","updated","deleted"]},minItems:1,uniqueItems:!0},nullable:!1,value:["created","updated"]},{handle:"itemId",jsonSchema:{type:"string"},nullable:!1,value:""},{handle:"itemTypes",jsonSchema:{type:"array",items:{type:"string",enum:["file","folder"]},minItems:1,uniqueItems:!0},nullable:!1,value:["file"]},{handle:"parentFolderId",jsonSchema:{type:"string"},nullable:!1,value:""},{group:"Advanced settings",collapsed:!0},{handle:"maxItemsPerPoll",jsonSchema:{type:"integer",minimum:1,maximum:200},nullable:!1,value:50}],definitionVersion:2,description:"Polls the OneDrive change feed and triggers when a file or folder is created, updated or deleted.",displayName:"File or Folder Changed",key:"one_drive.on_item_changed",name:"on_item_changed",outputs:[{handle:"events",jsonSchema:{type:"array",items:{type:"object",properties:{changeType:{type:"string",enum:["created","updated","deleted"]},createdDateTime:{type:["string","null"]},driveId:{type:["string","null"]},eTag:{type:["string","null"]},itemId:{type:"string"},itemType:{type:"string",enum:["file","folder"]},lastModifiedDateTime:{type:["string","null"]},mimeType:{type:["string","null"]},name:{type:"string"},parentFolderId:{type:["string","null"]},size:{type:["number","null"]},webUrl:{type:"string"}},additionalProperties:!1,required:["itemId","name","changeType","itemType","size","mimeType","webUrl","parentFolderId","driveId","createdDateTime","lastModifiedDateTime","eTag"]}},nullable:!1}],provider:"one_drive",type:"poll"},options:!1},{snapshot:{configInputs:[{handle:"folder",jsonSchema:{type:"string",pattern:"^[A-Za-z0-9_=-]*$"},nullable:!1,value:"inbox",description:"A well-known mail folder name, folder ID, or an empty string for the whole mailbox."},{handle:"readStatus",jsonSchema:{type:"string",enum:["All","Read","Unread"]},nullable:!1,value:"All"},{handle:"senderAddress",jsonSchema:{type:"string"},nullable:!1,value:"",description:"Exact sender address, or empty for any sender."},{handle:"subjectContains",jsonSchema:{type:"string"},nullable:!1,value:"",description:"Case-insensitive subject text."},{handle:"withAttachmentsOnly",jsonSchema:{type:"boolean"},nullable:!1,value:!1},{group:"Advanced settings",collapsed:!0},{handle:"includeDrafts",jsonSchema:{type:"boolean"},nullable:!1,value:!1},{handle:"maxMessagesPerPoll",jsonSchema:{type:"integer",minimum:1,maximum:100},nullable:!1,value:25}],definitionVersion:2,description:"Polls a Microsoft Outlook mail folder and triggers when a new message arrives.",displayName:"New Message Received",key:"outlook.on_message_received",name:"on_message_received",outputs:[{handle:"events",jsonSchema:{type:"array",items:{type:"object",properties:{bodyPreview:{type:"string"},categories:{type:"array",items:{type:"string"}},conversationId:{type:"string"},from:{type:"string"},fromName:{type:"string"},hasAttachments:{type:"boolean"},importance:{type:"string"},internetMessageId:{type:"string"},isDraft:{type:"boolean"},isRead:{type:"boolean"},messageId:{type:"string"},parentFolderId:{type:"string"},receivedDateTime:{type:"string"},subject:{type:"string"},to:{type:"array",items:{type:"string"}},webLink:{type:"string"}},additionalProperties:!1,required:["messageId","internetMessageId","conversationId","subject","bodyPreview","from","fromName","to","receivedDateTime","hasAttachments","isRead","isDraft","importance","categories","parentFolderId","webLink"]}},nullable:!1}],provider:"outlook",type:"poll"},options:!1},{snapshot:{key:"pandadoc.on_document_event",provider:"pandadoc",name:"on_document_event",displayName:"Document Status Changed",description:"Receives document status changes in the connected workspace, optionally only when the entire document is completed.",definitionVersion:2,type:"integration",endpoint:{methods:["POST"],body:{formats:["json"],allowArray:!0,allowEmpty:!1},successStatus:200},configInputs:[{handle:"completedOnly",jsonSchema:{type:"boolean",title:"Completed documents only"},nullable:!1,value:!0}],outputs:[{handle:"events",nullable:!1,jsonSchema:{type:"array",items:{type:"object",properties:{event:{type:"string"},data:{type:"object"}},required:["event","data"]}}}]},callback:{headers:[],query:["signature"]},options:!1},{snapshot:{key:"pipedrive.on_crm_event",provider:"pipedrive",name:"on_crm_event",displayName:"Deal or Contact Event",description:"Receives new deals or contacts, or actual changes to a deal stage or status using Pipedrive Webhooks v2.",definitionVersion:2,type:"integration",endpoint:{methods:["POST"],body:{formats:["json"],allowArray:!1,allowEmpty:!1},successStatus:200},configInputs:[{handle:"eventType",jsonSchema:{type:"string",enum:["deal.created","deal.stage_changed","deal.status_changed","person.created"],title:"Event"},nullable:!1,value:"deal.created"}],outputs:[{handle:"event",jsonSchema:{type:"string",enum:["deal.created","deal.stage_changed","deal.status_changed","person.created"]},nullable:!1},{handle:"deliveryId",jsonSchema:{type:"string"},nullable:!1},{handle:"objectId",jsonSchema:{type:"string"},nullable:!1},{handle:"body",jsonSchema:{type:"object"},nullable:!1}]},callback:{headers:["authorization"],query:[]},options:!1},{snapshot:{key:"resend.on_email_event",provider:"resend",name:"on_email_event",displayName:"Email Received, Bounced or Complained",description:"Receives inbound email, bounce, and complaint notifications. Read message bodies and attachments with Actions.",definitionVersion:2,type:"integration",endpoint:{methods:["POST"],body:{formats:["json"],allowArray:!1,allowEmpty:!1},successStatus:200},configInputs:[{handle:"eventTypes",jsonSchema:{type:"array",items:{type:"string",enum:["email.received","email.bounced","email.complained"]},minItems:1,uniqueItems:!0,title:"Events"},nullable:!1,value:["email.received","email.bounced","email.complained"]}],outputs:[{handle:"event",jsonSchema:{type:"string",enum:["email.received","email.bounced","email.complained"]},nullable:!1},{handle:"deliveryId",jsonSchema:{type:"string"},nullable:!1},{handle:"emailId",jsonSchema:{type:"string"},nullable:!1},{handle:"createdAt",jsonSchema:{type:"string"},nullable:!1},{handle:"body",jsonSchema:{type:"object"},nullable:!1}]},callback:{headers:["svix-id","svix-signature","svix-timestamp"],query:[]},options:!1},{snapshot:{key:"sentry.on_issue_alert",provider:"sentry",name:"on_issue_alert",displayName:"Issue Alert",description:"Receives Issue Alert Rule notifications from a verified Sentry Custom Integration installation.",definitionVersion:2,type:"integration",endpoint:{methods:["POST"],body:{formats:["json"],allowArray:!1,allowEmpty:!1},successStatus:200},configInputs:[{handle:"projectIds",jsonSchema:{type:"array",items:{type:"string",pattern:"^[0-9]+$"},uniqueItems:!0,title:"Project IDs"},nullable:!0},{handle:"ruleNames",jsonSchema:{type:"array",items:{type:"string",minLength:1},uniqueItems:!0,title:"Alert rule names"},nullable:!0},{handle:"sourceId",jsonSchema:{type:"string",pattern:"^source_[0-9a-f]{32}$",title:"Event source"},nullable:!1},{handle:"eventTypes",jsonSchema:{type:"array",items:{type:"string",enum:["issue.alert"]},minItems:1,maxItems:1,uniqueItems:!0,title:"Events"},nullable:!1,value:["issue.alert"]}],outputs:[{handle:"event",jsonSchema:{type:"string"},nullable:!1},{handle:"deliveryId",jsonSchema:{type:"string"},nullable:!1},{handle:"organizationId",jsonSchema:{type:"string"},nullable:!1},{handle:"issueId",jsonSchema:{type:"string"},nullable:!1},{handle:"body",jsonSchema:{type:"object"},nullable:!1}]},callback:{headers:[],query:[]},source:{createSchema:{$schema:"https://json-schema.org/draft/2020-12/schema",type:"object",properties:{kind:{type:"string",const:"sentry"},version:{type:"number",const:1},name:{type:"string",minLength:1,maxLength:128},connectionId:{type:"string",minLength:1,maxLength:256},teamId:{anyOf:[{type:"string",minLength:1,maxLength:256},{type:"null"}]},appId:{type:"string",minLength:1,maxLength:256},installationId:{type:"string",minLength:1,maxLength:256},organizationId:{type:"string",minLength:1,maxLength:256},signingSecret:{type:"string",minLength:1,maxLength:256},eventTypes:{minItems:1,maxItems:1,type:"array",items:{type:"string",const:"issue.alert"}}},required:["kind","version","name","connectionId","teamId","appId","installationId","organizationId","signingSecret","eventTypes"],additionalProperties:!1},updateSchema:{$schema:"https://json-schema.org/draft/2020-12/schema",type:"object",properties:{version:{type:"number",const:1},expectedRevision:{type:"integer",exclusiveMinimum:0,maximum:9007199254740991},name:{type:"string",minLength:1,maxLength:128},enabled:{type:"boolean"},eventTypes:{minItems:1,maxItems:200,type:"array",items:{type:"string",pattern:"^[a-z][a-z0-9_.:]{0,127}$"}},verificationToken:{type:"string",minLength:1,maxLength:256},signingSecret:{type:"string",minLength:1,maxLength:256},encryptKey:{type:"string",minLength:1,maxLength:256}},required:["version","expectedRevision","name","enabled","eventTypes"],additionalProperties:!1},kind:"sentry",provider:"sentry",triggerId:"sentry.on_issue_alert",maximumBodyBytes:65536,applicationIngress:!0,managed:!1},options:!1,eventSource:"sentry"},{snapshot:{configInputs:[{handle:"topics",jsonSchema:{type:"array",items:{type:"string",enum:["app/scopes_update","app/uninstalled","app_purchases_one_time/update","app_subscriptions/approaching_capped_amount","app_subscriptions/update","bulk_operations/finish","carts/create","carts/update","channels/delete","checkout_and_accounts_configurations/update","checkouts/create","checkouts/delete","checkouts/update","collection_listings/add","collection_listings/remove","collection_listings/update","collection_publications/create","collection_publications/delete","collection_publications/update","collections/create","collections/delete","collections/update","companies/create","companies/delete","companies/update","company_contact_roles/assign","company_contact_roles/revoke","company_contacts/create","company_contacts/delete","company_contacts/update","company_locations/create","company_locations/delete","company_locations/update","customer.joined_segment","customer.left_segment","customer.tags_added","customer.tags_removed","customer_account_settings/update","customer_groups/create","customer_groups/delete","customer_groups/update","customers/create","customers/delete","customers/disable","customers/enable","customers/purchasing_summary","customers/update","customers_email_marketing_consent/update","customers_marketing_consent/update","delivery_promise_settings/update","disputes/create","disputes/update","domains/create","domains/destroy","domains/update","draft_orders/create","draft_orders/delete","draft_orders/update","fulfillment_events/create","fulfillment_events/delete","fulfillment_holds/added","fulfillment_holds/released","fulfillment_orders/cancellation_request_accepted","fulfillment_orders/cancellation_request_rejected","fulfillment_orders/cancellation_request_submitted","fulfillment_orders/cancelled","fulfillment_orders/fulfillment_request_accepted","fulfillment_orders/fulfillment_request_rejected","fulfillment_orders/fulfillment_request_submitted","fulfillment_orders/fulfillment_service_failed_to_complete","fulfillment_orders/hold_released","fulfillment_orders/line_items_prepared_for_local_delivery","fulfillment_orders/line_items_prepared_for_pickup","fulfillment_orders/manually_reported_progress_stopped","fulfillment_orders/merged","fulfillment_orders/moved","fulfillment_orders/order_routing_complete","fulfillment_orders/placed_on_hold","fulfillment_orders/progress_reported","fulfillment_orders/rescheduled","fulfillment_orders/scheduled_fulfillment_order_ready","fulfillment_orders/split","fulfillments/create","fulfillments/update","inventory_items/create","inventory_items/delete","inventory_items/update","inventory_levels/connect","inventory_levels/disconnect","inventory_levels/update","locales/create","locales/destroy","locales/update","locations/activate","locations/create","locations/deactivate","locations/delete","locations/update","machine_translation_batch/completed","metafield_definitions/create","metafield_definitions/delete","metafield_definitions/update","order_transactions/create","orders/cancelled","orders/create","orders/delete","orders/edited","orders/fulfilled","orders/link_requested","orders/paid","orders/partially_fulfilled","orders/risk_assessment_changed","orders/shopify_protect_eligibility_changed","orders/updated","payment_schedules/due","payment_terms/create","payment_terms/delete","payment_terms/update","product_feeds/create","product_feeds/full_sync","product_feeds/full_sync_finish","product_feeds/incremental_sync","product_feeds/update","product_listings/add","product_listings/remove","product_listings/update","product_publications/create","product_publications/delete","product_publications/update","products/create","products/delete","products/update","profiles/create","profiles/delete","profiles/update","publications/delete","refunds/create","returns/approve","returns/cancel","returns/close","returns/decline","returns/process","returns/reopen","returns/request","returns/update","reverse_deliveries/attach_deliverable","reverse_fulfillment_orders/dispose","scheduled_product_listings/add","scheduled_product_listings/remove","scheduled_product_listings/update","segments/create","segments/delete","segments/update","selling_plan_groups/create","selling_plan_groups/delete","selling_plan_groups/update","shop/update","subscription_billing_attempts/challenged","subscription_billing_attempts/failure","subscription_billing_attempts/success","subscription_billing_cycle_edits/create","subscription_billing_cycle_edits/delete","subscription_billing_cycle_edits/update","subscription_billing_cycles/skip","subscription_billing_cycles/unskip","subscription_contracts/activate","subscription_contracts/cancel","subscription_contracts/create","subscription_contracts/expire","subscription_contracts/fail","subscription_contracts/pause","subscription_contracts/update","tax_partners/update","tax_summaries/create","tender_transactions/create","themes/create","themes/delete","themes/publish","themes/update","variants/in_stock","variants/out_of_stock"]},minItems:1,maxItems:20,uniqueItems:!0},nullable:!1}],definitionVersion:2,description:"Triggers when selected Shopify webhook topics occur in the connected store.",displayName:"Store Event",endpoint:{body:{allowArray:!1,allowEmpty:!1,formats:["json"]},methods:["POST"],successStatus:202},key:"shopify.on_shop_event",name:"on_shop_event",outputs:[{handle:"apiVersion",jsonSchema:{type:"string"},nullable:!1},{handle:"body",jsonSchema:{type:"object"},nullable:!1},{handle:"eventId",jsonSchema:{type:"string"},nullable:!1},{handle:"shopDomain",jsonSchema:{type:"string"},nullable:!1},{handle:"topic",jsonSchema:{type:"string"},nullable:!1},{handle:"triggeredAt",jsonSchema:{type:"string"},nullable:!1},{handle:"webhookId",jsonSchema:{type:"string"},nullable:!1}],provider:"shopify",type:"integration"},callback:{headers:["x-shopify-api-version","x-shopify-event-id","x-shopify-shop-domain","x-shopify-topic","x-shopify-triggered-at","x-shopify-webhook-id"],query:["open_flow_callback"]},options:!1},{snapshot:{configInputs:[{handle:"channelId",jsonSchema:{type:"string",pattern:"^[CDG][A-Z0-9]{2,31}$"},nullable:!1,description:"Slack conversation ID to watch, e.g. C0122KQ70S7E."},{handle:"fromUserIds",jsonSchema:{type:"array",items:{type:"string",pattern:"^[UW][A-Z0-9]{2,31}$"}},nullable:!1,value:[],description:"Only trigger on messages written by these Slack user IDs. Empty means any author."},{handle:"ignoreUserIds",jsonSchema:{type:"array",items:{type:"string",pattern:"^[UW][A-Z0-9]{2,31}$"}},nullable:!1,value:[],description:"Never trigger on messages written by these Slack user IDs."},{handle:"textContains",jsonSchema:{type:"string"},nullable:!1,value:"",description:"Only trigger when message text contains this string, case-insensitively."},{group:"Advanced settings",collapsed:!0},{handle:"includeBotMessages",jsonSchema:{type:"boolean"},nullable:!1,value:!1,description:"Also trigger on messages posted by bots and apps."},{handle:"includeSystemMessages",jsonSchema:{type:"boolean"},nullable:!1,value:!1,description:"Also trigger on Slack system notices."},{handle:"maxMessagesPerPoll",jsonSchema:{type:"integer",minimum:1,maximum:100},nullable:!1,value:15,description:"Maximum number of messages processed per poll."}],definitionVersion:2,description:"Polls one Slack conversation and triggers when a new message is posted to it.",displayName:"New Channel Message",key:"slack.on_message_posted",name:"on_message_posted",outputs:[{handle:"events",jsonSchema:{type:"array",items:{type:"object",properties:{botId:{type:["string","null"]},channelId:{type:"string"},files:{type:"array",items:{type:"object",properties:{id:{type:"string"},mimetype:{type:"string"},name:{type:"string"}},additionalProperties:!1,required:["id","name","mimetype"]}},messageTs:{type:"string"},subtype:{type:["string","null"]},text:{type:"string"},threadTs:{type:["string","null"]},userId:{type:["string","null"]}},additionalProperties:!1,required:["channelId","messageTs","threadTs","userId","botId","subtype","text","files"]}},nullable:!1}],provider:"slack",type:"poll"},options:!1},{snapshot:{key:"slackbot.on_event",provider:"slackbot",name:"on_event",displayName:"Mention or Direct Message",description:"Receives user mentions and new direct messages through a shared Slack application event source. Slack Connect events are excluded.",definitionVersion:2,type:"integration",endpoint:{methods:["POST"],body:{formats:["json"],allowArray:!1,allowEmpty:!1},successStatus:200},configInputs:[{handle:"sourceId",jsonSchema:{type:"string",pattern:"^source_[0-9a-f]{32}$",title:"Event source"},nullable:!1},{handle:"eventTypes",jsonSchema:{type:"array",items:{type:"string",enum:["app_mention","message.im"]},minItems:1,maxItems:2,uniqueItems:!0,title:"Events"},nullable:!1,value:["app_mention","message.im"]},{handle:"channelIds",jsonSchema:{type:"array",items:{type:"string",minLength:1},maxItems:100,uniqueItems:!0,title:"Channel IDs"},nullable:!0}],outputs:[{handle:"event",jsonSchema:{type:"string"},nullable:!1},{handle:"deliveryId",jsonSchema:{type:"string"},nullable:!1},{handle:"appId",jsonSchema:{type:"string"},nullable:!1},{handle:"teamId",jsonSchema:{type:"string"},nullable:!1},{handle:"channel",jsonSchema:{type:"string"},nullable:!1},{handle:"user",jsonSchema:{type:"string"},nullable:!1},{handle:"text",jsonSchema:{type:"string"},nullable:!1},{handle:"ts",jsonSchema:{type:"string"},nullable:!1},{handle:"threadTs",jsonSchema:{type:"string"},nullable:!0},{handle:"body",jsonSchema:{type:"object"},nullable:!1}]},callback:{headers:[],query:[]},source:{createSchema:{$schema:"https://json-schema.org/draft/2020-12/schema",type:"object",properties:{kind:{type:"string",const:"slack"},version:{type:"number",const:1},name:{type:"string",minLength:1,maxLength:128},connectionId:{type:"string",minLength:1,maxLength:256},teamId:{anyOf:[{type:"string",minLength:1,maxLength:256},{type:"null"}]},appId:{type:"string",pattern:"^A[A-Z0-9]+$"},workspaceId:{type:"string",pattern:"^T[A-Z0-9]+$"},signingSecret:{type:"string",minLength:1,maxLength:256},eventTypes:{minItems:1,maxItems:2,type:"array",items:{type:"string",enum:["app_mention","message.im"]}}},required:["kind","version","name","connectionId","teamId","appId","workspaceId","signingSecret","eventTypes"],additionalProperties:!1},updateSchema:{$schema:"https://json-schema.org/draft/2020-12/schema",type:"object",properties:{version:{type:"number",const:1},expectedRevision:{type:"integer",exclusiveMinimum:0,maximum:9007199254740991},name:{type:"string",minLength:1,maxLength:128},enabled:{type:"boolean"},eventTypes:{minItems:1,maxItems:200,type:"array",items:{type:"string",pattern:"^[a-z][a-z0-9_.:]{0,127}$"}},verificationToken:{type:"string",minLength:1,maxLength:256},signingSecret:{type:"string",minLength:1,maxLength:256},encryptKey:{type:"string",minLength:1,maxLength:256}},required:["version","expectedRevision","name","enabled","eventTypes"],additionalProperties:!1},kind:"slack",provider:"slackbot",triggerId:"slackbot.on_event",maximumBodyBytes:65536,applicationIngress:!0,managed:!1},options:!1,eventSource:"slack"},{snapshot:{configInputs:[{handle:"apiVersion",jsonSchema:{type:"string",maxLength:40},nullable:!1,value:""},{handle:"events",jsonSchema:{type:"array",items:{type:"string",maxLength:120,pattern:"^(\\*|[a-z0-9_]+(?:\\.[a-z0-9_]+)+)$"},minItems:1,uniqueItems:!0},nullable:!1},{handle:"includeConnectedAccounts",jsonSchema:{type:"boolean"},nullable:!1,value:!1}],definitionVersion:2,description:"Triggers when selected Stripe events happen on the connected account.",displayName:"Account Event",endpoint:{body:{allowArray:!1,allowEmpty:!1,formats:["json"]},methods:["POST"],successStatus:202},key:"stripe.on_event",name:"on_event",outputs:[{handle:"body",jsonSchema:{type:"object"},nullable:!1},{handle:"event",jsonSchema:{type:"string"},nullable:!1},{handle:"eventId",jsonSchema:{type:"string"},nullable:!1},{handle:"livemode",jsonSchema:{type:"boolean"},nullable:!1}],provider:"stripe",type:"integration"},callback:{headers:["stripe-signature"],query:[]},options:!1},{snapshot:{configInputs:[{handle:"formId",jsonSchema:{type:"string",minLength:1,maxLength:128,title:"Form"},nullable:!1,description:"Choose a form accessible to this Connection."}],definitionVersion:2,description:"Receives new Tally form submissions through a signed, automatically managed webhook.",displayName:"Form Response",endpoint:{body:{allowArray:!1,allowEmpty:!1,formats:["json"]},methods:["POST"],successStatus:200},key:"tally.on_form_response",name:"on_form_response",outputs:[{handle:"response",nullable:!1,jsonSchema:{type:"object",properties:{eventId:{type:"string"},createdAt:{type:"string"},formId:{type:"string"},submissionId:{type:"string"},responseId:{type:"string"},fields:{type:"array",items:{type:"object",properties:{key:{type:"string"},type:{type:"string"},label:{type:["string","null"]},value:{},options:{type:"array",items:{type:"object"}}},required:["key","type","label","value"]}}},required:["eventId","createdAt","formId","submissionId","responseId","fields"]}}],provider:"tally",type:"integration"},callback:{headers:["tally-signature"],query:[]},options:!0},{snapshot:{configInputs:[{handle:"chatIds",jsonSchema:{type:"array",items:{type:"string",pattern:"^-?[0-9]{1,20}$"},maxItems:100,uniqueItems:!0},nullable:!1,value:[],description:"Only accept updates from these numeric Telegram chat IDs. Empty means every chat."},{handle:"dropPendingUpdates",jsonSchema:{type:"boolean"},nullable:!1,value:!0,description:"Discard updates queued before the webhook is created or resumed."},{handle:"updates",jsonSchema:{type:"array",items:{enum:["*","message","edited_message","channel_post","edited_channel_post","business_connection","business_message","edited_business_message","deleted_business_messages","guest_message","message_reaction","message_reaction_count","inline_query","chosen_inline_result","callback_query","shipping_query","pre_checkout_query","purchased_paid_media","poll","poll_answer","my_chat_member","chat_member","chat_join_request","chat_boost","removed_chat_boost","managed_bot","subscription"]},minItems:1,uniqueItems:!0},nullable:!1,description:"Telegram update types that trigger a Run. Use * for the Telegram default set."},{handle:"userIds",jsonSchema:{type:"array",items:{type:"string",pattern:"^[0-9]{1,20}$"},maxItems:100,uniqueItems:!0},nullable:!1,value:[],description:"Only accept updates from these numeric Telegram user IDs. Empty means every user."}],definitionVersion:2,description:"Triggers when the connected Telegram bot receives a selected update.",displayName:"Bot Update",endpoint:{body:{allowArray:!1,allowEmpty:!1,formats:["json"]},methods:["POST"],successStatus:200},key:"telegram.on_update",name:"on_update",outputs:[{handle:"body",jsonSchema:{type:"object"},nullable:!1},{handle:"deliveryId",jsonSchema:{type:"string"},nullable:!1},{handle:"event",jsonSchema:{type:"string"},nullable:!1}],provider:"telegram",type:"integration"},callback:{headers:["x-telegram-bot-api-secret-token"],query:[]},options:!1},{snapshot:{key:"typeform.on_form_response",provider:"typeform",name:"on_form_response",displayName:"Completed Form Response",description:"Receives complete Typeform submissions through an automatically managed signed webhook.",definitionVersion:2,type:"integration",endpoint:{methods:["POST"],body:{formats:["json"],allowArray:!1,allowEmpty:!1},successStatus:200},configInputs:[{handle:"formId",jsonSchema:{type:"string",minLength:1,maxLength:128,title:"Form ID"},nullable:!1}],outputs:[{handle:"response",nullable:!1,jsonSchema:{type:"object",properties:{eventId:{type:"string"},form_id:{type:"string"},token:{type:"string"},submitted_at:{type:"string"},answers:{type:"array",items:{type:"object"}},definition:{type:"object"}},required:["eventId","form_id","token","submitted_at","answers"]}}]},callback:{headers:["typeform-signature"],query:[]},options:!1},{snapshot:{key:"vercel.on_deployment_event",provider:"vercel",name:"on_deployment_event",displayName:"Deployment Ready or Failed",description:"Receives successful and failed deployments for a Vercel project.",definitionVersion:2,type:"integration",endpoint:{methods:["POST"],body:{formats:["json"],allowArray:!1,allowEmpty:!1},successStatus:200},configInputs:[{handle:"teamId",jsonSchema:{type:"string",minLength:1,maxLength:256,title:"Team ID"},nullable:!1},{handle:"projectId",jsonSchema:{type:"string",minLength:1,maxLength:256,title:"Project ID"},nullable:!1},{handle:"environment",jsonSchema:{type:"string",enum:["all","production","preview"],title:"Environment"},nullable:!1,value:"all"}],outputs:[{handle:"event",jsonSchema:{type:"string",enum:["deployment.ready","deployment.error"]},nullable:!1},{handle:"deliveryId",jsonSchema:{type:"string"},nullable:!1},{handle:"deploymentId",jsonSchema:{type:"string"},nullable:!1},{handle:"projectId",jsonSchema:{type:"string"},nullable:!1},{handle:"body",jsonSchema:{type:"object"},nullable:!1}]},callback:{headers:["x-vercel-signature"],query:[]},options:!1},{snapshot:{configInputs:[{handle:"events",jsonSchema:{type:"array",items:{type:"string",enum:["coupon.created","coupon.updated","coupon.deleted","coupon.restored","customer.created","customer.updated","customer.deleted","order.created","order.updated","order.deleted","order.restored","product.created","product.updated","product.deleted","product.restored","product.published"]},minItems:1,maxItems:16,uniqueItems:!0},nullable:!1},{handle:"webhookName",jsonSchema:{type:"string",minLength:1,maxLength:120},nullable:!1,value:"OOMOL Trigger"}],definitionVersion:2,description:"Triggers when selected WooCommerce store events occur.",displayName:"Store Event",endpoint:{body:{allowArray:!1,allowEmpty:!1,formats:["json"]},methods:["POST"],successStatus:202},key:"woocommerce.on_store_event",name:"on_store_event",outputs:[{handle:"body",jsonSchema:{type:"object"},nullable:!1},{handle:"deliveryId",jsonSchema:{type:"string"},nullable:!1},{handle:"event",jsonSchema:{type:"string"},nullable:!1},{handle:"resource",jsonSchema:{type:"string"},nullable:!1},{handle:"source",jsonSchema:{type:"string"},nullable:!1},{handle:"topic",jsonSchema:{type:"string"},nullable:!1},{handle:"webhookId",jsonSchema:{type:"string"},nullable:!1}],provider:"woocommerce",type:"integration"},callback:{headers:["x-wc-webhook-delivery-id","x-wc-webhook-event","x-wc-webhook-id","x-wc-webhook-resource","x-wc-webhook-signature","x-wc-webhook-source","x-wc-webhook-topic"],query:[]},options:!1},{snapshot:{configInputs:[{handle:"events",jsonSchema:{type:"array",items:{type:"string",enum:["zen:event-type:ticket.agent_assignment_changed","zen:event-type:ticket.attachment_linked_to_comment","zen:event-type:ticket.attachment_redacted_from_comment","zen:event-type:ticket.brand_changed","zen:event-type:ticket.comment_added","zen:event-type:ticket.comment_made_private","zen:event-type:ticket.comment_redacted","zen:event-type:ticket.created","zen:event-type:ticket.csat_received","zen:event-type:ticket.csat_requested","zen:event-type:ticket.custom_field_changed","zen:event-type:ticket.custom_status_changed","zen:event-type:ticket.description_changed","zen:event-type:ticket.email_ccs_changed","zen:event-type:ticket.external_id_changed","zen:event-type:ticket.followers_changed","zen:event-type:ticket.form_changed","zen:event-type:ticket.group_assignment_changed","zen:event-type:ticket.marked_as_spam","zen:event-type:ticket.merged","zen:event-type:ticket.next_sla_breach_changed","zen:event-type:ticket.ola_policy_changed","zen:event-type:ticket.organization_changed","zen:event-type:ticket.permanently_deleted","zen:event-type:ticket.priority_changed","zen:event-type:ticket.problem_link_changed","zen:event-type:ticket.requester_changed","zen:event-type:ticket.schedule_changed","zen:event-type:ticket.sla_policy_changed","zen:event-type:ticket.soft_deleted","zen:event-type:ticket.status_changed","zen:event-type:ticket.subject_changed","zen:event-type:ticket.submitter_changed","zen:event-type:ticket.tags_changed","zen:event-type:ticket.task_due_at_changed","zen:event-type:ticket.type_changed","zen:event-type:ticket.undeleted","zen:event-type:organization.created","zen:event-type:organization.custom_field_changed","zen:event-type:organization.deleted","zen:event-type:organization.external_id_changed","zen:event-type:organization.name_changed","zen:event-type:organization.tags_changed","zen:event-type:user.active_changed","zen:event-type:user.alias_changed","zen:event-type:user.created","zen:event-type:user.custom_field_changed","zen:event-type:user.custom_role_changed","zen:event-type:user.default_group_changed","zen:event-type:user.deleted","zen:event-type:user.details_changed","zen:event-type:user.external_id_changed","zen:event-type:user.group_membership_created","zen:event-type:user.group_membership_deleted","zen:event-type:user.identity_changed","zen:event-type:user.identity_created","zen:event-type:user.identity_deleted","zen:event-type:user.last_login_changed","zen:event-type:user.merged","zen:event-type:user.name_changed","zen:event-type:user.notes_changed","zen:event-type:user.only_private_comments_changed","zen:event-type:user.organization_membership_created","zen:event-type:user.organization_membership_deleted","zen:event-type:user.password_changed","zen:event-type:user.photo_changed","zen:event-type:user.role_changed","zen:event-type:user.suspended_changed","zen:event-type:user.tags_changed","zen:event-type:user.time_zone_changed"]},minItems:1,uniqueItems:!0},nullable:!1}],definitionVersion:2,description:"Triggers when one of the selected Zendesk account events occurs.",displayName:"Event Subscription",endpoint:{body:{allowArray:!1,allowEmpty:!1,formats:["json"]},methods:["POST"],successStatus:202},key:"zendesk.on_event",name:"on_event",outputs:[{handle:"body",jsonSchema:{type:"object"},nullable:!1},{handle:"deliveryId",jsonSchema:{type:"string"},nullable:!1},{handle:"event",jsonSchema:{type:"string"},nullable:!1},{handle:"subject",jsonSchema:{type:"string"},nullable:!1}],provider:"zendesk",type:"integration"},callback:{headers:["x-zendesk-webhook-signature","x-zendesk-webhook-signature-timestamp"],query:[]},options:!1},{snapshot:{key:"zoom.on_recording_ready",provider:"zoom",name:"on_recording_ready",displayName:"Cloud Recording Ready",description:"Receives completed cloud recordings hosted by the connected Zoom user through a verified application event source.",definitionVersion:2,type:"integration",endpoint:{methods:["POST"],body:{formats:["json"],allowArray:!1,allowEmpty:!1},successStatus:200},configInputs:[{handle:"sourceId",jsonSchema:{type:"string",pattern:"^source_[0-9a-f]{32}$",title:"Event source"},nullable:!1},{handle:"eventTypes",jsonSchema:{type:"array",items:{type:"string",enum:["recording.completed"]},minItems:1,maxItems:1,uniqueItems:!0,title:"Events"},nullable:!1,value:["recording.completed"]}],outputs:[{handle:"event",jsonSchema:{type:"string"},nullable:!1},{handle:"deliveryId",jsonSchema:{type:"string"},nullable:!1},{handle:"accountId",jsonSchema:{type:"string"},nullable:!1},{handle:"meetingUuid",jsonSchema:{type:"string"},nullable:!1},{handle:"body",jsonSchema:{type:"object"},nullable:!1}]},callback:{headers:[],query:[]},source:{createSchema:{$schema:"https://json-schema.org/draft/2020-12/schema",type:"object",properties:{kind:{type:"string",const:"zoom"},version:{type:"number",const:1},name:{type:"string",minLength:1,maxLength:128},connectionId:{type:"string",minLength:1,maxLength:256},teamId:{anyOf:[{type:"string",minLength:1,maxLength:256},{type:"null"}]},appId:{type:"string",minLength:1,maxLength:256},signingSecret:{type:"string",minLength:1,maxLength:256},eventTypes:{minItems:1,maxItems:1,type:"array",items:{type:"string",const:"recording.completed"}}},required:["kind","version","name","connectionId","teamId","appId","signingSecret","eventTypes"],additionalProperties:!1},updateSchema:{$schema:"https://json-schema.org/draft/2020-12/schema",type:"object",properties:{version:{type:"number",const:1},expectedRevision:{type:"integer",exclusiveMinimum:0,maximum:9007199254740991},name:{type:"string",minLength:1,maxLength:128},enabled:{type:"boolean"},eventTypes:{minItems:1,maxItems:200,type:"array",items:{type:"string",pattern:"^[a-z][a-z0-9_.:]{0,127}$"}},verificationToken:{type:"string",minLength:1,maxLength:256},signingSecret:{type:"string",minLength:1,maxLength:256},encryptKey:{type:"string",minLength:1,maxLength:256}},required:["version","expectedRevision","name","enabled","eventTypes"],additionalProperties:!1},kind:"zoom",provider:"zoom",triggerId:"zoom.on_recording_ready",maximumBodyBytes:65536,applicationIngress:!0,managed:!1},options:!1,eventSource:"zoom"}];function Ub(e){return Hg(e).extend({name:_().trim().min(1).max(128)})}var Bb=Jb.flatMap((e)=>("source"in e)&&e.source!=null?[e.source]:[]),Kb=Y(Bb.map((e)=>Ub(e.createSchema))),Wb=Ub(Bb[0].updateSchema),Hb=x({version:w(1),expectedRevision:ke().positive()});var Gb={start:"A Start node with a required message parameter. Supply it through trigger.outputs.",error:"A Flow Error node. Select upstream Flows, then publish and enable this Flow to listen for failures in their automatic runs.",webhook:"A Webhook start node.","webhook-response":"An HTTP response node with body, statusCode and headers inputs. Select it from a reachable Webhook.",cron:"An hourly scheduled start node.",poll:"Gmail polling by key; replace CONNECTION_ID with an active Gmail connection.",integration:"Telegram webhook integration by key; replace CONNECTION_ID with an active Telegram connection.",decision:"AI Decision evaluates named questions against target and returns a complete answer object per output. Configure target before running.","skip-duplicates":"Skip items already recorded by successful Runs. Configure identity fields; an empty list uses each string or numeric item. History is private to the node and only commits after Run success.","http-request":"A single HTTP request. Bind url and request inputs; outputs are body, statusCode and headers.",openapi:"A fixed JSON API operation. Replace the example document and URL before running.",connector:"A Connector Task and its node. Replace ACTION_ID, CONNECTION_ID and port definitions using connector_get / connector show. Set connectionId to an empty string to defer account configuration; execution will require an account.",code:"A JavaScript module and its node. Use Code for custom computation; use Connector Tasks for existing actions.",condition:"A condition with true and false execution branches.",value:"A fixed value node.",approval:"An Approval with approve and reject decision branches and a built-in notification output.",wait:"A Wait with a continue action and a built-in notification output.",agent:"An Agent with code computation enabled. Configure a model available in the deployment.","llm-chat":"An LLM chat Task and its node; configure a model available in the deployment.","llm-json":"An LLM JSON Task and its node; configure a model available in the deployment.","poll-notification":"Gmail events \u2192 JavaScript text formatting \u2192 Connector notification. Replace connection/action IDs and match the notification input ports."},LC=Object.keys(Gb),MC=LC.map((e)=>({name:e,description:Gb[e]}));var B1=x({comment:Ou}),Vn=Ae(),Se=_().min(1),he=w(1),ro=Se.refine((e)=>e==e.trim()&&Kr(e)==null,"Flow name is invalid."),oo=R(Se).transform((e)=>[...new Set(e)].toSorted()),ZC=Se.transform((e)=>e.trim()).refine((e)=>Kr(e)==null,"Tag name is invalid."),Qb=oe(_(),oe(_(),Vn)),Yb=x({nodeId:Se,outputs:oe(_(),Vn)}),X={readFlowState:Qg.extend({version:he}),canvas:x({command:no,version:he}),authoringCheck:eu,authoringEdit:Zr,authoringRead:Li,authoringSearch:Mi,authoringSchema:_y,loadOpenApiDocument:x({url:_().min(1).max(8192),version:he}),createEventSource:Kb,updateEventSource:Wb,eventSourceRevision:Hb,importFlow:x({file:Vn,name:ro.optional(),teamId:Se.optional(),tagIds:oo.optional(),version:he}),createFlow:x({name:ro,teamId:Se.optional(),tagIds:oo.optional(),presentation:oe(_(),Vn).optional(),version:he}),saveTag:x({name:ZC,version:he}),setFlowTags:x({tagIds:oo,version:he}),updateFlow:Y([x({name:ro,tagIds:oo.optional(),version:he}),x({name:ro.optional(),tagIds:oo,version:he})]),renameFlow:x({name:ro,version:he}),changeDraft:x({expectedRevisionId:Se,operations:R(Vn).min(1),version:he}),repairDraft:x({expectedRevisionId:Se,version:he}),upgradeDraft:x({expectedRevisionId:Se,version:he}),setEnabled:x({enabled:ye(),expectedPublicationId:Se,version:he}),updatePresentation:x({expectedRevision:ke().positive(),value:oe(_(),Vn),version:he}),checkFlow:x({engineContract:Se,version:he}),publishFlow:x({engineContract:Se,expectedLivePublicationId:Se.nullable(),version:he}),rollbackFlow:x({expectedLivePublicationId:Se,version:he}),createDraftRun:x({engineContract:Se,inputs:Qb,trigger:Yb,version:w(2)}),createLiveRun:x({publicationId:Se,inputs:Qb,trigger:Yb,version:w(2)}),resolveWait:x({action:F(["approve","continue","reject"]),comment:Ou,version:he}),putVariable:x({value:_().refine((e)=>new TextEncoder().encode(e).byteLength<=65536,"Variable value is too large.")}),queryConnectorAccessCandidates:x({providerIds:R(Se.max(256)).min(1).refine((e)=>new Set(e).size==e.length,"Duplicate provider IDs."),version:he}),removeConnectionUsage:x({connectionId:Se,expectedRevisionId:Se,expectedAccessRevision:ke().nonnegative(),version:he}),setConnectorService:x({expectedAccessRevision:ke().nonnegative(),version:he}),addProviderAccessBinding:x({accessBindingId:Se,expectedAccessRevision:ke().nonnegative(),version:he}),removeProviderAccessBinding:x({accessBindingId:Se,expectedAccessRevision:ke().nonnegative(),version:he}),versionOnly:x({version:he})};function te(e){return(t)=>e.parse(t)}var K1={readFlowState:te(X.readFlowState),canvas:te(X.canvas),authoringCheck:te(X.authoringCheck),authoringEdit:te(X.authoringEdit),authoringRead:te(X.authoringRead),authoringSearch:te(X.authoringSearch),authoringSchema:te(X.authoringSchema),loadOpenApiDocument:te(X.loadOpenApiDocument),createEventSource:te(X.createEventSource),updateEventSource:te(X.updateEventSource),eventSourceRevision:te(X.eventSourceRevision),importFlow:te(X.importFlow),createFlow:te(X.createFlow),saveTag:te(X.saveTag),setFlowTags:te(X.setFlowTags),updateFlow:te(X.updateFlow),renameFlow:te(X.renameFlow),changeDraft(e){let t=X.changeDraft.parse(e);return{...t,operations:ju(t.operations)}},repairDraft:te(X.repairDraft),upgradeDraft:te(X.upgradeDraft),setEnabled:te(X.setEnabled),updatePresentation:te(X.updatePresentation),checkFlow:te(X.checkFlow),publishFlow:te(X.publishFlow),rollbackFlow:te(X.rollbackFlow),createDraftRun:te(X.createDraftRun),createLiveRun:te(X.createLiveRun),resolveWait:te(X.resolveWait),putVariable:te(X.putVariable),queryConnectorAccessCandidates:te(X.queryConnectorAccessCandidates),removeConnectionUsage:te(X.removeConnectionUsage),setConnectorService:te(X.setConnectorService),addProviderAccessBinding:te(X.addProviderAccessBinding),removeProviderAccessBinding:te(X.removeProviderAccessBinding),versionOnly:te(X.versionOnly)};var _u=["expected-revision","idempotency-key"],Ru=["cursor","limit"],Xb=[["state show","<flow> --scope <draft|live> [--key <key>]",["scope","key"]],["state clear","<flow> --scope <draft|live> [--key <key>] --yes",["scope","key","yes"]],["dedupe clear","<flow> --scope <draft|live> --space <space> --yes",["scope","space","yes"]],["canvas","<flow> (--input JSON|@file|- | --file path|-)",["input","file"]],["read","<flow> [--input JSON|@file|- | --file path|-]",["input","file"]],["search","<flow> (--input JSON|@file|- | --file path|-)",["input","file"]],["edit","<flow> (--input JSON|@file|- | --file path|-)",["input","file"]],["list","[--cursor <cursor>] [--limit <count>]",Ru],["export","<flow>",[]],["import","--file <path|->",["file","name","idempotency-key"]],["create","<name>",["idempotency-key"]],["show","<flow>",[]],["live","<flow>",[]],["rename","<flow> <new-name>",[]],["delete","<flow> --yes",["yes"]],["check","<flow> [--revision <revisionId>]",["revision"]],["enable","<flow> --expected-publication <publicationId>",["expected-publication"]],["disable","<flow> --expected-publication <publicationId>",["expected-publication"]],["connector code-access","<flow> [--publication <publicationId>]",["publication"]],["connector candidates","<flow> <provider> [provider ...]",[]],["connector code-allow","<flow> <provider> <binding> <access-revision>",[]],["connector code-remove","<flow> <provider> <binding> <access-revision>",[]],["connector remove-usage","<flow> <connection> <access-revision>",_u],["connector providers","[--flow <flow>]",["flow"]],["connector teams","",[]],["connector search","<query> [--flow <flow>]",["flow"]],["connector show","<action> [--flow <flow>]",["flow"]],["connector connections","<service> [--flow <flow>]",["flow"]],["event-source list","",[]],["trigger search","[query]",[]],["trigger show","<key>",[]],["run","<flow>",[..._u,"expected-publication","source","trigger","outputs","input","wait","timeout"]],["runs list","--flow <flow>",["flow","status","pending-wait",...Ru]],["runs show","<run>",[]],["runs wait","<run>",["timeout"]],["runs resolve","<run> <wait> <continue|approve|reject>",["comment"]],["runs events","<run>",["after","limit","follow","timeout"]],["runs result","<run>",[]],["runs results","<run> [--after <resultId>]",["after"]],["runs read-result","<run> <result>",["pointer","offset","limit","max-bytes"]],["runs download-result","<run> <result>",[]],["runs cancel","<run>",[]],["publish","<flow>",[..._u,"expected-publication","timeout"]],["publications list","<flow>",Ru],["publications show","<flow> <publication>",[]],["publications wait","<flow> <operation>",["timeout"]],["publications operation","<flow> <operation>",[]],["rollback","<flow> <publication>",["expected-publication","idempotency-key"]],["open","[flow]",[]],["workbench","[flow]",[]],["schema","[read|search|edit|check|node-type]",["flow","input"]]],JC={scope:{description:"Required State scope; never defaults to live.",type:"string",enum:["draft","live"]},key:{description:"Business state key to read or clear; omit to inspect metadata or clear all business values.",type:"string"},space:{description:"Deduplication space: flow or node:<nodeId>.",type:"string"},revision:{description:"Exact Revision to read or check; defaults to the current Draft.",type:"string"},publication:{description:"Exact Publication ID whose fixed Code connections are read; defaults to the Draft.",type:"string"},pointer:{description:"JSON Pointer within the stored result; defaults to the root.",type:"string"},offset:{description:"Page offset at the selected pointer.",type:"integer",minimum:0,default:0},"max-bytes":{description:"Maximum result page bytes.",type:"integer",minimum:1,maximum:1048576,default:15000},"expected-revision":{description:"Base Revision ID from read. Required with an explicit idempotency key for draft edits and draft runs.",type:"string"},"expected-publication":{description:"Fixed Publication ID. Use none when publishing without a Live Publication.",type:"string"},"idempotency-key":{description:"Stable identity of one mutation. Reuse only with the identical arguments and base identity.",type:"string"},source:{description:"Execution source.",type:"string",enum:["draft","live"],default:"draft"},trigger:{description:"Exact Trigger ID or unambiguous name. The Start node is selected automatically; a sole legacy Manual Trigger remains supported.",type:"string"},timeout:{description:"Wait budget in milliseconds; expiration does not cancel the operation. For node set, the node execution timeout.",type:"integer",minimum:1,default:60000},limit:{description:"Maximum items in one page.",type:"integer",minimum:1,maximum:100,default:100},after:{description:"Resume events after this sequence number; use nextAfter from the preceding response.",type:"integer",minimum:0,default:0},cursor:{description:"Opaque nextCursor from the preceding page; keep the same filters.",type:"string"},comment:{description:"Optional plain-text Wait decision comment (up to 2,000 Unicode code points).",type:"string"},"pending-wait":{description:"List runs with unresolved waits, including running and queued runs.",type:"boolean"},status:{description:"Filter runs by status.",type:"string",enum:["queued","starting","running","waiting","completed","failed","canceled","indeterminate"]},file:{description:"Authoring request or workflow JSON file path, or - for stdin.",type:"string"},code:{description:"JavaScript source, @file, or - for stdin.",type:"string"},input:{description:"Authoring request JSON; literal JSON, @file, or -. For run, node ID to input values.",type:"string"},outputs:{description:"Start parameters or other Trigger outputs: literal JSON, @file, or -. Defaults to {}.",type:"string"},set:{description:"handle=value; repeat for multiple fields. Values use port schemas, JSON, @file, or -.",type:"string"},unset:{description:"Input/config handle to remove; repeat for multiple fields.",type:"string"},connection:{description:"Exact active Connection ID, unambiguous display name, or default.",type:"string"},flow:{description:"Exact Flow ID or unambiguous name; fixes Connector Team scope.",type:"string"},name:{description:"Display name.",type:"string"},description:{description:"Trigger description.",type:"string"},cron:{description:"Cron expression; combine with --timezone. Mutually exclusive with --every.",type:"string"},timezone:{description:"IANA time zone for --cron.",type:"string"},every:{description:"Interval such as 5m, 1h, or 1d. Mutually exclusive with --cron.",type:"string"},wait:{description:"Wait until terminal, waiting for an action, or the wait budget expires."},follow:{description:"Stream event pages as NDJSON with --json; stop on terminal, Wait, or timeout."},yes:{description:"Confirm the requested deletion."},json:{description:"Machine-readable JSON results and errors; NDJSON for followed events."},help:{description:"Show this command contract without contacting the host."}};function Au(e,t="oo flow"){let n=e.join(" ");return Xb.filter(([r])=>n==""||r==n||r.startsWith(`${n} `)).map(([r,o,i])=>({command:r,usage:`${t} ${r} ${o} [--json]`,options:[...i,"json","help"].map((s)=>Object.assign({name:`--${s}`,value:!["json","help","wait","follow","yes","pending-wait"].includes(s),repeatable:s=="set"||s=="unset"},JC[s],r=="runs results"&&s=="after"?{type:"string",minimum:void 0,default:void 0,description:"Result ID from nextAfter on the preceding page."}:{},r=="runs read-result"&&s=="limit"?{default:20}:{}))}))}function ew(e){return Xb.find(([t])=>t==e.slice(0,t.split(" ").length).join(" "))?.[2]}function tw(e="edits"){let t=tu(e);if(t!=null)return t;if(e=="edits")return nu();if(e=="outputs")return{$schema:"https://json-schema.org/draft/2020-12/schema",type:"object",description:"Named Start parameters or other Trigger outputs. Start uses the workflow inputDefs returned by flow read; other triggers define their own output contracts. Omitted nullable Start parameters become null; required parameters must be supplied."};if(qi.includes(e))return nu(e);if(e=="input")return{$schema:"https://json-schema.org/draft/2020-12/schema",type:"object",additionalProperties:{type:"object",additionalProperties:!0},description:"Node ID -> input handle -> JSON value."};return}function Pu(e){if(e=="canvas")return{request:mn(no,{io:"input"}),guidance:"Broadcast transient viewport commands; success does not confirm execution. No Presentation save, offline queue or replay. Pan uses screen pixels; zoom is an absolute ratio (0.1\u20133); fit includes all nodes. Repeating pan moves again; do not automatically retry an uncertain response.",examples:[{type:"focus",nodeId:"NODE_ID"},{type:"zoom",zoom:0.8},{type:"pan",dx:200,dy:-100},{type:"fit"}]};return tu(e)}function nw(e,t="oo flow"){if(e=="export")return[`${t} export FLOW_ID > template.openflow.json`];if(e=="import")return[`${t} import --file template.openflow.json --name "Imported workflow" --idempotency-key IMPORT_KEY --json`];if(e=="schema")return[`${t} schema read --json`,`${t} schema agent --json`,`${t} schema --flow FLOW_ID --input '{"action":"ACTION_ID"}' --json`];let n=Pu(e);if(n==null)return UC(t);if(e=="check")return[`${t} check FLOW_ID --revision REVISION --json`];return n.examples.map((r)=>`${t} ${e} FLOW_ID${Object.keys(r).length==0?"":` --input '${JSON.stringify(r)}'`} --json`)}function UC(e){return[`${e} list --limit 20 --json`,`${e} read FLOW_ID --json`,`${e} live FLOW_ID --json`,`${e} schema code --json`,`${e} edit FLOW_ID --file edits.json --json`,`${e} connector search email --flow FLOW_ID --json`,`${e} run FLOW_ID --expected-revision REVISION_ID --idempotency-key RUN_KEY --wait --timeout 60000 --json`,`${e} runs wait RUN_ID --timeout 60000 --json`,`${e} runs resolve RUN_ID WAIT_ID approve --json`,`${e} runs events RUN_ID --after 0 --follow --timeout 60000 --json`]}import{basename as KC}from"path";async function rw(e,t,n,r,o){let[i,s,a,...c]=n;switch(i){case"code-access":case"candidates":case"code-allow":case"code-remove":case"remove-usage":{let l=i=="code-access"?1:i=="candidates"?2:i=="remove-usage"?3:4;if(i=="candidates"?n.length<l+1:n.length!=l+1)throw new C("cli.invalid-arguments",`Invalid arguments for connector ${i}. See --help.`);let u=BC(t),d;if(i=="code-access")d=r.publication==null?await e.getConnectorAccess(u):await e.getPublishedConnectorAccess(u,r.publication);else if(i=="candidates")d=await e.listProviderAccessBindingCandidates(u,n.slice(2));else{let h=Number(n.at(-1));if(!Number.isSafeInteger(h)||h<0)throw new C("cli.invalid-arguments","Access revision must be a nonnegative integer.");if(i=="remove-usage"){let g=await Nb(e,t,r);d=await e.removeConnectionUsage(u,a,g.draft.revisionId,h,r.idempotencyKey)}else if(i=="code-allow")d=await e.addProviderAccessBinding(u,a,c[0],h);else d=await e.removeProviderAccessBinding(u,a,c[0],h)}Z(o,r.json,{...d,kind:`connector.${i}`},JSON.stringify(d,null,2));return}case"providers":{if(s!=null)throw new C("cli.invalid-arguments",`Usage: ${o.commandPrefix??"oo flow"} connector providers [--flow <flow>] [--json]`);let l=await e.listConnectorProviders(void 0,t?.flowId);Z(o,r.json,{providers:l,kind:"connector.providers",version:1},l.map((u)=>`${u.serviceName} ${u.serviceId}`).join(`
65
65
  `));return}case"teams":{if(s!=null)throw new C("cli.invalid-arguments",`Usage: ${o.commandPrefix??"oo flow"} connector teams [--json]`);let l=await e.listConnectorTeams();Z(o,r.json,{...l,kind:"connector.teams"},l.teams.map((u)=>`${u.name} ${u.id}`).join(`
66
66
  `));return}case"search":{if(s==null||a!=null)throw new C("cli.invalid-arguments",`Usage: ${o.commandPrefix??"oo flow"} connector search <query> [--json]`);let l=s.trim();if(l.length==0||l.length>256)throw new C("cli.invalid-arguments","Connector search query must contain 1\u2013256 characters.");let u=await e.searchConnectorActions(l,void 0,t?.flowId);Z(o,r.json,{actions:u.map(pu),kind:"connector.search",query:l,version:1},u.map(Iu).join(`
67
67
  `));return}case"show":{if(s==null||a!=null)throw new C("cli.invalid-arguments",`Usage: ${o.commandPrefix??"oo flow"} connector show <action> [--json]`);let l=await zb(e,s,t?.flowId);Z(o,r.json,{action:l,kind:"connector.show",version:1},Iu(l));return}case"connections":{if(s==null||a!=null)throw new C("cli.invalid-arguments",`Usage: ${o.commandPrefix??"oo flow"} connector connections <service> [--json]`);let l=await e.listConnectorConnections(s,void 0,t?.flowId);Z(o,r.json,{connections:l,kind:"connector.connections",serviceId:s,version:1},l.map(qb).join(`
@@ -84,4 +84,4 @@ ${JSON.stringify(e.waits)}`}`}function Vb(e){return`${e.source} ${e.status} ${e.
84
84
  `);else n.stderr.write(`${s.code}: ${s.message}
85
85
  `);return 1}}async function kE(e){let t=process.platform=="darwin"?["open",e]:process.platform=="win32"?["rundll32","url.dll,FileProtocolHandler",e]:["xdg-open",e],n=wE(t[0],t.slice(1),{stdio:"ignore"});if(await new Promise((o,i)=>{n.once("error",i),n.once("exit",o)})!=0)throw Error("The system browser could not be opened.")}async function jw(e,t,n){if(e.includes("--version")||e.includes("-v"))return process.stdout.write(e.includes("--json")?`${JSON.stringify({version:n.version})}
86
86
  `:`${n.version}
87
- `),0;return await Ow(e,{request:t.cloudRequest??(async()=>{throw new C("host.unavailable","Open Flow Control API is not configured in this CLI host.")}),getWorkbenchUrl:t.getWorkbenchUrl},{commandPrefix:n.commandPrefix,scopeGuidance:n.scopeGuidance,env:process.env,language:lo([t.language]),openUrl:kE,readFile:async(r)=>await vE(r,"utf8"),readStdin:async()=>{let r="";for await(let o of process.stdin)r+=String(o);return r},stderr:process.stderr,stdout:process.stdout,wait:async(r)=>await xE(r)})}async function nD(e,t={}){return await jw(e,t,{version:Zu})}export{nD as runOpenFlowCommand};
87
+ `),0;return await Ow(e,{request:t.cloudRequest??(async()=>{throw new C("host.unavailable","Open Flow Control API is not configured in this CLI host.")}),getWorkbenchUrl:t.getWorkbenchUrl},{commandPrefix:n.commandPrefix,scopeGuidance:n.scopeGuidance,env:process.env,language:lo([t.language]),openUrl:kE,readFile:async(r)=>await vE(r,"utf8"),readStdin:async()=>{let r="";for await(let o of process.stdin)r+=String(o);return r},stderr:process.stderr,stdout:process.stdout,wait:async(r)=>await xE(r)})}async function iD(e,t={}){return await jw(e,t,{version:Zu})}export{iD as runOpenFlowCommand};