@scalar/workspace-store 0.52.0 → 0.53.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.
- package/CHANGELOG.md +19 -0
- package/dist/channel-example/build-connection-url.d.ts.map +1 -1
- package/dist/channel-example/build-connection-url.js +11 -8
- package/dist/channel-example/get-all-channel-messages.d.ts +10 -0
- package/dist/channel-example/get-all-channel-messages.d.ts.map +1 -0
- package/dist/channel-example/get-all-channel-messages.js +16 -0
- package/dist/channel-example/get-asyncapi-security-requirements.d.ts +7 -0
- package/dist/channel-example/get-asyncapi-security-requirements.d.ts.map +1 -0
- package/dist/channel-example/get-asyncapi-security-requirements.js +76 -0
- package/dist/channel-example/get-channel-connection-context.d.ts +16 -0
- package/dist/channel-example/get-channel-connection-context.d.ts.map +1 -0
- package/dist/channel-example/get-channel-connection-context.js +120 -0
- package/dist/channel-example/get-channel-connection-security.d.ts +8 -0
- package/dist/channel-example/get-channel-connection-security.d.ts.map +1 -0
- package/dist/channel-example/get-channel-connection-security.js +20 -0
- package/dist/channel-example/get-channel-operations.d.ts +11 -0
- package/dist/channel-example/get-channel-operations.d.ts.map +1 -0
- package/dist/channel-example/get-channel-operations.js +20 -0
- package/dist/channel-example/get-channel-parameters.d.ts +14 -0
- package/dist/channel-example/get-channel-parameters.d.ts.map +1 -0
- package/dist/channel-example/get-channel-parameters.js +59 -0
- package/dist/channel-example/index.d.ts +15 -0
- package/dist/channel-example/index.d.ts.map +1 -1
- package/dist/channel-example/index.js +9 -0
- package/dist/channel-example/resolve-channel.d.ts +11 -0
- package/dist/channel-example/resolve-channel.d.ts.map +1 -0
- package/dist/channel-example/resolve-channel.js +13 -0
- package/dist/channel-example/resolve-operation-channel.d.ts +11 -0
- package/dist/channel-example/resolve-operation-channel.d.ts.map +1 -0
- package/dist/channel-example/resolve-operation-channel.js +39 -0
- package/dist/channel-example/resolve-operation-with-traits.d.ts +6 -0
- package/dist/channel-example/resolve-operation-with-traits.d.ts.map +1 -0
- package/dist/channel-example/resolve-operation-with-traits.js +41 -0
- package/dist/channel-example/servers.d.ts.map +1 -1
- package/dist/channel-example/servers.js +23 -0
- package/dist/channel-example/types.d.ts +41 -0
- package/dist/channel-example/types.d.ts.map +1 -0
- package/dist/channel-example/types.js +1 -0
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +8 -8
- package/dist/entities/auth/schema.d.ts +1184 -59
- package/dist/entities/auth/schema.d.ts.map +1 -1
- package/dist/helpers/get-name-from-ref.d.ts +15 -0
- package/dist/helpers/get-name-from-ref.d.ts.map +1 -0
- package/dist/helpers/get-name-from-ref.js +37 -0
- package/dist/navigation/get-navigation-options.d.ts +2 -2
- package/dist/navigation/get-navigation-options.d.ts.map +1 -1
- package/dist/navigation/get-navigation-options.js +26 -3
- package/dist/navigation/helpers/traverse-asyncapi-document.d.ts +23 -0
- package/dist/navigation/helpers/traverse-asyncapi-document.d.ts.map +1 -0
- package/dist/navigation/helpers/traverse-asyncapi-document.js +479 -0
- package/dist/navigation/helpers/traverse-description.d.ts +4 -3
- package/dist/navigation/helpers/traverse-description.d.ts.map +1 -1
- package/dist/navigation/helpers/traverse-description.js +2 -2
- package/dist/navigation/helpers/traverse-document.d.ts.map +1 -1
- package/dist/navigation/helpers/traverse-document.js +3 -3
- package/dist/navigation/index.d.ts +1 -0
- package/dist/navigation/index.d.ts.map +1 -1
- package/dist/navigation/index.js +1 -0
- package/dist/navigation/types.d.ts +3 -0
- package/dist/navigation/types.d.ts.map +1 -1
- package/dist/schemas/navigation.d.ts +113 -4
- package/dist/schemas/navigation.d.ts.map +1 -1
- package/dist/schemas/navigation.js +22 -0
- package/dist/schemas/reference-config/index.d.ts +233 -8
- package/dist/schemas/reference-config/index.d.ts.map +1 -1
- package/dist/schemas/reference-config/settings.d.ts +233 -8
- package/dist/schemas/reference-config/settings.d.ts.map +1 -1
- package/dist/schemas/v3.1/openapi/index.d.ts.map +1 -1
- package/dist/schemas/v3.1/openapi/index.js +59 -17
- package/dist/schemas/v3.1/strict/openapi-document.d.ts +9446 -1571
- package/dist/schemas/v3.1/strict/openapi-document.d.ts.map +1 -1
- package/dist/schemas/v3.1/strict/openapi-document.js +4 -1
- package/dist/schemas/v3.1/strict/ref-definitions.d.ts +3 -0
- package/dist/schemas/v3.1/strict/ref-definitions.d.ts.map +1 -1
- package/dist/schemas/v3.1/strict/ref-definitions.js +3 -0
- package/dist/schemas/v3.1/strict/schema.d.ts +259 -26
- package/dist/schemas/v3.1/strict/schema.d.ts.map +1 -1
- package/dist/schemas/v3.1/strict/schema.js +37 -28
- package/package.json +7 -7
|
@@ -14,21 +14,20 @@ import { type ReferenceObject } from './reference.js';
|
|
|
14
14
|
export type SchemaReferenceType<Value> = Value | (ReferenceObject & {
|
|
15
15
|
'$ref-value': unknown;
|
|
16
16
|
});
|
|
17
|
+
type PrimitiveSchemaType = 'null' | 'boolean' | 'string' | 'number' | 'integer' | 'object' | 'array';
|
|
17
18
|
/** We use this type to ensure that we are parsing a schema object as every property can be optional */
|
|
18
19
|
type _InternalType = CoreProperties & {
|
|
19
20
|
__scalar_: string;
|
|
20
21
|
} & Extensions;
|
|
21
22
|
/**
|
|
22
23
|
* Primitive types that don't have additional validation properties.
|
|
23
|
-
* These types (null, boolean
|
|
24
|
+
* These types (null, boolean) can be used
|
|
24
25
|
* without additional validation constraints.
|
|
25
|
-
*
|
|
26
|
-
* TODO: Type array will actually validate against every union type but we can cross that bridge when we come to it
|
|
27
26
|
*/
|
|
28
27
|
declare const OtherTypes: import("@scalar/typebox").TObject<{
|
|
29
|
-
type: import("@scalar/typebox").TUnion<[import("@scalar/typebox").TLiteral<"null">, import("@scalar/typebox").TLiteral<"boolean"
|
|
28
|
+
type: import("@scalar/typebox").TUnion<[import("@scalar/typebox").TLiteral<"null">, import("@scalar/typebox").TLiteral<"boolean">]>;
|
|
30
29
|
}>;
|
|
31
|
-
type OtherType = 'boolean' | 'null'
|
|
30
|
+
type OtherType = 'boolean' | 'null';
|
|
32
31
|
type OtherTypes = CoreProperties & {
|
|
33
32
|
type: OtherType;
|
|
34
33
|
} & Extensions;
|
|
@@ -104,10 +103,7 @@ type CoreProperties = {
|
|
|
104
103
|
/** Schema must not be valid. */
|
|
105
104
|
not?: SchemaReferenceType<SchemaObject>;
|
|
106
105
|
};
|
|
107
|
-
type
|
|
108
|
-
type: 'number' | 'integer';
|
|
109
|
-
/** Different subtypes */
|
|
110
|
-
format?: 'int8' | 'int16' | 'int32' | 'int64' | 'uint8' | 'uint16' | 'uint32' | 'uint64' | 'double-int' | 'float' | 'double' | 'decimal' | 'decimal128' | 'sf-integer' | 'sf-decimal' | (string & {});
|
|
106
|
+
type NumericKeywords = {
|
|
111
107
|
/** Number must be a multiple of this value. */
|
|
112
108
|
multipleOf?: number;
|
|
113
109
|
/** Maximum value (inclusive). */
|
|
@@ -118,6 +114,12 @@ type NumericObject = CoreProperties & {
|
|
|
118
114
|
minimum?: number;
|
|
119
115
|
/** Minimum value (exclusive). */
|
|
120
116
|
exclusiveMinimum?: number;
|
|
117
|
+
};
|
|
118
|
+
type NumericFormat = 'int8' | 'int16' | 'int32' | 'int64' | 'uint8' | 'uint16' | 'uint32' | 'uint64' | 'double-int' | 'float' | 'double' | 'decimal' | 'decimal128' | 'sf-integer' | 'sf-decimal' | (string & {});
|
|
119
|
+
type NumericObject = CoreProperties & NumericKeywords & {
|
|
120
|
+
type: 'number' | 'integer';
|
|
121
|
+
/** Different subtypes */
|
|
122
|
+
format?: NumericFormat;
|
|
121
123
|
} & Extensions;
|
|
122
124
|
/**
|
|
123
125
|
* Supported string formats in OpenAPI schemas.
|
|
@@ -126,19 +128,20 @@ type NumericObject = CoreProperties & {
|
|
|
126
128
|
* in the schema, so we type it in typescript instead. This gives us autocomplete while allowing any string!
|
|
127
129
|
*/
|
|
128
130
|
type StringFormat = 'date' | 'date-time' | 'date-time-local' | 'time' | 'time-local' | 'duration' | 'http-date' | 'email' | 'idn-email' | 'hostname' | 'idn-hostname' | 'ipv4' | 'ipv6' | 'uri' | 'uri-reference' | 'uri-template' | 'iri' | 'iri-reference' | 'uuid' | 'binary' | 'byte' | 'base64url' | 'html' | 'commonmark' | 'password' | 'regex' | 'json-pointer' | 'relative-json-pointer' | 'media-range' | 'char' | 'sf-string' | 'sf-token' | 'sf-binary' | 'sf-boolean' | (string & {});
|
|
129
|
-
type
|
|
130
|
-
type: 'string';
|
|
131
|
-
/** Different subtypes - allow any arbitrary string, this negates the purpose of having a union of formats so we type it in typescript instead */
|
|
132
|
-
format?: StringFormat;
|
|
131
|
+
type StringKeywords = {
|
|
133
132
|
/** Maximum string length. */
|
|
134
133
|
maxLength?: number;
|
|
135
134
|
/** Minimum string length. */
|
|
136
135
|
minLength?: number;
|
|
137
136
|
/** Regular expression pattern. */
|
|
138
137
|
pattern?: string;
|
|
138
|
+
};
|
|
139
|
+
type StringObject = CoreProperties & StringKeywords & {
|
|
140
|
+
type: 'string';
|
|
141
|
+
/** Different subtypes - allow any arbitrary string, this negates the purpose of having a union of formats so we type it in typescript instead */
|
|
142
|
+
format?: StringFormat;
|
|
139
143
|
} & Extensions;
|
|
140
|
-
type
|
|
141
|
-
type: 'array';
|
|
144
|
+
type ArrayKeywords = {
|
|
142
145
|
/** Maximum number of items in array. */
|
|
143
146
|
maxItems?: number;
|
|
144
147
|
/** Minimum number of items in array. */
|
|
@@ -149,9 +152,11 @@ type ArrayObject = CoreProperties & {
|
|
|
149
152
|
items?: SchemaReferenceType<SchemaObject>;
|
|
150
153
|
/** Schema for tuple validation. */
|
|
151
154
|
prefixItems?: SchemaReferenceType<SchemaObject>[];
|
|
155
|
+
};
|
|
156
|
+
type ArrayObject = CoreProperties & ArrayKeywords & {
|
|
157
|
+
type: 'array';
|
|
152
158
|
} & Extensions;
|
|
153
|
-
type
|
|
154
|
-
type: 'object';
|
|
159
|
+
type ObjectKeywords = {
|
|
155
160
|
/** Maximum number of properties. */
|
|
156
161
|
maxProperties?: number;
|
|
157
162
|
/** Minimum number of properties. */
|
|
@@ -166,6 +171,14 @@ type ObjectObject = CoreProperties & {
|
|
|
166
171
|
patternProperties?: Record<string, SchemaReferenceType<SchemaObject>>;
|
|
167
172
|
/** Constraints on property names (JSON Schema propertyNames keyword). */
|
|
168
173
|
propertyNames?: SchemaReferenceType<SchemaObject>;
|
|
174
|
+
};
|
|
175
|
+
type ObjectObject = CoreProperties & ObjectKeywords & {
|
|
176
|
+
type: 'object';
|
|
177
|
+
} & Extensions;
|
|
178
|
+
type MultiTypeObject = CoreProperties & NumericKeywords & StringKeywords & ArrayKeywords & ObjectKeywords & {
|
|
179
|
+
type: PrimitiveSchemaType[];
|
|
180
|
+
/** Different subtypes - allow any arbitrary string, this negates the purpose of having a union of formats so we type it in typescript instead */
|
|
181
|
+
format?: StringFormat | NumericFormat;
|
|
169
182
|
} & Extensions;
|
|
170
183
|
/** Builds the recursive schema schema */
|
|
171
184
|
export declare const SchemaObjectSchemaDefinition: import("@scalar/typebox").TUnion<[import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TObject<{
|
|
@@ -285,7 +298,7 @@ export declare const SchemaObjectSchemaDefinition: import("@scalar/typebox").TUn
|
|
|
285
298
|
}>, import("@scalar/typebox").TObject<{
|
|
286
299
|
'x-tags': import("@scalar/typebox").TOptional<import("@scalar/typebox").TArray<import("@scalar/typebox").TString>>;
|
|
287
300
|
}>]>]>, import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TObject<{
|
|
288
|
-
type: import("@scalar/typebox").TUnion<[import("@scalar/typebox").TLiteral<"null">, import("@scalar/typebox").TLiteral<"boolean"
|
|
301
|
+
type: import("@scalar/typebox").TUnion<[import("@scalar/typebox").TLiteral<"null">, import("@scalar/typebox").TLiteral<"boolean">]>;
|
|
289
302
|
}>, import("@scalar/typebox").TObject<{
|
|
290
303
|
name: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
291
304
|
/** A title for the schema. */
|
|
@@ -400,10 +413,11 @@ export declare const SchemaObjectSchemaDefinition: import("@scalar/typebox").TUn
|
|
|
400
413
|
'x-order': import("@scalar/typebox").TOptional<import("@scalar/typebox").TNumber>;
|
|
401
414
|
}>, import("@scalar/typebox").TObject<{
|
|
402
415
|
'x-tags': import("@scalar/typebox").TOptional<import("@scalar/typebox").TArray<import("@scalar/typebox").TString>>;
|
|
403
|
-
}>]>]>, import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TObject<{
|
|
416
|
+
}>]>]>, import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TObject<{
|
|
404
417
|
type: import("@scalar/typebox").TUnion<[import("@scalar/typebox").TLiteral<"number">, import("@scalar/typebox").TLiteral<"integer">]>;
|
|
405
418
|
/** Different subtypes */
|
|
406
419
|
format: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
420
|
+
}>, import("@scalar/typebox").TObject<{
|
|
407
421
|
/** Number must be a multiple of this value. */
|
|
408
422
|
multipleOf: import("@scalar/typebox").TOptional<import("@scalar/typebox").TNumber>;
|
|
409
423
|
/** Maximum value (inclusive). */
|
|
@@ -414,7 +428,7 @@ export declare const SchemaObjectSchemaDefinition: import("@scalar/typebox").TUn
|
|
|
414
428
|
minimum: import("@scalar/typebox").TOptional<import("@scalar/typebox").TNumber>;
|
|
415
429
|
/** Minimum value (exclusive). */
|
|
416
430
|
exclusiveMinimum: import("@scalar/typebox").TOptional<import("@scalar/typebox").TNumber>;
|
|
417
|
-
}>, import("@scalar/typebox").TObject<{
|
|
431
|
+
}>]>, import("@scalar/typebox").TObject<{
|
|
418
432
|
name: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
419
433
|
/** A title for the schema. */
|
|
420
434
|
title: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
@@ -528,17 +542,18 @@ export declare const SchemaObjectSchemaDefinition: import("@scalar/typebox").TUn
|
|
|
528
542
|
'x-order': import("@scalar/typebox").TOptional<import("@scalar/typebox").TNumber>;
|
|
529
543
|
}>, import("@scalar/typebox").TObject<{
|
|
530
544
|
'x-tags': import("@scalar/typebox").TOptional<import("@scalar/typebox").TArray<import("@scalar/typebox").TString>>;
|
|
531
|
-
}>]>]>, import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TObject<{
|
|
545
|
+
}>]>]>, import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TObject<{
|
|
532
546
|
type: import("@scalar/typebox").TLiteral<"string">;
|
|
533
547
|
/** Different subtypes - allow any arbitrary string, this negates the purpose of having a union of formats so we type it in typescript instead */
|
|
534
548
|
format: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
549
|
+
}>, import("@scalar/typebox").TObject<{
|
|
535
550
|
/** Maximum string length. */
|
|
536
551
|
maxLength: import("@scalar/typebox").TOptional<import("@scalar/typebox").TInteger>;
|
|
537
552
|
/** Minimum string length. */
|
|
538
553
|
minLength: import("@scalar/typebox").TOptional<import("@scalar/typebox").TInteger>;
|
|
539
554
|
/** Regular expression pattern. */
|
|
540
555
|
pattern: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
541
|
-
}>, import("@scalar/typebox").TObject<{
|
|
556
|
+
}>]>, import("@scalar/typebox").TObject<{
|
|
542
557
|
name: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
543
558
|
/** A title for the schema. */
|
|
544
559
|
title: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
@@ -652,8 +667,9 @@ export declare const SchemaObjectSchemaDefinition: import("@scalar/typebox").TUn
|
|
|
652
667
|
'x-order': import("@scalar/typebox").TOptional<import("@scalar/typebox").TNumber>;
|
|
653
668
|
}>, import("@scalar/typebox").TObject<{
|
|
654
669
|
'x-tags': import("@scalar/typebox").TOptional<import("@scalar/typebox").TArray<import("@scalar/typebox").TString>>;
|
|
655
|
-
}>]>]>, import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TObject<{
|
|
670
|
+
}>]>]>, import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TObject<{
|
|
656
671
|
type: import("@scalar/typebox").TLiteral<"object">;
|
|
672
|
+
}>, import("@scalar/typebox").TObject<{
|
|
657
673
|
/** Maximum number of properties. */
|
|
658
674
|
maxProperties: import("@scalar/typebox").TOptional<import("@scalar/typebox").TInteger>;
|
|
659
675
|
/** Minimum number of properties. */
|
|
@@ -704,7 +720,7 @@ export declare const SchemaObjectSchemaDefinition: import("@scalar/typebox").TUn
|
|
|
704
720
|
}>]>, import("@scalar/typebox").TObject<{
|
|
705
721
|
'$ref-value': import("@scalar/typebox").TUnknown;
|
|
706
722
|
}>]>]>>;
|
|
707
|
-
}>, import("@scalar/typebox").TObject<{
|
|
723
|
+
}>]>, import("@scalar/typebox").TObject<{
|
|
708
724
|
name: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
709
725
|
/** A title for the schema. */
|
|
710
726
|
title: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
@@ -818,8 +834,174 @@ export declare const SchemaObjectSchemaDefinition: import("@scalar/typebox").TUn
|
|
|
818
834
|
'x-order': import("@scalar/typebox").TOptional<import("@scalar/typebox").TNumber>;
|
|
819
835
|
}>, import("@scalar/typebox").TObject<{
|
|
820
836
|
'x-tags': import("@scalar/typebox").TOptional<import("@scalar/typebox").TArray<import("@scalar/typebox").TString>>;
|
|
821
|
-
}>]>]>, import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TObject<{
|
|
837
|
+
}>]>]>, import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TObject<{
|
|
822
838
|
type: import("@scalar/typebox").TLiteral<"array">;
|
|
839
|
+
}>, import("@scalar/typebox").TObject<{
|
|
840
|
+
/** Maximum number of items in array. */
|
|
841
|
+
maxItems: import("@scalar/typebox").TOptional<import("@scalar/typebox").TInteger>;
|
|
842
|
+
/** Minimum number of items in array. */
|
|
843
|
+
minItems: import("@scalar/typebox").TOptional<import("@scalar/typebox").TInteger>;
|
|
844
|
+
/** Whether array items must be unique. */
|
|
845
|
+
uniqueItems: import("@scalar/typebox").TOptional<import("@scalar/typebox").TBoolean>;
|
|
846
|
+
/** Schema for array items. */
|
|
847
|
+
items: import("@scalar/typebox").TOptional<import("@scalar/typebox").TUnion<[import("@scalar/typebox").TRef<"SchemaObject">, import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TObject<{
|
|
848
|
+
$ref: import("@scalar/typebox").TString;
|
|
849
|
+
summary: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
850
|
+
description: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
851
|
+
}>, import("@scalar/typebox").TObject<{
|
|
852
|
+
$status: import("@scalar/typebox").TOptional<import("@scalar/typebox").TUnion<[import("@scalar/typebox").TLiteral<"loading">, import("@scalar/typebox").TLiteral<"error">]>>;
|
|
853
|
+
$global: import("@scalar/typebox").TOptional<import("@scalar/typebox").TBoolean>;
|
|
854
|
+
}>]>, import("@scalar/typebox").TObject<{
|
|
855
|
+
'$ref-value': import("@scalar/typebox").TUnknown;
|
|
856
|
+
}>]>]>>;
|
|
857
|
+
/** Schema for tuple validation. */
|
|
858
|
+
prefixItems: import("@scalar/typebox").TOptional<import("@scalar/typebox").TArray<import("@scalar/typebox").TUnion<[import("@scalar/typebox").TRef<"SchemaObject">, import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TObject<{
|
|
859
|
+
$ref: import("@scalar/typebox").TString;
|
|
860
|
+
summary: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
861
|
+
description: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
862
|
+
}>, import("@scalar/typebox").TObject<{
|
|
863
|
+
$status: import("@scalar/typebox").TOptional<import("@scalar/typebox").TUnion<[import("@scalar/typebox").TLiteral<"loading">, import("@scalar/typebox").TLiteral<"error">]>>;
|
|
864
|
+
$global: import("@scalar/typebox").TOptional<import("@scalar/typebox").TBoolean>;
|
|
865
|
+
}>]>, import("@scalar/typebox").TObject<{
|
|
866
|
+
'$ref-value': import("@scalar/typebox").TUnknown;
|
|
867
|
+
}>]>]>>>;
|
|
868
|
+
}>]>, import("@scalar/typebox").TObject<{
|
|
869
|
+
name: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
870
|
+
/** A title for the schema. */
|
|
871
|
+
title: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
872
|
+
/** A description of the schema. */
|
|
873
|
+
description: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
874
|
+
/** Default value for the schema. */
|
|
875
|
+
default: import("@scalar/typebox").TOptional<import("@scalar/typebox").TUnknown>;
|
|
876
|
+
/** Array of allowed values. */
|
|
877
|
+
enum: import("@scalar/typebox").TOptional<import("@scalar/typebox").TArray<import("@scalar/typebox").TUnknown>>;
|
|
878
|
+
/** Constant value that must match exactly. */
|
|
879
|
+
const: import("@scalar/typebox").TOptional<import("@scalar/typebox").TUnknown>;
|
|
880
|
+
/** Media type for content validation. */
|
|
881
|
+
contentMediaType: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
882
|
+
/** Content encoding. */
|
|
883
|
+
contentEncoding: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
884
|
+
/** Schema for content validation. */
|
|
885
|
+
contentSchema: import("@scalar/typebox").TOptional<import("@scalar/typebox").TUnion<[import("@scalar/typebox").TRef<"SchemaObject">, import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TObject<{
|
|
886
|
+
$ref: import("@scalar/typebox").TString;
|
|
887
|
+
summary: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
888
|
+
description: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
889
|
+
}>, import("@scalar/typebox").TObject<{
|
|
890
|
+
$status: import("@scalar/typebox").TOptional<import("@scalar/typebox").TUnion<[import("@scalar/typebox").TLiteral<"loading">, import("@scalar/typebox").TLiteral<"error">]>>;
|
|
891
|
+
$global: import("@scalar/typebox").TOptional<import("@scalar/typebox").TBoolean>;
|
|
892
|
+
}>]>, import("@scalar/typebox").TObject<{
|
|
893
|
+
'$ref-value': import("@scalar/typebox").TUnknown;
|
|
894
|
+
}>]>]>>;
|
|
895
|
+
/** Whether the schema is deprecated. */
|
|
896
|
+
deprecated: import("@scalar/typebox").TOptional<import("@scalar/typebox").TBoolean>;
|
|
897
|
+
/** Adds support for polymorphism. The discriminator is used to determine which of a set of schemas a payload is expected to satisfy. See Composition and Inheritance for more details. */
|
|
898
|
+
discriminator: import("@scalar/typebox").TOptional<import("@scalar/typebox").TRef<"DiscriminatorObject">>;
|
|
899
|
+
/** Whether the schema is read-only. */
|
|
900
|
+
readOnly: import("@scalar/typebox").TOptional<import("@scalar/typebox").TBoolean>;
|
|
901
|
+
/** Whether the schema is write-only. */
|
|
902
|
+
writeOnly: import("@scalar/typebox").TOptional<import("@scalar/typebox").TBoolean>;
|
|
903
|
+
/** This MAY be used only on property schemas. It has no effect on root schemas. Adds additional metadata to describe the XML representation of this property. */
|
|
904
|
+
xml: import("@scalar/typebox").TOptional<import("@scalar/typebox").TRef<"XMLObject">>;
|
|
905
|
+
/** Additional external documentation for this schema. */
|
|
906
|
+
externalDocs: import("@scalar/typebox").TOptional<import("@scalar/typebox").TRef<"ExternalDocumentationObject">>;
|
|
907
|
+
/**
|
|
908
|
+
* A free-form field to include an example of an instance for this schema. To represent examples that cannot be naturally represented in JSON or YAML, a string value can be used to contain the example with escaping where necessary.
|
|
909
|
+
*
|
|
910
|
+
* @deprecated The example field has been deprecated in favor of the JSON Schema examples keyword. Use of example is discouraged, and later versions of this specification may remove it.
|
|
911
|
+
*/
|
|
912
|
+
example: import("@scalar/typebox").TOptional<import("@scalar/typebox").TUnknown>;
|
|
913
|
+
/**
|
|
914
|
+
* An array of examples of valid instances for this schema. This keyword follows the JSON Schema Draft 2020-12 specification.
|
|
915
|
+
* Each example should be a valid instance of the schema.
|
|
916
|
+
*/
|
|
917
|
+
examples: import("@scalar/typebox").TOptional<import("@scalar/typebox").TArray<import("@scalar/typebox").TUnknown>>;
|
|
918
|
+
/** All schemas must be valid. */
|
|
919
|
+
allOf: import("@scalar/typebox").TOptional<import("@scalar/typebox").TArray<import("@scalar/typebox").TUnion<[import("@scalar/typebox").TRef<"SchemaObject">, import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TObject<{
|
|
920
|
+
$ref: import("@scalar/typebox").TString;
|
|
921
|
+
summary: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
922
|
+
description: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
923
|
+
}>, import("@scalar/typebox").TObject<{
|
|
924
|
+
$status: import("@scalar/typebox").TOptional<import("@scalar/typebox").TUnion<[import("@scalar/typebox").TLiteral<"loading">, import("@scalar/typebox").TLiteral<"error">]>>;
|
|
925
|
+
$global: import("@scalar/typebox").TOptional<import("@scalar/typebox").TBoolean>;
|
|
926
|
+
}>]>, import("@scalar/typebox").TObject<{
|
|
927
|
+
'$ref-value': import("@scalar/typebox").TUnknown;
|
|
928
|
+
}>]>]>>>;
|
|
929
|
+
/** Exactly one schema must be valid. */
|
|
930
|
+
oneOf: import("@scalar/typebox").TOptional<import("@scalar/typebox").TArray<import("@scalar/typebox").TUnion<[import("@scalar/typebox").TRef<"SchemaObject">, import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TObject<{
|
|
931
|
+
$ref: import("@scalar/typebox").TString;
|
|
932
|
+
summary: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
933
|
+
description: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
934
|
+
}>, import("@scalar/typebox").TObject<{
|
|
935
|
+
$status: import("@scalar/typebox").TOptional<import("@scalar/typebox").TUnion<[import("@scalar/typebox").TLiteral<"loading">, import("@scalar/typebox").TLiteral<"error">]>>;
|
|
936
|
+
$global: import("@scalar/typebox").TOptional<import("@scalar/typebox").TBoolean>;
|
|
937
|
+
}>]>, import("@scalar/typebox").TObject<{
|
|
938
|
+
'$ref-value': import("@scalar/typebox").TUnknown;
|
|
939
|
+
}>]>]>>>;
|
|
940
|
+
/** At least one schema must be valid. */
|
|
941
|
+
anyOf: import("@scalar/typebox").TOptional<import("@scalar/typebox").TArray<import("@scalar/typebox").TUnion<[import("@scalar/typebox").TRef<"SchemaObject">, import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TObject<{
|
|
942
|
+
$ref: import("@scalar/typebox").TString;
|
|
943
|
+
summary: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
944
|
+
description: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
945
|
+
}>, import("@scalar/typebox").TObject<{
|
|
946
|
+
$status: import("@scalar/typebox").TOptional<import("@scalar/typebox").TUnion<[import("@scalar/typebox").TLiteral<"loading">, import("@scalar/typebox").TLiteral<"error">]>>;
|
|
947
|
+
$global: import("@scalar/typebox").TOptional<import("@scalar/typebox").TBoolean>;
|
|
948
|
+
}>]>, import("@scalar/typebox").TObject<{
|
|
949
|
+
'$ref-value': import("@scalar/typebox").TUnknown;
|
|
950
|
+
}>]>]>>>;
|
|
951
|
+
/** Schema must not be valid. */
|
|
952
|
+
not: import("@scalar/typebox").TOptional<import("@scalar/typebox").TUnion<[import("@scalar/typebox").TRef<"SchemaObject">, import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TObject<{
|
|
953
|
+
$ref: import("@scalar/typebox").TString;
|
|
954
|
+
summary: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
955
|
+
description: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
956
|
+
}>, import("@scalar/typebox").TObject<{
|
|
957
|
+
$status: import("@scalar/typebox").TOptional<import("@scalar/typebox").TUnion<[import("@scalar/typebox").TLiteral<"loading">, import("@scalar/typebox").TLiteral<"error">]>>;
|
|
958
|
+
$global: import("@scalar/typebox").TOptional<import("@scalar/typebox").TBoolean>;
|
|
959
|
+
}>]>, import("@scalar/typebox").TObject<{
|
|
960
|
+
'$ref-value': import("@scalar/typebox").TUnknown;
|
|
961
|
+
}>]>]>>;
|
|
962
|
+
}>, import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TObject<{
|
|
963
|
+
'x-scalar-ignore': import("@scalar/typebox").TOptional<import("@scalar/typebox").TBoolean>;
|
|
964
|
+
}>, import("@scalar/typebox").TObject<{
|
|
965
|
+
'x-internal': import("@scalar/typebox").TOptional<import("@scalar/typebox").TBoolean>;
|
|
966
|
+
}>, import("@scalar/typebox").TObject<{
|
|
967
|
+
'x-variable': import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
968
|
+
}>, import("@scalar/typebox").TObject<{
|
|
969
|
+
'x-examples': import("@scalar/typebox").TOptional<import("@scalar/typebox").TRecord<import("@scalar/typebox").TString, import("@scalar/typebox").TUnknown>>;
|
|
970
|
+
}>, import("@scalar/typebox").TObject<{
|
|
971
|
+
'x-enumDescriptions': import("@scalar/typebox").TOptional<import("@scalar/typebox").TUnion<[import("@scalar/typebox").TRecord<import("@scalar/typebox").TString, import("@scalar/typebox").TString>, import("@scalar/typebox").TArray<import("@scalar/typebox").TString>]>>;
|
|
972
|
+
'x-enum-descriptions': import("@scalar/typebox").TOptional<import("@scalar/typebox").TUnion<[import("@scalar/typebox").TRecord<import("@scalar/typebox").TString, import("@scalar/typebox").TString>, import("@scalar/typebox").TArray<import("@scalar/typebox").TString>]>>;
|
|
973
|
+
}>, import("@scalar/typebox").TObject<{
|
|
974
|
+
'x-enum-varnames': import("@scalar/typebox").TOptional<import("@scalar/typebox").TArray<import("@scalar/typebox").TString>>;
|
|
975
|
+
'x-enumNames': import("@scalar/typebox").TOptional<import("@scalar/typebox").TArray<import("@scalar/typebox").TString>>;
|
|
976
|
+
}>, import("@scalar/typebox").TObject<{
|
|
977
|
+
'x-additionalPropertiesName': import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
978
|
+
}>, import("@scalar/typebox").TObject<{
|
|
979
|
+
'x-order': import("@scalar/typebox").TOptional<import("@scalar/typebox").TNumber>;
|
|
980
|
+
}>, import("@scalar/typebox").TObject<{
|
|
981
|
+
'x-tags': import("@scalar/typebox").TOptional<import("@scalar/typebox").TArray<import("@scalar/typebox").TString>>;
|
|
982
|
+
}>]>]>, import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TObject<{
|
|
983
|
+
type: import("@scalar/typebox").TArray<import("@scalar/typebox").TUnion<[import("@scalar/typebox").TLiteral<"null">, import("@scalar/typebox").TLiteral<"boolean">, import("@scalar/typebox").TLiteral<"string">, import("@scalar/typebox").TLiteral<"number">, import("@scalar/typebox").TLiteral<"integer">, import("@scalar/typebox").TLiteral<"object">, import("@scalar/typebox").TLiteral<"array">]>>;
|
|
984
|
+
/** Different subtypes - allow any arbitrary string, this negates the purpose of having a union of formats so we type it in typescript instead */
|
|
985
|
+
format: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
986
|
+
}>, import("@scalar/typebox").TObject<{
|
|
987
|
+
/** Number must be a multiple of this value. */
|
|
988
|
+
multipleOf: import("@scalar/typebox").TOptional<import("@scalar/typebox").TNumber>;
|
|
989
|
+
/** Maximum value (inclusive). */
|
|
990
|
+
maximum: import("@scalar/typebox").TOptional<import("@scalar/typebox").TNumber>;
|
|
991
|
+
/** Maximum value (exclusive). */
|
|
992
|
+
exclusiveMaximum: import("@scalar/typebox").TOptional<import("@scalar/typebox").TNumber>;
|
|
993
|
+
/** Minimum value (inclusive). */
|
|
994
|
+
minimum: import("@scalar/typebox").TOptional<import("@scalar/typebox").TNumber>;
|
|
995
|
+
/** Minimum value (exclusive). */
|
|
996
|
+
exclusiveMinimum: import("@scalar/typebox").TOptional<import("@scalar/typebox").TNumber>;
|
|
997
|
+
}>, import("@scalar/typebox").TObject<{
|
|
998
|
+
/** Maximum string length. */
|
|
999
|
+
maxLength: import("@scalar/typebox").TOptional<import("@scalar/typebox").TInteger>;
|
|
1000
|
+
/** Minimum string length. */
|
|
1001
|
+
minLength: import("@scalar/typebox").TOptional<import("@scalar/typebox").TInteger>;
|
|
1002
|
+
/** Regular expression pattern. */
|
|
1003
|
+
pattern: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
1004
|
+
}>, import("@scalar/typebox").TObject<{
|
|
823
1005
|
/** Maximum number of items in array. */
|
|
824
1006
|
maxItems: import("@scalar/typebox").TOptional<import("@scalar/typebox").TInteger>;
|
|
825
1007
|
/** Minimum number of items in array. */
|
|
@@ -849,6 +1031,57 @@ export declare const SchemaObjectSchemaDefinition: import("@scalar/typebox").TUn
|
|
|
849
1031
|
'$ref-value': import("@scalar/typebox").TUnknown;
|
|
850
1032
|
}>]>]>>>;
|
|
851
1033
|
}>, import("@scalar/typebox").TObject<{
|
|
1034
|
+
/** Maximum number of properties. */
|
|
1035
|
+
maxProperties: import("@scalar/typebox").TOptional<import("@scalar/typebox").TInteger>;
|
|
1036
|
+
/** Minimum number of properties. */
|
|
1037
|
+
minProperties: import("@scalar/typebox").TOptional<import("@scalar/typebox").TInteger>;
|
|
1038
|
+
/** Array of required property names. */
|
|
1039
|
+
required: import("@scalar/typebox").TOptional<import("@scalar/typebox").TArray<import("@scalar/typebox").TString>>;
|
|
1040
|
+
/** Object property definitions. */
|
|
1041
|
+
properties: import("@scalar/typebox").TOptional<import("@scalar/typebox").TRecord<import("@scalar/typebox").TString, import("@scalar/typebox").TUnion<[import("@scalar/typebox").TRef<"SchemaObject">, import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TObject<{
|
|
1042
|
+
$ref: import("@scalar/typebox").TString;
|
|
1043
|
+
summary: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
1044
|
+
description: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
1045
|
+
}>, import("@scalar/typebox").TObject<{
|
|
1046
|
+
$status: import("@scalar/typebox").TOptional<import("@scalar/typebox").TUnion<[import("@scalar/typebox").TLiteral<"loading">, import("@scalar/typebox").TLiteral<"error">]>>;
|
|
1047
|
+
$global: import("@scalar/typebox").TOptional<import("@scalar/typebox").TBoolean>;
|
|
1048
|
+
}>]>, import("@scalar/typebox").TObject<{
|
|
1049
|
+
'$ref-value': import("@scalar/typebox").TUnknown;
|
|
1050
|
+
}>]>]>>>;
|
|
1051
|
+
/** Schema for additional properties. */
|
|
1052
|
+
additionalProperties: import("@scalar/typebox").TOptional<import("@scalar/typebox").TUnion<[import("@scalar/typebox").TBoolean, import("@scalar/typebox").TUnion<[import("@scalar/typebox").TRef<"SchemaObject">, import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TObject<{
|
|
1053
|
+
$ref: import("@scalar/typebox").TString;
|
|
1054
|
+
summary: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
1055
|
+
description: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
1056
|
+
}>, import("@scalar/typebox").TObject<{
|
|
1057
|
+
$status: import("@scalar/typebox").TOptional<import("@scalar/typebox").TUnion<[import("@scalar/typebox").TLiteral<"loading">, import("@scalar/typebox").TLiteral<"error">]>>;
|
|
1058
|
+
$global: import("@scalar/typebox").TOptional<import("@scalar/typebox").TBoolean>;
|
|
1059
|
+
}>]>, import("@scalar/typebox").TObject<{
|
|
1060
|
+
'$ref-value': import("@scalar/typebox").TUnknown;
|
|
1061
|
+
}>]>]>]>>;
|
|
1062
|
+
/** Properties matching regex patterns. */
|
|
1063
|
+
patternProperties: import("@scalar/typebox").TOptional<import("@scalar/typebox").TRecord<import("@scalar/typebox").TString, import("@scalar/typebox").TUnion<[import("@scalar/typebox").TRef<"SchemaObject">, import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TObject<{
|
|
1064
|
+
$ref: import("@scalar/typebox").TString;
|
|
1065
|
+
summary: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
1066
|
+
description: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
1067
|
+
}>, import("@scalar/typebox").TObject<{
|
|
1068
|
+
$status: import("@scalar/typebox").TOptional<import("@scalar/typebox").TUnion<[import("@scalar/typebox").TLiteral<"loading">, import("@scalar/typebox").TLiteral<"error">]>>;
|
|
1069
|
+
$global: import("@scalar/typebox").TOptional<import("@scalar/typebox").TBoolean>;
|
|
1070
|
+
}>]>, import("@scalar/typebox").TObject<{
|
|
1071
|
+
'$ref-value': import("@scalar/typebox").TUnknown;
|
|
1072
|
+
}>]>]>>>;
|
|
1073
|
+
/** Constraints on property names (JSON Schema propertyNames keyword). */
|
|
1074
|
+
propertyNames: import("@scalar/typebox").TOptional<import("@scalar/typebox").TUnion<[import("@scalar/typebox").TRef<"SchemaObject">, import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TObject<{
|
|
1075
|
+
$ref: import("@scalar/typebox").TString;
|
|
1076
|
+
summary: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
1077
|
+
description: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
1078
|
+
}>, import("@scalar/typebox").TObject<{
|
|
1079
|
+
$status: import("@scalar/typebox").TOptional<import("@scalar/typebox").TUnion<[import("@scalar/typebox").TLiteral<"loading">, import("@scalar/typebox").TLiteral<"error">]>>;
|
|
1080
|
+
$global: import("@scalar/typebox").TOptional<import("@scalar/typebox").TBoolean>;
|
|
1081
|
+
}>]>, import("@scalar/typebox").TObject<{
|
|
1082
|
+
'$ref-value': import("@scalar/typebox").TUnknown;
|
|
1083
|
+
}>]>]>>;
|
|
1084
|
+
}>]>, import("@scalar/typebox").TObject<{
|
|
852
1085
|
name: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
853
1086
|
/** A title for the schema. */
|
|
854
1087
|
title: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
@@ -963,7 +1196,7 @@ export declare const SchemaObjectSchemaDefinition: import("@scalar/typebox").TUn
|
|
|
963
1196
|
}>, import("@scalar/typebox").TObject<{
|
|
964
1197
|
'x-tags': import("@scalar/typebox").TOptional<import("@scalar/typebox").TArray<import("@scalar/typebox").TString>>;
|
|
965
1198
|
}>]>]>]>;
|
|
966
|
-
export type SchemaObject = _InternalType | OtherTypes | NumericObject | StringObject | ObjectObject | ArrayObject;
|
|
1199
|
+
export type SchemaObject = _InternalType | OtherTypes | MultiTypeObject | NumericObject | StringObject | ObjectObject | ArrayObject;
|
|
967
1200
|
export type MaybeRefSchemaObject = SchemaReferenceType<SchemaObject>;
|
|
968
1201
|
export {};
|
|
969
1202
|
//# sourceMappingURL=schema.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../src/schemas/v3.1/strict/schema.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,SAAS,EAAmB,MAAM,0CAA0C,CAAA;AAC1F,OAAO,EAAE,KAAK,aAAa,EAAuB,MAAM,+CAA+C,CAAA;AACvG,OAAO,EAAE,KAAK,KAAK,EAAe,MAAM,sCAAsC,CAAA;AAC9E,OAAO,EACL,KAAK,yBAAyB,EAE/B,MAAM,0DAA0D,CAAA;AACjE,OAAO,EAAE,KAAK,iBAAiB,EAA2B,MAAM,iDAAiD,CAAA;AACjH,OAAO,EAAE,KAAK,aAAa,EAAuB,MAAM,6CAA6C,CAAA;AACrG,OAAO,EAAE,KAAK,SAAS,EAAmB,MAAM,wCAAwC,CAAA;AACxF,OAAO,EAAE,KAAK,MAAM,EAAgB,MAAM,qCAAqC,CAAA;AAC/E,OAAO,EAAE,KAAK,SAAS,EAAmB,MAAM,wC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,UAAU,GACV,eAAe,GACf,aAAa,GACb,YAAY,GACZ,YAAY,GACZ,WAAW,CAAA;AACf,MAAM,MAAM,oBAAoB,GAAG,mBAAmB,CAAC,YAAY,CAAC,CAAA"}
|
|
@@ -15,27 +15,22 @@ const schemaOrReference = Type.Union([
|
|
|
15
15
|
SchemaObjectRef,
|
|
16
16
|
compose(ReferenceObjectSchema, Type.Object({ '$ref-value': Type.Unknown() })),
|
|
17
17
|
]);
|
|
18
|
+
const PrimitiveSchemaTypeSchema = Type.Union([
|
|
19
|
+
Type.Literal('null'),
|
|
20
|
+
Type.Literal('boolean'),
|
|
21
|
+
Type.Literal('string'),
|
|
22
|
+
Type.Literal('number'),
|
|
23
|
+
Type.Literal('integer'),
|
|
24
|
+
Type.Literal('object'),
|
|
25
|
+
Type.Literal('array'),
|
|
26
|
+
]);
|
|
18
27
|
/**
|
|
19
28
|
* Primitive types that don't have additional validation properties.
|
|
20
|
-
* These types (null, boolean
|
|
29
|
+
* These types (null, boolean) can be used
|
|
21
30
|
* without additional validation constraints.
|
|
22
|
-
*
|
|
23
|
-
* TODO: Type array will actually validate against every union type but we can cross that bridge when we come to it
|
|
24
31
|
*/
|
|
25
32
|
const OtherTypes = Type.Object({
|
|
26
|
-
type: Type.Union([
|
|
27
|
-
Type.Literal('null'),
|
|
28
|
-
Type.Literal('boolean'),
|
|
29
|
-
Type.Array(Type.Union([
|
|
30
|
-
Type.Literal('null'),
|
|
31
|
-
Type.Literal('boolean'),
|
|
32
|
-
Type.Literal('string'),
|
|
33
|
-
Type.Literal('number'),
|
|
34
|
-
Type.Literal('integer'),
|
|
35
|
-
Type.Literal('object'),
|
|
36
|
-
Type.Literal('array'),
|
|
37
|
-
])),
|
|
38
|
-
]),
|
|
33
|
+
type: Type.Union([Type.Literal('null'), Type.Literal('boolean')]),
|
|
39
34
|
});
|
|
40
35
|
const Extensions = compose(XScalarIgnoreSchema, XInternalSchema, XVariableSchema, XExamplesSchema, XEnumDescriptionsSchema, XEnumVarNamesSchema, XAdditionalPropertiesNameSchema, XOrderSchema, XTagsSchema);
|
|
41
36
|
const CorePropertiesWithSchema = Type.Object({
|
|
@@ -91,10 +86,7 @@ const CorePropertiesWithSchema = Type.Object({
|
|
|
91
86
|
/**
|
|
92
87
|
* Numeric validation properties for number and integer types.
|
|
93
88
|
*/
|
|
94
|
-
const
|
|
95
|
-
type: Type.Union([Type.Literal('number'), Type.Literal('integer')]),
|
|
96
|
-
/** Different subtypes */
|
|
97
|
-
format: Type.Optional(Type.String()),
|
|
89
|
+
const NumericValidationKeywords = Type.Object({
|
|
98
90
|
/** Number must be a multiple of this value. */
|
|
99
91
|
multipleOf: Type.Optional(Type.Number()),
|
|
100
92
|
/** Maximum value (inclusive). */
|
|
@@ -106,13 +98,15 @@ const NumericProperties = Type.Object({
|
|
|
106
98
|
/** Minimum value (exclusive). */
|
|
107
99
|
exclusiveMinimum: Type.Optional(Type.Number({ minimum: 0 })),
|
|
108
100
|
});
|
|
101
|
+
const NumericProperties = compose(Type.Object({
|
|
102
|
+
type: Type.Union([Type.Literal('number'), Type.Literal('integer')]),
|
|
103
|
+
/** Different subtypes */
|
|
104
|
+
format: Type.Optional(Type.String()),
|
|
105
|
+
}), NumericValidationKeywords);
|
|
109
106
|
/**
|
|
110
107
|
* String validation properties for string types.
|
|
111
108
|
*/
|
|
112
|
-
const
|
|
113
|
-
type: Type.Literal('string'),
|
|
114
|
-
/** Different subtypes - allow any arbitrary string, this negates the purpose of having a union of formats so we type it in typescript instead */
|
|
115
|
-
format: Type.Optional(Type.String()),
|
|
109
|
+
const StringValidationKeywords = Type.Object({
|
|
116
110
|
/** Maximum string length. */
|
|
117
111
|
maxLength: Type.Optional(Type.Integer({ minimum: 0 })),
|
|
118
112
|
/** Minimum string length. */
|
|
@@ -120,8 +114,12 @@ const StringValidationProperties = Type.Object({
|
|
|
120
114
|
/** Regular expression pattern. */
|
|
121
115
|
pattern: Type.Optional(Type.String()),
|
|
122
116
|
});
|
|
123
|
-
const
|
|
124
|
-
type: Type.Literal('
|
|
117
|
+
const StringValidationProperties = compose(Type.Object({
|
|
118
|
+
type: Type.Literal('string'),
|
|
119
|
+
/** Different subtypes - allow any arbitrary string, this negates the purpose of having a union of formats so we type it in typescript instead */
|
|
120
|
+
format: Type.Optional(Type.String()),
|
|
121
|
+
}), StringValidationKeywords);
|
|
122
|
+
const ArrayValidationKeywordsWithSchema = Type.Object({
|
|
125
123
|
/** Maximum number of items in array. */
|
|
126
124
|
maxItems: Type.Optional(Type.Integer({ minimum: 0 })),
|
|
127
125
|
/** Minimum number of items in array. */
|
|
@@ -133,8 +131,10 @@ const ArrayValidationPropertiesWithSchema = Type.Object({
|
|
|
133
131
|
/** Schema for tuple validation. */
|
|
134
132
|
prefixItems: Type.Optional(Type.Array(schemaOrReference)),
|
|
135
133
|
});
|
|
136
|
-
const
|
|
137
|
-
type: Type.Literal('
|
|
134
|
+
const ArrayValidationPropertiesWithSchema = compose(Type.Object({
|
|
135
|
+
type: Type.Literal('array'),
|
|
136
|
+
}), ArrayValidationKeywordsWithSchema);
|
|
137
|
+
const ObjectValidationKeywordsWithSchema = Type.Object({
|
|
138
138
|
/** Maximum number of properties. */
|
|
139
139
|
maxProperties: Type.Optional(Type.Integer({ minimum: 0 })),
|
|
140
140
|
/** Minimum number of properties. */
|
|
@@ -150,6 +150,14 @@ const ObjectValidationPropertiesWithSchema = Type.Object({
|
|
|
150
150
|
/** Constraints on property names (JSON Schema propertyNames keyword). */
|
|
151
151
|
propertyNames: Type.Optional(schemaOrReference),
|
|
152
152
|
});
|
|
153
|
+
const ObjectValidationPropertiesWithSchema = compose(Type.Object({
|
|
154
|
+
type: Type.Literal('object'),
|
|
155
|
+
}), ObjectValidationKeywordsWithSchema);
|
|
156
|
+
const MultiTypeValidationPropertiesWithSchema = compose(Type.Object({
|
|
157
|
+
type: Type.Array(PrimitiveSchemaTypeSchema),
|
|
158
|
+
/** Different subtypes - allow any arbitrary string, this negates the purpose of having a union of formats so we type it in typescript instead */
|
|
159
|
+
format: Type.Optional(Type.String()),
|
|
160
|
+
}), NumericValidationKeywords, StringValidationKeywords, ArrayValidationKeywordsWithSchema, ObjectValidationKeywordsWithSchema);
|
|
153
161
|
/** Builds the recursive schema schema */
|
|
154
162
|
export const SchemaObjectSchemaDefinition = Type.Union([
|
|
155
163
|
// Keep compositions first so they get priority when union is evaluated
|
|
@@ -162,4 +170,5 @@ export const SchemaObjectSchemaDefinition = Type.Union([
|
|
|
162
170
|
compose(StringValidationProperties, CorePropertiesWithSchema, Extensions),
|
|
163
171
|
compose(ObjectValidationPropertiesWithSchema, CorePropertiesWithSchema, Extensions),
|
|
164
172
|
compose(ArrayValidationPropertiesWithSchema, CorePropertiesWithSchema, Extensions),
|
|
173
|
+
compose(MultiTypeValidationPropertiesWithSchema, CorePropertiesWithSchema, Extensions),
|
|
165
174
|
]);
|
package/package.json
CHANGED
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"openapi",
|
|
17
17
|
"scalar"
|
|
18
18
|
],
|
|
19
|
-
"version": "0.
|
|
19
|
+
"version": "0.53.0",
|
|
20
20
|
"engines": {
|
|
21
21
|
"node": ">=22"
|
|
22
22
|
},
|
|
@@ -148,13 +148,13 @@
|
|
|
148
148
|
"type-fest": "^5.3.1",
|
|
149
149
|
"vue": "^3.5.30",
|
|
150
150
|
"yaml": "^2.8.3",
|
|
151
|
-
"@scalar/
|
|
152
|
-
"@scalar/
|
|
153
|
-
"@scalar/
|
|
154
|
-
"@scalar/
|
|
151
|
+
"@scalar/openapi-upgrader": "0.2.9",
|
|
152
|
+
"@scalar/helpers": "0.8.1",
|
|
153
|
+
"@scalar/schemas": "0.3.3",
|
|
154
|
+
"@scalar/snippetz": "0.9.12",
|
|
155
|
+
"@scalar/types": "0.12.3",
|
|
155
156
|
"@scalar/validation": "0.6.0",
|
|
156
|
-
"@scalar/
|
|
157
|
-
"@scalar/snippetz": "0.9.11"
|
|
157
|
+
"@scalar/json-magic": "0.12.15"
|
|
158
158
|
},
|
|
159
159
|
"devDependencies": {
|
|
160
160
|
"@google-cloud/storage": "7.16.0",
|