@standards/schema 1.0.0-alpha.446 → 1.0.0-alpha.447
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/access-levels-BWuVeyAD.js +2 -0
- package/dist/access-levels-CpH_EGwX.mjs +2 -0
- package/dist/access-output.schema-DdveaHhd.js +2 -0
- package/dist/access-output.schema-DrsybmDW.mjs +2 -0
- package/dist/access.operations-Bfr0Hr5a.mjs +2 -0
- package/dist/access.operations-Ta7Yti9-.js +2 -0
- package/dist/actors-D6cncaeM.mjs +2 -0
- package/dist/actors-DtSC4jD7.js +2 -0
- package/dist/actors.operations-BRdW-IBc.js +2 -0
- package/dist/actors.operations-SAbl_3vt.mjs +2 -0
- package/dist/admin-tenant-CnP_XZGi.js +2 -0
- package/dist/admin-tenant-DJ_Vt8X6.mjs +2 -0
- package/dist/agent-appearance.schema-5maenk3l.mjs +2 -0
- package/dist/agent-appearance.schema-Azj0Y4h4.js +2 -0
- package/dist/agent-approvals.operations-BXtDpYb9.js +2 -0
- package/dist/agent-approvals.operations-DrEi2amV.mjs +2 -0
- package/dist/agent-definitions.operations-CkfVj_vQ.mjs +2 -0
- package/dist/agent-definitions.operations-Dah-26La.js +2 -0
- package/dist/agent-fronts.operations-Q92n0JZN.js +2 -0
- package/dist/agent-fronts.operations-ZQUdWd_4.mjs +2 -0
- package/dist/agent-memory.operations-B0nLFWs9.js +2 -0
- package/dist/agent-memory.operations-C25OLsqq.mjs +2 -0
- package/dist/agent-message.schema-DwQVDXLy.mjs +2 -0
- package/dist/agent-message.schema-SmA4ydqf.js +2 -0
- package/dist/agent-messages.operations-Aa1vk7xu.mjs +2 -0
- package/dist/agent-messages.operations-CCXX8cuW.js +2 -0
- package/dist/agent-output.schema-8ajlE5_g.js +2 -0
- package/dist/agent-output.schema-BQsbh8pJ.mjs +2 -0
- package/dist/agent-runs.operations-BVNctI5C.js +2 -0
- package/dist/agent-runs.operations-Gp-UpNB9.mjs +2 -0
- package/dist/agent-schemas-52_rE61D.mjs +2 -0
- package/dist/agent-schemas-BmTE5O3J.js +2 -0
- package/dist/agent-session-list-cursor-BFnecxvH.js +2 -0
- package/dist/agent-session-list-cursor-cpmpINuz.mjs +2 -0
- package/dist/agent-sessions.operations-B8yM9St8.mjs +2 -0
- package/dist/agent-sessions.operations-Bu04RCgZ.js +2 -0
- package/dist/agent-triggers.operations-0tOTD7Vh.js +2 -0
- package/dist/agent-triggers.operations-BJz4_xUq.mjs +2 -0
- package/dist/ai-dictation-BJvVgzjC.mjs +2 -0
- package/dist/ai-dictation-zV6sAESe.js +2 -0
- package/dist/ai-output.schema-CQKoZCbn.mjs +2 -0
- package/dist/ai-output.schema-DHm6HAfH.js +2 -0
- package/dist/ai.operations--Cx0o8wQ.mjs +2 -0
- package/dist/ai.operations-DAKLy-dv.js +2 -0
- package/dist/all-BCAZCVxV.mjs +4 -0
- package/dist/all-PUaQuM_2.js +4 -0
- package/dist/api/http.d.mts +6 -0
- package/dist/api/http.d.ts +6 -0
- package/dist/api/http.js +2 -0
- package/dist/api/http.mjs +2 -0
- package/dist/api/index.d.mts +10 -26963
- package/dist/api/index.d.ts +10 -26963
- package/dist/api/index.js +1 -1
- package/dist/api/index.mjs +1 -1
- package/dist/api/wire.d.mts +93 -0
- package/dist/api/wire.d.ts +93 -0
- package/dist/api/wire.js +2 -0
- package/dist/api/wire.mjs +2 -0
- package/dist/api-keys-C9vGsnf5.mjs +2 -0
- package/dist/api-keys-DrqoTFFb.js +2 -0
- package/dist/api-keys.operations-BbAn06Vn.mjs +2 -0
- package/dist/api-keys.operations-Dtiv6rWJ.js +2 -0
- package/dist/app-operation-groups-B0GLoqHi.d.ts +26792 -0
- package/dist/app-operation-groups-CG6l7J3l.d.mts +26791 -0
- package/dist/appearance-C0Mh9jK2.mjs +2 -0
- package/dist/appearance-DrCaK9XJ.js +2 -0
- package/dist/artifacts.operations-D6aBIbPf.mjs +2 -0
- package/dist/artifacts.operations-DZ60VQ3Q.js +2 -0
- package/dist/attribute-validators-D9vS6qK9.mjs +11 -0
- package/dist/attribute-validators-j-HiW0On.js +11 -0
- package/dist/attributes-B2wmzoDI.js +2 -0
- package/dist/attributes-DYUkML5S.mjs +2 -0
- package/dist/audit-Cjoaib0c.js +2 -0
- package/dist/audit-jbBwdDtV.mjs +2 -0
- package/dist/audit.operations-CzoEnsuj.js +2 -0
- package/dist/audit.operations-R7llfS_r.mjs +2 -0
- package/dist/browser-profile-output.schema-ChhKkoin.mjs +2 -0
- package/dist/browser-profile-output.schema-DOGfwtLW.js +2 -0
- package/dist/browser-profiles.operations-BBdmypd0.js +2 -0
- package/dist/browser-profiles.operations-CUJaaU8y.mjs +2 -0
- package/dist/bundle-output.schema-Ck4tpVVV.js +2 -0
- package/dist/bundle-output.schema-UAlU8-CS.mjs +2 -0
- package/dist/bundles.operations-CplZLAxi.js +2 -0
- package/dist/bundles.operations-CrgrLCAC.mjs +2 -0
- package/dist/cli-login.operations-C1KbNeHA.js +2 -0
- package/dist/cli-login.operations-cUUchS4E.mjs +2 -0
- package/dist/connected-apps.operations-BavndGSL.js +2 -0
- package/dist/connected-apps.operations-DDDkIn_k.mjs +2 -0
- package/dist/connectors.operations-CR20Yhbf.mjs +2 -0
- package/dist/connectors.operations-CWW21SJJ.js +2 -0
- package/dist/consumer-variables.operations-Cc90oB8D.mjs +2 -0
- package/dist/consumer-variables.operations-DY9v4AY-.js +2 -0
- package/dist/decisions-CFoL49Jb.js +2 -0
- package/dist/decisions-DNvAXetH.mjs +2 -0
- package/dist/decisions.operations-BmQnmIwC.js +2 -0
- package/dist/decisions.operations-Dx-QEhXt.mjs +2 -0
- package/dist/device-channel-BQ8SMmLM.js +2 -0
- package/dist/device-channel-CmrDyl1C.mjs +2 -0
- package/dist/devices.operations-BJG7PBgi.js +2 -0
- package/dist/devices.operations-D4vKQtuv.mjs +2 -0
- package/dist/dictation.operations-BqbZnhBo.mjs +2 -0
- package/dist/dictation.operations-D0JxX5Ut.js +2 -0
- package/dist/documents-BrgkFEjS.mjs +2 -0
- package/dist/documents-KBlpK-vw.js +2 -0
- package/dist/documents.operations-BOstEBEu.mjs +2 -0
- package/dist/documents.operations-eY2Z-5Ss.js +2 -0
- package/dist/email-classification-DEHTSbVv.js +2 -0
- package/dist/email-classification-Jk8hARsL.mjs +2 -0
- package/dist/email-classification.operations-BBmw-sma.mjs +2 -0
- package/dist/email-classification.operations-C0nSe3CD.js +2 -0
- package/dist/email-classification.schema-B2RE9-Sz.js +2 -0
- package/dist/email-classification.schema-CzlbP3hF.mjs +2 -0
- package/dist/emails-COHIot9L.mjs +2 -0
- package/dist/emails-scn5zKZZ.js +2 -0
- package/dist/emails.operations-Bqd4AR-o.mjs +2 -0
- package/dist/emails.operations-nOPoU4qW.js +2 -0
- package/dist/embeddings-admin.operations-Cf12v9Y6.mjs +2 -0
- package/dist/embeddings-admin.operations-DN0wBZuY.js +2 -0
- package/dist/env-vars-C6h8XxDu.js +2 -0
- package/dist/env-vars-jepH5HKe.mjs +2 -0
- package/dist/env-vars.operations-CtwkPw4o.mjs +2 -0
- package/dist/env-vars.operations-DxgfKwIg.js +2 -0
- package/dist/environment-output.schema-BI9aKP85.js +2 -0
- package/dist/environment-output.schema-BLWKrRV9.mjs +2 -0
- package/dist/environments-Cjl7Rn63.js +2 -0
- package/dist/environments-NJ6AU6QA.mjs +2 -0
- package/dist/environments.operations-DOC5sPZj.js +2 -0
- package/dist/environments.operations-sRFx_6kV.mjs +2 -0
- package/dist/{exceptions-CxTJ-9hJ.d.ts → exceptions-Csd70p_-.d.ts} +9 -0
- package/dist/{exceptions-BjtmXIip.d.mts → exceptions-gxRQUb2w.d.mts} +9 -0
- package/dist/exceptions.d.mts +1 -1
- package/dist/exceptions.d.ts +1 -1
- package/dist/exceptions.js +1 -1
- package/dist/exceptions.mjs +1 -1
- package/dist/files-BX-FFR4x.js +2 -0
- package/dist/files-sTU3trJX.mjs +2 -0
- package/dist/files.operations-ByEQ45rC.mjs +2 -0
- package/dist/files.operations-DvsUX624.js +2 -0
- package/dist/folders.operations-DjhIHfPy.mjs +2 -0
- package/dist/folders.operations-Dn9m5HgA.js +2 -0
- package/dist/forms.operations-DTe1LrLl.js +2 -0
- package/dist/forms.operations-HHnD9fWG.mjs +2 -0
- package/dist/geocoding.operations-C_22EAvv.mjs +2 -0
- package/dist/geocoding.operations-DI5T-bXQ.js +2 -0
- package/dist/human-request-BuTNChfy.js +2 -0
- package/dist/human-request-D386w0xS.mjs +2 -0
- package/dist/image-generation-JBLnNqb4.js +2 -0
- package/dist/image-generation-RBIQzj-e.mjs +2 -0
- package/dist/{index-BoesrnBX.d.ts → index-O2gvfWg3.d.ts} +250 -545
- package/dist/index.d.mts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.js +2 -2
- package/dist/index.mjs +2 -2
- package/dist/input--LxhjMnL.js +2 -0
- package/dist/input-De22VS-9.mjs +2 -0
- package/dist/input-g4tO6Jkf.d.ts +82 -0
- package/dist/limits-C23L0g-a.js +2 -0
- package/dist/limits-DVUX5n4b.mjs +2 -0
- package/dist/linked-records-BjT-7LOU.mjs +2 -0
- package/dist/linked-records-CzzwaP1w.js +2 -0
- package/dist/logos.operations-Cof7YcyL.js +2 -0
- package/dist/logos.operations-DMp3Fv_i.mjs +2 -0
- package/dist/machines-BgWsvhyM.js +2 -0
- package/dist/machines-BwCQPG_y.mjs +2 -0
- package/dist/machines.operations-DuXeEb9-.js +2 -0
- package/dist/machines.operations-L17tNtr7.mjs +2 -0
- package/dist/mail-drafts.operations-BKMuIsFk.js +2 -0
- package/dist/mail-drafts.operations-CM-7tBgp.mjs +2 -0
- package/dist/mail-signatures.operations-maphvktU.js +2 -0
- package/dist/mail-signatures.operations-u61NViKI.mjs +2 -0
- package/dist/mcp-output.schema-B4xXiOjp.mjs +2 -0
- package/dist/mcp-output.schema-DWfW_GXR.js +2 -0
- package/dist/mcp-servers.operations-BBrpVqtv.mjs +2 -0
- package/dist/mcp-servers.operations-DKv3os6D.js +2 -0
- package/dist/meetings-C3LSWdAv.js +2 -0
- package/dist/meetings-ZzFZppmw.mjs +2 -0
- package/dist/meetings-admin.operations-CqOdAuEY.js +2 -0
- package/dist/meetings-admin.operations-DlBEkQ3A.mjs +2 -0
- package/dist/meetings.operations-CEodnE61.js +2 -0
- package/dist/meetings.operations-C_S4qoij.mjs +2 -0
- package/dist/models.operations-B-KLcOff.mjs +2 -0
- package/dist/models.operations-D1mh86qV.js +2 -0
- package/dist/move-impact.schema-CIhGrFEu.mjs +2 -0
- package/dist/move-impact.schema-Ur5k3_PI.js +2 -0
- package/dist/my-preferences-CtaRodws.js +2 -0
- package/dist/my-preferences-DLy4chuc.mjs +2 -0
- package/dist/news-feed.schema-BXcS3qnp.js +2 -0
- package/dist/news-feed.schema-uNDJX8lC.mjs +2 -0
- package/dist/news.operations-Ct__1yeE.js +2 -0
- package/dist/news.operations-bv6Xi29p.mjs +2 -0
- package/dist/oauth.operations-BkKp9Hys.js +2 -0
- package/dist/oauth.operations-Dwz0dPe0.mjs +2 -0
- package/dist/objects-DjZy05b7.js +2 -0
- package/dist/objects-LC_PpZf5.mjs +2 -0
- package/dist/operation-Ljhj0S-y.mjs +2 -0
- package/dist/operation-b0CY8USr.js +2 -0
- package/dist/output-CcagLVwl.js +2 -0
- package/dist/output-D0Gkm-0Z.mjs +2 -0
- package/dist/page-query-B8Evn_OX.mjs +2 -0
- package/dist/page-query-BIn1m1Dx.js +2 -0
- package/dist/pages-C1vZaC93.mjs +2 -0
- package/dist/pages-DQEuRvk2.js +2 -0
- package/dist/pages.operations-CWBsE2KN.js +2 -0
- package/dist/pages.operations-DE4h2piU.mjs +2 -0
- package/dist/pagination-B06cCddv.mjs +2 -0
- package/dist/pagination-CheieRD0.js +2 -0
- package/dist/path-Ch_NPREA.d.mts +81 -0
- package/dist/permission-catalog-7nqArygr.js +2 -0
- package/dist/permission-catalog-DVCRvATl.mjs +2 -0
- package/dist/permissions-BsNNXXmY.js +2 -0
- package/dist/permissions-CGYTdS2h.mjs +2 -0
- package/dist/permissions.operations-BpGpRcI5.js +2 -0
- package/dist/permissions.operations-CUOPZGr_.mjs +2 -0
- package/dist/plain-record-BnKWrGQv.js +2 -0
- package/dist/plain-record-is3DxPBL.mjs +2 -0
- package/dist/primitives-BlZoUw54.mjs +2 -0
- package/dist/primitives-x0WE42fG.js +2 -0
- package/dist/{record-query-BMeq7JRi.d.mts → proposal-types-BnAD5nxA.d.mts} +10084 -10379
- package/dist/proposal-types-Buln0mbM.js +2 -0
- package/dist/proposal-types-ncv1cymr.mjs +2 -0
- package/dist/query-integers-CZDEkFmm.mjs +2 -0
- package/dist/query-integers-EVkedFO4.js +2 -0
- package/dist/quota-CremykHV.mjs +2 -0
- package/dist/quota-lbHfQAU7.js +2 -0
- package/dist/quotas.operations-CDn6mxGZ.js +2 -0
- package/dist/quotas.operations-DuUMhQct.mjs +2 -0
- package/dist/recent-activity-CDUZCvvx.mjs +2 -0
- package/dist/recent-activity-CTn3aJC5.js +2 -0
- package/dist/recent-activity.operations-C8HN3T2E.mjs +2 -0
- package/dist/recent-activity.operations-Cv7zUBG5.js +2 -0
- package/dist/record-memory.operations-D8K9_bDh.js +2 -0
- package/dist/record-memory.operations-DNRWqANQ.mjs +2 -0
- package/dist/record-operation-CD04q2YF.mjs +2 -0
- package/dist/record-operation-CHR8fOWv.js +2 -0
- package/dist/record-operations.operations-2fObhHf5.mjs +2 -0
- package/dist/record-operations.operations-iGcbXsAX.js +2 -0
- package/dist/record-output.schema-7M4ZhtFF.mjs +2 -0
- package/dist/record-output.schema-B-LsiXui.js +2 -0
- package/dist/records.operations-DesIdHKN.js +2 -0
- package/dist/records.operations-XplmsQb5.mjs +2 -0
- package/dist/relation-output.schema-CMfZ80ZC.js +2 -0
- package/dist/relation-output.schema-DnC1Swai.mjs +2 -0
- package/dist/relations.operations-C8OKmNI3.mjs +2 -0
- package/dist/relations.operations-TbsHto3V.js +2 -0
- package/dist/rolldown-runtime-BXZUx0GO.js +2 -0
- package/dist/schema-draft.operations-BrhXpB88.js +2 -0
- package/dist/schema-draft.operations-DO2aPqiB.mjs +2 -0
- package/dist/schema-groups.operations-BKGvDU0g.mjs +2 -0
- package/dist/schema-groups.operations-CQJVh2ul.js +2 -0
- package/dist/schema-objects.operations-BIm7_OUC.js +2 -0
- package/dist/schema-objects.operations-CKZquSV-.mjs +2 -0
- package/dist/schema-output.schema-DToLL5Hj.mjs +2 -0
- package/dist/schema-output.schema-yXth-j90.js +2 -0
- package/dist/schema-state.operations-YgW67wKw.mjs +2 -0
- package/dist/schema-state.operations-_rWxCFRF.js +2 -0
- package/dist/screens.operations-C2PmD9Jo.mjs +2 -0
- package/dist/screens.operations-CMCDeLu5.js +2 -0
- package/dist/search-admin.operations-BuNlL2_R.js +2 -0
- package/dist/search-admin.operations-MaUHp0Ws.mjs +2 -0
- package/dist/search-output.schema-BGEo1jc3.mjs +2 -0
- package/dist/search-output.schema-BOnf-I4-.js +2 -0
- package/dist/search.operations-BU2vkMiM.mjs +2 -0
- package/dist/search.operations-CV4h80dL.js +2 -0
- package/dist/skills.operations-B89X73C5.mjs +2 -0
- package/dist/skills.operations-CI7WSfj8.js +2 -0
- package/dist/string-rules-BGEVHs7B.js +2 -0
- package/dist/string-rules-Oo22T_2_.mjs +2 -0
- package/dist/submission-DQQndGsT.mjs +2 -0
- package/dist/submission-Y4L17hji.js +2 -0
- package/dist/system-attributes-4e6FXKws.js +2 -0
- package/dist/system-attributes-vbOzw6KO.mjs +2 -0
- package/dist/tenant-invitations-C8eRu6F1.mjs +2 -0
- package/dist/tenant-invitations-DMnJYl5A.js +2 -0
- package/dist/tenant-invitations.operations-CoENfK1m.mjs +2 -0
- package/dist/tenant-invitations.operations-DVzd6sH6.js +2 -0
- package/dist/tenant-settings-DibR3Pj9.mjs +2 -0
- package/dist/tenant-settings-H8PuqeVJ.js +2 -0
- package/dist/tenant-settings.operations-BlOjAUBb.mjs +2 -0
- package/dist/tenant-settings.operations-D1tiAc5T.js +2 -0
- package/dist/tool-group-catalog-DcmK8-aP.mjs +2 -0
- package/dist/tool-group-catalog-VfPutaoA.js +2 -0
- package/dist/types-BaRAoumN.mjs +2 -0
- package/dist/types-Bbd8SJk_.mjs +2 -0
- package/dist/types-DLY2ZL0J.js +2 -0
- package/dist/types-HyrREoFh.js +2 -0
- package/dist/unchecked-C4sB97e1.js +2 -0
- package/dist/unchecked-DAFXyX5y.mjs +2 -0
- package/dist/user-profiles-CJHB2U55.js +2 -0
- package/dist/user-profiles-Dh5QFnXc.mjs +2 -0
- package/dist/users.operations-Bdz9bPn7.js +2 -0
- package/dist/users.operations-BhIIB4IN.mjs +2 -0
- package/dist/{utils-DPto28bh.d.mts → utils-BHf9KKOr.d.mts} +1 -1
- package/dist/{utils-BdmqhdNL.d.ts → utils-_R0m2ygt.d.ts} +1 -1
- package/dist/utils.d.mts +1 -1
- package/dist/utils.d.ts +1 -1
- package/dist/uuid-param-BuV4RQRp.mjs +2 -0
- package/dist/uuid-param-Djtff5Vy.js +2 -0
- package/dist/validation/all.d.mts +2 -2
- package/dist/validation/all.d.ts +2 -2
- package/dist/validation/all.js +1 -1
- package/dist/validation/all.mjs +1 -1
- package/dist/view-config.schema-BimOzKR_.js +2 -0
- package/dist/view-config.schema-DstNUMiD.mjs +2 -0
- package/dist/views.operations-B23oCL5P.js +2 -0
- package/dist/views.operations-B38jfGlX.mjs +2 -0
- package/dist/wire-types-B5ixUf2P.d.mts +11 -0
- package/dist/wire-types-btvuxrFk.d.ts +11 -0
- package/openapi.json +1292 -1839
- package/package.json +22 -2
- package/dist/all-2xry8t7d.js +0 -4
- package/dist/all-BWpaP2E2.mjs +0 -4
- package/dist/attribute-validators-CFa9B00S.mjs +0 -11
- package/dist/attribute-validators-Djse5LWc.js +0 -11
- package/dist/record-operation-BBOde9mE.mjs +0 -2
- package/dist/record-operation-BLhz84I4.js +0 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@standards/schema",
|
|
3
|
-
"version": "1.0.0-alpha.
|
|
3
|
+
"version": "1.0.0-alpha.447",
|
|
4
4
|
"description": "Standard schema definitions and utilities",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.mjs",
|
|
@@ -71,6 +71,26 @@
|
|
|
71
71
|
"types": "./dist/validation/all.d.ts",
|
|
72
72
|
"default": "./dist/validation/all.js"
|
|
73
73
|
}
|
|
74
|
+
},
|
|
75
|
+
"./api/wire": {
|
|
76
|
+
"import": {
|
|
77
|
+
"types": "./dist/api/wire.d.mts",
|
|
78
|
+
"default": "./dist/api/wire.mjs"
|
|
79
|
+
},
|
|
80
|
+
"require": {
|
|
81
|
+
"types": "./dist/api/wire.d.ts",
|
|
82
|
+
"default": "./dist/api/wire.js"
|
|
83
|
+
}
|
|
84
|
+
},
|
|
85
|
+
"./api/http": {
|
|
86
|
+
"import": {
|
|
87
|
+
"types": "./dist/api/http.d.mts",
|
|
88
|
+
"default": "./dist/api/http.mjs"
|
|
89
|
+
},
|
|
90
|
+
"require": {
|
|
91
|
+
"types": "./dist/api/http.d.ts",
|
|
92
|
+
"default": "./dist/api/http.js"
|
|
93
|
+
}
|
|
74
94
|
}
|
|
75
95
|
},
|
|
76
96
|
"files": [
|
|
@@ -80,7 +100,7 @@
|
|
|
80
100
|
"README.md"
|
|
81
101
|
],
|
|
82
102
|
"dependencies": {
|
|
83
|
-
"@standards/constants": "1.0.0-alpha.
|
|
103
|
+
"@standards/constants": "1.0.0-alpha.447",
|
|
84
104
|
"@standard-schema/spec": "^1.1.0",
|
|
85
105
|
"libphonenumber-js": "^1.12.31",
|
|
86
106
|
"zod": "^4.6.6"
|
package/dist/all-2xry8t7d.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
/*! © 2025-2026 AND YOU CREATE SAS (RCS Paris 940 190 614). Proprietary — see LICENSE (Standards SDK License 1.0). */
|
|
2
|
-
require("./zod-locale.js");const e=require("./attribute-validators-Djse5LWc.js"),t=require("./exceptions.js");let n=require("zod");n=e.__toESM(n);let r=require("@standards/constants"),i=require("libphonenumber-js");const a=[`text`,`number`,`boolean`,`date`,`select`,`multiselect`],o={email:`^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$`,url:`^https?:\\/\\/[\\w\\-]+(\\.[\\w\\-]+)+[/#?]?.*$`,slug:`^[a-z0-9]+(?:-[a-z0-9]+)*$`};function resolveTextPattern(e){return e.pattern?e.pattern:e.format?o[e.format]:void 0}const s={required:e=>`${e.label} is required`,invalidType:(e,t)=>`${e.label} must be a ${t}`,minLength:(e,t)=>`${e.label} must be at least ${t} characters`,maxLength:(e,t)=>`${e.label} must be at most ${t} characters`,invalidPattern:e=>`${e.label} format is invalid`,minValue:(e,t)=>`${e.label} must be at least ${t}`,maxValue:(e,t)=>`${e.label} must be at most ${t}`,mustBeInteger:e=>`${e.label} must be an integer`,invalidDate:e=>`${e.label} must be a valid date`,invalidOption:(e,t)=>`${e.label} must be one of: ${t.join(`, `)}`,invalidId:e=>`${e.label} must be a valid ID`,maxItems:(e,t)=>`${e.label} must have at most ${t} item${t>1?`s`:``}`,invalidRichtext:e=>`${e.label} must be valid rich text content`,invalidPhone:e=>`${e.label} must be a valid phone number`,invalidCurrency:e=>`${e.label} must be a valid currency value`,invalidLocation:e=>`${e.label} must be a valid location`};function formatZodErrors(e){return e.issues.map(e=>({path:e.path.map(String),message:e.message}))}var LRUCache=class{constructor(e){if(!Number.isInteger(e)||e<=0)throw Error(`LRU cache capacity must be greater than 0`);this.capacity=e,this.cache=/* @__PURE__ */ new Map}get(e){if(!this.cache.has(e))return;let t=this.cache.get(e);return this.cache.delete(e),this.cache.set(e,t),t}set(e,t){if(this.cache.has(e))this.cache.delete(e);else if(this.cache.size>=this.capacity){let e=this.cache.keys().next();e.done||this.cache.delete(e.value)}this.cache.set(e,t)}has(e){return this.cache.has(e)}clear(){this.cache.clear()}get size(){return this.cache.size}};function createRegexCache(e=100){return new LRUCache(e)}function getCachedRegex(e,t){let n=e.get(t);return n||(n=new RegExp(t),e.set(t,n)),n}const c=createRegexCache();function createTextValidator(e,t=s){let r=n.string();e.minLength!==void 0&&(r=r.min(e.minLength,t.minLength(e,e.minLength))),e.maxLength!==void 0&&(r=r.max(e.maxLength,t.maxLength(e,e.maxLength)));let i=resolveTextPattern(e);return i&&(r=r.regex(getCachedRegex(c,i),t.invalidPattern(e))),r}function createNumberValidator(e,t=s){let r=n.number();return e.min!==void 0&&(r=r.min(e.min,t.minValue(e,e.min))),e.max!==void 0&&(r=r.max(e.max,t.maxValue(e,e.max))),e.renderAs===`rating`&&(r=r.min(e.min??0),r=r.max(e.max??5)),e.unit===`percentage`&&(r=r.min(e.min??0).max(e.max??100)),e.unit===`integer`&&(r=r.int(t.mustBeInteger(e))),r}function createCheckboxValidator(e,t=s){return n.boolean()}function resolveBound(e){if(!e)return null;let t=e===`today`?(/* @__PURE__ */ new Date()).toISOString().slice(0,10):e,n=new Date(t);return Number.isNaN(n.getTime())?null:n}function floorToPrecision(e,t){return e?t===`month`?new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),1)):t===`year`?new Date(Date.UTC(e.getUTCFullYear(),0,1)):e:null}function createDateValidator(e,t=s){let r=t.invalidDate(e),i=floorToPrecision(resolveBound(e.minDate),e.precision),a=resolveBound(e.maxDate),o=n.any().superRefine((e,t)=>{let n=new Date(e);Number.isNaN(n.getTime())?t.addIssue({code:`custom`,message:r}):(i&&n<i&&t.addIssue({code:`custom`,message:r}),a&&n>a&&t.addIssue({code:`custom`,message:r}))});if(!e.endDate)return o;let c=n.object({start:o,end:o.nullable()}).superRefine((e,t)=>{if(e.end===null)return;let n=new Date(e.start),i=new Date(e.end);!(Number.isNaN(n.getTime())||Number.isNaN(i.getTime()))&&i<n&&t.addIssue({code:`custom`,message:r,path:[`end`]})});return n.preprocess(e=>typeof e==`string`?{start:e,end:null}:e,c)}function isNullishOrEmptyString(e){return e==null||e===``}function isValuePresent(e){return e==null?!1:typeof e==`string`?e.trim()!==``:!Array.isArray(e)||e.length>0}const l={phone:[`countryCode`]};function isEmptyValue(e,t=[]){return e==null||typeof e==`string`&&e.trim()===``?!0:e instanceof Date?!1:typeof e==`object`&&!Array.isArray(e)&&Object.entries(e).filter(([e])=>!t.includes(e)).every(([,e])=>e==null||typeof e==`string`&&e.trim()===``)}function withEmptyToNull(e,t){return n.preprocess(e=>isEmptyValue(e,t)?null:e,e.nullish())}const u=n.object({placeholder:n.string().optional(),description:n.string().optional(),defaultValue:n.unknown().optional(),icon:n.string().optional(),order:n.number().int().optional(),hidden:n.boolean().optional(),archived:n.boolean().optional(),deprecated:n.boolean().optional(),metadata:n.record(n.string(),n.unknown()).optional()}),d=[`placeholder`,`description`,`defaultValue`,`icon`,`order`,`hidden`,`archived`,`deprecated`,`metadata`],f={icon:e.iconNameSchema.optional().describe(`Field icon from search_icons`)},p={date:[`precision`],user:[`notifiesOnAssign`,`actors`]};function wireOmittedConfigKeysFor(e){return[...d,...p[e]??[]]}function wireHiddenTypeConfigMask(e){return Object.fromEntries((p[e]??[]).map(e=>[e,!0]))}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 m=n.object({value:n.string().min(1).describe(`Stored value`),label:n.string().min(1).describe(`Label people see`),description:n.string().describe(`Extra context`).optional(),inverse:n.string().describe(`Paired option's value (symmetric)`).optional(),archived:n.boolean().describe(`Hides without deleting`).optional()}),h=n.enum([`idle`,`in_progress`,`finished`]).describe(`Workflow stage`),g=m.extend({color:e.colorIdSchema}).strict(),_=m.extend({color:e.colorIdSchema,group:h}).strict(),v=m.extend({color:n.string().optional().describe(`A color id`),group:h.optional()}).strict(),y=new Set(v.keyof().options),ee=[`options`,`targetAttributeOptions`];function withoutUnknownOptionKeys(t){let n=t;for(let r of ee){let i=t[r];if(!Array.isArray(i))continue;let a=!1,o=i.map(t=>!e.isPlainRecord(t)||Object.keys(t).every(e=>y.has(e))?t:(a=!0,Object.fromEntries(Object.entries(t).filter(([e])=>y.has(e)))));a&&(n={...n,[r]:o})}let r=t.properties;if(e.isPlainRecord(r)&&Array.isArray(r.definitions)){let t=r.definitions,i=t.map(t=>e.isPlainRecord(t)?withoutUnknownOptionKeys(t):t);i.some((e,n)=>e!==t[n])&&(n={...n,properties:{...r,definitions:i}})}return n}const b=n.array(v).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(t){return n.array(t).min(1).max(e.SCHEMA_LIMITS.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 x=writeOptionsArraySchema(g),S=writeOptionsArraySchema(g),C=writeOptionsArraySchema(_),w=n.object({object:n.string().min(1).describe(`Target object`),displayTemplate:n.string().optional().describe(`Linked record label template`),filter:n.record(n.string(),n.unknown()).optional().describe(`Restricts linkable records`)}),te=n.object({object:n.string().min(1).describe(`Other side's object`),attribute:n.string().min(1).describe(`Other side's attribute`),cardinality:n.enum([`one`,`many`]).optional().describe(`Other side's cardinality`),label:n.string().min(1).optional().describe(`Other side's label`),storageOwner:n.boolean().optional().describe(`Owns the join storage`)}),T=n.object({objectName:n.string().min(1).describe(`API name of the object whose options are mirrored`),attributeName:n.string().min(1).describe(`API name of the select/status attribute to mirror options from`),attributeId:n.string().optional().describe(`Id of the source attribute, resolved by the server`)}),E=u.extend({multiline:n.boolean().describe(`Renders as a multi-line textarea`).optional(),minLength:n.number().int().min(0).describe(`Minimum character count`).optional(),maxLength:n.number().int().min(1).describe(`Maximum character count`).optional(),pattern:n.string().describe(`Regular expression the value must match`).optional(),format:n.enum([`email`,`url`,`slug`]).describe(`Validates and renders as this format`).optional()}),ne=u,D=u.extend({renderAs:n.enum([`number`,`rating`]).describe(`Plain number or a star rating`).optional(),min:n.number().describe(`Minimum allowed value`).optional(),max:n.number().describe(`Maximum allowed value`).optional(),unit:n.enum([`integer`,`decimal`,`percentage`]).describe(`How the value is stored and rendered`).optional(),decimals:n.number().int().min(0).max(10).describe(`Decimal places shown`).optional()}),O=u,k=u.extend({dateFormat:n.enum([`short`,`long`,`full`,`relative`]).describe(`How the date is rendered`).optional(),precision:n.enum([`day`,`month`,`year`]).describe(`Whether the value records a day, a month or a year`).optional(),minDate:n.string().describe(`Earliest allowed date (ISO)`).optional(),maxDate:n.string().describe(`Latest allowed date (ISO)`).optional(),includeTime:n.boolean().describe(`Also captures a time of day`).optional(),endDate:n.boolean().describe(`Paired with another date attribute as a range's end`).optional(),timeFormat:n.enum([`12h`,`24h`]).describe(`Clock format when a time is included`).optional()}),A=u.extend({defaultCountryCode:n.string().length(3).describe(`ISO country code preselected in the dialer`).optional()}),j=u.extend({defaultCurrency:n.string().length(3).describe(`ISO currency code preselected for new values`).optional(),allowedCurrencies:n.array(n.string().length(3)).describe(`ISO currency codes a value may use; any currency when omitted`).optional(),allowNegative:n.boolean().describe(`Whether a negative amount is accepted`).optional()}),M=u.extend({options:b.describe(`The workflow statuses, in order`)}),N=u.extend({granularity:n.enum([`full`,`address`,`city`,`state`,`country`,`coordinates`]).describe(`How precise a location must be captured`).optional(),defaultCountry:n.string().length(3).describe(`ISO country code preselected for new values`).optional(),allowedCountries:n.array(n.string().length(3)).describe(`ISO country codes a value may use; any country when omitted`).optional()}),P=u.extend({options:b.describe(`Options`),renderAs:n.literal(`badges`).optional().describe(`Renders the chosen option as a colored badge`)}),F=u.extend({options:b.describe(`Options`),renderAs:n.literal(`badges`).optional().describe(`Renders the chosen options as colored badges`)}),I=u.extend({types:n.array(n.enum([`user`,`agent`])).min(1).optional().describe(`Which kinds of actor can be picked; both when omitted`),multiple:n.boolean().optional().describe(`Whether more than one actor can be picked`),notifiesOnAssign:n.boolean().optional().describe(`Whether each person added to the value is notified`),actors:n.boolean().optional().describe(`Whether the value holds actor ids, named by each actor's current name`)}),L={name:e.ATTRIBUTE_NAME_SCHEMA.describe(`Property API name`),label:n.string().min(1).describe(`Label people see`),required:n.boolean().describe(`Required on every edge`).optional()},R={id:n.string().optional(),objectId:n.string().optional(),system:n.boolean().optional(),unique:n.boolean().optional()},z=Object.fromEntries(d.map(e=>[e,!0])),B=[`text`,`number`,`checkbox`,`date`,`phone`,`currency`,`location`],V=[...B,`select`,`multiselect`,`status`],H={text:E,number:D,checkbox:O,date:k,phone:A,currency:j,location:N,select:P,multiselect:F,status:M},re={...H,select:P.extend({options:x.describe(`Options`)}),multiselect:F.extend({options:S.describe(`Options`)}),status:M.extend({options:C.describe(`Statuses`)})},propertyWireConfigShapeFor=e=>re[e].omit(z).omit(wireHiddenTypeConfigMask(e)).shape,storedPropertyMember=e=>n.object({...L,...R,type:n.literal(e).describe(`Property type`),...H[e].shape}).strip(),U=n.discriminatedUnion(`type`,V.map(storedPropertyMember)),W=n.object({definitions:n.array(U).min(1).max(e.SCHEMA_LIMITS.optionsPerAttribute).describe(`Edge properties`)}).strip().describe(`Properties carried by the edge itself (role, share, since…), never a third object`),G=refuseForeignKeys(Object.fromEntries(V.map(e=>[e,new Set(Object.keys(propertyWireConfigShapeFor(e)))])),`property key`,[...Object.keys(L),`type`]);function refuseForeignPropertyKeys(e,t){G(e.type,e,t)}const K=B.reduce((e,t)=>(Object.assign(e,propertyWireConfigShapeFor(t)),e),{}),optionPropertyWireMember=e=>n.object({...L,type:e.length===1?n.literal(e[0]).describe(`Property type`):n.enum(e).describe(`Property type`),...propertyWireConfigShapeFor(e[0])}).strict(),q=n.discriminatedUnion(`type`,[optionPropertyWireMember([`select`,`multiselect`]),optionPropertyWireMember([`status`]),n.object({...L,type:n.enum(B).describe(`Property type`),...K}).strict().superRefine(refuseForeignPropertyKeys)]),J=n.object({definitions:n.array(q).min(1).max(e.SCHEMA_LIMITS.optionsPerAttribute).describe(`Edge properties`)}).strict().describe(`Properties carried by the edge itself (role, share, since…), never a third object`),Y=u.extend({targets:n.array(w).min(1).describe(`Target object(s)`),cardinality:n.enum([`one`,`many`]).describe(`one or many`),maxItems:n.number().int().min(1).optional().describe(`Max linked records`),bilateral:te.optional().describe(`Syncs the other side's attribute`),properties:W.optional()}),ie=u.extend({expression:n.string().min(1).describe(`The formula expression, compiled against this object's attributes`),returnType:n.enum(a).describe(`The formula's result type`),decimals:n.number().int().min(0).max(10).optional().describe(`Decimal places shown for a number result`),currencyCode:n.string().length(3).optional().describe(`ISO 4217 code a number result renders with; presentation only`),allowRelations:n.boolean().optional().describe(`Whether the expression may read across a relation`),optionsSource:T.optional().describe(`Mirrors an option set`)}),ae=u.extend({relationAttribute:n.string().min(1).optional().describe(`API name of the relation this rollup aggregates through`),relationPath:n.string().optional().describe(`Not supported yet — single-hop only`),targetAttribute:n.string().min(1).optional().describe(`API name of the attribute aggregated on the relation's target object; not read by count`),function:n.enum([`sum`,`avg`,`earliest`,`latest`,`count`,`countValues`,`countUniqueValues`,`countEmpty`,`percentEmpty`,`percentNotEmpty`,`original`]).describe(`The aggregation applied across the linked records`),decimals:n.number().int().min(0).max(10).optional().describe(`Decimal places shown for a numeric result`),targetAttributeType:n.string().optional().describe(`Server-set`),targetAttributeOptions:n.array(v).optional().describe(`Server-set`),targetCurrencyCode:n.string().length(3).optional().describe(`Server-set`),optionsSource:T.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`}}function datePrecisionIssues(t,n,r=[]){let i=[],a=n.precision;if(t===`date`&&a!==void 0&&a!==`day`)for(let e of[`includeTime`,`endDate`])n[e]===!0&&i.push({path:[...r,`precision`],message:`A "${String(a)}" precision cannot be combined with ${e}`});let o=n.properties;return e.isPlainRecord(o)&&Array.isArray(o.definitions)&&o.definitions.forEach((t,n)=>{e.isPlainRecord(t)&&i.push(...datePrecisionIssues(String(t.type),t,[...r,`properties`,`definitions`,n]))}),i}const X={text:E,richtext:ne,number:D,checkbox:O,date:k,phone:A,currency:j,status:M,location:N,select:P,multiselect:F,user:I,relation:Y,formula:ie,rollup:ae,document:u.extend({properties:W.optional(),accepts:n.array(n.string().min(1)).optional().describe("MIME prefixes or globs a file must match (e.g. `image/*`, `*.pdf`)"),maxFileSize:n.number().int().min(1).optional().describe(`Maximum file size in bytes`)})};function getAttributeConfigSchema(e){let n=X[e];if(!n)throw new t.ValidationError(`Unsupported attribute type: ${e}`,[]);return n}function parseAttributeConfig(e,t){assertDescriptionWithinCap(t);let n=getAttributeConfigSchema(e).strip().parse(t),r=rollupTargetIssue(e,n);if(r)throw validationErrorFromIssues([r]);return n}function getAttributeConfigWriteSchema(t){let n=getAttributeConfigSchema(t).extend({icon:e.iconNameSchema.optional()});switch(t){case`select`:return n.extend({options:x.describe(`Options`)});case`multiselect`:return n.extend({options:S.describe(`Options`)});case`status`:return n.extend({options:C.describe(`Statuses`)});default:return n}}function validationErrorFromIssues(e){return t.ValidationError.fromZodErrors(e.map(e=>({path:e.path.map(e=>typeof e==`symbol`?String(e):e),message:e.message})))}const Z=`Description is too long (max ${e.SCHEMA_LIMITS.attributeDescriptionLength} characters)`;function assertDescriptionWithinCap(t){let n=e.isPlainRecord(t)?t.description:void 0;if(typeof n==`string`&&e.characterCount(n)>e.SCHEMA_LIMITS.attributeDescriptionLength)throw validationErrorFromIssues([{path:[`description`],message:Z}])}function parseWriteSchema(e,t){assertDescriptionWithinCap(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]);let i=datePrecisionIssues(e,n.data);if(i.length>0)throw validationErrorFromIssues(i);return n.data}function parseAttributeConfigForCreate(e,t){return parseWriteSchema(e,t)}function validatePatchedIcon(n){if(!Object.prototype.hasOwnProperty.call(n,`icon`))return;let r=e.iconNameSchema.optional().safeParse(n.icon);if(!r.success)throw t.ValidationError.fromZodErrors(r.error.issues.map(e=>({path:[`icon`,...e.path.map(e=>typeof e==`symbol`?String(e):e)],message:e.message})))}function parseAttributeConfigForUpdate(t,n){let r=Object.prototype.hasOwnProperty.call(n,`options`),i=Object.prototype.hasOwnProperty.call(n,`icon`),a={...t,...n};if(validatePatchedIcon(n),assertDescriptionWithinCap(a),r){let{icon:e,...n}=a,r=parseWriteSchema(t.type,i?a:n);return!i&&e!==void 0&&(r.icon=e),r}let o=t.options;e.isValueKindType(t.type,`options`)&&(a.options=[{value:`__legacy__`,label:`__legacy__`}]);let s=getAttributeConfigSchema(t.type).strip().safeParse(a);if(!s.success)throw validationErrorFromIssues(s.error.issues);let c=s.data,l=datePrecisionIssues(t.type,c);if(l.length>0)throw validationErrorFromIssues(l);return e.isValueKindType(t.type,`options`)&&(c.options=o),c}function createCurrencyValidator(e,t=s){let r=e.allowNegative?n.number():n.number().min(0);return n.object({code:n.string().length(3),value:r},{message:t.invalidCurrency(e)})}function createLocationValidator(e,t=s){return n.object({address:n.string().optional(),address2:n.string().optional(),city:n.string().optional(),state:n.string().optional(),postalCode:n.string().optional(),country:n.string().length(3).optional(),latitude:n.number().min(-90).max(90).optional(),longitude:n.number().min(-180).max(180).optional()},{message:t.invalidLocation(e)})}function digitsOnly(e){return e.replace(/\D/g,``)}function normalizeCountrylessPhoneNumber(e){return digitsOnly(e)}function getIso2(e){return(0,r.getCountryByIso3)(e)?.iso2}function normalizePhoneNumber(e,t){if(!e)return``;let n=getIso2(t);if(!n)return digitsOnly(e);let a=(0,i.parsePhoneNumberFromString)(e,n);if(a)return absorbDoubledCallingCode(a.nationalNumber,a.isValid(),t,n);let o=(0,r.getCountryByIso3)(t),s=digitsOnly(e);if(o){let e=o.phoneCode.replace(`+`,``),t=s.startsWith(e)?s.slice(e.length):s;return(0,r.stripTrunkPrefix)(t,o.phoneTrunkPrefix??``)}return s}function absorbDoubledCallingCode(e,t,n,a){if(t)return e;let o=(0,r.getCountryByIso3)(n)?.phoneCode.replace(`+`,``);if(o===void 0||!e.startsWith(o))return e;let s=e.slice(o.length),c=(0,i.parsePhoneNumberFromString)(`+${o}${s}`,a);return c?.isValid()?c.nationalNumber:e}function formatPhoneForDisplay(e){if(!e.phoneNumber)return``;let t=getIso2(e.countryCode),n=(0,r.getCountryByIso3)(e.countryCode)?.phoneCode??``;if(!t)return`${n} ${e.phoneNumber}`.trim();let a=`${n}${digitsOnly(e.phoneNumber)}`,o=(0,i.parsePhoneNumberFromString)(a);return o?o.formatInternational():`${n} ${e.phoneNumber}`.trim()}function createPhoneValidator(e,t=s){return n.object({countryCode:n.string().length(3),phoneNumber:n.string().min(1,{message:t.required(e)})},{message:t.invalidPhone(e)}).refine(e=>(0,r.isValidIso3)(e.countryCode),{message:`Invalid country code`}).transform(e=>({countryCode:e.countryCode,phoneNumber:normalizePhoneNumber(e.phoneNumber,e.countryCode)}))}function extractRelationId(e){return typeof e==`object`&&e&&`id`in e?e.id:e}function createSingleRelationValidator(e,t=s){let r=n.guid({message:t.invalidId(e)}),i=n.union([r,n.null()]);return n.union([i,n.object({id:r,props:n.record(n.string(),n.unknown()).optional()}).passthrough()])}function createMultiRelationValidator(e,t=s){let r=n.guid({message:t.invalidId(e)}),i=n.union([r,n.object({id:r,props:n.record(n.string(),n.unknown()).optional()}).passthrough()]),a=n.array(i);return e.maxItems!==void 0&&(a=a.max(e.maxItems,t.maxItems(e,e.maxItems))),a.refine(e=>e.every(e=>{let t=extractRelationId(e);return typeof t==`string`&&r.safeParse(t).success}),{message:t.invalidId(e)})}function createRelationValidator(e,t=s){return e.cardinality===`many`?createMultiRelationValidator(e,t):createSingleRelationValidator(e,t)}function createRichtextValidator(e,t=s){return n.string({message:t.invalidRichtext(e)})}function describeOptions(e){return e.map(e=>e.label===e.value?e.value:`${e.value} (${e.label})`)}function createSelectValidator(e,t=s){let r=e.options.map(e=>e.value);return r.length===0?n.never():n.enum(r,{message:t.invalidOption(e,describeOptions(e.options))})}function createMultiselectValidator(e,t=s){let r=e.options.map(e=>e.value);return r.length===0?n.never():n.array(n.enum(r,{message:t.invalidOption(e,describeOptions(e.options))}))}function createStatusValidator(e,t=s){let r=e.options.map(e=>e.value);return r.length===0?n.never():n.enum(r,{message:t.invalidOption(e,describeOptions(e.options))})}function createUserValidator(e,t=s){let r=n.guid({message:t.invalidId(e)});return e.multiple?n.array(r):r}function createFormulaValidator(e,t=s){return n.unknown()}function createRollupValidator(e,t=s){return n.unknown()}function createAttributeValidator(e,t=s){switch(e.type){case`text`:return createTextValidator(e,t);case`richtext`:return createRichtextValidator(e,t);case`number`:return createNumberValidator(e,t);case`checkbox`:return createCheckboxValidator(e,t);case`date`:return createDateValidator(e,t);case`phone`:return createPhoneValidator(e,t);case`currency`:return createCurrencyValidator(e,t);case`status`:return createStatusValidator(e,t);case`location`:return createLocationValidator(e,t);case`select`:return createSelectValidator(e,t);case`multiselect`:return createMultiselectValidator(e,t);case`user`:return createUserValidator(e,t);case`relation`:return createRelationValidator(e,t);case`formula`:return createFormulaValidator(e,t);case`rollup`:return createRollupValidator(e,t);default:return n.unknown()}}function createFormAttributeValidator(e,t=s){let n=createAttributeValidator(e,t);return e.required?n:withEmptyToNull(n,l[e.type])}const Q=/* @__PURE__ */ new WeakMap,$=/* @__PURE__ */ new WeakMap;function createObjectValidator(e){let t=Q.get(e);if(t)return t;let r={};for(let t of e.attributes){let e=createAttributeValidator(t);t.required?r[t.name]=e.refine(isValuePresent,{message:s.required(t)}):r[t.name]=withEmptyToNull(e,l[t.type])}let i=n.object(r).passthrough();return Q.set(e,i),i}function createDraftValidator(e){let t=$.get(e);if(t)return t;let r={};for(let t of e.attributes){let e=createAttributeValidator(t);r[t.name]=withEmptyToNull(e,l[t.type])}let i=n.object(r).passthrough();return $.set(e,i),i}function validateAttribute(e,t){let n=createAttributeValidator(e);if(!e.required&&t==null)return{success:!0,data:{[e.name]:t}};let r=n.safeParse(t);return r.success?{success:!0,data:{[e.name]:r.data}}:{success:!1,errors:formatZodErrors(r.error).map(t=>({path:[e.name,...t.path],message:t.message}))}}function validateObject(e,t){let n=createObjectValidator(e).safeParse(t);return n.success?{success:!0,data:n.data}:{success:!1,errors:formatZodErrors(n.error)}}function validateObjectOrThrow(e,n){let r=validateObject(e,n);if(!r.success){let n=r.errors??[],i=n.map(e=>`${e.path.join(`.`)}: ${e.message}`).join(`
|
|
3
|
-
`)||`Unknown validation error`;throw new t.ValidationError(`Validation failed for ${e.label}:\n${i}`,n.map(e=>({path:e.path,message:e.message})))}return r.data}function validateDraft(e,t){let n=createDraftValidator(e).safeParse(t);return n.success?{success:!0,data:n.data}:{success:!1,errors:formatZodErrors(n.error)}}function validateDraftOrThrow(e,n){let r=validateDraft(e,n);if(!r.success){let n=r.errors??[],i=n.map(e=>`${e.path.join(`.`)}: ${e.message}`).join(`
|
|
4
|
-
`)||`Unknown validation error`;throw new t.ValidationError(`Draft validation failed for ${e.label}:\n${i}`,n.map(e=>({path:e.path,message:e.message})))}return r.data}function rejectUnknownAttributesOrThrow(e,n){let r=new Set(e.attributes.map(e=>e.name)),i=Object.keys(n).filter(e=>!r.has(e));if(i.length>0)throw new t.ValidationError(`Unknown attribute${i.length>1?`s`:``} for ${e.label}: ${i.join(`, `)}`,i.map(e=>({path:[e],message:`Unknown attribute`})))}Object.defineProperty(exports,"ATTRIBUTE_DESCRIPTION_TOO_LONG",{enumerable:!0,get:function(){return Z}}),Object.defineProperty(exports,"COMPUTED_RETURN_TYPES",{enumerable:!0,get:function(){return a}}),Object.defineProperty(exports,"DEFAULT_VALIDATION_MESSAGES",{enumerable:!0,get:function(){return s}}),Object.defineProperty(exports,"SIMPLE_PROPERTY_TYPES",{enumerable:!0,get:function(){return B}}),Object.defineProperty(exports,"TEXT_FORMAT_PATTERNS",{enumerable:!0,get:function(){return o}}),Object.defineProperty(exports,"WIRE_OFFERED_BASE_CONFIG",{enumerable:!0,get:function(){return f}}),Object.defineProperty(exports,"WIRE_OMITTED_CONFIG_KEYS",{enumerable:!0,get:function(){return d}}),Object.defineProperty(exports,"attributeConfigSchemas",{enumerable:!0,get:function(){return X}}),Object.defineProperty(exports,"createAttributeValidator",{enumerable:!0,get:function(){return createAttributeValidator}}),Object.defineProperty(exports,"createFormAttributeValidator",{enumerable:!0,get:function(){return createFormAttributeValidator}}),Object.defineProperty(exports,"createObjectValidator",{enumerable:!0,get:function(){return createObjectValidator}}),Object.defineProperty(exports,"datePrecisionIssues",{enumerable:!0,get:function(){return datePrecisionIssues}}),Object.defineProperty(exports,"formatPhoneForDisplay",{enumerable:!0,get:function(){return formatPhoneForDisplay}}),Object.defineProperty(exports,"formatZodErrors",{enumerable:!0,get:function(){return formatZodErrors}}),Object.defineProperty(exports,"getAttributeConfigSchema",{enumerable:!0,get:function(){return getAttributeConfigSchema}}),Object.defineProperty(exports,"getAttributeConfigWriteSchema",{enumerable:!0,get:function(){return getAttributeConfigWriteSchema}}),Object.defineProperty(exports,"getIso2",{enumerable:!0,get:function(){return getIso2}}),Object.defineProperty(exports,"isEmptyValue",{enumerable:!0,get:function(){return isEmptyValue}}),Object.defineProperty(exports,"isNullishOrEmptyString",{enumerable:!0,get:function(){return isNullishOrEmptyString}}),Object.defineProperty(exports,"isValuePresent",{enumerable:!0,get:function(){return isValuePresent}}),Object.defineProperty(exports,"normalizeCountrylessPhoneNumber",{enumerable:!0,get:function(){return normalizeCountrylessPhoneNumber}}),Object.defineProperty(exports,"normalizePhoneNumber",{enumerable:!0,get:function(){return normalizePhoneNumber}}),Object.defineProperty(exports,"parseAttributeConfig",{enumerable:!0,get:function(){return parseAttributeConfig}}),Object.defineProperty(exports,"parseAttributeConfigForCreate",{enumerable:!0,get:function(){return parseAttributeConfigForCreate}}),Object.defineProperty(exports,"parseAttributeConfigForUpdate",{enumerable:!0,get:function(){return parseAttributeConfigForUpdate}}),Object.defineProperty(exports,"propertyAttributeSchema",{enumerable:!0,get:function(){return U}}),Object.defineProperty(exports,"propertyAttributeWireSchema",{enumerable:!0,get:function(){return q}}),Object.defineProperty(exports,"propertySchemaSchema",{enumerable:!0,get:function(){return W}}),Object.defineProperty(exports,"propertySchemaWireSchema",{enumerable:!0,get:function(){return J}}),Object.defineProperty(exports,"refuseForeignKeys",{enumerable:!0,get:function(){return refuseForeignKeys}}),Object.defineProperty(exports,"rejectUnknownAttributesOrThrow",{enumerable:!0,get:function(){return rejectUnknownAttributesOrThrow}}),Object.defineProperty(exports,"resolveTextPattern",{enumerable:!0,get:function(){return resolveTextPattern}}),Object.defineProperty(exports,"selectOptionWriteSchema",{enumerable:!0,get:function(){return g}}),Object.defineProperty(exports,"statusGroupSchema",{enumerable:!0,get:function(){return h}}),Object.defineProperty(exports,"statusOptionWriteSchema",{enumerable:!0,get:function(){return _}}),Object.defineProperty(exports,"validateAttribute",{enumerable:!0,get:function(){return validateAttribute}}),Object.defineProperty(exports,"validateDraft",{enumerable:!0,get:function(){return validateDraft}}),Object.defineProperty(exports,"validateDraftOrThrow",{enumerable:!0,get:function(){return validateDraftOrThrow}}),Object.defineProperty(exports,"validateObject",{enumerable:!0,get:function(){return validateObject}}),Object.defineProperty(exports,"validateObjectOrThrow",{enumerable:!0,get:function(){return validateObjectOrThrow}}),Object.defineProperty(exports,"wireHiddenTypeConfigMask",{enumerable:!0,get:function(){return wireHiddenTypeConfigMask}}),Object.defineProperty(exports,"wireOmittedConfigKeysFor",{enumerable:!0,get:function(){return wireOmittedConfigKeysFor}}),Object.defineProperty(exports,"withoutUnknownOptionKeys",{enumerable:!0,get:function(){return withoutUnknownOptionKeys}});
|
package/dist/all-BWpaP2E2.mjs
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
/*! © 2025-2026 AND YOU CREATE SAS (RCS Paris 940 190 614). Proprietary — see LICENSE (Standards SDK License 1.0). */
|
|
2
|
-
import"./zod-locale.mjs";import{ATTRIBUTE_NAME_SCHEMA as e,SCHEMA_LIMITS as t,characterCount as n,colorIdSchema as r,iconNameSchema as i,isPlainRecord as a,isValueKindType as o}from"./attribute-validators-CFa9B00S.mjs";import{ValidationError as s}from"./exceptions.mjs";import*as c from"zod";import{getCountryByIso3 as l,isValidIso3 as ee,stripTrunkPrefix as te}from"@standards/constants";import{parsePhoneNumberFromString as u}from"libphonenumber-js";const d=[`text`,`number`,`boolean`,`date`,`select`,`multiselect`],f={email:`^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$`,url:`^https?:\\/\\/[\\w\\-]+(\\.[\\w\\-]+)+[/#?]?.*$`,slug:`^[a-z0-9]+(?:-[a-z0-9]+)*$`};function resolveTextPattern(e){return e.pattern?e.pattern:e.format?f[e.format]:void 0}const p={required:e=>`${e.label} is required`,invalidType:(e,t)=>`${e.label} must be a ${t}`,minLength:(e,t)=>`${e.label} must be at least ${t} characters`,maxLength:(e,t)=>`${e.label} must be at most ${t} characters`,invalidPattern:e=>`${e.label} format is invalid`,minValue:(e,t)=>`${e.label} must be at least ${t}`,maxValue:(e,t)=>`${e.label} must be at most ${t}`,mustBeInteger:e=>`${e.label} must be an integer`,invalidDate:e=>`${e.label} must be a valid date`,invalidOption:(e,t)=>`${e.label} must be one of: ${t.join(`, `)}`,invalidId:e=>`${e.label} must be a valid ID`,maxItems:(e,t)=>`${e.label} must have at most ${t} item${t>1?`s`:``}`,invalidRichtext:e=>`${e.label} must be valid rich text content`,invalidPhone:e=>`${e.label} must be a valid phone number`,invalidCurrency:e=>`${e.label} must be a valid currency value`,invalidLocation:e=>`${e.label} must be a valid location`};function formatZodErrors(e){return e.issues.map(e=>({path:e.path.map(String),message:e.message}))}var LRUCache=class{constructor(e){if(!Number.isInteger(e)||e<=0)throw Error(`LRU cache capacity must be greater than 0`);this.capacity=e,this.cache=/* @__PURE__ */ new Map}get(e){if(!this.cache.has(e))return;let t=this.cache.get(e);return this.cache.delete(e),this.cache.set(e,t),t}set(e,t){if(this.cache.has(e))this.cache.delete(e);else if(this.cache.size>=this.capacity){let e=this.cache.keys().next();e.done||this.cache.delete(e.value)}this.cache.set(e,t)}has(e){return this.cache.has(e)}clear(){this.cache.clear()}get size(){return this.cache.size}};function createRegexCache(e=100){return new LRUCache(e)}function getCachedRegex(e,t){let n=e.get(t);return n||(n=new RegExp(t),e.set(t,n)),n}const ne=createRegexCache();function createTextValidator(e,t=p){let n=c.string();e.minLength!==void 0&&(n=n.min(e.minLength,t.minLength(e,e.minLength))),e.maxLength!==void 0&&(n=n.max(e.maxLength,t.maxLength(e,e.maxLength)));let r=resolveTextPattern(e);return r&&(n=n.regex(getCachedRegex(ne,r),t.invalidPattern(e))),n}function createNumberValidator(e,t=p){let n=c.number();return e.min!==void 0&&(n=n.min(e.min,t.minValue(e,e.min))),e.max!==void 0&&(n=n.max(e.max,t.maxValue(e,e.max))),e.renderAs===`rating`&&(n=n.min(e.min??0),n=n.max(e.max??5)),e.unit===`percentage`&&(n=n.min(e.min??0).max(e.max??100)),e.unit===`integer`&&(n=n.int(t.mustBeInteger(e))),n}function createCheckboxValidator(e,t=p){return c.boolean()}function resolveBound(e){if(!e)return null;let t=e===`today`?(/* @__PURE__ */ new Date()).toISOString().slice(0,10):e,n=new Date(t);return Number.isNaN(n.getTime())?null:n}function floorToPrecision(e,t){return e?t===`month`?new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),1)):t===`year`?new Date(Date.UTC(e.getUTCFullYear(),0,1)):e:null}function createDateValidator(e,t=p){let n=t.invalidDate(e),r=floorToPrecision(resolveBound(e.minDate),e.precision),i=resolveBound(e.maxDate),a=c.any().superRefine((e,t)=>{let a=new Date(e);Number.isNaN(a.getTime())?t.addIssue({code:`custom`,message:n}):(r&&a<r&&t.addIssue({code:`custom`,message:n}),i&&a>i&&t.addIssue({code:`custom`,message:n}))});if(!e.endDate)return a;let o=c.object({start:a,end:a.nullable()}).superRefine((e,t)=>{if(e.end===null)return;let r=new Date(e.start),i=new Date(e.end);!(Number.isNaN(r.getTime())||Number.isNaN(i.getTime()))&&i<r&&t.addIssue({code:`custom`,message:n,path:[`end`]})});return c.preprocess(e=>typeof e==`string`?{start:e,end:null}:e,o)}function isNullishOrEmptyString(e){return e==null||e===``}function isValuePresent(e){return e==null?!1:typeof e==`string`?e.trim()!==``:!Array.isArray(e)||e.length>0}const m={phone:[`countryCode`]};function isEmptyValue(e,t=[]){return e==null||typeof e==`string`&&e.trim()===``?!0:e instanceof Date?!1:typeof e==`object`&&!Array.isArray(e)&&Object.entries(e).filter(([e])=>!t.includes(e)).every(([,e])=>e==null||typeof e==`string`&&e.trim()===``)}function withEmptyToNull(e,t){return c.preprocess(e=>isEmptyValue(e,t)?null:e,e.nullish())}const h=c.object({placeholder:c.string().optional(),description:c.string().optional(),defaultValue:c.unknown().optional(),icon:c.string().optional(),order:c.number().int().optional(),hidden:c.boolean().optional(),archived:c.boolean().optional(),deprecated:c.boolean().optional(),metadata:c.record(c.string(),c.unknown()).optional()}),g=[`placeholder`,`description`,`defaultValue`,`icon`,`order`,`hidden`,`archived`,`deprecated`,`metadata`],re={icon:i.optional().describe(`Field icon from search_icons`)},_={date:[`precision`],user:[`notifiesOnAssign`,`actors`]};function wireOmittedConfigKeysFor(e){return[...g,..._[e]??[]]}function wireHiddenTypeConfigMask(e){return Object.fromEntries((_[e]??[]).map(e=>[e,!0]))}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 v=c.object({value:c.string().min(1).describe(`Stored value`),label:c.string().min(1).describe(`Label people see`),description:c.string().describe(`Extra context`).optional(),inverse:c.string().describe(`Paired option's value (symmetric)`).optional(),archived:c.boolean().describe(`Hides without deleting`).optional()}),y=c.enum([`idle`,`in_progress`,`finished`]).describe(`Workflow stage`),b=v.extend({color:r}).strict(),x=v.extend({color:r,group:y}).strict(),S=v.extend({color:c.string().optional().describe(`A color id`),group:y.optional()}).strict(),C=new Set(S.keyof().options),w=[`options`,`targetAttributeOptions`];function withoutUnknownOptionKeys(e){let t=e;for(let n of w){let r=e[n];if(!Array.isArray(r))continue;let i=!1,o=r.map(e=>!a(e)||Object.keys(e).every(e=>C.has(e))?e:(i=!0,Object.fromEntries(Object.entries(e).filter(([e])=>C.has(e)))));i&&(t={...t,[n]:o})}let n=e.properties;if(a(n)&&Array.isArray(n.definitions)){let e=n.definitions,r=e.map(e=>a(e)?withoutUnknownOptionKeys(e):e);r.some((t,n)=>t!==e[n])&&(t={...t,properties:{...n,definitions:r}})}return t}const T=c.array(S).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.array(e).min(1).max(t.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 E=writeOptionsArraySchema(b),D=writeOptionsArraySchema(b),O=writeOptionsArraySchema(x),k=c.object({object:c.string().min(1).describe(`Target object`),displayTemplate:c.string().optional().describe(`Linked record label template`),filter:c.record(c.string(),c.unknown()).optional().describe(`Restricts linkable records`)}),A=c.object({object:c.string().min(1).describe(`Other side's object`),attribute:c.string().min(1).describe(`Other side's attribute`),cardinality:c.enum([`one`,`many`]).optional().describe(`Other side's cardinality`),label:c.string().min(1).optional().describe(`Other side's label`),storageOwner:c.boolean().optional().describe(`Owns the join storage`)}),j=c.object({objectName:c.string().min(1).describe(`API name of the object whose options are mirrored`),attributeName:c.string().min(1).describe(`API name of the select/status attribute to mirror options from`),attributeId:c.string().optional().describe(`Id of the source attribute, resolved by the server`)}),M=h.extend({multiline:c.boolean().describe(`Renders as a multi-line textarea`).optional(),minLength:c.number().int().min(0).describe(`Minimum character count`).optional(),maxLength:c.number().int().min(1).describe(`Maximum character count`).optional(),pattern:c.string().describe(`Regular expression the value must match`).optional(),format:c.enum([`email`,`url`,`slug`]).describe(`Validates and renders as this format`).optional()}),ie=h,N=h.extend({renderAs:c.enum([`number`,`rating`]).describe(`Plain number or a star rating`).optional(),min:c.number().describe(`Minimum allowed value`).optional(),max:c.number().describe(`Maximum allowed value`).optional(),unit:c.enum([`integer`,`decimal`,`percentage`]).describe(`How the value is stored and rendered`).optional(),decimals:c.number().int().min(0).max(10).describe(`Decimal places shown`).optional()}),P=h,F=h.extend({dateFormat:c.enum([`short`,`long`,`full`,`relative`]).describe(`How the date is rendered`).optional(),precision:c.enum([`day`,`month`,`year`]).describe(`Whether the value records a day, a month or a year`).optional(),minDate:c.string().describe(`Earliest allowed date (ISO)`).optional(),maxDate:c.string().describe(`Latest allowed date (ISO)`).optional(),includeTime:c.boolean().describe(`Also captures a time of day`).optional(),endDate:c.boolean().describe(`Paired with another date attribute as a range's end`).optional(),timeFormat:c.enum([`12h`,`24h`]).describe(`Clock format when a time is included`).optional()}),I=h.extend({defaultCountryCode:c.string().length(3).describe(`ISO country code preselected in the dialer`).optional()}),L=h.extend({defaultCurrency:c.string().length(3).describe(`ISO currency code preselected for new values`).optional(),allowedCurrencies:c.array(c.string().length(3)).describe(`ISO currency codes a value may use; any currency when omitted`).optional(),allowNegative:c.boolean().describe(`Whether a negative amount is accepted`).optional()}),R=h.extend({options:T.describe(`The workflow statuses, in order`)}),z=h.extend({granularity:c.enum([`full`,`address`,`city`,`state`,`country`,`coordinates`]).describe(`How precise a location must be captured`).optional(),defaultCountry:c.string().length(3).describe(`ISO country code preselected for new values`).optional(),allowedCountries:c.array(c.string().length(3)).describe(`ISO country codes a value may use; any country when omitted`).optional()}),B=h.extend({options:T.describe(`Options`),renderAs:c.literal(`badges`).optional().describe(`Renders the chosen option as a colored badge`)}),V=h.extend({options:T.describe(`Options`),renderAs:c.literal(`badges`).optional().describe(`Renders the chosen options as colored badges`)}),ae=h.extend({types:c.array(c.enum([`user`,`agent`])).min(1).optional().describe(`Which kinds of actor can be picked; both when omitted`),multiple:c.boolean().optional().describe(`Whether more than one actor can be picked`),notifiesOnAssign:c.boolean().optional().describe(`Whether each person added to the value is notified`),actors:c.boolean().optional().describe(`Whether the value holds actor ids, named by each actor's current name`)}),H={name:e.describe(`Property API name`),label:c.string().min(1).describe(`Label people see`),required:c.boolean().describe(`Required on every edge`).optional()},oe={id:c.string().optional(),objectId:c.string().optional(),system:c.boolean().optional(),unique:c.boolean().optional()},se=Object.fromEntries(g.map(e=>[e,!0])),U=[`text`,`number`,`checkbox`,`date`,`phone`,`currency`,`location`],W=[...U,`select`,`multiselect`,`status`],G={text:M,number:N,checkbox:P,date:F,phone:I,currency:L,location:z,select:B,multiselect:V,status:R},ce={...G,select:B.extend({options:E.describe(`Options`)}),multiselect:V.extend({options:D.describe(`Options`)}),status:R.extend({options:O.describe(`Statuses`)})},propertyWireConfigShapeFor=e=>ce[e].omit(se).omit(wireHiddenTypeConfigMask(e)).shape,storedPropertyMember=e=>c.object({...H,...oe,type:c.literal(e).describe(`Property type`),...G[e].shape}).strip(),K=c.discriminatedUnion(`type`,W.map(storedPropertyMember)),q=c.object({definitions:c.array(K).min(1).max(t.optionsPerAttribute).describe(`Edge properties`)}).strip().describe(`Properties carried by the edge itself (role, share, since…), never a third object`),le=refuseForeignKeys(Object.fromEntries(W.map(e=>[e,new Set(Object.keys(propertyWireConfigShapeFor(e)))])),`property key`,[...Object.keys(H),`type`]);function refuseForeignPropertyKeys(e,t){le(e.type,e,t)}const ue=U.reduce((e,t)=>(Object.assign(e,propertyWireConfigShapeFor(t)),e),{}),optionPropertyWireMember=e=>c.object({...H,type:e.length===1?c.literal(e[0]).describe(`Property type`):c.enum(e).describe(`Property type`),...propertyWireConfigShapeFor(e[0])}).strict(),J=c.discriminatedUnion(`type`,[optionPropertyWireMember([`select`,`multiselect`]),optionPropertyWireMember([`status`]),c.object({...H,type:c.enum(U).describe(`Property type`),...ue}).strict().superRefine(refuseForeignPropertyKeys)]),de=c.object({definitions:c.array(J).min(1).max(t.optionsPerAttribute).describe(`Edge properties`)}).strict().describe(`Properties carried by the edge itself (role, share, since…), never a third object`),fe=h.extend({targets:c.array(k).min(1).describe(`Target object(s)`),cardinality:c.enum([`one`,`many`]).describe(`one or many`),maxItems:c.number().int().min(1).optional().describe(`Max linked records`),bilateral:A.optional().describe(`Syncs the other side's attribute`),properties:q.optional()}),Y=h.extend({expression:c.string().min(1).describe(`The formula expression, compiled against this object's attributes`),returnType:c.enum(d).describe(`The formula's result type`),decimals:c.number().int().min(0).max(10).optional().describe(`Decimal places shown for a number result`),currencyCode:c.string().length(3).optional().describe(`ISO 4217 code a number result renders with; presentation only`),allowRelations:c.boolean().optional().describe(`Whether the expression may read across a relation`),optionsSource:j.optional().describe(`Mirrors an option set`)}),pe=h.extend({relationAttribute:c.string().min(1).optional().describe(`API name of the relation this rollup aggregates through`),relationPath:c.string().optional().describe(`Not supported yet — single-hop only`),targetAttribute:c.string().min(1).optional().describe(`API name of the attribute aggregated on the relation's target object; not read by count`),function:c.enum([`sum`,`avg`,`earliest`,`latest`,`count`,`countValues`,`countUniqueValues`,`countEmpty`,`percentEmpty`,`percentNotEmpty`,`original`]).describe(`The aggregation applied across the linked records`),decimals:c.number().int().min(0).max(10).optional().describe(`Decimal places shown for a numeric result`),targetAttributeType:c.string().optional().describe(`Server-set`),targetAttributeOptions:c.array(S).optional().describe(`Server-set`),targetCurrencyCode:c.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`}}function datePrecisionIssues(e,t,n=[]){let r=[],i=t.precision;if(e===`date`&&i!==void 0&&i!==`day`)for(let e of[`includeTime`,`endDate`])t[e]===!0&&r.push({path:[...n,`precision`],message:`A "${String(i)}" precision cannot be combined with ${e}`});let o=t.properties;return a(o)&&Array.isArray(o.definitions)&&o.definitions.forEach((e,t)=>{a(e)&&r.push(...datePrecisionIssues(String(e.type),e,[...n,`properties`,`definitions`,t]))}),r}const X={text:M,richtext:ie,number:N,checkbox:P,date:F,phone:I,currency:L,status:R,location:z,select:B,multiselect:V,user:ae,relation:fe,formula:Y,rollup:pe,document:h.extend({properties:q.optional(),accepts:c.array(c.string().min(1)).optional().describe("MIME prefixes or globs a file must match (e.g. `image/*`, `*.pdf`)"),maxFileSize:c.number().int().min(1).optional().describe(`Maximum file size in bytes`)})};function getAttributeConfigSchema(e){let t=X[e];if(!t)throw new s(`Unsupported attribute type: ${e}`,[]);return t}function parseAttributeConfig(e,t){assertDescriptionWithinCap(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:i.optional()});switch(e){case`select`:return t.extend({options:E.describe(`Options`)});case`multiselect`:return t.extend({options:D.describe(`Options`)});case`status`:return t.extend({options:O.describe(`Statuses`)});default:return t}}function validationErrorFromIssues(e){return s.fromZodErrors(e.map(e=>({path:e.path.map(e=>typeof e==`symbol`?String(e):e),message:e.message})))}const Z=`Description is too long (max ${t.attributeDescriptionLength} characters)`;function assertDescriptionWithinCap(e){let r=a(e)?e.description:void 0;if(typeof r==`string`&&n(r)>t.attributeDescriptionLength)throw validationErrorFromIssues([{path:[`description`],message:Z}])}function parseWriteSchema(e,t){assertDescriptionWithinCap(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]);let i=datePrecisionIssues(e,n.data);if(i.length>0)throw validationErrorFromIssues(i);return n.data}function parseAttributeConfigForCreate(e,t){return parseWriteSchema(e,t)}function validatePatchedIcon(e){if(!Object.prototype.hasOwnProperty.call(e,`icon`))return;let t=i.optional().safeParse(e.icon);if(!t.success)throw s.fromZodErrors(t.error.issues.map(e=>({path:[`icon`,...e.path.map(e=>typeof e==`symbol`?String(e):e)],message:e.message})))}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),assertDescriptionWithinCap(i),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;o(e.type,`options`)&&(i.options=[{value:`__legacy__`,label:`__legacy__`}]);let s=getAttributeConfigSchema(e.type).strip().safeParse(i);if(!s.success)throw validationErrorFromIssues(s.error.issues);let c=s.data,l=datePrecisionIssues(e.type,c);if(l.length>0)throw validationErrorFromIssues(l);return o(e.type,`options`)&&(c.options=a),c}function createCurrencyValidator(e,t=p){let n=e.allowNegative?c.number():c.number().min(0);return c.object({code:c.string().length(3),value:n},{message:t.invalidCurrency(e)})}function createLocationValidator(e,t=p){return c.object({address:c.string().optional(),address2:c.string().optional(),city:c.string().optional(),state:c.string().optional(),postalCode:c.string().optional(),country:c.string().length(3).optional(),latitude:c.number().min(-90).max(90).optional(),longitude:c.number().min(-180).max(180).optional()},{message:t.invalidLocation(e)})}function digitsOnly(e){return e.replace(/\D/g,``)}function normalizeCountrylessPhoneNumber(e){return digitsOnly(e)}function getIso2(e){return l(e)?.iso2}function normalizePhoneNumber(e,t){if(!e)return``;let n=getIso2(t);if(!n)return digitsOnly(e);let r=u(e,n);if(r)return absorbDoubledCallingCode(r.nationalNumber,r.isValid(),t,n);let i=l(t),a=digitsOnly(e);if(i){let e=i.phoneCode.replace(`+`,``),t=a.startsWith(e)?a.slice(e.length):a;return te(t,i.phoneTrunkPrefix??``)}return a}function absorbDoubledCallingCode(e,t,n,r){if(t)return e;let i=l(n)?.phoneCode.replace(`+`,``);if(i===void 0||!e.startsWith(i))return e;let a=e.slice(i.length),o=u(`+${i}${a}`,r);return o?.isValid()?o.nationalNumber:e}function formatPhoneForDisplay(e){if(!e.phoneNumber)return``;let t=getIso2(e.countryCode),n=l(e.countryCode)?.phoneCode??``;if(!t)return`${n} ${e.phoneNumber}`.trim();let r=`${n}${digitsOnly(e.phoneNumber)}`,i=u(r);return i?i.formatInternational():`${n} ${e.phoneNumber}`.trim()}function createPhoneValidator(e,t=p){return c.object({countryCode:c.string().length(3),phoneNumber:c.string().min(1,{message:t.required(e)})},{message:t.invalidPhone(e)}).refine(e=>ee(e.countryCode),{message:`Invalid country code`}).transform(e=>({countryCode:e.countryCode,phoneNumber:normalizePhoneNumber(e.phoneNumber,e.countryCode)}))}function extractRelationId(e){return typeof e==`object`&&e&&`id`in e?e.id:e}function createSingleRelationValidator(e,t=p){let n=c.guid({message:t.invalidId(e)}),r=c.union([n,c.null()]);return c.union([r,c.object({id:n,props:c.record(c.string(),c.unknown()).optional()}).passthrough()])}function createMultiRelationValidator(e,t=p){let n=c.guid({message:t.invalidId(e)}),r=c.union([n,c.object({id:n,props:c.record(c.string(),c.unknown()).optional()}).passthrough()]),i=c.array(r);return e.maxItems!==void 0&&(i=i.max(e.maxItems,t.maxItems(e,e.maxItems))),i.refine(e=>e.every(e=>{let t=extractRelationId(e);return typeof t==`string`&&n.safeParse(t).success}),{message:t.invalidId(e)})}function createRelationValidator(e,t=p){return e.cardinality===`many`?createMultiRelationValidator(e,t):createSingleRelationValidator(e,t)}function createRichtextValidator(e,t=p){return c.string({message:t.invalidRichtext(e)})}function describeOptions(e){return e.map(e=>e.label===e.value?e.value:`${e.value} (${e.label})`)}function createSelectValidator(e,t=p){let n=e.options.map(e=>e.value);return n.length===0?c.never():c.enum(n,{message:t.invalidOption(e,describeOptions(e.options))})}function createMultiselectValidator(e,t=p){let n=e.options.map(e=>e.value);return n.length===0?c.never():c.array(c.enum(n,{message:t.invalidOption(e,describeOptions(e.options))}))}function createStatusValidator(e,t=p){let n=e.options.map(e=>e.value);return n.length===0?c.never():c.enum(n,{message:t.invalidOption(e,describeOptions(e.options))})}function createUserValidator(e,t=p){let n=c.guid({message:t.invalidId(e)});return e.multiple?c.array(n):n}function createFormulaValidator(e,t=p){return c.unknown()}function createRollupValidator(e,t=p){return c.unknown()}function createAttributeValidator(e,t=p){switch(e.type){case`text`:return createTextValidator(e,t);case`richtext`:return createRichtextValidator(e,t);case`number`:return createNumberValidator(e,t);case`checkbox`:return createCheckboxValidator(e,t);case`date`:return createDateValidator(e,t);case`phone`:return createPhoneValidator(e,t);case`currency`:return createCurrencyValidator(e,t);case`status`:return createStatusValidator(e,t);case`location`:return createLocationValidator(e,t);case`select`:return createSelectValidator(e,t);case`multiselect`:return createMultiselectValidator(e,t);case`user`:return createUserValidator(e,t);case`relation`:return createRelationValidator(e,t);case`formula`:return createFormulaValidator(e,t);case`rollup`:return createRollupValidator(e,t);default:return c.unknown()}}function createFormAttributeValidator(e,t=p){let n=createAttributeValidator(e,t);return e.required?n:withEmptyToNull(n,m[e.type])}const Q=/* @__PURE__ */ new WeakMap,$=/* @__PURE__ */ new WeakMap;function createObjectValidator(e){let t=Q.get(e);if(t)return t;let n={};for(let t of e.attributes){let e=createAttributeValidator(t);t.required?n[t.name]=e.refine(isValuePresent,{message:p.required(t)}):n[t.name]=withEmptyToNull(e,m[t.type])}let r=c.object(n).passthrough();return Q.set(e,r),r}function createDraftValidator(e){let t=$.get(e);if(t)return t;let n={};for(let t of e.attributes){let e=createAttributeValidator(t);n[t.name]=withEmptyToNull(e,m[t.type])}let r=c.object(n).passthrough();return $.set(e,r),r}function validateAttribute(e,t){let n=createAttributeValidator(e);if(!e.required&&t==null)return{success:!0,data:{[e.name]:t}};let r=n.safeParse(t);return r.success?{success:!0,data:{[e.name]:r.data}}:{success:!1,errors:formatZodErrors(r.error).map(t=>({path:[e.name,...t.path],message:t.message}))}}function validateObject(e,t){let n=createObjectValidator(e).safeParse(t);return n.success?{success:!0,data:n.data}:{success:!1,errors:formatZodErrors(n.error)}}function validateObjectOrThrow(e,t){let n=validateObject(e,t);if(!n.success){let t=n.errors??[],r=t.map(e=>`${e.path.join(`.`)}: ${e.message}`).join(`
|
|
3
|
-
`)||`Unknown validation error`;throw new s(`Validation failed for ${e.label}:\n${r}`,t.map(e=>({path:e.path,message:e.message})))}return n.data}function validateDraft(e,t){let n=createDraftValidator(e).safeParse(t);return n.success?{success:!0,data:n.data}:{success:!1,errors:formatZodErrors(n.error)}}function validateDraftOrThrow(e,t){let n=validateDraft(e,t);if(!n.success){let t=n.errors??[],r=t.map(e=>`${e.path.join(`.`)}: ${e.message}`).join(`
|
|
4
|
-
`)||`Unknown validation error`;throw new s(`Draft validation failed for ${e.label}:\n${r}`,t.map(e=>({path:e.path,message:e.message})))}return n.data}function rejectUnknownAttributesOrThrow(e,t){let n=new Set(e.attributes.map(e=>e.name)),r=Object.keys(t).filter(e=>!n.has(e));if(r.length>0)throw new s(`Unknown attribute${r.length>1?`s`:``} for ${e.label}: ${r.join(`, `)}`,r.map(e=>({path:[e],message:`Unknown attribute`})))}export{Z as ATTRIBUTE_DESCRIPTION_TOO_LONG,d as COMPUTED_RETURN_TYPES,p as DEFAULT_VALIDATION_MESSAGES,U as SIMPLE_PROPERTY_TYPES,f as TEXT_FORMAT_PATTERNS,re as WIRE_OFFERED_BASE_CONFIG,g as WIRE_OMITTED_CONFIG_KEYS,X as attributeConfigSchemas,createAttributeValidator,createFormAttributeValidator,createObjectValidator,datePrecisionIssues,formatPhoneForDisplay,formatZodErrors,getAttributeConfigSchema,getAttributeConfigWriteSchema,getIso2,isEmptyValue,isNullishOrEmptyString,isValuePresent,normalizeCountrylessPhoneNumber,normalizePhoneNumber,parseAttributeConfig,parseAttributeConfigForCreate,parseAttributeConfigForUpdate,K as propertyAttributeSchema,J as propertyAttributeWireSchema,q as propertySchemaSchema,de as propertySchemaWireSchema,refuseForeignKeys,rejectUnknownAttributesOrThrow,resolveTextPattern,b as selectOptionWriteSchema,y as statusGroupSchema,x as statusOptionWriteSchema,validateAttribute,validateDraft,validateDraftOrThrow,validateObject,validateObjectOrThrow,wireHiddenTypeConfigMask,wireOmittedConfigKeysFor,withoutUnknownOptionKeys};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/*! © 2025-2026 AND YOU CREATE SAS (RCS Paris 940 190 614). Proprietary — see LICENSE (Standards SDK License 1.0). */
|
|
2
|
-
import"./zod-locale.mjs";import{SchemaError as e,SchemaErrorCode as t,ValidationError as n}from"./exceptions.mjs";import*as r from"zod";import{COLORS as i,ICONS as a}from"@standards/constants";const o={createdAt:`createdAt`,updatedAt:`updatedAt`,createdBy:`createdBy`,lastUpdatedBy:`lastUpdatedBy`,attachments:`attachments`,parentId:`parentId`,childIds:`childIds`};function getSystemAttributeI18nKey(e){return o[e]}const s={createdAt:{id:`system:createdAt`,name:`createdAt`,label:`Created time`,type:`date`,required:!1,system:!0,icon:`clock-circle`,description:`When this record was created`},updatedAt:{id:`system:updatedAt`,name:`updatedAt`,label:`Last edited time`,type:`date`,required:!1,system:!0,icon:`clock-circle`,description:`When this record was last modified`},createdBy:{id:`system:createdBy`,name:`createdBy`,label:`Created by`,type:`user`,required:!1,system:!0,multiple:!1,actors:!0,icon:`user`,description:`Actor who created this record`},lastUpdatedBy:{id:`system:lastUpdatedBy`,name:`lastUpdatedBy`,label:`Last edited by`,type:`user`,required:!1,system:!0,multiple:!1,actors:!0,icon:`user`,description:`Actor who last modified this record`},attachments:{id:`system:attachments`,name:`attachments`,label:`Attachments`,type:`document`,required:!1,system:!0,hidden:!0,icon:`paperclip`,description:`Free-form document attachments`}};function getSystemAttributeList(){return Object.values(s)}function isManagedSystemAttribute(e){return e.id?.startsWith(`system:`)??!1}const c=[`hierarchy:parentId`,`hierarchy:childIds`],l=/* @__PURE__ */ new Set([`parentId`,`childIds`]),ee=6;function getHierarchyAttributes(e){if(!e.hierarchical)return[];let t=[{object:e.name}];return[{id:c[0],name:`parentId`,label:`Parent`,type:`relation`,cardinality:`one`,targets:t,required:!1,system:!0,icon:`corner-left-up`,description:`The record this one sits under`},{id:c[1],name:`childIds`,label:`Sub-items`,type:`relation`,cardinality:`many`,targets:t,required:!1,system:!0,icon:`corner-down-right`,description:`The records that sit under this one`}]}function isHierarchyAttribute(e){return e.id?.startsWith(`hierarchy:`)??!1}function getObjectSystemAttributes(e){return[...getSystemAttributeList(),...getHierarchyAttributes(e)]}const u=[`is`,`is_not`,`contains`,`not_contains`,`starts_with`,`ends_with`,`is_empty`,`is_not_empty`],d=[`is`,`is_not`,`less_than`,`greater_than`,`less_or_equal`,`greater_or_equal`,`is_empty`,`is_not_empty`],f=[`is`],p=[`is`,`is_not`,`less_than`,`greater_than`,`less_or_equal`,`greater_or_equal`,`is_within`,`on_day_month`,`is_empty`,`is_not_empty`],m=[`is`,`is_not`,`any_of`,`none_of`,`is_empty`,`is_not_empty`],h=[`any_of`,`none_of`,`is_empty`,`is_not_empty`],g=[`is`,`is_not`,`any_of`,`none_of`,`is_empty`,`is_not_empty`],_=[`is_empty`,`is_not_empty`],v=[`is`,`is_not`,`less_than`,`greater_than`,`less_or_equal`,`greater_or_equal`,`contains`,`not_contains`,`is_empty`,`is_not_empty`],y=[`city`,`postalCode`,`country`];function isLocationFilterProperty(e){return y.includes(e)}const b={text:u,richtext:[],number:d,checkbox:f,date:p,phone:[`is`,`is_not`,`contains`,`not_contains`,`starts_with`,`is_empty`,`is_not_empty`],currency:d,status:m,select:m,multiselect:h,location:[],user:g,relation:g,formula:v,document:_},x={text:{value:`plain`,traits:[`placeholder`,`searchable`,`sortable`]},richtext:{value:`plain`,traits:[`searchable`,`content`]},number:{value:`plain`,traits:[`placeholder`,`sortable`]},checkbox:{value:`boolean`,traits:[`sortable`]},date:{value:`plain`,traits:[`placeholder`,`sortable`]},phone:{value:`plain`,traits:[`placeholder`,`searchable`,`sortable`]},currency:{value:`plain`,traits:[`placeholder`,`sortable`,`groupable`]},status:{value:`options`,traits:[`searchable`,`sortable`,`groupable`]},location:{value:`plain`,traits:[]},select:{value:`options`,traits:[`placeholder`,`searchable`,`sortable`]},multiselect:{value:`options`,traits:[`placeholder`,`searchable`]},user:{value:`reference`,traits:[]},relation:{value:`reference`,traits:[`qualified`]},formula:{value:`computed`,traits:[]},rollup:{value:`computed`,traits:[]},document:{value:`reference`,traits:[`content`,`qualified`]}};function descriptorOf(e){return Object.prototype.hasOwnProperty.call(x,e)?x[e]:void 0}function isValueKindType(e,t){return descriptorOf(e)?.value===t}function hasValueKind(e,t){return isValueKindType(e.type,t)}function hasTypeTrait(e,t){return descriptorOf(e)?.traits.includes(t)??!1}const te={plain:`static`,boolean:`automatic`,options:`static`,reference:`static`,computed:`forbidden`};function getAttributeCapabilities(e){let t=!!(e.hidden||e.archived),n=!e.archived,r=descriptorOf(e.type)?.value,i=r===`computed`,a=e.type===`document`,o=r===`reference`&&!isHierarchyAttribute(e),s=getAttributeCardinality(e),c=t?[]:getRawFilterOperators(e),l=c.length>0&&!t,ee=!t&&hasTypeTrait(e.type,`searchable`),u=!t&&hasTypeTrait(e.type,`sortable`),d=!t&&hasTypeTrait(e.type,`groupable`),f=!t&&(e.type===`status`||e.type===`select`),p=isManagedSystemAttribute(e),m=i||a||p,h=!(t||m),g=r===void 0?`forbidden`:te[r],_=r===`boolean`||i?`forbidden`:`allowed`,v=supportsMaxItems(e),y=hasTypeTrait(e.type,`placeholder`),b=hasTypeTrait(e.type,`content`),x=!(!e.deprecated||t),S=resolveEditMode(e);return{lifecycle:{active:n,deprecated:!!e.deprecated,visibleInArchitect:!0,visibleInRuntime:!t,warningWhenDeprecated:x},storage:{mode:i?`computed`:o?`edge`:`value`,cardinality:s,edgeBacked:o,preservesExistingValues:!!e.archived,qualifiedProperties:hasTypeTrait(e.type,`qualified`),polymorphic:getPolymorphicCapability(e),maxItems:v},authoring:{editable:h,readOnly:m,directEdit:h&&S===`inline`,required:_,defaultValue:g,placeholder:y,maxItems:v},presentation:{formField:!t&&e.type!==`richtext`,tableCell:!(t||b),defaultColumn:!(t||b),compactDisplay:!t,popoverEditor:!t&&S===`popover`,placeholder:y,warningWhenDeprecated:x},query:{filterable:l,searchable:ee,sortable:u,groupable:d,kanbanGroupable:f,operators:c},agent:{readable:!t,writable:h&&!a,compactReadable:!t,contentReadable:!t&&b,requiresDedicatedTool:a},exchange:{importable:!t,exportable:!t,schemaExportable:!0,metadataExportable:!1}}}function getAttributeFilterOperators(e){return getAttributeCapabilities(e).query.operators}function isAttributeFilterable(e){return getAttributeCapabilities(e).query.filterable}function isAttributeSearchable(e){return getAttributeCapabilities(e).query.searchable}function isAttributeSortable$1(e){return getAttributeCapabilities(e).query.sortable}function isAttributeGroupable(e){return getAttributeCapabilities(e).query.groupable}function isAttributeKanbanGroupable(e){return getAttributeCapabilities(e).query.kanbanGroupable}function resolveEffectiveFilterType(e){if(e.type!==`rollup`)return e.type;let t=e;if(t.function===`earliest`||t.function===`latest`)return`date`;if(t.function===`original`){let e=t.targetAttributeType;if(e&&hasFilterOperatorEntry(e))return e}return`number`}function getRollupFilterOperators$1(e){let t=resolveEffectiveFilterType(e);return hasFilterOperatorEntry(t)?b[t]:b.number}function getRawFilterOperators(e){return e.type===`rollup`?getRollupFilterOperators$1(e):b[e.type]??[]}function getAttributeCardinality(e){return e.type===`multiselect`||e.type===`document`||e.type===`user`&&e.multiple===!0||e.type===`relation`&&e.cardinality===`many`?`many`:`one`}function getPolymorphicCapability(e){if(e.type!==`relation`)return`none`;let t=e.targets??[];return t.length===1&&t[0]?.object===`*`?`internal`:t.length>1?`code-only`:`none`}function supportsMaxItems(e){return e.type===`multiselect`||e.type===`relation`&&e.cardinality===`many`}function resolveEditMode(e){switch(e.type){case`checkbox`:return`inline`;case`number`:return e.renderAs===`rating`?`inline`:`default`;case`select`:case`multiselect`:return e.renderAs===`badges`?`inline`:`popover`;case`status`:case`relation`:case`user`:case`date`:return`popover`;default:return`default`}}function hasFilterOperatorEntry(e){return Object.prototype.hasOwnProperty.call(b,e)}const S=[`text`,`richtext`,`number`,`checkbox`,`date`,`phone`,`currency`,`status`,`location`,`select`,`multiselect`,`user`,`relation`,`formula`,`rollup`,`document`],ne=`*`;function relationTargetsOf(e){return e.type!==`relation`||!Array.isArray(e.targets)?[]:e.targets.map(e=>e.object).filter(e=>e!==`*`)}function isUniversalRelation(e){return e.targets.length===1&&e.targets[0].object===`*`}function isBilateralRelation(e){return e.bilateral!==void 0}function inferInverseCardinality(e){return`many`}function isAttributeSortable(e){return isAttributeSortable$1(e)}const re=b,C=[`is_empty`,`is_not_empty`];function isNoValueOperator(e){return C.includes(e)}function getRollupFilterOperators(e){return getRollupFilterOperators$1(e)}const w=[`skill`,`memory`,`drives`,`artifact`,`meeting`];function isNativeObjectName(e){return w.includes(e)}const T=[`workspace`,`private`],E=[`all`,...T,`shared`],D=[...T,`shared`];function parseRecordListScope(e){if(typeof e==`string`&&D.includes(e))return e;throw new n(`visibility must be one of: ${D.join(`, `)} (received: ${String(e)})`,[])}function parseResourceVisibility(e){if(typeof e==`string`&&T.includes(e))return e;throw new n(`visibility must be one of: ${T.join(`, `)} (received: ${String(e)})`,[])}const O=[`id`,`createdAt`,`updatedAt`,`createdBy`,`lastUpdatedBy`,`visibility`,`ownedBy`],k=[...O,`objectId`,`label`,`embeddingText`,`values`,`metadata`,`deletedAt`,`deletedBy`,`schemaVersion`,`appearance`,`owned_by`,`parentId`,`childIds`,`passedAt`],ie=w,A={attributesPerObject:300,tabsPerView:24,groupsPerFormTab:12,fieldsPerGroup:60,fieldsPerFormTab:150,columnsPerTab:50,displayAttributesPerCard:8,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,labelLength:128,attributeDescriptionLength:120};function characterCount(e){return[...e].length}const ae=Object.keys(i),oe=new Set(a),se=r.enum(ae).describe(`A color id from the palette`),j=r.string().superRefine((e,t)=>{oe.has(e)||t.addIssue({code:`custom`,message:`Invalid icon name`})}).transform(e=>e),M=[1,2,3,4,5,6,7,8,9,10,11,12],ce=M.length;function isBlockWidth(e){return M.includes(e)}const le=/^\d{4}-\d{2}-\d{2}$/u;function isCalendarDay(e){if(!le.test(e))return!1;let t=/* @__PURE__ */ new Date(`${e}T00:00:00Z`);return!Number.isNaN(t.getTime())&&t.toISOString().slice(0,10)===e}function isDynamicValue(e){return typeof e==`object`&&!!e&&!Array.isArray(e)&&`dynamic`in e}function currentActor(){return{dynamic:`actor`,ref:`current`}}function today(){return{dynamic:`date`,anchor:`today`}}function now(){return{dynamic:`date`,anchor:`now`}}function toAmount(e){if(typeof e==`number`)return Number.isFinite(e)?e:null;if(typeof e==`string`&&e.trim()!==``){let t=Number(e);return Number.isFinite(t)?t:null}return null}function extractCurrencyFilterValue(e){return typeof e==`object`&&e?`value`in e?toAmount(e.value):null:toAmount(e)}function extractFilterValue(e){return e==null?null:typeof e==`object`&&`value`in e?e.value??null:e}const ue=/* @__PURE__ */ new Set([`is_not`,`not_contains`,`none_of`,`is_empty`]),de={is_not:`is`,not_contains:`contains`,none_of:`any_of`,is_empty:`is_not_empty`};function getOperatorPolarity(e){return ue.has(e)?`none`:`any`}function normalizeForEdgeRpc(e){return de[e]??e}const N={is:`any_of`,is_not:`none_of`};function toMultiValueOperator(e){return N[e]??e}const fe=new Set(Object.values(N).filter(e=>e!==void 0));function isSetMembershipOperator(e){return fe.has(e)}function canonicalizeFilterValue(e,t){let r=e.value;if(isNoValueOperator(e.operator)||r==null||isDynamicValue(r))return;if(isSetMembershipOperator(e.operator)){Array.isArray(r)||(e.value=[r]);return}if(t!==`currency`)return;let i=extractCurrencyFilterValue(r);if(i!==null){e.value=i;return}if(!hasCurrencyAmount(r))return;let a=`Filter on a currency attribute expected a numeric amount, received ${JSON.stringify(r)}`;throw new n(a,[{path:[`value`],message:a}])}function hasCurrencyAmount(e){return typeof e!=`object`||`value`in e&&e.value!=null}const pe=`__`;function parseQualifiedAttribute(e){let t=e.indexOf(`__`);return t<=0||t+2>=e.length?{kind:`scalar`,attribute:e}:{kind:`qualified`,root:e.slice(0,t),property:e.slice(t+2)}}function buildQualifiedAttribute(e,t){return`${e}__${t}`}const P=b.text,me=[`is`,`is_not`,`is_empty`,`is_not_empty`],F=[`is`,`is_not`,`any_of`,`none_of`,`is_empty`,`is_not_empty`],I={id:F,objectId:F,tenantId:F,label:b.text,createdAt:b.date,updatedAt:b.date,deletedAt:b.date,createdBy:b.user,lastUpdatedBy:b.user,parentId:F,childIds:[`is_empty`,`is_not_empty`]},he=/* @__PURE__ */ new Set([`createdAt`,`updatedAt`,`deletedAt`]);function offeredOn(e,t){return he.has(e)?t.filter(e=>e!==`on_day_month`):t}function fullyOffered(e,t,n,r){return{target:e,attribute:t,...r?{property:r}:{},operators:n,offered:n}}function attributeFilterTarget(e){let t=isHierarchyAttribute(e)?systemColumnFilterTarget(e.name):void 0;if(t)return t;let n=getAttributeFilterOperators(e);return{target:e.name,attribute:e.name,operators:n,offered:offeredOn(e.name,n)}}function locationPartFilterTarget(e,t){return{target:buildQualifiedAttribute(e,t),attribute:e,property:t,operators:P,offered:t===`country`?me:P}}function edgePropertyFilterTarget(e,t){let n=hasOperatorEntry(t.type)?b[t.type]:[];return fullyOffered(buildQualifiedAttribute(e,t.name),e,n,t.name)}function hasOperatorEntry(e){return Object.prototype.hasOwnProperty.call(b,e)}const ge=[`is`,`is_not`,`is_empty`,`is_not_empty`];function isMetadataKeyPath(e){return e.startsWith(`metadata.`)?e.slice(9).split(`.`).every(e=>e.length>0):!1}function systemColumnFilterTarget(e){if(isMetadataKeyPath(e))return{target:e,attribute:e,operators:ge,offered:[]};let t=Object.prototype.hasOwnProperty.call(I,e)?I[e]:void 0;return t?{target:e,attribute:e,operators:t,offered:offeredOn(e,t)}:void 0}function filterOperatorsOfType(e){return isAttributeType(e)?getAttributeFilterOperators({type:e}):[]}function isAttributeType(e){return S.includes(e)}function isLocationPartOperator(e){return P.includes(e)}function carriesEdgeProperties(e){return hasTypeTrait(e.type,`qualified`)}function filterTargetsOf(e){let t=[];for(let n of e){if(n.type===`location`){for(let e of y)t.push(locationPartFilterTarget(n.name,e));continue}if(t.push(attributeFilterTarget(n)),!carriesEdgeProperties(n))continue;let e=n.properties?.definitions;for(let r of e??[])t.push(edgePropertyFilterTarget(n.name,r))}let n=new Set(e.map(e=>e.name));for(let e of Object.keys(I)){if(n.has(e))continue;let r=systemColumnFilterTarget(e);r&&t.push(r)}return t.filter(e=>e.operators.length>0)}const L={eq:`is`,equals:`is`,equal:`is`,"==":`is`,"=":`is`,neq:`is_not`,notEqual:`is_not`,isNot:`is_not`,"!=":`is_not`,"<>":`is_not`,lt:`less_than`,"<":`less_than`,gt:`greater_than`,">":`greater_than`,lte:`less_or_equal`,"<=":`less_or_equal`,gte:`greater_or_equal`,">=":`greater_or_equal`,in:`any_of`,isAnyOf:`any_of`,anyOf:`any_of`,oneOf:`any_of`,notIn:`none_of`,not_in:`none_of`,isNoneOf:`none_of`,noneOf:`none_of`,notOneOf:`none_of`,startsWith:`starts_with`,beginsWith:`starts_with`,endsWith:`ends_with`,doesNotContain:`not_contains`,notContain:`not_contains`,isEmpty:`is_empty`,isNotEmpty:`is_not_empty`};function normalizeOperator(e){return L[e]??e}function normalizeFilterRule(e){let t=normalizeOperator(e.operator);return t===e.operator?e:{...e,operator:t}}const R=864e5,_e=/* @__PURE__ */ new Set([`days`,`weeks`,`months`,`years`]),ve=/* @__PURE__ */ new Set([`past`,`future`]);function isRelativeDateValue(e){if(typeof e!=`object`||!e)return!1;let t=e;return typeof t.amount==`number`&&Number.isFinite(t.amount)&&t.amount>0&&typeof t.unit==`string`&&_e.has(t.unit)&&typeof t.direction==`string`&&ve.has(t.direction)}function utcDayStart(e){return Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate())}function shiftUtcDay(e,t,n){if(n===`days`)return e+t*R;if(n===`weeks`)return e+t*7*R;let r=new Date(e),i=r.getUTCFullYear()+(n===`years`?t:0),a=r.getUTCMonth()+(n===`months`?t:0),o=new Date(Date.UTC(i,a+1,0)).getUTCDate();return Date.UTC(i,a,Math.min(r.getUTCDate(),o))}function resolveIsWithinBounds(e,t=/* @__PURE__ */ new Date){if(!isRelativeDateValue(e))return null;let n=utcDayStart(t),r=Math.trunc(e.amount),i=e.direction===`past`?{startMs:shiftUtcDay(n,-r,e.unit),endMs:n+R}:{startMs:n,endMs:shiftUtcDay(n,r,e.unit)+R};return Number.isFinite(i.startMs)&&Number.isFinite(i.endMs)?i:null}function resolveUtcDayBounds(e){if(!Number.isFinite(e))return null;let t=utcDayStart(new Date(e));return Number.isFinite(t)?{startMs:t,endMs:t+R}:null}function toUtcDayString(e){return new Date(e).toISOString().slice(0,10)}const z=/* @__PURE__ */ new Set([`relation`,`document`,`user`]),B={id:`text`,objectId:`text`,objectName:`text`,tenantId:`text`,label:`text`,createdAt:`date`,updatedAt:`date`,deletedAt:`date`,deletedBy:`user`,createdBy:`user`,lastUpdatedBy:`user`,visibility:`select`,ownedBy:`user`,parentId:`text`,childIds:`relation`},V={before:`"less_than"`,after:`"greater_than"`,on_or_before:`"less_or_equal"`,on_or_after:`"greater_or_equal"`,is_checked:`"is" with value true`,is_not_checked:`"is" with value false`,day_month_eq:`"on_day_month"`},ye=new Set(Object.entries(b).filter(([,e])=>e.includes(`any_of`)&&!e.includes(`contains`)).map(([e])=>e)),be={contains:`any_of`,not_contains:`none_of`};function resolveCanonicalOperator(e,t){let r=V[e];if(r){let t=`Unknown filter operator "${e}" — use ${r}`;throw new n(t,[{path:[`operator`],message:t}])}let i=normalizeOperator(e),a=be[i];if(a&&ye.has(t)){let e=`Operator "${i}" is not valid for type "${t}" — use "${a}"`;throw new n(e,[{path:[`operator`],message:e}])}return i}function assertPropertyOperator(e,t,r){let i=resolveCanonicalOperator(e,t);if(!r.includes(i)){let i=`Operator "${e}" is not valid for property type "${t}". Valid operators: ${r.length?r.join(`, `):`(no operators registered for this type)`}.`;throw new n(i,[{path:[`operator`],message:i}])}return i}function assertRelativeDateValue(e){if(e.operator===`is_within`&&!isRelativeDateValue(e.value)){let e=`Operator "is_within" requires a relative-date value { amount: positive number, unit: days|weeks|months|years, direction: past|future }`;throw new n(e,[{path:[`value`],message:e}])}}const xe=/^(\d{4}-\d{2}-\d{2})(?:[T ](?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z|[+-](?:(?:0\d|1[0-3])(?::[0-5]\d)?|14(?::00)?))?)?$/,Se=/* @__PURE__ */ new Set([`is`,`is_not`,`less_than`,`less_or_equal`,`greater_than`,`greater_or_equal`]);function assertAbsoluteDateValue(e,t){if(t!==`date`||!Se.has(e.operator))return;let r=e.value;if(r==null||isDynamicValue(r)||typeof r==`string`&&isCastableDay(r))return;let i=`Filter on a date attribute expected a YYYY-MM-DD day, optionally followed by a time, received ${JSON.stringify(r)}`;throw new n(i,[{path:[`value`],message:i}])}function isCastableDay(e){let t=xe.exec(e)?.[1];return!t||t.startsWith(`0000-`)?!1:isCalendarDay(t)}function resolveComparandType(e){return e.type===`formula`&&e.returnType===`date`?`date`:resolveEffectiveFilterType(e)}function applyCanonicalForm(e,t,n){e.operator=t,canonicalizeFilterValue(e,n),assertRelativeDateValue(e),assertAbsoluteDateValue(e,n)}function assertDynamicValueForAttribute(e,t){if(!isDynamicValue(e.value))return;let r=e.value;if(r.dynamic===`actor`&&t!==`user`){let e=`actor token (@me) is only valid on user attributes, not "${t}"`;throw new n(e,[{path:[`value`],message:e}])}if(r.dynamic===`date`&&t!==`date`){let e=`date token (@today/@now) is only valid on date attributes, not "${t}"`;throw new n(e,[{path:[`value`],message:e}])}}const H=y.map(e=>`"${e}"`).join(`, `);function operatorList(e){return e.length?e.join(`, `):`(not filterable)`}function qualifyWithSchema(e){if(z.has(e.type))return e.properties}function locationPartsHint(e){return e===`location`?` A location is filtered on one of its parts: set "property" to one of ${H} and use a text operator (e.g. contains).`:``}function dottedPathHint(e,t,n){let r=` Dotted paths are not supported — `;if(n.type===`location`)return`${r}set "attribute" to "${e}" and "property" to ${isLocationFilterProperty(t)?`"${t}"`:`one of ${H}`}.`;let i=qualifyWithSchema(n);if(i){let n=i.definitions.map(e=>`"${e.name}"`).join(`, `);return`${r}set "attribute" to "${e}" and "property" to ${i.definitions.some(e=>e.name===t)?`"${t}"`:`one of ${n}`} to filter on the edge property.`}let a=attributeFilterTarget(n).operators;return`${r}${a.length?`set "attribute" to "${e}" and use one of ${a.join(`, `)}`:`"${e}" is not filterable`}; the full-text "query" parameter matches tokens by relevance, not values.`}function collectQualifiedRuleIssues(e,t){try{return validateQualifiedRule({...e},t),[]}catch(e){if(!(e instanceof n))throw e;return e.errors.map(e=>({...e,path:[...e.path]}))}}function validateQualifiedRule(e,t){if(typeof e.attribute!=`string`){let e=`A filter rule needs an attribute: filters are one combinator and a flat list of rules`;throw new n(e,[{path:[`attribute`],message:e}])}let r=t.attributes.find(t=>t.name===e.attribute),i=r?[]:systemColumnFilterTarget(e.attribute)?.operators??[];if(!r&&i.length===0){let[r,...i]=e.attribute.split(`.`),a=i.length>0?t.attributes.find(e=>e.name===r):void 0,o=a?dottedPathHint(r??``,i[0]??``,a):e.attribute.includes(`.`)?` Dotted paths are not supported — filter on the attribute name alone with a structured operator (contains, any_of, …); the full-text "query" parameter matches tokens by relevance, not values.`:``,s=`Unknown attribute: ${e.attribute}${o}`;throw new n(s,[{path:[`attribute`],message:s}])}if(e.quantifier!==void 0&&!e.property){let e=`quantifier is only valid on qualified edge rules (set "property")`;throw new n(e,[{path:[`quantifier`],message:e}])}if(!r){if(e.property)throw new n(`Cannot qualify system attribute "${e.attribute}"`,[{path:[`property`],message:`"${e.attribute}" is a system column, not a reference`}]);let t=B[e.attribute]??`text`,r=resolveCanonicalOperator(e.operator,t);if(!i.includes(r)){let t=`Operator "${e.operator}" is not valid for system attribute "${e.attribute}". Valid operators: ${i.join(`, `)}.`;throw new n(t,[{path:[`operator`],message:t}])}applyCanonicalForm(e,r,t);return}if(!e.property){assertDynamicValueForAttribute(e,r.type);let t=attributeFilterTarget(r).operators,i=resolveCanonicalOperator(e.operator,r.type);if(!t.includes(i)){let i=`Operator "${e.operator}" is not valid for attribute "${r.name}". Valid operators: ${operatorList(t)}.${locationPartsHint(r.type)}`;throw new n(i,[{path:[`operator`],message:i}])}applyCanonicalForm(e,i,resolveComparandType(r));return}if(r.type===`location`){if(e.quantifier!==void 0){let e=`quantifier is not valid on a location part — a location is one value, not a set of edges`;throw new n(e,[{path:[`quantifier`],message:e}])}if(!isLocationFilterProperty(e.property)){let t=`Property "${e.property}" is not a part of location "${e.attribute}". Valid parts: ${H}.`;throw new n(t,[{path:[`property`],message:t}])}assertDynamicValueForAttribute(e,`text`);let{operators:t}=locationPartFilterTarget(r.name,e.property);applyCanonicalForm(e,assertPropertyOperator(e.operator,`text`,t),`text`);return}if(!z.has(r.type))throw new n(`Cannot qualify ${r.type} attribute "${e.attribute}"`,[{path:[`property`],message:`Attribute "${e.attribute}" is not a reference type`}]);let a=r.properties;if(!a)throw new n(`Attribute "${e.attribute}" has no qualifyWith schema`,[{path:[`property`],message:`"${e.attribute}" has no qualifyWith`}]);let o=a.definitions.find(t=>t.name===e.property);if(!o)throw new n(`Property "${e.property}" not defined on "${e.attribute}".qualifyWith()`,[{path:[`property`],message:`Unknown property: ${e.property}`}]);let{operators:s}=edgePropertyFilterTarget(r.name,o);applyCanonicalForm(e,assertPropertyOperator(e.operator,o.type,s),o.type)}const Ce=r.array(r.string()).max(A.columnsPerTab),U=r.array(r.string().min(1)).max(A.columnsPerTab).refine(e=>new Set(e).size===e.length,{message:`Displayed attribute names must be unique`}),we=r.object({attribute:r.string().describe(`Attribute to sort by`),direction:r.enum([`asc`,`desc`]).describe(`asc or desc`)}).strict(),W=r.array(we).max(A.sortsPerTab),Te=r.object({amount:r.number().describe(`Count`),unit:r.enum([`days`,`weeks`,`months`,`years`]).describe(`Unit`),direction:r.enum([`past`,`future`]).describe(`Past or future`)}).strict(),Ee=r.object({value:r.number().nullable().describe(`Amount`),code:r.array(r.string()).optional().describe(`Currency codes`)}).strict(),De=r.object({phoneNumber:r.string().nullable().describe(`Number`),countryCode:r.string().optional().describe(`ISO country code`)}).strict(),Oe=r.discriminatedUnion(`dynamic`,[r.object({dynamic:r.literal(`actor`).describe(`Resolved at filter time`),ref:r.literal(`current`).describe(`The current actor`)}).strict(),r.object({dynamic:r.literal(`date`).describe(`Resolved at filter time`),anchor:r.enum([`today`,`now`]).describe(`Anchor`)}).strict()]),ke=r.object({month:r.number().describe(`1-12`),day:r.number().describe(`Day`)}).strict(),Ae=r.union([r.string(),r.number(),r.boolean(),r.array(r.string()),Te,Ee,De,ke,Oe,r.null()]),je=r.enum([`is`,`is_not`,`contains`,`not_contains`,`starts_with`,`ends_with`,`is_empty`,`is_not_empty`,`less_than`,`greater_than`,`less_or_equal`,`greater_or_equal`,`is_within`,`on_day_month`,`any_of`,`none_of`],{error:e=>{let t=e.input,n=typeof t==`string`?V[t]:void 0;return n?`Unknown filter operator "${t}" — use ${n}`:void 0}}),Me=r.object({attribute:r.string().describe(`Attribute to filter on`),property:r.string().optional().describe(`Qualified edge property`),quantifier:r.enum([`any`,`none`]).optional().describe(`For a multi-value attribute`),operator:je.describe(`Comparison`),value:Ae.describe(`Comparison value, by attribute type`)}).strict(),Ne=r.array(Me).max(A.filterRulesPerTab),G=r.object({combinator:r.enum([`and`,`or`]).describe(`Match every rule or any rule`),rules:Ne.describe(`The rules`)}).strict(),K=r.object({object:r.string().optional().describe(`Every record of this object`),relation:r.string().optional().describe(`Records linked through this relation`)}).strict().superRefine((e,t)=>{e.object===void 0&&e.relation===void 0&&t.addIssue({code:`custom`,message:`Collection source must define an object, a relation, or both`})}).transform(e=>e.relation===void 0?{object:e.object}:e.object===void 0?{relation:e.relation}:{object:e.object,relation:e.relation}),q=1e4;function isPlainJsonObject(e){let t=Object.getPrototypeOf(e);return t===null||t===Object.prototype||Object.getPrototypeOf(t)===null&&t.constructor?.name===`Object`}function addJsonIssue(e,t,n=[]){e.addIssue({code:`custom`,message:t,path:n})}function pushJsonArrayChildren(e,t,n,r){for(let n of Reflect.ownKeys(e))n!==`length`&&(n===`__proto__`?addJsonIssue(r,`The __proto__ key is not allowed in custom props`,[...t.path,n]):typeof n!=`symbol`&&/^(0|[1-9]\d*)$/.test(n)||addJsonIssue(r,`Arrays cannot contain non-index JSON properties`,[...t.path,n]));for(let i=e.length-1;i>=0;i--){let a=Object.getOwnPropertyDescriptor(e,String(i)),o=[...t.path,i];a&&`value`in a?n.push({kind:`enter`,value:a.value,path:o,depth:t.depth+1}):addJsonIssue(r,`Sparse arrays are not valid JSON values`,o)}}function pushJsonObjectChildren(e,t,n,r){let i=Reflect.ownKeys(e);for(let a=i.length-1;a>=0;a--){let o=i[a],s=[...t.path,o];if(o===`__proto__`){addJsonIssue(r,`The __proto__ key is not allowed in custom props`,s);continue}if(typeof o==`symbol`){addJsonIssue(r,`Symbol keys are not valid JSON keys`,s);continue}let c=Object.getOwnPropertyDescriptor(e,o);c?.enumerable&&`value`in c?n.push({kind:`enter`,value:c.value,path:s,depth:t.depth+1}):addJsonIssue(r,`Custom props must contain enumerable data properties only`,s)}}function validateJsonProps(e,t){if(typeof e!=`object`||!e){addJsonIssue(t,`Expected a plain JSON object`);return}try{if(Array.isArray(e)||!isPlainJsonObject(e)){addJsonIssue(t,`Expected a plain JSON object`);return}}catch{addJsonIssue(t,`Custom props contain an object that cannot be safely inspected`);return}let n=/* @__PURE__ */ new WeakSet,r=[{kind:`enter`,value:e,path:[],depth:0}],i=0;for(;r.length>0;){let e=r.pop();if(!e)break;if(e.kind===`exit`){n.delete(e.value);continue}if(i++,i>q){addJsonIssue(t,`Custom props cannot exceed ${q.toLocaleString(`en-US`)} total JSON nodes`,e.path);return}if(e.depth>64){addJsonIssue(t,`Custom props cannot exceed depth 64`,e.path);continue}let a=e.value;if(!(a===null||typeof a==`string`||typeof a==`boolean`||typeof a==`number`&&Number.isFinite(a))){if(typeof a!=`object`)addJsonIssue(t,`Expected a JSON value`,e.path);else if(n.has(a))addJsonIssue(t,`Custom props cannot contain circular references`,e.path);else try{if(Array.isArray(a)){n.add(a),r.push({kind:`exit`,value:a}),pushJsonArrayChildren(a,e,r,t);continue}if(!isPlainJsonObject(a)){addJsonIssue(t,`Expected an array or plain JSON object`,e.path);continue}n.add(a),r.push({kind:`exit`,value:a}),pushJsonObjectChildren(a,e,r,t)}catch{addJsonIssue(t,`Custom props contain an object that cannot be safely inspected`,e.path)}}}}const Pe=r.unknown().superRefine(validateJsonProps).transform(e=>e),J=r.literal(M),Fe={span:J.optional().describe(`Columns of 12 this field occupies`),label:r.string().optional().describe(`Overrides the attribute's label`),readOnly:r.boolean().optional().describe(`Shows the value, not editable`)},Ie=r.object({attribute:r.string().describe(`Attribute API name shown by this field`),...Fe}).strict(),Le=r.object({name:r.string().describe(`Group API name, unique in the form`),label:r.string().describe(`Label people see`),description:r.string().optional().describe(`Extra context under the label`),collapsible:r.boolean().optional().describe(`Whether the group can be collapsed`),collapsed:r.boolean().optional().describe(`Whether the group starts collapsed`),fields:r.array(Ie).max(A.fieldsPerGroup).describe(`Fields in this group, in order`)}).strict();function refineFormContent(e,t){e.groups.reduce((e,t)=>e+t.fields.length,0)>A.fieldsPerFormTab&&t.addIssue({code:`too_big`,origin:`array`,maximum:A.fieldsPerFormTab,inclusive:!0,message:`A form content can contain at most ${A.fieldsPerFormTab} fields`,path:[`groups`]});let n=/* @__PURE__ */ new Set,r=/* @__PURE__ */ new Set;e.groups.forEach((e,i)=>{n.has(e.name)&&t.addIssue({code:`custom`,message:`Duplicate group name "${e.name}"`,path:[`groups`,i,`name`]}),n.add(e.name),e.fields.forEach((e,n)=>{r.has(e.attribute)&&t.addIssue({code:`custom`,message:`Duplicate field attribute "${e.attribute}"`,path:[`groups`,i,`fields`,n,`attribute`]}),r.add(e.attribute)})})}const Y={name:r.string().describe(`Content API name, unique in the view`),label:r.string().optional().describe(`Label people see`),icon:j.optional().describe(`Icon name`),placement:r.enum([`main`,`aside`,`grid`]).describe(`main: the tab strip. aside: the side panel. grid: a page block`),width:J.optional().describe(`Page block width in twelfths of its line`),height:r.number().int().positive().optional().describe(`Page block height in rows, for kinds that stretch`),joined:r.boolean().optional().describe(`Page block sharing the card of the block before it`)},Re={...Y,type:r.literal(`collection`),source:K.describe(`object: every record; relation: records linked to this record; both: records of object whose relation points at this record`),visibility:r.enum(E).optional().describe(`all: no scope; workspace: every member; private: viewer's own; shared: private records other members shared with the viewer`),columns:r.array(r.union([r.string(),r.object({relationProperty:r.string().refine(e=>e.trim().length>0).describe(`Qualified edge property shown as a column`)}).strict()])).max(A.columnsPerTab).optional().describe(`Table columns, in order`),descriptionAttribute:r.string().optional().describe(`Secondary line under each row's title (list layout)`),displayAttributes:U.optional().describe(`Attributes shown on each card`),filters:G.optional().describe(`Restricts which records show`),sorts:W.optional().describe(`Sort order`),actions:r.enum([`create`,`update`,`delete`,`attach`,`detach`]).array().optional().describe(`Offered actions; absent = every action, [] = none`),openMode:r.enum([`page`,`peek`]).optional().describe(`page or peek (the record panel)`),createMode:r.enum([`page`,`peek`,`inline`]).optional().describe(`page, peek, or inline (creates without opening)`)},ze=r.object({...Re,layout:r.enum([`table`,`list`,`kanban`]).describe(`table columns, list cards, kanban board grouped by a select/status attribute`),columnSizing:r.record(r.string(),r.number()).optional().describe(`Column widths in pixels, by attribute name`),groupByAttribute:r.string().optional().describe(`Kanban only: the select or status attribute that names the columns`),kanbanColumnOrder:r.array(r.string()).optional().describe(`Kanban: column order by option value`),kanbanColumnVisibility:r.record(r.string(),r.boolean()).optional().describe(`Kanban: which columns are shown`),kanbanPinnedColumns:r.array(r.string()).optional().describe(`Kanban: columns pinned first`)}).strict().superRefine((e,t)=>{let n=[`groupByAttribute`,`kanbanColumnOrder`,`kanbanColumnVisibility`,`kanbanPinnedColumns`];if(e.layout===`kanban`)e.groupByAttribute===void 0&&t.addIssue({code:`custom`,path:[`groupByAttribute`],message:`A kanban layout requires groupByAttribute`});else for(let r of n)e[r]!==void 0&&t.addIssue({code:`custom`,path:[r],message:`Only a kanban layout groups by an attribute`})}),X={...Y,type:r.literal(`form`),groups:r.array(Le).max(A.groupsPerFormTab).describe(`Field groups, in order`),formColumns:r.union([r.literal(1),r.literal(2),r.literal(3)]).optional().describe(`Grid columns, 1-3`),density:r.enum([`compact`,`comfortable`,`spacious`]).optional().describe(`Vertical spacing between fields`)},Be=r.object(X).strict().superRefine(refineFormContent),Ve=r.object({...X,groups:X.groups.min(1,`A published form content requires at least one group`)}).strict().superRefine(refineFormContent),Z=[ze,r.object({...Y,type:r.literal(`custom`),extension:r.string().describe(`Name of a registered extension`),parameters:r.lazy(()=>Pe).optional().describe(`Extension parameters`)}).strict(),r.object({...Y,type:r.literal(`activity`)}).strict(),r.object({...Y,type:r.literal(`richtext`),attribute:r.string().describe(`Richtext attribute edited in place`),titleAttribute:r.string().optional().describe(`Text attribute shown as the title`)}).strict(),r.object({...Y,type:r.literal(`documents`),allowUpload:r.boolean().optional().describe(`Lets people add files here`),allowRemove:r.boolean().optional().describe(`Lets people remove files here`),hideAttachments:r.boolean().optional().describe(`Hides files attached elsewhere (e.g. emails)`),relations:r.array(r.string()).optional().describe(`Document relations shown; the record's own files if absent`)}).strict(),r.object({...Y,type:r.literal(`forms`),objectName:r.string().optional().describe(`Limits to this object's published forms`)}).strict(),r.object({...Y,type:r.literal(`emails`),emailAttributes:r.array(r.string()).max(A.emailAttributesPerTab).describe(`Addresses`)}).strict(),r.object({...Y,type:r.literal(`meetings`),emailAttributes:r.array(r.string()).max(A.emailAttributesPerTab).describe(`Addresses`)}).strict(),r.object({...Y,type:r.literal(`page`),page:r.object({object:r.string().describe(`Its object`),name:r.string().describe(`Its name`)}).strict().describe(`The record page this tab renders`)}).strict()],He=r.discriminatedUnion(`type`,[Be,...Z]),Q=r.discriminatedUnion(`type`,[Ve,...Z]),$={name:r.string(),label:r.string(),description:r.string().optional(),icon:j.optional()};function contentViewBaseSchemaFor(e){let t=r.array(e).max(A.tabsPerView);return r.discriminatedUnion(`context`,[r.object({...$,object:r.string(),context:r.enum([`collection`,`record`]),default:r.boolean().optional(),anchors:r.record(r.string(),r.object({after:r.string()}).strict()).optional(),contents:t}).strict(),r.object({...$,object:r.string().optional(),context:r.literal(`page`),home:r.boolean().optional(),contents:t}).strict()])}const Ue=contentViewBaseSchemaFor(He),We=contentViewBaseSchemaFor(Q);function addDuplicateContentNameIssues(e,t){let n=/* @__PURE__ */ new Set;e.contents.forEach((e,r)=>{n.has(e.name)&&t.addIssue({code:`custom`,message:`Duplicate content name "${e.name}"`,path:[`contents`,r,`name`]}),n.add(e.name)})}const Ge=[`width`,`height`,`joined`];function addPlacementIssues(e,t){e.contents.forEach((n,r)=>{let i=n.placement===`grid`;if(!i)for(let e of Ge)n[e]!==void 0&&t.addIssue({code:`custom`,message:`Only a page block takes ${e}`,path:[`contents`,r,e]});e.context===`page`&&!i&&t.addIssue({code:`custom`,message:`Content "${n.name}" of a page must be placed on the grid`,path:[`contents`,r,`placement`]}),e.context!==`page`&&i&&t.addIssue({code:`custom`,message:`Content "${n.name}" cannot be placed on a grid outside a page`,path:[`contents`,r,`placement`]})}),e.contents.forEach((e,n)=>{e.type===`custom`&&e.extension===`heading`&&(e.label===void 0||e.label.trim()===``)&&t.addIssue({code:`custom`,message:`A heading needs a label`,path:[`contents`,n,`label`]})}),e.home&&e.object!==void 0&&t.addIssue({code:`custom`,message:`Only a standalone page can be the home`,path:[`home`]})}const Ke=Ue.superRefine((e,t)=>{let n=e;addDuplicateContentNameIssues(n,t),addPlacementIssues(n,t)}),qe=We.superRefine((e,t)=>{let n=e;addDuplicateContentNameIssues(n,t),addPlacementIssues(n,t),e.context!==`page`&&!e.contents.some(e=>e.placement===`main`)&&t.addIssue({code:`custom`,message:`A published view requires at least one main content`,path:[`contents`]})});function isPlainRecord(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}const Je=new Set(a),Ye=/^[a-zA-Z_][a-zA-Z0-9_]*$/,Xe=/^[a-z][a-z0-9-]*$/,Ze=A.labelLength,Qe=r.string().min(1,`Object name cannot be empty`).max(63,`Object name is too long (max 63 characters)`).regex(/^[a-z][a-z0-9-]*$/,{message:`Invalid object name format.
|
|
3
|
-
Name must be in kebab-case (slug format):
|
|
4
|
-
✅ Valid: 'products', 'user-profiles', 'order-items'
|
|
5
|
-
❌ Invalid: 'Products', 'userProfiles', 'user_profiles'`});function validateObjectName(n){try{Qe.parse(n)}catch(n){throw n instanceof r.ZodError?new e(n.issues[0].message,t.INVALID_OBJECT_NAME):n}}function validateViewName(e){if(!e||e.length===0)throw new n(`View name cannot be empty`,[{path:[`name`],message:`View name cannot be empty`}]);if(e.length>63)throw new n(`View name is too long`,[{path:[`name`],message:`View name is too long (max 63 characters)`}]);if(!Xe.test(e))throw new n(`Invalid view name format`,[{path:[`name`],message:`View name must be in kebab-case (e.g., 'detail', 'list-view')`}])}function assertUniqueBy(e,t,n){let r=/* @__PURE__ */ new Set;for(let i of e){let e=t(i);if(r.has(e))throw n(e);r.add(e)}}const $e=r.string().min(1,`Attribute name cannot be empty`).max(63,`Attribute name is too long (max 63 characters)`).regex(Ye,{message:`Invalid attribute name format.
|
|
6
|
-
Name must be a valid variable identifier:
|
|
7
|
-
✅ Valid: 'firstName', 'first_name', 'FirstName', 'FIRST_NAME'
|
|
8
|
-
❌ Invalid: 'first-name', 'first name', '123name', 'first.name'`}).refine(e=>!k.includes(e),{message:`This is a reserved attribute name. Reserved names: ${k.join(`, `)}`});function validateAttributeName(e){if(!e||e.length===0)throw Error(`[AttributeBuilder] Attribute name cannot be empty`);if(e.length>63)throw Error(`[AttributeBuilder] Attribute name is too long (max 63 characters)`);if(!Ye.test(e))throw Error(`[AttributeBuilder] Invalid attribute name format.
|
|
9
|
-
Name must be a valid variable identifier:
|
|
10
|
-
✅ Valid: 'firstName', 'first_name', 'FirstName', 'FIRST_NAME'
|
|
11
|
-
❌ Invalid: 'first-name', 'first name', '123name', 'first.name'`);if(k.includes(e))throw Error(`[AttributeBuilder] "${e}" is a reserved name and cannot be used as an attribute name.\nReserved names: ${k.join(`, `)}`)}function validateLabel(e){if(!e||e.length===0)throw Error(`[AttributeBuilder] Attribute label cannot be empty`);if(e.length>Ze)throw Error(`[AttributeBuilder] Attribute label is too long (max ${Ze} characters)`)}function validateIconName(e,t){if(!Je.has(e))throw Error(`[AttributeBuilder] Invalid icon "${e}" in ${t}.\nIcon must be one of the predefined icons from @standards/constants.`)}function validateOptions(e,t){let n=/* @__PURE__ */ 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.`)}}export{b as ATTRIBUTE_FILTER_OPERATORS,$e as ATTRIBUTE_NAME_SCHEMA,S as ATTRIBUTE_TYPES,x as ATTRIBUTE_TYPE_DESCRIPTORS,c as HIERARCHY_ATTRIBUTE_IDS,l as HIERARCHY_ATTRIBUTE_NAMES,ee as HIERARCHY_CHILD_IDS_LIMIT,E as LIST_VIEW_TAB_VISIBILITIES,y as LOCATION_FILTER_PROPERTIES,w as NATIVE_OBJECT_NAMES,C as NO_VALUE_OPERATORS,Qe as OBJECT_NAME_SCHEMA,re as OPERATORS_BY_TYPE,ce as PAGE_GRID_COLUMNS,pe as QUALIFIED_SEPARATOR,D as RECORD_LIST_SCOPES,ne as RELATION_TARGET_ANY,V as REMOVED_OPERATOR_REPLACEMENTS,k as RESERVED_ATTRIBUTE_NAMES,ie as RESERVED_OBJECT_NAMES,T as RESOURCE_VISIBILITIES,A as SCHEMA_LIMITS,L as SYNONYM_ALIASES,s as SYSTEM_ATTRIBUTES,o as SYSTEM_ATTRIBUTE_I18N_KEYS,O as SYSTEM_FIELD_NAMES,B as SYSTEM_FILTER_ATTRIBUTE_TYPES,assertUniqueBy,attributeFilterTarget,buildQualifiedAttribute,canonicalizeFilterValue,characterCount,collectQualifiedRuleIssues,K as collectionContentSourceSchema,se as colorIdSchema,Ce as columnsSchema,qe as contentViewDefinitionSchema,currentActor,U as displayAttributesSchema,Ke as draftContentViewDefinitionSchema,edgePropertyFilterTarget,extractCurrencyFilterValue,extractFilterValue,filterOperatorsOfType,G as filterStateSchema,filterTargetsOf,getAttributeCapabilities,getAttributeFilterOperators,getHierarchyAttributes,getObjectSystemAttributes,getOperatorPolarity,getRollupFilterOperators,getSystemAttributeI18nKey,getSystemAttributeList,hasTypeTrait,hasValueKind,j as iconNameSchema,inferInverseCardinality,isAttributeFilterable,isAttributeGroupable,isAttributeKanbanGroupable,isAttributeSearchable,isAttributeSortable,isBilateralRelation,isBlockWidth,isCalendarDay,isDynamicValue,isHierarchyAttribute,isLocationFilterProperty,isLocationPartOperator,isManagedSystemAttribute,isNativeObjectName,isNoValueOperator,isPlainRecord,isRelativeDateValue,isSetMembershipOperator,isUniversalRelation,isValueKindType,locationPartFilterTarget,normalizeFilterRule,normalizeForEdgeRpc,normalizeOperator,now,parseQualifiedAttribute,parseRecordListScope,parseResourceVisibility,Q as publishedViewContentDefinitionSchema,relationTargetsOf,resolveEffectiveFilterType,resolveIsWithinBounds,resolveUtcDayBounds,W as sortsSchema,systemColumnFilterTarget,toMultiValueOperator,toUtcDayString,today,J as twelfthsSchema,validateAttributeName,validateIconName,validateLabel,validateObjectName,validateOptions,validateQualifiedRule,validateViewName};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/*! © 2025-2026 AND YOU CREATE SAS (RCS Paris 940 190 614). Proprietary — see LICENSE (Standards SDK License 1.0). */
|
|
2
|
-
var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,__exportAll=(e,n)=>{let r=Object.setPrototypeOf({},null);for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n&1||t(r,Symbol.toStringTag,{value:`Module`}),n&2?r:Object.preventExtensions(r)},__copyProps=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},__toESM=(n,r,o)=>(o=n==null?{}:e(i(n)),__copyProps(r||!n||!n.__esModule||!a.call(n,`default`)?t(o,`default`,{value:n,enumerable:!0}):o,n));require("./zod-locale.js");const o=require("./exceptions.js");let s=require("zod");s=__toESM(s);let c=require("@standards/constants");const l={createdAt:`createdAt`,updatedAt:`updatedAt`,createdBy:`createdBy`,lastUpdatedBy:`lastUpdatedBy`,attachments:`attachments`,parentId:`parentId`,childIds:`childIds`};function getSystemAttributeI18nKey(e){return l[e]}const u={createdAt:{id:`system:createdAt`,name:`createdAt`,label:`Created time`,type:`date`,required:!1,system:!0,icon:`clock-circle`,description:`When this record was created`},updatedAt:{id:`system:updatedAt`,name:`updatedAt`,label:`Last edited time`,type:`date`,required:!1,system:!0,icon:`clock-circle`,description:`When this record was last modified`},createdBy:{id:`system:createdBy`,name:`createdBy`,label:`Created by`,type:`user`,required:!1,system:!0,multiple:!1,actors:!0,icon:`user`,description:`Actor who created this record`},lastUpdatedBy:{id:`system:lastUpdatedBy`,name:`lastUpdatedBy`,label:`Last edited by`,type:`user`,required:!1,system:!0,multiple:!1,actors:!0,icon:`user`,description:`Actor who last modified this record`},attachments:{id:`system:attachments`,name:`attachments`,label:`Attachments`,type:`document`,required:!1,system:!0,hidden:!0,icon:`paperclip`,description:`Free-form document attachments`}};function getSystemAttributeList(){return Object.values(u)}function isManagedSystemAttribute(e){return e.id?.startsWith(`system:`)??!1}const d=[`hierarchy:parentId`,`hierarchy:childIds`],f=/* @__PURE__ */ new Set([`parentId`,`childIds`]);function getHierarchyAttributes(e){if(!e.hierarchical)return[];let t=[{object:e.name}];return[{id:d[0],name:`parentId`,label:`Parent`,type:`relation`,cardinality:`one`,targets:t,required:!1,system:!0,icon:`corner-left-up`,description:`The record this one sits under`},{id:d[1],name:`childIds`,label:`Sub-items`,type:`relation`,cardinality:`many`,targets:t,required:!1,system:!0,icon:`corner-down-right`,description:`The records that sit under this one`}]}function isHierarchyAttribute(e){return e.id?.startsWith(`hierarchy:`)??!1}function getObjectSystemAttributes(e){return[...getSystemAttributeList(),...getHierarchyAttributes(e)]}const p=[`is`,`is_not`,`contains`,`not_contains`,`starts_with`,`ends_with`,`is_empty`,`is_not_empty`],m=[`is`,`is_not`,`less_than`,`greater_than`,`less_or_equal`,`greater_or_equal`,`is_empty`,`is_not_empty`],h=[`is`],g=[`is`,`is_not`,`less_than`,`greater_than`,`less_or_equal`,`greater_or_equal`,`is_within`,`on_day_month`,`is_empty`,`is_not_empty`],_=[`is`,`is_not`,`any_of`,`none_of`,`is_empty`,`is_not_empty`],v=[`any_of`,`none_of`,`is_empty`,`is_not_empty`],y=[`is`,`is_not`,`any_of`,`none_of`,`is_empty`,`is_not_empty`],b=[`is_empty`,`is_not_empty`],x=[`is`,`is_not`,`less_than`,`greater_than`,`less_or_equal`,`greater_or_equal`,`contains`,`not_contains`,`is_empty`,`is_not_empty`],S=[`city`,`postalCode`,`country`];function isLocationFilterProperty(e){return S.includes(e)}const C={text:p,richtext:[],number:m,checkbox:h,date:g,phone:[`is`,`is_not`,`contains`,`not_contains`,`starts_with`,`is_empty`,`is_not_empty`],currency:m,status:_,select:_,multiselect:v,location:[],user:y,relation:y,formula:x,document:b},w={text:{value:`plain`,traits:[`placeholder`,`searchable`,`sortable`]},richtext:{value:`plain`,traits:[`searchable`,`content`]},number:{value:`plain`,traits:[`placeholder`,`sortable`]},checkbox:{value:`boolean`,traits:[`sortable`]},date:{value:`plain`,traits:[`placeholder`,`sortable`]},phone:{value:`plain`,traits:[`placeholder`,`searchable`,`sortable`]},currency:{value:`plain`,traits:[`placeholder`,`sortable`,`groupable`]},status:{value:`options`,traits:[`searchable`,`sortable`,`groupable`]},location:{value:`plain`,traits:[]},select:{value:`options`,traits:[`placeholder`,`searchable`,`sortable`]},multiselect:{value:`options`,traits:[`placeholder`,`searchable`]},user:{value:`reference`,traits:[]},relation:{value:`reference`,traits:[`qualified`]},formula:{value:`computed`,traits:[]},rollup:{value:`computed`,traits:[]},document:{value:`reference`,traits:[`content`,`qualified`]}};function descriptorOf(e){return Object.prototype.hasOwnProperty.call(w,e)?w[e]:void 0}function isValueKindType(e,t){return descriptorOf(e)?.value===t}function hasValueKind(e,t){return isValueKindType(e.type,t)}function hasTypeTrait(e,t){return descriptorOf(e)?.traits.includes(t)??!1}const ee={plain:`static`,boolean:`automatic`,options:`static`,reference:`static`,computed:`forbidden`};function getAttributeCapabilities(e){let t=!!(e.hidden||e.archived),n=!e.archived,r=descriptorOf(e.type)?.value,i=r===`computed`,a=e.type===`document`,o=r===`reference`&&!isHierarchyAttribute(e),s=getAttributeCardinality(e),c=t?[]:getRawFilterOperators(e),l=c.length>0&&!t,u=!t&&hasTypeTrait(e.type,`searchable`),d=!t&&hasTypeTrait(e.type,`sortable`),f=!t&&hasTypeTrait(e.type,`groupable`),p=!t&&(e.type===`status`||e.type===`select`),m=isManagedSystemAttribute(e),h=i||a||m,g=!(t||h),_=r===void 0?`forbidden`:ee[r],v=r===`boolean`||i?`forbidden`:`allowed`,y=supportsMaxItems(e),b=hasTypeTrait(e.type,`placeholder`),x=hasTypeTrait(e.type,`content`),S=!(!e.deprecated||t),C=resolveEditMode(e);return{lifecycle:{active:n,deprecated:!!e.deprecated,visibleInArchitect:!0,visibleInRuntime:!t,warningWhenDeprecated:S},storage:{mode:i?`computed`:o?`edge`:`value`,cardinality:s,edgeBacked:o,preservesExistingValues:!!e.archived,qualifiedProperties:hasTypeTrait(e.type,`qualified`),polymorphic:getPolymorphicCapability(e),maxItems:y},authoring:{editable:g,readOnly:h,directEdit:g&&C===`inline`,required:v,defaultValue:_,placeholder:b,maxItems:y},presentation:{formField:!t&&e.type!==`richtext`,tableCell:!(t||x),defaultColumn:!(t||x),compactDisplay:!t,popoverEditor:!t&&C===`popover`,placeholder:b,warningWhenDeprecated:S},query:{filterable:l,searchable:u,sortable:d,groupable:f,kanbanGroupable:p,operators:c},agent:{readable:!t,writable:g&&!a,compactReadable:!t,contentReadable:!t&&x,requiresDedicatedTool:a},exchange:{importable:!t,exportable:!t,schemaExportable:!0,metadataExportable:!1}}}function getAttributeFilterOperators(e){return getAttributeCapabilities(e).query.operators}function isAttributeFilterable(e){return getAttributeCapabilities(e).query.filterable}function isAttributeSearchable(e){return getAttributeCapabilities(e).query.searchable}function isAttributeSortable$1(e){return getAttributeCapabilities(e).query.sortable}function isAttributeGroupable(e){return getAttributeCapabilities(e).query.groupable}function isAttributeKanbanGroupable(e){return getAttributeCapabilities(e).query.kanbanGroupable}function resolveEffectiveFilterType(e){if(e.type!==`rollup`)return e.type;let t=e;if(t.function===`earliest`||t.function===`latest`)return`date`;if(t.function===`original`){let e=t.targetAttributeType;if(e&&hasFilterOperatorEntry(e))return e}return`number`}function getRollupFilterOperators$1(e){let t=resolveEffectiveFilterType(e);return hasFilterOperatorEntry(t)?C[t]:C.number}function getRawFilterOperators(e){return e.type===`rollup`?getRollupFilterOperators$1(e):C[e.type]??[]}function getAttributeCardinality(e){return e.type===`multiselect`||e.type===`document`||e.type===`user`&&e.multiple===!0||e.type===`relation`&&e.cardinality===`many`?`many`:`one`}function getPolymorphicCapability(e){if(e.type!==`relation`)return`none`;let t=e.targets??[];return t.length===1&&t[0]?.object===`*`?`internal`:t.length>1?`code-only`:`none`}function supportsMaxItems(e){return e.type===`multiselect`||e.type===`relation`&&e.cardinality===`many`}function resolveEditMode(e){switch(e.type){case`checkbox`:return`inline`;case`number`:return e.renderAs===`rating`?`inline`:`default`;case`select`:case`multiselect`:return e.renderAs===`badges`?`inline`:`popover`;case`status`:case`relation`:case`user`:case`date`:return`popover`;default:return`default`}}function hasFilterOperatorEntry(e){return Object.prototype.hasOwnProperty.call(C,e)}const T=[`text`,`richtext`,`number`,`checkbox`,`date`,`phone`,`currency`,`status`,`location`,`select`,`multiselect`,`user`,`relation`,`formula`,`rollup`,`document`];function relationTargetsOf(e){return e.type!==`relation`||!Array.isArray(e.targets)?[]:e.targets.map(e=>e.object).filter(e=>e!==`*`)}function isUniversalRelation(e){return e.targets.length===1&&e.targets[0].object===`*`}function isBilateralRelation(e){return e.bilateral!==void 0}function inferInverseCardinality(e){return`many`}function isAttributeSortable(e){return isAttributeSortable$1(e)}const te=C,E=[`is_empty`,`is_not_empty`];function isNoValueOperator(e){return E.includes(e)}function getRollupFilterOperators(e){return getRollupFilterOperators$1(e)}const D=[`skill`,`memory`,`drives`,`artifact`,`meeting`];function isNativeObjectName(e){return D.includes(e)}const O=[`workspace`,`private`],k=[`all`,...O,`shared`],A=[...O,`shared`];function parseRecordListScope(e){if(typeof e==`string`&&A.includes(e))return e;throw new o.ValidationError(`visibility must be one of: ${A.join(`, `)} (received: ${String(e)})`,[])}function parseResourceVisibility(e){if(typeof e==`string`&&O.includes(e))return e;throw new o.ValidationError(`visibility must be one of: ${O.join(`, `)} (received: ${String(e)})`,[])}const ne=[`id`,`createdAt`,`updatedAt`,`createdBy`,`lastUpdatedBy`,`visibility`,`ownedBy`],j=[...ne,`objectId`,`label`,`embeddingText`,`values`,`metadata`,`deletedAt`,`deletedBy`,`schemaVersion`,`appearance`,`owned_by`,`parentId`,`childIds`,`passedAt`],re=D,M={attributesPerObject:300,tabsPerView:24,groupsPerFormTab:12,fieldsPerGroup:60,fieldsPerFormTab:150,columnsPerTab:50,displayAttributesPerCard:8,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,labelLength:128,attributeDescriptionLength:120};function characterCount(e){return[...e].length}const ie=Object.keys(c.COLORS),ae=new Set(c.ICONS),oe=s.enum(ie).describe(`A color id from the palette`),N=s.string().superRefine((e,t)=>{ae.has(e)||t.addIssue({code:`custom`,message:`Invalid icon name`})}).transform(e=>e),P=[1,2,3,4,5,6,7,8,9,10,11,12],se=P.length;function isBlockWidth(e){return P.includes(e)}const ce=/^\d{4}-\d{2}-\d{2}$/u;function isCalendarDay(e){if(!ce.test(e))return!1;let t=/* @__PURE__ */ new Date(`${e}T00:00:00Z`);return!Number.isNaN(t.getTime())&&t.toISOString().slice(0,10)===e}function isDynamicValue(e){return typeof e==`object`&&!!e&&!Array.isArray(e)&&`dynamic`in e}function currentActor(){return{dynamic:`actor`,ref:`current`}}function today(){return{dynamic:`date`,anchor:`today`}}function now(){return{dynamic:`date`,anchor:`now`}}function toAmount(e){if(typeof e==`number`)return Number.isFinite(e)?e:null;if(typeof e==`string`&&e.trim()!==``){let t=Number(e);return Number.isFinite(t)?t:null}return null}function extractCurrencyFilterValue(e){return typeof e==`object`&&e?`value`in e?toAmount(e.value):null:toAmount(e)}function extractFilterValue(e){return e==null?null:typeof e==`object`&&`value`in e?e.value??null:e}const le=/* @__PURE__ */ new Set([`is_not`,`not_contains`,`none_of`,`is_empty`]),ue={is_not:`is`,not_contains:`contains`,none_of:`any_of`,is_empty:`is_not_empty`};function getOperatorPolarity(e){return le.has(e)?`none`:`any`}function normalizeForEdgeRpc(e){return ue[e]??e}const F={is:`any_of`,is_not:`none_of`};function toMultiValueOperator(e){return F[e]??e}const de=new Set(Object.values(F).filter(e=>e!==void 0));function isSetMembershipOperator(e){return de.has(e)}function canonicalizeFilterValue(e,t){let n=e.value;if(isNoValueOperator(e.operator)||n==null||isDynamicValue(n))return;if(isSetMembershipOperator(e.operator)){Array.isArray(n)||(e.value=[n]);return}if(t!==`currency`)return;let r=extractCurrencyFilterValue(n);if(r!==null){e.value=r;return}if(!hasCurrencyAmount(n))return;let i=`Filter on a currency attribute expected a numeric amount, received ${JSON.stringify(n)}`;throw new o.ValidationError(i,[{path:[`value`],message:i}])}function hasCurrencyAmount(e){return typeof e!=`object`||`value`in e&&e.value!=null}function parseQualifiedAttribute(e){let t=e.indexOf(`__`);return t<=0||t+2>=e.length?{kind:`scalar`,attribute:e}:{kind:`qualified`,root:e.slice(0,t),property:e.slice(t+2)}}function buildQualifiedAttribute(e,t){return`${e}__${t}`}const I=C.text,fe=[`is`,`is_not`,`is_empty`,`is_not_empty`],L=[`is`,`is_not`,`any_of`,`none_of`,`is_empty`,`is_not_empty`],R={id:L,objectId:L,tenantId:L,label:C.text,createdAt:C.date,updatedAt:C.date,deletedAt:C.date,createdBy:C.user,lastUpdatedBy:C.user,parentId:L,childIds:[`is_empty`,`is_not_empty`]},pe=/* @__PURE__ */ new Set([`createdAt`,`updatedAt`,`deletedAt`]);function offeredOn(e,t){return pe.has(e)?t.filter(e=>e!==`on_day_month`):t}function fullyOffered(e,t,n,r){return{target:e,attribute:t,...r?{property:r}:{},operators:n,offered:n}}function attributeFilterTarget(e){let t=isHierarchyAttribute(e)?systemColumnFilterTarget(e.name):void 0;if(t)return t;let n=getAttributeFilterOperators(e);return{target:e.name,attribute:e.name,operators:n,offered:offeredOn(e.name,n)}}function locationPartFilterTarget(e,t){return{target:buildQualifiedAttribute(e,t),attribute:e,property:t,operators:I,offered:t===`country`?fe:I}}function edgePropertyFilterTarget(e,t){let n=hasOperatorEntry(t.type)?C[t.type]:[];return fullyOffered(buildQualifiedAttribute(e,t.name),e,n,t.name)}function hasOperatorEntry(e){return Object.prototype.hasOwnProperty.call(C,e)}const me=[`is`,`is_not`,`is_empty`,`is_not_empty`];function isMetadataKeyPath(e){return e.startsWith(`metadata.`)?e.slice(9).split(`.`).every(e=>e.length>0):!1}function systemColumnFilterTarget(e){if(isMetadataKeyPath(e))return{target:e,attribute:e,operators:me,offered:[]};let t=Object.prototype.hasOwnProperty.call(R,e)?R[e]:void 0;return t?{target:e,attribute:e,operators:t,offered:offeredOn(e,t)}:void 0}function filterOperatorsOfType(e){return isAttributeType(e)?getAttributeFilterOperators({type:e}):[]}function isAttributeType(e){return T.includes(e)}function isLocationPartOperator(e){return I.includes(e)}function carriesEdgeProperties(e){return hasTypeTrait(e.type,`qualified`)}function filterTargetsOf(e){let t=[];for(let n of e){if(n.type===`location`){for(let e of S)t.push(locationPartFilterTarget(n.name,e));continue}if(t.push(attributeFilterTarget(n)),!carriesEdgeProperties(n))continue;let e=n.properties?.definitions;for(let r of e??[])t.push(edgePropertyFilterTarget(n.name,r))}let n=new Set(e.map(e=>e.name));for(let e of Object.keys(R)){if(n.has(e))continue;let r=systemColumnFilterTarget(e);r&&t.push(r)}return t.filter(e=>e.operators.length>0)}const z={eq:`is`,equals:`is`,equal:`is`,"==":`is`,"=":`is`,neq:`is_not`,notEqual:`is_not`,isNot:`is_not`,"!=":`is_not`,"<>":`is_not`,lt:`less_than`,"<":`less_than`,gt:`greater_than`,">":`greater_than`,lte:`less_or_equal`,"<=":`less_or_equal`,gte:`greater_or_equal`,">=":`greater_or_equal`,in:`any_of`,isAnyOf:`any_of`,anyOf:`any_of`,oneOf:`any_of`,notIn:`none_of`,not_in:`none_of`,isNoneOf:`none_of`,noneOf:`none_of`,notOneOf:`none_of`,startsWith:`starts_with`,beginsWith:`starts_with`,endsWith:`ends_with`,doesNotContain:`not_contains`,notContain:`not_contains`,isEmpty:`is_empty`,isNotEmpty:`is_not_empty`};function normalizeOperator(e){return z[e]??e}function normalizeFilterRule(e){let t=normalizeOperator(e.operator);return t===e.operator?e:{...e,operator:t}}const B=864e5,he=/* @__PURE__ */ new Set([`days`,`weeks`,`months`,`years`]),ge=/* @__PURE__ */ new Set([`past`,`future`]);function isRelativeDateValue(e){if(typeof e!=`object`||!e)return!1;let t=e;return typeof t.amount==`number`&&Number.isFinite(t.amount)&&t.amount>0&&typeof t.unit==`string`&&he.has(t.unit)&&typeof t.direction==`string`&&ge.has(t.direction)}function utcDayStart(e){return Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate())}function shiftUtcDay(e,t,n){if(n===`days`)return e+t*B;if(n===`weeks`)return e+t*7*B;let r=new Date(e),i=r.getUTCFullYear()+(n===`years`?t:0),a=r.getUTCMonth()+(n===`months`?t:0),o=new Date(Date.UTC(i,a+1,0)).getUTCDate();return Date.UTC(i,a,Math.min(r.getUTCDate(),o))}function resolveIsWithinBounds(e,t=/* @__PURE__ */ new Date){if(!isRelativeDateValue(e))return null;let n=utcDayStart(t),r=Math.trunc(e.amount),i=e.direction===`past`?{startMs:shiftUtcDay(n,-r,e.unit),endMs:n+B}:{startMs:n,endMs:shiftUtcDay(n,r,e.unit)+B};return Number.isFinite(i.startMs)&&Number.isFinite(i.endMs)?i:null}function resolveUtcDayBounds(e){if(!Number.isFinite(e))return null;let t=utcDayStart(new Date(e));return Number.isFinite(t)?{startMs:t,endMs:t+B}:null}function toUtcDayString(e){return new Date(e).toISOString().slice(0,10)}const V=/* @__PURE__ */ new Set([`relation`,`document`,`user`]),H={id:`text`,objectId:`text`,objectName:`text`,tenantId:`text`,label:`text`,createdAt:`date`,updatedAt:`date`,deletedAt:`date`,deletedBy:`user`,createdBy:`user`,lastUpdatedBy:`user`,visibility:`select`,ownedBy:`user`,parentId:`text`,childIds:`relation`},U={before:`"less_than"`,after:`"greater_than"`,on_or_before:`"less_or_equal"`,on_or_after:`"greater_or_equal"`,is_checked:`"is" with value true`,is_not_checked:`"is" with value false`,day_month_eq:`"on_day_month"`},_e=new Set(Object.entries(C).filter(([,e])=>e.includes(`any_of`)&&!e.includes(`contains`)).map(([e])=>e)),ve={contains:`any_of`,not_contains:`none_of`};function resolveCanonicalOperator(e,t){let n=U[e];if(n){let t=`Unknown filter operator "${e}" — use ${n}`;throw new o.ValidationError(t,[{path:[`operator`],message:t}])}let r=normalizeOperator(e),i=ve[r];if(i&&_e.has(t)){let e=`Operator "${r}" is not valid for type "${t}" — use "${i}"`;throw new o.ValidationError(e,[{path:[`operator`],message:e}])}return r}function assertPropertyOperator(e,t,n){let r=resolveCanonicalOperator(e,t);if(!n.includes(r)){let r=`Operator "${e}" is not valid for property type "${t}". Valid operators: ${n.length?n.join(`, `):`(no operators registered for this type)`}.`;throw new o.ValidationError(r,[{path:[`operator`],message:r}])}return r}function assertRelativeDateValue(e){if(e.operator===`is_within`&&!isRelativeDateValue(e.value)){let e=`Operator "is_within" requires a relative-date value { amount: positive number, unit: days|weeks|months|years, direction: past|future }`;throw new o.ValidationError(e,[{path:[`value`],message:e}])}}const ye=/^(\d{4}-\d{2}-\d{2})(?:[T ](?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z|[+-](?:(?:0\d|1[0-3])(?::[0-5]\d)?|14(?::00)?))?)?$/,be=/* @__PURE__ */ new Set([`is`,`is_not`,`less_than`,`less_or_equal`,`greater_than`,`greater_or_equal`]);function assertAbsoluteDateValue(e,t){if(t!==`date`||!be.has(e.operator))return;let n=e.value;if(n==null||isDynamicValue(n)||typeof n==`string`&&isCastableDay(n))return;let r=`Filter on a date attribute expected a YYYY-MM-DD day, optionally followed by a time, received ${JSON.stringify(n)}`;throw new o.ValidationError(r,[{path:[`value`],message:r}])}function isCastableDay(e){let t=ye.exec(e)?.[1];return!t||t.startsWith(`0000-`)?!1:isCalendarDay(t)}function resolveComparandType(e){return e.type===`formula`&&e.returnType===`date`?`date`:resolveEffectiveFilterType(e)}function applyCanonicalForm(e,t,n){e.operator=t,canonicalizeFilterValue(e,n),assertRelativeDateValue(e),assertAbsoluteDateValue(e,n)}function assertDynamicValueForAttribute(e,t){if(!isDynamicValue(e.value))return;let n=e.value;if(n.dynamic===`actor`&&t!==`user`){let e=`actor token (@me) is only valid on user attributes, not "${t}"`;throw new o.ValidationError(e,[{path:[`value`],message:e}])}if(n.dynamic===`date`&&t!==`date`){let e=`date token (@today/@now) is only valid on date attributes, not "${t}"`;throw new o.ValidationError(e,[{path:[`value`],message:e}])}}const W=S.map(e=>`"${e}"`).join(`, `);function operatorList(e){return e.length?e.join(`, `):`(not filterable)`}function qualifyWithSchema(e){if(V.has(e.type))return e.properties}function locationPartsHint(e){return e===`location`?` A location is filtered on one of its parts: set "property" to one of ${W} and use a text operator (e.g. contains).`:``}function dottedPathHint(e,t,n){let r=` Dotted paths are not supported — `;if(n.type===`location`)return`${r}set "attribute" to "${e}" and "property" to ${isLocationFilterProperty(t)?`"${t}"`:`one of ${W}`}.`;let i=qualifyWithSchema(n);if(i){let n=i.definitions.map(e=>`"${e.name}"`).join(`, `);return`${r}set "attribute" to "${e}" and "property" to ${i.definitions.some(e=>e.name===t)?`"${t}"`:`one of ${n}`} to filter on the edge property.`}let a=attributeFilterTarget(n).operators;return`${r}${a.length?`set "attribute" to "${e}" and use one of ${a.join(`, `)}`:`"${e}" is not filterable`}; the full-text "query" parameter matches tokens by relevance, not values.`}function collectQualifiedRuleIssues(e,t){try{return validateQualifiedRule({...e},t),[]}catch(e){if(!(e instanceof o.ValidationError))throw e;return e.errors.map(e=>({...e,path:[...e.path]}))}}function validateQualifiedRule(e,t){if(typeof e.attribute!=`string`){let e=`A filter rule needs an attribute: filters are one combinator and a flat list of rules`;throw new o.ValidationError(e,[{path:[`attribute`],message:e}])}let n=t.attributes.find(t=>t.name===e.attribute),r=n?[]:systemColumnFilterTarget(e.attribute)?.operators??[];if(!n&&r.length===0){let[n,...r]=e.attribute.split(`.`),i=r.length>0?t.attributes.find(e=>e.name===n):void 0,a=i?dottedPathHint(n??``,r[0]??``,i):e.attribute.includes(`.`)?` Dotted paths are not supported — filter on the attribute name alone with a structured operator (contains, any_of, …); the full-text "query" parameter matches tokens by relevance, not values.`:``,s=`Unknown attribute: ${e.attribute}${a}`;throw new o.ValidationError(s,[{path:[`attribute`],message:s}])}if(e.quantifier!==void 0&&!e.property){let e=`quantifier is only valid on qualified edge rules (set "property")`;throw new o.ValidationError(e,[{path:[`quantifier`],message:e}])}if(!n){if(e.property)throw new o.ValidationError(`Cannot qualify system attribute "${e.attribute}"`,[{path:[`property`],message:`"${e.attribute}" is a system column, not a reference`}]);let t=H[e.attribute]??`text`,n=resolveCanonicalOperator(e.operator,t);if(!r.includes(n)){let t=`Operator "${e.operator}" is not valid for system attribute "${e.attribute}". Valid operators: ${r.join(`, `)}.`;throw new o.ValidationError(t,[{path:[`operator`],message:t}])}applyCanonicalForm(e,n,t);return}if(!e.property){assertDynamicValueForAttribute(e,n.type);let t=attributeFilterTarget(n).operators,r=resolveCanonicalOperator(e.operator,n.type);if(!t.includes(r)){let r=`Operator "${e.operator}" is not valid for attribute "${n.name}". Valid operators: ${operatorList(t)}.${locationPartsHint(n.type)}`;throw new o.ValidationError(r,[{path:[`operator`],message:r}])}applyCanonicalForm(e,r,resolveComparandType(n));return}if(n.type===`location`){if(e.quantifier!==void 0){let e=`quantifier is not valid on a location part — a location is one value, not a set of edges`;throw new o.ValidationError(e,[{path:[`quantifier`],message:e}])}if(!isLocationFilterProperty(e.property)){let t=`Property "${e.property}" is not a part of location "${e.attribute}". Valid parts: ${W}.`;throw new o.ValidationError(t,[{path:[`property`],message:t}])}assertDynamicValueForAttribute(e,`text`);let{operators:t}=locationPartFilterTarget(n.name,e.property);applyCanonicalForm(e,assertPropertyOperator(e.operator,`text`,t),`text`);return}if(!V.has(n.type))throw new o.ValidationError(`Cannot qualify ${n.type} attribute "${e.attribute}"`,[{path:[`property`],message:`Attribute "${e.attribute}" is not a reference type`}]);let i=n.properties;if(!i)throw new o.ValidationError(`Attribute "${e.attribute}" has no qualifyWith schema`,[{path:[`property`],message:`"${e.attribute}" has no qualifyWith`}]);let a=i.definitions.find(t=>t.name===e.property);if(!a)throw new o.ValidationError(`Property "${e.property}" not defined on "${e.attribute}".qualifyWith()`,[{path:[`property`],message:`Unknown property: ${e.property}`}]);let{operators:s}=edgePropertyFilterTarget(n.name,a);applyCanonicalForm(e,assertPropertyOperator(e.operator,a.type,s),a.type)}const xe=s.array(s.string()).max(M.columnsPerTab),G=s.array(s.string().min(1)).max(M.columnsPerTab).refine(e=>new Set(e).size===e.length,{message:`Displayed attribute names must be unique`}),Se=s.object({attribute:s.string().describe(`Attribute to sort by`),direction:s.enum([`asc`,`desc`]).describe(`asc or desc`)}).strict(),K=s.array(Se).max(M.sortsPerTab),Ce=s.object({amount:s.number().describe(`Count`),unit:s.enum([`days`,`weeks`,`months`,`years`]).describe(`Unit`),direction:s.enum([`past`,`future`]).describe(`Past or future`)}).strict(),we=s.object({value:s.number().nullable().describe(`Amount`),code:s.array(s.string()).optional().describe(`Currency codes`)}).strict(),Te=s.object({phoneNumber:s.string().nullable().describe(`Number`),countryCode:s.string().optional().describe(`ISO country code`)}).strict(),Ee=s.discriminatedUnion(`dynamic`,[s.object({dynamic:s.literal(`actor`).describe(`Resolved at filter time`),ref:s.literal(`current`).describe(`The current actor`)}).strict(),s.object({dynamic:s.literal(`date`).describe(`Resolved at filter time`),anchor:s.enum([`today`,`now`]).describe(`Anchor`)}).strict()]),De=s.object({month:s.number().describe(`1-12`),day:s.number().describe(`Day`)}).strict(),Oe=s.union([s.string(),s.number(),s.boolean(),s.array(s.string()),Ce,we,Te,De,Ee,s.null()]),ke=s.enum([`is`,`is_not`,`contains`,`not_contains`,`starts_with`,`ends_with`,`is_empty`,`is_not_empty`,`less_than`,`greater_than`,`less_or_equal`,`greater_or_equal`,`is_within`,`on_day_month`,`any_of`,`none_of`],{error:e=>{let t=e.input,n=typeof t==`string`?U[t]:void 0;return n?`Unknown filter operator "${t}" — use ${n}`:void 0}}),Ae=s.object({attribute:s.string().describe(`Attribute to filter on`),property:s.string().optional().describe(`Qualified edge property`),quantifier:s.enum([`any`,`none`]).optional().describe(`For a multi-value attribute`),operator:ke.describe(`Comparison`),value:Oe.describe(`Comparison value, by attribute type`)}).strict(),je=s.array(Ae).max(M.filterRulesPerTab),q=s.object({combinator:s.enum([`and`,`or`]).describe(`Match every rule or any rule`),rules:je.describe(`The rules`)}).strict(),J=s.object({object:s.string().optional().describe(`Every record of this object`),relation:s.string().optional().describe(`Records linked through this relation`)}).strict().superRefine((e,t)=>{e.object===void 0&&e.relation===void 0&&t.addIssue({code:`custom`,message:`Collection source must define an object, a relation, or both`})}).transform(e=>e.relation===void 0?{object:e.object}:e.object===void 0?{relation:e.relation}:{object:e.object,relation:e.relation}),Y=1e4;function isPlainJsonObject(e){let t=Object.getPrototypeOf(e);return t===null||t===Object.prototype||Object.getPrototypeOf(t)===null&&t.constructor?.name===`Object`}function addJsonIssue(e,t,n=[]){e.addIssue({code:`custom`,message:t,path:n})}function pushJsonArrayChildren(e,t,n,r){for(let n of Reflect.ownKeys(e))n!==`length`&&(n===`__proto__`?addJsonIssue(r,`The __proto__ key is not allowed in custom props`,[...t.path,n]):typeof n!=`symbol`&&/^(0|[1-9]\d*)$/.test(n)||addJsonIssue(r,`Arrays cannot contain non-index JSON properties`,[...t.path,n]));for(let i=e.length-1;i>=0;i--){let a=Object.getOwnPropertyDescriptor(e,String(i)),o=[...t.path,i];a&&`value`in a?n.push({kind:`enter`,value:a.value,path:o,depth:t.depth+1}):addJsonIssue(r,`Sparse arrays are not valid JSON values`,o)}}function pushJsonObjectChildren(e,t,n,r){let i=Reflect.ownKeys(e);for(let a=i.length-1;a>=0;a--){let o=i[a],s=[...t.path,o];if(o===`__proto__`){addJsonIssue(r,`The __proto__ key is not allowed in custom props`,s);continue}if(typeof o==`symbol`){addJsonIssue(r,`Symbol keys are not valid JSON keys`,s);continue}let c=Object.getOwnPropertyDescriptor(e,o);c?.enumerable&&`value`in c?n.push({kind:`enter`,value:c.value,path:s,depth:t.depth+1}):addJsonIssue(r,`Custom props must contain enumerable data properties only`,s)}}function validateJsonProps(e,t){if(typeof e!=`object`||!e){addJsonIssue(t,`Expected a plain JSON object`);return}try{if(Array.isArray(e)||!isPlainJsonObject(e)){addJsonIssue(t,`Expected a plain JSON object`);return}}catch{addJsonIssue(t,`Custom props contain an object that cannot be safely inspected`);return}let n=/* @__PURE__ */ new WeakSet,r=[{kind:`enter`,value:e,path:[],depth:0}],i=0;for(;r.length>0;){let e=r.pop();if(!e)break;if(e.kind===`exit`){n.delete(e.value);continue}if(i++,i>Y){addJsonIssue(t,`Custom props cannot exceed ${Y.toLocaleString(`en-US`)} total JSON nodes`,e.path);return}if(e.depth>64){addJsonIssue(t,`Custom props cannot exceed depth 64`,e.path);continue}let a=e.value;if(!(a===null||typeof a==`string`||typeof a==`boolean`||typeof a==`number`&&Number.isFinite(a))){if(typeof a!=`object`)addJsonIssue(t,`Expected a JSON value`,e.path);else if(n.has(a))addJsonIssue(t,`Custom props cannot contain circular references`,e.path);else try{if(Array.isArray(a)){n.add(a),r.push({kind:`exit`,value:a}),pushJsonArrayChildren(a,e,r,t);continue}if(!isPlainJsonObject(a)){addJsonIssue(t,`Expected an array or plain JSON object`,e.path);continue}n.add(a),r.push({kind:`exit`,value:a}),pushJsonObjectChildren(a,e,r,t)}catch{addJsonIssue(t,`Custom props contain an object that cannot be safely inspected`,e.path)}}}}const Me=s.unknown().superRefine(validateJsonProps).transform(e=>e),X=s.literal(P),Ne={span:X.optional().describe(`Columns of 12 this field occupies`),label:s.string().optional().describe(`Overrides the attribute's label`),readOnly:s.boolean().optional().describe(`Shows the value, not editable`)},Pe=s.object({attribute:s.string().describe(`Attribute API name shown by this field`),...Ne}).strict(),Fe=s.object({name:s.string().describe(`Group API name, unique in the form`),label:s.string().describe(`Label people see`),description:s.string().optional().describe(`Extra context under the label`),collapsible:s.boolean().optional().describe(`Whether the group can be collapsed`),collapsed:s.boolean().optional().describe(`Whether the group starts collapsed`),fields:s.array(Pe).max(M.fieldsPerGroup).describe(`Fields in this group, in order`)}).strict();function refineFormContent(e,t){e.groups.reduce((e,t)=>e+t.fields.length,0)>M.fieldsPerFormTab&&t.addIssue({code:`too_big`,origin:`array`,maximum:M.fieldsPerFormTab,inclusive:!0,message:`A form content can contain at most ${M.fieldsPerFormTab} fields`,path:[`groups`]});let n=/* @__PURE__ */ new Set,r=/* @__PURE__ */ new Set;e.groups.forEach((e,i)=>{n.has(e.name)&&t.addIssue({code:`custom`,message:`Duplicate group name "${e.name}"`,path:[`groups`,i,`name`]}),n.add(e.name),e.fields.forEach((e,n)=>{r.has(e.attribute)&&t.addIssue({code:`custom`,message:`Duplicate field attribute "${e.attribute}"`,path:[`groups`,i,`fields`,n,`attribute`]}),r.add(e.attribute)})})}const Z={name:s.string().describe(`Content API name, unique in the view`),label:s.string().optional().describe(`Label people see`),icon:N.optional().describe(`Icon name`),placement:s.enum([`main`,`aside`,`grid`]).describe(`main: the tab strip. aside: the side panel. grid: a page block`),width:X.optional().describe(`Page block width in twelfths of its line`),height:s.number().int().positive().optional().describe(`Page block height in rows, for kinds that stretch`),joined:s.boolean().optional().describe(`Page block sharing the card of the block before it`)},Ie={...Z,type:s.literal(`collection`),source:J.describe(`object: every record; relation: records linked to this record; both: records of object whose relation points at this record`),visibility:s.enum(k).optional().describe(`all: no scope; workspace: every member; private: viewer's own; shared: private records other members shared with the viewer`),columns:s.array(s.union([s.string(),s.object({relationProperty:s.string().refine(e=>e.trim().length>0).describe(`Qualified edge property shown as a column`)}).strict()])).max(M.columnsPerTab).optional().describe(`Table columns, in order`),descriptionAttribute:s.string().optional().describe(`Secondary line under each row's title (list layout)`),displayAttributes:G.optional().describe(`Attributes shown on each card`),filters:q.optional().describe(`Restricts which records show`),sorts:K.optional().describe(`Sort order`),actions:s.enum([`create`,`update`,`delete`,`attach`,`detach`]).array().optional().describe(`Offered actions; absent = every action, [] = none`),openMode:s.enum([`page`,`peek`]).optional().describe(`page or peek (the record panel)`),createMode:s.enum([`page`,`peek`,`inline`]).optional().describe(`page, peek, or inline (creates without opening)`)},Le=s.object({...Ie,layout:s.enum([`table`,`list`,`kanban`]).describe(`table columns, list cards, kanban board grouped by a select/status attribute`),columnSizing:s.record(s.string(),s.number()).optional().describe(`Column widths in pixels, by attribute name`),groupByAttribute:s.string().optional().describe(`Kanban only: the select or status attribute that names the columns`),kanbanColumnOrder:s.array(s.string()).optional().describe(`Kanban: column order by option value`),kanbanColumnVisibility:s.record(s.string(),s.boolean()).optional().describe(`Kanban: which columns are shown`),kanbanPinnedColumns:s.array(s.string()).optional().describe(`Kanban: columns pinned first`)}).strict().superRefine((e,t)=>{let n=[`groupByAttribute`,`kanbanColumnOrder`,`kanbanColumnVisibility`,`kanbanPinnedColumns`];if(e.layout===`kanban`)e.groupByAttribute===void 0&&t.addIssue({code:`custom`,path:[`groupByAttribute`],message:`A kanban layout requires groupByAttribute`});else for(let r of n)e[r]!==void 0&&t.addIssue({code:`custom`,path:[r],message:`Only a kanban layout groups by an attribute`})}),Q={...Z,type:s.literal(`form`),groups:s.array(Fe).max(M.groupsPerFormTab).describe(`Field groups, in order`),formColumns:s.union([s.literal(1),s.literal(2),s.literal(3)]).optional().describe(`Grid columns, 1-3`),density:s.enum([`compact`,`comfortable`,`spacious`]).optional().describe(`Vertical spacing between fields`)},Re=s.object(Q).strict().superRefine(refineFormContent),ze=s.object({...Q,groups:Q.groups.min(1,`A published form content requires at least one group`)}).strict().superRefine(refineFormContent),$=[Le,s.object({...Z,type:s.literal(`custom`),extension:s.string().describe(`Name of a registered extension`),parameters:s.lazy(()=>Me).optional().describe(`Extension parameters`)}).strict(),s.object({...Z,type:s.literal(`activity`)}).strict(),s.object({...Z,type:s.literal(`richtext`),attribute:s.string().describe(`Richtext attribute edited in place`),titleAttribute:s.string().optional().describe(`Text attribute shown as the title`)}).strict(),s.object({...Z,type:s.literal(`documents`),allowUpload:s.boolean().optional().describe(`Lets people add files here`),allowRemove:s.boolean().optional().describe(`Lets people remove files here`),hideAttachments:s.boolean().optional().describe(`Hides files attached elsewhere (e.g. emails)`),relations:s.array(s.string()).optional().describe(`Document relations shown; the record's own files if absent`)}).strict(),s.object({...Z,type:s.literal(`forms`),objectName:s.string().optional().describe(`Limits to this object's published forms`)}).strict(),s.object({...Z,type:s.literal(`emails`),emailAttributes:s.array(s.string()).max(M.emailAttributesPerTab).describe(`Addresses`)}).strict(),s.object({...Z,type:s.literal(`meetings`),emailAttributes:s.array(s.string()).max(M.emailAttributesPerTab).describe(`Addresses`)}).strict(),s.object({...Z,type:s.literal(`page`),page:s.object({object:s.string().describe(`Its object`),name:s.string().describe(`Its name`)}).strict().describe(`The record page this tab renders`)}).strict()],Be=s.discriminatedUnion(`type`,[Re,...$]),Ve=s.discriminatedUnion(`type`,[ze,...$]),He={name:s.string(),label:s.string(),description:s.string().optional(),icon:N.optional()};function contentViewBaseSchemaFor(e){let t=s.array(e).max(M.tabsPerView);return s.discriminatedUnion(`context`,[s.object({...He,object:s.string(),context:s.enum([`collection`,`record`]),default:s.boolean().optional(),anchors:s.record(s.string(),s.object({after:s.string()}).strict()).optional(),contents:t}).strict(),s.object({...He,object:s.string().optional(),context:s.literal(`page`),home:s.boolean().optional(),contents:t}).strict()])}const Ue=contentViewBaseSchemaFor(Be),We=contentViewBaseSchemaFor(Ve);function addDuplicateContentNameIssues(e,t){let n=/* @__PURE__ */ new Set;e.contents.forEach((e,r)=>{n.has(e.name)&&t.addIssue({code:`custom`,message:`Duplicate content name "${e.name}"`,path:[`contents`,r,`name`]}),n.add(e.name)})}const Ge=[`width`,`height`,`joined`];function addPlacementIssues(e,t){e.contents.forEach((n,r)=>{let i=n.placement===`grid`;if(!i)for(let e of Ge)n[e]!==void 0&&t.addIssue({code:`custom`,message:`Only a page block takes ${e}`,path:[`contents`,r,e]});e.context===`page`&&!i&&t.addIssue({code:`custom`,message:`Content "${n.name}" of a page must be placed on the grid`,path:[`contents`,r,`placement`]}),e.context!==`page`&&i&&t.addIssue({code:`custom`,message:`Content "${n.name}" cannot be placed on a grid outside a page`,path:[`contents`,r,`placement`]})}),e.contents.forEach((e,n)=>{e.type===`custom`&&e.extension===`heading`&&(e.label===void 0||e.label.trim()===``)&&t.addIssue({code:`custom`,message:`A heading needs a label`,path:[`contents`,n,`label`]})}),e.home&&e.object!==void 0&&t.addIssue({code:`custom`,message:`Only a standalone page can be the home`,path:[`home`]})}const Ke=Ue.superRefine((e,t)=>{let n=e;addDuplicateContentNameIssues(n,t),addPlacementIssues(n,t)}),qe=We.superRefine((e,t)=>{let n=e;addDuplicateContentNameIssues(n,t),addPlacementIssues(n,t),e.context!==`page`&&!e.contents.some(e=>e.placement===`main`)&&t.addIssue({code:`custom`,message:`A published view requires at least one main content`,path:[`contents`]})});function isPlainRecord(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}const Je=new Set(c.ICONS),Ye=/^[a-zA-Z_][a-zA-Z0-9_]*$/,Xe=/^[a-z][a-z0-9-]*$/,Ze=M.labelLength,Qe=s.string().min(1,`Object name cannot be empty`).max(63,`Object name is too long (max 63 characters)`).regex(/^[a-z][a-z0-9-]*$/,{message:`Invalid object name format.
|
|
3
|
-
Name must be in kebab-case (slug format):
|
|
4
|
-
✅ Valid: 'products', 'user-profiles', 'order-items'
|
|
5
|
-
❌ Invalid: 'Products', 'userProfiles', 'user_profiles'`});function validateObjectName(e){try{Qe.parse(e)}catch(e){throw e instanceof s.ZodError?new o.SchemaError(e.issues[0].message,o.SchemaErrorCode.INVALID_OBJECT_NAME):e}}function validateViewName(e){if(!e||e.length===0)throw new o.ValidationError(`View name cannot be empty`,[{path:[`name`],message:`View name cannot be empty`}]);if(e.length>63)throw new o.ValidationError(`View name is too long`,[{path:[`name`],message:`View name is too long (max 63 characters)`}]);if(!Xe.test(e))throw new o.ValidationError(`Invalid view name format`,[{path:[`name`],message:`View name must be in kebab-case (e.g., 'detail', 'list-view')`}])}function assertUniqueBy(e,t,n){let r=/* @__PURE__ */ new Set;for(let i of e){let e=t(i);if(r.has(e))throw n(e);r.add(e)}}const $e=s.string().min(1,`Attribute name cannot be empty`).max(63,`Attribute name is too long (max 63 characters)`).regex(Ye,{message:`Invalid attribute name format.
|
|
6
|
-
Name must be a valid variable identifier:
|
|
7
|
-
✅ Valid: 'firstName', 'first_name', 'FirstName', 'FIRST_NAME'
|
|
8
|
-
❌ Invalid: 'first-name', 'first name', '123name', 'first.name'`}).refine(e=>!j.includes(e),{message:`This is a reserved attribute name. Reserved names: ${j.join(`, `)}`});function validateAttributeName(e){if(!e||e.length===0)throw Error(`[AttributeBuilder] Attribute name cannot be empty`);if(e.length>63)throw Error(`[AttributeBuilder] Attribute name is too long (max 63 characters)`);if(!Ye.test(e))throw Error(`[AttributeBuilder] Invalid attribute name format.
|
|
9
|
-
Name must be a valid variable identifier:
|
|
10
|
-
✅ Valid: 'firstName', 'first_name', 'FirstName', 'FIRST_NAME'
|
|
11
|
-
❌ Invalid: 'first-name', 'first name', '123name', 'first.name'`);if(j.includes(e))throw Error(`[AttributeBuilder] "${e}" is a reserved name and cannot be used as an attribute name.\nReserved names: ${j.join(`, `)}`)}function validateLabel(e){if(!e||e.length===0)throw Error(`[AttributeBuilder] Attribute label cannot be empty`);if(e.length>Ze)throw Error(`[AttributeBuilder] Attribute label is too long (max ${Ze} characters)`)}function validateIconName(e,t){if(!Je.has(e))throw Error(`[AttributeBuilder] Invalid icon "${e}" in ${t}.\nIcon must be one of the predefined icons from @standards/constants.`)}function validateOptions(e,t){let n=/* @__PURE__ */ 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.`)}}Object.defineProperty(exports,"ATTRIBUTE_FILTER_OPERATORS",{enumerable:!0,get:function(){return C}}),Object.defineProperty(exports,"ATTRIBUTE_NAME_SCHEMA",{enumerable:!0,get:function(){return $e}}),Object.defineProperty(exports,"ATTRIBUTE_TYPES",{enumerable:!0,get:function(){return T}}),Object.defineProperty(exports,"ATTRIBUTE_TYPE_DESCRIPTORS",{enumerable:!0,get:function(){return w}}),Object.defineProperty(exports,"HIERARCHY_ATTRIBUTE_IDS",{enumerable:!0,get:function(){return d}}),Object.defineProperty(exports,"HIERARCHY_ATTRIBUTE_NAMES",{enumerable:!0,get:function(){return f}}),Object.defineProperty(exports,"HIERARCHY_CHILD_IDS_LIMIT",{enumerable:!0,get:function(){return 6}}),Object.defineProperty(exports,"LIST_VIEW_TAB_VISIBILITIES",{enumerable:!0,get:function(){return k}}),Object.defineProperty(exports,"LOCATION_FILTER_PROPERTIES",{enumerable:!0,get:function(){return S}}),Object.defineProperty(exports,"NATIVE_OBJECT_NAMES",{enumerable:!0,get:function(){return D}}),Object.defineProperty(exports,"NO_VALUE_OPERATORS",{enumerable:!0,get:function(){return E}}),Object.defineProperty(exports,"OBJECT_NAME_SCHEMA",{enumerable:!0,get:function(){return Qe}}),Object.defineProperty(exports,"OPERATORS_BY_TYPE",{enumerable:!0,get:function(){return te}}),Object.defineProperty(exports,"PAGE_GRID_COLUMNS",{enumerable:!0,get:function(){return se}}),Object.defineProperty(exports,"QUALIFIED_SEPARATOR",{enumerable:!0,get:function(){return`__`}}),Object.defineProperty(exports,"RECORD_LIST_SCOPES",{enumerable:!0,get:function(){return A}}),Object.defineProperty(exports,"RELATION_TARGET_ANY",{enumerable:!0,get:function(){return`*`}}),Object.defineProperty(exports,"REMOVED_OPERATOR_REPLACEMENTS",{enumerable:!0,get:function(){return U}}),Object.defineProperty(exports,"RESERVED_ATTRIBUTE_NAMES",{enumerable:!0,get:function(){return j}}),Object.defineProperty(exports,"RESERVED_OBJECT_NAMES",{enumerable:!0,get:function(){return re}}),Object.defineProperty(exports,"RESOURCE_VISIBILITIES",{enumerable:!0,get:function(){return O}}),Object.defineProperty(exports,"SCHEMA_LIMITS",{enumerable:!0,get:function(){return M}}),Object.defineProperty(exports,"SYNONYM_ALIASES",{enumerable:!0,get:function(){return z}}),Object.defineProperty(exports,"SYSTEM_ATTRIBUTES",{enumerable:!0,get:function(){return u}}),Object.defineProperty(exports,"SYSTEM_ATTRIBUTE_I18N_KEYS",{enumerable:!0,get:function(){return l}}),Object.defineProperty(exports,"SYSTEM_FIELD_NAMES",{enumerable:!0,get:function(){return ne}}),Object.defineProperty(exports,"SYSTEM_FILTER_ATTRIBUTE_TYPES",{enumerable:!0,get:function(){return H}}),Object.defineProperty(exports,"__exportAll",{enumerable:!0,get:function(){return __exportAll}}),Object.defineProperty(exports,"__toESM",{enumerable:!0,get:function(){return __toESM}}),Object.defineProperty(exports,"assertUniqueBy",{enumerable:!0,get:function(){return assertUniqueBy}}),Object.defineProperty(exports,"attributeFilterTarget",{enumerable:!0,get:function(){return attributeFilterTarget}}),Object.defineProperty(exports,"buildQualifiedAttribute",{enumerable:!0,get:function(){return buildQualifiedAttribute}}),Object.defineProperty(exports,"canonicalizeFilterValue",{enumerable:!0,get:function(){return canonicalizeFilterValue}}),Object.defineProperty(exports,"characterCount",{enumerable:!0,get:function(){return characterCount}}),Object.defineProperty(exports,"collectQualifiedRuleIssues",{enumerable:!0,get:function(){return collectQualifiedRuleIssues}}),Object.defineProperty(exports,"collectionContentSourceSchema",{enumerable:!0,get:function(){return J}}),Object.defineProperty(exports,"colorIdSchema",{enumerable:!0,get:function(){return oe}}),Object.defineProperty(exports,"columnsSchema",{enumerable:!0,get:function(){return xe}}),Object.defineProperty(exports,"contentViewDefinitionSchema",{enumerable:!0,get:function(){return qe}}),Object.defineProperty(exports,"currentActor",{enumerable:!0,get:function(){return currentActor}}),Object.defineProperty(exports,"displayAttributesSchema",{enumerable:!0,get:function(){return G}}),Object.defineProperty(exports,"draftContentViewDefinitionSchema",{enumerable:!0,get:function(){return Ke}}),Object.defineProperty(exports,"edgePropertyFilterTarget",{enumerable:!0,get:function(){return edgePropertyFilterTarget}}),Object.defineProperty(exports,"extractCurrencyFilterValue",{enumerable:!0,get:function(){return extractCurrencyFilterValue}}),Object.defineProperty(exports,"extractFilterValue",{enumerable:!0,get:function(){return extractFilterValue}}),Object.defineProperty(exports,"filterOperatorsOfType",{enumerable:!0,get:function(){return filterOperatorsOfType}}),Object.defineProperty(exports,"filterStateSchema",{enumerable:!0,get:function(){return q}}),Object.defineProperty(exports,"filterTargetsOf",{enumerable:!0,get:function(){return filterTargetsOf}}),Object.defineProperty(exports,"getAttributeCapabilities",{enumerable:!0,get:function(){return getAttributeCapabilities}}),Object.defineProperty(exports,"getAttributeFilterOperators",{enumerable:!0,get:function(){return getAttributeFilterOperators}}),Object.defineProperty(exports,"getHierarchyAttributes",{enumerable:!0,get:function(){return getHierarchyAttributes}}),Object.defineProperty(exports,"getObjectSystemAttributes",{enumerable:!0,get:function(){return getObjectSystemAttributes}}),Object.defineProperty(exports,"getOperatorPolarity",{enumerable:!0,get:function(){return getOperatorPolarity}}),Object.defineProperty(exports,"getRollupFilterOperators",{enumerable:!0,get:function(){return getRollupFilterOperators}}),Object.defineProperty(exports,"getSystemAttributeI18nKey",{enumerable:!0,get:function(){return getSystemAttributeI18nKey}}),Object.defineProperty(exports,"getSystemAttributeList",{enumerable:!0,get:function(){return getSystemAttributeList}}),Object.defineProperty(exports,"hasTypeTrait",{enumerable:!0,get:function(){return hasTypeTrait}}),Object.defineProperty(exports,"hasValueKind",{enumerable:!0,get:function(){return hasValueKind}}),Object.defineProperty(exports,"iconNameSchema",{enumerable:!0,get:function(){return N}}),Object.defineProperty(exports,"inferInverseCardinality",{enumerable:!0,get:function(){return inferInverseCardinality}}),Object.defineProperty(exports,"isAttributeFilterable",{enumerable:!0,get:function(){return isAttributeFilterable}}),Object.defineProperty(exports,"isAttributeGroupable",{enumerable:!0,get:function(){return isAttributeGroupable}}),Object.defineProperty(exports,"isAttributeKanbanGroupable",{enumerable:!0,get:function(){return isAttributeKanbanGroupable}}),Object.defineProperty(exports,"isAttributeSearchable",{enumerable:!0,get:function(){return isAttributeSearchable}}),Object.defineProperty(exports,"isAttributeSortable",{enumerable:!0,get:function(){return isAttributeSortable}}),Object.defineProperty(exports,"isBilateralRelation",{enumerable:!0,get:function(){return isBilateralRelation}}),Object.defineProperty(exports,"isBlockWidth",{enumerable:!0,get:function(){return isBlockWidth}}),Object.defineProperty(exports,"isCalendarDay",{enumerable:!0,get:function(){return isCalendarDay}}),Object.defineProperty(exports,"isDynamicValue",{enumerable:!0,get:function(){return isDynamicValue}}),Object.defineProperty(exports,"isHierarchyAttribute",{enumerable:!0,get:function(){return isHierarchyAttribute}}),Object.defineProperty(exports,"isLocationFilterProperty",{enumerable:!0,get:function(){return isLocationFilterProperty}}),Object.defineProperty(exports,"isLocationPartOperator",{enumerable:!0,get:function(){return isLocationPartOperator}}),Object.defineProperty(exports,"isManagedSystemAttribute",{enumerable:!0,get:function(){return isManagedSystemAttribute}}),Object.defineProperty(exports,"isNativeObjectName",{enumerable:!0,get:function(){return isNativeObjectName}}),Object.defineProperty(exports,"isNoValueOperator",{enumerable:!0,get:function(){return isNoValueOperator}}),Object.defineProperty(exports,"isPlainRecord",{enumerable:!0,get:function(){return isPlainRecord}}),Object.defineProperty(exports,"isRelativeDateValue",{enumerable:!0,get:function(){return isRelativeDateValue}}),Object.defineProperty(exports,"isSetMembershipOperator",{enumerable:!0,get:function(){return isSetMembershipOperator}}),Object.defineProperty(exports,"isUniversalRelation",{enumerable:!0,get:function(){return isUniversalRelation}}),Object.defineProperty(exports,"isValueKindType",{enumerable:!0,get:function(){return isValueKindType}}),Object.defineProperty(exports,"locationPartFilterTarget",{enumerable:!0,get:function(){return locationPartFilterTarget}}),Object.defineProperty(exports,"normalizeFilterRule",{enumerable:!0,get:function(){return normalizeFilterRule}}),Object.defineProperty(exports,"normalizeForEdgeRpc",{enumerable:!0,get:function(){return normalizeForEdgeRpc}}),Object.defineProperty(exports,"normalizeOperator",{enumerable:!0,get:function(){return normalizeOperator}}),Object.defineProperty(exports,"now",{enumerable:!0,get:function(){return now}}),Object.defineProperty(exports,"parseQualifiedAttribute",{enumerable:!0,get:function(){return parseQualifiedAttribute}}),Object.defineProperty(exports,"parseRecordListScope",{enumerable:!0,get:function(){return parseRecordListScope}}),Object.defineProperty(exports,"parseResourceVisibility",{enumerable:!0,get:function(){return parseResourceVisibility}}),Object.defineProperty(exports,"publishedViewContentDefinitionSchema",{enumerable:!0,get:function(){return Ve}}),Object.defineProperty(exports,"relationTargetsOf",{enumerable:!0,get:function(){return relationTargetsOf}}),Object.defineProperty(exports,"resolveEffectiveFilterType",{enumerable:!0,get:function(){return resolveEffectiveFilterType}}),Object.defineProperty(exports,"resolveIsWithinBounds",{enumerable:!0,get:function(){return resolveIsWithinBounds}}),Object.defineProperty(exports,"resolveUtcDayBounds",{enumerable:!0,get:function(){return resolveUtcDayBounds}}),Object.defineProperty(exports,"sortsSchema",{enumerable:!0,get:function(){return K}}),Object.defineProperty(exports,"systemColumnFilterTarget",{enumerable:!0,get:function(){return systemColumnFilterTarget}}),Object.defineProperty(exports,"toMultiValueOperator",{enumerable:!0,get:function(){return toMultiValueOperator}}),Object.defineProperty(exports,"toUtcDayString",{enumerable:!0,get:function(){return toUtcDayString}}),Object.defineProperty(exports,"today",{enumerable:!0,get:function(){return today}}),Object.defineProperty(exports,"twelfthsSchema",{enumerable:!0,get:function(){return X}}),Object.defineProperty(exports,"validateAttributeName",{enumerable:!0,get:function(){return validateAttributeName}}),Object.defineProperty(exports,"validateIconName",{enumerable:!0,get:function(){return validateIconName}}),Object.defineProperty(exports,"validateLabel",{enumerable:!0,get:function(){return validateLabel}}),Object.defineProperty(exports,"validateObjectName",{enumerable:!0,get:function(){return validateObjectName}}),Object.defineProperty(exports,"validateOptions",{enumerable:!0,get:function(){return validateOptions}}),Object.defineProperty(exports,"validateQualifiedRule",{enumerable:!0,get:function(){return validateQualifiedRule}}),Object.defineProperty(exports,"validateViewName",{enumerable:!0,get:function(){return validateViewName}});
|