@stndrds/schema 1.0.0-alpha.192 → 1.0.0-alpha.193
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 +63 -63
- package/dist/index.mjs +4 -4
- package/dist/validation/all.js +13 -13
- package/dist/validation/all.mjs +3 -3
- package/dist/validation/object/index.js +14 -14
- package/dist/validation/object/index.mjs +2 -2
- package/package.json +2 -2
- package/dist/{chunk-LTHSU4NF.mjs → chunk-4KY24N26.mjs} +1 -1
- package/dist/{chunk-FQ2ZYOVS.js → chunk-C47FE5UG.js} +1 -1
package/dist/index.js
CHANGED
|
@@ -2,9 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
var chunkFRCDMQER_js = require('./chunk-FRCDMQER.js');
|
|
4
4
|
require('./chunk-PGERPYDR.js');
|
|
5
|
-
var
|
|
6
|
-
var chunkFQ2ZYOVS_js = require('./chunk-FQ2ZYOVS.js');
|
|
7
|
-
require('./chunk-MAKSIK3P.js');
|
|
5
|
+
var chunkC47FE5UG_js = require('./chunk-C47FE5UG.js');
|
|
8
6
|
require('./chunk-J5HRK3WD.js');
|
|
9
7
|
require('./chunk-TKN73433.js');
|
|
10
8
|
require('./chunk-D7WFIGXW.js');
|
|
@@ -14,6 +12,8 @@ require('./chunk-EZHMVZQ4.js');
|
|
|
14
12
|
require('./chunk-VXOTYFEW.js');
|
|
15
13
|
require('./chunk-OAQWRMTP.js');
|
|
16
14
|
require('./chunk-ACQ3TUFK.js');
|
|
15
|
+
var chunkYQROI4IE_js = require('./chunk-YQROI4IE.js');
|
|
16
|
+
require('./chunk-MAKSIK3P.js');
|
|
17
17
|
require('./chunk-DC7YYE3U.js');
|
|
18
18
|
require('./chunk-ROAZLZA2.js');
|
|
19
19
|
require('./chunk-CCB4OY2O.js');
|
|
@@ -1053,7 +1053,7 @@ var BaseAttributeBuilder = class {
|
|
|
1053
1053
|
* @see https://standardschema.dev/
|
|
1054
1054
|
*/
|
|
1055
1055
|
get "~standard"() {
|
|
1056
|
-
const zodSchema =
|
|
1056
|
+
const zodSchema = chunkC47FE5UG_js.createAttributeValidator(this.build());
|
|
1057
1057
|
return createStandardSchemaProps(zodSchema);
|
|
1058
1058
|
}
|
|
1059
1059
|
constructor(type, name, label) {
|
|
@@ -2431,7 +2431,7 @@ var ObjectBuilder = class {
|
|
|
2431
2431
|
* @see https://standardschema.dev/
|
|
2432
2432
|
*/
|
|
2433
2433
|
get "~standard"() {
|
|
2434
|
-
const zodSchema =
|
|
2434
|
+
const zodSchema = chunkC47FE5UG_js.createObjectValidator(this.build());
|
|
2435
2435
|
return createStandardSchemaProps(zodSchema);
|
|
2436
2436
|
}
|
|
2437
2437
|
/**
|
|
@@ -2598,17 +2598,17 @@ var ObjectBuilder = class {
|
|
|
2598
2598
|
throw new Error("[ObjectBuilder] Missing required field: label");
|
|
2599
2599
|
}
|
|
2600
2600
|
if (!this._labelExpression) {
|
|
2601
|
-
throw new
|
|
2601
|
+
throw new chunkC47FE5UG_js.SchemaError(
|
|
2602
2602
|
`Object "${this.obj.name}" must have a labelExpression. The labelExpression defines how records are displayed in lists and relations (e.g. "{{ name }}").`,
|
|
2603
|
-
|
|
2603
|
+
chunkC47FE5UG_js.SchemaErrorCode.VALIDATION_FAILED
|
|
2604
2604
|
);
|
|
2605
2605
|
}
|
|
2606
2606
|
const labelResult = labelExpressionSchema.safeParse(this._labelExpression);
|
|
2607
2607
|
if (!labelResult.success) {
|
|
2608
2608
|
const errorMsg = labelResult.error.issues[0]?.message ?? "Invalid labelExpression";
|
|
2609
|
-
throw new
|
|
2609
|
+
throw new chunkC47FE5UG_js.SchemaError(
|
|
2610
2610
|
`Invalid labelExpression for "${this.obj.name}": ${errorMsg}`,
|
|
2611
|
-
|
|
2611
|
+
chunkC47FE5UG_js.SchemaErrorCode.VALIDATION_FAILED
|
|
2612
2612
|
);
|
|
2613
2613
|
}
|
|
2614
2614
|
const sortedVersions = [...this._migrations].sort((a, b) => a.version - b.version);
|
|
@@ -2645,7 +2645,7 @@ var ObjectBuilder = class {
|
|
|
2645
2645
|
objectNameSchema.parse(name);
|
|
2646
2646
|
} catch (error) {
|
|
2647
2647
|
if (error instanceof z3__default.default.ZodError) {
|
|
2648
|
-
throw new
|
|
2648
|
+
throw new chunkC47FE5UG_js.SchemaError(error.issues[0].message, chunkC47FE5UG_js.SchemaErrorCode.INVALID_OBJECT_NAME);
|
|
2649
2649
|
}
|
|
2650
2650
|
throw error;
|
|
2651
2651
|
}
|
|
@@ -5398,7 +5398,7 @@ function assertOperatorForType(operator, type, context) {
|
|
|
5398
5398
|
if (!ops?.includes(operator)) {
|
|
5399
5399
|
const validList = ops?.length ? ops.join(", ") : "(no operators registered for this type)";
|
|
5400
5400
|
const summary = `Operator "${operator}" is not valid for ${context} type "${type}". Valid operators: ${validList}.`;
|
|
5401
|
-
throw new
|
|
5401
|
+
throw new chunkC47FE5UG_js.ValidationError(summary, [
|
|
5402
5402
|
{
|
|
5403
5403
|
path: ["operator"],
|
|
5404
5404
|
message: summary
|
|
@@ -5410,19 +5410,19 @@ function validateQualifiedRule(rule, context) {
|
|
|
5410
5410
|
const rootAttr = context.attributes.find((a) => a.name === rule.attribute);
|
|
5411
5411
|
const systemOps = SYSTEM_FILTER_OPERATORS[rule.attribute];
|
|
5412
5412
|
if (!(rootAttr || systemOps)) {
|
|
5413
|
-
throw new
|
|
5413
|
+
throw new chunkC47FE5UG_js.ValidationError(`Unknown attribute: ${rule.attribute}`, [
|
|
5414
5414
|
{ path: ["attribute"], message: `Unknown attribute: ${rule.attribute}` }
|
|
5415
5415
|
]);
|
|
5416
5416
|
}
|
|
5417
5417
|
if (!rootAttr) {
|
|
5418
5418
|
if (rule.property) {
|
|
5419
|
-
throw new
|
|
5419
|
+
throw new chunkC47FE5UG_js.ValidationError(`Cannot qualify system attribute "${rule.attribute}"`, [
|
|
5420
5420
|
{ path: ["property"], message: `"${rule.attribute}" is a system column, not a reference` }
|
|
5421
5421
|
]);
|
|
5422
5422
|
}
|
|
5423
5423
|
if (!systemOps.includes(rule.operator)) {
|
|
5424
5424
|
const summary = `Operator "${rule.operator}" is not valid for system attribute "${rule.attribute}". Valid operators: ${systemOps.join(", ")}.`;
|
|
5425
|
-
throw new
|
|
5425
|
+
throw new chunkC47FE5UG_js.ValidationError(summary, [{ path: ["operator"], message: summary }]);
|
|
5426
5426
|
}
|
|
5427
5427
|
return;
|
|
5428
5428
|
}
|
|
@@ -5434,19 +5434,19 @@ function validateQualifiedRule(rule, context) {
|
|
|
5434
5434
|
return;
|
|
5435
5435
|
}
|
|
5436
5436
|
if (!REFERENCE_TYPES.has(rootAttr.type)) {
|
|
5437
|
-
throw new
|
|
5437
|
+
throw new chunkC47FE5UG_js.ValidationError(`Cannot qualify ${rootAttr.type} attribute "${rule.attribute}"`, [
|
|
5438
5438
|
{ path: ["property"], message: `Attribute "${rule.attribute}" is not a reference type` }
|
|
5439
5439
|
]);
|
|
5440
5440
|
}
|
|
5441
5441
|
const propSchema = rootAttr.properties;
|
|
5442
5442
|
if (!propSchema) {
|
|
5443
|
-
throw new
|
|
5443
|
+
throw new chunkC47FE5UG_js.ValidationError(`Attribute "${rule.attribute}" has no qualifyWith schema`, [
|
|
5444
5444
|
{ path: ["property"], message: `"${rule.attribute}" has no qualifyWith` }
|
|
5445
5445
|
]);
|
|
5446
5446
|
}
|
|
5447
5447
|
const propDef = propSchema.definitions.find((p) => p.name === rule.property);
|
|
5448
5448
|
if (!propDef) {
|
|
5449
|
-
throw new
|
|
5449
|
+
throw new chunkC47FE5UG_js.ValidationError(
|
|
5450
5450
|
`Property "${rule.property}" not defined on "${rule.attribute}".qualifyWith()`,
|
|
5451
5451
|
[{ path: ["property"], message: `Unknown property: ${rule.property}` }]
|
|
5452
5452
|
);
|
|
@@ -5474,177 +5474,177 @@ Object.defineProperty(exports, "indexBy", {
|
|
|
5474
5474
|
enumerable: true,
|
|
5475
5475
|
get: function () { return chunkFRCDMQER_js.indexBy; }
|
|
5476
5476
|
});
|
|
5477
|
-
Object.defineProperty(exports, "parseAttributeConfig", {
|
|
5478
|
-
enumerable: true,
|
|
5479
|
-
get: function () { return chunkYQROI4IE_js.parseAttributeConfig; }
|
|
5480
|
-
});
|
|
5481
5477
|
Object.defineProperty(exports, "AccessDeniedError", {
|
|
5482
5478
|
enumerable: true,
|
|
5483
|
-
get: function () { return
|
|
5479
|
+
get: function () { return chunkC47FE5UG_js.AccessDeniedError; }
|
|
5484
5480
|
});
|
|
5485
5481
|
Object.defineProperty(exports, "AttributeInUseError", {
|
|
5486
5482
|
enumerable: true,
|
|
5487
|
-
get: function () { return
|
|
5483
|
+
get: function () { return chunkC47FE5UG_js.AttributeInUseError; }
|
|
5488
5484
|
});
|
|
5489
5485
|
Object.defineProperty(exports, "AttributeNotFoundError", {
|
|
5490
5486
|
enumerable: true,
|
|
5491
|
-
get: function () { return
|
|
5487
|
+
get: function () { return chunkC47FE5UG_js.AttributeNotFoundError; }
|
|
5492
5488
|
});
|
|
5493
5489
|
Object.defineProperty(exports, "ChangeTypeNotSupportedError", {
|
|
5494
5490
|
enumerable: true,
|
|
5495
|
-
get: function () { return
|
|
5491
|
+
get: function () { return chunkC47FE5UG_js.ChangeTypeNotSupportedError; }
|
|
5496
5492
|
});
|
|
5497
5493
|
Object.defineProperty(exports, "ConcurrentModificationError", {
|
|
5498
5494
|
enumerable: true,
|
|
5499
|
-
get: function () { return
|
|
5495
|
+
get: function () { return chunkC47FE5UG_js.ConcurrentModificationError; }
|
|
5500
5496
|
});
|
|
5501
5497
|
Object.defineProperty(exports, "DestructiveSyncNotAllowedError", {
|
|
5502
5498
|
enumerable: true,
|
|
5503
|
-
get: function () { return
|
|
5499
|
+
get: function () { return chunkC47FE5UG_js.DestructiveSyncNotAllowedError; }
|
|
5504
5500
|
});
|
|
5505
5501
|
Object.defineProperty(exports, "DuplicateError", {
|
|
5506
5502
|
enumerable: true,
|
|
5507
|
-
get: function () { return
|
|
5503
|
+
get: function () { return chunkC47FE5UG_js.DuplicateError; }
|
|
5508
5504
|
});
|
|
5509
5505
|
Object.defineProperty(exports, "ForbiddenError", {
|
|
5510
5506
|
enumerable: true,
|
|
5511
|
-
get: function () { return
|
|
5507
|
+
get: function () { return chunkC47FE5UG_js.ForbiddenError; }
|
|
5512
5508
|
});
|
|
5513
5509
|
Object.defineProperty(exports, "MemoryNotFoundError", {
|
|
5514
5510
|
enumerable: true,
|
|
5515
|
-
get: function () { return
|
|
5511
|
+
get: function () { return chunkC47FE5UG_js.MemoryNotFoundError; }
|
|
5516
5512
|
});
|
|
5517
5513
|
Object.defineProperty(exports, "MigrationTimeoutError", {
|
|
5518
5514
|
enumerable: true,
|
|
5519
|
-
get: function () { return
|
|
5515
|
+
get: function () { return chunkC47FE5UG_js.MigrationTimeoutError; }
|
|
5520
5516
|
});
|
|
5521
5517
|
Object.defineProperty(exports, "NotFoundError", {
|
|
5522
5518
|
enumerable: true,
|
|
5523
|
-
get: function () { return
|
|
5519
|
+
get: function () { return chunkC47FE5UG_js.NotFoundError; }
|
|
5524
5520
|
});
|
|
5525
5521
|
Object.defineProperty(exports, "NotImplementedError", {
|
|
5526
5522
|
enumerable: true,
|
|
5527
|
-
get: function () { return
|
|
5523
|
+
get: function () { return chunkC47FE5UG_js.NotImplementedError; }
|
|
5528
5524
|
});
|
|
5529
5525
|
Object.defineProperty(exports, "ObjectNotFoundError", {
|
|
5530
5526
|
enumerable: true,
|
|
5531
|
-
get: function () { return
|
|
5527
|
+
get: function () { return chunkC47FE5UG_js.ObjectNotFoundError; }
|
|
5532
5528
|
});
|
|
5533
5529
|
Object.defineProperty(exports, "ObjectReferencedError", {
|
|
5534
5530
|
enumerable: true,
|
|
5535
|
-
get: function () { return
|
|
5531
|
+
get: function () { return chunkC47FE5UG_js.ObjectReferencedError; }
|
|
5536
5532
|
});
|
|
5537
5533
|
Object.defineProperty(exports, "OrphanSystemAttributeError", {
|
|
5538
5534
|
enumerable: true,
|
|
5539
|
-
get: function () { return
|
|
5535
|
+
get: function () { return chunkC47FE5UG_js.OrphanSystemAttributeError; }
|
|
5540
5536
|
});
|
|
5541
5537
|
Object.defineProperty(exports, "ProtectedResourceError", {
|
|
5542
5538
|
enumerable: true,
|
|
5543
|
-
get: function () { return
|
|
5539
|
+
get: function () { return chunkC47FE5UG_js.ProtectedResourceError; }
|
|
5544
5540
|
});
|
|
5545
5541
|
Object.defineProperty(exports, "ProtectedRoleError", {
|
|
5546
5542
|
enumerable: true,
|
|
5547
|
-
get: function () { return
|
|
5543
|
+
get: function () { return chunkC47FE5UG_js.ProtectedRoleError; }
|
|
5548
5544
|
});
|
|
5549
5545
|
Object.defineProperty(exports, "RecordNotFoundError", {
|
|
5550
5546
|
enumerable: true,
|
|
5551
|
-
get: function () { return
|
|
5547
|
+
get: function () { return chunkC47FE5UG_js.RecordNotFoundError; }
|
|
5552
5548
|
});
|
|
5553
5549
|
Object.defineProperty(exports, "RecordReferencedError", {
|
|
5554
5550
|
enumerable: true,
|
|
5555
|
-
get: function () { return
|
|
5551
|
+
get: function () { return chunkC47FE5UG_js.RecordReferencedError; }
|
|
5556
5552
|
});
|
|
5557
5553
|
Object.defineProperty(exports, "RepositoryError", {
|
|
5558
5554
|
enumerable: true,
|
|
5559
|
-
get: function () { return
|
|
5555
|
+
get: function () { return chunkC47FE5UG_js.RepositoryError; }
|
|
5560
5556
|
});
|
|
5561
5557
|
Object.defineProperty(exports, "RoleNotFoundError", {
|
|
5562
5558
|
enumerable: true,
|
|
5563
|
-
get: function () { return
|
|
5559
|
+
get: function () { return chunkC47FE5UG_js.RoleNotFoundError; }
|
|
5564
5560
|
});
|
|
5565
5561
|
Object.defineProperty(exports, "SchemaError", {
|
|
5566
5562
|
enumerable: true,
|
|
5567
|
-
get: function () { return
|
|
5563
|
+
get: function () { return chunkC47FE5UG_js.SchemaError; }
|
|
5568
5564
|
});
|
|
5569
5565
|
Object.defineProperty(exports, "SchemaErrorCode", {
|
|
5570
5566
|
enumerable: true,
|
|
5571
|
-
get: function () { return
|
|
5567
|
+
get: function () { return chunkC47FE5UG_js.SchemaErrorCode; }
|
|
5572
5568
|
});
|
|
5573
5569
|
Object.defineProperty(exports, "StorageError", {
|
|
5574
5570
|
enumerable: true,
|
|
5575
|
-
get: function () { return
|
|
5571
|
+
get: function () { return chunkC47FE5UG_js.StorageError; }
|
|
5576
5572
|
});
|
|
5577
5573
|
Object.defineProperty(exports, "SyncCascadeError", {
|
|
5578
5574
|
enumerable: true,
|
|
5579
|
-
get: function () { return
|
|
5575
|
+
get: function () { return chunkC47FE5UG_js.SyncCascadeError; }
|
|
5580
5576
|
});
|
|
5581
5577
|
Object.defineProperty(exports, "SyncConflictError", {
|
|
5582
5578
|
enumerable: true,
|
|
5583
|
-
get: function () { return
|
|
5579
|
+
get: function () { return chunkC47FE5UG_js.SyncConflictError; }
|
|
5584
5580
|
});
|
|
5585
5581
|
Object.defineProperty(exports, "SyncError", {
|
|
5586
5582
|
enumerable: true,
|
|
5587
|
-
get: function () { return
|
|
5583
|
+
get: function () { return chunkC47FE5UG_js.SyncError; }
|
|
5588
5584
|
});
|
|
5589
5585
|
Object.defineProperty(exports, "SystemEntityImmutableError", {
|
|
5590
5586
|
enumerable: true,
|
|
5591
|
-
get: function () { return
|
|
5587
|
+
get: function () { return chunkC47FE5UG_js.SystemEntityImmutableError; }
|
|
5592
5588
|
});
|
|
5593
5589
|
Object.defineProperty(exports, "ValidationError", {
|
|
5594
5590
|
enumerable: true,
|
|
5595
|
-
get: function () { return
|
|
5591
|
+
get: function () { return chunkC47FE5UG_js.ValidationError; }
|
|
5596
5592
|
});
|
|
5597
5593
|
Object.defineProperty(exports, "computeRecordStatus", {
|
|
5598
5594
|
enumerable: true,
|
|
5599
|
-
get: function () { return
|
|
5595
|
+
get: function () { return chunkC47FE5UG_js.computeRecordStatus; }
|
|
5600
5596
|
});
|
|
5601
5597
|
Object.defineProperty(exports, "createFormAttributeValidator", {
|
|
5602
5598
|
enumerable: true,
|
|
5603
|
-
get: function () { return
|
|
5599
|
+
get: function () { return chunkC47FE5UG_js.createFormAttributeValidator; }
|
|
5604
5600
|
});
|
|
5605
5601
|
Object.defineProperty(exports, "isAttributeInUseError", {
|
|
5606
5602
|
enumerable: true,
|
|
5607
|
-
get: function () { return
|
|
5603
|
+
get: function () { return chunkC47FE5UG_js.isAttributeInUseError; }
|
|
5608
5604
|
});
|
|
5609
5605
|
Object.defineProperty(exports, "isNotFoundError", {
|
|
5610
5606
|
enumerable: true,
|
|
5611
|
-
get: function () { return
|
|
5607
|
+
get: function () { return chunkC47FE5UG_js.isNotFoundError; }
|
|
5612
5608
|
});
|
|
5613
5609
|
Object.defineProperty(exports, "isObjectReferencedError", {
|
|
5614
5610
|
enumerable: true,
|
|
5615
|
-
get: function () { return
|
|
5611
|
+
get: function () { return chunkC47FE5UG_js.isObjectReferencedError; }
|
|
5616
5612
|
});
|
|
5617
5613
|
Object.defineProperty(exports, "isProtectedResourceError", {
|
|
5618
5614
|
enumerable: true,
|
|
5619
|
-
get: function () { return
|
|
5615
|
+
get: function () { return chunkC47FE5UG_js.isProtectedResourceError; }
|
|
5620
5616
|
});
|
|
5621
5617
|
Object.defineProperty(exports, "isRecordReferencedError", {
|
|
5622
5618
|
enumerable: true,
|
|
5623
|
-
get: function () { return
|
|
5619
|
+
get: function () { return chunkC47FE5UG_js.isRecordReferencedError; }
|
|
5624
5620
|
});
|
|
5625
5621
|
Object.defineProperty(exports, "isSchemaError", {
|
|
5626
5622
|
enumerable: true,
|
|
5627
|
-
get: function () { return
|
|
5623
|
+
get: function () { return chunkC47FE5UG_js.isSchemaError; }
|
|
5628
5624
|
});
|
|
5629
5625
|
Object.defineProperty(exports, "isValidationError", {
|
|
5630
5626
|
enumerable: true,
|
|
5631
|
-
get: function () { return
|
|
5627
|
+
get: function () { return chunkC47FE5UG_js.isValidationError; }
|
|
5632
5628
|
});
|
|
5633
5629
|
Object.defineProperty(exports, "validateDraft", {
|
|
5634
5630
|
enumerable: true,
|
|
5635
|
-
get: function () { return
|
|
5631
|
+
get: function () { return chunkC47FE5UG_js.validateDraft; }
|
|
5636
5632
|
});
|
|
5637
5633
|
Object.defineProperty(exports, "validateDraftOrThrow", {
|
|
5638
5634
|
enumerable: true,
|
|
5639
|
-
get: function () { return
|
|
5635
|
+
get: function () { return chunkC47FE5UG_js.validateDraftOrThrow; }
|
|
5640
5636
|
});
|
|
5641
5637
|
Object.defineProperty(exports, "validateObject", {
|
|
5642
5638
|
enumerable: true,
|
|
5643
|
-
get: function () { return
|
|
5639
|
+
get: function () { return chunkC47FE5UG_js.validateObject; }
|
|
5644
5640
|
});
|
|
5645
5641
|
Object.defineProperty(exports, "validateObjectOrThrow", {
|
|
5646
5642
|
enumerable: true,
|
|
5647
|
-
get: function () { return
|
|
5643
|
+
get: function () { return chunkC47FE5UG_js.validateObjectOrThrow; }
|
|
5644
|
+
});
|
|
5645
|
+
Object.defineProperty(exports, "parseAttributeConfig", {
|
|
5646
|
+
enumerable: true,
|
|
5647
|
+
get: function () { return chunkYQROI4IE_js.parseAttributeConfig; }
|
|
5648
5648
|
});
|
|
5649
5649
|
Object.defineProperty(exports, "DEFAULT_VALIDATION_MESSAGES", {
|
|
5650
5650
|
enumerable: true,
|
package/dist/index.mjs
CHANGED
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import { generateId } from './chunk-QY6QFRRV.mjs';
|
|
2
2
|
export { asTenantId, asUserId, deepEqual, generateId, indexBy } from './chunk-QY6QFRRV.mjs';
|
|
3
3
|
import './chunk-SP3PNHYF.mjs';
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
export { AccessDeniedError, AttributeInUseError, AttributeNotFoundError, ChangeTypeNotSupportedError, ConcurrentModificationError, DestructiveSyncNotAllowedError, DuplicateError, ForbiddenError, MemoryNotFoundError, MigrationTimeoutError, NotFoundError, NotImplementedError, ObjectNotFoundError, ObjectReferencedError, OrphanSystemAttributeError, ProtectedResourceError, ProtectedRoleError, RecordNotFoundError, RecordReferencedError, RepositoryError, RoleNotFoundError, SchemaError, SchemaErrorCode, StorageError, SyncCascadeError, SyncConflictError, SyncError, SystemEntityImmutableError, ValidationError, computeRecordStatus, createFormAttributeValidator, isAttributeInUseError, isNotFoundError, isObjectReferencedError, isProtectedResourceError, isRecordReferencedError, isSchemaError, isValidationError, validateDraft, validateDraftOrThrow, validateObject, validateObjectOrThrow } from './chunk-LTHSU4NF.mjs';
|
|
7
|
-
import './chunk-TMYBEXBT.mjs';
|
|
4
|
+
import { createObjectValidator, SchemaError, SchemaErrorCode, ValidationError, createAttributeValidator } from './chunk-4KY24N26.mjs';
|
|
5
|
+
export { AccessDeniedError, AttributeInUseError, AttributeNotFoundError, ChangeTypeNotSupportedError, ConcurrentModificationError, DestructiveSyncNotAllowedError, DuplicateError, ForbiddenError, MemoryNotFoundError, MigrationTimeoutError, NotFoundError, NotImplementedError, ObjectNotFoundError, ObjectReferencedError, OrphanSystemAttributeError, ProtectedResourceError, ProtectedRoleError, RecordNotFoundError, RecordReferencedError, RepositoryError, RoleNotFoundError, SchemaError, SchemaErrorCode, StorageError, SyncCascadeError, SyncConflictError, SyncError, SystemEntityImmutableError, ValidationError, computeRecordStatus, createFormAttributeValidator, isAttributeInUseError, isNotFoundError, isObjectReferencedError, isProtectedResourceError, isRecordReferencedError, isSchemaError, isValidationError, validateDraft, validateDraftOrThrow, validateObject, validateObjectOrThrow } from './chunk-4KY24N26.mjs';
|
|
8
6
|
import './chunk-4KRLCWJM.mjs';
|
|
9
7
|
import './chunk-KNYZH2WD.mjs';
|
|
10
8
|
import './chunk-RUYUFXNW.mjs';
|
|
@@ -14,6 +12,8 @@ import './chunk-SMOHDR6M.mjs';
|
|
|
14
12
|
import './chunk-ITTQ4FGR.mjs';
|
|
15
13
|
import './chunk-IRTRJH37.mjs';
|
|
16
14
|
import './chunk-OLJLCVNY.mjs';
|
|
15
|
+
export { parseAttributeConfig } from './chunk-U4JC7P6D.mjs';
|
|
16
|
+
import './chunk-TMYBEXBT.mjs';
|
|
17
17
|
import './chunk-TEQNVO7W.mjs';
|
|
18
18
|
import './chunk-4TC27SMF.mjs';
|
|
19
19
|
import './chunk-TBYXYSGA.mjs';
|
package/dist/validation/all.js
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
require('../chunk-PGERPYDR.js');
|
|
4
|
-
var
|
|
5
|
-
var chunkFQ2ZYOVS_js = require('../chunk-FQ2ZYOVS.js');
|
|
6
|
-
require('../chunk-MAKSIK3P.js');
|
|
4
|
+
var chunkC47FE5UG_js = require('../chunk-C47FE5UG.js');
|
|
7
5
|
require('../chunk-J5HRK3WD.js');
|
|
8
6
|
require('../chunk-TKN73433.js');
|
|
9
7
|
require('../chunk-D7WFIGXW.js');
|
|
@@ -13,6 +11,8 @@ require('../chunk-EZHMVZQ4.js');
|
|
|
13
11
|
require('../chunk-VXOTYFEW.js');
|
|
14
12
|
require('../chunk-OAQWRMTP.js');
|
|
15
13
|
require('../chunk-ACQ3TUFK.js');
|
|
14
|
+
var chunkYQROI4IE_js = require('../chunk-YQROI4IE.js');
|
|
15
|
+
require('../chunk-MAKSIK3P.js');
|
|
16
16
|
require('../chunk-DC7YYE3U.js');
|
|
17
17
|
require('../chunk-ROAZLZA2.js');
|
|
18
18
|
require('../chunk-CCB4OY2O.js');
|
|
@@ -22,33 +22,33 @@ var chunkT225DB55_js = require('../chunk-T225DB55.js');
|
|
|
22
22
|
|
|
23
23
|
|
|
24
24
|
|
|
25
|
-
Object.defineProperty(exports, "parseAttributeConfig", {
|
|
26
|
-
enumerable: true,
|
|
27
|
-
get: function () { return chunkYQROI4IE_js.parseAttributeConfig; }
|
|
28
|
-
});
|
|
29
25
|
Object.defineProperty(exports, "computeRecordStatus", {
|
|
30
26
|
enumerable: true,
|
|
31
|
-
get: function () { return
|
|
27
|
+
get: function () { return chunkC47FE5UG_js.computeRecordStatus; }
|
|
32
28
|
});
|
|
33
29
|
Object.defineProperty(exports, "createFormAttributeValidator", {
|
|
34
30
|
enumerable: true,
|
|
35
|
-
get: function () { return
|
|
31
|
+
get: function () { return chunkC47FE5UG_js.createFormAttributeValidator; }
|
|
36
32
|
});
|
|
37
33
|
Object.defineProperty(exports, "validateDraft", {
|
|
38
34
|
enumerable: true,
|
|
39
|
-
get: function () { return
|
|
35
|
+
get: function () { return chunkC47FE5UG_js.validateDraft; }
|
|
40
36
|
});
|
|
41
37
|
Object.defineProperty(exports, "validateDraftOrThrow", {
|
|
42
38
|
enumerable: true,
|
|
43
|
-
get: function () { return
|
|
39
|
+
get: function () { return chunkC47FE5UG_js.validateDraftOrThrow; }
|
|
44
40
|
});
|
|
45
41
|
Object.defineProperty(exports, "validateObject", {
|
|
46
42
|
enumerable: true,
|
|
47
|
-
get: function () { return
|
|
43
|
+
get: function () { return chunkC47FE5UG_js.validateObject; }
|
|
48
44
|
});
|
|
49
45
|
Object.defineProperty(exports, "validateObjectOrThrow", {
|
|
50
46
|
enumerable: true,
|
|
51
|
-
get: function () { return
|
|
47
|
+
get: function () { return chunkC47FE5UG_js.validateObjectOrThrow; }
|
|
48
|
+
});
|
|
49
|
+
Object.defineProperty(exports, "parseAttributeConfig", {
|
|
50
|
+
enumerable: true,
|
|
51
|
+
get: function () { return chunkYQROI4IE_js.parseAttributeConfig; }
|
|
52
52
|
});
|
|
53
53
|
Object.defineProperty(exports, "DEFAULT_VALIDATION_MESSAGES", {
|
|
54
54
|
enumerable: true,
|
package/dist/validation/all.mjs
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import '../chunk-SP3PNHYF.mjs';
|
|
2
|
-
export {
|
|
3
|
-
export { computeRecordStatus, createFormAttributeValidator, validateDraft, validateDraftOrThrow, validateObject, validateObjectOrThrow } from '../chunk-LTHSU4NF.mjs';
|
|
4
|
-
import '../chunk-TMYBEXBT.mjs';
|
|
2
|
+
export { computeRecordStatus, createFormAttributeValidator, validateDraft, validateDraftOrThrow, validateObject, validateObjectOrThrow } from '../chunk-4KY24N26.mjs';
|
|
5
3
|
import '../chunk-4KRLCWJM.mjs';
|
|
6
4
|
import '../chunk-KNYZH2WD.mjs';
|
|
7
5
|
import '../chunk-RUYUFXNW.mjs';
|
|
@@ -11,6 +9,8 @@ import '../chunk-SMOHDR6M.mjs';
|
|
|
11
9
|
import '../chunk-ITTQ4FGR.mjs';
|
|
12
10
|
import '../chunk-IRTRJH37.mjs';
|
|
13
11
|
import '../chunk-OLJLCVNY.mjs';
|
|
12
|
+
export { parseAttributeConfig } from '../chunk-U4JC7P6D.mjs';
|
|
13
|
+
import '../chunk-TMYBEXBT.mjs';
|
|
14
14
|
import '../chunk-TEQNVO7W.mjs';
|
|
15
15
|
import '../chunk-4TC27SMF.mjs';
|
|
16
16
|
import '../chunk-TBYXYSGA.mjs';
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('../../chunk-MAKSIK3P.js');
|
|
3
|
+
var chunkC47FE5UG_js = require('../../chunk-C47FE5UG.js');
|
|
5
4
|
require('../../chunk-J5HRK3WD.js');
|
|
6
5
|
require('../../chunk-TKN73433.js');
|
|
7
6
|
require('../../chunk-D7WFIGXW.js');
|
|
@@ -11,6 +10,7 @@ require('../../chunk-EZHMVZQ4.js');
|
|
|
11
10
|
require('../../chunk-VXOTYFEW.js');
|
|
12
11
|
require('../../chunk-OAQWRMTP.js');
|
|
13
12
|
require('../../chunk-ACQ3TUFK.js');
|
|
13
|
+
require('../../chunk-MAKSIK3P.js');
|
|
14
14
|
require('../../chunk-DC7YYE3U.js');
|
|
15
15
|
require('../../chunk-ROAZLZA2.js');
|
|
16
16
|
require('../../chunk-CCB4OY2O.js');
|
|
@@ -22,49 +22,49 @@ require('../../chunk-T225DB55.js');
|
|
|
22
22
|
|
|
23
23
|
Object.defineProperty(exports, "computeRecordStatus", {
|
|
24
24
|
enumerable: true,
|
|
25
|
-
get: function () { return
|
|
25
|
+
get: function () { return chunkC47FE5UG_js.computeRecordStatus; }
|
|
26
26
|
});
|
|
27
27
|
Object.defineProperty(exports, "createAttributeValidator", {
|
|
28
28
|
enumerable: true,
|
|
29
|
-
get: function () { return
|
|
29
|
+
get: function () { return chunkC47FE5UG_js.createAttributeValidator; }
|
|
30
30
|
});
|
|
31
31
|
Object.defineProperty(exports, "createDraftValidator", {
|
|
32
32
|
enumerable: true,
|
|
33
|
-
get: function () { return
|
|
33
|
+
get: function () { return chunkC47FE5UG_js.createDraftValidator; }
|
|
34
34
|
});
|
|
35
35
|
Object.defineProperty(exports, "createFormAttributeValidator", {
|
|
36
36
|
enumerable: true,
|
|
37
|
-
get: function () { return
|
|
37
|
+
get: function () { return chunkC47FE5UG_js.createFormAttributeValidator; }
|
|
38
38
|
});
|
|
39
39
|
Object.defineProperty(exports, "createObjectValidator", {
|
|
40
40
|
enumerable: true,
|
|
41
|
-
get: function () { return
|
|
41
|
+
get: function () { return chunkC47FE5UG_js.createObjectValidator; }
|
|
42
42
|
});
|
|
43
43
|
Object.defineProperty(exports, "getMissingRequiredAttributes", {
|
|
44
44
|
enumerable: true,
|
|
45
|
-
get: function () { return
|
|
45
|
+
get: function () { return chunkC47FE5UG_js.getMissingRequiredAttributes; }
|
|
46
46
|
});
|
|
47
47
|
Object.defineProperty(exports, "isRecordComplete", {
|
|
48
48
|
enumerable: true,
|
|
49
|
-
get: function () { return
|
|
49
|
+
get: function () { return chunkC47FE5UG_js.isRecordComplete; }
|
|
50
50
|
});
|
|
51
51
|
Object.defineProperty(exports, "validateAttribute", {
|
|
52
52
|
enumerable: true,
|
|
53
|
-
get: function () { return
|
|
53
|
+
get: function () { return chunkC47FE5UG_js.validateAttribute; }
|
|
54
54
|
});
|
|
55
55
|
Object.defineProperty(exports, "validateDraft", {
|
|
56
56
|
enumerable: true,
|
|
57
|
-
get: function () { return
|
|
57
|
+
get: function () { return chunkC47FE5UG_js.validateDraft; }
|
|
58
58
|
});
|
|
59
59
|
Object.defineProperty(exports, "validateDraftOrThrow", {
|
|
60
60
|
enumerable: true,
|
|
61
|
-
get: function () { return
|
|
61
|
+
get: function () { return chunkC47FE5UG_js.validateDraftOrThrow; }
|
|
62
62
|
});
|
|
63
63
|
Object.defineProperty(exports, "validateObject", {
|
|
64
64
|
enumerable: true,
|
|
65
|
-
get: function () { return
|
|
65
|
+
get: function () { return chunkC47FE5UG_js.validateObject; }
|
|
66
66
|
});
|
|
67
67
|
Object.defineProperty(exports, "validateObjectOrThrow", {
|
|
68
68
|
enumerable: true,
|
|
69
|
-
get: function () { return
|
|
69
|
+
get: function () { return chunkC47FE5UG_js.validateObjectOrThrow; }
|
|
70
70
|
});
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
export { computeRecordStatus, createAttributeValidator, createDraftValidator, createFormAttributeValidator, createObjectValidator, getMissingRequiredAttributes, isRecordComplete, validateAttribute, validateDraft, validateDraftOrThrow, validateObject, validateObjectOrThrow } from '../../chunk-
|
|
2
|
-
import '../../chunk-TMYBEXBT.mjs';
|
|
1
|
+
export { computeRecordStatus, createAttributeValidator, createDraftValidator, createFormAttributeValidator, createObjectValidator, getMissingRequiredAttributes, isRecordComplete, validateAttribute, validateDraft, validateDraftOrThrow, validateObject, validateObjectOrThrow } from '../../chunk-4KY24N26.mjs';
|
|
3
2
|
import '../../chunk-4KRLCWJM.mjs';
|
|
4
3
|
import '../../chunk-KNYZH2WD.mjs';
|
|
5
4
|
import '../../chunk-RUYUFXNW.mjs';
|
|
@@ -9,6 +8,7 @@ import '../../chunk-SMOHDR6M.mjs';
|
|
|
9
8
|
import '../../chunk-ITTQ4FGR.mjs';
|
|
10
9
|
import '../../chunk-IRTRJH37.mjs';
|
|
11
10
|
import '../../chunk-OLJLCVNY.mjs';
|
|
11
|
+
import '../../chunk-TMYBEXBT.mjs';
|
|
12
12
|
import '../../chunk-TEQNVO7W.mjs';
|
|
13
13
|
import '../../chunk-4TC27SMF.mjs';
|
|
14
14
|
import '../../chunk-TBYXYSGA.mjs';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stndrds/schema",
|
|
3
|
-
"version": "1.0.0-alpha.
|
|
3
|
+
"version": "1.0.0-alpha.193",
|
|
4
4
|
"description": "Standard schema definitions and utilities",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.mjs",
|
|
@@ -131,7 +131,7 @@
|
|
|
131
131
|
"expr-eval": "^2.0.2",
|
|
132
132
|
"libphonenumber-js": "^1.12.31",
|
|
133
133
|
"zod": "^4.2.1",
|
|
134
|
-
"@stndrds/constants": "1.0.0-alpha.
|
|
134
|
+
"@stndrds/constants": "1.0.0-alpha.193"
|
|
135
135
|
},
|
|
136
136
|
"devDependencies": {
|
|
137
137
|
"@types/node": "^25.0.3",
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { createCheckboxValidator } from './chunk-TMYBEXBT.mjs';
|
|
2
1
|
import { createDateValidator } from './chunk-4KRLCWJM.mjs';
|
|
3
2
|
import { createNumberValidator } from './chunk-KNYZH2WD.mjs';
|
|
4
3
|
import { createRatingValidator } from './chunk-RUYUFXNW.mjs';
|
|
@@ -8,6 +7,7 @@ import { createMultiselectValidator, createSelectValidator, createStatusValidato
|
|
|
8
7
|
import { createUserValidator } from './chunk-ITTQ4FGR.mjs';
|
|
9
8
|
import { createFormulaValidator } from './chunk-IRTRJH37.mjs';
|
|
10
9
|
import { createRollupValidator } from './chunk-OLJLCVNY.mjs';
|
|
10
|
+
import { createCheckboxValidator } from './chunk-TMYBEXBT.mjs';
|
|
11
11
|
import { createCurrencyValidator } from './chunk-TEQNVO7W.mjs';
|
|
12
12
|
import { createFileValidator } from './chunk-4TC27SMF.mjs';
|
|
13
13
|
import { createLocationValidator } from './chunk-TBYXYSGA.mjs';
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var chunkMAKSIK3P_js = require('./chunk-MAKSIK3P.js');
|
|
4
3
|
var chunkJ5HRK3WD_js = require('./chunk-J5HRK3WD.js');
|
|
5
4
|
var chunkTKN73433_js = require('./chunk-TKN73433.js');
|
|
6
5
|
var chunkD7WFIGXW_js = require('./chunk-D7WFIGXW.js');
|
|
@@ -10,6 +9,7 @@ var chunkEZHMVZQ4_js = require('./chunk-EZHMVZQ4.js');
|
|
|
10
9
|
var chunkVXOTYFEW_js = require('./chunk-VXOTYFEW.js');
|
|
11
10
|
var chunkOAQWRMTP_js = require('./chunk-OAQWRMTP.js');
|
|
12
11
|
var chunkACQ3TUFK_js = require('./chunk-ACQ3TUFK.js');
|
|
12
|
+
var chunkMAKSIK3P_js = require('./chunk-MAKSIK3P.js');
|
|
13
13
|
var chunkDC7YYE3U_js = require('./chunk-DC7YYE3U.js');
|
|
14
14
|
var chunkROAZLZA2_js = require('./chunk-ROAZLZA2.js');
|
|
15
15
|
var chunkCCB4OY2O_js = require('./chunk-CCB4OY2O.js');
|