twenty-sdk 2.30.0 → 2.31.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/billing/index.cjs +20 -1
- package/dist/billing/index.cjs.map +1 -1
- package/dist/billing/index.mjs +2380 -18
- package/dist/billing/index.mjs.map +1 -1
- package/dist/{catalog-sync-WmgvkRw7.mjs → catalog-sync-Ch6nB5uf.mjs} +1 -1
- package/dist/catalog-sync-yH3B_al1.js +1 -0
- package/dist/cli/utilities/build/common/esbuild-watcher.d.ts +1 -1
- package/dist/cli/utilities/build/common/front-component-build/front-components-watcher.d.ts +40 -0
- package/dist/cli/utilities/build/common/front-component-build/shared-dependencies-build/build-shared-dependencies-bundle.d.ts +8 -0
- package/dist/cli/utilities/build/common/front-component-build/shared-dependencies-build/create-shared-dependencies-shim-plugin.d.ts +3 -0
- package/dist/cli/utilities/build/common/front-component-build/shared-dependencies-build/types/shared-dependencies-build-context.type.d.ts +4 -0
- package/dist/cli/utilities/build/common/front-component-build/shared-dependencies-build/types/shared-dependencies-export-names.type.d.ts +4 -0
- package/dist/cli/utilities/build/common/front-component-build/shared-dependencies-build/utils/enumerate-shared-dependencies-export-names.d.ts +5 -0
- package/dist/cli/utilities/build/common/front-component-build/shared-dependencies-build/utils/get-shared-dependencies-entry-source.d.ts +1 -0
- package/dist/cli/utilities/build/common/front-component-build/shared-dependencies-build/utils/get-shared-dependencies-namespace-collisions.d.ts +1 -0
- package/dist/cli/utilities/build/common/front-component-build/shared-dependencies-build/utils/get-shared-dependencies-shim-source.d.ts +5 -0
- package/dist/cli/utilities/build/common/front-component-build/shared-dependencies-build/utils/to-shared-dependencies-namespace-identifier.d.ts +1 -0
- package/dist/cli/utilities/build/common/front-component-build/utils/get-front-component-build-plugins.d.ts +2 -0
- package/dist/cli/utilities/build/manifest/utils/extract-front-component-shared-dependencies.d.ts +5 -0
- package/dist/cli/utilities/build/manifest/utils/normalize-front-component-shared-dependencies.d.ts +1 -0
- package/dist/cli.cjs +36 -36
- package/dist/cli.mjs +2147 -2051
- package/dist/define/index.cjs +24 -24
- package/dist/define/index.cjs.map +1 -1
- package/dist/define/index.d.ts +328 -844
- package/dist/define/index.mjs +6645 -6513
- package/dist/define/index.mjs.map +1 -1
- package/dist/front-component/index.cjs +3 -3
- package/dist/front-component/index.cjs.map +1 -1
- package/dist/front-component/index.mjs +460 -460
- package/dist/front-component/index.mjs.map +1 -1
- package/dist/front-component-renderer/build.cjs +1 -1
- package/dist/front-component-renderer/build.mjs +1 -1
- package/dist/get-front-component-build-plugins-C-Webbfn.js +196 -0
- package/dist/get-front-component-build-plugins-DA62IZes.mjs +9849 -0
- package/dist/{get-function-input-schema-GNk3NRLJ-DkTcUzrb.mjs → get-function-input-schema-GNk3NRLJ-C5HXalke.mjs} +1 -1
- package/dist/get-function-input-schema-GNk3NRLJ-DwfXUGPz.js +1 -0
- package/dist/logic-function/index.cjs +26 -7
- package/dist/logic-function/index.cjs.map +1 -1
- package/dist/logic-function/index.mjs +2420 -56
- package/dist/logic-function/index.mjs.map +1 -1
- package/dist/{login-BnGCnmge.mjs → login-BHgUJK94.mjs} +5750 -15164
- package/dist/login-BzHQgxeV.js +343 -0
- package/dist/operations.cjs +1 -1
- package/dist/operations.mjs +1 -1
- package/dist/utils/index.cjs +20 -1
- package/dist/utils/index.cjs.map +1 -1
- package/dist/utils/index.mjs +2375 -13
- package/dist/utils/index.mjs.map +1 -1
- package/package.json +2 -2
- package/dist/catalog-sync-61JsVcDP.js +0 -1
- package/dist/get-front-component-build-plugins-B5IvUvSS.mjs +0 -133
- package/dist/get-front-component-build-plugins-TJrFS3_p.js +0 -172
- package/dist/get-function-input-schema-GNk3NRLJ-D8x7FINz.js +0 -1
- package/dist/isDefined-Dtu5EYqP-Dp026Ry1.js +0 -1
- package/dist/login-CM2Aug-k.js +0 -365
|
@@ -2,7 +2,7 @@ import { createRequire as e } from "node:module";
|
|
|
2
2
|
import { fileURLToPath as t } from "node:url";
|
|
3
3
|
import { dirname as n } from "node:path";
|
|
4
4
|
e(import.meta.url), n(t(import.meta.url));
|
|
5
|
-
import {
|
|
5
|
+
import { vt as r } from "./get-front-component-build-plugins-DA62IZes.mjs";
|
|
6
6
|
import { ScriptTarget as i, SyntaxKind as a, createSourceFile as o } from "typescript";
|
|
7
7
|
//#region ../twenty-shared/dist/get-function-input-schema-GNk3NRLJ.mjs
|
|
8
8
|
var s = "TwentyRecord", c = (e) => {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("./get-front-component-build-plugins-C-Webbfn.js");let t=require("typescript");var n=`TwentyRecord`,r=n=>{let r=n.typeArguments?.[0];if(e.vt(r)&&r.kind===t.SyntaxKind.LiteralType&&r.literal.kind===t.SyntaxKind.StringLiteral)return r.literal.text},i=e=>e.type===`record`?{type:`records`,objectUniversalIdentifier:e.objectUniversalIdentifier}:{type:`array`,items:e},a=o=>{switch(o.kind){case t.SyntaxKind.NumberKeyword:return{type:`number`};case t.SyntaxKind.StringKeyword:return{type:`string`};case t.SyntaxKind.BooleanKeyword:return{type:`boolean`};case t.SyntaxKind.ArrayType:return i(a(o.elementType));case t.SyntaxKind.TypeReference:{let s=o,c=s.typeName.kind===t.SyntaxKind.Identifier?s.typeName.text:void 0;if(c===`Array`||c===`ReadonlyArray`){let t=s.typeArguments?.[0];return i(e.vt(t)?a(t):{})}if(c===n){let t=r(s);if(e.vt(t))return{type:`record`,objectUniversalIdentifier:t}}return{}}case t.SyntaxKind.ObjectKeyword:return{type:`object`};case t.SyntaxKind.TypeLiteral:{let t={};return o.members.forEach(n=>{if(e.vt(n.name)&&e.vt(n.type)){let e=n.name.text;t[e]=a(n.type)}}),{type:`object`,properties:t}}case t.SyntaxKind.UnionType:{let e=o,n=[],r=!0;return e.types.forEach(e=>{if(e.kind===t.SyntaxKind.LiteralType){let i=e.literal;i.kind===t.SyntaxKind.StringLiteral?n.push(i.text):r=!1}else r=!1}),r?{type:`string`,enum:n}:{}}default:return{}}},o=(t,n)=>t.parameters.reduce((t,n)=>{let r=n.type;return e.vt(r)?[...t,a(r)]:[...t,{}]},n),s=n=>n.kind===t.SyntaxKind.FunctionDeclaration?[n]:n.kind===t.SyntaxKind.VariableStatement?n.declarationList.declarations.filter(n=>e.vt(n.initializer)&&n.initializer.kind===t.SyntaxKind.ArrowFunction).map(e=>e.initializer):[],c=e=>{let n=(0,t.createSourceFile)(`temp.ts`,e,t.ScriptTarget.ESNext,!0),r=[];return n.forEachChild(e=>{(e.kind===t.SyntaxKind.FunctionDeclaration||e.kind===t.SyntaxKind.VariableStatement)&&s(e).forEach(e=>{r=o(e,r)})}),r};exports.getFunctionInputSchema=c;
|
|
@@ -1,4 +1,23 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./isDefined-Dtu5EYqP-Dp026Ry1.js");let t=require("@sniptt/guards");require("uuid");let n=require("twenty-client-sdk/metadata");var r=e=>(e?.type===`record`||e?.type===`object`)&&(0,t.isNonEmptyString)(e.objectUniversalIdentifier),i=(e,n)=>{let r=(0,t.isNonEmptyString)(e)?n?.(e):void 0;return`Id of the ${(0,t.isNonEmptyString)(r)?r:`linked`} record`},a=(n,o)=>{if(r(n))return{type:`string`,description:i(n.objectUniversalIdentifier,o)};if(n.type===`records`)return{type:`array`,items:{type:`string`,description:i(n.objectUniversalIdentifier,o)}};let{objectUniversalIdentifier:s,multiline:c,label:l,items:u,properties:d,additionalProperties:f,...p}=n,m={...p};return e.t(u)&&(m.items=a(u,o)),e.t(d)&&(m.properties=Object.fromEntries(Object.entries(d).map(([e,t])=>[e,a(t,o)]))),e.t(f)&&(m.additionalProperties=(0,t.isObject)(f)?a(f,o):f),m},o=e=>{let n={type:`unknown`};switch(e.type){case`string`:n.type=`string`;break;case`number`:case`integer`:n.type=`number`;break;case`boolean`:n.type=`boolean`;break;case`array`:n.type=`array`,e.items&&(n.items=o(e.items));break;case`object`:n.type=`object`,e.properties&&(n.properties=Object.fromEntries(Object.entries(e.properties).map(([e,t])=>[e,o(t)])));break;case`record`:n.type=`record`;break;case`records`:n.type=`records`;break;default:n.type=`unknown`}return Array.isArray(e.enum)&&(n.enum=e.enum.filter(e=>typeof e==`string`)),e.multiline===!0&&(n.multiline=!0),(0,t.isNonEmptyString)(e.label)&&(n.label=e.label),(0,t.isNonEmptyString)(e.objectUniversalIdentifier)&&(n.objectUniversalIdentifier=e.objectUniversalIdentifier),n},s=e=>[o(e)];s({type:`object`,properties:{a:{type:`string`},b:{type:`number`}}});var c=t=>!e.t(t)||t===null?`unknown`:typeof t==`string`?`string`:typeof t==`number`?`number`:typeof t==`boolean`?`boolean`:Array.isArray(t)?`array`:`unknown`,l=e=>e?Object.entries(e).reduce((e,[n,r])=>((0,t.isObject)(r)&&!Array.isArray(r)?e[n]={isLeaf:!1,type:`object`,label:n,value:l(r)}:e[n]={isLeaf:!0,value:r,type:c(r),label:n},e),{}):{},u=(e,t)=>e?`${e}.${t}`:t,d=(t,n,r=``)=>{let i=[];for(let[a,o]of Object.entries(n)){let n=u(r,a),s=t[a];if(!e.t(s)){i.push(`Missing key "${n}" in declared output schema.`);continue}if(o.isLeaf!==s.isLeaf){i.push(`Type mismatch at "${n}": expected ${o.isLeaf?o.type:`object`} but declared ${s.isLeaf?s.type:`object`}.`);continue}if(!o.isLeaf&&!s.isLeaf){i.push(...d(s.value,o.value,n));continue}o.isLeaf&&s.isLeaf&&o.type!==`unknown`&&s.type!==`unknown`&&o.type!==s.type&&i.push(`Type mismatch at "${n}": expected ${o.type} but declared ${s.type}.`)}return i},f=[`string`,`number`,`boolean`,`array`,`unknown`],p=e=>f.includes(e),m=(e,n)=>{let r=n.label??e;return n.type===`record`?{isLeaf:!0,type:`string`,label:r,value:null}:n.type===`records`?{isLeaf:!0,type:`array`,label:r,value:null}:n.type===`object`?{isLeaf:!1,type:`object`,label:r,value:(0,t.isObject)(n.properties)?h(n.properties):{}}:{isLeaf:!0,type:p(n.type)?n.type:`unknown`,label:r,value:null}},h=e=>Object.entries(e).reduce((e,[t,n])=>(e[t]=m(t,n),e),{}),g=class extends Error{constructor(e){super(`App connection ${e} requires the user to reconnect (authFailedAt is set). Surface a "Reconnect" prompt in your UI.`),this.name=`AppConnectionAuthFailedError`,this.connectionId=e}},_=function(e){return e.ACTOR=`ACTOR`,e.ADDRESS=`ADDRESS`,e.ARRAY=`ARRAY`,e.BOOLEAN=`BOOLEAN`,e.CURRENCY=`CURRENCY`,e.DATE=`DATE`,e.DATE_TIME=`DATE_TIME`,e.EMAILS=`EMAILS`,e.FILES=`FILES`,e.FULL_NAME=`FULL_NAME`,e.LINKS=`LINKS`,e.MORPH_RELATION=`MORPH_RELATION`,e.MULTI_SELECT=`MULTI_SELECT`,e.NUMBER=`NUMBER`,e.NUMERIC=`NUMERIC`,e.PHONES=`PHONES`,e.POSITION=`POSITION`,e.RATING=`RATING`,e.RAW_JSON=`RAW_JSON`,e.RELATION=`RELATION`,e.RICH_TEXT=`RICH_TEXT`,e.SELECT=`SELECT`,e.TEXT=`TEXT`,e.TS_VECTOR=`TS_VECTOR`,e.UUID=`UUID`,e}({});_.TEXT,_.ARRAY,_.BOOLEAN,_.DATE,_.DATE_TIME,_.NUMBER,_.NUMERIC,_.RAW_JSON,_.RICH_TEXT,_.SELECT,_.MULTI_SELECT;var v=`TWENTY_API_URL`,y=`TWENTY_APP_ACCESS_TOKEN`,b=async({query:e,variables:t,caller:n})=>{let r=process.env[v],i=process.env[y];if(!r||!i)throw Error(`${n}() requires the app runtime env vars ${v} and ${y}.`);let a=await fetch(`${r}/metadata`,{method:`POST`,headers:{"Content-Type":`application/json`,Authorization:`Bearer ${i}`},body:JSON.stringify({query:e,variables:t})});if(!a.ok)throw Error(`${n}() failed: HTTP ${a.status} ${a.statusText}`);let o=await a.json();if(o.errors&&o.errors.length>0)throw Error(`${n}() failed: ${o.errors.map(e=>e.message).join(`, `)}`);if(!o.data)throw Error(`${n}() failed: response contained no data.`);return o.data},x=`
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./isDefined-Dtu5EYqP-Dp026Ry1.js");let t=require("@sniptt/guards"),n=require("uuid"),r=require("twenty-client-sdk/metadata");var i=e=>(e?.type===`record`||e?.type===`object`)&&(0,t.isNonEmptyString)(e.objectUniversalIdentifier),a=(e,n)=>{let r=(0,t.isNonEmptyString)(e)?n?.(e):void 0;return`Id of the ${(0,t.isNonEmptyString)(r)?r:`linked`} record`},o=(n,r)=>{if(i(n))return{type:`string`,description:a(n.objectUniversalIdentifier,r)};if(n.type===`records`)return{type:`array`,items:{type:`string`,description:a(n.objectUniversalIdentifier,r)}};let{objectUniversalIdentifier:s,multiline:c,label:l,items:u,properties:d,additionalProperties:f,...p}=n,m={...p};return e.t(u)&&(m.items=o(u,r)),e.t(d)&&(m.properties=Object.fromEntries(Object.entries(d).map(([e,t])=>[e,o(t,r)]))),e.t(f)&&(m.additionalProperties=(0,t.isObject)(f)?o(f,r):f),m},s=e=>{let n={type:`unknown`};switch(e.type){case`string`:n.type=`string`;break;case`number`:case`integer`:n.type=`number`;break;case`boolean`:n.type=`boolean`;break;case`array`:n.type=`array`,e.items&&(n.items=s(e.items));break;case`object`:n.type=`object`,e.properties&&(n.properties=Object.fromEntries(Object.entries(e.properties).map(([e,t])=>[e,s(t)])));break;case`record`:n.type=`record`;break;case`records`:n.type=`records`;break;default:n.type=`unknown`}return Array.isArray(e.enum)&&(n.enum=e.enum.filter(e=>typeof e==`string`)),e.multiline===!0&&(n.multiline=!0),(0,t.isNonEmptyString)(e.label)&&(n.label=e.label),(0,t.isNonEmptyString)(e.objectUniversalIdentifier)&&(n.objectUniversalIdentifier=e.objectUniversalIdentifier),n},c=e=>[s(e)];c({type:`object`,properties:{a:{type:`string`},b:{type:`number`}}});var l=t=>!e.t(t)||t===null?`unknown`:typeof t==`string`?`string`:typeof t==`number`?`number`:typeof t==`boolean`?`boolean`:Array.isArray(t)?`array`:`unknown`,u=e=>e?Object.entries(e).reduce((e,[n,r])=>((0,t.isObject)(r)&&!Array.isArray(r)?e[n]={isLeaf:!1,type:`object`,label:n,value:u(r)}:e[n]={isLeaf:!0,value:r,type:l(r),label:n},e),{}):{},d=(e,t)=>e?`${e}.${t}`:t,f=(t,n,r=``)=>{let i=[];for(let[a,o]of Object.entries(n)){let n=d(r,a),s=t[a];if(!e.t(s)){i.push(`Missing key "${n}" in declared output schema.`);continue}if(o.isLeaf!==s.isLeaf){i.push(`Type mismatch at "${n}": expected ${o.isLeaf?o.type:`object`} but declared ${s.isLeaf?s.type:`object`}.`);continue}if(!o.isLeaf&&!s.isLeaf){i.push(...f(s.value,o.value,n));continue}o.isLeaf&&s.isLeaf&&o.type!==`unknown`&&s.type!==`unknown`&&o.type!==s.type&&i.push(`Type mismatch at "${n}": expected ${o.type} but declared ${s.type}.`)}return i},p=[`string`,`number`,`boolean`,`array`,`unknown`],m=e=>p.includes(e),ee=(e,n)=>{let r=n.label??e;return n.type===`record`?{isLeaf:!0,type:`string`,label:r,value:null}:n.type===`records`?{isLeaf:!0,type:`array`,label:r,value:null}:n.type===`object`?{isLeaf:!1,type:`object`,label:r,value:(0,t.isObject)(n.properties)?te(n.properties):{}}:{isLeaf:!0,type:m(n.type)?n.type:`unknown`,label:r,value:null}},te=e=>Object.entries(e).reduce((e,[t,n])=>(e[t]=ee(t,n),e),{}),ne=class extends Error{constructor(e){super(`App connection ${e} requires the user to reconnect (authFailedAt is set). Surface a "Reconnect" prompt in your UI.`),this.name=`AppConnectionAuthFailedError`,this.connectionId=e}};Object.freeze({status:`aborted`});function h(e,t,n){function r(n,r){var i;Object.defineProperty(n,"_zod",{value:n._zod??{},enumerable:!1}),(i=n._zod).traits??(i.traits=new Set),n._zod.traits.add(e),t(n,r);for(let e in o.prototype)e in n||Object.defineProperty(n,e,{value:o.prototype[e].bind(n)});n._zod.constr=o,n._zod.def=r}let i=n?.Parent??Object;class a extends i{}Object.defineProperty(a,"name",{value:e});function o(e){var t;let i=n?.Parent?new a:this;r(i,e),(t=i._zod).deferred??(t.deferred=[]);for(let e of i._zod.deferred)e();return i}return Object.defineProperty(o,"init",{value:r}),Object.defineProperty(o,Symbol.hasInstance,{value:t=>n?.Parent&&t instanceof n.Parent?!0:t?._zod?.traits?.has(e)}),Object.defineProperty(o,"name",{value:e}),o}var g=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}},re=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name=`ZodEncodeError`}},ie={};function _(e){return e&&Object.assign(ie,e),ie}function ae(e){let t=Object.values(e).filter(e=>typeof e==`number`);return Object.entries(e).filter(([e,n])=>t.indexOf(+e)===-1).map(([e,t])=>t)}function v(e,t){return typeof t==`bigint`?t.toString():t}function oe(e){return{get value(){{let t=e();return Object.defineProperty(this,"value",{value:t}),t}throw Error(`cached value already set`)}}}function y(e){return e==null}function b(e){let t=+!!e.startsWith(`^`),n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}var se=Symbol(`evaluating`);function x(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==se)return r===void 0&&(r=se,r=n()),r},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function S(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function C(...e){let t={};for(let n of e)Object.assign(t,Object.getOwnPropertyDescriptors(n));return Object.defineProperties({},t)}function ce(e){return JSON.stringify(e)}var le=`captureStackTrace`in Error?Error.captureStackTrace:(...e)=>{};function w(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}var ue=oe(()=>{if(typeof navigator<`u`&&navigator?.userAgent?.includes(`Cloudflare`))return!1;try{return Function(``),!0}catch{return!1}});function T(e){if(w(e)===!1)return!1;let t=e.constructor;if(t===void 0)return!0;let n=t.prototype;return!(w(n)===!1||Object.prototype.hasOwnProperty.call(n,`isPrototypeOf`)===!1)}function de(e){return T(e)?{...e}:Array.isArray(e)?[...e]:e}var fe=new Set([`string`,`number`,`symbol`]);function E(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function D(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),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}return delete t.message,typeof t.error==`string`?{...t,error:()=>t.error}:t}function pe(e){return Object.keys(e).filter(t=>e[t]._zod.optin===`optional`&&e[t]._zod.optout===`optional`)}-Number.MAX_VALUE,Number.MAX_VALUE;function me(e,t){let n=e._zod.def;return D(e,C(e._zod.def,{get shape(){let e={};for(let r in t){if(!(r in n.shape))throw Error(`Unrecognized key: "${r}"`);t[r]&&(e[r]=n.shape[r])}return S(this,`shape`,e),e},checks:[]}))}function he(e,t){let n=e._zod.def;return D(e,C(e._zod.def,{get shape(){let r={...e._zod.def.shape};for(let e in t){if(!(e in n.shape))throw Error(`Unrecognized key: "${e}"`);t[e]&&delete r[e]}return S(this,`shape`,r),r},checks:[]}))}function ge(e,t){if(!T(t))throw Error(`Invalid input to extend: expected a plain object`);let n=e._zod.def.checks;if(n&&n.length>0)throw Error("Object schemas containing refinements cannot be extended. Use `.safeExtend()` instead.");return D(e,C(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return S(this,`shape`,n),n},checks:[]}))}function _e(e,t){if(!T(t))throw Error(`Invalid input to safeExtend: expected a plain object`);return D(e,{...e._zod.def,get shape(){let n={...e._zod.def.shape,...t};return S(this,`shape`,n),n},checks:e._zod.def.checks})}function ve(e,t){return D(e,C(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t._zod.def.shape};return S(this,`shape`,n),n},get catchall(){return t._zod.def.catchall},checks:[]}))}function ye(e,t,n){return D(t,C(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t in n){if(!(t in r))throw Error(`Unrecognized key: "${t}"`);n[t]&&(i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t])}else for(let t in r)i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t];return S(this,`shape`,i),i},checks:[]}))}function be(e,t,n){return D(t,C(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t in n){if(!(t in i))throw Error(`Unrecognized key: "${t}"`);n[t]&&(i[t]=new e({type:`nonoptional`,innerType:r[t]}))}else for(let t in r)i[t]=new e({type:`nonoptional`,innerType:r[t]});return S(this,`shape`,i),i},checks:[]}))}function k(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 xe(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function A(e){return typeof e==`string`?e:e?.message}function j(e,t,n){let r={...e,path:e.path??[]};return e.message||(r.message=A(e.inst?._zod.def?.error?.(e))??A(t?.error?.(e))??A(n.customError?.(e))??A(n.localeError?.(e))??`Invalid input`),delete r.inst,delete r.continue,t?.reportInput||delete r.input,r}function M(e){return Array.isArray(e)?`array`:typeof e==`string`?`string`:`unknown`}function N(...e){let[t,n,r]=e;return typeof t==`string`?{message:t,code:`custom`,input:n,inst:r}:{...t}}var Se=(e,t)=>{e.name=`$ZodError`,Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,v,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},Ce=h(`$ZodError`,Se),we=h(`$ZodError`,Se,{Parent:Error});function Te(e,t=e=>e.message){let n={},r=[];for(let i of e.issues)i.path.length>0?(n[i.path[0]]=n[i.path[0]]||[],n[i.path[0]].push(t(i))):r.push(t(i));return{formErrors:r,fieldErrors:n}}function Ee(e,t){let n=t||function(e){return e.message},r={_errors:[]},i=e=>{for(let t of e.issues)if(t.code===`invalid_union`&&t.errors.length)t.errors.map(e=>i({issues:e}));else if(t.code===`invalid_key`)i({issues:t.issues});else if(t.code===`invalid_element`)i({issues:t.issues});else if(t.path.length===0)r._errors.push(n(t));else{let e=r,i=0;for(;i<t.path.length;){let r=t.path[i];i===t.path.length-1?(e[r]=e[r]||{_errors:[]},e[r]._errors.push(n(t))):e[r]=e[r]||{_errors:[]},e=e[r],i++}}};return i(e),r}var De=e=>(t,n,r,i)=>{let a=r?Object.assign(r,{async:!1}):{async:!1},o=t._zod.run({value:n,issues:[]},a);if(o instanceof Promise)throw new g;if(o.issues.length){let t=new(i?.Err??e)(o.issues.map(e=>j(e,a,_())));throw le(t,i?.callee),t}return o.value},Oe=e=>async(t,n,r,i)=>{let a=r?Object.assign(r,{async:!0}):{async:!0},o=t._zod.run({value:n,issues:[]},a);if(o instanceof Promise&&(o=await o),o.issues.length){let t=new(i?.Err??e)(o.issues.map(e=>j(e,a,_())));throw le(t,i?.callee),t}return o.value},P=e=>(t,n,r)=>{let i=r?{...r,async:!1}:{async:!1},a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise)throw new g;return a.issues.length?{success:!1,error:new(e??Ce)(a.issues.map(e=>j(e,i,_())))}:{success:!0,data:a.value}},ke=P(we),F=e=>async(t,n,r)=>{let i=r?Object.assign(r,{async:!0}):{async:!0},a=t._zod.run({value:n,issues:[]},i);return a instanceof Promise&&(a=await a),a.issues.length?{success:!1,error:new e(a.issues.map(e=>j(e,i,_())))}:{success:!0,data:a.value}},Ae=F(we),je=e=>(t,n,r)=>{let i=r?Object.assign(r,{direction:`backward`}):{direction:`backward`};return De(e)(t,n,i)},Me=e=>(t,n,r)=>De(e)(t,n,r),Ne=e=>async(t,n,r)=>{let i=r?Object.assign(r,{direction:`backward`}):{direction:`backward`};return Oe(e)(t,n,i)},Pe=e=>async(t,n,r)=>Oe(e)(t,n,r),Fe=e=>(t,n,r)=>{let i=r?Object.assign(r,{direction:`backward`}):{direction:`backward`};return P(e)(t,n,i)},Ie=e=>(t,n,r)=>P(e)(t,n,r),Le=e=>async(t,n,r)=>{let i=r?Object.assign(r,{direction:`backward`}):{direction:`backward`};return F(e)(t,n,i)},Re=e=>async(t,n,r)=>F(e)(t,n,r),ze=/^[cC][^\s-]{8,}$/,Be=/^[0-9a-z]+$/,Ve=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,He=/^[0-9a-vA-V]{20}$/,Ue=/^[A-Za-z0-9]{27}$/,We=/^[a-zA-Z0-9_-]{21}$/,Ge=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Ke=/^([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})$/,qe=e=>e?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})$`):/^([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)$/,Je=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Ye=`^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`;function Xe(){return new RegExp(Ye,`u`)}var Ze=/^(?:(?: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])$/,Qe=/^(([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}|:))$/,$e=/^((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])$/,et=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,tt=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,nt=/^[A-Za-z0-9_-]*$/,rt=/^(?=.{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])?)*\.?$/,it=/^\+(?:[0-9]){6,14}[0-9]$/,at=`(?:(?:\\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])))`,ot=RegExp(`^${at}$`);function st(e){let t=`(?:[01]\\d|2[0-3]):[0-5]\\d`;return typeof e.precision==`number`?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function ct(e){return RegExp(`^${st(e)}$`)}function lt(e){let t=st({precision:e.precision}),n=[`Z`];e.local&&n.push(``),e.offset&&n.push(`([+-](?:[01]\\d|2[0-3]):[0-5]\\d)`);let r=`${t}(?:${n.join(`|`)})`;return RegExp(`^${at}T(?:${r})$`)}var ut=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??``}}`:`[\\s\\S]*`;return RegExp(`^${t}$`)},dt=/^[^A-Z]*$/,ft=/^[^a-z]*$/,I=h(`$ZodCheck`,(e,t)=>{var n;e._zod??={},e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),pt=h(`$ZodCheckMaxLength`,(e,t)=>{var n;I.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!y(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag.maximum??1/0;t.maximum<n&&(e._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{let r=n.value;if(r.length<=t.maximum)return;let i=M(r);n.issues.push({origin:i,code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),mt=h(`$ZodCheckMinLength`,(e,t)=>{var n;I.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!y(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag.minimum??-1/0;t.minimum>n&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{let r=n.value;if(r.length>=t.minimum)return;let i=M(r);n.issues.push({origin:i,code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),ht=h(`$ZodCheckLengthEquals`,(e,t)=>{var n;I.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!y(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length}),e._zod.check=n=>{let r=n.value,i=r.length;if(i===t.length)return;let a=M(r),o=i>t.length;n.issues.push({origin:a,...o?{code:`too_big`,maximum:t.length}:{code:`too_small`,minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),L=h(`$ZodCheckStringFormat`,(e,t)=>{var n,r;I.init(e,t),e._zod.onattach.push(e=>{let n=e._zod.bag;n.format=t.format,t.pattern&&(n.patterns??=new Set,n.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),gt=h(`$ZodCheckRegex`,(e,t)=>{L.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:`regex`,input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),_t=h(`$ZodCheckLowerCase`,(e,t)=>{t.pattern??=dt,L.init(e,t)}),vt=h(`$ZodCheckUpperCase`,(e,t)=>{t.pattern??=ft,L.init(e,t)}),yt=h(`$ZodCheckIncludes`,(e,t)=>{I.init(e,t);let n=E(t.includes),r=new RegExp(typeof t.position==`number`?`^.{${t.position}}${n}`:n);t.pattern=r,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(r)}),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:`string`,code:`invalid_format`,format:`includes`,includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),bt=h(`$ZodCheckStartsWith`,(e,t)=>{I.init(e,t);let n=RegExp(`^${E(t.prefix)}.*`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`starts_with`,prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),xt=h(`$ZodCheckEndsWith`,(e,t)=>{I.init(e,t);let n=RegExp(`.*${E(t.suffix)}$`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`ends_with`,suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}}),St=h(`$ZodCheckOverwrite`,(e,t)=>{I.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}}),Ct=class{constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),--this.indent}write(e){if(typeof e==`function`){e(this,{execution:`sync`}),e(this,{execution:`async`});return}let t=e.split(`
|
|
2
|
+
`).filter(e=>e),n=Math.min(...t.map(e=>e.length-e.trimStart().length)),r=t.map(e=>e.slice(n)).map(e=>` `.repeat(this.indent*2)+e);for(let e of r)this.content.push(e)}compile(){let e=Function,t=this?.args,n=[...(this?.content??[``]).map(e=>` ${e}`)];return new e(...t,n.join(`
|
|
3
|
+
`))}},wt={major:4,minor:1,patch:11},R=h(`$ZodType`,(e,t)=>{var n;e??={},e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=wt;let r=[...e._zod.def.checks??[]];e._zod.traits.has(`$ZodCheck`)&&r.unshift(e);for(let t of r)for(let n of t._zod.onattach)n(e);if(r.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let t=(e,t,n)=>{let r=k(e),i;for(let a of t){if(a._zod.def.when){if(!a._zod.def.when(e))continue}else if(r)continue;let t=e.issues.length,o=a._zod.check(e);if(o instanceof Promise&&n?.async===!1)throw new g;if(i||o instanceof Promise)i=(i??Promise.resolve()).then(async()=>{await o,e.issues.length!==t&&(r||=k(e,t))});else{if(e.issues.length===t)continue;r||=k(e,t)}}return i?i.then(()=>e):e},n=(n,i,a)=>{if(k(n))return n.aborted=!0,n;let o=t(i,r,a);if(o instanceof Promise){if(a.async===!1)throw new g;return o.then(t=>e._zod.parse(t,a))}return e._zod.parse(o,a)};e._zod.run=(i,a)=>{if(a.skipChecks)return e._zod.parse(i,a);if(a.direction===`backward`){let t=e._zod.parse({value:i.value,issues:[]},{...a,skipChecks:!0});return t instanceof Promise?t.then(e=>n(e,i,a)):n(t,i,a)}let o=e._zod.parse(i,a);if(o instanceof Promise){if(a.async===!1)throw new g;return o.then(e=>t(e,r,a))}return t(o,r,a)}}e[`~standard`]={validate:t=>{try{let n=ke(e,t);return n.success?{value:n.data}:{issues:n.error?.issues}}catch{return Ae(e,t).then(e=>e.success?{value:e.data}:{issues:e.error?.issues})}},vendor:`zod`,version:1}}),z=h(`$ZodString`,(e,t)=>{R.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??ut(e._zod.bag),e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value==`string`||n.issues.push({expected:`string`,code:`invalid_type`,input:n.value,inst:e}),n}}),B=h(`$ZodStringFormat`,(e,t)=>{L.init(e,t),z.init(e,t)}),Tt=h(`$ZodGUID`,(e,t)=>{t.pattern??=Ke,B.init(e,t)}),Et=h(`$ZodUUID`,(e,t)=>{if(t.version){let e={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(e===void 0)throw Error(`Invalid UUID version: "${t.version}"`);t.pattern??=qe(e)}else t.pattern??=qe();B.init(e,t)}),Dt=h(`$ZodEmail`,(e,t)=>{t.pattern??=Je,B.init(e,t)}),Ot=h(`$ZodURL`,(e,t)=>{B.init(e,t),e._zod.check=n=>{try{let r=n.value.trim(),i=new URL(r);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(i.hostname)||n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid hostname`,pattern:rt.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(i.protocol.endsWith(`:`)?i.protocol.slice(0,-1):i.protocol)||n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid protocol`,pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),t.normalize?n.value=i.href:n.value=r;return}catch{n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort})}}}),kt=h(`$ZodEmoji`,(e,t)=>{t.pattern??=Xe(),B.init(e,t)}),At=h(`$ZodNanoID`,(e,t)=>{t.pattern??=We,B.init(e,t)}),jt=h(`$ZodCUID`,(e,t)=>{t.pattern??=ze,B.init(e,t)}),Mt=h(`$ZodCUID2`,(e,t)=>{t.pattern??=Be,B.init(e,t)}),Nt=h(`$ZodULID`,(e,t)=>{t.pattern??=Ve,B.init(e,t)}),Pt=h(`$ZodXID`,(e,t)=>{t.pattern??=He,B.init(e,t)}),Ft=h(`$ZodKSUID`,(e,t)=>{t.pattern??=Ue,B.init(e,t)}),It=h(`$ZodISODateTime`,(e,t)=>{t.pattern??=lt(t),B.init(e,t)}),Lt=h(`$ZodISODate`,(e,t)=>{t.pattern??=ot,B.init(e,t)}),Rt=h(`$ZodISOTime`,(e,t)=>{t.pattern??=ct(t),B.init(e,t)}),zt=h(`$ZodISODuration`,(e,t)=>{t.pattern??=Ge,B.init(e,t)}),Bt=h(`$ZodIPv4`,(e,t)=>{t.pattern??=Ze,B.init(e,t),e._zod.onattach.push(e=>{let t=e._zod.bag;t.format=`ipv4`})}),Vt=h(`$ZodIPv6`,(e,t)=>{t.pattern??=Qe,B.init(e,t),e._zod.onattach.push(e=>{let t=e._zod.bag;t.format=`ipv6`}),e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:`invalid_format`,format:`ipv6`,input:n.value,inst:e,continue:!t.abort})}}}),Ht=h(`$ZodCIDRv4`,(e,t)=>{t.pattern??=$e,B.init(e,t)}),Ut=h(`$ZodCIDRv6`,(e,t)=>{t.pattern??=et,B.init(e,t),e._zod.check=n=>{let r=n.value.split(`/`);try{if(r.length!==2)throw Error();let[e,t]=r;if(!t)throw Error();let n=Number(t);if(`${n}`!==t||n<0||n>128)throw Error();new URL(`http://[${e}]`)}catch{n.issues.push({code:`invalid_format`,format:`cidrv6`,input:n.value,inst:e,continue:!t.abort})}}});function Wt(e){if(e===``)return!0;if(e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}var Gt=h(`$ZodBase64`,(e,t)=>{t.pattern??=tt,B.init(e,t),e._zod.onattach.push(e=>{e._zod.bag.contentEncoding=`base64`}),e._zod.check=n=>{Wt(n.value)||n.issues.push({code:`invalid_format`,format:`base64`,input:n.value,inst:e,continue:!t.abort})}});function Kt(e){if(!nt.test(e))return!1;let t=e.replace(/[-_]/g,e=>e===`-`?`+`:`/`);return Wt(t.padEnd(Math.ceil(t.length/4)*4,`=`))}var qt=h(`$ZodBase64URL`,(e,t)=>{t.pattern??=nt,B.init(e,t),e._zod.onattach.push(e=>{e._zod.bag.contentEncoding=`base64url`}),e._zod.check=n=>{Kt(n.value)||n.issues.push({code:`invalid_format`,format:`base64url`,input:n.value,inst:e,continue:!t.abort})}}),Jt=h(`$ZodE164`,(e,t)=>{t.pattern??=it,B.init(e,t)});function Yt(e,t=null){try{let n=e.split(`.`);if(n.length!==3)return!1;let[r]=n;if(!r)return!1;let i=JSON.parse(atob(r));return!(`typ`in i&&i?.typ!==`JWT`||!i.alg||t&&(!(`alg`in i)||i.alg!==t))}catch{return!1}}var Xt=h(`$ZodJWT`,(e,t)=>{B.init(e,t),e._zod.check=n=>{Yt(n.value,t.alg)||n.issues.push({code:`invalid_format`,format:`jwt`,input:n.value,inst:e,continue:!t.abort})}}),Zt=h(`$ZodUnknown`,(e,t)=>{R.init(e,t),e._zod.parse=e=>e}),Qt=h(`$ZodNever`,(e,t)=>{R.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:`never`,code:`invalid_type`,input:t.value,inst:e}),t)});function $t(e,t,n){e.issues.length&&t.issues.push(...xe(n,e.issues)),t.value[n]=e.value}var en=h(`$ZodArray`,(e,t)=>{R.init(e,t),e._zod.parse=(n,r)=>{let i=n.value;if(!Array.isArray(i))return n.issues.push({expected:`array`,code:`invalid_type`,input:i,inst:e}),n;n.value=Array(i.length);let a=[];for(let e=0;e<i.length;e++){let o=i[e],s=t.element._zod.run({value:o,issues:[]},r);s instanceof Promise?a.push(s.then(t=>$t(t,n,e))):$t(s,n,e)}return a.length?Promise.all(a).then(()=>n):n}});function V(e,t,n,r){e.issues.length&&t.issues.push(...xe(n,e.issues)),e.value===void 0?n in r&&(t.value[n]=void 0):t.value[n]=e.value}function tn(e){let t=Object.keys(e.shape);for(let n of t)if(!e.shape?.[n]?._zod?.traits?.has(`$ZodType`))throw Error(`Invalid element at key "${n}": expected a Zod schema`);let n=pe(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function nn(e,t,n,r,i,a){let o=[],s=i.keySet,c=i.catchall._zod,l=c.def.type;for(let i of Object.keys(t)){if(s.has(i))continue;if(l===`never`){o.push(i);continue}let a=c.run({value:t[i],issues:[]},r);a instanceof Promise?e.push(a.then(e=>V(e,n,i,t))):V(a,n,i,t)}return o.length&&n.issues.push({code:`unrecognized_keys`,keys:o,input:t,inst:a}),e.length?Promise.all(e).then(()=>n):n}var rn=h(`$ZodObject`,(e,t)=>{if(R.init(e,t),!Object.getOwnPropertyDescriptor(t,`shape`)?.get){let e=t.shape;Object.defineProperty(t,"shape",{get:()=>{let n={...e};return Object.defineProperty(t,"shape",{value:n}),n}})}let n=oe(()=>tn(t));x(e._zod,`propValues`,()=>{let e=t.shape,n={};for(let t in e){let r=e[t]._zod;if(r.values){n[t]??(n[t]=new Set);for(let e of r.values)n[t].add(e)}}return n});let r=w,i=t.catchall,a;e._zod.parse=(t,o)=>{a??=n.value;let s=t.value;if(!r(s))return t.issues.push({expected:`object`,code:`invalid_type`,input:s,inst:e}),t;t.value={};let c=[],l=a.shape;for(let e of a.keys){let n=l[e]._zod.run({value:s[e],issues:[]},o);n instanceof Promise?c.push(n.then(n=>V(n,t,e,s))):V(n,t,e,s)}return i?nn(c,s,t,o,n.value,e):c.length?Promise.all(c).then(()=>t):t}}),an=h(`$ZodObjectJIT`,(e,t)=>{rn.init(e,t);let n=e._zod.parse,r=oe(()=>tn(t)),i=e=>{let t=new Ct([`shape`,`payload`,`ctx`]),n=r.value,i=e=>{let t=ce(e);return`shape[${t}]._zod.run({ value: input[${t}], issues: [] }, ctx)`};t.write(`const input = payload.value;`);let a=Object.create(null),o=0;for(let e of n.keys)a[e]=`key_${o++}`;t.write(`const newResult = {};`);for(let e of n.keys){let n=a[e],r=ce(e);t.write(`const ${n} = ${i(e)};`),t.write(`
|
|
4
|
+
if (${n}.issues.length) {
|
|
5
|
+
payload.issues = payload.issues.concat(${n}.issues.map(iss => ({
|
|
6
|
+
...iss,
|
|
7
|
+
path: iss.path ? [${r}, ...iss.path] : [${r}]
|
|
8
|
+
})));
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
if (${n}.value === undefined) {
|
|
13
|
+
if (${r} in input) {
|
|
14
|
+
newResult[${r}] = undefined;
|
|
15
|
+
}
|
|
16
|
+
} else {
|
|
17
|
+
newResult[${r}] = ${n}.value;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
`)}t.write(`payload.value = newResult;`),t.write(`return payload;`);let s=t.compile();return(t,n)=>s(e,t,n)},a,o=w,s=!ie.jitless,c=s&&ue.value,l=t.catchall,u;e._zod.parse=(d,f)=>{u??=r.value;let p=d.value;return o(p)?s&&c&&f?.async===!1&&f.jitless!==!0?(a||=i(t.shape),d=a(d,f),l?nn([],p,d,f,u,e):d):n(d,f):(d.issues.push({expected:`object`,code:`invalid_type`,input:p,inst:e}),d)}});function on(e,t,n,r){for(let n of e)if(n.issues.length===0)return t.value=n.value,t;let i=e.filter(e=>!k(e));return i.length===1?(t.value=i[0].value,i[0]):(t.issues.push({code:`invalid_union`,input:t.value,inst:n,errors:e.map(e=>e.issues.map(e=>j(e,r,_())))}),t)}var sn=h(`$ZodUnion`,(e,t)=>{R.init(e,t),x(e._zod,`optin`,()=>t.options.some(e=>e._zod.optin===`optional`)?`optional`:void 0),x(e._zod,`optout`,()=>t.options.some(e=>e._zod.optout===`optional`)?`optional`:void 0),x(e._zod,`values`,()=>{if(t.options.every(e=>e._zod.values))return new Set(t.options.flatMap(e=>Array.from(e._zod.values)))}),x(e._zod,`pattern`,()=>{if(t.options.every(e=>e._zod.pattern)){let e=t.options.map(e=>e._zod.pattern);return RegExp(`^(${e.map(e=>b(e.source)).join(`|`)})$`)}});let n=t.options.length===1,r=t.options[0]._zod.run;e._zod.parse=(i,a)=>{if(n)return r(i,a);let o=!1,s=[];for(let e of t.options){let t=e._zod.run({value:i.value,issues:[]},a);if(t instanceof Promise)s.push(t),o=!0;else{if(t.issues.length===0)return t;s.push(t)}}return o?Promise.all(s).then(t=>on(t,i,e,a)):on(s,i,e,a)}}),cn=h(`$ZodIntersection`,(e,t)=>{R.init(e,t),e._zod.parse=(e,n)=>{let r=e.value,i=t.left._zod.run({value:r,issues:[]},n),a=t.right._zod.run({value:r,issues:[]},n);return i instanceof Promise||a instanceof Promise?Promise.all([i,a]).then(([t,n])=>ln(e,t,n)):ln(e,i,a)}});function H(e,t){if(e===t||e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(T(e)&&T(t)){let n=Object.keys(t),r=Object.keys(e).filter(e=>n.indexOf(e)!==-1),i={...e,...t};for(let n of r){let r=H(e[n],t[n]);if(!r.valid)return{valid:!1,mergeErrorPath:[n,...r.mergeErrorPath]};i[n]=r.data}return{valid:!0,data:i}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let r=0;r<e.length;r++){let i=e[r],a=t[r],o=H(i,a);if(!o.valid)return{valid:!1,mergeErrorPath:[r,...o.mergeErrorPath]};n.push(o.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function ln(e,t,n){if(t.issues.length&&e.issues.push(...t.issues),n.issues.length&&e.issues.push(...n.issues),k(e))return e;let r=H(t.value,n.value);if(!r.valid)throw Error(`Unmergable intersection. Error path: ${JSON.stringify(r.mergeErrorPath)}`);return e.value=r.data,e}var un=h(`$ZodEnum`,(e,t)=>{R.init(e,t);let n=ae(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=RegExp(`^(${n.filter(e=>fe.has(typeof e)).map(e=>typeof e==`string`?E(e):e.toString()).join(`|`)})$`),e._zod.parse=(t,i)=>{let a=t.value;return r.has(a)||t.issues.push({code:`invalid_value`,values:n,input:a,inst:e}),t}}),dn=h(`$ZodTransform`,(e,t)=>{R.init(e,t),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new re(e.constructor.name);let i=t.transform(n.value,n);if(r.async)return(i instanceof Promise?i:Promise.resolve(i)).then(e=>(n.value=e,n));if(i instanceof Promise)throw new g;return n.value=i,n}});function fn(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}var pn=h(`$ZodOptional`,(e,t)=>{R.init(e,t),e._zod.optin=`optional`,e._zod.optout=`optional`,x(e._zod,`values`,()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),x(e._zod,`pattern`,()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${b(e.source)})?$`):void 0}),e._zod.parse=(e,n)=>{if(t.innerType._zod.optin===`optional`){let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(t=>fn(t,e.value)):fn(r,e.value)}return e.value===void 0?e:t.innerType._zod.run(e,n)}}),mn=h(`$ZodNullable`,(e,t)=>{R.init(e,t),x(e._zod,`optin`,()=>t.innerType._zod.optin),x(e._zod,`optout`,()=>t.innerType._zod.optout),x(e._zod,`pattern`,()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${b(e.source)}|null)$`):void 0}),x(e._zod,`values`,()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(e,n)=>e.value===null?e:t.innerType._zod.run(e,n)}),hn=h(`$ZodDefault`,(e,t)=>{R.init(e,t),e._zod.optin=`optional`,x(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);if(e.value===void 0)return e.value=t.defaultValue,e;let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(e=>gn(e,t)):gn(r,t)}});function gn(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var _n=h(`$ZodPrefault`,(e,t)=>{R.init(e,t),e._zod.optin=`optional`,x(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>(n.direction===`backward`||e.value===void 0&&(e.value=t.defaultValue),t.innerType._zod.run(e,n))}),vn=h(`$ZodNonOptional`,(e,t)=>{R.init(e,t),x(e._zod,`values`,()=>{let e=t.innerType._zod.values;return e?new Set([...e].filter(e=>e!==void 0)):void 0}),e._zod.parse=(n,r)=>{let i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(t=>yn(t,e)):yn(i,e)}});function yn(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:`invalid_type`,expected:`nonoptional`,input:e.value,inst:t}),e}var bn=h(`$ZodCatch`,(e,t)=>{R.init(e,t),x(e._zod,`optin`,()=>t.innerType._zod.optin),x(e._zod,`optout`,()=>t.innerType._zod.optout),x(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(r=>(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>j(e,n,_()))},input:e.value}),e.issues=[]),e)):(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>j(e,n,_()))},input:e.value}),e.issues=[]),e)}}),xn=h(`$ZodPipe`,(e,t)=>{R.init(e,t),x(e._zod,`values`,()=>t.in._zod.values),x(e._zod,`optin`,()=>t.in._zod.optin),x(e._zod,`optout`,()=>t.out._zod.optout),x(e._zod,`propValues`,()=>t.in._zod.propValues),e._zod.parse=(e,n)=>{if(n.direction===`backward`){let r=t.out._zod.run(e,n);return r instanceof Promise?r.then(e=>U(e,t.in,n)):U(r,t.in,n)}let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>U(e,t.out,n)):U(r,t.out,n)}});function U(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}var Sn=h(`$ZodReadonly`,(e,t)=>{R.init(e,t),x(e._zod,`propValues`,()=>t.innerType._zod.propValues),x(e._zod,`values`,()=>t.innerType._zod.values),x(e._zod,`optin`,()=>t.innerType._zod.optin),x(e._zod,`optout`,()=>t.innerType._zod.optout),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(Cn):Cn(r)}});function Cn(e){return e.value=Object.freeze(e.value),e}var wn=h(`$ZodCustom`,(e,t)=>{I.init(e,t),R.init(e,t),e._zod.parse=(e,t)=>e,e._zod.check=n=>{let r=n.value,i=t.fn(r);if(i instanceof Promise)return i.then(t=>Tn(t,n,r,e));Tn(i,n,r,e)}});function Tn(e,t,n,r){if(!e){let e={code:`custom`,input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(e.params=r._zod.def.params),t.issues.push(N(e))}}var En=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){let n=t[0];if(this._map.set(e,n),n&&typeof n==`object`&&`id`in n){if(this._idmap.has(n.id))throw Error(`ID ${n.id} already exists in the registry`);this._idmap.set(n.id,e)}return this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let t=this._map.get(e);return t&&typeof t==`object`&&`id`in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){let t=e._zod.parent;if(t){let n={...this.get(t)??{}};delete n.id;let r={...n,...this._map.get(e)};return Object.keys(r).length?r:void 0}return this._map.get(e)}has(e){return this._map.has(e)}};function Dn(){return new En}var W=Dn();function On(e,t){return new e({type:`string`,...O(t)})}function kn(e,t){return new e({type:`string`,format:`email`,check:`string_format`,abort:!1,...O(t)})}function An(e,t){return new e({type:`string`,format:`guid`,check:`string_format`,abort:!1,...O(t)})}function jn(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,...O(t)})}function Mn(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v4`,...O(t)})}function Nn(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v6`,...O(t)})}function Pn(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v7`,...O(t)})}function Fn(e,t){return new e({type:`string`,format:`url`,check:`string_format`,abort:!1,...O(t)})}function In(e,t){return new e({type:`string`,format:`emoji`,check:`string_format`,abort:!1,...O(t)})}function Ln(e,t){return new e({type:`string`,format:`nanoid`,check:`string_format`,abort:!1,...O(t)})}function Rn(e,t){return new e({type:`string`,format:`cuid`,check:`string_format`,abort:!1,...O(t)})}function zn(e,t){return new e({type:`string`,format:`cuid2`,check:`string_format`,abort:!1,...O(t)})}function Bn(e,t){return new e({type:`string`,format:`ulid`,check:`string_format`,abort:!1,...O(t)})}function Vn(e,t){return new e({type:`string`,format:`xid`,check:`string_format`,abort:!1,...O(t)})}function Hn(e,t){return new e({type:`string`,format:`ksuid`,check:`string_format`,abort:!1,...O(t)})}function Un(e,t){return new e({type:`string`,format:`ipv4`,check:`string_format`,abort:!1,...O(t)})}function Wn(e,t){return new e({type:`string`,format:`ipv6`,check:`string_format`,abort:!1,...O(t)})}function Gn(e,t){return new e({type:`string`,format:`cidrv4`,check:`string_format`,abort:!1,...O(t)})}function Kn(e,t){return new e({type:`string`,format:`cidrv6`,check:`string_format`,abort:!1,...O(t)})}function qn(e,t){return new e({type:`string`,format:`base64`,check:`string_format`,abort:!1,...O(t)})}function Jn(e,t){return new e({type:`string`,format:`base64url`,check:`string_format`,abort:!1,...O(t)})}function Yn(e,t){return new e({type:`string`,format:`e164`,check:`string_format`,abort:!1,...O(t)})}function Xn(e,t){return new e({type:`string`,format:`jwt`,check:`string_format`,abort:!1,...O(t)})}function Zn(e,t){return new e({type:`string`,format:`datetime`,check:`string_format`,offset:!1,local:!1,precision:null,...O(t)})}function Qn(e,t){return new e({type:`string`,format:`date`,check:`string_format`,...O(t)})}function $n(e,t){return new e({type:`string`,format:`time`,check:`string_format`,precision:null,...O(t)})}function er(e,t){return new e({type:`string`,format:`duration`,check:`string_format`,...O(t)})}function tr(e){return new e({type:`unknown`})}function nr(e,t){return new e({type:`never`,...O(t)})}function rr(e,t){return new pt({check:`max_length`,...O(t),maximum:e})}function G(e,t){return new mt({check:`min_length`,...O(t),minimum:e})}function ir(e,t){return new ht({check:`length_equals`,...O(t),length:e})}function ar(e,t){return new gt({check:`string_format`,format:`regex`,...O(t),pattern:e})}function or(e){return new _t({check:`string_format`,format:`lowercase`,...O(e)})}function sr(e){return new vt({check:`string_format`,format:`uppercase`,...O(e)})}function cr(e,t){return new yt({check:`string_format`,format:`includes`,...O(t),includes:e})}function lr(e,t){return new bt({check:`string_format`,format:`starts_with`,...O(t),prefix:e})}function ur(e,t){return new xt({check:`string_format`,format:`ends_with`,...O(t),suffix:e})}function K(e){return new St({check:`overwrite`,tx:e})}function dr(e){return K(t=>t.normalize(e))}function fr(){return K(e=>e.trim())}function pr(){return K(e=>e.toLowerCase())}function mr(){return K(e=>e.toUpperCase())}function hr(e,t,n){return new e({type:`array`,element:t,...O(n)})}function gr(e,t,n){return new e({type:`custom`,check:`custom`,fn:t,...O(n)})}function _r(e){let t=vr(n=>(n.addIssue=e=>{if(typeof e==`string`)n.issues.push(N(e,n.value,t._zod.def));else{let r=e;r.fatal&&(r.continue=!1),r.code??=`custom`,r.input??=n.value,r.inst??=t,r.continue??=!t._zod.def.abort,n.issues.push(N(r))}},e(n.value,n)));return t}function vr(e,t){let n=new I({check:`custom`,...O(t)});return n._zod.check=e,n}var yr=h(`ZodISODateTime`,(e,t)=>{It.init(e,t),Y.init(e,t)});function br(e){return Zn(yr,e)}var xr=h(`ZodISODate`,(e,t)=>{Lt.init(e,t),Y.init(e,t)});function Sr(e){return Qn(xr,e)}var Cr=h(`ZodISOTime`,(e,t)=>{Rt.init(e,t),Y.init(e,t)});function wr(e){return $n(Cr,e)}var Tr=h(`ZodISODuration`,(e,t)=>{zt.init(e,t),Y.init(e,t)});function Er(e){return er(Tr,e)}var Dr=(e,t)=>{Ce.init(e,t),e.name=`ZodError`,Object.defineProperties(e,{format:{value:t=>Ee(e,t)},flatten:{value:t=>Te(e,t)},addIssue:{value:t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,v,2)}},addIssues:{value:t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,v,2)}},isEmpty:{get(){return e.issues.length===0}}})};h(`ZodError`,Dr);var q=h(`ZodError`,Dr,{Parent:Error}),Or=De(q),kr=Oe(q),Ar=P(q),jr=F(q),Mr=je(q),Nr=Me(q),Pr=Ne(q),Fr=Pe(q),Ir=Fe(q),Lr=Ie(q),Rr=Le(q),zr=Re(q),J=h(`ZodType`,(e,t)=>(R.init(e,t),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...n)=>e.clone(C(t,{checks:[...t.checks??[],...n.map(e=>typeof e==`function`?{_zod:{check:e,def:{check:`custom`},onattach:[]}}:e)]})),e.clone=(t,n)=>D(e,t,n),e.brand=()=>e,e.register=((t,n)=>(t.add(e,n),e)),e.parse=(t,n)=>Or(e,t,n,{callee:e.parse}),e.safeParse=(t,n)=>Ar(e,t,n),e.parseAsync=async(t,n)=>kr(e,t,n,{callee:e.parseAsync}),e.safeParseAsync=async(t,n)=>jr(e,t,n),e.spa=e.safeParseAsync,e.encode=(t,n)=>Mr(e,t,n),e.decode=(t,n)=>Nr(e,t,n),e.encodeAsync=async(t,n)=>Pr(e,t,n),e.decodeAsync=async(t,n)=>Fr(e,t,n),e.safeEncode=(t,n)=>Ir(e,t,n),e.safeDecode=(t,n)=>Lr(e,t,n),e.safeEncodeAsync=async(t,n)=>Rr(e,t,n),e.safeDecodeAsync=async(t,n)=>zr(e,t,n),e.refine=(t,n)=>e.check(Bi(t,n)),e.superRefine=t=>e.check(Vi(t)),e.overwrite=t=>e.check(K(t)),e.optional=()=>wi(e),e.nullable=()=>Ei(e),e.nullish=()=>wi(Ei(e)),e.nonoptional=t=>Mi(e,t),e.array=()=>fi(e),e.or=t=>gi([e,t]),e.and=t=>vi(e,t),e.transform=t=>Ii(e,Si(t)),e.default=t=>Oi(e,t),e.prefault=t=>Ai(e,t),e.catch=t=>Pi(e,t),e.pipe=t=>Ii(e,t),e.readonly=()=>Ri(e),e.describe=t=>{let n=e.clone();return W.add(n,{description:t}),n},Object.defineProperty(e,"description",{get(){return W.get(e)?.description},configurable:!0}),e.meta=(...t)=>{if(t.length===0)return W.get(e);let n=e.clone();return W.add(n,t[0]),n},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e)),Br=h(`_ZodString`,(e,t)=>{z.init(e,t),J.init(e,t);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,e.regex=(...t)=>e.check(ar(...t)),e.includes=(...t)=>e.check(cr(...t)),e.startsWith=(...t)=>e.check(lr(...t)),e.endsWith=(...t)=>e.check(ur(...t)),e.min=(...t)=>e.check(G(...t)),e.max=(...t)=>e.check(rr(...t)),e.length=(...t)=>e.check(ir(...t)),e.nonempty=(...t)=>e.check(G(1,...t)),e.lowercase=t=>e.check(or(t)),e.uppercase=t=>e.check(sr(t)),e.trim=()=>e.check(fr()),e.normalize=(...t)=>e.check(dr(...t)),e.toLowerCase=()=>e.check(pr()),e.toUpperCase=()=>e.check(mr())}),Vr=h(`ZodString`,(e,t)=>{z.init(e,t),Br.init(e,t),e.email=t=>e.check(kn(Ur,t)),e.url=t=>e.check(Fn(Gr,t)),e.jwt=t=>e.check(Xn(oi,t)),e.emoji=t=>e.check(In(Kr,t)),e.guid=t=>e.check(An(Wr,t)),e.uuid=t=>e.check(jn(X,t)),e.uuidv4=t=>e.check(Mn(X,t)),e.uuidv6=t=>e.check(Nn(X,t)),e.uuidv7=t=>e.check(Pn(X,t)),e.nanoid=t=>e.check(Ln(qr,t)),e.guid=t=>e.check(An(Wr,t)),e.cuid=t=>e.check(Rn(Jr,t)),e.cuid2=t=>e.check(zn(Yr,t)),e.ulid=t=>e.check(Bn(Xr,t)),e.base64=t=>e.check(qn(ri,t)),e.base64url=t=>e.check(Jn(ii,t)),e.xid=t=>e.check(Vn(Zr,t)),e.ksuid=t=>e.check(Hn(Qr,t)),e.ipv4=t=>e.check(Un($r,t)),e.ipv6=t=>e.check(Wn(ei,t)),e.cidrv4=t=>e.check(Gn(ti,t)),e.cidrv6=t=>e.check(Kn(ni,t)),e.e164=t=>e.check(Yn(ai,t)),e.datetime=t=>e.check(br(t)),e.date=t=>e.check(Sr(t)),e.time=t=>e.check(wr(t)),e.duration=t=>e.check(Er(t))});function Hr(e){return On(Vr,e)}var Y=h(`ZodStringFormat`,(e,t)=>{B.init(e,t),Br.init(e,t)}),Ur=h(`ZodEmail`,(e,t)=>{Dt.init(e,t),Y.init(e,t)}),Wr=h(`ZodGUID`,(e,t)=>{Tt.init(e,t),Y.init(e,t)}),X=h(`ZodUUID`,(e,t)=>{Et.init(e,t),Y.init(e,t)}),Gr=h(`ZodURL`,(e,t)=>{Ot.init(e,t),Y.init(e,t)}),Kr=h(`ZodEmoji`,(e,t)=>{kt.init(e,t),Y.init(e,t)}),qr=h(`ZodNanoID`,(e,t)=>{At.init(e,t),Y.init(e,t)}),Jr=h(`ZodCUID`,(e,t)=>{jt.init(e,t),Y.init(e,t)}),Yr=h(`ZodCUID2`,(e,t)=>{Mt.init(e,t),Y.init(e,t)}),Xr=h(`ZodULID`,(e,t)=>{Nt.init(e,t),Y.init(e,t)}),Zr=h(`ZodXID`,(e,t)=>{Pt.init(e,t),Y.init(e,t)}),Qr=h(`ZodKSUID`,(e,t)=>{Ft.init(e,t),Y.init(e,t)}),$r=h(`ZodIPv4`,(e,t)=>{Bt.init(e,t),Y.init(e,t)}),ei=h(`ZodIPv6`,(e,t)=>{Vt.init(e,t),Y.init(e,t)}),ti=h(`ZodCIDRv4`,(e,t)=>{Ht.init(e,t),Y.init(e,t)}),ni=h(`ZodCIDRv6`,(e,t)=>{Ut.init(e,t),Y.init(e,t)}),ri=h(`ZodBase64`,(e,t)=>{Gt.init(e,t),Y.init(e,t)}),ii=h(`ZodBase64URL`,(e,t)=>{qt.init(e,t),Y.init(e,t)}),ai=h(`ZodE164`,(e,t)=>{Jt.init(e,t),Y.init(e,t)}),oi=h(`ZodJWT`,(e,t)=>{Xt.init(e,t),Y.init(e,t)}),si=h(`ZodUnknown`,(e,t)=>{Zt.init(e,t),J.init(e,t)});function ci(){return tr(si)}var li=h(`ZodNever`,(e,t)=>{Qt.init(e,t),J.init(e,t)});function ui(e){return nr(li,e)}var di=h(`ZodArray`,(e,t)=>{en.init(e,t),J.init(e,t),e.element=t.element,e.min=(t,n)=>e.check(G(t,n)),e.nonempty=t=>e.check(G(1,t)),e.max=(t,n)=>e.check(rr(t,n)),e.length=(t,n)=>e.check(ir(t,n)),e.unwrap=()=>e.element});function fi(e,t){return hr(di,e,t)}var pi=h(`ZodObject`,(e,t)=>{an.init(e,t),J.init(e,t),x(e,`shape`,()=>t.shape),e.keyof=()=>bi(Object.keys(e._zod.def.shape)),e.catchall=t=>e.clone({...e._zod.def,catchall:t}),e.passthrough=()=>e.clone({...e._zod.def,catchall:ci()}),e.loose=()=>e.clone({...e._zod.def,catchall:ci()}),e.strict=()=>e.clone({...e._zod.def,catchall:ui()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=t=>ge(e,t),e.safeExtend=t=>_e(e,t),e.merge=t=>ve(e,t),e.pick=t=>me(e,t),e.omit=t=>he(e,t),e.partial=(...t)=>ye(Ci,e,t[0]),e.required=(...t)=>be(ji,e,t[0])});function mi(e,t){return new pi({type:`object`,shape:e??{},...O(t)})}var hi=h(`ZodUnion`,(e,t)=>{sn.init(e,t),J.init(e,t),e.options=t.options});function gi(e,t){return new hi({type:`union`,options:e,...O(t)})}var _i=h(`ZodIntersection`,(e,t)=>{cn.init(e,t),J.init(e,t)});function vi(e,t){return new _i({type:`intersection`,left:e,right:t})}var yi=h(`ZodEnum`,(e,t)=>{un.init(e,t),J.init(e,t),e.enum=t.entries,e.options=Object.values(t.entries);let n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{let i={};for(let r of e)if(n.has(r))i[r]=t.entries[r];else throw Error(`Key ${r} not found in enum`);return new yi({...t,checks:[],...O(r),entries:i})},e.exclude=(e,r)=>{let i={...t.entries};for(let t of e)if(n.has(t))delete i[t];else throw Error(`Key ${t} not found in enum`);return new yi({...t,checks:[],...O(r),entries:i})}});function bi(e,t){return new yi({type:`enum`,entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...O(t)})}var xi=h(`ZodTransform`,(e,t)=>{dn.init(e,t),J.init(e,t),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new re(e.constructor.name);n.addIssue=r=>{if(typeof r==`string`)n.issues.push(N(r,n.value,t));else{let t=r;t.fatal&&(t.continue=!1),t.code??=`custom`,t.input??=n.value,t.inst??=e,n.issues.push(N(t))}};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n)):(n.value=i,n)}});function Si(e){return new xi({type:`transform`,transform:e})}var Ci=h(`ZodOptional`,(e,t)=>{pn.init(e,t),J.init(e,t),e.unwrap=()=>e._zod.def.innerType});function wi(e){return new Ci({type:`optional`,innerType:e})}var Ti=h(`ZodNullable`,(e,t)=>{mn.init(e,t),J.init(e,t),e.unwrap=()=>e._zod.def.innerType});function Ei(e){return new Ti({type:`nullable`,innerType:e})}var Di=h(`ZodDefault`,(e,t)=>{hn.init(e,t),J.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function Oi(e,t){return new Di({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():de(t)}})}var ki=h(`ZodPrefault`,(e,t)=>{_n.init(e,t),J.init(e,t),e.unwrap=()=>e._zod.def.innerType});function Ai(e,t){return new ki({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():de(t)}})}var ji=h(`ZodNonOptional`,(e,t)=>{vn.init(e,t),J.init(e,t),e.unwrap=()=>e._zod.def.innerType});function Mi(e,t){return new ji({type:`nonoptional`,innerType:e,...O(t)})}var Ni=h(`ZodCatch`,(e,t)=>{bn.init(e,t),J.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function Pi(e,t){return new Ni({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:()=>t})}var Fi=h(`ZodPipe`,(e,t)=>{xn.init(e,t),J.init(e,t),e.in=t.in,e.out=t.out});function Ii(e,t){return new Fi({type:`pipe`,in:e,out:t})}var Li=h(`ZodReadonly`,(e,t)=>{Sn.init(e,t),J.init(e,t),e.unwrap=()=>e._zod.def.innerType});function Ri(e){return new Li({type:`readonly`,innerType:e})}var zi=h(`ZodCustom`,(e,t)=>{wn.init(e,t),J.init(e,t)});function Bi(e,t={}){return gr(zi,e,t)}function Vi(e){return _r(e)}var Hi=function(){function e(e){this.groups=[],this.each=!1,this.context=void 0,this.type=e.type,this.name=e.name,this.target=e.target,this.propertyName=e.propertyName,this.constraints=e?.constraints,this.constraintCls=e.constraintCls,this.validationTypeOptions=e.validationTypeOptions,e.validationOptions&&(this.message=e.validationOptions.message,this.groups=e.validationOptions.groups,this.always=e.validationOptions.always,this.each=e.validationOptions.each,this.context=e.validationOptions.context)}return e}(),Ui=function(){function e(){}return e.prototype.transform=function(e){var t=[];return Object.keys(e.properties).forEach(function(n){e.properties[n].forEach(function(r){var i={message:r.message,groups:r.groups,always:r.always,each:r.each},a={type:r.type,name:r.name,target:e.name,propertyName:n,constraints:r.constraints,validationTypeOptions:r.options,validationOptions:i};t.push(new Hi(a))})}),t},e}(),Wi=function(e){var t=typeof Symbol==`function`&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length==`number`)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw TypeError(t?`Object is not iterable.`:`Symbol.iterator is not defined.`)},Gi=function(e,t){var n=typeof Symbol==`function`&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],o;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a},Ki=function(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))};(function(){function e(){this.validationMetadatas=new Map,this.constraintMetadatas=new Map}return Object.defineProperty(e.prototype,"hasValidationMetaData",{get:function(){return!!this.validationMetadatas.size},enumerable:!1,configurable:!0}),e.prototype.addValidationSchema=function(e){var t=this;new Ui().transform(e).forEach(function(e){return t.addValidationMetadata(e)})},e.prototype.addValidationMetadata=function(e){var t=this.validationMetadatas.get(e.target);t?t.push(e):this.validationMetadatas.set(e.target,[e])},e.prototype.addConstraintMetadata=function(e){var t=this.constraintMetadatas.get(e.target);t?t.push(e):this.constraintMetadatas.set(e.target,[e])},e.prototype.groupByPropertyName=function(e){var t={};return e.forEach(function(e){t[e.propertyName]||(t[e.propertyName]=[]),t[e.propertyName].push(e)}),t},e.prototype.getTargetValidationMetadatas=function(e,t,n,r,i){var a,o,s=function(e){return e.always===void 0?e.groups&&e.groups.length?!1:n:e.always},c=function(e){return!!(r&&(!i||!i.length)&&e.groups&&e.groups.length)},l=(this.validationMetadatas.get(e)||[]).filter(function(n){return n.target!==e&&n.target!==t?!1:s(n)?!0:c(n)?!1:i&&i.length>0?n.groups&&!!n.groups.find(function(e){return i.indexOf(e)!==-1}):!0}),u=[];try{for(var d=Wi(this.validationMetadatas.entries()),f=d.next();!f.done;f=d.next()){var p=Gi(f.value,2),m=p[0],ee=p[1];e.prototype instanceof m&&u.push.apply(u,Ki([],Gi(ee),!1))}}catch(e){a={error:e}}finally{try{f&&!f.done&&(o=d.return)&&o.call(d)}finally{if(a)throw a.error}}var te=u.filter(function(t){return typeof t.target==`string`||t.target===e||t.target instanceof Function&&!(e.prototype instanceof t.target)?!1:s(t)?!0:c(t)?!1:i&&i.length>0?t.groups&&!!t.groups.find(function(e){return i.indexOf(e)!==-1}):!0}).filter(function(e){return!l.find(function(t){return t.propertyName===e.propertyName&&t.type===e.type})});return l.concat(te)},e.prototype.getTargetValidatorConstraints=function(e){return this.constraintMetadatas.get(e)||[]},e})(),function(){function e(){}return e.isValid=function(e){var t=this;return e!==`isValid`&&e!==`getMessage`&&Object.keys(this).map(function(e){return t[e]}).indexOf(e)!==-1},e.CUSTOM_VALIDATION=`customValidation`,e.NESTED_VALIDATION=`nestedValidation`,e.PROMISE_VALIDATION=`promiseValidation`,e.CONDITIONAL_VALIDATION=`conditionalValidation`,e.WHITELIST=`whitelistValidation`,e.IS_DEFINED=`isDefined`,e}();var qi=new(function(){function e(){this.instances=[]}return e.prototype.get=function(e){var t=this.instances.find(function(t){return t.type===e});return t||(t={type:e,object:new e},this.instances.push(t)),t.object},e}()),Ji,Z;function Yi(e){if(Ji)try{var t=Ji.get(e);if(t||!Z||!Z.fallback)return t}catch(e){if(!Z||!Z.fallbackOnErrors)throw e}return qi.get(e)}(function(){function e(e,t,n){n===void 0&&(n=!1),this.target=e,this.name=t,this.async=n}return Object.defineProperty(e.prototype,"instance",{get:function(){return Yi(this.target)},enumerable:!1,configurable:!0}),e})();var Q=function(e){return e.ACTOR=`ACTOR`,e.ADDRESS=`ADDRESS`,e.ARRAY=`ARRAY`,e.BOOLEAN=`BOOLEAN`,e.CURRENCY=`CURRENCY`,e.DATE=`DATE`,e.DATE_TIME=`DATE_TIME`,e.EMAILS=`EMAILS`,e.FILES=`FILES`,e.FULL_NAME=`FULL_NAME`,e.LINKS=`LINKS`,e.MORPH_RELATION=`MORPH_RELATION`,e.MULTI_SELECT=`MULTI_SELECT`,e.NUMBER=`NUMBER`,e.NUMERIC=`NUMERIC`,e.PHONES=`PHONES`,e.POSITION=`POSITION`,e.RATING=`RATING`,e.RAW_JSON=`RAW_JSON`,e.RELATION=`RELATION`,e.RICH_TEXT=`RICH_TEXT`,e.SELECT=`SELECT`,e.TEXT=`TEXT`,e.TS_VECTOR=`TS_VECTOR`,e.UUID=`UUID`,e}({}),Xi=function(e){return e.EMAIL=`EMAIL`,e.CALENDAR=`CALENDAR`,e.WORKFLOW=`WORKFLOW`,e.AGENT=`AGENT`,e.API=`API`,e.IMPORT=`IMPORT`,e.MANUAL=`MANUAL`,e.SYSTEM=`SYSTEM`,e.WEBHOOK=`WEBHOOK`,e.APPLICATION=`APPLICATION`,e}({}),Zi={type:Q.ACTOR,properties:[{name:`source`,type:Q.SELECT,hidden:!1,isRequired:!0,options:Object.keys(Xi).map((e,t)=>({id:(0,n.v4)(),label:`${Xi[e].toLowerCase()}`,value:e,position:t}))},{name:`workspaceMemberId`,type:Q.UUID,hidden:`input`,isRequired:!1},{name:`name`,type:Q.TEXT,hidden:`input`,isRequired:!0},{name:`context`,type:Q.RAW_JSON,hidden:!1,isRequired:!1}]},Qi={type:Q.ADDRESS,properties:[{name:`addressStreet1`,type:Q.TEXT,hidden:!1,isRequired:!1},{name:`addressStreet2`,type:Q.TEXT,hidden:!1,isRequired:!1},{name:`addressCity`,type:Q.TEXT,hidden:!1,isRequired:!1},{name:`addressPostcode`,type:Q.TEXT,hidden:!1,isRequired:!1},{name:`addressState`,type:Q.TEXT,hidden:!1,isRequired:!1},{name:`addressCountry`,type:Q.TEXT,hidden:!1,isRequired:!1},{name:`addressLat`,type:Q.NUMERIC,hidden:!1,isRequired:!1},{name:`addressLng`,type:Q.NUMERIC,hidden:!1,isRequired:!1}]},$i={type:Q.CURRENCY,properties:[{name:`amountMicros`,type:Q.NUMERIC,hidden:!1,isRequired:!1},{name:`currencyCode`,type:Q.TEXT,hidden:!1,isRequired:!1}]},ea={type:Q.EMAILS,properties:[{name:`primaryEmail`,type:Q.TEXT,hidden:!1,isRequired:!1,isIncludedInUniqueConstraint:!0},{name:`additionalEmails`,type:Q.RAW_JSON,hidden:!1,isRequired:!1}]},ta={type:Q.FULL_NAME,properties:[{name:`firstName`,type:Q.TEXT,hidden:!1,isRequired:!1,isIncludedInUniqueConstraint:!1},{name:`lastName`,type:Q.TEXT,hidden:!1,isRequired:!1,isIncludedInUniqueConstraint:!1}]},na={type:Q.LINKS,properties:[{name:`primaryLinkLabel`,type:Q.TEXT,hidden:!1,isRequired:!1},{name:`primaryLinkUrl`,type:Q.TEXT,hidden:!1,isRequired:!1,isIncludedInUniqueConstraint:!0},{name:`secondaryLinks`,type:Q.RAW_JSON,hidden:!1,isRequired:!1}]},ra={type:Q.PHONES,properties:[{name:`primaryPhoneNumber`,type:Q.TEXT,hidden:!1,isRequired:!1,isIncludedInUniqueConstraint:!0},{name:`primaryPhoneCountryCode`,type:Q.TEXT,hidden:!1,isRequired:!1,isIncludedInUniqueConstraint:!0},{name:`primaryPhoneCallingCode`,type:Q.TEXT,hidden:!1,isRequired:!1,isIncludedInUniqueConstraint:!0},{name:`additionalPhones`,type:Q.RAW_JSON,hidden:!1,isRequired:!1}]},ia={type:Q.RICH_TEXT,properties:[{name:`blocknote`,type:Q.TEXT,hidden:!1,isRequired:!1},{name:`markdown`,type:Q.TEXT,hidden:!1,isRequired:!1}]};mi({blocknote:Hr().nullable().optional(),markdown:Hr().nullable()}),new Map([[Q.LINKS,na],[Q.CURRENCY,$i],[Q.FULL_NAME,ta],[Q.ADDRESS,Qi],[Q.ACTOR,Zi],[Q.EMAILS,ea],[Q.PHONES,ra],[Q.RICH_TEXT,ia]]),Q.RELATION,Q.MORPH_RELATION,Q.FILES,Q.TS_VECTOR,Q.TEXT,Q.ARRAY,Q.BOOLEAN,Q.DATE,Q.DATE_TIME,Q.NUMBER,Q.NUMERIC,Q.RAW_JSON,Q.RICH_TEXT,Q.SELECT,Q.MULTI_SELECT;var aa=`TWENTY_API_URL`,oa=`TWENTY_APP_ACCESS_TOKEN`,$=async({query:e,variables:t,caller:n})=>{let r=process.env[aa],i=process.env[oa];if(!r||!i)throw Error(`${n}() requires the app runtime env vars ${aa} and ${oa}.`);let a=await fetch(`${r}/metadata`,{method:`POST`,headers:{"Content-Type":`application/json`,Authorization:`Bearer ${i}`},body:JSON.stringify({query:e,variables:t})});if(!a.ok)throw Error(`${n}() failed: HTTP ${a.status} ${a.statusText}`);let o=await a.json();if(o.errors&&o.errors.length>0)throw Error(`${n}() failed: ${o.errors.map(e=>e.message).join(`, `)}`);if(!o.data)throw Error(`${n}() failed: response contained no data.`);return o.data},sa=`
|
|
2
21
|
query GetAppConnection($id: ID!) {
|
|
3
22
|
appConnection(id: $id) {
|
|
4
23
|
id
|
|
@@ -12,7 +31,7 @@ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=requi
|
|
|
12
31
|
authFailedAt
|
|
13
32
|
}
|
|
14
33
|
}
|
|
15
|
-
`,
|
|
34
|
+
`,ca=async e=>{let{appConnection:t}=await $({query:sa,variables:{id:e},caller:`getConnection`});if(t.authFailedAt!==null)throw new ne(t.id);return t},la=`
|
|
16
35
|
query ListAppConnections($filter: ListAppConnectionsInput) {
|
|
17
36
|
appConnections(filter: $filter) {
|
|
18
37
|
id
|
|
@@ -26,7 +45,7 @@ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=requi
|
|
|
26
45
|
authFailedAt
|
|
27
46
|
}
|
|
28
47
|
}
|
|
29
|
-
`,
|
|
48
|
+
`,ua=async(e={})=>{let{appConnections:t}=await $({query:la,variables:{filter:e},caller:`listConnections`});return t},da=(e,t)=>{if(t.userWorkspaceId!==null){let n=e.find(e=>e.visibility===`user`&&e.userWorkspaceId===t.userWorkspaceId);if(n)return n}return e.find(e=>e.visibility===`workspace`)??null},fa=`
|
|
30
49
|
mutation RunAgent($input: RunAgentInput!) {
|
|
31
50
|
runAgent(input: $input) {
|
|
32
51
|
result
|
|
@@ -34,7 +53,7 @@ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=requi
|
|
|
34
53
|
success
|
|
35
54
|
}
|
|
36
55
|
}
|
|
37
|
-
`,
|
|
56
|
+
`,pa=async e=>{let{runAgent:t}=await $({query:fa,variables:{input:e},caller:`runAgent`});return t},ma=async e=>{let{enqueueJob:t}=await new r.MetadataApiClient().mutation({enqueueJob:{__args:{input:e},enqueued:!0,logicFunctionUniversalIdentifier:!0}});return t},ha=`
|
|
38
57
|
query GetAppKeyValue($key: String!, $scope: AppKeyValueScope) {
|
|
39
58
|
appKeyValue(key: $key, scope: $scope) {
|
|
40
59
|
key
|
|
@@ -42,7 +61,7 @@ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=requi
|
|
|
42
61
|
scope
|
|
43
62
|
}
|
|
44
63
|
}
|
|
45
|
-
`,
|
|
64
|
+
`,ga=`
|
|
46
65
|
mutation SetAppKeyValue($input: SetAppKeyValueInput!) {
|
|
47
66
|
setAppKeyValue(input: $input) {
|
|
48
67
|
key
|
|
@@ -50,9 +69,9 @@ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=requi
|
|
|
50
69
|
scope
|
|
51
70
|
}
|
|
52
71
|
}
|
|
53
|
-
`,
|
|
72
|
+
`,_a=`
|
|
54
73
|
mutation DeleteAppKeyValue($key: String!, $scope: AppKeyValueScope) {
|
|
55
74
|
deleteAppKeyValue(key: $key, scope: $scope)
|
|
56
75
|
}
|
|
57
|
-
`,
|
|
76
|
+
`,va=`WORKSPACE`,ya={async get(e,t){let{appKeyValue:n}=await $({query:ha,variables:{key:e,scope:t?.scope??va},caller:`kv.get`});return n?.value??null},async set(e,t,n){await $({query:ga,variables:{input:{key:e,value:t,scope:n?.scope??va}},caller:`kv.set`})},async delete(e,t){let{deleteAppKeyValue:n}=await $({query:_a,variables:{key:e,scope:t?.scope??va},caller:`kv.delete`});return n}},ba=class{constructor(e,t){this.__twentyHttpResponse=!0,this.body=e,this.status=t?.status,this.headers=t?.headers}};exports.AppConnectionAuthFailedError=ne,exports.Response=ba,exports.enqueueJob=ma,exports.findConnectionForRequest=da,exports.getConnection=ca,exports.jsonSchemaToInputSchema=c,exports.kv=ya,exports.listConnections=ua,exports.runAgent=pa;
|
|
58
77
|
//# sourceMappingURL=index.cjs.map
|