@stndrds/schema 0.1.0-alpha.18 → 0.1.0-alpha.20
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/chunk-4SW4V3YU.mjs +8854 -0
- package/dist/chunk-7GSIXU67.mjs +8820 -0
- package/dist/chunk-BKOV4XVX.mjs +8816 -0
- package/dist/chunk-BQUYTOB3.mjs +8815 -0
- package/dist/chunk-BSAR4UKK.mjs +8851 -0
- package/dist/chunk-DPOXIK3M.mjs +8816 -0
- package/dist/chunk-DU2HLOQH.mjs +8813 -0
- package/dist/chunk-I4TTNDN7.mjs +8910 -0
- package/dist/chunk-JD2MVLTW.mjs +8814 -0
- package/dist/chunk-KDHA2N7D.mjs +8927 -0
- package/dist/chunk-MX4X4UEN.mjs +8854 -0
- package/dist/chunk-OJWVSONX.mjs +8900 -0
- package/dist/chunk-PMYSW54L.mjs +8855 -0
- package/dist/chunk-SD2UXOSF.mjs +8814 -0
- package/dist/chunk-Y5KIRAND.mjs +8916 -0
- package/dist/chunk-YLVZT3H4.mjs +8793 -0
- package/dist/chunk-ZU5SR355.mjs +8862 -0
- package/dist/index.d.mts +119 -6
- package/dist/index.d.ts +119 -6
- package/dist/index.js +1215 -11
- package/dist/index.mjs +83 -2
- package/dist/runtime-09fOm3VO.d.mts +6383 -0
- package/dist/runtime-09fOm3VO.d.ts +6383 -0
- package/dist/runtime-BMHqETm7.d.mts +6450 -0
- package/dist/runtime-BMHqETm7.d.ts +6450 -0
- package/dist/runtime-BpsaNQPs.d.mts +6397 -0
- package/dist/runtime-BpsaNQPs.d.ts +6397 -0
- package/dist/runtime-CHAkwiwa.d.mts +6450 -0
- package/dist/runtime-CHAkwiwa.d.ts +6450 -0
- package/dist/runtime-CPggQqoW.d.mts +6428 -0
- package/dist/runtime-CPggQqoW.d.ts +6428 -0
- package/dist/runtime-CfVfZtoq.d.mts +6437 -0
- package/dist/runtime-CfVfZtoq.d.ts +6437 -0
- package/dist/runtime-DSMMZRLE.d.mts +6430 -0
- package/dist/runtime-DSMMZRLE.d.ts +6430 -0
- package/dist/runtime-xtAfMn_f.d.mts +6436 -0
- package/dist/runtime-xtAfMn_f.d.ts +6436 -0
- package/dist/runtime.d.mts +1 -1
- package/dist/runtime.d.ts +1 -1
- package/dist/runtime.js +1075 -9
- package/dist/runtime.mjs +53 -1
- package/package.json +3 -2
package/dist/index.mjs
CHANGED
|
@@ -16,6 +16,8 @@ import {
|
|
|
16
16
|
GeocodingService,
|
|
17
17
|
GlobalSearchService,
|
|
18
18
|
GroupBuilder,
|
|
19
|
+
InvalidPathError,
|
|
20
|
+
MaxDepthExceededError,
|
|
19
21
|
NoopGeocodingAdapter,
|
|
20
22
|
NoopHookRegistry,
|
|
21
23
|
NotFoundError,
|
|
@@ -30,8 +32,11 @@ import {
|
|
|
30
32
|
RecordNotFoundError,
|
|
31
33
|
RecordReferencedError,
|
|
32
34
|
RecordService,
|
|
35
|
+
RelationResolverService,
|
|
33
36
|
RelationService,
|
|
34
37
|
RoleNotFoundError,
|
|
38
|
+
RollupScheduler,
|
|
39
|
+
RollupService,
|
|
35
40
|
SchemaError,
|
|
36
41
|
SchemaErrorCode,
|
|
37
42
|
SyncError,
|
|
@@ -54,6 +59,7 @@ import {
|
|
|
54
59
|
createDateValidator,
|
|
55
60
|
createDraftValidator,
|
|
56
61
|
createFileValidator,
|
|
62
|
+
createFormulaValidator,
|
|
57
63
|
createLocationValidator,
|
|
58
64
|
createMockAdapter,
|
|
59
65
|
createMultiRelationValidator,
|
|
@@ -63,6 +69,7 @@ import {
|
|
|
63
69
|
createPhoneValidator,
|
|
64
70
|
createRatingValidator,
|
|
65
71
|
createRelationValidator,
|
|
72
|
+
createRollupValidator,
|
|
66
73
|
createSelectValidator,
|
|
67
74
|
createSingleRelationValidator,
|
|
68
75
|
createStatusValidator,
|
|
@@ -74,18 +81,34 @@ import {
|
|
|
74
81
|
date,
|
|
75
82
|
dateConfigSchema,
|
|
76
83
|
enrichValuesWithSelectLabels,
|
|
84
|
+
evaluateFormula,
|
|
85
|
+
evaluateFormulaAttribute,
|
|
86
|
+
evaluateFormulaAttributeWithRelations,
|
|
87
|
+
evaluateFormulaWithRelations,
|
|
88
|
+
evaluateFormulaWithResult,
|
|
77
89
|
extractAttributeNames,
|
|
90
|
+
extractFormulaVariables,
|
|
91
|
+
extractRelationNames,
|
|
92
|
+
extractRelationReferences,
|
|
78
93
|
file,
|
|
79
94
|
fileConfigSchema,
|
|
95
|
+
flattenRelationsForEval,
|
|
80
96
|
flow,
|
|
81
97
|
formatAttributeValue,
|
|
98
|
+
formatFormulaResult,
|
|
99
|
+
formula,
|
|
100
|
+
formulaConfigSchema,
|
|
82
101
|
generateId,
|
|
83
102
|
generatePrefixedId,
|
|
84
103
|
getAttributeConfigSchema,
|
|
85
104
|
getMissingRequiredAttributes,
|
|
105
|
+
getPathDepth,
|
|
106
|
+
getRelationPath,
|
|
86
107
|
getSyncPreview,
|
|
108
|
+
getTargetAttributeName,
|
|
87
109
|
getViewSyncPreview,
|
|
88
110
|
group,
|
|
111
|
+
hasRelationReferences,
|
|
89
112
|
isForbiddenError,
|
|
90
113
|
isLabelExpression,
|
|
91
114
|
isNotFoundError,
|
|
@@ -101,6 +124,8 @@ import {
|
|
|
101
124
|
numberConfigSchema,
|
|
102
125
|
object,
|
|
103
126
|
parseAttributeConfig,
|
|
127
|
+
parsePath,
|
|
128
|
+
pathHasManyCardinality,
|
|
104
129
|
phone,
|
|
105
130
|
phoneConfigSchema,
|
|
106
131
|
rating,
|
|
@@ -109,6 +134,10 @@ import {
|
|
|
109
134
|
relation,
|
|
110
135
|
relationConfigSchema,
|
|
111
136
|
renderLabelExpression,
|
|
137
|
+
resolveMultiplePaths,
|
|
138
|
+
resolveSingleValue,
|
|
139
|
+
rollup,
|
|
140
|
+
rollupConfigSchema,
|
|
112
141
|
safeParseAttributeConfig,
|
|
113
142
|
select,
|
|
114
143
|
selectConfigSchema,
|
|
@@ -123,18 +152,21 @@ import {
|
|
|
123
152
|
textareaConfigSchema,
|
|
124
153
|
timestamp,
|
|
125
154
|
timestampConfigSchema,
|
|
155
|
+
traversePath,
|
|
126
156
|
user,
|
|
127
157
|
userConfigSchema,
|
|
128
158
|
validateAttribute,
|
|
129
159
|
validateAttributeConfig,
|
|
130
160
|
validateDraft,
|
|
131
161
|
validateDraftOrThrow,
|
|
162
|
+
validateFormulaExpression,
|
|
132
163
|
validateObject,
|
|
133
164
|
validateObjectOrThrow,
|
|
165
|
+
validatePath,
|
|
134
166
|
verifyNativeObjectsSync,
|
|
135
167
|
verifyNativeViewsSync,
|
|
136
168
|
view
|
|
137
|
-
} from "./chunk-
|
|
169
|
+
} from "./chunk-ZU5SR355.mjs";
|
|
138
170
|
import {
|
|
139
171
|
ALL_SYSTEM_RESOURCES,
|
|
140
172
|
DEFAULT_ROLES,
|
|
@@ -229,7 +261,24 @@ var OPERATORS_BY_TYPE = {
|
|
|
229
261
|
file: ["is_empty", "is_not_empty"],
|
|
230
262
|
user: ["contains", "not_contains", "is_empty", "is_not_empty"],
|
|
231
263
|
relation: ["any_of", "none_of", "contains", "not_contains", "is_empty", "is_not_empty"],
|
|
232
|
-
rating: ["eq", "neq", "lt", "gt", "lte", "gte", "is_empty", "is_not_empty"]
|
|
264
|
+
rating: ["eq", "neq", "lt", "gt", "lte", "gte", "is_empty", "is_not_empty"],
|
|
265
|
+
// Formula: operators depend on returnType, but we provide a general set
|
|
266
|
+
formula: [
|
|
267
|
+
"is",
|
|
268
|
+
"is_not",
|
|
269
|
+
"eq",
|
|
270
|
+
"neq",
|
|
271
|
+
"lt",
|
|
272
|
+
"gt",
|
|
273
|
+
"lte",
|
|
274
|
+
"gte",
|
|
275
|
+
"contains",
|
|
276
|
+
"not_contains",
|
|
277
|
+
"is_empty",
|
|
278
|
+
"is_not_empty"
|
|
279
|
+
],
|
|
280
|
+
// Rollup: typically numeric aggregations
|
|
281
|
+
rollup: ["eq", "neq", "lt", "gt", "lte", "gte", "is_empty", "is_not_empty"]
|
|
233
282
|
};
|
|
234
283
|
var NO_VALUE_OPERATORS = [
|
|
235
284
|
"is_empty",
|
|
@@ -426,6 +475,8 @@ export {
|
|
|
426
475
|
GeocodingService,
|
|
427
476
|
GlobalSearchService,
|
|
428
477
|
GroupBuilder,
|
|
478
|
+
InvalidPathError,
|
|
479
|
+
MaxDepthExceededError,
|
|
429
480
|
NO_VALUE_OPERATORS,
|
|
430
481
|
NoopGeocodingAdapter,
|
|
431
482
|
NoopHookRegistry,
|
|
@@ -442,8 +493,11 @@ export {
|
|
|
442
493
|
RecordNotFoundError,
|
|
443
494
|
RecordReferencedError,
|
|
444
495
|
RecordService,
|
|
496
|
+
RelationResolverService,
|
|
445
497
|
RelationService,
|
|
446
498
|
RoleNotFoundError,
|
|
499
|
+
RollupScheduler,
|
|
500
|
+
RollupService,
|
|
447
501
|
SYSTEM_RESOURCES,
|
|
448
502
|
SYSTEM_RESOURCE_LABELS,
|
|
449
503
|
SchemaError,
|
|
@@ -468,6 +522,7 @@ export {
|
|
|
468
522
|
createDateValidator,
|
|
469
523
|
createDraftValidator,
|
|
470
524
|
createFileValidator,
|
|
525
|
+
createFormulaValidator,
|
|
471
526
|
createLocationValidator,
|
|
472
527
|
createMockAdapter,
|
|
473
528
|
createMultiRelationValidator,
|
|
@@ -477,6 +532,7 @@ export {
|
|
|
477
532
|
createPhoneValidator,
|
|
478
533
|
createRatingValidator,
|
|
479
534
|
createRelationValidator,
|
|
535
|
+
createRollupValidator,
|
|
480
536
|
createSelectValidator,
|
|
481
537
|
createSingleRelationValidator,
|
|
482
538
|
createStatusValidator,
|
|
@@ -488,18 +544,34 @@ export {
|
|
|
488
544
|
date,
|
|
489
545
|
dateConfigSchema,
|
|
490
546
|
enrichValuesWithSelectLabels,
|
|
547
|
+
evaluateFormula,
|
|
548
|
+
evaluateFormulaAttribute,
|
|
549
|
+
evaluateFormulaAttributeWithRelations,
|
|
550
|
+
evaluateFormulaWithRelations,
|
|
551
|
+
evaluateFormulaWithResult,
|
|
491
552
|
extractAttributeNames,
|
|
553
|
+
extractFormulaVariables,
|
|
554
|
+
extractRelationNames,
|
|
555
|
+
extractRelationReferences,
|
|
492
556
|
file,
|
|
493
557
|
fileConfigSchema,
|
|
558
|
+
flattenRelationsForEval,
|
|
494
559
|
flow,
|
|
495
560
|
formatAttributeValue,
|
|
561
|
+
formatFormulaResult,
|
|
562
|
+
formula,
|
|
563
|
+
formulaConfigSchema,
|
|
496
564
|
generateId,
|
|
497
565
|
generatePrefixedId,
|
|
498
566
|
getAttributeConfigSchema,
|
|
499
567
|
getMissingRequiredAttributes,
|
|
568
|
+
getPathDepth,
|
|
569
|
+
getRelationPath,
|
|
500
570
|
getSyncPreview,
|
|
571
|
+
getTargetAttributeName,
|
|
501
572
|
getViewSyncPreview,
|
|
502
573
|
group,
|
|
574
|
+
hasRelationReferences,
|
|
503
575
|
isActivityTab,
|
|
504
576
|
isAdvancedFilterState,
|
|
505
577
|
isCustomTab,
|
|
@@ -525,6 +597,8 @@ export {
|
|
|
525
597
|
numberConfigSchema,
|
|
526
598
|
object,
|
|
527
599
|
parseAttributeConfig,
|
|
600
|
+
parsePath,
|
|
601
|
+
pathHasManyCardinality,
|
|
528
602
|
phone,
|
|
529
603
|
phoneConfigSchema,
|
|
530
604
|
rating,
|
|
@@ -533,6 +607,10 @@ export {
|
|
|
533
607
|
relation,
|
|
534
608
|
relationConfigSchema,
|
|
535
609
|
renderLabelExpression,
|
|
610
|
+
resolveMultiplePaths,
|
|
611
|
+
resolveSingleValue,
|
|
612
|
+
rollup,
|
|
613
|
+
rollupConfigSchema,
|
|
536
614
|
safeParseAttributeConfig,
|
|
537
615
|
select,
|
|
538
616
|
selectConfigSchema,
|
|
@@ -549,14 +627,17 @@ export {
|
|
|
549
627
|
timestampConfigSchema,
|
|
550
628
|
toAdvancedFilterState,
|
|
551
629
|
toSimpleFilterState,
|
|
630
|
+
traversePath,
|
|
552
631
|
user,
|
|
553
632
|
userConfigSchema,
|
|
554
633
|
validateAttribute,
|
|
555
634
|
validateAttributeConfig,
|
|
556
635
|
validateDraft,
|
|
557
636
|
validateDraftOrThrow,
|
|
637
|
+
validateFormulaExpression,
|
|
558
638
|
validateObject,
|
|
559
639
|
validateObjectOrThrow,
|
|
640
|
+
validatePath,
|
|
560
641
|
verifyNativeObjectsSync,
|
|
561
642
|
verifyNativeViewsSync,
|
|
562
643
|
view,
|