@sprucelabs/schema 25.5.64 → 25.5.68

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.
Files changed (96) hide show
  1. package/build/esm/DynamicSchemaEntityImplementation.d.ts +1 -1
  2. package/build/esm/fields/AbstractField.d.ts +1 -1
  3. package/build/esm/fields/field.static.types.d.ts +1 -1
  4. package/build/esm/schemas.static.types.d.ts +1 -1
  5. package/build/esm/utilities/assertOptions.js +1 -1
  6. package/build/esm/utilities/normalizeFieldValue.d.ts +1 -1
  7. package/build/utilities/assertOptions.js +1 -1
  8. package/package.json +14 -13
  9. package/build/esm/__tests__/behavioral/AssertingSelectOptions.test.d.ts +0 -7
  10. package/build/esm/__tests__/behavioral/AssertingSelectOptions.test.js +0 -93
  11. package/build/esm/__tests__/behavioral/AssertingValidationErrors.test.d.ts +0 -18
  12. package/build/esm/__tests__/behavioral/AssertingValidationErrors.test.js +0 -217
  13. package/build/esm/__tests__/behavioral/BuildSchema.test.d.ts +0 -5
  14. package/build/esm/__tests__/behavioral/BuildSchema.test.js +0 -66
  15. package/build/esm/__tests__/behavioral/CreatingEntityInstances.test.d.ts +0 -7
  16. package/build/esm/__tests__/behavioral/CreatingEntityInstances.test.js +0 -93
  17. package/build/esm/__tests__/behavioral/DroppingFields.test.d.ts +0 -5
  18. package/build/esm/__tests__/behavioral/DroppingFields.test.js +0 -86
  19. package/build/esm/__tests__/behavioral/GeneratesRelationshipTemplates.test.d.ts +0 -9
  20. package/build/esm/__tests__/behavioral/GeneratesRelationshipTemplates.test.js +0 -137
  21. package/build/esm/__tests__/behavioral/GeneratesRelationshipTemplatesWithSuffix.test.d.ts +0 -5
  22. package/build/esm/__tests__/behavioral/GeneratesRelationshipTemplatesWithSuffix.test.js +0 -146
  23. package/build/esm/__tests__/behavioral/GeneratesTemplates.test.d.ts +0 -5
  24. package/build/esm/__tests__/behavioral/GeneratesTemplates.test.js +0 -67
  25. package/build/esm/__tests__/behavioral/GeneratesTypeMappers.test.d.ts +0 -5
  26. package/build/esm/__tests__/behavioral/GeneratesTypeMappers.test.js +0 -29
  27. package/build/esm/__tests__/behavioral/GeneratesVersionedRelationshipTemplates.test.d.ts +0 -11
  28. package/build/esm/__tests__/behavioral/GeneratesVersionedRelationshipTemplates.test.js +0 -191
  29. package/build/esm/__tests__/behavioral/GettingFieldsOffASchema.test.d.ts +0 -7
  30. package/build/esm/__tests__/behavioral/GettingFieldsOffASchema.test.js +0 -88
  31. package/build/esm/__tests__/behavioral/HandlesDynamicFields.test.d.ts +0 -17
  32. package/build/esm/__tests__/behavioral/HandlesDynamicFields.test.js +0 -284
  33. package/build/esm/__tests__/behavioral/HandlesHidingPrivateFields.test.d.ts +0 -11
  34. package/build/esm/__tests__/behavioral/HandlesHidingPrivateFields.test.js +0 -111
  35. package/build/esm/__tests__/behavioral/HandlesRelationships.test.d.ts +0 -9
  36. package/build/esm/__tests__/behavioral/HandlesRelationships.test.js +0 -175
  37. package/build/esm/__tests__/behavioral/HandlesRequiredFields.test.d.ts +0 -4
  38. package/build/esm/__tests__/behavioral/HandlesRequiredFields.test.js +0 -37
  39. package/build/esm/__tests__/behavioral/HandlesVersionedRelationships.test.d.ts +0 -6
  40. package/build/esm/__tests__/behavioral/HandlesVersionedRelationships.test.js +0 -102
  41. package/build/esm/__tests__/behavioral/HandlesVersioning.test.d.ts +0 -8
  42. package/build/esm/__tests__/behavioral/HandlesVersioning.test.js +0 -93
  43. package/build/esm/__tests__/behavioral/IsIdWithVersion.test.d.ts +0 -4
  44. package/build/esm/__tests__/behavioral/IsIdWithVersion.test.js +0 -30
  45. package/build/esm/__tests__/behavioral/MakingFieldsOptional.test.d.ts +0 -4
  46. package/build/esm/__tests__/behavioral/MakingFieldsOptional.test.js +0 -57
  47. package/build/esm/__tests__/behavioral/NormalizeToSchemaIdWithVersion.test.d.ts +0 -6
  48. package/build/esm/__tests__/behavioral/NormalizeToSchemaIdWithVersion.test.js +0 -77
  49. package/build/esm/__tests__/behavioral/NormalizingSchemaValues.test.d.ts +0 -8
  50. package/build/esm/__tests__/behavioral/NormalizingSchemaValues.test.js +0 -148
  51. package/build/esm/__tests__/behavioral/ResetsSchemasEveryTest.test.d.ts +0 -6
  52. package/build/esm/__tests__/behavioral/ResetsSchemasEveryTest.test.js +0 -45
  53. package/build/esm/__tests__/behavioral/SchemaDefaultValues.test.d.ts +0 -9
  54. package/build/esm/__tests__/behavioral/SchemaDefaultValues.test.js +0 -138
  55. package/build/esm/__tests__/behavioral/SelectChoicesToHash.test.d.ts +0 -4
  56. package/build/esm/__tests__/behavioral/SelectChoicesToHash.test.js +0 -43
  57. package/build/esm/__tests__/behavioral/SettingMinAndMaxValuesOnArrayFields.test.d.ts +0 -9
  58. package/build/esm/__tests__/behavioral/SettingMinAndMaxValuesOnArrayFields.test.js +0 -104
  59. package/build/esm/__tests__/behavioral/UsingSchemas.test.d.ts +0 -13
  60. package/build/esm/__tests__/behavioral/UsingSchemas.test.js +0 -281
  61. package/build/esm/__tests__/behavioral/UsingTheSchemaRegisteryForNamespacedSchemas.test.d.ts +0 -14
  62. package/build/esm/__tests__/behavioral/UsingTheSchemaRegisteryForNamespacedSchemas.test.js +0 -140
  63. package/build/esm/__tests__/behavioral/UsingTheSchemaRegistry.test.d.ts +0 -15
  64. package/build/esm/__tests__/behavioral/UsingTheSchemaRegistry.test.js +0 -117
  65. package/build/esm/__tests__/behavioral/ValidatingSchemaValues.test.d.ts +0 -28
  66. package/build/esm/__tests__/behavioral/ValidatingSchemaValues.test.js +0 -674
  67. package/build/esm/__tests__/data/personWithCars.d.ts +0 -188
  68. package/build/esm/__tests__/data/personWithCars.js +0 -163
  69. package/build/esm/__tests__/data/versionedPersonWithCars.d.ts +0 -323
  70. package/build/esm/__tests__/data/versionedPersonWithCars.js +0 -281
  71. package/build/esm/__tests__/implementation/BooleanField.test.d.ts +0 -6
  72. package/build/esm/__tests__/implementation/BooleanField.test.js +0 -59
  73. package/build/esm/__tests__/implementation/DurationField.test.d.ts +0 -7
  74. package/build/esm/__tests__/implementation/DurationField.test.js +0 -45
  75. package/build/esm/__tests__/implementation/EmailField.test.d.ts +0 -4
  76. package/build/esm/__tests__/implementation/EmailField.test.js +0 -39
  77. package/build/esm/__tests__/implementation/ErrorMapUtil.test.d.ts +0 -11
  78. package/build/esm/__tests__/implementation/ErrorMapUtil.test.js +0 -176
  79. package/build/esm/__tests__/implementation/FieldFactory.test.d.ts +0 -4
  80. package/build/esm/__tests__/implementation/FieldFactory.test.js +0 -35
  81. package/build/esm/__tests__/implementation/FileField.test.d.ts +0 -19
  82. package/build/esm/__tests__/implementation/FileField.test.js +0 -125
  83. package/build/esm/__tests__/implementation/NumberField.test.d.ts +0 -5
  84. package/build/esm/__tests__/implementation/NumberField.test.js +0 -54
  85. package/build/esm/__tests__/implementation/PhoneField.test.d.ts +0 -7
  86. package/build/esm/__tests__/implementation/PhoneField.test.js +0 -82
  87. package/build/esm/__tests__/implementation/SchemaFieldTransformingOptions.test.d.ts +0 -5
  88. package/build/esm/__tests__/implementation/SchemaFieldTransformingOptions.test.js +0 -209
  89. package/build/esm/__tests__/implementation/SchemaFieldValidation.test.d.ts +0 -8
  90. package/build/esm/__tests__/implementation/SchemaFieldValidation.test.js +0 -87
  91. package/build/esm/__tests__/implementation/SelectField.test.d.ts +0 -8
  92. package/build/esm/__tests__/implementation/SelectField.test.js +0 -127
  93. package/build/esm/__tests__/implementation/TextField.test.d.ts +0 -4
  94. package/build/esm/__tests__/implementation/TextField.test.js +0 -34
  95. package/build/esm/__tests__/implementation/ValidateErrorMessageFormatter.test.d.ts +0 -16
  96. package/build/esm/__tests__/implementation/ValidateErrorMessageFormatter.test.js +0 -216
