@stndrds/schema 1.0.0-alpha.294 → 1.0.0-alpha.295

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 (127) hide show
  1. package/LICENSE +111 -0
  2. package/README.md +7 -0
  3. package/dist/capabilities.js +2 -77
  4. package/dist/capabilities.mjs +2 -70
  5. package/dist/chunk-23KPS33D.js +2 -0
  6. package/dist/chunk-257HAQVV.mjs +6 -0
  7. package/dist/chunk-47KVYDKG.js +2 -0
  8. package/dist/chunk-4OTKOCGB.mjs +2 -0
  9. package/dist/chunk-4VCADZK4.mjs +2 -0
  10. package/dist/chunk-7SDHYJX4.mjs +2 -0
  11. package/dist/chunk-DPD6ZWL2.js +2 -0
  12. package/dist/chunk-EREGHAGI.js +2 -0
  13. package/dist/chunk-GKXTXH4Y.mjs +2 -0
  14. package/dist/chunk-GXSNLYRR.js +2 -0
  15. package/dist/chunk-HTY3NECU.mjs +2 -0
  16. package/dist/chunk-JFSQ24XR.js +2 -0
  17. package/dist/chunk-JOJ4LF2I.js +2 -0
  18. package/dist/chunk-JOS2XMXY.js +2 -0
  19. package/dist/chunk-JVLH3DVZ.js +2 -0
  20. package/dist/chunk-KG2ADZG6.mjs +2 -0
  21. package/dist/chunk-KLR22JMC.js +2 -0
  22. package/dist/chunk-KSPJP74K.mjs +2 -0
  23. package/dist/chunk-KYPEBOPW.mjs +2 -0
  24. package/dist/chunk-LB4TNMZU.mjs +2 -0
  25. package/dist/chunk-LSCBR4VS.js +2 -0
  26. package/dist/chunk-LWSOKXPF.js +2 -0
  27. package/dist/chunk-O34B5KOW.mjs +2 -0
  28. package/dist/chunk-OCAMDRO3.mjs +4 -0
  29. package/dist/chunk-PFO7NWQW.mjs +2 -0
  30. package/dist/chunk-Q7TQCRSD.mjs +2 -0
  31. package/dist/chunk-SLYRQ72J.js +2 -0
  32. package/dist/chunk-TKABCIEO.js +12 -0
  33. package/dist/chunk-TP63U7PL.js +4 -0
  34. package/dist/chunk-UXISKZ5Y.js +2 -0
  35. package/dist/chunk-VKFLXFPP.mjs +2 -0
  36. package/dist/chunk-WMQRTFOP.mjs +2 -0
  37. package/dist/chunk-XHEBV2HE.js +2 -0
  38. package/dist/chunk-XMQV2WFY.mjs +2 -0
  39. package/dist/chunk-XPF6CGAW.js +6 -0
  40. package/dist/chunk-XRDP2Y4J.mjs +2 -0
  41. package/dist/chunk-XUAP7KWK.js +2 -0
  42. package/dist/chunk-XXTKNIBK.js +2 -0
  43. package/dist/chunk-YBDR5ZMH.mjs +12 -0
  44. package/dist/chunk-YIXNAWH6.mjs +2 -0
  45. package/dist/exceptions.d.mts +5 -0
  46. package/dist/exceptions.d.ts +5 -0
  47. package/dist/exceptions.js +1 -158
  48. package/dist/exceptions.mjs +1 -1
  49. package/dist/index.d.mts +415 -116
  50. package/dist/index.d.ts +415 -116
  51. package/dist/index.js +30 -10514
  52. package/dist/index.mjs +30 -9626
  53. package/dist/utils.js +1 -31
  54. package/dist/utils.mjs +1 -2
  55. package/dist/validation/all.js +1 -131
  56. package/dist/validation/all.mjs +1 -18
  57. package/dist/validation/complex/currency.js +1 -11
  58. package/dist/validation/complex/currency.mjs +1 -2
  59. package/dist/validation/complex/location.js +1 -11
  60. package/dist/validation/complex/location.mjs +1 -2
  61. package/dist/validation/complex/phone.js +1 -11
  62. package/dist/validation/complex/phone.mjs +1 -2
  63. package/dist/validation/complex/relation.js +1 -19
  64. package/dist/validation/complex/relation.mjs +1 -2
  65. package/dist/validation/complex/richtext.js +1 -11
  66. package/dist/validation/complex/richtext.mjs +1 -2
  67. package/dist/validation/complex/select.js +1 -19
  68. package/dist/validation/complex/select.mjs +1 -2
  69. package/dist/validation/complex/user.js +1 -11
  70. package/dist/validation/complex/user.mjs +1 -2
  71. package/dist/validation/computed/formula.js +1 -11
  72. package/dist/validation/computed/formula.mjs +1 -2
  73. package/dist/validation/computed/rollup.js +1 -11
  74. package/dist/validation/computed/rollup.mjs +1 -2
  75. package/dist/validation/config/index.js +1 -52
  76. package/dist/validation/config/index.mjs +1 -7
  77. package/dist/validation/core/index.js +1 -14
  78. package/dist/validation/core/index.mjs +1 -1
  79. package/dist/validation/object/index.js +1 -69
  80. package/dist/validation/object/index.mjs +1 -16
  81. package/dist/validation/primitives/checkbox.js +1 -11
  82. package/dist/validation/primitives/checkbox.mjs +1 -2
  83. package/dist/validation/primitives/date.js +1 -11
  84. package/dist/validation/primitives/date.mjs +1 -2
  85. package/dist/validation/primitives/number.js +1 -11
  86. package/dist/validation/primitives/number.mjs +1 -2
  87. package/dist/validation/primitives/text.js +1 -11
  88. package/dist/validation/primitives/text.mjs +1 -2
  89. package/package.json +7 -5
  90. package/dist/chunk-2WWGHULM.mjs +0 -226
  91. package/dist/chunk-4KMUATDG.js +0 -609
  92. package/dist/chunk-5WATIVCA.js +0 -10
  93. package/dist/chunk-ACKMC6FL.js +0 -17
  94. package/dist/chunk-AYVHMVKQ.mjs +0 -15
  95. package/dist/chunk-CLZORRMS.mjs +0 -570
  96. package/dist/chunk-DVXGSTWJ.js +0 -81
  97. package/dist/chunk-E6JUYGJX.js +0 -22
  98. package/dist/chunk-EEH4XQ7W.js +0 -61
  99. package/dist/chunk-EW5XR2X3.js +0 -12
  100. package/dist/chunk-GO6LQADH.mjs +0 -57
  101. package/dist/chunk-HRQEZUAA.mjs +0 -29
  102. package/dist/chunk-HTSTPTNZ.js +0 -10
  103. package/dist/chunk-HURC6CW3.js +0 -241
  104. package/dist/chunk-JZNR4HKQ.mjs +0 -1432
  105. package/dist/chunk-KAWYU7TE.js +0 -657
  106. package/dist/chunk-KNGWHQLR.js +0 -16
  107. package/dist/chunk-LV3FEUKU.mjs +0 -14
  108. package/dist/chunk-NS63SPNN.mjs +0 -8
  109. package/dist/chunk-O73ROMWQ.mjs +0 -85
  110. package/dist/chunk-OSSGN43B.mjs +0 -8
  111. package/dist/chunk-Q44QKLN4.mjs +0 -43
  112. package/dist/chunk-Q4SZAMJT.js +0 -72
  113. package/dist/chunk-QT35SI3K.mjs +0 -641
  114. package/dist/chunk-QVLQPW3O.mjs +0 -10
  115. package/dist/chunk-QWKLQRBX.js +0 -35
  116. package/dist/chunk-R2DAEDRF.mjs +0 -74
  117. package/dist/chunk-R5LAJCBU.mjs +0 -67
  118. package/dist/chunk-SI34M4IC.js +0 -45
  119. package/dist/chunk-T5PM73EF.js +0 -1504
  120. package/dist/chunk-UANQJ2GH.mjs +0 -25
  121. package/dist/chunk-UXAHLSWC.mjs +0 -8
  122. package/dist/chunk-V2UA2D4E.js +0 -10
  123. package/dist/chunk-YIP5FJ5H.js +0 -27
  124. package/dist/chunk-YKWSHBT5.js +0 -32
  125. package/dist/chunk-YUFTHPOE.mjs +0 -20
  126. package/dist/chunk-ZDQ5AP26.mjs +0 -31
  127. package/dist/chunk-ZPFOKBIN.js +0 -89
