@stndrds/schema 1.0.0-alpha.92 → 1.0.0-alpha.93

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/index.js CHANGED
@@ -252,7 +252,10 @@ function isFlowFieldsRow(row) {
252
252
  return !row.type || row.type === "fields";
253
253
  }
254
254
  function isLayoutRow(row) {
255
- return !!row.type && row.type !== "fields";
255
+ return !!row.type && row.type !== "fields" && row.type !== "relationList";
256
+ }
257
+ function isFlowRelationListRow(row) {
258
+ return row.type === "relationList";
256
259
  }
257
260
  function isFlowDefinition(obj) {
258
261
  return typeof obj === "object" && obj !== null && "slots" in obj && "pages" in obj && "relations" in obj && "status" in obj;
@@ -294,7 +297,9 @@ var RESERVED_ATTRIBUTE_NAMES = [
294
297
  "completionStatus",
295
298
  "values",
296
299
  "metadata",
297
- "deletedAt"
300
+ "deletedAt",
301
+ "schemaVersion",
302
+ "archivedValues"
298
303
  ];
299
304
 
300
305
  // src/types/permissions.ts
@@ -858,7 +863,8 @@ function createEmptyContext() {
858
863
  documents: {},
859
864
  variables: {},
860
865
  conditionResults: {},
861
- createdRecordIds: {}
866
+ createdRecordIds: {},
867
+ relationBuffers: {}
862
868
  };
863
869
  }
