@stndrds/schema 1.0.0-alpha.328 → 1.0.0-alpha.330

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.
Files changed (165) hide show
  1. package/dist/all-CWDgBPuS.d.ts +1186 -0
  2. package/dist/all-DilIWUev.d.mts +1186 -0
  3. package/dist/capabilities.d.mts +94 -94
  4. package/dist/capabilities.d.ts +94 -94
  5. package/dist/capabilities.js +2 -2
  6. package/dist/capabilities.mjs +2 -2
  7. package/dist/checkbox-CjnTd8DE.d.ts +11 -0
  8. package/dist/checkbox-preO352q.d.mts +11 -0
  9. package/dist/config-BQJJHopR.js +13 -0
  10. package/dist/config-_sOeudpS.mjs +13 -0
  11. package/dist/core-397tQy5q.js +2 -0
  12. package/dist/core-BLHhNykL.mjs +2 -0
  13. package/dist/date-BL3UHIXs.d.mts +24 -0
  14. package/dist/date-CxwHkbid.d.ts +24 -0
  15. package/dist/exceptions-DGCzCc9t.d.mts +1405 -0
  16. package/dist/exceptions-DGCzCc9t.d.ts +1405 -0
  17. package/dist/exceptions.d.mts +3 -2
  18. package/dist/exceptions.d.ts +3 -2
  19. package/dist/exceptions.js +3 -1
  20. package/dist/exceptions.mjs +3 -1
  21. package/dist/index-B7HmBsUS.d.ts +53 -0
  22. package/dist/{helpers-JGJLPkwG.d.ts → index-BoUwfrDH.d.mts} +172 -145
  23. package/dist/index-C8M7Amy9.d.mts +254 -0
  24. package/dist/{helpers-Cic6nWBr.d.mts → index-DqwNrDSp.d.ts} +172 -145
  25. package/dist/index-Uwy7CTKo.d.ts +254 -0
  26. package/dist/index-XtmC-C7J.d.mts +53 -0
  27. package/dist/index.d.mts +9203 -9111
  28. package/dist/index.d.ts +9203 -9111
  29. package/dist/index.js +21 -27
  30. package/dist/index.mjs +21 -27
  31. package/dist/number-Ddi_YYfm.d.mts +11 -0
  32. package/dist/number-GmD5PM5s.d.ts +11 -0
  33. package/dist/object-BQuWeYKA.js +4 -0
  34. package/dist/object-tz3P8Pgh.mjs +4 -0
  35. package/dist/phone-C0QEfySq.js +2 -0
  36. package/dist/phone-DHUJN7SI.mjs +2 -0
  37. package/dist/text-A9AJ1wUO.js +2 -0
  38. package/dist/text-C8Lb-NFo.mjs +2 -0
  39. package/dist/text-CxwF5K4k.d.mts +11 -0
  40. package/dist/text-D6UypN8p.d.ts +11 -0
  41. package/dist/utils-fXIvFFl6.mjs +2 -0
  42. package/dist/utils-gY3d9Dwp.js +2 -0
  43. package/dist/utils.d.mts +3 -2
  44. package/dist/utils.d.ts +3 -2
  45. package/dist/utils.js +2 -1
  46. package/dist/utils.mjs +2 -1
  47. package/dist/validation/all.d.mts +6 -8
  48. package/dist/validation/all.d.ts +6 -8
  49. package/dist/validation/all.js +2 -1
  50. package/dist/validation/all.mjs +2 -1
  51. package/dist/validation/complex/currency.d.mts +8 -9
  52. package/dist/validation/complex/currency.d.ts +8 -9
  53. package/dist/validation/complex/currency.js +2 -1
  54. package/dist/validation/complex/currency.mjs +2 -1
  55. package/dist/validation/complex/location.d.mts +14 -15
  56. package/dist/validation/complex/location.d.ts +14 -15
  57. package/dist/validation/complex/location.js +2 -1
  58. package/dist/validation/complex/location.mjs +2 -1
  59. package/dist/validation/complex/phone.d.mts +8 -9
  60. package/dist/validation/complex/phone.d.ts +8 -9
  61. package/dist/validation/complex/phone.js +2 -1
  62. package/dist/validation/complex/phone.mjs +2 -1
  63. package/dist/validation/complex/relation.d.mts +8 -9
  64. package/dist/validation/complex/relation.d.ts +8 -9
  65. package/dist/validation/complex/relation.js +2 -1
  66. package/dist/validation/complex/relation.mjs +2 -1
  67. package/dist/validation/complex/richtext.d.mts +6 -7
  68. package/dist/validation/complex/richtext.d.ts +6 -7
  69. package/dist/validation/complex/richtext.js +2 -1
  70. package/dist/validation/complex/richtext.mjs +2 -1
  71. package/dist/validation/complex/select.d.mts +8 -9
  72. package/dist/validation/complex/select.d.ts +8 -9
  73. package/dist/validation/complex/select.js +2 -1
  74. package/dist/validation/complex/select.mjs +2 -1
  75. package/dist/validation/complex/user.d.mts +6 -7
  76. package/dist/validation/complex/user.d.ts +6 -7
  77. package/dist/validation/complex/user.js +2 -1
  78. package/dist/validation/complex/user.mjs +2 -1
  79. package/dist/validation/computed/formula.d.mts +6 -7
  80. package/dist/validation/computed/formula.d.ts +6 -7
  81. package/dist/validation/computed/formula.js +2 -1
  82. package/dist/validation/computed/formula.mjs +2 -1
  83. package/dist/validation/computed/rollup.d.mts +6 -7
  84. package/dist/validation/computed/rollup.d.ts +6 -7
  85. package/dist/validation/computed/rollup.js +2 -1
  86. package/dist/validation/computed/rollup.mjs +2 -1
  87. package/dist/validation/config/index.d.mts +3 -4
  88. package/dist/validation/config/index.d.ts +3 -4
  89. package/dist/validation/config/index.js +2 -1
  90. package/dist/validation/config/index.mjs +2 -1
  91. package/dist/validation/core/index.d.mts +2 -17
  92. package/dist/validation/core/index.d.ts +2 -17
  93. package/dist/validation/core/index.js +2 -1
  94. package/dist/validation/core/index.mjs +2 -1
  95. package/dist/validation/object/index.d.mts +2 -29
  96. package/dist/validation/object/index.d.ts +2 -29
  97. package/dist/validation/object/index.js +2 -1
  98. package/dist/validation/object/index.mjs +2 -1
  99. package/dist/validation/primitives/checkbox.d.mts +2 -10
  100. package/dist/validation/primitives/checkbox.d.ts +2 -10
  101. package/dist/validation/primitives/checkbox.js +2 -1
  102. package/dist/validation/primitives/checkbox.mjs +2 -1
  103. package/dist/validation/primitives/date.d.mts +2 -23
  104. package/dist/validation/primitives/date.d.ts +2 -23
  105. package/dist/validation/primitives/date.js +2 -1
  106. package/dist/validation/primitives/date.mjs +2 -1
  107. package/dist/validation/primitives/number.d.mts +2 -10
  108. package/dist/validation/primitives/number.d.ts +2 -10
  109. package/dist/validation/primitives/number.js +2 -1
  110. package/dist/validation/primitives/number.mjs +2 -1
  111. package/dist/validation/primitives/text.d.mts +2 -10
  112. package/dist/validation/primitives/text.d.ts +2 -10
  113. package/dist/validation/primitives/text.js +2 -1
  114. package/dist/validation/primitives/text.mjs +2 -1
  115. package/dist/view-config.schema-B4AkqLKQ.mjs +2 -0
  116. package/dist/view-config.schema-to6p1m8L.js +2 -0
  117. package/package.json +11 -9
  118. package/dist/all-DPW8A7kG.d.ts +0 -1178
  119. package/dist/all-yrWOkrj0.d.mts +0 -1178
  120. package/dist/attributes-B9zZJdoT.d.mts +0 -1365
  121. package/dist/attributes-B9zZJdoT.d.ts +0 -1365
  122. package/dist/chunk-23KPS33D.js +0 -2
  123. package/dist/chunk-2FJ45VYQ.js +0 -2
  124. package/dist/chunk-2M4YXNYZ.js +0 -15
  125. package/dist/chunk-47KVYDKG.js +0 -2
  126. package/dist/chunk-4OTKOCGB.mjs +0 -2
  127. package/dist/chunk-4VCADZK4.mjs +0 -2
  128. package/dist/chunk-DPD6ZWL2.js +0 -2
  129. package/dist/chunk-EZCWO4XV.mjs +0 -15
  130. package/dist/chunk-GKXTXH4Y.mjs +0 -2
  131. package/dist/chunk-GXSNLYRR.js +0 -2
  132. package/dist/chunk-IBM4ID4Y.js +0 -6
  133. package/dist/chunk-JFSQ24XR.js +0 -2
  134. package/dist/chunk-JOS2XMXY.js +0 -2
  135. package/dist/chunk-JSKLP4GI.js +0 -12
  136. package/dist/chunk-JVLH3DVZ.js +0 -2
  137. package/dist/chunk-KG2ADZG6.mjs +0 -2
  138. package/dist/chunk-KLR22JMC.js +0 -2
  139. package/dist/chunk-KSPJP74K.mjs +0 -2
  140. package/dist/chunk-KYPEBOPW.mjs +0 -2
  141. package/dist/chunk-LB4TNMZU.mjs +0 -2
  142. package/dist/chunk-LSCBR4VS.js +0 -2
  143. package/dist/chunk-LWSOKXPF.js +0 -2
  144. package/dist/chunk-O34B5KOW.mjs +0 -2
  145. package/dist/chunk-PFO7NWQW.mjs +0 -2
  146. package/dist/chunk-Q7TQCRSD.mjs +0 -2
  147. package/dist/chunk-RTHLB6T6.js +0 -2
  148. package/dist/chunk-SLYRQ72J.js +0 -2
  149. package/dist/chunk-UXISKZ5Y.js +0 -2
  150. package/dist/chunk-VKFLXFPP.mjs +0 -2
  151. package/dist/chunk-WMQRTFOP.mjs +0 -2
  152. package/dist/chunk-WUFUIJRX.mjs +0 -2
  153. package/dist/chunk-XAVRKIBE.mjs +0 -6
  154. package/dist/chunk-XHEBV2HE.js +0 -2
  155. package/dist/chunk-XMQV2WFY.mjs +0 -2
  156. package/dist/chunk-XRDP2Y4J.mjs +0 -2
  157. package/dist/chunk-XRWRECDA.mjs +0 -12
  158. package/dist/chunk-XUAP7KWK.js +0 -2
  159. package/dist/chunk-XXTKNIBK.js +0 -2
  160. package/dist/chunk-YIXNAWH6.mjs +0 -2
  161. package/dist/chunk-YJSVWV3Z.mjs +0 -2
  162. package/dist/index-BbYKy1fQ.d.mts +0 -252
  163. package/dist/index-BjKaOUx3.d.ts +0 -252
  164. package/dist/types-BpuX5PuM.d.mts +0 -38
  165. package/dist/types-DLwv9Jgf.d.ts +0 -38
