@stndrds/schema 1.0.0-alpha.331 → 1.0.0-alpha.333
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-DilIWUev.d.mts → all-BLytyk5I.d.mts} +20 -9
- package/dist/{all-CWDgBPuS.d.ts → all-Cf6oNz9y.d.ts} +20 -9
- package/dist/{checkbox-preO352q.d.mts → checkbox-DGuL9Z3k.d.mts} +2 -2
- package/dist/{checkbox-CjnTd8DE.d.ts → checkbox-DIk051px.d.ts} +2 -2
- package/dist/{config-BQJJHopR.js → config-CFYxsRcx.js} +1 -1
- package/dist/{config-_sOeudpS.mjs → config-CHSqDLhx.mjs} +1 -1
- package/dist/{date-CxwHkbid.d.ts → date-B4ZumBBO.d.ts} +2 -2
- package/dist/{date-BL3UHIXs.d.mts → date-D7P9JtGg.d.mts} +2 -2
- package/dist/{exceptions-DGCzCc9t.d.mts → exceptions-DG_iMvYs.d.mts} +5 -2
- package/dist/{exceptions-DGCzCc9t.d.ts → exceptions-DG_iMvYs.d.ts} +5 -2
- package/dist/exceptions.d.mts +1 -1
- package/dist/exceptions.d.ts +1 -1
- package/dist/{index-BoUwfrDH.d.mts → index--ukNqScY.d.mts} +2 -2
- package/dist/{index-DqwNrDSp.d.ts → index-B6DXIuf2.d.ts} +2 -2
- package/dist/{index-XtmC-C7J.d.mts → index-CK7gaSRm.d.mts} +1 -1
- package/dist/{index-Uwy7CTKo.d.ts → index-CePzb28P.d.ts} +1 -1
- package/dist/{index-B7HmBsUS.d.ts → index-ZnCTYc93.d.ts} +1 -1
- package/dist/{index-C8M7Amy9.d.mts → index-gM_g_Y_H.d.mts} +1 -1
- package/dist/index.d.mts +13 -15
- package/dist/index.d.ts +13 -15
- package/dist/index.js +2 -2
- package/dist/index.mjs +9 -9
- package/dist/{number-GmD5PM5s.d.ts → number-BMX9OJ46.d.ts} +2 -2
- package/dist/{number-Ddi_YYfm.d.mts → number-DYExtkZN.d.mts} +2 -2
- package/dist/{object-DSRy1coV.mjs → object-B9V5JZzh.mjs} +1 -1
- package/dist/{object-DGu0m2Y1.js → object-CUkTFj0u.js} +1 -1
- package/dist/phone-CLsxU8tv.js +2 -0
- package/dist/phone-DfXAzPpD.mjs +2 -0
- package/dist/{text-D6UypN8p.d.ts → text-6w5qf9V1.d.ts} +2 -2
- package/dist/{text-CxwF5K4k.d.mts → text-BwN_Y1Du.d.mts} +2 -2
- package/dist/utils.d.mts +1 -1
- package/dist/utils.d.ts +1 -1
- package/dist/validation/all.d.mts +4 -4
- package/dist/validation/all.d.ts +4 -4
- package/dist/validation/all.js +1 -1
- package/dist/validation/all.mjs +1 -1
- package/dist/validation/complex/currency.d.mts +2 -2
- package/dist/validation/complex/currency.d.ts +2 -2
- package/dist/validation/complex/location.d.mts +2 -2
- package/dist/validation/complex/location.d.ts +2 -2
- package/dist/validation/complex/phone.d.mts +2 -2
- package/dist/validation/complex/phone.d.ts +2 -2
- package/dist/validation/complex/phone.js +1 -1
- package/dist/validation/complex/phone.mjs +1 -1
- package/dist/validation/complex/relation.d.mts +2 -2
- package/dist/validation/complex/relation.d.ts +2 -2
- package/dist/validation/complex/richtext.d.mts +2 -2
- package/dist/validation/complex/richtext.d.ts +2 -2
- package/dist/validation/complex/select.d.mts +2 -2
- package/dist/validation/complex/select.d.ts +2 -2
- package/dist/validation/complex/user.d.mts +2 -2
- package/dist/validation/complex/user.d.ts +2 -2
- package/dist/validation/computed/formula.d.mts +2 -2
- package/dist/validation/computed/formula.d.ts +2 -2
- package/dist/validation/computed/rollup.d.mts +2 -2
- package/dist/validation/computed/rollup.d.ts +2 -2
- package/dist/validation/config/index.d.mts +1 -1
- package/dist/validation/config/index.d.ts +1 -1
- package/dist/validation/config/index.js +1 -1
- package/dist/validation/config/index.mjs +1 -1
- package/dist/validation/core/index.d.mts +1 -1
- package/dist/validation/core/index.d.ts +1 -1
- package/dist/validation/object/index.d.mts +1 -1
- package/dist/validation/object/index.d.ts +1 -1
- package/dist/validation/object/index.js +1 -1
- package/dist/validation/object/index.mjs +1 -1
- package/dist/validation/primitives/checkbox.d.mts +1 -1
- package/dist/validation/primitives/checkbox.d.ts +1 -1
- package/dist/validation/primitives/date.d.mts +1 -1
- package/dist/validation/primitives/date.d.ts +1 -1
- package/dist/validation/primitives/number.d.mts +1 -1
- package/dist/validation/primitives/number.d.ts +1 -1
- package/dist/validation/primitives/text.d.mts +1 -1
- package/dist/validation/primitives/text.d.ts +1 -1
- package/dist/view-config.schema-CcfExWMt.mjs +2 -0
- package/dist/view-config.schema-D-TbyG6j.js +2 -0
- package/package.json +2 -2
- package/dist/phone-BawtTYVi.mjs +0 -2
- package/dist/phone-DVaELsa3.js +0 -2
- package/dist/view-config.schema-B4AkqLKQ.mjs +0 -2
- package/dist/view-config.schema-to6p1m8L.js +0 -2
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
|
|
2
|
-
import { Tt as RollupAttribute, Y as Attribute, Z as AttributeType } from "./exceptions-
|
|
3
|
-
import { m as ListViewTabVisibility } from "./index
|
|
4
|
-
import "./index-
|
|
5
|
-
import "./index-
|
|
6
|
-
import "./text-
|
|
7
|
-
import "./number-
|
|
8
|
-
import "./checkbox-
|
|
9
|
-
import "./date-
|
|
2
|
+
import { Tt as RollupAttribute, Y as Attribute, Z as AttributeType } from "./exceptions-DG_iMvYs.mjs";
|
|
3
|
+
import { m as ListViewTabVisibility } from "./index--ukNqScY.mjs";
|
|
4
|
+
import "./index-gM_g_Y_H.mjs";
|
|
5
|
+
import "./index-CK7gaSRm.mjs";
|
|
6
|
+
import "./text-BwN_Y1Du.mjs";
|
|
7
|
+
import "./number-DYExtkZN.mjs";
|
|
8
|
+
import "./checkbox-DGuL9Z3k.mjs";
|
|
9
|
+
import "./date-D7P9JtGg.mjs";
|
|
10
10
|
import { IconName } from "@stndrds/constants";
|
|
11
11
|
import { z as z$1 } from "zod";
|
|
12
12
|
//#region src/types/filters.d.ts
|
|
@@ -158,6 +158,17 @@ declare const NO_VALUE_OPERATORS: readonly NoValueOperator[];
|
|
|
158
158
|
* Check if an operator requires a value
|
|
159
159
|
*/
|
|
160
160
|
declare function isNoValueOperator(operator: FilterOperator): operator is NoValueOperator;
|
|
161
|
+
/**
|
|
162
|
+
* The operators a rule may carry on an attribute known by TYPE alone — the
|
|
163
|
+
* filter generator's catalogue, shared by the server that offers it and the
|
|
164
|
+
* client that reads the answer back so the two cannot drift (#3629).
|
|
165
|
+
*
|
|
166
|
+
* A rollup's real operators depend on its aggregation, which the wire shape
|
|
167
|
+
* does not carry and `OPERATORS_BY_TYPE` therefore excludes; presence is the
|
|
168
|
+
* one question every rollup answers, so that is what it gets. An unknown type
|
|
169
|
+
* carries nothing.
|
|
170
|
+
*/
|
|
171
|
+
declare function filterOperatorsByTypeForGeneration(type: string): readonly FilterOperator[];
|
|
161
172
|
/**
|
|
162
173
|
* Get the filter operators for a rollup attribute based on its aggregation function and target type.
|
|
163
174
|
*
|
|
@@ -1183,4 +1194,4 @@ declare const draftContentViewDefinitionSchema: z$1.ZodObject<{
|
|
|
1183
1194
|
}, z$1.core.$strict>;
|
|
1184
1195
|
declare const contentViewDefinitionSchema: z$1.ZodType<ContentViewDefinition>;
|
|
1185
1196
|
//#endregion
|
|
1186
|
-
export { QueryState as $, FormContentDefinition as A, DayMonthValue as B, ContentOpenMode as C, CustomContentDefinition as D, ContentViewDefinition as E, MeetingsContentDefinition as F, FilterOperator as G, EdgeQuantifier as H, RichtextContentDefinition as I, FilterValue as J, FilterRule as K, ViewContentDefinition as L, FormsContentDefinition as M, KanbanCollectionContentDefinition as N, DocumentsContentDefinition as O, ListViewLayout as P, PhoneFilterValue as Q, ViewRead as R, ContentFieldGroup as S, ContentViewContext as T, ExtendedFilterRule as U, DynamicValue as V, FilterCombinator as W, NoValueOperator as X, NO_VALUE_OPERATORS as Y, OPERATORS_BY_TYPE as Z, CollectionContentDefinition as _, contentViewDefinitionSchemaFor as a, ContentCreateMode as b, draftContentViewDefinitionSchemaFor as c, sortsSchema as d, RelativeDateValue as et, colorIdSchema as f, CollectionAction as g, ActivityContentDefinition as h, contentViewDefinitionSchema as i,
|
|
1197
|
+
export { QueryState as $, FormContentDefinition as A, DayMonthValue as B, ContentOpenMode as C, CustomContentDefinition as D, ContentViewDefinition as E, MeetingsContentDefinition as F, FilterOperator as G, EdgeQuantifier as H, RichtextContentDefinition as I, FilterValue as J, FilterRule as K, ViewContentDefinition as L, FormsContentDefinition as M, KanbanCollectionContentDefinition as N, DocumentsContentDefinition as O, ListViewLayout as P, PhoneFilterValue as Q, ViewRead as R, ContentFieldGroup as S, ContentViewContext as T, ExtendedFilterRule as U, DynamicValue as V, FilterCombinator as W, NoValueOperator as X, NO_VALUE_OPERATORS as Y, OPERATORS_BY_TYPE as Z, CollectionContentDefinition as _, contentViewDefinitionSchemaFor as a, isNoValueOperator as at, ContentCreateMode as b, draftContentViewDefinitionSchemaFor as c, sortsSchema as d, RelativeDateValue as et, colorIdSchema as f, CollectionAction as g, ActivityContentDefinition as h, contentViewDefinitionSchema as i, getRollupFilterOperators as it, FormDensity as j, EmailsContentDefinition as k, filterStateSchema as l, SCHEMA_LIMITS as m, collectionContentSourceSchema as n, SortRule as nt, displayAttributesSchema as o, iconNameSchema as p, FilterState as q, columnsSchema as r, filterOperatorsByTypeForGeneration as rt, draftContentViewDefinitionSchema as s, AsideRule as t, SortDirection as tt, publishedViewContentDefinitionSchema as u, CollectionContentSource as v, ContentPlacement as w, ContentField as x, ColumnReference as y, CurrencyFilterValue as z };
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
|
|
2
|
-
import { Tt as RollupAttribute, Y as Attribute, Z as AttributeType } from "./exceptions-
|
|
3
|
-
import { m as ListViewTabVisibility } from "./index-
|
|
4
|
-
import "./index-
|
|
5
|
-
import "./index-
|
|
6
|
-
import "./text-
|
|
7
|
-
import "./number-
|
|
8
|
-
import "./checkbox-
|
|
9
|
-
import "./date-
|
|
2
|
+
import { Tt as RollupAttribute, Y as Attribute, Z as AttributeType } from "./exceptions-DG_iMvYs.js";
|
|
3
|
+
import { m as ListViewTabVisibility } from "./index-B6DXIuf2.js";
|
|
4
|
+
import "./index-CePzb28P.js";
|
|
5
|
+
import "./index-ZnCTYc93.js";
|
|
6
|
+
import "./text-6w5qf9V1.js";
|
|
7
|
+
import "./number-BMX9OJ46.js";
|
|
8
|
+
import "./checkbox-DIk051px.js";
|
|
9
|
+
import "./date-B4ZumBBO.js";
|
|
10
10
|
import { z as z$1 } from "zod";
|
|
11
11
|
import { IconName } from "@stndrds/constants";
|
|
12
12
|
//#region src/types/filters.d.ts
|
|
@@ -158,6 +158,17 @@ declare const NO_VALUE_OPERATORS: readonly NoValueOperator[];
|
|
|
158
158
|
* Check if an operator requires a value
|
|
159
159
|
*/
|
|
160
160
|
declare function isNoValueOperator(operator: FilterOperator): operator is NoValueOperator;
|
|
161
|
+
/**
|
|
162
|
+
* The operators a rule may carry on an attribute known by TYPE alone — the
|
|
163
|
+
* filter generator's catalogue, shared by the server that offers it and the
|
|
164
|
+
* client that reads the answer back so the two cannot drift (#3629).
|
|
165
|
+
*
|
|
166
|
+
* A rollup's real operators depend on its aggregation, which the wire shape
|
|
167
|
+
* does not carry and `OPERATORS_BY_TYPE` therefore excludes; presence is the
|
|
168
|
+
* one question every rollup answers, so that is what it gets. An unknown type
|
|
169
|
+
* carries nothing.
|
|
170
|
+
*/
|
|
171
|
+
declare function filterOperatorsByTypeForGeneration(type: string): readonly FilterOperator[];
|
|
161
172
|
/**
|
|
162
173
|
* Get the filter operators for a rollup attribute based on its aggregation function and target type.
|
|
163
174
|
*
|
|
@@ -1183,4 +1194,4 @@ declare const draftContentViewDefinitionSchema: z$1.ZodObject<{
|
|
|
1183
1194
|
}, z$1.core.$strict>;
|
|
1184
1195
|
declare const contentViewDefinitionSchema: z$1.ZodType<ContentViewDefinition>;
|
|
1185
1196
|
//#endregion
|
|
1186
|
-
export { QueryState as $, FormContentDefinition as A, DayMonthValue as B, ContentOpenMode as C, CustomContentDefinition as D, ContentViewDefinition as E, MeetingsContentDefinition as F, FilterOperator as G, EdgeQuantifier as H, RichtextContentDefinition as I, FilterValue as J, FilterRule as K, ViewContentDefinition as L, FormsContentDefinition as M, KanbanCollectionContentDefinition as N, DocumentsContentDefinition as O, ListViewLayout as P, PhoneFilterValue as Q, ViewRead as R, ContentFieldGroup as S, ContentViewContext as T, ExtendedFilterRule as U, DynamicValue as V, FilterCombinator as W, NoValueOperator as X, NO_VALUE_OPERATORS as Y, OPERATORS_BY_TYPE as Z, CollectionContentDefinition as _, contentViewDefinitionSchemaFor as a, ContentCreateMode as b, draftContentViewDefinitionSchemaFor as c, sortsSchema as d, RelativeDateValue as et, colorIdSchema as f, CollectionAction as g, ActivityContentDefinition as h, contentViewDefinitionSchema as i,
|
|
1197
|
+
export { QueryState as $, FormContentDefinition as A, DayMonthValue as B, ContentOpenMode as C, CustomContentDefinition as D, ContentViewDefinition as E, MeetingsContentDefinition as F, FilterOperator as G, EdgeQuantifier as H, RichtextContentDefinition as I, FilterValue as J, FilterRule as K, ViewContentDefinition as L, FormsContentDefinition as M, KanbanCollectionContentDefinition as N, DocumentsContentDefinition as O, ListViewLayout as P, PhoneFilterValue as Q, ViewRead as R, ContentFieldGroup as S, ContentViewContext as T, ExtendedFilterRule as U, DynamicValue as V, FilterCombinator as W, NoValueOperator as X, NO_VALUE_OPERATORS as Y, OPERATORS_BY_TYPE as Z, CollectionContentDefinition as _, contentViewDefinitionSchemaFor as a, isNoValueOperator as at, ContentCreateMode as b, draftContentViewDefinitionSchemaFor as c, sortsSchema as d, RelativeDateValue as et, colorIdSchema as f, CollectionAction as g, ActivityContentDefinition as h, contentViewDefinitionSchema as i, getRollupFilterOperators as it, FormDensity as j, EmailsContentDefinition as k, filterStateSchema as l, SCHEMA_LIMITS as m, collectionContentSourceSchema as n, SortRule as nt, displayAttributesSchema as o, iconNameSchema as p, FilterState as q, columnsSchema as r, filterOperatorsByTypeForGeneration as rt, draftContentViewDefinitionSchema as s, AsideRule as t, SortDirection as tt, publishedViewContentDefinitionSchema as u, CollectionContentSource as v, ContentPlacement as w, ContentField as x, ColumnReference as y, CurrencyFilterValue as z };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
|
-
import { et as CheckboxAttribute } from "./exceptions-
|
|
3
|
-
import { r as ValidationMessages } from "./index-
|
|
2
|
+
import { et as CheckboxAttribute } from "./exceptions-DG_iMvYs.mjs";
|
|
3
|
+
import { r as ValidationMessages } from "./index-CK7gaSRm.mjs";
|
|
4
4
|
import { z as z$1 } from "zod";
|
|
5
5
|
//#region src/validation/primitives/checkbox.d.ts
|
|
6
6
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
|
-
import { et as CheckboxAttribute } from "./exceptions-
|
|
3
|
-
import { r as ValidationMessages } from "./index-
|
|
2
|
+
import { et as CheckboxAttribute } from "./exceptions-DG_iMvYs.js";
|
|
3
|
+
import { r as ValidationMessages } from "./index-ZnCTYc93.js";
|
|
4
4
|
import { z as z$1 } from "zod";
|
|
5
5
|
//#region src/validation/primitives/checkbox.d.ts
|
|
6
6
|
/**
|
|
@@ -10,4 +10,4 @@ Name must be a valid variable identifier:
|
|
|
10
10
|
✅ Valid: 'firstName', 'first_name', 'FirstName', 'FIRST_NAME'
|
|
11
11
|
❌ Invalid: 'first-name', 'first name', '123name', 'first.name'`);if(p.includes(e))throw Error(`[AttributeBuilder] "${e}" is a reserved name and cannot be used as an attribute name.\nReserved names: ${p.join(`, `)}`)}function validateLabel(e){if(!e||e.length===0)throw Error(`[AttributeBuilder] Attribute label cannot be empty`);if(e.length>128)throw Error(`[AttributeBuilder] Attribute label is too long (max 128 characters)`)}function validateIconName(e,t){if(!m.has(e))throw Error(`[AttributeBuilder] Invalid icon "${e}" in ${t}.\nIcon must be one of the predefined icons from @stndrds/constants.`)}function validateOptions(e,t){let n=new Set;for(let r of t){if(!r.value?.trim())throw Error(`[AttributeBuilder] Option in "${e}" has an empty or missing value.`);if(!r.label?.trim())throw Error(`[AttributeBuilder] Option "${r.value}" in "${e}" has an empty or missing label.`);if(n.has(r.value))throw Error(`[AttributeBuilder] Duplicate option value "${r.value}" in "${e}".`);n.add(r.value)}for(let n of t){if(n.inverse===void 0)continue;let r=t.find(e=>e.value===n.inverse);if(!r)throw Error(`[AttributeBuilder] Option "${n.value}" in "${e}" has inverse "${n.inverse}" which does not match any option value.`);if(r.inverse!==n.value)throw Error(`[AttributeBuilder] Inverse mismatch in "${e}": "${n.value}" points to "${n.inverse}", but "${n.inverse}" points to "${r.inverse??`(none)`}". Inverse pairs must be symmetric.`)}}const v={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},ne=Object.keys(s.COLORS),re=new Set(s.ICONS),y=c.z.enum(ne).describe(`A color id from the palette`),b=c.z.string().superRefine((e,t)=>{re.has(e)||t.addIssue({code:`custom`,message:`Invalid icon name`})}).transform(e=>e);var ComputedFormulaParseError=class extends Error{constructor(e){super(e),this.name=`ComputedFormulaParseError`}};function parseComputedFormula(e){let t=new Parser(tokenize(e)),n=t.parseExpression();return t.expectEnd(),n}function tokenize(e){let t=[],n=0;for(;n<e.length;){let r=e[n];if(r===` `||r===` `||r===`
|
|
12
12
|
`||r===`\r`){n+=1;continue}if(r===`"`||r===`'`){let i=scanString(e,n,r);t.push({kind:`string`,value:i.value,position:n}),n=i.nextIndex;continue}if(isDigit(r)){let r=scanNumber(e,n);t.push({kind:`number`,value:r.value,position:n}),n=r.nextIndex;continue}if(isIdentifierStart(r)){let r=scanIdentifier(e,n),i=r.value.toLowerCase();i===`true`?t.push({kind:`boolean`,value:!0,position:n}):i===`false`?t.push({kind:`boolean`,value:!1,position:n}):i===`null`?t.push({kind:`null`,position:n}):t.push({kind:`identifier`,value:r.value,position:n}),n=r.nextIndex;continue}let i=e.slice(n,n+2);if(i===`>=`||i===`<=`||i===`==`||i===`!=`){t.push({kind:`operator`,value:i,position:n}),n+=2;continue}if(r===`>`||r===`<`||r===`+`||r===`-`||r===`*`||r===`/`){t.push({kind:`operator`,value:r,position:n}),n+=1;continue}if(r===`(`||r===`)`||r===`,`||r===`.`){t.push({kind:`punctuation`,value:r,position:n}),n+=1;continue}throw new ComputedFormulaParseError(`Unexpected character "${r}" at position ${n}`)}return t}function scanString(e,t,n=`"`){let r=``,i=t+1;for(;i<e.length;){let t=e[i];if(t===n)return{value:r,nextIndex:i+1};if(t===`\\`){let t=e[i+1];if(t===void 0)throw new ComputedFormulaParseError(`Unterminated string literal at position ${i}`);r+=decodeEscape(t,i),i+=2;continue}r+=t,i+=1}throw new ComputedFormulaParseError(`Unterminated string literal at position ${t}`)}function decodeEscape(e,t){switch(e){case`"`:case`\\`:return e;case`n`:return`
|
|
13
|
-
`;case`r`:return`\r`;case`t`:return` `;default:throw new ComputedFormulaParseError(`Unknown escape sequence "\\${e}" at position ${t}`)}}function scanNumber(e,t){let n=t;for(;n<e.length&&isDigit(e[n]);)n+=1;if(e[n]===`.`){let t=n;if(n+=1,!isDigit(e[n]))throw new ComputedFormulaParseError(`Invalid number literal at position ${t}`);for(;n<e.length&&isDigit(e[n]);)n+=1}let r=e.slice(t,n),i=Number(r);if(!Number.isFinite(i))throw new ComputedFormulaParseError(`Invalid number literal "${r}"`);return{value:i,nextIndex:n}}function scanIdentifier(e,t){let n=t+1;for(;n<e.length&&isIdentifierPart(e[n]);)n+=1;return{value:e.slice(t,n),nextIndex:n}}function isDigit(e){return e!==void 0&&e>=`0`&&e<=`9`}function isIdentifierStart(e){return e!==void 0&&/[A-Za-z_]/.test(e)}function isIdentifierPart(e){return e!==void 0&&/[A-Za-z0-9_]/.test(e)}var Parser=class{constructor(e){this.tokens=e,this.position=0}parseExpression(){return this.parseBinaryExpression(0)}expectEnd(){let e=this.peek();if(e!==void 0)throw new ComputedFormulaParseError(`Unexpected token ${describeToken(e)} at position ${e.position}`)}parseBinaryExpression(e){let t=this.parsePrimary();for(;;){let n=this.peek();if(n?.kind!==`operator`)return t;let r=getOperatorPrecedence(n.value);if(r<e)return t;let i=n.value;this.consume();let a=this.parseBinaryExpression(r+1);t={kind:`binary`,operator:i,left:t,right:a}}}parsePrimary(){let e=this.consume();if(e===void 0)throw new ComputedFormulaParseError(`Unexpected end of expression`);switch(e.kind){case`string`:case`number`:case`boolean`:return{kind:`literal`,value:e.value};case`null`:return{kind:`literal`,value:null};case`identifier`:return this.parseIdentifier(e.value);case`punctuation`:if(e.value===`(`){let e=this.parseExpression();return this.expectPunctuation(`)`),e}break;case`operator`:if(e.value===`-`){let e=this.consume();if(e?.kind===`number`)return{kind:`literal`,value:-e.value}}}throw new ComputedFormulaParseError(`Expected literal, path, call, or parenthesized expression at position ${e.position}`)}parseIdentifier(e){if(this.matchPunctuation(`(`)){let t=[];if(!this.matchPunctuation(`)`)){do t.push(this.parseExpression());while(this.matchPunctuation(`,`));this.expectPunctuation(`)`)}return{kind:`call`,functionName:e.toLowerCase(),args:t}}let t=[e];for(;this.matchPunctuation(`.`);){let e=this.consume();if(e?.kind!==`identifier`)throw new ComputedFormulaParseError(`Expected attribute name after path separator at position ${e?.position??this.previousPosition()}`);t.push(e.value)}return{kind:`path`,parts:t}}expectPunctuation(e){if(!this.matchPunctuation(e))throw new ComputedFormulaParseError(`Expected "${e}" at position ${this.peek()?.position??this.previousPosition()}`)}matchPunctuation(e){let t=this.peek();return t?.kind===`punctuation`&&t.value===e&&(this.consume(),!0)}peek(){return this.tokens[this.position]}consume(){let e=this.tokens[this.position];return this.position+=1,e}previousPosition(){return this.tokens[this.position-1]?.position??0}};function describeToken(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}}function getOperatorPrecedence(e){switch(e){case`*`:case`/`:return 3;case`+`:case`-`:return 2;case`>`:case`<`:case`>=`:case`<=`:case`==`:case`!=`:return 1;default:return e}}const x=c.z.object({placeholder:c.z.string().optional(),description:c.z.string().optional(),defaultValue:c.z.unknown().optional(),icon:c.z.string().optional(),order:c.z.number().int().optional(),hidden:c.z.boolean().optional(),archived:c.z.boolean().optional(),deprecated:c.z.boolean().optional(),metadata:c.z.record(c.z.string(),c.z.unknown()).optional()}),S=[`placeholder`,`description`,`defaultValue`,`icon`,`order`,`hidden`,`archived`,`deprecated`,`metadata`];function refuseForeignKeys(e,t,n=[]){let r=new Set(n);return function refuse(n,i,a,o=[]){let s=e[n];if(s!==void 0&&i!==void 0)for(let e of Object.keys(i))s.has(e)||r.has(e)||a.addIssue({code:`custom`,path:[...o,e],message:`"${e}" is not a ${n} ${t}; keys of ${n}: ${[...s].join(`, `)}`})}}const C=c.z.object({value:c.z.string().min(1).describe(`Stored value`),label:c.z.string().min(1).describe(`Label people see`),description:c.z.string().describe(`Extra context`).optional(),inverse:c.z.string().describe(`Paired option's value (symmetric)`).optional(),archived:c.z.boolean().describe(`Hides without deleting`).optional()}),w=c.z.enum([`idle`,`in_progress`,`finished`]).describe(`Workflow stage`),T=C.extend({color:y}).strict(),E=T,D=C.extend({color:y,group:w}).strict(),O=C.extend({color:c.z.string().optional().describe(`A color id`),group:w.optional()}).strict(),k=c.z.array(O).min(1).refine(e=>{let t=e.map(e=>e.value);return new Set(t).size===t.length},{message:`Duplicate option values are not allowed`});function writeOptionsArraySchema(e){return c.z.array(e).min(1).max(v.optionsPerAttribute).refine(e=>{let t=e.map(e=>e.value);return new Set(t).size===t.length},{message:`Duplicate option values are not allowed`})}const A=writeOptionsArraySchema(T),j=writeOptionsArraySchema(E),M=writeOptionsArraySchema(D),ie=c.z.object({object:c.z.string().min(1).describe(`Target object`),displayTemplate:c.z.string().optional().describe(`Linked record label template`),filter:c.z.record(c.z.string(),c.z.unknown()).optional().describe(`Restricts linkable records`)}),ae=c.z.object({object:c.z.string().min(1).describe(`Other side's object`),attribute:c.z.string().min(1).describe(`Other side's attribute`),cardinality:c.z.enum([`one`,`many`]).optional().describe(`Other side's cardinality`),label:c.z.string().min(1).optional().describe(`Other side's label`),storageOwner:c.z.boolean().optional().describe(`Owns the join storage`)}),N=c.z.object({objectName:c.z.string().min(1).describe(`API name of the object whose options are mirrored`),attributeName:c.z.string().min(1).describe(`API name of the select/status attribute to mirror options from`),attributeId:c.z.string().optional().describe(`Id of the source attribute, resolved by the server`)}),P=x.extend({multiline:c.z.boolean().describe(`Renders as a multi-line textarea`).optional(),minLength:c.z.number().int().min(0).describe(`Minimum character count`).optional(),maxLength:c.z.number().int().min(1).describe(`Maximum character count`).optional(),pattern:c.z.string().describe(`Regular expression the value must match`).optional(),format:c.z.enum([`email`,`url`,`slug`]).describe(`Validates and renders as this format`).optional()}),oe=x,F=x.extend({renderAs:c.z.enum([`number`,`rating`]).describe(`Plain number or a star rating`).optional(),min:c.z.number().describe(`Minimum allowed value`).optional(),max:c.z.number().describe(`Maximum allowed value`).optional(),unit:c.z.enum([`integer`,`decimal`,`percentage`]).describe(`How the value is stored and rendered`).optional(),decimals:c.z.number().int().min(0).max(10).describe(`Decimal places shown`).optional()}),I=x,L=x.extend({dateFormat:c.z.enum([`short`,`long`,`full`,`relative`]).describe(`How the date is rendered`).optional(),minDate:c.z.string().describe(`Earliest allowed date (ISO)`).optional(),maxDate:c.z.string().describe(`Latest allowed date (ISO)`).optional(),includeTime:c.z.boolean().describe(`Also captures a time of day`).optional(),endDate:c.z.boolean().describe(`Paired with another date attribute as a range's end`).optional(),timeFormat:c.z.enum([`12h`,`24h`]).describe(`Clock format when a time is included`).optional()}),R=x.extend({defaultCountryCode:c.z.string().length(3).describe(`ISO country code preselected in the dialer`).optional()}),z=x.extend({defaultCurrency:c.z.string().length(3).describe(`ISO currency code preselected for new values`).optional(),allowedCurrencies:c.z.array(c.z.string().length(3)).describe(`ISO currency codes a value may use; any currency when omitted`).optional(),allowNegative:c.z.boolean().describe(`Whether a negative amount is accepted`).optional()}),B=x.extend({options:k.describe(`The workflow statuses, in order`)}),V=x.extend({granularity:c.z.enum([`full`,`address`,`city`,`state`,`country`,`coordinates`]).describe(`How precise a location must be captured`).optional(),defaultCountry:c.z.string().length(3).describe(`ISO country code preselected for new values`).optional(),allowedCountries:c.z.array(c.z.string().length(3)).describe(`ISO country codes a value may use; any country when omitted`).optional()}),H=x.extend({options:k.describe(`Options`),renderAs:c.z.literal(`badges`).optional().describe(`Renders the chosen option as a colored badge`)}),U=x.extend({options:k.describe(`Options`),renderAs:c.z.literal(`badges`).optional().describe(`Renders the chosen options as colored badges`)}),W=x.extend({types:c.z.array(c.z.enum([`user`,`agent`])).min(1).optional().describe(`Which kinds of actor can be picked; both when omitted`),multiple:c.z.boolean().optional().describe(`Whether more than one actor can be picked`)}),G={name:_.describe(`Property API name`),label:c.z.string().min(1).describe(`Label people see`),required:c.z.boolean().describe(`Required on every edge`).optional()},K={id:c.z.string().optional(),objectId:c.z.string().optional(),system:c.z.boolean().optional(),unique:c.z.boolean().optional()},se=Object.fromEntries(S.map(e=>[e,!0])),q=[`text`,`number`,`checkbox`,`date`,`phone`,`currency`,`location`],J=[...q,`select`,`multiselect`,`status`],Y={text:P,number:F,checkbox:I,date:L,phone:R,currency:z,location:V,select:H,multiselect:U,status:B},ce={...Y,select:H.extend({options:A.describe(`Options`)}),multiselect:U.extend({options:j.describe(`Options`)}),status:B.extend({options:M.describe(`Statuses`)})},propertyWireConfigShapeFor=e=>ce[e].omit(se).shape,storedPropertyMember=e=>c.z.object({...G,...K,type:c.z.literal(e).describe(`Property type`),...Y[e].shape}).strip(),X=c.z.discriminatedUnion(`type`,J.map(storedPropertyMember)),Z=c.z.object({definitions:c.z.array(X).min(1).max(v.optionsPerAttribute).describe(`Edge properties`)}).strip().describe(`Properties carried by the edge itself (role, share, since…), never a third object`),le=refuseForeignKeys(Object.fromEntries(J.map(e=>[e,new Set(Object.keys(propertyWireConfigShapeFor(e)))])),`property key`,[...Object.keys(G),`type`]);function refuseForeignPropertyKeys(e,t){le(e.type,e,t)}const ue=q.reduce((e,t)=>(Object.assign(e,propertyWireConfigShapeFor(t)),e),{}),optionPropertyWireMember=e=>c.z.object({...G,type:e.length===1?c.z.literal(e[0]).describe(`Property type`):c.z.enum(e).describe(`Property type`),...propertyWireConfigShapeFor(e[0])}).strict(),Q=c.z.discriminatedUnion(`type`,[optionPropertyWireMember([`select`,`multiselect`]),optionPropertyWireMember([`status`]),c.z.object({...G,type:c.z.enum(q).describe(`Property type`),...ue}).strict().superRefine(refuseForeignPropertyKeys)]),de=c.z.object({definitions:c.z.array(Q).min(1).max(v.optionsPerAttribute).describe(`Edge properties`)}).strict().describe(`Properties carried by the edge itself (role, share, since…), never a third object`),$={text:P,richtext:oe,number:F,checkbox:I,date:L,phone:R,currency:z,status:B,location:V,select:H,multiselect:U,user:W,relation:x.extend({targets:c.z.array(ie).min(1).describe(`Target object(s)`),cardinality:c.z.enum([`one`,`many`]).describe(`one or many`),maxItems:c.z.number().int().min(1).optional().describe(`Max linked records`),bilateral:ae.optional().describe(`Syncs the other side's attribute`),properties:Z.optional()}),formula:x.extend({expression:c.z.string().min(1).superRefine((e,t)=>{try{parseComputedFormula(e)}catch(e){t.addIssue({code:c.z.ZodIssueCode.custom,message:e instanceof Error?e.message:`Invalid formula expression`})}}).describe(`The formula expression, compiled against this object's attributes`),returnType:c.z.enum([`text`,`number`,`boolean`,`date`,`select`,`multiselect`]).describe(`The formula's result type`),decimals:c.z.number().int().min(0).max(10).optional().describe(`Decimal places shown for a number result`),allowRelations:c.z.boolean().optional().describe(`Whether the expression may read across a relation`),optionsSource:N.optional().describe(`Mirrors an option set`)}),rollup:x.extend({relationAttribute:c.z.string().min(1).optional().describe(`API name of the relation this rollup aggregates through`),relationPath:c.z.string().optional().describe(`Not supported yet — single-hop only`),targetAttribute:c.z.string().min(1).describe(`API name of the attribute aggregated on the relation's target object`),function:c.z.enum([`sum`,`avg`,`earliest`,`latest`,`count`,`countValues`,`countUniqueValues`,`countEmpty`,`percentEmpty`,`percentNotEmpty`,`original`]).describe(`The aggregation applied across the linked records`),decimals:c.z.number().int().min(0).max(10).optional().describe(`Decimal places shown for a numeric result`),targetAttributeType:c.z.string().optional().describe(`Server-set`),targetAttributeOptions:c.z.array(O).optional().describe(`Server-set`),targetCurrencyCode:c.z.string().length(3).optional().describe(`Server-set`),optionsSource:N.optional().describe(`Mirrors an option set`)}),document:x.extend({properties:Z.optional(),accepts:c.z.array(c.z.string().min(1)).optional().describe("MIME prefixes or globs a file must match (e.g. `image/*`, `*.pdf`)"),maxFileSize:c.z.number().int().min(1).optional().describe(`Maximum file size in bytes`)})};function getAttributeConfigSchema(e){let t=$[e];if(!t)throw new o.ValidationError(`Unsupported attribute type: ${e}`,[]);return t}function parseAttributeConfig(e,t){return getAttributeConfigSchema(e).strip().parse(t)}function getAttributeConfigWriteSchema(e){let t=getAttributeConfigSchema(e).extend({icon:b.optional()});switch(e){case`select`:return t.extend({options:A.describe(`Options`)});case`multiselect`:return t.extend({options:j.describe(`Options`)});case`status`:return t.extend({options:M.describe(`Statuses`)});default:return t}}function validationErrorFromIssues(e){return o.ValidationError.fromZodErrors(e.map(e=>({path:e.path.map(e=>typeof e==`symbol`?String(e):e),message:e.message})))}function parseWriteSchema(e,t){let n=getAttributeConfigWriteSchema(e).strip().safeParse(t);if(!n.success)throw validationErrorFromIssues(n.error.issues);return n.data}function parseAttributeConfigForCreate(e,t){return parseWriteSchema(e,t)}function validatePatchedIcon(e){if(!Object.prototype.hasOwnProperty.call(e,`icon`))return;let t=b.optional().safeParse(e.icon);if(!t.success)throw o.ValidationError.fromZodErrors(t.error.issues.map(e=>({path:[`icon`,...e.path.map(e=>typeof e==`symbol`?String(e):e)],message:e.message})))}function isSelectLike(e){return e===`select`||e===`multiselect`||e===`status`}function parseAttributeConfigForUpdate(e,t){let n=Object.prototype.hasOwnProperty.call(t,`options`),r=Object.prototype.hasOwnProperty.call(t,`icon`),i={...e,...t};if(validatePatchedIcon(t),n){let{icon:t,...n}=i,a=parseWriteSchema(e.type,r?i:n);return!r&&t!==void 0&&(a.icon=t),a}let a=e.options;isSelectLike(e.type)&&(i.options=[{value:`__legacy__`,label:`__legacy__`}]);let o=getAttributeConfigSchema(e.type).strip().safeParse(i);if(!o.success)throw validationErrorFromIssues(o.error.issues);let s=o.data;return isSelectLike(e.type)&&(s.options=a),s}Object.defineProperty(exports,"A",{enumerable:!0,get:function(){return validateOptions}}),Object.defineProperty(exports,"C",{enumerable:!0,get:function(){return _}}),Object.defineProperty(exports,"D",{enumerable:!0,get:function(){return validateIconName}}),Object.defineProperty(exports,"E",{enumerable:!0,get:function(){return validateAttributeName}}),Object.defineProperty(exports,"F",{enumerable:!0,get:function(){return u}}),Object.defineProperty(exports,"I",{enumerable:!0,get:function(){return f}}),Object.defineProperty(exports,"L",{enumerable:!0,get:function(){return parseResourceVisibility}}),Object.defineProperty(exports,"M",{enumerable:!0,get:function(){return d}}),Object.defineProperty(exports,"N",{enumerable:!0,get:function(){return p}}),Object.defineProperty(exports,"O",{enumerable:!0,get:function(){return validateLabel}}),Object.defineProperty(exports,"P",{enumerable:!0,get:function(){return ee}}),Object.defineProperty(exports,"R",{enumerable:!0,get:function(){return l}}),Object.defineProperty(exports,"S",{enumerable:!0,get:function(){return v}}),Object.defineProperty(exports,"T",{enumerable:!0,get:function(){return assertUniqueBy}}),Object.defineProperty(exports,"_",{enumerable:!0,get:function(){return D}}),Object.defineProperty(exports,"a",{enumerable:!0,get:function(){return getAttributeConfigWriteSchema}}),Object.defineProperty(exports,"b",{enumerable:!0,get:function(){return y}}),Object.defineProperty(exports,"c",{enumerable:!0,get:function(){return parseAttributeConfigForCreate}}),Object.defineProperty(exports,"d",{enumerable:!0,get:function(){return Q}}),Object.defineProperty(exports,"f",{enumerable:!0,get:function(){return Z}}),Object.defineProperty(exports,"g",{enumerable:!0,get:function(){return w}}),Object.defineProperty(exports,"h",{enumerable:!0,get:function(){return T}}),Object.defineProperty(exports,"i",{enumerable:!0,get:function(){return getAttributeConfigSchema}}),Object.defineProperty(exports,"j",{enumerable:!0,get:function(){return validateViewName}}),Object.defineProperty(exports,"k",{enumerable:!0,get:function(){return validateObjectName}}),Object.defineProperty(exports,"l",{enumerable:!0,get:function(){return parseAttributeConfigForUpdate}}),Object.defineProperty(exports,"m",{enumerable:!0,get:function(){return refuseForeignKeys}}),Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return S}}),Object.defineProperty(exports,"o",{enumerable:!0,get:function(){return E}}),Object.defineProperty(exports,"p",{enumerable:!0,get:function(){return de}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return $}}),Object.defineProperty(exports,"s",{enumerable:!0,get:function(){return parseAttributeConfig}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return q}}),Object.defineProperty(exports,"u",{enumerable:!0,get:function(){return X}}),Object.defineProperty(exports,"v",{enumerable:!0,get:function(){return ComputedFormulaParseError}}),Object.defineProperty(exports,"w",{enumerable:!0,get:function(){return g}}),Object.defineProperty(exports,"x",{enumerable:!0,get:function(){return b}}),Object.defineProperty(exports,"y",{enumerable:!0,get:function(){return parseComputedFormula}}),Object.defineProperty(exports,"z",{enumerable:!0,get:function(){return isNativeObjectName}});
|
|
13
|
+
`;case`r`:return`\r`;case`t`:return` `;default:throw new ComputedFormulaParseError(`Unknown escape sequence "\\${e}" at position ${t}`)}}function scanNumber(e,t){let n=t;for(;n<e.length&&isDigit(e[n]);)n+=1;if(e[n]===`.`){let t=n;if(n+=1,!isDigit(e[n]))throw new ComputedFormulaParseError(`Invalid number literal at position ${t}`);for(;n<e.length&&isDigit(e[n]);)n+=1}let r=e.slice(t,n),i=Number(r);if(!Number.isFinite(i))throw new ComputedFormulaParseError(`Invalid number literal "${r}"`);return{value:i,nextIndex:n}}function scanIdentifier(e,t){let n=t+1;for(;n<e.length&&isIdentifierPart(e[n]);)n+=1;return{value:e.slice(t,n),nextIndex:n}}function isDigit(e){return e!==void 0&&e>=`0`&&e<=`9`}function isIdentifierStart(e){return e!==void 0&&/[A-Za-z_]/.test(e)}function isIdentifierPart(e){return e!==void 0&&/[A-Za-z0-9_]/.test(e)}var Parser=class{constructor(e){this.tokens=e,this.position=0}parseExpression(){return this.parseBinaryExpression(0)}expectEnd(){let e=this.peek();if(e!==void 0)throw new ComputedFormulaParseError(`Unexpected token ${describeToken(e)} at position ${e.position}`)}parseBinaryExpression(e){let t=this.parsePrimary();for(;;){let n=this.peek();if(n?.kind!==`operator`)return t;let r=getOperatorPrecedence(n.value);if(r<e)return t;let i=n.value;this.consume();let a=this.parseBinaryExpression(r+1);t={kind:`binary`,operator:i,left:t,right:a}}}parsePrimary(){let e=this.consume();if(e===void 0)throw new ComputedFormulaParseError(`Unexpected end of expression`);switch(e.kind){case`string`:case`number`:case`boolean`:return{kind:`literal`,value:e.value};case`null`:return{kind:`literal`,value:null};case`identifier`:return this.parseIdentifier(e.value);case`punctuation`:if(e.value===`(`){let e=this.parseExpression();return this.expectPunctuation(`)`),e}break;case`operator`:if(e.value===`-`){let e=this.consume();if(e?.kind===`number`)return{kind:`literal`,value:-e.value}}}throw new ComputedFormulaParseError(`Expected literal, path, call, or parenthesized expression at position ${e.position}`)}parseIdentifier(e){if(this.matchPunctuation(`(`)){let t=[];if(!this.matchPunctuation(`)`)){do t.push(this.parseExpression());while(this.matchPunctuation(`,`));this.expectPunctuation(`)`)}return{kind:`call`,functionName:e.toLowerCase(),args:t}}let t=[e];for(;this.matchPunctuation(`.`);){let e=this.consume();if(e?.kind!==`identifier`)throw new ComputedFormulaParseError(`Expected attribute name after path separator at position ${e?.position??this.previousPosition()}`);t.push(e.value)}return{kind:`path`,parts:t}}expectPunctuation(e){if(!this.matchPunctuation(e))throw new ComputedFormulaParseError(`Expected "${e}" at position ${this.peek()?.position??this.previousPosition()}`)}matchPunctuation(e){let t=this.peek();return t?.kind===`punctuation`&&t.value===e&&(this.consume(),!0)}peek(){return this.tokens[this.position]}consume(){let e=this.tokens[this.position];return this.position+=1,e}previousPosition(){return this.tokens[this.position-1]?.position??0}};function describeToken(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}}function getOperatorPrecedence(e){switch(e){case`*`:case`/`:return 3;case`+`:case`-`:return 2;case`>`:case`<`:case`>=`:case`<=`:case`==`:case`!=`:return 1;default:return e}}const x=c.z.object({placeholder:c.z.string().optional(),description:c.z.string().optional(),defaultValue:c.z.unknown().optional(),icon:c.z.string().optional(),order:c.z.number().int().optional(),hidden:c.z.boolean().optional(),archived:c.z.boolean().optional(),deprecated:c.z.boolean().optional(),metadata:c.z.record(c.z.string(),c.z.unknown()).optional()}),S=[`placeholder`,`description`,`defaultValue`,`icon`,`order`,`hidden`,`archived`,`deprecated`,`metadata`];function refuseForeignKeys(e,t,n=[]){let r=new Set(n);return function refuse(n,i,a,o=[]){let s=e[n];if(s!==void 0&&i!==void 0)for(let e of Object.keys(i))s.has(e)||r.has(e)||a.addIssue({code:`custom`,path:[...o,e],message:`"${e}" is not a ${n} ${t}; keys of ${n}: ${[...s].join(`, `)}`})}}const C=c.z.object({value:c.z.string().min(1).describe(`Stored value`),label:c.z.string().min(1).describe(`Label people see`),description:c.z.string().describe(`Extra context`).optional(),inverse:c.z.string().describe(`Paired option's value (symmetric)`).optional(),archived:c.z.boolean().describe(`Hides without deleting`).optional()}),w=c.z.enum([`idle`,`in_progress`,`finished`]).describe(`Workflow stage`),T=C.extend({color:y}).strict(),E=T,D=C.extend({color:y,group:w}).strict(),O=C.extend({color:c.z.string().optional().describe(`A color id`),group:w.optional()}).strict(),k=c.z.array(O).min(1).refine(e=>{let t=e.map(e=>e.value);return new Set(t).size===t.length},{message:`Duplicate option values are not allowed`});function writeOptionsArraySchema(e){return c.z.array(e).min(1).max(v.optionsPerAttribute).refine(e=>{let t=e.map(e=>e.value);return new Set(t).size===t.length},{message:`Duplicate option values are not allowed`})}const A=writeOptionsArraySchema(T),j=writeOptionsArraySchema(E),M=writeOptionsArraySchema(D),ie=c.z.object({object:c.z.string().min(1).describe(`Target object`),displayTemplate:c.z.string().optional().describe(`Linked record label template`),filter:c.z.record(c.z.string(),c.z.unknown()).optional().describe(`Restricts linkable records`)}),ae=c.z.object({object:c.z.string().min(1).describe(`Other side's object`),attribute:c.z.string().min(1).describe(`Other side's attribute`),cardinality:c.z.enum([`one`,`many`]).optional().describe(`Other side's cardinality`),label:c.z.string().min(1).optional().describe(`Other side's label`),storageOwner:c.z.boolean().optional().describe(`Owns the join storage`)}),N=c.z.object({objectName:c.z.string().min(1).describe(`API name of the object whose options are mirrored`),attributeName:c.z.string().min(1).describe(`API name of the select/status attribute to mirror options from`),attributeId:c.z.string().optional().describe(`Id of the source attribute, resolved by the server`)}),P=x.extend({multiline:c.z.boolean().describe(`Renders as a multi-line textarea`).optional(),minLength:c.z.number().int().min(0).describe(`Minimum character count`).optional(),maxLength:c.z.number().int().min(1).describe(`Maximum character count`).optional(),pattern:c.z.string().describe(`Regular expression the value must match`).optional(),format:c.z.enum([`email`,`url`,`slug`]).describe(`Validates and renders as this format`).optional()}),oe=x,F=x.extend({renderAs:c.z.enum([`number`,`rating`]).describe(`Plain number or a star rating`).optional(),min:c.z.number().describe(`Minimum allowed value`).optional(),max:c.z.number().describe(`Maximum allowed value`).optional(),unit:c.z.enum([`integer`,`decimal`,`percentage`]).describe(`How the value is stored and rendered`).optional(),decimals:c.z.number().int().min(0).max(10).describe(`Decimal places shown`).optional()}),I=x,L=x.extend({dateFormat:c.z.enum([`short`,`long`,`full`,`relative`]).describe(`How the date is rendered`).optional(),minDate:c.z.string().describe(`Earliest allowed date (ISO)`).optional(),maxDate:c.z.string().describe(`Latest allowed date (ISO)`).optional(),includeTime:c.z.boolean().describe(`Also captures a time of day`).optional(),endDate:c.z.boolean().describe(`Paired with another date attribute as a range's end`).optional(),timeFormat:c.z.enum([`12h`,`24h`]).describe(`Clock format when a time is included`).optional()}),R=x.extend({defaultCountryCode:c.z.string().length(3).describe(`ISO country code preselected in the dialer`).optional()}),z=x.extend({defaultCurrency:c.z.string().length(3).describe(`ISO currency code preselected for new values`).optional(),allowedCurrencies:c.z.array(c.z.string().length(3)).describe(`ISO currency codes a value may use; any currency when omitted`).optional(),allowNegative:c.z.boolean().describe(`Whether a negative amount is accepted`).optional()}),B=x.extend({options:k.describe(`The workflow statuses, in order`)}),V=x.extend({granularity:c.z.enum([`full`,`address`,`city`,`state`,`country`,`coordinates`]).describe(`How precise a location must be captured`).optional(),defaultCountry:c.z.string().length(3).describe(`ISO country code preselected for new values`).optional(),allowedCountries:c.z.array(c.z.string().length(3)).describe(`ISO country codes a value may use; any country when omitted`).optional()}),H=x.extend({options:k.describe(`Options`),renderAs:c.z.literal(`badges`).optional().describe(`Renders the chosen option as a colored badge`)}),U=x.extend({options:k.describe(`Options`),renderAs:c.z.literal(`badges`).optional().describe(`Renders the chosen options as colored badges`)}),W=x.extend({types:c.z.array(c.z.enum([`user`,`agent`])).min(1).optional().describe(`Which kinds of actor can be picked; both when omitted`),multiple:c.z.boolean().optional().describe(`Whether more than one actor can be picked`)}),G={name:_.describe(`Property API name`),label:c.z.string().min(1).describe(`Label people see`),required:c.z.boolean().describe(`Required on every edge`).optional()},K={id:c.z.string().optional(),objectId:c.z.string().optional(),system:c.z.boolean().optional(),unique:c.z.boolean().optional()},se=Object.fromEntries(S.map(e=>[e,!0])),q=[`text`,`number`,`checkbox`,`date`,`phone`,`currency`,`location`],J=[...q,`select`,`multiselect`,`status`],Y={text:P,number:F,checkbox:I,date:L,phone:R,currency:z,location:V,select:H,multiselect:U,status:B},ce={...Y,select:H.extend({options:A.describe(`Options`)}),multiselect:U.extend({options:j.describe(`Options`)}),status:B.extend({options:M.describe(`Statuses`)})},propertyWireConfigShapeFor=e=>ce[e].omit(se).shape,storedPropertyMember=e=>c.z.object({...G,...K,type:c.z.literal(e).describe(`Property type`),...Y[e].shape}).strip(),X=c.z.discriminatedUnion(`type`,J.map(storedPropertyMember)),Z=c.z.object({definitions:c.z.array(X).min(1).max(v.optionsPerAttribute).describe(`Edge properties`)}).strip().describe(`Properties carried by the edge itself (role, share, since…), never a third object`),le=refuseForeignKeys(Object.fromEntries(J.map(e=>[e,new Set(Object.keys(propertyWireConfigShapeFor(e)))])),`property key`,[...Object.keys(G),`type`]);function refuseForeignPropertyKeys(e,t){le(e.type,e,t)}const ue=q.reduce((e,t)=>(Object.assign(e,propertyWireConfigShapeFor(t)),e),{}),optionPropertyWireMember=e=>c.z.object({...G,type:e.length===1?c.z.literal(e[0]).describe(`Property type`):c.z.enum(e).describe(`Property type`),...propertyWireConfigShapeFor(e[0])}).strict(),Q=c.z.discriminatedUnion(`type`,[optionPropertyWireMember([`select`,`multiselect`]),optionPropertyWireMember([`status`]),c.z.object({...G,type:c.z.enum(q).describe(`Property type`),...ue}).strict().superRefine(refuseForeignPropertyKeys)]),de=c.z.object({definitions:c.z.array(Q).min(1).max(v.optionsPerAttribute).describe(`Edge properties`)}).strict().describe(`Properties carried by the edge itself (role, share, since…), never a third object`),fe=x.extend({targets:c.z.array(ie).min(1).describe(`Target object(s)`),cardinality:c.z.enum([`one`,`many`]).describe(`one or many`),maxItems:c.z.number().int().min(1).optional().describe(`Max linked records`),bilateral:ae.optional().describe(`Syncs the other side's attribute`),properties:Z.optional()}),pe=x.extend({expression:c.z.string().min(1).superRefine((e,t)=>{try{parseComputedFormula(e)}catch(e){t.addIssue({code:c.z.ZodIssueCode.custom,message:e instanceof Error?e.message:`Invalid formula expression`})}}).describe(`The formula expression, compiled against this object's attributes`),returnType:c.z.enum([`text`,`number`,`boolean`,`date`,`select`,`multiselect`]).describe(`The formula's result type`),decimals:c.z.number().int().min(0).max(10).optional().describe(`Decimal places shown for a number result`),allowRelations:c.z.boolean().optional().describe(`Whether the expression may read across a relation`),optionsSource:N.optional().describe(`Mirrors an option set`)}),me=x.extend({relationAttribute:c.z.string().min(1).optional().describe(`API name of the relation this rollup aggregates through`),relationPath:c.z.string().optional().describe(`Not supported yet — single-hop only`),targetAttribute:c.z.string().min(1).optional().describe(`API name of the attribute aggregated on the relation's target object; not read by count`),function:c.z.enum([`sum`,`avg`,`earliest`,`latest`,`count`,`countValues`,`countUniqueValues`,`countEmpty`,`percentEmpty`,`percentNotEmpty`,`original`]).describe(`The aggregation applied across the linked records`),decimals:c.z.number().int().min(0).max(10).optional().describe(`Decimal places shown for a numeric result`),targetAttributeType:c.z.string().optional().describe(`Server-set`),targetAttributeOptions:c.z.array(O).optional().describe(`Server-set`),targetCurrencyCode:c.z.string().length(3).optional().describe(`Server-set`),optionsSource:N.optional().describe(`Mirrors an option set`)});function rollupTargetIssue(e,t){if(e===`rollup`&&t.function!==`count`&&t.targetAttribute===void 0)return{path:[`targetAttribute`],message:`targetAttribute is required for a "${String(t.function)}" rollup`}}const $={text:P,richtext:oe,number:F,checkbox:I,date:L,phone:R,currency:z,status:B,location:V,select:H,multiselect:U,user:W,relation:fe,formula:pe,rollup:me,document:x.extend({properties:Z.optional(),accepts:c.z.array(c.z.string().min(1)).optional().describe("MIME prefixes or globs a file must match (e.g. `image/*`, `*.pdf`)"),maxFileSize:c.z.number().int().min(1).optional().describe(`Maximum file size in bytes`)})};function getAttributeConfigSchema(e){let t=$[e];if(!t)throw new o.ValidationError(`Unsupported attribute type: ${e}`,[]);return t}function parseAttributeConfig(e,t){let n=getAttributeConfigSchema(e).strip().parse(t),r=rollupTargetIssue(e,n);if(r)throw validationErrorFromIssues([r]);return n}function getAttributeConfigWriteSchema(e){let t=getAttributeConfigSchema(e).extend({icon:b.optional()});switch(e){case`select`:return t.extend({options:A.describe(`Options`)});case`multiselect`:return t.extend({options:j.describe(`Options`)});case`status`:return t.extend({options:M.describe(`Statuses`)});default:return t}}function validationErrorFromIssues(e){return o.ValidationError.fromZodErrors(e.map(e=>({path:e.path.map(e=>typeof e==`symbol`?String(e):e),message:e.message})))}function parseWriteSchema(e,t){let n=getAttributeConfigWriteSchema(e).strip().safeParse(t);if(!n.success)throw validationErrorFromIssues(n.error.issues);let r=rollupTargetIssue(e,n.data);if(r)throw validationErrorFromIssues([r]);return n.data}function parseAttributeConfigForCreate(e,t){return parseWriteSchema(e,t)}function validatePatchedIcon(e){if(!Object.prototype.hasOwnProperty.call(e,`icon`))return;let t=b.optional().safeParse(e.icon);if(!t.success)throw o.ValidationError.fromZodErrors(t.error.issues.map(e=>({path:[`icon`,...e.path.map(e=>typeof e==`symbol`?String(e):e)],message:e.message})))}function isSelectLike(e){return e===`select`||e===`multiselect`||e===`status`}function parseAttributeConfigForUpdate(e,t){let n=Object.prototype.hasOwnProperty.call(t,`options`),r=Object.prototype.hasOwnProperty.call(t,`icon`),i={...e,...t};if(validatePatchedIcon(t),n){let{icon:t,...n}=i,a=parseWriteSchema(e.type,r?i:n);return!r&&t!==void 0&&(a.icon=t),a}let a=e.options;isSelectLike(e.type)&&(i.options=[{value:`__legacy__`,label:`__legacy__`}]);let o=getAttributeConfigSchema(e.type).strip().safeParse(i);if(!o.success)throw validationErrorFromIssues(o.error.issues);let s=o.data;return isSelectLike(e.type)&&(s.options=a),s}Object.defineProperty(exports,"A",{enumerable:!0,get:function(){return validateOptions}}),Object.defineProperty(exports,"C",{enumerable:!0,get:function(){return _}}),Object.defineProperty(exports,"D",{enumerable:!0,get:function(){return validateIconName}}),Object.defineProperty(exports,"E",{enumerable:!0,get:function(){return validateAttributeName}}),Object.defineProperty(exports,"F",{enumerable:!0,get:function(){return u}}),Object.defineProperty(exports,"I",{enumerable:!0,get:function(){return f}}),Object.defineProperty(exports,"L",{enumerable:!0,get:function(){return parseResourceVisibility}}),Object.defineProperty(exports,"M",{enumerable:!0,get:function(){return d}}),Object.defineProperty(exports,"N",{enumerable:!0,get:function(){return p}}),Object.defineProperty(exports,"O",{enumerable:!0,get:function(){return validateLabel}}),Object.defineProperty(exports,"P",{enumerable:!0,get:function(){return ee}}),Object.defineProperty(exports,"R",{enumerable:!0,get:function(){return l}}),Object.defineProperty(exports,"S",{enumerable:!0,get:function(){return v}}),Object.defineProperty(exports,"T",{enumerable:!0,get:function(){return assertUniqueBy}}),Object.defineProperty(exports,"_",{enumerable:!0,get:function(){return D}}),Object.defineProperty(exports,"a",{enumerable:!0,get:function(){return getAttributeConfigWriteSchema}}),Object.defineProperty(exports,"b",{enumerable:!0,get:function(){return y}}),Object.defineProperty(exports,"c",{enumerable:!0,get:function(){return parseAttributeConfigForCreate}}),Object.defineProperty(exports,"d",{enumerable:!0,get:function(){return Q}}),Object.defineProperty(exports,"f",{enumerable:!0,get:function(){return Z}}),Object.defineProperty(exports,"g",{enumerable:!0,get:function(){return w}}),Object.defineProperty(exports,"h",{enumerable:!0,get:function(){return T}}),Object.defineProperty(exports,"i",{enumerable:!0,get:function(){return getAttributeConfigSchema}}),Object.defineProperty(exports,"j",{enumerable:!0,get:function(){return validateViewName}}),Object.defineProperty(exports,"k",{enumerable:!0,get:function(){return validateObjectName}}),Object.defineProperty(exports,"l",{enumerable:!0,get:function(){return parseAttributeConfigForUpdate}}),Object.defineProperty(exports,"m",{enumerable:!0,get:function(){return refuseForeignKeys}}),Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return S}}),Object.defineProperty(exports,"o",{enumerable:!0,get:function(){return E}}),Object.defineProperty(exports,"p",{enumerable:!0,get:function(){return de}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return $}}),Object.defineProperty(exports,"s",{enumerable:!0,get:function(){return parseAttributeConfig}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return q}}),Object.defineProperty(exports,"u",{enumerable:!0,get:function(){return X}}),Object.defineProperty(exports,"v",{enumerable:!0,get:function(){return ComputedFormulaParseError}}),Object.defineProperty(exports,"w",{enumerable:!0,get:function(){return g}}),Object.defineProperty(exports,"x",{enumerable:!0,get:function(){return b}}),Object.defineProperty(exports,"y",{enumerable:!0,get:function(){return parseComputedFormula}}),Object.defineProperty(exports,"z",{enumerable:!0,get:function(){return isNativeObjectName}});
|
|
@@ -10,4 +10,4 @@ Name must be a valid variable identifier:
|
|
|
10
10
|
✅ Valid: 'firstName', 'first_name', 'FirstName', 'FIRST_NAME'
|
|
11
11
|
❌ Invalid: 'first-name', 'first name', '123name', 'first.name'`);if(u.includes(e))throw Error(`[AttributeBuilder] "${e}" is a reserved name and cannot be used as an attribute name.\nReserved names: ${u.join(`, `)}`)}function validateLabel(e){if(!e||e.length===0)throw Error(`[AttributeBuilder] Attribute label cannot be empty`);if(e.length>128)throw Error(`[AttributeBuilder] Attribute label is too long (max 128 characters)`)}function validateIconName(e,t){if(!ne.has(e))throw Error(`[AttributeBuilder] Invalid icon "${e}" in ${t}.\nIcon must be one of the predefined icons from @stndrds/constants.`)}function validateOptions(e,t){let n=new Set;for(let r of t){if(!r.value?.trim())throw Error(`[AttributeBuilder] Option in "${e}" has an empty or missing value.`);if(!r.label?.trim())throw Error(`[AttributeBuilder] Option "${r.value}" in "${e}" has an empty or missing label.`);if(n.has(r.value))throw Error(`[AttributeBuilder] Duplicate option value "${r.value}" in "${e}".`);n.add(r.value)}for(let n of t){if(n.inverse===void 0)continue;let r=t.find(e=>e.value===n.inverse);if(!r)throw Error(`[AttributeBuilder] Option "${n.value}" in "${e}" has inverse "${n.inverse}" which does not match any option value.`);if(r.inverse!==n.value)throw Error(`[AttributeBuilder] Inverse mismatch in "${e}": "${n.value}" points to "${n.inverse}", but "${n.inverse}" points to "${r.inverse??`(none)`}". Inverse pairs must be symmetric.`)}}const m={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},h=Object.keys(r),g=new Set(i),_=o.enum(h).describe(`A color id from the palette`),v=o.string().superRefine((e,t)=>{g.has(e)||t.addIssue({code:`custom`,message:`Invalid icon name`})}).transform(e=>e);var ComputedFormulaParseError=class extends Error{constructor(e){super(e),this.name=`ComputedFormulaParseError`}};function parseComputedFormula(e){let t=new Parser(tokenize(e)),n=t.parseExpression();return t.expectEnd(),n}function tokenize(e){let t=[],n=0;for(;n<e.length;){let r=e[n];if(r===` `||r===` `||r===`
|
|
12
12
|
`||r===`\r`){n+=1;continue}if(r===`"`||r===`'`){let i=scanString(e,n,r);t.push({kind:`string`,value:i.value,position:n}),n=i.nextIndex;continue}if(isDigit(r)){let r=scanNumber(e,n);t.push({kind:`number`,value:r.value,position:n}),n=r.nextIndex;continue}if(isIdentifierStart(r)){let r=scanIdentifier(e,n),i=r.value.toLowerCase();i===`true`?t.push({kind:`boolean`,value:!0,position:n}):i===`false`?t.push({kind:`boolean`,value:!1,position:n}):i===`null`?t.push({kind:`null`,position:n}):t.push({kind:`identifier`,value:r.value,position:n}),n=r.nextIndex;continue}let i=e.slice(n,n+2);if(i===`>=`||i===`<=`||i===`==`||i===`!=`){t.push({kind:`operator`,value:i,position:n}),n+=2;continue}if(r===`>`||r===`<`||r===`+`||r===`-`||r===`*`||r===`/`){t.push({kind:`operator`,value:r,position:n}),n+=1;continue}if(r===`(`||r===`)`||r===`,`||r===`.`){t.push({kind:`punctuation`,value:r,position:n}),n+=1;continue}throw new ComputedFormulaParseError(`Unexpected character "${r}" at position ${n}`)}return t}function scanString(e,t,n=`"`){let r=``,i=t+1;for(;i<e.length;){let t=e[i];if(t===n)return{value:r,nextIndex:i+1};if(t===`\\`){let t=e[i+1];if(t===void 0)throw new ComputedFormulaParseError(`Unterminated string literal at position ${i}`);r+=decodeEscape(t,i),i+=2;continue}r+=t,i+=1}throw new ComputedFormulaParseError(`Unterminated string literal at position ${t}`)}function decodeEscape(e,t){switch(e){case`"`:case`\\`:return e;case`n`:return`
|
|
13
|
-
`;case`r`:return`\r`;case`t`:return` `;default:throw new ComputedFormulaParseError(`Unknown escape sequence "\\${e}" at position ${t}`)}}function scanNumber(e,t){let n=t;for(;n<e.length&&isDigit(e[n]);)n+=1;if(e[n]===`.`){let t=n;if(n+=1,!isDigit(e[n]))throw new ComputedFormulaParseError(`Invalid number literal at position ${t}`);for(;n<e.length&&isDigit(e[n]);)n+=1}let r=e.slice(t,n),i=Number(r);if(!Number.isFinite(i))throw new ComputedFormulaParseError(`Invalid number literal "${r}"`);return{value:i,nextIndex:n}}function scanIdentifier(e,t){let n=t+1;for(;n<e.length&&isIdentifierPart(e[n]);)n+=1;return{value:e.slice(t,n),nextIndex:n}}function isDigit(e){return e!==void 0&&e>=`0`&&e<=`9`}function isIdentifierStart(e){return e!==void 0&&/[A-Za-z_]/.test(e)}function isIdentifierPart(e){return e!==void 0&&/[A-Za-z0-9_]/.test(e)}var Parser=class{constructor(e){this.tokens=e,this.position=0}parseExpression(){return this.parseBinaryExpression(0)}expectEnd(){let e=this.peek();if(e!==void 0)throw new ComputedFormulaParseError(`Unexpected token ${describeToken(e)} at position ${e.position}`)}parseBinaryExpression(e){let t=this.parsePrimary();for(;;){let n=this.peek();if(n?.kind!==`operator`)return t;let r=getOperatorPrecedence(n.value);if(r<e)return t;let i=n.value;this.consume();let a=this.parseBinaryExpression(r+1);t={kind:`binary`,operator:i,left:t,right:a}}}parsePrimary(){let e=this.consume();if(e===void 0)throw new ComputedFormulaParseError(`Unexpected end of expression`);switch(e.kind){case`string`:case`number`:case`boolean`:return{kind:`literal`,value:e.value};case`null`:return{kind:`literal`,value:null};case`identifier`:return this.parseIdentifier(e.value);case`punctuation`:if(e.value===`(`){let e=this.parseExpression();return this.expectPunctuation(`)`),e}break;case`operator`:if(e.value===`-`){let e=this.consume();if(e?.kind===`number`)return{kind:`literal`,value:-e.value}}}throw new ComputedFormulaParseError(`Expected literal, path, call, or parenthesized expression at position ${e.position}`)}parseIdentifier(e){if(this.matchPunctuation(`(`)){let t=[];if(!this.matchPunctuation(`)`)){do t.push(this.parseExpression());while(this.matchPunctuation(`,`));this.expectPunctuation(`)`)}return{kind:`call`,functionName:e.toLowerCase(),args:t}}let t=[e];for(;this.matchPunctuation(`.`);){let e=this.consume();if(e?.kind!==`identifier`)throw new ComputedFormulaParseError(`Expected attribute name after path separator at position ${e?.position??this.previousPosition()}`);t.push(e.value)}return{kind:`path`,parts:t}}expectPunctuation(e){if(!this.matchPunctuation(e))throw new ComputedFormulaParseError(`Expected "${e}" at position ${this.peek()?.position??this.previousPosition()}`)}matchPunctuation(e){let t=this.peek();return t?.kind===`punctuation`&&t.value===e&&(this.consume(),!0)}peek(){return this.tokens[this.position]}consume(){let e=this.tokens[this.position];return this.position+=1,e}previousPosition(){return this.tokens[this.position-1]?.position??0}};function describeToken(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}}function getOperatorPrecedence(e){switch(e){case`*`:case`/`:return 3;case`+`:case`-`:return 2;case`>`:case`<`:case`>=`:case`<=`:case`==`:case`!=`:return 1;default:return e}}const y=o.object({placeholder:o.string().optional(),description:o.string().optional(),defaultValue:o.unknown().optional(),icon:o.string().optional(),order:o.number().int().optional(),hidden:o.boolean().optional(),archived:o.boolean().optional(),deprecated:o.boolean().optional(),metadata:o.record(o.string(),o.unknown()).optional()}),b=[`placeholder`,`description`,`defaultValue`,`icon`,`order`,`hidden`,`archived`,`deprecated`,`metadata`];function refuseForeignKeys(e,t,n=[]){let r=new Set(n);return function refuse(n,i,a,o=[]){let s=e[n];if(s!==void 0&&i!==void 0)for(let e of Object.keys(i))s.has(e)||r.has(e)||a.addIssue({code:`custom`,path:[...o,e],message:`"${e}" is not a ${n} ${t}; keys of ${n}: ${[...s].join(`, `)}`})}}const x=o.object({value:o.string().min(1).describe(`Stored value`),label:o.string().min(1).describe(`Label people see`),description:o.string().describe(`Extra context`).optional(),inverse:o.string().describe(`Paired option's value (symmetric)`).optional(),archived:o.boolean().describe(`Hides without deleting`).optional()}),S=o.enum([`idle`,`in_progress`,`finished`]).describe(`Workflow stage`),C=x.extend({color:_}).strict(),w=C,T=x.extend({color:_,group:S}).strict(),E=x.extend({color:o.string().optional().describe(`A color id`),group:S.optional()}).strict(),D=o.array(E).min(1).refine(e=>{let t=e.map(e=>e.value);return new Set(t).size===t.length},{message:`Duplicate option values are not allowed`});function writeOptionsArraySchema(e){return o.array(e).min(1).max(m.optionsPerAttribute).refine(e=>{let t=e.map(e=>e.value);return new Set(t).size===t.length},{message:`Duplicate option values are not allowed`})}const O=writeOptionsArraySchema(C),k=writeOptionsArraySchema(w),A=writeOptionsArraySchema(T),ie=o.object({object:o.string().min(1).describe(`Target object`),displayTemplate:o.string().optional().describe(`Linked record label template`),filter:o.record(o.string(),o.unknown()).optional().describe(`Restricts linkable records`)}),ae=o.object({object:o.string().min(1).describe(`Other side's object`),attribute:o.string().min(1).describe(`Other side's attribute`),cardinality:o.enum([`one`,`many`]).optional().describe(`Other side's cardinality`),label:o.string().min(1).optional().describe(`Other side's label`),storageOwner:o.boolean().optional().describe(`Owns the join storage`)}),j=o.object({objectName:o.string().min(1).describe(`API name of the object whose options are mirrored`),attributeName:o.string().min(1).describe(`API name of the select/status attribute to mirror options from`),attributeId:o.string().optional().describe(`Id of the source attribute, resolved by the server`)}),M=y.extend({multiline:o.boolean().describe(`Renders as a multi-line textarea`).optional(),minLength:o.number().int().min(0).describe(`Minimum character count`).optional(),maxLength:o.number().int().min(1).describe(`Maximum character count`).optional(),pattern:o.string().describe(`Regular expression the value must match`).optional(),format:o.enum([`email`,`url`,`slug`]).describe(`Validates and renders as this format`).optional()}),oe=y,N=y.extend({renderAs:o.enum([`number`,`rating`]).describe(`Plain number or a star rating`).optional(),min:o.number().describe(`Minimum allowed value`).optional(),max:o.number().describe(`Maximum allowed value`).optional(),unit:o.enum([`integer`,`decimal`,`percentage`]).describe(`How the value is stored and rendered`).optional(),decimals:o.number().int().min(0).max(10).describe(`Decimal places shown`).optional()}),P=y,F=y.extend({dateFormat:o.enum([`short`,`long`,`full`,`relative`]).describe(`How the date is rendered`).optional(),minDate:o.string().describe(`Earliest allowed date (ISO)`).optional(),maxDate:o.string().describe(`Latest allowed date (ISO)`).optional(),includeTime:o.boolean().describe(`Also captures a time of day`).optional(),endDate:o.boolean().describe(`Paired with another date attribute as a range's end`).optional(),timeFormat:o.enum([`12h`,`24h`]).describe(`Clock format when a time is included`).optional()}),I=y.extend({defaultCountryCode:o.string().length(3).describe(`ISO country code preselected in the dialer`).optional()}),L=y.extend({defaultCurrency:o.string().length(3).describe(`ISO currency code preselected for new values`).optional(),allowedCurrencies:o.array(o.string().length(3)).describe(`ISO currency codes a value may use; any currency when omitted`).optional(),allowNegative:o.boolean().describe(`Whether a negative amount is accepted`).optional()}),R=y.extend({options:D.describe(`The workflow statuses, in order`)}),z=y.extend({granularity:o.enum([`full`,`address`,`city`,`state`,`country`,`coordinates`]).describe(`How precise a location must be captured`).optional(),defaultCountry:o.string().length(3).describe(`ISO country code preselected for new values`).optional(),allowedCountries:o.array(o.string().length(3)).describe(`ISO country codes a value may use; any country when omitted`).optional()}),B=y.extend({options:D.describe(`Options`),renderAs:o.literal(`badges`).optional().describe(`Renders the chosen option as a colored badge`)}),V=y.extend({options:D.describe(`Options`),renderAs:o.literal(`badges`).optional().describe(`Renders the chosen options as colored badges`)}),H=y.extend({types:o.array(o.enum([`user`,`agent`])).min(1).optional().describe(`Which kinds of actor can be picked; both when omitted`),multiple:o.boolean().optional().describe(`Whether more than one actor can be picked`)}),U={name:p.describe(`Property API name`),label:o.string().min(1).describe(`Label people see`),required:o.boolean().describe(`Required on every edge`).optional()},W={id:o.string().optional(),objectId:o.string().optional(),system:o.boolean().optional(),unique:o.boolean().optional()},G=Object.fromEntries(b.map(e=>[e,!0])),K=[`text`,`number`,`checkbox`,`date`,`phone`,`currency`,`location`],q=[...K,`select`,`multiselect`,`status`],J={text:M,number:N,checkbox:P,date:F,phone:I,currency:L,location:z,select:B,multiselect:V,status:R},se={...J,select:B.extend({options:O.describe(`Options`)}),multiselect:V.extend({options:k.describe(`Options`)}),status:R.extend({options:A.describe(`Statuses`)})},propertyWireConfigShapeFor=e=>se[e].omit(G).shape,storedPropertyMember=e=>o.object({...U,...W,type:o.literal(e).describe(`Property type`),...J[e].shape}).strip(),Y=o.discriminatedUnion(`type`,q.map(storedPropertyMember)),X=o.object({definitions:o.array(Y).min(1).max(m.optionsPerAttribute).describe(`Edge properties`)}).strip().describe(`Properties carried by the edge itself (role, share, since…), never a third object`),ce=refuseForeignKeys(Object.fromEntries(q.map(e=>[e,new Set(Object.keys(propertyWireConfigShapeFor(e)))])),`property key`,[...Object.keys(U),`type`]);function refuseForeignPropertyKeys(e,t){ce(e.type,e,t)}const Z=K.reduce((e,t)=>(Object.assign(e,propertyWireConfigShapeFor(t)),e),{}),optionPropertyWireMember=e=>o.object({...U,type:e.length===1?o.literal(e[0]).describe(`Property type`):o.enum(e).describe(`Property type`),...propertyWireConfigShapeFor(e[0])}).strict(),Q=o.discriminatedUnion(`type`,[optionPropertyWireMember([`select`,`multiselect`]),optionPropertyWireMember([`status`]),o.object({...U,type:o.enum(K).describe(`Property type`),...Z}).strict().superRefine(refuseForeignPropertyKeys)]),le=o.object({definitions:o.array(Q).min(1).max(m.optionsPerAttribute).describe(`Edge properties`)}).strict().describe(`Properties carried by the edge itself (role, share, since…), never a third object`),$={text:M,richtext:oe,number:N,checkbox:P,date:F,phone:I,currency:L,status:R,location:z,select:B,multiselect:V,user:H,relation:y.extend({targets:o.array(ie).min(1).describe(`Target object(s)`),cardinality:o.enum([`one`,`many`]).describe(`one or many`),maxItems:o.number().int().min(1).optional().describe(`Max linked records`),bilateral:ae.optional().describe(`Syncs the other side's attribute`),properties:X.optional()}),formula:y.extend({expression:o.string().min(1).superRefine((e,t)=>{try{parseComputedFormula(e)}catch(e){t.addIssue({code:o.ZodIssueCode.custom,message:e instanceof Error?e.message:`Invalid formula expression`})}}).describe(`The formula expression, compiled against this object's attributes`),returnType:o.enum([`text`,`number`,`boolean`,`date`,`select`,`multiselect`]).describe(`The formula's result type`),decimals:o.number().int().min(0).max(10).optional().describe(`Decimal places shown for a number result`),allowRelations:o.boolean().optional().describe(`Whether the expression may read across a relation`),optionsSource:j.optional().describe(`Mirrors an option set`)}),rollup:y.extend({relationAttribute:o.string().min(1).optional().describe(`API name of the relation this rollup aggregates through`),relationPath:o.string().optional().describe(`Not supported yet — single-hop only`),targetAttribute:o.string().min(1).describe(`API name of the attribute aggregated on the relation's target object`),function:o.enum([`sum`,`avg`,`earliest`,`latest`,`count`,`countValues`,`countUniqueValues`,`countEmpty`,`percentEmpty`,`percentNotEmpty`,`original`]).describe(`The aggregation applied across the linked records`),decimals:o.number().int().min(0).max(10).optional().describe(`Decimal places shown for a numeric result`),targetAttributeType:o.string().optional().describe(`Server-set`),targetAttributeOptions:o.array(E).optional().describe(`Server-set`),targetCurrencyCode:o.string().length(3).optional().describe(`Server-set`),optionsSource:j.optional().describe(`Mirrors an option set`)}),document:y.extend({properties:X.optional(),accepts:o.array(o.string().min(1)).optional().describe("MIME prefixes or globs a file must match (e.g. `image/*`, `*.pdf`)"),maxFileSize:o.number().int().min(1).optional().describe(`Maximum file size in bytes`)})};function getAttributeConfigSchema(e){let t=$[e];if(!t)throw new n(`Unsupported attribute type: ${e}`,[]);return t}function parseAttributeConfig(e,t){return getAttributeConfigSchema(e).strip().parse(t)}function getAttributeConfigWriteSchema(e){let t=getAttributeConfigSchema(e).extend({icon:v.optional()});switch(e){case`select`:return t.extend({options:O.describe(`Options`)});case`multiselect`:return t.extend({options:k.describe(`Options`)});case`status`:return t.extend({options:A.describe(`Statuses`)});default:return t}}function validationErrorFromIssues(e){return n.fromZodErrors(e.map(e=>({path:e.path.map(e=>typeof e==`symbol`?String(e):e),message:e.message})))}function parseWriteSchema(e,t){let n=getAttributeConfigWriteSchema(e).strip().safeParse(t);if(!n.success)throw validationErrorFromIssues(n.error.issues);return n.data}function parseAttributeConfigForCreate(e,t){return parseWriteSchema(e,t)}function validatePatchedIcon(e){if(!Object.prototype.hasOwnProperty.call(e,`icon`))return;let t=v.optional().safeParse(e.icon);if(!t.success)throw n.fromZodErrors(t.error.issues.map(e=>({path:[`icon`,...e.path.map(e=>typeof e==`symbol`?String(e):e)],message:e.message})))}function isSelectLike(e){return e===`select`||e===`multiselect`||e===`status`}function parseAttributeConfigForUpdate(e,t){let n=Object.prototype.hasOwnProperty.call(t,`options`),r=Object.prototype.hasOwnProperty.call(t,`icon`),i={...e,...t};if(validatePatchedIcon(t),n){let{icon:t,...n}=i,a=parseWriteSchema(e.type,r?i:n);return!r&&t!==void 0&&(a.icon=t),a}let a=e.options;isSelectLike(e.type)&&(i.options=[{value:`__legacy__`,label:`__legacy__`}]);let o=getAttributeConfigSchema(e.type).strip().safeParse(i);if(!o.success)throw validationErrorFromIssues(o.error.issues);let s=o.data;return isSelectLike(e.type)&&(s.options=a),s}export{validateOptions as A,p as C,validateIconName as D,validateAttributeName as E,c as F,l as I,parseResourceVisibility as L,ee as M,u as N,validateLabel as O,te as P,s as R,m as S,assertUniqueBy as T,T as _,getAttributeConfigWriteSchema as a,_ as b,parseAttributeConfigForCreate as c,Q as d,X as f,S as g,C as h,getAttributeConfigSchema as i,validateViewName as j,validateObjectName as k,parseAttributeConfigForUpdate as l,refuseForeignKeys as m,b as n,w as o,le as p,$ as r,parseAttributeConfig as s,K as t,Y as u,ComputedFormulaParseError as v,f as w,v as x,parseComputedFormula as y,isNativeObjectName as z};
|
|
13
|
+
`;case`r`:return`\r`;case`t`:return` `;default:throw new ComputedFormulaParseError(`Unknown escape sequence "\\${e}" at position ${t}`)}}function scanNumber(e,t){let n=t;for(;n<e.length&&isDigit(e[n]);)n+=1;if(e[n]===`.`){let t=n;if(n+=1,!isDigit(e[n]))throw new ComputedFormulaParseError(`Invalid number literal at position ${t}`);for(;n<e.length&&isDigit(e[n]);)n+=1}let r=e.slice(t,n),i=Number(r);if(!Number.isFinite(i))throw new ComputedFormulaParseError(`Invalid number literal "${r}"`);return{value:i,nextIndex:n}}function scanIdentifier(e,t){let n=t+1;for(;n<e.length&&isIdentifierPart(e[n]);)n+=1;return{value:e.slice(t,n),nextIndex:n}}function isDigit(e){return e!==void 0&&e>=`0`&&e<=`9`}function isIdentifierStart(e){return e!==void 0&&/[A-Za-z_]/.test(e)}function isIdentifierPart(e){return e!==void 0&&/[A-Za-z0-9_]/.test(e)}var Parser=class{constructor(e){this.tokens=e,this.position=0}parseExpression(){return this.parseBinaryExpression(0)}expectEnd(){let e=this.peek();if(e!==void 0)throw new ComputedFormulaParseError(`Unexpected token ${describeToken(e)} at position ${e.position}`)}parseBinaryExpression(e){let t=this.parsePrimary();for(;;){let n=this.peek();if(n?.kind!==`operator`)return t;let r=getOperatorPrecedence(n.value);if(r<e)return t;let i=n.value;this.consume();let a=this.parseBinaryExpression(r+1);t={kind:`binary`,operator:i,left:t,right:a}}}parsePrimary(){let e=this.consume();if(e===void 0)throw new ComputedFormulaParseError(`Unexpected end of expression`);switch(e.kind){case`string`:case`number`:case`boolean`:return{kind:`literal`,value:e.value};case`null`:return{kind:`literal`,value:null};case`identifier`:return this.parseIdentifier(e.value);case`punctuation`:if(e.value===`(`){let e=this.parseExpression();return this.expectPunctuation(`)`),e}break;case`operator`:if(e.value===`-`){let e=this.consume();if(e?.kind===`number`)return{kind:`literal`,value:-e.value}}}throw new ComputedFormulaParseError(`Expected literal, path, call, or parenthesized expression at position ${e.position}`)}parseIdentifier(e){if(this.matchPunctuation(`(`)){let t=[];if(!this.matchPunctuation(`)`)){do t.push(this.parseExpression());while(this.matchPunctuation(`,`));this.expectPunctuation(`)`)}return{kind:`call`,functionName:e.toLowerCase(),args:t}}let t=[e];for(;this.matchPunctuation(`.`);){let e=this.consume();if(e?.kind!==`identifier`)throw new ComputedFormulaParseError(`Expected attribute name after path separator at position ${e?.position??this.previousPosition()}`);t.push(e.value)}return{kind:`path`,parts:t}}expectPunctuation(e){if(!this.matchPunctuation(e))throw new ComputedFormulaParseError(`Expected "${e}" at position ${this.peek()?.position??this.previousPosition()}`)}matchPunctuation(e){let t=this.peek();return t?.kind===`punctuation`&&t.value===e&&(this.consume(),!0)}peek(){return this.tokens[this.position]}consume(){let e=this.tokens[this.position];return this.position+=1,e}previousPosition(){return this.tokens[this.position-1]?.position??0}};function describeToken(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}}function getOperatorPrecedence(e){switch(e){case`*`:case`/`:return 3;case`+`:case`-`:return 2;case`>`:case`<`:case`>=`:case`<=`:case`==`:case`!=`:return 1;default:return e}}const y=o.object({placeholder:o.string().optional(),description:o.string().optional(),defaultValue:o.unknown().optional(),icon:o.string().optional(),order:o.number().int().optional(),hidden:o.boolean().optional(),archived:o.boolean().optional(),deprecated:o.boolean().optional(),metadata:o.record(o.string(),o.unknown()).optional()}),b=[`placeholder`,`description`,`defaultValue`,`icon`,`order`,`hidden`,`archived`,`deprecated`,`metadata`];function refuseForeignKeys(e,t,n=[]){let r=new Set(n);return function refuse(n,i,a,o=[]){let s=e[n];if(s!==void 0&&i!==void 0)for(let e of Object.keys(i))s.has(e)||r.has(e)||a.addIssue({code:`custom`,path:[...o,e],message:`"${e}" is not a ${n} ${t}; keys of ${n}: ${[...s].join(`, `)}`})}}const x=o.object({value:o.string().min(1).describe(`Stored value`),label:o.string().min(1).describe(`Label people see`),description:o.string().describe(`Extra context`).optional(),inverse:o.string().describe(`Paired option's value (symmetric)`).optional(),archived:o.boolean().describe(`Hides without deleting`).optional()}),S=o.enum([`idle`,`in_progress`,`finished`]).describe(`Workflow stage`),C=x.extend({color:_}).strict(),w=C,T=x.extend({color:_,group:S}).strict(),E=x.extend({color:o.string().optional().describe(`A color id`),group:S.optional()}).strict(),D=o.array(E).min(1).refine(e=>{let t=e.map(e=>e.value);return new Set(t).size===t.length},{message:`Duplicate option values are not allowed`});function writeOptionsArraySchema(e){return o.array(e).min(1).max(m.optionsPerAttribute).refine(e=>{let t=e.map(e=>e.value);return new Set(t).size===t.length},{message:`Duplicate option values are not allowed`})}const O=writeOptionsArraySchema(C),k=writeOptionsArraySchema(w),A=writeOptionsArraySchema(T),ie=o.object({object:o.string().min(1).describe(`Target object`),displayTemplate:o.string().optional().describe(`Linked record label template`),filter:o.record(o.string(),o.unknown()).optional().describe(`Restricts linkable records`)}),ae=o.object({object:o.string().min(1).describe(`Other side's object`),attribute:o.string().min(1).describe(`Other side's attribute`),cardinality:o.enum([`one`,`many`]).optional().describe(`Other side's cardinality`),label:o.string().min(1).optional().describe(`Other side's label`),storageOwner:o.boolean().optional().describe(`Owns the join storage`)}),j=o.object({objectName:o.string().min(1).describe(`API name of the object whose options are mirrored`),attributeName:o.string().min(1).describe(`API name of the select/status attribute to mirror options from`),attributeId:o.string().optional().describe(`Id of the source attribute, resolved by the server`)}),M=y.extend({multiline:o.boolean().describe(`Renders as a multi-line textarea`).optional(),minLength:o.number().int().min(0).describe(`Minimum character count`).optional(),maxLength:o.number().int().min(1).describe(`Maximum character count`).optional(),pattern:o.string().describe(`Regular expression the value must match`).optional(),format:o.enum([`email`,`url`,`slug`]).describe(`Validates and renders as this format`).optional()}),oe=y,N=y.extend({renderAs:o.enum([`number`,`rating`]).describe(`Plain number or a star rating`).optional(),min:o.number().describe(`Minimum allowed value`).optional(),max:o.number().describe(`Maximum allowed value`).optional(),unit:o.enum([`integer`,`decimal`,`percentage`]).describe(`How the value is stored and rendered`).optional(),decimals:o.number().int().min(0).max(10).describe(`Decimal places shown`).optional()}),P=y,F=y.extend({dateFormat:o.enum([`short`,`long`,`full`,`relative`]).describe(`How the date is rendered`).optional(),minDate:o.string().describe(`Earliest allowed date (ISO)`).optional(),maxDate:o.string().describe(`Latest allowed date (ISO)`).optional(),includeTime:o.boolean().describe(`Also captures a time of day`).optional(),endDate:o.boolean().describe(`Paired with another date attribute as a range's end`).optional(),timeFormat:o.enum([`12h`,`24h`]).describe(`Clock format when a time is included`).optional()}),I=y.extend({defaultCountryCode:o.string().length(3).describe(`ISO country code preselected in the dialer`).optional()}),L=y.extend({defaultCurrency:o.string().length(3).describe(`ISO currency code preselected for new values`).optional(),allowedCurrencies:o.array(o.string().length(3)).describe(`ISO currency codes a value may use; any currency when omitted`).optional(),allowNegative:o.boolean().describe(`Whether a negative amount is accepted`).optional()}),R=y.extend({options:D.describe(`The workflow statuses, in order`)}),z=y.extend({granularity:o.enum([`full`,`address`,`city`,`state`,`country`,`coordinates`]).describe(`How precise a location must be captured`).optional(),defaultCountry:o.string().length(3).describe(`ISO country code preselected for new values`).optional(),allowedCountries:o.array(o.string().length(3)).describe(`ISO country codes a value may use; any country when omitted`).optional()}),B=y.extend({options:D.describe(`Options`),renderAs:o.literal(`badges`).optional().describe(`Renders the chosen option as a colored badge`)}),V=y.extend({options:D.describe(`Options`),renderAs:o.literal(`badges`).optional().describe(`Renders the chosen options as colored badges`)}),H=y.extend({types:o.array(o.enum([`user`,`agent`])).min(1).optional().describe(`Which kinds of actor can be picked; both when omitted`),multiple:o.boolean().optional().describe(`Whether more than one actor can be picked`)}),U={name:p.describe(`Property API name`),label:o.string().min(1).describe(`Label people see`),required:o.boolean().describe(`Required on every edge`).optional()},W={id:o.string().optional(),objectId:o.string().optional(),system:o.boolean().optional(),unique:o.boolean().optional()},G=Object.fromEntries(b.map(e=>[e,!0])),K=[`text`,`number`,`checkbox`,`date`,`phone`,`currency`,`location`],q=[...K,`select`,`multiselect`,`status`],J={text:M,number:N,checkbox:P,date:F,phone:I,currency:L,location:z,select:B,multiselect:V,status:R},se={...J,select:B.extend({options:O.describe(`Options`)}),multiselect:V.extend({options:k.describe(`Options`)}),status:R.extend({options:A.describe(`Statuses`)})},propertyWireConfigShapeFor=e=>se[e].omit(G).shape,storedPropertyMember=e=>o.object({...U,...W,type:o.literal(e).describe(`Property type`),...J[e].shape}).strip(),Y=o.discriminatedUnion(`type`,q.map(storedPropertyMember)),X=o.object({definitions:o.array(Y).min(1).max(m.optionsPerAttribute).describe(`Edge properties`)}).strip().describe(`Properties carried by the edge itself (role, share, since…), never a third object`),ce=refuseForeignKeys(Object.fromEntries(q.map(e=>[e,new Set(Object.keys(propertyWireConfigShapeFor(e)))])),`property key`,[...Object.keys(U),`type`]);function refuseForeignPropertyKeys(e,t){ce(e.type,e,t)}const Z=K.reduce((e,t)=>(Object.assign(e,propertyWireConfigShapeFor(t)),e),{}),optionPropertyWireMember=e=>o.object({...U,type:e.length===1?o.literal(e[0]).describe(`Property type`):o.enum(e).describe(`Property type`),...propertyWireConfigShapeFor(e[0])}).strict(),Q=o.discriminatedUnion(`type`,[optionPropertyWireMember([`select`,`multiselect`]),optionPropertyWireMember([`status`]),o.object({...U,type:o.enum(K).describe(`Property type`),...Z}).strict().superRefine(refuseForeignPropertyKeys)]),le=o.object({definitions:o.array(Q).min(1).max(m.optionsPerAttribute).describe(`Edge properties`)}).strict().describe(`Properties carried by the edge itself (role, share, since…), never a third object`),ue=y.extend({targets:o.array(ie).min(1).describe(`Target object(s)`),cardinality:o.enum([`one`,`many`]).describe(`one or many`),maxItems:o.number().int().min(1).optional().describe(`Max linked records`),bilateral:ae.optional().describe(`Syncs the other side's attribute`),properties:X.optional()}),de=y.extend({expression:o.string().min(1).superRefine((e,t)=>{try{parseComputedFormula(e)}catch(e){t.addIssue({code:o.ZodIssueCode.custom,message:e instanceof Error?e.message:`Invalid formula expression`})}}).describe(`The formula expression, compiled against this object's attributes`),returnType:o.enum([`text`,`number`,`boolean`,`date`,`select`,`multiselect`]).describe(`The formula's result type`),decimals:o.number().int().min(0).max(10).optional().describe(`Decimal places shown for a number result`),allowRelations:o.boolean().optional().describe(`Whether the expression may read across a relation`),optionsSource:j.optional().describe(`Mirrors an option set`)}),fe=y.extend({relationAttribute:o.string().min(1).optional().describe(`API name of the relation this rollup aggregates through`),relationPath:o.string().optional().describe(`Not supported yet — single-hop only`),targetAttribute:o.string().min(1).optional().describe(`API name of the attribute aggregated on the relation's target object; not read by count`),function:o.enum([`sum`,`avg`,`earliest`,`latest`,`count`,`countValues`,`countUniqueValues`,`countEmpty`,`percentEmpty`,`percentNotEmpty`,`original`]).describe(`The aggregation applied across the linked records`),decimals:o.number().int().min(0).max(10).optional().describe(`Decimal places shown for a numeric result`),targetAttributeType:o.string().optional().describe(`Server-set`),targetAttributeOptions:o.array(E).optional().describe(`Server-set`),targetCurrencyCode:o.string().length(3).optional().describe(`Server-set`),optionsSource:j.optional().describe(`Mirrors an option set`)});function rollupTargetIssue(e,t){if(e===`rollup`&&t.function!==`count`&&t.targetAttribute===void 0)return{path:[`targetAttribute`],message:`targetAttribute is required for a "${String(t.function)}" rollup`}}const $={text:M,richtext:oe,number:N,checkbox:P,date:F,phone:I,currency:L,status:R,location:z,select:B,multiselect:V,user:H,relation:ue,formula:de,rollup:fe,document:y.extend({properties:X.optional(),accepts:o.array(o.string().min(1)).optional().describe("MIME prefixes or globs a file must match (e.g. `image/*`, `*.pdf`)"),maxFileSize:o.number().int().min(1).optional().describe(`Maximum file size in bytes`)})};function getAttributeConfigSchema(e){let t=$[e];if(!t)throw new n(`Unsupported attribute type: ${e}`,[]);return t}function parseAttributeConfig(e,t){let n=getAttributeConfigSchema(e).strip().parse(t),r=rollupTargetIssue(e,n);if(r)throw validationErrorFromIssues([r]);return n}function getAttributeConfigWriteSchema(e){let t=getAttributeConfigSchema(e).extend({icon:v.optional()});switch(e){case`select`:return t.extend({options:O.describe(`Options`)});case`multiselect`:return t.extend({options:k.describe(`Options`)});case`status`:return t.extend({options:A.describe(`Statuses`)});default:return t}}function validationErrorFromIssues(e){return n.fromZodErrors(e.map(e=>({path:e.path.map(e=>typeof e==`symbol`?String(e):e),message:e.message})))}function parseWriteSchema(e,t){let n=getAttributeConfigWriteSchema(e).strip().safeParse(t);if(!n.success)throw validationErrorFromIssues(n.error.issues);let r=rollupTargetIssue(e,n.data);if(r)throw validationErrorFromIssues([r]);return n.data}function parseAttributeConfigForCreate(e,t){return parseWriteSchema(e,t)}function validatePatchedIcon(e){if(!Object.prototype.hasOwnProperty.call(e,`icon`))return;let t=v.optional().safeParse(e.icon);if(!t.success)throw n.fromZodErrors(t.error.issues.map(e=>({path:[`icon`,...e.path.map(e=>typeof e==`symbol`?String(e):e)],message:e.message})))}function isSelectLike(e){return e===`select`||e===`multiselect`||e===`status`}function parseAttributeConfigForUpdate(e,t){let n=Object.prototype.hasOwnProperty.call(t,`options`),r=Object.prototype.hasOwnProperty.call(t,`icon`),i={...e,...t};if(validatePatchedIcon(t),n){let{icon:t,...n}=i,a=parseWriteSchema(e.type,r?i:n);return!r&&t!==void 0&&(a.icon=t),a}let a=e.options;isSelectLike(e.type)&&(i.options=[{value:`__legacy__`,label:`__legacy__`}]);let o=getAttributeConfigSchema(e.type).strip().safeParse(i);if(!o.success)throw validationErrorFromIssues(o.error.issues);let s=o.data;return isSelectLike(e.type)&&(s.options=a),s}export{validateOptions as A,p as C,validateIconName as D,validateAttributeName as E,c as F,l as I,parseResourceVisibility as L,ee as M,u as N,validateLabel as O,te as P,s as R,m as S,assertUniqueBy as T,T as _,getAttributeConfigWriteSchema as a,_ as b,parseAttributeConfigForCreate as c,Q as d,X as f,S as g,C as h,getAttributeConfigSchema as i,validateViewName as j,validateObjectName as k,parseAttributeConfigForUpdate as l,refuseForeignKeys as m,b as n,w as o,le as p,$ as r,parseAttributeConfig as s,K as t,Y as u,ComputedFormulaParseError as v,f as w,v as x,parseComputedFormula as y,isNativeObjectName as z};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
|
-
import { rt as DateAttribute } from "./exceptions-
|
|
3
|
-
import { r as ValidationMessages } from "./index-
|
|
2
|
+
import { rt as DateAttribute } from "./exceptions-DG_iMvYs.js";
|
|
3
|
+
import { r as ValidationMessages } from "./index-ZnCTYc93.js";
|
|
4
4
|
import { z as z$1 } from "zod";
|
|
5
5
|
//#region src/validation/primitives/date.d.ts
|
|
6
6
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
|
-
import { rt as DateAttribute } from "./exceptions-
|
|
3
|
-
import { r as ValidationMessages } from "./index-
|
|
2
|
+
import { rt as DateAttribute } from "./exceptions-DG_iMvYs.mjs";
|
|
3
|
+
import { r as ValidationMessages } from "./index-CK7gaSRm.mjs";
|
|
4
4
|
import { z as z$1 } from "zod";
|
|
5
5
|
//#region src/validation/primitives/date.d.ts
|
|
6
6
|
/**
|
|
@@ -754,8 +754,11 @@ interface RollupAttribute extends Omit<BaseAttribute<never>, "defaultValue" | "r
|
|
|
754
754
|
* @example "orders.items" - traverse through orders to items
|
|
755
755
|
*/
|
|
756
756
|
relationPath?: string;
|
|
757
|
-
/**
|
|
758
|
-
|
|
757
|
+
/**
|
|
758
|
+
* Attribute name on the target object to aggregate. Absent for `count`,
|
|
759
|
+
* which aggregates the linked records themselves (#3571).
|
|
760
|
+
*/
|
|
761
|
+
targetAttribute?: string;
|
|
759
762
|
/** Aggregation function to apply */
|
|
760
763
|
function: RollupFunction;
|
|
761
764
|
/** Decimal places for numeric results */
|
|
@@ -754,8 +754,11 @@ interface RollupAttribute extends Omit<BaseAttribute<never>, "defaultValue" | "r
|
|
|
754
754
|
* @example "orders.items" - traverse through orders to items
|
|
755
755
|
*/
|
|
756
756
|
relationPath?: string;
|
|
757
|
-
/**
|
|
758
|
-
|
|
757
|
+
/**
|
|
758
|
+
* Attribute name on the target object to aggregate. Absent for `count`,
|
|
759
|
+
* which aggregates the linked records themselves (#3571).
|
|
760
|
+
*/
|
|
761
|
+
targetAttribute?: string;
|
|
759
762
|
/** Aggregation function to apply */
|
|
760
763
|
function: RollupFunction;
|
|
761
764
|
/** Decimal places for numeric results */
|
package/dist/exceptions.d.mts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
|
|
2
|
-
import { A as StorageError, B as isObjectReferencedError, C as RepositoryOperation, D as SchemaErrorCode, E as SchemaError, F as SystemEntityImmutableError, H as isRecordReferencedError, I as ValidationError, L as ValidationErrorDetail, M as SyncCascadeError, N as SyncConflictError, O as SchemaPlanNotFoundError, P as SyncError, R as isAttributeInUseError, S as RepositoryError, T as RoleNotFoundError, U as isSchemaError, V as isProtectedResourceError, W as isValidationError, _ as ProtectedResourceError, a as ChangeTypeNotSupportedError, b as RecordReference, c as DuplicateError, d as MigrationTimeoutError, f as NotFoundError, g as OrphanSystemAttributeError, h as ObjectReferencedError, i as AttributeUsage, j as StorageOperation, k as SearchBackendError, l as ForbiddenError, m as ObjectNotFoundError, n as AttributeInUseError, o as ConcurrentModificationError, p as NotImplementedError, r as AttributeNotFoundError, s as DestructiveSyncNotAllowedError, t as AccessDeniedError, u as MemoryNotFoundError, v as ProtectedRoleError, w as ReservedObjectNameError, x as RecordReferencedError, y as RecordNotFoundError, z as isNotFoundError } from "./exceptions-
|
|
2
|
+
import { A as StorageError, B as isObjectReferencedError, C as RepositoryOperation, D as SchemaErrorCode, E as SchemaError, F as SystemEntityImmutableError, H as isRecordReferencedError, I as ValidationError, L as ValidationErrorDetail, M as SyncCascadeError, N as SyncConflictError, O as SchemaPlanNotFoundError, P as SyncError, R as isAttributeInUseError, S as RepositoryError, T as RoleNotFoundError, U as isSchemaError, V as isProtectedResourceError, W as isValidationError, _ as ProtectedResourceError, a as ChangeTypeNotSupportedError, b as RecordReference, c as DuplicateError, d as MigrationTimeoutError, f as NotFoundError, g as OrphanSystemAttributeError, h as ObjectReferencedError, i as AttributeUsage, j as StorageOperation, k as SearchBackendError, l as ForbiddenError, m as ObjectNotFoundError, n as AttributeInUseError, o as ConcurrentModificationError, p as NotImplementedError, r as AttributeNotFoundError, s as DestructiveSyncNotAllowedError, t as AccessDeniedError, u as MemoryNotFoundError, v as ProtectedRoleError, w as ReservedObjectNameError, x as RecordReferencedError, y as RecordNotFoundError, z as isNotFoundError } from "./exceptions-DG_iMvYs.mjs";
|
|
3
3
|
export { AccessDeniedError, AttributeInUseError, AttributeNotFoundError, AttributeUsage, ChangeTypeNotSupportedError, ConcurrentModificationError, DestructiveSyncNotAllowedError, DuplicateError, ForbiddenError, MemoryNotFoundError, MigrationTimeoutError, NotFoundError, NotImplementedError, ObjectNotFoundError, ObjectReferencedError, OrphanSystemAttributeError, ProtectedResourceError, ProtectedRoleError, RecordNotFoundError, RecordReference, RecordReferencedError, RepositoryError, RepositoryOperation, ReservedObjectNameError, RoleNotFoundError, SchemaError, SchemaErrorCode, SchemaPlanNotFoundError, SearchBackendError, StorageError, StorageOperation, SyncCascadeError, SyncConflictError, SyncError, SystemEntityImmutableError, ValidationError, ValidationErrorDetail, isAttributeInUseError, isNotFoundError, isObjectReferencedError, isProtectedResourceError, isRecordReferencedError, isSchemaError, isValidationError };
|
package/dist/exceptions.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
|
|
2
|
-
import { A as StorageError, B as isObjectReferencedError, C as RepositoryOperation, D as SchemaErrorCode, E as SchemaError, F as SystemEntityImmutableError, H as isRecordReferencedError, I as ValidationError, L as ValidationErrorDetail, M as SyncCascadeError, N as SyncConflictError, O as SchemaPlanNotFoundError, P as SyncError, R as isAttributeInUseError, S as RepositoryError, T as RoleNotFoundError, U as isSchemaError, V as isProtectedResourceError, W as isValidationError, _ as ProtectedResourceError, a as ChangeTypeNotSupportedError, b as RecordReference, c as DuplicateError, d as MigrationTimeoutError, f as NotFoundError, g as OrphanSystemAttributeError, h as ObjectReferencedError, i as AttributeUsage, j as StorageOperation, k as SearchBackendError, l as ForbiddenError, m as ObjectNotFoundError, n as AttributeInUseError, o as ConcurrentModificationError, p as NotImplementedError, r as AttributeNotFoundError, s as DestructiveSyncNotAllowedError, t as AccessDeniedError, u as MemoryNotFoundError, v as ProtectedRoleError, w as ReservedObjectNameError, x as RecordReferencedError, y as RecordNotFoundError, z as isNotFoundError } from "./exceptions-
|
|
2
|
+
import { A as StorageError, B as isObjectReferencedError, C as RepositoryOperation, D as SchemaErrorCode, E as SchemaError, F as SystemEntityImmutableError, H as isRecordReferencedError, I as ValidationError, L as ValidationErrorDetail, M as SyncCascadeError, N as SyncConflictError, O as SchemaPlanNotFoundError, P as SyncError, R as isAttributeInUseError, S as RepositoryError, T as RoleNotFoundError, U as isSchemaError, V as isProtectedResourceError, W as isValidationError, _ as ProtectedResourceError, a as ChangeTypeNotSupportedError, b as RecordReference, c as DuplicateError, d as MigrationTimeoutError, f as NotFoundError, g as OrphanSystemAttributeError, h as ObjectReferencedError, i as AttributeUsage, j as StorageOperation, k as SearchBackendError, l as ForbiddenError, m as ObjectNotFoundError, n as AttributeInUseError, o as ConcurrentModificationError, p as NotImplementedError, r as AttributeNotFoundError, s as DestructiveSyncNotAllowedError, t as AccessDeniedError, u as MemoryNotFoundError, v as ProtectedRoleError, w as ReservedObjectNameError, x as RecordReferencedError, y as RecordNotFoundError, z as isNotFoundError } from "./exceptions-DG_iMvYs.js";
|
|
3
3
|
export { AccessDeniedError, AttributeInUseError, AttributeNotFoundError, AttributeUsage, ChangeTypeNotSupportedError, ConcurrentModificationError, DestructiveSyncNotAllowedError, DuplicateError, ForbiddenError, MemoryNotFoundError, MigrationTimeoutError, NotFoundError, NotImplementedError, ObjectNotFoundError, ObjectReferencedError, OrphanSystemAttributeError, ProtectedResourceError, ProtectedRoleError, RecordNotFoundError, RecordReference, RecordReferencedError, RepositoryError, RepositoryOperation, ReservedObjectNameError, RoleNotFoundError, SchemaError, SchemaErrorCode, SchemaPlanNotFoundError, SearchBackendError, StorageError, StorageOperation, SyncCascadeError, SyncConflictError, SyncError, SystemEntityImmutableError, ValidationError, ValidationErrorDetail, isAttributeInUseError, isNotFoundError, isObjectReferencedError, isProtectedResourceError, isRecordReferencedError, isSchemaError, isValidationError };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
|
-
import { Jt as Uuid, K as MigrationDefinition, Y as Attribute } from "./exceptions-
|
|
3
|
-
import { i as ValidationResult, r as ValidationMessages } from "./index-
|
|
2
|
+
import { Jt as Uuid, K as MigrationDefinition, Y as Attribute } from "./exceptions-DG_iMvYs.mjs";
|
|
3
|
+
import { i as ValidationResult, r as ValidationMessages } from "./index-CK7gaSRm.mjs";
|
|
4
4
|
import { IconName } from "@stndrds/constants";
|
|
5
5
|
import { z as z$1 } from "zod";
|
|
6
6
|
//#region src/types/document-layout.d.ts
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
|
-
import { Jt as Uuid, K as MigrationDefinition, Y as Attribute } from "./exceptions-
|
|
3
|
-
import { i as ValidationResult, r as ValidationMessages } from "./index-
|
|
2
|
+
import { Jt as Uuid, K as MigrationDefinition, Y as Attribute } from "./exceptions-DG_iMvYs.js";
|
|
3
|
+
import { i as ValidationResult, r as ValidationMessages } from "./index-ZnCTYc93.js";
|
|
4
4
|
import { z as z$1 } from "zod";
|
|
5
5
|
import { IconName } from "@stndrds/constants";
|
|
6
6
|
//#region src/types/document-layout.d.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
import { Y as Attribute, Z as AttributeType } from "./exceptions-
|
|
2
|
+
import { Y as Attribute, Z as AttributeType } from "./exceptions-DG_iMvYs.js";
|
|
3
3
|
import { z as z$1 } from "zod";
|
|
4
4
|
import { IconName } from "@stndrds/constants";
|
|
5
5
|
//#region src/types/mutations.d.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
import { Y as Attribute, Z as AttributeType } from "./exceptions-
|
|
2
|
+
import { Y as Attribute, Z as AttributeType } from "./exceptions-DG_iMvYs.mjs";
|
|
3
3
|
import { IconName } from "@stndrds/constants";
|
|
4
4
|
import { z as z$1 } from "zod";
|
|
5
5
|
//#region src/types/mutations.d.ts
|
package/dist/index.d.mts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
|
|
2
|
-
import { $ as BilateralConfig, $t as indexBy, A as StorageError, An as ComputedDependency, At as StatusGroup, B as isObjectReferencedError, Bn as ComputedFormulaLiteralNode, Bt as OptionPropertyAttribute, C as RepositoryOperation, Cn as assertAcyclicComputedDependencies, Ct as RichTextAttribute, D as SchemaErrorCode, Dn as ComputedFunctionName, Dt as SelectAttribute, E as SchemaError, En as COMPUTED_FUNCTION_NAMES, Et as RollupFunction, F as SystemEntityImmutableError, Fn as ComputedValueType, Ft as inferInverseCardinality, G as BuiltInTransform, Gt as resolvePropertyDefinitions, H as isRecordReferencedError, Hn as ComputedFormulaPathNode, Ht as PropertySchema, I as ValidationError, In as ComputedFormulaAstNode, It as isAttributeSortable, J as ATTRIBUTE_TYPES, Jt as Uuid, K as MigrationDefinition, Kt as TenantId, L as ValidationErrorDetail, Ln as ComputedFormulaBinaryNode, Lt as isBilateralRelation, M as SyncCascadeError, Mn as ComputedOptionsSource, Mt as TimeFormat, N as SyncConflictError, Nn as ComputedPlan, Nt as UserAttribute, O as SchemaPlanNotFoundError, On as ComputedFunctionSignature, Ot as SingleRelationAttribute, P as SyncError, Pn as ComputedReturnType, Pt as UserReferenceType, Q as BaseAttribute, Qt as generateId, R as isAttributeInUseError, Rn as ComputedFormulaBinaryOperator, Rt as isUniversalRelation, S as RepositoryError, Sn as ComputedFormulaCompileError, St as RelationTarget, T as RoleNotFoundError, Tn as COMPUTED_FUNCTIONS, Tt as RollupAttribute, U as isSchemaError, Un as parseComputedFormula, Ut as PropertyType, V as isProtectedResourceError, Vn as ComputedFormulaParseError, Vt as PropertyAttribute, W as isValidationError, Wt as hasOptions, X as AttributeGroup, Xt as asUserId, Y as Attribute, Yt as asTenantId, Z as AttributeType, Zt as deepEqual, _ as ProtectedResourceError, _n as CompileComputedFormulaInput, _t as Option, a as ChangeTypeNotSupportedError, an as COMPUTED_FUNCTION_METADATA, at as DateRangeValue, b as RecordReference, bn as ComputedCompileSchema, bt as RELATION_TARGET_ANY, c as DuplicateError, cn as ComputedFormulaResult, ct as FormulaAttribute, d as MigrationTimeoutError, dn as evaluateComputedFormulaWithResult, dt as LocationAttribute, en as NonJsonValueError, et as CheckboxAttribute, f as NotFoundError, fn as formatComputedResult, ft as LocationGranularity, g as OrphanSystemAttributeError, gn as rollupToFormulaExpression, gt as NumberUnit, h as ObjectReferencedError, hn as inferRollupReturnType, ht as NumberAttribute, i as AttributeUsage, in as serializeStableJson, it as DateFormat, j as StorageOperation, jn as ComputedFieldKind, jt as TextAttribute, k as SearchBackendError, kn as isComputedFunctionName, kt as StatusAttribute, l as ForbiddenError, ln as evaluateComputedAst, lt as FormulaReturnType, m as ObjectNotFoundError, mn as compileRollupAttribute, mt as MultiselectAttribute, n as AttributeInUseError, nn as sameStableValue, nt as CurrencyAttribute, o as ConcurrentModificationError, on as ComputedFunctionCategory, ot as DateValue, p as NotImplementedError, pn as isPlainRecord, pt as MultiRelationAttribute, q as SchemaOperation, qt as UserId, r as AttributeNotFoundError, rn as serializeCanonicalJson, rt as DateAttribute, s as DestructiveSyncNotAllowedError, sn as ComputedFunctionMetadata, st as DocumentAttribute, t as AccessDeniedError, tn as canonicalStringify, tt as Currency, u as MemoryNotFoundError, un as evaluateComputedFormula, ut as Location, v as ProtectedRoleError, vn as ComputedCompileAttribute, vt as Phone, w as ReservedObjectNameError, wn as compileComputedFormula, wt as RichtextAttribute, x as RecordReferencedError, xn as ComputedDependencyGraphNode, xt as RelationAttribute, y as RecordNotFoundError, yn as ComputedCompileObject, yt as PhoneAttribute, z as isNotFoundError, zn as ComputedFormulaCallNode, zt as relationTargetsOf } from "./exceptions-
|
|
3
|
-
import { $ as QueryState, A as FormContentDefinition, B as DayMonthValue, C as ContentOpenMode, D as CustomContentDefinition, E as ContentViewDefinition, F as MeetingsContentDefinition, G as FilterOperator, H as EdgeQuantifier, I as RichtextContentDefinition, J as FilterValue, K as FilterRule, L as ViewContentDefinition, M as FormsContentDefinition, N as KanbanCollectionContentDefinition, O as DocumentsContentDefinition, P as ListViewLayout, Q as PhoneFilterValue, R as ViewRead, S as ContentFieldGroup, T as ContentViewContext, U as ExtendedFilterRule, V as DynamicValue, W as FilterCombinator, X as NoValueOperator, Y as NO_VALUE_OPERATORS, Z as OPERATORS_BY_TYPE, _ as CollectionContentDefinition, a as contentViewDefinitionSchemaFor, b as ContentCreateMode, c as draftContentViewDefinitionSchemaFor, d as sortsSchema, et as RelativeDateValue, f as colorIdSchema, g as CollectionAction, h as ActivityContentDefinition, i as contentViewDefinitionSchema, it as
|
|
4
|
-
import { A as FolderPreset, C as ResourceVisibility, D as parseResourceVisibility, E as Timestamps, M as PresetNode, O as DocumentLayout, S as ReservedObjectName, T as SystemFieldName, _ as ObjectRecord, a as validateDraft, b as RESOURCE_VISIBILITIES, c as validateObjectOrThrow, f as createFormAttributeValidator, g as ObjectDefinition, h as ObjectAttribute, j as MAX_PRESET_DEPTH, k as DocumentLayoutVariant, m as ListViewTabVisibility, o as validateDraftOrThrow, p as LIST_VIEW_TAB_VISIBILITIES, r as rejectUnknownAttributesOrThrow, s as validateObject, v as RESERVED_ATTRIBUTE_NAMES, w as SYSTEM_FIELD_NAMES, x as ReservedAttributeName, y as RESERVED_OBJECT_NAMES } from "./index
|
|
5
|
-
import { S as UpdateObjectInput, _ as statusOptionWriteSchema, b as RelationOption, c as parseAttributeConfigForCreate, d as propertyAttributeWireSchema, f as propertySchemaSchema, g as statusGroupSchema, h as selectOptionWriteSchema, l as parseAttributeConfigForUpdate, m as refuseForeignKeys, n as WIRE_OMITTED_CONFIG_KEYS, o as multiselectOptionWriteSchema, p as propertySchemaWireSchema, r as attributeConfigSchemas, s as parseAttributeConfig, t as SIMPLE_PROPERTY_TYPES, u as propertyAttributeSchema, v as AddAttributeInput, x as RelationOptionsResponse, y as CreateCustomObjectInput } from "./index-
|
|
6
|
-
import { n as DEFAULT_VALIDATION_MESSAGES, r as ValidationMessages, t as formatZodErrors } from "./index-
|
|
7
|
-
import { t as createTextValidator } from "./text-
|
|
8
|
-
import { t as createNumberValidator } from "./number-
|
|
9
|
-
import { t as createCheckboxValidator } from "./checkbox-
|
|
10
|
-
import { t as createDateValidator } from "./date-
|
|
2
|
+
import { $ as BilateralConfig, $t as indexBy, A as StorageError, An as ComputedDependency, At as StatusGroup, B as isObjectReferencedError, Bn as ComputedFormulaLiteralNode, Bt as OptionPropertyAttribute, C as RepositoryOperation, Cn as assertAcyclicComputedDependencies, Ct as RichTextAttribute, D as SchemaErrorCode, Dn as ComputedFunctionName, Dt as SelectAttribute, E as SchemaError, En as COMPUTED_FUNCTION_NAMES, Et as RollupFunction, F as SystemEntityImmutableError, Fn as ComputedValueType, Ft as inferInverseCardinality, G as BuiltInTransform, Gt as resolvePropertyDefinitions, H as isRecordReferencedError, Hn as ComputedFormulaPathNode, Ht as PropertySchema, I as ValidationError, In as ComputedFormulaAstNode, It as isAttributeSortable, J as ATTRIBUTE_TYPES, Jt as Uuid, K as MigrationDefinition, Kt as TenantId, L as ValidationErrorDetail, Ln as ComputedFormulaBinaryNode, Lt as isBilateralRelation, M as SyncCascadeError, Mn as ComputedOptionsSource, Mt as TimeFormat, N as SyncConflictError, Nn as ComputedPlan, Nt as UserAttribute, O as SchemaPlanNotFoundError, On as ComputedFunctionSignature, Ot as SingleRelationAttribute, P as SyncError, Pn as ComputedReturnType, Pt as UserReferenceType, Q as BaseAttribute, Qt as generateId, R as isAttributeInUseError, Rn as ComputedFormulaBinaryOperator, Rt as isUniversalRelation, S as RepositoryError, Sn as ComputedFormulaCompileError, St as RelationTarget, T as RoleNotFoundError, Tn as COMPUTED_FUNCTIONS, Tt as RollupAttribute, U as isSchemaError, Un as parseComputedFormula, Ut as PropertyType, V as isProtectedResourceError, Vn as ComputedFormulaParseError, Vt as PropertyAttribute, W as isValidationError, Wt as hasOptions, X as AttributeGroup, Xt as asUserId, Y as Attribute, Yt as asTenantId, Z as AttributeType, Zt as deepEqual, _ as ProtectedResourceError, _n as CompileComputedFormulaInput, _t as Option, a as ChangeTypeNotSupportedError, an as COMPUTED_FUNCTION_METADATA, at as DateRangeValue, b as RecordReference, bn as ComputedCompileSchema, bt as RELATION_TARGET_ANY, c as DuplicateError, cn as ComputedFormulaResult, ct as FormulaAttribute, d as MigrationTimeoutError, dn as evaluateComputedFormulaWithResult, dt as LocationAttribute, en as NonJsonValueError, et as CheckboxAttribute, f as NotFoundError, fn as formatComputedResult, ft as LocationGranularity, g as OrphanSystemAttributeError, gn as rollupToFormulaExpression, gt as NumberUnit, h as ObjectReferencedError, hn as inferRollupReturnType, ht as NumberAttribute, i as AttributeUsage, in as serializeStableJson, it as DateFormat, j as StorageOperation, jn as ComputedFieldKind, jt as TextAttribute, k as SearchBackendError, kn as isComputedFunctionName, kt as StatusAttribute, l as ForbiddenError, ln as evaluateComputedAst, lt as FormulaReturnType, m as ObjectNotFoundError, mn as compileRollupAttribute, mt as MultiselectAttribute, n as AttributeInUseError, nn as sameStableValue, nt as CurrencyAttribute, o as ConcurrentModificationError, on as ComputedFunctionCategory, ot as DateValue, p as NotImplementedError, pn as isPlainRecord, pt as MultiRelationAttribute, q as SchemaOperation, qt as UserId, r as AttributeNotFoundError, rn as serializeCanonicalJson, rt as DateAttribute, s as DestructiveSyncNotAllowedError, sn as ComputedFunctionMetadata, st as DocumentAttribute, t as AccessDeniedError, tn as canonicalStringify, tt as Currency, u as MemoryNotFoundError, un as evaluateComputedFormula, ut as Location, v as ProtectedRoleError, vn as ComputedCompileAttribute, vt as Phone, w as ReservedObjectNameError, wn as compileComputedFormula, wt as RichtextAttribute, x as RecordReferencedError, xn as ComputedDependencyGraphNode, xt as RelationAttribute, y as RecordNotFoundError, yn as ComputedCompileObject, yt as PhoneAttribute, z as isNotFoundError, zn as ComputedFormulaCallNode, zt as relationTargetsOf } from "./exceptions-DG_iMvYs.mjs";
|
|
3
|
+
import { $ as QueryState, A as FormContentDefinition, B as DayMonthValue, C as ContentOpenMode, D as CustomContentDefinition, E as ContentViewDefinition, F as MeetingsContentDefinition, G as FilterOperator, H as EdgeQuantifier, I as RichtextContentDefinition, J as FilterValue, K as FilterRule, L as ViewContentDefinition, M as FormsContentDefinition, N as KanbanCollectionContentDefinition, O as DocumentsContentDefinition, P as ListViewLayout, Q as PhoneFilterValue, R as ViewRead, S as ContentFieldGroup, T as ContentViewContext, U as ExtendedFilterRule, V as DynamicValue, W as FilterCombinator, X as NoValueOperator, Y as NO_VALUE_OPERATORS, Z as OPERATORS_BY_TYPE, _ as CollectionContentDefinition, a as contentViewDefinitionSchemaFor, at as isNoValueOperator, b as ContentCreateMode, c as draftContentViewDefinitionSchemaFor, d as sortsSchema, et as RelativeDateValue, f as colorIdSchema, g as CollectionAction, h as ActivityContentDefinition, i as contentViewDefinitionSchema, it as getRollupFilterOperators, j as FormDensity, k as EmailsContentDefinition, l as filterStateSchema, m as SCHEMA_LIMITS, n as collectionContentSourceSchema, nt as SortRule, o as displayAttributesSchema, p as iconNameSchema, q as FilterState, r as columnsSchema, rt as filterOperatorsByTypeForGeneration, s as draftContentViewDefinitionSchema, t as AsideRule, tt as SortDirection, u as publishedViewContentDefinitionSchema, v as CollectionContentSource, w as ContentPlacement, x as ContentField, y as ColumnReference, z as CurrencyFilterValue } from "./all-BLytyk5I.mjs";
|
|
4
|
+
import { A as FolderPreset, C as ResourceVisibility, D as parseResourceVisibility, E as Timestamps, M as PresetNode, O as DocumentLayout, S as ReservedObjectName, T as SystemFieldName, _ as ObjectRecord, a as validateDraft, b as RESOURCE_VISIBILITIES, c as validateObjectOrThrow, f as createFormAttributeValidator, g as ObjectDefinition, h as ObjectAttribute, j as MAX_PRESET_DEPTH, k as DocumentLayoutVariant, m as ListViewTabVisibility, o as validateDraftOrThrow, p as LIST_VIEW_TAB_VISIBILITIES, r as rejectUnknownAttributesOrThrow, s as validateObject, v as RESERVED_ATTRIBUTE_NAMES, w as SYSTEM_FIELD_NAMES, x as ReservedAttributeName, y as RESERVED_OBJECT_NAMES } from "./index--ukNqScY.mjs";
|
|
5
|
+
import { S as UpdateObjectInput, _ as statusOptionWriteSchema, b as RelationOption, c as parseAttributeConfigForCreate, d as propertyAttributeWireSchema, f as propertySchemaSchema, g as statusGroupSchema, h as selectOptionWriteSchema, l as parseAttributeConfigForUpdate, m as refuseForeignKeys, n as WIRE_OMITTED_CONFIG_KEYS, o as multiselectOptionWriteSchema, p as propertySchemaWireSchema, r as attributeConfigSchemas, s as parseAttributeConfig, t as SIMPLE_PROPERTY_TYPES, u as propertyAttributeSchema, v as AddAttributeInput, x as RelationOptionsResponse, y as CreateCustomObjectInput } from "./index-gM_g_Y_H.mjs";
|
|
6
|
+
import { n as DEFAULT_VALIDATION_MESSAGES, r as ValidationMessages, t as formatZodErrors } from "./index-CK7gaSRm.mjs";
|
|
7
|
+
import { t as createTextValidator } from "./text-BwN_Y1Du.mjs";
|
|
8
|
+
import { t as createNumberValidator } from "./number-DYExtkZN.mjs";
|
|
9
|
+
import { t as createCheckboxValidator } from "./checkbox-DGuL9Z3k.mjs";
|
|
10
|
+
import { t as createDateValidator } from "./date-D7P9JtGg.mjs";
|
|
11
11
|
import { ColorId, CountryIso3, CurrencyCode, IconName, MimeType } from "@stndrds/constants";
|
|
12
12
|
import z, { z as z$1 } from "zod";
|
|
13
13
|
import { StandardSchemaV1, StandardSchemaV1 as StandardSchemaV1$1 } from "@standard-schema/spec";
|
|
@@ -1415,7 +1415,7 @@ export type SessionApprovalMode = "manual" | "auto";
|
|
|
1415
1415
|
export type AgentWorkMode = "execute" | "architect";
|
|
1416
1416
|
export declare const TODO_PLAN_STATUSES: readonly ["active", "completed", "abandoned"];
|
|
1417
1417
|
export type AgentTodoPlanStatus = (typeof TODO_PLAN_STATUSES)[number];
|
|
1418
|
-
export type TriggerEventType = "record.created" | "record.updated" | "record.deleted" | "form.submitted" | "agent.completed" | "webhook"
|
|
1418
|
+
export type TriggerEventType = "record.created" | "record.updated" | "record.deleted" | "form.submitted" | "agent.completed" | "webhook";
|
|
1419
1419
|
export type AgentTriggerType = Extract<TriggerEventType, "record.created" | "record.updated" | "record.deleted">;
|
|
1420
1420
|
export declare const PROVIDER_NAMES: readonly ["openai", "anthropic", "google", "spacexai", "deepseek", "moonshotai", "alibaba", "mistral", "minimax", "meta", "zai"];
|
|
1421
1421
|
export type ProviderName = (typeof PROVIDER_NAMES)[number];
|
|
@@ -1509,8 +1509,6 @@ export interface AgentTriggerDefinition {
|
|
|
1509
1509
|
formDefinitionId?: string;
|
|
1510
1510
|
sourceAgentId?: string;
|
|
1511
1511
|
webhookPath?: string;
|
|
1512
|
-
cronExpression?: string;
|
|
1513
|
-
timezone?: string;
|
|
1514
1512
|
filter?: FilterState;
|
|
1515
1513
|
inputBuilder?: string;
|
|
1516
1514
|
debounceMs?: number;
|
|
@@ -1550,8 +1548,6 @@ export interface AgentTriggerBlueprint {
|
|
|
1550
1548
|
formDefinitionId?: string;
|
|
1551
1549
|
sourceAgentId?: string;
|
|
1552
1550
|
webhookPath?: string;
|
|
1553
|
-
cronExpression?: string;
|
|
1554
|
-
timezone?: string;
|
|
1555
1551
|
filter?: FilterState;
|
|
1556
1552
|
inputBuilder?: string;
|
|
1557
1553
|
debounceMs?: number;
|
|
@@ -1647,6 +1643,8 @@ export interface AgentDefinition {
|
|
|
1647
1643
|
model: ModelDefinition;
|
|
1648
1644
|
tools?: string[];
|
|
1649
1645
|
schedule?: AgentSchedule;
|
|
1646
|
+
/** Read-only stamp from the dedicated persistence column after a successful scheduled launch. */
|
|
1647
|
+
scheduleLastFiredAt?: Date;
|
|
1650
1648
|
config: AgentExecutionConfig;
|
|
1651
1649
|
/**
|
|
1652
1650
|
* MCP servers this definition may use (see `AgentConfig.mcpServers`).
|
|
@@ -13409,4 +13407,4 @@ export declare function schemaStateSourcePayload(entries: readonly SchemaStateEn
|
|
|
13409
13407
|
export declare function parseSchemaState(input: unknown): SchemaState;
|
|
13410
13408
|
export declare function diffSchemaState(state: SchemaState): SchemaStateDiff;
|
|
13411
13409
|
//#endregion
|
|
13412
|
-
export { ATTRIBUTE_TYPES, AccessDeniedError, type ActivityContentDefinition, AddAttributeInput, type ArchitectChange, type ArchitectFocus, type ArchitectImpact, type ArchitectNavigation, type ArchitectPresentation, type ArchitectProjection, type AsideRule, Attribute, type AttributeAgentCapabilities, type AttributeAuthoringCapabilities, type AttributeCapabilities, type AttributeCardinality, type AttributeDefaultValueCapability, type AttributeExchangeCapabilities, AttributeGroup, AttributeInUseError, type AttributeLifecycleCapabilities, type AttributeLike, AttributeNotFoundError, type AttributePolymorphicCapability, type AttributePresentationCapabilities, type AttributeQueryCapabilities, type AttributeRequiredCapability, type AttributeStorageCapabilities, type AttributeStorageMode, AttributeType, AttributeUsage, BaseAttribute, type BaseOperation, type BatchGuidance, BilateralConfig, BuiltInTransform, COMPUTED_FUNCTIONS, COMPUTED_FUNCTION_METADATA, COMPUTED_FUNCTION_NAMES, type CanonicalViewOperationInput, type CatalogueViolation, ChangeTypeNotSupportedError, CheckboxAttribute, type CollectionAction, type CollectionContentDefinition, type CollectionContentSource, type CollectionSourceAddress, type ColumnReference, type ColumnsNeeded, CompileComputedFormulaInput, ComputedCompileAttribute, ComputedCompileObject, ComputedCompileSchema, ComputedDependency, ComputedDependencyGraphNode, ComputedFieldKind, ComputedFormulaAstNode, ComputedFormulaBinaryNode, ComputedFormulaBinaryOperator, ComputedFormulaCallNode, ComputedFormulaCompileError, ComputedFormulaLiteralNode, ComputedFormulaParseError, ComputedFormulaPathNode, ComputedFormulaResult, ComputedFunctionCategory, ComputedFunctionMetadata, ComputedFunctionName, ComputedFunctionSignature, ComputedOptionsSource, ComputedPlan, ComputedReturnType, ComputedValueType, ConcurrentModificationError, type ContentCreateMode, type ContentExtensionDefinition, type ContentField, type ContentFieldGroup, type ContentNavigation, type ContentOpenMode, type ContentPlacement, type ContentViewCatalogueCollection, type ContentViewCatalogueInput, type ContentViewCatalogueResult, type ContentViewContext, type ContentViewDefinition, type ConversationDisplayTitleInput, CreateCustomObjectInput, type CreateDBForm, type CreateDBFormSubmission, Currency, CurrencyAttribute, type CurrencyFilterValue, type CustomContentDefinition, type DBForm, type DBFormSubmission, DEFAULT_VALIDATION_MESSAGES, DateAttribute, DateFormat, DateRangeValue, DateValue, type DayMonthValue, type DefaultResolutionContext, type DefaultViewType, DestructiveSyncNotAllowedError, DocumentAttribute, DocumentLayout, DocumentLayoutVariant, type DocumentsContentDefinition, type DraftAppendCommand, type DraftAppendReceipt, type DraftCommandGuard, type DraftContentState, type DraftFocus, type DraftObjectSettings, type DraftOperationContext, type DraftPublishCommand, type DraftSummary, type DraftViewAuthoring, type DraftableAttribute, type DraftableObject, type DraftableSampleRecord, type DraftableState, type DraftableView, DuplicateError, type DynamicValue, type EdgeQuantifier, type EditingCapability, type EditingScope, type EmailsContentDefinition, type ExhaustiveDraftObjectSettings, type ExtendedFilterRule, type FilterCombinator, type FilterOperator, type FilterRule, type FilterState, type FilterValue, type FlagResolutionContext, FolderPreset, ForbiddenError, type FormContentDefinition, type FormDensity, FormRegistry, type FormsContentDefinition, FormulaAttribute, FormulaReturnType, type KanbanCollectionContentDefinition, LIST_VIEW_TAB_VISIBILITIES, type LabelContext, type ListViewLayout, ListViewTabVisibility, Location, LocationAttribute, type LocationFilterProperty, LocationGranularity, MAX_PRESET_DEPTH, type MeetingsContentDefinition, MemoryNotFoundError, MigrationDefinition, MigrationTimeoutError, MultiRelationAttribute, MultiselectAttribute, type MutationReceipt, NO_VALUE_OPERATORS, type NamedTarget, type NextStep, type NoValueOperator, NonJsonValueError, NotFoundError, NotImplementedError, NumberAttribute, NumberUnit, OPERATORS_BY_TYPE, ObjectAttribute, ObjectDefinition, ObjectNotFoundError, ObjectRecord, ObjectReferencedError, type OperationDef, type OperationFamily, Option, OptionPropertyAttribute, OrphanSystemAttributeError, Phone, PhoneAttribute, type PhoneFilterValue, PresetNode, PropertyAttribute, PropertySchema, PropertyType, type ProposalRevision, type ProposalTarget, ProtectedResourceError, ProtectedRoleError, type QueryState, RELATION_TARGET_ANY, RESERVED_ATTRIBUTE_NAMES, RESERVED_OBJECT_NAMES, RESOURCE_VISIBILITIES, type ReconcileRelationAttributesInput, type ReconciledRelationAttributes, RecordNotFoundError, RecordReference, RecordReferencedError, RelationAttribute, RelationOption, RelationOptionsResponse, type RelationPair, RelationTarget, type RelativeDateValue, RepositoryError, RepositoryOperation, ReservedAttributeName, ReservedObjectName, ReservedObjectNameError, ResourceVisibility, RichTextAttribute, RichtextAttribute, type RichtextContentDefinition, RoleNotFoundError, RollupAttribute, RollupFunction, SCHEMA_LIMITS, SIMPLE_PROPERTY_TYPES, SYSTEM_FIELD_NAMES, type SamplePublication, SchemaError, SchemaErrorCode, SchemaOperation, SchemaPlanNotFoundError, SearchBackendError, SelectAttribute, SingleRelationAttribute, type SortDirection, type SortRule, type StandardSchemaV1, StatusAttribute, StatusGroup, StorageError, StorageOperation, type StoredContentDefinition, SyncCascadeError, SyncConflictError, SyncError, SystemEntityImmutableError, SystemFieldName, type TenantId, TextAttribute, TimeFormat, Timestamps, type UpdateDBForm, type UpdateDBFormSubmission, UpdateObjectInput, UserAttribute, type UserId, type UserLike, UserReferenceType, type Uuid, ValidationError, ValidationErrorDetail, type ValidationMessages, type ValueRef, type ViewContentDefinition, type ViewOperation, type ViewRead, WIRE_OMITTED_CONFIG_KEYS, asTenantId, asUserId, assertAcyclicComputedDependencies, attributeConfigSchemas, canonicalStringify, collectionContentSourceSchema, colorIdSchema, columnsSchema, compileComputedFormula, compileRollupAttribute, contentViewDefinitionSchema, contentViewDefinitionSchemaFor, createCheckboxValidator, createDateValidator, createFormAttributeValidator, createNumberValidator, createTextValidator, deepEqual, displayAttributesSchema, draftContentViewDefinitionSchema, draftContentViewDefinitionSchemaFor, evaluateComputedAst, evaluateComputedFormula, evaluateComputedFormulaWithResult, filterStateSchema, formatComputedResult, formatZodErrors, generateId, getRollupFilterOperators, hasOptions, iconNameSchema, indexBy, inferInverseCardinality, inferRollupReturnType, isAttributeInUseError, isAttributeSortable, isBilateralRelation, isComputedFunctionName, isNoValueOperator, isNotFoundError, isObjectReferencedError, isPlainRecord, isProtectedResourceError, isRecordReferencedError, isSchemaError, isUniversalRelation, isValidationError, multiselectOptionWriteSchema, parseAttributeConfig, parseAttributeConfigForCreate, parseAttributeConfigForUpdate, parseComputedFormula, parseResourceVisibility, propertyAttributeSchema, propertyAttributeWireSchema, propertySchemaSchema, propertySchemaWireSchema, publishedViewContentDefinitionSchema, refuseForeignKeys, rejectUnknownAttributesOrThrow, relationTargetsOf, resolvePropertyDefinitions, rollupToFormulaExpression, sameStableValue, selectOptionWriteSchema, serializeCanonicalJson, serializeStableJson, sortsSchema, statusGroupSchema, statusOptionWriteSchema, validateDraft, validateDraftOrThrow, validateObject, validateObjectOrThrow };
|
|
13410
|
+
export { ATTRIBUTE_TYPES, AccessDeniedError, type ActivityContentDefinition, AddAttributeInput, type ArchitectChange, type ArchitectFocus, type ArchitectImpact, type ArchitectNavigation, type ArchitectPresentation, type ArchitectProjection, type AsideRule, Attribute, type AttributeAgentCapabilities, type AttributeAuthoringCapabilities, type AttributeCapabilities, type AttributeCardinality, type AttributeDefaultValueCapability, type AttributeExchangeCapabilities, AttributeGroup, AttributeInUseError, type AttributeLifecycleCapabilities, type AttributeLike, AttributeNotFoundError, type AttributePolymorphicCapability, type AttributePresentationCapabilities, type AttributeQueryCapabilities, type AttributeRequiredCapability, type AttributeStorageCapabilities, type AttributeStorageMode, AttributeType, AttributeUsage, BaseAttribute, type BaseOperation, type BatchGuidance, BilateralConfig, BuiltInTransform, COMPUTED_FUNCTIONS, COMPUTED_FUNCTION_METADATA, COMPUTED_FUNCTION_NAMES, type CanonicalViewOperationInput, type CatalogueViolation, ChangeTypeNotSupportedError, CheckboxAttribute, type CollectionAction, type CollectionContentDefinition, type CollectionContentSource, type CollectionSourceAddress, type ColumnReference, type ColumnsNeeded, CompileComputedFormulaInput, ComputedCompileAttribute, ComputedCompileObject, ComputedCompileSchema, ComputedDependency, ComputedDependencyGraphNode, ComputedFieldKind, ComputedFormulaAstNode, ComputedFormulaBinaryNode, ComputedFormulaBinaryOperator, ComputedFormulaCallNode, ComputedFormulaCompileError, ComputedFormulaLiteralNode, ComputedFormulaParseError, ComputedFormulaPathNode, ComputedFormulaResult, ComputedFunctionCategory, ComputedFunctionMetadata, ComputedFunctionName, ComputedFunctionSignature, ComputedOptionsSource, ComputedPlan, ComputedReturnType, ComputedValueType, ConcurrentModificationError, type ContentCreateMode, type ContentExtensionDefinition, type ContentField, type ContentFieldGroup, type ContentNavigation, type ContentOpenMode, type ContentPlacement, type ContentViewCatalogueCollection, type ContentViewCatalogueInput, type ContentViewCatalogueResult, type ContentViewContext, type ContentViewDefinition, type ConversationDisplayTitleInput, CreateCustomObjectInput, type CreateDBForm, type CreateDBFormSubmission, Currency, CurrencyAttribute, type CurrencyFilterValue, type CustomContentDefinition, type DBForm, type DBFormSubmission, DEFAULT_VALIDATION_MESSAGES, DateAttribute, DateFormat, DateRangeValue, DateValue, type DayMonthValue, type DefaultResolutionContext, type DefaultViewType, DestructiveSyncNotAllowedError, DocumentAttribute, DocumentLayout, DocumentLayoutVariant, type DocumentsContentDefinition, type DraftAppendCommand, type DraftAppendReceipt, type DraftCommandGuard, type DraftContentState, type DraftFocus, type DraftObjectSettings, type DraftOperationContext, type DraftPublishCommand, type DraftSummary, type DraftViewAuthoring, type DraftableAttribute, type DraftableObject, type DraftableSampleRecord, type DraftableState, type DraftableView, DuplicateError, type DynamicValue, type EdgeQuantifier, type EditingCapability, type EditingScope, type EmailsContentDefinition, type ExhaustiveDraftObjectSettings, type ExtendedFilterRule, type FilterCombinator, type FilterOperator, type FilterRule, type FilterState, type FilterValue, type FlagResolutionContext, FolderPreset, ForbiddenError, type FormContentDefinition, type FormDensity, FormRegistry, type FormsContentDefinition, FormulaAttribute, FormulaReturnType, type KanbanCollectionContentDefinition, LIST_VIEW_TAB_VISIBILITIES, type LabelContext, type ListViewLayout, ListViewTabVisibility, Location, LocationAttribute, type LocationFilterProperty, LocationGranularity, MAX_PRESET_DEPTH, type MeetingsContentDefinition, MemoryNotFoundError, MigrationDefinition, MigrationTimeoutError, MultiRelationAttribute, MultiselectAttribute, type MutationReceipt, NO_VALUE_OPERATORS, type NamedTarget, type NextStep, type NoValueOperator, NonJsonValueError, NotFoundError, NotImplementedError, NumberAttribute, NumberUnit, OPERATORS_BY_TYPE, ObjectAttribute, ObjectDefinition, ObjectNotFoundError, ObjectRecord, ObjectReferencedError, type OperationDef, type OperationFamily, Option, OptionPropertyAttribute, OrphanSystemAttributeError, Phone, PhoneAttribute, type PhoneFilterValue, PresetNode, PropertyAttribute, PropertySchema, PropertyType, type ProposalRevision, type ProposalTarget, ProtectedResourceError, ProtectedRoleError, type QueryState, RELATION_TARGET_ANY, RESERVED_ATTRIBUTE_NAMES, RESERVED_OBJECT_NAMES, RESOURCE_VISIBILITIES, type ReconcileRelationAttributesInput, type ReconciledRelationAttributes, RecordNotFoundError, RecordReference, RecordReferencedError, RelationAttribute, RelationOption, RelationOptionsResponse, type RelationPair, RelationTarget, type RelativeDateValue, RepositoryError, RepositoryOperation, ReservedAttributeName, ReservedObjectName, ReservedObjectNameError, ResourceVisibility, RichTextAttribute, RichtextAttribute, type RichtextContentDefinition, RoleNotFoundError, RollupAttribute, RollupFunction, SCHEMA_LIMITS, SIMPLE_PROPERTY_TYPES, SYSTEM_FIELD_NAMES, type SamplePublication, SchemaError, SchemaErrorCode, SchemaOperation, SchemaPlanNotFoundError, SearchBackendError, SelectAttribute, SingleRelationAttribute, type SortDirection, type SortRule, type StandardSchemaV1, StatusAttribute, StatusGroup, StorageError, StorageOperation, type StoredContentDefinition, SyncCascadeError, SyncConflictError, SyncError, SystemEntityImmutableError, SystemFieldName, type TenantId, TextAttribute, TimeFormat, Timestamps, type UpdateDBForm, type UpdateDBFormSubmission, UpdateObjectInput, UserAttribute, type UserId, type UserLike, UserReferenceType, type Uuid, ValidationError, ValidationErrorDetail, type ValidationMessages, type ValueRef, type ViewContentDefinition, type ViewOperation, type ViewRead, WIRE_OMITTED_CONFIG_KEYS, asTenantId, asUserId, assertAcyclicComputedDependencies, attributeConfigSchemas, canonicalStringify, collectionContentSourceSchema, colorIdSchema, columnsSchema, compileComputedFormula, compileRollupAttribute, contentViewDefinitionSchema, contentViewDefinitionSchemaFor, createCheckboxValidator, createDateValidator, createFormAttributeValidator, createNumberValidator, createTextValidator, deepEqual, displayAttributesSchema, draftContentViewDefinitionSchema, draftContentViewDefinitionSchemaFor, evaluateComputedAst, evaluateComputedFormula, evaluateComputedFormulaWithResult, filterOperatorsByTypeForGeneration, filterStateSchema, formatComputedResult, formatZodErrors, generateId, getRollupFilterOperators, hasOptions, iconNameSchema, indexBy, inferInverseCardinality, inferRollupReturnType, isAttributeInUseError, isAttributeSortable, isBilateralRelation, isComputedFunctionName, isNoValueOperator, isNotFoundError, isObjectReferencedError, isPlainRecord, isProtectedResourceError, isRecordReferencedError, isSchemaError, isUniversalRelation, isValidationError, multiselectOptionWriteSchema, parseAttributeConfig, parseAttributeConfigForCreate, parseAttributeConfigForUpdate, parseComputedFormula, parseResourceVisibility, propertyAttributeSchema, propertyAttributeWireSchema, propertySchemaSchema, propertySchemaWireSchema, publishedViewContentDefinitionSchema, refuseForeignKeys, rejectUnknownAttributesOrThrow, relationTargetsOf, resolvePropertyDefinitions, rollupToFormulaExpression, sameStableValue, selectOptionWriteSchema, serializeCanonicalJson, serializeStableJson, sortsSchema, statusGroupSchema, statusOptionWriteSchema, validateDraft, validateDraftOrThrow, validateObject, validateObjectOrThrow };
|