@stndrds/schema 1.0.0-alpha.265 → 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/chunk-6ZDH3EJA.js +1261 -0
- package/dist/chunk-F6ATLCIR.mjs +1214 -0
- package/dist/{chunk-ZBQEMIAV.js → chunk-FDIAOFHS.js} +11 -8
- package/dist/{chunk-UXCJ3NI4.mjs → chunk-KDHDC7E6.mjs} +150 -9
- package/dist/{chunk-U36ZIBEM.mjs → chunk-O73ROMWQ.mjs} +15 -6
- package/dist/{chunk-QIWADKYA.mjs → chunk-POULKEJM.mjs} +11 -9
- package/dist/{chunk-EBGRZUIH.js → chunk-Q4SZAMJT.js} +5 -0
- package/dist/{chunk-NGGU6BSN.mjs → chunk-QMLO7V5E.mjs} +6 -6
- package/dist/{chunk-L4U5QEQL.js → chunk-QN2N3IJZ.js} +158 -8
- package/dist/{chunk-JUKLL5RJ.mjs → chunk-R5LAJCBU.mjs} +5 -2
- package/dist/{chunk-NI3HCSYH.js → chunk-V6Q7HCA7.js} +11 -11
- package/dist/{chunk-QAF3HNKQ.js → chunk-ZPFOKBIN.js} +16 -5
- package/dist/exceptions.d.mts +21 -8
- package/dist/exceptions.d.ts +21 -8
- package/dist/exceptions.js +42 -38
- package/dist/exceptions.mjs +1 -1
- 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 +1489 -2222
- package/dist/index.d.ts +1489 -2222
- package/dist/index.js +1274 -1038
- package/dist/index.mjs +894 -905
- package/dist/{helpers-eyrnPJEF.d.ts → objects-A1ED9af-.d.ts} +32 -77
- package/dist/{helpers-uKLet0kF.d.mts → objects-BCaBw2ef.d.mts} +32 -77
- package/dist/validation/all.d.mts +4 -2
- package/dist/validation/all.d.ts +4 -2
- package/dist/validation/all.js +88 -16
- package/dist/validation/all.mjs +9 -9
- package/dist/validation/complex/phone.js +2 -2
- package/dist/validation/complex/phone.mjs +1 -1
- 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/object/index.d.mts +2 -2
- package/dist/validation/object/index.d.ts +2 -2
- package/dist/validation/object/index.js +19 -19
- package/dist/validation/object/index.mjs +7 -7
- package/dist/validation/primitives/text.js +2 -2
- package/dist/validation/primitives/text.mjs +1 -1
- package/package.json +2 -2
- package/dist/chunk-PGERPYDR.js +0 -2
- package/dist/chunk-SP3PNHYF.mjs +0 -1
package/dist/index.js
CHANGED
|
@@ -1,30 +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-5WATIVCA.js');
|
|
8
|
-
require('./chunk-SI34M4IC.js');
|
|
9
|
-
require('./chunk-YIP5FJ5H.js');
|
|
10
|
-
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');
|
|
11
7
|
require('./chunk-EW5XR2X3.js');
|
|
12
8
|
require('./chunk-QWKLQRBX.js');
|
|
13
9
|
require('./chunk-KNGWHQLR.js');
|
|
14
10
|
require('./chunk-HTSTPTNZ.js');
|
|
15
11
|
require('./chunk-V2UA2D4E.js');
|
|
16
|
-
var
|
|
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');
|
|
17
17
|
require('./chunk-ACKMC6FL.js');
|
|
18
18
|
require('./chunk-E6JUYGJX.js');
|
|
19
|
-
var
|
|
19
|
+
var chunkQ4SZAMJT_js = require('./chunk-Q4SZAMJT.js');
|
|
20
20
|
require('./chunk-EEH4XQ7W.js');
|
|
21
21
|
var chunkYKWSHBT5_js = require('./chunk-YKWSHBT5.js');
|
|
22
22
|
var constants = require('@stndrds/constants');
|
|
23
|
-
var
|
|
23
|
+
var z2 = require('zod');
|
|
24
24
|
|
|
25
25
|
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
26
26
|
|
|
27
|
-
var
|
|
27
|
+
var z2__default = /*#__PURE__*/_interopDefault(z2);
|
|
28
28
|
|
|
29
29
|
// src/types/notifications.ts
|
|
30
30
|
var NOTIFICATION_KINDS = ["fyi", "task", "question", "handoff", "system"];
|
|
@@ -69,408 +69,6 @@ var BEHAVIOR_PROPERTIES = [
|
|
|
69
69
|
];
|
|
70
70
|
var PRESENTATION_PROPERTIES = ["label", "description", "placeholder", "icon"];
|
|
71
71
|
|
|
72
|
-
// src/types/system-attributes.ts
|
|
73
|
-
var SYSTEM_ATTRIBUTE_I18N_KEYS = {
|
|
74
|
-
createdAt: "createdAt",
|
|
75
|
-
updatedAt: "updatedAt",
|
|
76
|
-
createdBy: "createdBy",
|
|
77
|
-
lastUpdatedBy: "lastUpdatedBy",
|
|
78
|
-
attachments: "attachments"
|
|
79
|
-
};
|
|
80
|
-
function getSystemAttributeI18nKey(name) {
|
|
81
|
-
return SYSTEM_ATTRIBUTE_I18N_KEYS[name];
|
|
82
|
-
}
|
|
83
|
-
var SYSTEM_ATTRIBUTES = {
|
|
84
|
-
createdAt: {
|
|
85
|
-
id: "system:createdAt",
|
|
86
|
-
name: "createdAt",
|
|
87
|
-
label: "Created time",
|
|
88
|
-
type: "date",
|
|
89
|
-
required: false,
|
|
90
|
-
system: true,
|
|
91
|
-
icon: "clock-circle",
|
|
92
|
-
description: "When this record was created"
|
|
93
|
-
},
|
|
94
|
-
updatedAt: {
|
|
95
|
-
id: "system:updatedAt",
|
|
96
|
-
name: "updatedAt",
|
|
97
|
-
label: "Last edited time",
|
|
98
|
-
type: "date",
|
|
99
|
-
required: false,
|
|
100
|
-
system: true,
|
|
101
|
-
icon: "clock-circle",
|
|
102
|
-
description: "When this record was last modified"
|
|
103
|
-
},
|
|
104
|
-
createdBy: {
|
|
105
|
-
id: "system:createdBy",
|
|
106
|
-
name: "createdBy",
|
|
107
|
-
label: "Created by",
|
|
108
|
-
type: "user",
|
|
109
|
-
required: false,
|
|
110
|
-
system: true,
|
|
111
|
-
multiple: false,
|
|
112
|
-
icon: "user",
|
|
113
|
-
description: "Actor who created this record"
|
|
114
|
-
},
|
|
115
|
-
lastUpdatedBy: {
|
|
116
|
-
id: "system:lastUpdatedBy",
|
|
117
|
-
name: "lastUpdatedBy",
|
|
118
|
-
label: "Last edited by",
|
|
119
|
-
type: "user",
|
|
120
|
-
required: false,
|
|
121
|
-
system: true,
|
|
122
|
-
multiple: false,
|
|
123
|
-
icon: "user",
|
|
124
|
-
description: "Actor who last modified this record"
|
|
125
|
-
},
|
|
126
|
-
/**
|
|
127
|
-
* System attribute for free-form document attachments.
|
|
128
|
-
* Hidden from forms, visible in Documents tab.
|
|
129
|
-
* Users can attach any document without template constraints.
|
|
130
|
-
*/
|
|
131
|
-
attachments: {
|
|
132
|
-
id: "system:attachments",
|
|
133
|
-
name: "attachments",
|
|
134
|
-
label: "Attachments",
|
|
135
|
-
type: "document",
|
|
136
|
-
required: false,
|
|
137
|
-
system: true,
|
|
138
|
-
hidden: true,
|
|
139
|
-
// Hidden from regular form views
|
|
140
|
-
icon: "paperclip",
|
|
141
|
-
description: "Free-form document attachments"
|
|
142
|
-
}
|
|
143
|
-
};
|
|
144
|
-
function getSystemAttributeList() {
|
|
145
|
-
return Object.values(SYSTEM_ATTRIBUTES);
|
|
146
|
-
}
|
|
147
|
-
function isManagedSystemAttribute(attribute) {
|
|
148
|
-
return attribute.id?.startsWith("system:") ?? false;
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
// src/types/attribute-capabilities.ts
|
|
152
|
-
var TEXT_OPERATORS = [
|
|
153
|
-
"is",
|
|
154
|
-
"is_not",
|
|
155
|
-
"contains",
|
|
156
|
-
"not_contains",
|
|
157
|
-
"starts_with",
|
|
158
|
-
"ends_with",
|
|
159
|
-
"is_empty",
|
|
160
|
-
"is_not_empty"
|
|
161
|
-
];
|
|
162
|
-
var NUMBER_OPERATORS = [
|
|
163
|
-
"eq",
|
|
164
|
-
"neq",
|
|
165
|
-
"lt",
|
|
166
|
-
"gt",
|
|
167
|
-
"lte",
|
|
168
|
-
"gte",
|
|
169
|
-
"is_empty",
|
|
170
|
-
"is_not_empty"
|
|
171
|
-
];
|
|
172
|
-
var CHECKBOX_OPERATORS = [
|
|
173
|
-
"is_checked",
|
|
174
|
-
"is_not_checked"
|
|
175
|
-
];
|
|
176
|
-
var DATE_OPERATORS = [
|
|
177
|
-
"is",
|
|
178
|
-
"is_not",
|
|
179
|
-
"before",
|
|
180
|
-
"after",
|
|
181
|
-
"on_or_before",
|
|
182
|
-
"on_or_after",
|
|
183
|
-
"is_within",
|
|
184
|
-
"day_month_eq",
|
|
185
|
-
"is_empty",
|
|
186
|
-
"is_not_empty"
|
|
187
|
-
];
|
|
188
|
-
var SELECT_OPERATORS = [
|
|
189
|
-
"is",
|
|
190
|
-
"is_not",
|
|
191
|
-
"any_of",
|
|
192
|
-
"none_of",
|
|
193
|
-
"is_empty",
|
|
194
|
-
"is_not_empty"
|
|
195
|
-
];
|
|
196
|
-
var MULTISELECT_OPERATORS = [
|
|
197
|
-
"contains",
|
|
198
|
-
"not_contains",
|
|
199
|
-
"is_empty",
|
|
200
|
-
"is_not_empty"
|
|
201
|
-
];
|
|
202
|
-
var REFERENCE_OPERATORS = [
|
|
203
|
-
"is",
|
|
204
|
-
"is_not",
|
|
205
|
-
"any_of",
|
|
206
|
-
"none_of",
|
|
207
|
-
"contains",
|
|
208
|
-
"not_contains",
|
|
209
|
-
"is_empty",
|
|
210
|
-
"is_not_empty"
|
|
211
|
-
];
|
|
212
|
-
var PRESENCE_OPERATORS = [
|
|
213
|
-
"is_empty",
|
|
214
|
-
"is_not_empty"
|
|
215
|
-
];
|
|
216
|
-
var FORMULA_OPERATORS = [
|
|
217
|
-
"is",
|
|
218
|
-
"is_not",
|
|
219
|
-
"eq",
|
|
220
|
-
"neq",
|
|
221
|
-
"lt",
|
|
222
|
-
"gt",
|
|
223
|
-
"lte",
|
|
224
|
-
"gte",
|
|
225
|
-
"contains",
|
|
226
|
-
"not_contains",
|
|
227
|
-
"is_empty",
|
|
228
|
-
"is_not_empty"
|
|
229
|
-
];
|
|
230
|
-
var ATTRIBUTE_FILTER_OPERATORS = {
|
|
231
|
-
text: TEXT_OPERATORS,
|
|
232
|
-
richtext: [],
|
|
233
|
-
number: NUMBER_OPERATORS,
|
|
234
|
-
checkbox: CHECKBOX_OPERATORS,
|
|
235
|
-
date: DATE_OPERATORS,
|
|
236
|
-
phone: ["is", "is_not", "contains", "not_contains", "is_empty", "is_not_empty"],
|
|
237
|
-
currency: NUMBER_OPERATORS,
|
|
238
|
-
status: SELECT_OPERATORS,
|
|
239
|
-
select: SELECT_OPERATORS,
|
|
240
|
-
multiselect: MULTISELECT_OPERATORS,
|
|
241
|
-
location: [],
|
|
242
|
-
user: REFERENCE_OPERATORS,
|
|
243
|
-
relation: REFERENCE_OPERATORS,
|
|
244
|
-
formula: FORMULA_OPERATORS,
|
|
245
|
-
document: PRESENCE_OPERATORS
|
|
246
|
-
};
|
|
247
|
-
var COMPUTED_TYPES = /* @__PURE__ */ new Set(["formula", "rollup"]);
|
|
248
|
-
var EDGE_BACKED_TYPES = /* @__PURE__ */ new Set(["user", "relation", "document"]);
|
|
249
|
-
var STATIC_DEFAULT_TYPES = /* @__PURE__ */ new Set([
|
|
250
|
-
"text",
|
|
251
|
-
"richtext",
|
|
252
|
-
"number",
|
|
253
|
-
"select",
|
|
254
|
-
"multiselect",
|
|
255
|
-
"status",
|
|
256
|
-
"date",
|
|
257
|
-
"phone",
|
|
258
|
-
"currency",
|
|
259
|
-
"location",
|
|
260
|
-
"user",
|
|
261
|
-
"relation",
|
|
262
|
-
"document"
|
|
263
|
-
]);
|
|
264
|
-
var PLACEHOLDER_TYPES = /* @__PURE__ */ new Set([
|
|
265
|
-
"text",
|
|
266
|
-
"number",
|
|
267
|
-
"date",
|
|
268
|
-
"phone",
|
|
269
|
-
"currency",
|
|
270
|
-
"select",
|
|
271
|
-
"multiselect"
|
|
272
|
-
]);
|
|
273
|
-
var SEARCHABLE_TYPES = /* @__PURE__ */ new Set([
|
|
274
|
-
"text",
|
|
275
|
-
"phone",
|
|
276
|
-
"status",
|
|
277
|
-
"select",
|
|
278
|
-
"multiselect"
|
|
279
|
-
]);
|
|
280
|
-
var SORTABLE_TYPES = /* @__PURE__ */ new Set([
|
|
281
|
-
"text",
|
|
282
|
-
"number",
|
|
283
|
-
"checkbox",
|
|
284
|
-
"date",
|
|
285
|
-
"phone",
|
|
286
|
-
"currency",
|
|
287
|
-
"status",
|
|
288
|
-
"select"
|
|
289
|
-
]);
|
|
290
|
-
function getAttributeCapabilities(attribute) {
|
|
291
|
-
const suppressed = Boolean(attribute.hidden || attribute.archived);
|
|
292
|
-
const active = !attribute.archived;
|
|
293
|
-
const computed = COMPUTED_TYPES.has(attribute.type);
|
|
294
|
-
const document2 = attribute.type === "document";
|
|
295
|
-
const edgeBacked = EDGE_BACKED_TYPES.has(attribute.type);
|
|
296
|
-
const cardinality = getAttributeCardinality(attribute);
|
|
297
|
-
const operators = suppressed ? [] : getRawFilterOperators(attribute);
|
|
298
|
-
const filterable = operators.length > 0 && !suppressed;
|
|
299
|
-
const searchable = !suppressed && SEARCHABLE_TYPES.has(attribute.type);
|
|
300
|
-
const sortable = !suppressed && SORTABLE_TYPES.has(attribute.type);
|
|
301
|
-
const groupable = !suppressed && isGroupableType(attribute.type);
|
|
302
|
-
const kanbanGroupable = !suppressed && attribute.type === "status";
|
|
303
|
-
const managed = isManagedSystemAttribute(attribute);
|
|
304
|
-
const readOnly = computed || document2 || managed;
|
|
305
|
-
const editable = !(suppressed || readOnly);
|
|
306
|
-
const required = isRequiredForbidden(attribute.type) ? "forbidden" : "allowed";
|
|
307
|
-
const defaultValue = getDefaultValueCapability(attribute.type);
|
|
308
|
-
const maxItems = supportsMaxItems(attribute);
|
|
309
|
-
const placeholder = PLACEHOLDER_TYPES.has(attribute.type);
|
|
310
|
-
const warningWhenDeprecated = Boolean(attribute.deprecated && !suppressed);
|
|
311
|
-
const editMode = resolveEditMode(attribute);
|
|
312
|
-
return {
|
|
313
|
-
lifecycle: {
|
|
314
|
-
active,
|
|
315
|
-
deprecated: Boolean(attribute.deprecated),
|
|
316
|
-
visibleInArchitect: true,
|
|
317
|
-
visibleInRuntime: !suppressed,
|
|
318
|
-
warningWhenDeprecated
|
|
319
|
-
},
|
|
320
|
-
storage: {
|
|
321
|
-
mode: computed ? "computed" : edgeBacked ? "edge" : "value",
|
|
322
|
-
cardinality,
|
|
323
|
-
edgeBacked,
|
|
324
|
-
preservesExistingValues: Boolean(attribute.archived),
|
|
325
|
-
qualifiedProperties: supportsQualifiedProperties(attribute.type),
|
|
326
|
-
polymorphic: getPolymorphicCapability(attribute),
|
|
327
|
-
maxItems
|
|
328
|
-
},
|
|
329
|
-
authoring: {
|
|
330
|
-
editable,
|
|
331
|
-
readOnly,
|
|
332
|
-
directEdit: editable && editMode === "inline",
|
|
333
|
-
required,
|
|
334
|
-
defaultValue,
|
|
335
|
-
placeholder,
|
|
336
|
-
maxItems
|
|
337
|
-
},
|
|
338
|
-
presentation: {
|
|
339
|
-
formField: !suppressed && isFormFieldType(attribute.type),
|
|
340
|
-
tableCell: !suppressed && isTableCellType(attribute.type),
|
|
341
|
-
defaultColumn: !suppressed && isDefaultColumnType(attribute.type),
|
|
342
|
-
compactDisplay: !suppressed,
|
|
343
|
-
popoverEditor: !suppressed && editMode === "popover",
|
|
344
|
-
placeholder,
|
|
345
|
-
warningWhenDeprecated
|
|
346
|
-
},
|
|
347
|
-
query: {
|
|
348
|
-
filterable,
|
|
349
|
-
searchable,
|
|
350
|
-
sortable,
|
|
351
|
-
groupable,
|
|
352
|
-
kanbanGroupable,
|
|
353
|
-
operators
|
|
354
|
-
},
|
|
355
|
-
agent: {
|
|
356
|
-
readable: !suppressed,
|
|
357
|
-
writable: editable && !document2,
|
|
358
|
-
compactReadable: !suppressed,
|
|
359
|
-
contentReadable: !suppressed && isContentReadableType(attribute.type),
|
|
360
|
-
requiresDedicatedTool: document2
|
|
361
|
-
},
|
|
362
|
-
exchange: {
|
|
363
|
-
importable: !suppressed,
|
|
364
|
-
exportable: !suppressed,
|
|
365
|
-
schemaExportable: true,
|
|
366
|
-
metadataExportable: false
|
|
367
|
-
}
|
|
368
|
-
};
|
|
369
|
-
}
|
|
370
|
-
function getAttributeFilterOperators(attribute) {
|
|
371
|
-
return getAttributeCapabilities(attribute).query.operators;
|
|
372
|
-
}
|
|
373
|
-
function isAttributeFilterable(attribute) {
|
|
374
|
-
return getAttributeCapabilities(attribute).query.filterable;
|
|
375
|
-
}
|
|
376
|
-
function isAttributeSearchable(attribute) {
|
|
377
|
-
return getAttributeCapabilities(attribute).query.searchable;
|
|
378
|
-
}
|
|
379
|
-
function isAttributeSortable(attribute) {
|
|
380
|
-
return getAttributeCapabilities(attribute).query.sortable;
|
|
381
|
-
}
|
|
382
|
-
function isAttributeGroupable(attribute) {
|
|
383
|
-
return getAttributeCapabilities(attribute).query.groupable;
|
|
384
|
-
}
|
|
385
|
-
function isAttributeKanbanGroupable(attribute) {
|
|
386
|
-
return getAttributeCapabilities(attribute).query.kanbanGroupable;
|
|
387
|
-
}
|
|
388
|
-
function getRollupFilterOperators(attr) {
|
|
389
|
-
const fn = attr.function;
|
|
390
|
-
if (fn === "earliest" || fn === "latest") {
|
|
391
|
-
return ATTRIBUTE_FILTER_OPERATORS.date;
|
|
392
|
-
}
|
|
393
|
-
if (fn === "original") {
|
|
394
|
-
const targetType = attr.targetAttributeType;
|
|
395
|
-
if (targetType && hasFilterOperatorEntry(targetType)) {
|
|
396
|
-
return ATTRIBUTE_FILTER_OPERATORS[targetType];
|
|
397
|
-
}
|
|
398
|
-
return ATTRIBUTE_FILTER_OPERATORS.number;
|
|
399
|
-
}
|
|
400
|
-
return ATTRIBUTE_FILTER_OPERATORS.number;
|
|
401
|
-
}
|
|
402
|
-
function getRawFilterOperators(attribute) {
|
|
403
|
-
if (attribute.type === "rollup") {
|
|
404
|
-
return getRollupFilterOperators(attribute);
|
|
405
|
-
}
|
|
406
|
-
return ATTRIBUTE_FILTER_OPERATORS[attribute.type] ?? [];
|
|
407
|
-
}
|
|
408
|
-
function getAttributeCardinality(attribute) {
|
|
409
|
-
if (attribute.type === "multiselect" || attribute.type === "document") return "many";
|
|
410
|
-
if (attribute.type === "user" && attribute.multiple === true) return "many";
|
|
411
|
-
if (attribute.type === "relation") return attribute.cardinality === "many" ? "many" : "one";
|
|
412
|
-
return "one";
|
|
413
|
-
}
|
|
414
|
-
function getPolymorphicCapability(attribute) {
|
|
415
|
-
if (attribute.type !== "relation") return "none";
|
|
416
|
-
const relation2 = attribute;
|
|
417
|
-
const targets = relation2.targets ?? [];
|
|
418
|
-
if (targets.length === 1 && targets[0]?.object === "*") return "internal";
|
|
419
|
-
return targets.length > 1 ? "code-only" : "none";
|
|
420
|
-
}
|
|
421
|
-
function supportsMaxItems(attribute) {
|
|
422
|
-
if (attribute.type === "multiselect") return true;
|
|
423
|
-
if (attribute.type === "relation") return attribute.cardinality === "many";
|
|
424
|
-
return false;
|
|
425
|
-
}
|
|
426
|
-
function supportsQualifiedProperties(type) {
|
|
427
|
-
return type === "relation" || type === "document";
|
|
428
|
-
}
|
|
429
|
-
function isRequiredForbidden(type) {
|
|
430
|
-
return type === "checkbox" || type === "formula" || type === "rollup";
|
|
431
|
-
}
|
|
432
|
-
function getDefaultValueCapability(type) {
|
|
433
|
-
if (type === "checkbox") return "automatic";
|
|
434
|
-
if (type === "formula" || type === "rollup") return "forbidden";
|
|
435
|
-
if (STATIC_DEFAULT_TYPES.has(type)) return "static";
|
|
436
|
-
return "forbidden";
|
|
437
|
-
}
|
|
438
|
-
function isDefaultColumnType(type) {
|
|
439
|
-
return isTableCellType(type);
|
|
440
|
-
}
|
|
441
|
-
function isTableCellType(type) {
|
|
442
|
-
return type !== "richtext" && type !== "document";
|
|
443
|
-
}
|
|
444
|
-
function isFormFieldType(type) {
|
|
445
|
-
return type !== "richtext";
|
|
446
|
-
}
|
|
447
|
-
function resolveEditMode(attribute) {
|
|
448
|
-
switch (attribute.type) {
|
|
449
|
-
case "checkbox":
|
|
450
|
-
return "inline";
|
|
451
|
-
case "number":
|
|
452
|
-
return attribute.renderAs === "rating" ? "inline" : "default";
|
|
453
|
-
case "select":
|
|
454
|
-
case "multiselect":
|
|
455
|
-
return attribute.renderAs === "badges" ? "inline" : "popover";
|
|
456
|
-
case "status":
|
|
457
|
-
case "relation":
|
|
458
|
-
case "user":
|
|
459
|
-
return "popover";
|
|
460
|
-
default:
|
|
461
|
-
return "default";
|
|
462
|
-
}
|
|
463
|
-
}
|
|
464
|
-
function isGroupableType(type) {
|
|
465
|
-
return type === "status" || type === "currency";
|
|
466
|
-
}
|
|
467
|
-
function isContentReadableType(type) {
|
|
468
|
-
return type === "richtext" || type === "document";
|
|
469
|
-
}
|
|
470
|
-
function hasFilterOperatorEntry(type) {
|
|
471
|
-
return Object.prototype.hasOwnProperty.call(ATTRIBUTE_FILTER_OPERATORS, type);
|
|
472
|
-
}
|
|
473
|
-
|
|
474
72
|
// src/types/attributes.ts
|
|
475
73
|
var RELATION_TARGET_ANY = "*";
|
|
476
74
|
function isUniversalRelation(attr) {
|
|
@@ -483,7 +81,7 @@ function inferInverseCardinality(cardinality) {
|
|
|
483
81
|
return cardinality === "one" ? "many" : "many";
|
|
484
82
|
}
|
|
485
83
|
function isAttributeSortable2(attr) {
|
|
486
|
-
return isAttributeSortable(attr);
|
|
84
|
+
return chunk6ZDH3EJA_js.isAttributeSortable(attr);
|
|
487
85
|
}
|
|
488
86
|
|
|
489
87
|
// src/types/audit.ts
|
|
@@ -491,10 +89,12 @@ var AUDIT_RESOURCE_TYPES = [
|
|
|
491
89
|
"record",
|
|
492
90
|
"object",
|
|
493
91
|
"attribute",
|
|
92
|
+
"view",
|
|
494
93
|
"user",
|
|
495
94
|
"role",
|
|
496
95
|
"settings",
|
|
497
|
-
"file"
|
|
96
|
+
"file",
|
|
97
|
+
"agent"
|
|
498
98
|
];
|
|
499
99
|
var AUDIT_ACTIONS = [
|
|
500
100
|
// Records
|
|
@@ -511,6 +111,10 @@ var AUDIT_ACTIONS = [
|
|
|
511
111
|
"attribute.created",
|
|
512
112
|
"attribute.updated",
|
|
513
113
|
"attribute.deleted",
|
|
114
|
+
// Schema - Views
|
|
115
|
+
"view.created",
|
|
116
|
+
"view.updated",
|
|
117
|
+
"view.deleted",
|
|
514
118
|
// Users
|
|
515
119
|
"user.created",
|
|
516
120
|
"user.invited",
|
|
@@ -532,6 +136,32 @@ var AUDIT_ACTIONS = [
|
|
|
532
136
|
"file.deleted"
|
|
533
137
|
];
|
|
534
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
|
+
|
|
535
165
|
// src/types/document-layout.ts
|
|
536
166
|
var MAX_PRESET_DEPTH = 5;
|
|
537
167
|
|
|
@@ -547,21 +177,6 @@ function getErrorMessage(error) {
|
|
|
547
177
|
return String(error);
|
|
548
178
|
}
|
|
549
179
|
|
|
550
|
-
// src/types/filters.ts
|
|
551
|
-
var OPERATORS_BY_TYPE = ATTRIBUTE_FILTER_OPERATORS;
|
|
552
|
-
var NO_VALUE_OPERATORS = [
|
|
553
|
-
"is_empty",
|
|
554
|
-
"is_not_empty",
|
|
555
|
-
"is_checked",
|
|
556
|
-
"is_not_checked"
|
|
557
|
-
];
|
|
558
|
-
function isNoValueOperator(operator) {
|
|
559
|
-
return NO_VALUE_OPERATORS.includes(operator);
|
|
560
|
-
}
|
|
561
|
-
function getRollupFilterOperators2(attr) {
|
|
562
|
-
return getRollupFilterOperators(attr);
|
|
563
|
-
}
|
|
564
|
-
|
|
565
180
|
// src/types/forms/definition.ts
|
|
566
181
|
function isFormDefinition(obj) {
|
|
567
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);
|
|
@@ -614,29 +229,6 @@ var NoopGeocodingAdapter = class {
|
|
|
614
229
|
}
|
|
615
230
|
};
|
|
616
231
|
|
|
617
|
-
// src/types/objects.ts
|
|
618
|
-
var SYSTEM_FIELD_NAMES = [
|
|
619
|
-
"id",
|
|
620
|
-
"createdAt",
|
|
621
|
-
"updatedAt",
|
|
622
|
-
"createdBy",
|
|
623
|
-
"lastUpdatedBy"
|
|
624
|
-
];
|
|
625
|
-
var RESERVED_ATTRIBUTE_NAMES = [
|
|
626
|
-
// System fields (auto-managed)
|
|
627
|
-
...SYSTEM_FIELD_NAMES,
|
|
628
|
-
// Other ObjectRecord properties
|
|
629
|
-
"objectId",
|
|
630
|
-
"label",
|
|
631
|
-
"embeddingText",
|
|
632
|
-
"values",
|
|
633
|
-
"metadata",
|
|
634
|
-
"deletedAt",
|
|
635
|
-
"deletedBy",
|
|
636
|
-
"schemaVersion"
|
|
637
|
-
];
|
|
638
|
-
var RESERVED_OBJECT_NAMES = ["skill"];
|
|
639
|
-
|
|
640
232
|
// src/types/permissions.ts
|
|
641
233
|
var ALL_ACTIONS = ["read", "create", "update", "delete", "manage"];
|
|
642
234
|
function actionsToAccessLevel(actions) {
|
|
@@ -672,6 +264,11 @@ function hasOptions(attr) {
|
|
|
672
264
|
// src/types/user-profiles.ts
|
|
673
265
|
var USER_STATUSES = ["active", "suspended"];
|
|
674
266
|
|
|
267
|
+
// src/types/schema-state.ts
|
|
268
|
+
function viewStateKey(view) {
|
|
269
|
+
return `${view.object}:${view.name}:${view.type}`;
|
|
270
|
+
}
|
|
271
|
+
|
|
675
272
|
// src/types/views.ts
|
|
676
273
|
function isDetailView(view) {
|
|
677
274
|
return view.type === "detail";
|
|
@@ -680,12 +277,15 @@ function isListView(view) {
|
|
|
680
277
|
return view.type === "list";
|
|
681
278
|
}
|
|
682
279
|
function isFieldGroup(group2) {
|
|
683
|
-
return
|
|
280
|
+
return group2.type === "fields";
|
|
684
281
|
}
|
|
685
282
|
function isRelationGroup(group2) {
|
|
686
283
|
return group2.type === "relation";
|
|
687
284
|
}
|
|
688
285
|
|
|
286
|
+
// src/types/pagination.ts
|
|
287
|
+
var ESTIMATED_COUNT_CAP = 1e4;
|
|
288
|
+
|
|
689
289
|
// src/lib/object-helpers.ts
|
|
690
290
|
function isEmptyObject(obj) {
|
|
691
291
|
if (obj === null || obj === void 0) {
|
|
@@ -703,6 +303,21 @@ function toUndefinedIfEmpty(obj) {
|
|
|
703
303
|
return isNotEmpty(obj) ? obj : void 0;
|
|
704
304
|
}
|
|
705
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
|
+
|
|
706
321
|
// src/lib/document-attribute.ts
|
|
707
322
|
var DOCUMENT_SYSTEM_ATTRIBUTES = {
|
|
708
323
|
ATTACHMENTS: "attachments"
|
|
@@ -710,13 +325,13 @@ var DOCUMENT_SYSTEM_ATTRIBUTES = {
|
|
|
710
325
|
function isDocumentAttribute(attr) {
|
|
711
326
|
return attr.type === "document";
|
|
712
327
|
}
|
|
713
|
-
function
|
|
714
|
-
if (!
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
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;
|
|
720
335
|
});
|
|
721
336
|
}
|
|
722
337
|
|
|
@@ -846,7 +461,7 @@ function formatPhone(value) {
|
|
|
846
461
|
if (!("phoneNumber" in phone2)) return String(value);
|
|
847
462
|
if (!phone2.phoneNumber) return "";
|
|
848
463
|
if (!phone2.countryCode) return phone2.phoneNumber;
|
|
849
|
-
return
|
|
464
|
+
return chunkQ4SZAMJT_js.formatPhoneForDisplay(phone2);
|
|
850
465
|
}
|
|
851
466
|
function formatLocationValue(location2, granularity = "full") {
|
|
852
467
|
if (typeof location2 !== "object" || location2 === null) return "";
|
|
@@ -946,7 +561,7 @@ function formatAttributeValue(value, attribute) {
|
|
|
946
561
|
var SIMPLE_PIPES = ["UPPER", "LOWER", "capitalize", "trim"];
|
|
947
562
|
var PIPES_WITH_ARGS = ["prefix", "suffix", "wrap", "default"];
|
|
948
563
|
var ALL_PIPES = [...SIMPLE_PIPES, ...PIPES_WITH_ARGS];
|
|
949
|
-
var labelExpressionSchema =
|
|
564
|
+
var labelExpressionSchema = z2.z.string().min(1, "labelExpression cannot be empty").refine((val) => isLabelExpression(val), {
|
|
950
565
|
message: "labelExpression must contain at least one {{ attribute }} interpolation"
|
|
951
566
|
}).refine(
|
|
952
567
|
(val) => {
|
|
@@ -970,6 +585,19 @@ var labelExpressionSchema = z3.z.string().min(1, "labelExpression cannot be empt
|
|
|
970
585
|
message: `Invalid pipe name. Valid pipes: ${ALL_PIPES.join(", ")}`
|
|
971
586
|
}
|
|
972
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
|
+
}
|
|
973
601
|
var simplePipes = {
|
|
974
602
|
/** Convert to uppercase */
|
|
975
603
|
UPPER: (v) => String(v).toUpperCase(),
|
|
@@ -1128,6 +756,13 @@ function getUserDisplayName(user2) {
|
|
|
1128
756
|
return user2.email?.split("@")[0] ?? "";
|
|
1129
757
|
}
|
|
1130
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
|
+
|
|
1131
766
|
// src/constants/attribute-columns.ts
|
|
1132
767
|
var DB_COLUMN_FIELDS = /* @__PURE__ */ new Set([
|
|
1133
768
|
"id",
|
|
@@ -1269,6 +904,19 @@ var VALID_ICONS = new Set(constants.ICONS);
|
|
|
1269
904
|
var ATTRIBUTE_NAME_REGEX = /^[a-zA-Z_][a-zA-Z0-9_]*$/;
|
|
1270
905
|
var MAX_NAME_LENGTH = 63;
|
|
1271
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
|
+
}
|
|
1272
920
|
function assertUniqueBy(items, getKey, buildError) {
|
|
1273
921
|
const seen = /* @__PURE__ */ new Set();
|
|
1274
922
|
for (const item of items) {
|
|
@@ -1293,10 +941,10 @@ function validateAttributeName(name) {
|
|
|
1293
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'"
|
|
1294
942
|
);
|
|
1295
943
|
}
|
|
1296
|
-
if (RESERVED_ATTRIBUTE_NAMES.includes(name)) {
|
|
944
|
+
if (chunk6ZDH3EJA_js.RESERVED_ATTRIBUTE_NAMES.includes(name)) {
|
|
1297
945
|
throw new Error(
|
|
1298
946
|
`[AttributeBuilder] "${name}" is a reserved name and cannot be used as an attribute name.
|
|
1299
|
-
Reserved names: ${RESERVED_ATTRIBUTE_NAMES.join(", ")}`
|
|
947
|
+
Reserved names: ${chunk6ZDH3EJA_js.RESERVED_ATTRIBUTE_NAMES.join(", ")}`
|
|
1300
948
|
);
|
|
1301
949
|
}
|
|
1302
950
|
}
|
|
@@ -1363,14 +1011,30 @@ var DEFAULT_AGENT_EXECUTION_CONFIG = {
|
|
|
1363
1011
|
var AgentBuilder = class {
|
|
1364
1012
|
constructor(config) {
|
|
1365
1013
|
if (!config.name || config.name.trim().length === 0) {
|
|
1366
|
-
throw new
|
|
1014
|
+
throw new chunkFDIAOFHS_js.ValidationError("Agent name is required", []);
|
|
1367
1015
|
}
|
|
1368
|
-
this.bp = { name: config.name, system: true, triggers: [] };
|
|
1016
|
+
this.bp = { name: config.name, system: true, visibility: "workspace", triggers: [] };
|
|
1369
1017
|
}
|
|
1370
1018
|
description(value) {
|
|
1371
1019
|
this.bp.description = value;
|
|
1372
1020
|
return this;
|
|
1373
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
|
+
}
|
|
1374
1038
|
icon(value) {
|
|
1375
1039
|
this.bp.icon = value;
|
|
1376
1040
|
return this;
|
|
@@ -1409,6 +1073,32 @@ var AgentBuilder = class {
|
|
|
1409
1073
|
Object.assign(this.bp, value);
|
|
1410
1074
|
return this;
|
|
1411
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
|
+
}
|
|
1412
1102
|
/**
|
|
1413
1103
|
* Declare a trigger. `name` is the stable identity the boot sync uses to
|
|
1414
1104
|
* reconcile trigger rows; `enabled` defaults to true.
|
|
@@ -1436,18 +1126,25 @@ var AgentBuilder = class {
|
|
|
1436
1126
|
}
|
|
1437
1127
|
build() {
|
|
1438
1128
|
if (!this.bp.systemPrompt) {
|
|
1439
|
-
throw new
|
|
1129
|
+
throw new chunkFDIAOFHS_js.ValidationError(`Agent "${this.bp.name}": systemPrompt is required`, []);
|
|
1440
1130
|
}
|
|
1441
1131
|
if (!this.bp.model) {
|
|
1442
|
-
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
|
+
);
|
|
1443
1139
|
}
|
|
1444
1140
|
assertUniqueBy(
|
|
1445
1141
|
this.bp.triggers,
|
|
1446
1142
|
(t) => t.name,
|
|
1447
|
-
(name) => new
|
|
1143
|
+
(name) => new chunkFDIAOFHS_js.ValidationError(`Agent "${this.bp.name}": duplicate trigger name "${name}"`, [])
|
|
1448
1144
|
);
|
|
1449
1145
|
return {
|
|
1450
1146
|
...this.bp,
|
|
1147
|
+
visibility: this.bp.visibility ?? "workspace",
|
|
1451
1148
|
config: this.bp.config ?? DEFAULT_AGENT_EXECUTION_CONFIG,
|
|
1452
1149
|
systemPrompt: this.bp.systemPrompt,
|
|
1453
1150
|
model: this.bp.model
|
|
@@ -1498,7 +1195,7 @@ var BaseAttributeBuilder = class {
|
|
|
1498
1195
|
* @see https://standardschema.dev/
|
|
1499
1196
|
*/
|
|
1500
1197
|
get "~standard"() {
|
|
1501
|
-
const zodSchema =
|
|
1198
|
+
const zodSchema = chunkV6Q7HCA7_js.createAttributeValidator(this.build());
|
|
1502
1199
|
return createStandardSchemaProps(zodSchema);
|
|
1503
1200
|
}
|
|
1504
1201
|
constructor(type, name, label) {
|
|
@@ -1619,6 +1316,7 @@ var TextAttributeBuilder = class extends BaseAttributeBuilder {
|
|
|
1619
1316
|
}
|
|
1620
1317
|
pattern(value) {
|
|
1621
1318
|
this.attr.pattern = value;
|
|
1319
|
+
this.attr.format = void 0;
|
|
1622
1320
|
return this;
|
|
1623
1321
|
}
|
|
1624
1322
|
multiline(value = true) {
|
|
@@ -1637,21 +1335,24 @@ var TextAttributeBuilder = class extends BaseAttributeBuilder {
|
|
|
1637
1335
|
* Set email validation pattern
|
|
1638
1336
|
*/
|
|
1639
1337
|
email() {
|
|
1640
|
-
this.attr.
|
|
1338
|
+
this.attr.format = "email";
|
|
1339
|
+
this.attr.pattern = void 0;
|
|
1641
1340
|
return this;
|
|
1642
1341
|
}
|
|
1643
1342
|
/**
|
|
1644
1343
|
* Set URL validation pattern
|
|
1645
1344
|
*/
|
|
1646
1345
|
url() {
|
|
1647
|
-
this.attr.
|
|
1346
|
+
this.attr.format = "url";
|
|
1347
|
+
this.attr.pattern = void 0;
|
|
1648
1348
|
return this;
|
|
1649
1349
|
}
|
|
1650
1350
|
/**
|
|
1651
1351
|
* Set slug validation pattern
|
|
1652
1352
|
*/
|
|
1653
1353
|
slug() {
|
|
1654
|
-
this.attr.
|
|
1354
|
+
this.attr.format = "slug";
|
|
1355
|
+
this.attr.pattern = void 0;
|
|
1655
1356
|
return this;
|
|
1656
1357
|
}
|
|
1657
1358
|
};
|
|
@@ -2241,9 +1942,9 @@ var RollupAttributeBuilder = class extends BaseAttributeBuilder {
|
|
|
2241
1942
|
if (fn === "original" && targetType !== void 0 && targetType !== "select" && targetType !== "status" && targetType !== "multiselect") {
|
|
2242
1943
|
const relation2 = this.attr.relationAttribute ?? "relation";
|
|
2243
1944
|
const target = this.attr.targetAttribute ?? "field";
|
|
2244
|
-
throw new
|
|
1945
|
+
throw new chunkFDIAOFHS_js.SchemaError(
|
|
2245
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}").`,
|
|
2246
|
-
|
|
1947
|
+
chunkFDIAOFHS_js.SchemaErrorCode.VALIDATION_FAILED
|
|
2247
1948
|
);
|
|
2248
1949
|
}
|
|
2249
1950
|
return super.build();
|
|
@@ -2521,13 +2222,13 @@ var FormBuilder = class {
|
|
|
2521
2222
|
return this;
|
|
2522
2223
|
}
|
|
2523
2224
|
validateName(name) {
|
|
2524
|
-
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]+)*$/, {
|
|
2525
2226
|
message: "Invalid form name format. Name must be in kebab-case: 'client-onboarding', 'contact-creation'"
|
|
2526
2227
|
});
|
|
2527
2228
|
try {
|
|
2528
2229
|
schema.parse(name);
|
|
2529
2230
|
} catch (error) {
|
|
2530
|
-
if (error instanceof
|
|
2231
|
+
if (error instanceof z2.z.ZodError) {
|
|
2531
2232
|
throw new Error(`[FormBuilder] ${error.issues[0].message}`);
|
|
2532
2233
|
}
|
|
2533
2234
|
throw error;
|
|
@@ -2753,7 +2454,7 @@ var ObjectBuilder = class {
|
|
|
2753
2454
|
* @see https://standardschema.dev/
|
|
2754
2455
|
*/
|
|
2755
2456
|
get "~standard"() {
|
|
2756
|
-
const zodSchema =
|
|
2457
|
+
const zodSchema = chunkV6Q7HCA7_js.createObjectValidator(this.build());
|
|
2757
2458
|
return createStandardSchemaProps(zodSchema);
|
|
2758
2459
|
}
|
|
2759
2460
|
/**
|
|
@@ -2967,26 +2668,26 @@ var ObjectBuilder = class {
|
|
|
2967
2668
|
throw new Error("[ObjectBuilder] Missing required field: label");
|
|
2968
2669
|
}
|
|
2969
2670
|
if (!this._labelExpression) {
|
|
2970
|
-
throw new
|
|
2671
|
+
throw new chunkFDIAOFHS_js.SchemaError(
|
|
2971
2672
|
`Object "${this.obj.name}" must have a labelExpression. The labelExpression defines how records are displayed in lists and relations (e.g. "{{ name }}").`,
|
|
2972
|
-
|
|
2673
|
+
chunkFDIAOFHS_js.SchemaErrorCode.VALIDATION_FAILED
|
|
2973
2674
|
);
|
|
2974
2675
|
}
|
|
2975
2676
|
const labelResult = labelExpressionSchema.safeParse(this._labelExpression);
|
|
2976
2677
|
if (!labelResult.success) {
|
|
2977
2678
|
const errorMsg = labelResult.error.issues[0]?.message ?? "Invalid labelExpression";
|
|
2978
|
-
throw new
|
|
2679
|
+
throw new chunkFDIAOFHS_js.SchemaError(
|
|
2979
2680
|
`Invalid labelExpression for "${this.obj.name}": ${errorMsg}`,
|
|
2980
|
-
|
|
2681
|
+
chunkFDIAOFHS_js.SchemaErrorCode.VALIDATION_FAILED
|
|
2981
2682
|
);
|
|
2982
2683
|
}
|
|
2983
2684
|
if (this._embeddingExpression !== void 0) {
|
|
2984
2685
|
const embeddingResult = labelExpressionSchema.safeParse(this._embeddingExpression);
|
|
2985
2686
|
if (!embeddingResult.success) {
|
|
2986
2687
|
const errorMsg = embeddingResult.error.issues[0]?.message ?? "Invalid embeddingExpression";
|
|
2987
|
-
throw new
|
|
2688
|
+
throw new chunkFDIAOFHS_js.SchemaError(
|
|
2988
2689
|
`Invalid embeddingExpression for "${this.obj.name}": ${errorMsg}`,
|
|
2989
|
-
|
|
2690
|
+
chunkFDIAOFHS_js.SchemaErrorCode.VALIDATION_FAILED
|
|
2990
2691
|
);
|
|
2991
2692
|
}
|
|
2992
2693
|
}
|
|
@@ -3020,17 +2721,7 @@ var ObjectBuilder = class {
|
|
|
3020
2721
|
if (name === void 0) {
|
|
3021
2722
|
return;
|
|
3022
2723
|
}
|
|
3023
|
-
|
|
3024
|
-
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'"
|
|
3025
|
-
});
|
|
3026
|
-
try {
|
|
3027
|
-
objectNameSchema.parse(name);
|
|
3028
|
-
} catch (error) {
|
|
3029
|
-
if (error instanceof z3__default.default.ZodError) {
|
|
3030
|
-
throw new chunkZBQEMIAV_js.SchemaError(error.issues[0].message, chunkZBQEMIAV_js.SchemaErrorCode.INVALID_OBJECT_NAME);
|
|
3031
|
-
}
|
|
3032
|
-
throw error;
|
|
3033
|
-
}
|
|
2724
|
+
validateObjectName(name);
|
|
3034
2725
|
}
|
|
3035
2726
|
};
|
|
3036
2727
|
function object(config) {
|
|
@@ -3038,7 +2729,7 @@ function object(config) {
|
|
|
3038
2729
|
}
|
|
3039
2730
|
function validatePresetStructure(presetId, nodes, depth) {
|
|
3040
2731
|
const fail = (message, detail) => {
|
|
3041
|
-
throw new
|
|
2732
|
+
throw new chunkFDIAOFHS_js.ValidationError(message, [
|
|
3042
2733
|
{ path: ["documentLayout", "presets", presetId], message: detail }
|
|
3043
2734
|
]);
|
|
3044
2735
|
};
|
|
@@ -3065,7 +2756,7 @@ function validatePresetStructure(presetId, nodes, depth) {
|
|
|
3065
2756
|
}
|
|
3066
2757
|
var GroupBuilder = class {
|
|
3067
2758
|
constructor(id, label) {
|
|
3068
|
-
this.data = { fields: [] };
|
|
2759
|
+
this.data = { type: "fields", fields: [] };
|
|
3069
2760
|
this.data.id = id;
|
|
3070
2761
|
this.data.label = label;
|
|
3071
2762
|
}
|
|
@@ -3187,17 +2878,6 @@ var RelationGroupBuilder = class {
|
|
|
3187
2878
|
this.data.allowCreate = value;
|
|
3188
2879
|
return this;
|
|
3189
2880
|
}
|
|
3190
|
-
/**
|
|
3191
|
-
* Enable two-level traversal (through mode).
|
|
3192
|
-
* Parent rows become grouping headers; sub-rows from `attribute` are the primary display.
|
|
3193
|
-
*
|
|
3194
|
-
* @param attribute - Relation attribute on the first-level target object
|
|
3195
|
-
* @example .through("companies") — display companies linked via each member
|
|
3196
|
-
*/
|
|
3197
|
-
through(attribute) {
|
|
3198
|
-
this.data.through = { attribute };
|
|
3199
|
-
return this;
|
|
3200
|
-
}
|
|
3201
2881
|
/**
|
|
3202
2882
|
* Build the relation group definition
|
|
3203
2883
|
*/
|
|
@@ -3215,7 +2895,7 @@ var RelationGroupBuilder = class {
|
|
|
3215
2895
|
}
|
|
3216
2896
|
};
|
|
3217
2897
|
function validateViewName(name, builderName, examples) {
|
|
3218
|
-
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-]*$/, {
|
|
3219
2899
|
message: `Invalid view name format.
|
|
3220
2900
|
Name must be in kebab-case:
|
|
3221
2901
|
\u2705 Valid: ${examples.valid}
|
|
@@ -3224,7 +2904,7 @@ Name must be in kebab-case:
|
|
|
3224
2904
|
try {
|
|
3225
2905
|
viewNameSchema.parse(name);
|
|
3226
2906
|
} catch (error) {
|
|
3227
|
-
if (error instanceof
|
|
2907
|
+
if (error instanceof z2.z.ZodError) {
|
|
3228
2908
|
throw new Error(`[${builderName}] ${error.issues[0].message}`);
|
|
3229
2909
|
}
|
|
3230
2910
|
throw error;
|
|
@@ -3318,29 +2998,6 @@ var TableTabConfig = class {
|
|
|
3318
2998
|
this.tabData.sorts.push({ attribute, direction });
|
|
3319
2999
|
return this;
|
|
3320
3000
|
}
|
|
3321
|
-
/**
|
|
3322
|
-
* Traverse a 2nd-level relation to display nested data.
|
|
3323
|
-
* When active, `tab.columns` stores the 2nd-level object's attribute names.
|
|
3324
|
-
*
|
|
3325
|
-
* @param attribute - Relation attribute on the first-level target object
|
|
3326
|
-
* @example .table("members").through("companies").columns(["name", "sector"])
|
|
3327
|
-
*/
|
|
3328
|
-
through(attribute) {
|
|
3329
|
-
this.tabData.through = { attribute };
|
|
3330
|
-
return this;
|
|
3331
|
-
}
|
|
3332
|
-
/**
|
|
3333
|
-
* Show _source and _target columns in flattened (through) view
|
|
3334
|
-
*/
|
|
3335
|
-
showSourceTarget(value = true) {
|
|
3336
|
-
if (!this.tabData.through) {
|
|
3337
|
-
throw new Error(
|
|
3338
|
-
`[TableTabConfig] showSourceTarget() requires through() to be called first for tab "${this.tabData.name}"`
|
|
3339
|
-
);
|
|
3340
|
-
}
|
|
3341
|
-
this.tabData.through.showSourceTarget = value;
|
|
3342
|
-
return this;
|
|
3343
|
-
}
|
|
3344
3001
|
/**
|
|
3345
3002
|
* Continue building with a new tab
|
|
3346
3003
|
*/
|
|
@@ -3798,6 +3455,17 @@ var DetailViewBuilder = class {
|
|
|
3798
3455
|
function detailView(name, label) {
|
|
3799
3456
|
return new DetailViewBuilder(name, label);
|
|
3800
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
|
+
}
|
|
3801
3469
|
var ListViewBuilder = class {
|
|
3802
3470
|
constructor(name, label) {
|
|
3803
3471
|
validateViewName(name, "ListViewBuilder", {
|
|
@@ -3907,28 +3575,39 @@ var ListViewBuilder = class {
|
|
|
3907
3575
|
combinator: this.data.defaultFilters.combinator,
|
|
3908
3576
|
rules: this.data.defaultFilters.rules
|
|
3909
3577
|
} : void 0,
|
|
3910
|
-
tabs: this.data.tabs.map((tab) =>
|
|
3911
|
-
|
|
3912
|
-
|
|
3913
|
-
|
|
3914
|
-
|
|
3915
|
-
|
|
3916
|
-
|
|
3917
|
-
|
|
3918
|
-
|
|
3919
|
-
|
|
3920
|
-
|
|
3921
|
-
|
|
3922
|
-
|
|
3923
|
-
|
|
3924
|
-
|
|
3925
|
-
|
|
3926
|
-
|
|
3927
|
-
|
|
3928
|
-
|
|
3929
|
-
|
|
3930
|
-
|
|
3931
|
-
|
|
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
|
+
})
|
|
3932
3611
|
};
|
|
3933
3612
|
return {
|
|
3934
3613
|
name: this.data.name,
|
|
@@ -3950,6 +3629,7 @@ var ListViewTabConfigBuilder = class _ListViewTabConfigBuilder {
|
|
|
3950
3629
|
this.tabData = {
|
|
3951
3630
|
id,
|
|
3952
3631
|
label,
|
|
3632
|
+
visibility: "all",
|
|
3953
3633
|
layout: "table",
|
|
3954
3634
|
columns: []
|
|
3955
3635
|
};
|
|
@@ -3968,6 +3648,14 @@ var ListViewTabConfigBuilder = class _ListViewTabConfigBuilder {
|
|
|
3968
3648
|
this.tabData.default = true;
|
|
3969
3649
|
return this;
|
|
3970
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
|
+
}
|
|
3971
3659
|
/**
|
|
3972
3660
|
* Set the layout to table (default)
|
|
3973
3661
|
*/
|
|
@@ -4061,6 +3749,11 @@ var ListViewTabConfigBuilder = class _ListViewTabConfigBuilder {
|
|
|
4061
3749
|
* @example .filter({ combinator: "and", rules: [{ attribute: "status", operator: "is", value: "active" }] })
|
|
4062
3750
|
*/
|
|
4063
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
|
+
}
|
|
4064
3757
|
this.tabData.filters = filters;
|
|
4065
3758
|
return this;
|
|
4066
3759
|
}
|
|
@@ -4273,7 +3966,7 @@ function jsonFlag(name, defaultValue) {
|
|
|
4273
3966
|
|
|
4274
3967
|
// src/feature-flags/flag-registry.ts
|
|
4275
3968
|
function duplicateFlagError(name) {
|
|
4276
|
-
return new
|
|
3969
|
+
return new chunkFDIAOFHS_js.DuplicateError(
|
|
4277
3970
|
"feature flag",
|
|
4278
3971
|
name,
|
|
4279
3972
|
`Flag "${name}" is already registered. Each flag name must be unique.`
|
|
@@ -4351,7 +4044,7 @@ var FlagRegistry = class {
|
|
|
4351
4044
|
getOrThrow(name) {
|
|
4352
4045
|
const flag = this.get(name);
|
|
4353
4046
|
if (!flag) {
|
|
4354
|
-
throw new
|
|
4047
|
+
throw new chunkFDIAOFHS_js.NotFoundError(
|
|
4355
4048
|
"Feature flag",
|
|
4356
4049
|
name,
|
|
4357
4050
|
void 0,
|
|
@@ -4508,19 +4201,19 @@ var FlagService = class {
|
|
|
4508
4201
|
*/
|
|
4509
4202
|
async setOverride(flagName, level, value, options = {}) {
|
|
4510
4203
|
if (!this.repository) {
|
|
4511
|
-
throw new
|
|
4204
|
+
throw new chunkFDIAOFHS_js.SchemaError(
|
|
4512
4205
|
"Cannot set override: no FeatureFlagsRepository configured. Add featureFlags to your DatabaseAdapter to enable runtime overrides.",
|
|
4513
|
-
|
|
4206
|
+
chunkFDIAOFHS_js.SchemaErrorCode.CONFIGURATION_REQUIRED
|
|
4514
4207
|
);
|
|
4515
4208
|
}
|
|
4516
4209
|
const flag = this.registry.get(flagName);
|
|
4517
4210
|
if (flag && !flag.allowedLevels.includes(level)) {
|
|
4518
4211
|
const message = `Flag "${flagName}" does not allow ${level}-level overrides. Allowed levels: ${flag.allowedLevels.join(", ")}`;
|
|
4519
|
-
throw new
|
|
4212
|
+
throw new chunkFDIAOFHS_js.ValidationError(message, [{ path: ["level"], message }]);
|
|
4520
4213
|
}
|
|
4521
4214
|
if (flag?.system) {
|
|
4522
4215
|
const message = `Flag "${flagName}" is a system flag and cannot be overridden via API.`;
|
|
4523
|
-
throw new
|
|
4216
|
+
throw new chunkFDIAOFHS_js.ValidationError(message, [{ path: ["flagName"], message }]);
|
|
4524
4217
|
}
|
|
4525
4218
|
await this.repository.setOverride({
|
|
4526
4219
|
flagName,
|
|
@@ -4540,9 +4233,9 @@ var FlagService = class {
|
|
|
4540
4233
|
*/
|
|
4541
4234
|
async deleteOverride(flagName, level, targetId) {
|
|
4542
4235
|
if (!this.repository) {
|
|
4543
|
-
throw new
|
|
4236
|
+
throw new chunkFDIAOFHS_js.SchemaError(
|
|
4544
4237
|
"Cannot delete override: no FeatureFlagsRepository configured.",
|
|
4545
|
-
|
|
4238
|
+
chunkFDIAOFHS_js.SchemaErrorCode.CONFIGURATION_REQUIRED
|
|
4546
4239
|
);
|
|
4547
4240
|
}
|
|
4548
4241
|
await this.repository.deleteOverride(flagName, level, targetId);
|
|
@@ -4679,7 +4372,7 @@ var NativeObjectRegistryClass = class {
|
|
|
4679
4372
|
if (!object2.system) {
|
|
4680
4373
|
const message = `[NativeObjectRegistry] Cannot register object "${object2.name}" (id: ${object2.id}): missing system flag.
|
|
4681
4374
|
Native objects must have system=true. Did you call .runtime() on the builder? Remove that call \u2014 objects are system:true by default.`;
|
|
4682
|
-
throw new
|
|
4375
|
+
throw new chunkFDIAOFHS_js.ValidationError(message, []);
|
|
4683
4376
|
}
|
|
4684
4377
|
if (this.objects.has(object2.name)) {
|
|
4685
4378
|
const existing = this.objects.get(object2.name);
|
|
@@ -4687,7 +4380,7 @@ Native objects must have system=true. Did you call .runtime() on the builder? Re
|
|
|
4687
4380
|
- Existing: "${existing?.label}" (id: ${existing?.id})
|
|
4688
4381
|
- New: "${object2.label}" (id: ${object2.id})
|
|
4689
4382
|
Please use unique names for each native object.`;
|
|
4690
|
-
throw new
|
|
4383
|
+
throw new chunkFDIAOFHS_js.DuplicateError("object", object2.name, message);
|
|
4691
4384
|
}
|
|
4692
4385
|
this.objects.set(object2.name, cloneObjectDefinition(object2));
|
|
4693
4386
|
}
|
|
@@ -4719,7 +4412,7 @@ Please use unique names for each native object.`;
|
|
|
4719
4412
|
if (!object2) {
|
|
4720
4413
|
const message = `[NativeObjectRegistry] Native object "${name}" not found.
|
|
4721
4414
|
Available objects: ${this.listNames().join(", ")}`;
|
|
4722
|
-
throw new
|
|
4415
|
+
throw new chunkFDIAOFHS_js.NotFoundError("Native object", name, chunkFDIAOFHS_js.SchemaErrorCode.OBJECT_NOT_FOUND, message);
|
|
4723
4416
|
}
|
|
4724
4417
|
return object2;
|
|
4725
4418
|
}
|
|
@@ -4818,7 +4511,7 @@ var SKILL_OBJECT = object({ name: "skill", label: "Skill" }).sealed().icon("spar
|
|
|
4818
4511
|
)
|
|
4819
4512
|
).attribute(richtext({ name: "content", label: "Content" }).defaultValue(SKILL_CONTENT_TEMPLATE)).build();
|
|
4820
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();
|
|
4821
|
-
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();
|
|
4822
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(
|
|
4823
4516
|
text({ name: "description", label: "Description" }).multiline().maxLength(constants.MEMORY_DESCRIPTION_MAX_LENGTH).required()
|
|
4824
4517
|
).attribute(text({ name: "content", label: "Content" }).multiline()).attribute(
|
|
@@ -4828,9 +4521,9 @@ var MEMORY_OBJECT = object({ name: "memory", label: "Memory" }).sealed().icon("d
|
|
|
4828
4521
|
{ value: "feedback", label: "Feedback" },
|
|
4829
4522
|
{ value: "reference", label: "Reference" }
|
|
4830
4523
|
])
|
|
4831
|
-
).attribute(
|
|
4832
|
-
var MEMORY_VIEW = detailView("memory-detail", "Memory").for("memory").default().sidePanel({ attributes: ["name", "description", "kind", "
|
|
4833
|
-
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();
|
|
4834
4527
|
|
|
4835
4528
|
// src/views/registry.ts
|
|
4836
4529
|
function cloneViewDefinition(view) {
|
|
@@ -4858,7 +4551,7 @@ var ViewRegistry = class {
|
|
|
4858
4551
|
const key = this.makeKey(view.object, view.name, view.type);
|
|
4859
4552
|
if (this.views.has(key)) {
|
|
4860
4553
|
const message = `[ViewRegistry] Duplicate view: "${view.name}" (${view.type}) for object "${view.object}"`;
|
|
4861
|
-
throw new
|
|
4554
|
+
throw new chunkFDIAOFHS_js.DuplicateError("view", key, message);
|
|
4862
4555
|
}
|
|
4863
4556
|
const storedView = cloneViewDefinition(view);
|
|
4864
4557
|
this.views.set(key, storedView);
|
|
@@ -4903,7 +4596,7 @@ var ViewRegistry = class {
|
|
|
4903
4596
|
const availableNames = available.map((v) => `${v.name} (${v.type})`).join(", ") || "(none)";
|
|
4904
4597
|
const message = `[ViewRegistry] View "${viewName}" not found for object "${objectName}".
|
|
4905
4598
|
Available views: ${availableNames}`;
|
|
4906
|
-
throw new
|
|
4599
|
+
throw new chunkFDIAOFHS_js.NotFoundError("View", `${objectName}:${viewName}`, void 0, message);
|
|
4907
4600
|
}
|
|
4908
4601
|
return view;
|
|
4909
4602
|
}
|
|
@@ -4991,7 +4684,7 @@ var viewRegistry = new ViewRegistry();
|
|
|
4991
4684
|
// src/views/auto-generator.ts
|
|
4992
4685
|
function getRuntimeAttributes(attributes, excludeNames = []) {
|
|
4993
4686
|
return attributes.filter(
|
|
4994
|
-
(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))
|
|
4995
4688
|
);
|
|
4996
4689
|
}
|
|
4997
4690
|
function sortAttributes(attributes) {
|
|
@@ -5024,7 +4717,7 @@ function generateDefaultDetailView(object2, options = {}) {
|
|
|
5024
4717
|
const { includeActivityTab = true, includeDocumentsTab = true, excludeAttributes = [] } = options;
|
|
5025
4718
|
const runtimeAttrs = getRuntimeAttributes(object2.attributes, excludeAttributes);
|
|
5026
4719
|
const sortedAttrs = sortAttributes(
|
|
5027
|
-
runtimeAttrs.filter((attr) => getAttributeCapabilities(attr).presentation.formField)
|
|
4720
|
+
runtimeAttrs.filter((attr) => chunk6ZDH3EJA_js.getAttributeCapabilities(attr).presentation.formField)
|
|
5028
4721
|
);
|
|
5029
4722
|
const formTab = {
|
|
5030
4723
|
id: "form",
|
|
@@ -5035,6 +4728,7 @@ function generateDefaultDetailView(object2, options = {}) {
|
|
|
5035
4728
|
{
|
|
5036
4729
|
id: "general",
|
|
5037
4730
|
label: "General",
|
|
4731
|
+
type: "fields",
|
|
5038
4732
|
fields: sortedAttrs.map(attributeToField),
|
|
5039
4733
|
order: 0
|
|
5040
4734
|
}
|
|
@@ -5080,7 +4774,7 @@ function generateDefaultListView(object2, options = {}) {
|
|
|
5080
4774
|
const { excludeAttributes = [], maxListColumns = 5 } = options;
|
|
5081
4775
|
const runtimeAttrs = getRuntimeAttributes(object2.attributes, excludeAttributes);
|
|
5082
4776
|
const sortedAttrs = sortAttributes(
|
|
5083
|
-
runtimeAttrs.filter((attr) => getAttributeCapabilities(attr).presentation.defaultColumn)
|
|
4777
|
+
runtimeAttrs.filter((attr) => chunk6ZDH3EJA_js.getAttributeCapabilities(attr).presentation.defaultColumn)
|
|
5084
4778
|
);
|
|
5085
4779
|
const columns = sortedAttrs.slice(0, maxListColumns).map((attr) => attr.name);
|
|
5086
4780
|
const config = {
|
|
@@ -5089,6 +4783,7 @@ function generateDefaultListView(object2, options = {}) {
|
|
|
5089
4783
|
id: "all",
|
|
5090
4784
|
label: "All",
|
|
5091
4785
|
default: true,
|
|
4786
|
+
visibility: "workspace",
|
|
5092
4787
|
layout: "table",
|
|
5093
4788
|
columns
|
|
5094
4789
|
}
|
|
@@ -5209,7 +4904,7 @@ var FormRegistry = class {
|
|
|
5209
4904
|
const forms = Array.isArray(formOrForms) ? formOrForms : [formOrForms];
|
|
5210
4905
|
for (const f of forms) {
|
|
5211
4906
|
if (this.forms.has(f.name)) {
|
|
5212
|
-
throw new
|
|
4907
|
+
throw new chunkFDIAOFHS_js.DuplicateError("form", f.name, `[FormRegistry] Duplicate form: "${f.name}"`);
|
|
5213
4908
|
}
|
|
5214
4909
|
this.forms.set(f.name, cloneFormDefinition(f));
|
|
5215
4910
|
}
|
|
@@ -5348,6 +5043,8 @@ var BROWSER_PREVIEW_STATUSES = ["live", "paused", "ended", "disconnected"];
|
|
|
5348
5043
|
var LIVE_EVENT_TYPE_REGISTRY = {
|
|
5349
5044
|
"record.patch": true,
|
|
5350
5045
|
"record.deleted": true,
|
|
5046
|
+
"record.removed": true,
|
|
5047
|
+
"record.created": true,
|
|
5351
5048
|
"view.projection.stale": true,
|
|
5352
5049
|
"agent.session.patch": true,
|
|
5353
5050
|
"agent.unread.patch": true,
|
|
@@ -5394,6 +5091,33 @@ var BROWSER_PREVIEW_DESCRIPTOR_KEYS = [
|
|
|
5394
5091
|
"sequence",
|
|
5395
5092
|
"updatedAt"
|
|
5396
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
|
+
];
|
|
5397
5121
|
function isLiveEventType(value) {
|
|
5398
5122
|
return typeof value === "string" && LIVE_EVENT_TYPES.includes(value);
|
|
5399
5123
|
}
|
|
@@ -5412,6 +5136,10 @@ function isLiveEventPayloadForType(type, payload) {
|
|
|
5412
5136
|
return isRecordPatchPayload(payload);
|
|
5413
5137
|
case "record.deleted":
|
|
5414
5138
|
return isRecordDeletedPayload(payload);
|
|
5139
|
+
case "record.removed":
|
|
5140
|
+
return isRecordRemovedPayload(payload);
|
|
5141
|
+
case "record.created":
|
|
5142
|
+
return isRecordCreatedPayload(payload);
|
|
5415
5143
|
case "view.projection.stale":
|
|
5416
5144
|
return isViewProjectionStalePayload(payload);
|
|
5417
5145
|
case "agent.session.patch":
|
|
@@ -5507,6 +5235,15 @@ function isRecordPatchPayload(payload) {
|
|
|
5507
5235
|
function isRecordDeletedPayload(payload) {
|
|
5508
5236
|
return payload.type === "record.deleted" && hasString(payload, "objectId") && hasString(payload, "recordId") && hasVersion(payload, "recordVersion") && hasString(payload, "deletedAt");
|
|
5509
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
|
+
}
|
|
5510
5247
|
function isViewProjectionStalePayload(payload) {
|
|
5511
5248
|
return payload.type === "view.projection.stale" && hasString(payload, "viewId") && isOneOf(payload.reason, VIEW_PROJECTION_STALE_REASONS);
|
|
5512
5249
|
}
|
|
@@ -5745,7 +5482,7 @@ function assertAcyclicComputedDependencies(nodes) {
|
|
|
5745
5482
|
}
|
|
5746
5483
|
function parseCompileFormula(expression) {
|
|
5747
5484
|
try {
|
|
5748
|
-
return
|
|
5485
|
+
return chunkQN2N3IJZ_js.parseComputedFormula(expression);
|
|
5749
5486
|
} catch (error) {
|
|
5750
5487
|
if (error instanceof Error) {
|
|
5751
5488
|
throw new ComputedFormulaCompileError(error.message);
|
|
@@ -6656,11 +6393,11 @@ function evaluateComputedAst(node, input) {
|
|
|
6656
6393
|
return evaluateAst(node, input);
|
|
6657
6394
|
}
|
|
6658
6395
|
function evaluateComputedFormula(expression, input) {
|
|
6659
|
-
return evaluateAst(
|
|
6396
|
+
return evaluateAst(chunkQN2N3IJZ_js.parseComputedFormula(expression), input);
|
|
6660
6397
|
}
|
|
6661
6398
|
function evaluateComputedFormulaWithResult(expression, input, returnType, decimals) {
|
|
6662
6399
|
try {
|
|
6663
|
-
const raw = evaluateAst(
|
|
6400
|
+
const raw = evaluateAst(chunkQN2N3IJZ_js.parseComputedFormula(expression), input);
|
|
6664
6401
|
const value = returnType ? formatComputedResult(raw, returnType, decimals) : raw;
|
|
6665
6402
|
return { value };
|
|
6666
6403
|
} catch (error) {
|
|
@@ -6798,53 +6535,86 @@ var toDate2 = (v) => {
|
|
|
6798
6535
|
return Number.isNaN(d.getTime()) ? null : d;
|
|
6799
6536
|
};
|
|
6800
6537
|
var toArr = (v) => Array.isArray(v) ? v : v == null ? [] : [v];
|
|
6801
|
-
|
|
6802
|
-
const
|
|
6803
|
-
|
|
6804
|
-
|
|
6805
|
-
|
|
6806
|
-
|
|
6807
|
-
|
|
6808
|
-
const
|
|
6809
|
-
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";
|
|
6810
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
|
+
});
|
|
6811
6563
|
var OPERATOR_SPECS = {
|
|
6812
|
-
// ----
|
|
6564
|
+
// ---- equality ----
|
|
6813
6565
|
is: {
|
|
6814
|
-
appliesTo: ["text", "phone", "status", "select", "date", "formula"],
|
|
6815
|
-
evaluateInMemory: (v, rv) => toStr(v) === toStr(rv)
|
|
6816
|
-
},
|
|
6817
|
-
is_not: {
|
|
6818
|
-
appliesTo: ["text", "phone", "status", "select", "date", "formula"],
|
|
6819
|
-
evaluateInMemory: (v, rv) => toStr(v) !== toStr(rv)
|
|
6820
|
-
},
|
|
6821
|
-
contains: {
|
|
6822
|
-
appliesTo: ["text", "phone", "location", "user", "multiselect", "relation", "formula"],
|
|
6823
|
-
evaluateInMemory: (v, rv) => {
|
|
6824
|
-
if (Array.isArray(v)) return v.map(toStr).includes(toStr(rv));
|
|
6825
|
-
return toStr(v).toLowerCase().includes(toStr(rv).toLowerCase());
|
|
6826
|
-
}
|
|
6827
|
-
},
|
|
6828
|
-
not_contains: {
|
|
6829
|
-
appliesTo: ["text", "phone", "user", "multiselect", "relation", "formula"],
|
|
6830
|
-
evaluateInMemory: (v, rv) => {
|
|
6831
|
-
if (Array.isArray(v)) return !v.map(toStr).includes(toStr(rv));
|
|
6832
|
-
return !toStr(v).toLowerCase().includes(toStr(rv).toLowerCase());
|
|
6833
|
-
}
|
|
6834
|
-
},
|
|
6835
|
-
starts_with: {
|
|
6836
|
-
appliesTo: ["text", "formula"],
|
|
6837
|
-
evaluateInMemory: (v, rv) => toStr(v).toLowerCase().startsWith(toStr(rv).toLowerCase())
|
|
6838
|
-
},
|
|
6839
|
-
ends_with: {
|
|
6840
|
-
appliesTo: ["text", "formula"],
|
|
6841
|
-
evaluateInMemory: (v, rv) => toStr(v).toLowerCase().endsWith(toStr(rv).toLowerCase())
|
|
6842
|
-
},
|
|
6843
|
-
is_empty: {
|
|
6844
6566
|
appliesTo: [
|
|
6845
6567
|
"text",
|
|
6846
|
-
"
|
|
6847
|
-
"number",
|
|
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)
|
|
6580
|
+
},
|
|
6581
|
+
is_not: {
|
|
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())
|
|
6600
|
+
},
|
|
6601
|
+
not_contains: {
|
|
6602
|
+
appliesTo: ["text", "phone", "formula"],
|
|
6603
|
+
evaluateInMemory: (v, rv) => !toStr(v).toLowerCase().includes(toStr(rv).toLowerCase())
|
|
6604
|
+
},
|
|
6605
|
+
starts_with: {
|
|
6606
|
+
appliesTo: ["text", "phone"],
|
|
6607
|
+
evaluateInMemory: (v, rv) => toStr(v).toLowerCase().startsWith(toStr(rv).toLowerCase())
|
|
6608
|
+
},
|
|
6609
|
+
ends_with: {
|
|
6610
|
+
appliesTo: ["text"],
|
|
6611
|
+
evaluateInMemory: (v, rv) => toStr(v).toLowerCase().endsWith(toStr(rv).toLowerCase())
|
|
6612
|
+
},
|
|
6613
|
+
is_empty: {
|
|
6614
|
+
appliesTo: [
|
|
6615
|
+
"text",
|
|
6616
|
+
"richtext",
|
|
6617
|
+
"number",
|
|
6848
6618
|
"phone",
|
|
6849
6619
|
"currency",
|
|
6850
6620
|
"status",
|
|
@@ -6878,100 +6648,22 @@ var OPERATOR_SPECS = {
|
|
|
6878
6648
|
],
|
|
6879
6649
|
evaluateInMemory: (v) => !isEmpty(v)
|
|
6880
6650
|
},
|
|
6881
|
-
// ---- numeric ----
|
|
6882
|
-
|
|
6883
|
-
|
|
6884
|
-
|
|
6885
|
-
|
|
6886
|
-
|
|
6887
|
-
appliesTo: ["number", "currency", "formula"],
|
|
6888
|
-
evaluateInMemory: (v, rv) => toNum(v) !== toNum(rv)
|
|
6889
|
-
},
|
|
6890
|
-
lt: {
|
|
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
|
-
gt: {
|
|
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
|
-
lte: {
|
|
6907
|
-
appliesTo: ["number", "currency", "formula"],
|
|
6908
|
-
evaluateInMemory: (v, rv) => {
|
|
6909
|
-
const a = toNum(v);
|
|
6910
|
-
const b = toNum(rv);
|
|
6911
|
-
return a !== null && b !== null && a <= b;
|
|
6912
|
-
}
|
|
6913
|
-
},
|
|
6914
|
-
gte: {
|
|
6915
|
-
appliesTo: ["number", "currency", "formula"],
|
|
6916
|
-
evaluateInMemory: (v, rv) => {
|
|
6917
|
-
const a = toNum(v);
|
|
6918
|
-
const b = toNum(rv);
|
|
6919
|
-
return a !== null && b !== null && a >= b;
|
|
6920
|
-
}
|
|
6921
|
-
},
|
|
6922
|
-
// ---- checkbox ----
|
|
6923
|
-
is_checked: {
|
|
6924
|
-
appliesTo: ["checkbox"],
|
|
6925
|
-
evaluateInMemory: (v) => v === true
|
|
6926
|
-
},
|
|
6927
|
-
is_not_checked: {
|
|
6928
|
-
appliesTo: ["checkbox"],
|
|
6929
|
-
evaluateInMemory: (v) => v !== true
|
|
6930
|
-
},
|
|
6931
|
-
// ---- date ----
|
|
6932
|
-
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
|
-
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
|
-
},
|
|
6948
|
-
on_or_before: {
|
|
6949
|
-
appliesTo: ["date"],
|
|
6950
|
-
evaluateInMemory: (v, rv) => {
|
|
6951
|
-
const a = toDate2(v);
|
|
6952
|
-
const b = toDate2(rv);
|
|
6953
|
-
return a !== null && b !== null && a <= b;
|
|
6954
|
-
}
|
|
6955
|
-
},
|
|
6956
|
-
on_or_after: {
|
|
6957
|
-
appliesTo: ["date"],
|
|
6958
|
-
evaluateInMemory: (v, rv) => {
|
|
6959
|
-
const a = toDate2(v);
|
|
6960
|
-
const b = toDate2(rv);
|
|
6961
|
-
return a !== null && b !== null && a >= b;
|
|
6962
|
-
}
|
|
6963
|
-
},
|
|
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 ----
|
|
6964
6657
|
is_within: {
|
|
6965
6658
|
appliesTo: ["date"],
|
|
6966
6659
|
evaluateInMemory: (v, rv) => {
|
|
6967
6660
|
const d = toDate2(v);
|
|
6968
|
-
|
|
6969
|
-
|
|
6970
|
-
|
|
6971
|
-
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;
|
|
6972
6664
|
}
|
|
6973
6665
|
},
|
|
6974
|
-
|
|
6666
|
+
on_day_month: {
|
|
6975
6667
|
appliesTo: ["date"],
|
|
6976
6668
|
evaluateInMemory: (v, rv) => {
|
|
6977
6669
|
const d = toDate2(v);
|
|
@@ -6980,9 +6672,9 @@ var OPERATOR_SPECS = {
|
|
|
6980
6672
|
return d.getMonth() + 1 === rule.month && d.getDate() === rule.day;
|
|
6981
6673
|
}
|
|
6982
6674
|
},
|
|
6983
|
-
// ----
|
|
6675
|
+
// ---- set membership ----
|
|
6984
6676
|
any_of: {
|
|
6985
|
-
appliesTo: ["status", "select", "relation"],
|
|
6677
|
+
appliesTo: ["status", "select", "multiselect", "user", "relation"],
|
|
6986
6678
|
evaluateInMemory: (v, rv) => {
|
|
6987
6679
|
const ruleArr = toArr(rv).map(toStr);
|
|
6988
6680
|
const valArr = toArr(v).map(toStr);
|
|
@@ -6990,7 +6682,7 @@ var OPERATOR_SPECS = {
|
|
|
6990
6682
|
}
|
|
6991
6683
|
},
|
|
6992
6684
|
none_of: {
|
|
6993
|
-
appliesTo: ["status", "select", "relation"],
|
|
6685
|
+
appliesTo: ["status", "select", "multiselect", "user", "relation"],
|
|
6994
6686
|
evaluateInMemory: (v, rv) => {
|
|
6995
6687
|
const ruleArr = toArr(rv).map(toStr);
|
|
6996
6688
|
const valArr = toArr(v).map(toStr);
|
|
@@ -6999,37 +6691,34 @@ var OPERATOR_SPECS = {
|
|
|
6999
6691
|
}
|
|
7000
6692
|
};
|
|
7001
6693
|
|
|
7002
|
-
// src/filters/
|
|
7003
|
-
function
|
|
7004
|
-
if (
|
|
7005
|
-
|
|
7006
|
-
|
|
7007
|
-
|
|
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;
|
|
7008
6702
|
}
|
|
7009
|
-
function
|
|
7010
|
-
|
|
7011
|
-
if (
|
|
7012
|
-
|
|
7013
|
-
|
|
7014
|
-
|
|
7015
|
-
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;
|
|
7016
6709
|
}
|
|
7017
6710
|
|
|
7018
6711
|
// src/filters/polarity.ts
|
|
7019
6712
|
var NEGATIVE_OPERATORS = /* @__PURE__ */ new Set([
|
|
7020
6713
|
"is_not",
|
|
7021
6714
|
"not_contains",
|
|
7022
|
-
"neq",
|
|
7023
6715
|
"none_of",
|
|
7024
|
-
"is_not_checked",
|
|
7025
6716
|
"is_empty"
|
|
7026
6717
|
]);
|
|
7027
6718
|
var NEGATIVE_TO_POSITIVE = {
|
|
7028
6719
|
is_not: "is",
|
|
7029
6720
|
not_contains: "contains",
|
|
7030
|
-
neq: "eq",
|
|
7031
6721
|
none_of: "any_of",
|
|
7032
|
-
is_not_checked: "is_checked",
|
|
7033
6722
|
is_empty: "is_not_empty"
|
|
7034
6723
|
};
|
|
7035
6724
|
function getOperatorPolarity(op) {
|
|
@@ -7040,251 +6729,136 @@ function normalizeForEdgeRpc(op) {
|
|
|
7040
6729
|
}
|
|
7041
6730
|
var SINGLE_TO_MULTI = {
|
|
7042
6731
|
is: "any_of",
|
|
7043
|
-
|
|
7044
|
-
contains: "any_of",
|
|
7045
|
-
is_not: "none_of",
|
|
7046
|
-
neq: "none_of",
|
|
7047
|
-
not_contains: "none_of"
|
|
6732
|
+
is_not: "none_of"
|
|
7048
6733
|
};
|
|
7049
6734
|
function toMultiValueOperator(op) {
|
|
7050
6735
|
return SINGLE_TO_MULTI[op] ?? op;
|
|
7051
6736
|
}
|
|
7052
6737
|
|
|
7053
|
-
// src/filters/
|
|
7054
|
-
|
|
7055
|
-
|
|
7056
|
-
|
|
7057
|
-
|
|
7058
|
-
|
|
7059
|
-
|
|
7060
|
-
function
|
|
7061
|
-
|
|
7062
|
-
|
|
7063
|
-
|
|
7064
|
-
|
|
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
|
+
);
|
|
7065
6767
|
}
|
|
7066
|
-
|
|
7067
|
-
|
|
7068
|
-
|
|
7069
|
-
|
|
7070
|
-
|
|
7071
|
-
equal: "is",
|
|
7072
|
-
"==": "is",
|
|
7073
|
-
"=": "is",
|
|
7074
|
-
notEqual: "is_not",
|
|
7075
|
-
isNot: "is_not",
|
|
7076
|
-
"!=": "is_not",
|
|
7077
|
-
"<>": "is_not",
|
|
7078
|
-
// set
|
|
7079
|
-
in: "any_of",
|
|
7080
|
-
isAnyOf: "any_of",
|
|
7081
|
-
oneOf: "any_of",
|
|
7082
|
-
notIn: "none_of",
|
|
7083
|
-
not_in: "none_of",
|
|
7084
|
-
isNoneOf: "none_of",
|
|
7085
|
-
notOneOf: "none_of",
|
|
7086
|
-
// text
|
|
7087
|
-
startsWith: "starts_with",
|
|
7088
|
-
beginsWith: "starts_with",
|
|
7089
|
-
endsWith: "ends_with",
|
|
7090
|
-
doesNotContain: "not_contains",
|
|
7091
|
-
notContain: "not_contains",
|
|
7092
|
-
// nullity
|
|
7093
|
-
isEmpty: "is_empty",
|
|
7094
|
-
isNotEmpty: "is_not_empty",
|
|
7095
|
-
// checkbox
|
|
7096
|
-
isChecked: "is_checked",
|
|
7097
|
-
isUnchecked: "is_not_checked"
|
|
7098
|
-
};
|
|
7099
|
-
var CROSS_TYPE_CONVERSIONS = {
|
|
7100
|
-
date: {
|
|
7101
|
-
gte: "on_or_after",
|
|
7102
|
-
lte: "on_or_before",
|
|
7103
|
-
gt: "after",
|
|
7104
|
-
lt: "before",
|
|
7105
|
-
eq: "is",
|
|
7106
|
-
neq: "is_not"
|
|
7107
|
-
},
|
|
7108
|
-
number: { is: "eq", is_not: "neq" },
|
|
7109
|
-
currency: { is: "eq", is_not: "neq" },
|
|
7110
|
-
text: { eq: "is", neq: "is_not" },
|
|
7111
|
-
phone: { eq: "is", neq: "is_not" },
|
|
7112
|
-
select: { eq: "is", neq: "is_not" },
|
|
7113
|
-
status: { eq: "is", neq: "is_not" },
|
|
7114
|
-
multiselect: { eq: "contains", neq: "not_contains" },
|
|
7115
|
-
relation: { eq: "is", neq: "is_not" },
|
|
7116
|
-
user: { eq: "is", neq: "is_not" },
|
|
7117
|
-
document: { eq: "is", neq: "is_not" },
|
|
7118
|
-
file: { eq: "is", neq: "is_not" },
|
|
7119
|
-
checkbox: { eq: "is_checked", neq: "is_not_checked", is: "is_checked", is_not: "is_not_checked" }
|
|
7120
|
-
};
|
|
7121
|
-
function normalizeOperator(rawOp, effectiveType) {
|
|
7122
|
-
const synonymed = SYNONYM_ALIASES[rawOp] ?? rawOp;
|
|
7123
|
-
const typeMap = CROSS_TYPE_CONVERSIONS[effectiveType];
|
|
7124
|
-
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));
|
|
7125
6773
|
}
|
|
7126
|
-
|
|
7127
|
-
|
|
7128
|
-
|
|
7129
|
-
|
|
7130
|
-
|
|
7131
|
-
|
|
7132
|
-
"is",
|
|
7133
|
-
"is_not",
|
|
7134
|
-
"any_of",
|
|
7135
|
-
"none_of",
|
|
7136
|
-
"is_empty",
|
|
7137
|
-
"is_not_empty"
|
|
7138
|
-
];
|
|
7139
|
-
var SYSTEM_FILTER_OPERATORS = {
|
|
7140
|
-
// Identifier columns (uuid)
|
|
7141
|
-
id: ID_LIKE_OPERATORS,
|
|
7142
|
-
objectId: ID_LIKE_OPERATORS,
|
|
7143
|
-
tenantId: ID_LIKE_OPERATORS,
|
|
7144
|
-
// Free-form text columns share their counterpart's operator set
|
|
7145
|
-
label: OPERATORS_BY_TYPE.text,
|
|
7146
|
-
// Date columns
|
|
7147
|
-
createdAt: OPERATORS_BY_TYPE.date,
|
|
7148
|
-
updatedAt: OPERATORS_BY_TYPE.date,
|
|
7149
|
-
deletedAt: OPERATORS_BY_TYPE.date,
|
|
7150
|
-
// User columns (uuid → actor identity)
|
|
7151
|
-
createdBy: OPERATORS_BY_TYPE.user,
|
|
7152
|
-
lastUpdatedBy: OPERATORS_BY_TYPE.user
|
|
7153
|
-
};
|
|
7154
|
-
var SYSTEM_ATTRIBUTE_TYPES = {
|
|
7155
|
-
id: "id",
|
|
7156
|
-
objectId: "id",
|
|
7157
|
-
tenantId: "id",
|
|
7158
|
-
label: "text",
|
|
7159
|
-
createdAt: "date",
|
|
7160
|
-
updatedAt: "date",
|
|
7161
|
-
deletedAt: "date",
|
|
7162
|
-
createdBy: "user",
|
|
7163
|
-
lastUpdatedBy: "user"
|
|
7164
|
-
};
|
|
7165
|
-
function assertOperatorForType(operator, type, context) {
|
|
7166
|
-
const normalized = normalizeOperator(operator, type);
|
|
7167
|
-
const ops = OPERATORS_BY_TYPE[type];
|
|
7168
|
-
if (!ops?.includes(normalized)) {
|
|
7169
|
-
const validList = ops?.length ? ops.join(", ") : "(no operators registered for this type)";
|
|
7170
|
-
const summary = `Operator "${operator}" is not valid for ${context} type "${type}". Valid operators: ${validList}.`;
|
|
7171
|
-
throw new chunkZBQEMIAV_js.ValidationError(summary, [
|
|
7172
|
-
{
|
|
7173
|
-
path: ["operator"],
|
|
7174
|
-
message: summary
|
|
7175
|
-
}
|
|
7176
|
-
]);
|
|
7177
|
-
}
|
|
7178
|
-
return normalized;
|
|
7179
|
-
}
|
|
7180
|
-
var RELATIVE_DATE_UNITS = /* @__PURE__ */ new Set(["days", "weeks", "months", "years"]);
|
|
7181
|
-
var RELATIVE_DATE_DIRECTIONS = /* @__PURE__ */ new Set(["past", "future"]);
|
|
7182
|
-
function assertRelativeDateValue(rule) {
|
|
7183
|
-
if (rule.operator !== "is_within") return;
|
|
7184
|
-
const v = rule.value;
|
|
7185
|
-
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);
|
|
7186
|
-
if (!valid) {
|
|
7187
|
-
const m = `Operator "is_within" requires a relative-date value { amount: positive number, unit: days|weeks|months|years, direction: past|future }`;
|
|
7188
|
-
throw new chunkZBQEMIAV_js.ValidationError(m, [{ path: ["value"], message: m }]);
|
|
7189
|
-
}
|
|
7190
|
-
}
|
|
7191
|
-
function assertDynamicValueForAttribute(rule, attrType) {
|
|
7192
|
-
if (!isDynamicValue(rule.value)) return;
|
|
7193
|
-
const v = rule.value;
|
|
7194
|
-
if (v.dynamic === "actor" && attrType !== "user") {
|
|
7195
|
-
const m = `actor token (@me) is only valid on user attributes, not "${attrType}"`;
|
|
7196
|
-
throw new chunkZBQEMIAV_js.ValidationError(m, [{ path: ["value"], message: m }]);
|
|
7197
|
-
}
|
|
7198
|
-
if (v.dynamic === "date" && attrType !== "date") {
|
|
7199
|
-
const m = `date token (@today/@now) is only valid on date attributes, not "${attrType}"`;
|
|
7200
|
-
throw new chunkZBQEMIAV_js.ValidationError(m, [{ path: ["value"], message: m }]);
|
|
7201
|
-
}
|
|
7202
|
-
}
|
|
7203
|
-
function validateQualifiedRule(rule, context) {
|
|
7204
|
-
const rootAttr = context.attributes.find((a) => a.name === rule.attribute);
|
|
7205
|
-
const systemOps = SYSTEM_FILTER_OPERATORS[rule.attribute];
|
|
7206
|
-
if (!(rootAttr || systemOps)) {
|
|
7207
|
-
throw new chunkZBQEMIAV_js.ValidationError(`Unknown attribute: ${rule.attribute}`, [
|
|
7208
|
-
{ path: ["attribute"], message: `Unknown attribute: ${rule.attribute}` }
|
|
7209
|
-
]);
|
|
7210
|
-
}
|
|
7211
|
-
if (rule.quantifier !== void 0 && !rule.property) {
|
|
7212
|
-
const m = `quantifier is only valid on qualified edge rules (set "property")`;
|
|
7213
|
-
throw new chunkZBQEMIAV_js.ValidationError(m, [{ path: ["quantifier"], message: m }]);
|
|
7214
|
-
}
|
|
7215
|
-
if (!rootAttr) {
|
|
7216
|
-
if (rule.property) {
|
|
7217
|
-
throw new chunkZBQEMIAV_js.ValidationError(`Cannot qualify system attribute "${rule.attribute}"`, [
|
|
7218
|
-
{ path: ["property"], message: `"${rule.attribute}" is a system column, not a reference` }
|
|
7219
|
-
]);
|
|
7220
|
-
}
|
|
7221
|
-
const effectiveType = SYSTEM_ATTRIBUTE_TYPES[rule.attribute] ?? "id";
|
|
7222
|
-
const normalizedOperator = normalizeOperator(
|
|
7223
|
-
rule.operator,
|
|
7224
|
-
effectiveType
|
|
7225
|
-
);
|
|
7226
|
-
if (!systemOps.includes(normalizedOperator)) {
|
|
7227
|
-
const summary = `Operator "${rule.operator}" is not valid for system attribute "${rule.attribute}". Valid operators: ${systemOps.join(", ")}.`;
|
|
7228
|
-
throw new chunkZBQEMIAV_js.ValidationError(summary, [{ path: ["operator"], message: summary }]);
|
|
7229
|
-
}
|
|
7230
|
-
rule.operator = normalizedOperator;
|
|
7231
|
-
assertRelativeDateValue(rule);
|
|
7232
|
-
return;
|
|
7233
|
-
}
|
|
7234
|
-
if (!rule.property) {
|
|
7235
|
-
assertDynamicValueForAttribute(rule, rootAttr.type);
|
|
7236
|
-
const ops = getAttributeFilterOperators(rootAttr);
|
|
7237
|
-
const normalizedOperator = normalizeOperator(
|
|
7238
|
-
rule.operator,
|
|
7239
|
-
rootAttr.type
|
|
7240
|
-
);
|
|
7241
|
-
if (!ops.includes(normalizedOperator)) {
|
|
7242
|
-
const validList = ops.length ? ops.join(", ") : "(not filterable)";
|
|
7243
|
-
const summary = `Operator "${rule.operator}" is not valid for attribute "${rootAttr.name}". Valid operators: ${validList}.`;
|
|
7244
|
-
throw new chunkZBQEMIAV_js.ValidationError(summary, [{ path: ["operator"], message: summary }]);
|
|
7245
|
-
}
|
|
7246
|
-
rule.operator = normalizedOperator;
|
|
7247
|
-
assertRelativeDateValue(rule);
|
|
7248
|
-
return;
|
|
7249
|
-
}
|
|
7250
|
-
if (!REFERENCE_TYPES.has(rootAttr.type)) {
|
|
7251
|
-
throw new chunkZBQEMIAV_js.ValidationError(`Cannot qualify ${rootAttr.type} attribute "${rule.attribute}"`, [
|
|
7252
|
-
{ path: ["property"], message: `Attribute "${rule.attribute}" is not a reference type` }
|
|
7253
|
-
]);
|
|
7254
|
-
}
|
|
7255
|
-
const propSchema = rootAttr.properties;
|
|
7256
|
-
if (!propSchema) {
|
|
7257
|
-
throw new chunkZBQEMIAV_js.ValidationError(`Attribute "${rule.attribute}" has no qualifyWith schema`, [
|
|
7258
|
-
{ path: ["property"], message: `"${rule.attribute}" has no qualifyWith` }
|
|
7259
|
-
]);
|
|
7260
|
-
}
|
|
7261
|
-
const propDef = propSchema.definitions.find((p) => p.name === rule.property);
|
|
7262
|
-
if (!propDef) {
|
|
7263
|
-
throw new chunkZBQEMIAV_js.ValidationError(
|
|
7264
|
-
`Property "${rule.property}" not defined on "${rule.attribute}".qualifyWith()`,
|
|
7265
|
-
[{ 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
|
|
7266
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;
|
|
7267
6801
|
}
|
|
7268
|
-
|
|
7269
|
-
|
|
7270
|
-
|
|
7271
|
-
|
|
7272
|
-
|
|
7273
|
-
|
|
7274
|
-
|
|
7275
|
-
|
|
7276
|
-
|
|
7277
|
-
|
|
7278
|
-
|
|
7279
|
-
|
|
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)];
|
|
7280
6846
|
}
|
|
7281
|
-
function
|
|
7282
|
-
if (
|
|
7283
|
-
if (
|
|
7284
|
-
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;
|
|
7285
6852
|
}
|
|
7286
6853
|
return value;
|
|
7287
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
|
+
}
|
|
7288
6862
|
|
|
7289
6863
|
// src/connectors/types.ts
|
|
7290
6864
|
var CONNECTOR_CALLBACK_PARAM = {
|
|
@@ -7308,10 +6882,10 @@ function canonicalStringify(value) {
|
|
|
7308
6882
|
case "object":
|
|
7309
6883
|
break;
|
|
7310
6884
|
default:
|
|
7311
|
-
throw new
|
|
6885
|
+
throw new chunkFDIAOFHS_js.ValidationError(`Cannot canonicalize value of type ${typeof v}`, []);
|
|
7312
6886
|
}
|
|
7313
6887
|
const obj = v;
|
|
7314
|
-
if (seen.has(obj)) throw new
|
|
6888
|
+
if (seen.has(obj)) throw new chunkFDIAOFHS_js.ValidationError("Cannot canonicalize circular structure", []);
|
|
7315
6889
|
seen.add(obj);
|
|
7316
6890
|
try {
|
|
7317
6891
|
if (Array.isArray(obj)) return `[${obj.map((e) => encode(e) ?? "null").join(",")}]`;
|
|
@@ -7336,6 +6910,420 @@ function viewSyncPayload(view) {
|
|
|
7336
6910
|
};
|
|
7337
6911
|
}
|
|
7338
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
|
+
|
|
7339
7327
|
Object.defineProperty(exports, "asTenantId", {
|
|
7340
7328
|
enumerable: true,
|
|
7341
7329
|
get: function () { return chunkFRCDMQER_js.asTenantId; }
|
|
@@ -7356,189 +7344,433 @@ Object.defineProperty(exports, "indexBy", {
|
|
|
7356
7344
|
enumerable: true,
|
|
7357
7345
|
get: function () { return chunkFRCDMQER_js.indexBy; }
|
|
7358
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
|
+
});
|
|
7359
7527
|
Object.defineProperty(exports, "ComputedFormulaParseError", {
|
|
7360
7528
|
enumerable: true,
|
|
7361
|
-
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; }
|
|
7362
7546
|
});
|
|
7363
7547
|
Object.defineProperty(exports, "parseAttributeConfig", {
|
|
7364
7548
|
enumerable: true,
|
|
7365
|
-
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; }
|
|
7366
7558
|
});
|
|
7367
7559
|
Object.defineProperty(exports, "parseComputedFormula", {
|
|
7368
7560
|
enumerable: true,
|
|
7369
|
-
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; }
|
|
7370
7574
|
});
|
|
7371
7575
|
Object.defineProperty(exports, "createFormAttributeValidator", {
|
|
7372
7576
|
enumerable: true,
|
|
7373
|
-
get: function () { return
|
|
7577
|
+
get: function () { return chunkV6Q7HCA7_js.createFormAttributeValidator; }
|
|
7374
7578
|
});
|
|
7375
7579
|
Object.defineProperty(exports, "rejectUnknownAttributesOrThrow", {
|
|
7376
7580
|
enumerable: true,
|
|
7377
|
-
get: function () { return
|
|
7581
|
+
get: function () { return chunkV6Q7HCA7_js.rejectUnknownAttributesOrThrow; }
|
|
7378
7582
|
});
|
|
7379
7583
|
Object.defineProperty(exports, "validateDraft", {
|
|
7380
7584
|
enumerable: true,
|
|
7381
|
-
get: function () { return
|
|
7585
|
+
get: function () { return chunkV6Q7HCA7_js.validateDraft; }
|
|
7382
7586
|
});
|
|
7383
7587
|
Object.defineProperty(exports, "validateDraftOrThrow", {
|
|
7384
7588
|
enumerable: true,
|
|
7385
|
-
get: function () { return
|
|
7589
|
+
get: function () { return chunkV6Q7HCA7_js.validateDraftOrThrow; }
|
|
7386
7590
|
});
|
|
7387
7591
|
Object.defineProperty(exports, "validateObject", {
|
|
7388
7592
|
enumerable: true,
|
|
7389
|
-
get: function () { return
|
|
7593
|
+
get: function () { return chunkV6Q7HCA7_js.validateObject; }
|
|
7390
7594
|
});
|
|
7391
7595
|
Object.defineProperty(exports, "validateObjectOrThrow", {
|
|
7392
7596
|
enumerable: true,
|
|
7393
|
-
get: function () { return
|
|
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; }
|
|
7394
7622
|
});
|
|
7395
7623
|
Object.defineProperty(exports, "AccessDeniedError", {
|
|
7396
7624
|
enumerable: true,
|
|
7397
|
-
get: function () { return
|
|
7625
|
+
get: function () { return chunkFDIAOFHS_js.AccessDeniedError; }
|
|
7398
7626
|
});
|
|
7399
7627
|
Object.defineProperty(exports, "AttributeInUseError", {
|
|
7400
7628
|
enumerable: true,
|
|
7401
|
-
get: function () { return
|
|
7629
|
+
get: function () { return chunkFDIAOFHS_js.AttributeInUseError; }
|
|
7402
7630
|
});
|
|
7403
7631
|
Object.defineProperty(exports, "AttributeNotFoundError", {
|
|
7404
7632
|
enumerable: true,
|
|
7405
|
-
get: function () { return
|
|
7633
|
+
get: function () { return chunkFDIAOFHS_js.AttributeNotFoundError; }
|
|
7406
7634
|
});
|
|
7407
7635
|
Object.defineProperty(exports, "ChangeTypeNotSupportedError", {
|
|
7408
7636
|
enumerable: true,
|
|
7409
|
-
get: function () { return
|
|
7637
|
+
get: function () { return chunkFDIAOFHS_js.ChangeTypeNotSupportedError; }
|
|
7410
7638
|
});
|
|
7411
7639
|
Object.defineProperty(exports, "ConcurrentModificationError", {
|
|
7412
7640
|
enumerable: true,
|
|
7413
|
-
get: function () { return
|
|
7641
|
+
get: function () { return chunkFDIAOFHS_js.ConcurrentModificationError; }
|
|
7414
7642
|
});
|
|
7415
7643
|
Object.defineProperty(exports, "DestructiveSyncNotAllowedError", {
|
|
7416
7644
|
enumerable: true,
|
|
7417
|
-
get: function () { return
|
|
7645
|
+
get: function () { return chunkFDIAOFHS_js.DestructiveSyncNotAllowedError; }
|
|
7418
7646
|
});
|
|
7419
7647
|
Object.defineProperty(exports, "DuplicateError", {
|
|
7420
7648
|
enumerable: true,
|
|
7421
|
-
get: function () { return
|
|
7649
|
+
get: function () { return chunkFDIAOFHS_js.DuplicateError; }
|
|
7422
7650
|
});
|
|
7423
7651
|
Object.defineProperty(exports, "ForbiddenError", {
|
|
7424
7652
|
enumerable: true,
|
|
7425
|
-
get: function () { return
|
|
7653
|
+
get: function () { return chunkFDIAOFHS_js.ForbiddenError; }
|
|
7426
7654
|
});
|
|
7427
7655
|
Object.defineProperty(exports, "MemoryNotFoundError", {
|
|
7428
7656
|
enumerable: true,
|
|
7429
|
-
get: function () { return
|
|
7657
|
+
get: function () { return chunkFDIAOFHS_js.MemoryNotFoundError; }
|
|
7430
7658
|
});
|
|
7431
7659
|
Object.defineProperty(exports, "MigrationTimeoutError", {
|
|
7432
7660
|
enumerable: true,
|
|
7433
|
-
get: function () { return
|
|
7661
|
+
get: function () { return chunkFDIAOFHS_js.MigrationTimeoutError; }
|
|
7434
7662
|
});
|
|
7435
7663
|
Object.defineProperty(exports, "NotFoundError", {
|
|
7436
7664
|
enumerable: true,
|
|
7437
|
-
get: function () { return
|
|
7665
|
+
get: function () { return chunkFDIAOFHS_js.NotFoundError; }
|
|
7438
7666
|
});
|
|
7439
7667
|
Object.defineProperty(exports, "NotImplementedError", {
|
|
7440
7668
|
enumerable: true,
|
|
7441
|
-
get: function () { return
|
|
7669
|
+
get: function () { return chunkFDIAOFHS_js.NotImplementedError; }
|
|
7442
7670
|
});
|
|
7443
7671
|
Object.defineProperty(exports, "ObjectNotFoundError", {
|
|
7444
7672
|
enumerable: true,
|
|
7445
|
-
get: function () { return
|
|
7673
|
+
get: function () { return chunkFDIAOFHS_js.ObjectNotFoundError; }
|
|
7446
7674
|
});
|
|
7447
7675
|
Object.defineProperty(exports, "ObjectReferencedError", {
|
|
7448
7676
|
enumerable: true,
|
|
7449
|
-
get: function () { return
|
|
7677
|
+
get: function () { return chunkFDIAOFHS_js.ObjectReferencedError; }
|
|
7450
7678
|
});
|
|
7451
7679
|
Object.defineProperty(exports, "OrphanSystemAttributeError", {
|
|
7452
7680
|
enumerable: true,
|
|
7453
|
-
get: function () { return
|
|
7681
|
+
get: function () { return chunkFDIAOFHS_js.OrphanSystemAttributeError; }
|
|
7454
7682
|
});
|
|
7455
7683
|
Object.defineProperty(exports, "ProtectedResourceError", {
|
|
7456
7684
|
enumerable: true,
|
|
7457
|
-
get: function () { return
|
|
7685
|
+
get: function () { return chunkFDIAOFHS_js.ProtectedResourceError; }
|
|
7458
7686
|
});
|
|
7459
7687
|
Object.defineProperty(exports, "ProtectedRoleError", {
|
|
7460
7688
|
enumerable: true,
|
|
7461
|
-
get: function () { return
|
|
7689
|
+
get: function () { return chunkFDIAOFHS_js.ProtectedRoleError; }
|
|
7462
7690
|
});
|
|
7463
7691
|
Object.defineProperty(exports, "RecordNotFoundError", {
|
|
7464
7692
|
enumerable: true,
|
|
7465
|
-
get: function () { return
|
|
7693
|
+
get: function () { return chunkFDIAOFHS_js.RecordNotFoundError; }
|
|
7466
7694
|
});
|
|
7467
7695
|
Object.defineProperty(exports, "RecordReferencedError", {
|
|
7468
7696
|
enumerable: true,
|
|
7469
|
-
get: function () { return
|
|
7697
|
+
get: function () { return chunkFDIAOFHS_js.RecordReferencedError; }
|
|
7470
7698
|
});
|
|
7471
7699
|
Object.defineProperty(exports, "RepositoryError", {
|
|
7472
7700
|
enumerable: true,
|
|
7473
|
-
get: function () { return
|
|
7701
|
+
get: function () { return chunkFDIAOFHS_js.RepositoryError; }
|
|
7474
7702
|
});
|
|
7475
7703
|
Object.defineProperty(exports, "RoleNotFoundError", {
|
|
7476
7704
|
enumerable: true,
|
|
7477
|
-
get: function () { return
|
|
7705
|
+
get: function () { return chunkFDIAOFHS_js.RoleNotFoundError; }
|
|
7478
7706
|
});
|
|
7479
7707
|
Object.defineProperty(exports, "SchemaError", {
|
|
7480
7708
|
enumerable: true,
|
|
7481
|
-
get: function () { return
|
|
7709
|
+
get: function () { return chunkFDIAOFHS_js.SchemaError; }
|
|
7482
7710
|
});
|
|
7483
7711
|
Object.defineProperty(exports, "SchemaErrorCode", {
|
|
7484
7712
|
enumerable: true,
|
|
7485
|
-
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; }
|
|
7486
7718
|
});
|
|
7487
7719
|
Object.defineProperty(exports, "SearchBackendError", {
|
|
7488
7720
|
enumerable: true,
|
|
7489
|
-
get: function () { return
|
|
7721
|
+
get: function () { return chunkFDIAOFHS_js.SearchBackendError; }
|
|
7490
7722
|
});
|
|
7491
7723
|
Object.defineProperty(exports, "StorageError", {
|
|
7492
7724
|
enumerable: true,
|
|
7493
|
-
get: function () { return
|
|
7725
|
+
get: function () { return chunkFDIAOFHS_js.StorageError; }
|
|
7494
7726
|
});
|
|
7495
7727
|
Object.defineProperty(exports, "SyncCascadeError", {
|
|
7496
7728
|
enumerable: true,
|
|
7497
|
-
get: function () { return
|
|
7729
|
+
get: function () { return chunkFDIAOFHS_js.SyncCascadeError; }
|
|
7498
7730
|
});
|
|
7499
7731
|
Object.defineProperty(exports, "SyncConflictError", {
|
|
7500
7732
|
enumerable: true,
|
|
7501
|
-
get: function () { return
|
|
7733
|
+
get: function () { return chunkFDIAOFHS_js.SyncConflictError; }
|
|
7502
7734
|
});
|
|
7503
7735
|
Object.defineProperty(exports, "SyncError", {
|
|
7504
7736
|
enumerable: true,
|
|
7505
|
-
get: function () { return
|
|
7737
|
+
get: function () { return chunkFDIAOFHS_js.SyncError; }
|
|
7506
7738
|
});
|
|
7507
7739
|
Object.defineProperty(exports, "SystemEntityImmutableError", {
|
|
7508
7740
|
enumerable: true,
|
|
7509
|
-
get: function () { return
|
|
7741
|
+
get: function () { return chunkFDIAOFHS_js.SystemEntityImmutableError; }
|
|
7510
7742
|
});
|
|
7511
7743
|
Object.defineProperty(exports, "ValidationError", {
|
|
7512
7744
|
enumerable: true,
|
|
7513
|
-
get: function () { return
|
|
7745
|
+
get: function () { return chunkFDIAOFHS_js.ValidationError; }
|
|
7514
7746
|
});
|
|
7515
7747
|
Object.defineProperty(exports, "isAttributeInUseError", {
|
|
7516
7748
|
enumerable: true,
|
|
7517
|
-
get: function () { return
|
|
7749
|
+
get: function () { return chunkFDIAOFHS_js.isAttributeInUseError; }
|
|
7518
7750
|
});
|
|
7519
7751
|
Object.defineProperty(exports, "isNotFoundError", {
|
|
7520
7752
|
enumerable: true,
|
|
7521
|
-
get: function () { return
|
|
7753
|
+
get: function () { return chunkFDIAOFHS_js.isNotFoundError; }
|
|
7522
7754
|
});
|
|
7523
7755
|
Object.defineProperty(exports, "isObjectReferencedError", {
|
|
7524
7756
|
enumerable: true,
|
|
7525
|
-
get: function () { return
|
|
7757
|
+
get: function () { return chunkFDIAOFHS_js.isObjectReferencedError; }
|
|
7526
7758
|
});
|
|
7527
7759
|
Object.defineProperty(exports, "isProtectedResourceError", {
|
|
7528
7760
|
enumerable: true,
|
|
7529
|
-
get: function () { return
|
|
7761
|
+
get: function () { return chunkFDIAOFHS_js.isProtectedResourceError; }
|
|
7530
7762
|
});
|
|
7531
7763
|
Object.defineProperty(exports, "isRecordReferencedError", {
|
|
7532
7764
|
enumerable: true,
|
|
7533
|
-
get: function () { return
|
|
7765
|
+
get: function () { return chunkFDIAOFHS_js.isRecordReferencedError; }
|
|
7534
7766
|
});
|
|
7535
7767
|
Object.defineProperty(exports, "isSchemaError", {
|
|
7536
7768
|
enumerable: true,
|
|
7537
|
-
get: function () { return
|
|
7769
|
+
get: function () { return chunkFDIAOFHS_js.isSchemaError; }
|
|
7538
7770
|
});
|
|
7539
7771
|
Object.defineProperty(exports, "isValidationError", {
|
|
7540
7772
|
enumerable: true,
|
|
7541
|
-
get: function () { return
|
|
7773
|
+
get: function () { return chunkFDIAOFHS_js.isValidationError; }
|
|
7542
7774
|
});
|
|
7543
7775
|
Object.defineProperty(exports, "DEFAULT_VALIDATION_MESSAGES", {
|
|
7544
7776
|
enumerable: true,
|
|
@@ -7551,22 +7783,22 @@ Object.defineProperty(exports, "formatZodErrors", {
|
|
|
7551
7783
|
exports.ALLOWED_PROPERTY_TYPES = ALLOWED_PROPERTY_TYPES;
|
|
7552
7784
|
exports.ALL_ACTIONS = ALL_ACTIONS;
|
|
7553
7785
|
exports.ALL_SYSTEM_RESOURCES = ALL_SYSTEM_RESOURCES;
|
|
7554
|
-
exports.ATTRIBUTE_FILTER_OPERATORS = ATTRIBUTE_FILTER_OPERATORS;
|
|
7555
7786
|
exports.AUDIT_ACTIONS = AUDIT_ACTIONS;
|
|
7556
7787
|
exports.AUDIT_RESOURCE_TYPES = AUDIT_RESOURCE_TYPES;
|
|
7557
7788
|
exports.ActivityTabConfig = ActivityTabConfig;
|
|
7558
7789
|
exports.AgentBuilder = AgentBuilder;
|
|
7559
7790
|
exports.BEHAVIOR_PROPERTIES = BEHAVIOR_PROPERTIES;
|
|
7560
7791
|
exports.BROWSER_PREVIEW_STATUSES = BROWSER_PREVIEW_STATUSES;
|
|
7792
|
+
exports.BYTE_UNIT_LABELS = BYTE_UNIT_LABELS;
|
|
7561
7793
|
exports.COMPUTED_FUNCTIONS = COMPUTED_FUNCTIONS;
|
|
7562
7794
|
exports.COMPUTED_FUNCTION_METADATA = COMPUTED_FUNCTION_METADATA;
|
|
7563
7795
|
exports.COMPUTED_FUNCTION_NAMES = COMPUTED_FUNCTION_NAMES;
|
|
7564
7796
|
exports.CONNECTOR_CALLBACK_PARAM = CONNECTOR_CALLBACK_PARAM;
|
|
7565
|
-
exports.CROSS_TYPE_CONVERSIONS = CROSS_TYPE_CONVERSIONS;
|
|
7566
7797
|
exports.ComputedFormulaCompileError = ComputedFormulaCompileError;
|
|
7567
7798
|
exports.CustomTabConfig = CustomTabConfig;
|
|
7568
7799
|
exports.DB_COLUMN_FIELDS = DB_COLUMN_FIELDS;
|
|
7569
7800
|
exports.DEFAULT_AGENT_EXECUTION_CONFIG = DEFAULT_AGENT_EXECUTION_CONFIG;
|
|
7801
|
+
exports.DEFAULT_APPROVAL_POLICY = DEFAULT_APPROVAL_POLICY;
|
|
7570
7802
|
exports.DEFAULT_ROLES = DEFAULT_ROLES;
|
|
7571
7803
|
exports.DEFAULT_ROLE_DESCRIPTIONS = DEFAULT_ROLE_DESCRIPTIONS;
|
|
7572
7804
|
exports.DEFAULT_ROLE_LABELS = DEFAULT_ROLE_LABELS;
|
|
@@ -7575,6 +7807,7 @@ exports.DOCUMENT_SYSTEM_ATTRIBUTES = DOCUMENT_SYSTEM_ATTRIBUTES;
|
|
|
7575
7807
|
exports.DetailViewBuilder = DetailViewBuilder;
|
|
7576
7808
|
exports.DocumentsTabConfig = DocumentsTabConfig;
|
|
7577
7809
|
exports.EMPTY_VALUE_PLACEHOLDER = EMPTY_VALUE_PLACEHOLDER;
|
|
7810
|
+
exports.ESTIMATED_COUNT_CAP = ESTIMATED_COUNT_CAP;
|
|
7578
7811
|
exports.EmailsTabConfig = EmailsTabConfig;
|
|
7579
7812
|
exports.FORM_FORBIDDEN_ATTRIBUTE_TYPES = FORM_FORBIDDEN_ATTRIBUTE_TYPES;
|
|
7580
7813
|
exports.FlagRegistry = FlagRegistry;
|
|
@@ -7590,6 +7823,10 @@ exports.LIVE_STREAM_START_CURSOR = LIVE_STREAM_START_CURSOR;
|
|
|
7590
7823
|
exports.ListViewBuilder = ListViewBuilder;
|
|
7591
7824
|
exports.ListViewTabConfigBuilder = ListViewTabConfigBuilder;
|
|
7592
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;
|
|
7593
7830
|
exports.MEMORY_LIST_VIEW = MEMORY_LIST_VIEW;
|
|
7594
7831
|
exports.MEMORY_OBJECT = MEMORY_OBJECT;
|
|
7595
7832
|
exports.MEMORY_VIEW = MEMORY_VIEW;
|
|
@@ -7605,34 +7842,32 @@ exports.NOTIFICATION_TYPE_AGENT_SESSION_TIMEOUT = NOTIFICATION_TYPE_AGENT_SESSIO
|
|
|
7605
7842
|
exports.NOTIFICATION_TYPE_AGENT_SESSION_WAITING_HUMAN = NOTIFICATION_TYPE_AGENT_SESSION_WAITING_HUMAN;
|
|
7606
7843
|
exports.NOTIFICATION_TYPE_AGENT_TASK_ASSIGNED = NOTIFICATION_TYPE_AGENT_TASK_ASSIGNED;
|
|
7607
7844
|
exports.NOTIFICATION_WORK_STATES = NOTIFICATION_WORK_STATES;
|
|
7608
|
-
exports.NO_VALUE_OPERATORS = NO_VALUE_OPERATORS;
|
|
7609
7845
|
exports.NoopGeocodingAdapter = NoopGeocodingAdapter;
|
|
7610
|
-
exports.OPERATORS_BY_TYPE = OPERATORS_BY_TYPE;
|
|
7611
7846
|
exports.OPERATOR_SPECS = OPERATOR_SPECS;
|
|
7612
7847
|
exports.ObjectBuilder = ObjectBuilder;
|
|
7613
7848
|
exports.PRESENTATION_PROPERTIES = PRESENTATION_PROPERTIES;
|
|
7614
7849
|
exports.QUALIFIED_SEPARATOR = QUALIFIED_SEPARATOR;
|
|
7850
|
+
exports.RECORD_CREATOR_ROOT_ACTOR_METADATA_KEY = RECORD_CREATOR_ROOT_ACTOR_METADATA_KEY;
|
|
7615
7851
|
exports.RELATION_TARGET_ANY = RELATION_TARGET_ANY;
|
|
7616
|
-
exports.RESERVED_ATTRIBUTE_NAMES = RESERVED_ATTRIBUTE_NAMES;
|
|
7617
|
-
exports.RESERVED_OBJECT_NAMES = RESERVED_OBJECT_NAMES;
|
|
7618
7852
|
exports.RelationGroupBuilder = RelationGroupBuilder;
|
|
7619
7853
|
exports.RichtextTabConfig = RichtextTabConfig;
|
|
7854
|
+
exports.SCHEMA_PLAN_LIMITS = SCHEMA_PLAN_LIMITS;
|
|
7855
|
+
exports.SESSION_TERMINAL_STATUSES = SESSION_TERMINAL_STATUSES;
|
|
7620
7856
|
exports.SKILL_LIST_VIEW = SKILL_LIST_VIEW;
|
|
7621
7857
|
exports.SKILL_OBJECT = SKILL_OBJECT;
|
|
7622
7858
|
exports.SKILL_VIEW = SKILL_VIEW;
|
|
7623
7859
|
exports.STANDARD_SCHEMA_VENDOR = STANDARD_SCHEMA_VENDOR;
|
|
7624
|
-
exports.SYNONYM_ALIASES = SYNONYM_ALIASES;
|
|
7625
|
-
exports.SYSTEM_ATTRIBUTES = SYSTEM_ATTRIBUTES;
|
|
7626
|
-
exports.SYSTEM_ATTRIBUTE_I18N_KEYS = SYSTEM_ATTRIBUTE_I18N_KEYS;
|
|
7627
|
-
exports.SYSTEM_FIELD_NAMES = SYSTEM_FIELD_NAMES;
|
|
7628
7860
|
exports.SYSTEM_RESOURCES = SYSTEM_RESOURCES;
|
|
7629
7861
|
exports.SYSTEM_RESOURCE_LABELS = SYSTEM_RESOURCE_LABELS;
|
|
7862
|
+
exports.TODO_PLAN_STATUSES = TODO_PLAN_STATUSES;
|
|
7863
|
+
exports.TODO_STATUSES = TODO_STATUSES;
|
|
7630
7864
|
exports.TabBuilder = TabBuilder;
|
|
7631
7865
|
exports.TableTabConfig = TableTabConfig;
|
|
7632
7866
|
exports.USER_STATUSES = USER_STATUSES;
|
|
7633
7867
|
exports.accessLevelToActions = accessLevelToActions;
|
|
7634
7868
|
exports.actionsToAccessLevel = actionsToAccessLevel;
|
|
7635
7869
|
exports.agent = agent;
|
|
7870
|
+
exports.agentDisplayName = agentDisplayName;
|
|
7636
7871
|
exports.applyPipes = applyPipes;
|
|
7637
7872
|
exports.applyRelationProps = applyRelationProps;
|
|
7638
7873
|
exports.assertAcyclicComputedDependencies = assertAcyclicComputedDependencies;
|
|
@@ -7645,19 +7880,21 @@ exports.checkbox = checkbox;
|
|
|
7645
7880
|
exports.compareLiveStreamCursors = compareLiveStreamCursors;
|
|
7646
7881
|
exports.compileComputedFormula = compileComputedFormula;
|
|
7647
7882
|
exports.compileRollupAttribute = compileRollupAttribute;
|
|
7883
|
+
exports.computeByteMagnitude = computeByteMagnitude;
|
|
7648
7884
|
exports.createFlagRegistry = createFlagRegistry;
|
|
7649
7885
|
exports.createFlagService = createFlagService;
|
|
7650
7886
|
exports.createStandardSchemaProps = createStandardSchemaProps;
|
|
7651
7887
|
exports.currency = currency;
|
|
7652
|
-
exports.currentActor = currentActor;
|
|
7653
7888
|
exports.date = date;
|
|
7654
7889
|
exports.dateValueStart = dateValueStart;
|
|
7890
|
+
exports.destructiveSchema = destructiveSchema;
|
|
7655
7891
|
exports.detailView = detailView;
|
|
7656
7892
|
exports.document = document;
|
|
7657
7893
|
exports.evaluateComputedAst = evaluateComputedAst;
|
|
7658
7894
|
exports.evaluateComputedFormula = evaluateComputedFormula;
|
|
7659
7895
|
exports.evaluateComputedFormulaWithResult = evaluateComputedFormulaWithResult;
|
|
7660
7896
|
exports.evaluateFilterState = evaluateFilterState;
|
|
7897
|
+
exports.evaluateRecordFilterState = evaluateRecordFilterState;
|
|
7661
7898
|
exports.extractAttributeNames = extractAttributeNames;
|
|
7662
7899
|
exports.extractCurrencyFilterValue = extractCurrencyFilterValue;
|
|
7663
7900
|
exports.extractFilterValue = extractFilterValue;
|
|
@@ -7666,38 +7903,32 @@ exports.flagRegistry = flagRegistry;
|
|
|
7666
7903
|
exports.form = form;
|
|
7667
7904
|
exports.formRegistry = formRegistry;
|
|
7668
7905
|
exports.formatAttributeValue = formatAttributeValue;
|
|
7906
|
+
exports.formatByteSize = formatByteSize;
|
|
7669
7907
|
exports.formatComputedResult = formatComputedResult;
|
|
7670
7908
|
exports.formatLocationValue = formatLocationValue;
|
|
7671
7909
|
exports.formula = formula;
|
|
7672
7910
|
exports.generateDefaultDetailView = generateDefaultDetailView;
|
|
7673
7911
|
exports.generateDefaultListView = generateDefaultListView;
|
|
7674
7912
|
exports.getActiveTab = getActiveTab;
|
|
7675
|
-
exports.getAttributeCapabilities = getAttributeCapabilities;
|
|
7676
|
-
exports.getAttributeFilterOperators = getAttributeFilterOperators;
|
|
7677
7913
|
exports.getErrorMessage = getErrorMessage;
|
|
7678
7914
|
exports.getLiveProtocolPayloadChannel = getLiveProtocolPayloadChannel;
|
|
7679
7915
|
exports.getOperatorPolarity = getOperatorPolarity;
|
|
7680
|
-
exports.
|
|
7916
|
+
exports.getRecordCreatorPrincipalId = getRecordCreatorPrincipalId;
|
|
7681
7917
|
exports.getSlotFieldTargets = getSlotFieldTargets;
|
|
7682
|
-
exports.getSystemAttributeI18nKey = getSystemAttributeI18nKey;
|
|
7683
|
-
exports.getSystemAttributeList = getSystemAttributeList;
|
|
7684
7918
|
exports.getUserDisplayName = getUserDisplayName;
|
|
7685
7919
|
exports.group = group;
|
|
7920
|
+
exports.hasDestructiveEntries = hasDestructiveEntries;
|
|
7686
7921
|
exports.hasOptions = hasOptions;
|
|
7687
7922
|
exports.inferInverseCardinality = inferInverseCardinality;
|
|
7688
7923
|
exports.inferRollupReturnType = inferRollupReturnType;
|
|
7689
|
-
exports.isAttributeFilterable = isAttributeFilterable;
|
|
7690
|
-
exports.isAttributeGroupable = isAttributeGroupable;
|
|
7691
|
-
exports.isAttributeKanbanGroupable = isAttributeKanbanGroupable;
|
|
7692
|
-
exports.isAttributeSearchable = isAttributeSearchable;
|
|
7693
7924
|
exports.isAttributeSortable = isAttributeSortable2;
|
|
7694
7925
|
exports.isBilateralRelation = isBilateralRelation;
|
|
7926
|
+
exports.isCheckboxEquality = isCheckboxEquality;
|
|
7695
7927
|
exports.isComputedFunctionName = isComputedFunctionName;
|
|
7696
7928
|
exports.isDateRangeValue = isDateRangeValue;
|
|
7697
7929
|
exports.isDefaultRole = isDefaultRole;
|
|
7698
7930
|
exports.isDetailView = isDetailView;
|
|
7699
7931
|
exports.isDocumentAttribute = isDocumentAttribute;
|
|
7700
|
-
exports.isDynamicValue = isDynamicValue;
|
|
7701
7932
|
exports.isEmptyObject = isEmptyObject;
|
|
7702
7933
|
exports.isFieldGroup = isFieldGroup;
|
|
7703
7934
|
exports.isFormDefinition = isFormDefinition;
|
|
@@ -7717,23 +7948,20 @@ exports.isLiveEventType = isLiveEventType;
|
|
|
7717
7948
|
exports.isLiveGapPayload = isLiveGapPayload;
|
|
7718
7949
|
exports.isLiveReplayCompletePayload = isLiveReplayCompletePayload;
|
|
7719
7950
|
exports.isLiveStreamCursor = isLiveStreamCursor;
|
|
7720
|
-
exports.isManagedSystemAttribute = isManagedSystemAttribute;
|
|
7721
|
-
exports.isNoValueOperator = isNoValueOperator;
|
|
7722
7951
|
exports.isNotEmpty = isNotEmpty;
|
|
7723
7952
|
exports.isPlainRecord = isPlainRecord;
|
|
7724
7953
|
exports.isRelationGroup = isRelationGroup;
|
|
7725
7954
|
exports.isStandardSchema = isStandardSchema;
|
|
7955
|
+
exports.isTerminalSessionStatus = isTerminalSessionStatus;
|
|
7726
7956
|
exports.isUniversalRelation = isUniversalRelation;
|
|
7727
7957
|
exports.jsonFlag = jsonFlag;
|
|
7728
7958
|
exports.listView = listView;
|
|
7729
7959
|
exports.liveChannelKey = liveChannelKey;
|
|
7730
7960
|
exports.location = location;
|
|
7731
|
-
exports.
|
|
7961
|
+
exports.matchesAccepts = matchesAccepts;
|
|
7732
7962
|
exports.multiselect = multiselect;
|
|
7733
7963
|
exports.normalizeDateValue = normalizeDateValue;
|
|
7734
7964
|
exports.normalizeForEdgeRpc = normalizeForEdgeRpc;
|
|
7735
|
-
exports.normalizeOperator = normalizeOperator;
|
|
7736
|
-
exports.now = now;
|
|
7737
7965
|
exports.number = number;
|
|
7738
7966
|
exports.numberFlag = numberFlag;
|
|
7739
7967
|
exports.object = object;
|
|
@@ -7741,7 +7969,13 @@ exports.parseLiveChannelKey = parseLiveChannelKey;
|
|
|
7741
7969
|
exports.parseLiveSubscribePayload = parseLiveSubscribePayload;
|
|
7742
7970
|
exports.parseLiveUnsubscribePayload = parseLiveUnsubscribePayload;
|
|
7743
7971
|
exports.parseQualifiedAttribute = parseQualifiedAttribute;
|
|
7972
|
+
exports.persistedDefaultViewTargetSchema = persistedDefaultViewTargetSchema;
|
|
7973
|
+
exports.persistedSchemaPlanSchema = persistedSchemaPlanSchema;
|
|
7744
7974
|
exports.phone = phone;
|
|
7975
|
+
exports.plannedAttributeSchema = plannedAttributeSchema;
|
|
7976
|
+
exports.plannedInlineAttributeSchema = plannedInlineAttributeSchema;
|
|
7977
|
+
exports.plannedObjectSchema = plannedObjectSchema;
|
|
7978
|
+
exports.proposedDefaultViewTargetSchema = proposedDefaultViewTargetSchema;
|
|
7745
7979
|
exports.registry = registry;
|
|
7746
7980
|
exports.relation = relation;
|
|
7747
7981
|
exports.relationGroup = relationGroup;
|
|
@@ -7751,15 +7985,17 @@ exports.resolvePropertyDefinitions = resolvePropertyDefinitions;
|
|
|
7751
7985
|
exports.richtext = richtext;
|
|
7752
7986
|
exports.rollup = rollup;
|
|
7753
7987
|
exports.rollupToFormulaExpression = rollupToFormulaExpression;
|
|
7988
|
+
exports.schemaPlanSchema = schemaPlanSchema;
|
|
7754
7989
|
exports.select = select;
|
|
7755
7990
|
exports.status = status;
|
|
7756
7991
|
exports.stringFlag = stringFlag;
|
|
7757
7992
|
exports.text = text;
|
|
7758
7993
|
exports.toMultiValueOperator = toMultiValueOperator;
|
|
7759
7994
|
exports.toUndefinedIfEmpty = toUndefinedIfEmpty;
|
|
7760
|
-
exports.today = today;
|
|
7761
7995
|
exports.user = user;
|
|
7762
7996
|
exports.validateAttributeName = validateAttributeName;
|
|
7763
|
-
exports.
|
|
7997
|
+
exports.validateLabelExpression = validateLabelExpression;
|
|
7998
|
+
exports.validateObjectName = validateObjectName;
|
|
7764
7999
|
exports.viewRegistry = viewRegistry;
|
|
8000
|
+
exports.viewStateKey = viewStateKey;
|
|
7765
8001
|
exports.viewSyncPayload = viewSyncPayload;
|