@@ -1,2 +0,0 @@
1
- 'use strict';var chunkJFSQ24XR_js=require('./chunk-JFSQ24XR.js'),chunkDPD6ZWL2_js=require('./chunk-DPD6ZWL2.js'),zod=require('zod');/*! © 2025-2026 AND YOU CREATE SAS (RCS Paris 940 190 614). Proprietary — see LICENSE (Standards SDK License 1.0). */
2
- var g={email:"^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$",url:"^https?:\\/\\/[\\w\\-]+(\\.[\\w\\-]+)+[/#?]?.*$",slug:"^[a-z0-9]+(?:-[a-z0-9]+)*$"};function h(t){return t.pattern?t.pattern:t.format?g[t.format]:void 0}chunkDPD6ZWL2_js.a(h,"resolveTextPattern");var c=class c{constructor(e){if(!Number.isInteger(e)||e<=0)throw new Error("LRU cache capacity must be greater than 0");this.capacity=e,this.cache=new Map;}get(e){if(!this.cache.has(e))return;let i=this.cache.get(e);return this.cache.delete(e),this.cache.set(e,i),i}set(e,i){if(this.cache.has(e))this.cache.delete(e);else if(this.cache.size>=this.capacity){let r=this.cache.keys().next();r.done||this.cache.delete(r.value);}this.cache.set(e,i);}has(e){return this.cache.has(e)}clear(){this.cache.clear();}get size(){return this.cache.size}};chunkDPD6ZWL2_js.a(c,"LRUCache");var a=c;function o(t=100){return new a(t)}chunkDPD6ZWL2_js.a(o,"createRegexCache");function u(t,e){let i=t.get(e);return i||(i=new RegExp(e),t.set(e,i)),i}chunkDPD6ZWL2_js.a(u,"getCachedRegex");var m=o();function v(t,e=chunkJFSQ24XR_js.a){let i=zod.z.string();t.minLength!==void 0&&(i=i.min(t.minLength,e.minLength(t,t.minLength))),t.maxLength!==void 0&&(i=i.max(t.maxLength,e.maxLength(t,t.maxLength)));let r=h(t);return r&&(i=i.regex(u(m,r),e.invalidPattern(t))),i}chunkDPD6ZWL2_js.a(v,"createTextValidator");exports.a=g;exports.b=h;exports.c=v;
@@ -1,2 +0,0 @@
1
- import {a as a$1}from'./chunk-4OTKOCGB.mjs';import {a}from'./chunk-KSPJP74K.mjs';import {z}from'zod';/*! © 2025-2026 AND YOU CREATE SAS (RCS Paris 940 190 614). Proprietary — see LICENSE (Standards SDK License 1.0). */
2
- function s(n,a=a$1){return z.object({address:z.string().optional(),address2:z.string().optional(),city:z.string().optional(),state:z.string().optional(),postalCode:z.string().optional(),country:z.string().length(3).optional(),latitude:z.number().min(-90).max(90).optional(),longitude:z.number().min(-180).max(180).optional()},{message:a.invalidLocation(n)})}a(s,"createLocationValidator");export{s as a};
@@ -1,2 +0,0 @@
1
- import {a as a$1}from'./chunk-4OTKOCGB.mjs';import {a}from'./chunk-KSPJP74K.mjs';import {z}from'zod';/*! © 2025-2026 AND YOU CREATE SAS (RCS Paris 940 190 614). Proprietary — see LICENSE (Standards SDK License 1.0). */
2
- function m(e,s=a$1){let t=z.guid({message:s.invalidId(e)});return e.multiple?z.array(t):t}a(m,"createUserValidator");export{m as a};
@@ -1,12 +0,0 @@
1
- import {a as a$1}from'./chunk-KSPJP74K.mjs';/*! © 2025-2026 AND YOU CREATE SAS (RCS Paris 940 190 614). Proprietary — see LICENSE (Standards SDK License 1.0). */
2
- var _={DRAFT_REVISION_CONFLICT:"DRAFT_REVISION_CONFLICT",UNKNOWN:"SCHEMA_UNKNOWN_ERROR",OBJECT_NOT_FOUND:"SCHEMA_OBJECT_NOT_FOUND",ATTRIBUTE_NOT_FOUND:"SCHEMA_ATTRIBUTE_NOT_FOUND",RECORD_NOT_FOUND:"SCHEMA_RECORD_NOT_FOUND",SOURCE_NOT_FOUND:"SCHEMA_SOURCE_NOT_FOUND",ROLE_NOT_FOUND:"SCHEMA_ROLE_NOT_FOUND",MEMORY_NOT_FOUND:"SCHEMA_MEMORY_NOT_FOUND",SCHEMA_PLAN_NOT_FOUND:"SCHEMA_PLAN_NOT_FOUND",VALIDATION_FAILED:"SCHEMA_VALIDATION_FAILED",INVALID_ATTRIBUTE_NAME:"SCHEMA_INVALID_ATTRIBUTE_NAME",INVALID_OBJECT_NAME:"SCHEMA_INVALID_OBJECT_NAME",RESERVED_OBJECT_NAME:"SCHEMA_RESERVED_OBJECT_NAME",PROTECTED_OBJECT:"SCHEMA_PROTECTED_OBJECT",PROTECTED_ATTRIBUTE:"SCHEMA_PROTECTED_ATTRIBUTE",PROTECTED_VIEW:"SCHEMA_PROTECTED_VIEW",PROTECTED_ROLE:"SCHEMA_PROTECTED_ROLE",FORBIDDEN:"SCHEMA_FORBIDDEN",ACCESS_DENIED:"SCHEMA_ACCESS_DENIED",WORKSPACE_INVARIANT:"SCHEMA_WORKSPACE_INVARIANT",STATE_GATE:"SCHEMA_STATE_GATE",ACTOR_CONTEXT_REQUIRED:"SCHEMA_ACTOR_CONTEXT_REQUIRED",CONNECTOR_AUTH_FAILED:"SCHEMA_CONNECTOR_AUTH_FAILED",CONNECTOR_INVALID_STATE:"SCHEMA_CONNECTOR_INVALID_STATE",CONNECTOR_GRANT_ORPHANED:"SCHEMA_CONNECTOR_GRANT_ORPHANED",SYNC_FAILED:"SCHEMA_SYNC_FAILED",SYNC_CONFLICT:"SCHEMA_SYNC_CONFLICT",SYNC_CASCADE:"SCHEMA_SYNC_CASCADE",ORPHAN_SYSTEM_ATTRIBUTE:"SCHEMA_ORPHAN_SYSTEM_ATTRIBUTE",SYSTEM_ENTITY_IMMUTABLE:"SCHEMA_SYSTEM_ENTITY_IMMUTABLE",DESTRUCTIVE_NOT_ALLOWED:"SCHEMA_DESTRUCTIVE_NOT_ALLOWED",MIGRATION_TIMEOUT:"SCHEMA_MIGRATION_TIMEOUT",CHANGE_TYPE_NOT_SUPPORTED:"SCHEMA_CHANGE_TYPE_NOT_SUPPORTED",DUPLICATE:"SCHEMA_DUPLICATE",DUPLICATE_OBJECT:"SCHEMA_DUPLICATE_OBJECT",DUPLICATE_ATTRIBUTE:"SCHEMA_DUPLICATE_ATTRIBUTE",CONFLICT:"SCHEMA_CONFLICT",STORAGE_UPLOAD_FAILED:"SCHEMA_STORAGE_UPLOAD_FAILED",STORAGE_DOWNLOAD_FAILED:"SCHEMA_STORAGE_DOWNLOAD_FAILED",STORAGE_DELETE_FAILED:"SCHEMA_STORAGE_DELETE_FAILED",STORAGE_URL_FAILED:"SCHEMA_STORAGE_URL_FAILED",REPOSITORY_CREATE_FAILED:"SCHEMA_REPOSITORY_CREATE_FAILED",REPOSITORY_UPDATE_FAILED:"SCHEMA_REPOSITORY_UPDATE_FAILED",REPOSITORY_DELETE_FAILED:"SCHEMA_REPOSITORY_DELETE_FAILED",REPOSITORY_QUERY_FAILED:"SCHEMA_REPOSITORY_QUERY_FAILED",NOT_IMPLEMENTED:"SCHEMA_NOT_IMPLEMENTED",TIMEOUT:"SCHEMA_TIMEOUT",RECORD_REFERENCED:"SCHEMA_RECORD_REFERENCED",ATTRIBUTE_IN_USE:"SCHEMA_ATTRIBUTE_IN_USE",OBJECT_REFERENCED:"SCHEMA_OBJECT_REFERENCED",CONFIGURATION_REQUIRED:"CONFIGURATION_REQUIRED",SEARCH_ADAPTER_REQUIRED:"SEARCH_ADAPTER_REQUIRED",CRON_REGISTRATION_FAILED:"CRON_REGISTRATION_FAILED",SEARCH_BACKEND_FAILED:"SEARCH_BACKEND_FAILED",INVARIANT_VIOLATION:"INVARIANT_VIOLATION",TENANT_CONTEXT_MISSING:"TENANT_CONTEXT_MISSING",FEATURE_FLAGS_CONTEXT:"FEATURE_FLAGS_CONTEXT",REALTIME_RATE_LIMITED:"REALTIME_RATE_LIMITED",REALTIME_DELIVERY_FAILED:"REALTIME_DELIVERY_FAILED",REALTIME_SUBSCRIPTION_FAILED:"REALTIME_SUBSCRIPTION_FAILED",AGENT_UNKNOWN:"AGENT_UNKNOWN",AGENT_DEPTH_EXCEEDED:"AGENT_DEPTH_EXCEEDED",AGENT_COST_LIMIT_EXCEEDED:"AGENT_COST_LIMIT_EXCEEDED",AGENT_TREE_COST_LIMIT_EXCEEDED:"AGENT_TREE_COST_LIMIT_EXCEEDED",CREDITS_EXHAUSTED:"CREDITS_EXHAUSTED",QUOTA_EXCEEDED:"QUOTA_EXCEEDED",AGENT_SESSION_NOT_FOUND:"AGENT_SESSION_NOT_FOUND",AGENT_DEFINITION_NOT_FOUND:"AGENT_DEFINITION_NOT_FOUND",AGENT_RUN_CONFIG:"AGENT_RUN_CONFIG",AGENT_STREAMING:"AGENT_STREAMING",AGENT_MISSING_ACTOR:"AGENT_MISSING_ACTOR",AGENT_INVALID_STATE:"AGENT_INVALID_STATE",AGENT_COMPACTION_IMPOSSIBLE:"AGENT_COMPACTION_IMPOSSIBLE",AGENT_COMPACTION_TIMEOUT:"AGENT_COMPACTION_TIMEOUT",AGENT_LEASE_HELD:"AGENT_LEASE_HELD",AGENT_WORK_MODE_REQUIRED:"AGENT_WORK_MODE_REQUIRED",AGENT_MESSAGE_NOT_FOUND:"AGENT_MESSAGE_NOT_FOUND",AGENT_MESSAGE_NOT_EDITABLE:"AGENT_MESSAGE_NOT_EDITABLE",DEVICE_NOT_FOUND:"DEVICE_NOT_FOUND",DEVICE_OFFLINE:"DEVICE_OFFLINE",AI_UNKNOWN:"AI_UNKNOWN",AI_USAGE_LIMIT_EXCEEDED:"AI_USAGE_LIMIT_EXCEEDED",AI_INVALID_USAGE:"AI_INVALID_USAGE",AI_INVALID_MODEL:"AI_INVALID_MODEL",AI_INVALID_MODEL_INPUT:"AI_INVALID_MODEL_INPUT",AI_REPOSITORY_ERROR:"AI_REPOSITORY_ERROR",AI_GENERATION_FAILED:"AI_GENERATION_FAILED",AI_IMAGE_USAGE_PENDING:"AI_IMAGE_USAGE_PENDING",AI_IMAGE_GENERATION_INDETERMINATE:"AI_IMAGE_GENERATION_INDETERMINATE",AI_IMAGE_PUBLICATION_FAILED:"AI_IMAGE_PUBLICATION_FAILED",DOCUMENT_MIME_NOT_ACCEPTED:"DOCUMENT_MIME_NOT_ACCEPTED",DOCUMENT_MULTIPLE_NOT_ALLOWED:"DOCUMENT_MULTIPLE_NOT_ALLOWED",DOCUMENT_NOT_FOUND_FOR_OPERATION:"DOCUMENT_NOT_FOUND_FOR_OPERATION",DOCUMENT_STORAGE_FAILED:"DOCUMENT_STORAGE_FAILED",DOCUMENT_SIZE_EXCEEDED:"DOCUMENT_SIZE_EXCEEDED",DOCUMENT_OCR_FAILED:"DOCUMENT_OCR_FAILED",DOCUMENT_BLOB_EMPTY:"DOCUMENT_BLOB_EMPTY",DOCUMENT_FILE_TOO_LARGE:"DOCUMENT_FILE_TOO_LARGE",DOCUMENT_FILE_NOT_FOUND:"DOCUMENT_FILE_NOT_FOUND",DOCUMENT_FILE_ALREADY_PACKED:"DOCUMENT_FILE_ALREADY_PACKED",DOCUMENT_RECORD_NOT_FOUND:"DOCUMENT_RECORD_NOT_FOUND",DOCUMENT_RECORD_OBJECT_MISMATCH:"DOCUMENT_RECORD_OBJECT_MISMATCH",DOCUMENT_FOLDER_SERVICE_UNAVAILABLE:"DOCUMENT_FOLDER_SERVICE_UNAVAILABLE",DOCUMENT_FOLDER_PATH_NOT_FOUND:"DOCUMENT_FOLDER_PATH_NOT_FOUND",EMAIL_PROVIDER_API_FAILED:"EMAIL_PROVIDER_API_FAILED",EMAIL_SEND_FAILED:"EMAIL_SEND_FAILED",EMAIL_SENT_NOT_STORED:"EMAIL_SENT_NOT_STORED",EMAIL_BATCH_ITEM_FAILED:"EMAIL_BATCH_ITEM_FAILED",CALENDAR_PROVIDER_API_FAILED:"CALENDAR_PROVIDER_API_FAILED",REFLEX_INVALID_TRANSITION:"REFLEX_INVALID_TRANSITION",REFLEX_INVALID_TOKEN:"REFLEX_INVALID_TOKEN",REFLEX_CAPABILITY_DENIED:"REFLEX_CAPABILITY_DENIED",REFLEX_GATEWAY_UNAVAILABLE:"REFLEX_GATEWAY_UNAVAILABLE",REFLEX_BUNDLE_FAILED:"REFLEX_BUNDLE_FAILED",REFLEX_EGRESS_DENIED:"REFLEX_EGRESS_DENIED",REFLEX_PROTOCOL_VIOLATION:"REFLEX_PROTOCOL_VIOLATION",REFLEX_RUN_FAILED:"REFLEX_RUN_FAILED",REFLEX_RUN_TIMEOUT:"REFLEX_RUN_TIMEOUT",REFLEX_DEPENDENCY_DRIFT:"REFLEX_DEPENDENCY_DRIFT",REFLEX_NOT_READY:"REFLEX_NOT_READY",REFLEX_INVARIANT_VIOLATION:"REFLEX_INVARIANT_VIOLATION",EMBEDDING_MODEL_UNAVAILABLE:"EMBEDDING_MODEL_UNAVAILABLE",EMBEDDING_DIMENSION_MISMATCH:"EMBEDDING_DIMENSION_MISMATCH"},R=class R extends Error{constructor(E,e=_.UNKNOWN,t){super(E),this.name="SchemaError",this.code=e,this.details=t,Object.setPrototypeOf(this,new.target.prototype);}toJSON(){return {name:this.name,code:this.code,message:this.message,details:this.details}}};a$1(R,"SchemaError");var r=R,C=class C extends r{constructor(e,t,T=_.RECORD_NOT_FOUND,n=`${e} with id "${t}" not found`){super(n,T,{resourceType:e,resourceId:t});this._tag="NotFoundError";this.name="NotFoundError",this.resourceType=e,this.resourceId=t;}};a$1(C,"NotFoundError");var N=C,L=class L extends N{constructor(E){super("Object",E,_.OBJECT_NOT_FOUND),this.name="ObjectNotFoundError";}};a$1(L,"ObjectNotFoundError");var J=L,S=class S extends N{constructor(E){super("Attribute",E,_.ATTRIBUTE_NOT_FOUND),this.name="AttributeNotFoundError";}};a$1(S,"AttributeNotFoundError");var K=S,c=class c extends N{constructor(E){super("Record",E,_.RECORD_NOT_FOUND),this.name="RecordNotFoundError";}};a$1(c,"RecordNotFoundError");var k=c,M=class M extends N{constructor(E){super("Schema plan",E,_.SCHEMA_PLAN_NOT_FOUND),this.name="SchemaPlanNotFoundError";}};a$1(M,"SchemaPlanNotFoundError");var v=M,O=class O extends r{constructor(e,t){super(e,_.VALIDATION_FAILED,{errors:t});this._tag="ValidationError";this.name="ValidationError",this.errors=t;}static fromZodErrors(e){let t=e.map(n=>({path:n.path.map(String),message:n.message})),T=`Validation failed: ${t.map(n=>`${n.path.join(".")}: ${n.message}`).join(", ")}`;return new O(T,t)}};a$1(O,"ValidationError");var I=O,d=class d extends r{constructor(E,e,t){let T=E==="object"?_.PROTECTED_OBJECT:E==="view"?_.PROTECTED_VIEW:_.PROTECTED_ATTRIBUTE;super(`Cannot ${t} system ${E} "${e}"`,T,{resourceType:E,resourceName:e,operation:t}),this.name="ProtectedResourceError",this.resourceType=E,this.resourceName=e,this.operation=t;}};a$1(d,"ProtectedResourceError");var o=d,U=class U extends r{constructor(E,e,t){super(`Failed to sync object "${E}": ${e}`,_.SYNC_FAILED,{objectName:E,cause:t?.message}),this.name="SyncError",this.objectName=E,this.cause=t;}};a$1(U,"SyncError");var Q=U,F=class F extends r{constructor(E,e){super(`Cannot mutate system ${E} "${e}". System entities are declared in code and immutable at runtime.`,_.SYSTEM_ENTITY_IMMUTABLE,{entityType:E,entityName:e}),this.name="SystemEntityImmutableError",this.entityType=E,this.entityName=e;}};a$1(F,"SystemEntityImmutableError");var Z=F,l=class l extends r{constructor(E){let e=E.attributeName?`"${E.objectName}.${E.attributeName}"`:`"${E.objectName}"`;super(`Cannot promote runtime entity ${e}: ${E.reason}. Resolve via: (1) relax the code constraint, (2) migrate runtime values manually, or (3) rename the code declaration.`,_.SYNC_CONFLICT,{objectName:E.objectName,attributeName:E.attributeName,reason:E.reason}),this.name="SyncConflictError",this.objectName=E.objectName,this.attributeName=E.attributeName,this.reason=E.reason;}};a$1(l,"SyncConflictError");var q=l,u=class u extends r{constructor(E,e){super(`Cannot demote object "${E}": attributes ${e.join(", ")} are still declared in code. Remove them from code first, or restore the object.`,_.SYNC_CASCADE,{objectName:E,conflictingAttributes:e}),this.name="SyncCascadeError",this.objectName=E,this.conflictingAttributes=e;}};a$1(u,"SyncCascadeError");var z=u,g=class g extends r{constructor(E,e){super(`Attribute "${E}.${e}" is system:true but its object parent is system:false. This is an invariant violation.`,_.ORPHAN_SYSTEM_ATTRIBUTE,{objectName:E,attributeName:e}),this.name="OrphanSystemAttributeError",this.objectName=E,this.attributeName=e;}};a$1(g,"OrphanSystemAttributeError");var EE=g,m=class m extends r{constructor(E){let e=E.map(t=>{let T=t;return T.name?`- ${t.type} "${T.name}"`:`- ${t.type}`}).join(`
3
- `);super(`Destructive schema operations detected (data will be lost):
4
- ${e}
5
-
6
- These are applied only under an explicit opt-in; without it boot demotes the object to runtime and keeps its rows. To let Standards apply them automatically, set the environment variable:
7
- STANDARDS_ALLOW_DESTRUCTIVE_SYNC=1
8
-
9
- Otherwise, revert your code changes or back up the data first.`,_.DESTRUCTIVE_NOT_ALLOWED,{operations:E}),this.name="DestructiveSyncNotAllowedError",this.operations=E;}};a$1(m,"DestructiveSyncNotAllowedError");var eE=m,h=class h extends r{constructor(E,e,t,T){super(`Migration for "${E}" exceeded the maximum duration (${T}ms). Migrated ${e}/${t} records before timeout. Increase STANDARDS_MIGRATION_MAX_DURATION_MS or split the migration into smaller batches.`,_.MIGRATION_TIMEOUT,{objectName:E,migrated:e,total:t,maxDurationMs:T}),this.name="MigrationTimeoutError",this.objectName=E,this.migrated=e,this.total=t,this.maxDurationMs=T;}};a$1(h,"MigrationTimeoutError");var tE=h,p=class p extends r{constructor(E,e){super(`Cannot change type of attribute "${E}.${e}" via runtime API. Declare a migration in your schema code:
10
- object("${E}").migration(N, (m) =>
11
- m.changeType("${e}", from, to, { transform: (v) => ... })
12
- )`,_.CHANGE_TYPE_NOT_SUPPORTED,{objectName:E,attributeName:e}),this.name="ChangeTypeNotSupportedError",this.objectName=E,this.attributeName=e;}};a$1(p,"ChangeTypeNotSupportedError");var _E=p,P=class P extends r{constructor(E,e,t){let T=E==="object"?_.DUPLICATE_OBJECT:E==="attribute"?_.DUPLICATE_ATTRIBUTE:_.DUPLICATE,n=`${E.charAt(0).toUpperCase()}${E.slice(1)} "${e}" already exists`;super(t??n,T,{resourceType:E,resourceName:e}),this.name="DuplicateError",this.resourceType=E,this.resourceName=e;}};a$1(P,"DuplicateError");var sE=P,RE={builder:"cannot be built by a consumer",registry:"cannot be registered by a consumer",bundle:"cannot be claimed by a bundle",source:"cannot be declared by a schema source"},G=class G extends r{constructor(E,e){super(`"${E}" is a framework-native object name and ${RE[e]}: the framework ships it, pick another name.`,_.RESERVED_OBJECT_NAME,{objectName:E,context:e}),this.name="ReservedObjectNameError",this.objectName=E;}};a$1(G,"ReservedObjectNameError");var TE=G;function CE(A){return A instanceof r}a$1(CE,"isSchemaError");function LE(A){return A instanceof N}a$1(LE,"isNotFoundError");function SE(A){return A instanceof I}a$1(SE,"isValidationError");function cE(A){return A instanceof o}a$1(cE,"isProtectedResourceError");var y=class y extends r{constructor(e,t,T){super(`No ${t} permission on object "${e}"`,_.FORBIDDEN,{objectName:e,action:t,userId:T});this._tag="ForbiddenError";this.name="ForbiddenError",this.objectName=e,this.action=t,this.userId=T;}};a$1(y,"ForbiddenError");var rE=y,x=class x extends r{constructor(E,e){super(`Cannot ${e} system role "${E}"`,_.PROTECTED_ROLE,{roleName:E,operation:e}),this.name="ProtectedRoleError",this.roleName=E,this.operation=e;}};a$1(x,"ProtectedRoleError");var nE=x,H=class H extends N{constructor(E){super("Role",E,_.ROLE_NOT_FOUND),this.name="RoleNotFoundError";}};a$1(H,"RoleNotFoundError");var AE=H,b=class b extends r{constructor(E){super(`Record ${E} was modified by another request. Please refresh and try again.`,_.CONFLICT,{recordId:E});}};a$1(b,"ConcurrentModificationError");var NE=b,B=class B extends r{constructor(E,e,t,T){let n=E==="upload"?_.STORAGE_UPLOAD_FAILED:E==="download"?_.STORAGE_DOWNLOAD_FAILED:E==="delete"?_.STORAGE_DELETE_FAILED:_.STORAGE_URL_FAILED;super(`Storage ${E} failed: ${e}`,n,{operation:E,path:t,cause:T}),this.name="StorageError",this.operation=E,this.path=t,this.cause=T;}};a$1(B,"StorageError");var OE=B,V=class V extends r{constructor(E,e){super(e??`Access denied to resource: ${E}`,_.ACCESS_DENIED,{resource:E,reason:e}),this.name="AccessDeniedError",this.resource=E,this.reason=e;}};a$1(V,"AccessDeniedError");var IE=V,$=class $ extends r{constructor(E,e,t,T){let n=E==="create"?_.REPOSITORY_CREATE_FAILED:E==="update"?_.REPOSITORY_UPDATE_FAILED:E==="delete"?_.REPOSITORY_DELETE_FAILED:_.REPOSITORY_QUERY_FAILED;super(`Failed to ${E} ${e}: ${t}${T?` (${T})`:""}`,n,{operation:E,entity:e,cause:T}),this.name="RepositoryError",this.operation=E,this.entity=e,this.cause=T;}};a$1($,"RepositoryError");var oE=$,Y=class Y extends r{constructor(E,e){super(`Search backend unavailable for ${E}`,_.SEARCH_BACKEND_FAILED,{scope:E,cause:e}),this.name="SearchBackendError",this.scope=E,this.cause=e;}};a$1(Y,"SearchBackendError");var DE=Y,f=class f extends r{constructor(E,e){let t=e?`${E}: not implemented (${e})`:`${E}: not implemented`;super(t,_.NOT_IMPLEMENTED,{feature:E,milestone:e}),this.name="NotImplementedError",this.feature=E,this.milestone=e;}};a$1(f,"NotImplementedError");var iE=f,X=class X extends N{constructor(E){super("Memory",E,_.MEMORY_NOT_FOUND),this.name="MemoryNotFoundError";}};a$1(X,"MemoryNotFoundError");var aE=X,j=class j extends r{constructor(E,e){let t=e.reduce((T,n)=>T+n.count,0);super(`Cannot delete record: referenced by ${t} record${t>1?"s":""}`,_.RECORD_REFERENCED,{recordId:E,references:e}),this.name="RecordReferencedError",this.recordId=E,this.references=e;}};a$1(j,"RecordReferencedError");var D=j,W=class W extends r{constructor(E,e){super(`Cannot delete attribute "${E}": used in ${e}`,_.ATTRIBUTE_IN_USE,{attributeName:E,usage:e}),this.name="AttributeInUseError",this.attributeName=E,this.usage=e;}};a$1(W,"AttributeInUseError");var i=W,w=class w extends r{constructor(E,e){super(`Cannot delete object "${E}": target of relations in ${e.join(", ")}`,_.OBJECT_REFERENCED,{objectName:E,referencingObjects:e}),this.name="ObjectReferencedError",this.objectName=E,this.referencingObjects=e;}};a$1(w,"ObjectReferencedError");var a=w;function ME(A){return A instanceof D}a$1(ME,"isRecordReferencedError");function dE(A){return A instanceof i}a$1(dE,"isAttributeInUseError");function UE(A){return A instanceof a}a$1(UE,"isObjectReferencedError");export{NE as A,OE as B,IE as C,oE as D,DE as E,iE as F,aE as G,D as H,i as I,a as J,ME as K,dE as L,UE as M,_ as a,r as b,N as c,J as d,K as e,k as f,v as g,I as h,o as i,Q as j,Z as k,q as l,z as m,EE as n,eE as o,tE as p,_E as q,sE as r,TE as s,CE as t,LE as u,SE as v,cE as w,rE as x,nE as y,AE as z};
@@ -1,2 +0,0 @@
1
- 'use strict';var chunkJFSQ24XR_js=require('./chunk-JFSQ24XR.js'),chunkDPD6ZWL2_js=require('./chunk-DPD6ZWL2.js'),zod=require('zod');/*! © 2025-2026 AND YOU CREATE SAS (RCS Paris 940 190 614). Proprietary — see LICENSE (Standards SDK License 1.0). */
2
- function s(n,a=chunkJFSQ24XR_js.a){return zod.z.object({address:zod.z.string().optional(),address2:zod.z.string().optional(),city:zod.z.string().optional(),state:zod.z.string().optional(),postalCode:zod.z.string().optional(),country:zod.z.string().length(3).optional(),latitude:zod.z.number().min(-90).max(90).optional(),longitude:zod.z.number().min(-180).max(180).optional()},{message:a.invalidLocation(n)})}chunkDPD6ZWL2_js.a(s,"createLocationValidator");exports.a=s;
@@ -1,2 +0,0 @@
1
- 'use strict';var chunkJFSQ24XR_js=require('./chunk-JFSQ24XR.js'),chunkDPD6ZWL2_js=require('./chunk-DPD6ZWL2.js'),zod=require('zod');/*! © 2025-2026 AND YOU CREATE SAS (RCS Paris 940 190 614). Proprietary — see LICENSE (Standards SDK License 1.0). */
2
- function s(e,a=chunkJFSQ24XR_js.a){return zod.z.unknown()}chunkDPD6ZWL2_js.a(s,"createFormulaValidator");exports.a=s;
@@ -1,2 +0,0 @@
1
- import {a as a$1}from'./chunk-4OTKOCGB.mjs';import {a}from'./chunk-KSPJP74K.mjs';import {z}from'zod';/*! © 2025-2026 AND YOU CREATE SAS (RCS Paris 940 190 614). Proprietary — see LICENSE (Standards SDK License 1.0). */
2
- function p(e,s=a$1){let i=e.options.map(t=>t.value);if(i.length===0)return z.never();let n=e.options.map(t=>t.label);return z.enum(i,{message:s.invalidOption(e,n)})}a(p,"createSelectValidator");function d(e,s=a$1){let i=e.options.map(t=>t.value);if(i.length===0)return z.never();let n=e.options.map(t=>t.label);return z.array(z.enum(i,{message:s.invalidOption(e,n)}))}a(d,"createMultiselectValidator");function c(e,s=a$1){let i=e.options.map(t=>t.value);if(i.length===0)return z.never();let n=e.options.map(t=>t.label);return z.enum(i,{message:s.invalidOption(e,n)})}a(c,"createStatusValidator");export{p as a,d as b,c};
@@ -1,2 +0,0 @@
1
- import {h as h$1,b,a as a$1}from'./chunk-XRWRECDA.mjs';import {a}from'./chunk-KSPJP74K.mjs';/*! © 2025-2026 AND YOU CREATE SAS (RCS Paris 940 190 614). Proprietary — see LICENSE (Standards SDK License 1.0). */
2
- var l=class l extends b{constructor(){super("Value must contain only JSON-compatible values",a$1.VALIDATION_FAILED),this.name="NonJsonValueError";}};a(l,"NonJsonValueError");var p=l,f=a(()=>new p,"nonJsonValue"),g={refuseNonJson:true,refuseNonPlainObject:true,refuseUnrepresentableType:true,readAccessors:false,unrepresentable:f,circular:f},w={refuseNonJson:false,refuseNonPlainObject:false,refuseUnrepresentableType:false,readAccessors:false,unrepresentable:f,circular:f},O={refuseNonJson:false,refuseNonPlainObject:true,refuseUnrepresentableType:true,readAccessors:true,unrepresentable:a(e=>new h$1(`Cannot canonicalize ${h(e)}`,[]),"unrepresentable"),circular:a(()=>new h$1("Cannot canonicalize circular structure",[]),"circular")};function h(e){if(typeof e!="object"||e===null)return `value of type ${typeof e}`;let n=e.constructor?.name;return typeof n=="string"&&n.length>0?`a ${n} value`:"a non-plain object"}a(h,"describeUnrepresentable");function j(e){let n=Object.getPrototypeOf(e);return n===Object.prototype||n===null}a(j,"isPlainObject");function m(e,n){if(Object.getPrototypeOf(e)!==Array.prototype||Object.getOwnPropertySymbols(e).length>0)throw n.unrepresentable(e);let r=Object.getOwnPropertyNames(e);if(r.length!==e.length+1||!r.includes("length"))throw n.unrepresentable(e);for(let s=0;s<e.length;s+=1){let t=Object.getOwnPropertyDescriptor(e,String(s));if(t===void 0||!("value"in t)||t.enumerable!==true)throw n.unrepresentable(e)}}a(m,"assertArrayShape");function N(e,n){if(n.refuseNonJson&&Object.getOwnPropertySymbols(e).length>0)throw n.unrepresentable(e);let r=[];for(let s of Object.getOwnPropertyNames(e)){let t=Object.getOwnPropertyDescriptor(e,s);if(t===void 0||t.enumerable!==true){if(n.refuseNonJson)throw n.unrepresentable(e);continue}if(!("value"in t)){if(n.refuseNonJson)throw n.unrepresentable(e);if(!n.readAccessors)continue;let i=e[s];if(i===void 0)continue;r.push([s,i]);continue}t.value!==void 0&&r.push([s,t.value]);}return r.sort(([s],[t])=>s<t?-1:s>t?1:0)}a(N,"sortedEntries");function u(e,n,r){if(e===null)return "null";if(e===void 0){if(n.refuseNonJson)throw n.unrepresentable(e);return "null"}if(typeof e=="boolean"||typeof e=="string")return JSON.stringify(e);if(typeof e=="number"){if(Number.isFinite(e))return JSON.stringify(e);if(n.refuseNonJson)throw n.unrepresentable(e);return "null"}if(typeof e!="object"){if(n.refuseNonJson||n.refuseUnrepresentableType)throw n.unrepresentable(e);return JSON.stringify(String(e))}if(r.has(e))throw n.circular();r.add(e);try{if(Array.isArray(e)){n.refuseNonJson&&m(e,n);let t=[];for(let i=0;i<e.length;i+=1)t.push(u(e[i],n,r));return `[${t.join(",")}]`}if(n.refuseNonPlainObject&&!j(e))throw n.unrepresentable(e);return `{${N(e,n).map(([t,i])=>`${JSON.stringify(t)}:${u(i,n,r)}`).join(",")}}`}finally{r.delete(e);}}a(u,"serialize");function J(e){return u(e,O,new Set)}a(J,"canonicalStringify");function y(e){return u(e,w,new Set)}a(y,"serializeStableJson");function S(e){return u(e,g,new Set)}a(S,"serializeCanonicalJson");function k(e,n){return y(e)===y(n)}a(k,"sameStableValue");function I(e){return e}a(I,"asTenantId");function U(e){return e}a(U,"asUserId");function E(){return typeof crypto<"u"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{let n=Math.random()*16|0;return (e==="x"?n:n&3|8).toString(16)})}a(E,"generateId");function B(e,n){return new Map(e.map(r=>[n(r),r]))}a(B,"indexBy");function x(e,n){if(e===n)return true;if(e==null||n==null||typeof e!=typeof n)return false;if(Array.isArray(e))return !Array.isArray(n)||e.length!==n.length?false:e.every((r,s)=>x(r,n[s]));if(typeof e=="object"&&typeof n=="object"){let r=e,s=n,t=Object.keys(r),i=Object.keys(s);return t.length!==i.length?false:t.every(a=>a in s&&x(r[a],s[a]))}return false}a(x,"deepEqual");export{p as a,J as b,y as c,S as d,k as e,I as f,U as g,E as h,B as i,x as j};
@@ -1,252 +0,0 @@
1
- import { z } from 'zod';
2
- import { k as AttributeType, A as Attribute } from './attributes-B9zZJdoT.mjs';
3
- import { IconName } from '@stndrds/constants';
4
-
5
- interface AddAttributeInput {
6
- name: string;
7
- label: string;
8
- type: AttributeType;
9
- required?: boolean;
10
- unique?: boolean;
11
- description?: string;
12
- placeholder?: string;
13
- icon?: IconName;
14
- defaultValue?: unknown;
15
- metadata?: Record<string, unknown>;
16
- [key: string]: unknown;
17
- }
18
- interface CreateCustomObjectInput {
19
- name: string;
20
- label: string;
21
- pluralLabel?: string;
22
- labelExpression: string;
23
- embeddingExpression?: string;
24
- description?: string;
25
- icon?: IconName;
26
- attributes?: (Attribute | {
27
- build: () => Attribute;
28
- })[];
29
- metadata?: Record<string, unknown>;
30
- }
31
- interface UpdateObjectInput {
32
- label?: string;
33
- pluralLabel?: string;
34
- description?: string;
35
- icon?: IconName;
36
- labelExpression?: string;
37
- embeddingExpression?: string;
38
- metadata?: Record<string, unknown>;
39
- }
40
- interface RelationOption {
41
- id: string;
42
- objectId: string;
43
- objectName: string;
44
- objectLabel: string;
45
- objectIcon?: string;
46
- label: string;
47
- }
48
- interface RelationOptionsResponse {
49
- options: RelationOption[];
50
- hasMore: boolean;
51
- total: number;
52
- nextOffset?: number;
53
- }
54
-
55
- /**
56
- * `baseConfigSchema`'s keys — the model never sets these directly, and the
57
- * prompt (`attribute-reference.ts`'s `BASE_CONFIG_KEYS`) already hides them
58
- * from every `<attribute_types>` line. `ADD_ATTRIBUTE_WIRE` omits them from
59
- * each per-type wire config for the same reason, so the wire never offers a
60
- * key the model was never told about — and never exposes `metadata`, the one
61
- * genuine open record among them, on the wire. Single source: the runtime
62
- * prompt imports this instead of keeping its own copy.
63
- */
64
- declare const WIRE_OMITTED_CONFIG_KEYS: readonly ["placeholder", "description", "defaultValue", "icon", "order", "hidden", "archived", "deprecated", "metadata"];
65
- /**
66
- * Builds the `superRefine` that refuses a key belonging to a DIFFERENT type
67
- * than the one sent.
68
- *
69
- * Two wire shapes merge several types into one member for size — the nine
70
- * simple attribute types of `ADD_ATTRIBUTE_WIRE`, and the seven simple
71
- * qualified-property types below — so a merged member structurally accepts
72
- * every merged type's keys. Without this, a `text`-only `format` sent on a
73
- * `number` parses and is then silently `.strip()`-ped at store: a key lost
74
- * with no feedback. Checked against the SENT type, and the message names the
75
- * keys that type does accept so the next call is right. One factory rather
76
- * than two near-identical loops — the second one drifted first.
77
- */
78
- declare function refuseForeignKeys<T extends string>(keysByType: Readonly<Record<T, ReadonlySet<string>>>, noun: string, alwaysAllowed?: readonly string[]): (type: T, subject: Record<string, unknown> | undefined, ctx: z.RefinementCtx, path?: readonly string[]) => void;
79
- declare const statusGroupSchema: z.ZodEnum<{
80
- idle: "idle";
81
- in_progress: "in_progress";
82
- finished: "finished";
83
- }>;
84
- declare const selectOptionWriteSchema: z.ZodObject<{
85
- value: z.ZodString;
86
- label: z.ZodString;
87
- description: z.ZodOptional<z.ZodString>;
88
- inverse: z.ZodOptional<z.ZodString>;
89
- archived: z.ZodOptional<z.ZodBoolean>;
90
- color: z.ZodEnum<{
91
- gray: "gray";
92
- slate: "slate";
93
- blue: "blue";
94
- sky: "sky";
95
- indigo: "indigo";
96
- green: "green";
97
- emerald: "emerald";
98
- teal: "teal";
99
- red: "red";
100
- rose: "rose";
101
- yellow: "yellow";
102
- amber: "amber";
103
- orange: "orange";
104
- purple: "purple";
105
- violet: "violet";
106
- fuchsia: "fuchsia";
107
- pink: "pink";
108
- cyan: "cyan";
109
- lime: "lime";
110
- }>;
111
- }, z.core.$strict>;
112
- declare const multiselectOptionWriteSchema: z.ZodObject<{
113
- value: z.ZodString;
114
- label: z.ZodString;
115
- description: z.ZodOptional<z.ZodString>;
116
- inverse: z.ZodOptional<z.ZodString>;
117
- archived: z.ZodOptional<z.ZodBoolean>;
118
- color: z.ZodEnum<{
119
- gray: "gray";
120
- slate: "slate";
121
- blue: "blue";
122
- sky: "sky";
123
- indigo: "indigo";
124
- green: "green";
125
- emerald: "emerald";
126
- teal: "teal";
127
- red: "red";
128
- rose: "rose";
129
- yellow: "yellow";
130
- amber: "amber";
131
- orange: "orange";
132
- purple: "purple";
133
- violet: "violet";
134
- fuchsia: "fuchsia";
135
- pink: "pink";
136
- cyan: "cyan";
137
- lime: "lime";
138
- }>;
139
- }, z.core.$strict>;
140
- declare const statusOptionWriteSchema: z.ZodObject<{
141
- value: z.ZodString;
142
- label: z.ZodString;
143
- description: z.ZodOptional<z.ZodString>;
144
- inverse: z.ZodOptional<z.ZodString>;
145
- archived: z.ZodOptional<z.ZodBoolean>;
146
- color: z.ZodEnum<{
147
- gray: "gray";
148
- slate: "slate";
149
- blue: "blue";
150
- sky: "sky";
151
- indigo: "indigo";
152
- green: "green";
153
- emerald: "emerald";
154
- teal: "teal";
155
- red: "red";
156
- rose: "rose";
157
- yellow: "yellow";
158
- amber: "amber";
159
- orange: "orange";
160
- purple: "purple";
161
- violet: "violet";
162
- fuchsia: "fuchsia";
163
- pink: "pink";
164
- cyan: "cyan";
165
- lime: "lime";
166
- }>;
167
- group: z.ZodEnum<{
168
- idle: "idle";
169
- in_progress: "in_progress";
170
- finished: "finished";
171
- }>;
172
- }, z.core.$strict>;
173
- /**
174
- * Property types whose config differs from `baseConfigSchema` only by
175
- * independent optional scalars — no options array, no relation targets. Same
176
- * shape as `SIMPLE_ATTRIBUTE_TYPES` in `architect/operations/schema.ts` minus
177
- * `richtext`/`user` (not valid property types) — none of these seven types'
178
- * keys collide, proven by `tests/validation/config/property-config.test.ts`.
179
- * Merged into one wire member for the same reason `ADD_ATTRIBUTE_WIRE` merges
180
- * its nine: the model reads one shape instead of seven near-identical ones,
181
- * and this is also what keeps a qualified relation/document's `add_attribute`
182
- * leaf under its wire-size cap (`tests/architect/wire-schema-size.test.ts`) —
183
- * ten separate members, each paying its own JSON Schema object/`$defs`
184
- * boilerplate, blew the budget even after the base config keys were omitted.
185
- */
186
- declare const SIMPLE_PROPERTY_TYPES: readonly ["text", "number", "checkbox", "date", "phone", "currency", "location"];
187
- declare const propertyAttributeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<Readonly<{
188
- [k: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
189
- }>, z.core.$strip>, ...z.ZodObject<Readonly<{
190
- [k: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
191
- }>, z.core.$strip>[]], "type">;
192
- declare const propertySchemaSchema: z.ZodObject<{
193
- definitions: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<Readonly<{
194
- [k: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
195
- }>, z.core.$strip>, ...z.ZodObject<Readonly<{
196
- [k: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
197
- }>, z.core.$strip>[]], "type">>;
198
- }, z.core.$strip>;
199
- /**
200
- * The wire-facing property union, derived from the stored one: the same seven
201
- * simple types merged into one member, the option-carrying types alongside,
202
- * everything the model never sets omitted, and `.strict()` so an invented key
203
- * is refused by name instead of silently stripped at store.
204
- */
205
- declare const propertyAttributeWireSchema: z.ZodDiscriminatedUnion<[z.ZodObject<Readonly<{
206
- [k: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
207
- }>, z.core.$strip>, ...z.ZodObject<Readonly<{
208
- [k: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
209
- }>, z.core.$strip>[]], "type">;
210
- declare const propertySchemaWireSchema: z.ZodObject<{
211
- definitions: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<Readonly<{
212
- [k: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
213
- }>, z.core.$strip>, ...z.ZodObject<Readonly<{
214
- [k: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
215
- }>, z.core.$strip>[]], "type">>;
216
- }, z.core.$strict>;
217
- /**
218
- * Map of attribute type to config schema
219
- */
220
- declare const attributeConfigSchemas: Record<AttributeType, z.ZodObject<z.ZodRawShape>>;
221
- /**
222
- * Get the config schema for a specific attribute type
223
- */
224
- declare function getAttributeConfigSchema(type: AttributeType): z.ZodObject<z.ZodRawShape>;
225
- /**
226
- * Validate and strip unknown properties from attribute config
227
- * This ensures only allowed properties are stored in the database
228
- */
229
- declare function parseAttributeConfig(type: AttributeType, config: Record<string, unknown>): Record<string, unknown>;
230
- /**
231
- * The config contract as a WRITE applies it: the stored schema plus the
232
- * stricter option and icon rules newly written values must satisfy.
233
- */
234
- declare function getAttributeConfigWriteSchema(type: AttributeType): z.ZodObject<z.ZodRawShape>;
235
- /**
236
- * Strict parser for newly created attribute definitions.
237
- *
238
- * Top-level config remains strip-compatible with the historical config
239
- * contract, while newly written icons and select-like option objects are
240
- * validated strictly.
241
- */
242
- declare function parseAttributeConfigForCreate(type: AttributeType, input: unknown): Record<string, unknown>;
243
- /**
244
- * Patch-aware parser for persisted attributes.
245
- *
246
- * An explicit options patch owns and strictly validates the complete new
247
- * list. Omission means the stored legacy list is preserved without
248
- * reconstruction, including options that predate required colours/groups.
249
- */
250
- declare function parseAttributeConfigForUpdate(stored: Attribute, patch: Partial<AddAttributeInput>): Record<string, unknown>;
251
-
252
- export { type AddAttributeInput as A, type CreateCustomObjectInput as C, type RelationOption as R, SIMPLE_PROPERTY_TYPES as S, type UpdateObjectInput as U, WIRE_OMITTED_CONFIG_KEYS as W, type RelationOptionsResponse as a, attributeConfigSchemas as b, parseAttributeConfigForCreate as c, parseAttributeConfigForUpdate as d, propertyAttributeSchema as e, propertyAttributeWireSchema as f, propertySchemaSchema as g, propertySchemaWireSchema as h, statusGroupSchema as i, statusOptionWriteSchema as j, getAttributeConfigSchema as k, getAttributeConfigWriteSchema as l, multiselectOptionWriteSchema as m, parseAttributeConfig as p, refuseForeignKeys as r, selectOptionWriteSchema as s };
@@ -1,252 +0,0 @@
1
- import { z } from 'zod';
2
- import { k as AttributeType, A as Attribute } from './attributes-B9zZJdoT.js';
3
- import { IconName } from '@stndrds/constants';
4
-
5
- interface AddAttributeInput {
6
- name: string;
7
- label: string;
8
- type: AttributeType;
9
- required?: boolean;
10
- unique?: boolean;
11
- description?: string;
12
- placeholder?: string;
13
- icon?: IconName;
14
- defaultValue?: unknown;
15
- metadata?: Record<string, unknown>;
16
- [key: string]: unknown;
17
- }
18
- interface CreateCustomObjectInput {
19
- name: string;
20
- label: string;
21
- pluralLabel?: string;
22
- labelExpression: string;
23
- embeddingExpression?: string;
24
- description?: string;
25
- icon?: IconName;
26
- attributes?: (Attribute | {
27
- build: () => Attribute;
28
- })[];
29
- metadata?: Record<string, unknown>;
30
- }
31
- interface UpdateObjectInput {
32
- label?: string;
33
- pluralLabel?: string;
34
- description?: string;
35
- icon?: IconName;
36
- labelExpression?: string;
37
- embeddingExpression?: string;
38
- metadata?: Record<string, unknown>;
39
- }
40
- interface RelationOption {
41
- id: string;
42
- objectId: string;
43
- objectName: string;
44
- objectLabel: string;
45
- objectIcon?: string;
46
- label: string;
47
- }
48
- interface RelationOptionsResponse {
49
- options: RelationOption[];
50
- hasMore: boolean;
51
- total: number;
52
- nextOffset?: number;
53
- }
54
-
55
- /**
56
- * `baseConfigSchema`'s keys — the model never sets these directly, and the
57
- * prompt (`attribute-reference.ts`'s `BASE_CONFIG_KEYS`) already hides them
58
- * from every `<attribute_types>` line. `ADD_ATTRIBUTE_WIRE` omits them from
59
- * each per-type wire config for the same reason, so the wire never offers a
60
- * key the model was never told about — and never exposes `metadata`, the one
61
- * genuine open record among them, on the wire. Single source: the runtime
62
- * prompt imports this instead of keeping its own copy.
63
- */
64
- declare const WIRE_OMITTED_CONFIG_KEYS: readonly ["placeholder", "description", "defaultValue", "icon", "order", "hidden", "archived", "deprecated", "metadata"];
65
- /**
66
- * Builds the `superRefine` that refuses a key belonging to a DIFFERENT type
67
- * than the one sent.
68
- *
69
- * Two wire shapes merge several types into one member for size — the nine
70
- * simple attribute types of `ADD_ATTRIBUTE_WIRE`, and the seven simple
71
- * qualified-property types below — so a merged member structurally accepts
72
- * every merged type's keys. Without this, a `text`-only `format` sent on a
73
- * `number` parses and is then silently `.strip()`-ped at store: a key lost
74
- * with no feedback. Checked against the SENT type, and the message names the
75
- * keys that type does accept so the next call is right. One factory rather
76
- * than two near-identical loops — the second one drifted first.
77
- */
78
- declare function refuseForeignKeys<T extends string>(keysByType: Readonly<Record<T, ReadonlySet<string>>>, noun: string, alwaysAllowed?: readonly string[]): (type: T, subject: Record<string, unknown> | undefined, ctx: z.RefinementCtx, path?: readonly string[]) => void;
79
- declare const statusGroupSchema: z.ZodEnum<{
80
- idle: "idle";
81
- in_progress: "in_progress";
82
- finished: "finished";
83
- }>;
84
- declare const selectOptionWriteSchema: z.ZodObject<{
85
- value: z.ZodString;
86
- label: z.ZodString;
87
- description: z.ZodOptional<z.ZodString>;
88
- inverse: z.ZodOptional<z.ZodString>;
89
- archived: z.ZodOptional<z.ZodBoolean>;
90
- color: z.ZodEnum<{
91
- gray: "gray";
92
- slate: "slate";
93
- blue: "blue";
94
- sky: "sky";
95
- indigo: "indigo";
96
- green: "green";
97
- emerald: "emerald";
98
- teal: "teal";
99
- red: "red";
100
- rose: "rose";
101
- yellow: "yellow";
102
- amber: "amber";
103
- orange: "orange";
104
- purple: "purple";
105
- violet: "violet";
106
- fuchsia: "fuchsia";
107
- pink: "pink";
108
- cyan: "cyan";
109
- lime: "lime";
110
- }>;
111
- }, z.core.$strict>;
112
- declare const multiselectOptionWriteSchema: z.ZodObject<{
113
- value: z.ZodString;
114
- label: z.ZodString;
115
- description: z.ZodOptional<z.ZodString>;
116
- inverse: z.ZodOptional<z.ZodString>;
117
- archived: z.ZodOptional<z.ZodBoolean>;
118
- color: z.ZodEnum<{
119
- gray: "gray";
120
- slate: "slate";
121
- blue: "blue";
122
- sky: "sky";
123
- indigo: "indigo";
124
- green: "green";
125
- emerald: "emerald";
126
- teal: "teal";
127
- red: "red";
128
- rose: "rose";
129
- yellow: "yellow";
130
- amber: "amber";
131
- orange: "orange";
132
- purple: "purple";
133
- violet: "violet";
134
- fuchsia: "fuchsia";
135
- pink: "pink";
136
- cyan: "cyan";
137
- lime: "lime";
138
- }>;
139
- }, z.core.$strict>;
140
- declare const statusOptionWriteSchema: z.ZodObject<{
141
- value: z.ZodString;
142
- label: z.ZodString;
143
- description: z.ZodOptional<z.ZodString>;
144
- inverse: z.ZodOptional<z.ZodString>;
145
- archived: z.ZodOptional<z.ZodBoolean>;
146
- color: z.ZodEnum<{
147
- gray: "gray";
148
- slate: "slate";
149
- blue: "blue";
150
- sky: "sky";
151
- indigo: "indigo";
152
- green: "green";
153
- emerald: "emerald";
154
- teal: "teal";
155
- red: "red";
156
- rose: "rose";
157
- yellow: "yellow";
158
- amber: "amber";
159
- orange: "orange";
160
- purple: "purple";
161
- violet: "violet";
162
- fuchsia: "fuchsia";
163
- pink: "pink";
164
- cyan: "cyan";
165
- lime: "lime";
166
- }>;
167
- group: z.ZodEnum<{
168
- idle: "idle";
169
- in_progress: "in_progress";
170
- finished: "finished";
171
- }>;
172
- }, z.core.$strict>;
173
- /**
174
- * Property types whose config differs from `baseConfigSchema` only by
175
- * independent optional scalars — no options array, no relation targets. Same
176
- * shape as `SIMPLE_ATTRIBUTE_TYPES` in `architect/operations/schema.ts` minus
177
- * `richtext`/`user` (not valid property types) — none of these seven types'
178
- * keys collide, proven by `tests/validation/config/property-config.test.ts`.
179
- * Merged into one wire member for the same reason `ADD_ATTRIBUTE_WIRE` merges
180
- * its nine: the model reads one shape instead of seven near-identical ones,
181
- * and this is also what keeps a qualified relation/document's `add_attribute`
182
- * leaf under its wire-size cap (`tests/architect/wire-schema-size.test.ts`) —
183
- * ten separate members, each paying its own JSON Schema object/`$defs`
184
- * boilerplate, blew the budget even after the base config keys were omitted.
185
- */
186
- declare const SIMPLE_PROPERTY_TYPES: readonly ["text", "number", "checkbox", "date", "phone", "currency", "location"];
187
- declare const propertyAttributeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<Readonly<{
188
- [k: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
189
- }>, z.core.$strip>, ...z.ZodObject<Readonly<{
190
- [k: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
191
- }>, z.core.$strip>[]], "type">;
192
- declare const propertySchemaSchema: z.ZodObject<{
193
- definitions: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<Readonly<{
194
- [k: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
195
- }>, z.core.$strip>, ...z.ZodObject<Readonly<{
196
- [k: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
197
- }>, z.core.$strip>[]], "type">>;
198
- }, z.core.$strip>;
199
- /**
200
- * The wire-facing property union, derived from the stored one: the same seven
201
- * simple types merged into one member, the option-carrying types alongside,
202
- * everything the model never sets omitted, and `.strict()` so an invented key
203
- * is refused by name instead of silently stripped at store.
204
- */
205
- declare const propertyAttributeWireSchema: z.ZodDiscriminatedUnion<[z.ZodObject<Readonly<{
206
- [k: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
207
- }>, z.core.$strip>, ...z.ZodObject<Readonly<{
208
- [k: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
209
- }>, z.core.$strip>[]], "type">;
210
- declare const propertySchemaWireSchema: z.ZodObject<{
211
- definitions: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<Readonly<{
212
- [k: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
213
- }>, z.core.$strip>, ...z.ZodObject<Readonly<{
214
- [k: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
215
- }>, z.core.$strip>[]], "type">>;
216
- }, z.core.$strict>;
217
- /**
218
- * Map of attribute type to config schema
219
- */
220
- declare const attributeConfigSchemas: Record<AttributeType, z.ZodObject<z.ZodRawShape>>;
221
- /**
222
- * Get the config schema for a specific attribute type
223
- */
224
- declare function getAttributeConfigSchema(type: AttributeType): z.ZodObject<z.ZodRawShape>;
225
- /**
226
- * Validate and strip unknown properties from attribute config
227
- * This ensures only allowed properties are stored in the database
228
- */
229
- declare function parseAttributeConfig(type: AttributeType, config: Record<string, unknown>): Record<string, unknown>;
230
- /**
231
- * The config contract as a WRITE applies it: the stored schema plus the
232
- * stricter option and icon rules newly written values must satisfy.
233
- */
234
- declare function getAttributeConfigWriteSchema(type: AttributeType): z.ZodObject<z.ZodRawShape>;
235
- /**
236
- * Strict parser for newly created attribute definitions.
237
- *
238
- * Top-level config remains strip-compatible with the historical config
239
- * contract, while newly written icons and select-like option objects are
240
- * validated strictly.
241
- */
242
- declare function parseAttributeConfigForCreate(type: AttributeType, input: unknown): Record<string, unknown>;
243
- /**
244
- * Patch-aware parser for persisted attributes.
245
- *
246
- * An explicit options patch owns and strictly validates the complete new
247
- * list. Omission means the stored legacy list is preserved without
248
- * reconstruction, including options that predate required colours/groups.
249
- */
250
- declare function parseAttributeConfigForUpdate(stored: Attribute, patch: Partial<AddAttributeInput>): Record<string, unknown>;
251
-
252
- export { type AddAttributeInput as A, type CreateCustomObjectInput as C, type RelationOption as R, SIMPLE_PROPERTY_TYPES as S, type UpdateObjectInput as U, WIRE_OMITTED_CONFIG_KEYS as W, type RelationOptionsResponse as a, attributeConfigSchemas as b, parseAttributeConfigForCreate as c, parseAttributeConfigForUpdate as d, propertyAttributeSchema as e, propertyAttributeWireSchema as f, propertySchemaSchema as g, propertySchemaWireSchema as h, statusGroupSchema as i, statusOptionWriteSchema as j, getAttributeConfigSchema as k, getAttributeConfigWriteSchema as l, multiselectOptionWriteSchema as m, parseAttributeConfig as p, refuseForeignKeys as r, selectOptionWriteSchema as s };
@@ -1,38 +0,0 @@
1
- import { A as Attribute } from './attributes-B9zZJdoT.mjs';
2
-
3
- /**
4
- * Validation messages for Zod validators.
5
- * All functions receive the full Attribute to access label, type, etc.
6
- * Can be customized for i18n support.
7
- */
8
- interface ValidationMessages {
9
- required: (attr: Attribute) => string;
10
- invalidType: (attr: Attribute, expected: string) => string;
11
- minLength: (attr: Attribute, min: number) => string;
12
- maxLength: (attr: Attribute, max: number) => string;
13
- invalidPattern: (attr: Attribute) => string;
14
- minValue: (attr: Attribute, min: number) => string;
15
- maxValue: (attr: Attribute, max: number) => string;
16
- mustBeInteger: (attr: Attribute) => string;
17
- invalidDate: (attr: Attribute) => string;
18
- invalidOption: (attr: Attribute, options: string[]) => string;
19
- invalidId: (attr: Attribute) => string;
20
- maxItems: (attr: Attribute, max: number) => string;
21
- invalidRichtext: (attr: Attribute) => string;
22
- invalidPhone: (attr: Attribute) => string;
23
- invalidCurrency: (attr: Attribute) => string;
24
- invalidLocation: (attr: Attribute) => string;
25
- }
26
- /**
27
- * Validation result
28
- */
29
- interface ValidationResult {
30
- success: boolean;
31
- data?: Record<string, unknown>;
32
- errors?: Array<{
33
- path: string[];
34
- message: string;
35
- }>;
36
- }
37
-
38
- export type { ValidationMessages as V, ValidationResult as a };