schemair 0.1.0 → 0.2.0

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 (69) hide show
  1. package/README.md +420 -11
  2. package/dist/authoring/index.cjs +13 -350
  3. package/dist/authoring/index.d.cts +2 -90
  4. package/dist/authoring/index.d.ts +2 -90
  5. package/dist/authoring/index.js +2 -304
  6. package/dist/authoring-D3V0iyTe.js +362 -0
  7. package/dist/authoring-Dnrg5TXm.cjs +389 -0
  8. package/dist/chunk-BgLxgFZR.js +18 -0
  9. package/dist/definition/index.cjs +10 -2
  10. package/dist/definition/index.d.cts +3 -21
  11. package/dist/definition/index.d.ts +3 -21
  12. package/dist/definition/index.js +2 -2
  13. package/dist/definition-BLLBpLKv.cjs +1187 -0
  14. package/dist/definition-DmYnDmQO.js +1115 -0
  15. package/dist/index-4aMF0cTE.d.ts +368 -0
  16. package/dist/index-BqfGAU1K.d.ts +56 -0
  17. package/dist/{index-eK2Xgrwp.d.ts → index-CBbd4hXJ.d.ts} +13 -2
  18. package/dist/index-CIim1dG7.d.cts +92 -0
  19. package/dist/{index-TACcK_mi.d.cts → index-CNjYUKvu.d.cts} +13 -2
  20. package/dist/index-CQynt7ft.d.cts +420 -0
  21. package/dist/index-D3mfwaSO.d.cts +56 -0
  22. package/dist/index-DDMwVy2I.d.cts +368 -0
  23. package/dist/index-DM5DSLLL.d.ts +99 -0
  24. package/dist/index-DXWoNYFB.d.ts +92 -0
  25. package/dist/index-DhmHCGpT.d.cts +99 -0
  26. package/dist/index-bQy-C-1l.d.ts +418 -0
  27. package/dist/index.cjs +64 -52
  28. package/dist/index.d.cts +7 -7
  29. package/dist/index.d.ts +7 -7
  30. package/dist/index.js +7 -5
  31. package/dist/integrations/json-schema/index.cjs +328 -0
  32. package/dist/integrations/json-schema/index.d.cts +53 -0
  33. package/dist/integrations/json-schema/index.d.ts +53 -0
  34. package/dist/integrations/json-schema/index.js +324 -0
  35. package/dist/integrations/standard-schema/index.cjs +32 -0
  36. package/dist/integrations/standard-schema/index.d.cts +22 -0
  37. package/dist/integrations/standard-schema/index.d.ts +22 -0
  38. package/dist/integrations/standard-schema/index.js +32 -0
  39. package/dist/payload/index.cjs +1 -1
  40. package/dist/payload/index.d.cts +1 -55
  41. package/dist/payload/index.d.ts +1 -55
  42. package/dist/payload/index.js +1 -1
  43. package/dist/relations/index.cjs +3 -1
  44. package/dist/relations/index.d.cts +2 -2
  45. package/dist/relations/index.d.ts +2 -2
  46. package/dist/relations/index.js +2 -2
  47. package/dist/{relations-CMz_0nf4.cjs → relations-Cymx4iTc.cjs} +158 -5
  48. package/dist/{relations-By0bK3UK.js → relations-ysXDmi-Z.js} +147 -6
  49. package/dist/spec/index.cjs +9 -0
  50. package/dist/spec/index.d.cts +2 -2
  51. package/dist/spec/index.d.ts +2 -2
  52. package/dist/spec/index.js +3 -1
  53. package/dist/standard/index.cjs +810 -0
  54. package/dist/standard/index.d.cts +3 -0
  55. package/dist/standard/index.d.ts +3 -0
  56. package/dist/standard/index.js +777 -0
  57. package/dist/standard-DhKsxu9U.js +471 -0
  58. package/dist/standard-etPFZDJI.cjs +513 -0
  59. package/dist/type-interpreter/index.cjs +3 -3
  60. package/dist/type-interpreter/index.d.cts +2 -99
  61. package/dist/type-interpreter/index.d.ts +2 -99
  62. package/dist/type-interpreter/index.js +2 -2
  63. package/dist/{type-interpreter-Ck0VDhzn.js → type-interpreter-DnrId8aM.js} +5 -284
  64. package/dist/{type-interpreter-DAIBUqKf.cjs → type-interpreter-OLt2W2yd.cjs} +15 -294
  65. package/package.json +38 -3
  66. package/dist/definition-BXj3T94L.js +0 -467
  67. package/dist/definition-DSZZTz4e.cjs +0 -473
  68. package/dist/index-CEzHfht2.d.ts +0 -269
  69. package/dist/index-rzkFjgrt.d.cts +0 -269
