@stndrds/schema 1.0.0-alpha.281 → 1.0.0-alpha.282
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-BVp3k9Hi.d.ts → all-C3EaFLCU.d.ts} +4 -3
- package/dist/{all-CnIU2anT.d.mts → all-CQMswOrw.d.mts} +4 -3
- package/dist/{attributes-D8eHv5Kf.d.ts → attributes-CU871AfG.d.ts} +12 -12
- package/dist/{attributes--M1ifW8_.d.mts → attributes-DoiGyNFk.d.mts} +12 -12
- package/dist/{chunk-LRFLSFIA.js → chunk-DIMTNM3F.js} +7 -3
- package/dist/{chunk-XCLVXM7F.mjs → chunk-EFSS7PGC.mjs} +1 -1
- package/dist/{chunk-SYQDFZ74.mjs → chunk-HOVUEYEQ.mjs} +32 -0
- package/dist/{chunk-TU6ECJFZ.js → chunk-KIMECN6D.js} +65 -35
- package/dist/{chunk-HWZRSXFB.js → chunk-L4KLYMUI.js} +32 -0
- package/dist/{chunk-OYHBQMC7.js → chunk-LBGLB443.js} +3 -3
- package/dist/{chunk-MLTXSBOB.mjs → chunk-PLTLAMWJ.mjs} +1 -1
- package/dist/{chunk-ORPCS24B.mjs → chunk-QGRYOIHT.mjs} +34 -4
- package/dist/{chunk-A5PPZ2FM.mjs → chunk-R34LOMT7.mjs} +5 -1
- package/dist/{chunk-E47WAI5K.js → chunk-V4MZOTLV.js} +4 -4
- package/dist/exceptions.d.mts +20 -3
- package/dist/exceptions.d.ts +20 -3
- package/dist/exceptions.js +39 -39
- package/dist/exceptions.mjs +1 -1
- package/dist/{helpers-DyoPqiSz.d.ts → helpers-BNr-Dppk.d.ts} +3 -3
- package/dist/{helpers-BiABdSxK.d.mts → helpers-CfEOUBmB.d.mts} +3 -3
- package/dist/{index-TMlrIKAY.d.ts → index-Br7koyHF.d.ts} +41 -6
- package/dist/{index-DWoqObyG.d.mts → index-D9XBjFnu.d.mts} +41 -6
- package/dist/index.d.mts +320 -83
- package/dist/index.d.ts +320 -83
- package/dist/index.js +459 -251
- package/dist/index.mjs +229 -31
- package/dist/{migrations-B1kkIhIX.d.ts → migrations-BGWgXHXb.d.ts} +1 -1
- package/dist/{migrations-BNlQVzDC.d.mts → migrations-C-GN1xx_.d.mts} +1 -1
- package/dist/{objects-DmMqHn3L.d.mts → objects-BRypaBpi.d.mts} +2 -4
- package/dist/{objects-DgFojgwH.d.ts → objects-BiOMwzLL.d.ts} +2 -4
- package/dist/{types-DHqXzkgW.d.mts → types-80c2rOUZ.d.mts} +1 -1
- package/dist/{types-DYYFto8d.d.ts → types-DqYz8Iv_.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 +29 -29
- package/dist/validation/all.mjs +4 -4
- 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 +11 -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 +14 -14
- package/dist/validation/object/index.mjs +2 -2
- 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 +2 -2
package/dist/index.mjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { canonicalStringify, generateId } from './chunk-
|
|
2
|
-
export { asTenantId, asUserId, canonicalStringify, deepEqual, generateId, indexBy } from './chunk-
|
|
3
|
-
import { SYSTEM_FILTER_ATTRIBUTE_TYPES, RESERVED_OBJECT_NAMES, listViewConfigSchema, detailViewConfigSchema, LIST_VIEW_TAB_VISIBILITIES, RESERVED_ATTRIBUTE_NAMES, isAttributeSortable, getAttributeCapabilities, resolveIsWithinBounds, normalizeForEdgeRpc, getOperatorPolarity, extractCurrencyFilterValue } from './chunk-
|
|
4
|
-
export { ATTRIBUTE_FILTER_OPERATORS, LIST_VIEW_TAB_VISIBILITIES, NO_VALUE_OPERATORS, OPERATORS_BY_TYPE, REMOVED_OPERATOR_REPLACEMENTS, RESERVED_ATTRIBUTE_NAMES, RESERVED_OBJECT_NAMES, RESOURCE_VISIBILITIES, SYNONYM_ALIASES, SYSTEM_ATTRIBUTES, SYSTEM_ATTRIBUTE_I18N_KEYS, SYSTEM_FIELD_NAMES, SYSTEM_FILTER_ATTRIBUTE_TYPES, canonicalizeFilterValue, collectQualifiedRuleIssues, currentActor, detailTabSchema, detailViewConfigSchema, extractCurrencyFilterValue, extractFilterValue, getAttributeCapabilities, getAttributeFilterOperators, getOperatorPolarity, getRollupFilterOperators, getSystemAttributeI18nKey, getSystemAttributeList, inverseSourceSchema, isAttributeFilterable, isAttributeGroupable, isAttributeKanbanGroupable, isAttributeSearchable, isDynamicValue, isManagedSystemAttribute, isNoValueOperator, isRelativeDateValue, isSetMembershipOperator, listViewConfigSchema, listViewTabSchema, normalizeFilterRule, normalizeForEdgeRpc, normalizeOperator, now, parseResourceVisibility, parseViewConfig, relationSourceSchema, resolveEffectiveFilterType, resolveIsWithinBounds, resolveUtcDayBounds, tableSourceSchema, toMultiValueOperator, toUtcDayString, today, validateQualifiedRule, viewConfigByTypeSchema, viewTypeSchema } from './chunk-
|
|
5
|
-
import { iconNameSchema, parseAttributeConfigForCreate, parseComputedFormula } from './chunk-
|
|
6
|
-
export { ComputedFormulaParseError, SCHEMA_LIMITS, colorIdSchema, iconNameSchema, multiselectOptionWriteSchema, parseAttributeConfig, parseAttributeConfigForCreate, parseAttributeConfigForUpdate, parseComputedFormula, selectOptionWriteSchema, statusGroupSchema, statusOptionWriteSchema } from './chunk-
|
|
7
|
-
import { createObjectValidator, createAttributeValidator, isNullishOrEmptyString } from './chunk-
|
|
8
|
-
export { createFormAttributeValidator, isNullishOrEmptyString, isValuePresent, rejectUnknownAttributesOrThrow, validateDraft, validateDraftOrThrow, validateObject, validateObjectOrThrow } from './chunk-
|
|
1
|
+
import { canonicalStringify, generateId } from './chunk-EFSS7PGC.mjs';
|
|
2
|
+
export { asTenantId, asUserId, canonicalStringify, deepEqual, generateId, indexBy } from './chunk-EFSS7PGC.mjs';
|
|
3
|
+
import { SYSTEM_FILTER_ATTRIBUTE_TYPES, RESERVED_OBJECT_NAMES, listViewConfigSchema, detailViewConfigSchema, LIST_VIEW_TAB_VISIBILITIES, RESERVED_ATTRIBUTE_NAMES, isAttributeSortable, getAttributeCapabilities, resolveIsWithinBounds, normalizeForEdgeRpc, getOperatorPolarity, extractCurrencyFilterValue } from './chunk-QGRYOIHT.mjs';
|
|
4
|
+
export { ATTRIBUTE_FILTER_OPERATORS, LIST_VIEW_TAB_VISIBILITIES, NO_VALUE_OPERATORS, OPERATORS_BY_TYPE, REMOVED_OPERATOR_REPLACEMENTS, RESERVED_ATTRIBUTE_NAMES, RESERVED_OBJECT_NAMES, RESOURCE_VISIBILITIES, SYNONYM_ALIASES, SYSTEM_ATTRIBUTES, SYSTEM_ATTRIBUTE_I18N_KEYS, SYSTEM_FIELD_NAMES, SYSTEM_FILTER_ATTRIBUTE_TYPES, canonicalizeFilterValue, collectQualifiedRuleIssues, currentActor, detailTabSchema, detailViewConfigSchema, extractCurrencyFilterValue, extractFilterValue, getAttributeCapabilities, getAttributeFilterOperators, getOperatorPolarity, getRollupFilterOperators, getSystemAttributeI18nKey, getSystemAttributeList, inverseSourceSchema, isAttributeFilterable, isAttributeGroupable, isAttributeKanbanGroupable, isAttributeSearchable, isDynamicValue, isManagedSystemAttribute, isNoValueOperator, isRelativeDateValue, isSetMembershipOperator, listViewConfigSchema, listViewTabSchema, normalizeFilterRule, normalizeForEdgeRpc, normalizeOperator, now, parseResourceVisibility, parseViewConfig, relationSourceSchema, resolveEffectiveFilterType, resolveIsWithinBounds, resolveUtcDayBounds, tableSourceSchema, toMultiValueOperator, toUtcDayString, today, validateQualifiedRule, viewConfigByTypeSchema, viewTypeSchema } from './chunk-QGRYOIHT.mjs';
|
|
5
|
+
import { iconNameSchema, parseAttributeConfigForCreate, parseComputedFormula } from './chunk-R34LOMT7.mjs';
|
|
6
|
+
export { ComputedFormulaParseError, SCHEMA_LIMITS, colorIdSchema, iconNameSchema, multiselectOptionWriteSchema, parseAttributeConfig, parseAttributeConfigForCreate, parseAttributeConfigForUpdate, parseComputedFormula, selectOptionWriteSchema, statusGroupSchema, statusOptionWriteSchema } from './chunk-R34LOMT7.mjs';
|
|
7
|
+
import { createObjectValidator, createAttributeValidator, isNullishOrEmptyString } from './chunk-PLTLAMWJ.mjs';
|
|
8
|
+
export { createFormAttributeValidator, isNullishOrEmptyString, isValuePresent, rejectUnknownAttributesOrThrow, validateDraft, validateDraftOrThrow, validateObject, validateObjectOrThrow } from './chunk-PLTLAMWJ.mjs';
|
|
9
9
|
import './chunk-QVLQPW3O.mjs';
|
|
10
10
|
import './chunk-ZDQ5AP26.mjs';
|
|
11
11
|
import './chunk-LV3FEUKU.mjs';
|
|
@@ -15,8 +15,8 @@ export { createCheckboxValidator } from './chunk-OSSGN43B.mjs';
|
|
|
15
15
|
export { createDateValidator } from './chunk-Q44QKLN4.mjs';
|
|
16
16
|
export { createNumberValidator } from './chunk-UANQJ2GH.mjs';
|
|
17
17
|
export { TEXT_FORMAT_PATTERNS, createTextValidator, resolveTextPattern } from './chunk-O73ROMWQ.mjs';
|
|
18
|
-
import { SchemaError, SchemaErrorCode, ValidationError, DuplicateError, NotFoundError } from './chunk-
|
|
19
|
-
export { AccessDeniedError, AttributeInUseError, AttributeNotFoundError, ChangeTypeNotSupportedError, ConcurrentModificationError, DestructiveSyncNotAllowedError, DuplicateError, ForbiddenError, MemoryNotFoundError, MigrationTimeoutError, NotFoundError, NotImplementedError, ObjectNotFoundError, ObjectReferencedError, OrphanSystemAttributeError, ProtectedResourceError, ProtectedRoleError, RecordNotFoundError, RecordReferencedError, RepositoryError, RoleNotFoundError, SchemaError, SchemaErrorCode, SchemaPlanNotFoundError, SearchBackendError, StorageError, SyncCascadeError, SyncConflictError, SyncError, SystemEntityImmutableError, ValidationError, isAttributeInUseError, isNotFoundError, isObjectReferencedError, isProtectedResourceError, isRecordReferencedError, isSchemaError, isValidationError } from './chunk-
|
|
18
|
+
import { SchemaError, SchemaErrorCode, ValidationError, DuplicateError, NotFoundError } from './chunk-HOVUEYEQ.mjs';
|
|
19
|
+
export { AccessDeniedError, AttributeInUseError, AttributeNotFoundError, ChangeTypeNotSupportedError, ConcurrentModificationError, DestructiveSyncNotAllowedError, DuplicateError, ForbiddenError, MemoryNotFoundError, MigrationTimeoutError, NotFoundError, NotImplementedError, ObjectNotFoundError, ObjectReferencedError, OrphanSystemAttributeError, ProtectedResourceError, ProtectedRoleError, RecordNotFoundError, RecordReferencedError, RepositoryError, RoleNotFoundError, SchemaError, SchemaErrorCode, SchemaPlanNotFoundError, SearchBackendError, StorageError, SyncCascadeError, SyncConflictError, SyncError, SystemEntityImmutableError, ValidationError, isAttributeInUseError, isNotFoundError, isObjectReferencedError, isProtectedResourceError, isRecordReferencedError, isSchemaError, isValidationError } from './chunk-HOVUEYEQ.mjs';
|
|
20
20
|
import './chunk-AYVHMVKQ.mjs';
|
|
21
21
|
import './chunk-YUFTHPOE.mjs';
|
|
22
22
|
import { formatPhoneForDisplay, normalizeCountrylessPhoneNumber, normalizePhoneNumber } from './chunk-R5LAJCBU.mjs';
|
|
@@ -205,6 +205,18 @@ var TODO_PLAN_STATUSES = ["active", "completed", "abandoned"];
|
|
|
205
205
|
function agentDisplayName(agent2) {
|
|
206
206
|
return agent2.label?.trim() || agent2.name;
|
|
207
207
|
}
|
|
208
|
+
var TOOL_APPROVAL_STATES = [
|
|
209
|
+
"approval-requested",
|
|
210
|
+
"approval-responded",
|
|
211
|
+
"approval-dispatched"
|
|
212
|
+
];
|
|
213
|
+
var OPEN_TOOL_PART_STATES = ["streaming", "running", ...TOOL_APPROVAL_STATES];
|
|
214
|
+
function isOpenToolPartState(state) {
|
|
215
|
+
return OPEN_TOOL_PART_STATES.includes(state);
|
|
216
|
+
}
|
|
217
|
+
function isToolApprovalState(state) {
|
|
218
|
+
return TOOL_APPROVAL_STATES.includes(state);
|
|
219
|
+
}
|
|
208
220
|
var TODO_STATUSES = ["pending", "in_progress", "completed", "blocked"];
|
|
209
221
|
var MAX_TODOS = 50;
|
|
210
222
|
var MAX_TODO_ID_CHARS = 80;
|
|
@@ -308,6 +320,15 @@ function resolveFieldRequired(input) {
|
|
|
308
320
|
function getSlotFieldTargets(field) {
|
|
309
321
|
return field.additionalSlotIds?.length ? [field.slotId, ...field.additionalSlotIds] : [field.slotId];
|
|
310
322
|
}
|
|
323
|
+
function formFieldKey(field) {
|
|
324
|
+
return isFormSlotFieldRef(field) ? `${field.slotId}.${field.attribute}` : `free.${field.attribute.name}`;
|
|
325
|
+
}
|
|
326
|
+
function formFieldFlatKey(field) {
|
|
327
|
+
return isFormSlotFieldRef(field) ? field.attribute : field.attribute.name;
|
|
328
|
+
}
|
|
329
|
+
function readFormFieldValue(values, field) {
|
|
330
|
+
return values[formFieldKey(field)] ?? values[formFieldFlatKey(field)];
|
|
331
|
+
}
|
|
311
332
|
|
|
312
333
|
// src/types/forms/rows.ts
|
|
313
334
|
function isFormFieldsRow(row) {
|
|
@@ -395,8 +416,7 @@ function parseCountMode(value) {
|
|
|
395
416
|
return value;
|
|
396
417
|
}
|
|
397
418
|
throw new ValidationError(
|
|
398
|
-
|
|
399
|
-
"countMode must be one of: " + COUNT_MODES.join(", ") + " (received: " + String(value) + ")",
|
|
419
|
+
`countMode must be one of: ${COUNT_MODES.join(", ")} (received: ${String(value)})`,
|
|
400
420
|
[]
|
|
401
421
|
);
|
|
402
422
|
}
|
|
@@ -868,6 +888,12 @@ function relationPropertyDefs(attribute) {
|
|
|
868
888
|
if (attribute?.type !== "relation") return void 0;
|
|
869
889
|
return attribute.properties?.definitions;
|
|
870
890
|
}
|
|
891
|
+
function qualifiedPropertyDefs(attribute) {
|
|
892
|
+
if (attribute?.type === "relation" || attribute?.type === "document") {
|
|
893
|
+
return attribute.properties?.definitions;
|
|
894
|
+
}
|
|
895
|
+
return void 0;
|
|
896
|
+
}
|
|
871
897
|
function extractValueRefs(value) {
|
|
872
898
|
if (isNullishOrEmptyString(value)) return [];
|
|
873
899
|
if (typeof value === "string") return [{ id: value }];
|
|
@@ -2131,6 +2157,16 @@ var RollupAttributeBuilder = class extends BaseAttributeBuilder {
|
|
|
2131
2157
|
this.attr.targetAttributeOptions = options;
|
|
2132
2158
|
return this;
|
|
2133
2159
|
}
|
|
2160
|
+
/**
|
|
2161
|
+
* Set the currency code a sum/avg over a currency target renders with
|
|
2162
|
+
* (#2644). Mirror of the target attribute's `defaultCurrency` — the stored
|
|
2163
|
+
* value stays a bare number; this only carries the symbol to the screen.
|
|
2164
|
+
* @param code - ISO 4217 code (e.g. "EUR")
|
|
2165
|
+
*/
|
|
2166
|
+
targetCurrency(code) {
|
|
2167
|
+
this.attr.targetCurrencyCode = code;
|
|
2168
|
+
return this;
|
|
2169
|
+
}
|
|
2134
2170
|
/**
|
|
2135
2171
|
* Build the attribute, validating computed-field configuration eagerly so a
|
|
2136
2172
|
* misconfiguration surfaces at schema-definition time (with a fix-it hint)
|
|
@@ -5283,6 +5319,9 @@ var LIVE_EVENT_TYPE_REGISTRY = {
|
|
|
5283
5319
|
"notification.count.patch": true,
|
|
5284
5320
|
"conversation.renamed": true,
|
|
5285
5321
|
"browser.preview.updated": true,
|
|
5322
|
+
"reflex.state.changed": true,
|
|
5323
|
+
"reflex.run.completed": true,
|
|
5324
|
+
"reflex.authoring.progress": true,
|
|
5286
5325
|
"channel.revoked": true
|
|
5287
5326
|
};
|
|
5288
5327
|
var LIVE_EVENT_TYPES = Object.keys(LIVE_EVENT_TYPE_REGISTRY);
|
|
@@ -5386,6 +5425,12 @@ function isLiveEventPayloadForType(type, payload) {
|
|
|
5386
5425
|
return isConversationRenamedPayload(payload);
|
|
5387
5426
|
case "browser.preview.updated":
|
|
5388
5427
|
return isBrowserPreviewUpdatedPayload(payload);
|
|
5428
|
+
case "reflex.state.changed":
|
|
5429
|
+
return isReflexStateChangedPayload(payload);
|
|
5430
|
+
case "reflex.run.completed":
|
|
5431
|
+
return isReflexRunCompletedPayload(payload);
|
|
5432
|
+
case "reflex.authoring.progress":
|
|
5433
|
+
return isReflexAuthoringProgressPayload(payload);
|
|
5389
5434
|
case "channel.revoked":
|
|
5390
5435
|
return isChannelRevokedPayload(payload);
|
|
5391
5436
|
default:
|
|
@@ -5460,7 +5505,9 @@ function isRecordFieldPatch(value) {
|
|
|
5460
5505
|
return isRecord2(value) && hasString(value, "fieldKey") && Object.hasOwn(value, "value") && hasVersion(value, "version");
|
|
5461
5506
|
}
|
|
5462
5507
|
function isRecordPatchPayload(payload) {
|
|
5463
|
-
return payload.type === "record.patch" && hasString(payload, "objectId") && hasString(payload, "recordId") && hasVersion(payload, "recordVersion") && hasOptional(payload, "label", isString) && hasOptional(payload, "metadata", isRecord2) &&
|
|
5508
|
+
return payload.type === "record.patch" && hasString(payload, "objectId") && hasString(payload, "recordId") && hasVersion(payload, "recordVersion") && hasOptional(payload, "label", isString) && hasOptional(payload, "metadata", isRecord2) && // Strictly `true`: the applier evicts an entity on this bit, so truthy
|
|
5509
|
+
// junk on the wire must not pass as the presence flag (#2637).
|
|
5510
|
+
hasOptional(payload, "fieldsWithheld", (value) => value === true) && Array.isArray(payload.fieldPatches) && payload.fieldPatches.every(isRecordFieldPatch) && hasString(payload, "updatedAt");
|
|
5464
5511
|
}
|
|
5465
5512
|
function isRecordDeletedPayload(payload) {
|
|
5466
5513
|
return payload.type === "record.deleted" && hasString(payload, "objectId") && hasString(payload, "recordId") && hasVersion(payload, "recordVersion") && hasString(payload, "deletedAt");
|
|
@@ -5516,6 +5563,27 @@ function isBrowserPreviewUpdatedPayload(payload) {
|
|
|
5516
5563
|
const preview = payload.preview;
|
|
5517
5564
|
return payload.type === "browser.preview.updated" && hasOnlyKeys(payload, BROWSER_PREVIEW_UPDATED_PAYLOAD_KEYS) && isRecord2(preview) && hasOnlyKeys(preview, BROWSER_PREVIEW_DESCRIPTOR_KEYS) && hasNonEmptyString(preview, "previewId") && hasNonEmptyString(preview, "rootSessionId") && hasNonEmptyString(preview, "agentSessionId") && hasNonEmptyString(preview, "browserSession") && isOneOf(preview.status, BROWSER_PREVIEW_STATUSES) && hasVersion(preview, "sequence") && hasIsoDateString(preview, "updatedAt") && preview.previewId === `browser:${preview.agentSessionId}:${preview.browserSession}`;
|
|
5518
5565
|
}
|
|
5566
|
+
var REFLEX_STATES = ["armed", "disarmed"];
|
|
5567
|
+
var REFLEX_AUTHORING_STATUSES = [
|
|
5568
|
+
"authoring",
|
|
5569
|
+
"compiling",
|
|
5570
|
+
"replaying",
|
|
5571
|
+
"promoted",
|
|
5572
|
+
"failed"
|
|
5573
|
+
];
|
|
5574
|
+
var REFLEX_SERVED_MODES = [
|
|
5575
|
+
"promoted",
|
|
5576
|
+
"lkg"
|
|
5577
|
+
];
|
|
5578
|
+
function isReflexStateChangedPayload(payload) {
|
|
5579
|
+
return payload.type === "reflex.state.changed" && hasNonEmptyString(payload, "reflexId") && isOneOf(payload.state, REFLEX_STATES) && hasIsoDateString(payload, "updatedAt");
|
|
5580
|
+
}
|
|
5581
|
+
function isReflexRunCompletedPayload(payload) {
|
|
5582
|
+
return payload.type === "reflex.run.completed" && hasNonEmptyString(payload, "reflexId") && hasNonEmptyString(payload, "runId") && isOneOf(payload.served, REFLEX_SERVED_MODES) && hasVersion(payload, "version") && hasVersion(payload, "wallMs") && hasIsoDateString(payload, "completedAt");
|
|
5583
|
+
}
|
|
5584
|
+
function isReflexAuthoringProgressPayload(payload) {
|
|
5585
|
+
return payload.type === "reflex.authoring.progress" && hasNonEmptyString(payload, "reflexId") && isOneOf(payload.status, REFLEX_AUTHORING_STATUSES) && hasIsoDateString(payload, "updatedAt");
|
|
5586
|
+
}
|
|
5519
5587
|
function isChannelRevokedPayload(payload) {
|
|
5520
5588
|
return payload.type === "channel.revoked" && hasString(payload, "channel") && isOneOf(payload.reason, CHANNEL_REVOKED_REASONS);
|
|
5521
5589
|
}
|
|
@@ -6305,7 +6373,11 @@ function evaluateCallNode(functionName, args, input) {
|
|
|
6305
6373
|
assertComputedFunctionName(functionName);
|
|
6306
6374
|
validateArity(functionName, args.length);
|
|
6307
6375
|
if (functionName === "if") {
|
|
6308
|
-
|
|
6376
|
+
const condition = evaluateAst(args[0], input);
|
|
6377
|
+
if (condition === null) {
|
|
6378
|
+
return null;
|
|
6379
|
+
}
|
|
6380
|
+
return condition ? evaluateAst(args[1], input) : evaluateAst(args[2], input);
|
|
6309
6381
|
}
|
|
6310
6382
|
return evaluateCall(
|
|
6311
6383
|
functionName,
|
|
@@ -6351,8 +6423,10 @@ function evaluateBinary(operator, left, right) {
|
|
|
6351
6423
|
return compareWith(left, right, (result) => result <= 0);
|
|
6352
6424
|
case "==":
|
|
6353
6425
|
return equalScalar(left, right);
|
|
6354
|
-
case "!=":
|
|
6355
|
-
|
|
6426
|
+
case "!=": {
|
|
6427
|
+
const equal = equalScalar(left, right);
|
|
6428
|
+
return equal === null ? null : !equal;
|
|
6429
|
+
}
|
|
6356
6430
|
default:
|
|
6357
6431
|
return unreachable(operator);
|
|
6358
6432
|
}
|
|
@@ -6368,6 +6442,9 @@ function compareWith(left, right, predicate) {
|
|
|
6368
6442
|
return result === null ? null : predicate(result);
|
|
6369
6443
|
}
|
|
6370
6444
|
function compare(left, right) {
|
|
6445
|
+
if (!areCommensurable([left, right])) {
|
|
6446
|
+
return null;
|
|
6447
|
+
}
|
|
6371
6448
|
const leftNumber = toFiniteNumber(left);
|
|
6372
6449
|
const rightNumber = toFiniteNumber(right);
|
|
6373
6450
|
if (leftNumber !== null && rightNumber !== null) {
|
|
@@ -6384,6 +6461,9 @@ function equalScalar(left, right) {
|
|
|
6384
6461
|
if (left === null || left === void 0 || right === null || right === void 0) {
|
|
6385
6462
|
return false;
|
|
6386
6463
|
}
|
|
6464
|
+
if (!areCommensurable([left, right])) {
|
|
6465
|
+
return null;
|
|
6466
|
+
}
|
|
6387
6467
|
return compare(left, right) === 0;
|
|
6388
6468
|
}
|
|
6389
6469
|
function assertComputedFunctionName(name) {
|
|
@@ -6404,8 +6484,14 @@ function evaluateCall(functionName, args) {
|
|
|
6404
6484
|
case "concat":
|
|
6405
6485
|
return args.filter((arg) => arg !== null && arg !== void 0).map(String).join("");
|
|
6406
6486
|
case "sum":
|
|
6487
|
+
if (!areCommensurable(args)) {
|
|
6488
|
+
return null;
|
|
6489
|
+
}
|
|
6407
6490
|
return numericValues(args).reduce((total, value) => total + value, 0);
|
|
6408
6491
|
case "avg": {
|
|
6492
|
+
if (!areCommensurable(args)) {
|
|
6493
|
+
return null;
|
|
6494
|
+
}
|
|
6409
6495
|
const values = numericValues(args);
|
|
6410
6496
|
return values.length > 0 ? values.reduce((total, value) => total + value, 0) / values.length : null;
|
|
6411
6497
|
}
|
|
@@ -6443,7 +6529,22 @@ function unreachable(value) {
|
|
|
6443
6529
|
function numericValues(values) {
|
|
6444
6530
|
return flatten(values).map(toFiniteNumber).filter((value) => value !== null);
|
|
6445
6531
|
}
|
|
6532
|
+
function areCommensurable(values) {
|
|
6533
|
+
const codes = /* @__PURE__ */ new Set();
|
|
6534
|
+
for (const value of flatten(values)) {
|
|
6535
|
+
if (isCurrencyValue(value)) {
|
|
6536
|
+
codes.add(currencyCode(value));
|
|
6537
|
+
}
|
|
6538
|
+
}
|
|
6539
|
+
return codes.size <= 1;
|
|
6540
|
+
}
|
|
6541
|
+
function currencyCode(value) {
|
|
6542
|
+
return value.code.toUpperCase();
|
|
6543
|
+
}
|
|
6446
6544
|
function numericBinary(left, right, operation) {
|
|
6545
|
+
if (!areCommensurable([left, right])) {
|
|
6546
|
+
return null;
|
|
6547
|
+
}
|
|
6447
6548
|
const leftNumber = toFiniteNumber(left);
|
|
6448
6549
|
const rightNumber = toFiniteNumber(right);
|
|
6449
6550
|
if (leftNumber === null || rightNumber === null) {
|
|
@@ -6453,6 +6554,9 @@ function numericBinary(left, right, operation) {
|
|
|
6453
6554
|
return Number.isFinite(result) ? result : null;
|
|
6454
6555
|
}
|
|
6455
6556
|
function minMax(values, mode) {
|
|
6557
|
+
if (!areCommensurable(values)) {
|
|
6558
|
+
return null;
|
|
6559
|
+
}
|
|
6456
6560
|
const numbers = numericValues(values);
|
|
6457
6561
|
if (numbers.length > 0) {
|
|
6458
6562
|
return mode === "min" ? Math.min(...numbers) : Math.max(...numbers);
|
|
@@ -6531,6 +6635,9 @@ function toDate(value) {
|
|
|
6531
6635
|
return Number.isNaN(date2.getTime()) ? null : date2;
|
|
6532
6636
|
}
|
|
6533
6637
|
function uniqueKey(value) {
|
|
6638
|
+
if (isCurrencyValue(value)) {
|
|
6639
|
+
return `currency:${currencyCode(value)}:${value.value}`;
|
|
6640
|
+
}
|
|
6534
6641
|
const numberValue = toFiniteNumber(value);
|
|
6535
6642
|
if (numberValue !== null) {
|
|
6536
6643
|
return `number:${numberValue}`;
|
|
@@ -7667,16 +7774,22 @@ var removeGroup = defineOperation({
|
|
|
7667
7774
|
focus: (op) => ({ viewId: op.viewId, tabId: op.tabId }),
|
|
7668
7775
|
describe: (op) => `Supprime le groupe ${op.groupId}`
|
|
7669
7776
|
});
|
|
7670
|
-
var
|
|
7777
|
+
var updateGroupSchema = z.object({
|
|
7671
7778
|
...viewOperationBase,
|
|
7672
|
-
type: z.literal("
|
|
7779
|
+
type: z.literal("update_group"),
|
|
7673
7780
|
tabId: z.string().min(1),
|
|
7674
7781
|
groupId: z.string().min(1),
|
|
7675
|
-
|
|
7782
|
+
changes: z.object({
|
|
7783
|
+
label: z.string().min(1).optional(),
|
|
7784
|
+
description: z.string().optional(),
|
|
7785
|
+
collapsible: z.boolean().optional(),
|
|
7786
|
+
collapsed: z.boolean().optional(),
|
|
7787
|
+
order: z.number().int().optional()
|
|
7788
|
+
}).refine((c) => Object.keys(c).length > 0, "update_group needs at least one change")
|
|
7676
7789
|
});
|
|
7677
|
-
var
|
|
7678
|
-
type: "
|
|
7679
|
-
schema:
|
|
7790
|
+
var updateGroup = defineOperation({
|
|
7791
|
+
type: "update_group",
|
|
7792
|
+
schema: updateGroupSchema,
|
|
7680
7793
|
apply: (state, op) => mapView(
|
|
7681
7794
|
state,
|
|
7682
7795
|
op.viewId,
|
|
@@ -7684,12 +7797,12 @@ var setGroupLabel = defineOperation({
|
|
|
7684
7797
|
requireGroup(tab, op.groupId);
|
|
7685
7798
|
return {
|
|
7686
7799
|
...tab,
|
|
7687
|
-
groups: tab.groups.map((g) => g.id === op.groupId ? { ...g,
|
|
7800
|
+
groups: tab.groups.map((g) => g.id === op.groupId ? { ...g, ...op.changes } : g)
|
|
7688
7801
|
};
|
|
7689
7802
|
})
|
|
7690
7803
|
),
|
|
7691
7804
|
focus: (op) => ({ viewId: op.viewId, tabId: op.tabId, groupId: op.groupId }),
|
|
7692
|
-
describe: (op) => `Renomme le groupe en \xAB ${op.label} \xBB`
|
|
7805
|
+
describe: (op) => op.changes.label ? `Renomme le groupe en \xAB ${op.changes.label} \xBB` : "Modifie le groupe"
|
|
7693
7806
|
});
|
|
7694
7807
|
var reorderGroupsSchema = z.object({
|
|
7695
7808
|
...viewOperationBase,
|
|
@@ -7867,6 +7980,37 @@ var updateField = defineOperation({
|
|
|
7867
7980
|
focus: (op) => ({ viewId: op.viewId, tabId: op.tabId, fieldId: op.fieldId }),
|
|
7868
7981
|
describe: (op) => `Modifie le champ ${op.fieldId}`
|
|
7869
7982
|
});
|
|
7983
|
+
var updateTableTabSchema = z.object({
|
|
7984
|
+
...viewOperationBase,
|
|
7985
|
+
type: z.literal("update_table_tab"),
|
|
7986
|
+
tabId: z.string().min(1),
|
|
7987
|
+
changes: z.object({
|
|
7988
|
+
columns: z.array(z.string().min(1)).optional(),
|
|
7989
|
+
filters: z.custom().optional(),
|
|
7990
|
+
sorts: z.custom().optional(),
|
|
7991
|
+
allowCreate: z.boolean().optional(),
|
|
7992
|
+
allowEdit: z.boolean().optional(),
|
|
7993
|
+
allowDelete: z.boolean().optional(),
|
|
7994
|
+
createMode: z.enum(["redirect", "inline", "peek"]).optional()
|
|
7995
|
+
}).refine((c) => Object.keys(c).length > 0, "update_table_tab needs at least one change")
|
|
7996
|
+
});
|
|
7997
|
+
var updateTableTab = defineOperation({
|
|
7998
|
+
type: "update_table_tab",
|
|
7999
|
+
schema: updateTableTabSchema,
|
|
8000
|
+
apply: (state, op) => mapView(state, op.viewId, (view) => {
|
|
8001
|
+
const found = view.tabs.find((t) => t.id === op.tabId);
|
|
8002
|
+
if (!found) throw new ValidationError(`Tab "${op.tabId}" is not in view "${view.id}"`, []);
|
|
8003
|
+
if (found.type !== "table") {
|
|
8004
|
+
throw new ValidationError(`Tab "${op.tabId}" is not a table tab`, []);
|
|
8005
|
+
}
|
|
8006
|
+
return {
|
|
8007
|
+
...view,
|
|
8008
|
+
tabs: view.tabs.map((t) => t.id === op.tabId ? { ...t, ...op.changes } : t)
|
|
8009
|
+
};
|
|
8010
|
+
}),
|
|
8011
|
+
focus: (op) => ({ viewId: op.viewId, tabId: op.tabId }),
|
|
8012
|
+
describe: (op) => op.changes.columns ? `Affiche ${op.changes.columns.length} colonne(s) dans l'onglet ${op.tabId}` : `Modifie l'onglet ${op.tabId}`
|
|
8013
|
+
});
|
|
7870
8014
|
var setSidePanelSchema = z.object({
|
|
7871
8015
|
...viewOperationBase,
|
|
7872
8016
|
type: z.literal("set_side_panel"),
|
|
@@ -7892,12 +8036,13 @@ var DETAIL_VIEW_OPERATIONS = [
|
|
|
7892
8036
|
reorderTabs,
|
|
7893
8037
|
addGroup,
|
|
7894
8038
|
removeGroup,
|
|
7895
|
-
|
|
8039
|
+
updateGroup,
|
|
7896
8040
|
reorderGroups,
|
|
7897
8041
|
addField,
|
|
7898
8042
|
removeField,
|
|
7899
8043
|
moveField,
|
|
7900
8044
|
updateField,
|
|
8045
|
+
updateTableTab,
|
|
7901
8046
|
setSidePanel
|
|
7902
8047
|
];
|
|
7903
8048
|
var listTabBase = { ...viewOperationBase, tabId: z.string().min(1) };
|
|
@@ -8075,7 +8220,26 @@ var setCardDateAttribute = setOnTab(
|
|
|
8075
8220
|
z.string().min(1).nullable(),
|
|
8076
8221
|
(value) => value ? `Affiche ${value} sur les cartes` : "Retire la date des cartes"
|
|
8077
8222
|
);
|
|
8223
|
+
var setDefaultFiltersSchema = z.object({
|
|
8224
|
+
...viewOperationBase,
|
|
8225
|
+
type: z.literal("set_default_filters"),
|
|
8226
|
+
filters: filterGroupPayload.nullable()
|
|
8227
|
+
});
|
|
8228
|
+
var setDefaultFilters = defineOperation({
|
|
8229
|
+
type: "set_default_filters",
|
|
8230
|
+
schema: setDefaultFiltersSchema,
|
|
8231
|
+
apply: (state, op) => mapView(state, op.viewId, (view) => {
|
|
8232
|
+
if (op.filters === null) {
|
|
8233
|
+
const { defaultFilters: _dropped, ...rest } = view.config;
|
|
8234
|
+
return { ...view, config: rest };
|
|
8235
|
+
}
|
|
8236
|
+
return { ...view, config: { ...view.config, defaultFilters: op.filters } };
|
|
8237
|
+
}),
|
|
8238
|
+
focus: (op) => ({ viewId: op.viewId }),
|
|
8239
|
+
describe: (op) => op.filters ? "Modifie les filtres de la vue" : "Retire les filtres de la vue"
|
|
8240
|
+
});
|
|
8078
8241
|
var LIST_VIEW_OPERATIONS = [
|
|
8242
|
+
setDefaultFilters,
|
|
8079
8243
|
addListTab,
|
|
8080
8244
|
removeListTab,
|
|
8081
8245
|
updateListTab,
|
|
@@ -8151,12 +8315,13 @@ var removeObject = defineOperation({
|
|
|
8151
8315
|
schema: removeObjectSchema,
|
|
8152
8316
|
apply: (state, op) => {
|
|
8153
8317
|
requireObject(state, op.objectId);
|
|
8318
|
+
const objectName = state.objects.find((o) => o.id === op.objectId)?.name;
|
|
8154
8319
|
return {
|
|
8155
8320
|
...state,
|
|
8156
8321
|
objects: state.objects.filter((o) => o.id !== op.objectId),
|
|
8157
8322
|
attributes: state.attributes.filter((a) => a.objectId !== op.objectId),
|
|
8158
8323
|
sampleRecords: state.sampleRecords.filter((r) => r.objectId !== op.objectId),
|
|
8159
|
-
views: state.views.filter((v) => v.
|
|
8324
|
+
views: state.views.filter((v) => v.objectName !== objectName)
|
|
8160
8325
|
};
|
|
8161
8326
|
},
|
|
8162
8327
|
focus: () => ({}),
|
|
@@ -8199,7 +8364,7 @@ var addAttribute = defineOperation({
|
|
|
8199
8364
|
describe: (op) => `Ajoute l'attribut \xAB ${op.label} \xBB`
|
|
8200
8365
|
});
|
|
8201
8366
|
var updateAttributeSchema = z.object({
|
|
8202
|
-
...
|
|
8367
|
+
...objectOperationBase,
|
|
8203
8368
|
type: z.literal("update_attribute"),
|
|
8204
8369
|
attributeId: z.string().min(1),
|
|
8205
8370
|
changes: z.object({ label: z.string().min(1).optional() }).refine((c) => Object.keys(c).length > 0, "update_attribute needs at least one change")
|
|
@@ -8218,11 +8383,14 @@ var updateAttribute = defineOperation({
|
|
|
8218
8383
|
)
|
|
8219
8384
|
};
|
|
8220
8385
|
},
|
|
8221
|
-
|
|
8386
|
+
// Carries objectId so the scope can load the attribute's parent. Without it
|
|
8387
|
+
// the reader returns an empty state and the fold rejects the operation before
|
|
8388
|
+
// the draft is ever persisted — renaming an existing field was impossible.
|
|
8389
|
+
focus: (op) => ({ objectId: op.objectId }),
|
|
8222
8390
|
describe: (op) => op.changes.label ? `Renomme l'attribut en \xAB ${op.changes.label} \xBB` : "Modifie l'attribut"
|
|
8223
8391
|
});
|
|
8224
8392
|
var removeAttributeSchema = z.object({
|
|
8225
|
-
...
|
|
8393
|
+
...objectOperationBase,
|
|
8226
8394
|
type: z.literal("remove_attribute"),
|
|
8227
8395
|
attributeId: z.string().min(1)
|
|
8228
8396
|
});
|
|
@@ -8235,7 +8403,8 @@ var removeAttribute = defineOperation({
|
|
|
8235
8403
|
}
|
|
8236
8404
|
return { ...state, attributes: state.attributes.filter((a) => a.id !== op.attributeId) };
|
|
8237
8405
|
},
|
|
8238
|
-
|
|
8406
|
+
// Same reason as update_attribute: the parent object must be in scope.
|
|
8407
|
+
focus: (op) => ({ objectId: op.objectId }),
|
|
8239
8408
|
describe: (op) => `Supprime l'attribut ${op.attributeId}`
|
|
8240
8409
|
});
|
|
8241
8410
|
var addSampleRecordSchema = z.object({
|
|
@@ -8383,4 +8552,33 @@ function ensureFieldIds(tabs) {
|
|
|
8383
8552
|
);
|
|
8384
8553
|
}
|
|
8385
8554
|
|
|
8386
|
-
|
|
8555
|
+
// src/architect/view-projection.ts
|
|
8556
|
+
function toDraftableView(view) {
|
|
8557
|
+
return {
|
|
8558
|
+
id: view.id ?? "",
|
|
8559
|
+
objectName: view.object,
|
|
8560
|
+
type: view.type,
|
|
8561
|
+
label: view.label,
|
|
8562
|
+
tabs: isDetailView(view) ? view.config.tabs ?? [] : [],
|
|
8563
|
+
config: view.config
|
|
8564
|
+
};
|
|
8565
|
+
}
|
|
8566
|
+
function fromDraftableView(original, drafted) {
|
|
8567
|
+
if (original.type === "detail") {
|
|
8568
|
+
return {
|
|
8569
|
+
...original,
|
|
8570
|
+
label: drafted.label,
|
|
8571
|
+
config: {
|
|
8572
|
+
...drafted.config,
|
|
8573
|
+
tabs: drafted.tabs
|
|
8574
|
+
}
|
|
8575
|
+
};
|
|
8576
|
+
}
|
|
8577
|
+
return {
|
|
8578
|
+
...original,
|
|
8579
|
+
label: drafted.label,
|
|
8580
|
+
config: drafted.config
|
|
8581
|
+
};
|
|
8582
|
+
}
|
|
8583
|
+
|
|
8584
|
+
export { AGENT_UI_BATCH_MAX_BYTES, AGENT_UI_BATCH_MAX_ITEMS, ALLOWED_PROPERTY_TYPES, ALL_ACTIONS, ALL_OPERATION_TYPES, ALL_SYSTEM_RESOURCES, AUDIT_ACTIONS, AUDIT_RESOURCE_TYPES, ActivityTabConfig, AgentBuilder, BEHAVIOR_PROPERTIES, BROWSER_PREVIEW_STATUSES, BYTE_UNIT_LABELS, CLAIMABLE_SESSION_STATUSES, COMPUTED_FUNCTIONS, COMPUTED_FUNCTION_METADATA, COMPUTED_FUNCTION_NAMES, CONNECTOR_CALLBACK_PARAM, COUNT_MODES, ComputedFormulaCompileError, CustomTabConfig, DB_COLUMN_FIELDS, DEFAULT_AGENT_EXECUTION_CONFIG, DEFAULT_APPROVAL_POLICY, DEFAULT_LABEL_FALLBACK, DEFAULT_ROLES, DEFAULT_ROLE_DESCRIPTIONS, DEFAULT_ROLE_LABELS, DEFAULT_ROLE_PERMISSIONS, DOCUMENT_SYSTEM_ATTRIBUTES, DRIVE_LIST_VIEW, DRIVE_OBJECT, DRIVE_OBJECT_NAME, DRIVE_VIEW, DetailViewBuilder, DocumentsTabConfig, EMPTY_VALUE_PLACEHOLDER, ESTIMATED_COUNT_CAP, EmailsTabConfig, FORM_FORBIDDEN_ATTRIBUTE_TYPES, FlagRegistry, FlagService, FormBuilder, FormRegistry, FormRowBuilder, FormStepBuilder, GroupBuilder, IDENTITY_PROPERTIES, LIVE_EVENT_TYPES, ListViewBuilder, ListViewTabConfigBuilder, MAX_PRESET_DEPTH, MAX_TODOS, MAX_TODO_DESCRIPTION_CHARS, MAX_TODO_ID_CHARS, MAX_TODO_RESULT_CHARS, MEMORY_LIST_VIEW, MEMORY_OBJECT, MEMORY_VIEW, MeetingsTabConfig, NATIVE_AGENT_UI_PART_IDS_METADATA_KEY, NATIVE_AGENT_UI_PART_IDS_METADATA_SCHEMA_VERSION, NOTIFICATION_INBOX_STATES, NOTIFICATION_KINDS, NOTIFICATION_PRIORITIES, NOTIFICATION_SENSITIVITIES, NOTIFICATION_TYPES_V1, NOTIFICATION_TYPE_AGENT_QUESTION_REQUESTED, NOTIFICATION_TYPE_AGENT_SESSION_COMPLETED, NOTIFICATION_TYPE_AGENT_SESSION_FAILED, NOTIFICATION_TYPE_AGENT_SESSION_TIMEOUT, NOTIFICATION_TYPE_AGENT_SESSION_WAITING_HUMAN, NOTIFICATION_TYPE_AGENT_TASK_ASSIGNED, NOTIFICATION_WORK_STATES, NoopGeocodingAdapter, OPEN_TOOL_PART_STATES, OPERATION_REGISTRY, OPERATOR_SPECS, ObjectBuilder, PRESENTATION_PROPERTIES, QUALIFIED_SEPARATOR, RECORD_CREATOR_ROOT_ACTOR_METADATA_KEY, RELATION_TARGET_ANY, RichtextTabConfig, SCHEMA_PLAN_LIMITS, SESSION_TERMINAL_STATUSES, SKILL_LIST_VIEW, SKILL_OBJECT, SKILL_VIEW, STANDARD_SCHEMA_VENDOR, SYSTEM_RESOURCES, SYSTEM_RESOURCE_LABELS, TODAY_DEFAULT, TODO_PLAN_STATUSES, TODO_STATUSES, TOOL_APPROVAL_STATES, TabBuilder, TableTabConfig, USER_STATUSES, USER_WORK_POSTURES, accessLevelToActions, actionsToAccessLevel, agent, agentDisplayName, applyOperations, applyPipes, applyRelationProps, assertAcyclicComputedDependencies, booleanFlag, buildAgentFallbackTitle, buildPermissionFlags, buildPropertySchema, buildQualifiedAttribute, checkbox, compileComputedFormula, compileRollupAttribute, computeByteMagnitude, conversationDisplayTitle, createFlagRegistry, createFlagService, createStandardSchemaProps, currency, date, dateInTimezone, dateValueStart, defineOperation, deriveInitials, describeOperations, destructiveSchema, detailView, document, ensureFieldIds, evaluateComputedAst, evaluateComputedFormula, evaluateComputedFormulaWithResult, evaluateFilterState, evaluateRecordFilterState, extractAttributeNames, extractValueRefs, flagRegistry, focusOf, form, formFieldFlatKey, formFieldKey, formRegistry, formatAttributeValue, formatByteSize, formatComputedResult, formatLocationValue, formula, fromDraftableView, generateDefaultDetailView, generateDefaultListView, getActiveTab, getErrorMessage, getLiveProtocolPayloadChannel, getRecordCreatorPrincipalId, getSlotFieldTargets, getUserDisplayName, group, hasDestructiveEntries, hasOptions, includesAction, inferInverseCardinality, inferRollupReturnType, isAgentUIMessageBatch, isAttributeSortable2 as isAttributeSortable, isBilateralRelation, isCheckboxEquality, isClaimableSessionStatus, isComputedFunctionName, isDateRangeValue, isDefaultRole, isDetailView, isDocumentAttribute, isEmptyObject, isFieldGroup, isFormDefinition, isFormFieldsRow, isFormFreeFieldRef, isFormHeadingRow, isFormSeparatorRow, isFormSlotFieldRef, isFormTextRow, isLabelExpression, isListView, isLiveEventEnvelope, isLiveEventPayload, isLiveEventPayloadForType, isLiveEventType, isNotEmpty, isOpenToolPartState, isPlainRecord2 as isPlainRecord, isStandardSchema, isTerminalSessionStatus, isTerminalState, isToolApprovalState, isUniversalRelation, jsonFlag, legacyStatusToSessionState, listView, liveChannelKey, location, makeFieldId, matchesAccepts, multiselect, nativeAgentUIPartIdMetadataKey, normalizeDateValue, number, numberFlag, object, parseCountMode, parseLiveChannelKey, parseNativeAgentUIPartIdsMetadata, parseOperation, parseOptionalCountMode, parseQualifiedAttribute, persistedDefaultViewTargetSchema, persistedSchemaPlanSchema, phone, plannedAttributeSchema, plannedInlineAttributeSchema, plannedObjectSchema, proposedDefaultViewTargetSchema, qualifiedPropertyDefs, readFormFieldValue, registry, relation, relationPropertyDefs, renderLabelExpression, resetViewToDefault, resolveAttributeDefaultValue, resolveFieldRequired, resolvePropertyDefinitions, richtext, rollup, rollupToFormulaExpression, schemaPlanSchema, select, sessionStateToLegacyStatus, status, stringFlag, text, toDraftableView, toUndefinedIfEmpty, user, validateAttributeName, validateLabelExpression, validateObjectName, validateViewName, viewRegistry, viewStateKey, viewSyncPayload };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as Attribute, f as AttributeType } from './attributes-
|
|
1
|
+
import { A as Attribute, f as AttributeType } from './attributes-CU871AfG.js';
|
|
2
2
|
|
|
3
3
|
type BuiltInTransform = "toString" | "toNumber" | "toDate" | "toBoolean" | "toISOString";
|
|
4
4
|
type SchemaOperation = {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as Attribute, f as AttributeType } from './attributes
|
|
1
|
+
import { A as Attribute, f as AttributeType } from './attributes-DoiGyNFk.mjs';
|
|
2
2
|
|
|
3
3
|
type BuiltInTransform = "toString" | "toNumber" | "toDate" | "toBoolean" | "toISOString";
|
|
4
4
|
type SchemaOperation = {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { IconName } from '@stndrds/constants';
|
|
2
|
-
import { h as ComputedAttributeState, A as Attribute } from './attributes--M1ifW8_.mjs';
|
|
3
2
|
import { Uuid } from './utils.mjs';
|
|
4
|
-
import {
|
|
3
|
+
import { A as Attribute } from './attributes-DoiGyNFk.mjs';
|
|
4
|
+
import { M as MigrationDefinition } from './migrations-C-GN1xx_.mjs';
|
|
5
5
|
|
|
6
6
|
interface DocumentLayout {
|
|
7
7
|
/** Named sub-folders auto-created at the top of the record's drive when first used via attach --variant. */
|
|
@@ -165,8 +165,6 @@ interface ObjectRecord<TValues extends Record<string, unknown> = Record<string,
|
|
|
165
165
|
*/
|
|
166
166
|
embeddingText?: string;
|
|
167
167
|
values: TValues;
|
|
168
|
-
/** Per-computed-attribute state keyed by attribute name. */
|
|
169
|
-
computedStates?: Record<string, ComputedAttributeState>;
|
|
170
168
|
/**
|
|
171
169
|
* Custom metadata for the record.
|
|
172
170
|
* Use this for UI/UX state, feature flags, or any application-specific data.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { IconName } from '@stndrds/constants';
|
|
2
|
-
import { h as ComputedAttributeState, A as Attribute } from './attributes-D8eHv5Kf.js';
|
|
3
2
|
import { Uuid } from './utils.js';
|
|
4
|
-
import {
|
|
3
|
+
import { A as Attribute } from './attributes-CU871AfG.js';
|
|
4
|
+
import { M as MigrationDefinition } from './migrations-BGWgXHXb.js';
|
|
5
5
|
|
|
6
6
|
interface DocumentLayout {
|
|
7
7
|
/** Named sub-folders auto-created at the top of the record's drive when first used via attach --variant. */
|
|
@@ -165,8 +165,6 @@ interface ObjectRecord<TValues extends Record<string, unknown> = Record<string,
|
|
|
165
165
|
*/
|
|
166
166
|
embeddingText?: string;
|
|
167
167
|
values: TValues;
|
|
168
|
-
/** Per-computed-attribute state keyed by attribute name. */
|
|
169
|
-
computedStates?: Record<string, ComputedAttributeState>;
|
|
170
168
|
/**
|
|
171
169
|
* Custom metadata for the record.
|
|
172
170
|
* Use this for UI/UX state, feature flags, or any application-specific data.
|
package/dist/utils.js
CHANGED
|
@@ -1,31 +1,31 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('./chunk-
|
|
3
|
+
var chunkLBGLB443_js = require('./chunk-LBGLB443.js');
|
|
4
|
+
require('./chunk-L4KLYMUI.js');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
Object.defineProperty(exports, "asTenantId", {
|
|
9
9
|
enumerable: true,
|
|
10
|
-
get: function () { return
|
|
10
|
+
get: function () { return chunkLBGLB443_js.asTenantId; }
|
|
11
11
|
});
|
|
12
12
|
Object.defineProperty(exports, "asUserId", {
|
|
13
13
|
enumerable: true,
|
|
14
|
-
get: function () { return
|
|
14
|
+
get: function () { return chunkLBGLB443_js.asUserId; }
|
|
15
15
|
});
|
|
16
16
|
Object.defineProperty(exports, "canonicalStringify", {
|
|
17
17
|
enumerable: true,
|
|
18
|
-
get: function () { return
|
|
18
|
+
get: function () { return chunkLBGLB443_js.canonicalStringify; }
|
|
19
19
|
});
|
|
20
20
|
Object.defineProperty(exports, "deepEqual", {
|
|
21
21
|
enumerable: true,
|
|
22
|
-
get: function () { return
|
|
22
|
+
get: function () { return chunkLBGLB443_js.deepEqual; }
|
|
23
23
|
});
|
|
24
24
|
Object.defineProperty(exports, "generateId", {
|
|
25
25
|
enumerable: true,
|
|
26
|
-
get: function () { return
|
|
26
|
+
get: function () { return chunkLBGLB443_js.generateId; }
|
|
27
27
|
});
|
|
28
28
|
Object.defineProperty(exports, "indexBy", {
|
|
29
29
|
enumerable: true,
|
|
30
|
-
get: function () { return
|
|
30
|
+
get: function () { return chunkLBGLB443_js.indexBy; }
|
|
31
31
|
});
|
package/dist/utils.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { asTenantId, asUserId, canonicalStringify, deepEqual, generateId, indexBy } from './chunk-
|
|
2
|
-
import './chunk-
|
|
1
|
+
export { asTenantId, asUserId, canonicalStringify, deepEqual, generateId, indexBy } from './chunk-EFSS7PGC.mjs';
|
|
2
|
+
import './chunk-HOVUEYEQ.mjs';
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
export { V as ValidationMessages } from '../types-
|
|
1
|
+
export { V as ValidationMessages } from '../types-80c2rOUZ.mjs';
|
|
2
2
|
export { DEFAULT_VALIDATION_MESSAGES, formatZodErrors } from './core/index.mjs';
|
|
3
|
-
export {
|
|
4
|
-
export { S as SCHEMA_LIMITS, c as colorIdSchema, d as detailTabSchema, a as detailViewConfigSchema, i as iconNameSchema, b as inverseSourceSchema, l as listViewConfigSchema, e as listViewTabSchema, p as parseViewConfig, r as relationSourceSchema, t as tableSourceSchema, v as viewConfigByTypeSchema } from '../all-
|
|
5
|
-
export { a as createFormAttributeValidator, r as rejectUnknownAttributesOrThrow, b as validateDraft, d as validateDraftOrThrow, e as validateObject, f as validateObjectOrThrow } from '../helpers-
|
|
6
|
-
import '../attributes
|
|
3
|
+
export { ab as multiselectOptionWriteSchema, ac as parseAttributeConfig, ad as parseAttributeConfigForCreate, ae as parseAttributeConfigForUpdate, af as selectOptionWriteSchema, ag as statusGroupSchema, ah as statusOptionWriteSchema } from '../index-D9XBjFnu.mjs';
|
|
4
|
+
export { S as SCHEMA_LIMITS, c as colorIdSchema, d as detailTabSchema, a as detailViewConfigSchema, i as iconNameSchema, b as inverseSourceSchema, l as listViewConfigSchema, e as listViewTabSchema, p as parseViewConfig, r as relationSourceSchema, t as tableSourceSchema, v as viewConfigByTypeSchema } from '../all-CQMswOrw.mjs';
|
|
5
|
+
export { a as createFormAttributeValidator, r as rejectUnknownAttributesOrThrow, b as validateDraft, d as validateDraftOrThrow, e as validateObject, f as validateObjectOrThrow } from '../helpers-CfEOUBmB.mjs';
|
|
6
|
+
import '../attributes-DoiGyNFk.mjs';
|
|
7
7
|
import '@stndrds/constants';
|
|
8
8
|
import '../utils.mjs';
|
|
9
9
|
import 'zod';
|
|
10
|
-
import '../objects-
|
|
11
|
-
import '../migrations-
|
|
10
|
+
import '../objects-BRypaBpi.mjs';
|
|
11
|
+
import '../migrations-C-GN1xx_.mjs';
|