864
870
  function getContextValue(context, path) {
@@ -1316,6 +1322,14 @@ var WorkflowDefinitionSchema = _zod.z.object({
1316
1322
  }
1317
1323
  );
1318
1324
 
1325
+ // src/types/migrations.ts
1326
+ var DEFAULT_RETENTION_POLICY = {
1327
+ attributeData: 30,
1328
+ deletedObjects: 90,
1329
+ transforms: 365,
1330
+ migrationErrors: 30
1331
+ };
1332
+
1319
1333
  // src/lib/object-helpers.ts
1320
1334
  function isEmpty2(obj) {
1321
1335
  if (obj === null || obj === void 0) {
@@ -2834,8 +2848,146 @@ function document(config) {
2834
2848
 
2835
2849
  // src/builders/object-builder.ts
2836
2850
 
2851
+
2852
+ // src/builders/migration-builder.ts
2853
+ function resolveBuiltInTransform(targetType) {
2854
+ const map = {
2855
+ text: "toString",
2856
+ textarea: "toString",
2857
+ richtext: "toString",
2858
+ number: "toNumber",
2859
+ currency: "toNumber",
2860
+ rating: "toNumber",
2861
+ date: "toDate",
2862
+ checkbox: "toBoolean"
2863
+ };
2864
+ return map[targetType];
2865
+ }
2866
+ function reverseOperation(op) {
2867
+ switch (op.type) {
2868
+ case "rename_attribute":
2869
+ return { type: "rename_attribute", from: op.to, to: op.from };
2870
+ case "add_attribute":
2871
+ return { type: "remove_attribute", name: op.attribute.name, backup_config: op.attribute };
2872
+ case "remove_attribute":
2873
+ return { type: "add_attribute", attribute: op.backup_config };
2874
+ case "change_type":
2875
+ return {
2876
+ type: "change_type",
2877
+ name: op.name,
2878
+ from: op.to,
2879
+ to: op.from,
2880
+ transform: op.transform ? resolveBuiltInTransform(op.from) : void 0
2881
+ };
2882
+ case "update_config":
2883
+ return { type: "update_config", name: op.name, from: op.to, to: op.from };
2884
+ case "rename_object":
2885
+ return { type: "rename_object", from: op.to, to: op.from };
2886
+ case "remove_object":
2887
+ return { type: "remove_object", backup: op.backup };
2888
+ }
2889
+ }
2890
+ var MigrationBuilder = class {
2891
+ constructor(version) {
2892
+ this.operations = [];
2893
+ /** Tracks attribute names that have already been referenced in this migration */
2894
+ this.touchedAttributes = /* @__PURE__ */ new Set();
2895
+ this.version = version;
2896
+ }
2897
+ // --------------------------------------------------------------------------
2898
+ // CONFLICT GUARD
2899
+ // --------------------------------------------------------------------------
2900
+ assertNotTouched(name, operationType) {
2901
+ if (this.touchedAttributes.has(name)) {
2902
+ throw new Error(
2903
+ `[MigrationBuilder] Conflicting operations on attribute "${name}": it was already modified earlier in this migration (attempted: ${operationType}).`
2904
+ );
2905
+ }
2906
+ }
2907
+ // --------------------------------------------------------------------------
2908
+ // OPERATION METHODS
2909
+ // --------------------------------------------------------------------------
2910
+ /**
2911
+ * Rename an attribute.
2912
+ * The reverse operation will rename it back.
2913
+ */
2914
+ renameAttribute(from, to) {
2915
+ this.assertNotTouched(from, "rename_attribute");
2916
+ this.touchedAttributes.add(from);
2917
+ this.operations.push({ type: "rename_attribute", from, to });
2918
+ return this;
2919
+ }
2920
+ /**
2921
+ * Change the type of an attribute.
2922
+ *
2923
+ * The `transform` option accepts a function — it is used only to signal
2924
+ * intent; the actual built-in transform is resolved from the target type.
2925
+ */
2926
+ changeType(name, from, to, options) {
2927
+ this.assertNotTouched(name, "change_type");
2928
+ this.touchedAttributes.add(name);
2929
+ const transform = _optionalChain([options, 'optionalAccess', _47 => _47.transform]) ? resolveBuiltInTransform(to) : void 0;
2930
+ this.operations.push({ type: "change_type", name, from, to, transform });
2931
+ return this;
2932
+ }
2933
+ /**
2934
+ * Remove an attribute.
2935
+ *
2936
+ * The `backup_config` is intentionally left empty — the sync engine will
2937
+ * populate it from current DB state before applying the migration.
2938
+ */
2939
+ removeAttribute(name) {
2940
+ this.assertNotTouched(name, "remove_attribute");
2941
+ this.touchedAttributes.add(name);
2942
+ this.operations.push({
2943
+ type: "remove_attribute",
2944
+ name,
2945
+ backup_config: {}
2946
+ });
2947
+ return this;
2948
+ }
2949
+ /**
2950
+ * Add a new attribute.
2951
+ * The reverse operation will remove it (using the attribute definition as backup).
2952
+ */
2953
+ addAttribute(attribute) {
2954
+ this.assertNotTouched(attribute.name, "add_attribute");
2955
+ this.touchedAttributes.add(attribute.name);
2956
+ this.operations.push({ type: "add_attribute", attribute });
2957
+ return this;
2958
+ }
2959
+ /**
2960
+ * Update the configuration of an attribute (partial patch).
2961
+ *
2962
+ * The `from` config is intentionally left empty — the sync engine will
2963
+ * populate it from current DB state before applying the migration.
2964
+ */
2965
+ updateConfig(name, config) {
2966
+ this.assertNotTouched(name, "update_config");
2967
+ this.touchedAttributes.add(name);
2968
+ this.operations.push({ type: "update_config", name, from: {}, to: config });
2969
+ return this;
2970
+ }
2971
+ // --------------------------------------------------------------------------
2972
+ // BUILD
2973
+ // --------------------------------------------------------------------------
2974
+ /**
2975
+ * Produce the final MigrationDefinition with auto-generated reverse operations.
2976
+ */
2977
+ build() {
2978
+ const reverse_operations = [...this.operations].reverse().map((op) => reverseOperation(op));
2979
+ return {
2980
+ version: this.version,
2981
+ operations: [...this.operations],
2982
+ reverse_operations
2983
+ };
2984
+ }
2985
+ };
2986
+
2987
+ // src/builders/object-builder.ts
2837
2988
  var ObjectBuilder = class {
2838
2989
  constructor(config) {
2990
+ this._migrations = [];
2839
2991
  this.validateName(config.name);
2840
2992
  this.obj = {
2841
2993
  name: config.name,
@@ -2932,6 +3084,37 @@ var ObjectBuilder = class {
2932
3084
  this._labelExpression = template;
2933
3085
  return this;
2934
3086
  }
3087
+ /**
3088
+ * Declare a schema migration for this object.
3089
+ *
3090
+ * - `version` must be >= 2 (version 1 is implicit — no migration needed).
3091
+ * - Versions must be declared in sequential order without gaps or duplicates.
3092
+ * - The callback receives a MigrationBuilder; call `.build()` is not required
3093
+ * (the ObjectBuilder calls it internally).
3094
+ *
3095
+ * @example
3096
+ * ```typescript
3097
+ * object({ name: "contacts", label: "Contact" })
3098
+ * .migration(2, (m) => m.renameAttribute("firstName", "first_name"))
3099
+ * .migration(3, (m) => m.changeType("age", "text", "number"))
3100
+ * .labelExpression("{{ first_name }}")
3101
+ * ```
3102
+ */
3103
+ migration(version, callback) {
3104
+ if (version < 2) {
3105
+ throw new Error(
3106
+ `[ObjectBuilder] Migration version must be >= 2 (version 1 is implicit). Got: ${version}`
3107
+ );
3108
+ }
3109
+ const isDuplicate = this._migrations.some((m) => m.version === version);
3110
+ if (isDuplicate) {
3111
+ throw new Error(`[ObjectBuilder] Duplicate migration version: ${version}`);
3112
+ }
3113
+ const builder = new MigrationBuilder(version);
3114
+ callback(builder);
3115
+ this._migrations.push(builder.build());
3116
+ return this;
3117
+ }
2935
3118
  /**
2936
3119
  * Build the final ObjectDefinition
2937
3120
  * @throws Error if required fields are missing or invalid
@@ -2951,10 +3134,22 @@ The labelExpression defines how records are displayed in lists and relations.
2951
3134
  \u2705 Example: .labelExpression("{{ firstName }} {{ lastName }}")`
2952
3135
  );
2953
3136
  }
3137
+ const sortedVersions = [...this._migrations].sort((a, b) => a.version - b.version);
3138
+ for (let i = 0; i < sortedVersions.length; i++) {
3139
+ const expected = i + 2;
3140
+ if (sortedVersions[i].version !== expected) {
3141
+ throw new Error(
3142
+ `[ObjectBuilder] Migration versions must be sequential starting at 2. Expected version ${expected}, got ${sortedVersions[i].version}.`
3143
+ );
3144
+ }
3145
+ }
3146
+ const schema_version = sortedVersions.length > 0 ? sortedVersions[sortedVersions.length - 1].version : 1;
2954
3147
  return {
2955
3148
  ...this.obj,
2956
3149
  pluralLabel: this._pluralLabel,
2957
- labelExpression: this._labelExpression
3150
+ labelExpression: this._labelExpression,
3151
+ schema_version,
3152
+ migrations: sortedVersions
2958
3153
  };
2959
3154
  }
2960
3155
  /**
@@ -3020,7 +3215,7 @@ var GroupBuilder = class {
3020
3215
  */
3021
3216
  fields(...names) {
3022
3217
  for (const name of names) {
3023
- _optionalChain([this, 'access', _47 => _47.data, 'access', _48 => _48.fields, 'optionalAccess', _49 => _49.push, 'call', _50 => _50({ attribute: name })]);
3218
+ _optionalChain([this, 'access', _48 => _48.data, 'access', _49 => _49.fields, 'optionalAccess', _50 => _50.push, 'call', _51 => _51({ attribute: name })]);
3024
3219
  }
3025
3220
  return this;
3026
3221
  }
@@ -3029,7 +3224,7 @@ var GroupBuilder = class {
3029
3224
  * @example .field("name", { span: 8, readOnly: true })
3030
3225
  */
3031
3226
  field(attribute, options) {
3032
- _optionalChain([this, 'access', _51 => _51.data, 'access', _52 => _52.fields, 'optionalAccess', _53 => _53.push, 'call', _54 => _54({ attribute, ...options })]);
3227
+ _optionalChain([this, 'access', _52 => _52.data, 'access', _53 => _53.fields, 'optionalAccess', _54 => _54.push, 'call', _55 => _55({ attribute, ...options })]);
3033
3228
  return this;
3034
3229
  }
3035
3230
  /**
@@ -3038,7 +3233,7 @@ var GroupBuilder = class {
3038
3233
  * @example .attributeGroup({ id: "address", label: "Address", attributes: ["street", "city", "postal_code"], displayTemplate: "{street}, {city}" })
3039
3234
  */
3040
3235
  attributeGroup(config, options) {
3041
- _optionalChain([this, 'access', _55 => _55.data, 'access', _56 => _56.fields, 'optionalAccess', _57 => _57.push, 'call', _58 => _58({ attributeGroup: config, ...options })]);
3236
+ _optionalChain([this, 'access', _56 => _56.data, 'access', _57 => _57.fields, 'optionalAccess', _58 => _58.push, 'call', _59 => _59({ attributeGroup: config, ...options })]);
3042
3237
  return this;
3043
3238
  }
3044
3239
  /**
@@ -3622,6 +3817,7 @@ var TabBuilder = class {
3622
3817
  };
3623
3818
  var DetailViewBuilder = class {
3624
3819
  constructor(name, label) {
3820
+ this._version = 1;
3625
3821
  this.validateName(name);
3626
3822
  this.data = {
3627
3823
  name,
@@ -3683,6 +3879,17 @@ var DetailViewBuilder = class {
3683
3879
  this.data.metadata = value;
3684
3880
  return this;
3685
3881
  }
3882
+ /**
3883
+ * Set the schema version for this view definition.
3884
+ * Increment when making breaking changes to force client updates.
3885
+ * @param v - Version number (must be >= 1)
3886
+ * @default 1
3887
+ */
3888
+ version(v) {
3889
+ if (v < 1) throw new Error("View version must be >= 1");
3890
+ this._version = v;
3891
+ return this;
3892
+ }
3686
3893
  /**
3687
3894
  * Configure a side panel with flat attribute fields displayed alongside tab content.
3688
3895
  * Not available for modal layout.
@@ -3755,7 +3962,8 @@ var DetailViewBuilder = class {
3755
3962
  type: "detail",
3756
3963
  config,
3757
3964
  default: this.data.default,
3758
- metadata: this.data.metadata
3965
+ metadata: this.data.metadata,
3966
+ schema_version: this._version
3759
3967
  };
3760
3968
  }
3761
3969
  /**
@@ -3784,6 +3992,7 @@ function view(name, label) {
3784
3992
  }
3785
3993
  var ListViewBuilder = class {
3786
3994
  constructor(name, label) {
3995
+ this._version = 1;
3787
3996
  this.validateName(name);
3788
3997
  this.data = {
3789
3998
  name,
@@ -3827,6 +4036,17 @@ var ListViewBuilder = class {
3827
4036
  this.data.metadata = value;
3828
4037
  return this;
3829
4038
  }
4039
+ /**
4040
+ * Set the schema version for this view definition.
4041
+ * Increment when making breaking changes to force client updates.
4042
+ * @param v - Version number (must be >= 1)
4043
+ * @default 1
4044
+ */
4045
+ version(v) {
4046
+ if (v < 1) throw new Error("View version must be >= 1");
4047
+ this._version = v;
4048
+ return this;
4049
+ }
3830
4050
  /**
3831
4051
  * Set base filters applied to ALL tabs (scoping, tenant, etc.)
3832
4052
  * @example .baseFilter({ combinator: "and", rules: [{ attribute: "tenant", operator: "is", value: "acme" }] })
@@ -3922,7 +4142,8 @@ var ListViewBuilder = class {
3922
4142
  type: "list",
3923
4143
  config,
3924
4144
  default: this.data.default,
3925
- metadata: this.data.metadata
4145
+ metadata: this.data.metadata,
4146
+ schema_version: this._version
3926
4147
  };
3927
4148
  }
3928
4149
  /**
@@ -4137,8 +4358,8 @@ var WorkflowFormRowBuilder = class {
4137
4358
  id: `${this.rowData.id}-${slotId}-${attribute}`,
4138
4359
  slotId,
4139
4360
  attribute,
4140
- label: _optionalChain([options, 'optionalAccess', _59 => _59.label]),
4141
- required: _optionalChain([options, 'optionalAccess', _60 => _60.required])
4361
+ label: _optionalChain([options, 'optionalAccess', _60 => _60.label]),
4362
+ required: _optionalChain([options, 'optionalAccess', _61 => _61.required])
4142
4363
  };
4143
4364
  this.rowData.fields.push(field);
4144
4365
  return this;
@@ -4153,16 +4374,16 @@ var WorkflowFormRowBuilder = class {
4153
4374
  * @param options - Optional label, required flag, and relation config
4154
4375
  */
4155
4376
  relationField(slotId, attribute, options) {
4156
- const relationConfig = _optionalChain([options, 'optionalAccess', _61 => _61.visibleProperties]) || _optionalChain([options, 'optionalAccess', _62 => _62.allowCreate]) !== void 0 ? {
4157
- visibleProperties: _optionalChain([options, 'optionalAccess', _63 => _63.visibleProperties]),
4158
- allowCreate: _optionalChain([options, 'optionalAccess', _64 => _64.allowCreate])
4377
+ const relationConfig = _optionalChain([options, 'optionalAccess', _62 => _62.visibleProperties]) || _optionalChain([options, 'optionalAccess', _63 => _63.allowCreate]) !== void 0 ? {
4378
+ visibleProperties: _optionalChain([options, 'optionalAccess', _64 => _64.visibleProperties]),
4379
+ allowCreate: _optionalChain([options, 'optionalAccess', _65 => _65.allowCreate])
4159
4380
  } : void 0;
4160
4381
  const field = {
4161
4382
  id: `${this.rowData.id}-${slotId}-${attribute}`,
4162
4383
  slotId,
4163
4384
  attribute,
4164
- label: _optionalChain([options, 'optionalAccess', _65 => _65.label]),
4165
- required: _optionalChain([options, 'optionalAccess', _66 => _66.required]),
4385
+ label: _optionalChain([options, 'optionalAccess', _66 => _66.label]),
4386
+ required: _optionalChain([options, 'optionalAccess', _67 => _67.required]),
4166
4387
  relationConfig
4167
4388
  };
4168
4389
  this.rowData.fields.push(field);
@@ -4264,14 +4485,42 @@ var WorkflowFormBuilder = class {
4264
4485
  this.rows.push(row);
4265
4486
  return this;
4266
4487
  }
4488
+ /**
4489
+ * Add a relation list row to the form.
4490
+ * Renders an editable list of related records for a given slot and relation.
4491
+ *
4492
+ * @param id - Unique row identifier
4493
+ * @param slotId - The slot containing the relation
4494
+ * @param relationName - The relation attribute name
4495
+ * @param options - Display and preload options
4496
+ */
4497
+ relationListField(id, slotId, relationName, options = {}) {
4498
+ this.rowOrder++;
4499
+ const row = {
4500
+ id,
4501
+ order: this.rowOrder,
4502
+ type: "relationList",
4503
+ slotId,
4504
+ relationName,
4505
+ preload: _nullishCoalesce(options.preload, () => ( true)),
4506
+ columns: _nullishCoalesce(options.columns, () => ( [])),
4507
+ qualifiersInline: _nullishCoalesce(options.qualifiersInline, () => ( true)),
4508
+ modalFields: _nullishCoalesce(options.modalFields, () => ( "all")),
4509
+ label: options.label
4510
+ };
4511
+ this.rows.push(row);
4512
+ return this;
4513
+ }
4267
4514
  /**
4268
4515
  * Set the next node and complete the form definition
4269
4516
  */
4270
4517
  next(nodeId) {
4271
- const hasFieldRows = this.rows.some((r) => !r.type || r.type === "fields");
4518
+ const hasFieldRows = this.rows.some(
4519
+ (r) => !r.type || r.type === "fields" || r.type === "relationList"
4520
+ );
4272
4521
  if (!hasFieldRows) {
4273
4522
  throw new Error(
4274
- `[WorkflowBuilder] Form "${this.nodeId}" has no field rows. Use .row() to add fields.`
4523
+ `[WorkflowBuilder] Form "${this.nodeId}" has no field rows. Use .row() or .relationListField() to add fields.`
4275
4524
  );
4276
4525
  }
4277
4526
  return this.workflowBuilder._addFormNode({
@@ -4661,7 +4910,7 @@ var WorkflowBuilder = class {
4661
4910
  * @param options - Slot configuration
4662
4911
  */
4663
4912
  slot(id, objectName, options) {
4664
- if (_optionalChain([this, 'access', _67 => _67.data, 'access', _68 => _68.slots, 'optionalAccess', _69 => _69.some, 'call', _70 => _70((s) => s.id === id)])) {
4913
+ if (_optionalChain([this, 'access', _68 => _68.data, 'access', _69 => _69.slots, 'optionalAccess', _70 => _70.some, 'call', _71 => _71((s) => s.id === id)])) {
4665
4914
  throw new Error(`[WorkflowBuilder] Duplicate slot id: "${id}"`);
4666
4915
  }
4667
4916
  const slot = {
@@ -4672,7 +4921,7 @@ var WorkflowBuilder = class {
4672
4921
  color: options.color,
4673
4922
  icon: options.icon
4674
4923
  };
4675
- _optionalChain([this, 'access', _71 => _71.data, 'access', _72 => _72.slots, 'optionalAccess', _73 => _73.push, 'call', _74 => _74(slot)]);
4924
+ _optionalChain([this, 'access', _72 => _72.data, 'access', _73 => _73.slots, 'optionalAccess', _74 => _74.push, 'call', _75 => _75(slot)]);
4676
4925
  return this;
4677
4926
  }
4678
4927
  // ============================================================================
@@ -4805,7 +5054,7 @@ var WorkflowBuilder = class {
4805
5054
  }
4806
5055
  }
4807
5056
  validateSlotReferences() {
4808
- const slotIds = _nullishCoalesce(_optionalChain([this, 'access', _75 => _75.data, 'access', _76 => _76.slots, 'optionalAccess', _77 => _77.reduce, 'call', _78 => _78((set, s) => set.add(s.id), /* @__PURE__ */ new Set())]), () => ( /* @__PURE__ */ new Set()));
5057
+ const slotIds = _nullishCoalesce(_optionalChain([this, 'access', _76 => _76.data, 'access', _77 => _77.slots, 'optionalAccess', _78 => _78.reduce, 'call', _79 => _79((set, s) => set.add(s.id), /* @__PURE__ */ new Set())]), () => ( /* @__PURE__ */ new Set()));
4809
5058
  for (const node of Object.values(_nullishCoalesce(this.data.nodes, () => ( {})))) {
4810
5059
  for (const slotId of getNodeSlotIds(node)) {
4811
5060
  if (!slotIds.has(slotId)) {
@@ -4938,7 +5187,7 @@ var BaseFlagBuilder = class {
4938
5187
  * @throws {Error} If label is not set or is whitespace-only
4939
5188
  */
4940
5189
  build() {
4941
- if (!_optionalChain([this, 'access', _79 => _79.flag, 'access', _80 => _80.label, 'optionalAccess', _81 => _81.trim, 'call', _82 => _82()])) {
5190
+ if (!_optionalChain([this, 'access', _80 => _80.flag, 'access', _81 => _81.label, 'optionalAccess', _82 => _82.trim, 'call', _83 => _83()])) {
4942
5191
  throw new Error(
4943
5192
  `Flag "${this.flag.name}" must have a label. Use .label("Human-readable label").`
4944
5193
  );
@@ -5153,7 +5402,7 @@ var FlagRegistry = class {
5153
5402
  * @returns The default value or undefined if flag not found
5154
5403
  */
5155
5404
  getDefaultValue(name) {
5156
- return _optionalChain([this, 'access', _83 => _83.get, 'call', _84 => _84(name), 'optionalAccess', _85 => _85.defaultValue]);
5405
+ return _optionalChain([this, 'access', _84 => _84.get, 'call', _85 => _85(name), 'optionalAccess', _86 => _86.defaultValue]);
5157
5406
  }
5158
5407
  /**
5159
5408
  * Get a map of all flag names to their default values.
@@ -5199,7 +5448,7 @@ var FlagService = class {
5199
5448
  constructor(options) {
5200
5449
  this.repository = options.repository;
5201
5450
  this.registry = options.registry;
5202
- this.staticDefaults = new Map(_nullishCoalesce(_optionalChain([options, 'access', _86 => _86.staticDefaults, 'optionalAccess', _87 => _87.map, 'call', _88 => _88((d) => [d.name, d.value])]), () => ( [])));
5451
+ this.staticDefaults = new Map(_nullishCoalesce(_optionalChain([options, 'access', _87 => _87.staticDefaults, 'optionalAccess', _88 => _88.map, 'call', _89 => _89((d) => [d.name, d.value])]), () => ( [])));
5203
5452
  }
5204
5453
  /**
5205
5454
  * Resolve all flags for the current context.
@@ -5277,7 +5526,7 @@ var FlagService = class {
5277
5526
  `Flag "${flagName}" does not allow ${level}-level overrides. Allowed levels: ${flag.allowedLevels.join(", ")}`
5278
5527
  );
5279
5528
  }
5280
- if (_optionalChain([flag, 'optionalAccess', _89 => _89.system])) {
5529
+ if (_optionalChain([flag, 'optionalAccess', _90 => _90.system])) {
5281
5530
  throw new Error(`Flag "${flagName}" is a system flag and cannot be overridden via API.`);
5282
5531
  }
5283
5532
  await this.repository.setOverride({
@@ -5328,7 +5577,7 @@ var FlagService = class {
5328
5577
  */
5329
5578
  resolveValue(flagName, overrides, context) {
5330
5579
  const flag = this.registry.get(flagName);
5331
- const allowedLevels = _nullishCoalesce(_optionalChain([flag, 'optionalAccess', _90 => _90.allowedLevels]), () => ( ["global", "tenant", "user"]));
5580
+ const allowedLevels = _nullishCoalesce(_optionalChain([flag, 'optionalAccess', _91 => _91.allowedLevels]), () => ( ["global", "tenant", "user"]));
5332
5581
  if (context.userId && allowedLevels.includes("user")) {
5333
5582
  const userOverride = overrides.user.find((o) => o.flagName === flagName);
5334
5583
  if (userOverride) return userOverride.value;
@@ -5344,14 +5593,14 @@ var FlagService = class {
5344
5593
  if (this.staticDefaults.has(flagName)) {
5345
5594
  return this.staticDefaults.get(flagName);
5346
5595
  }
5347
- return _optionalChain([flag, 'optionalAccess', _91 => _91.defaultValue]);
5596
+ return _optionalChain([flag, 'optionalAccess', _92 => _92.defaultValue]);
5348
5597
  }
5349
5598
  /**
5350
5599
  * Resolve a flag value with source information.
5351
5600
  */
5352
5601
  resolveWithSource(flagName, overrides, context) {
5353
5602
  const flag = this.registry.get(flagName);
5354
- const allowedLevels = _nullishCoalesce(_optionalChain([flag, 'optionalAccess', _92 => _92.allowedLevels]), () => ( ["global", "tenant", "user"]));
5603
+ const allowedLevels = _nullishCoalesce(_optionalChain([flag, 'optionalAccess', _93 => _93.allowedLevels]), () => ( ["global", "tenant", "user"]));
5355
5604
  if (context.userId && allowedLevels.includes("user")) {
5356
5605
  const userOverride = overrides.user.find((o) => o.flagName === flagName);
5357
5606
  if (userOverride) {
@@ -5393,7 +5642,7 @@ var FlagService = class {
5393
5642
  }
5394
5643
  return {
5395
5644
  name: flagName,
5396
- value: _nullishCoalesce(_optionalChain([flag, 'optionalAccess', _93 => _93.defaultValue]), () => ( void 0)),
5645
+ value: _nullishCoalesce(_optionalChain([flag, 'optionalAccess', _94 => _94.defaultValue]), () => ( void 0)),
5397
5646
  source: "default"
5398
5647
  };
5399
5648
  }
@@ -5453,7 +5702,7 @@ Native objects must have system=true. Did you forget to call .system() in your b
5453
5702
  const existing = this.objects.get(object2.name);
5454
5703
  throw new Error(
5455
5704
  `[NativeObjectRegistry] Duplicate object name "${object2.name}":
5456
- - Existing: "${_optionalChain([existing, 'optionalAccess', _94 => _94.label])}" (id: ${_optionalChain([existing, 'optionalAccess', _95 => _95.id])})
5705
+ - Existing: "${_optionalChain([existing, 'optionalAccess', _95 => _95.label])}" (id: ${_optionalChain([existing, 'optionalAccess', _96 => _96.id])})
5457
5706
  - New: "${object2.label}" (id: ${object2.id})
5458
5707
  Please use unique names for each native object.`
5459
5708
  );
@@ -5809,7 +6058,8 @@ function generateDefaultDetailView(object2, options = {}) {
5809
6058
  object: object2.name,
5810
6059
  type: "detail",
5811
6060
  config,
5812
- default: true
6061
+ default: true,
6062
+ schema_version: 1
5813
6063
  };
5814
6064
  }
5815
6065
  function generateDefaultListView(object2, options = {}) {
@@ -5834,7 +6084,8 @@ function generateDefaultListView(object2, options = {}) {
5834
6084
  object: object2.name,
5835
6085
  type: "list",
5836
6086
  config,
5837
- default: true
6087
+ default: true,
6088
+ schema_version: 1
5838
6089
  };
5839
6090
  }
5840
6091
  function generateFallbackView(object2, type, options = {}) {
@@ -6316,4 +6567,6 @@ function isViewCustomized(view2, object2) {
6316
6567
 
6317
6568
 
6318
6569
 
6319
- exports.AIActionConfigSchema = AIActionConfigSchema; exports.AINodeSchema = AINodeSchema; exports.ALL_ACTIONS = ALL_ACTIONS; exports.ALL_SYSTEM_RESOURCES = ALL_SYSTEM_RESOURCES; exports.ActivityTabConfig = ActivityTabConfig; exports.AssignNodeSchema = AssignNodeSchema; exports.AssignmentMappingSchema = AssignmentMappingSchema; exports.AssignmentSourceSchema = AssignmentSourceSchema; exports.AttributeInUseError = AttributeInUseError; exports.AttributeNotFoundError = AttributeNotFoundError; exports.AuthMethodSchema = AuthMethodSchema; exports.BEHAVIOR_PROPERTIES = BEHAVIOR_PROPERTIES; exports.CodeExecutionActionSchema = CodeExecutionActionSchema; exports.ConcurrentModificationError = ConcurrentModificationError; exports.ConditionGroupSchema = ConditionGroupSchema; exports.ConditionNodeSchema = ConditionNodeSchema; exports.ConditionOperatorSchema = ConditionOperatorSchema; exports.ConditionRuleSchema = ConditionRuleSchema; exports.CreateShareInputSchema = CreateShareInputSchema; exports.CustomTabConfig = CustomTabConfig; exports.DEFAULT_LABEL_FALLBACK = DEFAULT_LABEL_FALLBACK; exports.DEFAULT_ROLES = DEFAULT_ROLES; exports.DEFAULT_ROLE_DESCRIPTIONS = DEFAULT_ROLE_DESCRIPTIONS; exports.DEFAULT_ROLE_FOR_NEW_USERS = DEFAULT_ROLE_FOR_NEW_USERS; exports.DEFAULT_ROLE_LABELS = DEFAULT_ROLE_LABELS; exports.DEFAULT_ROLE_PERMISSIONS = DEFAULT_ROLE_PERMISSIONS; exports.DEFAULT_THEME = DEFAULT_THEME; exports.DEFAULT_VALIDATION_MESSAGES = _chunk7QUI6TSOjs.DEFAULT_VALIDATION_MESSAGES; exports.DetailViewBuilder = DetailViewBuilder; exports.DocumentGenerationActionSchema = DocumentGenerationActionSchema; exports.DocumentsTabConfig = DocumentsTabConfig; exports.DuplicateError = DuplicateError; exports.EMPTY_VALUE_PLACEHOLDER = EMPTY_VALUE_PLACEHOLDER; exports.EndNodeSchema = EndNodeSchema; exports.FORBIDDEN_PROPERTY_TYPES = FORBIDDEN_PROPERTY_TYPES; exports.FileNotFoundError = FileNotFoundError; exports.FlagRegistry = FlagRegistry; exports.FlagService = FlagService; exports.FlowRowFieldSchema = FlowRowFieldSchema; exports.FlowRowSchema = FlowRowSchema; exports.FlowsTabConfig = FlowsTabConfig; exports.ForbiddenError = ForbiddenError; exports.FormFieldRefSchema = FormFieldRefSchema; exports.FormNodeSchema = FormNodeSchema; exports.GroupBuilder = GroupBuilder; exports.IDENTITY_PROPERTIES = IDENTITY_PROPERTIES; exports.ListViewBuilder = ListViewBuilder; exports.ListViewTabConfigBuilder = ListViewTabConfigBuilder; exports.NON_SORTABLE_TYPES = NON_SORTABLE_TYPES; exports.NO_VALUE_OPERATORS = NO_VALUE_OPERATORS; exports.NodePositionSchema = NodePositionSchema; exports.NoopGeocodingAdapter = NoopGeocodingAdapter; exports.NotFoundError = NotFoundError; exports.NotSystemObjectError = NotSystemObjectError; exports.OPERATORS_BY_TYPE = OPERATORS_BY_TYPE; exports.ObjectBuilder = ObjectBuilder; exports.ObjectNotFoundError = ObjectNotFoundError; exports.ObjectReferencedError = ObjectReferencedError; exports.PRESENTATION_PROPERTIES = PRESENTATION_PROPERTIES; exports.PolicyViolationError = PolicyViolationError; exports.ProtectedResourceError = ProtectedResourceError; exports.ProtectedRoleError = ProtectedRoleError; exports.RELATION_TARGET_ANY = RELATION_TARGET_ANY; exports.RESERVED_ATTRIBUTE_NAMES = RESERVED_ATTRIBUTE_NAMES; exports.RecordNotFoundError = RecordNotFoundError; exports.RecordReferencedError = RecordReferencedError; exports.RelationGroupBuilder = RelationGroupBuilder; exports.RichtextTabConfig = RichtextTabConfig; exports.RoleNotFoundError = RoleNotFoundError; exports.SYSTEM_ATTRIBUTES = SYSTEM_ATTRIBUTES; exports.SYSTEM_FIELD_NAMES = SYSTEM_FIELD_NAMES; exports.SYSTEM_RESOURCES = SYSTEM_RESOURCES; exports.SYSTEM_RESOURCE_LABELS = SYSTEM_RESOURCE_LABELS; exports.SchemaError = SchemaError; exports.SchemaErrorCode = SchemaErrorCode; exports.ShareStatusSchema = ShareStatusSchema; exports.SlotModeSchema = SlotModeSchema; exports.StartNodeSchema = StartNodeSchema; exports.SyncError = SyncError; exports.TabBuilder = TabBuilder; exports.TableTabConfig = TableTabConfig; exports.ThemeColorsSchema = ThemeColorsSchema; exports.ThemeLogoSchema = ThemeLogoSchema; exports.USER_STATUSES = USER_STATUSES; exports.UserProfileNotFoundError = UserProfileNotFoundError; exports.ValidationError = ValidationError; exports.ViewBuilder = ViewBuilder; exports.ViewportSchema = ViewportSchema; exports.WorkflowAIBuilder = WorkflowAIBuilder; exports.WorkflowAssignBuilder = WorkflowAssignBuilder; exports.WorkflowBuilder = WorkflowBuilder; exports.WorkflowConditionBuilder = WorkflowConditionBuilder; exports.WorkflowConfigSchema = WorkflowConfigSchema; exports.WorkflowDefinitionSchema = WorkflowDefinitionSchema; exports.WorkflowEndBuilder = WorkflowEndBuilder; exports.WorkflowFormBuilder = WorkflowFormBuilder; exports.WorkflowFormRowBuilder = WorkflowFormRowBuilder; exports.WorkflowLayoutSchema = WorkflowLayoutSchema; exports.WorkflowNodeSchema = WorkflowNodeSchema; exports.WorkflowShareSchema = WorkflowShareSchema; exports.WorkflowSimpleFormBuilder = WorkflowSimpleFormBuilder; exports.WorkflowSlotSchema = WorkflowSlotSchema; exports.WorkflowStartBuilder = WorkflowStartBuilder; exports.WorkflowStatusSchema = WorkflowStatusSchema; exports.WorkflowThemeSchema = WorkflowThemeSchema; exports.ZONE_CONFIG = ZONE_CONFIG; exports.ZONE_ORDER = ZONE_ORDER; exports.accessLevelToActions = accessLevelToActions; exports.actionsToAccessLevel = actionsToAccessLevel; exports.and = and; exports.applyRelationProps = applyRelationProps; exports.asTenantId = _chunkE6XO2STSjs.asTenantId; exports.asUserId = _chunkE6XO2STSjs.asUserId; exports.assignNodeZones = assignNodeZones; exports.attributeConfigSchemas = _chunk7QUI6TSOjs.attributeConfigSchemas; exports.booleanFlag = booleanFlag; exports.canAccessNode = canAccessNode; exports.canResumeInstance = canResumeInstance; exports.checkbox = checkbox; exports.checkboxConfigSchema = _chunk7QUI6TSOjs.checkboxConfigSchema; exports.computeRecordStatus = _chunk7QUI6TSOjs.computeRecordStatus; exports.createAttributeValidator = _chunk7QUI6TSOjs.createAttributeValidator; exports.createCheckboxValidator = _chunk7QUI6TSOjs.createCheckboxValidator; exports.createCurrencyValidator = _chunk7QUI6TSOjs.createCurrencyValidator; exports.createDateValidator = _chunk7QUI6TSOjs.createDateValidator; exports.createDraftValidator = _chunk7QUI6TSOjs.createDraftValidator; exports.createEmptyContext = createEmptyContext; exports.createFileValidator = _chunk7QUI6TSOjs.createFileValidator; exports.createFlagRegistry = createFlagRegistry; exports.createFlagService = createFlagService; exports.createFormAttributeValidator = _chunk7QUI6TSOjs.createFormAttributeValidator; exports.createFormulaValidator = _chunk7QUI6TSOjs.createFormulaValidator; exports.createLocationValidator = _chunk7QUI6TSOjs.createLocationValidator; exports.createMultiRelationValidator = _chunk7QUI6TSOjs.createMultiRelationValidator; exports.createMultiselectValidator = _chunk7QUI6TSOjs.createMultiselectValidator; exports.createNumberValidator = _chunk7QUI6TSOjs.createNumberValidator; exports.createObjectValidator = _chunk7QUI6TSOjs.createObjectValidator; exports.createPhoneValidator = _chunk7QUI6TSOjs.createPhoneValidator; exports.createRatingValidator = _chunk7QUI6TSOjs.createRatingValidator; exports.createRelationValidator = _chunk7QUI6TSOjs.createRelationValidator; exports.createRichtextValidator = _chunk7QUI6TSOjs.createRichtextValidator; exports.createRollupValidator = _chunk7QUI6TSOjs.createRollupValidator; exports.createSelectValidator = _chunk7QUI6TSOjs.createSelectValidator; exports.createSingleRelationValidator = _chunk7QUI6TSOjs.createSingleRelationValidator; exports.createStartTransition = createStartTransition; exports.createStatusValidator = _chunk7QUI6TSOjs.createStatusValidator; exports.createTextAreaValidator = _chunk7QUI6TSOjs.createTextAreaValidator; exports.createTextValidator = _chunk7QUI6TSOjs.createTextValidator; exports.createUserValidator = _chunk7QUI6TSOjs.createUserValidator; exports.currency = currency; exports.currencyConfigSchema = _chunk7QUI6TSOjs.currencyConfigSchema; exports.date = date; exports.dateConfigSchema = _chunk7QUI6TSOjs.dateConfigSchema; exports.deepEqual = _chunkE6XO2STSjs.deepEqual; exports.detailView = detailView; exports.document = document; exports.documentConfigSchema = _chunk7QUI6TSOjs.documentConfigSchema; exports.eq = eq; exports.extractAttributeNames = extractAttributeNames; exports.file = file; exports.fileConfigSchema = _chunk7QUI6TSOjs.fileConfigSchema; exports.flagRegistry = flagRegistry; exports.formatAttributeValue = formatAttributeValue; exports.formatPhoneForDisplay = _chunk7QUI6TSOjs.formatPhoneForDisplay; exports.formatZodErrors = _chunk7QUI6TSOjs.formatZodErrors; exports.formula = formula; exports.formulaConfigSchema = _chunk7QUI6TSOjs.formulaConfigSchema; exports.generateCssVariables = generateCssVariables; exports.generateDefaultDetailView = generateDefaultDetailView; exports.generateDefaultListView = generateDefaultListView; exports.generateFallbackView = generateFallbackView; exports.generateId = _chunkE6XO2STSjs.generateId; exports.generatePrefixedId = _chunkE6XO2STSjs.generatePrefixedId; exports.generateTemplateName = _chunkE6XO2STSjs.generateTemplateName; exports.getActiveTab = getActiveTab; exports.getAttributeConfigSchema = _chunk7QUI6TSOjs.getAttributeConfigSchema; exports.getContextValue = getContextValue; exports.getErrorMessage = getErrorMessage; exports.getFormFieldRefs = getFormFieldRefs; exports.getMissingRequiredAttributes = _chunk7QUI6TSOjs.getMissingRequiredAttributes; exports.getNodeOutputs = getNodeOutputs; exports.getNodeSlotIds = getNodeSlotIds; exports.getRollupFilterOperators = getRollupFilterOperators; exports.getSystemAttributeList = getSystemAttributeList; exports.getZoneAllowedTypes = getZoneAllowedTypes; exports.group = group; exports.groupNodesByZone = groupNodesByZone; exports.hasOptions = hasOptions; exports.hasProperties = hasProperties; exports.inValues = inValues; exports.indexBy = _chunkE6XO2STSjs.indexBy; exports.inferInverseCardinality = inferInverseCardinality; exports.isAINode = isAINode; exports.isActivityTab = isActivityTab; exports.isAdvancedFormNode = isAdvancedFormNode; exports.isAssignNode = isAssignNode; exports.isAttributeSortable = isAttributeSortable; exports.isBehaviorProperty = isBehaviorProperty; exports.isBilateralRelation = isBilateralRelation; exports.isCalendarView = isCalendarView; exports.isConditionGroup = isConditionGroup; exports.isConditionNode = isConditionNode; exports.isConditionRule = isConditionRule; exports.isCustomTab = isCustomTab; exports.isDefaultRole = isDefaultRole; exports.isDetailView = isDetailView; exports.isDocumentsTab = isDocumentsTab; exports.isEmpty = isEmpty2; exports.isEndNode = isEndNode; exports.isFieldGroup = isFieldGroup; exports.isFlowDefinition = isFlowDefinition; exports.isFlowFieldsRow = isFlowFieldsRow; exports.isFlowPublished = isFlowPublished; exports.isFlowsTab = isFlowsTab; exports.isForbiddenError = isForbiddenError; exports.isFormFieldsRow = isFormFieldsRow; exports.isFormNode = isFormNode; exports.isFormTab = isFormTab; exports.isGalleryView = isGalleryView; exports.isGrantExpired = isGrantExpired; exports.isGrantRevoked = isGrantRevoked; exports.isGrantValid = isGrantValid; exports.isIdentityProperty = isIdentityProperty; exports.isInstanceEvent = isInstanceEvent; exports.isInstanceTerminal = isInstanceTerminal; exports.isInstanceWaiting = isInstanceWaiting; exports.isInverseSourceTab = isInverseSourceTab; exports.isInvitationAccepted = isInvitationAccepted; exports.isInvitationExpired = isInvitationExpired; exports.isInvitationOrGrantEvent = isInvitationOrGrantEvent; exports.isInvitationValid = isInvitationValid; exports.isLabelExpression = isLabelExpression; exports.isLayoutRow = isLayoutRow; exports.isListView = isListView; exports.isNoValueOperator = isNoValueOperator; exports.isNodeEvent = isNodeEvent; exports.isNotEmpty = isNotEmpty2; exports.isNotFoundError = isNotFoundError; exports.isPresentationProperty = isPresentationProperty; exports.isProtectedResourceError = isProtectedResourceError; exports.isRecordComplete = _chunk7QUI6TSOjs.isRecordComplete; exports.isRelationGroup = isRelationGroup; exports.isRelationSourceTab = isRelationSourceTab; exports.isRichtextTab = isRichtextTab; exports.isSchemaError = isSchemaError; exports.isSimpleFormNode = isSimpleFormNode; exports.isStartNode = isStartNode; exports.isSystemAttribute = isSystemAttribute; exports.isSystemAttributeObject = isSystemAttributeObject; exports.isSystemFlow = isSystemFlow; exports.isSystemWorkflow = isSystemWorkflow; exports.isTableTab = isTableTab; exports.isTimelineView = isTimelineView; exports.isTokenRevoked = isTokenRevoked; exports.isUniversalRelation = isUniversalRelation; exports.isValidationError = isValidationError; exports.isViewCustomized = isViewCustomized; exports.isWorkflowDefinition = isWorkflowDefinition; exports.isWorkflowPublished = isWorkflowPublished; exports.jsonFlag = jsonFlag; exports.listView = listView; exports.location = location; exports.locationConfigSchema = _chunk7QUI6TSOjs.locationConfigSchema; exports.mergeWithDefaults = mergeWithDefaults; exports.multiselect = multiselect; exports.multiselectConfigSchema = _chunk7QUI6TSOjs.multiselectConfigSchema; exports.neq = neq; exports.nodeTypeRegistry = nodeTypeRegistry; exports.normalizePhoneNumber = _chunk7QUI6TSOjs.normalizePhoneNumber; exports.number = number; exports.numberConfigSchema = _chunk7QUI6TSOjs.numberConfigSchema; exports.numberFlag = numberFlag; exports.object = object; exports.or = or; exports.parseAttributeConfig = _chunk7QUI6TSOjs.parseAttributeConfig; exports.parseRawPhoneInput = _chunk7QUI6TSOjs.parseRawPhoneInput; exports.phone = phone; exports.phoneConfigSchema = _chunk7QUI6TSOjs.phoneConfigSchema; exports.rating = rating; exports.ratingConfigSchema = _chunk7QUI6TSOjs.ratingConfigSchema; exports.registry = registry; exports.relation = relation; exports.relationConfigSchema = _chunk7QUI6TSOjs.relationConfigSchema; exports.relationGroup = relationGroup; exports.renderLabelExpression = renderLabelExpression; exports.resetViewToDefault = resetViewToDefault; exports.richtext = richtext; exports.richtextConfigSchema = _chunk7QUI6TSOjs.richtextConfigSchema; exports.rollup = rollup; exports.rollupConfigSchema = _chunk7QUI6TSOjs.rollupConfigSchema; exports.safeParseAttributeConfig = _chunk7QUI6TSOjs.safeParseAttributeConfig; exports.select = select; exports.selectConfigSchema = _chunk7QUI6TSOjs.selectConfigSchema; exports.setContextValue = setContextValue; exports.setNodeNext = setNodeNext; exports.slugify = _chunkE6XO2STSjs.slugify; exports.status = status; exports.statusConfigSchema = _chunk7QUI6TSOjs.statusConfigSchema; exports.stringFlag = stringFlag; exports.text = text; exports.textConfigSchema = _chunk7QUI6TSOjs.textConfigSchema; exports.textarea = textarea; exports.textareaConfigSchema = _chunk7QUI6TSOjs.textareaConfigSchema; exports.toUndefinedIfEmpty = toUndefinedIfEmpty; exports.user = user; exports.userConfigSchema = _chunk7QUI6TSOjs.userConfigSchema; exports.validateAttribute = _chunk7QUI6TSOjs.validateAttribute; exports.validateAttributeConfig = _chunk7QUI6TSOjs.validateAttributeConfig; exports.validateDraft = _chunk7QUI6TSOjs.validateDraft; exports.validateDraftOrThrow = _chunk7QUI6TSOjs.validateDraftOrThrow; exports.validateNode = validateNode; exports.validateObject = _chunk7QUI6TSOjs.validateObject; exports.validateObjectOrThrow = _chunk7QUI6TSOjs.validateObjectOrThrow; exports.validatePhoneNumber = _chunk7QUI6TSOjs.validatePhoneNumber; exports.view = view; exports.viewRegistry = viewRegistry; exports.workflow = workflow;
6570
+
6571
+
6572
+ exports.AIActionConfigSchema = AIActionConfigSchema; exports.AINodeSchema = AINodeSchema; exports.ALL_ACTIONS = ALL_ACTIONS; exports.ALL_SYSTEM_RESOURCES = ALL_SYSTEM_RESOURCES; exports.ActivityTabConfig = ActivityTabConfig; exports.AssignNodeSchema = AssignNodeSchema; exports.AssignmentMappingSchema = AssignmentMappingSchema; exports.AssignmentSourceSchema = AssignmentSourceSchema; exports.AttributeInUseError = AttributeInUseError; exports.AttributeNotFoundError = AttributeNotFoundError; exports.AuthMethodSchema = AuthMethodSchema; exports.BEHAVIOR_PROPERTIES = BEHAVIOR_PROPERTIES; exports.CodeExecutionActionSchema = CodeExecutionActionSchema; exports.ConcurrentModificationError = ConcurrentModificationError; exports.ConditionGroupSchema = ConditionGroupSchema; exports.ConditionNodeSchema = ConditionNodeSchema; exports.ConditionOperatorSchema = ConditionOperatorSchema; exports.ConditionRuleSchema = ConditionRuleSchema; exports.CreateShareInputSchema = CreateShareInputSchema; exports.CustomTabConfig = CustomTabConfig; exports.DEFAULT_LABEL_FALLBACK = DEFAULT_LABEL_FALLBACK; exports.DEFAULT_RETENTION_POLICY = DEFAULT_RETENTION_POLICY; exports.DEFAULT_ROLES = DEFAULT_ROLES; exports.DEFAULT_ROLE_DESCRIPTIONS = DEFAULT_ROLE_DESCRIPTIONS; exports.DEFAULT_ROLE_FOR_NEW_USERS = DEFAULT_ROLE_FOR_NEW_USERS; exports.DEFAULT_ROLE_LABELS = DEFAULT_ROLE_LABELS; exports.DEFAULT_ROLE_PERMISSIONS = DEFAULT_ROLE_PERMISSIONS; exports.DEFAULT_THEME = DEFAULT_THEME; exports.DEFAULT_VALIDATION_MESSAGES = _chunk7QUI6TSOjs.DEFAULT_VALIDATION_MESSAGES; exports.DetailViewBuilder = DetailViewBuilder; exports.DocumentGenerationActionSchema = DocumentGenerationActionSchema; exports.DocumentsTabConfig = DocumentsTabConfig; exports.DuplicateError = DuplicateError; exports.EMPTY_VALUE_PLACEHOLDER = EMPTY_VALUE_PLACEHOLDER; exports.EndNodeSchema = EndNodeSchema; exports.FORBIDDEN_PROPERTY_TYPES = FORBIDDEN_PROPERTY_TYPES; exports.FileNotFoundError = FileNotFoundError; exports.FlagRegistry = FlagRegistry; exports.FlagService = FlagService; exports.FlowRowFieldSchema = FlowRowFieldSchema; exports.FlowRowSchema = FlowRowSchema; exports.FlowsTabConfig = FlowsTabConfig; exports.ForbiddenError = ForbiddenError; exports.FormFieldRefSchema = FormFieldRefSchema; exports.FormNodeSchema = FormNodeSchema; exports.GroupBuilder = GroupBuilder; exports.IDENTITY_PROPERTIES = IDENTITY_PROPERTIES; exports.ListViewBuilder = ListViewBuilder; exports.ListViewTabConfigBuilder = ListViewTabConfigBuilder; exports.NON_SORTABLE_TYPES = NON_SORTABLE_TYPES; exports.NO_VALUE_OPERATORS = NO_VALUE_OPERATORS; exports.NodePositionSchema = NodePositionSchema; exports.NoopGeocodingAdapter = NoopGeocodingAdapter; exports.NotFoundError = NotFoundError; exports.NotSystemObjectError = NotSystemObjectError; exports.OPERATORS_BY_TYPE = OPERATORS_BY_TYPE; exports.ObjectBuilder = ObjectBuilder; exports.ObjectNotFoundError = ObjectNotFoundError; exports.ObjectReferencedError = ObjectReferencedError; exports.PRESENTATION_PROPERTIES = PRESENTATION_PROPERTIES; exports.PolicyViolationError = PolicyViolationError; exports.ProtectedResourceError = ProtectedResourceError; exports.ProtectedRoleError = ProtectedRoleError; exports.RELATION_TARGET_ANY = RELATION_TARGET_ANY; exports.RESERVED_ATTRIBUTE_NAMES = RESERVED_ATTRIBUTE_NAMES; exports.RecordNotFoundError = RecordNotFoundError; exports.RecordReferencedError = RecordReferencedError; exports.RelationGroupBuilder = RelationGroupBuilder; exports.RichtextTabConfig = RichtextTabConfig; exports.RoleNotFoundError = RoleNotFoundError; exports.SYSTEM_ATTRIBUTES = SYSTEM_ATTRIBUTES; exports.SYSTEM_FIELD_NAMES = SYSTEM_FIELD_NAMES; exports.SYSTEM_RESOURCES = SYSTEM_RESOURCES; exports.SYSTEM_RESOURCE_LABELS = SYSTEM_RESOURCE_LABELS; exports.SchemaError = SchemaError; exports.SchemaErrorCode = SchemaErrorCode; exports.ShareStatusSchema = ShareStatusSchema; exports.SlotModeSchema = SlotModeSchema; exports.StartNodeSchema = StartNodeSchema; exports.SyncError = SyncError; exports.TabBuilder = TabBuilder; exports.TableTabConfig = TableTabConfig; exports.ThemeColorsSchema = ThemeColorsSchema; exports.ThemeLogoSchema = ThemeLogoSchema; exports.USER_STATUSES = USER_STATUSES; exports.UserProfileNotFoundError = UserProfileNotFoundError; exports.ValidationError = ValidationError; exports.ViewBuilder = ViewBuilder; exports.ViewportSchema = ViewportSchema; exports.WorkflowAIBuilder = WorkflowAIBuilder; exports.WorkflowAssignBuilder = WorkflowAssignBuilder; exports.WorkflowBuilder = WorkflowBuilder; exports.WorkflowConditionBuilder = WorkflowConditionBuilder; exports.WorkflowConfigSchema = WorkflowConfigSchema; exports.WorkflowDefinitionSchema = WorkflowDefinitionSchema; exports.WorkflowEndBuilder = WorkflowEndBuilder; exports.WorkflowFormBuilder = WorkflowFormBuilder; exports.WorkflowFormRowBuilder = WorkflowFormRowBuilder; exports.WorkflowLayoutSchema = WorkflowLayoutSchema; exports.WorkflowNodeSchema = WorkflowNodeSchema; exports.WorkflowShareSchema = WorkflowShareSchema; exports.WorkflowSimpleFormBuilder = WorkflowSimpleFormBuilder; exports.WorkflowSlotSchema = WorkflowSlotSchema; exports.WorkflowStartBuilder = WorkflowStartBuilder; exports.WorkflowStatusSchema = WorkflowStatusSchema; exports.WorkflowThemeSchema = WorkflowThemeSchema; exports.ZONE_CONFIG = ZONE_CONFIG; exports.ZONE_ORDER = ZONE_ORDER; exports.accessLevelToActions = accessLevelToActions; exports.actionsToAccessLevel = actionsToAccessLevel; exports.and = and; exports.applyRelationProps = applyRelationProps; exports.asTenantId = _chunkE6XO2STSjs.asTenantId; exports.asUserId = _chunkE6XO2STSjs.asUserId; exports.assignNodeZones = assignNodeZones; exports.attributeConfigSchemas = _chunk7QUI6TSOjs.attributeConfigSchemas; exports.booleanFlag = booleanFlag; exports.canAccessNode = canAccessNode; exports.canResumeInstance = canResumeInstance; exports.checkbox = checkbox; exports.checkboxConfigSchema = _chunk7QUI6TSOjs.checkboxConfigSchema; exports.computeRecordStatus = _chunk7QUI6TSOjs.computeRecordStatus; exports.createAttributeValidator = _chunk7QUI6TSOjs.createAttributeValidator; exports.createCheckboxValidator = _chunk7QUI6TSOjs.createCheckboxValidator; exports.createCurrencyValidator = _chunk7QUI6TSOjs.createCurrencyValidator; exports.createDateValidator = _chunk7QUI6TSOjs.createDateValidator; exports.createDraftValidator = _chunk7QUI6TSOjs.createDraftValidator; exports.createEmptyContext = createEmptyContext; exports.createFileValidator = _chunk7QUI6TSOjs.createFileValidator; exports.createFlagRegistry = createFlagRegistry; exports.createFlagService = createFlagService; exports.createFormAttributeValidator = _chunk7QUI6TSOjs.createFormAttributeValidator; exports.createFormulaValidator = _chunk7QUI6TSOjs.createFormulaValidator; exports.createLocationValidator = _chunk7QUI6TSOjs.createLocationValidator; exports.createMultiRelationValidator = _chunk7QUI6TSOjs.createMultiRelationValidator; exports.createMultiselectValidator = _chunk7QUI6TSOjs.createMultiselectValidator; exports.createNumberValidator = _chunk7QUI6TSOjs.createNumberValidator; exports.createObjectValidator = _chunk7QUI6TSOjs.createObjectValidator; exports.createPhoneValidator = _chunk7QUI6TSOjs.createPhoneValidator; exports.createRatingValidator = _chunk7QUI6TSOjs.createRatingValidator; exports.createRelationValidator = _chunk7QUI6TSOjs.createRelationValidator; exports.createRichtextValidator = _chunk7QUI6TSOjs.createRichtextValidator; exports.createRollupValidator = _chunk7QUI6TSOjs.createRollupValidator; exports.createSelectValidator = _chunk7QUI6TSOjs.createSelectValidator; exports.createSingleRelationValidator = _chunk7QUI6TSOjs.createSingleRelationValidator; exports.createStartTransition = createStartTransition; exports.createStatusValidator = _chunk7QUI6TSOjs.createStatusValidator; exports.createTextAreaValidator = _chunk7QUI6TSOjs.createTextAreaValidator; exports.createTextValidator = _chunk7QUI6TSOjs.createTextValidator; exports.createUserValidator = _chunk7QUI6TSOjs.createUserValidator; exports.currency = currency; exports.currencyConfigSchema = _chunk7QUI6TSOjs.currencyConfigSchema; exports.date = date; exports.dateConfigSchema = _chunk7QUI6TSOjs.dateConfigSchema; exports.deepEqual = _chunkE6XO2STSjs.deepEqual; exports.detailView = detailView; exports.document = document; exports.documentConfigSchema = _chunk7QUI6TSOjs.documentConfigSchema; exports.eq = eq; exports.extractAttributeNames = extractAttributeNames; exports.file = file; exports.fileConfigSchema = _chunk7QUI6TSOjs.fileConfigSchema; exports.flagRegistry = flagRegistry; exports.formatAttributeValue = formatAttributeValue; exports.formatPhoneForDisplay = _chunk7QUI6TSOjs.formatPhoneForDisplay; exports.formatZodErrors = _chunk7QUI6TSOjs.formatZodErrors; exports.formula = formula; exports.formulaConfigSchema = _chunk7QUI6TSOjs.formulaConfigSchema; exports.generateCssVariables = generateCssVariables; exports.generateDefaultDetailView = generateDefaultDetailView; exports.generateDefaultListView = generateDefaultListView; exports.generateFallbackView = generateFallbackView; exports.generateId = _chunkE6XO2STSjs.generateId; exports.generatePrefixedId = _chunkE6XO2STSjs.generatePrefixedId; exports.generateTemplateName = _chunkE6XO2STSjs.generateTemplateName; exports.getActiveTab = getActiveTab; exports.getAttributeConfigSchema = _chunk7QUI6TSOjs.getAttributeConfigSchema; exports.getContextValue = getContextValue; exports.getErrorMessage = getErrorMessage; exports.getFormFieldRefs = getFormFieldRefs; exports.getMissingRequiredAttributes = _chunk7QUI6TSOjs.getMissingRequiredAttributes; exports.getNodeOutputs = getNodeOutputs; exports.getNodeSlotIds = getNodeSlotIds; exports.getRollupFilterOperators = getRollupFilterOperators; exports.getSystemAttributeList = getSystemAttributeList; exports.getZoneAllowedTypes = getZoneAllowedTypes; exports.group = group; exports.groupNodesByZone = groupNodesByZone; exports.hasOptions = hasOptions; exports.hasProperties = hasProperties; exports.inValues = inValues; exports.indexBy = _chunkE6XO2STSjs.indexBy; exports.inferInverseCardinality = inferInverseCardinality; exports.isAINode = isAINode; exports.isActivityTab = isActivityTab; exports.isAdvancedFormNode = isAdvancedFormNode; exports.isAssignNode = isAssignNode; exports.isAttributeSortable = isAttributeSortable; exports.isBehaviorProperty = isBehaviorProperty; exports.isBilateralRelation = isBilateralRelation; exports.isCalendarView = isCalendarView; exports.isConditionGroup = isConditionGroup; exports.isConditionNode = isConditionNode; exports.isConditionRule = isConditionRule; exports.isCustomTab = isCustomTab; exports.isDefaultRole = isDefaultRole; exports.isDetailView = isDetailView; exports.isDocumentsTab = isDocumentsTab; exports.isEmpty = isEmpty2; exports.isEndNode = isEndNode; exports.isFieldGroup = isFieldGroup; exports.isFlowDefinition = isFlowDefinition; exports.isFlowFieldsRow = isFlowFieldsRow; exports.isFlowPublished = isFlowPublished; exports.isFlowRelationListRow = isFlowRelationListRow; exports.isFlowsTab = isFlowsTab; exports.isForbiddenError = isForbiddenError; exports.isFormFieldsRow = isFormFieldsRow; exports.isFormNode = isFormNode; exports.isFormTab = isFormTab; exports.isGalleryView = isGalleryView; exports.isGrantExpired = isGrantExpired; exports.isGrantRevoked = isGrantRevoked; exports.isGrantValid = isGrantValid; exports.isIdentityProperty = isIdentityProperty; exports.isInstanceEvent = isInstanceEvent; exports.isInstanceTerminal = isInstanceTerminal; exports.isInstanceWaiting = isInstanceWaiting; exports.isInverseSourceTab = isInverseSourceTab; exports.isInvitationAccepted = isInvitationAccepted; exports.isInvitationExpired = isInvitationExpired; exports.isInvitationOrGrantEvent = isInvitationOrGrantEvent; exports.isInvitationValid = isInvitationValid; exports.isLabelExpression = isLabelExpression; exports.isLayoutRow = isLayoutRow; exports.isListView = isListView; exports.isNoValueOperator = isNoValueOperator; exports.isNodeEvent = isNodeEvent; exports.isNotEmpty = isNotEmpty2; exports.isNotFoundError = isNotFoundError; exports.isPresentationProperty = isPresentationProperty; exports.isProtectedResourceError = isProtectedResourceError; exports.isRecordComplete = _chunk7QUI6TSOjs.isRecordComplete; exports.isRelationGroup = isRelationGroup; exports.isRelationSourceTab = isRelationSourceTab; exports.isRichtextTab = isRichtextTab; exports.isSchemaError = isSchemaError; exports.isSimpleFormNode = isSimpleFormNode; exports.isStartNode = isStartNode; exports.isSystemAttribute = isSystemAttribute; exports.isSystemAttributeObject = isSystemAttributeObject; exports.isSystemFlow = isSystemFlow; exports.isSystemWorkflow = isSystemWorkflow; exports.isTableTab = isTableTab; exports.isTimelineView = isTimelineView; exports.isTokenRevoked = isTokenRevoked; exports.isUniversalRelation = isUniversalRelation; exports.isValidationError = isValidationError; exports.isViewCustomized = isViewCustomized; exports.isWorkflowDefinition = isWorkflowDefinition; exports.isWorkflowPublished = isWorkflowPublished; exports.jsonFlag = jsonFlag; exports.listView = listView; exports.location = location; exports.locationConfigSchema = _chunk7QUI6TSOjs.locationConfigSchema; exports.mergeWithDefaults = mergeWithDefaults; exports.multiselect = multiselect; exports.multiselectConfigSchema = _chunk7QUI6TSOjs.multiselectConfigSchema; exports.neq = neq; exports.nodeTypeRegistry = nodeTypeRegistry; exports.normalizePhoneNumber = _chunk7QUI6TSOjs.normalizePhoneNumber; exports.number = number; exports.numberConfigSchema = _chunk7QUI6TSOjs.numberConfigSchema; exports.numberFlag = numberFlag; exports.object = object; exports.or = or; exports.parseAttributeConfig = _chunk7QUI6TSOjs.parseAttributeConfig; exports.parseRawPhoneInput = _chunk7QUI6TSOjs.parseRawPhoneInput; exports.phone = phone; exports.phoneConfigSchema = _chunk7QUI6TSOjs.phoneConfigSchema; exports.rating = rating; exports.ratingConfigSchema = _chunk7QUI6TSOjs.ratingConfigSchema; exports.registry = registry; exports.relation = relation; exports.relationConfigSchema = _chunk7QUI6TSOjs.relationConfigSchema; exports.relationGroup = relationGroup; exports.renderLabelExpression = renderLabelExpression; exports.resetViewToDefault = resetViewToDefault; exports.richtext = richtext; exports.richtextConfigSchema = _chunk7QUI6TSOjs.richtextConfigSchema; exports.rollup = rollup; exports.rollupConfigSchema = _chunk7QUI6TSOjs.rollupConfigSchema; exports.safeParseAttributeConfig = _chunk7QUI6TSOjs.safeParseAttributeConfig; exports.select = select; exports.selectConfigSchema = _chunk7QUI6TSOjs.selectConfigSchema; exports.setContextValue = setContextValue; exports.setNodeNext = setNodeNext; exports.slugify = _chunkE6XO2STSjs.slugify; exports.status = status; exports.statusConfigSchema = _chunk7QUI6TSOjs.statusConfigSchema; exports.stringFlag = stringFlag; exports.text = text; exports.textConfigSchema = _chunk7QUI6TSOjs.textConfigSchema; exports.textarea = textarea; exports.textareaConfigSchema = _chunk7QUI6TSOjs.textareaConfigSchema; exports.toUndefinedIfEmpty = toUndefinedIfEmpty; exports.user = user; exports.userConfigSchema = _chunk7QUI6TSOjs.userConfigSchema; exports.validateAttribute = _chunk7QUI6TSOjs.validateAttribute; exports.validateAttributeConfig = _chunk7QUI6TSOjs.validateAttributeConfig; exports.validateDraft = _chunk7QUI6TSOjs.validateDraft; exports.validateDraftOrThrow = _chunk7QUI6TSOjs.validateDraftOrThrow; exports.validateNode = validateNode; exports.validateObject = _chunk7QUI6TSOjs.validateObject; exports.validateObjectOrThrow = _chunk7QUI6TSOjs.validateObjectOrThrow; exports.validatePhoneNumber = _chunk7QUI6TSOjs.validatePhoneNumber; exports.view = view; exports.viewRegistry = viewRegistry; exports.workflow = workflow;