@stndrds/schema 1.0.0-alpha.282 → 1.0.0-alpha.285
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-DanoPxKr.d.ts +879 -0
- package/dist/all-bG_ha0VV.d.mts +879 -0
- package/dist/{attributes-CU871AfG.d.ts → attributes-CNYwg_Nr.d.ts} +3 -2
- package/dist/{attributes-DoiGyNFk.d.mts → attributes-CWPLbp7c.d.mts} +3 -2
- package/dist/capabilities.d.mts +146 -0
- package/dist/capabilities.d.ts +146 -0
- package/dist/capabilities.js +77 -0
- package/dist/capabilities.mjs +70 -0
- package/dist/{chunk-R34LOMT7.mjs → chunk-5OBQRDRM.mjs} +3 -3
- package/dist/{chunk-QGRYOIHT.mjs → chunk-AGRAFDGU.mjs} +40 -14
- package/dist/{chunk-DIMTNM3F.js → chunk-BOICAZHR.js} +5 -4
- package/dist/{chunk-V4MZOTLV.js → chunk-I3EYILYO.js} +5 -5
- package/dist/{chunk-LBGLB443.js → chunk-K6ET4CXP.js} +3 -3
- package/dist/{chunk-PLTLAMWJ.mjs → chunk-PNOWKRH2.mjs} +2 -2
- package/dist/{chunk-EFSS7PGC.mjs → chunk-R57T4UDX.mjs} +1 -1
- package/dist/{chunk-HOVUEYEQ.mjs → chunk-RUO25ERR.mjs} +4 -0
- package/dist/{chunk-L4KLYMUI.js → chunk-V26R64A4.js} +4 -0
- package/dist/{chunk-KIMECN6D.js → chunk-YZ5RCMIQ.js} +83 -46
- package/dist/exceptions.d.mts +6 -2
- package/dist/exceptions.d.ts +6 -2
- package/dist/exceptions.js +39 -39
- package/dist/exceptions.mjs +1 -1
- package/dist/{helpers-BNr-Dppk.d.ts → helpers-CXkVwpsl.d.ts} +3 -3
- package/dist/{helpers-CfEOUBmB.d.mts → helpers-Dul_r9rJ.d.mts} +3 -3
- package/dist/{index-D9XBjFnu.d.mts → index-Ca-MzQuU.d.mts} +8 -3
- package/dist/{index-Br7koyHF.d.ts → index-Ns6KGfrZ.d.ts} +8 -3
- package/dist/index.d.mts +1120 -206
- package/dist/index.d.ts +1120 -206
- package/dist/index.js +1184 -359
- package/dist/index.mjs +868 -118
- package/dist/{migrations-BGWgXHXb.d.ts → migrations-DaFneOfx.d.ts} +1 -1
- package/dist/{migrations-C-GN1xx_.d.mts → migrations-fRvadl6i.d.mts} +1 -1
- package/dist/{objects-BRypaBpi.d.mts → objects-CDwMSnqv.d.mts} +2 -2
- package/dist/{objects-BiOMwzLL.d.ts → objects-DJv6WrDE.d.ts} +2 -2
- package/dist/{types-80c2rOUZ.d.mts → types-CVYiFc69.d.mts} +1 -1
- package/dist/{types-DqYz8Iv_.d.ts → types-NGEww_ln.d.ts} +1 -1
- package/dist/utils.js +8 -8
- package/dist/utils.mjs +2 -2
- package/dist/validation/all.d.mts +7 -7
- package/dist/validation/all.d.ts +7 -7
- package/dist/validation/all.js +46 -46
- package/dist/validation/all.mjs +5 -5
- package/dist/validation/complex/currency.d.mts +2 -2
- package/dist/validation/complex/currency.d.ts +2 -2
- package/dist/validation/complex/location.d.mts +2 -2
- package/dist/validation/complex/location.d.ts +2 -2
- package/dist/validation/complex/phone.d.mts +2 -2
- package/dist/validation/complex/phone.d.ts +2 -2
- package/dist/validation/complex/relation.d.mts +2 -2
- package/dist/validation/complex/relation.d.ts +2 -2
- package/dist/validation/complex/richtext.d.mts +2 -2
- package/dist/validation/complex/richtext.d.ts +2 -2
- package/dist/validation/complex/select.d.mts +2 -2
- package/dist/validation/complex/select.d.ts +2 -2
- package/dist/validation/complex/user.d.mts +2 -2
- package/dist/validation/complex/user.d.ts +2 -2
- package/dist/validation/computed/formula.d.mts +2 -2
- package/dist/validation/computed/formula.d.ts +2 -2
- package/dist/validation/computed/rollup.d.mts +2 -2
- package/dist/validation/computed/rollup.d.ts +2 -2
- package/dist/validation/config/index.d.mts +4 -4
- package/dist/validation/config/index.d.ts +4 -4
- package/dist/validation/config/index.js +15 -11
- package/dist/validation/config/index.mjs +2 -2
- package/dist/validation/core/index.d.mts +3 -3
- package/dist/validation/core/index.d.ts +3 -3
- package/dist/validation/object/index.d.mts +5 -5
- package/dist/validation/object/index.d.ts +5 -5
- package/dist/validation/object/index.js +15 -15
- package/dist/validation/object/index.mjs +3 -3
- package/dist/validation/primitives/checkbox.d.mts +2 -2
- package/dist/validation/primitives/checkbox.d.ts +2 -2
- package/dist/validation/primitives/date.d.mts +2 -2
- package/dist/validation/primitives/date.d.ts +2 -2
- package/dist/validation/primitives/number.d.mts +2 -2
- package/dist/validation/primitives/number.d.ts +2 -2
- package/dist/validation/primitives/text.d.mts +2 -2
- package/dist/validation/primitives/text.d.ts +2 -2
- package/package.json +10 -5
- package/dist/all-C3EaFLCU.d.ts +0 -472
- package/dist/all-CQMswOrw.d.mts +0 -472
package/dist/index.js
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
|
|
3
|
+
var chunkK6ET4CXP_js = require('./chunk-K6ET4CXP.js');
|
|
4
|
+
var chunkYZ5RCMIQ_js = require('./chunk-YZ5RCMIQ.js');
|
|
5
|
+
var chunkI3EYILYO_js = require('./chunk-I3EYILYO.js');
|
|
6
|
+
require('./chunk-EEH4XQ7W.js');
|
|
7
7
|
require('./chunk-EW5XR2X3.js');
|
|
8
8
|
require('./chunk-QWKLQRBX.js');
|
|
9
9
|
require('./chunk-KNGWHQLR.js');
|
|
10
10
|
require('./chunk-HTSTPTNZ.js');
|
|
11
11
|
require('./chunk-V2UA2D4E.js');
|
|
12
|
+
var chunkBOICAZHR_js = require('./chunk-BOICAZHR.js');
|
|
12
13
|
var chunk5WATIVCA_js = require('./chunk-5WATIVCA.js');
|
|
13
14
|
var chunkSI34M4IC_js = require('./chunk-SI34M4IC.js');
|
|
14
15
|
var chunkYIP5FJ5H_js = require('./chunk-YIP5FJ5H.js');
|
|
15
16
|
var chunkZPFOKBIN_js = require('./chunk-ZPFOKBIN.js');
|
|
16
|
-
var
|
|
17
|
+
var chunkV26R64A4_js = require('./chunk-V26R64A4.js');
|
|
17
18
|
require('./chunk-ACKMC6FL.js');
|
|
18
19
|
require('./chunk-E6JUYGJX.js');
|
|
19
20
|
var chunkQ4SZAMJT_js = require('./chunk-Q4SZAMJT.js');
|
|
20
|
-
require('./chunk-EEH4XQ7W.js');
|
|
21
21
|
var chunkYKWSHBT5_js = require('./chunk-YKWSHBT5.js');
|
|
22
22
|
var constants = require('@stndrds/constants');
|
|
23
23
|
var z2 = require('zod');
|
|
@@ -70,6 +70,24 @@ var BEHAVIOR_PROPERTIES = [
|
|
|
70
70
|
var PRESENTATION_PROPERTIES = ["label", "description", "placeholder", "icon"];
|
|
71
71
|
|
|
72
72
|
// src/types/attributes.ts
|
|
73
|
+
var ATTRIBUTE_TYPES = [
|
|
74
|
+
"text",
|
|
75
|
+
"richtext",
|
|
76
|
+
"number",
|
|
77
|
+
"checkbox",
|
|
78
|
+
"date",
|
|
79
|
+
"phone",
|
|
80
|
+
"currency",
|
|
81
|
+
"status",
|
|
82
|
+
"location",
|
|
83
|
+
"select",
|
|
84
|
+
"multiselect",
|
|
85
|
+
"user",
|
|
86
|
+
"relation",
|
|
87
|
+
"formula",
|
|
88
|
+
"rollup",
|
|
89
|
+
"document"
|
|
90
|
+
];
|
|
73
91
|
var RELATION_TARGET_ANY = "*";
|
|
74
92
|
function isUniversalRelation(attr) {
|
|
75
93
|
return attr.targets.length === 1 && attr.targets[0].object === RELATION_TARGET_ANY;
|
|
@@ -81,7 +99,7 @@ function inferInverseCardinality(cardinality) {
|
|
|
81
99
|
return cardinality === "one" ? "many" : "many";
|
|
82
100
|
}
|
|
83
101
|
function isAttributeSortable2(attr) {
|
|
84
|
-
return
|
|
102
|
+
return chunkYZ5RCMIQ_js.isAttributeSortable(attr);
|
|
85
103
|
}
|
|
86
104
|
|
|
87
105
|
// src/types/audit.ts
|
|
@@ -148,14 +166,14 @@ function sessionStateToLegacyStatus(state) {
|
|
|
148
166
|
return "idle";
|
|
149
167
|
case "parked":
|
|
150
168
|
if (state.parkedOn === void 0) {
|
|
151
|
-
throw new
|
|
169
|
+
throw new chunkV26R64A4_js.SchemaError("parked state without parkedOn", chunkV26R64A4_js.SchemaErrorCode.INVARIANT_VIOLATION);
|
|
152
170
|
}
|
|
153
171
|
return state.parkedOn === "agents" ? "waiting_agents" : "waiting_human";
|
|
154
172
|
case "terminal":
|
|
155
173
|
if (state.outcome === void 0) {
|
|
156
|
-
throw new
|
|
174
|
+
throw new chunkV26R64A4_js.SchemaError(
|
|
157
175
|
"terminal state without outcome",
|
|
158
|
-
|
|
176
|
+
chunkV26R64A4_js.SchemaErrorCode.INVARIANT_VIOLATION
|
|
159
177
|
);
|
|
160
178
|
}
|
|
161
179
|
return state.outcome;
|
|
@@ -218,6 +236,13 @@ function isOpenToolPartState(state) {
|
|
|
218
236
|
function isToolApprovalState(state) {
|
|
219
237
|
return TOOL_APPROVAL_STATES.includes(state);
|
|
220
238
|
}
|
|
239
|
+
function compareAgentSessionMessages(left, right) {
|
|
240
|
+
const createdAtOrder = left.createdAt.getTime() - right.createdAt.getTime();
|
|
241
|
+
return createdAtOrder === 0 ? left.id.localeCompare(right.id) : createdAtOrder;
|
|
242
|
+
}
|
|
243
|
+
function orderAgentSessionMessages(messages) {
|
|
244
|
+
return [...messages].sort(compareAgentSessionMessages);
|
|
245
|
+
}
|
|
221
246
|
var TODO_STATUSES = ["pending", "in_progress", "completed", "blocked"];
|
|
222
247
|
var MAX_TODOS = 50;
|
|
223
248
|
var MAX_TODO_ID_CHARS = 80;
|
|
@@ -229,7 +254,7 @@ var NATIVE_AGENT_UI_PART_IDS_METADATA_KEY = "__stndrdsNativeUiPartIds";
|
|
|
229
254
|
var NATIVE_AGENT_UI_PART_IDS_METADATA_SCHEMA_VERSION = 1;
|
|
230
255
|
var INVALID_NATIVE_PART_IDS = "Native agent UI part IDs metadata is invalid";
|
|
231
256
|
function invalidNativePartIds() {
|
|
232
|
-
throw new
|
|
257
|
+
throw new chunkV26R64A4_js.ValidationError(INVALID_NATIVE_PART_IDS, []);
|
|
233
258
|
}
|
|
234
259
|
function isPlainRecord(value) {
|
|
235
260
|
if (value === null || typeof value !== "object" || Array.isArray(value)) return false;
|
|
@@ -416,7 +441,7 @@ function parseCountMode(value) {
|
|
|
416
441
|
if (typeof value === "string" && COUNT_MODES.includes(value)) {
|
|
417
442
|
return value;
|
|
418
443
|
}
|
|
419
|
-
throw new
|
|
444
|
+
throw new chunkV26R64A4_js.ValidationError(
|
|
420
445
|
`countMode must be one of: ${COUNT_MODES.join(", ")} (received: ${String(value)})`,
|
|
421
446
|
[]
|
|
422
447
|
);
|
|
@@ -522,7 +547,7 @@ function isDateRangeValue(value) {
|
|
|
522
547
|
return typeof value === "object" && value !== null && typeof value.start === "string";
|
|
523
548
|
}
|
|
524
549
|
function normalizeDateValue(value, attr) {
|
|
525
|
-
if (
|
|
550
|
+
if (chunkI3EYILYO_js.isNullishOrEmptyString(value)) return null;
|
|
526
551
|
if (isDateRangeValue(value)) {
|
|
527
552
|
return attr.endDate ? { start: value.start, end: value.end ?? null } : value.start;
|
|
528
553
|
}
|
|
@@ -660,7 +685,7 @@ function formatMultiselect(value, attribute) {
|
|
|
660
685
|
return value.join(", ");
|
|
661
686
|
}
|
|
662
687
|
function formatAttributeValue(value, attribute) {
|
|
663
|
-
if (
|
|
688
|
+
if (chunkI3EYILYO_js.isNullishOrEmptyString(value)) {
|
|
664
689
|
return EMPTY_VALUE_PLACEHOLDER;
|
|
665
690
|
}
|
|
666
691
|
switch (attribute.type) {
|
|
@@ -813,7 +838,7 @@ function renderLabelExpression(template, values, fallback = DEFAULT_LABEL_FALLBA
|
|
|
813
838
|
break;
|
|
814
839
|
}
|
|
815
840
|
}
|
|
816
|
-
const isEmpty2 =
|
|
841
|
+
const isEmpty2 = chunkI3EYILYO_js.isNullishOrEmptyString(value);
|
|
817
842
|
if (isEmpty2 && pipes.length === 0) return "";
|
|
818
843
|
for (const pipeExpr of pipes) {
|
|
819
844
|
const { name: pipeName, args } = parsePipeExpression(pipeExpr);
|
|
@@ -896,7 +921,7 @@ function qualifiedPropertyDefs(attribute) {
|
|
|
896
921
|
return void 0;
|
|
897
922
|
}
|
|
898
923
|
function extractValueRefs(value) {
|
|
899
|
-
if (
|
|
924
|
+
if (chunkI3EYILYO_js.isNullishOrEmptyString(value)) return [];
|
|
900
925
|
if (typeof value === "string") return [{ id: value }];
|
|
901
926
|
if (Array.isArray(value)) return value.flatMap((item) => extractValueRefs(item));
|
|
902
927
|
if (typeof value === "object" && "id" in value) {
|
|
@@ -1100,24 +1125,24 @@ function validateObjectName(name) {
|
|
|
1100
1125
|
OBJECT_NAME_SCHEMA.parse(name);
|
|
1101
1126
|
} catch (error) {
|
|
1102
1127
|
if (error instanceof z2__default.default.ZodError) {
|
|
1103
|
-
throw new
|
|
1128
|
+
throw new chunkV26R64A4_js.SchemaError(error.issues[0].message, chunkV26R64A4_js.SchemaErrorCode.INVALID_OBJECT_NAME);
|
|
1104
1129
|
}
|
|
1105
1130
|
throw error;
|
|
1106
1131
|
}
|
|
1107
1132
|
}
|
|
1108
1133
|
function validateViewName(name) {
|
|
1109
1134
|
if (!name || name.length === 0) {
|
|
1110
|
-
throw new
|
|
1135
|
+
throw new chunkV26R64A4_js.ValidationError("View name cannot be empty", [
|
|
1111
1136
|
{ path: ["name"], message: "View name cannot be empty" }
|
|
1112
1137
|
]);
|
|
1113
1138
|
}
|
|
1114
1139
|
if (name.length > MAX_NAME_LENGTH) {
|
|
1115
|
-
throw new
|
|
1140
|
+
throw new chunkV26R64A4_js.ValidationError("View name is too long", [
|
|
1116
1141
|
{ path: ["name"], message: `View name is too long (max ${MAX_NAME_LENGTH} characters)` }
|
|
1117
1142
|
]);
|
|
1118
1143
|
}
|
|
1119
1144
|
if (!VIEW_NAME_REGEX.test(name)) {
|
|
1120
|
-
throw new
|
|
1145
|
+
throw new chunkV26R64A4_js.ValidationError("Invalid view name format", [
|
|
1121
1146
|
{
|
|
1122
1147
|
path: ["name"],
|
|
1123
1148
|
message: "View name must be in kebab-case (e.g., 'detail', 'list-view')"
|
|
@@ -1135,6 +1160,12 @@ function assertUniqueBy(items, getKey, buildError) {
|
|
|
1135
1160
|
seen.add(key);
|
|
1136
1161
|
}
|
|
1137
1162
|
}
|
|
1163
|
+
var ATTRIBUTE_NAME_SCHEMA = z2__default.default.string().min(1, "Attribute name cannot be empty").max(MAX_NAME_LENGTH, `Attribute name is too long (max ${MAX_NAME_LENGTH} characters)`).regex(ATTRIBUTE_NAME_REGEX, {
|
|
1164
|
+
message: "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'"
|
|
1165
|
+
}).refine(
|
|
1166
|
+
(name) => !chunkYZ5RCMIQ_js.RESERVED_ATTRIBUTE_NAMES.includes(name),
|
|
1167
|
+
{ message: "This is a reserved attribute name" }
|
|
1168
|
+
);
|
|
1138
1169
|
function validateAttributeName(name) {
|
|
1139
1170
|
if (!name || name.length === 0) {
|
|
1140
1171
|
throw new Error("[AttributeBuilder] Attribute name cannot be empty");
|
|
@@ -1149,10 +1180,10 @@ function validateAttributeName(name) {
|
|
|
1149
1180
|
"[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'"
|
|
1150
1181
|
);
|
|
1151
1182
|
}
|
|
1152
|
-
if (
|
|
1183
|
+
if (chunkYZ5RCMIQ_js.RESERVED_ATTRIBUTE_NAMES.includes(name)) {
|
|
1153
1184
|
throw new Error(
|
|
1154
1185
|
`[AttributeBuilder] "${name}" is a reserved name and cannot be used as an attribute name.
|
|
1155
|
-
Reserved names: ${
|
|
1186
|
+
Reserved names: ${chunkYZ5RCMIQ_js.RESERVED_ATTRIBUTE_NAMES.join(", ")}`
|
|
1156
1187
|
);
|
|
1157
1188
|
}
|
|
1158
1189
|
}
|
|
@@ -1219,7 +1250,7 @@ var DEFAULT_AGENT_EXECUTION_CONFIG = {
|
|
|
1219
1250
|
var AgentBuilder = class {
|
|
1220
1251
|
constructor(config) {
|
|
1221
1252
|
if (!config.name || config.name.trim().length === 0) {
|
|
1222
|
-
throw new
|
|
1253
|
+
throw new chunkV26R64A4_js.ValidationError("Agent name is required", []);
|
|
1223
1254
|
}
|
|
1224
1255
|
this.bp = { name: config.name, system: true, visibility: "workspace", triggers: [] };
|
|
1225
1256
|
}
|
|
@@ -1353,13 +1384,13 @@ var AgentBuilder = class {
|
|
|
1353
1384
|
}
|
|
1354
1385
|
build() {
|
|
1355
1386
|
if (!this.bp.systemPrompt) {
|
|
1356
|
-
throw new
|
|
1387
|
+
throw new chunkV26R64A4_js.ValidationError(`Agent "${this.bp.name}": systemPrompt is required`, []);
|
|
1357
1388
|
}
|
|
1358
1389
|
if (!this.bp.model) {
|
|
1359
|
-
throw new
|
|
1390
|
+
throw new chunkV26R64A4_js.ValidationError(`Agent "${this.bp.name}": model is required`, []);
|
|
1360
1391
|
}
|
|
1361
1392
|
if (this.bp.system && this.bp.visibility === "private") {
|
|
1362
|
-
throw new
|
|
1393
|
+
throw new chunkV26R64A4_js.ValidationError(
|
|
1363
1394
|
`Agent "${this.bp.name}": system agents must use workspace visibility`,
|
|
1364
1395
|
[]
|
|
1365
1396
|
);
|
|
@@ -1367,7 +1398,7 @@ var AgentBuilder = class {
|
|
|
1367
1398
|
assertUniqueBy(
|
|
1368
1399
|
this.bp.triggers,
|
|
1369
1400
|
(t) => t.name,
|
|
1370
|
-
(name) => new
|
|
1401
|
+
(name) => new chunkV26R64A4_js.ValidationError(`Agent "${this.bp.name}": duplicate trigger name "${name}"`, [])
|
|
1371
1402
|
);
|
|
1372
1403
|
return {
|
|
1373
1404
|
...this.bp,
|
|
@@ -1422,7 +1453,7 @@ var BaseAttributeBuilder = class {
|
|
|
1422
1453
|
* @see https://standardschema.dev/
|
|
1423
1454
|
*/
|
|
1424
1455
|
get "~standard"() {
|
|
1425
|
-
const zodSchema =
|
|
1456
|
+
const zodSchema = chunkI3EYILYO_js.createAttributeValidator(this.build());
|
|
1426
1457
|
return createStandardSchemaProps(zodSchema);
|
|
1427
1458
|
}
|
|
1428
1459
|
constructor(type, name, label) {
|
|
@@ -2179,9 +2210,9 @@ var RollupAttributeBuilder = class extends BaseAttributeBuilder {
|
|
|
2179
2210
|
if (fn === "original" && targetType !== void 0 && targetType !== "select" && targetType !== "status" && targetType !== "multiselect") {
|
|
2180
2211
|
const relation2 = this.attr.relationAttribute ?? "relation";
|
|
2181
2212
|
const target = this.attr.targetAttribute ?? "field";
|
|
2182
|
-
throw new
|
|
2213
|
+
throw new chunkV26R64A4_js.SchemaError(
|
|
2183
2214
|
`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}").`,
|
|
2184
|
-
|
|
2215
|
+
chunkV26R64A4_js.SchemaErrorCode.VALIDATION_FAILED
|
|
2185
2216
|
);
|
|
2186
2217
|
}
|
|
2187
2218
|
return super.build();
|
|
@@ -2691,7 +2722,7 @@ var ObjectBuilder = class {
|
|
|
2691
2722
|
* @see https://standardschema.dev/
|
|
2692
2723
|
*/
|
|
2693
2724
|
get "~standard"() {
|
|
2694
|
-
const zodSchema =
|
|
2725
|
+
const zodSchema = chunkI3EYILYO_js.createObjectValidator(this.build());
|
|
2695
2726
|
return createStandardSchemaProps(zodSchema);
|
|
2696
2727
|
}
|
|
2697
2728
|
/**
|
|
@@ -2819,7 +2850,7 @@ var ObjectBuilder = class {
|
|
|
2819
2850
|
assertUniqueBy(
|
|
2820
2851
|
[...this.obj.attributes, ...finalAttrs],
|
|
2821
2852
|
(attribute) => attribute.name,
|
|
2822
|
-
(name) => new
|
|
2853
|
+
(name) => new chunkV26R64A4_js.DuplicateError(
|
|
2823
2854
|
"attribute",
|
|
2824
2855
|
name,
|
|
2825
2856
|
`Object "${this.obj.name}": duplicate attribute name "${name}"`
|
|
@@ -2948,26 +2979,26 @@ var ObjectBuilder = class {
|
|
|
2948
2979
|
throw new Error("[ObjectBuilder] Missing required field: label");
|
|
2949
2980
|
}
|
|
2950
2981
|
if (!this._labelExpression) {
|
|
2951
|
-
throw new
|
|
2982
|
+
throw new chunkV26R64A4_js.SchemaError(
|
|
2952
2983
|
`Object "${this.obj.name}" must have a labelExpression. The labelExpression defines how records are displayed in lists and relations (e.g. "{{ name }}").`,
|
|
2953
|
-
|
|
2984
|
+
chunkV26R64A4_js.SchemaErrorCode.VALIDATION_FAILED
|
|
2954
2985
|
);
|
|
2955
2986
|
}
|
|
2956
2987
|
const labelResult = labelExpressionSchema.safeParse(this._labelExpression);
|
|
2957
2988
|
if (!labelResult.success) {
|
|
2958
2989
|
const errorMsg = labelResult.error.issues[0]?.message ?? "Invalid labelExpression";
|
|
2959
|
-
throw new
|
|
2990
|
+
throw new chunkV26R64A4_js.SchemaError(
|
|
2960
2991
|
`Invalid labelExpression for "${this.obj.name}": ${errorMsg}`,
|
|
2961
|
-
|
|
2992
|
+
chunkV26R64A4_js.SchemaErrorCode.VALIDATION_FAILED
|
|
2962
2993
|
);
|
|
2963
2994
|
}
|
|
2964
2995
|
if (this._embeddingExpression !== void 0) {
|
|
2965
2996
|
const embeddingResult = labelExpressionSchema.safeParse(this._embeddingExpression);
|
|
2966
2997
|
if (!embeddingResult.success) {
|
|
2967
2998
|
const errorMsg = embeddingResult.error.issues[0]?.message ?? "Invalid embeddingExpression";
|
|
2968
|
-
throw new
|
|
2999
|
+
throw new chunkV26R64A4_js.SchemaError(
|
|
2969
3000
|
`Invalid embeddingExpression for "${this.obj.name}": ${errorMsg}`,
|
|
2970
|
-
|
|
3001
|
+
chunkV26R64A4_js.SchemaErrorCode.VALIDATION_FAILED
|
|
2971
3002
|
);
|
|
2972
3003
|
}
|
|
2973
3004
|
}
|
|
@@ -3009,7 +3040,7 @@ function object(config) {
|
|
|
3009
3040
|
}
|
|
3010
3041
|
function validatePresetStructure(presetId, nodes, depth) {
|
|
3011
3042
|
const fail = (message, detail) => {
|
|
3012
|
-
throw new
|
|
3043
|
+
throw new chunkV26R64A4_js.ValidationError(message, [
|
|
3013
3044
|
{ path: ["documentLayout", "presets", presetId], message: detail }
|
|
3014
3045
|
]);
|
|
3015
3046
|
};
|
|
@@ -3780,7 +3811,7 @@ var ListViewBuilder = class {
|
|
|
3780
3811
|
}
|
|
3781
3812
|
const config = {
|
|
3782
3813
|
defaultFilters: this.data.defaultFilters ? {
|
|
3783
|
-
id:
|
|
3814
|
+
id: chunkK6ET4CXP_js.generateId(),
|
|
3784
3815
|
combinator: this.data.defaultFilters.combinator,
|
|
3785
3816
|
rules: this.data.defaultFilters.rules
|
|
3786
3817
|
} : void 0,
|
|
@@ -3795,7 +3826,7 @@ var ListViewBuilder = class {
|
|
|
3795
3826
|
visibility: tab.visibility,
|
|
3796
3827
|
columns: tab.columns,
|
|
3797
3828
|
filters: tab.filters ? {
|
|
3798
|
-
id:
|
|
3829
|
+
id: chunkK6ET4CXP_js.generateId(),
|
|
3799
3830
|
combinator: tab.filters.combinator,
|
|
3800
3831
|
rules: tab.filters.rules
|
|
3801
3832
|
} : void 0,
|
|
@@ -3961,7 +3992,7 @@ var ListViewTabConfigBuilder = class _ListViewTabConfigBuilder {
|
|
|
3961
3992
|
const protectedAttribute = findProtectedTabFilterAttribute(filters);
|
|
3962
3993
|
if (protectedAttribute) {
|
|
3963
3994
|
const message = `Tab filters cannot target "${protectedAttribute}". Use .visibility("private")`;
|
|
3964
|
-
throw new
|
|
3995
|
+
throw new chunkV26R64A4_js.ValidationError(message, [{ path: ["filters"], message }]);
|
|
3965
3996
|
}
|
|
3966
3997
|
this.tabData.filters = filters;
|
|
3967
3998
|
return this;
|
|
@@ -4172,7 +4203,7 @@ function jsonFlag(name, defaultValue) {
|
|
|
4172
4203
|
|
|
4173
4204
|
// src/feature-flags/flag-registry.ts
|
|
4174
4205
|
function duplicateFlagError(name) {
|
|
4175
|
-
return new
|
|
4206
|
+
return new chunkV26R64A4_js.DuplicateError(
|
|
4176
4207
|
"feature flag",
|
|
4177
4208
|
name,
|
|
4178
4209
|
`Flag "${name}" is already registered. Each flag name must be unique.`
|
|
@@ -4250,7 +4281,7 @@ var FlagRegistry = class {
|
|
|
4250
4281
|
getOrThrow(name) {
|
|
4251
4282
|
const flag = this.get(name);
|
|
4252
4283
|
if (!flag) {
|
|
4253
|
-
throw new
|
|
4284
|
+
throw new chunkV26R64A4_js.NotFoundError(
|
|
4254
4285
|
"Feature flag",
|
|
4255
4286
|
name,
|
|
4256
4287
|
void 0,
|
|
@@ -4427,19 +4458,19 @@ var FlagService = class {
|
|
|
4427
4458
|
*/
|
|
4428
4459
|
async setOverride(flagName, level, value, options = {}) {
|
|
4429
4460
|
if (!this.repository) {
|
|
4430
|
-
throw new
|
|
4461
|
+
throw new chunkV26R64A4_js.SchemaError(
|
|
4431
4462
|
"Cannot set override: no FeatureFlagsRepository configured. Add featureFlags to your DatabaseAdapter to enable runtime overrides.",
|
|
4432
|
-
|
|
4463
|
+
chunkV26R64A4_js.SchemaErrorCode.CONFIGURATION_REQUIRED
|
|
4433
4464
|
);
|
|
4434
4465
|
}
|
|
4435
4466
|
const flag = this.registry.get(flagName);
|
|
4436
4467
|
if (flag && !flag.allowedLevels.includes(level)) {
|
|
4437
4468
|
const message = `Flag "${flagName}" does not allow ${level}-level overrides. Allowed levels: ${flag.allowedLevels.join(", ")}`;
|
|
4438
|
-
throw new
|
|
4469
|
+
throw new chunkV26R64A4_js.ValidationError(message, [{ path: ["level"], message }]);
|
|
4439
4470
|
}
|
|
4440
4471
|
if (flag?.system) {
|
|
4441
4472
|
const message = `Flag "${flagName}" is a system flag and cannot be overridden via API.`;
|
|
4442
|
-
throw new
|
|
4473
|
+
throw new chunkV26R64A4_js.ValidationError(message, [{ path: ["flagName"], message }]);
|
|
4443
4474
|
}
|
|
4444
4475
|
await this.repository.setOverride({
|
|
4445
4476
|
flagName,
|
|
@@ -4459,9 +4490,9 @@ var FlagService = class {
|
|
|
4459
4490
|
*/
|
|
4460
4491
|
async deleteOverride(flagName, level, targetId) {
|
|
4461
4492
|
if (!this.repository) {
|
|
4462
|
-
throw new
|
|
4493
|
+
throw new chunkV26R64A4_js.SchemaError(
|
|
4463
4494
|
"Cannot delete override: no FeatureFlagsRepository configured.",
|
|
4464
|
-
|
|
4495
|
+
chunkV26R64A4_js.SchemaErrorCode.CONFIGURATION_REQUIRED
|
|
4465
4496
|
);
|
|
4466
4497
|
}
|
|
4467
4498
|
await this.repository.deleteOverride(flagName, level, targetId);
|
|
@@ -4598,7 +4629,7 @@ var NativeObjectRegistryClass = class {
|
|
|
4598
4629
|
if (!object2.system) {
|
|
4599
4630
|
const message = `[NativeObjectRegistry] Cannot register object "${object2.name}" (id: ${object2.id}): missing system flag.
|
|
4600
4631
|
Native objects must have system=true. Did you call .runtime() on the builder? Remove that call \u2014 objects are system:true by default.`;
|
|
4601
|
-
throw new
|
|
4632
|
+
throw new chunkV26R64A4_js.ValidationError(message, []);
|
|
4602
4633
|
}
|
|
4603
4634
|
if (this.objects.has(object2.name)) {
|
|
4604
4635
|
const existing = this.objects.get(object2.name);
|
|
@@ -4606,7 +4637,7 @@ Native objects must have system=true. Did you call .runtime() on the builder? Re
|
|
|
4606
4637
|
- Existing: "${existing?.label}" (id: ${existing?.id})
|
|
4607
4638
|
- New: "${object2.label}" (id: ${object2.id})
|
|
4608
4639
|
Please use unique names for each native object.`;
|
|
4609
|
-
throw new
|
|
4640
|
+
throw new chunkV26R64A4_js.DuplicateError("object", object2.name, message);
|
|
4610
4641
|
}
|
|
4611
4642
|
this.objects.set(object2.name, cloneObjectDefinition(object2));
|
|
4612
4643
|
}
|
|
@@ -4638,7 +4669,7 @@ Please use unique names for each native object.`;
|
|
|
4638
4669
|
if (!object2) {
|
|
4639
4670
|
const message = `[NativeObjectRegistry] Native object "${name}" not found.
|
|
4640
4671
|
Available objects: ${this.listNames().join(", ")}`;
|
|
4641
|
-
throw new
|
|
4672
|
+
throw new chunkV26R64A4_js.NotFoundError("Native object", name, chunkV26R64A4_js.SchemaErrorCode.OBJECT_NOT_FOUND, message);
|
|
4642
4673
|
}
|
|
4643
4674
|
return object2;
|
|
4644
4675
|
}
|
|
@@ -4800,7 +4831,7 @@ var ViewRegistry = class {
|
|
|
4800
4831
|
const key = this.makeKey(view.object, view.name, view.type);
|
|
4801
4832
|
if (this.views.has(key)) {
|
|
4802
4833
|
const message = `[ViewRegistry] Duplicate view: "${view.name}" (${view.type}) for object "${view.object}"`;
|
|
4803
|
-
throw new
|
|
4834
|
+
throw new chunkV26R64A4_js.DuplicateError("view", key, message);
|
|
4804
4835
|
}
|
|
4805
4836
|
const storedView = cloneViewDefinition(view);
|
|
4806
4837
|
this.views.set(key, storedView);
|
|
@@ -4845,7 +4876,7 @@ var ViewRegistry = class {
|
|
|
4845
4876
|
const availableNames = available.map((v) => `${v.name} (${v.type})`).join(", ") || "(none)";
|
|
4846
4877
|
const message = `[ViewRegistry] View "${viewName}" not found for object "${objectName}".
|
|
4847
4878
|
Available views: ${availableNames}`;
|
|
4848
|
-
throw new
|
|
4879
|
+
throw new chunkV26R64A4_js.NotFoundError("View", `${objectName}:${viewName}`, void 0, message);
|
|
4849
4880
|
}
|
|
4850
4881
|
return view;
|
|
4851
4882
|
}
|
|
@@ -4933,7 +4964,7 @@ var viewRegistry = new ViewRegistry();
|
|
|
4933
4964
|
// src/views/auto-generator.ts
|
|
4934
4965
|
function getRuntimeAttributes(attributes, excludeNames = []) {
|
|
4935
4966
|
return attributes.filter(
|
|
4936
|
-
(attr) => !(!
|
|
4967
|
+
(attr) => !(!chunkYZ5RCMIQ_js.getAttributeCapabilities(attr).lifecycle.visibleInRuntime || attr.system || excludeNames.includes(attr.name))
|
|
4937
4968
|
);
|
|
4938
4969
|
}
|
|
4939
4970
|
function sortAttributes(attributes) {
|
|
@@ -4966,7 +4997,7 @@ function generateDefaultDetailView(object2, options = {}) {
|
|
|
4966
4997
|
const { includeActivityTab = true, includeDocumentsTab = true, excludeAttributes = [] } = options;
|
|
4967
4998
|
const runtimeAttrs = getRuntimeAttributes(object2.attributes, excludeAttributes);
|
|
4968
4999
|
const sortedAttrs = sortAttributes(
|
|
4969
|
-
runtimeAttrs.filter((attr) =>
|
|
5000
|
+
runtimeAttrs.filter((attr) => chunkYZ5RCMIQ_js.getAttributeCapabilities(attr).presentation.formField)
|
|
4970
5001
|
);
|
|
4971
5002
|
const formTab = {
|
|
4972
5003
|
id: "form",
|
|
@@ -5023,7 +5054,7 @@ function generateDefaultListView(object2, options = {}) {
|
|
|
5023
5054
|
const { excludeAttributes = [], maxListColumns = 5 } = options;
|
|
5024
5055
|
const runtimeAttrs = getRuntimeAttributes(object2.attributes, excludeAttributes);
|
|
5025
5056
|
const sortedAttrs = sortAttributes(
|
|
5026
|
-
runtimeAttrs.filter((attr) =>
|
|
5057
|
+
runtimeAttrs.filter((attr) => chunkYZ5RCMIQ_js.getAttributeCapabilities(attr).presentation.defaultColumn)
|
|
5027
5058
|
);
|
|
5028
5059
|
const columns = sortedAttrs.slice(0, maxListColumns).map((attr) => attr.name);
|
|
5029
5060
|
const config = {
|
|
@@ -5153,7 +5184,7 @@ var FormRegistry = class {
|
|
|
5153
5184
|
const forms = Array.isArray(formOrForms) ? formOrForms : [formOrForms];
|
|
5154
5185
|
for (const f of forms) {
|
|
5155
5186
|
if (this.forms.has(f.name)) {
|
|
5156
|
-
throw new
|
|
5187
|
+
throw new chunkV26R64A4_js.DuplicateError("form", f.name, `[FormRegistry] Duplicate form: "${f.name}"`);
|
|
5157
5188
|
}
|
|
5158
5189
|
this.forms.set(f.name, cloneFormDefinition(f));
|
|
5159
5190
|
}
|
|
@@ -5257,6 +5288,8 @@ function liveChannelKey(channel) {
|
|
|
5257
5288
|
return `user:${encodeURIComponent(channel.actorId)}`;
|
|
5258
5289
|
case "conversation":
|
|
5259
5290
|
return `conversation:${encodeURIComponent(channel.sessionId)}`;
|
|
5291
|
+
case "architect-draft":
|
|
5292
|
+
return `architect-draft:${encodeURIComponent(channel.actorId)}`;
|
|
5260
5293
|
}
|
|
5261
5294
|
}
|
|
5262
5295
|
function decodeLiveChannelPart(part) {
|
|
@@ -5298,6 +5331,10 @@ function parseLiveChannelKey(key) {
|
|
|
5298
5331
|
const actorId = decodeLiveChannelPart(parts[1]);
|
|
5299
5332
|
return actorId ? { kind: "user", actorId } : null;
|
|
5300
5333
|
}
|
|
5334
|
+
if (parts[0] === "architect-draft" && parts.length === 2 && parts[1]) {
|
|
5335
|
+
const actorId = decodeLiveChannelPart(parts[1]);
|
|
5336
|
+
return actorId ? { kind: "architect-draft", actorId } : null;
|
|
5337
|
+
}
|
|
5301
5338
|
if (parts[0] === "conversation" && parts.length === 2 && parts[1]) {
|
|
5302
5339
|
const sessionId = decodeLiveChannelPart(parts[1]);
|
|
5303
5340
|
return sessionId ? { kind: "conversation", sessionId } : null;
|
|
@@ -5318,11 +5355,13 @@ var LIVE_EVENT_TYPE_REGISTRY = {
|
|
|
5318
5355
|
"notification.created": true,
|
|
5319
5356
|
"notification.recipient.patch": true,
|
|
5320
5357
|
"notification.count.patch": true,
|
|
5358
|
+
"notification.inbox.archived": true,
|
|
5321
5359
|
"conversation.renamed": true,
|
|
5322
5360
|
"browser.preview.updated": true,
|
|
5323
5361
|
"reflex.state.changed": true,
|
|
5324
5362
|
"reflex.run.completed": true,
|
|
5325
5363
|
"reflex.authoring.progress": true,
|
|
5364
|
+
"architect.draft.updated": true,
|
|
5326
5365
|
"channel.revoked": true
|
|
5327
5366
|
};
|
|
5328
5367
|
var LIVE_EVENT_TYPES = Object.keys(LIVE_EVENT_TYPE_REGISTRY);
|
|
@@ -5388,6 +5427,13 @@ var RECORD_LIVE_SNAPSHOT_KEYS = [
|
|
|
5388
5427
|
"lastUpdatedBy",
|
|
5389
5428
|
"schemaVersion"
|
|
5390
5429
|
];
|
|
5430
|
+
var NOTIFICATION_INBOX_ARCHIVED_PAYLOAD_KEYS = [
|
|
5431
|
+
"type",
|
|
5432
|
+
"targetActorId",
|
|
5433
|
+
"archivedCount",
|
|
5434
|
+
"version",
|
|
5435
|
+
"updatedAt"
|
|
5436
|
+
];
|
|
5391
5437
|
function isLiveEventType(value) {
|
|
5392
5438
|
return typeof value === "string" && LIVE_EVENT_TYPES.includes(value);
|
|
5393
5439
|
}
|
|
@@ -5422,6 +5468,8 @@ function isLiveEventPayloadForType(type, payload) {
|
|
|
5422
5468
|
return isNotificationRecipientPatchPayload(payload);
|
|
5423
5469
|
case "notification.count.patch":
|
|
5424
5470
|
return isNotificationCountPatchPayload(payload);
|
|
5471
|
+
case "notification.inbox.archived":
|
|
5472
|
+
return isNotificationInboxArchivedPayload(payload);
|
|
5425
5473
|
case "conversation.renamed":
|
|
5426
5474
|
return isConversationRenamedPayload(payload);
|
|
5427
5475
|
case "browser.preview.updated":
|
|
@@ -5432,6 +5480,8 @@ function isLiveEventPayloadForType(type, payload) {
|
|
|
5432
5480
|
return isReflexRunCompletedPayload(payload);
|
|
5433
5481
|
case "reflex.authoring.progress":
|
|
5434
5482
|
return isReflexAuthoringProgressPayload(payload);
|
|
5483
|
+
case "architect.draft.updated":
|
|
5484
|
+
return isArchitectDraftUpdatedPayload(payload);
|
|
5435
5485
|
case "channel.revoked":
|
|
5436
5486
|
return isChannelRevokedPayload(payload);
|
|
5437
5487
|
default:
|
|
@@ -5557,6 +5607,9 @@ function isNotificationRecipientPatchPayload(payload) {
|
|
|
5557
5607
|
function isNotificationCountPatchPayload(payload) {
|
|
5558
5608
|
return payload.type === "notification.count.patch" && hasString(payload, "targetActorId") && hasVersion(payload, "unread") && hasVersion(payload, "pendingWork") && hasVersion(payload, "version") && hasIsoDateString(payload, "updatedAt");
|
|
5559
5609
|
}
|
|
5610
|
+
function isNotificationInboxArchivedPayload(payload) {
|
|
5611
|
+
return payload.type === "notification.inbox.archived" && hasOnlyKeys(payload, NOTIFICATION_INBOX_ARCHIVED_PAYLOAD_KEYS) && hasNonEmptyString(payload, "targetActorId") && hasVersion(payload, "archivedCount") && hasVersion(payload, "version") && hasIsoDateString(payload, "updatedAt");
|
|
5612
|
+
}
|
|
5560
5613
|
function isConversationRenamedPayload(payload) {
|
|
5561
5614
|
return payload.type === "conversation.renamed" && hasString(payload, "sessionId") && hasString(payload, "title") && hasVersion(payload, "version") && hasString(payload, "updatedAt");
|
|
5562
5615
|
}
|
|
@@ -5576,6 +5629,20 @@ var REFLEX_SERVED_MODES = [
|
|
|
5576
5629
|
"promoted",
|
|
5577
5630
|
"lkg"
|
|
5578
5631
|
];
|
|
5632
|
+
var ARCHITECT_DRAFT_STATUSES = [
|
|
5633
|
+
"composing",
|
|
5634
|
+
"published",
|
|
5635
|
+
"discarded"
|
|
5636
|
+
];
|
|
5637
|
+
function isArchitectDraftUpdatedPayload(payload) {
|
|
5638
|
+
if (payload.type !== "architect.draft.updated" || !isRecord2(payload.draft)) {
|
|
5639
|
+
return false;
|
|
5640
|
+
}
|
|
5641
|
+
const draft = payload.draft;
|
|
5642
|
+
return hasNonEmptyString(draft, "id") && hasNonEmptyString(draft, "actorId") && isNullableString(draft.agentSessionId) && // Each operation was parsed by the registry before it was persisted; the
|
|
5643
|
+
// wire check stops at the shape realtime itself is responsible for.
|
|
5644
|
+
Array.isArray(draft.operations) && draft.operations.every(isRecord2) && isRecord2(draft.baselines) && isOneOf(draft.status, ARCHITECT_DRAFT_STATUSES);
|
|
5645
|
+
}
|
|
5579
5646
|
function isReflexStateChangedPayload(payload) {
|
|
5580
5647
|
return payload.type === "reflex.state.changed" && hasNonEmptyString(payload, "reflexId") && isOneOf(payload.state, REFLEX_STATES) && hasIsoDateString(payload, "updatedAt");
|
|
5581
5648
|
}
|
|
@@ -5746,7 +5813,7 @@ function assertAcyclicComputedDependencies(nodes) {
|
|
|
5746
5813
|
}
|
|
5747
5814
|
function parseCompileFormula(expression) {
|
|
5748
5815
|
try {
|
|
5749
|
-
return
|
|
5816
|
+
return chunkBOICAZHR_js.parseComputedFormula(expression);
|
|
5750
5817
|
} catch (error) {
|
|
5751
5818
|
if (error instanceof Error) {
|
|
5752
5819
|
throw new ComputedFormulaCompileError(error.message);
|
|
@@ -6515,9 +6582,9 @@ function evaluateCall(functionName, args) {
|
|
|
6515
6582
|
case "percent_not_empty":
|
|
6516
6583
|
return percentByEmptyState(args[0], false);
|
|
6517
6584
|
case "count_empty":
|
|
6518
|
-
return collectionItems(args[0]).filter(
|
|
6585
|
+
return collectionItems(args[0]).filter(chunkI3EYILYO_js.isNullishOrEmptyString).length;
|
|
6519
6586
|
case "count_not_empty":
|
|
6520
|
-
return collectionItems(args[0]).filter((item) => !
|
|
6587
|
+
return collectionItems(args[0]).filter((item) => !chunkI3EYILYO_js.isNullishOrEmptyString(item)).length;
|
|
6521
6588
|
case "count_unique":
|
|
6522
6589
|
return uniqueNonEmpty(collectionItems(args[0])).length;
|
|
6523
6590
|
default:
|
|
@@ -6578,14 +6645,14 @@ function percentByEmptyState(value, countEmpty) {
|
|
|
6578
6645
|
if (items.length === 0) {
|
|
6579
6646
|
return 0;
|
|
6580
6647
|
}
|
|
6581
|
-
const count = items.filter((item) =>
|
|
6648
|
+
const count = items.filter((item) => chunkI3EYILYO_js.isNullishOrEmptyString(item) === countEmpty).length;
|
|
6582
6649
|
return count / items.length;
|
|
6583
6650
|
}
|
|
6584
6651
|
function uniqueNonEmpty(values) {
|
|
6585
6652
|
const seen = /* @__PURE__ */ new Set();
|
|
6586
6653
|
const result = [];
|
|
6587
6654
|
for (const value of values) {
|
|
6588
|
-
if (
|
|
6655
|
+
if (chunkI3EYILYO_js.isNullishOrEmptyString(value)) {
|
|
6589
6656
|
continue;
|
|
6590
6657
|
}
|
|
6591
6658
|
const key = uniqueKey(value);
|
|
@@ -6702,11 +6769,11 @@ function evaluateComputedAst(node, input) {
|
|
|
6702
6769
|
return evaluateAst(node, input);
|
|
6703
6770
|
}
|
|
6704
6771
|
function evaluateComputedFormula(expression, input) {
|
|
6705
|
-
return evaluateAst(
|
|
6772
|
+
return evaluateAst(chunkBOICAZHR_js.parseComputedFormula(expression), input);
|
|
6706
6773
|
}
|
|
6707
6774
|
function evaluateComputedFormulaWithResult(expression, input, returnType, decimals) {
|
|
6708
6775
|
try {
|
|
6709
|
-
const raw = evaluateAst(
|
|
6776
|
+
const raw = evaluateAst(chunkBOICAZHR_js.parseComputedFormula(expression), input);
|
|
6710
6777
|
const value = returnType ? formatComputedResult(raw, returnType, decimals) : raw;
|
|
6711
6778
|
return { value };
|
|
6712
6779
|
} catch (error) {
|
|
@@ -6831,10 +6898,10 @@ var COMPUTED_FUNCTION_METADATA = [
|
|
|
6831
6898
|
];
|
|
6832
6899
|
|
|
6833
6900
|
// src/filters/operators.ts
|
|
6834
|
-
var isEmpty = (v) =>
|
|
6901
|
+
var isEmpty = (v) => chunkI3EYILYO_js.isNullishOrEmptyString(v) || Array.isArray(v) && v.length === 0;
|
|
6835
6902
|
var toStr = (v) => v == null ? "" : String(v);
|
|
6836
6903
|
var toNum = (v) => {
|
|
6837
|
-
if (
|
|
6904
|
+
if (chunkI3EYILYO_js.isNullishOrEmptyString(v)) return null;
|
|
6838
6905
|
const n = typeof v === "number" ? v : Number(v);
|
|
6839
6906
|
return Number.isFinite(n) ? n : null;
|
|
6840
6907
|
};
|
|
@@ -6967,7 +7034,7 @@ var OPERATOR_SPECS = {
|
|
|
6967
7034
|
appliesTo: ["date"],
|
|
6968
7035
|
evaluateInMemory: (v, rv) => {
|
|
6969
7036
|
const d = toDate2(v);
|
|
6970
|
-
const bounds =
|
|
7037
|
+
const bounds = chunkYZ5RCMIQ_js.resolveIsWithinBounds(rv);
|
|
6971
7038
|
if (!(d && bounds)) return false;
|
|
6972
7039
|
return d.getTime() >= bounds.startMs && d.getTime() < bounds.endMs;
|
|
6973
7040
|
}
|
|
@@ -7003,7 +7070,7 @@ var OPERATOR_SPECS = {
|
|
|
7003
7070
|
// src/filters/evaluate.ts
|
|
7004
7071
|
var systemAttribute = (name, type) => ({ id: `system:${name}`, name, label: name, type, system: true });
|
|
7005
7072
|
var RECORD_SYSTEM_ATTRIBUTES = [
|
|
7006
|
-
...Object.entries(
|
|
7073
|
+
...Object.entries(chunkYZ5RCMIQ_js.SYSTEM_FILTER_ATTRIBUTE_TYPES).map(
|
|
7007
7074
|
([name, type]) => systemAttribute(name, type)
|
|
7008
7075
|
)
|
|
7009
7076
|
];
|
|
@@ -7044,7 +7111,7 @@ function evaluateRule(rule, values, attrByName) {
|
|
|
7044
7111
|
(definition) => definition.name === rule.property
|
|
7045
7112
|
);
|
|
7046
7113
|
if (!property) return false;
|
|
7047
|
-
const positiveOperator =
|
|
7114
|
+
const positiveOperator = chunkYZ5RCMIQ_js.normalizeForEdgeRpc(rule.operator);
|
|
7048
7115
|
const propertySpec = OPERATOR_SPECS[positiveOperator];
|
|
7049
7116
|
if (!propertySpec?.appliesTo.includes(property.type)) return false;
|
|
7050
7117
|
const rootValue = values[rule.attribute];
|
|
@@ -7062,7 +7129,7 @@ function evaluateRule(rule, values, attrByName) {
|
|
|
7062
7129
|
property
|
|
7063
7130
|
);
|
|
7064
7131
|
});
|
|
7065
|
-
return (rule.quantifier ??
|
|
7132
|
+
return (rule.quantifier ?? chunkYZ5RCMIQ_js.getOperatorPolarity(rule.operator)) === "none" ? !matches : matches;
|
|
7066
7133
|
}
|
|
7067
7134
|
const spec = OPERATOR_SPECS[rule.operator];
|
|
7068
7135
|
if (!spec) return false;
|
|
@@ -7111,7 +7178,7 @@ function normalizePhoneComparands(stored, rule) {
|
|
|
7111
7178
|
return [normalizeOne(stored), normalizeOne(rule)];
|
|
7112
7179
|
}
|
|
7113
7180
|
function normalizeComparableValue(type, value) {
|
|
7114
|
-
if (type === "currency") return
|
|
7181
|
+
if (type === "currency") return chunkYZ5RCMIQ_js.extractCurrencyFilterValue(value);
|
|
7115
7182
|
if (type === "date") {
|
|
7116
7183
|
if (isDateRangeValue(value)) return dateValueStart(value);
|
|
7117
7184
|
if (value instanceof Date) return Number.isNaN(value.getTime()) ? null : value.toISOString();
|
|
@@ -7220,10 +7287,10 @@ var attributeNameSchema = z2.z.string().min(1).superRefine((name, ctx) => {
|
|
|
7220
7287
|
'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).'
|
|
7221
7288
|
);
|
|
7222
7289
|
var objectNameSchema = z2.z.string().min(1).superRefine((name, ctx) => {
|
|
7223
|
-
if (
|
|
7290
|
+
if (chunkYZ5RCMIQ_js.RESERVED_OBJECT_NAMES.includes(name)) {
|
|
7224
7291
|
ctx.addIssue({
|
|
7225
7292
|
code: z2.z.ZodIssueCode.custom,
|
|
7226
|
-
message: `"${name}" is a reserved object name (${
|
|
7293
|
+
message: `"${name}" is a reserved object name (${chunkYZ5RCMIQ_js.RESERVED_OBJECT_NAMES.join(", ")}) and cannot be used for a new object.`
|
|
7227
7294
|
});
|
|
7228
7295
|
}
|
|
7229
7296
|
try {
|
|
@@ -7237,7 +7304,7 @@ var objectNameSchema = z2.z.string().min(1).superRefine((name, ctx) => {
|
|
|
7237
7304
|
function withConfigCheck(schema) {
|
|
7238
7305
|
return schema.superRefine((attribute, ctx) => {
|
|
7239
7306
|
try {
|
|
7240
|
-
const parsedConfig =
|
|
7307
|
+
const parsedConfig = chunkBOICAZHR_js.parseAttributeConfigForCreate(attribute.type, {
|
|
7241
7308
|
...attribute.config ?? {},
|
|
7242
7309
|
description: attribute.description
|
|
7243
7310
|
});
|
|
@@ -7253,7 +7320,7 @@ function withConfigCheck(schema) {
|
|
|
7253
7320
|
});
|
|
7254
7321
|
}
|
|
7255
7322
|
} catch (error) {
|
|
7256
|
-
if (error instanceof
|
|
7323
|
+
if (error instanceof chunkV26R64A4_js.ValidationError) {
|
|
7257
7324
|
for (const issue of error.errors) {
|
|
7258
7325
|
ctx.addIssue({
|
|
7259
7326
|
code: z2.z.ZodIssueCode.custom,
|
|
@@ -7300,7 +7367,7 @@ var plannedObjectSchema = z2.z.object({
|
|
|
7300
7367
|
'Human-readable plural display label (e.g. "Devis"/"Invoices"). Defaults from `label` if omitted.'
|
|
7301
7368
|
),
|
|
7302
7369
|
description: z2.z.string().optional().describe("Help text describing what this object represents."),
|
|
7303
|
-
icon:
|
|
7370
|
+
icon: chunkBOICAZHR_js.iconNameSchema.describe(
|
|
7304
7371
|
"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."
|
|
7305
7372
|
),
|
|
7306
7373
|
labelExpression: labelExpressionSchema.describe(
|
|
@@ -7358,13 +7425,13 @@ var proposedDefaultViewTargetSchema = z2.z.discriminatedUnion("viewType", [
|
|
|
7358
7425
|
z2.z.object({
|
|
7359
7426
|
objectName: viewTargetObjectNameSchema,
|
|
7360
7427
|
viewType: z2.z.literal("list").describe("Targets the object's default list view (the grid)."),
|
|
7361
|
-
canonicalConfig:
|
|
7428
|
+
canonicalConfig: chunkYZ5RCMIQ_js.listViewConfigSchema.describe(CANONICAL_CONFIG_DESCRIPTION),
|
|
7362
7429
|
baselineToken: z2.z.string().min(1).optional().describe(BASELINE_TOKEN_DESCRIPTION)
|
|
7363
7430
|
}).strict(),
|
|
7364
7431
|
z2.z.object({
|
|
7365
7432
|
objectName: viewTargetObjectNameSchema,
|
|
7366
7433
|
viewType: z2.z.literal("detail").describe("Targets the object's default detail view (the single-record view)."),
|
|
7367
|
-
canonicalConfig:
|
|
7434
|
+
canonicalConfig: chunkYZ5RCMIQ_js.detailViewConfigSchema.describe(CANONICAL_CONFIG_DESCRIPTION),
|
|
7368
7435
|
baselineToken: z2.z.string().min(1).optional().describe(BASELINE_TOKEN_DESCRIPTION)
|
|
7369
7436
|
}).strict()
|
|
7370
7437
|
]);
|
|
@@ -7378,13 +7445,13 @@ var persistedDefaultViewTargetSchema = z2.z.discriminatedUnion("viewType", [
|
|
|
7378
7445
|
z2.z.object({
|
|
7379
7446
|
objectName: z2.z.string().min(1),
|
|
7380
7447
|
viewType: z2.z.literal("list"),
|
|
7381
|
-
canonicalConfig:
|
|
7448
|
+
canonicalConfig: chunkYZ5RCMIQ_js.listViewConfigSchema,
|
|
7382
7449
|
...persistedBaselineFields
|
|
7383
7450
|
}).strict(),
|
|
7384
7451
|
z2.z.object({
|
|
7385
7452
|
objectName: z2.z.string().min(1),
|
|
7386
7453
|
viewType: z2.z.literal("detail"),
|
|
7387
|
-
canonicalConfig:
|
|
7454
|
+
canonicalConfig: chunkYZ5RCMIQ_js.detailViewConfigSchema,
|
|
7388
7455
|
...persistedBaselineFields
|
|
7389
7456
|
}).strict()
|
|
7390
7457
|
]).superRefine((target, ctx) => {
|
|
@@ -7531,7 +7598,7 @@ function boundSerializedPlanInput(input, ctx) {
|
|
|
7531
7598
|
});
|
|
7532
7599
|
return z2.z.NEVER;
|
|
7533
7600
|
}
|
|
7534
|
-
const serializedBytes = new TextEncoder().encode(
|
|
7601
|
+
const serializedBytes = new TextEncoder().encode(chunkK6ET4CXP_js.canonicalStringify(input)).byteLength;
|
|
7535
7602
|
if (serializedBytes > SCHEMA_PLAN_LIMITS.serializedBytes) {
|
|
7536
7603
|
ctx.addIssue({
|
|
7537
7604
|
code: "too_big",
|
|
@@ -7590,16 +7657,248 @@ var persistedSchemaPlanSchema = z2.z.preprocess(
|
|
|
7590
7657
|
boundSerializedPlanInput,
|
|
7591
7658
|
structuralPersistedSchemaPlanSchema
|
|
7592
7659
|
);
|
|
7660
|
+
var nonNegativeNumberSchema = z2.z.number().finite().nonnegative();
|
|
7661
|
+
var toolImpactSchema = z2.z.object({
|
|
7662
|
+
label: z2.z.string(),
|
|
7663
|
+
denied: z2.z.boolean().optional(),
|
|
7664
|
+
deletion: z2.z.object({
|
|
7665
|
+
target: z2.z.string().optional(),
|
|
7666
|
+
count: nonNegativeNumberSchema.optional(),
|
|
7667
|
+
restorableDays: nonNegativeNumberSchema.optional()
|
|
7668
|
+
}).strict().optional(),
|
|
7669
|
+
counts: z2.z.record(z2.z.string(), nonNegativeNumberSchema).optional(),
|
|
7670
|
+
warnings: z2.z.array(z2.z.string()).optional()
|
|
7671
|
+
}).strict();
|
|
7672
|
+
var agentMessagePartSchema = z2.z.union([
|
|
7673
|
+
z2.z.object({ type: z2.z.literal("text"), text: z2.z.string() }).strict(),
|
|
7674
|
+
z2.z.object({ type: z2.z.literal("reasoning"), text: z2.z.string() }).strict(),
|
|
7675
|
+
z2.z.object({ type: z2.z.literal("error"), error: z2.z.string(), errorClass: z2.z.string().optional() }).strict(),
|
|
7676
|
+
z2.z.object({
|
|
7677
|
+
type: z2.z.literal("tool"),
|
|
7678
|
+
toolCallId: z2.z.string(),
|
|
7679
|
+
name: z2.z.string(),
|
|
7680
|
+
args: z2.z.record(z2.z.string(), z2.z.unknown()),
|
|
7681
|
+
result: z2.z.unknown().optional(),
|
|
7682
|
+
error: z2.z.string().optional(),
|
|
7683
|
+
errorCode: z2.z.enum(["output_limit_reached", "interrupted"]).optional(),
|
|
7684
|
+
state: z2.z.enum([
|
|
7685
|
+
"streaming",
|
|
7686
|
+
"running",
|
|
7687
|
+
"completed",
|
|
7688
|
+
"error",
|
|
7689
|
+
"approval-requested",
|
|
7690
|
+
"approval-responded",
|
|
7691
|
+
"approval-dispatched"
|
|
7692
|
+
]),
|
|
7693
|
+
durationMs: nonNegativeNumberSchema.optional(),
|
|
7694
|
+
approvalId: z2.z.string().optional(),
|
|
7695
|
+
approvalImpact: toolImpactSchema.optional(),
|
|
7696
|
+
approved: z2.z.boolean().optional(),
|
|
7697
|
+
approvalReason: z2.z.string().optional(),
|
|
7698
|
+
approvalRelaxableByAuto: z2.z.boolean().optional()
|
|
7699
|
+
}).strict(),
|
|
7700
|
+
z2.z.object({
|
|
7701
|
+
type: z2.z.literal("file"),
|
|
7702
|
+
fileId: z2.z.string(),
|
|
7703
|
+
name: z2.z.string(),
|
|
7704
|
+
mimeType: z2.z.string()
|
|
7705
|
+
}).strict(),
|
|
7706
|
+
z2.z.object({
|
|
7707
|
+
type: z2.z.literal("compaction"),
|
|
7708
|
+
state: z2.z.literal("in-progress"),
|
|
7709
|
+
reason: z2.z.enum(["preflight_threshold", "overflow_recovery"]),
|
|
7710
|
+
estimatedTokens: nonNegativeNumberSchema.optional(),
|
|
7711
|
+
reportedTokens: nonNegativeNumberSchema.optional()
|
|
7712
|
+
}).strict(),
|
|
7713
|
+
z2.z.object({
|
|
7714
|
+
type: z2.z.literal("compaction"),
|
|
7715
|
+
state: z2.z.literal("completed"),
|
|
7716
|
+
tokensBefore: nonNegativeNumberSchema,
|
|
7717
|
+
tokensAfter: nonNegativeNumberSchema,
|
|
7718
|
+
tokensSaved: nonNegativeNumberSchema,
|
|
7719
|
+
strategy: z2.z.enum(["no-op", "summary", "truncation"]),
|
|
7720
|
+
durationMs: nonNegativeNumberSchema,
|
|
7721
|
+
summary: z2.z.string().optional()
|
|
7722
|
+
}).strict(),
|
|
7723
|
+
z2.z.object({
|
|
7724
|
+
type: z2.z.literal("compaction"),
|
|
7725
|
+
state: z2.z.literal("failed"),
|
|
7726
|
+
reason: z2.z.string(),
|
|
7727
|
+
durationMs: nonNegativeNumberSchema.optional()
|
|
7728
|
+
}).strict()
|
|
7729
|
+
]);
|
|
7730
|
+
var agentMessageAttachmentSchema = z2.z.object({
|
|
7731
|
+
id: z2.z.string(),
|
|
7732
|
+
name: z2.z.string(),
|
|
7733
|
+
mimeType: z2.z.string(),
|
|
7734
|
+
size: nonNegativeNumberSchema
|
|
7735
|
+
}).strict();
|
|
7736
|
+
var mentionReferenceSchema = z2.z.object({
|
|
7737
|
+
id: z2.z.string(),
|
|
7738
|
+
// `MentionEntityType` is `"user" | "record" | (string & {})`, which accepts
|
|
7739
|
+
// exactly what `string` accepts but is not `Equal` to it, so a bare
|
|
7740
|
+
// `z.string()` fails this file's drift guard. The identity transform types
|
|
7741
|
+
// the output without touching validation: `z.string()` still runs first, so
|
|
7742
|
+
// a non-string is still rejected as `invalid_type` with the same message and
|
|
7743
|
+
// path — which matters, because `agentUIValidationError` copies the issue
|
|
7744
|
+
// code into the ValidationError it throws.
|
|
7745
|
+
type: z2.z.string().transform((value) => value),
|
|
7746
|
+
entityId: z2.z.string(),
|
|
7747
|
+
label: z2.z.string(),
|
|
7748
|
+
objectName: z2.z.string().optional(),
|
|
7749
|
+
startIndex: nonNegativeNumberSchema,
|
|
7750
|
+
endIndex: nonNegativeNumberSchema
|
|
7751
|
+
}).strict();
|
|
7752
|
+
var modelDefinitionSchema = z2.z.object({
|
|
7753
|
+
provider: z2.z.enum(["anthropic", "openai", "google", "mistral"]),
|
|
7754
|
+
model: z2.z.string(),
|
|
7755
|
+
maxTokens: nonNegativeNumberSchema.optional(),
|
|
7756
|
+
contextWindow: nonNegativeNumberSchema.optional()
|
|
7757
|
+
}).strict();
|
|
7758
|
+
var durableDateSchema = z2.z.union([
|
|
7759
|
+
z2.z.date(),
|
|
7760
|
+
z2.z.string().datetime({ offset: true }).transform((value) => new Date(value))
|
|
7761
|
+
]);
|
|
7762
|
+
var agentSessionMessageSchema = z2.z.object({
|
|
7763
|
+
id: z2.z.string(),
|
|
7764
|
+
sessionId: z2.z.string(),
|
|
7765
|
+
tenantId: z2.z.string().optional(),
|
|
7766
|
+
runId: z2.z.string().optional(),
|
|
7767
|
+
role: z2.z.enum(["user", "assistant", "system", "tool"]),
|
|
7768
|
+
parts: z2.z.array(agentMessagePartSchema),
|
|
7769
|
+
attachments: z2.z.array(agentMessageAttachmentSchema).optional(),
|
|
7770
|
+
mentions: z2.z.array(mentionReferenceSchema).optional(),
|
|
7771
|
+
model: modelDefinitionSchema.optional(),
|
|
7772
|
+
tokenUsage: z2.z.object({ input: nonNegativeNumberSchema, output: nonNegativeNumberSchema }).strict().optional(),
|
|
7773
|
+
metadata: z2.z.record(z2.z.string(), z2.z.unknown()).optional(),
|
|
7774
|
+
createdAt: durableDateSchema
|
|
7775
|
+
}).strict();
|
|
7776
|
+
var todoItemSchema = z2.z.object({
|
|
7777
|
+
id: z2.z.string(),
|
|
7778
|
+
description: z2.z.string(),
|
|
7779
|
+
status: z2.z.enum(["pending", "in_progress", "completed", "blocked"]),
|
|
7780
|
+
result: z2.z.string().optional(),
|
|
7781
|
+
updatedAt: nonNegativeNumberSchema.optional()
|
|
7782
|
+
}).strict();
|
|
7783
|
+
var todoPlanSchema = z2.z.object({
|
|
7784
|
+
id: z2.z.string(),
|
|
7785
|
+
sessionId: z2.z.string(),
|
|
7786
|
+
status: z2.z.enum(["active", "completed", "abandoned"]),
|
|
7787
|
+
todos: z2.z.array(todoItemSchema),
|
|
7788
|
+
version: nonNegativeNumberSchema,
|
|
7789
|
+
createdAt: z2.z.string(),
|
|
7790
|
+
updatedAt: z2.z.string(),
|
|
7791
|
+
completedAt: z2.z.string().optional()
|
|
7792
|
+
}).strict();
|
|
7793
|
+
var customDataChunkSchemas = {
|
|
7794
|
+
"session-named": z2.z.object({ name: z2.z.string() }).strict(),
|
|
7795
|
+
"compaction-start": z2.z.object({
|
|
7796
|
+
reason: z2.z.enum(["preflight_threshold", "overflow_recovery"]),
|
|
7797
|
+
estimatedTokens: nonNegativeNumberSchema.optional(),
|
|
7798
|
+
reportedTokens: nonNegativeNumberSchema.optional()
|
|
7799
|
+
}).strict(),
|
|
7800
|
+
"compaction-end": z2.z.object({
|
|
7801
|
+
tokensBefore: nonNegativeNumberSchema,
|
|
7802
|
+
tokensAfter: nonNegativeNumberSchema,
|
|
7803
|
+
tokensSaved: nonNegativeNumberSchema,
|
|
7804
|
+
strategy: z2.z.enum(["no-op", "summary", "truncation"]),
|
|
7805
|
+
durationMs: nonNegativeNumberSchema,
|
|
7806
|
+
summary: z2.z.string().optional()
|
|
7807
|
+
}).strict(),
|
|
7808
|
+
"compaction-failed": z2.z.object({ reason: z2.z.string() }).strict(),
|
|
7809
|
+
usage: z2.z.object({
|
|
7810
|
+
inputTokens: nonNegativeNumberSchema,
|
|
7811
|
+
outputTokens: nonNegativeNumberSchema,
|
|
7812
|
+
totalTokens: nonNegativeNumberSchema,
|
|
7813
|
+
cacheReadTokens: nonNegativeNumberSchema.optional(),
|
|
7814
|
+
cacheCreationTokens: nonNegativeNumberSchema.optional(),
|
|
7815
|
+
contextWindow: nonNegativeNumberSchema,
|
|
7816
|
+
residentTokens: nonNegativeNumberSchema,
|
|
7817
|
+
utilization: z2.z.number().finite().min(0).max(1),
|
|
7818
|
+
costUsd: nonNegativeNumberSchema.optional()
|
|
7819
|
+
}).strict(),
|
|
7820
|
+
"message-persisted": z2.z.object({ message: agentSessionMessageSchema }).strict(),
|
|
7821
|
+
"message-updated": z2.z.object({ message: agentSessionMessageSchema }).strict(),
|
|
7822
|
+
"todo-plan-update": z2.z.object({ plan: todoPlanSchema }).strict(),
|
|
7823
|
+
"approval-context": z2.z.object({
|
|
7824
|
+
approvalId: z2.z.string(),
|
|
7825
|
+
toolCallId: z2.z.string(),
|
|
7826
|
+
impact: toolImpactSchema.optional(),
|
|
7827
|
+
relaxableByAuto: z2.z.boolean().optional()
|
|
7828
|
+
}).strict()
|
|
7829
|
+
};
|
|
7830
|
+
function isAgentUIDataName(value) {
|
|
7831
|
+
return value in customDataChunkSchemas;
|
|
7832
|
+
}
|
|
7833
|
+
function agentUIValidationError(issues) {
|
|
7834
|
+
return new chunkV26R64A4_js.ValidationError(
|
|
7835
|
+
"Invalid agent UI message chunk",
|
|
7836
|
+
issues.map((issue) => ({
|
|
7837
|
+
path: issue.path.map(String),
|
|
7838
|
+
message: issue.message,
|
|
7839
|
+
code: issue.code
|
|
7840
|
+
}))
|
|
7841
|
+
);
|
|
7842
|
+
}
|
|
7843
|
+
function assertCustomAgentUIMessageChunk(value) {
|
|
7844
|
+
if (typeof value !== "object" || value === null || typeof value.type !== "string") {
|
|
7845
|
+
throw new chunkV26R64A4_js.ValidationError("Invalid agent UI message chunk", [
|
|
7846
|
+
{ path: ["type"], message: "Expected UI message chunk type", code: "invalid_type" }
|
|
7847
|
+
]);
|
|
7848
|
+
}
|
|
7849
|
+
const type = value.type;
|
|
7850
|
+
if (!type.startsWith("data-")) {
|
|
7851
|
+
throw new chunkV26R64A4_js.ValidationError("Invalid agent UI message chunk", [
|
|
7852
|
+
{ path: ["type"], message: "Expected agent data chunk type", code: "invalid_value" }
|
|
7853
|
+
]);
|
|
7854
|
+
}
|
|
7855
|
+
const name = type.slice("data-".length);
|
|
7856
|
+
if (!isAgentUIDataName(name)) {
|
|
7857
|
+
throw new chunkV26R64A4_js.ValidationError("Invalid agent UI message chunk", [
|
|
7858
|
+
{ path: ["type"], message: `Unknown agent UI data type: ${name}`, code: "invalid_value" }
|
|
7859
|
+
]);
|
|
7860
|
+
}
|
|
7861
|
+
const chunkResult = z2.z.object({
|
|
7862
|
+
type: z2.z.literal(`data-${name}`),
|
|
7863
|
+
id: z2.z.string().optional(),
|
|
7864
|
+
data: customDataChunkSchemas[name],
|
|
7865
|
+
transient: z2.z.boolean().optional()
|
|
7866
|
+
}).strict().safeParse(value);
|
|
7867
|
+
if (!chunkResult.success) throw agentUIValidationError(chunkResult.error.issues);
|
|
7868
|
+
return chunkResult.data;
|
|
7869
|
+
}
|
|
7870
|
+
function agentDataChunk(name, data, options) {
|
|
7871
|
+
return assertCustomAgentUIMessageChunk({
|
|
7872
|
+
type: `data-${name}`,
|
|
7873
|
+
...options?.id !== void 0 ? { id: options.id } : {},
|
|
7874
|
+
data,
|
|
7875
|
+
...options?.transient !== void 0 ? { transient: options.transient } : {}
|
|
7876
|
+
});
|
|
7877
|
+
}
|
|
7593
7878
|
|
|
7594
7879
|
// src/architect/define-operation.ts
|
|
7595
7880
|
function defineOperation(def) {
|
|
7596
7881
|
return def;
|
|
7597
7882
|
}
|
|
7883
|
+
function definePresentation(focus, impact, propertyPath) {
|
|
7884
|
+
const navigation = impact === "atomic" ? "none" : impact === "local" ? "if-not-visible" : "follow";
|
|
7885
|
+
return (op) => {
|
|
7886
|
+
const path = propertyPath?.(op);
|
|
7887
|
+
return {
|
|
7888
|
+
impact,
|
|
7889
|
+
navigation,
|
|
7890
|
+
focus: {
|
|
7891
|
+
...focus(op),
|
|
7892
|
+
...path === void 0 ? {} : { propertyPath: path }
|
|
7893
|
+
}
|
|
7894
|
+
};
|
|
7895
|
+
};
|
|
7896
|
+
}
|
|
7598
7897
|
var operationBase = { id: z2.z.string().min(1) };
|
|
7599
7898
|
var viewOperationBase = { ...operationBase, viewId: z2.z.string().min(1) };
|
|
7600
7899
|
function mapView(state, viewId, fn) {
|
|
7601
7900
|
if (!state.views.some((v) => v.id === viewId)) {
|
|
7602
|
-
throw new
|
|
7901
|
+
throw new chunkV26R64A4_js.ValidationError(`View "${viewId}" is not in the draftable state`, []);
|
|
7603
7902
|
}
|
|
7604
7903
|
return { ...state, views: state.views.map((v) => v.id === viewId ? fn(v) : v) };
|
|
7605
7904
|
}
|
|
@@ -7611,14 +7910,14 @@ function moveWithin(items, from, toIndex) {
|
|
|
7611
7910
|
}
|
|
7612
7911
|
function reorderById(items, order, what) {
|
|
7613
7912
|
if (order.length !== items.length) {
|
|
7614
|
-
throw new
|
|
7913
|
+
throw new chunkV26R64A4_js.ValidationError(
|
|
7615
7914
|
`${what} order lists ${order.length} ids for ${items.length} items`,
|
|
7616
7915
|
[]
|
|
7617
7916
|
);
|
|
7618
7917
|
}
|
|
7619
7918
|
return order.map((id) => {
|
|
7620
7919
|
const found = items.find((item) => item.id === id);
|
|
7621
|
-
if (!found) throw new
|
|
7920
|
+
if (!found) throw new chunkV26R64A4_js.ValidationError(`${what} "${id}" is not in this collection`, []);
|
|
7622
7921
|
return found;
|
|
7623
7922
|
});
|
|
7624
7923
|
}
|
|
@@ -7626,15 +7925,15 @@ function reorderById(items, order, what) {
|
|
|
7626
7925
|
// src/architect/operations/detail-view.ts
|
|
7627
7926
|
function mapFormTab(view, tabId, fn) {
|
|
7628
7927
|
const found = view.tabs.find((t) => t.id === tabId);
|
|
7629
|
-
if (!found) throw new
|
|
7928
|
+
if (!found) throw new chunkV26R64A4_js.ValidationError(`Tab "${tabId}" is not in view "${view.id}"`, []);
|
|
7630
7929
|
if (found.type !== "form") {
|
|
7631
|
-
throw new
|
|
7930
|
+
throw new chunkV26R64A4_js.ValidationError(`Tab "${tabId}" is not a form tab`, []);
|
|
7632
7931
|
}
|
|
7633
7932
|
return { ...view, tabs: view.tabs.map((t) => t.id === tabId ? fn(found) : t) };
|
|
7634
7933
|
}
|
|
7635
7934
|
function requireGroup(tab, groupId) {
|
|
7636
7935
|
const found = tab.groups.find((g) => g.id === groupId);
|
|
7637
|
-
if (!found) throw new
|
|
7936
|
+
if (!found) throw new chunkV26R64A4_js.ValidationError(`Group "${groupId}" is not in tab "${tab.id}"`, []);
|
|
7638
7937
|
return found;
|
|
7639
7938
|
}
|
|
7640
7939
|
function locateField(tab, fieldId) {
|
|
@@ -7642,20 +7941,49 @@ function locateField(tab, fieldId) {
|
|
|
7642
7941
|
const field = group2.fields.find((f) => f.id === fieldId);
|
|
7643
7942
|
if (field) return { group: group2, field };
|
|
7644
7943
|
}
|
|
7645
|
-
throw new
|
|
7944
|
+
throw new chunkV26R64A4_js.ValidationError(`Field slot "${fieldId}" is not in tab "${tab.id}"`, []);
|
|
7646
7945
|
}
|
|
7647
|
-
|
|
7648
|
-
|
|
7649
|
-
|
|
7650
|
-
)
|
|
7651
|
-
|
|
7652
|
-
|
|
7653
|
-
|
|
7654
|
-
|
|
7655
|
-
|
|
7656
|
-
|
|
7657
|
-
{
|
|
7658
|
-
|
|
7946
|
+
function viewFocus(op) {
|
|
7947
|
+
return { viewId: op.viewId };
|
|
7948
|
+
}
|
|
7949
|
+
function tabFocus(op) {
|
|
7950
|
+
return { viewId: op.viewId, tabId: op.tabId };
|
|
7951
|
+
}
|
|
7952
|
+
function groupFocus(op) {
|
|
7953
|
+
return { viewId: op.viewId, tabId: op.tabId, groupId: op.groupId };
|
|
7954
|
+
}
|
|
7955
|
+
function fieldFocus(op) {
|
|
7956
|
+
return { viewId: op.viewId, tabId: op.tabId, fieldId: op.fieldId };
|
|
7957
|
+
}
|
|
7958
|
+
function addTabFocus(op) {
|
|
7959
|
+
return { viewId: op.viewId, tabId: op.tab.id };
|
|
7960
|
+
}
|
|
7961
|
+
function addGroupFocus(op) {
|
|
7962
|
+
return { viewId: op.viewId, tabId: op.tabId, groupId: op.group.id };
|
|
7963
|
+
}
|
|
7964
|
+
function addFieldFocus(op) {
|
|
7965
|
+
return {
|
|
7966
|
+
viewId: op.viewId,
|
|
7967
|
+
tabId: op.tabId,
|
|
7968
|
+
groupId: op.groupId,
|
|
7969
|
+
fieldId: op.field.id
|
|
7970
|
+
};
|
|
7971
|
+
}
|
|
7972
|
+
function moveFieldFocus(op) {
|
|
7973
|
+
return {
|
|
7974
|
+
viewId: op.viewId,
|
|
7975
|
+
tabId: op.tabId,
|
|
7976
|
+
groupId: op.toGroupId,
|
|
7977
|
+
fieldId: op.fieldId
|
|
7978
|
+
};
|
|
7979
|
+
}
|
|
7980
|
+
function firstChangedProperty(op) {
|
|
7981
|
+
const keys = Object.keys(op.changes).sort();
|
|
7982
|
+
return keys.length === 1 ? [keys[0]] : void 0;
|
|
7983
|
+
}
|
|
7984
|
+
var tabPayload = chunkYZ5RCMIQ_js.detailTabDraftSchema;
|
|
7985
|
+
var groupPayload = chunkYZ5RCMIQ_js.groupWriteSchema;
|
|
7986
|
+
var fieldPayload = chunkYZ5RCMIQ_js.fieldSlotSchema;
|
|
7659
7987
|
var addTabSchema = z2.z.object({
|
|
7660
7988
|
...viewOperationBase,
|
|
7661
7989
|
type: z2.z.literal("add_tab"),
|
|
@@ -7666,11 +7994,12 @@ var addTab = defineOperation({
|
|
|
7666
7994
|
schema: addTabSchema,
|
|
7667
7995
|
apply: (state, op) => mapView(state, op.viewId, (view) => {
|
|
7668
7996
|
if (view.tabs.some((t) => t.id === op.tab.id)) {
|
|
7669
|
-
throw new
|
|
7997
|
+
throw new chunkV26R64A4_js.ValidationError(`Tab "${op.tab.id}" already exists in view "${op.viewId}"`, []);
|
|
7670
7998
|
}
|
|
7671
7999
|
return { ...view, tabs: [...view.tabs, op.tab] };
|
|
7672
8000
|
}),
|
|
7673
|
-
focus:
|
|
8001
|
+
focus: addTabFocus,
|
|
8002
|
+
presentation: definePresentation(addTabFocus, "local"),
|
|
7674
8003
|
describe: (op) => `Ajoute l'onglet \xAB ${op.tab.label} \xBB`
|
|
7675
8004
|
});
|
|
7676
8005
|
var removeTabSchema = z2.z.object({
|
|
@@ -7683,36 +8012,49 @@ var removeTab = defineOperation({
|
|
|
7683
8012
|
schema: removeTabSchema,
|
|
7684
8013
|
apply: (state, op) => mapView(state, op.viewId, (view) => {
|
|
7685
8014
|
if (!view.tabs.some((t) => t.id === op.tabId)) {
|
|
7686
|
-
throw new
|
|
8015
|
+
throw new chunkV26R64A4_js.ValidationError(`Tab "${op.tabId}" is not in view "${op.viewId}"`, []);
|
|
7687
8016
|
}
|
|
7688
8017
|
return { ...view, tabs: view.tabs.filter((t) => t.id !== op.tabId) };
|
|
7689
8018
|
}),
|
|
7690
|
-
focus:
|
|
8019
|
+
focus: tabFocus,
|
|
8020
|
+
presentation: definePresentation(tabFocus, "local"),
|
|
7691
8021
|
describe: (op) => `Supprime l'onglet ${op.tabId}`
|
|
7692
8022
|
});
|
|
8023
|
+
var updateTabChanges = z2.z.object({
|
|
8024
|
+
label: z2.z.string().min(1).optional(),
|
|
8025
|
+
icon: chunkBOICAZHR_js.iconNameSchema.optional(),
|
|
8026
|
+
order: z2.z.number().int().optional()
|
|
8027
|
+
});
|
|
8028
|
+
var UPDATE_TAB_CHANGE_KEYS = Object.keys(
|
|
8029
|
+
updateTabChanges.shape
|
|
8030
|
+
);
|
|
7693
8031
|
var updateTabSchema = z2.z.object({
|
|
7694
8032
|
...viewOperationBase,
|
|
7695
8033
|
type: z2.z.literal("update_tab"),
|
|
7696
8034
|
tabId: z2.z.string().min(1),
|
|
7697
|
-
changes:
|
|
7698
|
-
|
|
7699
|
-
|
|
7700
|
-
|
|
7701
|
-
|
|
8035
|
+
changes: updateTabChanges.refine(
|
|
8036
|
+
(c) => Object.keys(c).length > 0,
|
|
8037
|
+
"update_tab needs at least one change"
|
|
8038
|
+
)
|
|
8039
|
+
});
|
|
8040
|
+
var updateTabFocus = (op) => ({
|
|
8041
|
+
viewId: op.viewId,
|
|
8042
|
+
tabId: op.tabId
|
|
7702
8043
|
});
|
|
7703
8044
|
var updateTab = defineOperation({
|
|
7704
8045
|
type: "update_tab",
|
|
7705
8046
|
schema: updateTabSchema,
|
|
7706
8047
|
apply: (state, op) => mapView(state, op.viewId, (view) => {
|
|
7707
8048
|
if (!view.tabs.some((t) => t.id === op.tabId)) {
|
|
7708
|
-
throw new
|
|
8049
|
+
throw new chunkV26R64A4_js.ValidationError(`Tab "${op.tabId}" is not in view "${op.viewId}"`, []);
|
|
7709
8050
|
}
|
|
7710
8051
|
return {
|
|
7711
8052
|
...view,
|
|
7712
8053
|
tabs: view.tabs.map((t) => t.id === op.tabId ? { ...t, ...op.changes } : t)
|
|
7713
8054
|
};
|
|
7714
8055
|
}),
|
|
7715
|
-
focus:
|
|
8056
|
+
focus: updateTabFocus,
|
|
8057
|
+
presentation: definePresentation(updateTabFocus, "atomic", firstChangedProperty),
|
|
7716
8058
|
describe: (op) => op.changes.label ? `Renomme l'onglet en \xAB ${op.changes.label} \xBB` : `Modifie l'onglet ${op.tabId}`
|
|
7717
8059
|
});
|
|
7718
8060
|
var reorderTabsSchema = z2.z.object({
|
|
@@ -7727,7 +8069,8 @@ var reorderTabs = defineOperation({
|
|
|
7727
8069
|
...view,
|
|
7728
8070
|
tabs: reorderById(view.tabs, op.tabOrder, "Tab")
|
|
7729
8071
|
})),
|
|
7730
|
-
focus:
|
|
8072
|
+
focus: viewFocus,
|
|
8073
|
+
presentation: definePresentation(viewFocus, "local"),
|
|
7731
8074
|
describe: () => "R\xE9ordonne les onglets"
|
|
7732
8075
|
});
|
|
7733
8076
|
var addGroupSchema = z2.z.object({
|
|
@@ -7744,7 +8087,7 @@ var addGroup = defineOperation({
|
|
|
7744
8087
|
op.viewId,
|
|
7745
8088
|
(view) => mapFormTab(view, op.tabId, (tab) => {
|
|
7746
8089
|
if (tab.groups.some((g) => g.id === op.group.id)) {
|
|
7747
|
-
throw new
|
|
8090
|
+
throw new chunkV26R64A4_js.ValidationError(
|
|
7748
8091
|
`Group "${op.group.id}" already exists in tab "${op.tabId}"`,
|
|
7749
8092
|
[]
|
|
7750
8093
|
);
|
|
@@ -7752,7 +8095,8 @@ var addGroup = defineOperation({
|
|
|
7752
8095
|
return { ...tab, groups: [...tab.groups, op.group] };
|
|
7753
8096
|
})
|
|
7754
8097
|
),
|
|
7755
|
-
focus:
|
|
8098
|
+
focus: addGroupFocus,
|
|
8099
|
+
presentation: definePresentation(addGroupFocus, "local"),
|
|
7756
8100
|
describe: (op) => `Ajoute le groupe \xAB ${op.group.label} \xBB`
|
|
7757
8101
|
});
|
|
7758
8102
|
var removeGroupSchema = z2.z.object({
|
|
@@ -7772,7 +8116,8 @@ var removeGroup = defineOperation({
|
|
|
7772
8116
|
return { ...tab, groups: tab.groups.filter((g) => g.id !== op.groupId) };
|
|
7773
8117
|
})
|
|
7774
8118
|
),
|
|
7775
|
-
focus:
|
|
8119
|
+
focus: groupFocus,
|
|
8120
|
+
presentation: definePresentation(groupFocus, "local"),
|
|
7776
8121
|
describe: (op) => `Supprime le groupe ${op.groupId}`
|
|
7777
8122
|
});
|
|
7778
8123
|
var updateGroupSchema = z2.z.object({
|
|
@@ -7788,6 +8133,11 @@ var updateGroupSchema = z2.z.object({
|
|
|
7788
8133
|
order: z2.z.number().int().optional()
|
|
7789
8134
|
}).refine((c) => Object.keys(c).length > 0, "update_group needs at least one change")
|
|
7790
8135
|
});
|
|
8136
|
+
var updateGroupFocus = (op) => ({
|
|
8137
|
+
viewId: op.viewId,
|
|
8138
|
+
tabId: op.tabId,
|
|
8139
|
+
groupId: op.groupId
|
|
8140
|
+
});
|
|
7791
8141
|
var updateGroup = defineOperation({
|
|
7792
8142
|
type: "update_group",
|
|
7793
8143
|
schema: updateGroupSchema,
|
|
@@ -7802,7 +8152,8 @@ var updateGroup = defineOperation({
|
|
|
7802
8152
|
};
|
|
7803
8153
|
})
|
|
7804
8154
|
),
|
|
7805
|
-
focus:
|
|
8155
|
+
focus: updateGroupFocus,
|
|
8156
|
+
presentation: definePresentation(updateGroupFocus, "atomic", firstChangedProperty),
|
|
7806
8157
|
describe: (op) => op.changes.label ? `Renomme le groupe en \xAB ${op.changes.label} \xBB` : "Modifie le groupe"
|
|
7807
8158
|
});
|
|
7808
8159
|
var reorderGroupsSchema = z2.z.object({
|
|
@@ -7822,7 +8173,8 @@ var reorderGroups = defineOperation({
|
|
|
7822
8173
|
groups: reorderById(tab.groups, op.groupOrder, "Group")
|
|
7823
8174
|
}))
|
|
7824
8175
|
),
|
|
7825
|
-
focus:
|
|
8176
|
+
focus: tabFocus,
|
|
8177
|
+
presentation: definePresentation(tabFocus, "local"),
|
|
7826
8178
|
describe: () => "R\xE9ordonne les groupes"
|
|
7827
8179
|
});
|
|
7828
8180
|
var addFieldSchema = z2.z.object({
|
|
@@ -7842,7 +8194,7 @@ var addField = defineOperation({
|
|
|
7842
8194
|
(view) => mapFormTab(view, op.tabId, (tab) => {
|
|
7843
8195
|
requireGroup(tab, op.groupId);
|
|
7844
8196
|
if (tab.groups.some((g) => g.fields.some((f) => f.id === op.field.id))) {
|
|
7845
|
-
throw new
|
|
8197
|
+
throw new chunkV26R64A4_js.ValidationError(
|
|
7846
8198
|
`Field slot "${op.field.id}" already exists in tab "${op.tabId}"`,
|
|
7847
8199
|
[]
|
|
7848
8200
|
);
|
|
@@ -7860,12 +8212,8 @@ var addField = defineOperation({
|
|
|
7860
8212
|
};
|
|
7861
8213
|
})
|
|
7862
8214
|
),
|
|
7863
|
-
focus:
|
|
7864
|
-
|
|
7865
|
-
tabId: op.tabId,
|
|
7866
|
-
groupId: op.groupId,
|
|
7867
|
-
fieldId: op.field.id
|
|
7868
|
-
}),
|
|
8215
|
+
focus: addFieldFocus,
|
|
8216
|
+
presentation: definePresentation(addFieldFocus, "local"),
|
|
7869
8217
|
describe: (op) => `Ajoute le champ ${op.field.attribute ?? op.field.id}`
|
|
7870
8218
|
});
|
|
7871
8219
|
var removeFieldSchema = z2.z.object({
|
|
@@ -7890,7 +8238,8 @@ var removeField = defineOperation({
|
|
|
7890
8238
|
};
|
|
7891
8239
|
})
|
|
7892
8240
|
),
|
|
7893
|
-
focus:
|
|
8241
|
+
focus: fieldFocus,
|
|
8242
|
+
presentation: definePresentation(fieldFocus, "local"),
|
|
7894
8243
|
describe: (op) => `Retire le champ ${op.fieldId}`
|
|
7895
8244
|
});
|
|
7896
8245
|
var moveFieldSchema = z2.z.object({
|
|
@@ -7940,12 +8289,8 @@ var moveField = defineOperation({
|
|
|
7940
8289
|
};
|
|
7941
8290
|
})
|
|
7942
8291
|
),
|
|
7943
|
-
focus:
|
|
7944
|
-
|
|
7945
|
-
tabId: op.tabId,
|
|
7946
|
-
groupId: op.toGroupId,
|
|
7947
|
-
fieldId: op.fieldId
|
|
7948
|
-
}),
|
|
8292
|
+
focus: moveFieldFocus,
|
|
8293
|
+
presentation: definePresentation(moveFieldFocus, "local"),
|
|
7949
8294
|
describe: (op) => `D\xE9place le champ ${op.fieldId} vers le groupe ${op.toGroupId}`
|
|
7950
8295
|
});
|
|
7951
8296
|
var updateFieldSchema = z2.z.object({
|
|
@@ -7959,6 +8304,11 @@ var updateFieldSchema = z2.z.object({
|
|
|
7959
8304
|
span: z2.z.number().int().min(1).max(12).optional()
|
|
7960
8305
|
}).refine((c) => Object.keys(c).length > 0, "update_field needs at least one change")
|
|
7961
8306
|
});
|
|
8307
|
+
var updateFieldFocus = (op) => ({
|
|
8308
|
+
viewId: op.viewId,
|
|
8309
|
+
tabId: op.tabId,
|
|
8310
|
+
fieldId: op.fieldId
|
|
8311
|
+
});
|
|
7962
8312
|
var updateField = defineOperation({
|
|
7963
8313
|
type: "update_field",
|
|
7964
8314
|
schema: updateFieldSchema,
|
|
@@ -7978,38 +8328,135 @@ var updateField = defineOperation({
|
|
|
7978
8328
|
};
|
|
7979
8329
|
})
|
|
7980
8330
|
),
|
|
7981
|
-
focus:
|
|
8331
|
+
focus: updateFieldFocus,
|
|
8332
|
+
presentation: definePresentation(updateFieldFocus, "atomic", firstChangedProperty),
|
|
7982
8333
|
describe: (op) => `Modifie le champ ${op.fieldId}`
|
|
7983
8334
|
});
|
|
8335
|
+
var updateTableTabChanges = z2.z.object({
|
|
8336
|
+
/**
|
|
8337
|
+
* Where the table reads its rows from — a `TableSource`, not a name: a
|
|
8338
|
+
* direct relation, or the inverse of one. Kept with `columns` on purpose:
|
|
8339
|
+
* the source picker posts `{ source, columns: [] }` as one gesture, and
|
|
8340
|
+
* splitting the pair across two operations would wipe the column list while
|
|
8341
|
+
* the source change vanished (#2763, #2787).
|
|
8342
|
+
*/
|
|
8343
|
+
source: chunkYZ5RCMIQ_js.tableSourceSchema.optional(),
|
|
8344
|
+
columns: chunkYZ5RCMIQ_js.columnsSchema.optional(),
|
|
8345
|
+
// Nullable, not merely optional: the panels clear a filter list or a sort
|
|
8346
|
+
// list by sending `null`, because `undefined` does not survive
|
|
8347
|
+
// `JSON.stringify` and the operation would arrive with no changes at all
|
|
8348
|
+
// (#2787). `apply` drops the key rather than storing the null.
|
|
8349
|
+
filters: chunkYZ5RCMIQ_js.filterStateSchema.nullable().optional(),
|
|
8350
|
+
sorts: chunkYZ5RCMIQ_js.sortsSchema.nullable().optional(),
|
|
8351
|
+
allowCreate: z2.z.boolean().optional(),
|
|
8352
|
+
allowEdit: z2.z.boolean().optional(),
|
|
8353
|
+
allowDelete: z2.z.boolean().optional(),
|
|
8354
|
+
createMode: z2.z.enum(["redirect", "inline", "peek"]).optional()
|
|
8355
|
+
});
|
|
8356
|
+
var UPDATE_TABLE_TAB_CHANGE_KEYS = Object.keys(
|
|
8357
|
+
updateTableTabChanges.shape
|
|
8358
|
+
);
|
|
8359
|
+
var updateTabConfigChanges = z2.z.object({
|
|
8360
|
+
/** Address attributes an emails/meetings tab reads. */
|
|
8361
|
+
emailAttributeIds: z2.z.array(z2.z.string().min(1)).optional(),
|
|
8362
|
+
/**
|
|
8363
|
+
* The attribute a richtext tab edits, and the one it titles itself with.
|
|
8364
|
+
* `titleAttribute` is nullable because "None" is a real choice — and null,
|
|
8365
|
+
* not undefined, because `JSON.stringify` drops undefined-valued keys and
|
|
8366
|
+
* the operation would arrive with no changes at all.
|
|
8367
|
+
*/
|
|
8368
|
+
attribute: z2.z.string().min(1).optional(),
|
|
8369
|
+
titleAttribute: z2.z.string().min(1).nullable().optional(),
|
|
8370
|
+
/**
|
|
8371
|
+
* The component a custom tab renders, and the props handed to it. Both are
|
|
8372
|
+
* clearable for the same reason: the name is emptied on blur and the props
|
|
8373
|
+
* textarea is emptied to mean "none".
|
|
8374
|
+
*/
|
|
8375
|
+
component: z2.z.string().nullable().optional(),
|
|
8376
|
+
props: z2.z.record(z2.z.string(), z2.z.unknown()).nullable().optional()
|
|
8377
|
+
});
|
|
8378
|
+
var UPDATE_TAB_CONFIG_CHANGE_KEYS = Object.keys(
|
|
8379
|
+
updateTabConfigChanges.shape
|
|
8380
|
+
);
|
|
8381
|
+
var TAB_CONFIG_FIELD_OWNERS = {
|
|
8382
|
+
emailAttributeIds: ["emails", "meetings"],
|
|
8383
|
+
attribute: ["richtext"],
|
|
8384
|
+
titleAttribute: ["richtext"],
|
|
8385
|
+
component: ["custom"],
|
|
8386
|
+
props: ["custom"]
|
|
8387
|
+
};
|
|
8388
|
+
var updateTabConfigSchema = z2.z.object({
|
|
8389
|
+
...viewOperationBase,
|
|
8390
|
+
type: z2.z.literal("update_tab_config"),
|
|
8391
|
+
tabId: z2.z.string().min(1),
|
|
8392
|
+
changes: updateTabConfigChanges.refine(
|
|
8393
|
+
(c) => Object.keys(c).length > 0,
|
|
8394
|
+
"update_tab_config needs at least one change"
|
|
8395
|
+
)
|
|
8396
|
+
});
|
|
8397
|
+
var updateTabConfigFocus = (op) => ({
|
|
8398
|
+
viewId: op.viewId,
|
|
8399
|
+
tabId: op.tabId
|
|
8400
|
+
});
|
|
8401
|
+
var updateTabConfig = defineOperation({
|
|
8402
|
+
type: "update_tab_config",
|
|
8403
|
+
schema: updateTabConfigSchema,
|
|
8404
|
+
apply: (state, op) => mapView(state, op.viewId, (view) => {
|
|
8405
|
+
const found = view.tabs.find((t) => t.id === op.tabId);
|
|
8406
|
+
if (!found) {
|
|
8407
|
+
throw new chunkV26R64A4_js.ValidationError(`Tab "${op.tabId}" is not in view "${view.id}"`, []);
|
|
8408
|
+
}
|
|
8409
|
+
for (const key of Object.keys(op.changes)) {
|
|
8410
|
+
const allowed = TAB_CONFIG_FIELD_OWNERS[key];
|
|
8411
|
+
if (allowed && !allowed.includes(found.type)) {
|
|
8412
|
+
throw new chunkV26R64A4_js.ValidationError(`"${key}" is not a setting of a "${found.type}" tab`, []);
|
|
8413
|
+
}
|
|
8414
|
+
}
|
|
8415
|
+
return {
|
|
8416
|
+
...view,
|
|
8417
|
+
tabs: view.tabs.map((t) => t.id === op.tabId ? { ...t, ...op.changes } : t)
|
|
8418
|
+
};
|
|
8419
|
+
}),
|
|
8420
|
+
focus: updateTabConfigFocus,
|
|
8421
|
+
presentation: definePresentation(updateTabConfigFocus, "atomic", firstChangedProperty),
|
|
8422
|
+
describe: (op) => `Configure ${Object.keys(op.changes).join(", ")} sur l'onglet ${op.tabId}`
|
|
8423
|
+
});
|
|
7984
8424
|
var updateTableTabSchema = z2.z.object({
|
|
7985
8425
|
...viewOperationBase,
|
|
7986
8426
|
type: z2.z.literal("update_table_tab"),
|
|
7987
8427
|
tabId: z2.z.string().min(1),
|
|
7988
|
-
changes:
|
|
7989
|
-
|
|
7990
|
-
|
|
7991
|
-
|
|
7992
|
-
|
|
7993
|
-
|
|
7994
|
-
|
|
7995
|
-
|
|
7996
|
-
}).refine((c) => Object.keys(c).length > 0, "update_table_tab needs at least one change")
|
|
8428
|
+
changes: updateTableTabChanges.refine(
|
|
8429
|
+
(c) => Object.keys(c).length > 0,
|
|
8430
|
+
"update_table_tab needs at least one change"
|
|
8431
|
+
)
|
|
8432
|
+
});
|
|
8433
|
+
var updateTableTabFocus = (op) => ({
|
|
8434
|
+
viewId: op.viewId,
|
|
8435
|
+
tabId: op.tabId
|
|
7997
8436
|
});
|
|
7998
8437
|
var updateTableTab = defineOperation({
|
|
7999
8438
|
type: "update_table_tab",
|
|
8000
8439
|
schema: updateTableTabSchema,
|
|
8001
8440
|
apply: (state, op) => mapView(state, op.viewId, (view) => {
|
|
8002
8441
|
const found = view.tabs.find((t) => t.id === op.tabId);
|
|
8003
|
-
if (!found) throw new
|
|
8442
|
+
if (!found) throw new chunkV26R64A4_js.ValidationError(`Tab "${op.tabId}" is not in view "${view.id}"`, []);
|
|
8004
8443
|
if (found.type !== "table") {
|
|
8005
|
-
throw new
|
|
8444
|
+
throw new chunkV26R64A4_js.ValidationError(`Tab "${op.tabId}" is not a table tab`, []);
|
|
8006
8445
|
}
|
|
8446
|
+
const entries = Object.entries(op.changes);
|
|
8447
|
+
const applied = Object.fromEntries(entries.filter(([, value]) => value !== null));
|
|
8448
|
+
const cleared = new Set(entries.filter(([, value]) => value === null).map(([key]) => key));
|
|
8007
8449
|
return {
|
|
8008
8450
|
...view,
|
|
8009
|
-
tabs: view.tabs.map(
|
|
8451
|
+
tabs: view.tabs.map(
|
|
8452
|
+
(t) => t.id === op.tabId ? Object.fromEntries(
|
|
8453
|
+
Object.entries({ ...t, ...applied }).filter(([key]) => !cleared.has(key))
|
|
8454
|
+
) : t
|
|
8455
|
+
)
|
|
8010
8456
|
};
|
|
8011
8457
|
}),
|
|
8012
|
-
focus:
|
|
8458
|
+
focus: updateTableTabFocus,
|
|
8459
|
+
presentation: definePresentation(updateTableTabFocus, "atomic", firstChangedProperty),
|
|
8013
8460
|
describe: (op) => op.changes.columns ? `Affiche ${op.changes.columns.length} colonne(s) dans l'onglet ${op.tabId}` : `Modifie l'onglet ${op.tabId}`
|
|
8014
8461
|
});
|
|
8015
8462
|
var setSidePanelSchema = z2.z.object({
|
|
@@ -8027,7 +8474,8 @@ var setSidePanel = defineOperation({
|
|
|
8027
8474
|
sidePanel: op.sidePanel ?? void 0
|
|
8028
8475
|
}
|
|
8029
8476
|
})),
|
|
8030
|
-
focus:
|
|
8477
|
+
focus: viewFocus,
|
|
8478
|
+
presentation: definePresentation(viewFocus, "atomic", () => ["config", "sidePanel"]),
|
|
8031
8479
|
describe: (op) => op.sidePanel ? "Active le panneau lat\xE9ral" : "Retire le panneau lat\xE9ral"
|
|
8032
8480
|
});
|
|
8033
8481
|
var DETAIL_VIEW_OPERATIONS = [
|
|
@@ -8044,29 +8492,67 @@ var DETAIL_VIEW_OPERATIONS = [
|
|
|
8044
8492
|
moveField,
|
|
8045
8493
|
updateField,
|
|
8046
8494
|
updateTableTab,
|
|
8495
|
+
updateTabConfig,
|
|
8047
8496
|
setSidePanel
|
|
8048
8497
|
];
|
|
8049
8498
|
var listTabBase = { ...viewOperationBase, tabId: z2.z.string().min(1) };
|
|
8499
|
+
function viewFocus2(op) {
|
|
8500
|
+
return { viewId: op.viewId };
|
|
8501
|
+
}
|
|
8502
|
+
function tabFocus2(op) {
|
|
8503
|
+
return { viewId: op.viewId, tabId: op.tabId };
|
|
8504
|
+
}
|
|
8505
|
+
function addTabFocus2(op) {
|
|
8506
|
+
return { viewId: op.viewId, tabId: op.tab.id };
|
|
8507
|
+
}
|
|
8508
|
+
function firstChangedProperty2(op) {
|
|
8509
|
+
const keys = Object.keys(op.changes).sort();
|
|
8510
|
+
return keys.length === 1 ? [keys[0]] : void 0;
|
|
8511
|
+
}
|
|
8512
|
+
function withoutKanbanKeys(tab) {
|
|
8513
|
+
const rest = { ...tab };
|
|
8514
|
+
for (const key of chunkYZ5RCMIQ_js.LIST_TAB_KANBAN_KEYS) delete rest[key];
|
|
8515
|
+
return rest;
|
|
8516
|
+
}
|
|
8517
|
+
function withoutTableKeys(tab) {
|
|
8518
|
+
const rest = { ...tab };
|
|
8519
|
+
for (const key of chunkYZ5RCMIQ_js.LIST_TAB_TABLE_KEYS) delete rest[key];
|
|
8520
|
+
return rest;
|
|
8521
|
+
}
|
|
8522
|
+
function assertStillPublishableTab(before, after, viewId, tabId) {
|
|
8523
|
+
const parsed = chunkYZ5RCMIQ_js.listViewTabSchema.safeParse(after);
|
|
8524
|
+
if (!parsed.success) {
|
|
8525
|
+
if (!chunkYZ5RCMIQ_js.listViewTabSchema.safeParse(before).success) return after;
|
|
8526
|
+
const detail = parsed.error.issues.map(
|
|
8527
|
+
(issue) => issue.path.length ? `${issue.path.join(".")}: ${issue.message}` : issue.message
|
|
8528
|
+
).join(", ");
|
|
8529
|
+
throw new chunkV26R64A4_js.ValidationError(
|
|
8530
|
+
`List tab "${tabId}" in view "${viewId}" would no longer be publishable: ${detail}`,
|
|
8531
|
+
[]
|
|
8532
|
+
);
|
|
8533
|
+
}
|
|
8534
|
+
return after;
|
|
8535
|
+
}
|
|
8050
8536
|
function mapListTab(state, viewId, tabId, fn) {
|
|
8051
8537
|
return mapView(state, viewId, (view) => {
|
|
8052
8538
|
const tabs = view.config.tabs ?? [];
|
|
8053
8539
|
if (!tabs.some((t) => t.id === tabId)) {
|
|
8054
|
-
throw new
|
|
8540
|
+
throw new chunkV26R64A4_js.ValidationError(`List tab "${tabId}" is not in view "${viewId}"`, []);
|
|
8055
8541
|
}
|
|
8056
8542
|
return {
|
|
8057
8543
|
...view,
|
|
8058
|
-
config: {
|
|
8544
|
+
config: {
|
|
8545
|
+
...view.config,
|
|
8546
|
+
tabs: tabs.map(
|
|
8547
|
+
(t) => t.id === tabId ? assertStillPublishableTab(t, fn(t), viewId, tabId) : t
|
|
8548
|
+
)
|
|
8549
|
+
}
|
|
8059
8550
|
};
|
|
8060
8551
|
});
|
|
8061
8552
|
}
|
|
8062
|
-
var listTabPayload =
|
|
8063
|
-
|
|
8064
|
-
|
|
8065
|
-
);
|
|
8066
|
-
var filterGroupPayload = z2.z.custom(
|
|
8067
|
-
(value) => value === null || typeof value === "object"
|
|
8068
|
-
);
|
|
8069
|
-
var sortRulesPayload = z2.z.custom((value) => Array.isArray(value));
|
|
8553
|
+
var listTabPayload = chunkYZ5RCMIQ_js.listViewTabSchema;
|
|
8554
|
+
var filterGroupPayload = chunkYZ5RCMIQ_js.filterGroupSchema;
|
|
8555
|
+
var sortRulesPayload = chunkYZ5RCMIQ_js.sortsSchema;
|
|
8070
8556
|
function setOnTab(type, key, valueSchema, describe) {
|
|
8071
8557
|
const schema = z2.z.object({ ...listTabBase, type: z2.z.literal(type), value: valueSchema });
|
|
8072
8558
|
return defineOperation({
|
|
@@ -8079,7 +8565,8 @@ function setOnTab(type, key, valueSchema, describe) {
|
|
|
8079
8565
|
}
|
|
8080
8566
|
return { ...tab, [key]: op.value };
|
|
8081
8567
|
}),
|
|
8082
|
-
focus:
|
|
8568
|
+
focus: tabFocus2,
|
|
8569
|
+
presentation: definePresentation(tabFocus2, "atomic", () => [String(key)]),
|
|
8083
8570
|
describe: (op) => describe(op.value)
|
|
8084
8571
|
});
|
|
8085
8572
|
}
|
|
@@ -8094,14 +8581,15 @@ var addListTab = defineOperation({
|
|
|
8094
8581
|
apply: (state, op) => mapView(state, op.viewId, (view) => {
|
|
8095
8582
|
const tabs = view.config.tabs ?? [];
|
|
8096
8583
|
if (tabs.some((t) => t.id === op.tab.id)) {
|
|
8097
|
-
throw new
|
|
8584
|
+
throw new chunkV26R64A4_js.ValidationError(
|
|
8098
8585
|
`List tab "${op.tab.id}" already exists in view "${op.viewId}"`,
|
|
8099
8586
|
[]
|
|
8100
8587
|
);
|
|
8101
8588
|
}
|
|
8102
8589
|
return { ...view, config: { ...view.config, tabs: [...tabs, op.tab] } };
|
|
8103
8590
|
}),
|
|
8104
|
-
focus:
|
|
8591
|
+
focus: addTabFocus2,
|
|
8592
|
+
presentation: definePresentation(addTabFocus2, "local"),
|
|
8105
8593
|
describe: (op) => `Ajoute l'onglet \xAB ${op.tab.label} \xBB`
|
|
8106
8594
|
});
|
|
8107
8595
|
var removeListTabSchema = z2.z.object({
|
|
@@ -8114,14 +8602,15 @@ var removeListTab = defineOperation({
|
|
|
8114
8602
|
apply: (state, op) => mapView(state, op.viewId, (view) => {
|
|
8115
8603
|
const tabs = view.config.tabs ?? [];
|
|
8116
8604
|
if (!tabs.some((t) => t.id === op.tabId)) {
|
|
8117
|
-
throw new
|
|
8605
|
+
throw new chunkV26R64A4_js.ValidationError(`List tab "${op.tabId}" is not in view "${op.viewId}"`, []);
|
|
8118
8606
|
}
|
|
8119
8607
|
return {
|
|
8120
8608
|
...view,
|
|
8121
8609
|
config: { ...view.config, tabs: tabs.filter((t) => t.id !== op.tabId) }
|
|
8122
8610
|
};
|
|
8123
8611
|
}),
|
|
8124
|
-
focus:
|
|
8612
|
+
focus: tabFocus2,
|
|
8613
|
+
presentation: definePresentation(tabFocus2, "local"),
|
|
8125
8614
|
describe: (op) => `Supprime l'onglet ${op.tabId}`
|
|
8126
8615
|
});
|
|
8127
8616
|
var updateListTabSchema = z2.z.object({
|
|
@@ -8129,16 +8618,21 @@ var updateListTabSchema = z2.z.object({
|
|
|
8129
8618
|
type: z2.z.literal("update_list_tab"),
|
|
8130
8619
|
changes: z2.z.object({
|
|
8131
8620
|
label: z2.z.string().min(1).optional(),
|
|
8132
|
-
icon:
|
|
8621
|
+
icon: chunkBOICAZHR_js.iconNameSchema.optional(),
|
|
8133
8622
|
default: z2.z.boolean().optional(),
|
|
8134
|
-
visibility: z2.z.enum(
|
|
8623
|
+
visibility: z2.z.enum(chunkYZ5RCMIQ_js.LIST_VIEW_TAB_VISIBILITIES).optional()
|
|
8135
8624
|
}).refine((c) => Object.keys(c).length > 0, "update_list_tab needs at least one change")
|
|
8136
8625
|
});
|
|
8626
|
+
var updateListTabFocus = (op) => ({
|
|
8627
|
+
viewId: op.viewId,
|
|
8628
|
+
tabId: op.tabId
|
|
8629
|
+
});
|
|
8137
8630
|
var updateListTab = defineOperation({
|
|
8138
8631
|
type: "update_list_tab",
|
|
8139
8632
|
schema: updateListTabSchema,
|
|
8140
8633
|
apply: (state, op) => mapListTab(state, op.viewId, op.tabId, (tab) => ({ ...tab, ...op.changes })),
|
|
8141
|
-
focus:
|
|
8634
|
+
focus: updateListTabFocus,
|
|
8635
|
+
presentation: definePresentation(updateListTabFocus, "atomic", firstChangedProperty2),
|
|
8142
8636
|
describe: (op) => op.changes.label ? `Renomme l'onglet en \xAB ${op.changes.label} \xBB` : `Modifie l'onglet ${op.tabId}`
|
|
8143
8637
|
});
|
|
8144
8638
|
var reorderListTabsSchema = z2.z.object({
|
|
@@ -8156,7 +8650,8 @@ var reorderListTabs = defineOperation({
|
|
|
8156
8650
|
tabs: reorderById(view.config.tabs ?? [], op.tabOrder, "List tab")
|
|
8157
8651
|
}
|
|
8158
8652
|
})),
|
|
8159
|
-
focus:
|
|
8653
|
+
focus: viewFocus2,
|
|
8654
|
+
presentation: definePresentation(viewFocus2, "local"),
|
|
8160
8655
|
describe: () => "R\xE9ordonne les onglets"
|
|
8161
8656
|
});
|
|
8162
8657
|
var setColumns = setOnTab(
|
|
@@ -8173,18 +8668,47 @@ var setColumnSizing = setOnTab(
|
|
|
8173
8668
|
z2.z.record(z2.z.string(), z2.z.number().int().positive()),
|
|
8174
8669
|
() => "Ajuste la largeur des colonnes"
|
|
8175
8670
|
);
|
|
8176
|
-
var
|
|
8177
|
-
|
|
8178
|
-
"
|
|
8179
|
-
z2.z.enum(["table", "kanban"])
|
|
8180
|
-
|
|
8181
|
-
|
|
8182
|
-
|
|
8183
|
-
|
|
8184
|
-
|
|
8185
|
-
|
|
8186
|
-
|
|
8187
|
-
|
|
8671
|
+
var setLayoutSchema = z2.z.object({
|
|
8672
|
+
...listTabBase,
|
|
8673
|
+
type: z2.z.literal("set_layout"),
|
|
8674
|
+
value: z2.z.enum(["table", "kanban"])
|
|
8675
|
+
});
|
|
8676
|
+
var setLayout = defineOperation({
|
|
8677
|
+
type: "set_layout",
|
|
8678
|
+
schema: setLayoutSchema,
|
|
8679
|
+
apply: (state, op) => mapListTab(state, op.viewId, op.tabId, (tab) => {
|
|
8680
|
+
if (op.value === "table") return { ...withoutKanbanKeys(tab), layout: "table" };
|
|
8681
|
+
if (tab.groupByAttribute === void 0) {
|
|
8682
|
+
throw new chunkV26R64A4_js.ValidationError(
|
|
8683
|
+
`List tab "${op.tabId}" cannot switch to kanban without a group attribute \u2014 use set_group_by, which switches the layout itself`,
|
|
8684
|
+
[]
|
|
8685
|
+
);
|
|
8686
|
+
}
|
|
8687
|
+
return { ...withoutTableKeys(tab), layout: "kanban" };
|
|
8688
|
+
}),
|
|
8689
|
+
focus: tabFocus2,
|
|
8690
|
+
presentation: definePresentation(tabFocus2, "atomic", () => ["layout"]),
|
|
8691
|
+
describe: (op) => `Passe en affichage ${op.value}`
|
|
8692
|
+
});
|
|
8693
|
+
var setGroupBySchema = z2.z.object({
|
|
8694
|
+
...listTabBase,
|
|
8695
|
+
type: z2.z.literal("set_group_by"),
|
|
8696
|
+
value: z2.z.string().min(1).nullable()
|
|
8697
|
+
});
|
|
8698
|
+
var setGroupBy = defineOperation({
|
|
8699
|
+
type: "set_group_by",
|
|
8700
|
+
schema: setGroupBySchema,
|
|
8701
|
+
apply: (state, op) => mapListTab(
|
|
8702
|
+
state,
|
|
8703
|
+
op.viewId,
|
|
8704
|
+
op.tabId,
|
|
8705
|
+
(tab) => op.value === null ? { ...withoutKanbanKeys(tab), layout: "table" } : { ...withoutTableKeys(tab), layout: "kanban", groupByAttribute: op.value }
|
|
8706
|
+
),
|
|
8707
|
+
focus: tabFocus2,
|
|
8708
|
+
// The layout flip is a side effect; the addressable property stays the group.
|
|
8709
|
+
presentation: definePresentation(tabFocus2, "atomic", () => ["groupByAttribute"]),
|
|
8710
|
+
describe: (op) => op.value ? `Regroupe par ${op.value} en kanban` : "Retire le regroupement, retour en table"
|
|
8711
|
+
});
|
|
8188
8712
|
var setFilters = setOnTab(
|
|
8189
8713
|
"set_filters",
|
|
8190
8714
|
"filters",
|
|
@@ -8236,7 +8760,8 @@ var setDefaultFilters = defineOperation({
|
|
|
8236
8760
|
}
|
|
8237
8761
|
return { ...view, config: { ...view.config, defaultFilters: op.filters } };
|
|
8238
8762
|
}),
|
|
8239
|
-
focus:
|
|
8763
|
+
focus: viewFocus2,
|
|
8764
|
+
presentation: definePresentation(viewFocus2, "atomic", () => ["config", "defaultFilters"]),
|
|
8240
8765
|
describe: (op) => op.filters ? "Modifie les filtres de la vue" : "Retire les filtres de la vue"
|
|
8241
8766
|
});
|
|
8242
8767
|
var LIST_VIEW_OPERATIONS = [
|
|
@@ -8258,14 +8783,30 @@ var LIST_VIEW_OPERATIONS = [
|
|
|
8258
8783
|
];
|
|
8259
8784
|
function requireObject(state, objectId) {
|
|
8260
8785
|
if (!state.objects.some((o) => o.id === objectId)) {
|
|
8261
|
-
throw new
|
|
8786
|
+
throw new chunkV26R64A4_js.ValidationError(`Object "${objectId}" is not in the draftable state`, []);
|
|
8262
8787
|
}
|
|
8263
8788
|
}
|
|
8264
|
-
|
|
8789
|
+
function objectFocus(op) {
|
|
8790
|
+
return { objectId: op.objectId };
|
|
8791
|
+
}
|
|
8792
|
+
function recordFocus(op) {
|
|
8793
|
+
return { objectId: op.objectId, recordId: op.recordId };
|
|
8794
|
+
}
|
|
8795
|
+
function attributeFocus(op) {
|
|
8796
|
+
return { objectId: op.objectId, attributeId: op.attributeId };
|
|
8797
|
+
}
|
|
8798
|
+
function firstChangedProperty3(op) {
|
|
8799
|
+
const keys = Object.keys(op.changes).sort();
|
|
8800
|
+
return keys.length === 1 ? [keys[0]] : void 0;
|
|
8801
|
+
}
|
|
8802
|
+
var objectOperationBase = { ...operationBase, objectId: z2.z.string().uuid() };
|
|
8265
8803
|
var addObjectSchema = z2.z.object({
|
|
8266
8804
|
...objectOperationBase,
|
|
8267
8805
|
type: z2.z.literal("add_object"),
|
|
8268
|
-
|
|
8806
|
+
// The service's own kebab-case rule, enforced at APPEND: an agent that
|
|
8807
|
+
// names an object "Facture" is refused here with the format spelled out,
|
|
8808
|
+
// not at publish (live QA, 2026-08-17).
|
|
8809
|
+
name: OBJECT_NAME_SCHEMA,
|
|
8269
8810
|
label: z2.z.string().min(1),
|
|
8270
8811
|
icon: z2.z.string().min(1).optional()
|
|
8271
8812
|
});
|
|
@@ -8274,10 +8815,10 @@ var addObject = defineOperation({
|
|
|
8274
8815
|
schema: addObjectSchema,
|
|
8275
8816
|
apply: (state, op) => {
|
|
8276
8817
|
if (state.objects.some((o) => o.name === op.name)) {
|
|
8277
|
-
throw new
|
|
8818
|
+
throw new chunkV26R64A4_js.ValidationError(`Object "${op.name}" already exists`, []);
|
|
8278
8819
|
}
|
|
8279
8820
|
if (state.objects.some((o) => o.id === op.objectId)) {
|
|
8280
|
-
throw new
|
|
8821
|
+
throw new chunkV26R64A4_js.ValidationError(`Object id "${op.objectId}" is already taken`, []);
|
|
8281
8822
|
}
|
|
8282
8823
|
const created = {
|
|
8283
8824
|
id: op.objectId,
|
|
@@ -8289,7 +8830,8 @@ var addObject = defineOperation({
|
|
|
8289
8830
|
},
|
|
8290
8831
|
// The caller generates objectId, so a draft object is addressable by route
|
|
8291
8832
|
// before it exists — that is what lets the app navigate to it live.
|
|
8292
|
-
focus:
|
|
8833
|
+
focus: objectFocus,
|
|
8834
|
+
presentation: definePresentation(objectFocus, "structural"),
|
|
8293
8835
|
describe: (op) => `Cr\xE9e l'objet \xAB ${op.label} \xBB`
|
|
8294
8836
|
});
|
|
8295
8837
|
var updateObjectSchema = z2.z.object({
|
|
@@ -8297,6 +8839,9 @@ var updateObjectSchema = z2.z.object({
|
|
|
8297
8839
|
type: z2.z.literal("update_object"),
|
|
8298
8840
|
changes: z2.z.object({ label: z2.z.string().min(1).optional(), icon: z2.z.string().min(1).optional() }).refine((c) => Object.keys(c).length > 0, "update_object needs at least one change")
|
|
8299
8841
|
});
|
|
8842
|
+
var updateObjectFocus = (op) => ({
|
|
8843
|
+
objectId: op.objectId
|
|
8844
|
+
});
|
|
8300
8845
|
var updateObject = defineOperation({
|
|
8301
8846
|
type: "update_object",
|
|
8302
8847
|
schema: updateObjectSchema,
|
|
@@ -8307,7 +8852,8 @@ var updateObject = defineOperation({
|
|
|
8307
8852
|
objects: state.objects.map((o) => o.id === op.objectId ? { ...o, ...op.changes } : o)
|
|
8308
8853
|
};
|
|
8309
8854
|
},
|
|
8310
|
-
focus:
|
|
8855
|
+
focus: updateObjectFocus,
|
|
8856
|
+
presentation: definePresentation(updateObjectFocus, "atomic", firstChangedProperty3),
|
|
8311
8857
|
describe: (op) => op.changes.label ? `Renomme l'objet en \xAB ${op.changes.label} \xBB` : "Modifie l'objet"
|
|
8312
8858
|
});
|
|
8313
8859
|
var removeObjectSchema = z2.z.object({ ...objectOperationBase, type: z2.z.literal("remove_object") });
|
|
@@ -8325,16 +8871,42 @@ var removeObject = defineOperation({
|
|
|
8325
8871
|
views: state.views.filter((v) => v.objectName !== objectName)
|
|
8326
8872
|
};
|
|
8327
8873
|
},
|
|
8328
|
-
focus:
|
|
8874
|
+
focus: objectFocus,
|
|
8875
|
+
presentation: definePresentation(objectFocus, "structural"),
|
|
8329
8876
|
describe: (op) => `Supprime l'objet ${op.objectId}`
|
|
8330
8877
|
});
|
|
8878
|
+
var DRAFTABLE_ATTRIBUTE_TYPES = ATTRIBUTE_TYPES.filter(
|
|
8879
|
+
(type) => type !== "formula" && type !== "rollup"
|
|
8880
|
+
);
|
|
8331
8881
|
var addAttributeSchema = z2.z.object({
|
|
8332
8882
|
...objectOperationBase,
|
|
8333
8883
|
type: z2.z.literal("add_attribute"),
|
|
8334
8884
|
attributeId: z2.z.string().min(1),
|
|
8335
|
-
|
|
8885
|
+
// The same identifier rule the attribute builder enforces.
|
|
8886
|
+
name: ATTRIBUTE_NAME_SCHEMA,
|
|
8336
8887
|
label: z2.z.string().min(1),
|
|
8337
|
-
|
|
8888
|
+
// The canonical union, not a bare string: an agent that invents "num" gets
|
|
8889
|
+
// refused at APPEND, where the error names the valid types and the one
|
|
8890
|
+
// operation to fix — instead of a whole draft failing at publish.
|
|
8891
|
+
attributeType: z2.z.enum(DRAFTABLE_ATTRIBUTE_TYPES),
|
|
8892
|
+
/** Type-specific configuration, published as-is onto the attribute. */
|
|
8893
|
+
config: z2.z.record(z2.z.string(), z2.z.unknown()).optional()
|
|
8894
|
+
}).superRefine((op, ctx) => {
|
|
8895
|
+
try {
|
|
8896
|
+
chunkBOICAZHR_js.parseAttributeConfigForCreate(op.attributeType, op.config ?? {});
|
|
8897
|
+
} catch (error) {
|
|
8898
|
+
if (error instanceof chunkV26R64A4_js.ValidationError) {
|
|
8899
|
+
for (const detail of error.errors) {
|
|
8900
|
+
ctx.addIssue({
|
|
8901
|
+
code: "custom",
|
|
8902
|
+
message: detail.message,
|
|
8903
|
+
path: ["config", ...detail.path ?? []]
|
|
8904
|
+
});
|
|
8905
|
+
}
|
|
8906
|
+
return;
|
|
8907
|
+
}
|
|
8908
|
+
throw error;
|
|
8909
|
+
}
|
|
8338
8910
|
});
|
|
8339
8911
|
var addAttribute = defineOperation({
|
|
8340
8912
|
type: "add_attribute",
|
|
@@ -8342,26 +8914,29 @@ var addAttribute = defineOperation({
|
|
|
8342
8914
|
apply: (state, op) => {
|
|
8343
8915
|
requireObject(state, op.objectId);
|
|
8344
8916
|
if (state.attributes.some((a) => a.objectId === op.objectId && a.name === op.name)) {
|
|
8345
|
-
throw new
|
|
8917
|
+
throw new chunkV26R64A4_js.ValidationError(
|
|
8346
8918
|
`Attribute "${op.name}" already exists on object "${op.objectId}"`,
|
|
8347
8919
|
[]
|
|
8348
8920
|
);
|
|
8349
8921
|
}
|
|
8922
|
+
const added = {
|
|
8923
|
+
id: op.attributeId,
|
|
8924
|
+
objectId: op.objectId,
|
|
8925
|
+
name: op.name,
|
|
8926
|
+
label: op.label,
|
|
8927
|
+
attributeType: op.attributeType,
|
|
8928
|
+
...op.config === void 0 ? {} : { config: op.config }
|
|
8929
|
+
};
|
|
8930
|
+
for (const sample of state.sampleRecords) {
|
|
8931
|
+
if (sample.objectId === op.objectId) assertRequiredCovered(sample.id, added, sample.values);
|
|
8932
|
+
}
|
|
8350
8933
|
return {
|
|
8351
8934
|
...state,
|
|
8352
|
-
attributes: [
|
|
8353
|
-
...state.attributes,
|
|
8354
|
-
{
|
|
8355
|
-
id: op.attributeId,
|
|
8356
|
-
objectId: op.objectId,
|
|
8357
|
-
name: op.name,
|
|
8358
|
-
label: op.label,
|
|
8359
|
-
attributeType: op.attributeType
|
|
8360
|
-
}
|
|
8361
|
-
]
|
|
8935
|
+
attributes: [...state.attributes, added]
|
|
8362
8936
|
};
|
|
8363
8937
|
},
|
|
8364
|
-
focus:
|
|
8938
|
+
focus: attributeFocus,
|
|
8939
|
+
presentation: definePresentation(attributeFocus, "local"),
|
|
8365
8940
|
describe: (op) => `Ajoute l'attribut \xAB ${op.label} \xBB`
|
|
8366
8941
|
});
|
|
8367
8942
|
var updateAttributeSchema = z2.z.object({
|
|
@@ -8375,7 +8950,7 @@ var updateAttribute = defineOperation({
|
|
|
8375
8950
|
schema: updateAttributeSchema,
|
|
8376
8951
|
apply: (state, op) => {
|
|
8377
8952
|
if (!state.attributes.some((a) => a.id === op.attributeId)) {
|
|
8378
|
-
throw new
|
|
8953
|
+
throw new chunkV26R64A4_js.ValidationError(`Attribute "${op.attributeId}" is not in the draftable state`, []);
|
|
8379
8954
|
}
|
|
8380
8955
|
return {
|
|
8381
8956
|
...state,
|
|
@@ -8387,7 +8962,8 @@ var updateAttribute = defineOperation({
|
|
|
8387
8962
|
// Carries objectId so the scope can load the attribute's parent. Without it
|
|
8388
8963
|
// the reader returns an empty state and the fold rejects the operation before
|
|
8389
8964
|
// the draft is ever persisted — renaming an existing field was impossible.
|
|
8390
|
-
focus:
|
|
8965
|
+
focus: attributeFocus,
|
|
8966
|
+
presentation: definePresentation(attributeFocus, "atomic"),
|
|
8391
8967
|
describe: (op) => op.changes.label ? `Renomme l'attribut en \xAB ${op.changes.label} \xBB` : "Modifie l'attribut"
|
|
8392
8968
|
});
|
|
8393
8969
|
var removeAttributeSchema = z2.z.object({
|
|
@@ -8399,19 +8975,62 @@ var removeAttribute = defineOperation({
|
|
|
8399
8975
|
type: "remove_attribute",
|
|
8400
8976
|
schema: removeAttributeSchema,
|
|
8401
8977
|
apply: (state, op) => {
|
|
8402
|
-
|
|
8403
|
-
|
|
8978
|
+
const removed = state.attributes.find((a) => a.id === op.attributeId);
|
|
8979
|
+
if (!removed) {
|
|
8980
|
+
throw new chunkV26R64A4_js.ValidationError(`Attribute "${op.attributeId}" is not in the draftable state`, []);
|
|
8981
|
+
}
|
|
8982
|
+
const user2 = state.sampleRecords.find(
|
|
8983
|
+
(r) => r.objectId === removed.objectId && removed.name in r.values
|
|
8984
|
+
);
|
|
8985
|
+
if (user2) {
|
|
8986
|
+
throw new chunkV26R64A4_js.ValidationError(
|
|
8987
|
+
`Attribute "${removed.name}" is still used by sample record "${user2.id}"`,
|
|
8988
|
+
[]
|
|
8989
|
+
);
|
|
8404
8990
|
}
|
|
8405
8991
|
return { ...state, attributes: state.attributes.filter((a) => a.id !== op.attributeId) };
|
|
8406
8992
|
},
|
|
8407
8993
|
// Same reason as update_attribute: the parent object must be in scope.
|
|
8408
|
-
focus:
|
|
8994
|
+
focus: attributeFocus,
|
|
8995
|
+
presentation: definePresentation(attributeFocus, "local"),
|
|
8409
8996
|
describe: (op) => `Supprime l'attribut ${op.attributeId}`
|
|
8410
8997
|
});
|
|
8998
|
+
function assertSampleValue(recordId, key, attribute, value) {
|
|
8999
|
+
const reconstructed = {
|
|
9000
|
+
id: attribute.id,
|
|
9001
|
+
name: attribute.name,
|
|
9002
|
+
label: attribute.label,
|
|
9003
|
+
type: attribute.attributeType,
|
|
9004
|
+
...attribute.config
|
|
9005
|
+
};
|
|
9006
|
+
try {
|
|
9007
|
+
chunkI3EYILYO_js.createAttributeValidator(reconstructed);
|
|
9008
|
+
} catch {
|
|
9009
|
+
return;
|
|
9010
|
+
}
|
|
9011
|
+
const result = chunkI3EYILYO_js.validateAttribute(reconstructed, value);
|
|
9012
|
+
if (result.success) return;
|
|
9013
|
+
const errors = result.errors ?? [];
|
|
9014
|
+
const detail = errors.map((error) => error.message).join(", ");
|
|
9015
|
+
throw new chunkV26R64A4_js.ValidationError(
|
|
9016
|
+
`Sample record "${recordId}" has an invalid value for "${key}": ${detail}`,
|
|
9017
|
+
errors.map((error) => ({ path: error.path, message: error.message }))
|
|
9018
|
+
);
|
|
9019
|
+
}
|
|
9020
|
+
function assertRequiredCovered(recordId, attribute, values) {
|
|
9021
|
+
if (attribute.config?.required !== true) return;
|
|
9022
|
+
if (attribute.config?.defaultValue !== void 0) return;
|
|
9023
|
+
if (attribute.name in values && values[attribute.name] !== void 0) return;
|
|
9024
|
+
throw new chunkV26R64A4_js.ValidationError(
|
|
9025
|
+
`Sample record "${recordId}" is missing a value for required attribute "${attribute.name}"`,
|
|
9026
|
+
[]
|
|
9027
|
+
);
|
|
9028
|
+
}
|
|
8411
9029
|
var addSampleRecordSchema = z2.z.object({
|
|
8412
9030
|
...objectOperationBase,
|
|
8413
9031
|
type: z2.z.literal("add_sample_record"),
|
|
8414
|
-
|
|
9032
|
+
// Same rule as objectId: publish inserts it, so it must be a UUID.
|
|
9033
|
+
recordId: z2.z.string().uuid(),
|
|
8415
9034
|
values: z2.z.record(z2.z.string(), z2.z.unknown())
|
|
8416
9035
|
});
|
|
8417
9036
|
var addSampleRecord = defineOperation({
|
|
@@ -8420,7 +9039,23 @@ var addSampleRecord = defineOperation({
|
|
|
8420
9039
|
apply: (state, op) => {
|
|
8421
9040
|
requireObject(state, op.objectId);
|
|
8422
9041
|
if (state.sampleRecords.some((r) => r.id === op.recordId)) {
|
|
8423
|
-
throw new
|
|
9042
|
+
throw new chunkV26R64A4_js.ValidationError(`Sample record "${op.recordId}" already exists`, []);
|
|
9043
|
+
}
|
|
9044
|
+
const known = new Map(
|
|
9045
|
+
state.attributes.filter((a) => a.objectId === op.objectId).map((a) => [a.name, a])
|
|
9046
|
+
);
|
|
9047
|
+
for (const [key, value] of Object.entries(op.values)) {
|
|
9048
|
+
const attribute = known.get(key);
|
|
9049
|
+
if (!attribute) {
|
|
9050
|
+
throw new chunkV26R64A4_js.ValidationError(
|
|
9051
|
+
`Sample record "${op.recordId}" uses unknown attribute "${key}"`,
|
|
9052
|
+
[]
|
|
9053
|
+
);
|
|
9054
|
+
}
|
|
9055
|
+
assertSampleValue(op.recordId, key, attribute, value);
|
|
9056
|
+
}
|
|
9057
|
+
for (const attribute of known.values()) {
|
|
9058
|
+
assertRequiredCovered(op.recordId, attribute, op.values);
|
|
8424
9059
|
}
|
|
8425
9060
|
return {
|
|
8426
9061
|
...state,
|
|
@@ -8432,11 +9067,12 @@ var addSampleRecord = defineOperation({
|
|
|
8432
9067
|
},
|
|
8433
9068
|
// A sample is a draft record, not a render-time fiction: publishing
|
|
8434
9069
|
// materialises it, discarding the draft discards it.
|
|
8435
|
-
focus:
|
|
9070
|
+
focus: recordFocus,
|
|
9071
|
+
presentation: definePresentation(recordFocus, "local"),
|
|
8436
9072
|
describe: () => "Ajoute un exemple"
|
|
8437
9073
|
});
|
|
8438
9074
|
var removeSampleRecordSchema = z2.z.object({
|
|
8439
|
-
...
|
|
9075
|
+
...objectOperationBase,
|
|
8440
9076
|
type: z2.z.literal("remove_sample_record"),
|
|
8441
9077
|
recordId: z2.z.string().min(1)
|
|
8442
9078
|
});
|
|
@@ -8444,12 +9080,16 @@ var removeSampleRecord = defineOperation({
|
|
|
8444
9080
|
type: "remove_sample_record",
|
|
8445
9081
|
schema: removeSampleRecordSchema,
|
|
8446
9082
|
apply: (state, op) => {
|
|
8447
|
-
if (!state.sampleRecords.some((r) => r.id === op.recordId)) {
|
|
8448
|
-
throw new
|
|
9083
|
+
if (!state.sampleRecords.some((r) => r.id === op.recordId && r.objectId === op.objectId)) {
|
|
9084
|
+
throw new chunkV26R64A4_js.ValidationError(
|
|
9085
|
+
`Sample record "${op.recordId}" is not in object "${op.objectId}"`,
|
|
9086
|
+
[]
|
|
9087
|
+
);
|
|
8449
9088
|
}
|
|
8450
9089
|
return { ...state, sampleRecords: state.sampleRecords.filter((r) => r.id !== op.recordId) };
|
|
8451
9090
|
},
|
|
8452
|
-
focus:
|
|
9091
|
+
focus: recordFocus,
|
|
9092
|
+
presentation: definePresentation(recordFocus, "local"),
|
|
8453
9093
|
describe: () => "Retire un exemple"
|
|
8454
9094
|
});
|
|
8455
9095
|
var SCHEMA_OPERATIONS = [
|
|
@@ -8472,7 +9112,7 @@ function build() {
|
|
|
8472
9112
|
...LIST_VIEW_OPERATIONS
|
|
8473
9113
|
]) {
|
|
8474
9114
|
if (map.has(definition.type)) {
|
|
8475
|
-
throw new
|
|
9115
|
+
throw new chunkV26R64A4_js.DuplicateError("architect operation", definition.type);
|
|
8476
9116
|
}
|
|
8477
9117
|
map.set(definition.type, definition);
|
|
8478
9118
|
}
|
|
@@ -8485,7 +9125,7 @@ var ALL_OPERATION_TYPES = [...OPERATION_REGISTRY.keys()];
|
|
|
8485
9125
|
function defOf(operation) {
|
|
8486
9126
|
const definition = OPERATION_REGISTRY.get(operation.type);
|
|
8487
9127
|
if (!definition) {
|
|
8488
|
-
throw new
|
|
9128
|
+
throw new chunkV26R64A4_js.ValidationError(
|
|
8489
9129
|
`Operation "${operation.id}" has unknown type "${operation.type}"`,
|
|
8490
9130
|
[]
|
|
8491
9131
|
);
|
|
@@ -8506,25 +9146,45 @@ function describeOperations(operations, ctx) {
|
|
|
8506
9146
|
}
|
|
8507
9147
|
function parseOperation(candidate) {
|
|
8508
9148
|
if (typeof candidate !== "object" || candidate === null || !("type" in candidate)) {
|
|
8509
|
-
throw new
|
|
9149
|
+
throw new chunkV26R64A4_js.ValidationError("An operation must be an object carrying a type", []);
|
|
8510
9150
|
}
|
|
8511
9151
|
const type = candidate.type;
|
|
8512
9152
|
if (typeof type !== "string") {
|
|
8513
|
-
throw new
|
|
9153
|
+
throw new chunkV26R64A4_js.ValidationError("An operation's type must be a string", []);
|
|
8514
9154
|
}
|
|
8515
9155
|
const definition = OPERATION_REGISTRY.get(type);
|
|
8516
9156
|
if (!definition) {
|
|
8517
|
-
throw new
|
|
9157
|
+
throw new chunkV26R64A4_js.ValidationError(`Unknown operation type "${type}"`, []);
|
|
8518
9158
|
}
|
|
8519
9159
|
const parsed = definition.schema.safeParse(candidate);
|
|
8520
9160
|
if (!parsed.success) {
|
|
8521
|
-
throw new
|
|
9161
|
+
throw new chunkV26R64A4_js.ValidationError(
|
|
8522
9162
|
`Operation "${type}" is invalid: ${parsed.error.issues.map((i) => `${i.path.join(".")} ${i.message}`).join("; ")}`,
|
|
8523
9163
|
[]
|
|
8524
9164
|
);
|
|
8525
9165
|
}
|
|
8526
9166
|
return parsed.data;
|
|
8527
9167
|
}
|
|
9168
|
+
function toJsonSchema(schema) {
|
|
9169
|
+
return z2.z.toJSONSchema(schema, { io: "input" });
|
|
9170
|
+
}
|
|
9171
|
+
function describeOperationInput(type) {
|
|
9172
|
+
const definition = OPERATION_REGISTRY.get(type);
|
|
9173
|
+
if (!definition) {
|
|
9174
|
+
throw new chunkV26R64A4_js.ValidationError(`Unknown operation type "${type}"`, []);
|
|
9175
|
+
}
|
|
9176
|
+
return toJsonSchema(definition.schema);
|
|
9177
|
+
}
|
|
9178
|
+
function describeAttributeConfig(type) {
|
|
9179
|
+
const draftable = DRAFTABLE_ATTRIBUTE_TYPES.find((candidate) => candidate === type);
|
|
9180
|
+
if (!draftable) {
|
|
9181
|
+
throw new chunkV26R64A4_js.ValidationError(`Unknown attribute type "${type}"`, []);
|
|
9182
|
+
}
|
|
9183
|
+
return toJsonSchema(chunkBOICAZHR_js.getAttributeConfigWriteSchema(draftable));
|
|
9184
|
+
}
|
|
9185
|
+
function listDescribableNames() {
|
|
9186
|
+
return { operations: [...ALL_OPERATION_TYPES], attributeTypes: [...DRAFTABLE_ATTRIBUTE_TYPES] };
|
|
9187
|
+
}
|
|
8528
9188
|
|
|
8529
9189
|
// src/architect/field-ids.ts
|
|
8530
9190
|
function makeFieldId(groupId, seed, collisionIndex) {
|
|
@@ -8553,6 +9213,96 @@ function ensureFieldIds(tabs) {
|
|
|
8553
9213
|
);
|
|
8554
9214
|
}
|
|
8555
9215
|
|
|
9216
|
+
// src/architect/presentation.ts
|
|
9217
|
+
function presentationOf(operation) {
|
|
9218
|
+
return defOf(operation).presentation(operation);
|
|
9219
|
+
}
|
|
9220
|
+
function episodeImpactOf(operations) {
|
|
9221
|
+
const presentations = operations.map(presentationOf);
|
|
9222
|
+
const roots = new Set(
|
|
9223
|
+
presentations.map(({ focus }) => focus.viewId ?? focus.objectId).filter((root) => root !== void 0)
|
|
9224
|
+
);
|
|
9225
|
+
if (roots.size > 1) return "structural";
|
|
9226
|
+
if (presentations.some(({ impact }) => impact === "structural")) return "structural";
|
|
9227
|
+
if (presentations.some(({ impact }) => impact === "local")) return "local";
|
|
9228
|
+
return "atomic";
|
|
9229
|
+
}
|
|
9230
|
+
function listTabOf(view, tabId) {
|
|
9231
|
+
return view.config.tabs?.find((tab) => tab.id === tabId);
|
|
9232
|
+
}
|
|
9233
|
+
function snapshotArchitectTarget(state, focus) {
|
|
9234
|
+
const view = focus.viewId ? state.views.find((candidate) => candidate.id === focus.viewId) : void 0;
|
|
9235
|
+
const detailTab = focus.tabId ? view?.tabs.find((candidate) => candidate.id === focus.tabId) : void 0;
|
|
9236
|
+
if (focus.attributeId) {
|
|
9237
|
+
return state.attributes.find((attribute) => attribute.id === focus.attributeId);
|
|
9238
|
+
}
|
|
9239
|
+
if (focus.fieldId) {
|
|
9240
|
+
if (detailTab?.type !== "form") return void 0;
|
|
9241
|
+
for (const group2 of detailTab.groups) {
|
|
9242
|
+
const field = group2.fields.find((candidate) => candidate.id === focus.fieldId);
|
|
9243
|
+
if (field) return field;
|
|
9244
|
+
}
|
|
9245
|
+
return void 0;
|
|
9246
|
+
}
|
|
9247
|
+
if (focus.groupId) {
|
|
9248
|
+
if (detailTab?.type !== "form") return void 0;
|
|
9249
|
+
return detailTab.groups.find((candidate) => candidate.id === focus.groupId);
|
|
9250
|
+
}
|
|
9251
|
+
if (focus.tabId) {
|
|
9252
|
+
if (!view) return void 0;
|
|
9253
|
+
return detailTab ?? listTabOf(view, focus.tabId);
|
|
9254
|
+
}
|
|
9255
|
+
if (focus.recordId) {
|
|
9256
|
+
return state.sampleRecords.find((record) => record.id === focus.recordId);
|
|
9257
|
+
}
|
|
9258
|
+
if (view) return view;
|
|
9259
|
+
if (focus.objectId) {
|
|
9260
|
+
return state.objects.find((object2) => object2.id === focus.objectId);
|
|
9261
|
+
}
|
|
9262
|
+
return void 0;
|
|
9263
|
+
}
|
|
9264
|
+
function deriveArchitectChanges(initial, operations) {
|
|
9265
|
+
let state = initial;
|
|
9266
|
+
return operations.map((operation) => {
|
|
9267
|
+
const presentation = presentationOf(operation);
|
|
9268
|
+
const before = snapshotArchitectTarget(state, presentation.focus);
|
|
9269
|
+
state = applyOperations(state, [operation]);
|
|
9270
|
+
const after = snapshotArchitectTarget(state, presentation.focus);
|
|
9271
|
+
return {
|
|
9272
|
+
operationId: operation.id,
|
|
9273
|
+
operationType: operation.type,
|
|
9274
|
+
presentation,
|
|
9275
|
+
before,
|
|
9276
|
+
after
|
|
9277
|
+
};
|
|
9278
|
+
});
|
|
9279
|
+
}
|
|
9280
|
+
|
|
9281
|
+
// src/architect/object-projection.ts
|
|
9282
|
+
function toDraftableObject(object2) {
|
|
9283
|
+
return {
|
|
9284
|
+
id: object2.id ?? object2.name,
|
|
9285
|
+
name: object2.name,
|
|
9286
|
+
label: object2.label,
|
|
9287
|
+
...object2.icon === void 0 ? {} : { icon: object2.icon }
|
|
9288
|
+
};
|
|
9289
|
+
}
|
|
9290
|
+
function toDraftableAttributes(object2) {
|
|
9291
|
+
const objectId = object2.id ?? object2.name;
|
|
9292
|
+
return (object2.attributes ?? []).map((attribute) => toDraftableAttribute(attribute, objectId));
|
|
9293
|
+
}
|
|
9294
|
+
function toDraftableAttribute(attribute, objectId) {
|
|
9295
|
+
const { id: _id, name: _name, label: _label, type: _type, ...config } = attribute;
|
|
9296
|
+
return {
|
|
9297
|
+
id: attribute.id ?? attribute.name,
|
|
9298
|
+
objectId,
|
|
9299
|
+
name: attribute.name,
|
|
9300
|
+
label: attribute.label ?? attribute.name,
|
|
9301
|
+
attributeType: attribute.type,
|
|
9302
|
+
config
|
|
9303
|
+
};
|
|
9304
|
+
}
|
|
9305
|
+
|
|
8556
9306
|
// src/architect/view-projection.ts
|
|
8557
9307
|
function toDraftableView(view) {
|
|
8558
9308
|
return {
|
|
@@ -8584,327 +9334,371 @@ function fromDraftableView(original, drafted) {
|
|
|
8584
9334
|
|
|
8585
9335
|
Object.defineProperty(exports, "asTenantId", {
|
|
8586
9336
|
enumerable: true,
|
|
8587
|
-
get: function () { return
|
|
9337
|
+
get: function () { return chunkK6ET4CXP_js.asTenantId; }
|
|
8588
9338
|
});
|
|
8589
9339
|
Object.defineProperty(exports, "asUserId", {
|
|
8590
9340
|
enumerable: true,
|
|
8591
|
-
get: function () { return
|
|
9341
|
+
get: function () { return chunkK6ET4CXP_js.asUserId; }
|
|
8592
9342
|
});
|
|
8593
9343
|
Object.defineProperty(exports, "canonicalStringify", {
|
|
8594
9344
|
enumerable: true,
|
|
8595
|
-
get: function () { return
|
|
9345
|
+
get: function () { return chunkK6ET4CXP_js.canonicalStringify; }
|
|
8596
9346
|
});
|
|
8597
9347
|
Object.defineProperty(exports, "deepEqual", {
|
|
8598
9348
|
enumerable: true,
|
|
8599
|
-
get: function () { return
|
|
9349
|
+
get: function () { return chunkK6ET4CXP_js.deepEqual; }
|
|
8600
9350
|
});
|
|
8601
9351
|
Object.defineProperty(exports, "generateId", {
|
|
8602
9352
|
enumerable: true,
|
|
8603
|
-
get: function () { return
|
|
9353
|
+
get: function () { return chunkK6ET4CXP_js.generateId; }
|
|
8604
9354
|
});
|
|
8605
9355
|
Object.defineProperty(exports, "indexBy", {
|
|
8606
9356
|
enumerable: true,
|
|
8607
|
-
get: function () { return
|
|
9357
|
+
get: function () { return chunkK6ET4CXP_js.indexBy; }
|
|
8608
9358
|
});
|
|
8609
9359
|
Object.defineProperty(exports, "ATTRIBUTE_FILTER_OPERATORS", {
|
|
8610
9360
|
enumerable: true,
|
|
8611
|
-
get: function () { return
|
|
9361
|
+
get: function () { return chunkYZ5RCMIQ_js.ATTRIBUTE_FILTER_OPERATORS; }
|
|
9362
|
+
});
|
|
9363
|
+
Object.defineProperty(exports, "LIST_TAB_KANBAN_KEYS", {
|
|
9364
|
+
enumerable: true,
|
|
9365
|
+
get: function () { return chunkYZ5RCMIQ_js.LIST_TAB_KANBAN_KEYS; }
|
|
9366
|
+
});
|
|
9367
|
+
Object.defineProperty(exports, "LIST_TAB_TABLE_KEYS", {
|
|
9368
|
+
enumerable: true,
|
|
9369
|
+
get: function () { return chunkYZ5RCMIQ_js.LIST_TAB_TABLE_KEYS; }
|
|
8612
9370
|
});
|
|
8613
9371
|
Object.defineProperty(exports, "LIST_VIEW_TAB_VISIBILITIES", {
|
|
8614
9372
|
enumerable: true,
|
|
8615
|
-
get: function () { return
|
|
9373
|
+
get: function () { return chunkYZ5RCMIQ_js.LIST_VIEW_TAB_VISIBILITIES; }
|
|
8616
9374
|
});
|
|
8617
9375
|
Object.defineProperty(exports, "NO_VALUE_OPERATORS", {
|
|
8618
9376
|
enumerable: true,
|
|
8619
|
-
get: function () { return
|
|
9377
|
+
get: function () { return chunkYZ5RCMIQ_js.NO_VALUE_OPERATORS; }
|
|
8620
9378
|
});
|
|
8621
9379
|
Object.defineProperty(exports, "OPERATORS_BY_TYPE", {
|
|
8622
9380
|
enumerable: true,
|
|
8623
|
-
get: function () { return
|
|
9381
|
+
get: function () { return chunkYZ5RCMIQ_js.OPERATORS_BY_TYPE; }
|
|
8624
9382
|
});
|
|
8625
9383
|
Object.defineProperty(exports, "REMOVED_OPERATOR_REPLACEMENTS", {
|
|
8626
9384
|
enumerable: true,
|
|
8627
|
-
get: function () { return
|
|
9385
|
+
get: function () { return chunkYZ5RCMIQ_js.REMOVED_OPERATOR_REPLACEMENTS; }
|
|
8628
9386
|
});
|
|
8629
9387
|
Object.defineProperty(exports, "RESERVED_ATTRIBUTE_NAMES", {
|
|
8630
9388
|
enumerable: true,
|
|
8631
|
-
get: function () { return
|
|
9389
|
+
get: function () { return chunkYZ5RCMIQ_js.RESERVED_ATTRIBUTE_NAMES; }
|
|
8632
9390
|
});
|
|
8633
9391
|
Object.defineProperty(exports, "RESERVED_OBJECT_NAMES", {
|
|
8634
9392
|
enumerable: true,
|
|
8635
|
-
get: function () { return
|
|
9393
|
+
get: function () { return chunkYZ5RCMIQ_js.RESERVED_OBJECT_NAMES; }
|
|
8636
9394
|
});
|
|
8637
9395
|
Object.defineProperty(exports, "RESOURCE_VISIBILITIES", {
|
|
8638
9396
|
enumerable: true,
|
|
8639
|
-
get: function () { return
|
|
9397
|
+
get: function () { return chunkYZ5RCMIQ_js.RESOURCE_VISIBILITIES; }
|
|
8640
9398
|
});
|
|
8641
9399
|
Object.defineProperty(exports, "SYNONYM_ALIASES", {
|
|
8642
9400
|
enumerable: true,
|
|
8643
|
-
get: function () { return
|
|
9401
|
+
get: function () { return chunkYZ5RCMIQ_js.SYNONYM_ALIASES; }
|
|
8644
9402
|
});
|
|
8645
9403
|
Object.defineProperty(exports, "SYSTEM_ATTRIBUTES", {
|
|
8646
9404
|
enumerable: true,
|
|
8647
|
-
get: function () { return
|
|
9405
|
+
get: function () { return chunkYZ5RCMIQ_js.SYSTEM_ATTRIBUTES; }
|
|
8648
9406
|
});
|
|
8649
9407
|
Object.defineProperty(exports, "SYSTEM_ATTRIBUTE_I18N_KEYS", {
|
|
8650
9408
|
enumerable: true,
|
|
8651
|
-
get: function () { return
|
|
9409
|
+
get: function () { return chunkYZ5RCMIQ_js.SYSTEM_ATTRIBUTE_I18N_KEYS; }
|
|
8652
9410
|
});
|
|
8653
9411
|
Object.defineProperty(exports, "SYSTEM_FIELD_NAMES", {
|
|
8654
9412
|
enumerable: true,
|
|
8655
|
-
get: function () { return
|
|
9413
|
+
get: function () { return chunkYZ5RCMIQ_js.SYSTEM_FIELD_NAMES; }
|
|
8656
9414
|
});
|
|
8657
9415
|
Object.defineProperty(exports, "SYSTEM_FILTER_ATTRIBUTE_TYPES", {
|
|
8658
9416
|
enumerable: true,
|
|
8659
|
-
get: function () { return
|
|
9417
|
+
get: function () { return chunkYZ5RCMIQ_js.SYSTEM_FILTER_ATTRIBUTE_TYPES; }
|
|
8660
9418
|
});
|
|
8661
9419
|
Object.defineProperty(exports, "canonicalizeFilterValue", {
|
|
8662
9420
|
enumerable: true,
|
|
8663
|
-
get: function () { return
|
|
9421
|
+
get: function () { return chunkYZ5RCMIQ_js.canonicalizeFilterValue; }
|
|
8664
9422
|
});
|
|
8665
9423
|
Object.defineProperty(exports, "collectQualifiedRuleIssues", {
|
|
8666
9424
|
enumerable: true,
|
|
8667
|
-
get: function () { return
|
|
9425
|
+
get: function () { return chunkYZ5RCMIQ_js.collectQualifiedRuleIssues; }
|
|
9426
|
+
});
|
|
9427
|
+
Object.defineProperty(exports, "columnsSchema", {
|
|
9428
|
+
enumerable: true,
|
|
9429
|
+
get: function () { return chunkYZ5RCMIQ_js.columnsSchema; }
|
|
8668
9430
|
});
|
|
8669
9431
|
Object.defineProperty(exports, "currentActor", {
|
|
8670
9432
|
enumerable: true,
|
|
8671
|
-
get: function () { return
|
|
9433
|
+
get: function () { return chunkYZ5RCMIQ_js.currentActor; }
|
|
9434
|
+
});
|
|
9435
|
+
Object.defineProperty(exports, "detailTabDraftSchema", {
|
|
9436
|
+
enumerable: true,
|
|
9437
|
+
get: function () { return chunkYZ5RCMIQ_js.detailTabDraftSchema; }
|
|
8672
9438
|
});
|
|
8673
9439
|
Object.defineProperty(exports, "detailTabSchema", {
|
|
8674
9440
|
enumerable: true,
|
|
8675
|
-
get: function () { return
|
|
9441
|
+
get: function () { return chunkYZ5RCMIQ_js.detailTabSchema; }
|
|
8676
9442
|
});
|
|
8677
9443
|
Object.defineProperty(exports, "detailViewConfigSchema", {
|
|
8678
9444
|
enumerable: true,
|
|
8679
|
-
get: function () { return
|
|
9445
|
+
get: function () { return chunkYZ5RCMIQ_js.detailViewConfigSchema; }
|
|
8680
9446
|
});
|
|
8681
9447
|
Object.defineProperty(exports, "extractCurrencyFilterValue", {
|
|
8682
9448
|
enumerable: true,
|
|
8683
|
-
get: function () { return
|
|
9449
|
+
get: function () { return chunkYZ5RCMIQ_js.extractCurrencyFilterValue; }
|
|
8684
9450
|
});
|
|
8685
9451
|
Object.defineProperty(exports, "extractFilterValue", {
|
|
8686
9452
|
enumerable: true,
|
|
8687
|
-
get: function () { return
|
|
9453
|
+
get: function () { return chunkYZ5RCMIQ_js.extractFilterValue; }
|
|
9454
|
+
});
|
|
9455
|
+
Object.defineProperty(exports, "fieldSchema", {
|
|
9456
|
+
enumerable: true,
|
|
9457
|
+
get: function () { return chunkYZ5RCMIQ_js.fieldSchema; }
|
|
9458
|
+
});
|
|
9459
|
+
Object.defineProperty(exports, "fieldShape", {
|
|
9460
|
+
enumerable: true,
|
|
9461
|
+
get: function () { return chunkYZ5RCMIQ_js.fieldShape; }
|
|
9462
|
+
});
|
|
9463
|
+
Object.defineProperty(exports, "fieldSlotSchema", {
|
|
9464
|
+
enumerable: true,
|
|
9465
|
+
get: function () { return chunkYZ5RCMIQ_js.fieldSlotSchema; }
|
|
9466
|
+
});
|
|
9467
|
+
Object.defineProperty(exports, "filterGroupSchema", {
|
|
9468
|
+
enumerable: true,
|
|
9469
|
+
get: function () { return chunkYZ5RCMIQ_js.filterGroupSchema; }
|
|
9470
|
+
});
|
|
9471
|
+
Object.defineProperty(exports, "filterStateSchema", {
|
|
9472
|
+
enumerable: true,
|
|
9473
|
+
get: function () { return chunkYZ5RCMIQ_js.filterStateSchema; }
|
|
8688
9474
|
});
|
|
8689
9475
|
Object.defineProperty(exports, "getAttributeCapabilities", {
|
|
8690
9476
|
enumerable: true,
|
|
8691
|
-
get: function () { return
|
|
9477
|
+
get: function () { return chunkYZ5RCMIQ_js.getAttributeCapabilities; }
|
|
8692
9478
|
});
|
|
8693
9479
|
Object.defineProperty(exports, "getAttributeFilterOperators", {
|
|
8694
9480
|
enumerable: true,
|
|
8695
|
-
get: function () { return
|
|
9481
|
+
get: function () { return chunkYZ5RCMIQ_js.getAttributeFilterOperators; }
|
|
8696
9482
|
});
|
|
8697
9483
|
Object.defineProperty(exports, "getOperatorPolarity", {
|
|
8698
9484
|
enumerable: true,
|
|
8699
|
-
get: function () { return
|
|
9485
|
+
get: function () { return chunkYZ5RCMIQ_js.getOperatorPolarity; }
|
|
8700
9486
|
});
|
|
8701
9487
|
Object.defineProperty(exports, "getRollupFilterOperators", {
|
|
8702
9488
|
enumerable: true,
|
|
8703
|
-
get: function () { return
|
|
9489
|
+
get: function () { return chunkYZ5RCMIQ_js.getRollupFilterOperators; }
|
|
8704
9490
|
});
|
|
8705
9491
|
Object.defineProperty(exports, "getSystemAttributeI18nKey", {
|
|
8706
9492
|
enumerable: true,
|
|
8707
|
-
get: function () { return
|
|
9493
|
+
get: function () { return chunkYZ5RCMIQ_js.getSystemAttributeI18nKey; }
|
|
8708
9494
|
});
|
|
8709
9495
|
Object.defineProperty(exports, "getSystemAttributeList", {
|
|
8710
9496
|
enumerable: true,
|
|
8711
|
-
get: function () { return
|
|
9497
|
+
get: function () { return chunkYZ5RCMIQ_js.getSystemAttributeList; }
|
|
9498
|
+
});
|
|
9499
|
+
Object.defineProperty(exports, "groupWriteSchema", {
|
|
9500
|
+
enumerable: true,
|
|
9501
|
+
get: function () { return chunkYZ5RCMIQ_js.groupWriteSchema; }
|
|
8712
9502
|
});
|
|
8713
9503
|
Object.defineProperty(exports, "inverseSourceSchema", {
|
|
8714
9504
|
enumerable: true,
|
|
8715
|
-
get: function () { return
|
|
9505
|
+
get: function () { return chunkYZ5RCMIQ_js.inverseSourceSchema; }
|
|
8716
9506
|
});
|
|
8717
9507
|
Object.defineProperty(exports, "isAttributeFilterable", {
|
|
8718
9508
|
enumerable: true,
|
|
8719
|
-
get: function () { return
|
|
9509
|
+
get: function () { return chunkYZ5RCMIQ_js.isAttributeFilterable; }
|
|
8720
9510
|
});
|
|
8721
9511
|
Object.defineProperty(exports, "isAttributeGroupable", {
|
|
8722
9512
|
enumerable: true,
|
|
8723
|
-
get: function () { return
|
|
9513
|
+
get: function () { return chunkYZ5RCMIQ_js.isAttributeGroupable; }
|
|
8724
9514
|
});
|
|
8725
9515
|
Object.defineProperty(exports, "isAttributeKanbanGroupable", {
|
|
8726
9516
|
enumerable: true,
|
|
8727
|
-
get: function () { return
|
|
9517
|
+
get: function () { return chunkYZ5RCMIQ_js.isAttributeKanbanGroupable; }
|
|
8728
9518
|
});
|
|
8729
9519
|
Object.defineProperty(exports, "isAttributeSearchable", {
|
|
8730
9520
|
enumerable: true,
|
|
8731
|
-
get: function () { return
|
|
9521
|
+
get: function () { return chunkYZ5RCMIQ_js.isAttributeSearchable; }
|
|
8732
9522
|
});
|
|
8733
9523
|
Object.defineProperty(exports, "isDynamicValue", {
|
|
8734
9524
|
enumerable: true,
|
|
8735
|
-
get: function () { return
|
|
9525
|
+
get: function () { return chunkYZ5RCMIQ_js.isDynamicValue; }
|
|
8736
9526
|
});
|
|
8737
9527
|
Object.defineProperty(exports, "isManagedSystemAttribute", {
|
|
8738
9528
|
enumerable: true,
|
|
8739
|
-
get: function () { return
|
|
9529
|
+
get: function () { return chunkYZ5RCMIQ_js.isManagedSystemAttribute; }
|
|
8740
9530
|
});
|
|
8741
9531
|
Object.defineProperty(exports, "isNoValueOperator", {
|
|
8742
9532
|
enumerable: true,
|
|
8743
|
-
get: function () { return
|
|
9533
|
+
get: function () { return chunkYZ5RCMIQ_js.isNoValueOperator; }
|
|
8744
9534
|
});
|
|
8745
9535
|
Object.defineProperty(exports, "isRelativeDateValue", {
|
|
8746
9536
|
enumerable: true,
|
|
8747
|
-
get: function () { return
|
|
9537
|
+
get: function () { return chunkYZ5RCMIQ_js.isRelativeDateValue; }
|
|
8748
9538
|
});
|
|
8749
9539
|
Object.defineProperty(exports, "isSetMembershipOperator", {
|
|
8750
9540
|
enumerable: true,
|
|
8751
|
-
get: function () { return
|
|
9541
|
+
get: function () { return chunkYZ5RCMIQ_js.isSetMembershipOperator; }
|
|
8752
9542
|
});
|
|
8753
9543
|
Object.defineProperty(exports, "listViewConfigSchema", {
|
|
8754
9544
|
enumerable: true,
|
|
8755
|
-
get: function () { return
|
|
9545
|
+
get: function () { return chunkYZ5RCMIQ_js.listViewConfigSchema; }
|
|
8756
9546
|
});
|
|
8757
9547
|
Object.defineProperty(exports, "listViewTabSchema", {
|
|
8758
9548
|
enumerable: true,
|
|
8759
|
-
get: function () { return
|
|
9549
|
+
get: function () { return chunkYZ5RCMIQ_js.listViewTabSchema; }
|
|
8760
9550
|
});
|
|
8761
9551
|
Object.defineProperty(exports, "normalizeFilterRule", {
|
|
8762
9552
|
enumerable: true,
|
|
8763
|
-
get: function () { return
|
|
9553
|
+
get: function () { return chunkYZ5RCMIQ_js.normalizeFilterRule; }
|
|
8764
9554
|
});
|
|
8765
9555
|
Object.defineProperty(exports, "normalizeForEdgeRpc", {
|
|
8766
9556
|
enumerable: true,
|
|
8767
|
-
get: function () { return
|
|
9557
|
+
get: function () { return chunkYZ5RCMIQ_js.normalizeForEdgeRpc; }
|
|
8768
9558
|
});
|
|
8769
9559
|
Object.defineProperty(exports, "normalizeOperator", {
|
|
8770
9560
|
enumerable: true,
|
|
8771
|
-
get: function () { return
|
|
9561
|
+
get: function () { return chunkYZ5RCMIQ_js.normalizeOperator; }
|
|
8772
9562
|
});
|
|
8773
9563
|
Object.defineProperty(exports, "now", {
|
|
8774
9564
|
enumerable: true,
|
|
8775
|
-
get: function () { return
|
|
9565
|
+
get: function () { return chunkYZ5RCMIQ_js.now; }
|
|
8776
9566
|
});
|
|
8777
9567
|
Object.defineProperty(exports, "parseResourceVisibility", {
|
|
8778
9568
|
enumerable: true,
|
|
8779
|
-
get: function () { return
|
|
9569
|
+
get: function () { return chunkYZ5RCMIQ_js.parseResourceVisibility; }
|
|
8780
9570
|
});
|
|
8781
9571
|
Object.defineProperty(exports, "parseViewConfig", {
|
|
8782
9572
|
enumerable: true,
|
|
8783
|
-
get: function () { return
|
|
9573
|
+
get: function () { return chunkYZ5RCMIQ_js.parseViewConfig; }
|
|
8784
9574
|
});
|
|
8785
9575
|
Object.defineProperty(exports, "relationSourceSchema", {
|
|
8786
9576
|
enumerable: true,
|
|
8787
|
-
get: function () { return
|
|
9577
|
+
get: function () { return chunkYZ5RCMIQ_js.relationSourceSchema; }
|
|
8788
9578
|
});
|
|
8789
9579
|
Object.defineProperty(exports, "resolveEffectiveFilterType", {
|
|
8790
9580
|
enumerable: true,
|
|
8791
|
-
get: function () { return
|
|
9581
|
+
get: function () { return chunkYZ5RCMIQ_js.resolveEffectiveFilterType; }
|
|
8792
9582
|
});
|
|
8793
9583
|
Object.defineProperty(exports, "resolveIsWithinBounds", {
|
|
8794
9584
|
enumerable: true,
|
|
8795
|
-
get: function () { return
|
|
9585
|
+
get: function () { return chunkYZ5RCMIQ_js.resolveIsWithinBounds; }
|
|
8796
9586
|
});
|
|
8797
9587
|
Object.defineProperty(exports, "resolveUtcDayBounds", {
|
|
8798
9588
|
enumerable: true,
|
|
8799
|
-
get: function () { return
|
|
9589
|
+
get: function () { return chunkYZ5RCMIQ_js.resolveUtcDayBounds; }
|
|
9590
|
+
});
|
|
9591
|
+
Object.defineProperty(exports, "sortsSchema", {
|
|
9592
|
+
enumerable: true,
|
|
9593
|
+
get: function () { return chunkYZ5RCMIQ_js.sortsSchema; }
|
|
8800
9594
|
});
|
|
8801
9595
|
Object.defineProperty(exports, "tableSourceSchema", {
|
|
8802
9596
|
enumerable: true,
|
|
8803
|
-
get: function () { return
|
|
9597
|
+
get: function () { return chunkYZ5RCMIQ_js.tableSourceSchema; }
|
|
8804
9598
|
});
|
|
8805
9599
|
Object.defineProperty(exports, "toMultiValueOperator", {
|
|
8806
9600
|
enumerable: true,
|
|
8807
|
-
get: function () { return
|
|
9601
|
+
get: function () { return chunkYZ5RCMIQ_js.toMultiValueOperator; }
|
|
8808
9602
|
});
|
|
8809
9603
|
Object.defineProperty(exports, "toUtcDayString", {
|
|
8810
9604
|
enumerable: true,
|
|
8811
|
-
get: function () { return
|
|
9605
|
+
get: function () { return chunkYZ5RCMIQ_js.toUtcDayString; }
|
|
8812
9606
|
});
|
|
8813
9607
|
Object.defineProperty(exports, "today", {
|
|
8814
9608
|
enumerable: true,
|
|
8815
|
-
get: function () { return
|
|
9609
|
+
get: function () { return chunkYZ5RCMIQ_js.today; }
|
|
8816
9610
|
});
|
|
8817
9611
|
Object.defineProperty(exports, "validateQualifiedRule", {
|
|
8818
9612
|
enumerable: true,
|
|
8819
|
-
get: function () { return
|
|
9613
|
+
get: function () { return chunkYZ5RCMIQ_js.validateQualifiedRule; }
|
|
8820
9614
|
});
|
|
8821
9615
|
Object.defineProperty(exports, "viewConfigByTypeSchema", {
|
|
8822
9616
|
enumerable: true,
|
|
8823
|
-
get: function () { return
|
|
9617
|
+
get: function () { return chunkYZ5RCMIQ_js.viewConfigByTypeSchema; }
|
|
8824
9618
|
});
|
|
8825
9619
|
Object.defineProperty(exports, "viewTypeSchema", {
|
|
8826
9620
|
enumerable: true,
|
|
8827
|
-
get: function () { return
|
|
9621
|
+
get: function () { return chunkYZ5RCMIQ_js.viewTypeSchema; }
|
|
8828
9622
|
});
|
|
8829
|
-
Object.defineProperty(exports, "
|
|
9623
|
+
Object.defineProperty(exports, "createFormAttributeValidator", {
|
|
8830
9624
|
enumerable: true,
|
|
8831
|
-
get: function () { return
|
|
9625
|
+
get: function () { return chunkI3EYILYO_js.createFormAttributeValidator; }
|
|
8832
9626
|
});
|
|
8833
|
-
Object.defineProperty(exports, "
|
|
9627
|
+
Object.defineProperty(exports, "isNullishOrEmptyString", {
|
|
8834
9628
|
enumerable: true,
|
|
8835
|
-
get: function () { return
|
|
9629
|
+
get: function () { return chunkI3EYILYO_js.isNullishOrEmptyString; }
|
|
8836
9630
|
});
|
|
8837
|
-
Object.defineProperty(exports, "
|
|
9631
|
+
Object.defineProperty(exports, "isValuePresent", {
|
|
8838
9632
|
enumerable: true,
|
|
8839
|
-
get: function () { return
|
|
9633
|
+
get: function () { return chunkI3EYILYO_js.isValuePresent; }
|
|
8840
9634
|
});
|
|
8841
|
-
Object.defineProperty(exports, "
|
|
9635
|
+
Object.defineProperty(exports, "rejectUnknownAttributesOrThrow", {
|
|
8842
9636
|
enumerable: true,
|
|
8843
|
-
get: function () { return
|
|
9637
|
+
get: function () { return chunkI3EYILYO_js.rejectUnknownAttributesOrThrow; }
|
|
8844
9638
|
});
|
|
8845
|
-
Object.defineProperty(exports, "
|
|
9639
|
+
Object.defineProperty(exports, "validateDraft", {
|
|
8846
9640
|
enumerable: true,
|
|
8847
|
-
get: function () { return
|
|
9641
|
+
get: function () { return chunkI3EYILYO_js.validateDraft; }
|
|
8848
9642
|
});
|
|
8849
|
-
Object.defineProperty(exports, "
|
|
9643
|
+
Object.defineProperty(exports, "validateDraftOrThrow", {
|
|
8850
9644
|
enumerable: true,
|
|
8851
|
-
get: function () { return
|
|
9645
|
+
get: function () { return chunkI3EYILYO_js.validateDraftOrThrow; }
|
|
8852
9646
|
});
|
|
8853
|
-
Object.defineProperty(exports, "
|
|
9647
|
+
Object.defineProperty(exports, "validateObject", {
|
|
8854
9648
|
enumerable: true,
|
|
8855
|
-
get: function () { return
|
|
9649
|
+
get: function () { return chunkI3EYILYO_js.validateObject; }
|
|
8856
9650
|
});
|
|
8857
|
-
Object.defineProperty(exports, "
|
|
9651
|
+
Object.defineProperty(exports, "validateObjectOrThrow", {
|
|
8858
9652
|
enumerable: true,
|
|
8859
|
-
get: function () { return
|
|
9653
|
+
get: function () { return chunkI3EYILYO_js.validateObjectOrThrow; }
|
|
8860
9654
|
});
|
|
8861
|
-
Object.defineProperty(exports, "
|
|
9655
|
+
Object.defineProperty(exports, "ComputedFormulaParseError", {
|
|
8862
9656
|
enumerable: true,
|
|
8863
|
-
get: function () { return
|
|
9657
|
+
get: function () { return chunkBOICAZHR_js.ComputedFormulaParseError; }
|
|
8864
9658
|
});
|
|
8865
|
-
Object.defineProperty(exports, "
|
|
9659
|
+
Object.defineProperty(exports, "SCHEMA_LIMITS", {
|
|
8866
9660
|
enumerable: true,
|
|
8867
|
-
get: function () { return
|
|
9661
|
+
get: function () { return chunkBOICAZHR_js.SCHEMA_LIMITS; }
|
|
8868
9662
|
});
|
|
8869
|
-
Object.defineProperty(exports, "
|
|
9663
|
+
Object.defineProperty(exports, "colorIdSchema", {
|
|
8870
9664
|
enumerable: true,
|
|
8871
|
-
get: function () { return
|
|
9665
|
+
get: function () { return chunkBOICAZHR_js.colorIdSchema; }
|
|
8872
9666
|
});
|
|
8873
|
-
Object.defineProperty(exports, "
|
|
9667
|
+
Object.defineProperty(exports, "iconNameSchema", {
|
|
8874
9668
|
enumerable: true,
|
|
8875
|
-
get: function () { return
|
|
9669
|
+
get: function () { return chunkBOICAZHR_js.iconNameSchema; }
|
|
8876
9670
|
});
|
|
8877
|
-
Object.defineProperty(exports, "
|
|
9671
|
+
Object.defineProperty(exports, "multiselectOptionWriteSchema", {
|
|
8878
9672
|
enumerable: true,
|
|
8879
|
-
get: function () { return
|
|
9673
|
+
get: function () { return chunkBOICAZHR_js.multiselectOptionWriteSchema; }
|
|
8880
9674
|
});
|
|
8881
|
-
Object.defineProperty(exports, "
|
|
9675
|
+
Object.defineProperty(exports, "parseAttributeConfig", {
|
|
8882
9676
|
enumerable: true,
|
|
8883
|
-
get: function () { return
|
|
9677
|
+
get: function () { return chunkBOICAZHR_js.parseAttributeConfig; }
|
|
8884
9678
|
});
|
|
8885
|
-
Object.defineProperty(exports, "
|
|
9679
|
+
Object.defineProperty(exports, "parseAttributeConfigForCreate", {
|
|
8886
9680
|
enumerable: true,
|
|
8887
|
-
get: function () { return
|
|
9681
|
+
get: function () { return chunkBOICAZHR_js.parseAttributeConfigForCreate; }
|
|
8888
9682
|
});
|
|
8889
|
-
Object.defineProperty(exports, "
|
|
9683
|
+
Object.defineProperty(exports, "parseAttributeConfigForUpdate", {
|
|
8890
9684
|
enumerable: true,
|
|
8891
|
-
get: function () { return
|
|
9685
|
+
get: function () { return chunkBOICAZHR_js.parseAttributeConfigForUpdate; }
|
|
8892
9686
|
});
|
|
8893
|
-
Object.defineProperty(exports, "
|
|
9687
|
+
Object.defineProperty(exports, "parseComputedFormula", {
|
|
8894
9688
|
enumerable: true,
|
|
8895
|
-
get: function () { return
|
|
9689
|
+
get: function () { return chunkBOICAZHR_js.parseComputedFormula; }
|
|
8896
9690
|
});
|
|
8897
|
-
Object.defineProperty(exports, "
|
|
9691
|
+
Object.defineProperty(exports, "selectOptionWriteSchema", {
|
|
8898
9692
|
enumerable: true,
|
|
8899
|
-
get: function () { return
|
|
9693
|
+
get: function () { return chunkBOICAZHR_js.selectOptionWriteSchema; }
|
|
8900
9694
|
});
|
|
8901
|
-
Object.defineProperty(exports, "
|
|
9695
|
+
Object.defineProperty(exports, "statusGroupSchema", {
|
|
8902
9696
|
enumerable: true,
|
|
8903
|
-
get: function () { return
|
|
9697
|
+
get: function () { return chunkBOICAZHR_js.statusGroupSchema; }
|
|
8904
9698
|
});
|
|
8905
|
-
Object.defineProperty(exports, "
|
|
9699
|
+
Object.defineProperty(exports, "statusOptionWriteSchema", {
|
|
8906
9700
|
enumerable: true,
|
|
8907
|
-
get: function () { return
|
|
9701
|
+
get: function () { return chunkBOICAZHR_js.statusOptionWriteSchema; }
|
|
8908
9702
|
});
|
|
8909
9703
|
Object.defineProperty(exports, "createCheckboxValidator", {
|
|
8910
9704
|
enumerable: true,
|
|
@@ -8932,155 +9726,155 @@ Object.defineProperty(exports, "resolveTextPattern", {
|
|
|
8932
9726
|
});
|
|
8933
9727
|
Object.defineProperty(exports, "AccessDeniedError", {
|
|
8934
9728
|
enumerable: true,
|
|
8935
|
-
get: function () { return
|
|
9729
|
+
get: function () { return chunkV26R64A4_js.AccessDeniedError; }
|
|
8936
9730
|
});
|
|
8937
9731
|
Object.defineProperty(exports, "AttributeInUseError", {
|
|
8938
9732
|
enumerable: true,
|
|
8939
|
-
get: function () { return
|
|
9733
|
+
get: function () { return chunkV26R64A4_js.AttributeInUseError; }
|
|
8940
9734
|
});
|
|
8941
9735
|
Object.defineProperty(exports, "AttributeNotFoundError", {
|
|
8942
9736
|
enumerable: true,
|
|
8943
|
-
get: function () { return
|
|
9737
|
+
get: function () { return chunkV26R64A4_js.AttributeNotFoundError; }
|
|
8944
9738
|
});
|
|
8945
9739
|
Object.defineProperty(exports, "ChangeTypeNotSupportedError", {
|
|
8946
9740
|
enumerable: true,
|
|
8947
|
-
get: function () { return
|
|
9741
|
+
get: function () { return chunkV26R64A4_js.ChangeTypeNotSupportedError; }
|
|
8948
9742
|
});
|
|
8949
9743
|
Object.defineProperty(exports, "ConcurrentModificationError", {
|
|
8950
9744
|
enumerable: true,
|
|
8951
|
-
get: function () { return
|
|
9745
|
+
get: function () { return chunkV26R64A4_js.ConcurrentModificationError; }
|
|
8952
9746
|
});
|
|
8953
9747
|
Object.defineProperty(exports, "DestructiveSyncNotAllowedError", {
|
|
8954
9748
|
enumerable: true,
|
|
8955
|
-
get: function () { return
|
|
9749
|
+
get: function () { return chunkV26R64A4_js.DestructiveSyncNotAllowedError; }
|
|
8956
9750
|
});
|
|
8957
9751
|
Object.defineProperty(exports, "DuplicateError", {
|
|
8958
9752
|
enumerable: true,
|
|
8959
|
-
get: function () { return
|
|
9753
|
+
get: function () { return chunkV26R64A4_js.DuplicateError; }
|
|
8960
9754
|
});
|
|
8961
9755
|
Object.defineProperty(exports, "ForbiddenError", {
|
|
8962
9756
|
enumerable: true,
|
|
8963
|
-
get: function () { return
|
|
9757
|
+
get: function () { return chunkV26R64A4_js.ForbiddenError; }
|
|
8964
9758
|
});
|
|
8965
9759
|
Object.defineProperty(exports, "MemoryNotFoundError", {
|
|
8966
9760
|
enumerable: true,
|
|
8967
|
-
get: function () { return
|
|
9761
|
+
get: function () { return chunkV26R64A4_js.MemoryNotFoundError; }
|
|
8968
9762
|
});
|
|
8969
9763
|
Object.defineProperty(exports, "MigrationTimeoutError", {
|
|
8970
9764
|
enumerable: true,
|
|
8971
|
-
get: function () { return
|
|
9765
|
+
get: function () { return chunkV26R64A4_js.MigrationTimeoutError; }
|
|
8972
9766
|
});
|
|
8973
9767
|
Object.defineProperty(exports, "NotFoundError", {
|
|
8974
9768
|
enumerable: true,
|
|
8975
|
-
get: function () { return
|
|
9769
|
+
get: function () { return chunkV26R64A4_js.NotFoundError; }
|
|
8976
9770
|
});
|
|
8977
9771
|
Object.defineProperty(exports, "NotImplementedError", {
|
|
8978
9772
|
enumerable: true,
|
|
8979
|
-
get: function () { return
|
|
9773
|
+
get: function () { return chunkV26R64A4_js.NotImplementedError; }
|
|
8980
9774
|
});
|
|
8981
9775
|
Object.defineProperty(exports, "ObjectNotFoundError", {
|
|
8982
9776
|
enumerable: true,
|
|
8983
|
-
get: function () { return
|
|
9777
|
+
get: function () { return chunkV26R64A4_js.ObjectNotFoundError; }
|
|
8984
9778
|
});
|
|
8985
9779
|
Object.defineProperty(exports, "ObjectReferencedError", {
|
|
8986
9780
|
enumerable: true,
|
|
8987
|
-
get: function () { return
|
|
9781
|
+
get: function () { return chunkV26R64A4_js.ObjectReferencedError; }
|
|
8988
9782
|
});
|
|
8989
9783
|
Object.defineProperty(exports, "OrphanSystemAttributeError", {
|
|
8990
9784
|
enumerable: true,
|
|
8991
|
-
get: function () { return
|
|
9785
|
+
get: function () { return chunkV26R64A4_js.OrphanSystemAttributeError; }
|
|
8992
9786
|
});
|
|
8993
9787
|
Object.defineProperty(exports, "ProtectedResourceError", {
|
|
8994
9788
|
enumerable: true,
|
|
8995
|
-
get: function () { return
|
|
9789
|
+
get: function () { return chunkV26R64A4_js.ProtectedResourceError; }
|
|
8996
9790
|
});
|
|
8997
9791
|
Object.defineProperty(exports, "ProtectedRoleError", {
|
|
8998
9792
|
enumerable: true,
|
|
8999
|
-
get: function () { return
|
|
9793
|
+
get: function () { return chunkV26R64A4_js.ProtectedRoleError; }
|
|
9000
9794
|
});
|
|
9001
9795
|
Object.defineProperty(exports, "RecordNotFoundError", {
|
|
9002
9796
|
enumerable: true,
|
|
9003
|
-
get: function () { return
|
|
9797
|
+
get: function () { return chunkV26R64A4_js.RecordNotFoundError; }
|
|
9004
9798
|
});
|
|
9005
9799
|
Object.defineProperty(exports, "RecordReferencedError", {
|
|
9006
9800
|
enumerable: true,
|
|
9007
|
-
get: function () { return
|
|
9801
|
+
get: function () { return chunkV26R64A4_js.RecordReferencedError; }
|
|
9008
9802
|
});
|
|
9009
9803
|
Object.defineProperty(exports, "RepositoryError", {
|
|
9010
9804
|
enumerable: true,
|
|
9011
|
-
get: function () { return
|
|
9805
|
+
get: function () { return chunkV26R64A4_js.RepositoryError; }
|
|
9012
9806
|
});
|
|
9013
9807
|
Object.defineProperty(exports, "RoleNotFoundError", {
|
|
9014
9808
|
enumerable: true,
|
|
9015
|
-
get: function () { return
|
|
9809
|
+
get: function () { return chunkV26R64A4_js.RoleNotFoundError; }
|
|
9016
9810
|
});
|
|
9017
9811
|
Object.defineProperty(exports, "SchemaError", {
|
|
9018
9812
|
enumerable: true,
|
|
9019
|
-
get: function () { return
|
|
9813
|
+
get: function () { return chunkV26R64A4_js.SchemaError; }
|
|
9020
9814
|
});
|
|
9021
9815
|
Object.defineProperty(exports, "SchemaErrorCode", {
|
|
9022
9816
|
enumerable: true,
|
|
9023
|
-
get: function () { return
|
|
9817
|
+
get: function () { return chunkV26R64A4_js.SchemaErrorCode; }
|
|
9024
9818
|
});
|
|
9025
9819
|
Object.defineProperty(exports, "SchemaPlanNotFoundError", {
|
|
9026
9820
|
enumerable: true,
|
|
9027
|
-
get: function () { return
|
|
9821
|
+
get: function () { return chunkV26R64A4_js.SchemaPlanNotFoundError; }
|
|
9028
9822
|
});
|
|
9029
9823
|
Object.defineProperty(exports, "SearchBackendError", {
|
|
9030
9824
|
enumerable: true,
|
|
9031
|
-
get: function () { return
|
|
9825
|
+
get: function () { return chunkV26R64A4_js.SearchBackendError; }
|
|
9032
9826
|
});
|
|
9033
9827
|
Object.defineProperty(exports, "StorageError", {
|
|
9034
9828
|
enumerable: true,
|
|
9035
|
-
get: function () { return
|
|
9829
|
+
get: function () { return chunkV26R64A4_js.StorageError; }
|
|
9036
9830
|
});
|
|
9037
9831
|
Object.defineProperty(exports, "SyncCascadeError", {
|
|
9038
9832
|
enumerable: true,
|
|
9039
|
-
get: function () { return
|
|
9833
|
+
get: function () { return chunkV26R64A4_js.SyncCascadeError; }
|
|
9040
9834
|
});
|
|
9041
9835
|
Object.defineProperty(exports, "SyncConflictError", {
|
|
9042
9836
|
enumerable: true,
|
|
9043
|
-
get: function () { return
|
|
9837
|
+
get: function () { return chunkV26R64A4_js.SyncConflictError; }
|
|
9044
9838
|
});
|
|
9045
9839
|
Object.defineProperty(exports, "SyncError", {
|
|
9046
9840
|
enumerable: true,
|
|
9047
|
-
get: function () { return
|
|
9841
|
+
get: function () { return chunkV26R64A4_js.SyncError; }
|
|
9048
9842
|
});
|
|
9049
9843
|
Object.defineProperty(exports, "SystemEntityImmutableError", {
|
|
9050
9844
|
enumerable: true,
|
|
9051
|
-
get: function () { return
|
|
9845
|
+
get: function () { return chunkV26R64A4_js.SystemEntityImmutableError; }
|
|
9052
9846
|
});
|
|
9053
9847
|
Object.defineProperty(exports, "ValidationError", {
|
|
9054
9848
|
enumerable: true,
|
|
9055
|
-
get: function () { return
|
|
9849
|
+
get: function () { return chunkV26R64A4_js.ValidationError; }
|
|
9056
9850
|
});
|
|
9057
9851
|
Object.defineProperty(exports, "isAttributeInUseError", {
|
|
9058
9852
|
enumerable: true,
|
|
9059
|
-
get: function () { return
|
|
9853
|
+
get: function () { return chunkV26R64A4_js.isAttributeInUseError; }
|
|
9060
9854
|
});
|
|
9061
9855
|
Object.defineProperty(exports, "isNotFoundError", {
|
|
9062
9856
|
enumerable: true,
|
|
9063
|
-
get: function () { return
|
|
9857
|
+
get: function () { return chunkV26R64A4_js.isNotFoundError; }
|
|
9064
9858
|
});
|
|
9065
9859
|
Object.defineProperty(exports, "isObjectReferencedError", {
|
|
9066
9860
|
enumerable: true,
|
|
9067
|
-
get: function () { return
|
|
9861
|
+
get: function () { return chunkV26R64A4_js.isObjectReferencedError; }
|
|
9068
9862
|
});
|
|
9069
9863
|
Object.defineProperty(exports, "isProtectedResourceError", {
|
|
9070
9864
|
enumerable: true,
|
|
9071
|
-
get: function () { return
|
|
9865
|
+
get: function () { return chunkV26R64A4_js.isProtectedResourceError; }
|
|
9072
9866
|
});
|
|
9073
9867
|
Object.defineProperty(exports, "isRecordReferencedError", {
|
|
9074
9868
|
enumerable: true,
|
|
9075
|
-
get: function () { return
|
|
9869
|
+
get: function () { return chunkV26R64A4_js.isRecordReferencedError; }
|
|
9076
9870
|
});
|
|
9077
9871
|
Object.defineProperty(exports, "isSchemaError", {
|
|
9078
9872
|
enumerable: true,
|
|
9079
|
-
get: function () { return
|
|
9873
|
+
get: function () { return chunkV26R64A4_js.isSchemaError; }
|
|
9080
9874
|
});
|
|
9081
9875
|
Object.defineProperty(exports, "isValidationError", {
|
|
9082
9876
|
enumerable: true,
|
|
9083
|
-
get: function () { return
|
|
9877
|
+
get: function () { return chunkV26R64A4_js.isValidationError; }
|
|
9084
9878
|
});
|
|
9085
9879
|
Object.defineProperty(exports, "DEFAULT_VALIDATION_MESSAGES", {
|
|
9086
9880
|
enumerable: true,
|
|
@@ -9096,6 +9890,7 @@ exports.ALLOWED_PROPERTY_TYPES = ALLOWED_PROPERTY_TYPES;
|
|
|
9096
9890
|
exports.ALL_ACTIONS = ALL_ACTIONS;
|
|
9097
9891
|
exports.ALL_OPERATION_TYPES = ALL_OPERATION_TYPES;
|
|
9098
9892
|
exports.ALL_SYSTEM_RESOURCES = ALL_SYSTEM_RESOURCES;
|
|
9893
|
+
exports.ATTRIBUTE_TYPES = ATTRIBUTE_TYPES;
|
|
9099
9894
|
exports.AUDIT_ACTIONS = AUDIT_ACTIONS;
|
|
9100
9895
|
exports.AUDIT_RESOURCE_TYPES = AUDIT_RESOURCE_TYPES;
|
|
9101
9896
|
exports.ActivityTabConfig = ActivityTabConfig;
|
|
@@ -9120,6 +9915,7 @@ exports.DEFAULT_ROLE_DESCRIPTIONS = DEFAULT_ROLE_DESCRIPTIONS;
|
|
|
9120
9915
|
exports.DEFAULT_ROLE_LABELS = DEFAULT_ROLE_LABELS;
|
|
9121
9916
|
exports.DEFAULT_ROLE_PERMISSIONS = DEFAULT_ROLE_PERMISSIONS;
|
|
9122
9917
|
exports.DOCUMENT_SYSTEM_ATTRIBUTES = DOCUMENT_SYSTEM_ATTRIBUTES;
|
|
9918
|
+
exports.DRAFTABLE_ATTRIBUTE_TYPES = DRAFTABLE_ATTRIBUTE_TYPES;
|
|
9123
9919
|
exports.DRIVE_LIST_VIEW = DRIVE_LIST_VIEW;
|
|
9124
9920
|
exports.DRIVE_OBJECT = DRIVE_OBJECT;
|
|
9125
9921
|
exports.DRIVE_OBJECT_NAME = DRIVE_OBJECT_NAME;
|
|
@@ -9165,6 +9961,7 @@ exports.NOTIFICATION_TYPE_AGENT_SESSION_WAITING_HUMAN = NOTIFICATION_TYPE_AGENT_
|
|
|
9165
9961
|
exports.NOTIFICATION_TYPE_AGENT_TASK_ASSIGNED = NOTIFICATION_TYPE_AGENT_TASK_ASSIGNED;
|
|
9166
9962
|
exports.NOTIFICATION_WORK_STATES = NOTIFICATION_WORK_STATES;
|
|
9167
9963
|
exports.NoopGeocodingAdapter = NoopGeocodingAdapter;
|
|
9964
|
+
exports.OBJECT_NAME_SCHEMA = OBJECT_NAME_SCHEMA;
|
|
9168
9965
|
exports.OPEN_TOOL_PART_STATES = OPEN_TOOL_PART_STATES;
|
|
9169
9966
|
exports.OPERATION_REGISTRY = OPERATION_REGISTRY;
|
|
9170
9967
|
exports.OPERATOR_SPECS = OPERATOR_SPECS;
|
|
@@ -9188,22 +9985,32 @@ exports.TODO_STATUSES = TODO_STATUSES;
|
|
|
9188
9985
|
exports.TOOL_APPROVAL_STATES = TOOL_APPROVAL_STATES;
|
|
9189
9986
|
exports.TabBuilder = TabBuilder;
|
|
9190
9987
|
exports.TableTabConfig = TableTabConfig;
|
|
9988
|
+
exports.UPDATE_TABLE_TAB_CHANGE_KEYS = UPDATE_TABLE_TAB_CHANGE_KEYS;
|
|
9989
|
+
exports.UPDATE_TAB_CHANGE_KEYS = UPDATE_TAB_CHANGE_KEYS;
|
|
9990
|
+
exports.UPDATE_TAB_CONFIG_CHANGE_KEYS = UPDATE_TAB_CONFIG_CHANGE_KEYS;
|
|
9191
9991
|
exports.USER_STATUSES = USER_STATUSES;
|
|
9192
9992
|
exports.USER_WORK_POSTURES = USER_WORK_POSTURES;
|
|
9193
9993
|
exports.accessLevelToActions = accessLevelToActions;
|
|
9194
9994
|
exports.actionsToAccessLevel = actionsToAccessLevel;
|
|
9195
9995
|
exports.agent = agent;
|
|
9996
|
+
exports.agentDataChunk = agentDataChunk;
|
|
9196
9997
|
exports.agentDisplayName = agentDisplayName;
|
|
9998
|
+
exports.agentMessageAttachmentSchema = agentMessageAttachmentSchema;
|
|
9999
|
+
exports.agentMessagePartSchema = agentMessagePartSchema;
|
|
10000
|
+
exports.agentSessionMessageSchema = agentSessionMessageSchema;
|
|
10001
|
+
exports.agentUIValidationError = agentUIValidationError;
|
|
9197
10002
|
exports.applyOperations = applyOperations;
|
|
9198
10003
|
exports.applyPipes = applyPipes;
|
|
9199
10004
|
exports.applyRelationProps = applyRelationProps;
|
|
9200
10005
|
exports.assertAcyclicComputedDependencies = assertAcyclicComputedDependencies;
|
|
10006
|
+
exports.assertCustomAgentUIMessageChunk = assertCustomAgentUIMessageChunk;
|
|
9201
10007
|
exports.booleanFlag = booleanFlag;
|
|
9202
10008
|
exports.buildAgentFallbackTitle = buildAgentFallbackTitle;
|
|
9203
10009
|
exports.buildPermissionFlags = buildPermissionFlags;
|
|
9204
10010
|
exports.buildPropertySchema = buildPropertySchema;
|
|
9205
10011
|
exports.buildQualifiedAttribute = buildQualifiedAttribute;
|
|
9206
10012
|
exports.checkbox = checkbox;
|
|
10013
|
+
exports.compareAgentSessionMessages = compareAgentSessionMessages;
|
|
9207
10014
|
exports.compileComputedFormula = compileComputedFormula;
|
|
9208
10015
|
exports.compileRollupAttribute = compileRollupAttribute;
|
|
9209
10016
|
exports.computeByteMagnitude = computeByteMagnitude;
|
|
@@ -9212,16 +10019,23 @@ exports.createFlagRegistry = createFlagRegistry;
|
|
|
9212
10019
|
exports.createFlagService = createFlagService;
|
|
9213
10020
|
exports.createStandardSchemaProps = createStandardSchemaProps;
|
|
9214
10021
|
exports.currency = currency;
|
|
10022
|
+
exports.customDataChunkSchemas = customDataChunkSchemas;
|
|
9215
10023
|
exports.date = date;
|
|
9216
10024
|
exports.dateInTimezone = dateInTimezone;
|
|
9217
10025
|
exports.dateValueStart = dateValueStart;
|
|
9218
10026
|
exports.defineOperation = defineOperation;
|
|
10027
|
+
exports.definePresentation = definePresentation;
|
|
10028
|
+
exports.deriveArchitectChanges = deriveArchitectChanges;
|
|
9219
10029
|
exports.deriveInitials = deriveInitials;
|
|
10030
|
+
exports.describeAttributeConfig = describeAttributeConfig;
|
|
10031
|
+
exports.describeOperationInput = describeOperationInput;
|
|
9220
10032
|
exports.describeOperations = describeOperations;
|
|
9221
10033
|
exports.destructiveSchema = destructiveSchema;
|
|
9222
10034
|
exports.detailView = detailView;
|
|
9223
10035
|
exports.document = document;
|
|
10036
|
+
exports.durableDateSchema = durableDateSchema;
|
|
9224
10037
|
exports.ensureFieldIds = ensureFieldIds;
|
|
10038
|
+
exports.episodeImpactOf = episodeImpactOf;
|
|
9225
10039
|
exports.evaluateComputedAst = evaluateComputedAst;
|
|
9226
10040
|
exports.evaluateComputedFormula = evaluateComputedFormula;
|
|
9227
10041
|
exports.evaluateComputedFormulaWithResult = evaluateComputedFormulaWithResult;
|
|
@@ -9255,6 +10069,7 @@ exports.hasOptions = hasOptions;
|
|
|
9255
10069
|
exports.includesAction = includesAction;
|
|
9256
10070
|
exports.inferInverseCardinality = inferInverseCardinality;
|
|
9257
10071
|
exports.inferRollupReturnType = inferRollupReturnType;
|
|
10072
|
+
exports.isAgentUIDataName = isAgentUIDataName;
|
|
9258
10073
|
exports.isAgentUIMessageBatch = isAgentUIMessageBatch;
|
|
9259
10074
|
exports.isAttributeSortable = isAttributeSortable2;
|
|
9260
10075
|
exports.isBilateralRelation = isBilateralRelation;
|
|
@@ -9290,17 +10105,21 @@ exports.isToolApprovalState = isToolApprovalState;
|
|
|
9290
10105
|
exports.isUniversalRelation = isUniversalRelation;
|
|
9291
10106
|
exports.jsonFlag = jsonFlag;
|
|
9292
10107
|
exports.legacyStatusToSessionState = legacyStatusToSessionState;
|
|
10108
|
+
exports.listDescribableNames = listDescribableNames;
|
|
9293
10109
|
exports.listView = listView;
|
|
9294
10110
|
exports.liveChannelKey = liveChannelKey;
|
|
9295
10111
|
exports.location = location;
|
|
9296
10112
|
exports.makeFieldId = makeFieldId;
|
|
9297
10113
|
exports.matchesAccepts = matchesAccepts;
|
|
10114
|
+
exports.mentionReferenceSchema = mentionReferenceSchema;
|
|
10115
|
+
exports.modelDefinitionSchema = modelDefinitionSchema;
|
|
9298
10116
|
exports.multiselect = multiselect;
|
|
9299
10117
|
exports.nativeAgentUIPartIdMetadataKey = nativeAgentUIPartIdMetadataKey;
|
|
9300
10118
|
exports.normalizeDateValue = normalizeDateValue;
|
|
9301
10119
|
exports.number = number;
|
|
9302
10120
|
exports.numberFlag = numberFlag;
|
|
9303
10121
|
exports.object = object;
|
|
10122
|
+
exports.orderAgentSessionMessages = orderAgentSessionMessages;
|
|
9304
10123
|
exports.parseCountMode = parseCountMode;
|
|
9305
10124
|
exports.parseLiveChannelKey = parseLiveChannelKey;
|
|
9306
10125
|
exports.parseNativeAgentUIPartIdsMetadata = parseNativeAgentUIPartIdsMetadata;
|
|
@@ -9313,6 +10132,7 @@ exports.phone = phone;
|
|
|
9313
10132
|
exports.plannedAttributeSchema = plannedAttributeSchema;
|
|
9314
10133
|
exports.plannedInlineAttributeSchema = plannedInlineAttributeSchema;
|
|
9315
10134
|
exports.plannedObjectSchema = plannedObjectSchema;
|
|
10135
|
+
exports.presentationOf = presentationOf;
|
|
9316
10136
|
exports.proposedDefaultViewTargetSchema = proposedDefaultViewTargetSchema;
|
|
9317
10137
|
exports.qualifiedPropertyDefs = qualifiedPropertyDefs;
|
|
9318
10138
|
exports.readFormFieldValue = readFormFieldValue;
|
|
@@ -9333,8 +10153,13 @@ exports.sessionStateToLegacyStatus = sessionStateToLegacyStatus;
|
|
|
9333
10153
|
exports.status = status;
|
|
9334
10154
|
exports.stringFlag = stringFlag;
|
|
9335
10155
|
exports.text = text;
|
|
10156
|
+
exports.toDraftableAttributes = toDraftableAttributes;
|
|
10157
|
+
exports.toDraftableObject = toDraftableObject;
|
|
9336
10158
|
exports.toDraftableView = toDraftableView;
|
|
9337
10159
|
exports.toUndefinedIfEmpty = toUndefinedIfEmpty;
|
|
10160
|
+
exports.todoItemSchema = todoItemSchema;
|
|
10161
|
+
exports.todoPlanSchema = todoPlanSchema;
|
|
10162
|
+
exports.toolImpactSchema = toolImpactSchema;
|
|
9338
10163
|
exports.user = user;
|
|
9339
10164
|
exports.validateAttributeName = validateAttributeName;
|
|
9340
10165
|
exports.validateLabelExpression = validateLabelExpression;
|