@stndrds/schema 1.0.0-alpha.329 → 1.0.0-alpha.331
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/all-CWDgBPuS.d.ts +1186 -0
- package/dist/all-DilIWUev.d.mts +1186 -0
- package/dist/capabilities.d.mts +94 -94
- package/dist/capabilities.d.ts +94 -94
- package/dist/capabilities.js +2 -2
- package/dist/capabilities.mjs +2 -2
- package/dist/checkbox-CjnTd8DE.d.ts +11 -0
- package/dist/checkbox-preO352q.d.mts +11 -0
- package/dist/config-BQJJHopR.js +13 -0
- package/dist/config-_sOeudpS.mjs +13 -0
- package/dist/core-397tQy5q.js +2 -0
- package/dist/core-BLHhNykL.mjs +2 -0
- package/dist/date-BL3UHIXs.d.mts +24 -0
- package/dist/date-CxwHkbid.d.ts +24 -0
- package/dist/exceptions-DGCzCc9t.d.mts +1405 -0
- package/dist/exceptions-DGCzCc9t.d.ts +1405 -0
- package/dist/exceptions.d.mts +3 -2
- package/dist/exceptions.d.ts +3 -2
- package/dist/exceptions.js +3 -1
- package/dist/exceptions.mjs +3 -1
- package/dist/index-B7HmBsUS.d.ts +53 -0
- package/dist/{helpers-qMMFwD1I.d.ts → index-BoUwfrDH.d.mts} +172 -145
- package/dist/index-C8M7Amy9.d.mts +254 -0
- package/dist/{helpers-lqSDjgQ1.d.mts → index-DqwNrDSp.d.ts} +172 -145
- package/dist/index-Uwy7CTKo.d.ts +254 -0
- package/dist/index-XtmC-C7J.d.mts +53 -0
- package/dist/index.d.mts +9151 -9136
- package/dist/index.d.ts +9151 -9136
- package/dist/index.js +21 -27
- package/dist/index.mjs +21 -27
- package/dist/number-Ddi_YYfm.d.mts +11 -0
- package/dist/number-GmD5PM5s.d.ts +11 -0
- package/dist/object-DGu0m2Y1.js +4 -0
- package/dist/object-DSRy1coV.mjs +4 -0
- package/dist/phone-BawtTYVi.mjs +2 -0
- package/dist/phone-DVaELsa3.js +2 -0
- package/dist/text-A9AJ1wUO.js +2 -0
- package/dist/text-C8Lb-NFo.mjs +2 -0
- package/dist/text-CxwF5K4k.d.mts +11 -0
- package/dist/text-D6UypN8p.d.ts +11 -0
- package/dist/utils-fXIvFFl6.mjs +2 -0
- package/dist/utils-gY3d9Dwp.js +2 -0
- package/dist/utils.d.mts +3 -2
- package/dist/utils.d.ts +3 -2
- package/dist/utils.js +2 -1
- package/dist/utils.mjs +2 -1
- package/dist/validation/all.d.mts +6 -8
- package/dist/validation/all.d.ts +6 -8
- package/dist/validation/all.js +2 -1
- package/dist/validation/all.mjs +2 -1
- package/dist/validation/complex/currency.d.mts +8 -9
- package/dist/validation/complex/currency.d.ts +8 -9
- package/dist/validation/complex/currency.js +2 -1
- package/dist/validation/complex/currency.mjs +2 -1
- package/dist/validation/complex/location.d.mts +14 -15
- package/dist/validation/complex/location.d.ts +14 -15
- package/dist/validation/complex/location.js +2 -1
- package/dist/validation/complex/location.mjs +2 -1
- package/dist/validation/complex/phone.d.mts +8 -9
- package/dist/validation/complex/phone.d.ts +8 -9
- package/dist/validation/complex/phone.js +2 -1
- package/dist/validation/complex/phone.mjs +2 -1
- package/dist/validation/complex/relation.d.mts +8 -9
- package/dist/validation/complex/relation.d.ts +8 -9
- package/dist/validation/complex/relation.js +2 -1
- package/dist/validation/complex/relation.mjs +2 -1
- package/dist/validation/complex/richtext.d.mts +6 -7
- package/dist/validation/complex/richtext.d.ts +6 -7
- package/dist/validation/complex/richtext.js +2 -1
- package/dist/validation/complex/richtext.mjs +2 -1
- package/dist/validation/complex/select.d.mts +8 -9
- package/dist/validation/complex/select.d.ts +8 -9
- package/dist/validation/complex/select.js +2 -1
- package/dist/validation/complex/select.mjs +2 -1
- package/dist/validation/complex/user.d.mts +6 -7
- package/dist/validation/complex/user.d.ts +6 -7
- package/dist/validation/complex/user.js +2 -1
- package/dist/validation/complex/user.mjs +2 -1
- package/dist/validation/computed/formula.d.mts +6 -7
- package/dist/validation/computed/formula.d.ts +6 -7
- package/dist/validation/computed/formula.js +2 -1
- package/dist/validation/computed/formula.mjs +2 -1
- package/dist/validation/computed/rollup.d.mts +6 -7
- package/dist/validation/computed/rollup.d.ts +6 -7
- package/dist/validation/computed/rollup.js +2 -1
- package/dist/validation/computed/rollup.mjs +2 -1
- package/dist/validation/config/index.d.mts +3 -4
- package/dist/validation/config/index.d.ts +3 -4
- package/dist/validation/config/index.js +2 -1
- package/dist/validation/config/index.mjs +2 -1
- package/dist/validation/core/index.d.mts +2 -17
- package/dist/validation/core/index.d.ts +2 -17
- package/dist/validation/core/index.js +2 -1
- package/dist/validation/core/index.mjs +2 -1
- package/dist/validation/object/index.d.mts +2 -29
- package/dist/validation/object/index.d.ts +2 -29
- package/dist/validation/object/index.js +2 -1
- package/dist/validation/object/index.mjs +2 -1
- package/dist/validation/primitives/checkbox.d.mts +2 -10
- package/dist/validation/primitives/checkbox.d.ts +2 -10
- package/dist/validation/primitives/checkbox.js +2 -1
- package/dist/validation/primitives/checkbox.mjs +2 -1
- package/dist/validation/primitives/date.d.mts +2 -23
- package/dist/validation/primitives/date.d.ts +2 -23
- package/dist/validation/primitives/date.js +2 -1
- package/dist/validation/primitives/date.mjs +2 -1
- package/dist/validation/primitives/number.d.mts +2 -10
- package/dist/validation/primitives/number.d.ts +2 -10
- package/dist/validation/primitives/number.js +2 -1
- package/dist/validation/primitives/number.mjs +2 -1
- package/dist/validation/primitives/text.d.mts +2 -10
- package/dist/validation/primitives/text.d.ts +2 -10
- package/dist/validation/primitives/text.js +2 -1
- package/dist/validation/primitives/text.mjs +2 -1
- package/dist/view-config.schema-B4AkqLKQ.mjs +2 -0
- package/dist/view-config.schema-to6p1m8L.js +2 -0
- package/package.json +7 -6
- package/dist/all-BgP-bB0i.d.mts +0 -1178
- package/dist/all-Cq8ZMfM4.d.ts +0 -1178
- package/dist/attributes-Cv6IP8-a.d.mts +0 -1365
- package/dist/attributes-Cv6IP8-a.d.ts +0 -1365
- package/dist/chunk-23KPS33D.js +0 -2
- package/dist/chunk-2M4YXNYZ.js +0 -15
- package/dist/chunk-47KVYDKG.js +0 -2
- package/dist/chunk-4OTKOCGB.mjs +0 -2
- package/dist/chunk-4VCADZK4.mjs +0 -2
- package/dist/chunk-53RAH3XB.mjs +0 -2
- package/dist/chunk-DPD6ZWL2.js +0 -2
- package/dist/chunk-EZCWO4XV.mjs +0 -15
- package/dist/chunk-GKXTXH4Y.mjs +0 -2
- package/dist/chunk-GXSNLYRR.js +0 -2
- package/dist/chunk-IBM4ID4Y.js +0 -6
- package/dist/chunk-JFSQ24XR.js +0 -2
- package/dist/chunk-JOS2XMXY.js +0 -2
- package/dist/chunk-JSKLP4GI.js +0 -12
- package/dist/chunk-JVLH3DVZ.js +0 -2
- package/dist/chunk-KG2ADZG6.mjs +0 -2
- package/dist/chunk-KLR22JMC.js +0 -2
- package/dist/chunk-KSPJP74K.mjs +0 -2
- package/dist/chunk-KYPEBOPW.mjs +0 -2
- package/dist/chunk-LB4TNMZU.mjs +0 -2
- package/dist/chunk-LSCBR4VS.js +0 -2
- package/dist/chunk-LWSOKXPF.js +0 -2
- package/dist/chunk-O34B5KOW.mjs +0 -2
- package/dist/chunk-PFO7NWQW.mjs +0 -2
- package/dist/chunk-Q7TQCRSD.mjs +0 -2
- package/dist/chunk-RTHLB6T6.js +0 -2
- package/dist/chunk-SLYRQ72J.js +0 -2
- package/dist/chunk-UKFOBZX2.js +0 -2
- package/dist/chunk-UXISKZ5Y.js +0 -2
- package/dist/chunk-VKFLXFPP.mjs +0 -2
- package/dist/chunk-WMQRTFOP.mjs +0 -2
- package/dist/chunk-XAVRKIBE.mjs +0 -6
- package/dist/chunk-XHEBV2HE.js +0 -2
- package/dist/chunk-XMQV2WFY.mjs +0 -2
- package/dist/chunk-XRDP2Y4J.mjs +0 -2
- package/dist/chunk-XRWRECDA.mjs +0 -12
- package/dist/chunk-XUAP7KWK.js +0 -2
- package/dist/chunk-XXTKNIBK.js +0 -2
- package/dist/chunk-YIXNAWH6.mjs +0 -2
- package/dist/chunk-YJSVWV3Z.mjs +0 -2
- package/dist/index-Comy7znP.d.ts +0 -252
- package/dist/index-D4XlMkLV.d.mts +0 -252
- package/dist/types-C5Bqalr9.d.ts +0 -38
- package/dist/types-CILLmEj-.d.mts +0 -38
package/dist/chunk-23KPS33D.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
'use strict';var chunkJFSQ24XR_js=require('./chunk-JFSQ24XR.js'),chunkDPD6ZWL2_js=require('./chunk-DPD6ZWL2.js'),zod=require('zod');/*! © 2025-2026 AND YOU CREATE SAS (RCS Paris 940 190 614). Proprietary — see LICENSE (Standards SDK License 1.0). */
|
|
2
|
-
function m(e,s=chunkJFSQ24XR_js.a){let t=zod.z.guid({message:s.invalidId(e)});return e.multiple?zod.z.array(t):t}chunkDPD6ZWL2_js.a(m,"createUserValidator");exports.a=m;
|
package/dist/chunk-2M4YXNYZ.js
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
'use strict';var chunkJSKLP4GI_js=require('./chunk-JSKLP4GI.js'),chunkDPD6ZWL2_js=require('./chunk-DPD6ZWL2.js'),I=require('zod'),constants=require('@stndrds/constants');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var I__default=/*#__PURE__*/_interopDefault(I);/*! © 2025-2026 AND YOU CREATE SAS (RCS Paris 940 190 614). Proprietary — see LICENSE (Standards SDK License 1.0). */
|
|
2
|
-
var E=["skill","memory","drives","artifact","meeting"];function it(e){return E.includes(e)}chunkDPD6ZWL2_js.a(it,"isNativeObjectName");var A=["workspace","private"],pt=["all",...A];function lt(e){if(typeof e=="string"&&A.includes(e))return e;throw new chunkJSKLP4GI_js.h(`visibility must be one of: ${A.join(", ")} (received: ${String(e)})`,[])}chunkDPD6ZWL2_js.a(lt,"parseResourceVisibility");var Se=["id","createdAt","updatedAt","createdBy","lastUpdatedBy","visibility","ownedBy"],h=[...Se,"objectId","label","embeddingText","values","metadata","deletedAt","deletedBy","schemaVersion","owned_by"],dt=E;var ve=new Set(constants.ICONS),U=/^[a-zA-Z_][a-zA-Z0-9_]*$/,Ee=/^[a-z][a-z0-9-]*$/,m=63,W=128,Ae=I__default.default.string().min(1,"Object name cannot be empty").max(63,"Object name is too long (max 63 characters)").regex(/^[a-z][a-z0-9-]*$/,{message:`Invalid object name format.
|
|
3
|
-
Name must be in kebab-case (slug format):
|
|
4
|
-
\u2705 Valid: 'products', 'user-profiles', 'order-items'
|
|
5
|
-
\u274C Invalid: 'Products', 'userProfiles', 'user_profiles'`});function xt(e){try{Ae.parse(e);}catch(t){throw t instanceof I__default.default.ZodError?new chunkJSKLP4GI_js.b(t.issues[0].message,chunkJSKLP4GI_js.a.INVALID_OBJECT_NAME):t}}chunkDPD6ZWL2_js.a(xt,"validateObjectName");function St(e){if(!e||e.length===0)throw new chunkJSKLP4GI_js.h("View name cannot be empty",[{path:["name"],message:"View name cannot be empty"}]);if(e.length>m)throw new chunkJSKLP4GI_js.h("View name is too long",[{path:["name"],message:`View name is too long (max ${m} characters)`}]);if(!Ee.test(e))throw new chunkJSKLP4GI_js.h("Invalid view name format",[{path:["name"],message:"View name must be in kebab-case (e.g., 'detail', 'list-view')"}])}chunkDPD6ZWL2_js.a(St,"validateViewName");function wt(e,t,n){let o=new Set;for(let s of e){let a=t(s);if(o.has(a))throw n(a);o.add(a);}}chunkDPD6ZWL2_js.a(wt,"assertUniqueBy");var Z=I__default.default.string().min(1,"Attribute name cannot be empty").max(m,`Attribute name is too long (max ${m} characters)`).regex(U,{message:`Invalid attribute name format.
|
|
6
|
-
Name must be a valid variable identifier:
|
|
7
|
-
\u2705 Valid: 'firstName', 'first_name', 'FirstName', 'FIRST_NAME'
|
|
8
|
-
\u274C Invalid: 'first-name', 'first name', '123name', 'first.name'`}).refine(e=>!h.includes(e),{message:`This is a reserved attribute name. Reserved names: ${h.join(", ")}`});function vt(e){if(!e||e.length===0)throw new Error("[AttributeBuilder] Attribute name cannot be empty");if(e.length>m)throw new Error(`[AttributeBuilder] Attribute name is too long (max ${m} characters)`);if(!U.test(e))throw new Error(`[AttributeBuilder] Invalid attribute name format.
|
|
9
|
-
Name must be a valid variable identifier:
|
|
10
|
-
\u2705 Valid: 'firstName', 'first_name', 'FirstName', 'FIRST_NAME'
|
|
11
|
-
\u274C Invalid: 'first-name', 'first name', '123name', 'first.name'`);if(h.includes(e))throw new Error(`[AttributeBuilder] "${e}" is a reserved name and cannot be used as an attribute name.
|
|
12
|
-
Reserved names: ${h.join(", ")}`)}chunkDPD6ZWL2_js.a(vt,"validateAttributeName");function Et(e){if(!e||e.length===0)throw new Error("[AttributeBuilder] Attribute label cannot be empty");if(e.length>W)throw new Error(`[AttributeBuilder] Attribute label is too long (max ${W} characters)`)}chunkDPD6ZWL2_js.a(Et,"validateLabel");function At(e,t){if(!ve.has(e))throw new Error(`[AttributeBuilder] Invalid icon "${e}" in ${t}.
|
|
13
|
-
Icon must be one of the predefined icons from @stndrds/constants.`)}chunkDPD6ZWL2_js.a(At,"validateIconName");function It(e,t){let n=new Set;for(let o of t){if(!o.value?.trim())throw new Error(`[AttributeBuilder] Option in "${e}" has an empty or missing value.`);if(!o.label?.trim())throw new Error(`[AttributeBuilder] Option "${o.value}" in "${e}" has an empty or missing label.`);if(n.has(o.value))throw new Error(`[AttributeBuilder] Duplicate option value "${o.value}" in "${e}".`);n.add(o.value);}for(let o of t){if(o.inverse===void 0)continue;let s=t.find(a=>a.value===o.inverse);if(!s)throw new Error(`[AttributeBuilder] Option "${o.value}" in "${e}" has inverse "${o.inverse}" which does not match any option value.`);if(s.inverse!==o.value)throw new Error(`[AttributeBuilder] Inverse mismatch in "${e}": "${o.value}" points to "${o.inverse}", but "${o.inverse}" points to "${s.inverse??"(none)"}". Inverse pairs must be symmetric.`)}}chunkDPD6ZWL2_js.a(It,"validateOptions");var k=class k extends Error{constructor(t){super(t),this.name="ComputedFormulaParseError";}};chunkDPD6ZWL2_js.a(k,"ComputedFormulaParseError");var p=k;function Y(e){let t=new T(Ie(e)),n=t.parseExpression();return t.expectEnd(),n}chunkDPD6ZWL2_js.a(Y,"parseComputedFormula");function Ie(e){let t=[],n=0;for(;n<e.length;){let o=e[n];if(o===" "||o===" "||o===`
|
|
14
|
-
`||o==="\r"){n+=1;continue}if(o==='"'||o==="'"){let a=Te(e,n,o);t.push({kind:"string",value:a.value,position:n}),n=a.nextIndex;continue}if(y(o)){let a=Re(e,n);t.push({kind:"number",value:a.value,position:n}),n=a.nextIndex;continue}if(Ce(o)){let a=Oe(e,n),u=a.value.toLowerCase();u==="true"?t.push({kind:"boolean",value:true,position:n}):u==="false"?t.push({kind:"boolean",value:false,position:n}):u==="null"?t.push({kind:"null",position:n}):t.push({kind:"identifier",value:a.value,position:n}),n=a.nextIndex;continue}let s=e.slice(n,n+2);if(s===">="||s==="<="||s==="=="||s==="!="){t.push({kind:"operator",value:s,position:n}),n+=2;continue}if(o===">"||o==="<"||o==="+"||o==="-"||o==="*"||o==="/"){t.push({kind:"operator",value:o,position:n}),n+=1;continue}if(o==="("||o===")"||o===","||o==="."){t.push({kind:"punctuation",value:o,position:n}),n+=1;continue}throw new p(`Unexpected character "${o}" at position ${n}`)}return t}chunkDPD6ZWL2_js.a(Ie,"tokenize");function Te(e,t,n='"'){let o="",s=t+1;for(;s<e.length;){let a=e[s];if(a===n)return {value:o,nextIndex:s+1};if(a==="\\"){let u=e[s+1];if(u===void 0)throw new p(`Unterminated string literal at position ${s}`);o+=ke(u,s),s+=2;continue}o+=a,s+=1;}throw new p(`Unterminated string literal at position ${t}`)}chunkDPD6ZWL2_js.a(Te,"scanString");function ke(e,t){switch(e){case '"':case "\\":return e;case "n":return `
|
|
15
|
-
`;case "r":return "\r";case "t":return " ";default:throw new p(`Unknown escape sequence "\\${e}" at position ${t}`)}}chunkDPD6ZWL2_js.a(ke,"decodeEscape");function Re(e,t){let n=t;for(;n<e.length&&y(e[n]);)n+=1;if(e[n]==="."){let a=n;if(n+=1,!y(e[n]))throw new p(`Invalid number literal at position ${a}`);for(;n<e.length&&y(e[n]);)n+=1;}let o=e.slice(t,n),s=Number(o);if(!Number.isFinite(s))throw new p(`Invalid number literal "${o}"`);return {value:s,nextIndex:n}}chunkDPD6ZWL2_js.a(Re,"scanNumber");function Oe(e,t){let n=t+1;for(;n<e.length&&Pe(e[n]);)n+=1;return {value:e.slice(t,n),nextIndex:n}}chunkDPD6ZWL2_js.a(Oe,"scanIdentifier");function y(e){return e!==void 0&&e>="0"&&e<="9"}chunkDPD6ZWL2_js.a(y,"isDigit");function Ce(e){return e!==void 0&&/[A-Za-z_]/.test(e)}chunkDPD6ZWL2_js.a(Ce,"isIdentifierStart");function Pe(e){return e!==void 0&&/[A-Za-z0-9_]/.test(e)}chunkDPD6ZWL2_js.a(Pe,"isIdentifierPart");var R=class R{constructor(t){this.tokens=t;this.position=0;}parseExpression(){return this.parseBinaryExpression(0)}expectEnd(){let t=this.peek();if(t!==void 0)throw new p(`Unexpected token ${_e(t)} at position ${t.position}`)}parseBinaryExpression(t){let n=this.parsePrimary();for(;;){let o=this.peek();if(o?.kind!=="operator")return n;let s=Ne(o.value);if(s<t)return n;let a=o.value;this.consume();let u=this.parseBinaryExpression(s+1);n={kind:"binary",operator:a,left:n,right:u};}}parsePrimary(){let t=this.consume();if(t===void 0)throw new p("Unexpected end of expression");switch(t.kind){case "string":case "number":case "boolean":return {kind:"literal",value:t.value};case "null":return {kind:"literal",value:null};case "identifier":return this.parseIdentifier(t.value);case "punctuation":if(t.value==="("){let n=this.parseExpression();return this.expectPunctuation(")"),n}break;case "operator":if(t.value==="-"){let n=this.consume();if(n?.kind==="number")return {kind:"literal",value:-n.value}}break}throw new p(`Expected literal, path, call, or parenthesized expression at position ${t.position}`)}parseIdentifier(t){if(this.matchPunctuation("(")){let o=[];if(!this.matchPunctuation(")")){do o.push(this.parseExpression());while(this.matchPunctuation(","));this.expectPunctuation(")");}return {kind:"call",functionName:t.toLowerCase(),args:o}}let n=[t];for(;this.matchPunctuation(".");){let o=this.consume();if(o?.kind!=="identifier"){let s=o?.position??this.previousPosition();throw new p(`Expected attribute name after path separator at position ${s}`)}n.push(o.value);}return {kind:"path",parts:n}}expectPunctuation(t){if(!this.matchPunctuation(t)){let o=this.peek()?.position??this.previousPosition();throw new p(`Expected "${t}" at position ${o}`)}}matchPunctuation(t){let n=this.peek();return n?.kind==="punctuation"&&n.value===t?(this.consume(),true):false}peek(){return this.tokens[this.position]}consume(){let t=this.tokens[this.position];return this.position+=1,t}previousPosition(){return this.tokens[this.position-1]?.position??0}};chunkDPD6ZWL2_js.a(R,"Parser");var T=R;function _e(e){switch(e.kind){case "identifier":case "number":case "string":case "boolean":case "operator":case "punctuation":return `"${String(e.value)}"`;case "null":return '"null"';default:return e}}chunkDPD6ZWL2_js.a(_e,"describeToken");function Ne(e){switch(e){case "*":case "/":return 3;case "+":case "-":return 2;case ">":case "<":case ">=":case "<=":case "==":case "!=":return 1;default:return e}}chunkDPD6ZWL2_js.a(Ne,"getOperatorPrecedence");var x={attributesPerObject:300,tabsPerView:24,groupsPerFormTab:12,fieldsPerGroup:60,fieldsPerFormTab:150,columnsPerTab:50,optionsPerAttribute:200,sidePanelAttributes:100,sidePanelPanes:20,filterRulesPerTab:50,sortsPerTab:20,emailAttributesPerTab:30,objectsPerPlan:20,mutationsPerPlan:500,planBytes:524288,historyDefault:20,historyMax:50,iconQueries:5,iconResults:20};var Ve=Object.keys(constants.COLORS),Be=new Set(constants.ICONS),O=I.z.enum(Ve).describe("A color id from the palette"),C=I.z.string().superRefine((e,t)=>{Be.has(e)||t.addIssue({code:"custom",message:"Invalid icon name"});}).transform(e=>e);var c=I.z.object({placeholder:I.z.string().optional(),description:I.z.string().optional(),defaultValue:I.z.unknown().optional(),icon:I.z.string().optional(),order:I.z.number().int().optional(),hidden:I.z.boolean().optional(),archived:I.z.boolean().optional(),deprecated:I.z.boolean().optional(),metadata:I.z.record(I.z.string(),I.z.unknown()).optional()}),q=["placeholder","description","defaultValue","icon","order","hidden","archived","deprecated","metadata"];function J(e,t,n=[]){let o=new Set(n);return chunkDPD6ZWL2_js.a(function(a,u,f,g=[]){let b=e[a];if(!(b===void 0||u===void 0))for(let d of Object.keys(u))b.has(d)||o.has(d)||f.addIssue({code:"custom",path:[...g,d],message:`"${d}" is not a ${a} ${t}; keys of ${a}: ${[...b].join(", ")}`});},"refuse")}chunkDPD6ZWL2_js.a(J,"refuseForeignKeys");var P=I.z.object({value:I.z.string().min(1).describe("Stored value"),label:I.z.string().min(1).describe("Label people see"),description:I.z.string().describe("Extra context").optional(),inverse:I.z.string().describe("Paired option's value (symmetric)").optional(),archived:I.z.boolean().describe("Hides without deleting").optional()}),_=I.z.enum(["idle","in_progress","finished"]).describe("Workflow stage"),N=P.extend({color:O}).strict(),X=N,Q=P.extend({color:O,group:_}).strict(),ee=P.extend({color:I.z.string().optional().describe("A color id"),group:_.optional()}).strict(),j=I.z.array(ee).min(1).refine(e=>{let t=e.map(n=>n.value);return new Set(t).size===t.length},{message:"Duplicate option values are not allowed"});function M(e){return I.z.array(e).min(1).max(x.optionsPerAttribute).refine(t=>{let n=t.map(o=>o.value);return new Set(n).size===n.length},{message:"Duplicate option values are not allowed"})}chunkDPD6ZWL2_js.a(M,"writeOptionsArraySchema");var te=M(N),re=M(X),ne=M(Q),Fe=I.z.object({object:I.z.string().min(1).describe("Target object"),displayTemplate:I.z.string().optional().describe("Linked record label template"),filter:I.z.record(I.z.string(),I.z.unknown()).optional().describe("Restricts linkable records")}),$e=I.z.object({object:I.z.string().min(1).describe("Other side's object"),attribute:I.z.string().min(1).describe("Other side's attribute"),cardinality:I.z.enum(["one","many"]).optional().describe("Other side's cardinality"),label:I.z.string().min(1).optional().describe("Other side's label"),storageOwner:I.z.boolean().optional().describe("Owns the join storage")}),oe=I.z.object({objectName:I.z.string().min(1).describe("API name of the object whose options are mirrored"),attributeName:I.z.string().min(1).describe("API name of the select/status attribute to mirror options from"),attributeId:I.z.string().optional().describe("Id of the source attribute, resolved by the server")}),ie=c.extend({multiline:I.z.boolean().describe("Renders as a multi-line textarea").optional(),minLength:I.z.number().int().min(0).describe("Minimum character count").optional(),maxLength:I.z.number().int().min(1).describe("Maximum character count").optional(),pattern:I.z.string().describe("Regular expression the value must match").optional(),format:I.z.enum(["email","url","slug"]).describe("Validates and renders as this format").optional()}),ze=c,se=c.extend({renderAs:I.z.enum(["number","rating"]).describe("Plain number or a star rating").optional(),min:I.z.number().describe("Minimum allowed value").optional(),max:I.z.number().describe("Maximum allowed value").optional(),unit:I.z.enum(["integer","decimal","percentage"]).describe("How the value is stored and rendered").optional(),decimals:I.z.number().int().min(0).max(10).describe("Decimal places shown").optional()}),ae=c,ce=c.extend({dateFormat:I.z.enum(["short","long","full","relative"]).describe("How the date is rendered").optional(),minDate:I.z.string().describe("Earliest allowed date (ISO)").optional(),maxDate:I.z.string().describe("Latest allowed date (ISO)").optional(),includeTime:I.z.boolean().describe("Also captures a time of day").optional(),endDate:I.z.boolean().describe("Paired with another date attribute as a range's end").optional(),timeFormat:I.z.enum(["12h","24h"]).describe("Clock format when a time is included").optional()}),ue=c.extend({defaultCountryCode:I.z.string().length(3).describe("ISO country code preselected in the dialer").optional()}),pe=c.extend({defaultCurrency:I.z.string().length(3).describe("ISO currency code preselected for new values").optional(),allowedCurrencies:I.z.array(I.z.string().length(3)).describe("ISO currency codes a value may use; any currency when omitted").optional(),allowNegative:I.z.boolean().describe("Whether a negative amount is accepted").optional()}),V=c.extend({options:j.describe("The workflow statuses, in order")}),le=c.extend({granularity:I.z.enum(["full","address","city","state","country","coordinates"]).describe("How precise a location must be captured").optional(),defaultCountry:I.z.string().length(3).describe("ISO country code preselected for new values").optional(),allowedCountries:I.z.array(I.z.string().length(3)).describe("ISO country codes a value may use; any country when omitted").optional()}),B=c.extend({options:j.describe("Options"),renderAs:I.z.literal("badges").optional().describe("Renders the chosen option as a colored badge")}),F=c.extend({options:j.describe("Options"),renderAs:I.z.literal("badges").optional().describe("Renders the chosen options as colored badges")}),Le=c.extend({types:I.z.array(I.z.enum(["user","agent"])).min(1).optional().describe("Which kinds of actor can be picked; both when omitted"),multiple:I.z.boolean().optional().describe("Whether more than one actor can be picked")}),S={name:Z.describe("Property API name"),label:I.z.string().min(1).describe("Label people see"),required:I.z.boolean().describe("Required on every edge").optional()},De={id:I.z.string().optional(),objectId:I.z.string().optional(),system:I.z.boolean().optional(),unique:I.z.boolean().optional()},We=Object.fromEntries(q.map(e=>[e,true])),w=["text","number","checkbox","date","phone","currency","location"],de=[...w,"select","multiselect","status"],me={text:ie,number:se,checkbox:ae,date:ce,phone:ue,currency:pe,location:le,select:B,multiselect:F,status:V},Ue={...me,select:B.extend({options:te.describe("Options")}),multiselect:F.extend({options:re.describe("Options")}),status:V.extend({options:ne.describe("Statuses")})},$=chunkDPD6ZWL2_js.a(e=>Ue[e].omit(We).shape,"propertyWireConfigShapeFor"),Ze=chunkDPD6ZWL2_js.a(e=>I.z.object({...S,...De,type:I.z.literal(e).describe("Property type"),...me[e].shape}).strip(),"storedPropertyMember"),be=I.z.discriminatedUnion("type",de.map(Ze)),z=I.z.object({definitions:I.z.array(be).min(1).max(x.optionsPerAttribute).describe("Edge properties")}).strip().describe("Properties carried by the edge itself (role, share, since\u2026), never a third object"),Ye=Object.fromEntries(de.map(e=>[e,new Set(Object.keys($(e)))])),He=J(Ye,"property key",[...Object.keys(S),"type"]);function Ge(e,t){He(e.type,e,t);}chunkDPD6ZWL2_js.a(Ge,"refuseForeignPropertyKeys");var Ke=w.reduce((e,t)=>(Object.assign(e,$(t)),e),{}),G=chunkDPD6ZWL2_js.a(e=>I.z.object({...S,type:e.length===1?I.z.literal(e[0]).describe("Property type"):I.z.enum(e).describe("Property type"),...$(e[0])}).strict(),"optionPropertyWireMember"),he=I.z.discriminatedUnion("type",[G(["select","multiselect"]),G(["status"]),I.z.object({...S,type:I.z.enum(w).describe("Property type"),...Ke}).strict().superRefine(Ge)]),qe=I.z.object({definitions:I.z.array(he).min(1).max(x.optionsPerAttribute).describe("Edge properties")}).strict().describe("Properties carried by the edge itself (role, share, since\u2026), never a third object"),Je=c.extend({targets:I.z.array(Fe).min(1).describe("Target object(s)"),cardinality:I.z.enum(["one","many"]).describe("one or many"),maxItems:I.z.number().int().min(1).optional().describe("Max linked records"),bilateral:$e.optional().describe("Syncs the other side's attribute"),properties:z.optional()}),Xe=c.extend({expression:I.z.string().min(1).superRefine((e,t)=>{try{Y(e);}catch(n){t.addIssue({code:I.z.ZodIssueCode.custom,message:n instanceof Error?n.message:"Invalid formula expression"});}}).describe("The formula expression, compiled against this object's attributes"),returnType:I.z.enum(["text","number","boolean","date","select","multiselect"]).describe("The formula's result type"),decimals:I.z.number().int().min(0).max(10).optional().describe("Decimal places shown for a number result"),allowRelations:I.z.boolean().optional().describe("Whether the expression may read across a relation"),optionsSource:oe.optional().describe("Mirrors an option set")}),Qe=c.extend({relationAttribute:I.z.string().min(1).optional().describe("API name of the relation this rollup aggregates through"),relationPath:I.z.string().optional().describe("Not supported yet \u2014 single-hop only"),targetAttribute:I.z.string().min(1).describe("API name of the attribute aggregated on the relation's target object"),function:I.z.enum(["sum","avg","earliest","latest","count","countValues","countUniqueValues","countEmpty","percentEmpty","percentNotEmpty","original"]).describe("The aggregation applied across the linked records"),decimals:I.z.number().int().min(0).max(10).optional().describe("Decimal places shown for a numeric result"),targetAttributeType:I.z.string().optional().describe("Server-set"),targetAttributeOptions:I.z.array(ee).optional().describe("Server-set"),targetCurrencyCode:I.z.string().length(3).optional().describe("Server-set"),optionsSource:oe.optional().describe("Mirrors an option set")}),et=c.extend({properties:z.optional(),accepts:I.z.array(I.z.string().min(1)).optional().describe("MIME prefixes or globs a file must match (e.g. `image/*`, `*.pdf`)"),maxFileSize:I.z.number().int().min(1).optional().describe("Maximum file size in bytes")}),fe={text:ie,richtext:ze,number:se,checkbox:ae,date:ce,phone:ue,currency:pe,status:V,location:le,select:B,multiselect:F,user:Le,relation:Je,formula:Xe,rollup:Qe,document:et};function v(e){let t=fe[e];if(!t)throw new chunkJSKLP4GI_js.h(`Unsupported attribute type: ${e}`,[]);return t}chunkDPD6ZWL2_js.a(v,"getAttributeConfigSchema");function tt(e,t){return v(e).strip().parse(t)}chunkDPD6ZWL2_js.a(tt,"parseAttributeConfig");function ge(e){let t=v(e).extend({icon:C.optional()});switch(e){case "select":return t.extend({options:te.describe("Options")});case "multiselect":return t.extend({options:re.describe("Options")});case "status":return t.extend({options:ne.describe("Statuses")});default:return t}}chunkDPD6ZWL2_js.a(ge,"getAttributeConfigWriteSchema");function ye(e){return chunkJSKLP4GI_js.h.fromZodErrors(e.map(t=>({path:t.path.map(n=>typeof n=="symbol"?String(n):n),message:t.message})))}chunkDPD6ZWL2_js.a(ye,"validationErrorFromIssues");function xe(e,t){let n=ge(e).strip().safeParse(t);if(!n.success)throw ye(n.error.issues);return n.data}chunkDPD6ZWL2_js.a(xe,"parseWriteSchema");function rt(e,t){return xe(e,t)}chunkDPD6ZWL2_js.a(rt,"parseAttributeConfigForCreate");function nt(e){if(!Object.prototype.hasOwnProperty.call(e,"icon"))return;let t=C.optional().safeParse(e.icon);if(!t.success)throw chunkJSKLP4GI_js.h.fromZodErrors(t.error.issues.map(n=>({path:["icon",...n.path.map(o=>typeof o=="symbol"?String(o):o)],message:n.message})))}chunkDPD6ZWL2_js.a(nt,"validatePatchedIcon");function K(e){return e==="select"||e==="multiselect"||e==="status"}chunkDPD6ZWL2_js.a(K,"isSelectLike");function ot(e,t){let n=Object.prototype.hasOwnProperty.call(t,"options"),o=Object.prototype.hasOwnProperty.call(t,"icon"),s={...e,...t};if(nt(t),n){let{icon:g,...b}=s,d=xe(e.type,o?s:b);return !o&&g!==void 0&&(d.icon=g),d}let a=e.options;K(e.type)&&(s.options=[{value:"__legacy__",label:"__legacy__"}]);let u=v(e.type).strip().safeParse(s);if(!u.success)throw ye(u.error.issues);let f=u.data;return K(e.type)&&(f.options=a),f}chunkDPD6ZWL2_js.a(ot,"parseAttributeConfigForUpdate");exports.A=X;exports.B=Q;exports.C=w;exports.D=be;exports.E=z;exports.F=he;exports.G=qe;exports.H=fe;exports.I=v;exports.J=tt;exports.K=ge;exports.L=rt;exports.M=ot;exports.a=E;exports.b=it;exports.c=A;exports.d=pt;exports.e=lt;exports.f=Se;exports.g=h;exports.h=dt;exports.i=Ae;exports.j=xt;exports.k=St;exports.l=wt;exports.m=Z;exports.n=vt;exports.o=Et;exports.p=At;exports.q=It;exports.r=x;exports.s=O;exports.t=C;exports.u=p;exports.v=Y;exports.w=q;exports.x=J;exports.y=_;exports.z=N;
|
package/dist/chunk-47KVYDKG.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
'use strict';var chunkJFSQ24XR_js=require('./chunk-JFSQ24XR.js'),chunkDPD6ZWL2_js=require('./chunk-DPD6ZWL2.js'),zod=require('zod');/*! © 2025-2026 AND YOU CREATE SAS (RCS Paris 940 190 614). Proprietary — see LICENSE (Standards SDK License 1.0). */
|
|
2
|
-
function b(r,a=chunkJFSQ24XR_js.a){return zod.z.boolean()}chunkDPD6ZWL2_js.a(b,"createCheckboxValidator");exports.a=b;
|
package/dist/chunk-4OTKOCGB.mjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import {a}from'./chunk-KSPJP74K.mjs';/*! © 2025-2026 AND YOU CREATE SAS (RCS Paris 940 190 614). Proprietary — see LICENSE (Standards SDK License 1.0). */
|
|
2
|
-
var l={required:a(e=>`${e.label} is required`,"required"),invalidType:a((e,t)=>`${e.label} must be a ${t}`,"invalidType"),minLength:a((e,t)=>`${e.label} must be at least ${t} characters`,"minLength"),maxLength:a((e,t)=>`${e.label} must be at most ${t} characters`,"maxLength"),invalidPattern:a(e=>`${e.label} format is invalid`,"invalidPattern"),minValue:a((e,t)=>`${e.label} must be at least ${t}`,"minValue"),maxValue:a((e,t)=>`${e.label} must be at most ${t}`,"maxValue"),mustBeInteger:a(e=>`${e.label} must be an integer`,"mustBeInteger"),invalidDate:a(e=>`${e.label} must be a valid date`,"invalidDate"),invalidOption:a((e,t)=>`${e.label} must be one of: ${t.join(", ")}`,"invalidOption"),invalidId:a(e=>`${e.label} must be a valid ID`,"invalidId"),maxItems:a((e,t)=>`${e.label} must have at most ${t} item${t>1?"s":""}`,"maxItems"),invalidRichtext:a(e=>`${e.label} must be valid rich text content`,"invalidRichtext"),invalidPhone:a(e=>`${e.label} must be a valid phone number`,"invalidPhone"),invalidCurrency:a(e=>`${e.label} must be a valid currency value`,"invalidCurrency"),invalidLocation:a(e=>`${e.label} must be a valid location`,"invalidLocation")};function i(e){return e.issues.map(t=>({path:t.path.map(String),message:t.message}))}a(i,"formatZodErrors");export{l as a,i as b};
|
package/dist/chunk-4VCADZK4.mjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import {a as a$1}from'./chunk-4OTKOCGB.mjs';import {a}from'./chunk-KSPJP74K.mjs';import {z}from'zod';/*! © 2025-2026 AND YOU CREATE SAS (RCS Paris 940 190 614). Proprietary — see LICENSE (Standards SDK License 1.0). */
|
|
2
|
-
function b(r,a=a$1){return z.boolean()}a(b,"createCheckboxValidator");export{b as a};
|
package/dist/chunk-53RAH3XB.mjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import {r,t,d}from'./chunk-EZCWO4XV.mjs';import {h}from'./chunk-XRWRECDA.mjs';import {a}from'./chunk-KSPJP74K.mjs';import {z as z$1}from'zod';/*! © 2025-2026 AND YOU CREATE SAS (RCS Paris 940 190 614). Proprietary — see LICENSE (Standards SDK License 1.0). */
|
|
2
|
-
var Se={createdAt:"createdAt",updatedAt:"updatedAt",createdBy:"createdBy",lastUpdatedBy:"lastUpdatedBy",attachments:"attachments"};function qt(e){return Se[e]}a(qt,"getSystemAttributeI18nKey");var Re={createdAt:{id:"system:createdAt",name:"createdAt",label:"Created time",type:"date",required:false,system:true,icon:"clock-circle",description:"When this record was created"},updatedAt:{id:"system:updatedAt",name:"updatedAt",label:"Last edited time",type:"date",required:false,system:true,icon:"clock-circle",description:"When this record was last modified"},createdBy:{id:"system:createdBy",name:"createdBy",label:"Created by",type:"user",required:false,system:true,multiple:false,icon:"user",description:"Actor who created this record"},lastUpdatedBy:{id:"system:lastUpdatedBy",name:"lastUpdatedBy",label:"Last edited by",type:"user",required:false,system:true,multiple:false,icon:"user",description:"Actor who last modified this record"},attachments:{id:"system:attachments",name:"attachments",label:"Attachments",type:"document",required:false,system:true,hidden:true,icon:"paperclip",description:"Free-form document attachments"}};function Bt(){return Object.values(Re)}a(Bt,"getSystemAttributeList");function $(e){return e.id?.startsWith("system:")??false}a($,"isManagedSystemAttribute");var K=["is","is_not","contains","not_contains","starts_with","ends_with","is_empty","is_not_empty"],Y=["is","is_not","less_than","greater_than","less_or_equal","greater_or_equal","is_empty","is_not_empty"],Oe=["is"],Te=["is","is_not","less_than","greater_than","less_or_equal","greater_or_equal","is_within","on_day_month","is_empty","is_not_empty"],z=["is","is_not","any_of","none_of","is_empty","is_not_empty"],Ee=["any_of","none_of","is_empty","is_not_empty"],W=["is","is_not","any_of","none_of","is_empty","is_not_empty"],xe=["is_empty","is_not_empty"],Fe=["is","is_not","less_than","greater_than","less_or_equal","greater_or_equal","contains","not_contains","is_empty","is_not_empty"],x=["city","postalCode","country"];function F(e){return x.includes(e)}a(F,"isLocationFilterProperty");function zt(e){return K.includes(e)}a(zt,"isLocationPartOperator");var y={text:K,richtext:[],number:Y,checkbox:Oe,date:Te,phone:["is","is_not","contains","not_contains","starts_with","is_empty","is_not_empty"],currency:Y,status:z,select:z,multiselect:Ee,location:[],user:W,relation:W,formula:Fe,document:xe},we=new Set(["formula","rollup"]),Ce=new Set(["user","relation","document"]),Pe=new Set(["text","richtext","number","select","multiselect","status","date","phone","currency","location","user","relation","document"]),ve=new Set(["text","number","date","phone","currency","select","multiselect"]),De=new Set(["text","phone","status","select","multiselect"]),Ie=new Set(["text","number","checkbox","date","phone","currency","status","select"]);function g(e){let r=!!(e.hidden||e.archived),o=!e.archived,i=we.has(e.type),a=e.type==="document",s=Ce.has(e.type),l=ke(e),c=r?[]:Ve(e),u=c.length>0&&!r,h=!r&&De.has(e.type),_=!r&&Ie.has(e.type),A=!r&&Ye(e.type),T=!r&&e.type==="status",_e=$(e),N=i||a||_e,E=!(r||N),ge=Le(e.type)?"forbidden":"allowed",Ae=qe(e.type),M=Ne(e),L=ve.has(e.type),q=!!(e.deprecated&&!r),B=$e(e);return {lifecycle:{active:o,deprecated:!!e.deprecated,visibleInArchitect:true,visibleInRuntime:!r,warningWhenDeprecated:q},storage:{mode:i?"computed":s?"edge":"value",cardinality:l,edgeBacked:s,preservesExistingValues:!!e.archived,qualifiedProperties:Me(e.type),polymorphic:je(e),maxItems:M},authoring:{editable:E,readOnly:N,directEdit:E&&B==="inline",required:ge,defaultValue:Ae,placeholder:L,maxItems:M},presentation:{formField:!r&&Ue(e.type),tableCell:!r&&G(e.type),defaultColumn:!r&&Be(e.type),compactDisplay:!r,popoverEditor:!r&&B==="popover",placeholder:L,warningWhenDeprecated:q},query:{filterable:u,searchable:h,sortable:_,groupable:A,kanbanGroupable:T,operators:c},agent:{readable:!r,writable:E&&!a,compactReadable:!r,contentReadable:!r&&ze(e.type),requiresDedicatedTool:a},exchange:{importable:!r,exportable:!r,schemaExportable:true,metadataExportable:false}}}a(g,"getAttributeCapabilities");function J(e){return g(e).query.operators}a(J,"getAttributeFilterOperators");function Wt(e){return g(e).query.filterable}a(Wt,"isAttributeFilterable");function Kt(e){return g(e).query.searchable}a(Kt,"isAttributeSearchable");function Jt(e){return g(e).query.sortable}a(Jt,"isAttributeSortable");function Gt(e){return g(e).query.groupable}a(Gt,"isAttributeGroupable");function Qt(e){return g(e).query.kanbanGroupable}a(Qt,"isAttributeKanbanGroupable");function w(e){if(e.type!=="rollup")return e.type;let r=e;if(r.function==="earliest"||r.function==="latest")return "date";if(r.function==="original"){let o=r.targetAttributeType;if(o&&Q(o))return o}return "number"}a(w,"resolveEffectiveFilterType");function C(e){let r=w(e);return Q(r)?y[r]:y.number}a(C,"getRollupFilterOperators");function Ve(e){return e.type==="rollup"?C(e):y[e.type]??[]}a(Ve,"getRawFilterOperators");function ke(e){return e.type==="multiselect"||e.type==="document"||e.type==="user"&&e.multiple===true||e.type==="relation"&&e.cardinality==="many"?"many":"one"}a(ke,"getAttributeCardinality");function je(e){if(e.type!=="relation")return "none";let o=e.targets??[];return o.length===1&&o[0]?.object==="*"?"internal":o.length>1?"code-only":"none"}a(je,"getPolymorphicCapability");function Ne(e){return e.type==="multiselect"?true:e.type==="relation"?e.cardinality==="many":false}a(Ne,"supportsMaxItems");function Me(e){return e==="relation"||e==="document"}a(Me,"supportsQualifiedProperties");function Le(e){return e==="checkbox"||e==="formula"||e==="rollup"}a(Le,"isRequiredForbidden");function qe(e){return e==="checkbox"?"automatic":e==="formula"||e==="rollup"?"forbidden":Pe.has(e)?"static":"forbidden"}a(qe,"getDefaultValueCapability");function Be(e){return G(e)}a(Be,"isDefaultColumnType");function G(e){return e!=="richtext"&&e!=="document"}a(G,"isTableCellType");function Ue(e){return e!=="richtext"}a(Ue,"isFormFieldType");function $e(e){switch(e.type){case "checkbox":return "inline";case "number":return e.renderAs==="rating"?"inline":"default";case "select":case "multiselect":return e.renderAs==="badges"?"inline":"popover";case "status":case "relation":case "user":case "date":return "popover";default:return "default"}}a($e,"resolveEditMode");function Ye(e){return e==="status"||e==="currency"}a(Ye,"isGroupableType");function ze(e){return e==="richtext"||e==="document"}a(ze,"isContentReadableType");function Q(e){return Object.prototype.hasOwnProperty.call(y,e)}a(Q,"hasFilterOperatorEntry");var f=y,We=["is_empty","is_not_empty"];function H(e){return We.includes(e)}a(H,"isNoValueOperator");function er(e){return C(e)}a(er,"getRollupFilterOperators");function R(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)&&"dynamic"in e}a(R,"isDynamicValue");function or(){return {dynamic:"actor",ref:"current"}}a(or,"currentActor");function nr(){return {dynamic:"date",anchor:"today"}}a(nr,"today");function ir(){return {dynamic:"date",anchor:"now"}}a(ir,"now");function X(e){if(typeof e=="number")return Number.isFinite(e)?e:null;if(typeof e=="string"&&e.trim()!==""){let r=Number(e);return Number.isFinite(r)?r:null}return null}a(X,"toAmount");function Z(e){return e!==null&&typeof e=="object"?"value"in e?X(e.value):null:X(e)}a(Z,"extractCurrencyFilterValue");function lr(e){return e==null?null:typeof e=="object"&&"value"in e?e.value??null:e}a(lr,"extractFilterValue");var Ke=new Set(["is_not","not_contains","none_of","is_empty"]),Je={is_not:"is",not_contains:"contains",none_of:"any_of",is_empty:"is_not_empty"};function pr(e){return Ke.has(e)?"none":"any"}a(pr,"getOperatorPolarity");function dr(e){return Je[e]??e}a(dr,"normalizeForEdgeRpc");var ee={is:"any_of",is_not:"none_of"};function mr(e){return ee[e]??e}a(mr,"toMultiValueOperator");var Ge=new Set(Object.values(ee).filter(e=>e!==void 0));function te(e){return Ge.has(e)}a(te,"isSetMembershipOperator");function re(e,r){let o=e.value;if(H(e.operator)||o==null||R(o))return;if(te(e.operator)){Array.isArray(o)||(e.value=[o]);return}if(r!=="currency")return;let i=Z(o);if(i!==null){e.value=i;return}if(!Qe(o))return;let a=`Filter on a currency attribute expected a numeric amount, received ${JSON.stringify(o)}`;throw new h(a,[{path:["value"],message:a}])}a(re,"canonicalizeFilterValue");function Qe(e){return typeof e!="object"?true:"value"in e?e.value!=null:false}a(Qe,"hasCurrencyAmount");var He={eq:"is",equals:"is",equal:"is","==":"is","=":"is",neq:"is_not",notEqual:"is_not",isNot:"is_not","!=":"is_not","<>":"is_not",lt:"less_than","<":"less_than",gt:"greater_than",">":"greater_than",lte:"less_or_equal","<=":"less_or_equal",gte:"greater_or_equal",">=":"greater_or_equal",in:"any_of",isAnyOf:"any_of",anyOf:"any_of",oneOf:"any_of",notIn:"none_of",not_in:"none_of",isNoneOf:"none_of",noneOf:"none_of",notOneOf:"none_of",startsWith:"starts_with",beginsWith:"starts_with",endsWith:"ends_with",doesNotContain:"not_contains",notContain:"not_contains",isEmpty:"is_empty",isNotEmpty:"is_not_empty"};function P(e){return He[e]??e}a(P,"normalizeOperator");function Or(e){let r=P(e.operator);return r===e.operator?e:{...e,operator:r}}a(Or,"normalizeFilterRule");var Xe=new Set(["days","weeks","months","years"]),Ze=new Set(["past","future"]);function v(e){if(typeof e!="object"||e===null)return false;let r=e;return typeof r.amount=="number"&&Number.isFinite(r.amount)&&r.amount>0&&typeof r.unit=="string"&&Xe.has(r.unit)&&typeof r.direction=="string"&&Ze.has(r.direction)}a(v,"isRelativeDateValue");function ne(e){return Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate())}a(ne,"utcDayStart");function oe(e,r,o){if(o==="days")return e+r*864e5;if(o==="weeks")return e+r*7*864e5;let i=new Date(e),a=i.getUTCFullYear()+(o==="years"?r:0),s=i.getUTCMonth()+(o==="months"?r:0),l=new Date(Date.UTC(a,s+1,0)).getUTCDate();return Date.UTC(a,s,Math.min(i.getUTCDate(),l))}a(oe,"shiftUtcDay");function xr(e,r=new Date){if(!v(e))return null;let o=ne(r),i=Math.trunc(e.amount),a=e.direction==="past"?{startMs:oe(o,-i,e.unit),endMs:o+864e5}:{startMs:o,endMs:oe(o,i,e.unit)+864e5};return Number.isFinite(a.startMs)&&Number.isFinite(a.endMs)?a:null}a(xr,"resolveIsWithinBounds");function Fr(e){if(!Number.isFinite(e))return null;let r=ne(new Date(e));return Number.isFinite(r)?{startMs:r,endMs:r+864e5}:null}a(Fr,"resolveUtcDayBounds");function wr(e){return new Date(e).toISOString().slice(0,10)}a(wr,"toUtcDayString");var et=new Set(["relation","document","user"]),D=["is","is_not","any_of","none_of","is_empty","is_not_empty"],tt={id:D,objectId:D,tenantId:D,label:f.text,createdAt:f.date,updatedAt:f.date,deletedAt:f.date,createdBy:f.user,lastUpdatedBy:f.user},rt={id:"text",objectId:"text",objectName:"text",tenantId:"text",label:"text",createdAt:"date",updatedAt:"date",deletedAt:"date",deletedBy:"user",createdBy:"user",lastUpdatedBy:"user",visibility:"select",ownedBy:"user"},k={before:'"less_than"',after:'"greater_than"',on_or_before:'"less_or_equal"',on_or_after:'"greater_or_equal"',is_checked:'"is" with value true',is_not_checked:'"is" with value false',day_month_eq:'"on_day_month"'},ot=new Set(Object.entries(y).filter(([,e])=>e.includes("any_of")&&!e.includes("contains")).map(([e])=>e)),nt={contains:"any_of",not_contains:"none_of"};function I(e,r){let o=k[e];if(o){let s=`Unknown filter operator "${e}" \u2014 use ${o}`;throw new h(s,[{path:["operator"],message:s}])}let i=P(e),a=nt[i];if(a&&ot.has(r)){let s=`Operator "${i}" is not valid for type "${r}" \u2014 use "${a}"`;throw new h(s,[{path:["operator"],message:s}])}return i}a(I,"resolveCanonicalOperator");function ie(e,r,o){let i=I(e,r),a=f[r];if(!a?.includes(i)){let s=a?.length?a.join(", "):"(no operators registered for this type)",l=`Operator "${e}" is not valid for ${o} type "${r}". Valid operators: ${s}.`;throw new h(l,[{path:["operator"],message:l}])}return i}a(ie,"assertOperatorForType");function it(e){if(e.operator==="is_within"&&!v(e.value)){let r='Operator "is_within" requires a relative-date value { amount: positive number, unit: days|weeks|months|years, direction: past|future }';throw new h(r,[{path:["value"],message:r}])}}a(it,"assertRelativeDateValue");function O(e,r,o){e.operator=r,re(e,o),it(e);}a(O,"applyCanonicalForm");function ae(e,r){if(!R(e.value))return;let o=e.value;if(o.dynamic==="actor"&&r!=="user"){let i=`actor token (@me) is only valid on user attributes, not "${r}"`;throw new h(i,[{path:["value"],message:i}])}if(o.dynamic==="date"&&r!=="date"){let i=`date token (@today/@now) is only valid on date attributes, not "${r}"`;throw new h(i,[{path:["value"],message:i}])}}a(ae,"assertDynamicValueForAttribute");var V=x.map(e=>`"${e}"`).join(", ");function at(e){return e==="location"?` A location is filtered on one of its parts: set "property" to one of ${V} and use a text operator (e.g. contains).`:""}a(at,"locationPartsHint");function Mr(e,r){try{return st({...e},r),[]}catch(o){if(!(o instanceof h))throw o;return o.errors.map(i=>({...i,path:[...i.path]}))}}a(Mr,"collectQualifiedRuleIssues");function st(e,r){let o=r.attributes.find(c=>c.name===e.attribute),i=tt[e.attribute];if(!(o||i)){let[c,...u]=e.attribute.split("."),_=(u.length>0?r.attributes.find(T=>T.name===c):void 0)?.type==="location"?` Dotted paths are not supported \u2014 set "attribute" to "${c}" and "property" to ${F(u[0]??"")?`"${u[0]}"`:`one of ${V}`}.`:e.attribute.includes(".")?' Dotted paths are not supported \u2014 filter on the attribute name alone, or use the full-text "query" parameter to match text inside a value.':"",A=`Unknown attribute: ${e.attribute}${_}`;throw new h(A,[{path:["attribute"],message:A}])}if(e.quantifier!==void 0&&!e.property){let c='quantifier is only valid on qualified edge rules (set "property")';throw new h(c,[{path:["quantifier"],message:c}])}if(!o){if(e.property)throw new h(`Cannot qualify system attribute "${e.attribute}"`,[{path:["property"],message:`"${e.attribute}" is a system column, not a reference`}]);let c=rt[e.attribute]??"text",u=I(e.operator,c);if(!i.includes(u)){let h$1=`Operator "${e.operator}" is not valid for system attribute "${e.attribute}". Valid operators: ${i.join(", ")}.`;throw new h(h$1,[{path:["operator"],message:h$1}])}O(e,u,c);return}if(!e.property){ae(e,o.type);let c=J(o),u=I(e.operator,o.type);if(!c.includes(u)){let h$1=c.length?c.join(", "):"(not filterable)",_=`Operator "${e.operator}" is not valid for attribute "${o.name}". Valid operators: ${h$1}.${at(o.type)}`;throw new h(_,[{path:["operator"],message:_}])}O(e,u,w(o));return}if(o.type==="location"){if(e.quantifier!==void 0){let u="quantifier is not valid on a location part \u2014 a location is one value, not a set of edges";throw new h(u,[{path:["quantifier"],message:u}])}if(!F(e.property)){let u=`Property "${e.property}" is not a part of location "${e.attribute}". Valid parts: ${V}.`;throw new h(u,[{path:["property"],message:u}])}ae(e,"text");let c=ie(e.operator,"text","property");O(e,c,"text");return}if(!et.has(o.type))throw new h(`Cannot qualify ${o.type} attribute "${e.attribute}"`,[{path:["property"],message:`Attribute "${e.attribute}" is not a reference type`}]);let a=o.properties;if(!a)throw new h(`Attribute "${e.attribute}" has no qualifyWith schema`,[{path:["property"],message:`"${e.attribute}" has no qualifyWith`}]);let s=a.definitions.find(c=>c.name===e.property);if(!s)throw new h(`Property "${e.property}" not defined on "${e.attribute}".qualifyWith()`,[{path:["property"],message:`Unknown property: ${e.property}`}]);let l=ie(e.operator,s.type,"property");O(e,l,s.type);}a(st,"validateQualifiedRule");var se=64,le=1e4;function ce(e){let r=Object.getPrototypeOf(e);return r===null||r===Object.prototype?true:Object.getPrototypeOf(r)===null&&r.constructor?.name==="Object"}a(ce,"isPlainJsonObject");function m(e,r,o=[]){e.addIssue({code:"custom",message:r,path:o});}a(m,"addJsonIssue");function ct(e,r,o,i){for(let a of Reflect.ownKeys(e))if(a!=="length"){if(a==="__proto__"){m(i,"The __proto__ key is not allowed in custom props",[...r.path,a]);continue}(typeof a=="symbol"||!/^(0|[1-9]\d*)$/.test(a))&&m(i,"Arrays cannot contain non-index JSON properties",[...r.path,a]);}for(let a=e.length-1;a>=0;a--){let s=Object.getOwnPropertyDescriptor(e,String(a)),l=[...r.path,a];if(!(s&&"value"in s)){m(i,"Sparse arrays are not valid JSON values",l);continue}o.push({kind:"enter",value:s.value,path:l,depth:r.depth+1});}}a(ct,"pushJsonArrayChildren");function ut(e,r,o,i){let a=Reflect.ownKeys(e);for(let s=a.length-1;s>=0;s--){let l=a[s],c=[...r.path,l];if(l==="__proto__"){m(i,"The __proto__ key is not allowed in custom props",c);continue}if(typeof l=="symbol"){m(i,"Symbol keys are not valid JSON keys",c);continue}let u=Object.getOwnPropertyDescriptor(e,l);if(!(u?.enumerable&&"value"in u)){m(i,"Custom props must contain enumerable data properties only",c);continue}o.push({kind:"enter",value:u.value,path:c,depth:r.depth+1});}}a(ut,"pushJsonObjectChildren");function pt(e,r){if(e===null||typeof e!="object"){m(r,"Expected a plain JSON object");return}try{if(Array.isArray(e)||!ce(e)){m(r,"Expected a plain JSON object");return}}catch{m(r,"Custom props contain an object that cannot be safely inspected");return}let o=new WeakSet,i=[{kind:"enter",value:e,path:[],depth:0}],a=0;for(;i.length>0;){let s=i.pop();if(!s)break;if(s.kind==="exit"){o.delete(s.value);continue}if(a++,a>le){m(r,`Custom props cannot exceed ${le.toLocaleString("en-US")} total JSON nodes`,s.path);return}if(s.depth>se){m(r,`Custom props cannot exceed depth ${se}`,s.path);continue}let l=s.value;if(!(l===null||typeof l=="string"||typeof l=="boolean"||typeof l=="number"&&Number.isFinite(l))){if(typeof l!="object"){m(r,"Expected a JSON value",s.path);continue}if(o.has(l)){m(r,"Custom props cannot contain circular references",s.path);continue}try{if(Array.isArray(l)){o.add(l),i.push({kind:"exit",value:l}),ct(l,s,i,r);continue}if(!ce(l)){m(r,"Expected an array or plain JSON object",s.path);continue}o.add(l),i.push({kind:"exit",value:l}),ut(l,s,i,r);}catch{m(r,"Custom props contain an object that cannot be safely inspected",s.path);}}}}a(pt,"validateJsonProps");var ue=z$1.unknown().superRefine(pt).transform(e=>e);var Qr=z$1.array(z$1.string()).max(r.columnsPerTab),dt=z$1.array(z$1.string().min(1)).max(r.columnsPerTab).refine(e=>new Set(e).size===e.length,{message:"Displayed attribute names must be unique"}),mt=z$1.object({attribute:z$1.string().describe("Attribute to sort by"),direction:z$1.enum(["asc","desc"]).describe("asc or desc")}).strict(),bt=z$1.array(mt).max(r.sortsPerTab),yt=z$1.object({amount:z$1.number().describe("Count"),unit:z$1.enum(["days","weeks","months","years"]).describe("Unit"),direction:z$1.enum(["past","future"]).describe("Past or future")}).strict(),ft=z$1.object({value:z$1.number().nullable().describe("Amount"),code:z$1.array(z$1.string()).optional().describe("Currency codes")}).strict(),ht=z$1.object({phoneNumber:z$1.string().nullable().describe("Number"),countryCode:z$1.string().optional().describe("ISO country code")}).strict(),_t=z$1.discriminatedUnion("dynamic",[z$1.object({dynamic:z$1.literal("actor").describe("Resolved at filter time"),ref:z$1.literal("current").describe("The current actor")}).strict(),z$1.object({dynamic:z$1.literal("date").describe("Resolved at filter time"),anchor:z$1.enum(["today","now"]).describe("Anchor")}).strict()]),gt=z$1.object({month:z$1.number().describe("1-12"),day:z$1.number().describe("Day")}).strict(),At=z$1.union([z$1.string(),z$1.number(),z$1.boolean(),z$1.array(z$1.string()),yt,ft,ht,gt,_t,z$1.null()]),St=z$1.enum(["is","is_not","contains","not_contains","starts_with","ends_with","is_empty","is_not_empty","less_than","greater_than","less_or_equal","greater_or_equal","is_within","on_day_month","any_of","none_of"],{error:a(e=>{let r=e.input,o=typeof r=="string"?k[r]:void 0;return o?`Unknown filter operator "${r}" \u2014 use ${o}`:void 0},"error")}),Rt=z$1.object({attribute:z$1.string().describe("Attribute to filter on"),property:z$1.string().optional().describe("Qualified edge property"),quantifier:z$1.enum(["any","none"]).optional().describe("For a multi-value attribute"),operator:St.describe("Comparison"),value:At.describe("Comparison value, by attribute type")}).strict(),Ot=z$1.array(Rt).max(r.filterRulesPerTab),Tt=z$1.object({combinator:z$1.enum(["and","or"]).describe("Match every rule or any rule"),rules:Ot.describe("The rules")}).strict(),Et={span:z$1.union([z$1.literal(1),z$1.literal(2),z$1.literal(3),z$1.literal(4),z$1.literal(5),z$1.literal(6),z$1.literal(7),z$1.literal(8),z$1.literal(9),z$1.literal(10),z$1.literal(11),z$1.literal(12)]).optional().describe("Columns of 12 this field occupies"),label:z$1.string().optional().describe("Overrides the attribute's label"),readOnly:z$1.boolean().optional().describe("Shows the value, not editable")},xt=z$1.object({attribute:z$1.string().describe("Attribute API name shown by this field"),...Et}).strict(),Ft=z$1.object({name:z$1.string().describe("Group API name, unique in the form"),label:z$1.string().describe("Label people see"),description:z$1.string().optional().describe("Extra context under the label"),collapsible:z$1.boolean().optional().describe("Whether the group can be collapsed"),collapsed:z$1.boolean().optional().describe("Whether the group starts collapsed"),fields:z$1.array(xt).max(r.fieldsPerGroup).describe("Fields in this group, in order")}).strict();function pe(e,r$1){e.groups.reduce((s,l)=>s+l.fields.length,0)>r.fieldsPerFormTab&&r$1.addIssue({code:"too_big",origin:"array",maximum:r.fieldsPerFormTab,inclusive:true,message:`A form content can contain at most ${r.fieldsPerFormTab} fields`,path:["groups"]});let i=new Set,a=new Set;e.groups.forEach((s,l)=>{i.has(s.name)&&r$1.addIssue({code:"custom",message:`Duplicate group name "${s.name}"`,path:["groups",l,"name"]}),i.add(s.name),s.fields.forEach((c,u)=>{a.has(c.attribute)&&r$1.addIssue({code:"custom",message:`Duplicate field attribute "${c.attribute}"`,path:["groups",l,"fields",u,"attribute"]}),a.add(c.attribute);});});}a(pe,"refineFormContent");var b={name:z$1.string().describe("Content API name, unique in the view"),label:z$1.string().optional().describe("Label people see"),icon:t.optional().describe("Icon name"),placement:z$1.enum(["main","aside"]).describe("main: any tabs. aside: at most one, a form")},de=z$1.object({object:z$1.string().optional().describe("Every record of this object"),relation:z$1.string().optional().describe("Records linked through this relation")}).strict().superRefine((e,r)=>{e.object===void 0&&e.relation===void 0&&r.addIssue({code:"custom",message:"Collection source must define an object, a relation, or both"});}).transform(e=>e.relation===void 0?{object:e.object}:e.object===void 0?{relation:e.relation}:{object:e.object,relation:e.relation}),wt={...b,type:z$1.literal("collection"),source:de.describe("object: every record; relation: records linked to this record; both: records of object whose relation points at this record"),visibility:z$1.enum(d).optional().describe("all: no scope; workspace: every member; private: viewer's own"),columns:z$1.array(z$1.union([z$1.string(),z$1.object({relationProperty:z$1.string().refine(e=>e.trim().length>0).describe("Qualified edge property shown as a column")}).strict()])).max(r.columnsPerTab).optional().describe("Table columns, in order"),descriptionAttribute:z$1.string().optional().describe("Secondary line under each row's title (list layout)"),displayAttributes:dt.optional().describe("Attributes shown on each card"),filters:Tt.optional().describe("Restricts which records show"),sorts:bt.optional().describe("Sort order"),actions:z$1.enum(["create","update","delete","attach","detach"]).array().optional().describe("Offered actions; absent = every action, [] = none"),openMode:z$1.enum(["page","peek"]).optional().describe("page or peek (the record panel)"),createMode:z$1.enum(["page","peek","inline"]).optional().describe("page, peek, or inline (creates without opening)")},Ct=z$1.object({...wt,layout:z$1.enum(["table","list","kanban"]).describe("table columns, list cards, kanban board grouped by a select/status attribute"),columnSizing:z$1.record(z$1.string(),z$1.number()).optional().describe("Column widths in pixels, by attribute name"),groupByAttribute:z$1.string().optional().describe("Kanban only: the select or status attribute that names the columns"),kanbanColumnOrder:z$1.array(z$1.string()).optional().describe("Kanban: column order by option value"),kanbanColumnVisibility:z$1.record(z$1.string(),z$1.boolean()).optional().describe("Kanban: which columns are shown"),kanbanPinnedColumns:z$1.array(z$1.string()).optional().describe("Kanban: columns pinned first")}).strict().superRefine((e,r)=>{let o=["groupByAttribute","kanbanColumnOrder","kanbanColumnVisibility","kanbanPinnedColumns"];if(e.layout==="kanban"){e.groupByAttribute===void 0&&r.addIssue({code:"custom",path:["groupByAttribute"],message:"A kanban layout requires groupByAttribute"});return}for(let i of o)e[i]!==void 0&&r.addIssue({code:"custom",path:[i],message:"Only a kanban layout groups by an attribute"});}),j={...b,type:z$1.literal("form"),groups:z$1.array(Ft).max(r.groupsPerFormTab).describe("Field groups, in order"),formColumns:z$1.union([z$1.literal(1),z$1.literal(2),z$1.literal(3)]).optional().describe("Grid columns, 1-3"),density:z$1.enum(["compact","comfortable","spacious"]).optional().describe("Vertical spacing between fields")},Pt=z$1.object(j).strict().superRefine(pe),vt=z$1.object({...j,groups:j.groups.min(1,"A published form content requires at least one group")}).strict().superRefine(pe),me=[Ct,z$1.object({...b,type:z$1.literal("custom"),extension:z$1.string().describe("Name of a registered extension"),parameters:z$1.lazy(()=>ue).optional().describe("Extension parameters")}).strict(),z$1.object({...b,type:z$1.literal("activity")}).strict(),z$1.object({...b,type:z$1.literal("richtext"),attribute:z$1.string().describe("Richtext attribute edited in place"),titleAttribute:z$1.string().optional().describe("Text attribute shown as the title")}).strict(),z$1.object({...b,type:z$1.literal("documents"),allowUpload:z$1.boolean().optional().describe("Lets people add files here"),allowRemove:z$1.boolean().optional().describe("Lets people remove files here"),hideAttachments:z$1.boolean().optional().describe("Hides files attached elsewhere (e.g. emails)"),relations:z$1.array(z$1.string()).optional().describe("Document relations shown; the record's own files if absent")}).strict(),z$1.object({...b,type:z$1.literal("forms"),objectName:z$1.string().optional().describe("Limits to this object's published forms")}).strict(),z$1.object({...b,type:z$1.literal("emails"),emailAttributes:z$1.array(z$1.string()).max(r.emailAttributesPerTab).describe("Addresses")}).strict(),z$1.object({...b,type:z$1.literal("meetings"),emailAttributes:z$1.array(z$1.string()).max(r.emailAttributesPerTab).describe("Addresses")}).strict()],Dt=z$1.discriminatedUnion("type",[Pt,...me]),be=z$1.discriminatedUnion("type",[vt,...me]),ye={object:z$1.string(),name:z$1.string(),label:z$1.string(),description:z$1.string().optional(),icon:t.optional(),context:z$1.enum(["collection","record"]),default:z$1.boolean().optional()},It=z$1.object({...ye,contents:z$1.array(Dt).max(r.tabsPerView)}).strict(),Vt=z$1.object({...ye,contents:z$1.array(be).max(r.tabsPerView)}).strict();function fe(e,r){let o=new Set;e.contents.forEach((i,a)=>{o.has(i.name)&&r.addIssue({code:"custom",message:`Duplicate content name "${i.name}"`,path:["contents",a,"name"]}),o.add(i.name);});}a(fe,"addDuplicateContentNameIssues");function kt(e){let r=e.contents.map((a,s)=>({content:a,index:s})).filter(({content:a})=>a.placement==="aside"),o=[],[,i]=r;i&&o.push({contentName:null,path:["contents",i.index,"placement"],message:"Aside holds one content for now; put the others in main"});for(let{content:a,index:s}of r)a.type!=="form"&&o.push({contentName:a.name,path:["contents",s,"type"],message:`Only a form content can sit in aside for now; put ${a.type} in main`});return o}a(kt,"asideRuleIssues");function he(e,r){for(let o of kt(e))r.addIssue({code:"custom",path:o.path,message:o.message});}a(he,"addAsideIssues");function jt({asideRule:e="enforce"}={}){return It.superRefine((r,o)=>{fe(r,o),e==="enforce"&&he(r,o);})}a(jt,"draftContentViewDefinitionSchemaFor");function Nt({asideRule:e="enforce"}={}){return Vt.superRefine((r,o)=>{fe(r,o),r.contents.some(i=>i.placement==="main")||o.addIssue({code:"custom",message:"A published view requires at least one main content",path:["contents"]}),e==="enforce"&&he(r,o);})}a(Nt,"contentViewDefinitionSchemaFor");var Mt=jt(),Lt=Nt();export{Lt as $,lr as A,pr as B,dr as C,mr as D,te as E,re as F,He as G,P as H,Or as I,v as J,xr as K,Fr as L,wr as M,rt as N,k as O,Mr as P,st as Q,Qr as R,dt as S,bt as T,Tt as U,de as V,be as W,kt as X,jt as Y,Nt as Z,Mt as _,Se as a,qt as b,Re as c,Bt as d,$ as e,x as f,F as g,zt as h,y as i,g as j,J as k,Wt as l,Kt as m,Jt as n,Gt as o,Qt as p,w as q,f as r,We as s,H as t,er as u,R as v,or as w,nr as x,ir as y,Z as z};
|
package/dist/chunk-DPD6ZWL2.js
DELETED
package/dist/chunk-EZCWO4XV.mjs
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import {h as h$1,b,a as a$1}from'./chunk-XRWRECDA.mjs';import {a}from'./chunk-KSPJP74K.mjs';import I,{z as z$1}from'zod';import {ICONS,COLORS}from'@stndrds/constants';/*! © 2025-2026 AND YOU CREATE SAS (RCS Paris 940 190 614). Proprietary — see LICENSE (Standards SDK License 1.0). */
|
|
2
|
-
var E=["skill","memory","drives","artifact","meeting"];function it(e){return E.includes(e)}a(it,"isNativeObjectName");var A=["workspace","private"],pt=["all",...A];function lt(e){if(typeof e=="string"&&A.includes(e))return e;throw new h$1(`visibility must be one of: ${A.join(", ")} (received: ${String(e)})`,[])}a(lt,"parseResourceVisibility");var Se=["id","createdAt","updatedAt","createdBy","lastUpdatedBy","visibility","ownedBy"],h=[...Se,"objectId","label","embeddingText","values","metadata","deletedAt","deletedBy","schemaVersion","owned_by"],dt=E;var ve=new Set(ICONS),U=/^[a-zA-Z_][a-zA-Z0-9_]*$/,Ee=/^[a-z][a-z0-9-]*$/,m=63,W=128,Ae=I.string().min(1,"Object name cannot be empty").max(63,"Object name is too long (max 63 characters)").regex(/^[a-z][a-z0-9-]*$/,{message:`Invalid object name format.
|
|
3
|
-
Name must be in kebab-case (slug format):
|
|
4
|
-
\u2705 Valid: 'products', 'user-profiles', 'order-items'
|
|
5
|
-
\u274C Invalid: 'Products', 'userProfiles', 'user_profiles'`});function xt(e){try{Ae.parse(e);}catch(t){throw t instanceof I.ZodError?new b(t.issues[0].message,a$1.INVALID_OBJECT_NAME):t}}a(xt,"validateObjectName");function St(e){if(!e||e.length===0)throw new h$1("View name cannot be empty",[{path:["name"],message:"View name cannot be empty"}]);if(e.length>m)throw new h$1("View name is too long",[{path:["name"],message:`View name is too long (max ${m} characters)`}]);if(!Ee.test(e))throw new h$1("Invalid view name format",[{path:["name"],message:"View name must be in kebab-case (e.g., 'detail', 'list-view')"}])}a(St,"validateViewName");function wt(e,t,n){let o=new Set;for(let s of e){let a=t(s);if(o.has(a))throw n(a);o.add(a);}}a(wt,"assertUniqueBy");var Z=I.string().min(1,"Attribute name cannot be empty").max(m,`Attribute name is too long (max ${m} characters)`).regex(U,{message:`Invalid attribute name format.
|
|
6
|
-
Name must be a valid variable identifier:
|
|
7
|
-
\u2705 Valid: 'firstName', 'first_name', 'FirstName', 'FIRST_NAME'
|
|
8
|
-
\u274C Invalid: 'first-name', 'first name', '123name', 'first.name'`}).refine(e=>!h.includes(e),{message:`This is a reserved attribute name. Reserved names: ${h.join(", ")}`});function vt(e){if(!e||e.length===0)throw new Error("[AttributeBuilder] Attribute name cannot be empty");if(e.length>m)throw new Error(`[AttributeBuilder] Attribute name is too long (max ${m} characters)`);if(!U.test(e))throw new Error(`[AttributeBuilder] Invalid attribute name format.
|
|
9
|
-
Name must be a valid variable identifier:
|
|
10
|
-
\u2705 Valid: 'firstName', 'first_name', 'FirstName', 'FIRST_NAME'
|
|
11
|
-
\u274C Invalid: 'first-name', 'first name', '123name', 'first.name'`);if(h.includes(e))throw new Error(`[AttributeBuilder] "${e}" is a reserved name and cannot be used as an attribute name.
|
|
12
|
-
Reserved names: ${h.join(", ")}`)}a(vt,"validateAttributeName");function Et(e){if(!e||e.length===0)throw new Error("[AttributeBuilder] Attribute label cannot be empty");if(e.length>W)throw new Error(`[AttributeBuilder] Attribute label is too long (max ${W} characters)`)}a(Et,"validateLabel");function At(e,t){if(!ve.has(e))throw new Error(`[AttributeBuilder] Invalid icon "${e}" in ${t}.
|
|
13
|
-
Icon must be one of the predefined icons from @stndrds/constants.`)}a(At,"validateIconName");function It(e,t){let n=new Set;for(let o of t){if(!o.value?.trim())throw new Error(`[AttributeBuilder] Option in "${e}" has an empty or missing value.`);if(!o.label?.trim())throw new Error(`[AttributeBuilder] Option "${o.value}" in "${e}" has an empty or missing label.`);if(n.has(o.value))throw new Error(`[AttributeBuilder] Duplicate option value "${o.value}" in "${e}".`);n.add(o.value);}for(let o of t){if(o.inverse===void 0)continue;let s=t.find(a=>a.value===o.inverse);if(!s)throw new Error(`[AttributeBuilder] Option "${o.value}" in "${e}" has inverse "${o.inverse}" which does not match any option value.`);if(s.inverse!==o.value)throw new Error(`[AttributeBuilder] Inverse mismatch in "${e}": "${o.value}" points to "${o.inverse}", but "${o.inverse}" points to "${s.inverse??"(none)"}". Inverse pairs must be symmetric.`)}}a(It,"validateOptions");var k=class k extends Error{constructor(t){super(t),this.name="ComputedFormulaParseError";}};a(k,"ComputedFormulaParseError");var p=k;function Y(e){let t=new T(Ie(e)),n=t.parseExpression();return t.expectEnd(),n}a(Y,"parseComputedFormula");function Ie(e){let t=[],n=0;for(;n<e.length;){let o=e[n];if(o===" "||o===" "||o===`
|
|
14
|
-
`||o==="\r"){n+=1;continue}if(o==='"'||o==="'"){let a=Te(e,n,o);t.push({kind:"string",value:a.value,position:n}),n=a.nextIndex;continue}if(y(o)){let a=Re(e,n);t.push({kind:"number",value:a.value,position:n}),n=a.nextIndex;continue}if(Ce(o)){let a=Oe(e,n),u=a.value.toLowerCase();u==="true"?t.push({kind:"boolean",value:true,position:n}):u==="false"?t.push({kind:"boolean",value:false,position:n}):u==="null"?t.push({kind:"null",position:n}):t.push({kind:"identifier",value:a.value,position:n}),n=a.nextIndex;continue}let s=e.slice(n,n+2);if(s===">="||s==="<="||s==="=="||s==="!="){t.push({kind:"operator",value:s,position:n}),n+=2;continue}if(o===">"||o==="<"||o==="+"||o==="-"||o==="*"||o==="/"){t.push({kind:"operator",value:o,position:n}),n+=1;continue}if(o==="("||o===")"||o===","||o==="."){t.push({kind:"punctuation",value:o,position:n}),n+=1;continue}throw new p(`Unexpected character "${o}" at position ${n}`)}return t}a(Ie,"tokenize");function Te(e,t,n='"'){let o="",s=t+1;for(;s<e.length;){let a=e[s];if(a===n)return {value:o,nextIndex:s+1};if(a==="\\"){let u=e[s+1];if(u===void 0)throw new p(`Unterminated string literal at position ${s}`);o+=ke(u,s),s+=2;continue}o+=a,s+=1;}throw new p(`Unterminated string literal at position ${t}`)}a(Te,"scanString");function ke(e,t){switch(e){case '"':case "\\":return e;case "n":return `
|
|
15
|
-
`;case "r":return "\r";case "t":return " ";default:throw new p(`Unknown escape sequence "\\${e}" at position ${t}`)}}a(ke,"decodeEscape");function Re(e,t){let n=t;for(;n<e.length&&y(e[n]);)n+=1;if(e[n]==="."){let a=n;if(n+=1,!y(e[n]))throw new p(`Invalid number literal at position ${a}`);for(;n<e.length&&y(e[n]);)n+=1;}let o=e.slice(t,n),s=Number(o);if(!Number.isFinite(s))throw new p(`Invalid number literal "${o}"`);return {value:s,nextIndex:n}}a(Re,"scanNumber");function Oe(e,t){let n=t+1;for(;n<e.length&&Pe(e[n]);)n+=1;return {value:e.slice(t,n),nextIndex:n}}a(Oe,"scanIdentifier");function y(e){return e!==void 0&&e>="0"&&e<="9"}a(y,"isDigit");function Ce(e){return e!==void 0&&/[A-Za-z_]/.test(e)}a(Ce,"isIdentifierStart");function Pe(e){return e!==void 0&&/[A-Za-z0-9_]/.test(e)}a(Pe,"isIdentifierPart");var R=class R{constructor(t){this.tokens=t;this.position=0;}parseExpression(){return this.parseBinaryExpression(0)}expectEnd(){let t=this.peek();if(t!==void 0)throw new p(`Unexpected token ${_e(t)} at position ${t.position}`)}parseBinaryExpression(t){let n=this.parsePrimary();for(;;){let o=this.peek();if(o?.kind!=="operator")return n;let s=Ne(o.value);if(s<t)return n;let a=o.value;this.consume();let u=this.parseBinaryExpression(s+1);n={kind:"binary",operator:a,left:n,right:u};}}parsePrimary(){let t=this.consume();if(t===void 0)throw new p("Unexpected end of expression");switch(t.kind){case "string":case "number":case "boolean":return {kind:"literal",value:t.value};case "null":return {kind:"literal",value:null};case "identifier":return this.parseIdentifier(t.value);case "punctuation":if(t.value==="("){let n=this.parseExpression();return this.expectPunctuation(")"),n}break;case "operator":if(t.value==="-"){let n=this.consume();if(n?.kind==="number")return {kind:"literal",value:-n.value}}break}throw new p(`Expected literal, path, call, or parenthesized expression at position ${t.position}`)}parseIdentifier(t){if(this.matchPunctuation("(")){let o=[];if(!this.matchPunctuation(")")){do o.push(this.parseExpression());while(this.matchPunctuation(","));this.expectPunctuation(")");}return {kind:"call",functionName:t.toLowerCase(),args:o}}let n=[t];for(;this.matchPunctuation(".");){let o=this.consume();if(o?.kind!=="identifier"){let s=o?.position??this.previousPosition();throw new p(`Expected attribute name after path separator at position ${s}`)}n.push(o.value);}return {kind:"path",parts:n}}expectPunctuation(t){if(!this.matchPunctuation(t)){let o=this.peek()?.position??this.previousPosition();throw new p(`Expected "${t}" at position ${o}`)}}matchPunctuation(t){let n=this.peek();return n?.kind==="punctuation"&&n.value===t?(this.consume(),true):false}peek(){return this.tokens[this.position]}consume(){let t=this.tokens[this.position];return this.position+=1,t}previousPosition(){return this.tokens[this.position-1]?.position??0}};a(R,"Parser");var T=R;function _e(e){switch(e.kind){case "identifier":case "number":case "string":case "boolean":case "operator":case "punctuation":return `"${String(e.value)}"`;case "null":return '"null"';default:return e}}a(_e,"describeToken");function Ne(e){switch(e){case "*":case "/":return 3;case "+":case "-":return 2;case ">":case "<":case ">=":case "<=":case "==":case "!=":return 1;default:return e}}a(Ne,"getOperatorPrecedence");var x={attributesPerObject:300,tabsPerView:24,groupsPerFormTab:12,fieldsPerGroup:60,fieldsPerFormTab:150,columnsPerTab:50,optionsPerAttribute:200,sidePanelAttributes:100,sidePanelPanes:20,filterRulesPerTab:50,sortsPerTab:20,emailAttributesPerTab:30,objectsPerPlan:20,mutationsPerPlan:500,planBytes:524288,historyDefault:20,historyMax:50,iconQueries:5,iconResults:20};var Ve=Object.keys(COLORS),Be=new Set(ICONS),O=z$1.enum(Ve).describe("A color id from the palette"),C=z$1.string().superRefine((e,t)=>{Be.has(e)||t.addIssue({code:"custom",message:"Invalid icon name"});}).transform(e=>e);var c=z$1.object({placeholder:z$1.string().optional(),description:z$1.string().optional(),defaultValue:z$1.unknown().optional(),icon:z$1.string().optional(),order:z$1.number().int().optional(),hidden:z$1.boolean().optional(),archived:z$1.boolean().optional(),deprecated:z$1.boolean().optional(),metadata:z$1.record(z$1.string(),z$1.unknown()).optional()}),q=["placeholder","description","defaultValue","icon","order","hidden","archived","deprecated","metadata"];function J(e,t,n=[]){let o=new Set(n);return a(function(a,u,f,g=[]){let b=e[a];if(!(b===void 0||u===void 0))for(let d of Object.keys(u))b.has(d)||o.has(d)||f.addIssue({code:"custom",path:[...g,d],message:`"${d}" is not a ${a} ${t}; keys of ${a}: ${[...b].join(", ")}`});},"refuse")}a(J,"refuseForeignKeys");var P=z$1.object({value:z$1.string().min(1).describe("Stored value"),label:z$1.string().min(1).describe("Label people see"),description:z$1.string().describe("Extra context").optional(),inverse:z$1.string().describe("Paired option's value (symmetric)").optional(),archived:z$1.boolean().describe("Hides without deleting").optional()}),_=z$1.enum(["idle","in_progress","finished"]).describe("Workflow stage"),N=P.extend({color:O}).strict(),X=N,Q=P.extend({color:O,group:_}).strict(),ee=P.extend({color:z$1.string().optional().describe("A color id"),group:_.optional()}).strict(),j=z$1.array(ee).min(1).refine(e=>{let t=e.map(n=>n.value);return new Set(t).size===t.length},{message:"Duplicate option values are not allowed"});function M(e){return z$1.array(e).min(1).max(x.optionsPerAttribute).refine(t=>{let n=t.map(o=>o.value);return new Set(n).size===n.length},{message:"Duplicate option values are not allowed"})}a(M,"writeOptionsArraySchema");var te=M(N),re=M(X),ne=M(Q),Fe=z$1.object({object:z$1.string().min(1).describe("Target object"),displayTemplate:z$1.string().optional().describe("Linked record label template"),filter:z$1.record(z$1.string(),z$1.unknown()).optional().describe("Restricts linkable records")}),$e=z$1.object({object:z$1.string().min(1).describe("Other side's object"),attribute:z$1.string().min(1).describe("Other side's attribute"),cardinality:z$1.enum(["one","many"]).optional().describe("Other side's cardinality"),label:z$1.string().min(1).optional().describe("Other side's label"),storageOwner:z$1.boolean().optional().describe("Owns the join storage")}),oe=z$1.object({objectName:z$1.string().min(1).describe("API name of the object whose options are mirrored"),attributeName:z$1.string().min(1).describe("API name of the select/status attribute to mirror options from"),attributeId:z$1.string().optional().describe("Id of the source attribute, resolved by the server")}),ie=c.extend({multiline:z$1.boolean().describe("Renders as a multi-line textarea").optional(),minLength:z$1.number().int().min(0).describe("Minimum character count").optional(),maxLength:z$1.number().int().min(1).describe("Maximum character count").optional(),pattern:z$1.string().describe("Regular expression the value must match").optional(),format:z$1.enum(["email","url","slug"]).describe("Validates and renders as this format").optional()}),ze=c,se=c.extend({renderAs:z$1.enum(["number","rating"]).describe("Plain number or a star rating").optional(),min:z$1.number().describe("Minimum allowed value").optional(),max:z$1.number().describe("Maximum allowed value").optional(),unit:z$1.enum(["integer","decimal","percentage"]).describe("How the value is stored and rendered").optional(),decimals:z$1.number().int().min(0).max(10).describe("Decimal places shown").optional()}),ae=c,ce=c.extend({dateFormat:z$1.enum(["short","long","full","relative"]).describe("How the date is rendered").optional(),minDate:z$1.string().describe("Earliest allowed date (ISO)").optional(),maxDate:z$1.string().describe("Latest allowed date (ISO)").optional(),includeTime:z$1.boolean().describe("Also captures a time of day").optional(),endDate:z$1.boolean().describe("Paired with another date attribute as a range's end").optional(),timeFormat:z$1.enum(["12h","24h"]).describe("Clock format when a time is included").optional()}),ue=c.extend({defaultCountryCode:z$1.string().length(3).describe("ISO country code preselected in the dialer").optional()}),pe=c.extend({defaultCurrency:z$1.string().length(3).describe("ISO currency code preselected for new values").optional(),allowedCurrencies:z$1.array(z$1.string().length(3)).describe("ISO currency codes a value may use; any currency when omitted").optional(),allowNegative:z$1.boolean().describe("Whether a negative amount is accepted").optional()}),V=c.extend({options:j.describe("The workflow statuses, in order")}),le=c.extend({granularity:z$1.enum(["full","address","city","state","country","coordinates"]).describe("How precise a location must be captured").optional(),defaultCountry:z$1.string().length(3).describe("ISO country code preselected for new values").optional(),allowedCountries:z$1.array(z$1.string().length(3)).describe("ISO country codes a value may use; any country when omitted").optional()}),B=c.extend({options:j.describe("Options"),renderAs:z$1.literal("badges").optional().describe("Renders the chosen option as a colored badge")}),F=c.extend({options:j.describe("Options"),renderAs:z$1.literal("badges").optional().describe("Renders the chosen options as colored badges")}),Le=c.extend({types:z$1.array(z$1.enum(["user","agent"])).min(1).optional().describe("Which kinds of actor can be picked; both when omitted"),multiple:z$1.boolean().optional().describe("Whether more than one actor can be picked")}),S={name:Z.describe("Property API name"),label:z$1.string().min(1).describe("Label people see"),required:z$1.boolean().describe("Required on every edge").optional()},De={id:z$1.string().optional(),objectId:z$1.string().optional(),system:z$1.boolean().optional(),unique:z$1.boolean().optional()},We=Object.fromEntries(q.map(e=>[e,true])),w=["text","number","checkbox","date","phone","currency","location"],de=[...w,"select","multiselect","status"],me={text:ie,number:se,checkbox:ae,date:ce,phone:ue,currency:pe,location:le,select:B,multiselect:F,status:V},Ue={...me,select:B.extend({options:te.describe("Options")}),multiselect:F.extend({options:re.describe("Options")}),status:V.extend({options:ne.describe("Statuses")})},$=a(e=>Ue[e].omit(We).shape,"propertyWireConfigShapeFor"),Ze=a(e=>z$1.object({...S,...De,type:z$1.literal(e).describe("Property type"),...me[e].shape}).strip(),"storedPropertyMember"),be=z$1.discriminatedUnion("type",de.map(Ze)),z=z$1.object({definitions:z$1.array(be).min(1).max(x.optionsPerAttribute).describe("Edge properties")}).strip().describe("Properties carried by the edge itself (role, share, since\u2026), never a third object"),Ye=Object.fromEntries(de.map(e=>[e,new Set(Object.keys($(e)))])),He=J(Ye,"property key",[...Object.keys(S),"type"]);function Ge(e,t){He(e.type,e,t);}a(Ge,"refuseForeignPropertyKeys");var Ke=w.reduce((e,t)=>(Object.assign(e,$(t)),e),{}),G=a(e=>z$1.object({...S,type:e.length===1?z$1.literal(e[0]).describe("Property type"):z$1.enum(e).describe("Property type"),...$(e[0])}).strict(),"optionPropertyWireMember"),he=z$1.discriminatedUnion("type",[G(["select","multiselect"]),G(["status"]),z$1.object({...S,type:z$1.enum(w).describe("Property type"),...Ke}).strict().superRefine(Ge)]),qe=z$1.object({definitions:z$1.array(he).min(1).max(x.optionsPerAttribute).describe("Edge properties")}).strict().describe("Properties carried by the edge itself (role, share, since\u2026), never a third object"),Je=c.extend({targets:z$1.array(Fe).min(1).describe("Target object(s)"),cardinality:z$1.enum(["one","many"]).describe("one or many"),maxItems:z$1.number().int().min(1).optional().describe("Max linked records"),bilateral:$e.optional().describe("Syncs the other side's attribute"),properties:z.optional()}),Xe=c.extend({expression:z$1.string().min(1).superRefine((e,t)=>{try{Y(e);}catch(n){t.addIssue({code:z$1.ZodIssueCode.custom,message:n instanceof Error?n.message:"Invalid formula expression"});}}).describe("The formula expression, compiled against this object's attributes"),returnType:z$1.enum(["text","number","boolean","date","select","multiselect"]).describe("The formula's result type"),decimals:z$1.number().int().min(0).max(10).optional().describe("Decimal places shown for a number result"),allowRelations:z$1.boolean().optional().describe("Whether the expression may read across a relation"),optionsSource:oe.optional().describe("Mirrors an option set")}),Qe=c.extend({relationAttribute:z$1.string().min(1).optional().describe("API name of the relation this rollup aggregates through"),relationPath:z$1.string().optional().describe("Not supported yet \u2014 single-hop only"),targetAttribute:z$1.string().min(1).describe("API name of the attribute aggregated on the relation's target object"),function:z$1.enum(["sum","avg","earliest","latest","count","countValues","countUniqueValues","countEmpty","percentEmpty","percentNotEmpty","original"]).describe("The aggregation applied across the linked records"),decimals:z$1.number().int().min(0).max(10).optional().describe("Decimal places shown for a numeric result"),targetAttributeType:z$1.string().optional().describe("Server-set"),targetAttributeOptions:z$1.array(ee).optional().describe("Server-set"),targetCurrencyCode:z$1.string().length(3).optional().describe("Server-set"),optionsSource:oe.optional().describe("Mirrors an option set")}),et=c.extend({properties:z.optional(),accepts:z$1.array(z$1.string().min(1)).optional().describe("MIME prefixes or globs a file must match (e.g. `image/*`, `*.pdf`)"),maxFileSize:z$1.number().int().min(1).optional().describe("Maximum file size in bytes")}),fe={text:ie,richtext:ze,number:se,checkbox:ae,date:ce,phone:ue,currency:pe,status:V,location:le,select:B,multiselect:F,user:Le,relation:Je,formula:Xe,rollup:Qe,document:et};function v(e){let t=fe[e];if(!t)throw new h$1(`Unsupported attribute type: ${e}`,[]);return t}a(v,"getAttributeConfigSchema");function tt(e,t){return v(e).strip().parse(t)}a(tt,"parseAttributeConfig");function ge(e){let t=v(e).extend({icon:C.optional()});switch(e){case "select":return t.extend({options:te.describe("Options")});case "multiselect":return t.extend({options:re.describe("Options")});case "status":return t.extend({options:ne.describe("Statuses")});default:return t}}a(ge,"getAttributeConfigWriteSchema");function ye(e){return h$1.fromZodErrors(e.map(t=>({path:t.path.map(n=>typeof n=="symbol"?String(n):n),message:t.message})))}a(ye,"validationErrorFromIssues");function xe(e,t){let n=ge(e).strip().safeParse(t);if(!n.success)throw ye(n.error.issues);return n.data}a(xe,"parseWriteSchema");function rt(e,t){return xe(e,t)}a(rt,"parseAttributeConfigForCreate");function nt(e){if(!Object.prototype.hasOwnProperty.call(e,"icon"))return;let t=C.optional().safeParse(e.icon);if(!t.success)throw h$1.fromZodErrors(t.error.issues.map(n=>({path:["icon",...n.path.map(o=>typeof o=="symbol"?String(o):o)],message:n.message})))}a(nt,"validatePatchedIcon");function K(e){return e==="select"||e==="multiselect"||e==="status"}a(K,"isSelectLike");function ot(e,t){let n=Object.prototype.hasOwnProperty.call(t,"options"),o=Object.prototype.hasOwnProperty.call(t,"icon"),s={...e,...t};if(nt(t),n){let{icon:g,...b}=s,d=xe(e.type,o?s:b);return !o&&g!==void 0&&(d.icon=g),d}let a=e.options;K(e.type)&&(s.options=[{value:"__legacy__",label:"__legacy__"}]);let u=v(e.type).strip().safeParse(s);if(!u.success)throw ye(u.error.issues);let f=u.data;return K(e.type)&&(f.options=a),f}a(ot,"parseAttributeConfigForUpdate");export{X as A,Q as B,w as C,be as D,z as E,he as F,qe as G,fe as H,v as I,tt as J,ge as K,rt as L,ot as M,E as a,it as b,A as c,pt as d,lt as e,Se as f,h as g,dt as h,Ae as i,xt as j,St as k,wt as l,Z as m,vt as n,Et as o,At as p,It as q,x as r,O as s,C as t,p as u,Y as v,q as w,J as x,_ as y,N as z};
|
package/dist/chunk-GKXTXH4Y.mjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import {a as a$1}from'./chunk-4OTKOCGB.mjs';import {a}from'./chunk-KSPJP74K.mjs';import {z}from'zod';/*! © 2025-2026 AND YOU CREATE SAS (RCS Paris 940 190 614). Proprietary — see LICENSE (Standards SDK License 1.0). */
|
|
2
|
-
function c(n){return typeof n=="object"&&n!==null&&"id"in n?n.id:n}a(c,"extractRelationId");function p(n,e=a$1){let i=z.guid({message:e.invalidId(n)}),r=z.union([i,z.null()]);return z.union([r,z.object({id:i,props:z.record(z.string(),z.unknown()).optional()}).passthrough()])}a(p,"createSingleRelationValidator");function m(n,e=a$1){let i=z.guid({message:e.invalidId(n)}),r=z.union([i,z.object({id:i,props:z.record(z.string(),z.unknown()).optional()}).passthrough()]),u=z.array(r);return n.maxItems!==void 0&&(u=u.max(n.maxItems,e.maxItems(n,n.maxItems))),u.refine(s=>s.every(d=>{let l=c(d);return typeof l=="string"&&i.safeParse(l).success}),{message:e.invalidId(n)})}a(m,"createMultiRelationValidator");function g(n,e=a$1){return n.cardinality==="many"?m(n,e):p(n,e)}a(g,"createRelationValidator");export{p as a,m as b,g as c};
|
package/dist/chunk-GXSNLYRR.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
'use strict';var chunkJFSQ24XR_js=require('./chunk-JFSQ24XR.js'),chunkDPD6ZWL2_js=require('./chunk-DPD6ZWL2.js'),constants=require('@stndrds/constants'),zod=require('zod'),libphonenumberJs=require('libphonenumber-js');/*! © 2025-2026 AND YOU CREATE SAS (RCS Paris 940 190 614). Proprietary — see LICENSE (Standards SDK License 1.0). */
|
|
2
|
-
function u(t){return t.replace(/\D/g,"")}chunkDPD6ZWL2_js.a(u,"digitsOnly");function b(t){return u(t)}chunkDPD6ZWL2_js.a(b,"normalizeCountrylessPhoneNumber");function p(t){return constants.getCountryByIso3(t)?.iso2}chunkDPD6ZWL2_js.a(p,"getIso2");function y(t,e){if(!t)return "";let r=p(e);if(!r)return u(t);let i=libphonenumberJs.parsePhoneNumberFromString(t,r);if(i)return i.nationalNumber;let s=constants.getCountryByIso3(e),o=u(t);if(s){let d=s.phoneCode.replace("+",""),g=o.startsWith(d)?o.slice(d.length):o;return constants.stripTrunkPrefix(g,s.phoneTrunkPrefix??"")}return o}chunkDPD6ZWL2_js.a(y,"normalizePhoneNumber");function x(t){if(!t.phoneNumber)return "";let e=p(t.countryCode),i=constants.getCountryByIso3(t.countryCode)?.phoneCode??"";if(!e)return `${i} ${t.phoneNumber}`.trim();let s=`${i}${u(t.phoneNumber)}`,o=libphonenumberJs.parsePhoneNumberFromString(s);return o?o.formatInternational():`${i} ${t.phoneNumber}`.trim()}chunkDPD6ZWL2_js.a(x,"formatPhoneForDisplay");function A(t,e=chunkJFSQ24XR_js.a){return zod.z.object({countryCode:zod.z.string().length(3),phoneNumber:zod.z.string().min(1)},{message:e.invalidPhone(t)}).refine(r=>constants.isValidIso3(r.countryCode),{message:"Invalid country code"}).transform(r=>({countryCode:r.countryCode,phoneNumber:y(r.phoneNumber,r.countryCode)}))}chunkDPD6ZWL2_js.a(A,"createPhoneValidator");exports.a=b;exports.b=y;exports.c=x;exports.d=A;
|
package/dist/chunk-IBM4ID4Y.js
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
'use strict';var chunkLWSOKXPF_js=require('./chunk-LWSOKXPF.js'),chunkXXTKNIBK_js=require('./chunk-XXTKNIBK.js'),chunkJOS2XMXY_js=require('./chunk-JOS2XMXY.js'),chunk47KVYDKG_js=require('./chunk-47KVYDKG.js'),chunkKLR22JMC_js=require('./chunk-KLR22JMC.js'),chunkGXSNLYRR_js=require('./chunk-GXSNLYRR.js'),chunkUXISKZ5Y_js=require('./chunk-UXISKZ5Y.js'),chunkXUAP7KWK_js=require('./chunk-XUAP7KWK.js'),chunkJVLH3DVZ_js=require('./chunk-JVLH3DVZ.js'),chunkLSCBR4VS_js=require('./chunk-LSCBR4VS.js'),chunk23KPS33D_js=require('./chunk-23KPS33D.js'),chunkJSKLP4GI_js=require('./chunk-JSKLP4GI.js'),chunkXHEBV2HE_js=require('./chunk-XHEBV2HE.js'),chunkSLYRQ72J_js=require('./chunk-SLYRQ72J.js'),chunkJFSQ24XR_js=require('./chunk-JFSQ24XR.js'),chunkDPD6ZWL2_js=require('./chunk-DPD6ZWL2.js'),zod=require('zod');/*! © 2025-2026 AND YOU CREATE SAS (RCS Paris 940 190 614). Proprietary — see LICENSE (Standards SDK License 1.0). */
|
|
2
|
-
function N(t){return t==null||typeof t=="string"&&t.trim()===""?true:t instanceof Date?false:typeof t=="object"&&!Array.isArray(t)?Object.values(t).every(e=>e==null||typeof e=="string"&&e.trim()===""):false}chunkDPD6ZWL2_js.a(N,"isEmptyValue");function c(t){return zod.z.preprocess(e=>N(e)?null:e,t.nullish())}chunkDPD6ZWL2_js.a(c,"withEmptyToNull");function s(t,e=chunkJFSQ24XR_js.a){switch(t.type){case "text":return chunkXHEBV2HE_js.c(t,e);case "richtext":return chunkJVLH3DVZ_js.a(t,e);case "number":return chunkSLYRQ72J_js.a(t,e);case "checkbox":return chunk47KVYDKG_js.a(t,e);case "date":return chunkKLR22JMC_js.a(t,e);case "phone":return chunkGXSNLYRR_js.d(t,e);case "currency":return chunkUXISKZ5Y_js.a(t,e);case "status":return chunkLSCBR4VS_js.c(t,e);case "location":return chunkXUAP7KWK_js.a(t,e);case "select":return chunkLSCBR4VS_js.a(t,e);case "multiselect":return chunkLSCBR4VS_js.b(t,e);case "user":return chunk23KPS33D_js.a(t,e);case "relation":return chunkLWSOKXPF_js.c(t,e);case "formula":return chunkXXTKNIBK_js.a(t,e);case "rollup":return chunkJOS2XMXY_js.a(t,e);default:return zod.z.unknown()}}chunkDPD6ZWL2_js.a(s,"createAttributeValidator");function q(t,e=chunkJFSQ24XR_js.a){let o=s(t,e);return t.required?o:c(o)}chunkDPD6ZWL2_js.a(q,"createFormAttributeValidator");function ft(t){return t==null||t===""}chunkDPD6ZWL2_js.a(ft,"isNullishOrEmptyString");function f(t){return t==null?false:typeof t=="string"?t.trim()!=="":Array.isArray(t)?t.length>0:true}chunkDPD6ZWL2_js.a(f,"isValuePresent");var E=new WeakMap,M=new WeakMap;function p(t){let e=E.get(t);if(e)return e;let o={};for(let n of t.attributes){let a=s(n);n.required?o[n.name]=a.refine(f,{message:chunkJFSQ24XR_js.a.required(n)}):o[n.name]=c(a);}let r=zod.z.object(o).passthrough();return E.set(t,r),r}chunkDPD6ZWL2_js.a(p,"createObjectValidator");function m(t){let e=M.get(t);if(e)return e;let o={};for(let n of t.attributes){let a=s(n);o[n.name]=c(a);}let r=zod.z.object(o).passthrough();return M.set(t,r),r}chunkDPD6ZWL2_js.a(m,"createDraftValidator");function F(t,e){let o=s(t);if(!t.required&&e==null)return {success:true,data:{[t.name]:e}};let r=o.safeParse(e);return r.success?{success:true,data:{[t.name]:r.data}}:{success:false,errors:chunkJFSQ24XR_js.b(r.error).map(n=>({path:[t.name,...n.path],message:n.message}))}}chunkDPD6ZWL2_js.a(F,"validateAttribute");function b(t,e){let r=p(t).safeParse(e);return r.success?{success:true,data:r.data}:{success:false,errors:chunkJFSQ24XR_js.b(r.error)}}chunkDPD6ZWL2_js.a(b,"validateObject");function L(t,e){let o=b(t,e);if(!o.success){let r=o.errors??[],n=r.map(a=>`${a.path.join(".")}: ${a.message}`).join(`
|
|
3
|
-
`)||"Unknown validation error";throw new chunkJSKLP4GI_js.h(`Validation failed for ${t.label}:
|
|
4
|
-
${n}`,r.map(a=>({path:a.path,message:a.message})))}return o.data}chunkDPD6ZWL2_js.a(L,"validateObjectOrThrow");function Z(t,e){let r=m(t).safeParse(e);return r.success?{success:true,data:r.data}:{success:false,errors:chunkJFSQ24XR_js.b(r.error)}}chunkDPD6ZWL2_js.a(Z,"validateDraft");function v(t,e){let o=Z(t,e);if(!o.success){let r=o.errors??[],n=r.map(a=>`${a.path.join(".")}: ${a.message}`).join(`
|
|
5
|
-
`)||"Unknown validation error";throw new chunkJSKLP4GI_js.h(`Draft validation failed for ${t.label}:
|
|
6
|
-
${n}`,r.map(a=>({path:a.path,message:a.message})))}return o.data}chunkDPD6ZWL2_js.a(v,"validateDraftOrThrow");function I(t,e){let o=new Set(t.attributes.map(n=>n.name)),r=Object.keys(e).filter(n=>!o.has(n));if(r.length>0)throw new chunkJSKLP4GI_js.h(`Unknown attribute${r.length>1?"s":""} for ${t.label}: ${r.join(", ")}`,r.map(n=>({path:[n],message:"Unknown attribute"})))}chunkDPD6ZWL2_js.a(I,"rejectUnknownAttributesOrThrow");function $(t,e){let o=[];for(let r of t.attributes)r.required&&!f(e[r.name])&&o.push(r);return o}chunkDPD6ZWL2_js.a($,"getMissingRequiredAttributes");function _(t,e){return $(t,e).length>0?false:b(t,e).success}chunkDPD6ZWL2_js.a(_,"isRecordComplete");exports.a=ft;exports.b=f;exports.c=s;exports.d=q;exports.e=p;exports.f=m;exports.g=F;exports.h=b;exports.i=L;exports.j=Z;exports.k=v;exports.l=I;exports.m=$;exports.n=_;
|
package/dist/chunk-JFSQ24XR.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
'use strict';var chunkDPD6ZWL2_js=require('./chunk-DPD6ZWL2.js');/*! © 2025-2026 AND YOU CREATE SAS (RCS Paris 940 190 614). Proprietary — see LICENSE (Standards SDK License 1.0). */
|
|
2
|
-
var l={required:chunkDPD6ZWL2_js.a(e=>`${e.label} is required`,"required"),invalidType:chunkDPD6ZWL2_js.a((e,t)=>`${e.label} must be a ${t}`,"invalidType"),minLength:chunkDPD6ZWL2_js.a((e,t)=>`${e.label} must be at least ${t} characters`,"minLength"),maxLength:chunkDPD6ZWL2_js.a((e,t)=>`${e.label} must be at most ${t} characters`,"maxLength"),invalidPattern:chunkDPD6ZWL2_js.a(e=>`${e.label} format is invalid`,"invalidPattern"),minValue:chunkDPD6ZWL2_js.a((e,t)=>`${e.label} must be at least ${t}`,"minValue"),maxValue:chunkDPD6ZWL2_js.a((e,t)=>`${e.label} must be at most ${t}`,"maxValue"),mustBeInteger:chunkDPD6ZWL2_js.a(e=>`${e.label} must be an integer`,"mustBeInteger"),invalidDate:chunkDPD6ZWL2_js.a(e=>`${e.label} must be a valid date`,"invalidDate"),invalidOption:chunkDPD6ZWL2_js.a((e,t)=>`${e.label} must be one of: ${t.join(", ")}`,"invalidOption"),invalidId:chunkDPD6ZWL2_js.a(e=>`${e.label} must be a valid ID`,"invalidId"),maxItems:chunkDPD6ZWL2_js.a((e,t)=>`${e.label} must have at most ${t} item${t>1?"s":""}`,"maxItems"),invalidRichtext:chunkDPD6ZWL2_js.a(e=>`${e.label} must be valid rich text content`,"invalidRichtext"),invalidPhone:chunkDPD6ZWL2_js.a(e=>`${e.label} must be a valid phone number`,"invalidPhone"),invalidCurrency:chunkDPD6ZWL2_js.a(e=>`${e.label} must be a valid currency value`,"invalidCurrency"),invalidLocation:chunkDPD6ZWL2_js.a(e=>`${e.label} must be a valid location`,"invalidLocation")};function i(e){return e.issues.map(t=>({path:t.path.map(String),message:t.message}))}chunkDPD6ZWL2_js.a(i,"formatZodErrors");exports.a=l;exports.b=i;
|
package/dist/chunk-JOS2XMXY.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
'use strict';var chunkJFSQ24XR_js=require('./chunk-JFSQ24XR.js'),chunkDPD6ZWL2_js=require('./chunk-DPD6ZWL2.js'),zod=require('zod');/*! © 2025-2026 AND YOU CREATE SAS (RCS Paris 940 190 614). Proprietary — see LICENSE (Standards SDK License 1.0). */
|
|
2
|
-
function s(r,a=chunkJFSQ24XR_js.a){return zod.z.unknown()}chunkDPD6ZWL2_js.a(s,"createRollupValidator");exports.a=s;
|
package/dist/chunk-JSKLP4GI.js
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
'use strict';var chunkDPD6ZWL2_js=require('./chunk-DPD6ZWL2.js');/*! © 2025-2026 AND YOU CREATE SAS (RCS Paris 940 190 614). Proprietary — see LICENSE (Standards SDK License 1.0). */
|
|
2
|
-
var _={DRAFT_REVISION_CONFLICT:"DRAFT_REVISION_CONFLICT",UNKNOWN:"SCHEMA_UNKNOWN_ERROR",OBJECT_NOT_FOUND:"SCHEMA_OBJECT_NOT_FOUND",ATTRIBUTE_NOT_FOUND:"SCHEMA_ATTRIBUTE_NOT_FOUND",RECORD_NOT_FOUND:"SCHEMA_RECORD_NOT_FOUND",SOURCE_NOT_FOUND:"SCHEMA_SOURCE_NOT_FOUND",ROLE_NOT_FOUND:"SCHEMA_ROLE_NOT_FOUND",MEMORY_NOT_FOUND:"SCHEMA_MEMORY_NOT_FOUND",SCHEMA_PLAN_NOT_FOUND:"SCHEMA_PLAN_NOT_FOUND",VALIDATION_FAILED:"SCHEMA_VALIDATION_FAILED",INVALID_ATTRIBUTE_NAME:"SCHEMA_INVALID_ATTRIBUTE_NAME",INVALID_OBJECT_NAME:"SCHEMA_INVALID_OBJECT_NAME",RESERVED_OBJECT_NAME:"SCHEMA_RESERVED_OBJECT_NAME",PROTECTED_OBJECT:"SCHEMA_PROTECTED_OBJECT",PROTECTED_ATTRIBUTE:"SCHEMA_PROTECTED_ATTRIBUTE",PROTECTED_VIEW:"SCHEMA_PROTECTED_VIEW",PROTECTED_ROLE:"SCHEMA_PROTECTED_ROLE",FORBIDDEN:"SCHEMA_FORBIDDEN",ACCESS_DENIED:"SCHEMA_ACCESS_DENIED",WORKSPACE_INVARIANT:"SCHEMA_WORKSPACE_INVARIANT",STATE_GATE:"SCHEMA_STATE_GATE",ACTOR_CONTEXT_REQUIRED:"SCHEMA_ACTOR_CONTEXT_REQUIRED",CONNECTOR_AUTH_FAILED:"SCHEMA_CONNECTOR_AUTH_FAILED",CONNECTOR_INVALID_STATE:"SCHEMA_CONNECTOR_INVALID_STATE",CONNECTOR_GRANT_ORPHANED:"SCHEMA_CONNECTOR_GRANT_ORPHANED",SYNC_FAILED:"SCHEMA_SYNC_FAILED",SYNC_CONFLICT:"SCHEMA_SYNC_CONFLICT",SYNC_CASCADE:"SCHEMA_SYNC_CASCADE",ORPHAN_SYSTEM_ATTRIBUTE:"SCHEMA_ORPHAN_SYSTEM_ATTRIBUTE",SYSTEM_ENTITY_IMMUTABLE:"SCHEMA_SYSTEM_ENTITY_IMMUTABLE",DESTRUCTIVE_NOT_ALLOWED:"SCHEMA_DESTRUCTIVE_NOT_ALLOWED",MIGRATION_TIMEOUT:"SCHEMA_MIGRATION_TIMEOUT",CHANGE_TYPE_NOT_SUPPORTED:"SCHEMA_CHANGE_TYPE_NOT_SUPPORTED",DUPLICATE:"SCHEMA_DUPLICATE",DUPLICATE_OBJECT:"SCHEMA_DUPLICATE_OBJECT",DUPLICATE_ATTRIBUTE:"SCHEMA_DUPLICATE_ATTRIBUTE",CONFLICT:"SCHEMA_CONFLICT",STORAGE_UPLOAD_FAILED:"SCHEMA_STORAGE_UPLOAD_FAILED",STORAGE_DOWNLOAD_FAILED:"SCHEMA_STORAGE_DOWNLOAD_FAILED",STORAGE_DELETE_FAILED:"SCHEMA_STORAGE_DELETE_FAILED",STORAGE_URL_FAILED:"SCHEMA_STORAGE_URL_FAILED",REPOSITORY_CREATE_FAILED:"SCHEMA_REPOSITORY_CREATE_FAILED",REPOSITORY_UPDATE_FAILED:"SCHEMA_REPOSITORY_UPDATE_FAILED",REPOSITORY_DELETE_FAILED:"SCHEMA_REPOSITORY_DELETE_FAILED",REPOSITORY_QUERY_FAILED:"SCHEMA_REPOSITORY_QUERY_FAILED",NOT_IMPLEMENTED:"SCHEMA_NOT_IMPLEMENTED",TIMEOUT:"SCHEMA_TIMEOUT",RECORD_REFERENCED:"SCHEMA_RECORD_REFERENCED",ATTRIBUTE_IN_USE:"SCHEMA_ATTRIBUTE_IN_USE",OBJECT_REFERENCED:"SCHEMA_OBJECT_REFERENCED",CONFIGURATION_REQUIRED:"CONFIGURATION_REQUIRED",SEARCH_ADAPTER_REQUIRED:"SEARCH_ADAPTER_REQUIRED",CRON_REGISTRATION_FAILED:"CRON_REGISTRATION_FAILED",SEARCH_BACKEND_FAILED:"SEARCH_BACKEND_FAILED",INVARIANT_VIOLATION:"INVARIANT_VIOLATION",TENANT_CONTEXT_MISSING:"TENANT_CONTEXT_MISSING",FEATURE_FLAGS_CONTEXT:"FEATURE_FLAGS_CONTEXT",REALTIME_RATE_LIMITED:"REALTIME_RATE_LIMITED",REALTIME_DELIVERY_FAILED:"REALTIME_DELIVERY_FAILED",REALTIME_SUBSCRIPTION_FAILED:"REALTIME_SUBSCRIPTION_FAILED",AGENT_UNKNOWN:"AGENT_UNKNOWN",AGENT_DEPTH_EXCEEDED:"AGENT_DEPTH_EXCEEDED",AGENT_COST_LIMIT_EXCEEDED:"AGENT_COST_LIMIT_EXCEEDED",AGENT_TREE_COST_LIMIT_EXCEEDED:"AGENT_TREE_COST_LIMIT_EXCEEDED",CREDITS_EXHAUSTED:"CREDITS_EXHAUSTED",QUOTA_EXCEEDED:"QUOTA_EXCEEDED",AGENT_SESSION_NOT_FOUND:"AGENT_SESSION_NOT_FOUND",AGENT_DEFINITION_NOT_FOUND:"AGENT_DEFINITION_NOT_FOUND",AGENT_RUN_CONFIG:"AGENT_RUN_CONFIG",AGENT_STREAMING:"AGENT_STREAMING",AGENT_MISSING_ACTOR:"AGENT_MISSING_ACTOR",AGENT_INVALID_STATE:"AGENT_INVALID_STATE",AGENT_COMPACTION_IMPOSSIBLE:"AGENT_COMPACTION_IMPOSSIBLE",AGENT_COMPACTION_TIMEOUT:"AGENT_COMPACTION_TIMEOUT",AGENT_LEASE_HELD:"AGENT_LEASE_HELD",AGENT_WORK_MODE_REQUIRED:"AGENT_WORK_MODE_REQUIRED",AGENT_MESSAGE_NOT_FOUND:"AGENT_MESSAGE_NOT_FOUND",AGENT_MESSAGE_NOT_EDITABLE:"AGENT_MESSAGE_NOT_EDITABLE",DEVICE_NOT_FOUND:"DEVICE_NOT_FOUND",DEVICE_OFFLINE:"DEVICE_OFFLINE",AI_UNKNOWN:"AI_UNKNOWN",AI_USAGE_LIMIT_EXCEEDED:"AI_USAGE_LIMIT_EXCEEDED",AI_INVALID_USAGE:"AI_INVALID_USAGE",AI_INVALID_MODEL:"AI_INVALID_MODEL",AI_INVALID_MODEL_INPUT:"AI_INVALID_MODEL_INPUT",AI_REPOSITORY_ERROR:"AI_REPOSITORY_ERROR",AI_GENERATION_FAILED:"AI_GENERATION_FAILED",AI_IMAGE_USAGE_PENDING:"AI_IMAGE_USAGE_PENDING",AI_IMAGE_GENERATION_INDETERMINATE:"AI_IMAGE_GENERATION_INDETERMINATE",AI_IMAGE_PUBLICATION_FAILED:"AI_IMAGE_PUBLICATION_FAILED",DOCUMENT_MIME_NOT_ACCEPTED:"DOCUMENT_MIME_NOT_ACCEPTED",DOCUMENT_MULTIPLE_NOT_ALLOWED:"DOCUMENT_MULTIPLE_NOT_ALLOWED",DOCUMENT_NOT_FOUND_FOR_OPERATION:"DOCUMENT_NOT_FOUND_FOR_OPERATION",DOCUMENT_STORAGE_FAILED:"DOCUMENT_STORAGE_FAILED",DOCUMENT_SIZE_EXCEEDED:"DOCUMENT_SIZE_EXCEEDED",DOCUMENT_OCR_FAILED:"DOCUMENT_OCR_FAILED",DOCUMENT_BLOB_EMPTY:"DOCUMENT_BLOB_EMPTY",DOCUMENT_FILE_TOO_LARGE:"DOCUMENT_FILE_TOO_LARGE",DOCUMENT_FILE_NOT_FOUND:"DOCUMENT_FILE_NOT_FOUND",DOCUMENT_FILE_ALREADY_PACKED:"DOCUMENT_FILE_ALREADY_PACKED",DOCUMENT_RECORD_NOT_FOUND:"DOCUMENT_RECORD_NOT_FOUND",DOCUMENT_RECORD_OBJECT_MISMATCH:"DOCUMENT_RECORD_OBJECT_MISMATCH",DOCUMENT_FOLDER_SERVICE_UNAVAILABLE:"DOCUMENT_FOLDER_SERVICE_UNAVAILABLE",DOCUMENT_FOLDER_PATH_NOT_FOUND:"DOCUMENT_FOLDER_PATH_NOT_FOUND",EMAIL_PROVIDER_API_FAILED:"EMAIL_PROVIDER_API_FAILED",EMAIL_SEND_FAILED:"EMAIL_SEND_FAILED",EMAIL_SENT_NOT_STORED:"EMAIL_SENT_NOT_STORED",EMAIL_BATCH_ITEM_FAILED:"EMAIL_BATCH_ITEM_FAILED",CALENDAR_PROVIDER_API_FAILED:"CALENDAR_PROVIDER_API_FAILED",REFLEX_INVALID_TRANSITION:"REFLEX_INVALID_TRANSITION",REFLEX_INVALID_TOKEN:"REFLEX_INVALID_TOKEN",REFLEX_CAPABILITY_DENIED:"REFLEX_CAPABILITY_DENIED",REFLEX_GATEWAY_UNAVAILABLE:"REFLEX_GATEWAY_UNAVAILABLE",REFLEX_BUNDLE_FAILED:"REFLEX_BUNDLE_FAILED",REFLEX_EGRESS_DENIED:"REFLEX_EGRESS_DENIED",REFLEX_PROTOCOL_VIOLATION:"REFLEX_PROTOCOL_VIOLATION",REFLEX_RUN_FAILED:"REFLEX_RUN_FAILED",REFLEX_RUN_TIMEOUT:"REFLEX_RUN_TIMEOUT",REFLEX_DEPENDENCY_DRIFT:"REFLEX_DEPENDENCY_DRIFT",REFLEX_NOT_READY:"REFLEX_NOT_READY",REFLEX_INVARIANT_VIOLATION:"REFLEX_INVARIANT_VIOLATION",EMBEDDING_MODEL_UNAVAILABLE:"EMBEDDING_MODEL_UNAVAILABLE",EMBEDDING_DIMENSION_MISMATCH:"EMBEDDING_DIMENSION_MISMATCH"},R=class R extends Error{constructor(E,e=_.UNKNOWN,t){super(E),this.name="SchemaError",this.code=e,this.details=t,Object.setPrototypeOf(this,new.target.prototype);}toJSON(){return {name:this.name,code:this.code,message:this.message,details:this.details}}};chunkDPD6ZWL2_js.a(R,"SchemaError");var r=R,C=class C extends r{constructor(e,t,T=_.RECORD_NOT_FOUND,n=`${e} with id "${t}" not found`){super(n,T,{resourceType:e,resourceId:t});this._tag="NotFoundError";this.name="NotFoundError",this.resourceType=e,this.resourceId=t;}};chunkDPD6ZWL2_js.a(C,"NotFoundError");var N=C,L=class L extends N{constructor(E){super("Object",E,_.OBJECT_NOT_FOUND),this.name="ObjectNotFoundError";}};chunkDPD6ZWL2_js.a(L,"ObjectNotFoundError");var J=L,S=class S extends N{constructor(E){super("Attribute",E,_.ATTRIBUTE_NOT_FOUND),this.name="AttributeNotFoundError";}};chunkDPD6ZWL2_js.a(S,"AttributeNotFoundError");var K=S,c=class c extends N{constructor(E){super("Record",E,_.RECORD_NOT_FOUND),this.name="RecordNotFoundError";}};chunkDPD6ZWL2_js.a(c,"RecordNotFoundError");var k=c,M=class M extends N{constructor(E){super("Schema plan",E,_.SCHEMA_PLAN_NOT_FOUND),this.name="SchemaPlanNotFoundError";}};chunkDPD6ZWL2_js.a(M,"SchemaPlanNotFoundError");var v=M,O=class O extends r{constructor(e,t){super(e,_.VALIDATION_FAILED,{errors:t});this._tag="ValidationError";this.name="ValidationError",this.errors=t;}static fromZodErrors(e){let t=e.map(n=>({path:n.path.map(String),message:n.message})),T=`Validation failed: ${t.map(n=>`${n.path.join(".")}: ${n.message}`).join(", ")}`;return new O(T,t)}};chunkDPD6ZWL2_js.a(O,"ValidationError");var I=O,d=class d extends r{constructor(E,e,t){let T=E==="object"?_.PROTECTED_OBJECT:E==="view"?_.PROTECTED_VIEW:_.PROTECTED_ATTRIBUTE;super(`Cannot ${t} system ${E} "${e}"`,T,{resourceType:E,resourceName:e,operation:t}),this.name="ProtectedResourceError",this.resourceType=E,this.resourceName=e,this.operation=t;}};chunkDPD6ZWL2_js.a(d,"ProtectedResourceError");var o=d,U=class U extends r{constructor(E,e,t){super(`Failed to sync object "${E}": ${e}`,_.SYNC_FAILED,{objectName:E,cause:t?.message}),this.name="SyncError",this.objectName=E,this.cause=t;}};chunkDPD6ZWL2_js.a(U,"SyncError");var Q=U,F=class F extends r{constructor(E,e){super(`Cannot mutate system ${E} "${e}". System entities are declared in code and immutable at runtime.`,_.SYSTEM_ENTITY_IMMUTABLE,{entityType:E,entityName:e}),this.name="SystemEntityImmutableError",this.entityType=E,this.entityName=e;}};chunkDPD6ZWL2_js.a(F,"SystemEntityImmutableError");var Z=F,l=class l extends r{constructor(E){let e=E.attributeName?`"${E.objectName}.${E.attributeName}"`:`"${E.objectName}"`;super(`Cannot promote runtime entity ${e}: ${E.reason}. Resolve via: (1) relax the code constraint, (2) migrate runtime values manually, or (3) rename the code declaration.`,_.SYNC_CONFLICT,{objectName:E.objectName,attributeName:E.attributeName,reason:E.reason}),this.name="SyncConflictError",this.objectName=E.objectName,this.attributeName=E.attributeName,this.reason=E.reason;}};chunkDPD6ZWL2_js.a(l,"SyncConflictError");var q=l,u=class u extends r{constructor(E,e){super(`Cannot demote object "${E}": attributes ${e.join(", ")} are still declared in code. Remove them from code first, or restore the object.`,_.SYNC_CASCADE,{objectName:E,conflictingAttributes:e}),this.name="SyncCascadeError",this.objectName=E,this.conflictingAttributes=e;}};chunkDPD6ZWL2_js.a(u,"SyncCascadeError");var z=u,g=class g extends r{constructor(E,e){super(`Attribute "${E}.${e}" is system:true but its object parent is system:false. This is an invariant violation.`,_.ORPHAN_SYSTEM_ATTRIBUTE,{objectName:E,attributeName:e}),this.name="OrphanSystemAttributeError",this.objectName=E,this.attributeName=e;}};chunkDPD6ZWL2_js.a(g,"OrphanSystemAttributeError");var EE=g,m=class m extends r{constructor(E){let e=E.map(t=>{let T=t;return T.name?`- ${t.type} "${T.name}"`:`- ${t.type}`}).join(`
|
|
3
|
-
`);super(`Destructive schema operations detected (data will be lost):
|
|
4
|
-
${e}
|
|
5
|
-
|
|
6
|
-
These are applied only under an explicit opt-in; without it boot demotes the object to runtime and keeps its rows. To let Standards apply them automatically, set the environment variable:
|
|
7
|
-
STANDARDS_ALLOW_DESTRUCTIVE_SYNC=1
|
|
8
|
-
|
|
9
|
-
Otherwise, revert your code changes or back up the data first.`,_.DESTRUCTIVE_NOT_ALLOWED,{operations:E}),this.name="DestructiveSyncNotAllowedError",this.operations=E;}};chunkDPD6ZWL2_js.a(m,"DestructiveSyncNotAllowedError");var eE=m,h=class h extends r{constructor(E,e,t,T){super(`Migration for "${E}" exceeded the maximum duration (${T}ms). Migrated ${e}/${t} records before timeout. Increase STANDARDS_MIGRATION_MAX_DURATION_MS or split the migration into smaller batches.`,_.MIGRATION_TIMEOUT,{objectName:E,migrated:e,total:t,maxDurationMs:T}),this.name="MigrationTimeoutError",this.objectName=E,this.migrated=e,this.total=t,this.maxDurationMs=T;}};chunkDPD6ZWL2_js.a(h,"MigrationTimeoutError");var tE=h,p=class p extends r{constructor(E,e){super(`Cannot change type of attribute "${E}.${e}" via runtime API. Declare a migration in your schema code:
|
|
10
|
-
object("${E}").migration(N, (m) =>
|
|
11
|
-
m.changeType("${e}", from, to, { transform: (v) => ... })
|
|
12
|
-
)`,_.CHANGE_TYPE_NOT_SUPPORTED,{objectName:E,attributeName:e}),this.name="ChangeTypeNotSupportedError",this.objectName=E,this.attributeName=e;}};chunkDPD6ZWL2_js.a(p,"ChangeTypeNotSupportedError");var _E=p,P=class P extends r{constructor(E,e,t){let T=E==="object"?_.DUPLICATE_OBJECT:E==="attribute"?_.DUPLICATE_ATTRIBUTE:_.DUPLICATE,n=`${E.charAt(0).toUpperCase()}${E.slice(1)} "${e}" already exists`;super(t??n,T,{resourceType:E,resourceName:e}),this.name="DuplicateError",this.resourceType=E,this.resourceName=e;}};chunkDPD6ZWL2_js.a(P,"DuplicateError");var sE=P,RE={builder:"cannot be built by a consumer",registry:"cannot be registered by a consumer",bundle:"cannot be claimed by a bundle",source:"cannot be declared by a schema source"},G=class G extends r{constructor(E,e){super(`"${E}" is a framework-native object name and ${RE[e]}: the framework ships it, pick another name.`,_.RESERVED_OBJECT_NAME,{objectName:E,context:e}),this.name="ReservedObjectNameError",this.objectName=E;}};chunkDPD6ZWL2_js.a(G,"ReservedObjectNameError");var TE=G;function CE(A){return A instanceof r}chunkDPD6ZWL2_js.a(CE,"isSchemaError");function LE(A){return A instanceof N}chunkDPD6ZWL2_js.a(LE,"isNotFoundError");function SE(A){return A instanceof I}chunkDPD6ZWL2_js.a(SE,"isValidationError");function cE(A){return A instanceof o}chunkDPD6ZWL2_js.a(cE,"isProtectedResourceError");var y=class y extends r{constructor(e,t,T){super(`No ${t} permission on object "${e}"`,_.FORBIDDEN,{objectName:e,action:t,userId:T});this._tag="ForbiddenError";this.name="ForbiddenError",this.objectName=e,this.action=t,this.userId=T;}};chunkDPD6ZWL2_js.a(y,"ForbiddenError");var rE=y,x=class x extends r{constructor(E,e){super(`Cannot ${e} system role "${E}"`,_.PROTECTED_ROLE,{roleName:E,operation:e}),this.name="ProtectedRoleError",this.roleName=E,this.operation=e;}};chunkDPD6ZWL2_js.a(x,"ProtectedRoleError");var nE=x,H=class H extends N{constructor(E){super("Role",E,_.ROLE_NOT_FOUND),this.name="RoleNotFoundError";}};chunkDPD6ZWL2_js.a(H,"RoleNotFoundError");var AE=H,b=class b extends r{constructor(E){super(`Record ${E} was modified by another request. Please refresh and try again.`,_.CONFLICT,{recordId:E});}};chunkDPD6ZWL2_js.a(b,"ConcurrentModificationError");var NE=b,B=class B extends r{constructor(E,e,t,T){let n=E==="upload"?_.STORAGE_UPLOAD_FAILED:E==="download"?_.STORAGE_DOWNLOAD_FAILED:E==="delete"?_.STORAGE_DELETE_FAILED:_.STORAGE_URL_FAILED;super(`Storage ${E} failed: ${e}`,n,{operation:E,path:t,cause:T}),this.name="StorageError",this.operation=E,this.path=t,this.cause=T;}};chunkDPD6ZWL2_js.a(B,"StorageError");var OE=B,V=class V extends r{constructor(E,e){super(e??`Access denied to resource: ${E}`,_.ACCESS_DENIED,{resource:E,reason:e}),this.name="AccessDeniedError",this.resource=E,this.reason=e;}};chunkDPD6ZWL2_js.a(V,"AccessDeniedError");var IE=V,$=class $ extends r{constructor(E,e,t,T){let n=E==="create"?_.REPOSITORY_CREATE_FAILED:E==="update"?_.REPOSITORY_UPDATE_FAILED:E==="delete"?_.REPOSITORY_DELETE_FAILED:_.REPOSITORY_QUERY_FAILED;super(`Failed to ${E} ${e}: ${t}${T?` (${T})`:""}`,n,{operation:E,entity:e,cause:T}),this.name="RepositoryError",this.operation=E,this.entity=e,this.cause=T;}};chunkDPD6ZWL2_js.a($,"RepositoryError");var oE=$,Y=class Y extends r{constructor(E,e){super(`Search backend unavailable for ${E}`,_.SEARCH_BACKEND_FAILED,{scope:E,cause:e}),this.name="SearchBackendError",this.scope=E,this.cause=e;}};chunkDPD6ZWL2_js.a(Y,"SearchBackendError");var DE=Y,f=class f extends r{constructor(E,e){let t=e?`${E}: not implemented (${e})`:`${E}: not implemented`;super(t,_.NOT_IMPLEMENTED,{feature:E,milestone:e}),this.name="NotImplementedError",this.feature=E,this.milestone=e;}};chunkDPD6ZWL2_js.a(f,"NotImplementedError");var iE=f,X=class X extends N{constructor(E){super("Memory",E,_.MEMORY_NOT_FOUND),this.name="MemoryNotFoundError";}};chunkDPD6ZWL2_js.a(X,"MemoryNotFoundError");var aE=X,j=class j extends r{constructor(E,e){let t=e.reduce((T,n)=>T+n.count,0);super(`Cannot delete record: referenced by ${t} record${t>1?"s":""}`,_.RECORD_REFERENCED,{recordId:E,references:e}),this.name="RecordReferencedError",this.recordId=E,this.references=e;}};chunkDPD6ZWL2_js.a(j,"RecordReferencedError");var D=j,W=class W extends r{constructor(E,e){super(`Cannot delete attribute "${E}": used in ${e}`,_.ATTRIBUTE_IN_USE,{attributeName:E,usage:e}),this.name="AttributeInUseError",this.attributeName=E,this.usage=e;}};chunkDPD6ZWL2_js.a(W,"AttributeInUseError");var i=W,w=class w extends r{constructor(E,e){super(`Cannot delete object "${E}": target of relations in ${e.join(", ")}`,_.OBJECT_REFERENCED,{objectName:E,referencingObjects:e}),this.name="ObjectReferencedError",this.objectName=E,this.referencingObjects=e;}};chunkDPD6ZWL2_js.a(w,"ObjectReferencedError");var a=w;function ME(A){return A instanceof D}chunkDPD6ZWL2_js.a(ME,"isRecordReferencedError");function dE(A){return A instanceof i}chunkDPD6ZWL2_js.a(dE,"isAttributeInUseError");function UE(A){return A instanceof a}chunkDPD6ZWL2_js.a(UE,"isObjectReferencedError");exports.A=NE;exports.B=OE;exports.C=IE;exports.D=oE;exports.E=DE;exports.F=iE;exports.G=aE;exports.H=D;exports.I=i;exports.J=a;exports.K=ME;exports.L=dE;exports.M=UE;exports.a=_;exports.b=r;exports.c=N;exports.d=J;exports.e=K;exports.f=k;exports.g=v;exports.h=I;exports.i=o;exports.j=Q;exports.k=Z;exports.l=q;exports.m=z;exports.n=EE;exports.o=eE;exports.p=tE;exports.q=_E;exports.r=sE;exports.s=TE;exports.t=CE;exports.u=LE;exports.v=SE;exports.w=cE;exports.x=rE;exports.y=nE;exports.z=AE;
|
package/dist/chunk-JVLH3DVZ.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
'use strict';var chunkJFSQ24XR_js=require('./chunk-JFSQ24XR.js'),chunkDPD6ZWL2_js=require('./chunk-DPD6ZWL2.js'),zod=require('zod');/*! © 2025-2026 AND YOU CREATE SAS (RCS Paris 940 190 614). Proprietary — see LICENSE (Standards SDK License 1.0). */
|
|
2
|
-
function n(i,r=chunkJFSQ24XR_js.a){return zod.z.string({message:r.invalidRichtext(i)})}chunkDPD6ZWL2_js.a(n,"createRichtextValidator");exports.a=n;
|
package/dist/chunk-KG2ADZG6.mjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import {a as a$1}from'./chunk-4OTKOCGB.mjs';import {a}from'./chunk-KSPJP74K.mjs';import {z}from'zod';/*! © 2025-2026 AND YOU CREATE SAS (RCS Paris 940 190 614). Proprietary — see LICENSE (Standards SDK License 1.0). */
|
|
2
|
-
function x(e,m=a$1){let i=z.number();return e.min!==void 0&&(i=i.min(e.min,m.minValue(e,e.min))),e.max!==void 0&&(i=i.max(e.max,m.maxValue(e,e.max))),e.renderAs==="rating"&&(i=i.min(e.min??0),i=i.max(e.max??5)),e.unit==="percentage"&&(i=i.min(e.min??0).max(e.max??100)),e.unit==="integer"&&(i=i.int(m.mustBeInteger(e))),i}a(x,"createNumberValidator");export{x as a};
|
package/dist/chunk-KLR22JMC.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
'use strict';var chunkJFSQ24XR_js=require('./chunk-JFSQ24XR.js'),chunkDPD6ZWL2_js=require('./chunk-DPD6ZWL2.js'),zod=require('zod');/*! © 2025-2026 AND YOU CREATE SAS (RCS Paris 940 190 614). Proprietary — see LICENSE (Standards SDK License 1.0). */
|
|
2
|
-
function l(t){if(!t)return null;let r=t==="today"?new Date().toISOString().slice(0,10):t,n=new Date(r);return Number.isNaN(n.getTime())?null:n}chunkDPD6ZWL2_js.a(l,"resolveBound");function N(t,r=chunkJFSQ24XR_js.a){let n=r.invalidDate(t),d=l(t.minDate),m=l(t.maxDate),i=zod.z.any().superRefine((e,a)=>{let s=new Date(e);if(Number.isNaN(s.getTime())){a.addIssue({code:"custom",message:n});return}d&&s<d&&a.addIssue({code:"custom",message:n}),m&&s>m&&a.addIssue({code:"custom",message:n});});if(!t.endDate)return i;let f=zod.z.object({start:i,end:i.nullable()}).superRefine((e,a)=>{if(e.end===null)return;let s=new Date(e.start),c=new Date(e.end);!(Number.isNaN(s.getTime())||Number.isNaN(c.getTime()))&&c<s&&a.addIssue({code:"custom",message:n,path:["end"]});});return zod.z.preprocess(e=>typeof e=="string"?{start:e,end:null}:e,f)}chunkDPD6ZWL2_js.a(N,"createDateValidator");exports.a=N;
|
package/dist/chunk-KSPJP74K.mjs
DELETED
package/dist/chunk-KYPEBOPW.mjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import {a as a$1}from'./chunk-4OTKOCGB.mjs';import {a}from'./chunk-KSPJP74K.mjs';import {z}from'zod';/*! © 2025-2026 AND YOU CREATE SAS (RCS Paris 940 190 614). Proprietary — see LICENSE (Standards SDK License 1.0). */
|
|
2
|
-
function l(t){if(!t)return null;let r=t==="today"?new Date().toISOString().slice(0,10):t,n=new Date(r);return Number.isNaN(n.getTime())?null:n}a(l,"resolveBound");function N(t,r=a$1){let n=r.invalidDate(t),d=l(t.minDate),m=l(t.maxDate),i=z.any().superRefine((e,a)=>{let s=new Date(e);if(Number.isNaN(s.getTime())){a.addIssue({code:"custom",message:n});return}d&&s<d&&a.addIssue({code:"custom",message:n}),m&&s>m&&a.addIssue({code:"custom",message:n});});if(!t.endDate)return i;let f=z.object({start:i,end:i.nullable()}).superRefine((e,a)=>{if(e.end===null)return;let s=new Date(e.start),c=new Date(e.end);!(Number.isNaN(s.getTime())||Number.isNaN(c.getTime()))&&c<s&&a.addIssue({code:"custom",message:n,path:["end"]});});return z.preprocess(e=>typeof e=="string"?{start:e,end:null}:e,f)}a(N,"createDateValidator");export{N as a};
|
package/dist/chunk-LB4TNMZU.mjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import {a as a$1}from'./chunk-4OTKOCGB.mjs';import {a}from'./chunk-KSPJP74K.mjs';import {getCountryByIso3,stripTrunkPrefix,isValidIso3}from'@stndrds/constants';import {z}from'zod';import {parsePhoneNumberFromString}from'libphonenumber-js';/*! © 2025-2026 AND YOU CREATE SAS (RCS Paris 940 190 614). Proprietary — see LICENSE (Standards SDK License 1.0). */
|
|
2
|
-
function u(t){return t.replace(/\D/g,"")}a(u,"digitsOnly");function b(t){return u(t)}a(b,"normalizeCountrylessPhoneNumber");function p(t){return getCountryByIso3(t)?.iso2}a(p,"getIso2");function y(t,e){if(!t)return "";let r=p(e);if(!r)return u(t);let i=parsePhoneNumberFromString(t,r);if(i)return i.nationalNumber;let s=getCountryByIso3(e),o=u(t);if(s){let d=s.phoneCode.replace("+",""),g=o.startsWith(d)?o.slice(d.length):o;return stripTrunkPrefix(g,s.phoneTrunkPrefix??"")}return o}a(y,"normalizePhoneNumber");function x(t){if(!t.phoneNumber)return "";let e=p(t.countryCode),i=getCountryByIso3(t.countryCode)?.phoneCode??"";if(!e)return `${i} ${t.phoneNumber}`.trim();let s=`${i}${u(t.phoneNumber)}`,o=parsePhoneNumberFromString(s);return o?o.formatInternational():`${i} ${t.phoneNumber}`.trim()}a(x,"formatPhoneForDisplay");function A(t,e=a$1){return z.object({countryCode:z.string().length(3),phoneNumber:z.string().min(1)},{message:e.invalidPhone(t)}).refine(r=>isValidIso3(r.countryCode),{message:"Invalid country code"}).transform(r=>({countryCode:r.countryCode,phoneNumber:y(r.phoneNumber,r.countryCode)}))}a(A,"createPhoneValidator");export{b as a,y as b,x as c,A as d};
|
package/dist/chunk-LSCBR4VS.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
'use strict';var chunkJFSQ24XR_js=require('./chunk-JFSQ24XR.js'),chunkDPD6ZWL2_js=require('./chunk-DPD6ZWL2.js'),zod=require('zod');/*! © 2025-2026 AND YOU CREATE SAS (RCS Paris 940 190 614). Proprietary — see LICENSE (Standards SDK License 1.0). */
|
|
2
|
-
function p(e,s=chunkJFSQ24XR_js.a){let i=e.options.map(t=>t.value);if(i.length===0)return zod.z.never();let n=e.options.map(t=>t.label);return zod.z.enum(i,{message:s.invalidOption(e,n)})}chunkDPD6ZWL2_js.a(p,"createSelectValidator");function d(e,s=chunkJFSQ24XR_js.a){let i=e.options.map(t=>t.value);if(i.length===0)return zod.z.never();let n=e.options.map(t=>t.label);return zod.z.array(zod.z.enum(i,{message:s.invalidOption(e,n)}))}chunkDPD6ZWL2_js.a(d,"createMultiselectValidator");function c(e,s=chunkJFSQ24XR_js.a){let i=e.options.map(t=>t.value);if(i.length===0)return zod.z.never();let n=e.options.map(t=>t.label);return zod.z.enum(i,{message:s.invalidOption(e,n)})}chunkDPD6ZWL2_js.a(c,"createStatusValidator");exports.a=p;exports.b=d;exports.c=c;
|
package/dist/chunk-LWSOKXPF.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
'use strict';var chunkJFSQ24XR_js=require('./chunk-JFSQ24XR.js'),chunkDPD6ZWL2_js=require('./chunk-DPD6ZWL2.js'),zod=require('zod');/*! © 2025-2026 AND YOU CREATE SAS (RCS Paris 940 190 614). Proprietary — see LICENSE (Standards SDK License 1.0). */
|
|
2
|
-
function c(n){return typeof n=="object"&&n!==null&&"id"in n?n.id:n}chunkDPD6ZWL2_js.a(c,"extractRelationId");function p(n,e=chunkJFSQ24XR_js.a){let i=zod.z.guid({message:e.invalidId(n)}),r=zod.z.union([i,zod.z.null()]);return zod.z.union([r,zod.z.object({id:i,props:zod.z.record(zod.z.string(),zod.z.unknown()).optional()}).passthrough()])}chunkDPD6ZWL2_js.a(p,"createSingleRelationValidator");function m(n,e=chunkJFSQ24XR_js.a){let i=zod.z.guid({message:e.invalidId(n)}),r=zod.z.union([i,zod.z.object({id:i,props:zod.z.record(zod.z.string(),zod.z.unknown()).optional()}).passthrough()]),u=zod.z.array(r);return n.maxItems!==void 0&&(u=u.max(n.maxItems,e.maxItems(n,n.maxItems))),u.refine(s=>s.every(d=>{let l=c(d);return typeof l=="string"&&i.safeParse(l).success}),{message:e.invalidId(n)})}chunkDPD6ZWL2_js.a(m,"createMultiRelationValidator");function g(n,e=chunkJFSQ24XR_js.a){return n.cardinality==="many"?m(n,e):p(n,e)}chunkDPD6ZWL2_js.a(g,"createRelationValidator");exports.a=p;exports.b=m;exports.c=g;
|
package/dist/chunk-O34B5KOW.mjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import {a as a$2}from'./chunk-4OTKOCGB.mjs';import {a as a$1}from'./chunk-KSPJP74K.mjs';import {z}from'zod';/*! © 2025-2026 AND YOU CREATE SAS (RCS Paris 940 190 614). Proprietary — see LICENSE (Standards SDK License 1.0). */
|
|
2
|
-
var g={email:"^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$",url:"^https?:\\/\\/[\\w\\-]+(\\.[\\w\\-]+)+[/#?]?.*$",slug:"^[a-z0-9]+(?:-[a-z0-9]+)*$"};function h(t){return t.pattern?t.pattern:t.format?g[t.format]:void 0}a$1(h,"resolveTextPattern");var c=class c{constructor(e){if(!Number.isInteger(e)||e<=0)throw new Error("LRU cache capacity must be greater than 0");this.capacity=e,this.cache=new Map;}get(e){if(!this.cache.has(e))return;let i=this.cache.get(e);return this.cache.delete(e),this.cache.set(e,i),i}set(e,i){if(this.cache.has(e))this.cache.delete(e);else if(this.cache.size>=this.capacity){let r=this.cache.keys().next();r.done||this.cache.delete(r.value);}this.cache.set(e,i);}has(e){return this.cache.has(e)}clear(){this.cache.clear();}get size(){return this.cache.size}};a$1(c,"LRUCache");var a=c;function o(t=100){return new a(t)}a$1(o,"createRegexCache");function u(t,e){let i=t.get(e);return i||(i=new RegExp(e),t.set(e,i)),i}a$1(u,"getCachedRegex");var m=o();function v(t,e=a$2){let i=z.string();t.minLength!==void 0&&(i=i.min(t.minLength,e.minLength(t,t.minLength))),t.maxLength!==void 0&&(i=i.max(t.maxLength,e.maxLength(t,t.maxLength)));let r=h(t);return r&&(i=i.regex(u(m,r),e.invalidPattern(t))),i}a$1(v,"createTextValidator");export{g as a,h as b,v as c};
|
package/dist/chunk-PFO7NWQW.mjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import {a as a$1}from'./chunk-4OTKOCGB.mjs';import {a}from'./chunk-KSPJP74K.mjs';import {z}from'zod';/*! © 2025-2026 AND YOU CREATE SAS (RCS Paris 940 190 614). Proprietary — see LICENSE (Standards SDK License 1.0). */
|
|
2
|
-
function s(r,n=a$1){let a=r.allowNegative?z.number():z.number().min(0);return z.object({code:z.string().length(3),value:a},{message:n.invalidCurrency(r)})}a(s,"createCurrencyValidator");export{s as a};
|
package/dist/chunk-Q7TQCRSD.mjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import {a as a$1}from'./chunk-4OTKOCGB.mjs';import {a}from'./chunk-KSPJP74K.mjs';import {z}from'zod';/*! © 2025-2026 AND YOU CREATE SAS (RCS Paris 940 190 614). Proprietary — see LICENSE (Standards SDK License 1.0). */
|
|
2
|
-
function s(e,a=a$1){return z.unknown()}a(s,"createFormulaValidator");export{s as a};
|
package/dist/chunk-RTHLB6T6.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
'use strict';var chunkJSKLP4GI_js=require('./chunk-JSKLP4GI.js'),chunkDPD6ZWL2_js=require('./chunk-DPD6ZWL2.js');/*! © 2025-2026 AND YOU CREATE SAS (RCS Paris 940 190 614). Proprietary — see LICENSE (Standards SDK License 1.0). */
|
|
2
|
-
var l=class l extends chunkJSKLP4GI_js.b{constructor(){super("Value must contain only JSON-compatible values",chunkJSKLP4GI_js.a.VALIDATION_FAILED),this.name="NonJsonValueError";}};chunkDPD6ZWL2_js.a(l,"NonJsonValueError");var p=l,f=chunkDPD6ZWL2_js.a(()=>new p,"nonJsonValue"),g={refuseNonJson:true,refuseNonPlainObject:true,refuseUnrepresentableType:true,readAccessors:false,unrepresentable:f,circular:f},w={refuseNonJson:false,refuseNonPlainObject:false,refuseUnrepresentableType:false,readAccessors:false,unrepresentable:f,circular:f},O={refuseNonJson:false,refuseNonPlainObject:true,refuseUnrepresentableType:true,readAccessors:true,unrepresentable:chunkDPD6ZWL2_js.a(e=>new chunkJSKLP4GI_js.h(`Cannot canonicalize ${h(e)}`,[]),"unrepresentable"),circular:chunkDPD6ZWL2_js.a(()=>new chunkJSKLP4GI_js.h("Cannot canonicalize circular structure",[]),"circular")};function h(e){if(typeof e!="object"||e===null)return `value of type ${typeof e}`;let n=e.constructor?.name;return typeof n=="string"&&n.length>0?`a ${n} value`:"a non-plain object"}chunkDPD6ZWL2_js.a(h,"describeUnrepresentable");function j(e){let n=Object.getPrototypeOf(e);return n===Object.prototype||n===null}chunkDPD6ZWL2_js.a(j,"isPlainObject");function m(e,n){if(Object.getPrototypeOf(e)!==Array.prototype||Object.getOwnPropertySymbols(e).length>0)throw n.unrepresentable(e);let r=Object.getOwnPropertyNames(e);if(r.length!==e.length+1||!r.includes("length"))throw n.unrepresentable(e);for(let s=0;s<e.length;s+=1){let t=Object.getOwnPropertyDescriptor(e,String(s));if(t===void 0||!("value"in t)||t.enumerable!==true)throw n.unrepresentable(e)}}chunkDPD6ZWL2_js.a(m,"assertArrayShape");function N(e,n){if(n.refuseNonJson&&Object.getOwnPropertySymbols(e).length>0)throw n.unrepresentable(e);let r=[];for(let s of Object.getOwnPropertyNames(e)){let t=Object.getOwnPropertyDescriptor(e,s);if(t===void 0||t.enumerable!==true){if(n.refuseNonJson)throw n.unrepresentable(e);continue}if(!("value"in t)){if(n.refuseNonJson)throw n.unrepresentable(e);if(!n.readAccessors)continue;let i=e[s];if(i===void 0)continue;r.push([s,i]);continue}t.value!==void 0&&r.push([s,t.value]);}return r.sort(([s],[t])=>s<t?-1:s>t?1:0)}chunkDPD6ZWL2_js.a(N,"sortedEntries");function u(e,n,r){if(e===null)return "null";if(e===void 0){if(n.refuseNonJson)throw n.unrepresentable(e);return "null"}if(typeof e=="boolean"||typeof e=="string")return JSON.stringify(e);if(typeof e=="number"){if(Number.isFinite(e))return JSON.stringify(e);if(n.refuseNonJson)throw n.unrepresentable(e);return "null"}if(typeof e!="object"){if(n.refuseNonJson||n.refuseUnrepresentableType)throw n.unrepresentable(e);return JSON.stringify(String(e))}if(r.has(e))throw n.circular();r.add(e);try{if(Array.isArray(e)){n.refuseNonJson&&m(e,n);let t=[];for(let i=0;i<e.length;i+=1)t.push(u(e[i],n,r));return `[${t.join(",")}]`}if(n.refuseNonPlainObject&&!j(e))throw n.unrepresentable(e);return `{${N(e,n).map(([t,i])=>`${JSON.stringify(t)}:${u(i,n,r)}`).join(",")}}`}finally{r.delete(e);}}chunkDPD6ZWL2_js.a(u,"serialize");function J(e){return u(e,O,new Set)}chunkDPD6ZWL2_js.a(J,"canonicalStringify");function y(e){return u(e,w,new Set)}chunkDPD6ZWL2_js.a(y,"serializeStableJson");function S(e){return u(e,g,new Set)}chunkDPD6ZWL2_js.a(S,"serializeCanonicalJson");function k(e,n){return y(e)===y(n)}chunkDPD6ZWL2_js.a(k,"sameStableValue");function I(e){return e}chunkDPD6ZWL2_js.a(I,"asTenantId");function U(e){return e}chunkDPD6ZWL2_js.a(U,"asUserId");function E(){return typeof crypto<"u"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{let n=Math.random()*16|0;return (e==="x"?n:n&3|8).toString(16)})}chunkDPD6ZWL2_js.a(E,"generateId");function B(e,n){return new Map(e.map(r=>[n(r),r]))}chunkDPD6ZWL2_js.a(B,"indexBy");function x(e,n){if(e===n)return true;if(e==null||n==null||typeof e!=typeof n)return false;if(Array.isArray(e))return !Array.isArray(n)||e.length!==n.length?false:e.every((r,s)=>x(r,n[s]));if(typeof e=="object"&&typeof n=="object"){let r=e,s=n,t=Object.keys(r),i=Object.keys(s);return t.length!==i.length?false:t.every(a=>a in s&&x(r[a],s[a]))}return false}chunkDPD6ZWL2_js.a(x,"deepEqual");exports.a=p;exports.b=J;exports.c=y;exports.d=S;exports.e=k;exports.f=I;exports.g=U;exports.h=E;exports.i=B;exports.j=x;
|
package/dist/chunk-SLYRQ72J.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
'use strict';var chunkJFSQ24XR_js=require('./chunk-JFSQ24XR.js'),chunkDPD6ZWL2_js=require('./chunk-DPD6ZWL2.js'),zod=require('zod');/*! © 2025-2026 AND YOU CREATE SAS (RCS Paris 940 190 614). Proprietary — see LICENSE (Standards SDK License 1.0). */
|
|
2
|
-
function x(e,m=chunkJFSQ24XR_js.a){let i=zod.z.number();return e.min!==void 0&&(i=i.min(e.min,m.minValue(e,e.min))),e.max!==void 0&&(i=i.max(e.max,m.maxValue(e,e.max))),e.renderAs==="rating"&&(i=i.min(e.min??0),i=i.max(e.max??5)),e.unit==="percentage"&&(i=i.min(e.min??0).max(e.max??100)),e.unit==="integer"&&(i=i.int(m.mustBeInteger(e))),i}chunkDPD6ZWL2_js.a(x,"createNumberValidator");exports.a=x;
|
package/dist/chunk-UKFOBZX2.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
'use strict';var chunk2M4YXNYZ_js=require('./chunk-2M4YXNYZ.js'),chunkJSKLP4GI_js=require('./chunk-JSKLP4GI.js'),chunkDPD6ZWL2_js=require('./chunk-DPD6ZWL2.js'),zod=require('zod');/*! © 2025-2026 AND YOU CREATE SAS (RCS Paris 940 190 614). Proprietary — see LICENSE (Standards SDK License 1.0). */
|
|
2
|
-
var Se={createdAt:"createdAt",updatedAt:"updatedAt",createdBy:"createdBy",lastUpdatedBy:"lastUpdatedBy",attachments:"attachments"};function qt(e){return Se[e]}chunkDPD6ZWL2_js.a(qt,"getSystemAttributeI18nKey");var Re={createdAt:{id:"system:createdAt",name:"createdAt",label:"Created time",type:"date",required:false,system:true,icon:"clock-circle",description:"When this record was created"},updatedAt:{id:"system:updatedAt",name:"updatedAt",label:"Last edited time",type:"date",required:false,system:true,icon:"clock-circle",description:"When this record was last modified"},createdBy:{id:"system:createdBy",name:"createdBy",label:"Created by",type:"user",required:false,system:true,multiple:false,icon:"user",description:"Actor who created this record"},lastUpdatedBy:{id:"system:lastUpdatedBy",name:"lastUpdatedBy",label:"Last edited by",type:"user",required:false,system:true,multiple:false,icon:"user",description:"Actor who last modified this record"},attachments:{id:"system:attachments",name:"attachments",label:"Attachments",type:"document",required:false,system:true,hidden:true,icon:"paperclip",description:"Free-form document attachments"}};function Bt(){return Object.values(Re)}chunkDPD6ZWL2_js.a(Bt,"getSystemAttributeList");function $(e){return e.id?.startsWith("system:")??false}chunkDPD6ZWL2_js.a($,"isManagedSystemAttribute");var K=["is","is_not","contains","not_contains","starts_with","ends_with","is_empty","is_not_empty"],Y=["is","is_not","less_than","greater_than","less_or_equal","greater_or_equal","is_empty","is_not_empty"],Oe=["is"],Te=["is","is_not","less_than","greater_than","less_or_equal","greater_or_equal","is_within","on_day_month","is_empty","is_not_empty"],z=["is","is_not","any_of","none_of","is_empty","is_not_empty"],Ee=["any_of","none_of","is_empty","is_not_empty"],W=["is","is_not","any_of","none_of","is_empty","is_not_empty"],xe=["is_empty","is_not_empty"],Fe=["is","is_not","less_than","greater_than","less_or_equal","greater_or_equal","contains","not_contains","is_empty","is_not_empty"],x=["city","postalCode","country"];function F(e){return x.includes(e)}chunkDPD6ZWL2_js.a(F,"isLocationFilterProperty");function zt(e){return K.includes(e)}chunkDPD6ZWL2_js.a(zt,"isLocationPartOperator");var y={text:K,richtext:[],number:Y,checkbox:Oe,date:Te,phone:["is","is_not","contains","not_contains","starts_with","is_empty","is_not_empty"],currency:Y,status:z,select:z,multiselect:Ee,location:[],user:W,relation:W,formula:Fe,document:xe},we=new Set(["formula","rollup"]),Ce=new Set(["user","relation","document"]),Pe=new Set(["text","richtext","number","select","multiselect","status","date","phone","currency","location","user","relation","document"]),ve=new Set(["text","number","date","phone","currency","select","multiselect"]),De=new Set(["text","phone","status","select","multiselect"]),Ie=new Set(["text","number","checkbox","date","phone","currency","status","select"]);function g(e){let r=!!(e.hidden||e.archived),o=!e.archived,i=we.has(e.type),a=e.type==="document",s=Ce.has(e.type),l=ke(e),c=r?[]:Ve(e),u=c.length>0&&!r,h=!r&&De.has(e.type),_=!r&&Ie.has(e.type),A=!r&&Ye(e.type),T=!r&&e.type==="status",_e=$(e),N=i||a||_e,E=!(r||N),ge=Le(e.type)?"forbidden":"allowed",Ae=qe(e.type),M=Ne(e),L=ve.has(e.type),q=!!(e.deprecated&&!r),B=$e(e);return {lifecycle:{active:o,deprecated:!!e.deprecated,visibleInArchitect:true,visibleInRuntime:!r,warningWhenDeprecated:q},storage:{mode:i?"computed":s?"edge":"value",cardinality:l,edgeBacked:s,preservesExistingValues:!!e.archived,qualifiedProperties:Me(e.type),polymorphic:je(e),maxItems:M},authoring:{editable:E,readOnly:N,directEdit:E&&B==="inline",required:ge,defaultValue:Ae,placeholder:L,maxItems:M},presentation:{formField:!r&&Ue(e.type),tableCell:!r&&G(e.type),defaultColumn:!r&&Be(e.type),compactDisplay:!r,popoverEditor:!r&&B==="popover",placeholder:L,warningWhenDeprecated:q},query:{filterable:u,searchable:h,sortable:_,groupable:A,kanbanGroupable:T,operators:c},agent:{readable:!r,writable:E&&!a,compactReadable:!r,contentReadable:!r&&ze(e.type),requiresDedicatedTool:a},exchange:{importable:!r,exportable:!r,schemaExportable:true,metadataExportable:false}}}chunkDPD6ZWL2_js.a(g,"getAttributeCapabilities");function J(e){return g(e).query.operators}chunkDPD6ZWL2_js.a(J,"getAttributeFilterOperators");function Wt(e){return g(e).query.filterable}chunkDPD6ZWL2_js.a(Wt,"isAttributeFilterable");function Kt(e){return g(e).query.searchable}chunkDPD6ZWL2_js.a(Kt,"isAttributeSearchable");function Jt(e){return g(e).query.sortable}chunkDPD6ZWL2_js.a(Jt,"isAttributeSortable");function Gt(e){return g(e).query.groupable}chunkDPD6ZWL2_js.a(Gt,"isAttributeGroupable");function Qt(e){return g(e).query.kanbanGroupable}chunkDPD6ZWL2_js.a(Qt,"isAttributeKanbanGroupable");function w(e){if(e.type!=="rollup")return e.type;let r=e;if(r.function==="earliest"||r.function==="latest")return "date";if(r.function==="original"){let o=r.targetAttributeType;if(o&&Q(o))return o}return "number"}chunkDPD6ZWL2_js.a(w,"resolveEffectiveFilterType");function C(e){let r=w(e);return Q(r)?y[r]:y.number}chunkDPD6ZWL2_js.a(C,"getRollupFilterOperators");function Ve(e){return e.type==="rollup"?C(e):y[e.type]??[]}chunkDPD6ZWL2_js.a(Ve,"getRawFilterOperators");function ke(e){return e.type==="multiselect"||e.type==="document"||e.type==="user"&&e.multiple===true||e.type==="relation"&&e.cardinality==="many"?"many":"one"}chunkDPD6ZWL2_js.a(ke,"getAttributeCardinality");function je(e){if(e.type!=="relation")return "none";let o=e.targets??[];return o.length===1&&o[0]?.object==="*"?"internal":o.length>1?"code-only":"none"}chunkDPD6ZWL2_js.a(je,"getPolymorphicCapability");function Ne(e){return e.type==="multiselect"?true:e.type==="relation"?e.cardinality==="many":false}chunkDPD6ZWL2_js.a(Ne,"supportsMaxItems");function Me(e){return e==="relation"||e==="document"}chunkDPD6ZWL2_js.a(Me,"supportsQualifiedProperties");function Le(e){return e==="checkbox"||e==="formula"||e==="rollup"}chunkDPD6ZWL2_js.a(Le,"isRequiredForbidden");function qe(e){return e==="checkbox"?"automatic":e==="formula"||e==="rollup"?"forbidden":Pe.has(e)?"static":"forbidden"}chunkDPD6ZWL2_js.a(qe,"getDefaultValueCapability");function Be(e){return G(e)}chunkDPD6ZWL2_js.a(Be,"isDefaultColumnType");function G(e){return e!=="richtext"&&e!=="document"}chunkDPD6ZWL2_js.a(G,"isTableCellType");function Ue(e){return e!=="richtext"}chunkDPD6ZWL2_js.a(Ue,"isFormFieldType");function $e(e){switch(e.type){case "checkbox":return "inline";case "number":return e.renderAs==="rating"?"inline":"default";case "select":case "multiselect":return e.renderAs==="badges"?"inline":"popover";case "status":case "relation":case "user":case "date":return "popover";default:return "default"}}chunkDPD6ZWL2_js.a($e,"resolveEditMode");function Ye(e){return e==="status"||e==="currency"}chunkDPD6ZWL2_js.a(Ye,"isGroupableType");function ze(e){return e==="richtext"||e==="document"}chunkDPD6ZWL2_js.a(ze,"isContentReadableType");function Q(e){return Object.prototype.hasOwnProperty.call(y,e)}chunkDPD6ZWL2_js.a(Q,"hasFilterOperatorEntry");var f=y,We=["is_empty","is_not_empty"];function H(e){return We.includes(e)}chunkDPD6ZWL2_js.a(H,"isNoValueOperator");function er(e){return C(e)}chunkDPD6ZWL2_js.a(er,"getRollupFilterOperators");function R(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)&&"dynamic"in e}chunkDPD6ZWL2_js.a(R,"isDynamicValue");function or(){return {dynamic:"actor",ref:"current"}}chunkDPD6ZWL2_js.a(or,"currentActor");function nr(){return {dynamic:"date",anchor:"today"}}chunkDPD6ZWL2_js.a(nr,"today");function ir(){return {dynamic:"date",anchor:"now"}}chunkDPD6ZWL2_js.a(ir,"now");function X(e){if(typeof e=="number")return Number.isFinite(e)?e:null;if(typeof e=="string"&&e.trim()!==""){let r=Number(e);return Number.isFinite(r)?r:null}return null}chunkDPD6ZWL2_js.a(X,"toAmount");function Z(e){return e!==null&&typeof e=="object"?"value"in e?X(e.value):null:X(e)}chunkDPD6ZWL2_js.a(Z,"extractCurrencyFilterValue");function lr(e){return e==null?null:typeof e=="object"&&"value"in e?e.value??null:e}chunkDPD6ZWL2_js.a(lr,"extractFilterValue");var Ke=new Set(["is_not","not_contains","none_of","is_empty"]),Je={is_not:"is",not_contains:"contains",none_of:"any_of",is_empty:"is_not_empty"};function pr(e){return Ke.has(e)?"none":"any"}chunkDPD6ZWL2_js.a(pr,"getOperatorPolarity");function dr(e){return Je[e]??e}chunkDPD6ZWL2_js.a(dr,"normalizeForEdgeRpc");var ee={is:"any_of",is_not:"none_of"};function mr(e){return ee[e]??e}chunkDPD6ZWL2_js.a(mr,"toMultiValueOperator");var Ge=new Set(Object.values(ee).filter(e=>e!==void 0));function te(e){return Ge.has(e)}chunkDPD6ZWL2_js.a(te,"isSetMembershipOperator");function re(e,r){let o=e.value;if(H(e.operator)||o==null||R(o))return;if(te(e.operator)){Array.isArray(o)||(e.value=[o]);return}if(r!=="currency")return;let i=Z(o);if(i!==null){e.value=i;return}if(!Qe(o))return;let a=`Filter on a currency attribute expected a numeric amount, received ${JSON.stringify(o)}`;throw new chunkJSKLP4GI_js.h(a,[{path:["value"],message:a}])}chunkDPD6ZWL2_js.a(re,"canonicalizeFilterValue");function Qe(e){return typeof e!="object"?true:"value"in e?e.value!=null:false}chunkDPD6ZWL2_js.a(Qe,"hasCurrencyAmount");var He={eq:"is",equals:"is",equal:"is","==":"is","=":"is",neq:"is_not",notEqual:"is_not",isNot:"is_not","!=":"is_not","<>":"is_not",lt:"less_than","<":"less_than",gt:"greater_than",">":"greater_than",lte:"less_or_equal","<=":"less_or_equal",gte:"greater_or_equal",">=":"greater_or_equal",in:"any_of",isAnyOf:"any_of",anyOf:"any_of",oneOf:"any_of",notIn:"none_of",not_in:"none_of",isNoneOf:"none_of",noneOf:"none_of",notOneOf:"none_of",startsWith:"starts_with",beginsWith:"starts_with",endsWith:"ends_with",doesNotContain:"not_contains",notContain:"not_contains",isEmpty:"is_empty",isNotEmpty:"is_not_empty"};function P(e){return He[e]??e}chunkDPD6ZWL2_js.a(P,"normalizeOperator");function Or(e){let r=P(e.operator);return r===e.operator?e:{...e,operator:r}}chunkDPD6ZWL2_js.a(Or,"normalizeFilterRule");var Xe=new Set(["days","weeks","months","years"]),Ze=new Set(["past","future"]);function v(e){if(typeof e!="object"||e===null)return false;let r=e;return typeof r.amount=="number"&&Number.isFinite(r.amount)&&r.amount>0&&typeof r.unit=="string"&&Xe.has(r.unit)&&typeof r.direction=="string"&&Ze.has(r.direction)}chunkDPD6ZWL2_js.a(v,"isRelativeDateValue");function ne(e){return Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate())}chunkDPD6ZWL2_js.a(ne,"utcDayStart");function oe(e,r,o){if(o==="days")return e+r*864e5;if(o==="weeks")return e+r*7*864e5;let i=new Date(e),a=i.getUTCFullYear()+(o==="years"?r:0),s=i.getUTCMonth()+(o==="months"?r:0),l=new Date(Date.UTC(a,s+1,0)).getUTCDate();return Date.UTC(a,s,Math.min(i.getUTCDate(),l))}chunkDPD6ZWL2_js.a(oe,"shiftUtcDay");function xr(e,r=new Date){if(!v(e))return null;let o=ne(r),i=Math.trunc(e.amount),a=e.direction==="past"?{startMs:oe(o,-i,e.unit),endMs:o+864e5}:{startMs:o,endMs:oe(o,i,e.unit)+864e5};return Number.isFinite(a.startMs)&&Number.isFinite(a.endMs)?a:null}chunkDPD6ZWL2_js.a(xr,"resolveIsWithinBounds");function Fr(e){if(!Number.isFinite(e))return null;let r=ne(new Date(e));return Number.isFinite(r)?{startMs:r,endMs:r+864e5}:null}chunkDPD6ZWL2_js.a(Fr,"resolveUtcDayBounds");function wr(e){return new Date(e).toISOString().slice(0,10)}chunkDPD6ZWL2_js.a(wr,"toUtcDayString");var et=new Set(["relation","document","user"]),D=["is","is_not","any_of","none_of","is_empty","is_not_empty"],tt={id:D,objectId:D,tenantId:D,label:f.text,createdAt:f.date,updatedAt:f.date,deletedAt:f.date,createdBy:f.user,lastUpdatedBy:f.user},rt={id:"text",objectId:"text",objectName:"text",tenantId:"text",label:"text",createdAt:"date",updatedAt:"date",deletedAt:"date",deletedBy:"user",createdBy:"user",lastUpdatedBy:"user",visibility:"select",ownedBy:"user"},k={before:'"less_than"',after:'"greater_than"',on_or_before:'"less_or_equal"',on_or_after:'"greater_or_equal"',is_checked:'"is" with value true',is_not_checked:'"is" with value false',day_month_eq:'"on_day_month"'},ot=new Set(Object.entries(y).filter(([,e])=>e.includes("any_of")&&!e.includes("contains")).map(([e])=>e)),nt={contains:"any_of",not_contains:"none_of"};function I(e,r){let o=k[e];if(o){let s=`Unknown filter operator "${e}" \u2014 use ${o}`;throw new chunkJSKLP4GI_js.h(s,[{path:["operator"],message:s}])}let i=P(e),a=nt[i];if(a&&ot.has(r)){let s=`Operator "${i}" is not valid for type "${r}" \u2014 use "${a}"`;throw new chunkJSKLP4GI_js.h(s,[{path:["operator"],message:s}])}return i}chunkDPD6ZWL2_js.a(I,"resolveCanonicalOperator");function ie(e,r,o){let i=I(e,r),a=f[r];if(!a?.includes(i)){let s=a?.length?a.join(", "):"(no operators registered for this type)",l=`Operator "${e}" is not valid for ${o} type "${r}". Valid operators: ${s}.`;throw new chunkJSKLP4GI_js.h(l,[{path:["operator"],message:l}])}return i}chunkDPD6ZWL2_js.a(ie,"assertOperatorForType");function it(e){if(e.operator==="is_within"&&!v(e.value)){let r='Operator "is_within" requires a relative-date value { amount: positive number, unit: days|weeks|months|years, direction: past|future }';throw new chunkJSKLP4GI_js.h(r,[{path:["value"],message:r}])}}chunkDPD6ZWL2_js.a(it,"assertRelativeDateValue");function O(e,r,o){e.operator=r,re(e,o),it(e);}chunkDPD6ZWL2_js.a(O,"applyCanonicalForm");function ae(e,r){if(!R(e.value))return;let o=e.value;if(o.dynamic==="actor"&&r!=="user"){let i=`actor token (@me) is only valid on user attributes, not "${r}"`;throw new chunkJSKLP4GI_js.h(i,[{path:["value"],message:i}])}if(o.dynamic==="date"&&r!=="date"){let i=`date token (@today/@now) is only valid on date attributes, not "${r}"`;throw new chunkJSKLP4GI_js.h(i,[{path:["value"],message:i}])}}chunkDPD6ZWL2_js.a(ae,"assertDynamicValueForAttribute");var V=x.map(e=>`"${e}"`).join(", ");function at(e){return e==="location"?` A location is filtered on one of its parts: set "property" to one of ${V} and use a text operator (e.g. contains).`:""}chunkDPD6ZWL2_js.a(at,"locationPartsHint");function Mr(e,r){try{return st({...e},r),[]}catch(o){if(!(o instanceof chunkJSKLP4GI_js.h))throw o;return o.errors.map(i=>({...i,path:[...i.path]}))}}chunkDPD6ZWL2_js.a(Mr,"collectQualifiedRuleIssues");function st(e,r){let o=r.attributes.find(c=>c.name===e.attribute),i=tt[e.attribute];if(!(o||i)){let[c,...u]=e.attribute.split("."),_=(u.length>0?r.attributes.find(T=>T.name===c):void 0)?.type==="location"?` Dotted paths are not supported \u2014 set "attribute" to "${c}" and "property" to ${F(u[0]??"")?`"${u[0]}"`:`one of ${V}`}.`:e.attribute.includes(".")?' Dotted paths are not supported \u2014 filter on the attribute name alone, or use the full-text "query" parameter to match text inside a value.':"",A=`Unknown attribute: ${e.attribute}${_}`;throw new chunkJSKLP4GI_js.h(A,[{path:["attribute"],message:A}])}if(e.quantifier!==void 0&&!e.property){let c='quantifier is only valid on qualified edge rules (set "property")';throw new chunkJSKLP4GI_js.h(c,[{path:["quantifier"],message:c}])}if(!o){if(e.property)throw new chunkJSKLP4GI_js.h(`Cannot qualify system attribute "${e.attribute}"`,[{path:["property"],message:`"${e.attribute}" is a system column, not a reference`}]);let c=rt[e.attribute]??"text",u=I(e.operator,c);if(!i.includes(u)){let h=`Operator "${e.operator}" is not valid for system attribute "${e.attribute}". Valid operators: ${i.join(", ")}.`;throw new chunkJSKLP4GI_js.h(h,[{path:["operator"],message:h}])}O(e,u,c);return}if(!e.property){ae(e,o.type);let c=J(o),u=I(e.operator,o.type);if(!c.includes(u)){let h=c.length?c.join(", "):"(not filterable)",_=`Operator "${e.operator}" is not valid for attribute "${o.name}". Valid operators: ${h}.${at(o.type)}`;throw new chunkJSKLP4GI_js.h(_,[{path:["operator"],message:_}])}O(e,u,w(o));return}if(o.type==="location"){if(e.quantifier!==void 0){let u="quantifier is not valid on a location part \u2014 a location is one value, not a set of edges";throw new chunkJSKLP4GI_js.h(u,[{path:["quantifier"],message:u}])}if(!F(e.property)){let u=`Property "${e.property}" is not a part of location "${e.attribute}". Valid parts: ${V}.`;throw new chunkJSKLP4GI_js.h(u,[{path:["property"],message:u}])}ae(e,"text");let c=ie(e.operator,"text","property");O(e,c,"text");return}if(!et.has(o.type))throw new chunkJSKLP4GI_js.h(`Cannot qualify ${o.type} attribute "${e.attribute}"`,[{path:["property"],message:`Attribute "${e.attribute}" is not a reference type`}]);let a=o.properties;if(!a)throw new chunkJSKLP4GI_js.h(`Attribute "${e.attribute}" has no qualifyWith schema`,[{path:["property"],message:`"${e.attribute}" has no qualifyWith`}]);let s=a.definitions.find(c=>c.name===e.property);if(!s)throw new chunkJSKLP4GI_js.h(`Property "${e.property}" not defined on "${e.attribute}".qualifyWith()`,[{path:["property"],message:`Unknown property: ${e.property}`}]);let l=ie(e.operator,s.type,"property");O(e,l,s.type);}chunkDPD6ZWL2_js.a(st,"validateQualifiedRule");var se=64,le=1e4;function ce(e){let r=Object.getPrototypeOf(e);return r===null||r===Object.prototype?true:Object.getPrototypeOf(r)===null&&r.constructor?.name==="Object"}chunkDPD6ZWL2_js.a(ce,"isPlainJsonObject");function m(e,r,o=[]){e.addIssue({code:"custom",message:r,path:o});}chunkDPD6ZWL2_js.a(m,"addJsonIssue");function ct(e,r,o,i){for(let a of Reflect.ownKeys(e))if(a!=="length"){if(a==="__proto__"){m(i,"The __proto__ key is not allowed in custom props",[...r.path,a]);continue}(typeof a=="symbol"||!/^(0|[1-9]\d*)$/.test(a))&&m(i,"Arrays cannot contain non-index JSON properties",[...r.path,a]);}for(let a=e.length-1;a>=0;a--){let s=Object.getOwnPropertyDescriptor(e,String(a)),l=[...r.path,a];if(!(s&&"value"in s)){m(i,"Sparse arrays are not valid JSON values",l);continue}o.push({kind:"enter",value:s.value,path:l,depth:r.depth+1});}}chunkDPD6ZWL2_js.a(ct,"pushJsonArrayChildren");function ut(e,r,o,i){let a=Reflect.ownKeys(e);for(let s=a.length-1;s>=0;s--){let l=a[s],c=[...r.path,l];if(l==="__proto__"){m(i,"The __proto__ key is not allowed in custom props",c);continue}if(typeof l=="symbol"){m(i,"Symbol keys are not valid JSON keys",c);continue}let u=Object.getOwnPropertyDescriptor(e,l);if(!(u?.enumerable&&"value"in u)){m(i,"Custom props must contain enumerable data properties only",c);continue}o.push({kind:"enter",value:u.value,path:c,depth:r.depth+1});}}chunkDPD6ZWL2_js.a(ut,"pushJsonObjectChildren");function pt(e,r){if(e===null||typeof e!="object"){m(r,"Expected a plain JSON object");return}try{if(Array.isArray(e)||!ce(e)){m(r,"Expected a plain JSON object");return}}catch{m(r,"Custom props contain an object that cannot be safely inspected");return}let o=new WeakSet,i=[{kind:"enter",value:e,path:[],depth:0}],a=0;for(;i.length>0;){let s=i.pop();if(!s)break;if(s.kind==="exit"){o.delete(s.value);continue}if(a++,a>le){m(r,`Custom props cannot exceed ${le.toLocaleString("en-US")} total JSON nodes`,s.path);return}if(s.depth>se){m(r,`Custom props cannot exceed depth ${se}`,s.path);continue}let l=s.value;if(!(l===null||typeof l=="string"||typeof l=="boolean"||typeof l=="number"&&Number.isFinite(l))){if(typeof l!="object"){m(r,"Expected a JSON value",s.path);continue}if(o.has(l)){m(r,"Custom props cannot contain circular references",s.path);continue}try{if(Array.isArray(l)){o.add(l),i.push({kind:"exit",value:l}),ct(l,s,i,r);continue}if(!ce(l)){m(r,"Expected an array or plain JSON object",s.path);continue}o.add(l),i.push({kind:"exit",value:l}),ut(l,s,i,r);}catch{m(r,"Custom props contain an object that cannot be safely inspected",s.path);}}}}chunkDPD6ZWL2_js.a(pt,"validateJsonProps");var ue=zod.z.unknown().superRefine(pt).transform(e=>e);var Qr=zod.z.array(zod.z.string()).max(chunk2M4YXNYZ_js.r.columnsPerTab),dt=zod.z.array(zod.z.string().min(1)).max(chunk2M4YXNYZ_js.r.columnsPerTab).refine(e=>new Set(e).size===e.length,{message:"Displayed attribute names must be unique"}),mt=zod.z.object({attribute:zod.z.string().describe("Attribute to sort by"),direction:zod.z.enum(["asc","desc"]).describe("asc or desc")}).strict(),bt=zod.z.array(mt).max(chunk2M4YXNYZ_js.r.sortsPerTab),yt=zod.z.object({amount:zod.z.number().describe("Count"),unit:zod.z.enum(["days","weeks","months","years"]).describe("Unit"),direction:zod.z.enum(["past","future"]).describe("Past or future")}).strict(),ft=zod.z.object({value:zod.z.number().nullable().describe("Amount"),code:zod.z.array(zod.z.string()).optional().describe("Currency codes")}).strict(),ht=zod.z.object({phoneNumber:zod.z.string().nullable().describe("Number"),countryCode:zod.z.string().optional().describe("ISO country code")}).strict(),_t=zod.z.discriminatedUnion("dynamic",[zod.z.object({dynamic:zod.z.literal("actor").describe("Resolved at filter time"),ref:zod.z.literal("current").describe("The current actor")}).strict(),zod.z.object({dynamic:zod.z.literal("date").describe("Resolved at filter time"),anchor:zod.z.enum(["today","now"]).describe("Anchor")}).strict()]),gt=zod.z.object({month:zod.z.number().describe("1-12"),day:zod.z.number().describe("Day")}).strict(),At=zod.z.union([zod.z.string(),zod.z.number(),zod.z.boolean(),zod.z.array(zod.z.string()),yt,ft,ht,gt,_t,zod.z.null()]),St=zod.z.enum(["is","is_not","contains","not_contains","starts_with","ends_with","is_empty","is_not_empty","less_than","greater_than","less_or_equal","greater_or_equal","is_within","on_day_month","any_of","none_of"],{error:chunkDPD6ZWL2_js.a(e=>{let r=e.input,o=typeof r=="string"?k[r]:void 0;return o?`Unknown filter operator "${r}" \u2014 use ${o}`:void 0},"error")}),Rt=zod.z.object({attribute:zod.z.string().describe("Attribute to filter on"),property:zod.z.string().optional().describe("Qualified edge property"),quantifier:zod.z.enum(["any","none"]).optional().describe("For a multi-value attribute"),operator:St.describe("Comparison"),value:At.describe("Comparison value, by attribute type")}).strict(),Ot=zod.z.array(Rt).max(chunk2M4YXNYZ_js.r.filterRulesPerTab),Tt=zod.z.object({combinator:zod.z.enum(["and","or"]).describe("Match every rule or any rule"),rules:Ot.describe("The rules")}).strict(),Et={span:zod.z.union([zod.z.literal(1),zod.z.literal(2),zod.z.literal(3),zod.z.literal(4),zod.z.literal(5),zod.z.literal(6),zod.z.literal(7),zod.z.literal(8),zod.z.literal(9),zod.z.literal(10),zod.z.literal(11),zod.z.literal(12)]).optional().describe("Columns of 12 this field occupies"),label:zod.z.string().optional().describe("Overrides the attribute's label"),readOnly:zod.z.boolean().optional().describe("Shows the value, not editable")},xt=zod.z.object({attribute:zod.z.string().describe("Attribute API name shown by this field"),...Et}).strict(),Ft=zod.z.object({name:zod.z.string().describe("Group API name, unique in the form"),label:zod.z.string().describe("Label people see"),description:zod.z.string().optional().describe("Extra context under the label"),collapsible:zod.z.boolean().optional().describe("Whether the group can be collapsed"),collapsed:zod.z.boolean().optional().describe("Whether the group starts collapsed"),fields:zod.z.array(xt).max(chunk2M4YXNYZ_js.r.fieldsPerGroup).describe("Fields in this group, in order")}).strict();function pe(e,r){e.groups.reduce((s,l)=>s+l.fields.length,0)>chunk2M4YXNYZ_js.r.fieldsPerFormTab&&r.addIssue({code:"too_big",origin:"array",maximum:chunk2M4YXNYZ_js.r.fieldsPerFormTab,inclusive:true,message:`A form content can contain at most ${chunk2M4YXNYZ_js.r.fieldsPerFormTab} fields`,path:["groups"]});let i=new Set,a=new Set;e.groups.forEach((s,l)=>{i.has(s.name)&&r.addIssue({code:"custom",message:`Duplicate group name "${s.name}"`,path:["groups",l,"name"]}),i.add(s.name),s.fields.forEach((c,u)=>{a.has(c.attribute)&&r.addIssue({code:"custom",message:`Duplicate field attribute "${c.attribute}"`,path:["groups",l,"fields",u,"attribute"]}),a.add(c.attribute);});});}chunkDPD6ZWL2_js.a(pe,"refineFormContent");var b={name:zod.z.string().describe("Content API name, unique in the view"),label:zod.z.string().optional().describe("Label people see"),icon:chunk2M4YXNYZ_js.t.optional().describe("Icon name"),placement:zod.z.enum(["main","aside"]).describe("main: any tabs. aside: at most one, a form")},de=zod.z.object({object:zod.z.string().optional().describe("Every record of this object"),relation:zod.z.string().optional().describe("Records linked through this relation")}).strict().superRefine((e,r)=>{e.object===void 0&&e.relation===void 0&&r.addIssue({code:"custom",message:"Collection source must define an object, a relation, or both"});}).transform(e=>e.relation===void 0?{object:e.object}:e.object===void 0?{relation:e.relation}:{object:e.object,relation:e.relation}),wt={...b,type:zod.z.literal("collection"),source:de.describe("object: every record; relation: records linked to this record; both: records of object whose relation points at this record"),visibility:zod.z.enum(chunk2M4YXNYZ_js.d).optional().describe("all: no scope; workspace: every member; private: viewer's own"),columns:zod.z.array(zod.z.union([zod.z.string(),zod.z.object({relationProperty:zod.z.string().refine(e=>e.trim().length>0).describe("Qualified edge property shown as a column")}).strict()])).max(chunk2M4YXNYZ_js.r.columnsPerTab).optional().describe("Table columns, in order"),descriptionAttribute:zod.z.string().optional().describe("Secondary line under each row's title (list layout)"),displayAttributes:dt.optional().describe("Attributes shown on each card"),filters:Tt.optional().describe("Restricts which records show"),sorts:bt.optional().describe("Sort order"),actions:zod.z.enum(["create","update","delete","attach","detach"]).array().optional().describe("Offered actions; absent = every action, [] = none"),openMode:zod.z.enum(["page","peek"]).optional().describe("page or peek (the record panel)"),createMode:zod.z.enum(["page","peek","inline"]).optional().describe("page, peek, or inline (creates without opening)")},Ct=zod.z.object({...wt,layout:zod.z.enum(["table","list","kanban"]).describe("table columns, list cards, kanban board grouped by a select/status attribute"),columnSizing:zod.z.record(zod.z.string(),zod.z.number()).optional().describe("Column widths in pixels, by attribute name"),groupByAttribute:zod.z.string().optional().describe("Kanban only: the select or status attribute that names the columns"),kanbanColumnOrder:zod.z.array(zod.z.string()).optional().describe("Kanban: column order by option value"),kanbanColumnVisibility:zod.z.record(zod.z.string(),zod.z.boolean()).optional().describe("Kanban: which columns are shown"),kanbanPinnedColumns:zod.z.array(zod.z.string()).optional().describe("Kanban: columns pinned first")}).strict().superRefine((e,r)=>{let o=["groupByAttribute","kanbanColumnOrder","kanbanColumnVisibility","kanbanPinnedColumns"];if(e.layout==="kanban"){e.groupByAttribute===void 0&&r.addIssue({code:"custom",path:["groupByAttribute"],message:"A kanban layout requires groupByAttribute"});return}for(let i of o)e[i]!==void 0&&r.addIssue({code:"custom",path:[i],message:"Only a kanban layout groups by an attribute"});}),j={...b,type:zod.z.literal("form"),groups:zod.z.array(Ft).max(chunk2M4YXNYZ_js.r.groupsPerFormTab).describe("Field groups, in order"),formColumns:zod.z.union([zod.z.literal(1),zod.z.literal(2),zod.z.literal(3)]).optional().describe("Grid columns, 1-3"),density:zod.z.enum(["compact","comfortable","spacious"]).optional().describe("Vertical spacing between fields")},Pt=zod.z.object(j).strict().superRefine(pe),vt=zod.z.object({...j,groups:j.groups.min(1,"A published form content requires at least one group")}).strict().superRefine(pe),me=[Ct,zod.z.object({...b,type:zod.z.literal("custom"),extension:zod.z.string().describe("Name of a registered extension"),parameters:zod.z.lazy(()=>ue).optional().describe("Extension parameters")}).strict(),zod.z.object({...b,type:zod.z.literal("activity")}).strict(),zod.z.object({...b,type:zod.z.literal("richtext"),attribute:zod.z.string().describe("Richtext attribute edited in place"),titleAttribute:zod.z.string().optional().describe("Text attribute shown as the title")}).strict(),zod.z.object({...b,type:zod.z.literal("documents"),allowUpload:zod.z.boolean().optional().describe("Lets people add files here"),allowRemove:zod.z.boolean().optional().describe("Lets people remove files here"),hideAttachments:zod.z.boolean().optional().describe("Hides files attached elsewhere (e.g. emails)"),relations:zod.z.array(zod.z.string()).optional().describe("Document relations shown; the record's own files if absent")}).strict(),zod.z.object({...b,type:zod.z.literal("forms"),objectName:zod.z.string().optional().describe("Limits to this object's published forms")}).strict(),zod.z.object({...b,type:zod.z.literal("emails"),emailAttributes:zod.z.array(zod.z.string()).max(chunk2M4YXNYZ_js.r.emailAttributesPerTab).describe("Addresses")}).strict(),zod.z.object({...b,type:zod.z.literal("meetings"),emailAttributes:zod.z.array(zod.z.string()).max(chunk2M4YXNYZ_js.r.emailAttributesPerTab).describe("Addresses")}).strict()],Dt=zod.z.discriminatedUnion("type",[Pt,...me]),be=zod.z.discriminatedUnion("type",[vt,...me]),ye={object:zod.z.string(),name:zod.z.string(),label:zod.z.string(),description:zod.z.string().optional(),icon:chunk2M4YXNYZ_js.t.optional(),context:zod.z.enum(["collection","record"]),default:zod.z.boolean().optional()},It=zod.z.object({...ye,contents:zod.z.array(Dt).max(chunk2M4YXNYZ_js.r.tabsPerView)}).strict(),Vt=zod.z.object({...ye,contents:zod.z.array(be).max(chunk2M4YXNYZ_js.r.tabsPerView)}).strict();function fe(e,r){let o=new Set;e.contents.forEach((i,a)=>{o.has(i.name)&&r.addIssue({code:"custom",message:`Duplicate content name "${i.name}"`,path:["contents",a,"name"]}),o.add(i.name);});}chunkDPD6ZWL2_js.a(fe,"addDuplicateContentNameIssues");function kt(e){let r=e.contents.map((a,s)=>({content:a,index:s})).filter(({content:a})=>a.placement==="aside"),o=[],[,i]=r;i&&o.push({contentName:null,path:["contents",i.index,"placement"],message:"Aside holds one content for now; put the others in main"});for(let{content:a,index:s}of r)a.type!=="form"&&o.push({contentName:a.name,path:["contents",s,"type"],message:`Only a form content can sit in aside for now; put ${a.type} in main`});return o}chunkDPD6ZWL2_js.a(kt,"asideRuleIssues");function he(e,r){for(let o of kt(e))r.addIssue({code:"custom",path:o.path,message:o.message});}chunkDPD6ZWL2_js.a(he,"addAsideIssues");function jt({asideRule:e="enforce"}={}){return It.superRefine((r,o)=>{fe(r,o),e==="enforce"&&he(r,o);})}chunkDPD6ZWL2_js.a(jt,"draftContentViewDefinitionSchemaFor");function Nt({asideRule:e="enforce"}={}){return Vt.superRefine((r,o)=>{fe(r,o),r.contents.some(i=>i.placement==="main")||o.addIssue({code:"custom",message:"A published view requires at least one main content",path:["contents"]}),e==="enforce"&&he(r,o);})}chunkDPD6ZWL2_js.a(Nt,"contentViewDefinitionSchemaFor");var Mt=jt(),Lt=Nt();exports.$=Lt;exports.A=lr;exports.B=pr;exports.C=dr;exports.D=mr;exports.E=te;exports.F=re;exports.G=He;exports.H=P;exports.I=Or;exports.J=v;exports.K=xr;exports.L=Fr;exports.M=wr;exports.N=rt;exports.O=k;exports.P=Mr;exports.Q=st;exports.R=Qr;exports.S=dt;exports.T=bt;exports.U=Tt;exports.V=de;exports.W=be;exports.X=kt;exports.Y=jt;exports.Z=Nt;exports._=Mt;exports.a=Se;exports.b=qt;exports.c=Re;exports.d=Bt;exports.e=$;exports.f=x;exports.g=F;exports.h=zt;exports.i=y;exports.j=g;exports.k=J;exports.l=Wt;exports.m=Kt;exports.n=Jt;exports.o=Gt;exports.p=Qt;exports.q=w;exports.r=f;exports.s=We;exports.t=H;exports.u=er;exports.v=R;exports.w=or;exports.x=nr;exports.y=ir;exports.z=Z;
|
package/dist/chunk-UXISKZ5Y.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
'use strict';var chunkJFSQ24XR_js=require('./chunk-JFSQ24XR.js'),chunkDPD6ZWL2_js=require('./chunk-DPD6ZWL2.js'),zod=require('zod');/*! © 2025-2026 AND YOU CREATE SAS (RCS Paris 940 190 614). Proprietary — see LICENSE (Standards SDK License 1.0). */
|
|
2
|
-
function s(r,n=chunkJFSQ24XR_js.a){let a=r.allowNegative?zod.z.number():zod.z.number().min(0);return zod.z.object({code:zod.z.string().length(3),value:a},{message:n.invalidCurrency(r)})}chunkDPD6ZWL2_js.a(s,"createCurrencyValidator");exports.a=s;
|
package/dist/chunk-VKFLXFPP.mjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import {a as a$1}from'./chunk-4OTKOCGB.mjs';import {a}from'./chunk-KSPJP74K.mjs';import {z}from'zod';/*! © 2025-2026 AND YOU CREATE SAS (RCS Paris 940 190 614). Proprietary — see LICENSE (Standards SDK License 1.0). */
|
|
2
|
-
function n(i,r=a$1){return z.string({message:r.invalidRichtext(i)})}a(n,"createRichtextValidator");export{n as a};
|
package/dist/chunk-WMQRTFOP.mjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import {a as a$1}from'./chunk-4OTKOCGB.mjs';import {a}from'./chunk-KSPJP74K.mjs';import {z}from'zod';/*! © 2025-2026 AND YOU CREATE SAS (RCS Paris 940 190 614). Proprietary — see LICENSE (Standards SDK License 1.0). */
|
|
2
|
-
function s(r,a=a$1){return z.unknown()}a(s,"createRollupValidator");export{s as a};
|
package/dist/chunk-XAVRKIBE.mjs
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import {c as c$1}from'./chunk-GKXTXH4Y.mjs';import {a as a$3}from'./chunk-Q7TQCRSD.mjs';import {a as a$2}from'./chunk-WMQRTFOP.mjs';import {a as a$9}from'./chunk-4VCADZK4.mjs';import {a as a$8}from'./chunk-KYPEBOPW.mjs';import {d}from'./chunk-LB4TNMZU.mjs';import {a as a$7}from'./chunk-PFO7NWQW.mjs';import {a as a$6}from'./chunk-XMQV2WFY.mjs';import {a as a$b}from'./chunk-VKFLXFPP.mjs';import {b as b$1,a as a$5,c as c$2}from'./chunk-YIXNAWH6.mjs';import {a as a$4}from'./chunk-XRDP2Y4J.mjs';import {h}from'./chunk-XRWRECDA.mjs';import {c as c$3}from'./chunk-O34B5KOW.mjs';import {a as a$a}from'./chunk-KG2ADZG6.mjs';import {a as a$1,b as b$2}from'./chunk-4OTKOCGB.mjs';import {a}from'./chunk-KSPJP74K.mjs';import {z}from'zod';/*! © 2025-2026 AND YOU CREATE SAS (RCS Paris 940 190 614). Proprietary — see LICENSE (Standards SDK License 1.0). */
|
|
2
|
-
function N(t){return t==null||typeof t=="string"&&t.trim()===""?true:t instanceof Date?false:typeof t=="object"&&!Array.isArray(t)?Object.values(t).every(e=>e==null||typeof e=="string"&&e.trim()===""):false}a(N,"isEmptyValue");function c(t){return z.preprocess(e=>N(e)?null:e,t.nullish())}a(c,"withEmptyToNull");function s(t,e=a$1){switch(t.type){case "text":return c$3(t,e);case "richtext":return a$b(t,e);case "number":return a$a(t,e);case "checkbox":return a$9(t,e);case "date":return a$8(t,e);case "phone":return d(t,e);case "currency":return a$7(t,e);case "status":return c$2(t,e);case "location":return a$6(t,e);case "select":return a$5(t,e);case "multiselect":return b$1(t,e);case "user":return a$4(t,e);case "relation":return c$1(t,e);case "formula":return a$3(t,e);case "rollup":return a$2(t,e);default:return z.unknown()}}a(s,"createAttributeValidator");function q(t,e=a$1){let o=s(t,e);return t.required?o:c(o)}a(q,"createFormAttributeValidator");function ft(t){return t==null||t===""}a(ft,"isNullishOrEmptyString");function f(t){return t==null?false:typeof t=="string"?t.trim()!=="":Array.isArray(t)?t.length>0:true}a(f,"isValuePresent");var E=new WeakMap,M=new WeakMap;function p(t){let e=E.get(t);if(e)return e;let o={};for(let n of t.attributes){let a=s(n);n.required?o[n.name]=a.refine(f,{message:a$1.required(n)}):o[n.name]=c(a);}let r=z.object(o).passthrough();return E.set(t,r),r}a(p,"createObjectValidator");function m(t){let e=M.get(t);if(e)return e;let o={};for(let n of t.attributes){let a=s(n);o[n.name]=c(a);}let r=z.object(o).passthrough();return M.set(t,r),r}a(m,"createDraftValidator");function F(t,e){let o=s(t);if(!t.required&&e==null)return {success:true,data:{[t.name]:e}};let r=o.safeParse(e);return r.success?{success:true,data:{[t.name]:r.data}}:{success:false,errors:b$2(r.error).map(n=>({path:[t.name,...n.path],message:n.message}))}}a(F,"validateAttribute");function b(t,e){let r=p(t).safeParse(e);return r.success?{success:true,data:r.data}:{success:false,errors:b$2(r.error)}}a(b,"validateObject");function L(t,e){let o=b(t,e);if(!o.success){let r=o.errors??[],n=r.map(a=>`${a.path.join(".")}: ${a.message}`).join(`
|
|
3
|
-
`)||"Unknown validation error";throw new h(`Validation failed for ${t.label}:
|
|
4
|
-
${n}`,r.map(a=>({path:a.path,message:a.message})))}return o.data}a(L,"validateObjectOrThrow");function Z(t,e){let r=m(t).safeParse(e);return r.success?{success:true,data:r.data}:{success:false,errors:b$2(r.error)}}a(Z,"validateDraft");function v(t,e){let o=Z(t,e);if(!o.success){let r=o.errors??[],n=r.map(a=>`${a.path.join(".")}: ${a.message}`).join(`
|
|
5
|
-
`)||"Unknown validation error";throw new h(`Draft validation failed for ${t.label}:
|
|
6
|
-
${n}`,r.map(a=>({path:a.path,message:a.message})))}return o.data}a(v,"validateDraftOrThrow");function I(t,e){let o=new Set(t.attributes.map(n=>n.name)),r=Object.keys(e).filter(n=>!o.has(n));if(r.length>0)throw new h(`Unknown attribute${r.length>1?"s":""} for ${t.label}: ${r.join(", ")}`,r.map(n=>({path:[n],message:"Unknown attribute"})))}a(I,"rejectUnknownAttributesOrThrow");function $(t,e){let o=[];for(let r of t.attributes)r.required&&!f(e[r.name])&&o.push(r);return o}a($,"getMissingRequiredAttributes");function _(t,e){return $(t,e).length>0?false:b(t,e).success}a(_,"isRecordComplete");export{ft as a,f as b,s as c,q as d,p as e,m as f,F as g,b as h,L as i,Z as j,v as k,I as l,$ as m,_ as n};
|