package/LICENSE ADDED
@@ -0,0 +1,111 @@
1
+ STANDARDS SDK LICENSE
2
+ Version 1.0, September 2026
3
+
4
+ Copyright (c) 2025-2026 AND YOU CREATE SAS. All rights reserved.
5
+
6
+ AND YOU CREATE, a French société par actions simplifiée with a share capital
7
+ of EUR 500, registered with the Paris Trade and Companies Register under
8
+ number 940 190 614, having its registered office at 60 rue François Ier,
9
+ 75008 Paris, France (VAT FR34940190614) ("AYC", "we"), is the sole owner of
10
+ the software distributed under this license (the "SDK"): the source code,
11
+ compiled code, type declarations, documentation and any accompanying files
12
+ published in this package.
13
+
14
+ This is not an open source license. The SDK is made available so that you
15
+ can build software that communicates with the Standards platform operated by
16
+ AYC ("Standards"). Reading the source is permitted; everything else is
17
+ governed by the terms below. By installing, copying or using the SDK you
18
+ ("you", the "Licensee") accept them. If you do not accept them, do not use
19
+ the SDK.
20
+
21
+ 1. LICENSE GRANT
22
+ AYC grants you a limited, non-exclusive, non-transferable, non-sublicensable,
23
+ revocable license to:
24
+ (a) install and use the SDK, in unmodified form, solely to develop, test
25
+ and run applications that communicate with a Standards tenant, workspace
26
+ or API that you are authorised to access under a valid agreement with
27
+ AYC or with an AYC customer; and
28
+ (b) make the copies of the SDK reasonably necessary for that purpose,
29
+ including copies produced by your build tooling and bundlers.
30
+
31
+ 2. RESTRICTIONS
32
+ Except as expressly permitted in Section 1, you shall not, and shall not
33
+ permit any third party to:
34
+ (a) modify, translate, adapt or create derivative works of the SDK;
35
+ (b) reverse engineer, decompile or disassemble the SDK, or otherwise attempt
36
+ to derive its design or internal structure, except to the extent that
37
+ applicable law expressly permits it despite this restriction (Articles
38
+ L.122-6-1 III and IV of the French Intellectual Property Code), in which
39
+ case you shall first request the information from AYC;
40
+ (c) distribute, sell, rent, lease, lend, sublicense, publish or otherwise
41
+ make the SDK, or any part of it, available to any third party, other
42
+ than as bundled inside an application described in Section 1(a);
43
+ (d) use the SDK, or any knowledge of its interfaces, formats, protocols or
44
+ schemas obtained through it, to build, train or improve a product or
45
+ service that competes with Standards, or to access Standards other than
46
+ through the interfaces AYC documents;
47
+ (e) use the SDK to interact with any Standards instance, tenant or API that
48
+ you are not authorised to access, or to circumvent any authentication,
49
+ authorisation, rate limit, licence key or other technical measure;
50
+ (f) remove, alter or obscure any copyright, trademark, licence or other
51
+ proprietary notice in the SDK; or
52
+ (g) use AYC's or Standards' names, logos or trademarks except to state
53
+ truthfully that your application uses the Standards SDK.
54
+
55
+ 3. OWNERSHIP
56
+ The SDK is licensed, not sold. AYC and its licensors retain all right, title
57
+ and interest in and to the SDK, including all intellectual property rights.
58
+ No right is granted by implication, estoppel or otherwise. Any feedback or
59
+ suggestion you provide about the SDK may be used by AYC without restriction
60
+ or obligation.
61
+
62
+ 4. THIRD-PARTY COMPONENTS
63
+ The SDK may include or depend on third-party open source components. Those
64
+ components are governed by their own licences, which are identified in the
65
+ package metadata and prevail over this license for those components only.
66
+
67
+ 5. UPDATES
68
+ AYC may publish new versions of the SDK at any time. This license applies to
69
+ each version you obtain unless that version is accompanied by a different
70
+ licence. AYC has no obligation to maintain, support or update the SDK.
71
+
72
+ 6. TERM AND TERMINATION
73
+ This license is effective until terminated. It terminates automatically,
74
+ without notice, if you breach any of its terms. AYC may also terminate it on
75
+ written notice if your agreement with AYC or with the AYC customer whose
76
+ tenant you access ends. Upon termination you shall stop using the SDK and
77
+ destroy every copy in your possession or control. Sections 2, 3, 7, 8 and 9
78
+ survive termination.
79
+
80
+ 7. NO WARRANTY
81
+ THE SDK IS PROVIDED "AS IS" AND "AS AVAILABLE", WITHOUT WARRANTY OF ANY KIND,
82
+ EXPRESS OR IMPLIED, INCLUDING ANY WARRANTY OF MERCHANTABILITY, FITNESS FOR A
83
+ PARTICULAR PURPOSE, TITLE OR NON-INFRINGEMENT, TO THE FULLEST EXTENT
84
+ PERMITTED BY APPLICABLE LAW. AYC does not warrant that the SDK will be
85
+ error-free or uninterrupted.
86
+
87
+ 8. LIMITATION OF LIABILITY
88
+ TO THE FULLEST EXTENT PERMITTED BY APPLICABLE LAW, AYC SHALL NOT BE LIABLE
89
+ FOR ANY INDIRECT, INCIDENTAL, SPECIAL, CONSEQUENTIAL OR PUNITIVE DAMAGES, OR
90
+ FOR ANY LOSS OF PROFITS, REVENUE, DATA OR GOODWILL, ARISING OUT OF OR IN
91
+ CONNECTION WITH THE SDK OR THIS LICENSE. AYC'S TOTAL AGGREGATE LIABILITY
92
+ UNDER THIS LICENSE SHALL NOT EXCEED ONE HUNDRED EUROS (EUR 100). Nothing in
93
+ this license excludes or limits liability that cannot be excluded or limited
94
+ under applicable law, including liability for gross negligence, wilful
95
+ misconduct or death or personal injury caused by negligence.
96
+
97
+ 9. GOVERNING LAW AND JURISDICTION
98
+ This license is governed by the laws of France. Any dispute arising out of or
99
+ in connection with it shall be submitted to the exclusive jurisdiction of the
100
+ courts of Paris, France, subject to any mandatory rule granting jurisdiction
101
+ to another court.
102
+
103
+ 10. GENERAL
104
+ If any provision of this license is held unenforceable, the remaining
105
+ provisions remain in force. AYC's failure to enforce a provision is not a
106
+ waiver of it. This license is the entire agreement between you and AYC about
107
+ the SDK and supersedes any prior understanding about it, without prejudice to
108
+ any separate agreement governing your access to Standards.
109
+
110
+ To obtain a different licence, or for any question about this one, contact
111
+ AND YOU CREATE SAS, 60 rue François Ier, 75008 Paris, France.
package/README.md ADDED
@@ -0,0 +1,7 @@
1
+ # @stndrds/schema
2
+
3
+ Fluent builders (`object()`, `attribute()`, `view()`, and the full validator set) for declaring Standards schema — objects, attributes, and views — with end-to-end TypeScript inference; it is the shared contract consumed by `@stndrds/runtime`, `@stndrds/adapter-*`, `@stndrds/react`, `@stndrds/cli`, and `@stndrds/client`.
4
+
5
+ ## License
6
+
7
+ Licensed under the Standards SDK License 1.0 — see `LICENSE`. This package is not open source: it is provided to build applications that communicate with Standards.
@@ -1,77 +1,2 @@
1
- 'use strict';
2
-
3
- var zod = require('zod');
4
-
5
- // src/capabilities.ts
6
- var OBJECT_ID_DESCRIPTION = "Object UUID, kebab-case name (e.g., 'contacts'), or display label (e.g., 'Personne physique'). All three are accepted; UUID is most precise.";
7
- var SANDBOX_FILE_DATA_HINT = ' For large text content (> a few KB), write it to a sandbox file first and pass {"$fromSandboxFile": "/workspace/<file>"} as the attribute value \u2014 the server substitutes the file content.';
8
- var filtersSchema = zod.z.object({
9
- combinator: zod.z.enum(["and", "or"]).default("and"),
10
- rules: zod.z.array(
11
- zod.z.object({
12
- attribute: zod.z.string().describe("Attribute name on the object being searched"),
13
- property: zod.z.string().optional().describe(
14
- "Optional. Only valid when 'attribute' is a relation / document / user attribute declared with .qualifyWith({...}). When set, the rule filters on the named EDGE property (not the linked record) and the operator must be valid for that property's type. See <filter_operators>."
15
- ),
16
- operator: zod.z.string().describe(
17
- "Filter operator (canonical: is, is_not, contains, not_contains, starts_with, ends_with, less_than, greater_than, less_or_equal, greater_or_equal, is_within, on_day_month, any_of, none_of, is_empty, is_not_empty). Short codes (lt, gt, lte, gte, eq, neq, in) are accepted as input and auto-normalized to the canonical names. The valid set depends on the attribute type (or property type when 'property' is set) \u2014 see <filter_operators>."
18
- ),
19
- value: zod.z.unknown().nullable().describe(
20
- "Value matching the attribute (or property) type: scalar for is/contains/less_than/etc (checkbox is: true|false); array (string[]) for any_of/none_of; null for is_empty/is_not_empty; { amount, unit, direction } for is_within; { day, month } for on_day_month."
21
- )
22
- })
23
- )
24
- });
25
- var sortsSchema = zod.z.array(
26
- zod.z.object({
27
- attribute: zod.z.string().describe("Attribute name"),
28
- direction: zod.z.enum(["asc", "desc"])
29
- })
30
- );
31
- var getRecordInput = zod.z.object({
32
- recordId: zod.z.string().describe("Record UUID"),
33
- fields: zod.z.array(zod.z.string()).optional().describe("Attribute names to return")
34
- });
35
- var searchRecordsInput = zod.z.object({
36
- objectId: zod.z.string().describe(OBJECT_ID_DESCRIPTION),
37
- _displayLabel: zod.z.string().optional().describe("Display label"),
38
- query: zod.z.string().optional().describe("Full-text search query (omit to browse/list)"),
39
- limit: zod.z.number().optional().describe("Max results per call: 1-1000 (default 20). Paginate via offset for more."),
40
- offset: zod.z.number().optional().describe("Skip N records (default 0)"),
41
- fields: zod.z.array(zod.z.string()).optional().describe("Attribute names to include in values"),
42
- filters: filtersSchema.optional().describe(
43
- "Structured filter: { combinator: 'and'|'or', rules: [{attribute, operator, value, property?}] }. Operators are constrained per attribute type \u2014 see <filter_operators>. Use 'property' on a rule to filter on a qualified edge property."
44
- ),
45
- sorts: sortsSchema.optional().describe("Sorts: [{ attribute, direction: 'asc'|'desc' }]")
46
- });
47
- var createRecordInput = zod.z.object({
48
- objectId: zod.z.string().describe(OBJECT_ID_DESCRIPTION),
49
- _displayLabel: zod.z.string().optional().describe("Display label"),
50
- data: zod.z.record(zod.z.string(), zod.z.unknown()).describe(`Record data.${SANDBOX_FILE_DATA_HINT}`)
51
- });
52
- var updateRecordInput = zod.z.object({
53
- recordId: zod.z.string().describe("Record UUID"),
54
- data: zod.z.record(zod.z.string(), zod.z.unknown()).describe(`Fields to update.${SANDBOX_FILE_DATA_HINT}`)
55
- });
56
- var deleteRecordInput = zod.z.object({
57
- recordId: zod.z.string().describe("Record UUID")
58
- });
59
- var RECORD_CAPABILITIES = {
60
- get_record: { name: "get_record", kind: "read", input: getRecordInput },
61
- search_records: { name: "search_records", kind: "read", input: searchRecordsInput },
62
- create_record: { name: "create_record", kind: "create", input: createRecordInput },
63
- update_record: { name: "update_record", kind: "update", input: updateRecordInput },
64
- delete_record: { name: "delete_record", kind: "delete", input: deleteRecordInput }
65
- };
66
- var RECORD_CAPABILITY_KINDS = Object.freeze(
67
- Object.fromEntries(
68
- Object.values(RECORD_CAPABILITIES).map((capability) => [capability.name, capability.kind])
69
- )
70
- );
71
-
72
- exports.OBJECT_ID_DESCRIPTION = OBJECT_ID_DESCRIPTION;
73
- exports.RECORD_CAPABILITIES = RECORD_CAPABILITIES;
74
- exports.RECORD_CAPABILITY_KINDS = RECORD_CAPABILITY_KINDS;
75
- exports.SANDBOX_FILE_DATA_HINT = SANDBOX_FILE_DATA_HINT;
76
- exports.filtersSchema = filtersSchema;
77
- exports.sortsSchema = sortsSchema;
1
+ 'use strict';require('./chunk-DPD6ZWL2.js');var zod=require('zod');/*! © 2025-2026 AND YOU CREATE SAS (RCS Paris 940 190 614). Proprietary — see LICENSE (Standards SDK License 1.0). */
2
+ var r="Object UUID, kebab-case name (e.g., 'contacts'), or display label (e.g., 'Personne physique'). All three are accepted; UUID is most precise.",o=' For large text content (> a few KB), write it to a sandbox file first and pass {"$fromSandboxFile": "/workspace/<file>"} as the attribute value \u2014 the server substitutes the file content.',a=zod.z.object({combinator:zod.z.enum(["and","or"]).default("and"),rules:zod.z.array(zod.z.object({attribute:zod.z.string().describe("Attribute name on the object being searched"),property:zod.z.string().optional().describe("Optional. Only valid when 'attribute' is a relation / document / user attribute declared with .qualifyWith({...}). When set, the rule filters on the named EDGE property (not the linked record) and the operator must be valid for that property's type. See <filter_operators>."),operator:zod.z.string().describe("Filter operator (canonical: is, is_not, contains, not_contains, starts_with, ends_with, less_than, greater_than, less_or_equal, greater_or_equal, is_within, on_day_month, any_of, none_of, is_empty, is_not_empty). Short codes (lt, gt, lte, gte, eq, neq, in) are accepted as input and auto-normalized to the canonical names. The valid set depends on the attribute type (or property type when 'property' is set) \u2014 see <filter_operators>."),value:zod.z.unknown().nullable().describe("Value matching the attribute (or property) type: scalar for is/contains/less_than/etc (checkbox is: true|false); array (string[]) for any_of/none_of; null for is_empty/is_not_empty; { amount, unit, direction } for is_within; { day, month } for on_day_month.")}))}),i=zod.z.array(zod.z.object({attribute:zod.z.string().describe("Attribute name"),direction:zod.z.enum(["asc","desc"])})),n=zod.z.object({recordId:zod.z.string().describe("Record UUID"),fields:zod.z.array(zod.z.string()).optional().describe("Attribute names to return")}),s=zod.z.object({objectId:zod.z.string().describe(r),_displayLabel:zod.z.string().optional().describe("Display label"),query:zod.z.string().optional().describe("Full-text search query (omit to browse/list)"),limit:zod.z.number().optional().describe("Max results per call: 1-1000 (default 20). Paginate via offset for more."),offset:zod.z.number().optional().describe("Skip N records (default 0)"),fields:zod.z.array(zod.z.string()).optional().describe("Attribute names to include in values"),filters:a.optional().describe("Structured filter: { combinator: 'and'|'or', rules: [{attribute, operator, value, property?}] }. Operators are constrained per attribute type \u2014 see <filter_operators>. Use 'property' on a rule to filter on a qualified edge property."),sorts:i.optional().describe("Sorts: [{ attribute, direction: 'asc'|'desc' }]")}),d=zod.z.object({objectId:zod.z.string().describe(r),_displayLabel:zod.z.string().optional().describe("Display label"),data:zod.z.record(zod.z.string(),zod.z.unknown()).describe(`Record data.${o}`)}),c=zod.z.object({recordId:zod.z.string().describe("Record UUID"),data:zod.z.record(zod.z.string(),zod.z.unknown()).describe(`Fields to update.${o}`)}),p=zod.z.object({recordId:zod.z.string().describe("Record UUID")}),l={get_record:{name:"get_record",kind:"read",input:n},search_records:{name:"search_records",kind:"read",input:s},create_record:{name:"create_record",kind:"create",input:d},update_record:{name:"update_record",kind:"update",input:c},delete_record:{name:"delete_record",kind:"delete",input:p}},b=Object.freeze(Object.fromEntries(Object.values(l).map(t=>[t.name,t.kind])));exports.OBJECT_ID_DESCRIPTION=r;exports.RECORD_CAPABILITIES=l;exports.RECORD_CAPABILITY_KINDS=b;exports.SANDBOX_FILE_DATA_HINT=o;exports.filtersSchema=a;exports.sortsSchema=i;
@@ -1,70 +1,2 @@
1
- import { z } from 'zod';
2
-
3
- // src/capabilities.ts
4
- var OBJECT_ID_DESCRIPTION = "Object UUID, kebab-case name (e.g., 'contacts'), or display label (e.g., 'Personne physique'). All three are accepted; UUID is most precise.";
5
- var SANDBOX_FILE_DATA_HINT = ' For large text content (> a few KB), write it to a sandbox file first and pass {"$fromSandboxFile": "/workspace/<file>"} as the attribute value \u2014 the server substitutes the file content.';
6
- var filtersSchema = z.object({
7
- combinator: z.enum(["and", "or"]).default("and"),
8
- rules: z.array(
9
- z.object({
10
- attribute: z.string().describe("Attribute name on the object being searched"),
11
- property: z.string().optional().describe(
12
- "Optional. Only valid when 'attribute' is a relation / document / user attribute declared with .qualifyWith({...}). When set, the rule filters on the named EDGE property (not the linked record) and the operator must be valid for that property's type. See <filter_operators>."
13
- ),
14
- operator: z.string().describe(
15
- "Filter operator (canonical: is, is_not, contains, not_contains, starts_with, ends_with, less_than, greater_than, less_or_equal, greater_or_equal, is_within, on_day_month, any_of, none_of, is_empty, is_not_empty). Short codes (lt, gt, lte, gte, eq, neq, in) are accepted as input and auto-normalized to the canonical names. The valid set depends on the attribute type (or property type when 'property' is set) \u2014 see <filter_operators>."
16
- ),
17
- value: z.unknown().nullable().describe(
18
- "Value matching the attribute (or property) type: scalar for is/contains/less_than/etc (checkbox is: true|false); array (string[]) for any_of/none_of; null for is_empty/is_not_empty; { amount, unit, direction } for is_within; { day, month } for on_day_month."
19
- )
20
- })
21
- )
22
- });
23
- var sortsSchema = z.array(
24
- z.object({
25
- attribute: z.string().describe("Attribute name"),
26
- direction: z.enum(["asc", "desc"])
27
- })
28
- );
29
- var getRecordInput = z.object({
30
- recordId: z.string().describe("Record UUID"),
31
- fields: z.array(z.string()).optional().describe("Attribute names to return")
32
- });
33
- var searchRecordsInput = z.object({
34
- objectId: z.string().describe(OBJECT_ID_DESCRIPTION),
35
- _displayLabel: z.string().optional().describe("Display label"),
36
- query: z.string().optional().describe("Full-text search query (omit to browse/list)"),
37
- limit: z.number().optional().describe("Max results per call: 1-1000 (default 20). Paginate via offset for more."),
38
- offset: z.number().optional().describe("Skip N records (default 0)"),
39
- fields: z.array(z.string()).optional().describe("Attribute names to include in values"),
40
- filters: filtersSchema.optional().describe(
41
- "Structured filter: { combinator: 'and'|'or', rules: [{attribute, operator, value, property?}] }. Operators are constrained per attribute type \u2014 see <filter_operators>. Use 'property' on a rule to filter on a qualified edge property."
42
- ),
43
- sorts: sortsSchema.optional().describe("Sorts: [{ attribute, direction: 'asc'|'desc' }]")
44
- });
45
- var createRecordInput = z.object({
46
- objectId: z.string().describe(OBJECT_ID_DESCRIPTION),
47
- _displayLabel: z.string().optional().describe("Display label"),
48
- data: z.record(z.string(), z.unknown()).describe(`Record data.${SANDBOX_FILE_DATA_HINT}`)
49
- });
50
- var updateRecordInput = z.object({
51
- recordId: z.string().describe("Record UUID"),
52
- data: z.record(z.string(), z.unknown()).describe(`Fields to update.${SANDBOX_FILE_DATA_HINT}`)
53
- });
54
- var deleteRecordInput = z.object({
55
- recordId: z.string().describe("Record UUID")
56
- });
57
- var RECORD_CAPABILITIES = {
58
- get_record: { name: "get_record", kind: "read", input: getRecordInput },
59
- search_records: { name: "search_records", kind: "read", input: searchRecordsInput },
60
- create_record: { name: "create_record", kind: "create", input: createRecordInput },
61
- update_record: { name: "update_record", kind: "update", input: updateRecordInput },
62
- delete_record: { name: "delete_record", kind: "delete", input: deleteRecordInput }
63
- };
64
- var RECORD_CAPABILITY_KINDS = Object.freeze(
65
- Object.fromEntries(
66
- Object.values(RECORD_CAPABILITIES).map((capability) => [capability.name, capability.kind])
67
- )
68
- );
69
-
70
- export { OBJECT_ID_DESCRIPTION, RECORD_CAPABILITIES, RECORD_CAPABILITY_KINDS, SANDBOX_FILE_DATA_HINT, filtersSchema, sortsSchema };
1
+ import'./chunk-KSPJP74K.mjs';import {z}from'zod';/*! © 2025-2026 AND YOU CREATE SAS (RCS Paris 940 190 614). Proprietary — see LICENSE (Standards SDK License 1.0). */
2
+ var r="Object UUID, kebab-case name (e.g., 'contacts'), or display label (e.g., 'Personne physique'). All three are accepted; UUID is most precise.",o=' For large text content (> a few KB), write it to a sandbox file first and pass {"$fromSandboxFile": "/workspace/<file>"} as the attribute value \u2014 the server substitutes the file content.',a=z.object({combinator:z.enum(["and","or"]).default("and"),rules:z.array(z.object({attribute:z.string().describe("Attribute name on the object being searched"),property:z.string().optional().describe("Optional. Only valid when 'attribute' is a relation / document / user attribute declared with .qualifyWith({...}). When set, the rule filters on the named EDGE property (not the linked record) and the operator must be valid for that property's type. See <filter_operators>."),operator:z.string().describe("Filter operator (canonical: is, is_not, contains, not_contains, starts_with, ends_with, less_than, greater_than, less_or_equal, greater_or_equal, is_within, on_day_month, any_of, none_of, is_empty, is_not_empty). Short codes (lt, gt, lte, gte, eq, neq, in) are accepted as input and auto-normalized to the canonical names. The valid set depends on the attribute type (or property type when 'property' is set) \u2014 see <filter_operators>."),value:z.unknown().nullable().describe("Value matching the attribute (or property) type: scalar for is/contains/less_than/etc (checkbox is: true|false); array (string[]) for any_of/none_of; null for is_empty/is_not_empty; { amount, unit, direction } for is_within; { day, month } for on_day_month.")}))}),i=z.array(z.object({attribute:z.string().describe("Attribute name"),direction:z.enum(["asc","desc"])})),n=z.object({recordId:z.string().describe("Record UUID"),fields:z.array(z.string()).optional().describe("Attribute names to return")}),s=z.object({objectId:z.string().describe(r),_displayLabel:z.string().optional().describe("Display label"),query:z.string().optional().describe("Full-text search query (omit to browse/list)"),limit:z.number().optional().describe("Max results per call: 1-1000 (default 20). Paginate via offset for more."),offset:z.number().optional().describe("Skip N records (default 0)"),fields:z.array(z.string()).optional().describe("Attribute names to include in values"),filters:a.optional().describe("Structured filter: { combinator: 'and'|'or', rules: [{attribute, operator, value, property?}] }. Operators are constrained per attribute type \u2014 see <filter_operators>. Use 'property' on a rule to filter on a qualified edge property."),sorts:i.optional().describe("Sorts: [{ attribute, direction: 'asc'|'desc' }]")}),d=z.object({objectId:z.string().describe(r),_displayLabel:z.string().optional().describe("Display label"),data:z.record(z.string(),z.unknown()).describe(`Record data.${o}`)}),c=z.object({recordId:z.string().describe("Record UUID"),data:z.record(z.string(),z.unknown()).describe(`Fields to update.${o}`)}),p=z.object({recordId:z.string().describe("Record UUID")}),l={get_record:{name:"get_record",kind:"read",input:n},search_records:{name:"search_records",kind:"read",input:s},create_record:{name:"create_record",kind:"create",input:d},update_record:{name:"update_record",kind:"update",input:c},delete_record:{name:"delete_record",kind:"delete",input:p}},b=Object.freeze(Object.fromEntries(Object.values(l).map(t=>[t.name,t.kind])));export{r as OBJECT_ID_DESCRIPTION,l as RECORD_CAPABILITIES,b as RECORD_CAPABILITY_KINDS,o as SANDBOX_FILE_DATA_HINT,a as filtersSchema,i as sortsSchema};
@@ -0,0 +1,2 @@
1
+ 'use strict';var chunkJFSQ24XR_js=require('./chunk-JFSQ24XR.js'),chunkDPD6ZWL2_js=require('./chunk-DPD6ZWL2.js'),zod=require('zod');/*! © 2025-2026 AND YOU CREATE SAS (RCS Paris 940 190 614). Proprietary — see LICENSE (Standards SDK License 1.0). */
2
+ function m(e,s=chunkJFSQ24XR_js.a){let t=zod.z.guid({message:s.invalidId(e)});return e.multiple?zod.z.array(t):t}chunkDPD6ZWL2_js.a(m,"createUserValidator");exports.a=m;
@@ -0,0 +1,6 @@
1
+ import {c as c$1}from'./chunk-GKXTXH4Y.mjs';import {a as a$b}from'./chunk-VKFLXFPP.mjs';import {b as b$1,a as a$5,c as c$2}from'./chunk-YIXNAWH6.mjs';import {a as a$4}from'./chunk-XRDP2Y4J.mjs';import {a as a$3}from'./chunk-Q7TQCRSD.mjs';import {a as a$2}from'./chunk-WMQRTFOP.mjs';import {a as a$9}from'./chunk-4VCADZK4.mjs';import {a as a$8}from'./chunk-KYPEBOPW.mjs';import {a as a$a}from'./chunk-KG2ADZG6.mjs';import {c as c$3}from'./chunk-O34B5KOW.mjs';import {h}from'./chunk-YBDR5ZMH.mjs';import {a as a$7}from'./chunk-PFO7NWQW.mjs';import {a as a$6}from'./chunk-XMQV2WFY.mjs';import {d}from'./chunk-LB4TNMZU.mjs';import {a as a$1,b as b$2}from'./chunk-4OTKOCGB.mjs';import {a}from'./chunk-KSPJP74K.mjs';import {z}from'zod';/*! © 2025-2026 AND YOU CREATE SAS (RCS Paris 940 190 614). Proprietary — see LICENSE (Standards SDK License 1.0). */
2
+ function N(t){return t==null||typeof t=="string"&&t.trim()===""?true:t instanceof Date?false:typeof t=="object"&&!Array.isArray(t)?Object.values(t).every(e=>e==null||typeof e=="string"&&e.trim()===""):false}a(N,"isEmptyValue");function c(t){return z.preprocess(e=>N(e)?null:e,t.nullish())}a(c,"withEmptyToNull");function s(t,e=a$1){switch(t.type){case "text":return c$3(t,e);case "richtext":return a$b(t,e);case "number":return a$a(t,e);case "checkbox":return a$9(t,e);case "date":return a$8(t,e);case "phone":return d(t,e);case "currency":return a$7(t,e);case "status":return c$2(t,e);case "location":return a$6(t,e);case "select":return a$5(t,e);case "multiselect":return b$1(t,e);case "user":return a$4(t,e);case "relation":return c$1(t,e);case "formula":return a$3(t,e);case "rollup":return a$2(t,e);default:return z.unknown()}}a(s,"createAttributeValidator");function q(t,e=a$1){let o=s(t,e);return t.required?o:c(o)}a(q,"createFormAttributeValidator");function ft(t){return t==null||t===""}a(ft,"isNullishOrEmptyString");function f(t){return t==null?false:typeof t=="string"?t.trim()!=="":Array.isArray(t)?t.length>0:true}a(f,"isValuePresent");var E=new WeakMap,M=new WeakMap;function p(t){let e=E.get(t);if(e)return e;let o={};for(let n of t.attributes){let a=s(n);n.required?o[n.name]=a.refine(f,{message:a$1.required(n)}):o[n.name]=c(a);}let r=z.object(o).passthrough();return E.set(t,r),r}a(p,"createObjectValidator");function m(t){let e=M.get(t);if(e)return e;let o={};for(let n of t.attributes){let a=s(n);o[n.name]=c(a);}let r=z.object(o).passthrough();return M.set(t,r),r}a(m,"createDraftValidator");function F(t,e){let o=s(t);if(!t.required&&e==null)return {success:true,data:{[t.name]:e}};let r=o.safeParse(e);return r.success?{success:true,data:{[t.name]:r.data}}:{success:false,errors:b$2(r.error).map(n=>({path:[t.name,...n.path],message:n.message}))}}a(F,"validateAttribute");function b(t,e){let r=p(t).safeParse(e);return r.success?{success:true,data:r.data}:{success:false,errors:b$2(r.error)}}a(b,"validateObject");function L(t,e){let o=b(t,e);if(!o.success){let r=o.errors??[],n=r.map(a=>`${a.path.join(".")}: ${a.message}`).join(`
3
+ `)||"Unknown validation error";throw new h(`Validation failed for ${t.label}:
4
+ ${n}`,r.map(a=>({path:a.path,message:a.message})))}return o.data}a(L,"validateObjectOrThrow");function Z(t,e){let r=m(t).safeParse(e);return r.success?{success:true,data:r.data}:{success:false,errors:b$2(r.error)}}a(Z,"validateDraft");function v(t,e){let o=Z(t,e);if(!o.success){let r=o.errors??[],n=r.map(a=>`${a.path.join(".")}: ${a.message}`).join(`
5
+ `)||"Unknown validation error";throw new h(`Draft validation failed for ${t.label}:
6
+ ${n}`,r.map(a=>({path:a.path,message:a.message})))}return o.data}a(v,"validateDraftOrThrow");function I(t,e){let o=new Set(t.attributes.map(n=>n.name)),r=Object.keys(e).filter(n=>!o.has(n));if(r.length>0)throw new h(`Unknown attribute${r.length>1?"s":""} for ${t.label}: ${r.join(", ")}`,r.map(n=>({path:[n],message:"Unknown attribute"})))}a(I,"rejectUnknownAttributesOrThrow");function $(t,e){let o=[];for(let r of t.attributes)r.required&&!f(e[r.name])&&o.push(r);return o}a($,"getMissingRequiredAttributes");function _(t,e){return $(t,e).length>0?false:b(t,e).success}a(_,"isRecordComplete");export{ft as a,f as b,s as c,q as d,p as e,m as f,F as g,b as h,L as i,Z as j,v as k,I as l,$ as m,_ as n};
@@ -0,0 +1,2 @@
1
+ 'use strict';var chunkJFSQ24XR_js=require('./chunk-JFSQ24XR.js'),chunkDPD6ZWL2_js=require('./chunk-DPD6ZWL2.js'),zod=require('zod');/*! © 2025-2026 AND YOU CREATE SAS (RCS Paris 940 190 614). Proprietary — see LICENSE (Standards SDK License 1.0). */
2
+ function b(r,a=chunkJFSQ24XR_js.a){return zod.z.boolean()}chunkDPD6ZWL2_js.a(b,"createCheckboxValidator");exports.a=b;
@@ -0,0 +1,2 @@
1
+ import {a}from'./chunk-KSPJP74K.mjs';/*! © 2025-2026 AND YOU CREATE SAS (RCS Paris 940 190 614). Proprietary — see LICENSE (Standards SDK License 1.0). */
2
+ var l={required:a(e=>`${e.label} is required`,"required"),invalidType:a((e,t)=>`${e.label} must be a ${t}`,"invalidType"),minLength:a((e,t)=>`${e.label} must be at least ${t} characters`,"minLength"),maxLength:a((e,t)=>`${e.label} must be at most ${t} characters`,"maxLength"),invalidPattern:a(e=>`${e.label} format is invalid`,"invalidPattern"),minValue:a((e,t)=>`${e.label} must be at least ${t}`,"minValue"),maxValue:a((e,t)=>`${e.label} must be at most ${t}`,"maxValue"),mustBeInteger:a(e=>`${e.label} must be an integer`,"mustBeInteger"),invalidDate:a(e=>`${e.label} must be a valid date`,"invalidDate"),invalidOption:a((e,t)=>`${e.label} must be one of: ${t.join(", ")}`,"invalidOption"),invalidId:a(e=>`${e.label} must be a valid ID`,"invalidId"),maxItems:a((e,t)=>`${e.label} must have at most ${t} item${t>1?"s":""}`,"maxItems"),invalidRichtext:a(e=>`${e.label} must be valid rich text content`,"invalidRichtext"),invalidPhone:a(e=>`${e.label} must be a valid phone number`,"invalidPhone"),invalidCurrency:a(e=>`${e.label} must be a valid currency value`,"invalidCurrency"),invalidLocation:a(e=>`${e.label} must be a valid location`,"invalidLocation")};function i(e){return e.issues.map(t=>({path:t.path.map(String),message:t.message}))}a(i,"formatZodErrors");export{l as a,i as b};
@@ -0,0 +1,2 @@
1
+ import {a as a$1}from'./chunk-4OTKOCGB.mjs';import {a}from'./chunk-KSPJP74K.mjs';import {z}from'zod';/*! © 2025-2026 AND YOU CREATE SAS (RCS Paris 940 190 614). Proprietary — see LICENSE (Standards SDK License 1.0). */
2
+ function b(r,a=a$1){return z.boolean()}a(b,"createCheckboxValidator");export{b as a};
@@ -0,0 +1,2 @@
1
+ import {a as a$1,c}from'./chunk-OCAMDRO3.mjs';import {h}from'./chunk-YBDR5ZMH.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
+ var Pt={createdAt:"createdAt",updatedAt:"updatedAt",createdBy:"createdBy",lastUpdatedBy:"lastUpdatedBy",attachments:"attachments"};function ur(t){return Pt[t]}a(ur,"getSystemAttributeI18nKey");var kt={createdAt:{id:"system:createdAt",name:"createdAt",label:"Created time",type:"date",required:false,system:true,icon:"clock-circle",description:"When this record was created"},updatedAt:{id:"system:updatedAt",name:"updatedAt",label:"Last edited time",type:"date",required:false,system:true,icon:"clock-circle",description:"When this record was last modified"},createdBy:{id:"system:createdBy",name:"createdBy",label:"Created by",type:"user",required:false,system:true,multiple:false,icon:"user",description:"Actor who created this record"},lastUpdatedBy:{id:"system:lastUpdatedBy",name:"lastUpdatedBy",label:"Last edited by",type:"user",required:false,system:true,multiple:false,icon:"user",description:"Actor who last modified this record"},attachments:{id:"system:attachments",name:"attachments",label:"Attachments",type:"document",required:false,system:true,hidden:true,icon:"paperclip",description:"Free-form document attachments"}};function cr(){return Object.values(kt)}a(cr,"getSystemAttributeList");function G(t){return t.id?.startsWith("system:")??false}a(G,"isManagedSystemAttribute");var Q=["is","is_not","contains","not_contains","starts_with","ends_with","is_empty","is_not_empty"],K=["is","is_not","less_than","greater_than","less_or_equal","greater_or_equal","is_empty","is_not_empty"],Bt=["is"],Lt=["is","is_not","less_than","greater_than","less_or_equal","greater_or_equal","is_within","on_day_month","is_empty","is_not_empty"],J=["is","is_not","any_of","none_of","is_empty","is_not_empty"],jt=["any_of","none_of","is_empty","is_not_empty"],H=["is","is_not","any_of","none_of","is_empty","is_not_empty"],Nt=["is_empty","is_not_empty"],Mt=["is","is_not","less_than","greater_than","less_or_equal","greater_or_equal","contains","not_contains","is_empty","is_not_empty"],w=["city","postalCode","country"];function F(t){return w.includes(t)}a(F,"isLocationFilterProperty");function br(t){return Q.includes(t)}a(br,"isLocationPartOperator");var y={text:Q,richtext:[],number:K,checkbox:Bt,date:Lt,phone:["is","is_not","contains","not_contains","starts_with","is_empty","is_not_empty"],currency:K,status:J,select:J,multiselect:jt,location:[],user:H,relation:H,formula:Mt,document:Nt},Ut=new Set(["formula","rollup"]),qt=new Set(["user","relation","document"]),$t=new Set(["text","richtext","number","select","multiselect","status","date","phone","currency","location","user","relation","document"]),zt=new Set(["text","number","date","phone","currency","select","multiselect"]),Yt=new Set(["text","phone","status","select","multiselect"]),Wt=new Set(["text","number","checkbox","date","phone","currency","status","select"]);function g(t){let r=!!(t.hidden||t.archived),i=!t.archived,n=Ut.has(t.type),a=t.type==="document",s=qt.has(t.type),l=Kt(t),u=r?[]:Gt(t),c=u.length>0&&!r,h=!r&&Yt.has(t.type),_=!r&&Wt.has(t.type),T=!r&&oe(t.type),R=!r&&t.type==="status",It=G(t),q=n||a||It,O=!(r||q),vt=Xt(t.type)?"forbidden":"allowed",Dt=Zt(t.type),$=Ht(t),z=zt.has(t.type),Y=!!(t.deprecated&&!r),W=re(t);return {lifecycle:{active:i,deprecated:!!t.deprecated,visibleInArchitect:true,visibleInRuntime:!r,warningWhenDeprecated:Y},storage:{mode:n?"computed":s?"edge":"value",cardinality:l,edgeBacked:s,preservesExistingValues:!!t.archived,qualifiedProperties:Qt(t.type),polymorphic:Jt(t),maxItems:$},authoring:{editable:O,readOnly:q,directEdit:O&&W==="inline",required:vt,defaultValue:Dt,placeholder:z,maxItems:$},presentation:{formField:!r&&ee(t.type),tableCell:!r&&Z(t.type),defaultColumn:!r&&te(t.type),compactDisplay:!r,popoverEditor:!r&&W==="popover",placeholder:z,warningWhenDeprecated:Y},query:{filterable:c,searchable:h,sortable:_,groupable:T,kanbanGroupable:R,operators:u},agent:{readable:!r,writable:O&&!a,compactReadable:!r,contentReadable:!r&&ie(t.type),requiresDedicatedTool:a},exchange:{importable:!r,exportable:!r,schemaExportable:true,metadataExportable:false}}}a(g,"getAttributeCapabilities");function X(t){return g(t).query.operators}a(X,"getAttributeFilterOperators");function yr(t){return g(t).query.filterable}a(yr,"isAttributeFilterable");function fr(t){return g(t).query.searchable}a(fr,"isAttributeSearchable");function hr(t){return g(t).query.sortable}a(hr,"isAttributeSortable");function _r(t){return g(t).query.groupable}a(_r,"isAttributeGroupable");function gr(t){return g(t).query.kanbanGroupable}a(gr,"isAttributeKanbanGroupable");function C(t){if(t.type!=="rollup")return t.type;let r=t;if(r.function==="earliest"||r.function==="latest")return "date";if(r.function==="original"){let i=r.targetAttributeType;if(i&&tt(i))return i}return "number"}a(C,"resolveEffectiveFilterType");function V(t){let r=C(t);return tt(r)?y[r]:y.number}a(V,"getRollupFilterOperators");function Gt(t){return t.type==="rollup"?V(t):y[t.type]??[]}a(Gt,"getRawFilterOperators");function Kt(t){return t.type==="multiselect"||t.type==="document"||t.type==="user"&&t.multiple===true||t.type==="relation"&&t.cardinality==="many"?"many":"one"}a(Kt,"getAttributeCardinality");function Jt(t){if(t.type!=="relation")return "none";let i=t.targets??[];return i.length===1&&i[0]?.object==="*"?"internal":i.length>1?"code-only":"none"}a(Jt,"getPolymorphicCapability");function Ht(t){return t.type==="multiselect"?true:t.type==="relation"?t.cardinality==="many":false}a(Ht,"supportsMaxItems");function Qt(t){return t==="relation"||t==="document"}a(Qt,"supportsQualifiedProperties");function Xt(t){return t==="checkbox"||t==="formula"||t==="rollup"}a(Xt,"isRequiredForbidden");function Zt(t){return t==="checkbox"?"automatic":t==="formula"||t==="rollup"?"forbidden":$t.has(t)?"static":"forbidden"}a(Zt,"getDefaultValueCapability");function te(t){return Z(t)}a(te,"isDefaultColumnType");function Z(t){return t!=="richtext"&&t!=="document"}a(Z,"isTableCellType");function ee(t){return t!=="richtext"}a(ee,"isFormFieldType");function re(t){switch(t.type){case "checkbox":return "inline";case "number":return t.renderAs==="rating"?"inline":"default";case "select":case "multiselect":return t.renderAs==="badges"?"inline":"popover";case "status":case "relation":case "user":case "date":return "popover";default:return "default"}}a(re,"resolveEditMode");function oe(t){return t==="status"||t==="currency"}a(oe,"isGroupableType");function ie(t){return t==="richtext"||t==="document"}a(ie,"isContentReadableType");function tt(t){return Object.prototype.hasOwnProperty.call(y,t)}a(tt,"hasFilterOperatorEntry");var f=y,ne=["is_empty","is_not_empty"];function et(t){return ne.includes(t)}a(et,"isNoValueOperator");function Er(t){return V(t)}a(Er,"getRollupFilterOperators");function A(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)&&"dynamic"in t}a(A,"isDynamicValue");function Or(){return {dynamic:"actor",ref:"current"}}a(Or,"currentActor");function wr(){return {dynamic:"date",anchor:"today"}}a(wr,"today");function Fr(){return {dynamic:"date",anchor:"now"}}a(Fr,"now");function rt(t){if(typeof t=="number")return Number.isFinite(t)?t:null;if(typeof t=="string"&&t.trim()!==""){let r=Number(t);return Number.isFinite(r)?r:null}return null}a(rt,"toAmount");function ot(t){return t!==null&&typeof t=="object"?"value"in t?rt(t.value):null:rt(t)}a(ot,"extractCurrencyFilterValue");function Ir(t){return t==null?null:typeof t=="object"&&"value"in t?t.value??null:t}a(Ir,"extractFilterValue");var ae=new Set(["is_not","not_contains","none_of","is_empty"]),se={is_not:"is",not_contains:"contains",none_of:"any_of",is_empty:"is_not_empty"};function Pr(t){return ae.has(t)?"none":"any"}a(Pr,"getOperatorPolarity");function kr(t){return se[t]??t}a(kr,"normalizeForEdgeRpc");var it={is:"any_of",is_not:"none_of"};function Br(t){return it[t]??t}a(Br,"toMultiValueOperator");var le=new Set(Object.values(it).filter(t=>t!==void 0));function nt(t){return le.has(t)}a(nt,"isSetMembershipOperator");function at(t,r){let i=t.value;if(et(t.operator)||i==null||A(i))return;if(nt(t.operator)){Array.isArray(i)||(t.value=[i]);return}if(r!=="currency")return;let n=ot(i);if(n!==null){t.value=n;return}if(!ue(i))return;let a=`Filter on a currency attribute expected a numeric amount, received ${JSON.stringify(i)}`;throw new h(a,[{path:["value"],message:a}])}a(at,"canonicalizeFilterValue");function ue(t){return typeof t!="object"?true:"value"in t?t.value!=null:false}a(ue,"hasCurrencyAmount");var ce={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 I(t){return ce[t]??t}a(I,"normalizeOperator");function Wr(t){let r=I(t.operator);return r===t.operator?t:{...t,operator:r}}a(Wr,"normalizeFilterRule");var pe=new Set(["days","weeks","months","years"]),de=new Set(["past","future"]);function v(t){if(typeof t!="object"||t===null)return false;let r=t;return typeof r.amount=="number"&&Number.isFinite(r.amount)&&r.amount>0&&typeof r.unit=="string"&&pe.has(r.unit)&&typeof r.direction=="string"&&de.has(r.direction)}a(v,"isRelativeDateValue");function lt(t){return Date.UTC(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate())}a(lt,"utcDayStart");function st(t,r,i){if(i==="days")return t+r*864e5;if(i==="weeks")return t+r*7*864e5;let n=new Date(t),a=n.getUTCFullYear()+(i==="years"?r:0),s=n.getUTCMonth()+(i==="months"?r:0),l=new Date(Date.UTC(a,s+1,0)).getUTCDate();return Date.UTC(a,s,Math.min(n.getUTCDate(),l))}a(st,"shiftUtcDay");function Jr(t,r=new Date){if(!v(t))return null;let i=lt(r),n=Math.trunc(t.amount),a=t.direction==="past"?{startMs:st(i,-n,t.unit),endMs:i+864e5}:{startMs:i,endMs:st(i,n,t.unit)+864e5};return Number.isFinite(a.startMs)&&Number.isFinite(a.endMs)?a:null}a(Jr,"resolveIsWithinBounds");function Hr(t){if(!Number.isFinite(t))return null;let r=lt(new Date(t));return Number.isFinite(r)?{startMs:r,endMs:r+864e5}:null}a(Hr,"resolveUtcDayBounds");function Qr(t){return new Date(t).toISOString().slice(0,10)}a(Qr,"toUtcDayString");var me=new Set(["relation","document","user"]),D=["is","is_not","any_of","none_of","is_empty","is_not_empty"],be={id:D,objectId:D,tenantId:D,label:f.text,createdAt:f.date,updatedAt:f.date,deletedAt:f.date,createdBy:f.user,lastUpdatedBy:f.user},ye={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"},B={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"'},fe=new Set(Object.entries(y).filter(([,t])=>t.includes("any_of")&&!t.includes("contains")).map(([t])=>t)),he={contains:"any_of",not_contains:"none_of"};function P(t,r){let i=B[t];if(i){let s=`Unknown filter operator "${t}" \u2014 use ${i}`;throw new h(s,[{path:["operator"],message:s}])}let n=I(t),a=he[n];if(a&&fe.has(r)){let s=`Operator "${n}" is not valid for type "${r}" \u2014 use "${a}"`;throw new h(s,[{path:["operator"],message:s}])}return n}a(P,"resolveCanonicalOperator");function ut(t,r,i){let n=P(t,r),a=f[r];if(!a?.includes(n)){let s=a?.length?a.join(", "):"(no operators registered for this type)",l=`Operator "${t}" is not valid for ${i} type "${r}". Valid operators: ${s}.`;throw new h(l,[{path:["operator"],message:l}])}return n}a(ut,"assertOperatorForType");function _e(t){if(t.operator==="is_within"&&!v(t.value)){let r='Operator "is_within" requires a relative-date value { amount: positive number, unit: days|weeks|months|years, direction: past|future }';throw new h(r,[{path:["value"],message:r}])}}a(_e,"assertRelativeDateValue");function E(t,r,i){t.operator=r,at(t,i),_e(t);}a(E,"applyCanonicalForm");function ct(t,r){if(!A(t.value))return;let i=t.value;if(i.dynamic==="actor"&&r!=="user"){let n=`actor token (@me) is only valid on user attributes, not "${r}"`;throw new h(n,[{path:["value"],message:n}])}if(i.dynamic==="date"&&r!=="date"){let n=`date token (@today/@now) is only valid on date attributes, not "${r}"`;throw new h(n,[{path:["value"],message:n}])}}a(ct,"assertDynamicValueForAttribute");var k=w.map(t=>`"${t}"`).join(", ");function ge(t){return t==="location"?` A location is filtered on one of its parts: set "property" to one of ${k} and use a text operator (e.g. contains).`:""}a(ge,"locationPartsHint");function so(t,r){try{return Te({...t},r),[]}catch(i){if(!(i instanceof h))throw i;return i.errors.map(n=>({...n,path:[...n.path]}))}}a(so,"collectQualifiedRuleIssues");function Te(t,r){let i=r.attributes.find(u=>u.name===t.attribute),n=be[t.attribute];if(!(i||n)){let[u,...c]=t.attribute.split("."),_=(c.length>0?r.attributes.find(R=>R.name===u):void 0)?.type==="location"?` Dotted paths are not supported \u2014 set "attribute" to "${u}" and "property" to ${F(c[0]??"")?`"${c[0]}"`:`one of ${k}`}.`:t.attribute.includes(".")?' Dotted paths are not supported \u2014 filter on the attribute name alone, or use the full-text "query" parameter to match text inside a value.':"",T=`Unknown attribute: ${t.attribute}${_}`;throw new h(T,[{path:["attribute"],message:T}])}if(t.quantifier!==void 0&&!t.property){let u='quantifier is only valid on qualified edge rules (set "property")';throw new h(u,[{path:["quantifier"],message:u}])}if(!i){if(t.property)throw new h(`Cannot qualify system attribute "${t.attribute}"`,[{path:["property"],message:`"${t.attribute}" is a system column, not a reference`}]);let u=ye[t.attribute]??"text",c=P(t.operator,u);if(!n.includes(c)){let h$1=`Operator "${t.operator}" is not valid for system attribute "${t.attribute}". Valid operators: ${n.join(", ")}.`;throw new h(h$1,[{path:["operator"],message:h$1}])}E(t,c,u);return}if(!t.property){ct(t,i.type);let u=X(i),c=P(t.operator,i.type);if(!u.includes(c)){let h$1=u.length?u.join(", "):"(not filterable)",_=`Operator "${t.operator}" is not valid for attribute "${i.name}". Valid operators: ${h$1}.${ge(i.type)}`;throw new h(_,[{path:["operator"],message:_}])}E(t,c,C(i));return}if(i.type==="location"){if(t.quantifier!==void 0){let c="quantifier is not valid on a location part \u2014 a location is one value, not a set of edges";throw new h(c,[{path:["quantifier"],message:c}])}if(!F(t.property)){let c=`Property "${t.property}" is not a part of location "${t.attribute}". Valid parts: ${k}.`;throw new h(c,[{path:["property"],message:c}])}ct(t,"text");let u=ut(t.operator,"text","property");E(t,u,"text");return}if(!me.has(i.type))throw new h(`Cannot qualify ${i.type} attribute "${t.attribute}"`,[{path:["property"],message:`Attribute "${t.attribute}" is not a reference type`}]);let a=i.properties;if(!a)throw new h(`Attribute "${t.attribute}" has no qualifyWith schema`,[{path:["property"],message:`"${t.attribute}" has no qualifyWith`}]);let s=a.definitions.find(u=>u.name===t.property);if(!s)throw new h(`Property "${t.property}" not defined on "${t.attribute}".qualifyWith()`,[{path:["property"],message:`Unknown property: ${t.property}`}]);let l=ut(t.operator,s.type,"property");E(t,l,s.type);}a(Te,"validateQualifiedRule");var L=["workspace","private"],pt=["all",...L];function po(t){if(typeof t=="string"&&L.includes(t))return t;throw new h(`visibility must be one of: ${L.join(", ")} (received: ${String(t)})`,[])}a(po,"parseResourceVisibility");var Se=["id","createdAt","updatedAt","createdBy","lastUpdatedBy","visibility","ownedBy"],mo=[...Se,"objectId","label","embeddingText","values","metadata","deletedAt","deletedBy","schemaVersion","owned_by"],bo=["skill"];var yt=z.enum(["redirect","inline","peek"]),Ae=z.array(z.string()).min(1),x=z.array(z.string()).max(a$1.columnsPerTab),Ee=z.array(z.string().min(1)).max(a$1.columnsPerTab).refine(t=>new Set(t).size===t.length,{message:"Displayed attribute names must be unique"}),xe=z.object({attribute:z.string(),direction:z.enum(["asc","desc"])}).strict(),ft=z.array(xe).max(a$1.sortsPerTab),Re=z.object({amount:z.number(),unit:z.enum(["days","weeks","months","years"]),direction:z.enum(["past","future"])}).strict(),Oe=z.object({value:z.number().nullable(),code:z.array(z.string()).optional()}).strict(),we=z.object({phoneNumber:z.string().nullable(),countryCode:z.string().optional()}).strict(),Fe=z.discriminatedUnion("dynamic",[z.object({dynamic:z.literal("actor"),ref:z.literal("current")}).strict(),z.object({dynamic:z.literal("date"),anchor:z.enum(["today","now"])}).strict()]),Ce=z.object({month:z.number(),day:z.number()}).strict(),Ve=z.union([z.string(),z.number(),z.boolean(),z.array(z.string()),Re,Oe,we,Ce,Fe,z.null()]),Ie=z.enum(["is","is_not","contains","not_contains","starts_with","ends_with","is_empty","is_not_empty","less_than","greater_than","less_or_equal","greater_or_equal","is_within","on_day_month","any_of","none_of"],{error:a(t=>{let r=t.input,i=typeof r=="string"?B[r]:void 0;return i?`Unknown filter operator "${r}" \u2014 use ${i}`:void 0},"error")}),ve=z.object({attribute:z.string(),property:z.string().optional(),quantifier:z.enum(["any","none"]).optional(),operator:Ie,value:Ve}).strict(),ht=z.array(ve).max(a$1.filterRulesPerTab),De=z.object({combinator:z.enum(["and","or"]),rules:ht}).strict(),_t=z.object({id:z.string(),combinator:z.enum(["and","or"]),rules:ht}).strict();function j(t,r,i=[]){let n=new Set;t.forEach((a,s)=>{n.has(a.id)&&r.addIssue({code:"custom",message:`Duplicate id "${a.id}"`,path:[...i,s,"id"]}),n.add(a.id);});}a(j,"addDuplicateIdIssues");function Pe(t,r,i=[]){let n=new Set;t.forEach((a,s)=>{n.has(a.name)&&r.addIssue({code:"custom",message:`Duplicate name "${a.name}"`,path:[...i,s,"name"]}),n.add(a.name);});}a(Pe,"addDuplicateNameIssues");var ke=z.object({id:z.string(),label:z.string(),description:z.string().optional(),attributes:Ae,displayTemplate:z.string().optional()}).strict(),Be={span:z.union([z.literal(1),z.literal(2),z.literal(3),z.literal(4),z.literal(5),z.literal(6),z.literal(7),z.literal(8),z.literal(9),z.literal(10),z.literal(11),z.literal(12)]).optional(),label:z.string().optional(),readOnly:z.boolean().optional()},gt={attribute:z.string().optional(),attributeGroup:ke.optional(),...Be};function Tt(t,r){t.attribute===void 0==(t.attributeGroup===void 0)&&r.addIssue({code:"custom",message:"A field must define exactly one of attribute or attributeGroup"});}a(Tt,"refineField");var Le=z.object({id:z.string().optional(),...gt}).strict().superRefine(Tt),Ao=z.object({id:z.string().min(1),...gt}).strict().superRefine(Tt),je={id:z.string(),label:z.string(),description:z.string().optional(),collapsible:z.boolean().optional(),collapsed:z.boolean().optional(),order:z.number().optional()},Ne=z.object({...je,type:z.literal("fields"),fields:z.array(Le).max(a$1.fieldsPerGroup)}).strict(),Me=Ne,b={id:z.string(),name:z.string(),label:z.string(),icon:c.optional(),order:z.number().optional()},St=z.array(Me).max(a$1.groupsPerFormTab),At={...b,type:z.literal("form"),groups:St,formColumns:z.union([z.literal(1),z.literal(2),z.literal(3)]).optional(),density:z.enum(["compact","comfortable","spacious"]).optional()},Ue=z.object(At).strict();function Et(t,r){j(t.groups,r,["groups"]),t.groups.reduce((a,s)=>a+(s.type==="fields"?s.fields.length:0),0)>a$1.fieldsPerFormTab&&r.addIssue({code:"too_big",origin:"array",maximum:a$1.fieldsPerFormTab,inclusive:true,message:`A form tab can contain at most ${a$1.fieldsPerFormTab} fields`,path:["groups"]});let n=new Set;t.groups.forEach((a,s)=>{a.type==="fields"&&a.fields.forEach((l,u)=>{if(l.attributeGroup===void 0)return;let{id:c}=l.attributeGroup;n.has(c)&&r.addIssue({code:"custom",message:`Duplicate attribute group id "${c}"`,path:["groups",s,"fields",u,"attributeGroup","id"]}),n.add(c);});});}a(Et,"refineFormTab");var qe=z.object({...At,groups:St.min(1)}).strict().superRefine(Et),$e=Ue.superRefine(Et),xt=z.object({type:z.literal("relation"),attribute:z.string()}).strict(),Rt=z.object({type:z.literal("inverse"),object:z.string(),attribute:z.string()}).strict(),Ot=z.discriminatedUnion("type",[xt,Rt]),ze=z.object({...b,type:z.literal("table"),source:Ot,columns:x,allowCreate:z.boolean().optional(),createMode:yt.optional(),allowEdit:z.boolean().optional(),allowDelete:z.boolean().optional(),filters:De.optional(),sorts:ft.optional()}).strict(),dt=64,mt=1e4;function bt(t){let r=Object.getPrototypeOf(t);return r===Object.prototype||r===null}a(bt,"isPlainJsonObject");function m(t,r,i=[]){t.addIssue({code:"custom",message:r,path:i});}a(m,"addJsonIssue");function Ye(t,r,i,n){for(let a of Reflect.ownKeys(t))if(a!=="length"){if(a==="__proto__"){m(n,"The __proto__ key is not allowed in custom props",[...r.path,a]);continue}(typeof a=="symbol"||!/^(0|[1-9]\d*)$/.test(a))&&m(n,"Arrays cannot contain non-index JSON properties",[...r.path,a]);}for(let a=t.length-1;a>=0;a--){let s=Object.getOwnPropertyDescriptor(t,String(a)),l=[...r.path,a];if(!(s&&"value"in s)){m(n,"Sparse arrays are not valid JSON values",l);continue}i.push({kind:"enter",value:s.value,path:l,depth:r.depth+1});}}a(Ye,"pushJsonArrayChildren");function We(t,r,i,n){let a=Reflect.ownKeys(t);for(let s=a.length-1;s>=0;s--){let l=a[s],u=[...r.path,l];if(l==="__proto__"){m(n,"The __proto__ key is not allowed in custom props",u);continue}if(typeof l=="symbol"){m(n,"Symbol keys are not valid JSON keys",u);continue}let c=Object.getOwnPropertyDescriptor(t,l);if(!(c?.enumerable&&"value"in c)){m(n,"Custom props must contain enumerable data properties only",u);continue}i.push({kind:"enter",value:c.value,path:u,depth:r.depth+1});}}a(We,"pushJsonObjectChildren");function Ge(t,r){if(t===null||typeof t!="object"){m(r,"Expected a plain JSON object");return}try{if(Array.isArray(t)||!bt(t)){m(r,"Expected a plain JSON object");return}}catch{m(r,"Custom props contain an object that cannot be safely inspected");return}let i=new WeakSet,n=[{kind:"enter",value:t,path:[],depth:0}],a=0;for(;n.length>0;){let s=n.pop();if(!s)break;if(s.kind==="exit"){i.delete(s.value);continue}if(a++,a>mt){m(r,`Custom props cannot exceed ${mt.toLocaleString("en-US")} total JSON nodes`,s.path);return}if(s.depth>dt){m(r,`Custom props cannot exceed depth ${dt}`,s.path);continue}let l=s.value;if(!(l===null||typeof l=="string"||typeof l=="boolean"||typeof l=="number"&&Number.isFinite(l))){if(typeof l!="object"){m(r,"Expected a JSON value",s.path);continue}if(i.has(l)){m(r,"Custom props cannot contain circular references",s.path);continue}try{if(Array.isArray(l)){i.add(l),n.push({kind:"exit",value:l}),Ye(l,s,n,r);continue}if(!bt(l)){m(r,"Expected an array or plain JSON object",s.path);continue}i.add(l),n.push({kind:"exit",value:l}),We(l,s,n,r);}catch{m(r,"Custom props contain an object that cannot be safely inspected",s.path);}}}}a(Ge,"validateJsonProps");var Ke=z.unknown().superRefine(Ge).transform(t=>t),Je=z.object({...b,type:z.literal("custom"),component:z.string(),props:Ke.optional()}).strict(),He=z.object({...b,type:z.literal("activity"),limit:z.number().optional()}).strict(),Qe=z.object({...b,type:z.literal("richtext"),attribute:z.string(),titleAttribute:z.string().optional()}).strict(),Xe=z.object({...b,type:z.literal("documents"),allowUpload:z.boolean().optional(),allowRemove:z.boolean().optional(),hideAttachments:z.boolean().optional()}).strict(),Ze=z.object({...b,type:z.literal("forms"),objectName:z.string().optional()}).strict(),tr=z.object({...b,type:z.literal("emails"),emailAttributeIds:z.array(z.string()).max(a$1.emailAttributesPerTab)}).strict(),er=z.object({...b,type:z.literal("meetings"),emailAttributeIds:z.array(z.string()).max(a$1.emailAttributesPerTab)}).strict(),wt=[ze,Je,He,Qe,Xe,Ze,tr,er],Ft=z.discriminatedUnion("type",[qe,...wt]),Eo=z.discriminatedUnion("type",[$e,...wt]),N={id:z.string(),label:z.string(),icon:c.optional(),default:z.boolean().optional(),visibility:z.enum(pt).default("all"),columns:x,descriptionAttribute:z.string().min(1).optional(),displayAttributes:Ee.optional(),filters:_t.optional(),sorts:ft.optional(),readOnly:z.boolean().optional(),createMode:yt.optional()},rr=z.object({...N,layout:z.literal("table"),columnSizing:z.record(z.string(),z.number()).optional(),groupByAttribute:z.string().min(1).optional()}).strict(),or=z.object({...N,layout:z.literal("kanban"),columns:x.default([]),groupByAttribute:z.string(),cardUserAttribute:z.string().optional(),cardDateAttribute:z.string().optional(),kanbanColumnOrder:z.array(z.string()).optional(),kanbanColumnVisibility:z.record(z.string(),z.boolean()).optional(),kanbanPinnedColumns:z.array(z.string()).optional()}).strict(),ir=z.object({...N,layout:z.literal("list"),columns:x.default([]),columnSizing:z.record(z.string(),z.number()).optional(),groupByAttribute:z.string().min(1).optional()}).strict(),Ct=z.discriminatedUnion("layout",[rr,ir,or]),nr=z.object({allowPresentationCustomization:z.boolean().optional(),defaultFilters:_t.optional(),tabs:z.array(Ct).min(1).max(a$1.tabsPerView)}).strict().superRefine((t,r)=>{j(t.tabs,r,["tabs"]);let i=false;t.tabs.forEach((n,a)=>{n.layout!=="kanban"&&n.groupByAttribute!==void 0&&t.allowPresentationCustomization!==true&&r.addIssue({code:"unrecognized_keys",keys:["groupByAttribute"],path:["tabs",a]}),n.default&&(i&&r.addIssue({code:"custom",message:"Only one list tab can be the default",path:["tabs",a,"default"]}),i=true);});}),ar=z.discriminatedUnion("kind",[z.object({kind:z.literal("fields"),id:z.string().optional(),label:z.string().optional(),attributes:z.array(z.string()).max(a$1.sidePanelAttributes)}).strict(),z.object({kind:z.literal("activity"),id:z.string().optional(),label:z.string().optional()}).strict(),z.object({kind:z.literal("documents"),id:z.string(),label:z.string().optional(),allowUpload:z.boolean().optional(),allowRemove:z.boolean().optional()}).strict()]),sr=z.object({tabs:z.array(Ft).min(1).max(a$1.tabsPerView),sidePanel:z.object({attributes:z.array(z.string()).max(a$1.sidePanelAttributes).optional(),panes:z.array(ar).max(a$1.sidePanelPanes).optional(),width:z.number().optional()}).strict().refine(t=>t.attributes!==void 0||t.panes!==void 0,{message:"sidePanel requires attributes or panes"}).refine(t=>t.panes===void 0||t.panes.length>0,{message:"sidePanel panes must not be empty"}).refine(t=>t.attributes===void 0||t.panes===void 0,{message:"sidePanel takes attributes or panes, not both"}).optional()}).strict().superRefine((t,r)=>{j(t.tabs,r,["tabs"]),Pe(t.tabs,r,["tabs"]);}),M=nr,U=sr,xo=z.enum(["list","detail"]);var Vt=z.discriminatedUnion("type",[z.object({type:z.literal("list"),config:M}).strict(),z.object({type:z.literal("detail"),config:U}).strict()]);function lr(t,r){switch(t){case "list":return M.parse(r);case "detail":return U.parse(r);default:return Vt.parse({type:t,config:r}).config}}a(lr,"parseViewConfig");var Ro=["columnSizing"],Oo=["groupByAttribute","cardUserAttribute","cardDateAttribute","kanbanColumnOrder","kanbanColumnVisibility","kanbanPinnedColumns"];export{_t as $,bo as A,A as B,Or as C,wr as D,Fr as E,ot as F,Ir as G,Pr as H,kr as I,Br as J,nt as K,at as L,ce as M,I as N,Wr as O,v as P,Jr as Q,Hr as R,Qr as S,ye as T,B as U,so as V,Te as W,x as X,Ee as Y,ft as Z,De as _,Pt as a,gt as aa,ur as b,Le as ba,kt as c,Ao as ca,cr as d,Me as da,G as e,xt as ea,w as f,Rt as fa,F as g,Ot as ga,br as h,Ft as ha,y as i,Eo as ia,g as j,Ct as ja,X as k,M as ka,yr as l,U as la,fr as m,xo as ma,hr as n,Vt as na,_r as o,lr as oa,gr as p,Ro as pa,C as q,Oo as qa,f as r,ne as s,et as t,Er as u,L as v,pt as w,po as x,Se as y,mo as z};
@@ -0,0 +1,2 @@
1
+ 'use strict';/*! © 2025-2026 AND YOU CREATE SAS (RCS Paris 940 190 614). Proprietary — see LICENSE (Standards SDK License 1.0). */
2
+ var c=Object.defineProperty;var d=(a,b)=>c(a,"name",{value:b,configurable:true});exports.a=d;
@@ -0,0 +1,2 @@
1
+ 'use strict';var chunkTP63U7PL_js=require('./chunk-TP63U7PL.js'),chunkTKABCIEO_js=require('./chunk-TKABCIEO.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 Pt={createdAt:"createdAt",updatedAt:"updatedAt",createdBy:"createdBy",lastUpdatedBy:"lastUpdatedBy",attachments:"attachments"};function ur(t){return Pt[t]}chunkDPD6ZWL2_js.a(ur,"getSystemAttributeI18nKey");var kt={createdAt:{id:"system:createdAt",name:"createdAt",label:"Created time",type:"date",required:false,system:true,icon:"clock-circle",description:"When this record was created"},updatedAt:{id:"system:updatedAt",name:"updatedAt",label:"Last edited time",type:"date",required:false,system:true,icon:"clock-circle",description:"When this record was last modified"},createdBy:{id:"system:createdBy",name:"createdBy",label:"Created by",type:"user",required:false,system:true,multiple:false,icon:"user",description:"Actor who created this record"},lastUpdatedBy:{id:"system:lastUpdatedBy",name:"lastUpdatedBy",label:"Last edited by",type:"user",required:false,system:true,multiple:false,icon:"user",description:"Actor who last modified this record"},attachments:{id:"system:attachments",name:"attachments",label:"Attachments",type:"document",required:false,system:true,hidden:true,icon:"paperclip",description:"Free-form document attachments"}};function cr(){return Object.values(kt)}chunkDPD6ZWL2_js.a(cr,"getSystemAttributeList");function G(t){return t.id?.startsWith("system:")??false}chunkDPD6ZWL2_js.a(G,"isManagedSystemAttribute");var Q=["is","is_not","contains","not_contains","starts_with","ends_with","is_empty","is_not_empty"],K=["is","is_not","less_than","greater_than","less_or_equal","greater_or_equal","is_empty","is_not_empty"],Bt=["is"],Lt=["is","is_not","less_than","greater_than","less_or_equal","greater_or_equal","is_within","on_day_month","is_empty","is_not_empty"],J=["is","is_not","any_of","none_of","is_empty","is_not_empty"],jt=["any_of","none_of","is_empty","is_not_empty"],H=["is","is_not","any_of","none_of","is_empty","is_not_empty"],Nt=["is_empty","is_not_empty"],Mt=["is","is_not","less_than","greater_than","less_or_equal","greater_or_equal","contains","not_contains","is_empty","is_not_empty"],w=["city","postalCode","country"];function F(t){return w.includes(t)}chunkDPD6ZWL2_js.a(F,"isLocationFilterProperty");function br(t){return Q.includes(t)}chunkDPD6ZWL2_js.a(br,"isLocationPartOperator");var y={text:Q,richtext:[],number:K,checkbox:Bt,date:Lt,phone:["is","is_not","contains","not_contains","starts_with","is_empty","is_not_empty"],currency:K,status:J,select:J,multiselect:jt,location:[],user:H,relation:H,formula:Mt,document:Nt},Ut=new Set(["formula","rollup"]),qt=new Set(["user","relation","document"]),$t=new Set(["text","richtext","number","select","multiselect","status","date","phone","currency","location","user","relation","document"]),zt=new Set(["text","number","date","phone","currency","select","multiselect"]),Yt=new Set(["text","phone","status","select","multiselect"]),Wt=new Set(["text","number","checkbox","date","phone","currency","status","select"]);function g(t){let r=!!(t.hidden||t.archived),i=!t.archived,n=Ut.has(t.type),a=t.type==="document",s=qt.has(t.type),l=Kt(t),u=r?[]:Gt(t),c=u.length>0&&!r,h=!r&&Yt.has(t.type),_=!r&&Wt.has(t.type),T=!r&&oe(t.type),R=!r&&t.type==="status",It=G(t),q=n||a||It,O=!(r||q),vt=Xt(t.type)?"forbidden":"allowed",Dt=Zt(t.type),$=Ht(t),z=zt.has(t.type),Y=!!(t.deprecated&&!r),W=re(t);return {lifecycle:{active:i,deprecated:!!t.deprecated,visibleInArchitect:true,visibleInRuntime:!r,warningWhenDeprecated:Y},storage:{mode:n?"computed":s?"edge":"value",cardinality:l,edgeBacked:s,preservesExistingValues:!!t.archived,qualifiedProperties:Qt(t.type),polymorphic:Jt(t),maxItems:$},authoring:{editable:O,readOnly:q,directEdit:O&&W==="inline",required:vt,defaultValue:Dt,placeholder:z,maxItems:$},presentation:{formField:!r&&ee(t.type),tableCell:!r&&Z(t.type),defaultColumn:!r&&te(t.type),compactDisplay:!r,popoverEditor:!r&&W==="popover",placeholder:z,warningWhenDeprecated:Y},query:{filterable:c,searchable:h,sortable:_,groupable:T,kanbanGroupable:R,operators:u},agent:{readable:!r,writable:O&&!a,compactReadable:!r,contentReadable:!r&&ie(t.type),requiresDedicatedTool:a},exchange:{importable:!r,exportable:!r,schemaExportable:true,metadataExportable:false}}}chunkDPD6ZWL2_js.a(g,"getAttributeCapabilities");function X(t){return g(t).query.operators}chunkDPD6ZWL2_js.a(X,"getAttributeFilterOperators");function yr(t){return g(t).query.filterable}chunkDPD6ZWL2_js.a(yr,"isAttributeFilterable");function fr(t){return g(t).query.searchable}chunkDPD6ZWL2_js.a(fr,"isAttributeSearchable");function hr(t){return g(t).query.sortable}chunkDPD6ZWL2_js.a(hr,"isAttributeSortable");function _r(t){return g(t).query.groupable}chunkDPD6ZWL2_js.a(_r,"isAttributeGroupable");function gr(t){return g(t).query.kanbanGroupable}chunkDPD6ZWL2_js.a(gr,"isAttributeKanbanGroupable");function C(t){if(t.type!=="rollup")return t.type;let r=t;if(r.function==="earliest"||r.function==="latest")return "date";if(r.function==="original"){let i=r.targetAttributeType;if(i&&tt(i))return i}return "number"}chunkDPD6ZWL2_js.a(C,"resolveEffectiveFilterType");function V(t){let r=C(t);return tt(r)?y[r]:y.number}chunkDPD6ZWL2_js.a(V,"getRollupFilterOperators");function Gt(t){return t.type==="rollup"?V(t):y[t.type]??[]}chunkDPD6ZWL2_js.a(Gt,"getRawFilterOperators");function Kt(t){return t.type==="multiselect"||t.type==="document"||t.type==="user"&&t.multiple===true||t.type==="relation"&&t.cardinality==="many"?"many":"one"}chunkDPD6ZWL2_js.a(Kt,"getAttributeCardinality");function Jt(t){if(t.type!=="relation")return "none";let i=t.targets??[];return i.length===1&&i[0]?.object==="*"?"internal":i.length>1?"code-only":"none"}chunkDPD6ZWL2_js.a(Jt,"getPolymorphicCapability");function Ht(t){return t.type==="multiselect"?true:t.type==="relation"?t.cardinality==="many":false}chunkDPD6ZWL2_js.a(Ht,"supportsMaxItems");function Qt(t){return t==="relation"||t==="document"}chunkDPD6ZWL2_js.a(Qt,"supportsQualifiedProperties");function Xt(t){return t==="checkbox"||t==="formula"||t==="rollup"}chunkDPD6ZWL2_js.a(Xt,"isRequiredForbidden");function Zt(t){return t==="checkbox"?"automatic":t==="formula"||t==="rollup"?"forbidden":$t.has(t)?"static":"forbidden"}chunkDPD6ZWL2_js.a(Zt,"getDefaultValueCapability");function te(t){return Z(t)}chunkDPD6ZWL2_js.a(te,"isDefaultColumnType");function Z(t){return t!=="richtext"&&t!=="document"}chunkDPD6ZWL2_js.a(Z,"isTableCellType");function ee(t){return t!=="richtext"}chunkDPD6ZWL2_js.a(ee,"isFormFieldType");function re(t){switch(t.type){case "checkbox":return "inline";case "number":return t.renderAs==="rating"?"inline":"default";case "select":case "multiselect":return t.renderAs==="badges"?"inline":"popover";case "status":case "relation":case "user":case "date":return "popover";default:return "default"}}chunkDPD6ZWL2_js.a(re,"resolveEditMode");function oe(t){return t==="status"||t==="currency"}chunkDPD6ZWL2_js.a(oe,"isGroupableType");function ie(t){return t==="richtext"||t==="document"}chunkDPD6ZWL2_js.a(ie,"isContentReadableType");function tt(t){return Object.prototype.hasOwnProperty.call(y,t)}chunkDPD6ZWL2_js.a(tt,"hasFilterOperatorEntry");var f=y,ne=["is_empty","is_not_empty"];function et(t){return ne.includes(t)}chunkDPD6ZWL2_js.a(et,"isNoValueOperator");function Er(t){return V(t)}chunkDPD6ZWL2_js.a(Er,"getRollupFilterOperators");function A(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)&&"dynamic"in t}chunkDPD6ZWL2_js.a(A,"isDynamicValue");function Or(){return {dynamic:"actor",ref:"current"}}chunkDPD6ZWL2_js.a(Or,"currentActor");function wr(){return {dynamic:"date",anchor:"today"}}chunkDPD6ZWL2_js.a(wr,"today");function Fr(){return {dynamic:"date",anchor:"now"}}chunkDPD6ZWL2_js.a(Fr,"now");function rt(t){if(typeof t=="number")return Number.isFinite(t)?t:null;if(typeof t=="string"&&t.trim()!==""){let r=Number(t);return Number.isFinite(r)?r:null}return null}chunkDPD6ZWL2_js.a(rt,"toAmount");function ot(t){return t!==null&&typeof t=="object"?"value"in t?rt(t.value):null:rt(t)}chunkDPD6ZWL2_js.a(ot,"extractCurrencyFilterValue");function Ir(t){return t==null?null:typeof t=="object"&&"value"in t?t.value??null:t}chunkDPD6ZWL2_js.a(Ir,"extractFilterValue");var ae=new Set(["is_not","not_contains","none_of","is_empty"]),se={is_not:"is",not_contains:"contains",none_of:"any_of",is_empty:"is_not_empty"};function Pr(t){return ae.has(t)?"none":"any"}chunkDPD6ZWL2_js.a(Pr,"getOperatorPolarity");function kr(t){return se[t]??t}chunkDPD6ZWL2_js.a(kr,"normalizeForEdgeRpc");var it={is:"any_of",is_not:"none_of"};function Br(t){return it[t]??t}chunkDPD6ZWL2_js.a(Br,"toMultiValueOperator");var le=new Set(Object.values(it).filter(t=>t!==void 0));function nt(t){return le.has(t)}chunkDPD6ZWL2_js.a(nt,"isSetMembershipOperator");function at(t,r){let i=t.value;if(et(t.operator)||i==null||A(i))return;if(nt(t.operator)){Array.isArray(i)||(t.value=[i]);return}if(r!=="currency")return;let n=ot(i);if(n!==null){t.value=n;return}if(!ue(i))return;let a=`Filter on a currency attribute expected a numeric amount, received ${JSON.stringify(i)}`;throw new chunkTKABCIEO_js.h(a,[{path:["value"],message:a}])}chunkDPD6ZWL2_js.a(at,"canonicalizeFilterValue");function ue(t){return typeof t!="object"?true:"value"in t?t.value!=null:false}chunkDPD6ZWL2_js.a(ue,"hasCurrencyAmount");var ce={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 I(t){return ce[t]??t}chunkDPD6ZWL2_js.a(I,"normalizeOperator");function Wr(t){let r=I(t.operator);return r===t.operator?t:{...t,operator:r}}chunkDPD6ZWL2_js.a(Wr,"normalizeFilterRule");var pe=new Set(["days","weeks","months","years"]),de=new Set(["past","future"]);function v(t){if(typeof t!="object"||t===null)return false;let r=t;return typeof r.amount=="number"&&Number.isFinite(r.amount)&&r.amount>0&&typeof r.unit=="string"&&pe.has(r.unit)&&typeof r.direction=="string"&&de.has(r.direction)}chunkDPD6ZWL2_js.a(v,"isRelativeDateValue");function lt(t){return Date.UTC(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate())}chunkDPD6ZWL2_js.a(lt,"utcDayStart");function st(t,r,i){if(i==="days")return t+r*864e5;if(i==="weeks")return t+r*7*864e5;let n=new Date(t),a=n.getUTCFullYear()+(i==="years"?r:0),s=n.getUTCMonth()+(i==="months"?r:0),l=new Date(Date.UTC(a,s+1,0)).getUTCDate();return Date.UTC(a,s,Math.min(n.getUTCDate(),l))}chunkDPD6ZWL2_js.a(st,"shiftUtcDay");function Jr(t,r=new Date){if(!v(t))return null;let i=lt(r),n=Math.trunc(t.amount),a=t.direction==="past"?{startMs:st(i,-n,t.unit),endMs:i+864e5}:{startMs:i,endMs:st(i,n,t.unit)+864e5};return Number.isFinite(a.startMs)&&Number.isFinite(a.endMs)?a:null}chunkDPD6ZWL2_js.a(Jr,"resolveIsWithinBounds");function Hr(t){if(!Number.isFinite(t))return null;let r=lt(new Date(t));return Number.isFinite(r)?{startMs:r,endMs:r+864e5}:null}chunkDPD6ZWL2_js.a(Hr,"resolveUtcDayBounds");function Qr(t){return new Date(t).toISOString().slice(0,10)}chunkDPD6ZWL2_js.a(Qr,"toUtcDayString");var me=new Set(["relation","document","user"]),D=["is","is_not","any_of","none_of","is_empty","is_not_empty"],be={id:D,objectId:D,tenantId:D,label:f.text,createdAt:f.date,updatedAt:f.date,deletedAt:f.date,createdBy:f.user,lastUpdatedBy:f.user},ye={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"},B={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"'},fe=new Set(Object.entries(y).filter(([,t])=>t.includes("any_of")&&!t.includes("contains")).map(([t])=>t)),he={contains:"any_of",not_contains:"none_of"};function P(t,r){let i=B[t];if(i){let s=`Unknown filter operator "${t}" \u2014 use ${i}`;throw new chunkTKABCIEO_js.h(s,[{path:["operator"],message:s}])}let n=I(t),a=he[n];if(a&&fe.has(r)){let s=`Operator "${n}" is not valid for type "${r}" \u2014 use "${a}"`;throw new chunkTKABCIEO_js.h(s,[{path:["operator"],message:s}])}return n}chunkDPD6ZWL2_js.a(P,"resolveCanonicalOperator");function ut(t,r,i){let n=P(t,r),a=f[r];if(!a?.includes(n)){let s=a?.length?a.join(", "):"(no operators registered for this type)",l=`Operator "${t}" is not valid for ${i} type "${r}". Valid operators: ${s}.`;throw new chunkTKABCIEO_js.h(l,[{path:["operator"],message:l}])}return n}chunkDPD6ZWL2_js.a(ut,"assertOperatorForType");function _e(t){if(t.operator==="is_within"&&!v(t.value)){let r='Operator "is_within" requires a relative-date value { amount: positive number, unit: days|weeks|months|years, direction: past|future }';throw new chunkTKABCIEO_js.h(r,[{path:["value"],message:r}])}}chunkDPD6ZWL2_js.a(_e,"assertRelativeDateValue");function E(t,r,i){t.operator=r,at(t,i),_e(t);}chunkDPD6ZWL2_js.a(E,"applyCanonicalForm");function ct(t,r){if(!A(t.value))return;let i=t.value;if(i.dynamic==="actor"&&r!=="user"){let n=`actor token (@me) is only valid on user attributes, not "${r}"`;throw new chunkTKABCIEO_js.h(n,[{path:["value"],message:n}])}if(i.dynamic==="date"&&r!=="date"){let n=`date token (@today/@now) is only valid on date attributes, not "${r}"`;throw new chunkTKABCIEO_js.h(n,[{path:["value"],message:n}])}}chunkDPD6ZWL2_js.a(ct,"assertDynamicValueForAttribute");var k=w.map(t=>`"${t}"`).join(", ");function ge(t){return t==="location"?` A location is filtered on one of its parts: set "property" to one of ${k} and use a text operator (e.g. contains).`:""}chunkDPD6ZWL2_js.a(ge,"locationPartsHint");function so(t,r){try{return Te({...t},r),[]}catch(i){if(!(i instanceof chunkTKABCIEO_js.h))throw i;return i.errors.map(n=>({...n,path:[...n.path]}))}}chunkDPD6ZWL2_js.a(so,"collectQualifiedRuleIssues");function Te(t,r){let i=r.attributes.find(u=>u.name===t.attribute),n=be[t.attribute];if(!(i||n)){let[u,...c]=t.attribute.split("."),_=(c.length>0?r.attributes.find(R=>R.name===u):void 0)?.type==="location"?` Dotted paths are not supported \u2014 set "attribute" to "${u}" and "property" to ${F(c[0]??"")?`"${c[0]}"`:`one of ${k}`}.`:t.attribute.includes(".")?' Dotted paths are not supported \u2014 filter on the attribute name alone, or use the full-text "query" parameter to match text inside a value.':"",T=`Unknown attribute: ${t.attribute}${_}`;throw new chunkTKABCIEO_js.h(T,[{path:["attribute"],message:T}])}if(t.quantifier!==void 0&&!t.property){let u='quantifier is only valid on qualified edge rules (set "property")';throw new chunkTKABCIEO_js.h(u,[{path:["quantifier"],message:u}])}if(!i){if(t.property)throw new chunkTKABCIEO_js.h(`Cannot qualify system attribute "${t.attribute}"`,[{path:["property"],message:`"${t.attribute}" is a system column, not a reference`}]);let u=ye[t.attribute]??"text",c=P(t.operator,u);if(!n.includes(c)){let h=`Operator "${t.operator}" is not valid for system attribute "${t.attribute}". Valid operators: ${n.join(", ")}.`;throw new chunkTKABCIEO_js.h(h,[{path:["operator"],message:h}])}E(t,c,u);return}if(!t.property){ct(t,i.type);let u=X(i),c=P(t.operator,i.type);if(!u.includes(c)){let h=u.length?u.join(", "):"(not filterable)",_=`Operator "${t.operator}" is not valid for attribute "${i.name}". Valid operators: ${h}.${ge(i.type)}`;throw new chunkTKABCIEO_js.h(_,[{path:["operator"],message:_}])}E(t,c,C(i));return}if(i.type==="location"){if(t.quantifier!==void 0){let c="quantifier is not valid on a location part \u2014 a location is one value, not a set of edges";throw new chunkTKABCIEO_js.h(c,[{path:["quantifier"],message:c}])}if(!F(t.property)){let c=`Property "${t.property}" is not a part of location "${t.attribute}". Valid parts: ${k}.`;throw new chunkTKABCIEO_js.h(c,[{path:["property"],message:c}])}ct(t,"text");let u=ut(t.operator,"text","property");E(t,u,"text");return}if(!me.has(i.type))throw new chunkTKABCIEO_js.h(`Cannot qualify ${i.type} attribute "${t.attribute}"`,[{path:["property"],message:`Attribute "${t.attribute}" is not a reference type`}]);let a=i.properties;if(!a)throw new chunkTKABCIEO_js.h(`Attribute "${t.attribute}" has no qualifyWith schema`,[{path:["property"],message:`"${t.attribute}" has no qualifyWith`}]);let s=a.definitions.find(u=>u.name===t.property);if(!s)throw new chunkTKABCIEO_js.h(`Property "${t.property}" not defined on "${t.attribute}".qualifyWith()`,[{path:["property"],message:`Unknown property: ${t.property}`}]);let l=ut(t.operator,s.type,"property");E(t,l,s.type);}chunkDPD6ZWL2_js.a(Te,"validateQualifiedRule");var L=["workspace","private"],pt=["all",...L];function po(t){if(typeof t=="string"&&L.includes(t))return t;throw new chunkTKABCIEO_js.h(`visibility must be one of: ${L.join(", ")} (received: ${String(t)})`,[])}chunkDPD6ZWL2_js.a(po,"parseResourceVisibility");var Se=["id","createdAt","updatedAt","createdBy","lastUpdatedBy","visibility","ownedBy"],mo=[...Se,"objectId","label","embeddingText","values","metadata","deletedAt","deletedBy","schemaVersion","owned_by"],bo=["skill"];var yt=zod.z.enum(["redirect","inline","peek"]),Ae=zod.z.array(zod.z.string()).min(1),x=zod.z.array(zod.z.string()).max(chunkTP63U7PL_js.a.columnsPerTab),Ee=zod.z.array(zod.z.string().min(1)).max(chunkTP63U7PL_js.a.columnsPerTab).refine(t=>new Set(t).size===t.length,{message:"Displayed attribute names must be unique"}),xe=zod.z.object({attribute:zod.z.string(),direction:zod.z.enum(["asc","desc"])}).strict(),ft=zod.z.array(xe).max(chunkTP63U7PL_js.a.sortsPerTab),Re=zod.z.object({amount:zod.z.number(),unit:zod.z.enum(["days","weeks","months","years"]),direction:zod.z.enum(["past","future"])}).strict(),Oe=zod.z.object({value:zod.z.number().nullable(),code:zod.z.array(zod.z.string()).optional()}).strict(),we=zod.z.object({phoneNumber:zod.z.string().nullable(),countryCode:zod.z.string().optional()}).strict(),Fe=zod.z.discriminatedUnion("dynamic",[zod.z.object({dynamic:zod.z.literal("actor"),ref:zod.z.literal("current")}).strict(),zod.z.object({dynamic:zod.z.literal("date"),anchor:zod.z.enum(["today","now"])}).strict()]),Ce=zod.z.object({month:zod.z.number(),day:zod.z.number()}).strict(),Ve=zod.z.union([zod.z.string(),zod.z.number(),zod.z.boolean(),zod.z.array(zod.z.string()),Re,Oe,we,Ce,Fe,zod.z.null()]),Ie=zod.z.enum(["is","is_not","contains","not_contains","starts_with","ends_with","is_empty","is_not_empty","less_than","greater_than","less_or_equal","greater_or_equal","is_within","on_day_month","any_of","none_of"],{error:chunkDPD6ZWL2_js.a(t=>{let r=t.input,i=typeof r=="string"?B[r]:void 0;return i?`Unknown filter operator "${r}" \u2014 use ${i}`:void 0},"error")}),ve=zod.z.object({attribute:zod.z.string(),property:zod.z.string().optional(),quantifier:zod.z.enum(["any","none"]).optional(),operator:Ie,value:Ve}).strict(),ht=zod.z.array(ve).max(chunkTP63U7PL_js.a.filterRulesPerTab),De=zod.z.object({combinator:zod.z.enum(["and","or"]),rules:ht}).strict(),_t=zod.z.object({id:zod.z.string(),combinator:zod.z.enum(["and","or"]),rules:ht}).strict();function j(t,r,i=[]){let n=new Set;t.forEach((a,s)=>{n.has(a.id)&&r.addIssue({code:"custom",message:`Duplicate id "${a.id}"`,path:[...i,s,"id"]}),n.add(a.id);});}chunkDPD6ZWL2_js.a(j,"addDuplicateIdIssues");function Pe(t,r,i=[]){let n=new Set;t.forEach((a,s)=>{n.has(a.name)&&r.addIssue({code:"custom",message:`Duplicate name "${a.name}"`,path:[...i,s,"name"]}),n.add(a.name);});}chunkDPD6ZWL2_js.a(Pe,"addDuplicateNameIssues");var ke=zod.z.object({id:zod.z.string(),label:zod.z.string(),description:zod.z.string().optional(),attributes:Ae,displayTemplate:zod.z.string().optional()}).strict(),Be={span:zod.z.union([zod.z.literal(1),zod.z.literal(2),zod.z.literal(3),zod.z.literal(4),zod.z.literal(5),zod.z.literal(6),zod.z.literal(7),zod.z.literal(8),zod.z.literal(9),zod.z.literal(10),zod.z.literal(11),zod.z.literal(12)]).optional(),label:zod.z.string().optional(),readOnly:zod.z.boolean().optional()},gt={attribute:zod.z.string().optional(),attributeGroup:ke.optional(),...Be};function Tt(t,r){t.attribute===void 0==(t.attributeGroup===void 0)&&r.addIssue({code:"custom",message:"A field must define exactly one of attribute or attributeGroup"});}chunkDPD6ZWL2_js.a(Tt,"refineField");var Le=zod.z.object({id:zod.z.string().optional(),...gt}).strict().superRefine(Tt),Ao=zod.z.object({id:zod.z.string().min(1),...gt}).strict().superRefine(Tt),je={id:zod.z.string(),label:zod.z.string(),description:zod.z.string().optional(),collapsible:zod.z.boolean().optional(),collapsed:zod.z.boolean().optional(),order:zod.z.number().optional()},Ne=zod.z.object({...je,type:zod.z.literal("fields"),fields:zod.z.array(Le).max(chunkTP63U7PL_js.a.fieldsPerGroup)}).strict(),Me=Ne,b={id:zod.z.string(),name:zod.z.string(),label:zod.z.string(),icon:chunkTP63U7PL_js.c.optional(),order:zod.z.number().optional()},St=zod.z.array(Me).max(chunkTP63U7PL_js.a.groupsPerFormTab),At={...b,type:zod.z.literal("form"),groups:St,formColumns:zod.z.union([zod.z.literal(1),zod.z.literal(2),zod.z.literal(3)]).optional(),density:zod.z.enum(["compact","comfortable","spacious"]).optional()},Ue=zod.z.object(At).strict();function Et(t,r){j(t.groups,r,["groups"]),t.groups.reduce((a,s)=>a+(s.type==="fields"?s.fields.length:0),0)>chunkTP63U7PL_js.a.fieldsPerFormTab&&r.addIssue({code:"too_big",origin:"array",maximum:chunkTP63U7PL_js.a.fieldsPerFormTab,inclusive:true,message:`A form tab can contain at most ${chunkTP63U7PL_js.a.fieldsPerFormTab} fields`,path:["groups"]});let n=new Set;t.groups.forEach((a,s)=>{a.type==="fields"&&a.fields.forEach((l,u)=>{if(l.attributeGroup===void 0)return;let{id:c}=l.attributeGroup;n.has(c)&&r.addIssue({code:"custom",message:`Duplicate attribute group id "${c}"`,path:["groups",s,"fields",u,"attributeGroup","id"]}),n.add(c);});});}chunkDPD6ZWL2_js.a(Et,"refineFormTab");var qe=zod.z.object({...At,groups:St.min(1)}).strict().superRefine(Et),$e=Ue.superRefine(Et),xt=zod.z.object({type:zod.z.literal("relation"),attribute:zod.z.string()}).strict(),Rt=zod.z.object({type:zod.z.literal("inverse"),object:zod.z.string(),attribute:zod.z.string()}).strict(),Ot=zod.z.discriminatedUnion("type",[xt,Rt]),ze=zod.z.object({...b,type:zod.z.literal("table"),source:Ot,columns:x,allowCreate:zod.z.boolean().optional(),createMode:yt.optional(),allowEdit:zod.z.boolean().optional(),allowDelete:zod.z.boolean().optional(),filters:De.optional(),sorts:ft.optional()}).strict(),dt=64,mt=1e4;function bt(t){let r=Object.getPrototypeOf(t);return r===Object.prototype||r===null}chunkDPD6ZWL2_js.a(bt,"isPlainJsonObject");function m(t,r,i=[]){t.addIssue({code:"custom",message:r,path:i});}chunkDPD6ZWL2_js.a(m,"addJsonIssue");function Ye(t,r,i,n){for(let a of Reflect.ownKeys(t))if(a!=="length"){if(a==="__proto__"){m(n,"The __proto__ key is not allowed in custom props",[...r.path,a]);continue}(typeof a=="symbol"||!/^(0|[1-9]\d*)$/.test(a))&&m(n,"Arrays cannot contain non-index JSON properties",[...r.path,a]);}for(let a=t.length-1;a>=0;a--){let s=Object.getOwnPropertyDescriptor(t,String(a)),l=[...r.path,a];if(!(s&&"value"in s)){m(n,"Sparse arrays are not valid JSON values",l);continue}i.push({kind:"enter",value:s.value,path:l,depth:r.depth+1});}}chunkDPD6ZWL2_js.a(Ye,"pushJsonArrayChildren");function We(t,r,i,n){let a=Reflect.ownKeys(t);for(let s=a.length-1;s>=0;s--){let l=a[s],u=[...r.path,l];if(l==="__proto__"){m(n,"The __proto__ key is not allowed in custom props",u);continue}if(typeof l=="symbol"){m(n,"Symbol keys are not valid JSON keys",u);continue}let c=Object.getOwnPropertyDescriptor(t,l);if(!(c?.enumerable&&"value"in c)){m(n,"Custom props must contain enumerable data properties only",u);continue}i.push({kind:"enter",value:c.value,path:u,depth:r.depth+1});}}chunkDPD6ZWL2_js.a(We,"pushJsonObjectChildren");function Ge(t,r){if(t===null||typeof t!="object"){m(r,"Expected a plain JSON object");return}try{if(Array.isArray(t)||!bt(t)){m(r,"Expected a plain JSON object");return}}catch{m(r,"Custom props contain an object that cannot be safely inspected");return}let i=new WeakSet,n=[{kind:"enter",value:t,path:[],depth:0}],a=0;for(;n.length>0;){let s=n.pop();if(!s)break;if(s.kind==="exit"){i.delete(s.value);continue}if(a++,a>mt){m(r,`Custom props cannot exceed ${mt.toLocaleString("en-US")} total JSON nodes`,s.path);return}if(s.depth>dt){m(r,`Custom props cannot exceed depth ${dt}`,s.path);continue}let l=s.value;if(!(l===null||typeof l=="string"||typeof l=="boolean"||typeof l=="number"&&Number.isFinite(l))){if(typeof l!="object"){m(r,"Expected a JSON value",s.path);continue}if(i.has(l)){m(r,"Custom props cannot contain circular references",s.path);continue}try{if(Array.isArray(l)){i.add(l),n.push({kind:"exit",value:l}),Ye(l,s,n,r);continue}if(!bt(l)){m(r,"Expected an array or plain JSON object",s.path);continue}i.add(l),n.push({kind:"exit",value:l}),We(l,s,n,r);}catch{m(r,"Custom props contain an object that cannot be safely inspected",s.path);}}}}chunkDPD6ZWL2_js.a(Ge,"validateJsonProps");var Ke=zod.z.unknown().superRefine(Ge).transform(t=>t),Je=zod.z.object({...b,type:zod.z.literal("custom"),component:zod.z.string(),props:Ke.optional()}).strict(),He=zod.z.object({...b,type:zod.z.literal("activity"),limit:zod.z.number().optional()}).strict(),Qe=zod.z.object({...b,type:zod.z.literal("richtext"),attribute:zod.z.string(),titleAttribute:zod.z.string().optional()}).strict(),Xe=zod.z.object({...b,type:zod.z.literal("documents"),allowUpload:zod.z.boolean().optional(),allowRemove:zod.z.boolean().optional(),hideAttachments:zod.z.boolean().optional()}).strict(),Ze=zod.z.object({...b,type:zod.z.literal("forms"),objectName:zod.z.string().optional()}).strict(),tr=zod.z.object({...b,type:zod.z.literal("emails"),emailAttributeIds:zod.z.array(zod.z.string()).max(chunkTP63U7PL_js.a.emailAttributesPerTab)}).strict(),er=zod.z.object({...b,type:zod.z.literal("meetings"),emailAttributeIds:zod.z.array(zod.z.string()).max(chunkTP63U7PL_js.a.emailAttributesPerTab)}).strict(),wt=[ze,Je,He,Qe,Xe,Ze,tr,er],Ft=zod.z.discriminatedUnion("type",[qe,...wt]),Eo=zod.z.discriminatedUnion("type",[$e,...wt]),N={id:zod.z.string(),label:zod.z.string(),icon:chunkTP63U7PL_js.c.optional(),default:zod.z.boolean().optional(),visibility:zod.z.enum(pt).default("all"),columns:x,descriptionAttribute:zod.z.string().min(1).optional(),displayAttributes:Ee.optional(),filters:_t.optional(),sorts:ft.optional(),readOnly:zod.z.boolean().optional(),createMode:yt.optional()},rr=zod.z.object({...N,layout:zod.z.literal("table"),columnSizing:zod.z.record(zod.z.string(),zod.z.number()).optional(),groupByAttribute:zod.z.string().min(1).optional()}).strict(),or=zod.z.object({...N,layout:zod.z.literal("kanban"),columns:x.default([]),groupByAttribute:zod.z.string(),cardUserAttribute:zod.z.string().optional(),cardDateAttribute:zod.z.string().optional(),kanbanColumnOrder:zod.z.array(zod.z.string()).optional(),kanbanColumnVisibility:zod.z.record(zod.z.string(),zod.z.boolean()).optional(),kanbanPinnedColumns:zod.z.array(zod.z.string()).optional()}).strict(),ir=zod.z.object({...N,layout:zod.z.literal("list"),columns:x.default([]),columnSizing:zod.z.record(zod.z.string(),zod.z.number()).optional(),groupByAttribute:zod.z.string().min(1).optional()}).strict(),Ct=zod.z.discriminatedUnion("layout",[rr,ir,or]),nr=zod.z.object({allowPresentationCustomization:zod.z.boolean().optional(),defaultFilters:_t.optional(),tabs:zod.z.array(Ct).min(1).max(chunkTP63U7PL_js.a.tabsPerView)}).strict().superRefine((t,r)=>{j(t.tabs,r,["tabs"]);let i=false;t.tabs.forEach((n,a)=>{n.layout!=="kanban"&&n.groupByAttribute!==void 0&&t.allowPresentationCustomization!==true&&r.addIssue({code:"unrecognized_keys",keys:["groupByAttribute"],path:["tabs",a]}),n.default&&(i&&r.addIssue({code:"custom",message:"Only one list tab can be the default",path:["tabs",a,"default"]}),i=true);});}),ar=zod.z.discriminatedUnion("kind",[zod.z.object({kind:zod.z.literal("fields"),id:zod.z.string().optional(),label:zod.z.string().optional(),attributes:zod.z.array(zod.z.string()).max(chunkTP63U7PL_js.a.sidePanelAttributes)}).strict(),zod.z.object({kind:zod.z.literal("activity"),id:zod.z.string().optional(),label:zod.z.string().optional()}).strict(),zod.z.object({kind:zod.z.literal("documents"),id:zod.z.string(),label:zod.z.string().optional(),allowUpload:zod.z.boolean().optional(),allowRemove:zod.z.boolean().optional()}).strict()]),sr=zod.z.object({tabs:zod.z.array(Ft).min(1).max(chunkTP63U7PL_js.a.tabsPerView),sidePanel:zod.z.object({attributes:zod.z.array(zod.z.string()).max(chunkTP63U7PL_js.a.sidePanelAttributes).optional(),panes:zod.z.array(ar).max(chunkTP63U7PL_js.a.sidePanelPanes).optional(),width:zod.z.number().optional()}).strict().refine(t=>t.attributes!==void 0||t.panes!==void 0,{message:"sidePanel requires attributes or panes"}).refine(t=>t.panes===void 0||t.panes.length>0,{message:"sidePanel panes must not be empty"}).refine(t=>t.attributes===void 0||t.panes===void 0,{message:"sidePanel takes attributes or panes, not both"}).optional()}).strict().superRefine((t,r)=>{j(t.tabs,r,["tabs"]),Pe(t.tabs,r,["tabs"]);}),M=nr,U=sr,xo=zod.z.enum(["list","detail"]);var Vt=zod.z.discriminatedUnion("type",[zod.z.object({type:zod.z.literal("list"),config:M}).strict(),zod.z.object({type:zod.z.literal("detail"),config:U}).strict()]);function lr(t,r){switch(t){case "list":return M.parse(r);case "detail":return U.parse(r);default:return Vt.parse({type:t,config:r}).config}}chunkDPD6ZWL2_js.a(lr,"parseViewConfig");var Ro=["columnSizing"],Oo=["groupByAttribute","cardUserAttribute","cardDateAttribute","kanbanColumnOrder","kanbanColumnVisibility","kanbanPinnedColumns"];exports.$=_t;exports.A=bo;exports.B=A;exports.C=Or;exports.D=wr;exports.E=Fr;exports.F=ot;exports.G=Ir;exports.H=Pr;exports.I=kr;exports.J=Br;exports.K=nt;exports.L=at;exports.M=ce;exports.N=I;exports.O=Wr;exports.P=v;exports.Q=Jr;exports.R=Hr;exports.S=Qr;exports.T=ye;exports.U=B;exports.V=so;exports.W=Te;exports.X=x;exports.Y=Ee;exports.Z=ft;exports._=De;exports.a=Pt;exports.aa=gt;exports.b=ur;exports.ba=Le;exports.c=kt;exports.ca=Ao;exports.d=cr;exports.da=Me;exports.e=G;exports.ea=xt;exports.f=w;exports.fa=Rt;exports.g=F;exports.ga=Ot;exports.h=br;exports.ha=Ft;exports.i=y;exports.ia=Eo;exports.j=g;exports.ja=Ct;exports.k=X;exports.ka=M;exports.l=yr;exports.la=U;exports.m=fr;exports.ma=xo;exports.n=hr;exports.na=Vt;exports.o=_r;exports.oa=lr;exports.p=gr;exports.pa=Ro;exports.q=C;exports.qa=Oo;exports.r=f;exports.s=ne;exports.t=et;exports.u=Er;exports.v=L;exports.w=pt;exports.x=po;exports.y=Se;exports.z=mo;
@@ -0,0 +1,2 @@
1
+ import {a as a$1}from'./chunk-4OTKOCGB.mjs';import {a}from'./chunk-KSPJP74K.mjs';import {z}from'zod';/*! © 2025-2026 AND YOU CREATE SAS (RCS Paris 940 190 614). Proprietary — see LICENSE (Standards SDK License 1.0). */
2
+ function c(n){return typeof n=="object"&&n!==null&&"id"in n?n.id:n}a(c,"extractRelationId");function p(n,e=a$1){let i=z.guid({message:e.invalidId(n)}),r=z.union([i,z.null()]);return z.union([r,z.object({id:i,props:z.record(z.string(),z.unknown()).optional()}).passthrough()])}a(p,"createSingleRelationValidator");function m(n,e=a$1){let i=z.guid({message:e.invalidId(n)}),r=z.union([i,z.object({id:i,props:z.record(z.string(),z.unknown()).optional()}).passthrough()]),u=z.array(r);return n.maxItems!==void 0&&(u=u.max(n.maxItems,e.maxItems(n,n.maxItems))),u.refine(s=>s.every(d=>{let l=c(d);return typeof l=="string"&&i.safeParse(l).success}),{message:e.invalidId(n)})}a(m,"createMultiRelationValidator");function g(n,e=a$1){return n.cardinality==="many"?m(n,e):p(n,e)}a(g,"createRelationValidator");export{p as a,m as b,g as c};
@@ -0,0 +1,2 @@
1
+ 'use strict';var chunkJFSQ24XR_js=require('./chunk-JFSQ24XR.js'),chunkDPD6ZWL2_js=require('./chunk-DPD6ZWL2.js'),constants=require('@stndrds/constants'),zod=require('zod'),libphonenumberJs=require('libphonenumber-js');/*! © 2025-2026 AND YOU CREATE SAS (RCS Paris 940 190 614). Proprietary — see LICENSE (Standards SDK License 1.0). */
2
+ function u(t){return t.replace(/\D/g,"")}chunkDPD6ZWL2_js.a(u,"digitsOnly");function b(t){return u(t)}chunkDPD6ZWL2_js.a(b,"normalizeCountrylessPhoneNumber");function p(t){return constants.getCountryByIso3(t)?.iso2}chunkDPD6ZWL2_js.a(p,"getIso2");function y(t,e){if(!t)return "";let r=p(e);if(!r)return u(t);let i=libphonenumberJs.parsePhoneNumberFromString(t,r);if(i)return i.nationalNumber;let s=constants.getCountryByIso3(e),o=u(t);if(s){let d=s.phoneCode.replace("+",""),g=o.startsWith(d)?o.slice(d.length):o;return constants.stripTrunkPrefix(g,s.phoneTrunkPrefix??"")}return o}chunkDPD6ZWL2_js.a(y,"normalizePhoneNumber");function x(t){if(!t.phoneNumber)return "";let e=p(t.countryCode),i=constants.getCountryByIso3(t.countryCode)?.phoneCode??"";if(!e)return `${i} ${t.phoneNumber}`.trim();let s=`${i}${u(t.phoneNumber)}`,o=libphonenumberJs.parsePhoneNumberFromString(s);return o?o.formatInternational():`${i} ${t.phoneNumber}`.trim()}chunkDPD6ZWL2_js.a(x,"formatPhoneForDisplay");function A(t,e=chunkJFSQ24XR_js.a){return zod.z.object({countryCode:zod.z.string().length(3),phoneNumber:zod.z.string().min(1)},{message:e.invalidPhone(t)}).refine(r=>constants.isValidIso3(r.countryCode),{message:"Invalid country code"}).transform(r=>({countryCode:r.countryCode,phoneNumber:y(r.phoneNumber,r.countryCode)}))}chunkDPD6ZWL2_js.a(A,"createPhoneValidator");exports.a=b;exports.b=y;exports.c=x;exports.d=A;
@@ -0,0 +1,2 @@
1
+ import {h}from'./chunk-YBDR5ZMH.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
+ function d(n){let e=new Set;function t(o){if(o===null)return "null";switch(typeof o){case "string":case "number":case "boolean":return JSON.stringify(o);case "undefined":return;case "object":break;default:throw new h(`Cannot canonicalize value of type ${typeof o}`,[])}let i=o;if(e.has(i))throw new h("Cannot canonicalize circular structure",[]);e.add(i);try{return Array.isArray(i)?`[${i.map(r=>t(r)??"null").join(",")}]`:`{${Object.entries(i).map(([r,s])=>[r,t(s)]).filter(r=>r[1]!==void 0).sort(([r],[s])=>r<s?-1:1).map(([r,s])=>`${JSON.stringify(r)}:${s}`).join(",")}}`}finally{e.delete(i);}}return a(t,"encode"),t(n)??"null"}a(d,"canonicalStringify");function p(n){return n}a(p,"asTenantId");function g(n){return n}a(g,"asUserId");function w(){return typeof crypto<"u"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,n=>{let e=Math.random()*16|0;return (n==="x"?e:e&3|8).toString(16)})}a(w,"generateId");function b(n,e){return new Map(n.map(t=>[e(t),t]))}a(b,"indexBy");function f(n,e){if(n===e)return true;if(n==null||e==null||typeof n!=typeof e)return false;if(Array.isArray(n))return !Array.isArray(e)||n.length!==e.length?false:n.every((t,o)=>f(t,e[o]));if(typeof n=="object"&&typeof e=="object"){let t=n,o=e,i=Object.keys(t),c=Object.keys(o);return i.length!==c.length?false:i.every(r=>r in o&&f(t[r],o[r]))}return false}a(f,"deepEqual");export{d as a,p as b,g as c,w as d,b as e,f};
@@ -0,0 +1,2 @@
1
+ 'use strict';var chunkDPD6ZWL2_js=require('./chunk-DPD6ZWL2.js');/*! © 2025-2026 AND YOU CREATE SAS (RCS Paris 940 190 614). Proprietary — see LICENSE (Standards SDK License 1.0). */
2
+ var l={required:chunkDPD6ZWL2_js.a(e=>`${e.label} is required`,"required"),invalidType:chunkDPD6ZWL2_js.a((e,t)=>`${e.label} must be a ${t}`,"invalidType"),minLength:chunkDPD6ZWL2_js.a((e,t)=>`${e.label} must be at least ${t} characters`,"minLength"),maxLength:chunkDPD6ZWL2_js.a((e,t)=>`${e.label} must be at most ${t} characters`,"maxLength"),invalidPattern:chunkDPD6ZWL2_js.a(e=>`${e.label} format is invalid`,"invalidPattern"),minValue:chunkDPD6ZWL2_js.a((e,t)=>`${e.label} must be at least ${t}`,"minValue"),maxValue:chunkDPD6ZWL2_js.a((e,t)=>`${e.label} must be at most ${t}`,"maxValue"),mustBeInteger:chunkDPD6ZWL2_js.a(e=>`${e.label} must be an integer`,"mustBeInteger"),invalidDate:chunkDPD6ZWL2_js.a(e=>`${e.label} must be a valid date`,"invalidDate"),invalidOption:chunkDPD6ZWL2_js.a((e,t)=>`${e.label} must be one of: ${t.join(", ")}`,"invalidOption"),invalidId:chunkDPD6ZWL2_js.a(e=>`${e.label} must be a valid ID`,"invalidId"),maxItems:chunkDPD6ZWL2_js.a((e,t)=>`${e.label} must have at most ${t} item${t>1?"s":""}`,"maxItems"),invalidRichtext:chunkDPD6ZWL2_js.a(e=>`${e.label} must be valid rich text content`,"invalidRichtext"),invalidPhone:chunkDPD6ZWL2_js.a(e=>`${e.label} must be a valid phone number`,"invalidPhone"),invalidCurrency:chunkDPD6ZWL2_js.a(e=>`${e.label} must be a valid currency value`,"invalidCurrency"),invalidLocation:chunkDPD6ZWL2_js.a(e=>`${e.label} must be a valid location`,"invalidLocation")};function i(e){return e.issues.map(t=>({path:t.path.map(String),message:t.message}))}chunkDPD6ZWL2_js.a(i,"formatZodErrors");exports.a=l;exports.b=i;
@@ -0,0 +1,2 @@
1
+ 'use strict';var chunkTKABCIEO_js=require('./chunk-TKABCIEO.js'),chunkDPD6ZWL2_js=require('./chunk-DPD6ZWL2.js');/*! © 2025-2026 AND YOU CREATE SAS (RCS Paris 940 190 614). Proprietary — see LICENSE (Standards SDK License 1.0). */
2
+ function d(n){let e=new Set;function t(o){if(o===null)return "null";switch(typeof o){case "string":case "number":case "boolean":return JSON.stringify(o);case "undefined":return;case "object":break;default:throw new chunkTKABCIEO_js.h(`Cannot canonicalize value of type ${typeof o}`,[])}let i=o;if(e.has(i))throw new chunkTKABCIEO_js.h("Cannot canonicalize circular structure",[]);e.add(i);try{return Array.isArray(i)?`[${i.map(r=>t(r)??"null").join(",")}]`:`{${Object.entries(i).map(([r,s])=>[r,t(s)]).filter(r=>r[1]!==void 0).sort(([r],[s])=>r<s?-1:1).map(([r,s])=>`${JSON.stringify(r)}:${s}`).join(",")}}`}finally{e.delete(i);}}return chunkDPD6ZWL2_js.a(t,"encode"),t(n)??"null"}chunkDPD6ZWL2_js.a(d,"canonicalStringify");function p(n){return n}chunkDPD6ZWL2_js.a(p,"asTenantId");function g(n){return n}chunkDPD6ZWL2_js.a(g,"asUserId");function w(){return typeof crypto<"u"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,n=>{let e=Math.random()*16|0;return (n==="x"?e:e&3|8).toString(16)})}chunkDPD6ZWL2_js.a(w,"generateId");function b(n,e){return new Map(n.map(t=>[e(t),t]))}chunkDPD6ZWL2_js.a(b,"indexBy");function f(n,e){if(n===e)return true;if(n==null||e==null||typeof n!=typeof e)return false;if(Array.isArray(n))return !Array.isArray(e)||n.length!==e.length?false:n.every((t,o)=>f(t,e[o]));if(typeof n=="object"&&typeof e=="object"){let t=n,o=e,i=Object.keys(t),c=Object.keys(o);return i.length!==c.length?false:i.every(r=>r in o&&f(t[r],o[r]))}return false}chunkDPD6ZWL2_js.a(f,"deepEqual");exports.a=d;exports.b=p;exports.c=g;exports.d=w;exports.e=b;exports.f=f;
@@ -0,0 +1,2 @@
1
+ 'use strict';var chunkJFSQ24XR_js=require('./chunk-JFSQ24XR.js'),chunkDPD6ZWL2_js=require('./chunk-DPD6ZWL2.js'),zod=require('zod');/*! © 2025-2026 AND YOU CREATE SAS (RCS Paris 940 190 614). Proprietary — see LICENSE (Standards SDK License 1.0). */
2
+ function s(r,a=chunkJFSQ24XR_js.a){return zod.z.unknown()}chunkDPD6ZWL2_js.a(s,"createRollupValidator");exports.a=s;
@@ -0,0 +1,2 @@
1
+ 'use strict';var chunkJFSQ24XR_js=require('./chunk-JFSQ24XR.js'),chunkDPD6ZWL2_js=require('./chunk-DPD6ZWL2.js'),zod=require('zod');/*! © 2025-2026 AND YOU CREATE SAS (RCS Paris 940 190 614). Proprietary — see LICENSE (Standards SDK License 1.0). */
2
+ function n(i,r=chunkJFSQ24XR_js.a){return zod.z.string({message:r.invalidRichtext(i)})}chunkDPD6ZWL2_js.a(n,"createRichtextValidator");exports.a=n;
@@ -0,0 +1,2 @@
1
+ import {a as a$1}from'./chunk-4OTKOCGB.mjs';import {a}from'./chunk-KSPJP74K.mjs';import {z}from'zod';/*! © 2025-2026 AND YOU CREATE SAS (RCS Paris 940 190 614). Proprietary — see LICENSE (Standards SDK License 1.0). */
2
+ function x(e,m=a$1){let i=z.number();return e.min!==void 0&&(i=i.min(e.min,m.minValue(e,e.min))),e.max!==void 0&&(i=i.max(e.max,m.maxValue(e,e.max))),e.renderAs==="rating"&&(i=i.min(e.min??0),i=i.max(e.max??5)),e.unit==="percentage"&&(i=i.min(e.min??0).max(e.max??100)),e.unit==="integer"&&(i=i.int(m.mustBeInteger(e))),i}a(x,"createNumberValidator");export{x as a};
@@ -0,0 +1,2 @@
1
+ 'use strict';var chunkJFSQ24XR_js=require('./chunk-JFSQ24XR.js'),chunkDPD6ZWL2_js=require('./chunk-DPD6ZWL2.js'),zod=require('zod');/*! © 2025-2026 AND YOU CREATE SAS (RCS Paris 940 190 614). Proprietary — see LICENSE (Standards SDK License 1.0). */
2
+ function l(t){if(!t)return null;let r=t==="today"?new Date().toISOString().slice(0,10):t,n=new Date(r);return Number.isNaN(n.getTime())?null:n}chunkDPD6ZWL2_js.a(l,"resolveBound");function N(t,r=chunkJFSQ24XR_js.a){let n=r.invalidDate(t),d=l(t.minDate),m=l(t.maxDate),i=zod.z.any().superRefine((e,a)=>{let s=new Date(e);if(Number.isNaN(s.getTime())){a.addIssue({code:"custom",message:n});return}d&&s<d&&a.addIssue({code:"custom",message:n}),m&&s>m&&a.addIssue({code:"custom",message:n});});if(!t.endDate)return i;let f=zod.z.object({start:i,end:i.nullable()}).superRefine((e,a)=>{if(e.end===null)return;let s=new Date(e.start),c=new Date(e.end);!(Number.isNaN(s.getTime())||Number.isNaN(c.getTime()))&&c<s&&a.addIssue({code:"custom",message:n,path:["end"]});});return zod.z.preprocess(e=>typeof e=="string"?{start:e,end:null}:e,f)}chunkDPD6ZWL2_js.a(N,"createDateValidator");exports.a=N;
@@ -0,0 +1,2 @@
1
+ /*! © 2025-2026 AND YOU CREATE SAS (RCS Paris 940 190 614). Proprietary — see LICENSE (Standards SDK License 1.0). */
2
+ var c=Object.defineProperty;var d=(a,b)=>c(a,"name",{value:b,configurable:true});export{d as a};
@@ -0,0 +1,2 @@
1
+ import {a as a$1}from'./chunk-4OTKOCGB.mjs';import {a}from'./chunk-KSPJP74K.mjs';import {z}from'zod';/*! © 2025-2026 AND YOU CREATE SAS (RCS Paris 940 190 614). Proprietary — see LICENSE (Standards SDK License 1.0). */
2
+ function l(t){if(!t)return null;let r=t==="today"?new Date().toISOString().slice(0,10):t,n=new Date(r);return Number.isNaN(n.getTime())?null:n}a(l,"resolveBound");function N(t,r=a$1){let n=r.invalidDate(t),d=l(t.minDate),m=l(t.maxDate),i=z.any().superRefine((e,a)=>{let s=new Date(e);if(Number.isNaN(s.getTime())){a.addIssue({code:"custom",message:n});return}d&&s<d&&a.addIssue({code:"custom",message:n}),m&&s>m&&a.addIssue({code:"custom",message:n});});if(!t.endDate)return i;let f=z.object({start:i,end:i.nullable()}).superRefine((e,a)=>{if(e.end===null)return;let s=new Date(e.start),c=new Date(e.end);!(Number.isNaN(s.getTime())||Number.isNaN(c.getTime()))&&c<s&&a.addIssue({code:"custom",message:n,path:["end"]});});return z.preprocess(e=>typeof e=="string"?{start:e,end:null}:e,f)}a(N,"createDateValidator");export{N as a};
@@ -0,0 +1,2 @@
1
+ import {a as a$1}from'./chunk-4OTKOCGB.mjs';import {a}from'./chunk-KSPJP74K.mjs';import {getCountryByIso3,stripTrunkPrefix,isValidIso3}from'@stndrds/constants';import {z}from'zod';import {parsePhoneNumberFromString}from'libphonenumber-js';/*! © 2025-2026 AND YOU CREATE SAS (RCS Paris 940 190 614). Proprietary — see LICENSE (Standards SDK License 1.0). */
2
+ function u(t){return t.replace(/\D/g,"")}a(u,"digitsOnly");function b(t){return u(t)}a(b,"normalizeCountrylessPhoneNumber");function p(t){return getCountryByIso3(t)?.iso2}a(p,"getIso2");function y(t,e){if(!t)return "";let r=p(e);if(!r)return u(t);let i=parsePhoneNumberFromString(t,r);if(i)return i.nationalNumber;let s=getCountryByIso3(e),o=u(t);if(s){let d=s.phoneCode.replace("+",""),g=o.startsWith(d)?o.slice(d.length):o;return stripTrunkPrefix(g,s.phoneTrunkPrefix??"")}return o}a(y,"normalizePhoneNumber");function x(t){if(!t.phoneNumber)return "";let e=p(t.countryCode),i=getCountryByIso3(t.countryCode)?.phoneCode??"";if(!e)return `${i} ${t.phoneNumber}`.trim();let s=`${i}${u(t.phoneNumber)}`,o=parsePhoneNumberFromString(s);return o?o.formatInternational():`${i} ${t.phoneNumber}`.trim()}a(x,"formatPhoneForDisplay");function A(t,e=a$1){return z.object({countryCode:z.string().length(3),phoneNumber:z.string().min(1)},{message:e.invalidPhone(t)}).refine(r=>isValidIso3(r.countryCode),{message:"Invalid country code"}).transform(r=>({countryCode:r.countryCode,phoneNumber:y(r.phoneNumber,r.countryCode)}))}a(A,"createPhoneValidator");export{b as a,y as b,x as c,A as d};
@@ -0,0 +1,2 @@
1
+ 'use strict';var chunkJFSQ24XR_js=require('./chunk-JFSQ24XR.js'),chunkDPD6ZWL2_js=require('./chunk-DPD6ZWL2.js'),zod=require('zod');/*! © 2025-2026 AND YOU CREATE SAS (RCS Paris 940 190 614). Proprietary — see LICENSE (Standards SDK License 1.0). */
2
+ function p(e,s=chunkJFSQ24XR_js.a){let i=e.options.map(t=>t.value);if(i.length===0)return zod.z.never();let n=e.options.map(t=>t.label);return zod.z.enum(i,{message:s.invalidOption(e,n)})}chunkDPD6ZWL2_js.a(p,"createSelectValidator");function d(e,s=chunkJFSQ24XR_js.a){let i=e.options.map(t=>t.value);if(i.length===0)return zod.z.never();let n=e.options.map(t=>t.label);return zod.z.array(zod.z.enum(i,{message:s.invalidOption(e,n)}))}chunkDPD6ZWL2_js.a(d,"createMultiselectValidator");function c(e,s=chunkJFSQ24XR_js.a){let i=e.options.map(t=>t.value);if(i.length===0)return zod.z.never();let n=e.options.map(t=>t.label);return zod.z.enum(i,{message:s.invalidOption(e,n)})}chunkDPD6ZWL2_js.a(c,"createStatusValidator");exports.a=p;exports.b=d;exports.c=c;
@@ -0,0 +1,2 @@
1
+ 'use strict';var chunkJFSQ24XR_js=require('./chunk-JFSQ24XR.js'),chunkDPD6ZWL2_js=require('./chunk-DPD6ZWL2.js'),zod=require('zod');/*! © 2025-2026 AND YOU CREATE SAS (RCS Paris 940 190 614). Proprietary — see LICENSE (Standards SDK License 1.0). */
2
+ function c(n){return typeof n=="object"&&n!==null&&"id"in n?n.id:n}chunkDPD6ZWL2_js.a(c,"extractRelationId");function p(n,e=chunkJFSQ24XR_js.a){let i=zod.z.guid({message:e.invalidId(n)}),r=zod.z.union([i,zod.z.null()]);return zod.z.union([r,zod.z.object({id:i,props:zod.z.record(zod.z.string(),zod.z.unknown()).optional()}).passthrough()])}chunkDPD6ZWL2_js.a(p,"createSingleRelationValidator");function m(n,e=chunkJFSQ24XR_js.a){let i=zod.z.guid({message:e.invalidId(n)}),r=zod.z.union([i,zod.z.object({id:i,props:zod.z.record(zod.z.string(),zod.z.unknown()).optional()}).passthrough()]),u=zod.z.array(r);return n.maxItems!==void 0&&(u=u.max(n.maxItems,e.maxItems(n,n.maxItems))),u.refine(s=>s.every(d=>{let l=c(d);return typeof l=="string"&&i.safeParse(l).success}),{message:e.invalidId(n)})}chunkDPD6ZWL2_js.a(m,"createMultiRelationValidator");function g(n,e=chunkJFSQ24XR_js.a){return n.cardinality==="many"?m(n,e):p(n,e)}chunkDPD6ZWL2_js.a(g,"createRelationValidator");exports.a=p;exports.b=m;exports.c=g;