@@ -1,188 +0,0 @@
1
- import { Schema } from '../../schemas.static.types';
2
- export interface CarSchema extends Schema {
3
- id: 'car';
4
- name: 'car';
5
- fields: {
6
- name: {
7
- type: 'text';
8
- isRequired: true;
9
- };
10
- onlyOnCar: {
11
- type: 'text';
12
- };
13
- privateField: {
14
- type: 'text';
15
- isPrivate: true;
16
- };
17
- };
18
- }
19
- export interface TruckSchema extends Schema {
20
- id: 'truck';
21
- name: 'Truck';
22
- fields: {
23
- name: {
24
- type: 'text';
25
- isRequired: true;
26
- };
27
- onlyOnTruck: {
28
- type: 'text';
29
- };
30
- };
31
- }
32
- export interface PersonSchema extends Schema {
33
- id: 'person';
34
- name: 'user schema test';
35
- fields: {
36
- name: {
37
- type: 'text';
38
- isArray: false;
39
- value: 'tay';
40
- };
41
- requiredCar: {
42
- type: 'schema';
43
- isRequired: true;
44
- options: {
45
- schema: CarSchema;
46
- };
47
- };
48
- optionalCar: {
49
- type: 'schema';
50
- options: {
51
- schema: CarSchema;
52
- };
53
- };
54
- optionalCarWithCallback: {
55
- type: 'schema';
56
- options: {
57
- schemasCallback: () => [CarSchema];
58
- };
59
- };
60
- optionalIsArrayCars: {
61
- type: 'schema';
62
- isArray: true;
63
- options: {
64
- schema: CarSchema;
65
- };
66
- };
67
- requiredIsArrayCars: {
68
- type: 'schema';
69
- isArray: true;
70
- isRequired: true;
71
- options: {
72
- schema: CarSchema;
73
- };
74
- };
75
- optionalCarOrTruck: {
76
- type: 'schema';
77
- options: {
78
- schemas: [CarSchema, TruckSchema];
79
- };
80
- };
81
- optionalIsArrayCarOrTruck: {
82
- type: 'schema';
83
- isArray: true;
84
- options: {
85
- schemas: [CarSchema, TruckSchema];
86
- };
87
- };
88
- requiredIsArrayCarOrTruck: {
89
- type: 'schema';
90
- isArray: true;
91
- isRequired: true;
92
- options: {
93
- schemas: [CarSchema, TruckSchema];
94
- };
95
- };
96
- optionalSelect: {
97
- type: 'select';
98
- options: {
99
- choices: [
100
- {
101
- value: 'foo';
102
- label: 'Foo';
103
- },
104
- {
105
- value: 'bar';
106
- label: 'Bar';
107
- }
108
- ];
109
- };
110
- };
111
- requiredSelect: {
112
- type: 'select';
113
- options: {
114
- isRequired: true;
115
- choices: [
116
- {
117
- value: 'foo';
118
- label: 'Foo';
119
- },
120
- {
121
- value: 'bar';
122
- label: 'Bar';
123
- }
124
- ];
125
- };
126
- };
127
- optionalSelectWithDefaultValue: {
128
- type: 'select';
129
- defaultValue: 'hello';
130
- options: {
131
- choices: [
132
- {
133
- value: 'hello';
134
- label: 'world';
135
- },
136
- {
137
- value: 'goodbye';
138
- label: 'darling';
139
- }
140
- ];
141
- };
142
- };
143
- optionalTextWithDefaultValue: {
144
- type: 'text';
145
- defaultValue: 'world';
146
- };
147
- optionalCarWithDefaultValue: {
148
- type: 'schema';
149
- defaultValue: {
150
- name: 'fast car';
151
- };
152
- options: {
153
- schema: CarSchema;
154
- };
155
- };
156
- optionalIsArrayCarOrTruckWithDefaultValue: {
157
- type: 'schema';
158
- isArray: true;
159
- defaultValue: [{
160
- schemaId: 'car';
161
- values: {
162
- name: 'fast car';
163
- };
164
- }];
165
- options: {
166
- schemas: [CarSchema, TruckSchema];
167
- };
168
- };
169
- optionalCarOrTruckWithDefaultValue: {
170
- type: 'schema';
171
- defaultValue: {
172
- schemaId: 'car';
173
- values: {
174
- name: 'fast car';
175
- };
176
- };
177
- options: {
178
- schemas: [CarSchema, TruckSchema];
179
- };
180
- };
181
- };
182
- }
183
- declare const buildPersonWithCars: () => {
184
- personSchema: PersonSchema;
185
- carSchema: CarSchema;
186
- truckSchema: TruckSchema;
187
- };
188
- export default buildPersonWithCars;
@@ -1,163 +0,0 @@
1
- import StaticSchemaEntityImplementation from '../../StaticSchemaEntityImplementation.js';
2
- import buildSchema from '../../utilities/buildSchema.js';
3
- // turn off duplicate checks because tests all run in the same runtime
4
- StaticSchemaEntityImplementation.enableDuplicateCheckWhenTracking = false;
5
- const buildPersonWithCars = () => {
6
- const carSchema = buildSchema({
7
- id: 'car',
8
- name: 'car',
9
- fields: {
10
- name: {
11
- type: 'text',
12
- isRequired: true,
13
- },
14
- onlyOnCar: {
15
- type: 'text',
16
- },
17
- privateField: {
18
- type: 'text',
19
- isPrivate: true,
20
- },
21
- },
22
- });
23
- const truckSchema = buildSchema({
24
- id: 'truck',
25
- name: 'Truck',
26
- fields: {
27
- name: {
28
- type: 'text',
29
- isRequired: true,
30
- },
31
- onlyOnTruck: {
32
- type: 'text',
33
- },
34
- },
35
- });
36
- const personSchema = buildSchema({
37
- id: 'person',
38
- name: 'user schema test',
39
- fields: {
40
- name: {
41
- type: 'text',
42
- isArray: false,
43
- value: 'tay',
44
- },
45
- requiredCar: {
46
- type: 'schema',
47
- isRequired: true,
48
- options: {
49
- schema: carSchema,
50
- },
51
- },
52
- optionalCar: {
53
- type: 'schema',
54
- options: {
55
- schema: carSchema,
56
- },
57
- },
58
- optionalCarWithCallback: {
59
- type: 'schema',
60
- options: {
61
- schemasCallback: () => [carSchema],
62
- },
63
- },
64
- optionalIsArrayCars: {
65
- type: 'schema',
66
- isArray: true,
67
- options: {
68
- schema: carSchema,
69
- },
70
- },
71
- requiredIsArrayCars: {
72
- type: 'schema',
73
- isArray: true,
74
- isRequired: true,
75
- options: {
76
- schema: carSchema,
77
- },
78
- },
79
- optionalCarOrTruck: {
80
- type: 'schema',
81
- options: {
82
- schemas: [carSchema, truckSchema],
83
- },
84
- },
85
- optionalIsArrayCarOrTruck: {
86
- type: 'schema',
87
- isArray: true,
88
- options: {
89
- schemas: [carSchema, truckSchema],
90
- },
91
- },
92
- requiredIsArrayCarOrTruck: {
93
- type: 'schema',
94
- isArray: true,
95
- isRequired: true,
96
- options: {
97
- schemas: [carSchema, truckSchema],
98
- },
99
- },
100
- optionalSelect: {
101
- type: 'select',
102
- options: {
103
- choices: [
104
- { value: 'foo', label: 'Foo' },
105
- { value: 'bar', label: 'Bar' },
106
- ],
107
- },
108
- },
109
- requiredSelect: {
110
- type: 'select',
111
- options: {
112
- isRequired: true,
113
- choices: [
114
- { value: 'foo', label: 'Foo' },
115
- { value: 'bar', label: 'Bar' },
116
- ],
117
- },
118
- },
119
- optionalSelectWithDefaultValue: {
120
- type: 'select',
121
- defaultValue: 'hello',
122
- options: {
123
- choices: [
124
- { value: 'hello', label: 'world' },
125
- { value: 'goodbye', label: 'darling' },
126
- ],
127
- },
128
- },
129
- optionalTextWithDefaultValue: {
130
- type: 'text',
131
- defaultValue: 'world',
132
- },
133
- optionalCarWithDefaultValue: {
134
- type: 'schema',
135
- defaultValue: { name: 'fast car' },
136
- options: {
137
- schema: carSchema,
138
- },
139
- },
140
- optionalIsArrayCarOrTruckWithDefaultValue: {
141
- type: 'schema',
142
- isArray: true,
143
- defaultValue: [{ schemaId: 'car', values: { name: 'fast car' } }],
144
- options: {
145
- schemas: [carSchema, truckSchema],
146
- },
147
- },
148
- optionalCarOrTruckWithDefaultValue: {
149
- type: 'schema',
150
- defaultValue: { schemaId: 'car', values: { name: 'fast car' } },
151
- options: {
152
- schemas: [carSchema, truckSchema],
153
- },
154
- },
155
- },
156
- });
157
- return {
158
- personSchema,
159
- carSchema,
160
- truckSchema,
161
- };
162
- };
163
- export default buildPersonWithCars;
@@ -1,323 +0,0 @@
1
- import { Schema } from '../../schemas.static.types';
2
- export interface CarV1Definition extends Schema {
3
- id: 'car';
4
- name: 'car';
5
- fields: {
6
- name: {
7
- type: 'text';
8
- isRequired: true;
9
- };
10
- onlyOnCar: {
11
- type: 'text';
12
- };
13
- };
14
- }
15
- export interface CarV2Definition extends Schema {
16
- id: 'car';
17
- name: 'car';
18
- fields: {
19
- name: {
20
- type: 'text';
21
- isRequired: true;
22
- };
23
- newRequiredOnCar: {
24
- type: 'text';
25
- isRequired: true;
26
- };
27
- };
28
- }
29
- export interface TruckV1Definition extends Schema {
30
- id: 'truck';
31
- name: 'Truck';
32
- fields: {
33
- name: {
34
- type: 'text';
35
- isRequired: true;
36
- };
37
- onlyOnTruck: {
38
- type: 'text';
39
- };
40
- };
41
- }
42
- export interface PersonV1Definition extends Schema {
43
- id: 'person';
44
- name: 'user schema test';
45
- fields: {
46
- name: {
47
- type: 'text';
48
- isArray: false;
49
- value: 'tay';
50
- };
51
- requiredCar: {
52
- type: 'schema';
53
- isRequired: true;
54
- options: {
55
- schema: CarV1Definition;
56
- };
57
- };
58
- optionalCar: {
59
- type: 'schema';
60
- options: {
61
- schema: CarV1Definition;
62
- };
63
- };
64
- optionalCarWithCallback: {
65
- type: 'schema';
66
- options: {
67
- schemasCallback: () => [CarV1Definition];
68
- };
69
- };
70
- optionalIsArrayCars: {
71
- type: 'schema';
72
- isArray: true;
73
- options: {
74
- schema: CarV1Definition;
75
- };
76
- };
77
- requiredIsArrayCars: {
78
- type: 'schema';
79
- isArray: true;
80
- isRequired: true;
81
- options: {
82
- schema: CarV1Definition;
83
- };
84
- };
85
- optionalCarOrTruck: {
86
- type: 'schema';
87
- options: {
88
- schemas: [CarV1Definition, TruckV1Definition];
89
- };
90
- };
91
- optionalIsArrayCarOrTruck: {
92
- type: 'schema';
93
- isArray: true;
94
- options: {
95
- schemas: [CarV1Definition, TruckV1Definition];
96
- };
97
- };
98
- requiredIsArrayCarOrTruck: {
99
- type: 'schema';
100
- isArray: true;
101
- isRequired: true;
102
- options: {
103
- schemas: [CarV1Definition, TruckV1Definition];
104
- };
105
- };
106
- optionalSelect: {
107
- type: 'select';
108
- options: {
109
- choices: [
110
- {
111
- value: 'foo';
112
- label: 'Foo';
113
- },
114
- {
115
- value: 'bar';
116
- label: 'Bar';
117
- }
118
- ];
119
- };
120
- };
121
- optionalSelectWithDefaultValue: {
122
- type: 'select';
123
- defaultValue: 'hello';
124
- options: {
125
- choices: [
126
- {
127
- value: 'hello';
128
- label: 'world';
129
- },
130
- {
131
- value: 'goodbye';
132
- label: 'darling';
133
- }
134
- ];
135
- };
136
- };
137
- optionalTextWithDefaultValue: {
138
- type: 'text';
139
- defaultValue: 'world';
140
- };
141
- optionalCarWithDefaultValue: {
142
- type: 'schema';
143
- defaultValue: {
144
- name: 'fast car';
145
- };
146
- options: {
147
- schema: CarV1Definition;
148
- };
149
- };
150
- optionalIsArrayCarOrTruckWithDefaultValue: {
151
- type: 'schema';
152
- isArray: true;
153
- defaultValue: [{
154
- schemaId: 'car';
155
- values: {
156
- name: 'fast car';
157
- };
158
- }];
159
- options: {
160
- schemas: [CarV1Definition, TruckV1Definition];
161
- };
162
- };
163
- optionalCarOrTruckWithDefaultValue: {
164
- type: 'schema';
165
- defaultValue: {
166
- schemaId: 'car';
167
- values: {
168
- name: 'fast car';
169
- };
170
- };
171
- options: {
172
- schemas: [CarV1Definition, TruckV1Definition];
173
- };
174
- };
175
- };
176
- }
177
- export interface PersonV2Definition extends Schema {
178
- id: 'person';
179
- name: 'user schema test';
180
- fields: {
181
- name: {
182
- type: 'text';
183
- isArray: false;
184
- value: 'tay';
185
- };
186
- requiredCar: {
187
- type: 'schema';
188
- isRequired: true;
189
- options: {
190
- schema: CarV2Definition;
191
- };
192
- };
193
- optionalCar: {
194
- type: 'schema';
195
- options: {
196
- schema: CarV2Definition;
197
- };
198
- };
199
- optionalCarWithCallback: {
200
- type: 'schema';
201
- options: {
202
- schemasCallback: () => [
203
- CarV1Definition,
204
- CarV2Definition,
205
- TruckV1Definition
206
- ];
207
- };
208
- };
209
- optionalIsArrayCars: {
210
- type: 'schema';
211
- isArray: true;
212
- options: {
213
- schema: CarV1Definition;
214
- };
215
- };
216
- requiredIsArrayCars: {
217
- type: 'schema';
218
- isArray: true;
219
- isRequired: true;
220
- options: {
221
- schema: CarV1Definition;
222
- };
223
- };
224
- optionalCarOrTruck: {
225
- type: 'schema';
226
- options: {
227
- schemas: [CarV1Definition, CarV2Definition, TruckV1Definition];
228
- };
229
- };
230
- optionalIsArrayCarOrTruck: {
231
- type: 'schema';
232
- isArray: true;
233
- options: {
234
- schemas: [CarV1Definition, TruckV1Definition];
235
- };
236
- };
237
- requiredIsArrayCarOrTruck: {
238
- type: 'schema';
239
- isArray: true;
240
- isRequired: true;
241
- options: {
242
- schemas: [CarV1Definition, TruckV1Definition];
243
- };
244
- };
245
- optionalSelect: {
246
- type: 'select';
247
- options: {
248
- choices: [
249
- {
250
- value: 'foo';
251
- label: 'Foo';
252
- },
253
- {
254
- value: 'bar';
255
- label: 'Bar';
256
- }
257
- ];
258
- };
259
- };
260
- optionalSelectWithDefaultValue: {
261
- type: 'select';
262
- defaultValue: 'hello';
263
- options: {
264
- choices: [
265
- {
266
- value: 'hello';
267
- label: 'world';
268
- },
269
- {
270
- value: 'goodbye';
271
- label: 'darling';
272
- }
273
- ];
274
- };
275
- };
276
- optionalTextWithDefaultValue: {
277
- type: 'text';
278
- defaultValue: 'world';
279
- };
280
- optionalCarWithDefaultValue: {
281
- type: 'schema';
282
- defaultValue: {
283
- name: 'fast car';
284
- };
285
- options: {
286
- schema: CarV1Definition;
287
- };
288
- };
289
- optionalIsArrayCarOrTruckWithDefaultValue: {
290
- type: 'schema';
291
- isArray: true;
292
- defaultValue: [{
293
- schemaId: 'car';
294
- values: {
295
- name: 'fast car';
296
- };
297
- }];
298
- options: {
299
- schemas: [CarV1Definition, TruckV1Definition];
300
- };
301
- };
302
- optionalCarOrTruckWithDefaultValue: {
303
- type: 'schema';
304
- defaultValue: {
305
- schemaId: 'car';
306
- values: {
307
- name: 'fast car';
308
- };
309
- };
310
- options: {
311
- schemas: [CarV1Definition, TruckV1Definition];
312
- };
313
- };
314
- };
315
- }
316
- declare const buildVersionedPersonWithCars: () => {
317
- personV1Schema: PersonV1Definition;
318
- carV1Schema: CarV1Definition;
319
- carV2Schema: CarV2Definition;
320
- truckV1Definition: TruckV1Definition;
321
- personV2Schema: PersonV2Definition;
322
- };
323
- export default buildVersionedPersonWithCars;