@@ -1,351 +1,14 @@
1
+ const require_authoring = require('../authoring-Dnrg5TXm.cjs');
1
2
 
2
- //#region src/authoring/schema.ts
3
- function primitive(name, metadata) {
4
- if (metadata === void 0) return {
5
- kind: "primitive",
6
- name
7
- };
8
- return {
9
- kind: "primitive",
10
- name,
11
- ...metadata
12
- };
13
- }
14
- const string = (metadata) => primitive("string", metadata);
15
- const number = (metadata) => primitive("number", metadata);
16
- const boolean = () => primitive("boolean");
17
- const nullValue = () => primitive("null");
18
- function literal(value) {
19
- return {
20
- kind: "literal",
21
- literal: value
22
- };
23
- }
24
- function field(key, schema, options) {
25
- return options === void 0 ? {
26
- key,
27
- schema
28
- } : {
29
- key,
30
- schema,
31
- ...options
32
- };
33
- }
34
- function requiredField(key, schema, description) {
35
- return description === void 0 ? {
36
- key,
37
- schema,
38
- required: true
39
- } : {
40
- key,
41
- schema,
42
- required: true,
43
- description
44
- };
45
- }
46
- function optionalField(key, schema, description) {
47
- return description === void 0 ? {
48
- key,
49
- schema
50
- } : {
51
- key,
52
- schema,
53
- description
54
- };
55
- }
56
- function record(fields, options) {
57
- return options === void 0 ? {
58
- kind: "record",
59
- fields
60
- } : {
61
- kind: "record",
62
- fields,
63
- ...options
64
- };
65
- }
66
- function array(elementSchema, options) {
67
- return options === void 0 ? {
68
- kind: "array",
69
- elementSchema
70
- } : {
71
- kind: "array",
72
- elementSchema,
73
- ...options
74
- };
75
- }
76
- function tuple(elementSchemas) {
77
- return {
78
- kind: "tuple",
79
- elementSchemas
80
- };
81
- }
82
- function literalUnion(values) {
83
- return {
84
- kind: "literalUnion",
85
- values
86
- };
87
- }
88
- function nullable(value) {
89
- return {
90
- kind: "nullable",
91
- value
92
- };
93
- }
94
- function variant(key, schema, options) {
95
- return options === void 0 ? {
96
- key,
97
- schema
98
- } : {
99
- key,
100
- schema,
101
- ...options
102
- };
103
- }
104
- function taggedUnion(discriminator, variants) {
105
- return {
106
- kind: "taggedUnion",
107
- discriminator,
108
- variants
109
- };
110
- }
111
- function ref(refPath) {
112
- return {
113
- kind: "ref",
114
- refPath
115
- };
116
- }
117
- function selfRef() {
118
- return { kind: "selfRef" };
119
- }
120
-
121
- //#endregion
122
- //#region src/authoring/expression.ts
123
- function typeVar(name, upperBound) {
124
- return upperBound === void 0 ? {
125
- kind: "typeVar",
126
- name
127
- } : {
128
- kind: "typeVar",
129
- name,
130
- extends: upperBound
131
- };
132
- }
133
- function opaqueHostType(hostPath) {
134
- return {
135
- kind: "opaqueHostType",
136
- hostPath
137
- };
138
- }
139
- function absent() {
140
- return { kind: "absent" };
141
- }
142
- function never() {
143
- return { kind: "never" };
144
- }
145
- function unknown() {
146
- return { kind: "unknown" };
147
- }
148
- function maybeAbsent(value) {
149
- return {
150
- kind: "maybeAbsent",
151
- value
152
- };
153
- }
154
- function arrayOf(element, constraints) {
155
- return constraints === void 0 ? {
156
- kind: "arrayOf",
157
- element
158
- } : {
159
- kind: "arrayOf",
160
- element,
161
- constraints
162
- };
163
- }
164
- function tupleOf(elements) {
165
- return {
166
- kind: "tupleOf",
167
- elements
168
- };
169
- }
170
- function recordOf(fields, options) {
171
- return options === void 0 ? {
172
- kind: "recordOf",
173
- fields
174
- } : {
175
- kind: "recordOf",
176
- fields,
177
- ...options
178
- };
179
- }
180
- function nullableOf(value) {
181
- return {
182
- kind: "nullableOf",
183
- value
184
- };
185
- }
186
- function taggedUnionOf(discriminator, variants) {
187
- return {
188
- kind: "taggedUnionOf",
189
- discriminator,
190
- variants
191
- };
192
- }
193
- function elementOf(source) {
194
- return {
195
- kind: "elementOf",
196
- source
197
- };
198
- }
199
- function valueOf(source) {
200
- return {
201
- kind: "valueOf",
202
- source
203
- };
204
- }
205
- function elementAt(source, index) {
206
- return {
207
- kind: "elementAt",
208
- source,
209
- index
210
- };
211
- }
212
- function fieldOf(source, key) {
213
- return {
214
- kind: "fieldOf",
215
- source,
216
- key
217
- };
218
- }
219
- function keyOf(source) {
220
- return {
221
- kind: "keyOf",
222
- source
223
- };
224
- }
225
- function allFields() {
226
- return { kind: "all" };
227
- }
228
- function selectKeys(keys, onMissing = "error") {
229
- return {
230
- kind: "keys",
231
- keys,
232
- onMissing
233
- };
234
- }
235
- function fieldsOf(source, fields) {
236
- return {
237
- kind: "fieldsOf",
238
- source,
239
- fields
240
- };
241
- }
242
- function pickFields(source, fields) {
243
- return {
244
- kind: "pickFields",
245
- source,
246
- fields
247
- };
248
- }
249
- function omitFields(source, fields) {
250
- return {
251
- kind: "omitFields",
252
- source,
253
- fields
254
- };
255
- }
256
- function partialFields(source, fields) {
257
- return {
258
- kind: "partialFields",
259
- source,
260
- fields
261
- };
262
- }
263
- function requiredFields(source, fields) {
264
- return {
265
- kind: "requiredFields",
266
- source,
267
- fields
268
- };
269
- }
270
- function mergeRecords(sources, conflict) {
271
- return {
272
- kind: "mergeRecords",
273
- sources,
274
- conflict
275
- };
276
- }
277
- function intersect(sources) {
278
- return {
279
- kind: "intersect",
280
- sources
281
- };
282
- }
283
- function refine(source, fields) {
284
- return {
285
- kind: "refine",
286
- source,
287
- fields
288
- };
289
- }
290
- function excludeVariants(source, variants) {
291
- return {
292
- kind: "excludeVariants",
293
- source,
294
- variants
295
- };
296
- }
297
- function extractVariants(source, variants) {
298
- return {
299
- kind: "extractVariants",
300
- source,
301
- variants
302
- };
303
- }
304
-
305
- //#endregion
306
- exports.absent = absent;
307
- exports.allFields = allFields;
308
- exports.array = array;
309
- exports.arrayOf = arrayOf;
310
- exports.boolean = boolean;
311
- exports.elementAt = elementAt;
312
- exports.elementOf = elementOf;
313
- exports.excludeVariants = excludeVariants;
314
- exports.extractVariants = extractVariants;
315
- exports.field = field;
316
- exports.fieldOf = fieldOf;
317
- exports.fieldsOf = fieldsOf;
318
- exports.intersect = intersect;
319
- exports.keyOf = keyOf;
320
- exports.literal = literal;
321
- exports.literalUnion = literalUnion;
322
- exports.maybeAbsent = maybeAbsent;
323
- exports.mergeRecords = mergeRecords;
324
- exports.never = never;
325
- exports.nullValue = nullValue;
326
- exports.nullable = nullable;
327
- exports.nullableOf = nullableOf;
328
- exports.number = number;
329
- exports.omitFields = omitFields;
330
- exports.opaqueHostType = opaqueHostType;
331
- exports.optionalField = optionalField;
332
- exports.partialFields = partialFields;
333
- exports.pickFields = pickFields;
334
- exports.primitive = primitive;
335
- exports.record = record;
336
- exports.recordOf = recordOf;
337
- exports.ref = ref;
338
- exports.refine = refine;
339
- exports.requiredField = requiredField;
340
- exports.requiredFields = requiredFields;
341
- exports.selectKeys = selectKeys;
342
- exports.selfRef = selfRef;
343
- exports.string = string;
344
- exports.taggedUnion = taggedUnion;
345
- exports.taggedUnionOf = taggedUnionOf;
346
- exports.tuple = tuple;
347
- exports.tupleOf = tupleOf;
348
- exports.typeVar = typeVar;
349
- exports.unknown = unknown;
350
- exports.valueOf = valueOf;
351
- exports.variant = variant;
3
+ Object.defineProperty(exports, 'expression', {
4
+ enumerable: true,
5
+ get: function () {
6
+ return require_authoring.expression_exports;
7
+ }
8
+ });
9
+ Object.defineProperty(exports, 'schema', {
10
+ enumerable: true,
11
+ get: function () {
12
+ return require_authoring.schema_exports;
13
+ }
14
+ });
@@ -1,90 +1,2 @@
1
- import { $ as SchemaRecordField, A as SchemaValueTypeTerm, G as SchemaConstraint, J as SchemaNode, K as SchemaLiteralNode, M as SchemaVariantSelector, Q as SchemaPrimitiveNode, U as SchemaArrayNode, V as LiteralValue, X as SchemaNullableNode, at as SchemaTaggedUnionVariant, et as SchemaRecordNode, i as SchemaFieldSelector, it as SchemaTaggedUnionNode, k as SchemaValueTypeExpr, nt as SchemaSelfRefNode, ot as SchemaTupleNode, q as SchemaLiteralUnionNode, tt as SchemaRefNode } from "../index-rzkFjgrt.cjs";
2
-
3
- //#region src/authoring/schema.d.ts
4
- interface PrimitiveMetadata {
5
- semanticPath?: string[];
6
- constraints?: SchemaConstraint[];
7
- }
8
- interface RecordOptions {
9
- additionalFields?: true | SchemaNode;
10
- constraints?: SchemaConstraint[];
11
- }
12
- interface ArrayOptions {
13
- constraints?: SchemaConstraint[];
14
- }
15
- interface FieldOptions {
16
- required?: boolean;
17
- description?: string;
18
- }
19
- interface VariantOptions {
20
- description?: string;
21
- }
22
- /** Construct a primitive SchemaNode. This does not validate metadata. */
23
- declare function primitive(name: 'string' | 'number', metadata?: PrimitiveMetadata): SchemaPrimitiveNode;
24
- declare function primitive(name: 'boolean' | 'null'): SchemaPrimitiveNode;
25
- declare const string: (metadata?: PrimitiveMetadata) => SchemaPrimitiveNode;
26
- declare const number: (metadata?: PrimitiveMetadata) => SchemaPrimitiveNode;
27
- declare const boolean: () => SchemaPrimitiveNode;
28
- declare const nullValue: () => SchemaPrimitiveNode;
29
- declare function literal(value: LiteralValue): SchemaLiteralNode;
30
- declare function field(key: string, schema: SchemaNode, options?: FieldOptions): SchemaRecordField;
31
- declare function requiredField(key: string, schema: SchemaNode, description?: string): SchemaRecordField;
32
- declare function optionalField(key: string, schema: SchemaNode, description?: string): SchemaRecordField;
33
- declare function record(fields: SchemaRecordField[], options?: RecordOptions): SchemaRecordNode;
34
- declare function array(elementSchema: SchemaNode, options?: ArrayOptions): SchemaArrayNode;
35
- declare function tuple(elementSchemas: SchemaNode[]): SchemaTupleNode;
36
- declare function literalUnion(values: [LiteralValue, LiteralValue, ...LiteralValue[]]): SchemaLiteralUnionNode;
37
- declare function nullable(value: SchemaNode): SchemaNullableNode;
38
- declare function variant(key: string, schema: SchemaRecordNode, options?: VariantOptions): SchemaTaggedUnionVariant;
39
- declare function taggedUnion(discriminator: string, variants: SchemaTaggedUnionVariant[]): SchemaTaggedUnionNode;
40
- declare function ref(refPath: string[]): SchemaRefNode;
41
- declare function selfRef(): SchemaSelfRefNode;
42
- //#endregion
43
- //#region src/authoring/expression.d.ts
44
- declare function typeVar(name: string, upperBound?: SchemaValueTypeTerm): SchemaValueTypeExpr;
45
- declare function opaqueHostType(hostPath: string[]): SchemaValueTypeExpr;
46
- declare function absent(): SchemaValueTypeExpr;
47
- declare function never(): SchemaValueTypeExpr;
48
- declare function unknown(): SchemaValueTypeExpr;
49
- declare function maybeAbsent(value: SchemaValueTypeTerm): SchemaValueTypeExpr;
50
- declare function arrayOf(element: SchemaValueTypeTerm, constraints?: SchemaConstraint[]): SchemaValueTypeExpr;
51
- declare function tupleOf(elements: SchemaValueTypeTerm[]): SchemaValueTypeExpr;
52
- declare function recordOf(fields: {
53
- key: string;
54
- value: SchemaValueTypeTerm;
55
- required?: boolean;
56
- description?: string;
57
- }[], options?: {
58
- additionalFields?: true | SchemaValueTypeTerm;
59
- constraints?: SchemaConstraint[];
60
- }): SchemaValueTypeExpr;
61
- declare function nullableOf(value: SchemaValueTypeTerm): SchemaValueTypeExpr;
62
- declare function taggedUnionOf(discriminator: string, variants: {
63
- key: string;
64
- value: SchemaValueTypeTerm;
65
- description?: string;
66
- }[]): SchemaValueTypeExpr;
67
- declare function elementOf(source: SchemaValueTypeTerm): SchemaValueTypeExpr;
68
- declare function valueOf(source: SchemaValueTypeTerm): SchemaValueTypeExpr;
69
- declare function elementAt(source: SchemaValueTypeTerm, index: number): SchemaValueTypeExpr;
70
- declare function fieldOf(source: SchemaValueTypeTerm, key: string): SchemaValueTypeExpr;
71
- declare function keyOf(source: SchemaValueTypeTerm): SchemaValueTypeExpr;
72
- declare function allFields(): SchemaFieldSelector;
73
- declare function selectKeys(keys: string[], onMissing?: 'error' | 'ignore'): SchemaFieldSelector;
74
- declare function fieldsOf(source: SchemaValueTypeTerm, fields: SchemaFieldSelector): SchemaValueTypeExpr;
75
- declare function pickFields(source: SchemaValueTypeTerm, fields: SchemaFieldSelector): SchemaValueTypeExpr;
76
- declare function omitFields(source: SchemaValueTypeTerm, fields: SchemaFieldSelector): SchemaValueTypeExpr;
77
- declare function partialFields(source: SchemaValueTypeTerm, fields: SchemaFieldSelector): SchemaValueTypeExpr;
78
- declare function requiredFields(source: SchemaValueTypeTerm, fields: SchemaFieldSelector): SchemaValueTypeExpr;
79
- declare function mergeRecords(sources: SchemaValueTypeTerm[], conflict: 'leftWins' | 'rightWins' | 'error'): SchemaValueTypeExpr;
80
- declare function intersect(sources: SchemaValueTypeTerm[]): SchemaValueTypeExpr;
81
- declare function refine(source: SchemaValueTypeTerm, fields: {
82
- key: string;
83
- require?: true;
84
- intersectWith?: SchemaValueTypeTerm;
85
- addConstraints?: SchemaConstraint[];
86
- }[]): SchemaValueTypeExpr;
87
- declare function excludeVariants(source: SchemaValueTypeTerm, variants: SchemaVariantSelector): SchemaValueTypeExpr;
88
- declare function extractVariants(source: SchemaValueTypeTerm, variants: SchemaVariantSelector): SchemaValueTypeExpr;
89
- //#endregion
90
- export { ArrayOptions, FieldOptions, PrimitiveMetadata, RecordOptions, VariantOptions, absent, allFields, array, arrayOf, boolean, elementAt, elementOf, excludeVariants, extractVariants, field, fieldOf, fieldsOf, intersect, keyOf, literal, literalUnion, maybeAbsent, mergeRecords, never, nullValue, nullable, nullableOf, number, omitFields, opaqueHostType, optionalField, partialFields, pickFields, primitive, record, recordOf, ref, refine, requiredField, requiredFields, selectKeys, selfRef, string, taggedUnion, taggedUnionOf, tuple, tupleOf, typeVar, unknown, valueOf, variant };
1
+ import { a as InferOperationOutput, c as expression_d_exports, d as InferFailureReason, f as InferRef, h as StaticSchemaRegistryEntry, i as InferOperationInput, l as schema_d_exports, m as StaticSchemaRegistry, n as InferOperationEmits, o as InferOperationPayload, p as InferResult, r as InferOperationErrors, s as OperationRegistry, t as InferOperation, u as Infer } from "../index-CQynt7ft.cjs";
2
+ export { Infer, InferFailureReason, InferOperation, InferOperationEmits, InferOperationErrors, InferOperationInput, InferOperationOutput, InferOperationPayload, InferRef, InferResult, OperationRegistry, StaticSchemaRegistry, StaticSchemaRegistryEntry, expression_d_exports as expression, schema_d_exports as schema };
@@ -1,90 +1,2 @@
1
- import { $ as SchemaRecordField, A as SchemaValueTypeTerm, G as SchemaConstraint, J as SchemaNode, K as SchemaLiteralNode, M as SchemaVariantSelector, Q as SchemaPrimitiveNode, U as SchemaArrayNode, V as LiteralValue, X as SchemaNullableNode, at as SchemaTaggedUnionVariant, et as SchemaRecordNode, i as SchemaFieldSelector, it as SchemaTaggedUnionNode, k as SchemaValueTypeExpr, nt as SchemaSelfRefNode, ot as SchemaTupleNode, q as SchemaLiteralUnionNode, tt as SchemaRefNode } from "../index-CEzHfht2.js";
2
-
3
- //#region src/authoring/schema.d.ts
4
- interface PrimitiveMetadata {
5
- semanticPath?: string[];
6
- constraints?: SchemaConstraint[];
7
- }
8
- interface RecordOptions {
9
- additionalFields?: true | SchemaNode;
10
- constraints?: SchemaConstraint[];
11
- }
12
- interface ArrayOptions {
13
- constraints?: SchemaConstraint[];
14
- }
15
- interface FieldOptions {
16
- required?: boolean;
17
- description?: string;
18
- }
19
- interface VariantOptions {
20
- description?: string;
21
- }
22
- /** Construct a primitive SchemaNode. This does not validate metadata. */
23
- declare function primitive(name: 'string' | 'number', metadata?: PrimitiveMetadata): SchemaPrimitiveNode;
24
- declare function primitive(name: 'boolean' | 'null'): SchemaPrimitiveNode;
25
- declare const string: (metadata?: PrimitiveMetadata) => SchemaPrimitiveNode;
26
- declare const number: (metadata?: PrimitiveMetadata) => SchemaPrimitiveNode;
27
- declare const boolean: () => SchemaPrimitiveNode;
28
- declare const nullValue: () => SchemaPrimitiveNode;
29
- declare function literal(value: LiteralValue): SchemaLiteralNode;
30
- declare function field(key: string, schema: SchemaNode, options?: FieldOptions): SchemaRecordField;
31
- declare function requiredField(key: string, schema: SchemaNode, description?: string): SchemaRecordField;
32
- declare function optionalField(key: string, schema: SchemaNode, description?: string): SchemaRecordField;
33
- declare function record(fields: SchemaRecordField[], options?: RecordOptions): SchemaRecordNode;
34
- declare function array(elementSchema: SchemaNode, options?: ArrayOptions): SchemaArrayNode;
35
- declare function tuple(elementSchemas: SchemaNode[]): SchemaTupleNode;
36
- declare function literalUnion(values: [LiteralValue, LiteralValue, ...LiteralValue[]]): SchemaLiteralUnionNode;
37
- declare function nullable(value: SchemaNode): SchemaNullableNode;
38
- declare function variant(key: string, schema: SchemaRecordNode, options?: VariantOptions): SchemaTaggedUnionVariant;
39
- declare function taggedUnion(discriminator: string, variants: SchemaTaggedUnionVariant[]): SchemaTaggedUnionNode;
40
- declare function ref(refPath: string[]): SchemaRefNode;
41
- declare function selfRef(): SchemaSelfRefNode;
42
- //#endregion
43
- //#region src/authoring/expression.d.ts
44
- declare function typeVar(name: string, upperBound?: SchemaValueTypeTerm): SchemaValueTypeExpr;
45
- declare function opaqueHostType(hostPath: string[]): SchemaValueTypeExpr;
46
- declare function absent(): SchemaValueTypeExpr;
47
- declare function never(): SchemaValueTypeExpr;
48
- declare function unknown(): SchemaValueTypeExpr;
49
- declare function maybeAbsent(value: SchemaValueTypeTerm): SchemaValueTypeExpr;
50
- declare function arrayOf(element: SchemaValueTypeTerm, constraints?: SchemaConstraint[]): SchemaValueTypeExpr;
51
- declare function tupleOf(elements: SchemaValueTypeTerm[]): SchemaValueTypeExpr;
52
- declare function recordOf(fields: {
53
- key: string;
54
- value: SchemaValueTypeTerm;
55
- required?: boolean;
56
- description?: string;
57
- }[], options?: {
58
- additionalFields?: true | SchemaValueTypeTerm;
59
- constraints?: SchemaConstraint[];
60
- }): SchemaValueTypeExpr;
61
- declare function nullableOf(value: SchemaValueTypeTerm): SchemaValueTypeExpr;
62
- declare function taggedUnionOf(discriminator: string, variants: {
63
- key: string;
64
- value: SchemaValueTypeTerm;
65
- description?: string;
66
- }[]): SchemaValueTypeExpr;
67
- declare function elementOf(source: SchemaValueTypeTerm): SchemaValueTypeExpr;
68
- declare function valueOf(source: SchemaValueTypeTerm): SchemaValueTypeExpr;
69
- declare function elementAt(source: SchemaValueTypeTerm, index: number): SchemaValueTypeExpr;
70
- declare function fieldOf(source: SchemaValueTypeTerm, key: string): SchemaValueTypeExpr;
71
- declare function keyOf(source: SchemaValueTypeTerm): SchemaValueTypeExpr;
72
- declare function allFields(): SchemaFieldSelector;
73
- declare function selectKeys(keys: string[], onMissing?: 'error' | 'ignore'): SchemaFieldSelector;
74
- declare function fieldsOf(source: SchemaValueTypeTerm, fields: SchemaFieldSelector): SchemaValueTypeExpr;
75
- declare function pickFields(source: SchemaValueTypeTerm, fields: SchemaFieldSelector): SchemaValueTypeExpr;
76
- declare function omitFields(source: SchemaValueTypeTerm, fields: SchemaFieldSelector): SchemaValueTypeExpr;
77
- declare function partialFields(source: SchemaValueTypeTerm, fields: SchemaFieldSelector): SchemaValueTypeExpr;
78
- declare function requiredFields(source: SchemaValueTypeTerm, fields: SchemaFieldSelector): SchemaValueTypeExpr;
79
- declare function mergeRecords(sources: SchemaValueTypeTerm[], conflict: 'leftWins' | 'rightWins' | 'error'): SchemaValueTypeExpr;
80
- declare function intersect(sources: SchemaValueTypeTerm[]): SchemaValueTypeExpr;
81
- declare function refine(source: SchemaValueTypeTerm, fields: {
82
- key: string;
83
- require?: true;
84
- intersectWith?: SchemaValueTypeTerm;
85
- addConstraints?: SchemaConstraint[];
86
- }[]): SchemaValueTypeExpr;
87
- declare function excludeVariants(source: SchemaValueTypeTerm, variants: SchemaVariantSelector): SchemaValueTypeExpr;
88
- declare function extractVariants(source: SchemaValueTypeTerm, variants: SchemaVariantSelector): SchemaValueTypeExpr;
89
- //#endregion
90
- export { ArrayOptions, FieldOptions, PrimitiveMetadata, RecordOptions, VariantOptions, absent, allFields, array, arrayOf, boolean, elementAt, elementOf, excludeVariants, extractVariants, field, fieldOf, fieldsOf, intersect, keyOf, literal, literalUnion, maybeAbsent, mergeRecords, never, nullValue, nullable, nullableOf, number, omitFields, opaqueHostType, optionalField, partialFields, pickFields, primitive, record, recordOf, ref, refine, requiredField, requiredFields, selectKeys, selfRef, string, taggedUnion, taggedUnionOf, tuple, tupleOf, typeVar, unknown, valueOf, variant };
1
+ import { a as InferOperationOutput, c as expression_d_exports, d as InferFailureReason, f as InferRef, h as StaticSchemaRegistryEntry, i as InferOperationInput, l as schema_d_exports, m as StaticSchemaRegistry, n as InferOperationEmits, o as InferOperationPayload, p as InferResult, r as InferOperationErrors, s as OperationRegistry, t as InferOperation, u as Infer } from "../index-bQy-C-1l.js";
2
+ export { Infer, InferFailureReason, InferOperation, InferOperationEmits, InferOperationErrors, InferOperationInput, InferOperationOutput, InferOperationPayload, InferRef, InferResult, OperationRegistry, StaticSchemaRegistry, StaticSchemaRegistryEntry, expression_d_exports as expression, schema_d_exports as schema };