@stndrds/schema 1.0.0-alpha.264 → 1.0.0-alpha.266
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/all--B2_3ksI.d.ts +465 -0
- package/dist/all-D5zeUllO.d.mts +465 -0
- package/dist/{attributes-DUuaECJI.d.ts → attributes-_b3Db8vT.d.ts} +1 -1
- package/dist/{attributes-DCgZhISp.d.mts → attributes-lBLiOIY3.d.mts} +1 -1
- package/dist/chunk-6ZDH3EJA.js +1261 -0
- package/dist/chunk-F6ATLCIR.mjs +1214 -0
- package/dist/{chunk-TS3PJOMZ.js → chunk-FDIAOFHS.js} +22 -235
- package/dist/{chunk-UXCJ3NI4.mjs → chunk-KDHDC7E6.mjs} +150 -9
- package/dist/{chunk-U36ZIBEM.mjs → chunk-O73ROMWQ.mjs} +15 -6
- package/dist/{chunk-54WDPQ6R.mjs → chunk-POULKEJM.mjs} +22 -224
- package/dist/{chunk-EBGRZUIH.js → chunk-Q4SZAMJT.js} +5 -0
- package/dist/chunk-QMLO7V5E.mjs +216 -0
- package/dist/{chunk-L4U5QEQL.js → chunk-QN2N3IJZ.js} +158 -8
- package/dist/{chunk-JUKLL5RJ.mjs → chunk-R5LAJCBU.mjs} +5 -2
- package/dist/chunk-V6Q7HCA7.js +229 -0
- package/dist/{chunk-QAF3HNKQ.js → chunk-ZPFOKBIN.js} +16 -5
- package/dist/exceptions.d.mts +471 -0
- package/dist/exceptions.d.ts +471 -0
- package/dist/exceptions.js +158 -0
- package/dist/exceptions.mjs +1 -0
- package/dist/helpers-C1VVEAOO.d.mts +76 -0
- package/dist/helpers-vQ6kp8ET.d.ts +76 -0
- package/dist/index-Bq1KrQkR.d.ts +2413 -0
- package/dist/index-DtxtOBYT.d.mts +2413 -0
- package/dist/index.d.mts +1580 -2652
- package/dist/index.d.ts +1580 -2652
- package/dist/index.js +1297 -1045
- package/dist/index.mjs +913 -907
- package/dist/migrations-BXd2ZGfM.d.mts +39 -0
- package/dist/migrations-DcuJZ8qO.d.ts +39 -0
- package/dist/{helpers-B4qBjTd0.d.ts → objects-A1ED9af-.d.ts} +33 -113
- package/dist/{helpers-B_NlMAm2.d.mts → objects-BCaBw2ef.d.mts} +33 -113
- package/dist/{types-15lGDPlN.d.mts → types-DNz3ITS-.d.mts} +1 -1
- package/dist/{types-CqZZxm_V.d.ts → types-DqLi1tx1.d.ts} +1 -1
- package/dist/validation/all.d.mts +7 -4
- package/dist/validation/all.d.ts +7 -4
- package/dist/validation/all.js +88 -15
- package/dist/validation/all.mjs +9 -8
- package/dist/validation/complex/currency.d.mts +2 -2
- package/dist/validation/complex/currency.d.ts +2 -2
- package/dist/validation/complex/location.d.mts +2 -2
- package/dist/validation/complex/location.d.ts +2 -2
- package/dist/validation/complex/phone.d.mts +2 -2
- package/dist/validation/complex/phone.d.ts +2 -2
- package/dist/validation/complex/phone.js +2 -2
- package/dist/validation/complex/phone.mjs +1 -1
- package/dist/validation/complex/relation.d.mts +2 -2
- package/dist/validation/complex/relation.d.ts +2 -2
- package/dist/validation/complex/richtext.d.mts +2 -2
- package/dist/validation/complex/richtext.d.ts +2 -2
- package/dist/validation/complex/select.d.mts +2 -2
- package/dist/validation/complex/select.d.ts +2 -2
- package/dist/validation/complex/user.d.mts +2 -2
- package/dist/validation/complex/user.d.ts +2 -2
- package/dist/validation/computed/formula.d.mts +2 -2
- package/dist/validation/computed/formula.d.ts +2 -2
- package/dist/validation/computed/rollup.d.mts +2 -2
- package/dist/validation/computed/rollup.d.ts +2 -2
- package/dist/validation/config/index.d.mts +5 -18
- package/dist/validation/config/index.d.ts +5 -18
- package/dist/validation/config/index.js +34 -4
- package/dist/validation/config/index.mjs +7 -1
- package/dist/validation/core/index.d.mts +3 -3
- package/dist/validation/core/index.d.ts +3 -3
- package/dist/validation/object/index.d.mts +5 -4
- package/dist/validation/object/index.d.ts +5 -4
- package/dist/validation/object/index.js +19 -18
- package/dist/validation/object/index.mjs +7 -6
- package/dist/validation/primitives/checkbox.d.mts +2 -2
- package/dist/validation/primitives/checkbox.d.ts +2 -2
- package/dist/validation/primitives/date.d.mts +2 -2
- package/dist/validation/primitives/date.d.ts +2 -2
- package/dist/validation/primitives/number.d.mts +2 -2
- package/dist/validation/primitives/number.d.ts +2 -2
- package/dist/validation/primitives/text.d.mts +2 -2
- package/dist/validation/primitives/text.d.ts +2 -2
- package/dist/validation/primitives/text.js +2 -2
- package/dist/validation/primitives/text.mjs +1 -1
- package/package.json +7 -2
- package/dist/chunk-PGERPYDR.js +0 -2
- package/dist/chunk-SP3PNHYF.mjs +0 -1
package/dist/index.js
CHANGED
|
@@ -1,29 +1,30 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var chunkFRCDMQER_js = require('./chunk-FRCDMQER.js');
|
|
4
|
-
require('./chunk-
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
require('./chunk-
|
|
8
|
-
require('./chunk-YIP5FJ5H.js');
|
|
9
|
-
require('./chunk-QAF3HNKQ.js');
|
|
4
|
+
var chunk6ZDH3EJA_js = require('./chunk-6ZDH3EJA.js');
|
|
5
|
+
var chunkQN2N3IJZ_js = require('./chunk-QN2N3IJZ.js');
|
|
6
|
+
var chunkV6Q7HCA7_js = require('./chunk-V6Q7HCA7.js');
|
|
7
|
+
require('./chunk-EW5XR2X3.js');
|
|
10
8
|
require('./chunk-QWKLQRBX.js');
|
|
11
9
|
require('./chunk-KNGWHQLR.js');
|
|
12
10
|
require('./chunk-HTSTPTNZ.js');
|
|
13
11
|
require('./chunk-V2UA2D4E.js');
|
|
14
|
-
require('./chunk-5WATIVCA.js');
|
|
12
|
+
var chunk5WATIVCA_js = require('./chunk-5WATIVCA.js');
|
|
13
|
+
var chunkSI34M4IC_js = require('./chunk-SI34M4IC.js');
|
|
14
|
+
var chunkYIP5FJ5H_js = require('./chunk-YIP5FJ5H.js');
|
|
15
|
+
var chunkZPFOKBIN_js = require('./chunk-ZPFOKBIN.js');
|
|
16
|
+
var chunkFDIAOFHS_js = require('./chunk-FDIAOFHS.js');
|
|
15
17
|
require('./chunk-ACKMC6FL.js');
|
|
16
18
|
require('./chunk-E6JUYGJX.js');
|
|
17
|
-
var
|
|
19
|
+
var chunkQ4SZAMJT_js = require('./chunk-Q4SZAMJT.js');
|
|
18
20
|
require('./chunk-EEH4XQ7W.js');
|
|
19
|
-
require('./chunk-EW5XR2X3.js');
|
|
20
21
|
var chunkYKWSHBT5_js = require('./chunk-YKWSHBT5.js');
|
|
21
22
|
var constants = require('@stndrds/constants');
|
|
22
|
-
var
|
|
23
|
+
var z2 = require('zod');
|
|
23
24
|
|
|
24
25
|
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
25
26
|
|
|
26
|
-
var
|
|
27
|
+
var z2__default = /*#__PURE__*/_interopDefault(z2);
|
|
27
28
|
|
|
28
29
|
// src/types/notifications.ts
|
|
29
30
|
var NOTIFICATION_KINDS = ["fyi", "task", "question", "handoff", "system"];
|
|
@@ -68,408 +69,6 @@ var BEHAVIOR_PROPERTIES = [
|
|
|
68
69
|
];
|
|
69
70
|
var PRESENTATION_PROPERTIES = ["label", "description", "placeholder", "icon"];
|
|
70
71
|
|
|
71
|
-
// src/types/system-attributes.ts
|
|
72
|
-
var SYSTEM_ATTRIBUTE_I18N_KEYS = {
|
|
73
|
-
createdAt: "createdAt",
|
|
74
|
-
updatedAt: "updatedAt",
|
|
75
|
-
createdBy: "createdBy",
|
|
76
|
-
lastUpdatedBy: "lastUpdatedBy",
|
|
77
|
-
attachments: "attachments"
|
|
78
|
-
};
|
|
79
|
-
function getSystemAttributeI18nKey(name) {
|
|
80
|
-
return SYSTEM_ATTRIBUTE_I18N_KEYS[name];
|
|
81
|
-
}
|
|
82
|
-
var SYSTEM_ATTRIBUTES = {
|
|
83
|
-
createdAt: {
|
|
84
|
-
id: "system:createdAt",
|
|
85
|
-
name: "createdAt",
|
|
86
|
-
label: "Created time",
|
|
87
|
-
type: "date",
|
|
88
|
-
required: false,
|
|
89
|
-
system: true,
|
|
90
|
-
icon: "clock-circle",
|
|
91
|
-
description: "When this record was created"
|
|
92
|
-
},
|
|
93
|
-
updatedAt: {
|
|
94
|
-
id: "system:updatedAt",
|
|
95
|
-
name: "updatedAt",
|
|
96
|
-
label: "Last edited time",
|
|
97
|
-
type: "date",
|
|
98
|
-
required: false,
|
|
99
|
-
system: true,
|
|
100
|
-
icon: "clock-circle",
|
|
101
|
-
description: "When this record was last modified"
|
|
102
|
-
},
|
|
103
|
-
createdBy: {
|
|
104
|
-
id: "system:createdBy",
|
|
105
|
-
name: "createdBy",
|
|
106
|
-
label: "Created by",
|
|
107
|
-
type: "user",
|
|
108
|
-
required: false,
|
|
109
|
-
system: true,
|
|
110
|
-
multiple: false,
|
|
111
|
-
icon: "user",
|
|
112
|
-
description: "Actor who created this record"
|
|
113
|
-
},
|
|
114
|
-
lastUpdatedBy: {
|
|
115
|
-
id: "system:lastUpdatedBy",
|
|
116
|
-
name: "lastUpdatedBy",
|
|
117
|
-
label: "Last edited by",
|
|
118
|
-
type: "user",
|
|
119
|
-
required: false,
|
|
120
|
-
system: true,
|
|
121
|
-
multiple: false,
|
|
122
|
-
icon: "user",
|
|
123
|
-
description: "Actor who last modified this record"
|
|
124
|
-
},
|
|
125
|
-
/**
|
|
126
|
-
* System attribute for free-form document attachments.
|
|
127
|
-
* Hidden from forms, visible in Documents tab.
|
|
128
|
-
* Users can attach any document without template constraints.
|
|
129
|
-
*/
|
|
130
|
-
attachments: {
|
|
131
|
-
id: "system:attachments",
|
|
132
|
-
name: "attachments",
|
|
133
|
-
label: "Attachments",
|
|
134
|
-
type: "document",
|
|
135
|
-
required: false,
|
|
136
|
-
system: true,
|
|
137
|
-
hidden: true,
|
|
138
|
-
// Hidden from regular form views
|
|
139
|
-
icon: "paperclip",
|
|
140
|
-
description: "Free-form document attachments"
|
|
141
|
-
}
|
|
142
|
-
};
|
|
143
|
-
function getSystemAttributeList() {
|
|
144
|
-
return Object.values(SYSTEM_ATTRIBUTES);
|
|
145
|
-
}
|
|
146
|
-
function isManagedSystemAttribute(attribute) {
|
|
147
|
-
return attribute.id?.startsWith("system:") ?? false;
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
// src/types/attribute-capabilities.ts
|
|
151
|
-
var TEXT_OPERATORS = [
|
|
152
|
-
"is",
|
|
153
|
-
"is_not",
|
|
154
|
-
"contains",
|
|
155
|
-
"not_contains",
|
|
156
|
-
"starts_with",
|
|
157
|
-
"ends_with",
|
|
158
|
-
"is_empty",
|
|
159
|
-
"is_not_empty"
|
|
160
|
-
];
|
|
161
|
-
var NUMBER_OPERATORS = [
|
|
162
|
-
"eq",
|
|
163
|
-
"neq",
|
|
164
|
-
"lt",
|
|
165
|
-
"gt",
|
|
166
|
-
"lte",
|
|
167
|
-
"gte",
|
|
168
|
-
"is_empty",
|
|
169
|
-
"is_not_empty"
|
|
170
|
-
];
|
|
171
|
-
var CHECKBOX_OPERATORS = [
|
|
172
|
-
"is_checked",
|
|
173
|
-
"is_not_checked"
|
|
174
|
-
];
|
|
175
|
-
var DATE_OPERATORS = [
|
|
176
|
-
"is",
|
|
177
|
-
"is_not",
|
|
178
|
-
"before",
|
|
179
|
-
"after",
|
|
180
|
-
"on_or_before",
|
|
181
|
-
"on_or_after",
|
|
182
|
-
"is_within",
|
|
183
|
-
"day_month_eq",
|
|
184
|
-
"is_empty",
|
|
185
|
-
"is_not_empty"
|
|
186
|
-
];
|
|
187
|
-
var SELECT_OPERATORS = [
|
|
188
|
-
"is",
|
|
189
|
-
"is_not",
|
|
190
|
-
"any_of",
|
|
191
|
-
"none_of",
|
|
192
|
-
"is_empty",
|
|
193
|
-
"is_not_empty"
|
|
194
|
-
];
|
|
195
|
-
var MULTISELECT_OPERATORS = [
|
|
196
|
-
"contains",
|
|
197
|
-
"not_contains",
|
|
198
|
-
"is_empty",
|
|
199
|
-
"is_not_empty"
|
|
200
|
-
];
|
|
201
|
-
var REFERENCE_OPERATORS = [
|
|
202
|
-
"is",
|
|
203
|
-
"is_not",
|
|
204
|
-
"any_of",
|
|
205
|
-
"none_of",
|
|
206
|
-
"contains",
|
|
207
|
-
"not_contains",
|
|
208
|
-
"is_empty",
|
|
209
|
-
"is_not_empty"
|
|
210
|
-
];
|
|
211
|
-
var PRESENCE_OPERATORS = [
|
|
212
|
-
"is_empty",
|
|
213
|
-
"is_not_empty"
|
|
214
|
-
];
|
|
215
|
-
var FORMULA_OPERATORS = [
|
|
216
|
-
"is",
|
|
217
|
-
"is_not",
|
|
218
|
-
"eq",
|
|
219
|
-
"neq",
|
|
220
|
-
"lt",
|
|
221
|
-
"gt",
|
|
222
|
-
"lte",
|
|
223
|
-
"gte",
|
|
224
|
-
"contains",
|
|
225
|
-
"not_contains",
|
|
226
|
-
"is_empty",
|
|
227
|
-
"is_not_empty"
|
|
228
|
-
];
|
|
229
|
-
var ATTRIBUTE_FILTER_OPERATORS = {
|
|
230
|
-
text: TEXT_OPERATORS,
|
|
231
|
-
richtext: [],
|
|
232
|
-
number: NUMBER_OPERATORS,
|
|
233
|
-
checkbox: CHECKBOX_OPERATORS,
|
|
234
|
-
date: DATE_OPERATORS,
|
|
235
|
-
phone: ["is", "is_not", "contains", "not_contains", "is_empty", "is_not_empty"],
|
|
236
|
-
currency: NUMBER_OPERATORS,
|
|
237
|
-
status: SELECT_OPERATORS,
|
|
238
|
-
select: SELECT_OPERATORS,
|
|
239
|
-
multiselect: MULTISELECT_OPERATORS,
|
|
240
|
-
location: [],
|
|
241
|
-
user: REFERENCE_OPERATORS,
|
|
242
|
-
relation: REFERENCE_OPERATORS,
|
|
243
|
-
formula: FORMULA_OPERATORS,
|
|
244
|
-
document: PRESENCE_OPERATORS
|
|
245
|
-
};
|
|
246
|
-
var COMPUTED_TYPES = /* @__PURE__ */ new Set(["formula", "rollup"]);
|
|
247
|
-
var EDGE_BACKED_TYPES = /* @__PURE__ */ new Set(["user", "relation", "document"]);
|
|
248
|
-
var STATIC_DEFAULT_TYPES = /* @__PURE__ */ new Set([
|
|
249
|
-
"text",
|
|
250
|
-
"richtext",
|
|
251
|
-
"number",
|
|
252
|
-
"select",
|
|
253
|
-
"multiselect",
|
|
254
|
-
"status",
|
|
255
|
-
"date",
|
|
256
|
-
"phone",
|
|
257
|
-
"currency",
|
|
258
|
-
"location",
|
|
259
|
-
"user",
|
|
260
|
-
"relation",
|
|
261
|
-
"document"
|
|
262
|
-
]);
|
|
263
|
-
var PLACEHOLDER_TYPES = /* @__PURE__ */ new Set([
|
|
264
|
-
"text",
|
|
265
|
-
"number",
|
|
266
|
-
"date",
|
|
267
|
-
"phone",
|
|
268
|
-
"currency",
|
|
269
|
-
"select",
|
|
270
|
-
"multiselect"
|
|
271
|
-
]);
|
|
272
|
-
var SEARCHABLE_TYPES = /* @__PURE__ */ new Set([
|
|
273
|
-
"text",
|
|
274
|
-
"phone",
|
|
275
|
-
"status",
|
|
276
|
-
"select",
|
|
277
|
-
"multiselect"
|
|
278
|
-
]);
|
|
279
|
-
var SORTABLE_TYPES = /* @__PURE__ */ new Set([
|
|
280
|
-
"text",
|
|
281
|
-
"number",
|
|
282
|
-
"checkbox",
|
|
283
|
-
"date",
|
|
284
|
-
"phone",
|
|
285
|
-
"currency",
|
|
286
|
-
"status",
|
|
287
|
-
"select"
|
|
288
|
-
]);
|
|
289
|
-
function getAttributeCapabilities(attribute) {
|
|
290
|
-
const suppressed = Boolean(attribute.hidden || attribute.archived);
|
|
291
|
-
const active = !attribute.archived;
|
|
292
|
-
const computed = COMPUTED_TYPES.has(attribute.type);
|
|
293
|
-
const document2 = attribute.type === "document";
|
|
294
|
-
const edgeBacked = EDGE_BACKED_TYPES.has(attribute.type);
|
|
295
|
-
const cardinality = getAttributeCardinality(attribute);
|
|
296
|
-
const operators = suppressed ? [] : getRawFilterOperators(attribute);
|
|
297
|
-
const filterable = operators.length > 0 && !suppressed;
|
|
298
|
-
const searchable = !suppressed && SEARCHABLE_TYPES.has(attribute.type);
|
|
299
|
-
const sortable = !suppressed && SORTABLE_TYPES.has(attribute.type);
|
|
300
|
-
const groupable = !suppressed && isGroupableType(attribute.type);
|
|
301
|
-
const kanbanGroupable = !suppressed && attribute.type === "status";
|
|
302
|
-
const managed = isManagedSystemAttribute(attribute);
|
|
303
|
-
const readOnly = computed || document2 || managed;
|
|
304
|
-
const editable = !(suppressed || readOnly);
|
|
305
|
-
const required = isRequiredForbidden(attribute.type) ? "forbidden" : "allowed";
|
|
306
|
-
const defaultValue = getDefaultValueCapability(attribute.type);
|
|
307
|
-
const maxItems = supportsMaxItems(attribute);
|
|
308
|
-
const placeholder = PLACEHOLDER_TYPES.has(attribute.type);
|
|
309
|
-
const warningWhenDeprecated = Boolean(attribute.deprecated && !suppressed);
|
|
310
|
-
const editMode = resolveEditMode(attribute);
|
|
311
|
-
return {
|
|
312
|
-
lifecycle: {
|
|
313
|
-
active,
|
|
314
|
-
deprecated: Boolean(attribute.deprecated),
|
|
315
|
-
visibleInArchitect: true,
|
|
316
|
-
visibleInRuntime: !suppressed,
|
|
317
|
-
warningWhenDeprecated
|
|
318
|
-
},
|
|
319
|
-
storage: {
|
|
320
|
-
mode: computed ? "computed" : edgeBacked ? "edge" : "value",
|
|
321
|
-
cardinality,
|
|
322
|
-
edgeBacked,
|
|
323
|
-
preservesExistingValues: Boolean(attribute.archived),
|
|
324
|
-
qualifiedProperties: supportsQualifiedProperties(attribute.type),
|
|
325
|
-
polymorphic: getPolymorphicCapability(attribute),
|
|
326
|
-
maxItems
|
|
327
|
-
},
|
|
328
|
-
authoring: {
|
|
329
|
-
editable,
|
|
330
|
-
readOnly,
|
|
331
|
-
directEdit: editable && editMode === "inline",
|
|
332
|
-
required,
|
|
333
|
-
defaultValue,
|
|
334
|
-
placeholder,
|
|
335
|
-
maxItems
|
|
336
|
-
},
|
|
337
|
-
presentation: {
|
|
338
|
-
formField: !suppressed && isFormFieldType(attribute.type),
|
|
339
|
-
tableCell: !suppressed && isTableCellType(attribute.type),
|
|
340
|
-
defaultColumn: !suppressed && isDefaultColumnType(attribute.type),
|
|
341
|
-
compactDisplay: !suppressed,
|
|
342
|
-
popoverEditor: !suppressed && editMode === "popover",
|
|
343
|
-
placeholder,
|
|
344
|
-
warningWhenDeprecated
|
|
345
|
-
},
|
|
346
|
-
query: {
|
|
347
|
-
filterable,
|
|
348
|
-
searchable,
|
|
349
|
-
sortable,
|
|
350
|
-
groupable,
|
|
351
|
-
kanbanGroupable,
|
|
352
|
-
operators
|
|
353
|
-
},
|
|
354
|
-
agent: {
|
|
355
|
-
readable: !suppressed,
|
|
356
|
-
writable: editable && !document2,
|
|
357
|
-
compactReadable: !suppressed,
|
|
358
|
-
contentReadable: !suppressed && isContentReadableType(attribute.type),
|
|
359
|
-
requiresDedicatedTool: document2
|
|
360
|
-
},
|
|
361
|
-
exchange: {
|
|
362
|
-
importable: !suppressed,
|
|
363
|
-
exportable: !suppressed,
|
|
364
|
-
schemaExportable: true,
|
|
365
|
-
metadataExportable: false
|
|
366
|
-
}
|
|
367
|
-
};
|
|
368
|
-
}
|
|
369
|
-
function getAttributeFilterOperators(attribute) {
|
|
370
|
-
return getAttributeCapabilities(attribute).query.operators;
|
|
371
|
-
}
|
|
372
|
-
function isAttributeFilterable(attribute) {
|
|
373
|
-
return getAttributeCapabilities(attribute).query.filterable;
|
|
374
|
-
}
|
|
375
|
-
function isAttributeSearchable(attribute) {
|
|
376
|
-
return getAttributeCapabilities(attribute).query.searchable;
|
|
377
|
-
}
|
|
378
|
-
function isAttributeSortable(attribute) {
|
|
379
|
-
return getAttributeCapabilities(attribute).query.sortable;
|
|
380
|
-
}
|
|
381
|
-
function isAttributeGroupable(attribute) {
|
|
382
|
-
return getAttributeCapabilities(attribute).query.groupable;
|
|
383
|
-
}
|
|
384
|
-
function isAttributeKanbanGroupable(attribute) {
|
|
385
|
-
return getAttributeCapabilities(attribute).query.kanbanGroupable;
|
|
386
|
-
}
|
|
387
|
-
function getRollupFilterOperators(attr) {
|
|
388
|
-
const fn = attr.function;
|
|
389
|
-
if (fn === "earliest" || fn === "latest") {
|
|
390
|
-
return ATTRIBUTE_FILTER_OPERATORS.date;
|
|
391
|
-
}
|
|
392
|
-
if (fn === "original") {
|
|
393
|
-
const targetType = attr.targetAttributeType;
|
|
394
|
-
if (targetType && hasFilterOperatorEntry(targetType)) {
|
|
395
|
-
return ATTRIBUTE_FILTER_OPERATORS[targetType];
|
|
396
|
-
}
|
|
397
|
-
return ATTRIBUTE_FILTER_OPERATORS.number;
|
|
398
|
-
}
|
|
399
|
-
return ATTRIBUTE_FILTER_OPERATORS.number;
|
|
400
|
-
}
|
|
401
|
-
function getRawFilterOperators(attribute) {
|
|
402
|
-
if (attribute.type === "rollup") {
|
|
403
|
-
return getRollupFilterOperators(attribute);
|
|
404
|
-
}
|
|
405
|
-
return ATTRIBUTE_FILTER_OPERATORS[attribute.type] ?? [];
|
|
406
|
-
}
|
|
407
|
-
function getAttributeCardinality(attribute) {
|
|
408
|
-
if (attribute.type === "multiselect" || attribute.type === "document") return "many";
|
|
409
|
-
if (attribute.type === "user" && attribute.multiple === true) return "many";
|
|
410
|
-
if (attribute.type === "relation") return attribute.cardinality === "many" ? "many" : "one";
|
|
411
|
-
return "one";
|
|
412
|
-
}
|
|
413
|
-
function getPolymorphicCapability(attribute) {
|
|
414
|
-
if (attribute.type !== "relation") return "none";
|
|
415
|
-
const relation2 = attribute;
|
|
416
|
-
const targets = relation2.targets ?? [];
|
|
417
|
-
if (targets.length === 1 && targets[0]?.object === "*") return "internal";
|
|
418
|
-
return targets.length > 1 ? "code-only" : "none";
|
|
419
|
-
}
|
|
420
|
-
function supportsMaxItems(attribute) {
|
|
421
|
-
if (attribute.type === "multiselect") return true;
|
|
422
|
-
if (attribute.type === "relation") return attribute.cardinality === "many";
|
|
423
|
-
return false;
|
|
424
|
-
}
|
|
425
|
-
function supportsQualifiedProperties(type) {
|
|
426
|
-
return type === "relation" || type === "document";
|
|
427
|
-
}
|
|
428
|
-
function isRequiredForbidden(type) {
|
|
429
|
-
return type === "checkbox" || type === "formula" || type === "rollup";
|
|
430
|
-
}
|
|
431
|
-
function getDefaultValueCapability(type) {
|
|
432
|
-
if (type === "checkbox") return "automatic";
|
|
433
|
-
if (type === "formula" || type === "rollup") return "forbidden";
|
|
434
|
-
if (STATIC_DEFAULT_TYPES.has(type)) return "static";
|
|
435
|
-
return "forbidden";
|
|
436
|
-
}
|
|
437
|
-
function isDefaultColumnType(type) {
|
|
438
|
-
return isTableCellType(type);
|
|
439
|
-
}
|
|
440
|
-
function isTableCellType(type) {
|
|
441
|
-
return type !== "richtext" && type !== "document";
|
|
442
|
-
}
|
|
443
|
-
function isFormFieldType(type) {
|
|
444
|
-
return type !== "richtext";
|
|
445
|
-
}
|
|
446
|
-
function resolveEditMode(attribute) {
|
|
447
|
-
switch (attribute.type) {
|
|
448
|
-
case "checkbox":
|
|
449
|
-
return "inline";
|
|
450
|
-
case "number":
|
|
451
|
-
return attribute.renderAs === "rating" ? "inline" : "default";
|
|
452
|
-
case "select":
|
|
453
|
-
case "multiselect":
|
|
454
|
-
return attribute.renderAs === "badges" ? "inline" : "popover";
|
|
455
|
-
case "status":
|
|
456
|
-
case "relation":
|
|
457
|
-
case "user":
|
|
458
|
-
return "popover";
|
|
459
|
-
default:
|
|
460
|
-
return "default";
|
|
461
|
-
}
|
|
462
|
-
}
|
|
463
|
-
function isGroupableType(type) {
|
|
464
|
-
return type === "status" || type === "currency";
|
|
465
|
-
}
|
|
466
|
-
function isContentReadableType(type) {
|
|
467
|
-
return type === "richtext" || type === "document";
|
|
468
|
-
}
|
|
469
|
-
function hasFilterOperatorEntry(type) {
|
|
470
|
-
return Object.prototype.hasOwnProperty.call(ATTRIBUTE_FILTER_OPERATORS, type);
|
|
471
|
-
}
|
|
472
|
-
|
|
473
72
|
// src/types/attributes.ts
|
|
474
73
|
var RELATION_TARGET_ANY = "*";
|
|
475
74
|
function isUniversalRelation(attr) {
|
|
@@ -482,7 +81,7 @@ function inferInverseCardinality(cardinality) {
|
|
|
482
81
|
return cardinality === "one" ? "many" : "many";
|
|
483
82
|
}
|
|
484
83
|
function isAttributeSortable2(attr) {
|
|
485
|
-
return isAttributeSortable(attr);
|
|
84
|
+
return chunk6ZDH3EJA_js.isAttributeSortable(attr);
|
|
486
85
|
}
|
|
487
86
|
|
|
488
87
|
// src/types/audit.ts
|
|
@@ -490,10 +89,12 @@ var AUDIT_RESOURCE_TYPES = [
|
|
|
490
89
|
"record",
|
|
491
90
|
"object",
|
|
492
91
|
"attribute",
|
|
92
|
+
"view",
|
|
493
93
|
"user",
|
|
494
94
|
"role",
|
|
495
95
|
"settings",
|
|
496
|
-
"file"
|
|
96
|
+
"file",
|
|
97
|
+
"agent"
|
|
497
98
|
];
|
|
498
99
|
var AUDIT_ACTIONS = [
|
|
499
100
|
// Records
|
|
@@ -510,6 +111,10 @@ var AUDIT_ACTIONS = [
|
|
|
510
111
|
"attribute.created",
|
|
511
112
|
"attribute.updated",
|
|
512
113
|
"attribute.deleted",
|
|
114
|
+
// Schema - Views
|
|
115
|
+
"view.created",
|
|
116
|
+
"view.updated",
|
|
117
|
+
"view.deleted",
|
|
513
118
|
// Users
|
|
514
119
|
"user.created",
|
|
515
120
|
"user.invited",
|
|
@@ -531,6 +136,32 @@ var AUDIT_ACTIONS = [
|
|
|
531
136
|
"file.deleted"
|
|
532
137
|
];
|
|
533
138
|
|
|
139
|
+
// src/types/agent.ts
|
|
140
|
+
var SESSION_TERMINAL_STATUSES = [
|
|
141
|
+
"completed",
|
|
142
|
+
"failed",
|
|
143
|
+
"cancelled",
|
|
144
|
+
"timeout",
|
|
145
|
+
"expired"
|
|
146
|
+
];
|
|
147
|
+
function isTerminalSessionStatus(status2) {
|
|
148
|
+
return SESSION_TERMINAL_STATUSES.includes(status2);
|
|
149
|
+
}
|
|
150
|
+
var DEFAULT_APPROVAL_POLICY = Object.freeze({
|
|
151
|
+
mutation: "ask",
|
|
152
|
+
destructive: "ask",
|
|
153
|
+
outward: "ask"
|
|
154
|
+
});
|
|
155
|
+
var TODO_PLAN_STATUSES = ["active", "completed", "promoted", "abandoned"];
|
|
156
|
+
function agentDisplayName(agent2) {
|
|
157
|
+
return agent2.label?.trim() || agent2.name;
|
|
158
|
+
}
|
|
159
|
+
var TODO_STATUSES = ["pending", "in_progress", "completed", "blocked"];
|
|
160
|
+
var MAX_TODOS = 50;
|
|
161
|
+
var MAX_TODO_ID_CHARS = 80;
|
|
162
|
+
var MAX_TODO_DESCRIPTION_CHARS = 500;
|
|
163
|
+
var MAX_TODO_RESULT_CHARS = 2e3;
|
|
164
|
+
|
|
534
165
|
// src/types/document-layout.ts
|
|
535
166
|
var MAX_PRESET_DEPTH = 5;
|
|
536
167
|
|
|
@@ -546,21 +177,6 @@ function getErrorMessage(error) {
|
|
|
546
177
|
return String(error);
|
|
547
178
|
}
|
|
548
179
|
|
|
549
|
-
// src/types/filters.ts
|
|
550
|
-
var OPERATORS_BY_TYPE = ATTRIBUTE_FILTER_OPERATORS;
|
|
551
|
-
var NO_VALUE_OPERATORS = [
|
|
552
|
-
"is_empty",
|
|
553
|
-
"is_not_empty",
|
|
554
|
-
"is_checked",
|
|
555
|
-
"is_not_checked"
|
|
556
|
-
];
|
|
557
|
-
function isNoValueOperator(operator) {
|
|
558
|
-
return NO_VALUE_OPERATORS.includes(operator);
|
|
559
|
-
}
|
|
560
|
-
function getRollupFilterOperators2(attr) {
|
|
561
|
-
return getRollupFilterOperators(attr);
|
|
562
|
-
}
|
|
563
|
-
|
|
564
180
|
// src/types/forms/definition.ts
|
|
565
181
|
function isFormDefinition(obj) {
|
|
566
182
|
return typeof obj === "object" && obj !== null && "slots" in obj && "steps" in obj && "name" in obj && typeof obj.name === "string" && Array.isArray(obj.slots) && Array.isArray(obj.steps);
|
|
@@ -613,29 +229,6 @@ var NoopGeocodingAdapter = class {
|
|
|
613
229
|
}
|
|
614
230
|
};
|
|
615
231
|
|
|
616
|
-
// src/types/objects.ts
|
|
617
|
-
var SYSTEM_FIELD_NAMES = [
|
|
618
|
-
"id",
|
|
619
|
-
"createdAt",
|
|
620
|
-
"updatedAt",
|
|
621
|
-
"createdBy",
|
|
622
|
-
"lastUpdatedBy"
|
|
623
|
-
];
|
|
624
|
-
var RESERVED_ATTRIBUTE_NAMES = [
|
|
625
|
-
// System fields (auto-managed)
|
|
626
|
-
...SYSTEM_FIELD_NAMES,
|
|
627
|
-
// Other ObjectRecord properties
|
|
628
|
-
"objectId",
|
|
629
|
-
"label",
|
|
630
|
-
"embeddingText",
|
|
631
|
-
"values",
|
|
632
|
-
"metadata",
|
|
633
|
-
"deletedAt",
|
|
634
|
-
"deletedBy",
|
|
635
|
-
"schemaVersion"
|
|
636
|
-
];
|
|
637
|
-
var RESERVED_OBJECT_NAMES = ["skill"];
|
|
638
|
-
|
|
639
232
|
// src/types/permissions.ts
|
|
640
233
|
var ALL_ACTIONS = ["read", "create", "update", "delete", "manage"];
|
|
641
234
|
function actionsToAccessLevel(actions) {
|
|
@@ -671,6 +264,11 @@ function hasOptions(attr) {
|
|
|
671
264
|
// src/types/user-profiles.ts
|
|
672
265
|
var USER_STATUSES = ["active", "suspended"];
|
|
673
266
|
|
|
267
|
+
// src/types/schema-state.ts
|
|
268
|
+
function viewStateKey(view) {
|
|
269
|
+
return `${view.object}:${view.name}:${view.type}`;
|
|
270
|
+
}
|
|
271
|
+
|
|
674
272
|
// src/types/views.ts
|
|
675
273
|
function isDetailView(view) {
|
|
676
274
|
return view.type === "detail";
|
|
@@ -679,12 +277,15 @@ function isListView(view) {
|
|
|
679
277
|
return view.type === "list";
|
|
680
278
|
}
|
|
681
279
|
function isFieldGroup(group2) {
|
|
682
|
-
return
|
|
280
|
+
return group2.type === "fields";
|
|
683
281
|
}
|
|
684
282
|
function isRelationGroup(group2) {
|
|
685
283
|
return group2.type === "relation";
|
|
686
284
|
}
|
|
687
285
|
|
|
286
|
+
// src/types/pagination.ts
|
|
287
|
+
var ESTIMATED_COUNT_CAP = 1e4;
|
|
288
|
+
|
|
688
289
|
// src/lib/object-helpers.ts
|
|
689
290
|
function isEmptyObject(obj) {
|
|
690
291
|
if (obj === null || obj === void 0) {
|
|
@@ -702,6 +303,21 @@ function toUndefinedIfEmpty(obj) {
|
|
|
702
303
|
return isNotEmpty(obj) ? obj : void 0;
|
|
703
304
|
}
|
|
704
305
|
|
|
306
|
+
// src/lib/byte-size.ts
|
|
307
|
+
var MAX_UNIT_INDEX = 4;
|
|
308
|
+
function computeByteMagnitude(bytes) {
|
|
309
|
+
if (bytes <= 0) return { value: 0, unitIndex: 0 };
|
|
310
|
+
const k = 1e3;
|
|
311
|
+
const unitIndex = Math.min(MAX_UNIT_INDEX, Math.floor(Math.log(bytes) / Math.log(k)));
|
|
312
|
+
const value = Number.parseFloat((bytes / k ** unitIndex).toFixed(1));
|
|
313
|
+
return { value, unitIndex };
|
|
314
|
+
}
|
|
315
|
+
var BYTE_UNIT_LABELS = ["B", "KB", "MB", "GB", "TB"];
|
|
316
|
+
function formatByteSize(bytes) {
|
|
317
|
+
const { value, unitIndex } = computeByteMagnitude(bytes);
|
|
318
|
+
return `${value} ${BYTE_UNIT_LABELS[unitIndex]}`;
|
|
319
|
+
}
|
|
320
|
+
|
|
705
321
|
// src/lib/document-attribute.ts
|
|
706
322
|
var DOCUMENT_SYSTEM_ATTRIBUTES = {
|
|
707
323
|
ATTACHMENTS: "attachments"
|
|
@@ -709,13 +325,13 @@ var DOCUMENT_SYSTEM_ATTRIBUTES = {
|
|
|
709
325
|
function isDocumentAttribute(attr) {
|
|
710
326
|
return attr.type === "document";
|
|
711
327
|
}
|
|
712
|
-
function
|
|
713
|
-
if (!
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
return
|
|
328
|
+
function matchesAccepts(file, accepts) {
|
|
329
|
+
if (!accepts || accepts.length === 0) return true;
|
|
330
|
+
const name = file.name.toLowerCase();
|
|
331
|
+
return accepts.some((pattern) => {
|
|
332
|
+
if (pattern.endsWith("/*")) return file.mimeType.startsWith(pattern.slice(0, -1));
|
|
333
|
+
if (pattern.startsWith(".")) return name.endsWith(pattern.toLowerCase());
|
|
334
|
+
return file.mimeType === pattern;
|
|
719
335
|
});
|
|
720
336
|
}
|
|
721
337
|
|
|
@@ -845,7 +461,7 @@ function formatPhone(value) {
|
|
|
845
461
|
if (!("phoneNumber" in phone2)) return String(value);
|
|
846
462
|
if (!phone2.phoneNumber) return "";
|
|
847
463
|
if (!phone2.countryCode) return phone2.phoneNumber;
|
|
848
|
-
return
|
|
464
|
+
return chunkQ4SZAMJT_js.formatPhoneForDisplay(phone2);
|
|
849
465
|
}
|
|
850
466
|
function formatLocationValue(location2, granularity = "full") {
|
|
851
467
|
if (typeof location2 !== "object" || location2 === null) return "";
|
|
@@ -945,7 +561,7 @@ function formatAttributeValue(value, attribute) {
|
|
|
945
561
|
var SIMPLE_PIPES = ["UPPER", "LOWER", "capitalize", "trim"];
|
|
946
562
|
var PIPES_WITH_ARGS = ["prefix", "suffix", "wrap", "default"];
|
|
947
563
|
var ALL_PIPES = [...SIMPLE_PIPES, ...PIPES_WITH_ARGS];
|
|
948
|
-
var labelExpressionSchema =
|
|
564
|
+
var labelExpressionSchema = z2.z.string().min(1, "labelExpression cannot be empty").refine((val) => isLabelExpression(val), {
|
|
949
565
|
message: "labelExpression must contain at least one {{ attribute }} interpolation"
|
|
950
566
|
}).refine(
|
|
951
567
|
(val) => {
|
|
@@ -969,6 +585,19 @@ var labelExpressionSchema = z3.z.string().min(1, "labelExpression cannot be empt
|
|
|
969
585
|
message: `Invalid pipe name. Valid pipes: ${ALL_PIPES.join(", ")}`
|
|
970
586
|
}
|
|
971
587
|
);
|
|
588
|
+
function validateLabelExpression(expression) {
|
|
589
|
+
const result = labelExpressionSchema.safeParse(expression);
|
|
590
|
+
if (!result.success) {
|
|
591
|
+
return {
|
|
592
|
+
success: false,
|
|
593
|
+
error: result.error.issues[0]?.message ?? "Invalid labelExpression"
|
|
594
|
+
};
|
|
595
|
+
}
|
|
596
|
+
return {
|
|
597
|
+
success: true,
|
|
598
|
+
attributes: extractAttributeNames(expression)
|
|
599
|
+
};
|
|
600
|
+
}
|
|
972
601
|
var simplePipes = {
|
|
973
602
|
/** Convert to uppercase */
|
|
974
603
|
UPPER: (v) => String(v).toUpperCase(),
|
|
@@ -1127,6 +756,13 @@ function getUserDisplayName(user2) {
|
|
|
1127
756
|
return user2.email?.split("@")[0] ?? "";
|
|
1128
757
|
}
|
|
1129
758
|
|
|
759
|
+
// src/lib/record-creator.ts
|
|
760
|
+
var RECORD_CREATOR_ROOT_ACTOR_METADATA_KEY = "__creatorRootActorId";
|
|
761
|
+
function getRecordCreatorPrincipalId(record) {
|
|
762
|
+
const creatorRootActorId = record.metadata?.[RECORD_CREATOR_ROOT_ACTOR_METADATA_KEY];
|
|
763
|
+
return typeof creatorRootActorId === "string" && creatorRootActorId.length > 0 ? creatorRootActorId : record.createdBy;
|
|
764
|
+
}
|
|
765
|
+
|
|
1130
766
|
// src/constants/attribute-columns.ts
|
|
1131
767
|
var DB_COLUMN_FIELDS = /* @__PURE__ */ new Set([
|
|
1132
768
|
"id",
|
|
@@ -1204,17 +840,25 @@ var DEFAULT_ROLES = {
|
|
|
1204
840
|
/** Standard user - can work with business data and view people */
|
|
1205
841
|
MEMBER: "member",
|
|
1206
842
|
/** Default role for agent actors - CRUD on records + documents/files */
|
|
1207
|
-
AGENT_DEFAULT: "agent_default"
|
|
843
|
+
AGENT_DEFAULT: "agent_default",
|
|
844
|
+
/**
|
|
845
|
+
* Default role for reflex actors — deliberately NO record access (D22).
|
|
846
|
+
* An agent is interactive, watched, and acts once; a reflex is unattended and
|
|
847
|
+
* repeats. Real access is a per-reflex role derived from its first rehearsal.
|
|
848
|
+
*/
|
|
849
|
+
REFLEX_DEFAULT: "reflex_default"
|
|
1208
850
|
};
|
|
1209
851
|
var DEFAULT_ROLE_LABELS = {
|
|
1210
852
|
owner: "Owner",
|
|
1211
853
|
member: "Member",
|
|
1212
|
-
agent_default: "Agent Default"
|
|
854
|
+
agent_default: "Agent Default",
|
|
855
|
+
reflex_default: "Reflex Default"
|
|
1213
856
|
};
|
|
1214
857
|
var DEFAULT_ROLE_DESCRIPTIONS = {
|
|
1215
858
|
owner: "Full access to all platform features and data",
|
|
1216
859
|
member: "Can view, create, edit and delete business data",
|
|
1217
|
-
agent_default: "Default role for AI agents \u2014 CRUD on records plus documents and files"
|
|
860
|
+
agent_default: "Default role for AI agents \u2014 CRUD on records plus documents and files",
|
|
861
|
+
reflex_default: "Default role for reflexes \u2014 no data access; each reflex is granted exactly what its rehearsal showed it uses"
|
|
1218
862
|
};
|
|
1219
863
|
var ALL_ACTIONS2 = ["read", "create", "update", "delete", "manage"];
|
|
1220
864
|
var MEMBER_CONNECTOR_ACTIONS = ["read", "create", "delete"];
|
|
@@ -1244,6 +888,13 @@ var DEFAULT_ROLE_PERMISSIONS = {
|
|
|
1244
888
|
{ target: "session", actions: ["observe"] }
|
|
1245
889
|
],
|
|
1246
890
|
object: [{ target: "*", actions: ["read", "create", "update", "delete"] }]
|
|
891
|
+
},
|
|
892
|
+
reflex_default: {
|
|
893
|
+
// Intentionally empty (D22): a reflex starts with no access at all. Real
|
|
894
|
+
// access is a per-reflex role derived from its first rehearsal, not a
|
|
895
|
+
// shared default.
|
|
896
|
+
system: [],
|
|
897
|
+
object: []
|
|
1247
898
|
}
|
|
1248
899
|
};
|
|
1249
900
|
function isDefaultRole(roleName) {
|
|
@@ -1253,6 +904,19 @@ var VALID_ICONS = new Set(constants.ICONS);
|
|
|
1253
904
|
var ATTRIBUTE_NAME_REGEX = /^[a-zA-Z_][a-zA-Z0-9_]*$/;
|
|
1254
905
|
var MAX_NAME_LENGTH = 63;
|
|
1255
906
|
var MAX_LABEL_LENGTH = 128;
|
|
907
|
+
var OBJECT_NAME_SCHEMA = z2__default.default.string().min(1, "Object name cannot be empty").max(63, "Object name is too long (max 63 characters)").regex(/^[a-z][a-z0-9-]*$/, {
|
|
908
|
+
message: "Invalid object name format.\nName must be in kebab-case (slug format):\n \u2705 Valid: 'products', 'user-profiles', 'order-items'\n \u274C Invalid: 'Products', 'userProfiles', 'user_profiles'"
|
|
909
|
+
});
|
|
910
|
+
function validateObjectName(name) {
|
|
911
|
+
try {
|
|
912
|
+
OBJECT_NAME_SCHEMA.parse(name);
|
|
913
|
+
} catch (error) {
|
|
914
|
+
if (error instanceof z2__default.default.ZodError) {
|
|
915
|
+
throw new chunkFDIAOFHS_js.SchemaError(error.issues[0].message, chunkFDIAOFHS_js.SchemaErrorCode.INVALID_OBJECT_NAME);
|
|
916
|
+
}
|
|
917
|
+
throw error;
|
|
918
|
+
}
|
|
919
|
+
}
|
|
1256
920
|
function assertUniqueBy(items, getKey, buildError) {
|
|
1257
921
|
const seen = /* @__PURE__ */ new Set();
|
|
1258
922
|
for (const item of items) {
|
|
@@ -1277,10 +941,10 @@ function validateAttributeName(name) {
|
|
|
1277
941
|
"[AttributeBuilder] Invalid attribute name format.\nName must be a valid variable identifier:\n \u2705 Valid: 'firstName', 'first_name', 'FirstName', 'FIRST_NAME'\n \u274C Invalid: 'first-name', 'first name', '123name', 'first.name'"
|
|
1278
942
|
);
|
|
1279
943
|
}
|
|
1280
|
-
if (RESERVED_ATTRIBUTE_NAMES.includes(name)) {
|
|
944
|
+
if (chunk6ZDH3EJA_js.RESERVED_ATTRIBUTE_NAMES.includes(name)) {
|
|
1281
945
|
throw new Error(
|
|
1282
946
|
`[AttributeBuilder] "${name}" is a reserved name and cannot be used as an attribute name.
|
|
1283
|
-
Reserved names: ${RESERVED_ATTRIBUTE_NAMES.join(", ")}`
|
|
947
|
+
Reserved names: ${chunk6ZDH3EJA_js.RESERVED_ATTRIBUTE_NAMES.join(", ")}`
|
|
1284
948
|
);
|
|
1285
949
|
}
|
|
1286
950
|
}
|
|
@@ -1347,14 +1011,30 @@ var DEFAULT_AGENT_EXECUTION_CONFIG = {
|
|
|
1347
1011
|
var AgentBuilder = class {
|
|
1348
1012
|
constructor(config) {
|
|
1349
1013
|
if (!config.name || config.name.trim().length === 0) {
|
|
1350
|
-
throw new
|
|
1014
|
+
throw new chunkFDIAOFHS_js.ValidationError("Agent name is required", []);
|
|
1351
1015
|
}
|
|
1352
|
-
this.bp = { name: config.name, system: true, triggers: [] };
|
|
1016
|
+
this.bp = { name: config.name, system: true, visibility: "workspace", triggers: [] };
|
|
1353
1017
|
}
|
|
1354
1018
|
description(value) {
|
|
1355
1019
|
this.bp.description = value;
|
|
1356
1020
|
return this;
|
|
1357
1021
|
}
|
|
1022
|
+
/**
|
|
1023
|
+
* Display text shown wherever this agent's identity is rendered in the
|
|
1024
|
+
* UI — a separate concern from `name` (the stable identity the boot sync
|
|
1025
|
+
* matches rows on). Falls back to `name` when never called.
|
|
1026
|
+
*
|
|
1027
|
+
* @example
|
|
1028
|
+
* ```typescript
|
|
1029
|
+
* agent({ name: "architecte" })
|
|
1030
|
+
* .label("Architecte")
|
|
1031
|
+
* // ...
|
|
1032
|
+
* ```
|
|
1033
|
+
*/
|
|
1034
|
+
label(value) {
|
|
1035
|
+
this.bp.label = value;
|
|
1036
|
+
return this;
|
|
1037
|
+
}
|
|
1358
1038
|
icon(value) {
|
|
1359
1039
|
this.bp.icon = value;
|
|
1360
1040
|
return this;
|
|
@@ -1393,6 +1073,32 @@ var AgentBuilder = class {
|
|
|
1393
1073
|
Object.assign(this.bp, value);
|
|
1394
1074
|
return this;
|
|
1395
1075
|
}
|
|
1076
|
+
approval(value) {
|
|
1077
|
+
this.bp.approval = { ...DEFAULT_APPROVAL_POLICY, ...this.bp.approval, ...value };
|
|
1078
|
+
return this;
|
|
1079
|
+
}
|
|
1080
|
+
/** Runtime-agent visibility. Code-declared system agents must stay workspace-visible. */
|
|
1081
|
+
visibility(value) {
|
|
1082
|
+
this.bp.visibility = value;
|
|
1083
|
+
return this;
|
|
1084
|
+
}
|
|
1085
|
+
/**
|
|
1086
|
+
* Gate this agent behind a system permission: an actor lacking `action` on
|
|
1087
|
+
* `resource` never sees it in the agent list and cannot open a session
|
|
1088
|
+
* against it. Reuses the same permission vocabulary that guards the
|
|
1089
|
+
* matching HTTP surface — do not invent a new resource/action pair.
|
|
1090
|
+
*
|
|
1091
|
+
* @example
|
|
1092
|
+
* ```typescript
|
|
1093
|
+
* agent({ name: "architecte" })
|
|
1094
|
+
* .requiresPermission("architect", "update")
|
|
1095
|
+
* // ...
|
|
1096
|
+
* ```
|
|
1097
|
+
*/
|
|
1098
|
+
requiresPermission(resource, action) {
|
|
1099
|
+
this.bp.requiredPermission = { resource, action };
|
|
1100
|
+
return this;
|
|
1101
|
+
}
|
|
1396
1102
|
/**
|
|
1397
1103
|
* Declare a trigger. `name` is the stable identity the boot sync uses to
|
|
1398
1104
|
* reconcile trigger rows; `enabled` defaults to true.
|
|
@@ -1420,18 +1126,25 @@ var AgentBuilder = class {
|
|
|
1420
1126
|
}
|
|
1421
1127
|
build() {
|
|
1422
1128
|
if (!this.bp.systemPrompt) {
|
|
1423
|
-
throw new
|
|
1129
|
+
throw new chunkFDIAOFHS_js.ValidationError(`Agent "${this.bp.name}": systemPrompt is required`, []);
|
|
1424
1130
|
}
|
|
1425
1131
|
if (!this.bp.model) {
|
|
1426
|
-
throw new
|
|
1132
|
+
throw new chunkFDIAOFHS_js.ValidationError(`Agent "${this.bp.name}": model is required`, []);
|
|
1133
|
+
}
|
|
1134
|
+
if (this.bp.system && this.bp.visibility === "private") {
|
|
1135
|
+
throw new chunkFDIAOFHS_js.ValidationError(
|
|
1136
|
+
`Agent "${this.bp.name}": system agents must use workspace visibility`,
|
|
1137
|
+
[]
|
|
1138
|
+
);
|
|
1427
1139
|
}
|
|
1428
1140
|
assertUniqueBy(
|
|
1429
1141
|
this.bp.triggers,
|
|
1430
1142
|
(t) => t.name,
|
|
1431
|
-
(name) => new
|
|
1143
|
+
(name) => new chunkFDIAOFHS_js.ValidationError(`Agent "${this.bp.name}": duplicate trigger name "${name}"`, [])
|
|
1432
1144
|
);
|
|
1433
1145
|
return {
|
|
1434
1146
|
...this.bp,
|
|
1147
|
+
visibility: this.bp.visibility ?? "workspace",
|
|
1435
1148
|
config: this.bp.config ?? DEFAULT_AGENT_EXECUTION_CONFIG,
|
|
1436
1149
|
systemPrompt: this.bp.systemPrompt,
|
|
1437
1150
|
model: this.bp.model
|
|
@@ -1482,7 +1195,7 @@ var BaseAttributeBuilder = class {
|
|
|
1482
1195
|
* @see https://standardschema.dev/
|
|
1483
1196
|
*/
|
|
1484
1197
|
get "~standard"() {
|
|
1485
|
-
const zodSchema =
|
|
1198
|
+
const zodSchema = chunkV6Q7HCA7_js.createAttributeValidator(this.build());
|
|
1486
1199
|
return createStandardSchemaProps(zodSchema);
|
|
1487
1200
|
}
|
|
1488
1201
|
constructor(type, name, label) {
|
|
@@ -1603,6 +1316,7 @@ var TextAttributeBuilder = class extends BaseAttributeBuilder {
|
|
|
1603
1316
|
}
|
|
1604
1317
|
pattern(value) {
|
|
1605
1318
|
this.attr.pattern = value;
|
|
1319
|
+
this.attr.format = void 0;
|
|
1606
1320
|
return this;
|
|
1607
1321
|
}
|
|
1608
1322
|
multiline(value = true) {
|
|
@@ -1621,21 +1335,24 @@ var TextAttributeBuilder = class extends BaseAttributeBuilder {
|
|
|
1621
1335
|
* Set email validation pattern
|
|
1622
1336
|
*/
|
|
1623
1337
|
email() {
|
|
1624
|
-
this.attr.
|
|
1338
|
+
this.attr.format = "email";
|
|
1339
|
+
this.attr.pattern = void 0;
|
|
1625
1340
|
return this;
|
|
1626
1341
|
}
|
|
1627
1342
|
/**
|
|
1628
1343
|
* Set URL validation pattern
|
|
1629
1344
|
*/
|
|
1630
1345
|
url() {
|
|
1631
|
-
this.attr.
|
|
1346
|
+
this.attr.format = "url";
|
|
1347
|
+
this.attr.pattern = void 0;
|
|
1632
1348
|
return this;
|
|
1633
1349
|
}
|
|
1634
1350
|
/**
|
|
1635
1351
|
* Set slug validation pattern
|
|
1636
1352
|
*/
|
|
1637
1353
|
slug() {
|
|
1638
|
-
this.attr.
|
|
1354
|
+
this.attr.format = "slug";
|
|
1355
|
+
this.attr.pattern = void 0;
|
|
1639
1356
|
return this;
|
|
1640
1357
|
}
|
|
1641
1358
|
};
|
|
@@ -2225,9 +1942,9 @@ var RollupAttributeBuilder = class extends BaseAttributeBuilder {
|
|
|
2225
1942
|
if (fn === "original" && targetType !== void 0 && targetType !== "select" && targetType !== "status" && targetType !== "multiselect") {
|
|
2226
1943
|
const relation2 = this.attr.relationAttribute ?? "relation";
|
|
2227
1944
|
const target = this.attr.targetAttribute ?? "field";
|
|
2228
|
-
throw new
|
|
1945
|
+
throw new chunkFDIAOFHS_js.SchemaError(
|
|
2229
1946
|
`Rollup "${this.attr.name}": .using("original") only supports a "select", "status", or "multiselect" target, but .targetType("${targetType}") was given. To surface a plain ${targetType} value from a related record, use a formula instead \u2014 e.g. formula({ name: "${this.attr.name}", label: "\u2026" }).expression("${relation2}.${target}").`,
|
|
2230
|
-
|
|
1947
|
+
chunkFDIAOFHS_js.SchemaErrorCode.VALIDATION_FAILED
|
|
2231
1948
|
);
|
|
2232
1949
|
}
|
|
2233
1950
|
return super.build();
|
|
@@ -2505,13 +2222,13 @@ var FormBuilder = class {
|
|
|
2505
2222
|
return this;
|
|
2506
2223
|
}
|
|
2507
2224
|
validateName(name) {
|
|
2508
|
-
const schema =
|
|
2225
|
+
const schema = z2.z.string().min(1, "Form name cannot be empty").max(63, "Form name is too long (max 63 characters)").regex(/^[a-z0-9]+(-[a-z0-9]+)*$/, {
|
|
2509
2226
|
message: "Invalid form name format. Name must be in kebab-case: 'client-onboarding', 'contact-creation'"
|
|
2510
2227
|
});
|
|
2511
2228
|
try {
|
|
2512
2229
|
schema.parse(name);
|
|
2513
2230
|
} catch (error) {
|
|
2514
|
-
if (error instanceof
|
|
2231
|
+
if (error instanceof z2.z.ZodError) {
|
|
2515
2232
|
throw new Error(`[FormBuilder] ${error.issues[0].message}`);
|
|
2516
2233
|
}
|
|
2517
2234
|
throw error;
|
|
@@ -2737,7 +2454,7 @@ var ObjectBuilder = class {
|
|
|
2737
2454
|
* @see https://standardschema.dev/
|
|
2738
2455
|
*/
|
|
2739
2456
|
get "~standard"() {
|
|
2740
|
-
const zodSchema =
|
|
2457
|
+
const zodSchema = chunkV6Q7HCA7_js.createObjectValidator(this.build());
|
|
2741
2458
|
return createStandardSchemaProps(zodSchema);
|
|
2742
2459
|
}
|
|
2743
2460
|
/**
|
|
@@ -2951,26 +2668,26 @@ var ObjectBuilder = class {
|
|
|
2951
2668
|
throw new Error("[ObjectBuilder] Missing required field: label");
|
|
2952
2669
|
}
|
|
2953
2670
|
if (!this._labelExpression) {
|
|
2954
|
-
throw new
|
|
2671
|
+
throw new chunkFDIAOFHS_js.SchemaError(
|
|
2955
2672
|
`Object "${this.obj.name}" must have a labelExpression. The labelExpression defines how records are displayed in lists and relations (e.g. "{{ name }}").`,
|
|
2956
|
-
|
|
2673
|
+
chunkFDIAOFHS_js.SchemaErrorCode.VALIDATION_FAILED
|
|
2957
2674
|
);
|
|
2958
2675
|
}
|
|
2959
2676
|
const labelResult = labelExpressionSchema.safeParse(this._labelExpression);
|
|
2960
2677
|
if (!labelResult.success) {
|
|
2961
2678
|
const errorMsg = labelResult.error.issues[0]?.message ?? "Invalid labelExpression";
|
|
2962
|
-
throw new
|
|
2679
|
+
throw new chunkFDIAOFHS_js.SchemaError(
|
|
2963
2680
|
`Invalid labelExpression for "${this.obj.name}": ${errorMsg}`,
|
|
2964
|
-
|
|
2681
|
+
chunkFDIAOFHS_js.SchemaErrorCode.VALIDATION_FAILED
|
|
2965
2682
|
);
|
|
2966
2683
|
}
|
|
2967
2684
|
if (this._embeddingExpression !== void 0) {
|
|
2968
2685
|
const embeddingResult = labelExpressionSchema.safeParse(this._embeddingExpression);
|
|
2969
2686
|
if (!embeddingResult.success) {
|
|
2970
2687
|
const errorMsg = embeddingResult.error.issues[0]?.message ?? "Invalid embeddingExpression";
|
|
2971
|
-
throw new
|
|
2688
|
+
throw new chunkFDIAOFHS_js.SchemaError(
|
|
2972
2689
|
`Invalid embeddingExpression for "${this.obj.name}": ${errorMsg}`,
|
|
2973
|
-
|
|
2690
|
+
chunkFDIAOFHS_js.SchemaErrorCode.VALIDATION_FAILED
|
|
2974
2691
|
);
|
|
2975
2692
|
}
|
|
2976
2693
|
}
|
|
@@ -3004,17 +2721,7 @@ var ObjectBuilder = class {
|
|
|
3004
2721
|
if (name === void 0) {
|
|
3005
2722
|
return;
|
|
3006
2723
|
}
|
|
3007
|
-
|
|
3008
|
-
message: "Invalid object name format.\nName must be in kebab-case (slug format):\n \u2705 Valid: 'products', 'user-profiles', 'order-items'\n \u274C Invalid: 'Products', 'userProfiles', 'user_profiles'"
|
|
3009
|
-
});
|
|
3010
|
-
try {
|
|
3011
|
-
objectNameSchema.parse(name);
|
|
3012
|
-
} catch (error) {
|
|
3013
|
-
if (error instanceof z3__default.default.ZodError) {
|
|
3014
|
-
throw new chunkTS3PJOMZ_js.SchemaError(error.issues[0].message, chunkTS3PJOMZ_js.SchemaErrorCode.INVALID_OBJECT_NAME);
|
|
3015
|
-
}
|
|
3016
|
-
throw error;
|
|
3017
|
-
}
|
|
2724
|
+
validateObjectName(name);
|
|
3018
2725
|
}
|
|
3019
2726
|
};
|
|
3020
2727
|
function object(config) {
|
|
@@ -3022,7 +2729,7 @@ function object(config) {
|
|
|
3022
2729
|
}
|
|
3023
2730
|
function validatePresetStructure(presetId, nodes, depth) {
|
|
3024
2731
|
const fail = (message, detail) => {
|
|
3025
|
-
throw new
|
|
2732
|
+
throw new chunkFDIAOFHS_js.ValidationError(message, [
|
|
3026
2733
|
{ path: ["documentLayout", "presets", presetId], message: detail }
|
|
3027
2734
|
]);
|
|
3028
2735
|
};
|
|
@@ -3049,7 +2756,7 @@ function validatePresetStructure(presetId, nodes, depth) {
|
|
|
3049
2756
|
}
|
|
3050
2757
|
var GroupBuilder = class {
|
|
3051
2758
|
constructor(id, label) {
|
|
3052
|
-
this.data = { fields: [] };
|
|
2759
|
+
this.data = { type: "fields", fields: [] };
|
|
3053
2760
|
this.data.id = id;
|
|
3054
2761
|
this.data.label = label;
|
|
3055
2762
|
}
|
|
@@ -3171,17 +2878,6 @@ var RelationGroupBuilder = class {
|
|
|
3171
2878
|
this.data.allowCreate = value;
|
|
3172
2879
|
return this;
|
|
3173
2880
|
}
|
|
3174
|
-
/**
|
|
3175
|
-
* Enable two-level traversal (through mode).
|
|
3176
|
-
* Parent rows become grouping headers; sub-rows from `attribute` are the primary display.
|
|
3177
|
-
*
|
|
3178
|
-
* @param attribute - Relation attribute on the first-level target object
|
|
3179
|
-
* @example .through("companies") — display companies linked via each member
|
|
3180
|
-
*/
|
|
3181
|
-
through(attribute) {
|
|
3182
|
-
this.data.through = { attribute };
|
|
3183
|
-
return this;
|
|
3184
|
-
}
|
|
3185
2881
|
/**
|
|
3186
2882
|
* Build the relation group definition
|
|
3187
2883
|
*/
|
|
@@ -3199,7 +2895,7 @@ var RelationGroupBuilder = class {
|
|
|
3199
2895
|
}
|
|
3200
2896
|
};
|
|
3201
2897
|
function validateViewName(name, builderName, examples) {
|
|
3202
|
-
const viewNameSchema =
|
|
2898
|
+
const viewNameSchema = z2.z.string().min(1, "View name cannot be empty").max(63, "View name is too long (max 63 characters)").regex(/^[a-z][a-z0-9-]*$/, {
|
|
3203
2899
|
message: `Invalid view name format.
|
|
3204
2900
|
Name must be in kebab-case:
|
|
3205
2901
|
\u2705 Valid: ${examples.valid}
|
|
@@ -3208,7 +2904,7 @@ Name must be in kebab-case:
|
|
|
3208
2904
|
try {
|
|
3209
2905
|
viewNameSchema.parse(name);
|
|
3210
2906
|
} catch (error) {
|
|
3211
|
-
if (error instanceof
|
|
2907
|
+
if (error instanceof z2.z.ZodError) {
|
|
3212
2908
|
throw new Error(`[${builderName}] ${error.issues[0].message}`);
|
|
3213
2909
|
}
|
|
3214
2910
|
throw error;
|
|
@@ -3302,29 +2998,6 @@ var TableTabConfig = class {
|
|
|
3302
2998
|
this.tabData.sorts.push({ attribute, direction });
|
|
3303
2999
|
return this;
|
|
3304
3000
|
}
|
|
3305
|
-
/**
|
|
3306
|
-
* Traverse a 2nd-level relation to display nested data.
|
|
3307
|
-
* When active, `tab.columns` stores the 2nd-level object's attribute names.
|
|
3308
|
-
*
|
|
3309
|
-
* @param attribute - Relation attribute on the first-level target object
|
|
3310
|
-
* @example .table("members").through("companies").columns(["name", "sector"])
|
|
3311
|
-
*/
|
|
3312
|
-
through(attribute) {
|
|
3313
|
-
this.tabData.through = { attribute };
|
|
3314
|
-
return this;
|
|
3315
|
-
}
|
|
3316
|
-
/**
|
|
3317
|
-
* Show _source and _target columns in flattened (through) view
|
|
3318
|
-
*/
|
|
3319
|
-
showSourceTarget(value = true) {
|
|
3320
|
-
if (!this.tabData.through) {
|
|
3321
|
-
throw new Error(
|
|
3322
|
-
`[TableTabConfig] showSourceTarget() requires through() to be called first for tab "${this.tabData.name}"`
|
|
3323
|
-
);
|
|
3324
|
-
}
|
|
3325
|
-
this.tabData.through.showSourceTarget = value;
|
|
3326
|
-
return this;
|
|
3327
|
-
}
|
|
3328
3001
|
/**
|
|
3329
3002
|
* Continue building with a new tab
|
|
3330
3003
|
*/
|
|
@@ -3782,6 +3455,17 @@ var DetailViewBuilder = class {
|
|
|
3782
3455
|
function detailView(name, label) {
|
|
3783
3456
|
return new DetailViewBuilder(name, label);
|
|
3784
3457
|
}
|
|
3458
|
+
function findProtectedTabFilterAttribute(node) {
|
|
3459
|
+
if (Array.isArray(node)) {
|
|
3460
|
+
return node.map(findProtectedTabFilterAttribute).find((attribute) => attribute !== void 0);
|
|
3461
|
+
}
|
|
3462
|
+
if (node === null || typeof node !== "object") return void 0;
|
|
3463
|
+
const candidate = node;
|
|
3464
|
+
if (candidate.attribute === "visibility" || candidate.attribute === "ownedBy") {
|
|
3465
|
+
return candidate.attribute;
|
|
3466
|
+
}
|
|
3467
|
+
return findProtectedTabFilterAttribute(candidate.rules) ?? findProtectedTabFilterAttribute(candidate.groups);
|
|
3468
|
+
}
|
|
3785
3469
|
var ListViewBuilder = class {
|
|
3786
3470
|
constructor(name, label) {
|
|
3787
3471
|
validateViewName(name, "ListViewBuilder", {
|
|
@@ -3891,28 +3575,39 @@ var ListViewBuilder = class {
|
|
|
3891
3575
|
combinator: this.data.defaultFilters.combinator,
|
|
3892
3576
|
rules: this.data.defaultFilters.rules
|
|
3893
3577
|
} : void 0,
|
|
3894
|
-
tabs: this.data.tabs.map((tab) =>
|
|
3895
|
-
|
|
3896
|
-
|
|
3897
|
-
|
|
3898
|
-
|
|
3899
|
-
|
|
3900
|
-
|
|
3901
|
-
|
|
3902
|
-
|
|
3903
|
-
|
|
3904
|
-
|
|
3905
|
-
|
|
3906
|
-
|
|
3907
|
-
|
|
3908
|
-
|
|
3909
|
-
|
|
3910
|
-
|
|
3911
|
-
|
|
3912
|
-
|
|
3913
|
-
|
|
3914
|
-
|
|
3915
|
-
|
|
3578
|
+
tabs: this.data.tabs.map((tab) => {
|
|
3579
|
+
const common = {
|
|
3580
|
+
id: tab.id,
|
|
3581
|
+
label: tab.label,
|
|
3582
|
+
icon: tab.icon,
|
|
3583
|
+
default: tab.default,
|
|
3584
|
+
// Which records the tab scopes to — a tab-level scope, never a
|
|
3585
|
+
// record's own column (see the visibility notes in CLAUDE.md).
|
|
3586
|
+
visibility: tab.visibility,
|
|
3587
|
+
columns: tab.columns,
|
|
3588
|
+
filters: tab.filters ? {
|
|
3589
|
+
id: chunkFRCDMQER_js.generateId(),
|
|
3590
|
+
combinator: tab.filters.combinator,
|
|
3591
|
+
rules: tab.filters.rules
|
|
3592
|
+
} : void 0,
|
|
3593
|
+
sorts: tab.sorts,
|
|
3594
|
+
createMode: tab.createMode
|
|
3595
|
+
};
|
|
3596
|
+
return tab.layout === "kanban" ? {
|
|
3597
|
+
...common,
|
|
3598
|
+
layout: "kanban",
|
|
3599
|
+
groupByAttribute: tab.groupByAttribute,
|
|
3600
|
+
cardUserAttribute: tab.cardUserAttribute,
|
|
3601
|
+
cardDateAttribute: tab.cardDateAttribute,
|
|
3602
|
+
kanbanColumnOrder: tab.kanbanColumnOrder,
|
|
3603
|
+
kanbanColumnVisibility: tab.kanbanColumnVisibility,
|
|
3604
|
+
kanbanPinnedColumns: tab.kanbanPinnedColumns
|
|
3605
|
+
} : {
|
|
3606
|
+
...common,
|
|
3607
|
+
layout: "table",
|
|
3608
|
+
columnSizing: tab.columnSizing
|
|
3609
|
+
};
|
|
3610
|
+
})
|
|
3916
3611
|
};
|
|
3917
3612
|
return {
|
|
3918
3613
|
name: this.data.name,
|
|
@@ -3934,6 +3629,7 @@ var ListViewTabConfigBuilder = class _ListViewTabConfigBuilder {
|
|
|
3934
3629
|
this.tabData = {
|
|
3935
3630
|
id,
|
|
3936
3631
|
label,
|
|
3632
|
+
visibility: "all",
|
|
3937
3633
|
layout: "table",
|
|
3938
3634
|
columns: []
|
|
3939
3635
|
};
|
|
@@ -3952,6 +3648,14 @@ var ListViewTabConfigBuilder = class _ListViewTabConfigBuilder {
|
|
|
3952
3648
|
this.tabData.default = true;
|
|
3953
3649
|
return this;
|
|
3954
3650
|
}
|
|
3651
|
+
/**
|
|
3652
|
+
* Set the record scope this tab reads. Defaults to `"all"` (no scope: every
|
|
3653
|
+
* workspace record plus the viewer's own private ones).
|
|
3654
|
+
*/
|
|
3655
|
+
visibility(value) {
|
|
3656
|
+
this.tabData.visibility = value;
|
|
3657
|
+
return this;
|
|
3658
|
+
}
|
|
3955
3659
|
/**
|
|
3956
3660
|
* Set the layout to table (default)
|
|
3957
3661
|
*/
|
|
@@ -4045,6 +3749,11 @@ var ListViewTabConfigBuilder = class _ListViewTabConfigBuilder {
|
|
|
4045
3749
|
* @example .filter({ combinator: "and", rules: [{ attribute: "status", operator: "is", value: "active" }] })
|
|
4046
3750
|
*/
|
|
4047
3751
|
filter(filters) {
|
|
3752
|
+
const protectedAttribute = findProtectedTabFilterAttribute(filters);
|
|
3753
|
+
if (protectedAttribute) {
|
|
3754
|
+
const message = `Tab filters cannot target "${protectedAttribute}". Use .visibility("private")`;
|
|
3755
|
+
throw new chunkFDIAOFHS_js.ValidationError(message, [{ path: ["filters"], message }]);
|
|
3756
|
+
}
|
|
4048
3757
|
this.tabData.filters = filters;
|
|
4049
3758
|
return this;
|
|
4050
3759
|
}
|
|
@@ -4257,7 +3966,7 @@ function jsonFlag(name, defaultValue) {
|
|
|
4257
3966
|
|
|
4258
3967
|
// src/feature-flags/flag-registry.ts
|
|
4259
3968
|
function duplicateFlagError(name) {
|
|
4260
|
-
return new
|
|
3969
|
+
return new chunkFDIAOFHS_js.DuplicateError(
|
|
4261
3970
|
"feature flag",
|
|
4262
3971
|
name,
|
|
4263
3972
|
`Flag "${name}" is already registered. Each flag name must be unique.`
|
|
@@ -4335,7 +4044,7 @@ var FlagRegistry = class {
|
|
|
4335
4044
|
getOrThrow(name) {
|
|
4336
4045
|
const flag = this.get(name);
|
|
4337
4046
|
if (!flag) {
|
|
4338
|
-
throw new
|
|
4047
|
+
throw new chunkFDIAOFHS_js.NotFoundError(
|
|
4339
4048
|
"Feature flag",
|
|
4340
4049
|
name,
|
|
4341
4050
|
void 0,
|
|
@@ -4492,19 +4201,19 @@ var FlagService = class {
|
|
|
4492
4201
|
*/
|
|
4493
4202
|
async setOverride(flagName, level, value, options = {}) {
|
|
4494
4203
|
if (!this.repository) {
|
|
4495
|
-
throw new
|
|
4204
|
+
throw new chunkFDIAOFHS_js.SchemaError(
|
|
4496
4205
|
"Cannot set override: no FeatureFlagsRepository configured. Add featureFlags to your DatabaseAdapter to enable runtime overrides.",
|
|
4497
|
-
|
|
4206
|
+
chunkFDIAOFHS_js.SchemaErrorCode.CONFIGURATION_REQUIRED
|
|
4498
4207
|
);
|
|
4499
4208
|
}
|
|
4500
4209
|
const flag = this.registry.get(flagName);
|
|
4501
4210
|
if (flag && !flag.allowedLevels.includes(level)) {
|
|
4502
4211
|
const message = `Flag "${flagName}" does not allow ${level}-level overrides. Allowed levels: ${flag.allowedLevels.join(", ")}`;
|
|
4503
|
-
throw new
|
|
4212
|
+
throw new chunkFDIAOFHS_js.ValidationError(message, [{ path: ["level"], message }]);
|
|
4504
4213
|
}
|
|
4505
4214
|
if (flag?.system) {
|
|
4506
4215
|
const message = `Flag "${flagName}" is a system flag and cannot be overridden via API.`;
|
|
4507
|
-
throw new
|
|
4216
|
+
throw new chunkFDIAOFHS_js.ValidationError(message, [{ path: ["flagName"], message }]);
|
|
4508
4217
|
}
|
|
4509
4218
|
await this.repository.setOverride({
|
|
4510
4219
|
flagName,
|
|
@@ -4524,9 +4233,9 @@ var FlagService = class {
|
|
|
4524
4233
|
*/
|
|
4525
4234
|
async deleteOverride(flagName, level, targetId) {
|
|
4526
4235
|
if (!this.repository) {
|
|
4527
|
-
throw new
|
|
4236
|
+
throw new chunkFDIAOFHS_js.SchemaError(
|
|
4528
4237
|
"Cannot delete override: no FeatureFlagsRepository configured.",
|
|
4529
|
-
|
|
4238
|
+
chunkFDIAOFHS_js.SchemaErrorCode.CONFIGURATION_REQUIRED
|
|
4530
4239
|
);
|
|
4531
4240
|
}
|
|
4532
4241
|
await this.repository.deleteOverride(flagName, level, targetId);
|
|
@@ -4663,7 +4372,7 @@ var NativeObjectRegistryClass = class {
|
|
|
4663
4372
|
if (!object2.system) {
|
|
4664
4373
|
const message = `[NativeObjectRegistry] Cannot register object "${object2.name}" (id: ${object2.id}): missing system flag.
|
|
4665
4374
|
Native objects must have system=true. Did you call .runtime() on the builder? Remove that call \u2014 objects are system:true by default.`;
|
|
4666
|
-
throw new
|
|
4375
|
+
throw new chunkFDIAOFHS_js.ValidationError(message, []);
|
|
4667
4376
|
}
|
|
4668
4377
|
if (this.objects.has(object2.name)) {
|
|
4669
4378
|
const existing = this.objects.get(object2.name);
|
|
@@ -4671,7 +4380,7 @@ Native objects must have system=true. Did you call .runtime() on the builder? Re
|
|
|
4671
4380
|
- Existing: "${existing?.label}" (id: ${existing?.id})
|
|
4672
4381
|
- New: "${object2.label}" (id: ${object2.id})
|
|
4673
4382
|
Please use unique names for each native object.`;
|
|
4674
|
-
throw new
|
|
4383
|
+
throw new chunkFDIAOFHS_js.DuplicateError("object", object2.name, message);
|
|
4675
4384
|
}
|
|
4676
4385
|
this.objects.set(object2.name, cloneObjectDefinition(object2));
|
|
4677
4386
|
}
|
|
@@ -4703,7 +4412,7 @@ Please use unique names for each native object.`;
|
|
|
4703
4412
|
if (!object2) {
|
|
4704
4413
|
const message = `[NativeObjectRegistry] Native object "${name}" not found.
|
|
4705
4414
|
Available objects: ${this.listNames().join(", ")}`;
|
|
4706
|
-
throw new
|
|
4415
|
+
throw new chunkFDIAOFHS_js.NotFoundError("Native object", name, chunkFDIAOFHS_js.SchemaErrorCode.OBJECT_NOT_FOUND, message);
|
|
4707
4416
|
}
|
|
4708
4417
|
return object2;
|
|
4709
4418
|
}
|
|
@@ -4802,7 +4511,7 @@ var SKILL_OBJECT = object({ name: "skill", label: "Skill" }).sealed().icon("spar
|
|
|
4802
4511
|
)
|
|
4803
4512
|
).attribute(richtext({ name: "content", label: "Content" }).defaultValue(SKILL_CONTENT_TEMPLATE)).build();
|
|
4804
4513
|
var SKILL_VIEW = detailView("skill-detail", "Skill").for("skill").default().sidePanel({ attributes: ["name", "description"] }).tab("content", "Content").richtext("content").titleAttribute("name").done().tab("files", "Files").documents().done().build();
|
|
4805
|
-
var SKILL_LIST_VIEW = listView("skill-list", "Skills").for("skill").default().tab("
|
|
4514
|
+
var SKILL_LIST_VIEW = listView("skill-list", "Skills").for("skill").default().tab("workspace", "Skills").default().icon("table").visibility("workspace").table().columns("name", "description").sort("name", "asc").tab("mine", "Mes skills").icon("lock").visibility("private").table().columns("name", "description").sort("name", "asc").build();
|
|
4806
4515
|
var MEMORY_OBJECT = object({ name: "memory", label: "Memory" }).sealed().icon("database").order(Number.MAX_SAFE_INTEGER).pluralLabel("Memories").labelExpression("{{ name }}").embeddingExpression("{{ name }}\n{{ description }}\n{{ content }}").attribute(text({ name: "name", label: "Name" }).maxLength(constants.MEMORY_NAME_MAX_LENGTH).required()).attribute(
|
|
4807
4516
|
text({ name: "description", label: "Description" }).multiline().maxLength(constants.MEMORY_DESCRIPTION_MAX_LENGTH).required()
|
|
4808
4517
|
).attribute(text({ name: "content", label: "Content" }).multiline()).attribute(
|
|
@@ -4812,9 +4521,9 @@ var MEMORY_OBJECT = object({ name: "memory", label: "Memory" }).sealed().icon("d
|
|
|
4812
4521
|
{ value: "feedback", label: "Feedback" },
|
|
4813
4522
|
{ value: "reference", label: "Reference" }
|
|
4814
4523
|
])
|
|
4815
|
-
).attribute(
|
|
4816
|
-
var MEMORY_VIEW = detailView("memory-detail", "Memory").for("memory").default().sidePanel({ attributes: ["name", "description", "kind", "
|
|
4817
|
-
var MEMORY_LIST_VIEW = listView("memory-list", "Memories").for("memory").default().tab("
|
|
4524
|
+
).attribute(relation({ name: "subjects", label: "Subjects" }).toAny().many()).attribute(relation({ name: "links", label: "Links" }).to("memory").many()).build();
|
|
4525
|
+
var MEMORY_VIEW = detailView("memory-detail", "Memory").for("memory").default().sidePanel({ attributes: ["name", "description", "kind", "subjects", "links"] }).tab("content", "Content").form(group("content", "Content").field("content", { span: 12 })).build();
|
|
4526
|
+
var MEMORY_LIST_VIEW = listView("memory-list", "Memories").for("memory").default().tab("workspace", "Memories").default().icon("table").visibility("workspace").table().columns("name", "kind", "description", "createdAt").sort("name", "asc").tab("mine", "Mes m\xE9moires").icon("lock").visibility("private").table().columns("name", "kind", "description", "createdAt").sort("name", "asc").build();
|
|
4818
4527
|
|
|
4819
4528
|
// src/views/registry.ts
|
|
4820
4529
|
function cloneViewDefinition(view) {
|
|
@@ -4842,7 +4551,7 @@ var ViewRegistry = class {
|
|
|
4842
4551
|
const key = this.makeKey(view.object, view.name, view.type);
|
|
4843
4552
|
if (this.views.has(key)) {
|
|
4844
4553
|
const message = `[ViewRegistry] Duplicate view: "${view.name}" (${view.type}) for object "${view.object}"`;
|
|
4845
|
-
throw new
|
|
4554
|
+
throw new chunkFDIAOFHS_js.DuplicateError("view", key, message);
|
|
4846
4555
|
}
|
|
4847
4556
|
const storedView = cloneViewDefinition(view);
|
|
4848
4557
|
this.views.set(key, storedView);
|
|
@@ -4887,7 +4596,7 @@ var ViewRegistry = class {
|
|
|
4887
4596
|
const availableNames = available.map((v) => `${v.name} (${v.type})`).join(", ") || "(none)";
|
|
4888
4597
|
const message = `[ViewRegistry] View "${viewName}" not found for object "${objectName}".
|
|
4889
4598
|
Available views: ${availableNames}`;
|
|
4890
|
-
throw new
|
|
4599
|
+
throw new chunkFDIAOFHS_js.NotFoundError("View", `${objectName}:${viewName}`, void 0, message);
|
|
4891
4600
|
}
|
|
4892
4601
|
return view;
|
|
4893
4602
|
}
|
|
@@ -4975,7 +4684,7 @@ var viewRegistry = new ViewRegistry();
|
|
|
4975
4684
|
// src/views/auto-generator.ts
|
|
4976
4685
|
function getRuntimeAttributes(attributes, excludeNames = []) {
|
|
4977
4686
|
return attributes.filter(
|
|
4978
|
-
(attr) => !(!getAttributeCapabilities(attr).lifecycle.visibleInRuntime || attr.system || excludeNames.includes(attr.name))
|
|
4687
|
+
(attr) => !(!chunk6ZDH3EJA_js.getAttributeCapabilities(attr).lifecycle.visibleInRuntime || attr.system || excludeNames.includes(attr.name))
|
|
4979
4688
|
);
|
|
4980
4689
|
}
|
|
4981
4690
|
function sortAttributes(attributes) {
|
|
@@ -5008,7 +4717,7 @@ function generateDefaultDetailView(object2, options = {}) {
|
|
|
5008
4717
|
const { includeActivityTab = true, includeDocumentsTab = true, excludeAttributes = [] } = options;
|
|
5009
4718
|
const runtimeAttrs = getRuntimeAttributes(object2.attributes, excludeAttributes);
|
|
5010
4719
|
const sortedAttrs = sortAttributes(
|
|
5011
|
-
runtimeAttrs.filter((attr) => getAttributeCapabilities(attr).presentation.formField)
|
|
4720
|
+
runtimeAttrs.filter((attr) => chunk6ZDH3EJA_js.getAttributeCapabilities(attr).presentation.formField)
|
|
5012
4721
|
);
|
|
5013
4722
|
const formTab = {
|
|
5014
4723
|
id: "form",
|
|
@@ -5019,6 +4728,7 @@ function generateDefaultDetailView(object2, options = {}) {
|
|
|
5019
4728
|
{
|
|
5020
4729
|
id: "general",
|
|
5021
4730
|
label: "General",
|
|
4731
|
+
type: "fields",
|
|
5022
4732
|
fields: sortedAttrs.map(attributeToField),
|
|
5023
4733
|
order: 0
|
|
5024
4734
|
}
|
|
@@ -5064,7 +4774,7 @@ function generateDefaultListView(object2, options = {}) {
|
|
|
5064
4774
|
const { excludeAttributes = [], maxListColumns = 5 } = options;
|
|
5065
4775
|
const runtimeAttrs = getRuntimeAttributes(object2.attributes, excludeAttributes);
|
|
5066
4776
|
const sortedAttrs = sortAttributes(
|
|
5067
|
-
runtimeAttrs.filter((attr) => getAttributeCapabilities(attr).presentation.defaultColumn)
|
|
4777
|
+
runtimeAttrs.filter((attr) => chunk6ZDH3EJA_js.getAttributeCapabilities(attr).presentation.defaultColumn)
|
|
5068
4778
|
);
|
|
5069
4779
|
const columns = sortedAttrs.slice(0, maxListColumns).map((attr) => attr.name);
|
|
5070
4780
|
const config = {
|
|
@@ -5073,6 +4783,7 @@ function generateDefaultListView(object2, options = {}) {
|
|
|
5073
4783
|
id: "all",
|
|
5074
4784
|
label: "All",
|
|
5075
4785
|
default: true,
|
|
4786
|
+
visibility: "workspace",
|
|
5076
4787
|
layout: "table",
|
|
5077
4788
|
columns
|
|
5078
4789
|
}
|
|
@@ -5193,7 +4904,7 @@ var FormRegistry = class {
|
|
|
5193
4904
|
const forms = Array.isArray(formOrForms) ? formOrForms : [formOrForms];
|
|
5194
4905
|
for (const f of forms) {
|
|
5195
4906
|
if (this.forms.has(f.name)) {
|
|
5196
|
-
throw new
|
|
4907
|
+
throw new chunkFDIAOFHS_js.DuplicateError("form", f.name, `[FormRegistry] Duplicate form: "${f.name}"`);
|
|
5197
4908
|
}
|
|
5198
4909
|
this.forms.set(f.name, cloneFormDefinition(f));
|
|
5199
4910
|
}
|
|
@@ -5332,6 +5043,8 @@ var BROWSER_PREVIEW_STATUSES = ["live", "paused", "ended", "disconnected"];
|
|
|
5332
5043
|
var LIVE_EVENT_TYPE_REGISTRY = {
|
|
5333
5044
|
"record.patch": true,
|
|
5334
5045
|
"record.deleted": true,
|
|
5046
|
+
"record.removed": true,
|
|
5047
|
+
"record.created": true,
|
|
5335
5048
|
"view.projection.stale": true,
|
|
5336
5049
|
"agent.session.patch": true,
|
|
5337
5050
|
"agent.unread.patch": true,
|
|
@@ -5378,6 +5091,33 @@ var BROWSER_PREVIEW_DESCRIPTOR_KEYS = [
|
|
|
5378
5091
|
"sequence",
|
|
5379
5092
|
"updatedAt"
|
|
5380
5093
|
];
|
|
5094
|
+
var RECORD_REMOVED_PAYLOAD_KEYS = [
|
|
5095
|
+
"type",
|
|
5096
|
+
"objectId",
|
|
5097
|
+
"recordId",
|
|
5098
|
+
"recordVersion"
|
|
5099
|
+
];
|
|
5100
|
+
var RECORD_CREATED_PAYLOAD_KEYS = [
|
|
5101
|
+
"type",
|
|
5102
|
+
"objectId",
|
|
5103
|
+
"recordId",
|
|
5104
|
+
"recordVersion",
|
|
5105
|
+
"record"
|
|
5106
|
+
];
|
|
5107
|
+
var RECORD_LIVE_SNAPSHOT_KEYS = [
|
|
5108
|
+
"id",
|
|
5109
|
+
"objectId",
|
|
5110
|
+
"visibility",
|
|
5111
|
+
"ownedBy",
|
|
5112
|
+
"label",
|
|
5113
|
+
"values",
|
|
5114
|
+
"metadata",
|
|
5115
|
+
"createdAt",
|
|
5116
|
+
"updatedAt",
|
|
5117
|
+
"createdBy",
|
|
5118
|
+
"lastUpdatedBy",
|
|
5119
|
+
"schemaVersion"
|
|
5120
|
+
];
|
|
5381
5121
|
function isLiveEventType(value) {
|
|
5382
5122
|
return typeof value === "string" && LIVE_EVENT_TYPES.includes(value);
|
|
5383
5123
|
}
|
|
@@ -5396,6 +5136,10 @@ function isLiveEventPayloadForType(type, payload) {
|
|
|
5396
5136
|
return isRecordPatchPayload(payload);
|
|
5397
5137
|
case "record.deleted":
|
|
5398
5138
|
return isRecordDeletedPayload(payload);
|
|
5139
|
+
case "record.removed":
|
|
5140
|
+
return isRecordRemovedPayload(payload);
|
|
5141
|
+
case "record.created":
|
|
5142
|
+
return isRecordCreatedPayload(payload);
|
|
5399
5143
|
case "view.projection.stale":
|
|
5400
5144
|
return isViewProjectionStalePayload(payload);
|
|
5401
5145
|
case "agent.session.patch":
|
|
@@ -5491,6 +5235,15 @@ function isRecordPatchPayload(payload) {
|
|
|
5491
5235
|
function isRecordDeletedPayload(payload) {
|
|
5492
5236
|
return payload.type === "record.deleted" && hasString(payload, "objectId") && hasString(payload, "recordId") && hasVersion(payload, "recordVersion") && hasString(payload, "deletedAt");
|
|
5493
5237
|
}
|
|
5238
|
+
function isRecordRemovedPayload(payload) {
|
|
5239
|
+
return payload.type === "record.removed" && hasOnlyKeys(payload, RECORD_REMOVED_PAYLOAD_KEYS) && hasString(payload, "objectId") && hasString(payload, "recordId") && hasVersion(payload, "recordVersion");
|
|
5240
|
+
}
|
|
5241
|
+
function isRecordLiveSnapshot(value) {
|
|
5242
|
+
return isRecord(value) && hasOnlyKeys(value, RECORD_LIVE_SNAPSHOT_KEYS) && hasString(value, "id") && hasString(value, "objectId") && isOneOf(value.visibility, ["workspace", "private"]) && isNullableString(value.ownedBy) && (value.visibility === "workspace" && value.ownedBy === null || value.visibility === "private" && isNonEmptyString(value.ownedBy)) && hasString(value, "label") && isRecord(value.values) && hasOptional(value, "metadata", isRecord) && hasIsoDateString(value, "createdAt") && hasIsoDateString(value, "updatedAt") && hasOptional(value, "createdBy", isString) && hasOptional(value, "lastUpdatedBy", isString) && hasVersion(value, "schemaVersion");
|
|
5243
|
+
}
|
|
5244
|
+
function isRecordCreatedPayload(payload) {
|
|
5245
|
+
return payload.type === "record.created" && hasOnlyKeys(payload, RECORD_CREATED_PAYLOAD_KEYS) && hasString(payload, "objectId") && hasString(payload, "recordId") && hasVersion(payload, "recordVersion") && isRecordLiveSnapshot(payload.record) && payload.record.id === payload.recordId && payload.record.objectId === payload.objectId;
|
|
5246
|
+
}
|
|
5494
5247
|
function isViewProjectionStalePayload(payload) {
|
|
5495
5248
|
return payload.type === "view.projection.stale" && hasString(payload, "viewId") && isOneOf(payload.reason, VIEW_PROJECTION_STALE_REASONS);
|
|
5496
5249
|
}
|
|
@@ -5729,7 +5482,7 @@ function assertAcyclicComputedDependencies(nodes) {
|
|
|
5729
5482
|
}
|
|
5730
5483
|
function parseCompileFormula(expression) {
|
|
5731
5484
|
try {
|
|
5732
|
-
return
|
|
5485
|
+
return chunkQN2N3IJZ_js.parseComputedFormula(expression);
|
|
5733
5486
|
} catch (error) {
|
|
5734
5487
|
if (error instanceof Error) {
|
|
5735
5488
|
throw new ComputedFormulaCompileError(error.message);
|
|
@@ -6640,11 +6393,11 @@ function evaluateComputedAst(node, input) {
|
|
|
6640
6393
|
return evaluateAst(node, input);
|
|
6641
6394
|
}
|
|
6642
6395
|
function evaluateComputedFormula(expression, input) {
|
|
6643
|
-
return evaluateAst(
|
|
6396
|
+
return evaluateAst(chunkQN2N3IJZ_js.parseComputedFormula(expression), input);
|
|
6644
6397
|
}
|
|
6645
6398
|
function evaluateComputedFormulaWithResult(expression, input, returnType, decimals) {
|
|
6646
6399
|
try {
|
|
6647
|
-
const raw = evaluateAst(
|
|
6400
|
+
const raw = evaluateAst(chunkQN2N3IJZ_js.parseComputedFormula(expression), input);
|
|
6648
6401
|
const value = returnType ? formatComputedResult(raw, returnType, decimals) : raw;
|
|
6649
6402
|
return { value };
|
|
6650
6403
|
} catch (error) {
|
|
@@ -6782,46 +6535,79 @@ var toDate2 = (v) => {
|
|
|
6782
6535
|
return Number.isNaN(d.getTime()) ? null : d;
|
|
6783
6536
|
};
|
|
6784
6537
|
var toArr = (v) => Array.isArray(v) ? v : v == null ? [] : [v];
|
|
6785
|
-
|
|
6786
|
-
const
|
|
6787
|
-
|
|
6788
|
-
|
|
6789
|
-
|
|
6790
|
-
|
|
6791
|
-
|
|
6792
|
-
const
|
|
6793
|
-
return
|
|
6538
|
+
var compareNumbers = (v, rv, cmp) => {
|
|
6539
|
+
const a = toNum(v);
|
|
6540
|
+
const b = toNum(rv);
|
|
6541
|
+
return a !== null && b !== null && cmp(a, b);
|
|
6542
|
+
};
|
|
6543
|
+
var compareDates = (v, rv, cmp) => {
|
|
6544
|
+
const a = toDate2(v);
|
|
6545
|
+
const b = toDate2(rv);
|
|
6546
|
+
return a !== null && b !== null && cmp(a.getTime(), b.getTime());
|
|
6547
|
+
};
|
|
6548
|
+
var equalsForAttr = (v, rv, attr) => {
|
|
6549
|
+
if (attr.type === "number" || attr.type === "currency") {
|
|
6550
|
+
const a = toNum(v);
|
|
6551
|
+
const b = toNum(rv);
|
|
6552
|
+
if (a !== null && b !== null) return a === b;
|
|
6553
|
+
}
|
|
6554
|
+
return toStr(v) === toStr(rv);
|
|
6555
|
+
};
|
|
6556
|
+
function isCheckboxEquality(attributeType, value) {
|
|
6557
|
+
return attributeType ? attributeType === "checkbox" : typeof value === "boolean";
|
|
6794
6558
|
}
|
|
6559
|
+
var orderingSpec = (cmp) => ({
|
|
6560
|
+
appliesTo: ["number", "currency", "date", "formula"],
|
|
6561
|
+
evaluateInMemory: (v, rv, attr) => attr.type === "date" ? compareDates(v, rv, cmp) : compareNumbers(v, rv, cmp)
|
|
6562
|
+
});
|
|
6795
6563
|
var OPERATOR_SPECS = {
|
|
6796
|
-
// ----
|
|
6564
|
+
// ---- equality ----
|
|
6797
6565
|
is: {
|
|
6798
|
-
appliesTo: [
|
|
6799
|
-
|
|
6566
|
+
appliesTo: [
|
|
6567
|
+
"text",
|
|
6568
|
+
"phone",
|
|
6569
|
+
"number",
|
|
6570
|
+
"currency",
|
|
6571
|
+
"checkbox",
|
|
6572
|
+
"status",
|
|
6573
|
+
"select",
|
|
6574
|
+
"date",
|
|
6575
|
+
"user",
|
|
6576
|
+
"relation",
|
|
6577
|
+
"formula"
|
|
6578
|
+
],
|
|
6579
|
+
evaluateInMemory: (v, rv, attr) => attr.type === "checkbox" ? v === true === (rv === true) : equalsForAttr(v, rv, attr)
|
|
6800
6580
|
},
|
|
6801
6581
|
is_not: {
|
|
6802
|
-
appliesTo: [
|
|
6803
|
-
|
|
6804
|
-
|
|
6805
|
-
|
|
6806
|
-
|
|
6807
|
-
|
|
6808
|
-
|
|
6809
|
-
|
|
6810
|
-
|
|
6582
|
+
appliesTo: [
|
|
6583
|
+
"text",
|
|
6584
|
+
"phone",
|
|
6585
|
+
"number",
|
|
6586
|
+
"currency",
|
|
6587
|
+
"status",
|
|
6588
|
+
"select",
|
|
6589
|
+
"date",
|
|
6590
|
+
"user",
|
|
6591
|
+
"relation",
|
|
6592
|
+
"formula"
|
|
6593
|
+
],
|
|
6594
|
+
evaluateInMemory: (v, rv, attr) => !equalsForAttr(v, rv, attr)
|
|
6595
|
+
},
|
|
6596
|
+
// ---- text substring ----
|
|
6597
|
+
contains: {
|
|
6598
|
+
appliesTo: ["text", "phone", "formula"],
|
|
6599
|
+
evaluateInMemory: (v, rv) => toStr(v).toLowerCase().includes(toStr(rv).toLowerCase())
|
|
6811
6600
|
},
|
|
6812
6601
|
not_contains: {
|
|
6813
|
-
appliesTo: ["text", "phone", "
|
|
6814
|
-
evaluateInMemory: (v, rv) =>
|
|
6815
|
-
if (Array.isArray(v)) return !v.map(toStr).includes(toStr(rv));
|
|
6816
|
-
return !toStr(v).toLowerCase().includes(toStr(rv).toLowerCase());
|
|
6817
|
-
}
|
|
6602
|
+
appliesTo: ["text", "phone", "formula"],
|
|
6603
|
+
evaluateInMemory: (v, rv) => !toStr(v).toLowerCase().includes(toStr(rv).toLowerCase())
|
|
6818
6604
|
},
|
|
6819
6605
|
starts_with: {
|
|
6820
|
-
appliesTo: ["text", "
|
|
6606
|
+
appliesTo: ["text", "phone"],
|
|
6821
6607
|
evaluateInMemory: (v, rv) => toStr(v).toLowerCase().startsWith(toStr(rv).toLowerCase())
|
|
6822
6608
|
},
|
|
6823
6609
|
ends_with: {
|
|
6824
|
-
appliesTo: ["text"
|
|
6610
|
+
appliesTo: ["text"],
|
|
6825
6611
|
evaluateInMemory: (v, rv) => toStr(v).toLowerCase().endsWith(toStr(rv).toLowerCase())
|
|
6826
6612
|
},
|
|
6827
6613
|
is_empty: {
|
|
@@ -6862,100 +6648,22 @@ var OPERATOR_SPECS = {
|
|
|
6862
6648
|
],
|
|
6863
6649
|
evaluateInMemory: (v) => !isEmpty(v)
|
|
6864
6650
|
},
|
|
6865
|
-
// ---- numeric ----
|
|
6866
|
-
|
|
6867
|
-
|
|
6868
|
-
|
|
6869
|
-
|
|
6870
|
-
|
|
6871
|
-
appliesTo: ["number", "currency", "formula"],
|
|
6872
|
-
evaluateInMemory: (v, rv) => toNum(v) !== toNum(rv)
|
|
6873
|
-
},
|
|
6874
|
-
lt: {
|
|
6875
|
-
appliesTo: ["number", "currency", "formula"],
|
|
6876
|
-
evaluateInMemory: (v, rv) => {
|
|
6877
|
-
const a = toNum(v);
|
|
6878
|
-
const b = toNum(rv);
|
|
6879
|
-
return a !== null && b !== null && a < b;
|
|
6880
|
-
}
|
|
6881
|
-
},
|
|
6882
|
-
gt: {
|
|
6883
|
-
appliesTo: ["number", "currency", "formula"],
|
|
6884
|
-
evaluateInMemory: (v, rv) => {
|
|
6885
|
-
const a = toNum(v);
|
|
6886
|
-
const b = toNum(rv);
|
|
6887
|
-
return a !== null && b !== null && a > b;
|
|
6888
|
-
}
|
|
6889
|
-
},
|
|
6890
|
-
lte: {
|
|
6891
|
-
appliesTo: ["number", "currency", "formula"],
|
|
6892
|
-
evaluateInMemory: (v, rv) => {
|
|
6893
|
-
const a = toNum(v);
|
|
6894
|
-
const b = toNum(rv);
|
|
6895
|
-
return a !== null && b !== null && a <= b;
|
|
6896
|
-
}
|
|
6897
|
-
},
|
|
6898
|
-
gte: {
|
|
6899
|
-
appliesTo: ["number", "currency", "formula"],
|
|
6900
|
-
evaluateInMemory: (v, rv) => {
|
|
6901
|
-
const a = toNum(v);
|
|
6902
|
-
const b = toNum(rv);
|
|
6903
|
-
return a !== null && b !== null && a >= b;
|
|
6904
|
-
}
|
|
6905
|
-
},
|
|
6906
|
-
// ---- checkbox ----
|
|
6907
|
-
is_checked: {
|
|
6908
|
-
appliesTo: ["checkbox"],
|
|
6909
|
-
evaluateInMemory: (v) => v === true
|
|
6910
|
-
},
|
|
6911
|
-
is_not_checked: {
|
|
6912
|
-
appliesTo: ["checkbox"],
|
|
6913
|
-
evaluateInMemory: (v) => v !== true
|
|
6914
|
-
},
|
|
6915
|
-
// ---- date ----
|
|
6916
|
-
before: {
|
|
6917
|
-
appliesTo: ["date"],
|
|
6918
|
-
evaluateInMemory: (v, rv) => {
|
|
6919
|
-
const a = toDate2(v);
|
|
6920
|
-
const b = toDate2(rv);
|
|
6921
|
-
return a !== null && b !== null && a < b;
|
|
6922
|
-
}
|
|
6923
|
-
},
|
|
6924
|
-
after: {
|
|
6925
|
-
appliesTo: ["date"],
|
|
6926
|
-
evaluateInMemory: (v, rv) => {
|
|
6927
|
-
const a = toDate2(v);
|
|
6928
|
-
const b = toDate2(rv);
|
|
6929
|
-
return a !== null && b !== null && a > b;
|
|
6930
|
-
}
|
|
6931
|
-
},
|
|
6932
|
-
on_or_before: {
|
|
6933
|
-
appliesTo: ["date"],
|
|
6934
|
-
evaluateInMemory: (v, rv) => {
|
|
6935
|
-
const a = toDate2(v);
|
|
6936
|
-
const b = toDate2(rv);
|
|
6937
|
-
return a !== null && b !== null && a <= b;
|
|
6938
|
-
}
|
|
6939
|
-
},
|
|
6940
|
-
on_or_after: {
|
|
6941
|
-
appliesTo: ["date"],
|
|
6942
|
-
evaluateInMemory: (v, rv) => {
|
|
6943
|
-
const a = toDate2(v);
|
|
6944
|
-
const b = toDate2(rv);
|
|
6945
|
-
return a !== null && b !== null && a >= b;
|
|
6946
|
-
}
|
|
6947
|
-
},
|
|
6651
|
+
// ---- ordering (numeric on number/currency/formula, chronological on date) ----
|
|
6652
|
+
less_than: orderingSpec((a, b) => a < b),
|
|
6653
|
+
greater_than: orderingSpec((a, b) => a > b),
|
|
6654
|
+
less_or_equal: orderingSpec((a, b) => a <= b),
|
|
6655
|
+
greater_or_equal: orderingSpec((a, b) => a >= b),
|
|
6656
|
+
// ---- date-only ----
|
|
6948
6657
|
is_within: {
|
|
6949
6658
|
appliesTo: ["date"],
|
|
6950
6659
|
evaluateInMemory: (v, rv) => {
|
|
6951
6660
|
const d = toDate2(v);
|
|
6952
|
-
|
|
6953
|
-
|
|
6954
|
-
|
|
6955
|
-
return rel.direction === "future" ? d >= /* @__PURE__ */ new Date() && d <= boundary : d >= boundary && d <= /* @__PURE__ */ new Date();
|
|
6661
|
+
const bounds = chunk6ZDH3EJA_js.resolveIsWithinBounds(rv);
|
|
6662
|
+
if (!(d && bounds)) return false;
|
|
6663
|
+
return d.getTime() >= bounds.startMs && d.getTime() < bounds.endMs;
|
|
6956
6664
|
}
|
|
6957
6665
|
},
|
|
6958
|
-
|
|
6666
|
+
on_day_month: {
|
|
6959
6667
|
appliesTo: ["date"],
|
|
6960
6668
|
evaluateInMemory: (v, rv) => {
|
|
6961
6669
|
const d = toDate2(v);
|
|
@@ -6964,9 +6672,9 @@ var OPERATOR_SPECS = {
|
|
|
6964
6672
|
return d.getMonth() + 1 === rule.month && d.getDate() === rule.day;
|
|
6965
6673
|
}
|
|
6966
6674
|
},
|
|
6967
|
-
// ----
|
|
6675
|
+
// ---- set membership ----
|
|
6968
6676
|
any_of: {
|
|
6969
|
-
appliesTo: ["status", "select", "relation"],
|
|
6677
|
+
appliesTo: ["status", "select", "multiselect", "user", "relation"],
|
|
6970
6678
|
evaluateInMemory: (v, rv) => {
|
|
6971
6679
|
const ruleArr = toArr(rv).map(toStr);
|
|
6972
6680
|
const valArr = toArr(v).map(toStr);
|
|
@@ -6974,7 +6682,7 @@ var OPERATOR_SPECS = {
|
|
|
6974
6682
|
}
|
|
6975
6683
|
},
|
|
6976
6684
|
none_of: {
|
|
6977
|
-
appliesTo: ["status", "select", "relation"],
|
|
6685
|
+
appliesTo: ["status", "select", "multiselect", "user", "relation"],
|
|
6978
6686
|
evaluateInMemory: (v, rv) => {
|
|
6979
6687
|
const ruleArr = toArr(rv).map(toStr);
|
|
6980
6688
|
const valArr = toArr(v).map(toStr);
|
|
@@ -6983,37 +6691,34 @@ var OPERATOR_SPECS = {
|
|
|
6983
6691
|
}
|
|
6984
6692
|
};
|
|
6985
6693
|
|
|
6986
|
-
// src/filters/
|
|
6987
|
-
function
|
|
6988
|
-
if (
|
|
6989
|
-
|
|
6990
|
-
|
|
6991
|
-
|
|
6694
|
+
// src/filters/extract-filter-value.ts
|
|
6695
|
+
function extractCurrencyFilterValue(value) {
|
|
6696
|
+
if (typeof value === "number") return value;
|
|
6697
|
+
if (value !== null && typeof value === "object" && "value" in value) {
|
|
6698
|
+
const inner = value.value;
|
|
6699
|
+
return typeof inner === "number" ? inner : null;
|
|
6700
|
+
}
|
|
6701
|
+
return null;
|
|
6992
6702
|
}
|
|
6993
|
-
function
|
|
6994
|
-
|
|
6995
|
-
if (
|
|
6996
|
-
|
|
6997
|
-
|
|
6998
|
-
|
|
6999
|
-
return spec.evaluateInMemory(values[rule.attribute], rule.value, attr);
|
|
6703
|
+
function extractFilterValue(value) {
|
|
6704
|
+
if (value === null || value === void 0) return null;
|
|
6705
|
+
if (typeof value === "object" && "value" in value) {
|
|
6706
|
+
return value.value ?? null;
|
|
6707
|
+
}
|
|
6708
|
+
return value;
|
|
7000
6709
|
}
|
|
7001
6710
|
|
|
7002
6711
|
// src/filters/polarity.ts
|
|
7003
6712
|
var NEGATIVE_OPERATORS = /* @__PURE__ */ new Set([
|
|
7004
6713
|
"is_not",
|
|
7005
6714
|
"not_contains",
|
|
7006
|
-
"neq",
|
|
7007
6715
|
"none_of",
|
|
7008
|
-
"is_not_checked",
|
|
7009
6716
|
"is_empty"
|
|
7010
6717
|
]);
|
|
7011
6718
|
var NEGATIVE_TO_POSITIVE = {
|
|
7012
6719
|
is_not: "is",
|
|
7013
6720
|
not_contains: "contains",
|
|
7014
|
-
neq: "eq",
|
|
7015
6721
|
none_of: "any_of",
|
|
7016
|
-
is_not_checked: "is_checked",
|
|
7017
6722
|
is_empty: "is_not_empty"
|
|
7018
6723
|
};
|
|
7019
6724
|
function getOperatorPolarity(op) {
|
|
@@ -7024,251 +6729,136 @@ function normalizeForEdgeRpc(op) {
|
|
|
7024
6729
|
}
|
|
7025
6730
|
var SINGLE_TO_MULTI = {
|
|
7026
6731
|
is: "any_of",
|
|
7027
|
-
|
|
7028
|
-
contains: "any_of",
|
|
7029
|
-
is_not: "none_of",
|
|
7030
|
-
neq: "none_of",
|
|
7031
|
-
not_contains: "none_of"
|
|
6732
|
+
is_not: "none_of"
|
|
7032
6733
|
};
|
|
7033
6734
|
function toMultiValueOperator(op) {
|
|
7034
6735
|
return SINGLE_TO_MULTI[op] ?? op;
|
|
7035
6736
|
}
|
|
7036
6737
|
|
|
7037
|
-
// src/filters/
|
|
7038
|
-
|
|
7039
|
-
|
|
7040
|
-
|
|
7041
|
-
|
|
7042
|
-
|
|
7043
|
-
|
|
7044
|
-
function
|
|
7045
|
-
|
|
7046
|
-
|
|
7047
|
-
|
|
7048
|
-
|
|
6738
|
+
// src/filters/evaluate.ts
|
|
6739
|
+
var systemAttribute = (name, type) => ({ id: `system:${name}`, name, label: name, type, system: true });
|
|
6740
|
+
var RECORD_SYSTEM_ATTRIBUTES = [
|
|
6741
|
+
...Object.entries(chunk6ZDH3EJA_js.SYSTEM_FILTER_ATTRIBUTE_TYPES).map(
|
|
6742
|
+
([name, type]) => systemAttribute(name, type)
|
|
6743
|
+
)
|
|
6744
|
+
];
|
|
6745
|
+
function evaluateRecordFilterState(state, record, attributes) {
|
|
6746
|
+
const physical = record;
|
|
6747
|
+
return evaluateFilterState(
|
|
6748
|
+
state,
|
|
6749
|
+
{
|
|
6750
|
+
...record.values,
|
|
6751
|
+
id: record.id,
|
|
6752
|
+
objectId: record.objectId,
|
|
6753
|
+
objectName: physical.objectName,
|
|
6754
|
+
tenantId: physical.tenantId,
|
|
6755
|
+
label: record.label,
|
|
6756
|
+
createdAt: record.createdAt,
|
|
6757
|
+
updatedAt: record.updatedAt,
|
|
6758
|
+
createdBy: record.createdBy,
|
|
6759
|
+
lastUpdatedBy: record.lastUpdatedBy,
|
|
6760
|
+
deletedAt: record.deletedAt,
|
|
6761
|
+
deletedBy: record.deletedBy,
|
|
6762
|
+
visibility: record.visibility,
|
|
6763
|
+
ownedBy: record.ownedBy
|
|
6764
|
+
},
|
|
6765
|
+
[...attributes, ...RECORD_SYSTEM_ATTRIBUTES]
|
|
6766
|
+
);
|
|
7049
6767
|
}
|
|
7050
|
-
|
|
7051
|
-
|
|
7052
|
-
|
|
7053
|
-
|
|
7054
|
-
|
|
7055
|
-
equal: "is",
|
|
7056
|
-
"==": "is",
|
|
7057
|
-
"=": "is",
|
|
7058
|
-
notEqual: "is_not",
|
|
7059
|
-
isNot: "is_not",
|
|
7060
|
-
"!=": "is_not",
|
|
7061
|
-
"<>": "is_not",
|
|
7062
|
-
// set
|
|
7063
|
-
in: "any_of",
|
|
7064
|
-
isAnyOf: "any_of",
|
|
7065
|
-
oneOf: "any_of",
|
|
7066
|
-
notIn: "none_of",
|
|
7067
|
-
not_in: "none_of",
|
|
7068
|
-
isNoneOf: "none_of",
|
|
7069
|
-
notOneOf: "none_of",
|
|
7070
|
-
// text
|
|
7071
|
-
startsWith: "starts_with",
|
|
7072
|
-
beginsWith: "starts_with",
|
|
7073
|
-
endsWith: "ends_with",
|
|
7074
|
-
doesNotContain: "not_contains",
|
|
7075
|
-
notContain: "not_contains",
|
|
7076
|
-
// nullity
|
|
7077
|
-
isEmpty: "is_empty",
|
|
7078
|
-
isNotEmpty: "is_not_empty",
|
|
7079
|
-
// checkbox
|
|
7080
|
-
isChecked: "is_checked",
|
|
7081
|
-
isUnchecked: "is_not_checked"
|
|
7082
|
-
};
|
|
7083
|
-
var CROSS_TYPE_CONVERSIONS = {
|
|
7084
|
-
date: {
|
|
7085
|
-
gte: "on_or_after",
|
|
7086
|
-
lte: "on_or_before",
|
|
7087
|
-
gt: "after",
|
|
7088
|
-
lt: "before",
|
|
7089
|
-
eq: "is",
|
|
7090
|
-
neq: "is_not"
|
|
7091
|
-
},
|
|
7092
|
-
number: { is: "eq", is_not: "neq" },
|
|
7093
|
-
currency: { is: "eq", is_not: "neq" },
|
|
7094
|
-
text: { eq: "is", neq: "is_not" },
|
|
7095
|
-
phone: { eq: "is", neq: "is_not" },
|
|
7096
|
-
select: { eq: "is", neq: "is_not" },
|
|
7097
|
-
status: { eq: "is", neq: "is_not" },
|
|
7098
|
-
multiselect: { eq: "contains", neq: "not_contains" },
|
|
7099
|
-
relation: { eq: "is", neq: "is_not" },
|
|
7100
|
-
user: { eq: "is", neq: "is_not" },
|
|
7101
|
-
document: { eq: "is", neq: "is_not" },
|
|
7102
|
-
file: { eq: "is", neq: "is_not" },
|
|
7103
|
-
checkbox: { eq: "is_checked", neq: "is_not_checked", is: "is_checked", is_not: "is_not_checked" }
|
|
7104
|
-
};
|
|
7105
|
-
function normalizeOperator(rawOp, effectiveType) {
|
|
7106
|
-
const synonymed = SYNONYM_ALIASES[rawOp] ?? rawOp;
|
|
7107
|
-
const typeMap = CROSS_TYPE_CONVERSIONS[effectiveType];
|
|
7108
|
-
return typeMap?.[synonymed] ?? synonymed;
|
|
6768
|
+
function evaluateFilterState(state, values, attributes) {
|
|
6769
|
+
if (state.rules.length === 0) return true;
|
|
6770
|
+
const attrByName = new Map(attributes.map((a) => [a.name, a]));
|
|
6771
|
+
const reducer = state.combinator === "or" ? "some" : "every";
|
|
6772
|
+
return state.rules[reducer]((rule) => evaluateRule(rule, values, attrByName));
|
|
7109
6773
|
}
|
|
7110
|
-
|
|
7111
|
-
|
|
7112
|
-
|
|
7113
|
-
|
|
7114
|
-
|
|
7115
|
-
|
|
7116
|
-
"is",
|
|
7117
|
-
"is_not",
|
|
7118
|
-
"any_of",
|
|
7119
|
-
"none_of",
|
|
7120
|
-
"is_empty",
|
|
7121
|
-
"is_not_empty"
|
|
7122
|
-
];
|
|
7123
|
-
var SYSTEM_FILTER_OPERATORS = {
|
|
7124
|
-
// Identifier columns (uuid)
|
|
7125
|
-
id: ID_LIKE_OPERATORS,
|
|
7126
|
-
objectId: ID_LIKE_OPERATORS,
|
|
7127
|
-
tenantId: ID_LIKE_OPERATORS,
|
|
7128
|
-
// Free-form text columns share their counterpart's operator set
|
|
7129
|
-
label: OPERATORS_BY_TYPE.text,
|
|
7130
|
-
// Date columns
|
|
7131
|
-
createdAt: OPERATORS_BY_TYPE.date,
|
|
7132
|
-
updatedAt: OPERATORS_BY_TYPE.date,
|
|
7133
|
-
deletedAt: OPERATORS_BY_TYPE.date,
|
|
7134
|
-
// User columns (uuid → actor identity)
|
|
7135
|
-
createdBy: OPERATORS_BY_TYPE.user,
|
|
7136
|
-
lastUpdatedBy: OPERATORS_BY_TYPE.user
|
|
7137
|
-
};
|
|
7138
|
-
var SYSTEM_ATTRIBUTE_TYPES = {
|
|
7139
|
-
id: "id",
|
|
7140
|
-
objectId: "id",
|
|
7141
|
-
tenantId: "id",
|
|
7142
|
-
label: "text",
|
|
7143
|
-
createdAt: "date",
|
|
7144
|
-
updatedAt: "date",
|
|
7145
|
-
deletedAt: "date",
|
|
7146
|
-
createdBy: "user",
|
|
7147
|
-
lastUpdatedBy: "user"
|
|
7148
|
-
};
|
|
7149
|
-
function assertOperatorForType(operator, type, context) {
|
|
7150
|
-
const normalized = normalizeOperator(operator, type);
|
|
7151
|
-
const ops = OPERATORS_BY_TYPE[type];
|
|
7152
|
-
if (!ops?.includes(normalized)) {
|
|
7153
|
-
const validList = ops?.length ? ops.join(", ") : "(no operators registered for this type)";
|
|
7154
|
-
const summary = `Operator "${operator}" is not valid for ${context} type "${type}". Valid operators: ${validList}.`;
|
|
7155
|
-
throw new chunkTS3PJOMZ_js.ValidationError(summary, [
|
|
7156
|
-
{
|
|
7157
|
-
path: ["operator"],
|
|
7158
|
-
message: summary
|
|
7159
|
-
}
|
|
7160
|
-
]);
|
|
7161
|
-
}
|
|
7162
|
-
return normalized;
|
|
7163
|
-
}
|
|
7164
|
-
var RELATIVE_DATE_UNITS = /* @__PURE__ */ new Set(["days", "weeks", "months", "years"]);
|
|
7165
|
-
var RELATIVE_DATE_DIRECTIONS = /* @__PURE__ */ new Set(["past", "future"]);
|
|
7166
|
-
function assertRelativeDateValue(rule) {
|
|
7167
|
-
if (rule.operator !== "is_within") return;
|
|
7168
|
-
const v = rule.value;
|
|
7169
|
-
const valid = typeof v === "object" && v !== null && typeof v.amount === "number" && Number.isFinite(v.amount) && v.amount > 0 && typeof v.unit === "string" && RELATIVE_DATE_UNITS.has(v.unit) && typeof v.direction === "string" && RELATIVE_DATE_DIRECTIONS.has(v.direction);
|
|
7170
|
-
if (!valid) {
|
|
7171
|
-
const m = `Operator "is_within" requires a relative-date value { amount: positive number, unit: days|weeks|months|years, direction: past|future }`;
|
|
7172
|
-
throw new chunkTS3PJOMZ_js.ValidationError(m, [{ path: ["value"], message: m }]);
|
|
7173
|
-
}
|
|
7174
|
-
}
|
|
7175
|
-
function assertDynamicValueForAttribute(rule, attrType) {
|
|
7176
|
-
if (!isDynamicValue(rule.value)) return;
|
|
7177
|
-
const v = rule.value;
|
|
7178
|
-
if (v.dynamic === "actor" && attrType !== "user") {
|
|
7179
|
-
const m = `actor token (@me) is only valid on user attributes, not "${attrType}"`;
|
|
7180
|
-
throw new chunkTS3PJOMZ_js.ValidationError(m, [{ path: ["value"], message: m }]);
|
|
7181
|
-
}
|
|
7182
|
-
if (v.dynamic === "date" && attrType !== "date") {
|
|
7183
|
-
const m = `date token (@today/@now) is only valid on date attributes, not "${attrType}"`;
|
|
7184
|
-
throw new chunkTS3PJOMZ_js.ValidationError(m, [{ path: ["value"], message: m }]);
|
|
7185
|
-
}
|
|
7186
|
-
}
|
|
7187
|
-
function validateQualifiedRule(rule, context) {
|
|
7188
|
-
const rootAttr = context.attributes.find((a) => a.name === rule.attribute);
|
|
7189
|
-
const systemOps = SYSTEM_FILTER_OPERATORS[rule.attribute];
|
|
7190
|
-
if (!(rootAttr || systemOps)) {
|
|
7191
|
-
throw new chunkTS3PJOMZ_js.ValidationError(`Unknown attribute: ${rule.attribute}`, [
|
|
7192
|
-
{ path: ["attribute"], message: `Unknown attribute: ${rule.attribute}` }
|
|
7193
|
-
]);
|
|
7194
|
-
}
|
|
7195
|
-
if (rule.quantifier !== void 0 && !rule.property) {
|
|
7196
|
-
const m = `quantifier is only valid on qualified edge rules (set "property")`;
|
|
7197
|
-
throw new chunkTS3PJOMZ_js.ValidationError(m, [{ path: ["quantifier"], message: m }]);
|
|
7198
|
-
}
|
|
7199
|
-
if (!rootAttr) {
|
|
7200
|
-
if (rule.property) {
|
|
7201
|
-
throw new chunkTS3PJOMZ_js.ValidationError(`Cannot qualify system attribute "${rule.attribute}"`, [
|
|
7202
|
-
{ path: ["property"], message: `"${rule.attribute}" is a system column, not a reference` }
|
|
7203
|
-
]);
|
|
7204
|
-
}
|
|
7205
|
-
const effectiveType = SYSTEM_ATTRIBUTE_TYPES[rule.attribute] ?? "id";
|
|
7206
|
-
const normalizedOperator = normalizeOperator(
|
|
7207
|
-
rule.operator,
|
|
7208
|
-
effectiveType
|
|
7209
|
-
);
|
|
7210
|
-
if (!systemOps.includes(normalizedOperator)) {
|
|
7211
|
-
const summary = `Operator "${rule.operator}" is not valid for system attribute "${rule.attribute}". Valid operators: ${systemOps.join(", ")}.`;
|
|
7212
|
-
throw new chunkTS3PJOMZ_js.ValidationError(summary, [{ path: ["operator"], message: summary }]);
|
|
7213
|
-
}
|
|
7214
|
-
rule.operator = normalizedOperator;
|
|
7215
|
-
assertRelativeDateValue(rule);
|
|
7216
|
-
return;
|
|
7217
|
-
}
|
|
7218
|
-
if (!rule.property) {
|
|
7219
|
-
assertDynamicValueForAttribute(rule, rootAttr.type);
|
|
7220
|
-
const ops = getAttributeFilterOperators(rootAttr);
|
|
7221
|
-
const normalizedOperator = normalizeOperator(
|
|
7222
|
-
rule.operator,
|
|
7223
|
-
rootAttr.type
|
|
7224
|
-
);
|
|
7225
|
-
if (!ops.includes(normalizedOperator)) {
|
|
7226
|
-
const validList = ops.length ? ops.join(", ") : "(not filterable)";
|
|
7227
|
-
const summary = `Operator "${rule.operator}" is not valid for attribute "${rootAttr.name}". Valid operators: ${validList}.`;
|
|
7228
|
-
throw new chunkTS3PJOMZ_js.ValidationError(summary, [{ path: ["operator"], message: summary }]);
|
|
7229
|
-
}
|
|
7230
|
-
rule.operator = normalizedOperator;
|
|
7231
|
-
assertRelativeDateValue(rule);
|
|
7232
|
-
return;
|
|
7233
|
-
}
|
|
7234
|
-
if (!REFERENCE_TYPES.has(rootAttr.type)) {
|
|
7235
|
-
throw new chunkTS3PJOMZ_js.ValidationError(`Cannot qualify ${rootAttr.type} attribute "${rule.attribute}"`, [
|
|
7236
|
-
{ path: ["property"], message: `Attribute "${rule.attribute}" is not a reference type` }
|
|
7237
|
-
]);
|
|
7238
|
-
}
|
|
7239
|
-
const propSchema = rootAttr.properties;
|
|
7240
|
-
if (!propSchema) {
|
|
7241
|
-
throw new chunkTS3PJOMZ_js.ValidationError(`Attribute "${rule.attribute}" has no qualifyWith schema`, [
|
|
7242
|
-
{ path: ["property"], message: `"${rule.attribute}" has no qualifyWith` }
|
|
7243
|
-
]);
|
|
7244
|
-
}
|
|
7245
|
-
const propDef = propSchema.definitions.find((p) => p.name === rule.property);
|
|
7246
|
-
if (!propDef) {
|
|
7247
|
-
throw new chunkTS3PJOMZ_js.ValidationError(
|
|
7248
|
-
`Property "${rule.property}" not defined on "${rule.attribute}".qualifyWith()`,
|
|
7249
|
-
[{ path: ["property"], message: `Unknown property: ${rule.property}` }]
|
|
6774
|
+
function evaluateRule(rule, values, attrByName) {
|
|
6775
|
+
const attr = attrByName.get(rule.attribute);
|
|
6776
|
+
if (!attr) return false;
|
|
6777
|
+
if (rule.property) {
|
|
6778
|
+
const property = resolvePropertyDefinitions(attr).find(
|
|
6779
|
+
(definition) => definition.name === rule.property
|
|
7250
6780
|
);
|
|
6781
|
+
if (!property) return false;
|
|
6782
|
+
const positiveOperator = normalizeForEdgeRpc(rule.operator);
|
|
6783
|
+
const propertySpec = OPERATOR_SPECS[positiveOperator];
|
|
6784
|
+
if (!propertySpec?.appliesTo.includes(property.type)) return false;
|
|
6785
|
+
const rootValue = values[rule.attribute];
|
|
6786
|
+
const references = Array.isArray(rootValue) ? rootValue : rootValue == null ? [] : [rootValue];
|
|
6787
|
+
const matches = references.some((reference) => {
|
|
6788
|
+
if (typeof reference !== "object" || reference === null) return false;
|
|
6789
|
+
const props = reference.props;
|
|
6790
|
+
if (typeof props !== "object" || props === null) return false;
|
|
6791
|
+
return evaluateNormalizedComparands(
|
|
6792
|
+
propertySpec,
|
|
6793
|
+
property.type,
|
|
6794
|
+
positiveOperator,
|
|
6795
|
+
props[rule.property],
|
|
6796
|
+
rule.value,
|
|
6797
|
+
property
|
|
6798
|
+
);
|
|
6799
|
+
});
|
|
6800
|
+
return (rule.quantifier ?? getOperatorPolarity(rule.operator)) === "none" ? !matches : matches;
|
|
7251
6801
|
}
|
|
7252
|
-
|
|
7253
|
-
|
|
7254
|
-
|
|
7255
|
-
|
|
7256
|
-
|
|
7257
|
-
|
|
7258
|
-
|
|
7259
|
-
|
|
7260
|
-
|
|
7261
|
-
|
|
7262
|
-
|
|
7263
|
-
|
|
6802
|
+
const spec = OPERATOR_SPECS[rule.operator];
|
|
6803
|
+
if (!spec) return false;
|
|
6804
|
+
if (!spec.appliesTo.includes(attr.type)) return false;
|
|
6805
|
+
const rawValue = values[rule.attribute];
|
|
6806
|
+
const value = attr.type === "relation" || attr.type === "document" || attr.type === "user" ? normalizeReferenceIds(rawValue) : rawValue;
|
|
6807
|
+
return evaluateNormalizedComparands(spec, attr.type, rule.operator, value, rule.value, attr);
|
|
6808
|
+
}
|
|
6809
|
+
function evaluateNormalizedComparands(spec, type, operator, storedValue, ruleValue, attribute) {
|
|
6810
|
+
const [normalizedStored, normalizedRule] = normalizeOperatorComparands(
|
|
6811
|
+
type,
|
|
6812
|
+
operator,
|
|
6813
|
+
storedValue,
|
|
6814
|
+
ruleValue
|
|
6815
|
+
);
|
|
6816
|
+
if (type === "phone" && normalizedRule === "" && operator === "contains") return false;
|
|
6817
|
+
if (type === "phone" && normalizedRule === "" && operator === "not_contains") return true;
|
|
6818
|
+
return spec.evaluateInMemory(normalizedStored, normalizedRule, attribute);
|
|
6819
|
+
}
|
|
6820
|
+
function normalizeOperatorComparands(type, operator, storedValue, ruleValue) {
|
|
6821
|
+
if (type === "date" && (operator === "is" || operator === "is_not")) {
|
|
6822
|
+
return [normalizeUtcCalendarDay(storedValue), normalizeUtcCalendarDay(ruleValue)];
|
|
6823
|
+
}
|
|
6824
|
+
if (type === "phone") return normalizePhoneComparands(storedValue, ruleValue);
|
|
6825
|
+
return [normalizeComparableValue(type, storedValue), normalizeComparableValue(type, ruleValue)];
|
|
6826
|
+
}
|
|
6827
|
+
function normalizeUtcCalendarDay(value) {
|
|
6828
|
+
if (value instanceof Date)
|
|
6829
|
+
return Number.isNaN(value.getTime()) ? null : value.toISOString().slice(0, 10);
|
|
6830
|
+
if (typeof value !== "string" || value === "") return null;
|
|
6831
|
+
if (/^\d{4}-\d{2}-\d{2}$/.test(value)) return value;
|
|
6832
|
+
const date2 = new Date(value);
|
|
6833
|
+
return Number.isNaN(date2.getTime()) ? null : date2.toISOString().slice(0, 10);
|
|
6834
|
+
}
|
|
6835
|
+
function normalizePhoneComparands(stored, rule) {
|
|
6836
|
+
const rulePhone = typeof rule === "object" && rule !== null ? rule : { };
|
|
6837
|
+
const ruleCountry = typeof rulePhone.countryCode === "string" ? rulePhone.countryCode : void 0;
|
|
6838
|
+
const normalizeOne = (value) => {
|
|
6839
|
+
const phone2 = typeof value === "object" && value !== null ? value : { phoneNumber: value };
|
|
6840
|
+
if (typeof phone2.phoneNumber !== "string") return null;
|
|
6841
|
+
if (!ruleCountry) return chunkQ4SZAMJT_js.normalizeCountrylessPhoneNumber(phone2.phoneNumber);
|
|
6842
|
+
const country = typeof phone2.countryCode === "string" ? phone2.countryCode : ruleCountry;
|
|
6843
|
+
return `${country}:${chunkQ4SZAMJT_js.normalizePhoneNumber(phone2.phoneNumber, country)}`;
|
|
6844
|
+
};
|
|
6845
|
+
return [normalizeOne(stored), normalizeOne(rule)];
|
|
7264
6846
|
}
|
|
7265
|
-
function
|
|
7266
|
-
if (
|
|
7267
|
-
if (
|
|
7268
|
-
return value.
|
|
6847
|
+
function normalizeComparableValue(type, value) {
|
|
6848
|
+
if (type === "currency") return extractCurrencyFilterValue(value);
|
|
6849
|
+
if (type === "date") {
|
|
6850
|
+
if (value instanceof Date) return Number.isNaN(value.getTime()) ? null : value.toISOString();
|
|
6851
|
+
return value;
|
|
7269
6852
|
}
|
|
7270
6853
|
return value;
|
|
7271
6854
|
}
|
|
6855
|
+
function normalizeReferenceIds(value) {
|
|
6856
|
+
const normalizeOne = (candidate) => {
|
|
6857
|
+
if (typeof candidate !== "object" || candidate === null) return candidate;
|
|
6858
|
+
return candidate.id;
|
|
6859
|
+
};
|
|
6860
|
+
return Array.isArray(value) ? value.map(normalizeOne) : normalizeOne(value);
|
|
6861
|
+
}
|
|
7272
6862
|
|
|
7273
6863
|
// src/connectors/types.ts
|
|
7274
6864
|
var CONNECTOR_CALLBACK_PARAM = {
|
|
@@ -7292,10 +6882,10 @@ function canonicalStringify(value) {
|
|
|
7292
6882
|
case "object":
|
|
7293
6883
|
break;
|
|
7294
6884
|
default:
|
|
7295
|
-
throw new
|
|
6885
|
+
throw new chunkFDIAOFHS_js.ValidationError(`Cannot canonicalize value of type ${typeof v}`, []);
|
|
7296
6886
|
}
|
|
7297
6887
|
const obj = v;
|
|
7298
|
-
if (seen.has(obj)) throw new
|
|
6888
|
+
if (seen.has(obj)) throw new chunkFDIAOFHS_js.ValidationError("Cannot canonicalize circular structure", []);
|
|
7299
6889
|
seen.add(obj);
|
|
7300
6890
|
try {
|
|
7301
6891
|
if (Array.isArray(obj)) return `[${obj.map((e) => encode(e) ?? "null").join(",")}]`;
|
|
@@ -7320,6 +6910,420 @@ function viewSyncPayload(view) {
|
|
|
7320
6910
|
};
|
|
7321
6911
|
}
|
|
7322
6912
|
|
|
6913
|
+
// src/types/schema-plan.ts
|
|
6914
|
+
function hasDestructiveEntries(plan) {
|
|
6915
|
+
const { attributeRemovals, objectRemovals, renames } = plan.destructive;
|
|
6916
|
+
return attributeRemovals.length > 0 || objectRemovals.length > 0 || renames.length > 0;
|
|
6917
|
+
}
|
|
6918
|
+
var SCHEMA_PLAN_LIMITS = {
|
|
6919
|
+
objectAdditions: 20,
|
|
6920
|
+
totalMutations: 500,
|
|
6921
|
+
serializedBytes: 512 * 1024
|
|
6922
|
+
};
|
|
6923
|
+
function errorMessage(error) {
|
|
6924
|
+
return error instanceof Error ? error.message : String(error);
|
|
6925
|
+
}
|
|
6926
|
+
var attributeTypeSchema = z2.z.enum([
|
|
6927
|
+
"text",
|
|
6928
|
+
"richtext",
|
|
6929
|
+
"number",
|
|
6930
|
+
"checkbox",
|
|
6931
|
+
"date",
|
|
6932
|
+
"phone",
|
|
6933
|
+
"currency",
|
|
6934
|
+
"status",
|
|
6935
|
+
"location",
|
|
6936
|
+
"select",
|
|
6937
|
+
"multiselect",
|
|
6938
|
+
"user",
|
|
6939
|
+
"relation",
|
|
6940
|
+
"formula",
|
|
6941
|
+
"rollup",
|
|
6942
|
+
"document"
|
|
6943
|
+
]).describe(
|
|
6944
|
+
'The attribute\'s data type. Determines which keys `config` accepts and requires: `status`/`select`/`multiselect` need a non-empty `options` array (each `status` option carrying its own `group`); `relation` needs `targets` (non-empty) and `cardinality` ("one" or "many"); `formula` needs `expression` and `returnType`; `rollup` needs `targetAttribute` and `function`. Every other type accepts only the shared presentation keys (`placeholder`, `defaultValue`, `icon`, ...) plus a few type-specific optionals (e.g. `number.decimals`, `date.dateFormat`). An attribute\'s type can never be changed later through this tool \u2014 only through a code migration \u2014 so pick it correctly now.'
|
|
6945
|
+
);
|
|
6946
|
+
var attributeNameSchema = z2.z.string().min(1).superRefine((name, ctx) => {
|
|
6947
|
+
try {
|
|
6948
|
+
validateAttributeName(name);
|
|
6949
|
+
} catch (error) {
|
|
6950
|
+
ctx.addIssue({ code: z2.z.ZodIssueCode.custom, message: errorMessage(error) });
|
|
6951
|
+
}
|
|
6952
|
+
}).describe(
|
|
6953
|
+
'The attribute\'s machine name \u2014 the record\'s field key, and what `{{ name }}` refers to in a labelExpression. Must be a valid identifier: starts with a letter or underscore, then only letters/digits/underscores ("montantHt", "first_name", "FIRST_NAME" are valid; "first-name", "first name", "123name" are not). Max 63 characters. Cannot be a name reserved by the record shape itself (id, createdAt, updatedAt, createdBy, lastUpdatedBy, objectId, label, embeddingText, values, metadata, deletedAt, deletedBy, schemaVersion).'
|
|
6954
|
+
);
|
|
6955
|
+
var objectNameSchema = z2.z.string().min(1).superRefine((name, ctx) => {
|
|
6956
|
+
if (chunk6ZDH3EJA_js.RESERVED_OBJECT_NAMES.includes(name)) {
|
|
6957
|
+
ctx.addIssue({
|
|
6958
|
+
code: z2.z.ZodIssueCode.custom,
|
|
6959
|
+
message: `"${name}" is a reserved object name (${chunk6ZDH3EJA_js.RESERVED_OBJECT_NAMES.join(", ")}) and cannot be used for a new object.`
|
|
6960
|
+
});
|
|
6961
|
+
}
|
|
6962
|
+
try {
|
|
6963
|
+
validateObjectName(name);
|
|
6964
|
+
} catch (error) {
|
|
6965
|
+
ctx.addIssue({ code: z2.z.ZodIssueCode.custom, message: errorMessage(error) });
|
|
6966
|
+
}
|
|
6967
|
+
}).describe(
|
|
6968
|
+
`The new object's machine name: kebab-case slug, lowercase letters/digits/hyphens only, starting with a letter ("products", "user-profiles", "order-items" are valid; "Products", "userProfiles", "user_profiles" are not). Max 63 characters. Cannot be a name the platform reserves for its own system objects, and cannot already exist.`
|
|
6969
|
+
);
|
|
6970
|
+
function withConfigCheck(schema) {
|
|
6971
|
+
return schema.superRefine((attribute, ctx) => {
|
|
6972
|
+
try {
|
|
6973
|
+
const parsedConfig = chunkQN2N3IJZ_js.parseAttributeConfigForCreate(attribute.type, {
|
|
6974
|
+
...attribute.config ?? {},
|
|
6975
|
+
description: attribute.description
|
|
6976
|
+
});
|
|
6977
|
+
const unknownKeys = Object.keys(attribute.config ?? {}).filter(
|
|
6978
|
+
(key) => !Object.hasOwn(parsedConfig, key)
|
|
6979
|
+
);
|
|
6980
|
+
if (unknownKeys.length > 0) {
|
|
6981
|
+
ctx.addIssue({
|
|
6982
|
+
code: "unrecognized_keys",
|
|
6983
|
+
keys: unknownKeys,
|
|
6984
|
+
path: ["config"],
|
|
6985
|
+
message: `Unrecognized attribute config key${unknownKeys.length === 1 ? "" : "s"}: ${unknownKeys.join(", ")}`
|
|
6986
|
+
});
|
|
6987
|
+
}
|
|
6988
|
+
} catch (error) {
|
|
6989
|
+
if (error instanceof chunkFDIAOFHS_js.ValidationError) {
|
|
6990
|
+
for (const issue of error.errors) {
|
|
6991
|
+
ctx.addIssue({
|
|
6992
|
+
code: z2.z.ZodIssueCode.custom,
|
|
6993
|
+
path: [
|
|
6994
|
+
"config",
|
|
6995
|
+
...issue.path.map((segment) => /^\d+$/.test(segment) ? Number(segment) : segment)
|
|
6996
|
+
],
|
|
6997
|
+
message: `Config for type "${attribute.type}" is invalid or incomplete: ${issue.message}`
|
|
6998
|
+
});
|
|
6999
|
+
}
|
|
7000
|
+
return;
|
|
7001
|
+
}
|
|
7002
|
+
ctx.addIssue({
|
|
7003
|
+
code: z2.z.ZodIssueCode.custom,
|
|
7004
|
+
path: ["config"],
|
|
7005
|
+
message: `Config for type "${attribute.type}" is invalid or incomplete: ${errorMessage(error)}`
|
|
7006
|
+
});
|
|
7007
|
+
}
|
|
7008
|
+
});
|
|
7009
|
+
}
|
|
7010
|
+
var plannedAttributeBaseSchema = z2.z.object({
|
|
7011
|
+
objectName: z2.z.string().min(1).describe(
|
|
7012
|
+
"Name of the existing (or, elsewhere in the same plan, newly created) object this attribute is added to. Ignored for an attribute declared inline in `additive.objects[].attributes` \u2014 there the parent object's own `name` is used instead."
|
|
7013
|
+
),
|
|
7014
|
+
name: attributeNameSchema,
|
|
7015
|
+
label: z2.z.string().min(1).max(128).describe("Human-readable display label shown in the UI. 1-128 characters, cannot be empty."),
|
|
7016
|
+
type: attributeTypeSchema,
|
|
7017
|
+
config: z2.z.record(z2.z.string(), z2.z.unknown()).optional().describe(
|
|
7018
|
+
'Type-specific configuration; required keys depend on `type` (see `type`\'s description). Shared optional keys on every type: `placeholder`, `defaultValue`, `icon`, `order`, `hidden`, `archived`, `deprecated`, `metadata`. Per-type keys: `text` \u2014 `multiline`, `minLength`, `maxLength`, `pattern`, `format` ("email"|"url"|"slug"); `number` \u2014 `renderAs` ("number"|"rating"), `min`, `max`, `unit`, `decimals`; `date` \u2014 `dateFormat`, `minDate`, `maxDate`, `includeTime`, `endDate`, `timeFormat` ("12h"|"24h"); `phone` \u2014 `defaultCountryCode` (3-letter); `currency` \u2014 `defaultCurrency`, `allowedCurrencies`, `allowNegative`; `status`/`select`/`multiselect` \u2014 `options` (REQUIRED, non-empty array of `{ value, label, color }`, unique `value`s; for `status` every OPTION also carries `group` as idle|in_progress|finished \u2014 `group` belongs on each option, never on `config` itself; select/multiselect accept `renderAs: "badges"`); `location` \u2014 `granularity`, `defaultCountry`, `allowedCountries`; `user` \u2014 `types` ("user"|"agent"), `multiple`; `relation` \u2014 `targets` (REQUIRED, non-empty array of `{ object }`) and `cardinality` (REQUIRED, "one"|"many"); `formula` \u2014 `expression` (REQUIRED formula string) and `returnType` (REQUIRED); `rollup` \u2014 `targetAttribute` (REQUIRED) and `function` (REQUIRED, e.g. "sum"|"avg"|"count"); `document` \u2014 `properties`, `accepts`, `maxFileSize`. Omit entirely for `richtext`/`checkbox`, which take no type-specific keys.'
|
|
7019
|
+
),
|
|
7020
|
+
required: z2.z.boolean().optional().describe(
|
|
7021
|
+
"Whether the attribute must have a value on every record. Defaults to false (optional)."
|
|
7022
|
+
),
|
|
7023
|
+
description: z2.z.string().optional().describe("Help text shown under the field in the UI. Not the same as the plan's `summary`.")
|
|
7024
|
+
}).strict();
|
|
7025
|
+
var plannedAttributeSchema = withConfigCheck(plannedAttributeBaseSchema);
|
|
7026
|
+
var plannedInlineAttributeSchema = withConfigCheck(
|
|
7027
|
+
plannedAttributeBaseSchema.omit({ objectName: true })
|
|
7028
|
+
);
|
|
7029
|
+
var plannedObjectSchema = z2.z.object({
|
|
7030
|
+
name: objectNameSchema,
|
|
7031
|
+
label: z2.z.string().min(1).describe('Human-readable singular display label (e.g. "Devis").'),
|
|
7032
|
+
pluralLabel: z2.z.string().optional().describe(
|
|
7033
|
+
'Human-readable plural display label (e.g. "Devis"/"Invoices"). Defaults from `label` if omitted.'
|
|
7034
|
+
),
|
|
7035
|
+
description: z2.z.string().optional().describe("Help text describing what this object represents."),
|
|
7036
|
+
icon: chunkQN2N3IJZ_js.iconNameSchema.describe(
|
|
7037
|
+
"Required icon name for the object. Must be a catalogue value \u2014 call `search_icons` and use a name it returns verbatim. A name that is not in the catalogue is rejected without any hint as to what would have worked, so never guess one."
|
|
7038
|
+
),
|
|
7039
|
+
labelExpression: labelExpressionSchema.describe(
|
|
7040
|
+
'Template used to render a human-readable label for every record of this object \u2014 e.g. shown in relations, search results, and breadcrumbs. MUST contain at least one `{{ attributeName }}` interpolation referencing an attribute this object will actually have (either declared in this same `attributes` array, or an existing attribute if this is an update) \u2014 a plain string with no `{{ }}` at all (e.g. "Devis") is rejected. Interpolations cannot be empty (`{{ }}` is rejected) and only these pipes are allowed: UPPER, LOWER, capitalize, trim, prefix:"...", suffix:"...", wrap:"..." "...", default:"...". `{{ a || b }}` falls back to `b` when `a` is empty. Examples: "{{ firstName }} {{ lastName }}", "{{ numero | UPPER }}", "{{ name || reference }}".'
|
|
7041
|
+
),
|
|
7042
|
+
// Inline attributes get the SAME validation as attributes added to an
|
|
7043
|
+
// existing object, minus `objectName` which the parent supplies. Anything
|
|
7044
|
+
// weaker would let an agent slip a typeless attribute into a new object
|
|
7045
|
+
// while the strict path above rejects the identical mistake.
|
|
7046
|
+
attributes: z2.z.array(plannedInlineAttributeSchema).default([]).describe(
|
|
7047
|
+
"Attributes to create on this new object, inline. Same rules as a standalone entry in `additive.attributes`, minus `objectName` (implied by this object). At least one attribute referenced by `labelExpression` should be included here."
|
|
7048
|
+
)
|
|
7049
|
+
}).strict();
|
|
7050
|
+
var destructiveSchema = z2.z.object({
|
|
7051
|
+
attributeRemovals: z2.z.array(
|
|
7052
|
+
z2.z.object({
|
|
7053
|
+
objectName: z2.z.string().min(1).describe("Object the attribute is removed from."),
|
|
7054
|
+
attributeName: z2.z.string().min(1).describe(
|
|
7055
|
+
"Attribute to delete, together with every record's stored value for it. Must not be a system (code-declared) attribute, and must not be referenced by the object's own `labelExpression` or `embeddingExpression` \u2014 update those first."
|
|
7056
|
+
)
|
|
7057
|
+
}).strict()
|
|
7058
|
+
).default([]).describe(
|
|
7059
|
+
"Attributes to permanently delete. Irreversible: record values for the attribute are purged."
|
|
7060
|
+
),
|
|
7061
|
+
objectRemovals: z2.z.array(
|
|
7062
|
+
z2.z.object({
|
|
7063
|
+
objectName: z2.z.string().min(1).describe(
|
|
7064
|
+
"Object to delete entirely, together with all its records. Must not be a system (code-declared) object, and must not still be targeted by a `relation` attribute on another object \u2014 retarget or remove that relation first."
|
|
7065
|
+
)
|
|
7066
|
+
}).strict()
|
|
7067
|
+
).default([]).describe("Objects to permanently delete, records included. Irreversible."),
|
|
7068
|
+
renames: z2.z.array(
|
|
7069
|
+
z2.z.object({
|
|
7070
|
+
objectName: z2.z.string().min(1).describe("Object the renamed attribute belongs to."),
|
|
7071
|
+
from: z2.z.string().min(1).describe(
|
|
7072
|
+
"Current attribute name. Must already exist and not be a system attribute."
|
|
7073
|
+
),
|
|
7074
|
+
to: attributeNameSchema.describe(
|
|
7075
|
+
"New attribute name \u2014 same identifier rules as any attribute `name` (see `name` on a planned attribute), and must not collide with another name already on the object, including one added elsewhere in this same plan."
|
|
7076
|
+
)
|
|
7077
|
+
}).strict()
|
|
7078
|
+
).default([]).describe(
|
|
7079
|
+
"Attribute renames. Every reference to the old name (labelExpression, views, formulas) must be updated separately \u2014 a rename does not follow references automatically."
|
|
7080
|
+
)
|
|
7081
|
+
}).strict().default({ attributeRemovals: [], objectRemovals: [], renames: [] });
|
|
7082
|
+
var planSummarySchema = z2.z.string().min(1).describe(
|
|
7083
|
+
"One or two plain-language sentences describing the change and why, shown to the human who approves or rejects the plan \u2014 this is the only free-text context they see before deciding. If `destructive` is non-empty, say plainly what will be lost (e.g. 'deletes the \"ancienMontant\" column and its data on every devis'). Do not restate the raw plan \u2014 explain intent."
|
|
7084
|
+
);
|
|
7085
|
+
var CANONICAL_CONFIG_DESCRIPTION = "The COMPLETE config this view should end up with \u2014 not a patch. Copy the baseline returned by get_default_view and edit it, preserving every tab and setting you are not changing: anything you omit is dropped. To change the columns shown, set `tabs[].columns` (an array of attribute names) \u2014 there is no top-level `columns` on either view type. For a detail view's side panel, set `sidePanel.attributes`. Every attribute name listed must already exist on the object, or be created earlier in this same plan. ONE EXCEPTION to omit-is-dropped: a tab with `type: \"custom\"` renders a component belonging to the application, which you cannot describe or recreate. Copy every such tab through from the baseline exactly as it came, `name`, `component` and `props` untouched \u2014 dropping one, inventing one, or altering any of those three is rejected rather than applied (`name` is the tab's address in links, not its wording). Its `label` and `icon` you may change.";
|
|
7086
|
+
var BASELINE_TOKEN_DESCRIPTION = "Opaque token returned by get_default_view alongside the baseline you edited. REQUIRED when the object already exists \u2014 it proves you authored against the baseline that is still current. Must be OMITTED when this plan creates the object, which has no baseline yet.";
|
|
7087
|
+
var viewTargetObjectNameSchema = z2.z.string().min(1).describe(
|
|
7088
|
+
"Name of the object whose default view of this type is replaced. Not a view name \u2014 a plan can only replace an object's deterministic default view, never create a view or target a non-default one."
|
|
7089
|
+
);
|
|
7090
|
+
var proposedDefaultViewTargetSchema = z2.z.discriminatedUnion("viewType", [
|
|
7091
|
+
z2.z.object({
|
|
7092
|
+
objectName: viewTargetObjectNameSchema,
|
|
7093
|
+
viewType: z2.z.literal("list").describe("Targets the object's default list view (the grid)."),
|
|
7094
|
+
canonicalConfig: chunk6ZDH3EJA_js.listViewConfigSchema.describe(CANONICAL_CONFIG_DESCRIPTION),
|
|
7095
|
+
baselineToken: z2.z.string().min(1).optional().describe(BASELINE_TOKEN_DESCRIPTION)
|
|
7096
|
+
}).strict(),
|
|
7097
|
+
z2.z.object({
|
|
7098
|
+
objectName: viewTargetObjectNameSchema,
|
|
7099
|
+
viewType: z2.z.literal("detail").describe("Targets the object's default detail view (the single-record view)."),
|
|
7100
|
+
canonicalConfig: chunk6ZDH3EJA_js.detailViewConfigSchema.describe(CANONICAL_CONFIG_DESCRIPTION),
|
|
7101
|
+
baselineToken: z2.z.string().min(1).optional().describe(BASELINE_TOKEN_DESCRIPTION)
|
|
7102
|
+
}).strict()
|
|
7103
|
+
]);
|
|
7104
|
+
var canonicalHashSchema = z2.z.string().regex(/^[0-9a-f]{64}$/, "Expected a lowercase SHA-256 hash");
|
|
7105
|
+
var persistedBaselineFields = {
|
|
7106
|
+
baseConfigHash: canonicalHashSchema.nullable(),
|
|
7107
|
+
targetConfigHash: canonicalHashSchema,
|
|
7108
|
+
baselineOrigin: z2.z.enum(["persisted", "generated", "absent"])
|
|
7109
|
+
};
|
|
7110
|
+
var persistedDefaultViewTargetSchema = z2.z.discriminatedUnion("viewType", [
|
|
7111
|
+
z2.z.object({
|
|
7112
|
+
objectName: z2.z.string().min(1),
|
|
7113
|
+
viewType: z2.z.literal("list"),
|
|
7114
|
+
canonicalConfig: chunk6ZDH3EJA_js.listViewConfigSchema,
|
|
7115
|
+
...persistedBaselineFields
|
|
7116
|
+
}).strict(),
|
|
7117
|
+
z2.z.object({
|
|
7118
|
+
objectName: z2.z.string().min(1),
|
|
7119
|
+
viewType: z2.z.literal("detail"),
|
|
7120
|
+
canonicalConfig: chunk6ZDH3EJA_js.detailViewConfigSchema,
|
|
7121
|
+
...persistedBaselineFields
|
|
7122
|
+
}).strict()
|
|
7123
|
+
]).superRefine((target, ctx) => {
|
|
7124
|
+
const requiresHash = target.baselineOrigin !== "absent";
|
|
7125
|
+
if (requiresHash === (target.baseConfigHash !== null)) return;
|
|
7126
|
+
ctx.addIssue({
|
|
7127
|
+
code: "custom",
|
|
7128
|
+
path: ["baseConfigHash"],
|
|
7129
|
+
message: requiresHash ? `A ${target.baselineOrigin} baseline requires baseConfigHash` : "An absent baseline requires baseConfigHash to be null"
|
|
7130
|
+
});
|
|
7131
|
+
});
|
|
7132
|
+
function buildAdditiveSchema(viewTargetSchema) {
|
|
7133
|
+
return z2.z.object({
|
|
7134
|
+
objects: z2.z.array(plannedObjectSchema).default([]).describe("New objects to create, with their attributes inline."),
|
|
7135
|
+
attributes: z2.z.array(plannedAttributeSchema).default([]).describe("Attributes to add to existing or same-plan objects."),
|
|
7136
|
+
viewUpdates: z2.z.array(viewTargetSchema).default([]).describe("Complete target configs for deterministic default views; never view names.")
|
|
7137
|
+
}).strict().default({ objects: [], attributes: [], viewUpdates: [] });
|
|
7138
|
+
}
|
|
7139
|
+
function findJsonSafetyIssue(value, path = [], activeObjects = /* @__PURE__ */ new WeakSet()) {
|
|
7140
|
+
if (value === null || typeof value === "string" || typeof value === "boolean") return null;
|
|
7141
|
+
if (typeof value === "number") {
|
|
7142
|
+
if (!Number.isFinite(value)) {
|
|
7143
|
+
return { path, message: "Plan input contains a non-finite number" };
|
|
7144
|
+
}
|
|
7145
|
+
return null;
|
|
7146
|
+
}
|
|
7147
|
+
if (typeof value !== "object") {
|
|
7148
|
+
return { path, message: "Plan input must contain only JSON-safe values" };
|
|
7149
|
+
}
|
|
7150
|
+
if (activeObjects.has(value)) {
|
|
7151
|
+
return { path, message: "Plan input cannot contain circular references" };
|
|
7152
|
+
}
|
|
7153
|
+
if (Array.isArray(value)) {
|
|
7154
|
+
activeObjects.add(value);
|
|
7155
|
+
for (const key of Reflect.ownKeys(value)) {
|
|
7156
|
+
if (key === "length") continue;
|
|
7157
|
+
if (typeof key === "symbol" || !/^(0|[1-9]\d*)$/.test(key)) {
|
|
7158
|
+
activeObjects.delete(value);
|
|
7159
|
+
return {
|
|
7160
|
+
path: [...path, key],
|
|
7161
|
+
message: "Plan input arrays cannot contain non-index JSON properties"
|
|
7162
|
+
};
|
|
7163
|
+
}
|
|
7164
|
+
}
|
|
7165
|
+
for (let index = 0; index < value.length; index++) {
|
|
7166
|
+
if (!Object.hasOwn(value, index)) {
|
|
7167
|
+
activeObjects.delete(value);
|
|
7168
|
+
return {
|
|
7169
|
+
path: [...path, index],
|
|
7170
|
+
message: "Plan input cannot contain sparse arrays"
|
|
7171
|
+
};
|
|
7172
|
+
}
|
|
7173
|
+
const issue = findJsonSafetyIssue(value[index], [...path, index], activeObjects);
|
|
7174
|
+
if (issue) {
|
|
7175
|
+
activeObjects.delete(value);
|
|
7176
|
+
return issue;
|
|
7177
|
+
}
|
|
7178
|
+
}
|
|
7179
|
+
activeObjects.delete(value);
|
|
7180
|
+
return null;
|
|
7181
|
+
}
|
|
7182
|
+
const prototype = Object.getPrototypeOf(value);
|
|
7183
|
+
if (prototype !== Object.prototype && prototype !== null) {
|
|
7184
|
+
return { path, message: "Plan input must contain only plain JSON objects" };
|
|
7185
|
+
}
|
|
7186
|
+
activeObjects.add(value);
|
|
7187
|
+
const record = value;
|
|
7188
|
+
const keys = Reflect.ownKeys(record);
|
|
7189
|
+
for (const key of keys) {
|
|
7190
|
+
const descriptor = Object.getOwnPropertyDescriptor(record, key);
|
|
7191
|
+
if (typeof key === "symbol" || !(descriptor?.enumerable && "value" in descriptor)) {
|
|
7192
|
+
activeObjects.delete(value);
|
|
7193
|
+
return {
|
|
7194
|
+
path: [...path, key],
|
|
7195
|
+
message: "Plan input objects must contain enumerable JSON data properties only"
|
|
7196
|
+
};
|
|
7197
|
+
}
|
|
7198
|
+
}
|
|
7199
|
+
for (const key of keys.sort()) {
|
|
7200
|
+
const issue = findJsonSafetyIssue(record[key], [...path, key], activeObjects);
|
|
7201
|
+
if (issue) {
|
|
7202
|
+
activeObjects.delete(value);
|
|
7203
|
+
return issue;
|
|
7204
|
+
}
|
|
7205
|
+
}
|
|
7206
|
+
activeObjects.delete(value);
|
|
7207
|
+
return null;
|
|
7208
|
+
}
|
|
7209
|
+
function mutationPaths(plan) {
|
|
7210
|
+
const paths = [];
|
|
7211
|
+
plan.additive.objects.forEach((object2, objectIndex) => {
|
|
7212
|
+
paths.push(["additive", "objects", objectIndex]);
|
|
7213
|
+
object2.attributes.forEach((_attribute, attributeIndex) => {
|
|
7214
|
+
paths.push(["additive", "objects", objectIndex, "attributes", attributeIndex]);
|
|
7215
|
+
});
|
|
7216
|
+
});
|
|
7217
|
+
plan.additive.attributes.forEach((_attribute, index) => {
|
|
7218
|
+
paths.push(["additive", "attributes", index]);
|
|
7219
|
+
});
|
|
7220
|
+
plan.additive.viewUpdates.forEach((_target, index) => {
|
|
7221
|
+
paths.push(["additive", "viewUpdates", index]);
|
|
7222
|
+
});
|
|
7223
|
+
plan.destructive.attributeRemovals.forEach((_removal, index) => {
|
|
7224
|
+
paths.push(["destructive", "attributeRemovals", index]);
|
|
7225
|
+
});
|
|
7226
|
+
plan.destructive.objectRemovals.forEach((_removal, index) => {
|
|
7227
|
+
paths.push(["destructive", "objectRemovals", index]);
|
|
7228
|
+
});
|
|
7229
|
+
plan.destructive.renames.forEach((_rename, index) => {
|
|
7230
|
+
paths.push(["destructive", "renames", index]);
|
|
7231
|
+
});
|
|
7232
|
+
return paths;
|
|
7233
|
+
}
|
|
7234
|
+
function addPlanLimitIssues(plan, ctx) {
|
|
7235
|
+
if (plan.additive.objects.length > SCHEMA_PLAN_LIMITS.objectAdditions) {
|
|
7236
|
+
ctx.addIssue({
|
|
7237
|
+
code: "too_big",
|
|
7238
|
+
origin: "array",
|
|
7239
|
+
maximum: SCHEMA_PLAN_LIMITS.objectAdditions,
|
|
7240
|
+
inclusive: true,
|
|
7241
|
+
path: ["additive", "objects", SCHEMA_PLAN_LIMITS.objectAdditions],
|
|
7242
|
+
message: `A schema plan can add at most ${SCHEMA_PLAN_LIMITS.objectAdditions} objects`
|
|
7243
|
+
});
|
|
7244
|
+
}
|
|
7245
|
+
const paths = mutationPaths(plan);
|
|
7246
|
+
if (paths.length > SCHEMA_PLAN_LIMITS.totalMutations) {
|
|
7247
|
+
ctx.addIssue({
|
|
7248
|
+
code: "too_big",
|
|
7249
|
+
origin: "array",
|
|
7250
|
+
maximum: SCHEMA_PLAN_LIMITS.totalMutations,
|
|
7251
|
+
inclusive: true,
|
|
7252
|
+
path: paths[SCHEMA_PLAN_LIMITS.totalMutations],
|
|
7253
|
+
message: `A schema plan can contain at most ${SCHEMA_PLAN_LIMITS.totalMutations} mutations; received ${paths.length}`
|
|
7254
|
+
});
|
|
7255
|
+
}
|
|
7256
|
+
}
|
|
7257
|
+
function boundSerializedPlanInput(input, ctx) {
|
|
7258
|
+
const jsonSafetyIssue = findJsonSafetyIssue(input);
|
|
7259
|
+
if (jsonSafetyIssue) {
|
|
7260
|
+
ctx.addIssue({
|
|
7261
|
+
code: "custom",
|
|
7262
|
+
path: jsonSafetyIssue.path,
|
|
7263
|
+
message: jsonSafetyIssue.message
|
|
7264
|
+
});
|
|
7265
|
+
return z2.z.NEVER;
|
|
7266
|
+
}
|
|
7267
|
+
const serializedBytes = new TextEncoder().encode(canonicalStringify(input)).byteLength;
|
|
7268
|
+
if (serializedBytes > SCHEMA_PLAN_LIMITS.serializedBytes) {
|
|
7269
|
+
ctx.addIssue({
|
|
7270
|
+
code: "too_big",
|
|
7271
|
+
origin: "string",
|
|
7272
|
+
maximum: SCHEMA_PLAN_LIMITS.serializedBytes,
|
|
7273
|
+
inclusive: true,
|
|
7274
|
+
path: [],
|
|
7275
|
+
message: `A schema plan can serialize to at most ${SCHEMA_PLAN_LIMITS.serializedBytes} UTF-8 bytes; received ${serializedBytes}`
|
|
7276
|
+
});
|
|
7277
|
+
return z2.z.NEVER;
|
|
7278
|
+
}
|
|
7279
|
+
return input;
|
|
7280
|
+
}
|
|
7281
|
+
var proposedAdditiveSchema = buildAdditiveSchema(proposedDefaultViewTargetSchema);
|
|
7282
|
+
var persistedAdditiveSchema = buildAdditiveSchema(persistedDefaultViewTargetSchema);
|
|
7283
|
+
var structuralSchemaPlanSchema = z2.z.object({
|
|
7284
|
+
schemaPlanVersion: z2.z.literal(2).describe("Required proposal contract version."),
|
|
7285
|
+
summary: planSummarySchema,
|
|
7286
|
+
additive: proposedAdditiveSchema,
|
|
7287
|
+
destructive: destructiveSchema
|
|
7288
|
+
}).strict().superRefine((plan, ctx) => {
|
|
7289
|
+
const newObjectNames = new Set(plan.additive.objects.map((object2) => object2.name));
|
|
7290
|
+
plan.additive.viewUpdates.forEach((target, index) => {
|
|
7291
|
+
const path = ["additive", "viewUpdates", index, "baselineToken"];
|
|
7292
|
+
if (newObjectNames.has(target.objectName)) {
|
|
7293
|
+
if (target.baselineToken !== void 0) {
|
|
7294
|
+
ctx.addIssue({
|
|
7295
|
+
code: "custom",
|
|
7296
|
+
path,
|
|
7297
|
+
message: "A view target for an object added by this plan must not include baselineToken"
|
|
7298
|
+
});
|
|
7299
|
+
}
|
|
7300
|
+
return;
|
|
7301
|
+
}
|
|
7302
|
+
if (target.baselineToken === void 0) {
|
|
7303
|
+
ctx.addIssue({
|
|
7304
|
+
code: "custom",
|
|
7305
|
+
path,
|
|
7306
|
+
message: "A view target for an existing object requires baselineToken"
|
|
7307
|
+
});
|
|
7308
|
+
}
|
|
7309
|
+
});
|
|
7310
|
+
addPlanLimitIssues(plan, ctx);
|
|
7311
|
+
});
|
|
7312
|
+
var schemaPlanSchema = Object.assign(
|
|
7313
|
+
z2.z.preprocess(boundSerializedPlanInput, structuralSchemaPlanSchema),
|
|
7314
|
+
{ shape: structuralSchemaPlanSchema.shape }
|
|
7315
|
+
);
|
|
7316
|
+
var structuralPersistedSchemaPlanSchema = z2.z.object({
|
|
7317
|
+
schemaPlanVersion: z2.z.literal(2),
|
|
7318
|
+
summary: planSummarySchema,
|
|
7319
|
+
additive: persistedAdditiveSchema,
|
|
7320
|
+
destructive: destructiveSchema
|
|
7321
|
+
}).strict().superRefine(addPlanLimitIssues);
|
|
7322
|
+
var persistedSchemaPlanSchema = z2.z.preprocess(
|
|
7323
|
+
boundSerializedPlanInput,
|
|
7324
|
+
structuralPersistedSchemaPlanSchema
|
|
7325
|
+
);
|
|
7326
|
+
|
|
7323
7327
|
Object.defineProperty(exports, "asTenantId", {
|
|
7324
7328
|
enumerable: true,
|
|
7325
7329
|
get: function () { return chunkFRCDMQER_js.asTenantId; }
|
|
@@ -7340,189 +7344,433 @@ Object.defineProperty(exports, "indexBy", {
|
|
|
7340
7344
|
enumerable: true,
|
|
7341
7345
|
get: function () { return chunkFRCDMQER_js.indexBy; }
|
|
7342
7346
|
});
|
|
7347
|
+
Object.defineProperty(exports, "ATTRIBUTE_FILTER_OPERATORS", {
|
|
7348
|
+
enumerable: true,
|
|
7349
|
+
get: function () { return chunk6ZDH3EJA_js.ATTRIBUTE_FILTER_OPERATORS; }
|
|
7350
|
+
});
|
|
7351
|
+
Object.defineProperty(exports, "LIST_VIEW_TAB_VISIBILITIES", {
|
|
7352
|
+
enumerable: true,
|
|
7353
|
+
get: function () { return chunk6ZDH3EJA_js.LIST_VIEW_TAB_VISIBILITIES; }
|
|
7354
|
+
});
|
|
7355
|
+
Object.defineProperty(exports, "NO_VALUE_OPERATORS", {
|
|
7356
|
+
enumerable: true,
|
|
7357
|
+
get: function () { return chunk6ZDH3EJA_js.NO_VALUE_OPERATORS; }
|
|
7358
|
+
});
|
|
7359
|
+
Object.defineProperty(exports, "OPERATORS_BY_TYPE", {
|
|
7360
|
+
enumerable: true,
|
|
7361
|
+
get: function () { return chunk6ZDH3EJA_js.OPERATORS_BY_TYPE; }
|
|
7362
|
+
});
|
|
7363
|
+
Object.defineProperty(exports, "REMOVED_OPERATOR_REPLACEMENTS", {
|
|
7364
|
+
enumerable: true,
|
|
7365
|
+
get: function () { return chunk6ZDH3EJA_js.REMOVED_OPERATOR_REPLACEMENTS; }
|
|
7366
|
+
});
|
|
7367
|
+
Object.defineProperty(exports, "RESERVED_ATTRIBUTE_NAMES", {
|
|
7368
|
+
enumerable: true,
|
|
7369
|
+
get: function () { return chunk6ZDH3EJA_js.RESERVED_ATTRIBUTE_NAMES; }
|
|
7370
|
+
});
|
|
7371
|
+
Object.defineProperty(exports, "RESERVED_OBJECT_NAMES", {
|
|
7372
|
+
enumerable: true,
|
|
7373
|
+
get: function () { return chunk6ZDH3EJA_js.RESERVED_OBJECT_NAMES; }
|
|
7374
|
+
});
|
|
7375
|
+
Object.defineProperty(exports, "RESOURCE_VISIBILITIES", {
|
|
7376
|
+
enumerable: true,
|
|
7377
|
+
get: function () { return chunk6ZDH3EJA_js.RESOURCE_VISIBILITIES; }
|
|
7378
|
+
});
|
|
7379
|
+
Object.defineProperty(exports, "SYNONYM_ALIASES", {
|
|
7380
|
+
enumerable: true,
|
|
7381
|
+
get: function () { return chunk6ZDH3EJA_js.SYNONYM_ALIASES; }
|
|
7382
|
+
});
|
|
7383
|
+
Object.defineProperty(exports, "SYSTEM_ATTRIBUTES", {
|
|
7384
|
+
enumerable: true,
|
|
7385
|
+
get: function () { return chunk6ZDH3EJA_js.SYSTEM_ATTRIBUTES; }
|
|
7386
|
+
});
|
|
7387
|
+
Object.defineProperty(exports, "SYSTEM_ATTRIBUTE_I18N_KEYS", {
|
|
7388
|
+
enumerable: true,
|
|
7389
|
+
get: function () { return chunk6ZDH3EJA_js.SYSTEM_ATTRIBUTE_I18N_KEYS; }
|
|
7390
|
+
});
|
|
7391
|
+
Object.defineProperty(exports, "SYSTEM_FIELD_NAMES", {
|
|
7392
|
+
enumerable: true,
|
|
7393
|
+
get: function () { return chunk6ZDH3EJA_js.SYSTEM_FIELD_NAMES; }
|
|
7394
|
+
});
|
|
7395
|
+
Object.defineProperty(exports, "SYSTEM_FILTER_ATTRIBUTE_TYPES", {
|
|
7396
|
+
enumerable: true,
|
|
7397
|
+
get: function () { return chunk6ZDH3EJA_js.SYSTEM_FILTER_ATTRIBUTE_TYPES; }
|
|
7398
|
+
});
|
|
7399
|
+
Object.defineProperty(exports, "collectQualifiedRuleIssues", {
|
|
7400
|
+
enumerable: true,
|
|
7401
|
+
get: function () { return chunk6ZDH3EJA_js.collectQualifiedRuleIssues; }
|
|
7402
|
+
});
|
|
7403
|
+
Object.defineProperty(exports, "currentActor", {
|
|
7404
|
+
enumerable: true,
|
|
7405
|
+
get: function () { return chunk6ZDH3EJA_js.currentActor; }
|
|
7406
|
+
});
|
|
7407
|
+
Object.defineProperty(exports, "detailTabSchema", {
|
|
7408
|
+
enumerable: true,
|
|
7409
|
+
get: function () { return chunk6ZDH3EJA_js.detailTabSchema; }
|
|
7410
|
+
});
|
|
7411
|
+
Object.defineProperty(exports, "detailViewConfigSchema", {
|
|
7412
|
+
enumerable: true,
|
|
7413
|
+
get: function () { return chunk6ZDH3EJA_js.detailViewConfigSchema; }
|
|
7414
|
+
});
|
|
7415
|
+
Object.defineProperty(exports, "getAttributeCapabilities", {
|
|
7416
|
+
enumerable: true,
|
|
7417
|
+
get: function () { return chunk6ZDH3EJA_js.getAttributeCapabilities; }
|
|
7418
|
+
});
|
|
7419
|
+
Object.defineProperty(exports, "getAttributeFilterOperators", {
|
|
7420
|
+
enumerable: true,
|
|
7421
|
+
get: function () { return chunk6ZDH3EJA_js.getAttributeFilterOperators; }
|
|
7422
|
+
});
|
|
7423
|
+
Object.defineProperty(exports, "getRollupFilterOperators", {
|
|
7424
|
+
enumerable: true,
|
|
7425
|
+
get: function () { return chunk6ZDH3EJA_js.getRollupFilterOperators; }
|
|
7426
|
+
});
|
|
7427
|
+
Object.defineProperty(exports, "getSystemAttributeI18nKey", {
|
|
7428
|
+
enumerable: true,
|
|
7429
|
+
get: function () { return chunk6ZDH3EJA_js.getSystemAttributeI18nKey; }
|
|
7430
|
+
});
|
|
7431
|
+
Object.defineProperty(exports, "getSystemAttributeList", {
|
|
7432
|
+
enumerable: true,
|
|
7433
|
+
get: function () { return chunk6ZDH3EJA_js.getSystemAttributeList; }
|
|
7434
|
+
});
|
|
7435
|
+
Object.defineProperty(exports, "inverseSourceSchema", {
|
|
7436
|
+
enumerable: true,
|
|
7437
|
+
get: function () { return chunk6ZDH3EJA_js.inverseSourceSchema; }
|
|
7438
|
+
});
|
|
7439
|
+
Object.defineProperty(exports, "isAttributeFilterable", {
|
|
7440
|
+
enumerable: true,
|
|
7441
|
+
get: function () { return chunk6ZDH3EJA_js.isAttributeFilterable; }
|
|
7442
|
+
});
|
|
7443
|
+
Object.defineProperty(exports, "isAttributeGroupable", {
|
|
7444
|
+
enumerable: true,
|
|
7445
|
+
get: function () { return chunk6ZDH3EJA_js.isAttributeGroupable; }
|
|
7446
|
+
});
|
|
7447
|
+
Object.defineProperty(exports, "isAttributeKanbanGroupable", {
|
|
7448
|
+
enumerable: true,
|
|
7449
|
+
get: function () { return chunk6ZDH3EJA_js.isAttributeKanbanGroupable; }
|
|
7450
|
+
});
|
|
7451
|
+
Object.defineProperty(exports, "isAttributeSearchable", {
|
|
7452
|
+
enumerable: true,
|
|
7453
|
+
get: function () { return chunk6ZDH3EJA_js.isAttributeSearchable; }
|
|
7454
|
+
});
|
|
7455
|
+
Object.defineProperty(exports, "isDynamicValue", {
|
|
7456
|
+
enumerable: true,
|
|
7457
|
+
get: function () { return chunk6ZDH3EJA_js.isDynamicValue; }
|
|
7458
|
+
});
|
|
7459
|
+
Object.defineProperty(exports, "isManagedSystemAttribute", {
|
|
7460
|
+
enumerable: true,
|
|
7461
|
+
get: function () { return chunk6ZDH3EJA_js.isManagedSystemAttribute; }
|
|
7462
|
+
});
|
|
7463
|
+
Object.defineProperty(exports, "isNoValueOperator", {
|
|
7464
|
+
enumerable: true,
|
|
7465
|
+
get: function () { return chunk6ZDH3EJA_js.isNoValueOperator; }
|
|
7466
|
+
});
|
|
7467
|
+
Object.defineProperty(exports, "isRelativeDateValue", {
|
|
7468
|
+
enumerable: true,
|
|
7469
|
+
get: function () { return chunk6ZDH3EJA_js.isRelativeDateValue; }
|
|
7470
|
+
});
|
|
7471
|
+
Object.defineProperty(exports, "listViewConfigSchema", {
|
|
7472
|
+
enumerable: true,
|
|
7473
|
+
get: function () { return chunk6ZDH3EJA_js.listViewConfigSchema; }
|
|
7474
|
+
});
|
|
7475
|
+
Object.defineProperty(exports, "listViewTabSchema", {
|
|
7476
|
+
enumerable: true,
|
|
7477
|
+
get: function () { return chunk6ZDH3EJA_js.listViewTabSchema; }
|
|
7478
|
+
});
|
|
7479
|
+
Object.defineProperty(exports, "normalizeFilterRule", {
|
|
7480
|
+
enumerable: true,
|
|
7481
|
+
get: function () { return chunk6ZDH3EJA_js.normalizeFilterRule; }
|
|
7482
|
+
});
|
|
7483
|
+
Object.defineProperty(exports, "normalizeOperator", {
|
|
7484
|
+
enumerable: true,
|
|
7485
|
+
get: function () { return chunk6ZDH3EJA_js.normalizeOperator; }
|
|
7486
|
+
});
|
|
7487
|
+
Object.defineProperty(exports, "now", {
|
|
7488
|
+
enumerable: true,
|
|
7489
|
+
get: function () { return chunk6ZDH3EJA_js.now; }
|
|
7490
|
+
});
|
|
7491
|
+
Object.defineProperty(exports, "parseViewConfig", {
|
|
7492
|
+
enumerable: true,
|
|
7493
|
+
get: function () { return chunk6ZDH3EJA_js.parseViewConfig; }
|
|
7494
|
+
});
|
|
7495
|
+
Object.defineProperty(exports, "relationSourceSchema", {
|
|
7496
|
+
enumerable: true,
|
|
7497
|
+
get: function () { return chunk6ZDH3EJA_js.relationSourceSchema; }
|
|
7498
|
+
});
|
|
7499
|
+
Object.defineProperty(exports, "resolveIsWithinBounds", {
|
|
7500
|
+
enumerable: true,
|
|
7501
|
+
get: function () { return chunk6ZDH3EJA_js.resolveIsWithinBounds; }
|
|
7502
|
+
});
|
|
7503
|
+
Object.defineProperty(exports, "tableSourceSchema", {
|
|
7504
|
+
enumerable: true,
|
|
7505
|
+
get: function () { return chunk6ZDH3EJA_js.tableSourceSchema; }
|
|
7506
|
+
});
|
|
7507
|
+
Object.defineProperty(exports, "toUtcDayString", {
|
|
7508
|
+
enumerable: true,
|
|
7509
|
+
get: function () { return chunk6ZDH3EJA_js.toUtcDayString; }
|
|
7510
|
+
});
|
|
7511
|
+
Object.defineProperty(exports, "today", {
|
|
7512
|
+
enumerable: true,
|
|
7513
|
+
get: function () { return chunk6ZDH3EJA_js.today; }
|
|
7514
|
+
});
|
|
7515
|
+
Object.defineProperty(exports, "validateQualifiedRule", {
|
|
7516
|
+
enumerable: true,
|
|
7517
|
+
get: function () { return chunk6ZDH3EJA_js.validateQualifiedRule; }
|
|
7518
|
+
});
|
|
7519
|
+
Object.defineProperty(exports, "viewConfigByTypeSchema", {
|
|
7520
|
+
enumerable: true,
|
|
7521
|
+
get: function () { return chunk6ZDH3EJA_js.viewConfigByTypeSchema; }
|
|
7522
|
+
});
|
|
7523
|
+
Object.defineProperty(exports, "viewTypeSchema", {
|
|
7524
|
+
enumerable: true,
|
|
7525
|
+
get: function () { return chunk6ZDH3EJA_js.viewTypeSchema; }
|
|
7526
|
+
});
|
|
7343
7527
|
Object.defineProperty(exports, "ComputedFormulaParseError", {
|
|
7344
7528
|
enumerable: true,
|
|
7345
|
-
get: function () { return
|
|
7529
|
+
get: function () { return chunkQN2N3IJZ_js.ComputedFormulaParseError; }
|
|
7530
|
+
});
|
|
7531
|
+
Object.defineProperty(exports, "SCHEMA_LIMITS", {
|
|
7532
|
+
enumerable: true,
|
|
7533
|
+
get: function () { return chunkQN2N3IJZ_js.SCHEMA_LIMITS; }
|
|
7534
|
+
});
|
|
7535
|
+
Object.defineProperty(exports, "colorIdSchema", {
|
|
7536
|
+
enumerable: true,
|
|
7537
|
+
get: function () { return chunkQN2N3IJZ_js.colorIdSchema; }
|
|
7538
|
+
});
|
|
7539
|
+
Object.defineProperty(exports, "iconNameSchema", {
|
|
7540
|
+
enumerable: true,
|
|
7541
|
+
get: function () { return chunkQN2N3IJZ_js.iconNameSchema; }
|
|
7542
|
+
});
|
|
7543
|
+
Object.defineProperty(exports, "multiselectOptionWriteSchema", {
|
|
7544
|
+
enumerable: true,
|
|
7545
|
+
get: function () { return chunkQN2N3IJZ_js.multiselectOptionWriteSchema; }
|
|
7346
7546
|
});
|
|
7347
7547
|
Object.defineProperty(exports, "parseAttributeConfig", {
|
|
7348
7548
|
enumerable: true,
|
|
7349
|
-
get: function () { return
|
|
7549
|
+
get: function () { return chunkQN2N3IJZ_js.parseAttributeConfig; }
|
|
7550
|
+
});
|
|
7551
|
+
Object.defineProperty(exports, "parseAttributeConfigForCreate", {
|
|
7552
|
+
enumerable: true,
|
|
7553
|
+
get: function () { return chunkQN2N3IJZ_js.parseAttributeConfigForCreate; }
|
|
7554
|
+
});
|
|
7555
|
+
Object.defineProperty(exports, "parseAttributeConfigForUpdate", {
|
|
7556
|
+
enumerable: true,
|
|
7557
|
+
get: function () { return chunkQN2N3IJZ_js.parseAttributeConfigForUpdate; }
|
|
7350
7558
|
});
|
|
7351
7559
|
Object.defineProperty(exports, "parseComputedFormula", {
|
|
7352
7560
|
enumerable: true,
|
|
7353
|
-
get: function () { return
|
|
7561
|
+
get: function () { return chunkQN2N3IJZ_js.parseComputedFormula; }
|
|
7562
|
+
});
|
|
7563
|
+
Object.defineProperty(exports, "selectOptionWriteSchema", {
|
|
7564
|
+
enumerable: true,
|
|
7565
|
+
get: function () { return chunkQN2N3IJZ_js.selectOptionWriteSchema; }
|
|
7566
|
+
});
|
|
7567
|
+
Object.defineProperty(exports, "statusGroupSchema", {
|
|
7568
|
+
enumerable: true,
|
|
7569
|
+
get: function () { return chunkQN2N3IJZ_js.statusGroupSchema; }
|
|
7570
|
+
});
|
|
7571
|
+
Object.defineProperty(exports, "statusOptionWriteSchema", {
|
|
7572
|
+
enumerable: true,
|
|
7573
|
+
get: function () { return chunkQN2N3IJZ_js.statusOptionWriteSchema; }
|
|
7574
|
+
});
|
|
7575
|
+
Object.defineProperty(exports, "createFormAttributeValidator", {
|
|
7576
|
+
enumerable: true,
|
|
7577
|
+
get: function () { return chunkV6Q7HCA7_js.createFormAttributeValidator; }
|
|
7578
|
+
});
|
|
7579
|
+
Object.defineProperty(exports, "rejectUnknownAttributesOrThrow", {
|
|
7580
|
+
enumerable: true,
|
|
7581
|
+
get: function () { return chunkV6Q7HCA7_js.rejectUnknownAttributesOrThrow; }
|
|
7582
|
+
});
|
|
7583
|
+
Object.defineProperty(exports, "validateDraft", {
|
|
7584
|
+
enumerable: true,
|
|
7585
|
+
get: function () { return chunkV6Q7HCA7_js.validateDraft; }
|
|
7586
|
+
});
|
|
7587
|
+
Object.defineProperty(exports, "validateDraftOrThrow", {
|
|
7588
|
+
enumerable: true,
|
|
7589
|
+
get: function () { return chunkV6Q7HCA7_js.validateDraftOrThrow; }
|
|
7590
|
+
});
|
|
7591
|
+
Object.defineProperty(exports, "validateObject", {
|
|
7592
|
+
enumerable: true,
|
|
7593
|
+
get: function () { return chunkV6Q7HCA7_js.validateObject; }
|
|
7594
|
+
});
|
|
7595
|
+
Object.defineProperty(exports, "validateObjectOrThrow", {
|
|
7596
|
+
enumerable: true,
|
|
7597
|
+
get: function () { return chunkV6Q7HCA7_js.validateObjectOrThrow; }
|
|
7598
|
+
});
|
|
7599
|
+
Object.defineProperty(exports, "createCheckboxValidator", {
|
|
7600
|
+
enumerable: true,
|
|
7601
|
+
get: function () { return chunk5WATIVCA_js.createCheckboxValidator; }
|
|
7602
|
+
});
|
|
7603
|
+
Object.defineProperty(exports, "createDateValidator", {
|
|
7604
|
+
enumerable: true,
|
|
7605
|
+
get: function () { return chunkSI34M4IC_js.createDateValidator; }
|
|
7606
|
+
});
|
|
7607
|
+
Object.defineProperty(exports, "createNumberValidator", {
|
|
7608
|
+
enumerable: true,
|
|
7609
|
+
get: function () { return chunkYIP5FJ5H_js.createNumberValidator; }
|
|
7610
|
+
});
|
|
7611
|
+
Object.defineProperty(exports, "TEXT_FORMAT_PATTERNS", {
|
|
7612
|
+
enumerable: true,
|
|
7613
|
+
get: function () { return chunkZPFOKBIN_js.TEXT_FORMAT_PATTERNS; }
|
|
7614
|
+
});
|
|
7615
|
+
Object.defineProperty(exports, "createTextValidator", {
|
|
7616
|
+
enumerable: true,
|
|
7617
|
+
get: function () { return chunkZPFOKBIN_js.createTextValidator; }
|
|
7618
|
+
});
|
|
7619
|
+
Object.defineProperty(exports, "resolveTextPattern", {
|
|
7620
|
+
enumerable: true,
|
|
7621
|
+
get: function () { return chunkZPFOKBIN_js.resolveTextPattern; }
|
|
7354
7622
|
});
|
|
7355
7623
|
Object.defineProperty(exports, "AccessDeniedError", {
|
|
7356
7624
|
enumerable: true,
|
|
7357
|
-
get: function () { return
|
|
7625
|
+
get: function () { return chunkFDIAOFHS_js.AccessDeniedError; }
|
|
7358
7626
|
});
|
|
7359
7627
|
Object.defineProperty(exports, "AttributeInUseError", {
|
|
7360
7628
|
enumerable: true,
|
|
7361
|
-
get: function () { return
|
|
7629
|
+
get: function () { return chunkFDIAOFHS_js.AttributeInUseError; }
|
|
7362
7630
|
});
|
|
7363
7631
|
Object.defineProperty(exports, "AttributeNotFoundError", {
|
|
7364
7632
|
enumerable: true,
|
|
7365
|
-
get: function () { return
|
|
7633
|
+
get: function () { return chunkFDIAOFHS_js.AttributeNotFoundError; }
|
|
7366
7634
|
});
|
|
7367
7635
|
Object.defineProperty(exports, "ChangeTypeNotSupportedError", {
|
|
7368
7636
|
enumerable: true,
|
|
7369
|
-
get: function () { return
|
|
7637
|
+
get: function () { return chunkFDIAOFHS_js.ChangeTypeNotSupportedError; }
|
|
7370
7638
|
});
|
|
7371
7639
|
Object.defineProperty(exports, "ConcurrentModificationError", {
|
|
7372
7640
|
enumerable: true,
|
|
7373
|
-
get: function () { return
|
|
7641
|
+
get: function () { return chunkFDIAOFHS_js.ConcurrentModificationError; }
|
|
7374
7642
|
});
|
|
7375
7643
|
Object.defineProperty(exports, "DestructiveSyncNotAllowedError", {
|
|
7376
7644
|
enumerable: true,
|
|
7377
|
-
get: function () { return
|
|
7645
|
+
get: function () { return chunkFDIAOFHS_js.DestructiveSyncNotAllowedError; }
|
|
7378
7646
|
});
|
|
7379
7647
|
Object.defineProperty(exports, "DuplicateError", {
|
|
7380
7648
|
enumerable: true,
|
|
7381
|
-
get: function () { return
|
|
7649
|
+
get: function () { return chunkFDIAOFHS_js.DuplicateError; }
|
|
7382
7650
|
});
|
|
7383
7651
|
Object.defineProperty(exports, "ForbiddenError", {
|
|
7384
7652
|
enumerable: true,
|
|
7385
|
-
get: function () { return
|
|
7653
|
+
get: function () { return chunkFDIAOFHS_js.ForbiddenError; }
|
|
7386
7654
|
});
|
|
7387
7655
|
Object.defineProperty(exports, "MemoryNotFoundError", {
|
|
7388
7656
|
enumerable: true,
|
|
7389
|
-
get: function () { return
|
|
7657
|
+
get: function () { return chunkFDIAOFHS_js.MemoryNotFoundError; }
|
|
7390
7658
|
});
|
|
7391
7659
|
Object.defineProperty(exports, "MigrationTimeoutError", {
|
|
7392
7660
|
enumerable: true,
|
|
7393
|
-
get: function () { return
|
|
7661
|
+
get: function () { return chunkFDIAOFHS_js.MigrationTimeoutError; }
|
|
7394
7662
|
});
|
|
7395
7663
|
Object.defineProperty(exports, "NotFoundError", {
|
|
7396
7664
|
enumerable: true,
|
|
7397
|
-
get: function () { return
|
|
7665
|
+
get: function () { return chunkFDIAOFHS_js.NotFoundError; }
|
|
7398
7666
|
});
|
|
7399
7667
|
Object.defineProperty(exports, "NotImplementedError", {
|
|
7400
7668
|
enumerable: true,
|
|
7401
|
-
get: function () { return
|
|
7669
|
+
get: function () { return chunkFDIAOFHS_js.NotImplementedError; }
|
|
7402
7670
|
});
|
|
7403
7671
|
Object.defineProperty(exports, "ObjectNotFoundError", {
|
|
7404
7672
|
enumerable: true,
|
|
7405
|
-
get: function () { return
|
|
7673
|
+
get: function () { return chunkFDIAOFHS_js.ObjectNotFoundError; }
|
|
7406
7674
|
});
|
|
7407
7675
|
Object.defineProperty(exports, "ObjectReferencedError", {
|
|
7408
7676
|
enumerable: true,
|
|
7409
|
-
get: function () { return
|
|
7677
|
+
get: function () { return chunkFDIAOFHS_js.ObjectReferencedError; }
|
|
7410
7678
|
});
|
|
7411
7679
|
Object.defineProperty(exports, "OrphanSystemAttributeError", {
|
|
7412
7680
|
enumerable: true,
|
|
7413
|
-
get: function () { return
|
|
7681
|
+
get: function () { return chunkFDIAOFHS_js.OrphanSystemAttributeError; }
|
|
7414
7682
|
});
|
|
7415
7683
|
Object.defineProperty(exports, "ProtectedResourceError", {
|
|
7416
7684
|
enumerable: true,
|
|
7417
|
-
get: function () { return
|
|
7685
|
+
get: function () { return chunkFDIAOFHS_js.ProtectedResourceError; }
|
|
7418
7686
|
});
|
|
7419
7687
|
Object.defineProperty(exports, "ProtectedRoleError", {
|
|
7420
7688
|
enumerable: true,
|
|
7421
|
-
get: function () { return
|
|
7689
|
+
get: function () { return chunkFDIAOFHS_js.ProtectedRoleError; }
|
|
7422
7690
|
});
|
|
7423
7691
|
Object.defineProperty(exports, "RecordNotFoundError", {
|
|
7424
7692
|
enumerable: true,
|
|
7425
|
-
get: function () { return
|
|
7693
|
+
get: function () { return chunkFDIAOFHS_js.RecordNotFoundError; }
|
|
7426
7694
|
});
|
|
7427
7695
|
Object.defineProperty(exports, "RecordReferencedError", {
|
|
7428
7696
|
enumerable: true,
|
|
7429
|
-
get: function () { return
|
|
7697
|
+
get: function () { return chunkFDIAOFHS_js.RecordReferencedError; }
|
|
7430
7698
|
});
|
|
7431
7699
|
Object.defineProperty(exports, "RepositoryError", {
|
|
7432
7700
|
enumerable: true,
|
|
7433
|
-
get: function () { return
|
|
7701
|
+
get: function () { return chunkFDIAOFHS_js.RepositoryError; }
|
|
7434
7702
|
});
|
|
7435
7703
|
Object.defineProperty(exports, "RoleNotFoundError", {
|
|
7436
7704
|
enumerable: true,
|
|
7437
|
-
get: function () { return
|
|
7705
|
+
get: function () { return chunkFDIAOFHS_js.RoleNotFoundError; }
|
|
7438
7706
|
});
|
|
7439
7707
|
Object.defineProperty(exports, "SchemaError", {
|
|
7440
7708
|
enumerable: true,
|
|
7441
|
-
get: function () { return
|
|
7709
|
+
get: function () { return chunkFDIAOFHS_js.SchemaError; }
|
|
7442
7710
|
});
|
|
7443
7711
|
Object.defineProperty(exports, "SchemaErrorCode", {
|
|
7444
7712
|
enumerable: true,
|
|
7445
|
-
get: function () { return
|
|
7713
|
+
get: function () { return chunkFDIAOFHS_js.SchemaErrorCode; }
|
|
7714
|
+
});
|
|
7715
|
+
Object.defineProperty(exports, "SchemaPlanNotFoundError", {
|
|
7716
|
+
enumerable: true,
|
|
7717
|
+
get: function () { return chunkFDIAOFHS_js.SchemaPlanNotFoundError; }
|
|
7446
7718
|
});
|
|
7447
7719
|
Object.defineProperty(exports, "SearchBackendError", {
|
|
7448
7720
|
enumerable: true,
|
|
7449
|
-
get: function () { return
|
|
7721
|
+
get: function () { return chunkFDIAOFHS_js.SearchBackendError; }
|
|
7450
7722
|
});
|
|
7451
7723
|
Object.defineProperty(exports, "StorageError", {
|
|
7452
7724
|
enumerable: true,
|
|
7453
|
-
get: function () { return
|
|
7725
|
+
get: function () { return chunkFDIAOFHS_js.StorageError; }
|
|
7454
7726
|
});
|
|
7455
7727
|
Object.defineProperty(exports, "SyncCascadeError", {
|
|
7456
7728
|
enumerable: true,
|
|
7457
|
-
get: function () { return
|
|
7729
|
+
get: function () { return chunkFDIAOFHS_js.SyncCascadeError; }
|
|
7458
7730
|
});
|
|
7459
7731
|
Object.defineProperty(exports, "SyncConflictError", {
|
|
7460
7732
|
enumerable: true,
|
|
7461
|
-
get: function () { return
|
|
7733
|
+
get: function () { return chunkFDIAOFHS_js.SyncConflictError; }
|
|
7462
7734
|
});
|
|
7463
7735
|
Object.defineProperty(exports, "SyncError", {
|
|
7464
7736
|
enumerable: true,
|
|
7465
|
-
get: function () { return
|
|
7737
|
+
get: function () { return chunkFDIAOFHS_js.SyncError; }
|
|
7466
7738
|
});
|
|
7467
7739
|
Object.defineProperty(exports, "SystemEntityImmutableError", {
|
|
7468
7740
|
enumerable: true,
|
|
7469
|
-
get: function () { return
|
|
7741
|
+
get: function () { return chunkFDIAOFHS_js.SystemEntityImmutableError; }
|
|
7470
7742
|
});
|
|
7471
7743
|
Object.defineProperty(exports, "ValidationError", {
|
|
7472
7744
|
enumerable: true,
|
|
7473
|
-
get: function () { return
|
|
7474
|
-
});
|
|
7475
|
-
Object.defineProperty(exports, "createFormAttributeValidator", {
|
|
7476
|
-
enumerable: true,
|
|
7477
|
-
get: function () { return chunkTS3PJOMZ_js.createFormAttributeValidator; }
|
|
7745
|
+
get: function () { return chunkFDIAOFHS_js.ValidationError; }
|
|
7478
7746
|
});
|
|
7479
7747
|
Object.defineProperty(exports, "isAttributeInUseError", {
|
|
7480
7748
|
enumerable: true,
|
|
7481
|
-
get: function () { return
|
|
7749
|
+
get: function () { return chunkFDIAOFHS_js.isAttributeInUseError; }
|
|
7482
7750
|
});
|
|
7483
7751
|
Object.defineProperty(exports, "isNotFoundError", {
|
|
7484
7752
|
enumerable: true,
|
|
7485
|
-
get: function () { return
|
|
7753
|
+
get: function () { return chunkFDIAOFHS_js.isNotFoundError; }
|
|
7486
7754
|
});
|
|
7487
7755
|
Object.defineProperty(exports, "isObjectReferencedError", {
|
|
7488
7756
|
enumerable: true,
|
|
7489
|
-
get: function () { return
|
|
7757
|
+
get: function () { return chunkFDIAOFHS_js.isObjectReferencedError; }
|
|
7490
7758
|
});
|
|
7491
7759
|
Object.defineProperty(exports, "isProtectedResourceError", {
|
|
7492
7760
|
enumerable: true,
|
|
7493
|
-
get: function () { return
|
|
7761
|
+
get: function () { return chunkFDIAOFHS_js.isProtectedResourceError; }
|
|
7494
7762
|
});
|
|
7495
7763
|
Object.defineProperty(exports, "isRecordReferencedError", {
|
|
7496
7764
|
enumerable: true,
|
|
7497
|
-
get: function () { return
|
|
7765
|
+
get: function () { return chunkFDIAOFHS_js.isRecordReferencedError; }
|
|
7498
7766
|
});
|
|
7499
7767
|
Object.defineProperty(exports, "isSchemaError", {
|
|
7500
7768
|
enumerable: true,
|
|
7501
|
-
get: function () { return
|
|
7769
|
+
get: function () { return chunkFDIAOFHS_js.isSchemaError; }
|
|
7502
7770
|
});
|
|
7503
7771
|
Object.defineProperty(exports, "isValidationError", {
|
|
7504
7772
|
enumerable: true,
|
|
7505
|
-
get: function () { return
|
|
7506
|
-
});
|
|
7507
|
-
Object.defineProperty(exports, "rejectUnknownAttributesOrThrow", {
|
|
7508
|
-
enumerable: true,
|
|
7509
|
-
get: function () { return chunkTS3PJOMZ_js.rejectUnknownAttributesOrThrow; }
|
|
7510
|
-
});
|
|
7511
|
-
Object.defineProperty(exports, "validateDraft", {
|
|
7512
|
-
enumerable: true,
|
|
7513
|
-
get: function () { return chunkTS3PJOMZ_js.validateDraft; }
|
|
7514
|
-
});
|
|
7515
|
-
Object.defineProperty(exports, "validateDraftOrThrow", {
|
|
7516
|
-
enumerable: true,
|
|
7517
|
-
get: function () { return chunkTS3PJOMZ_js.validateDraftOrThrow; }
|
|
7518
|
-
});
|
|
7519
|
-
Object.defineProperty(exports, "validateObject", {
|
|
7520
|
-
enumerable: true,
|
|
7521
|
-
get: function () { return chunkTS3PJOMZ_js.validateObject; }
|
|
7522
|
-
});
|
|
7523
|
-
Object.defineProperty(exports, "validateObjectOrThrow", {
|
|
7524
|
-
enumerable: true,
|
|
7525
|
-
get: function () { return chunkTS3PJOMZ_js.validateObjectOrThrow; }
|
|
7773
|
+
get: function () { return chunkFDIAOFHS_js.isValidationError; }
|
|
7526
7774
|
});
|
|
7527
7775
|
Object.defineProperty(exports, "DEFAULT_VALIDATION_MESSAGES", {
|
|
7528
7776
|
enumerable: true,
|
|
@@ -7535,22 +7783,22 @@ Object.defineProperty(exports, "formatZodErrors", {
|
|
|
7535
7783
|
exports.ALLOWED_PROPERTY_TYPES = ALLOWED_PROPERTY_TYPES;
|
|
7536
7784
|
exports.ALL_ACTIONS = ALL_ACTIONS;
|
|
7537
7785
|
exports.ALL_SYSTEM_RESOURCES = ALL_SYSTEM_RESOURCES;
|
|
7538
|
-
exports.ATTRIBUTE_FILTER_OPERATORS = ATTRIBUTE_FILTER_OPERATORS;
|
|
7539
7786
|
exports.AUDIT_ACTIONS = AUDIT_ACTIONS;
|
|
7540
7787
|
exports.AUDIT_RESOURCE_TYPES = AUDIT_RESOURCE_TYPES;
|
|
7541
7788
|
exports.ActivityTabConfig = ActivityTabConfig;
|
|
7542
7789
|
exports.AgentBuilder = AgentBuilder;
|
|
7543
7790
|
exports.BEHAVIOR_PROPERTIES = BEHAVIOR_PROPERTIES;
|
|
7544
7791
|
exports.BROWSER_PREVIEW_STATUSES = BROWSER_PREVIEW_STATUSES;
|
|
7792
|
+
exports.BYTE_UNIT_LABELS = BYTE_UNIT_LABELS;
|
|
7545
7793
|
exports.COMPUTED_FUNCTIONS = COMPUTED_FUNCTIONS;
|
|
7546
7794
|
exports.COMPUTED_FUNCTION_METADATA = COMPUTED_FUNCTION_METADATA;
|
|
7547
7795
|
exports.COMPUTED_FUNCTION_NAMES = COMPUTED_FUNCTION_NAMES;
|
|
7548
7796
|
exports.CONNECTOR_CALLBACK_PARAM = CONNECTOR_CALLBACK_PARAM;
|
|
7549
|
-
exports.CROSS_TYPE_CONVERSIONS = CROSS_TYPE_CONVERSIONS;
|
|
7550
7797
|
exports.ComputedFormulaCompileError = ComputedFormulaCompileError;
|
|
7551
7798
|
exports.CustomTabConfig = CustomTabConfig;
|
|
7552
7799
|
exports.DB_COLUMN_FIELDS = DB_COLUMN_FIELDS;
|
|
7553
7800
|
exports.DEFAULT_AGENT_EXECUTION_CONFIG = DEFAULT_AGENT_EXECUTION_CONFIG;
|
|
7801
|
+
exports.DEFAULT_APPROVAL_POLICY = DEFAULT_APPROVAL_POLICY;
|
|
7554
7802
|
exports.DEFAULT_ROLES = DEFAULT_ROLES;
|
|
7555
7803
|
exports.DEFAULT_ROLE_DESCRIPTIONS = DEFAULT_ROLE_DESCRIPTIONS;
|
|
7556
7804
|
exports.DEFAULT_ROLE_LABELS = DEFAULT_ROLE_LABELS;
|
|
@@ -7559,6 +7807,7 @@ exports.DOCUMENT_SYSTEM_ATTRIBUTES = DOCUMENT_SYSTEM_ATTRIBUTES;
|
|
|
7559
7807
|
exports.DetailViewBuilder = DetailViewBuilder;
|
|
7560
7808
|
exports.DocumentsTabConfig = DocumentsTabConfig;
|
|
7561
7809
|
exports.EMPTY_VALUE_PLACEHOLDER = EMPTY_VALUE_PLACEHOLDER;
|
|
7810
|
+
exports.ESTIMATED_COUNT_CAP = ESTIMATED_COUNT_CAP;
|
|
7562
7811
|
exports.EmailsTabConfig = EmailsTabConfig;
|
|
7563
7812
|
exports.FORM_FORBIDDEN_ATTRIBUTE_TYPES = FORM_FORBIDDEN_ATTRIBUTE_TYPES;
|
|
7564
7813
|
exports.FlagRegistry = FlagRegistry;
|
|
@@ -7574,6 +7823,10 @@ exports.LIVE_STREAM_START_CURSOR = LIVE_STREAM_START_CURSOR;
|
|
|
7574
7823
|
exports.ListViewBuilder = ListViewBuilder;
|
|
7575
7824
|
exports.ListViewTabConfigBuilder = ListViewTabConfigBuilder;
|
|
7576
7825
|
exports.MAX_PRESET_DEPTH = MAX_PRESET_DEPTH;
|
|
7826
|
+
exports.MAX_TODOS = MAX_TODOS;
|
|
7827
|
+
exports.MAX_TODO_DESCRIPTION_CHARS = MAX_TODO_DESCRIPTION_CHARS;
|
|
7828
|
+
exports.MAX_TODO_ID_CHARS = MAX_TODO_ID_CHARS;
|
|
7829
|
+
exports.MAX_TODO_RESULT_CHARS = MAX_TODO_RESULT_CHARS;
|
|
7577
7830
|
exports.MEMORY_LIST_VIEW = MEMORY_LIST_VIEW;
|
|
7578
7831
|
exports.MEMORY_OBJECT = MEMORY_OBJECT;
|
|
7579
7832
|
exports.MEMORY_VIEW = MEMORY_VIEW;
|
|
@@ -7589,34 +7842,32 @@ exports.NOTIFICATION_TYPE_AGENT_SESSION_TIMEOUT = NOTIFICATION_TYPE_AGENT_SESSIO
|
|
|
7589
7842
|
exports.NOTIFICATION_TYPE_AGENT_SESSION_WAITING_HUMAN = NOTIFICATION_TYPE_AGENT_SESSION_WAITING_HUMAN;
|
|
7590
7843
|
exports.NOTIFICATION_TYPE_AGENT_TASK_ASSIGNED = NOTIFICATION_TYPE_AGENT_TASK_ASSIGNED;
|
|
7591
7844
|
exports.NOTIFICATION_WORK_STATES = NOTIFICATION_WORK_STATES;
|
|
7592
|
-
exports.NO_VALUE_OPERATORS = NO_VALUE_OPERATORS;
|
|
7593
7845
|
exports.NoopGeocodingAdapter = NoopGeocodingAdapter;
|
|
7594
|
-
exports.OPERATORS_BY_TYPE = OPERATORS_BY_TYPE;
|
|
7595
7846
|
exports.OPERATOR_SPECS = OPERATOR_SPECS;
|
|
7596
7847
|
exports.ObjectBuilder = ObjectBuilder;
|
|
7597
7848
|
exports.PRESENTATION_PROPERTIES = PRESENTATION_PROPERTIES;
|
|
7598
7849
|
exports.QUALIFIED_SEPARATOR = QUALIFIED_SEPARATOR;
|
|
7850
|
+
exports.RECORD_CREATOR_ROOT_ACTOR_METADATA_KEY = RECORD_CREATOR_ROOT_ACTOR_METADATA_KEY;
|
|
7599
7851
|
exports.RELATION_TARGET_ANY = RELATION_TARGET_ANY;
|
|
7600
|
-
exports.RESERVED_ATTRIBUTE_NAMES = RESERVED_ATTRIBUTE_NAMES;
|
|
7601
|
-
exports.RESERVED_OBJECT_NAMES = RESERVED_OBJECT_NAMES;
|
|
7602
7852
|
exports.RelationGroupBuilder = RelationGroupBuilder;
|
|
7603
7853
|
exports.RichtextTabConfig = RichtextTabConfig;
|
|
7854
|
+
exports.SCHEMA_PLAN_LIMITS = SCHEMA_PLAN_LIMITS;
|
|
7855
|
+
exports.SESSION_TERMINAL_STATUSES = SESSION_TERMINAL_STATUSES;
|
|
7604
7856
|
exports.SKILL_LIST_VIEW = SKILL_LIST_VIEW;
|
|
7605
7857
|
exports.SKILL_OBJECT = SKILL_OBJECT;
|
|
7606
7858
|
exports.SKILL_VIEW = SKILL_VIEW;
|
|
7607
7859
|
exports.STANDARD_SCHEMA_VENDOR = STANDARD_SCHEMA_VENDOR;
|
|
7608
|
-
exports.SYNONYM_ALIASES = SYNONYM_ALIASES;
|
|
7609
|
-
exports.SYSTEM_ATTRIBUTES = SYSTEM_ATTRIBUTES;
|
|
7610
|
-
exports.SYSTEM_ATTRIBUTE_I18N_KEYS = SYSTEM_ATTRIBUTE_I18N_KEYS;
|
|
7611
|
-
exports.SYSTEM_FIELD_NAMES = SYSTEM_FIELD_NAMES;
|
|
7612
7860
|
exports.SYSTEM_RESOURCES = SYSTEM_RESOURCES;
|
|
7613
7861
|
exports.SYSTEM_RESOURCE_LABELS = SYSTEM_RESOURCE_LABELS;
|
|
7862
|
+
exports.TODO_PLAN_STATUSES = TODO_PLAN_STATUSES;
|
|
7863
|
+
exports.TODO_STATUSES = TODO_STATUSES;
|
|
7614
7864
|
exports.TabBuilder = TabBuilder;
|
|
7615
7865
|
exports.TableTabConfig = TableTabConfig;
|
|
7616
7866
|
exports.USER_STATUSES = USER_STATUSES;
|
|
7617
7867
|
exports.accessLevelToActions = accessLevelToActions;
|
|
7618
7868
|
exports.actionsToAccessLevel = actionsToAccessLevel;
|
|
7619
7869
|
exports.agent = agent;
|
|
7870
|
+
exports.agentDisplayName = agentDisplayName;
|
|
7620
7871
|
exports.applyPipes = applyPipes;
|
|
7621
7872
|
exports.applyRelationProps = applyRelationProps;
|
|
7622
7873
|
exports.assertAcyclicComputedDependencies = assertAcyclicComputedDependencies;
|
|
@@ -7629,19 +7880,21 @@ exports.checkbox = checkbox;
|
|
|
7629
7880
|
exports.compareLiveStreamCursors = compareLiveStreamCursors;
|
|
7630
7881
|
exports.compileComputedFormula = compileComputedFormula;
|
|
7631
7882
|
exports.compileRollupAttribute = compileRollupAttribute;
|
|
7883
|
+
exports.computeByteMagnitude = computeByteMagnitude;
|
|
7632
7884
|
exports.createFlagRegistry = createFlagRegistry;
|
|
7633
7885
|
exports.createFlagService = createFlagService;
|
|
7634
7886
|
exports.createStandardSchemaProps = createStandardSchemaProps;
|
|
7635
7887
|
exports.currency = currency;
|
|
7636
|
-
exports.currentActor = currentActor;
|
|
7637
7888
|
exports.date = date;
|
|
7638
7889
|
exports.dateValueStart = dateValueStart;
|
|
7890
|
+
exports.destructiveSchema = destructiveSchema;
|
|
7639
7891
|
exports.detailView = detailView;
|
|
7640
7892
|
exports.document = document;
|
|
7641
7893
|
exports.evaluateComputedAst = evaluateComputedAst;
|
|
7642
7894
|
exports.evaluateComputedFormula = evaluateComputedFormula;
|
|
7643
7895
|
exports.evaluateComputedFormulaWithResult = evaluateComputedFormulaWithResult;
|
|
7644
7896
|
exports.evaluateFilterState = evaluateFilterState;
|
|
7897
|
+
exports.evaluateRecordFilterState = evaluateRecordFilterState;
|
|
7645
7898
|
exports.extractAttributeNames = extractAttributeNames;
|
|
7646
7899
|
exports.extractCurrencyFilterValue = extractCurrencyFilterValue;
|
|
7647
7900
|
exports.extractFilterValue = extractFilterValue;
|
|
@@ -7650,38 +7903,32 @@ exports.flagRegistry = flagRegistry;
|
|
|
7650
7903
|
exports.form = form;
|
|
7651
7904
|
exports.formRegistry = formRegistry;
|
|
7652
7905
|
exports.formatAttributeValue = formatAttributeValue;
|
|
7906
|
+
exports.formatByteSize = formatByteSize;
|
|
7653
7907
|
exports.formatComputedResult = formatComputedResult;
|
|
7654
7908
|
exports.formatLocationValue = formatLocationValue;
|
|
7655
7909
|
exports.formula = formula;
|
|
7656
7910
|
exports.generateDefaultDetailView = generateDefaultDetailView;
|
|
7657
7911
|
exports.generateDefaultListView = generateDefaultListView;
|
|
7658
7912
|
exports.getActiveTab = getActiveTab;
|
|
7659
|
-
exports.getAttributeCapabilities = getAttributeCapabilities;
|
|
7660
|
-
exports.getAttributeFilterOperators = getAttributeFilterOperators;
|
|
7661
7913
|
exports.getErrorMessage = getErrorMessage;
|
|
7662
7914
|
exports.getLiveProtocolPayloadChannel = getLiveProtocolPayloadChannel;
|
|
7663
7915
|
exports.getOperatorPolarity = getOperatorPolarity;
|
|
7664
|
-
exports.
|
|
7916
|
+
exports.getRecordCreatorPrincipalId = getRecordCreatorPrincipalId;
|
|
7665
7917
|
exports.getSlotFieldTargets = getSlotFieldTargets;
|
|
7666
|
-
exports.getSystemAttributeI18nKey = getSystemAttributeI18nKey;
|
|
7667
|
-
exports.getSystemAttributeList = getSystemAttributeList;
|
|
7668
7918
|
exports.getUserDisplayName = getUserDisplayName;
|
|
7669
7919
|
exports.group = group;
|
|
7920
|
+
exports.hasDestructiveEntries = hasDestructiveEntries;
|
|
7670
7921
|
exports.hasOptions = hasOptions;
|
|
7671
7922
|
exports.inferInverseCardinality = inferInverseCardinality;
|
|
7672
7923
|
exports.inferRollupReturnType = inferRollupReturnType;
|
|
7673
|
-
exports.isAttributeFilterable = isAttributeFilterable;
|
|
7674
|
-
exports.isAttributeGroupable = isAttributeGroupable;
|
|
7675
|
-
exports.isAttributeKanbanGroupable = isAttributeKanbanGroupable;
|
|
7676
|
-
exports.isAttributeSearchable = isAttributeSearchable;
|
|
7677
7924
|
exports.isAttributeSortable = isAttributeSortable2;
|
|
7678
7925
|
exports.isBilateralRelation = isBilateralRelation;
|
|
7926
|
+
exports.isCheckboxEquality = isCheckboxEquality;
|
|
7679
7927
|
exports.isComputedFunctionName = isComputedFunctionName;
|
|
7680
7928
|
exports.isDateRangeValue = isDateRangeValue;
|
|
7681
7929
|
exports.isDefaultRole = isDefaultRole;
|
|
7682
7930
|
exports.isDetailView = isDetailView;
|
|
7683
7931
|
exports.isDocumentAttribute = isDocumentAttribute;
|
|
7684
|
-
exports.isDynamicValue = isDynamicValue;
|
|
7685
7932
|
exports.isEmptyObject = isEmptyObject;
|
|
7686
7933
|
exports.isFieldGroup = isFieldGroup;
|
|
7687
7934
|
exports.isFormDefinition = isFormDefinition;
|
|
@@ -7701,23 +7948,20 @@ exports.isLiveEventType = isLiveEventType;
|
|
|
7701
7948
|
exports.isLiveGapPayload = isLiveGapPayload;
|
|
7702
7949
|
exports.isLiveReplayCompletePayload = isLiveReplayCompletePayload;
|
|
7703
7950
|
exports.isLiveStreamCursor = isLiveStreamCursor;
|
|
7704
|
-
exports.isManagedSystemAttribute = isManagedSystemAttribute;
|
|
7705
|
-
exports.isNoValueOperator = isNoValueOperator;
|
|
7706
7951
|
exports.isNotEmpty = isNotEmpty;
|
|
7707
7952
|
exports.isPlainRecord = isPlainRecord;
|
|
7708
7953
|
exports.isRelationGroup = isRelationGroup;
|
|
7709
7954
|
exports.isStandardSchema = isStandardSchema;
|
|
7955
|
+
exports.isTerminalSessionStatus = isTerminalSessionStatus;
|
|
7710
7956
|
exports.isUniversalRelation = isUniversalRelation;
|
|
7711
7957
|
exports.jsonFlag = jsonFlag;
|
|
7712
7958
|
exports.listView = listView;
|
|
7713
7959
|
exports.liveChannelKey = liveChannelKey;
|
|
7714
7960
|
exports.location = location;
|
|
7715
|
-
exports.
|
|
7961
|
+
exports.matchesAccepts = matchesAccepts;
|
|
7716
7962
|
exports.multiselect = multiselect;
|
|
7717
7963
|
exports.normalizeDateValue = normalizeDateValue;
|
|
7718
7964
|
exports.normalizeForEdgeRpc = normalizeForEdgeRpc;
|
|
7719
|
-
exports.normalizeOperator = normalizeOperator;
|
|
7720
|
-
exports.now = now;
|
|
7721
7965
|
exports.number = number;
|
|
7722
7966
|
exports.numberFlag = numberFlag;
|
|
7723
7967
|
exports.object = object;
|
|
@@ -7725,7 +7969,13 @@ exports.parseLiveChannelKey = parseLiveChannelKey;
|
|
|
7725
7969
|
exports.parseLiveSubscribePayload = parseLiveSubscribePayload;
|
|
7726
7970
|
exports.parseLiveUnsubscribePayload = parseLiveUnsubscribePayload;
|
|
7727
7971
|
exports.parseQualifiedAttribute = parseQualifiedAttribute;
|
|
7972
|
+
exports.persistedDefaultViewTargetSchema = persistedDefaultViewTargetSchema;
|
|
7973
|
+
exports.persistedSchemaPlanSchema = persistedSchemaPlanSchema;
|
|
7728
7974
|
exports.phone = phone;
|
|
7975
|
+
exports.plannedAttributeSchema = plannedAttributeSchema;
|
|
7976
|
+
exports.plannedInlineAttributeSchema = plannedInlineAttributeSchema;
|
|
7977
|
+
exports.plannedObjectSchema = plannedObjectSchema;
|
|
7978
|
+
exports.proposedDefaultViewTargetSchema = proposedDefaultViewTargetSchema;
|
|
7729
7979
|
exports.registry = registry;
|
|
7730
7980
|
exports.relation = relation;
|
|
7731
7981
|
exports.relationGroup = relationGroup;
|
|
@@ -7735,15 +7985,17 @@ exports.resolvePropertyDefinitions = resolvePropertyDefinitions;
|
|
|
7735
7985
|
exports.richtext = richtext;
|
|
7736
7986
|
exports.rollup = rollup;
|
|
7737
7987
|
exports.rollupToFormulaExpression = rollupToFormulaExpression;
|
|
7988
|
+
exports.schemaPlanSchema = schemaPlanSchema;
|
|
7738
7989
|
exports.select = select;
|
|
7739
7990
|
exports.status = status;
|
|
7740
7991
|
exports.stringFlag = stringFlag;
|
|
7741
7992
|
exports.text = text;
|
|
7742
7993
|
exports.toMultiValueOperator = toMultiValueOperator;
|
|
7743
7994
|
exports.toUndefinedIfEmpty = toUndefinedIfEmpty;
|
|
7744
|
-
exports.today = today;
|
|
7745
7995
|
exports.user = user;
|
|
7746
7996
|
exports.validateAttributeName = validateAttributeName;
|
|
7747
|
-
exports.
|
|
7997
|
+
exports.validateLabelExpression = validateLabelExpression;
|
|
7998
|
+
exports.validateObjectName = validateObjectName;
|
|
7748
7999
|
exports.viewRegistry = viewRegistry;
|
|
8000
|
+
exports.viewStateKey = viewStateKey;
|
|
7749
8001
|
exports.viewSyncPayload = viewSyncPayload;
|