@scalar/workspace-store 0.51.2 → 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 +30 -0
- package/dist/channel-example/build-connection-url.d.ts +42 -0
- package/dist/channel-example/build-connection-url.d.ts.map +1 -0
- package/dist/channel-example/build-connection-url.js +184 -0
- 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 +20 -0
- package/dist/channel-example/index.d.ts.map +1 -0
- package/dist/channel-example/index.js +11 -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 +36 -0
- package/dist/channel-example/servers.d.ts.map +1 -0
- package/dist/channel-example/servers.js +77 -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 +1266 -81
- package/dist/entities/auth/schema.d.ts.map +1 -1
- package/dist/events/definitions/log.d.ts +6 -0
- package/dist/events/definitions/log.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/request-example/builder/helpers/get-example-from-schema.d.ts.map +1 -1
- package/dist/request-example/builder/helpers/get-example-from-schema.js +33 -2
- package/dist/schemas/extensions/schema/x-order.d.ts +22 -0
- package/dist/schemas/extensions/schema/x-order.d.ts.map +1 -0
- package/dist/schemas/extensions/schema/x-order.js +17 -0
- package/dist/schemas/extensions/server/x-scalar-selected-server.d.ts +4 -1
- package/dist/schemas/extensions/server/x-scalar-selected-server.d.ts.map +1 -1
- package/dist/schemas/extensions/server/x-scalar-selected-server.js +4 -2
- 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 +245 -8
- package/dist/schemas/reference-config/index.d.ts.map +1 -1
- package/dist/schemas/reference-config/settings.d.ts +245 -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 +61 -17
- package/dist/schemas/v3.1/strict/openapi-document.d.ts +9731 -1436
- 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 +275 -27
- package/dist/schemas/v3.1/strict/schema.d.ts.map +1 -1
- package/dist/schemas/v3.1/strict/schema.js +39 -29
- package/package.json +12 -7
|
@@ -7,6 +7,7 @@ import { XAdditionalPropertiesNameSchema, } from '../../../schemas/extensions/sc
|
|
|
7
7
|
import { XEnumDescriptionsSchema } from '../../../schemas/extensions/schema/x-enum-descriptions.js';
|
|
8
8
|
import { XEnumVarNamesSchema } from '../../../schemas/extensions/schema/x-enum-varnames.js';
|
|
9
9
|
import { XExamplesSchema } from '../../../schemas/extensions/schema/x-examples.js';
|
|
10
|
+
import { XOrderSchema } from '../../../schemas/extensions/schema/x-order.js';
|
|
10
11
|
import { XVariableSchema } from '../../../schemas/extensions/schema/x-variable.js';
|
|
11
12
|
import { DiscriminatorObjectRef, ExternalDocumentationObjectRef, SchemaObjectRef, XMLObjectRef, } from './ref-definitions.js';
|
|
12
13
|
import { ReferenceObjectSchema } from './reference.js';
|
|
@@ -14,29 +15,24 @@ const schemaOrReference = Type.Union([
|
|
|
14
15
|
SchemaObjectRef,
|
|
15
16
|
compose(ReferenceObjectSchema, Type.Object({ '$ref-value': Type.Unknown() })),
|
|
16
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
|
+
]);
|
|
17
27
|
/**
|
|
18
28
|
* Primitive types that don't have additional validation properties.
|
|
19
|
-
* These types (null, boolean
|
|
29
|
+
* These types (null, boolean) can be used
|
|
20
30
|
* without additional validation constraints.
|
|
21
|
-
*
|
|
22
|
-
* TODO: Type array will actually validate against every union type but we can cross that bridge when we come to it
|
|
23
31
|
*/
|
|
24
32
|
const OtherTypes = Type.Object({
|
|
25
|
-
type: Type.Union([
|
|
26
|
-
Type.Literal('null'),
|
|
27
|
-
Type.Literal('boolean'),
|
|
28
|
-
Type.Array(Type.Union([
|
|
29
|
-
Type.Literal('null'),
|
|
30
|
-
Type.Literal('boolean'),
|
|
31
|
-
Type.Literal('string'),
|
|
32
|
-
Type.Literal('number'),
|
|
33
|
-
Type.Literal('integer'),
|
|
34
|
-
Type.Literal('object'),
|
|
35
|
-
Type.Literal('array'),
|
|
36
|
-
])),
|
|
37
|
-
]),
|
|
33
|
+
type: Type.Union([Type.Literal('null'), Type.Literal('boolean')]),
|
|
38
34
|
});
|
|
39
|
-
const Extensions = compose(XScalarIgnoreSchema, XInternalSchema, XVariableSchema, XExamplesSchema, XEnumDescriptionsSchema, XEnumVarNamesSchema, XAdditionalPropertiesNameSchema, XTagsSchema);
|
|
35
|
+
const Extensions = compose(XScalarIgnoreSchema, XInternalSchema, XVariableSchema, XExamplesSchema, XEnumDescriptionsSchema, XEnumVarNamesSchema, XAdditionalPropertiesNameSchema, XOrderSchema, XTagsSchema);
|
|
40
36
|
const CorePropertiesWithSchema = Type.Object({
|
|
41
37
|
name: Type.Optional(Type.String()),
|
|
42
38
|
/** A title for the schema. */
|
|
@@ -90,10 +86,7 @@ const CorePropertiesWithSchema = Type.Object({
|
|
|
90
86
|
/**
|
|
91
87
|
* Numeric validation properties for number and integer types.
|
|
92
88
|
*/
|
|
93
|
-
const
|
|
94
|
-
type: Type.Union([Type.Literal('number'), Type.Literal('integer')]),
|
|
95
|
-
/** Different subtypes */
|
|
96
|
-
format: Type.Optional(Type.String()),
|
|
89
|
+
const NumericValidationKeywords = Type.Object({
|
|
97
90
|
/** Number must be a multiple of this value. */
|
|
98
91
|
multipleOf: Type.Optional(Type.Number()),
|
|
99
92
|
/** Maximum value (inclusive). */
|
|
@@ -105,13 +98,15 @@ const NumericProperties = Type.Object({
|
|
|
105
98
|
/** Minimum value (exclusive). */
|
|
106
99
|
exclusiveMinimum: Type.Optional(Type.Number({ minimum: 0 })),
|
|
107
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);
|
|
108
106
|
/**
|
|
109
107
|
* String validation properties for string types.
|
|
110
108
|
*/
|
|
111
|
-
const
|
|
112
|
-
type: Type.Literal('string'),
|
|
113
|
-
/** Different subtypes - allow any arbitrary string, this negates the purpose of having a union of formats so we type it in typescript instead */
|
|
114
|
-
format: Type.Optional(Type.String()),
|
|
109
|
+
const StringValidationKeywords = Type.Object({
|
|
115
110
|
/** Maximum string length. */
|
|
116
111
|
maxLength: Type.Optional(Type.Integer({ minimum: 0 })),
|
|
117
112
|
/** Minimum string length. */
|
|
@@ -119,8 +114,12 @@ const StringValidationProperties = Type.Object({
|
|
|
119
114
|
/** Regular expression pattern. */
|
|
120
115
|
pattern: Type.Optional(Type.String()),
|
|
121
116
|
});
|
|
122
|
-
const
|
|
123
|
-
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({
|
|
124
123
|
/** Maximum number of items in array. */
|
|
125
124
|
maxItems: Type.Optional(Type.Integer({ minimum: 0 })),
|
|
126
125
|
/** Minimum number of items in array. */
|
|
@@ -132,8 +131,10 @@ const ArrayValidationPropertiesWithSchema = Type.Object({
|
|
|
132
131
|
/** Schema for tuple validation. */
|
|
133
132
|
prefixItems: Type.Optional(Type.Array(schemaOrReference)),
|
|
134
133
|
});
|
|
135
|
-
const
|
|
136
|
-
type: Type.Literal('
|
|
134
|
+
const ArrayValidationPropertiesWithSchema = compose(Type.Object({
|
|
135
|
+
type: Type.Literal('array'),
|
|
136
|
+
}), ArrayValidationKeywordsWithSchema);
|
|
137
|
+
const ObjectValidationKeywordsWithSchema = Type.Object({
|
|
137
138
|
/** Maximum number of properties. */
|
|
138
139
|
maxProperties: Type.Optional(Type.Integer({ minimum: 0 })),
|
|
139
140
|
/** Minimum number of properties. */
|
|
@@ -149,6 +150,14 @@ const ObjectValidationPropertiesWithSchema = Type.Object({
|
|
|
149
150
|
/** Constraints on property names (JSON Schema propertyNames keyword). */
|
|
150
151
|
propertyNames: Type.Optional(schemaOrReference),
|
|
151
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);
|
|
152
161
|
/** Builds the recursive schema schema */
|
|
153
162
|
export const SchemaObjectSchemaDefinition = Type.Union([
|
|
154
163
|
// Keep compositions first so they get priority when union is evaluated
|
|
@@ -161,4 +170,5 @@ export const SchemaObjectSchemaDefinition = Type.Union([
|
|
|
161
170
|
compose(StringValidationProperties, CorePropertiesWithSchema, Extensions),
|
|
162
171
|
compose(ObjectValidationPropertiesWithSchema, CorePropertiesWithSchema, Extensions),
|
|
163
172
|
compose(ArrayValidationPropertiesWithSchema, CorePropertiesWithSchema, Extensions),
|
|
173
|
+
compose(MultiTypeValidationPropertiesWithSchema, CorePropertiesWithSchema, Extensions),
|
|
164
174
|
]);
|
package/package.json
CHANGED
|
@@ -16,12 +16,17 @@
|
|
|
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
|
},
|
|
23
23
|
"type": "module",
|
|
24
24
|
"exports": {
|
|
25
|
+
"./channel-example": {
|
|
26
|
+
"import": "./dist/channel-example/index.js",
|
|
27
|
+
"types": "./dist/channel-example/index.d.ts",
|
|
28
|
+
"default": "./dist/channel-example/index.js"
|
|
29
|
+
},
|
|
25
30
|
"./client": {
|
|
26
31
|
"import": "./dist/client.js",
|
|
27
32
|
"types": "./dist/client.d.ts",
|
|
@@ -143,13 +148,13 @@
|
|
|
143
148
|
"type-fest": "^5.3.1",
|
|
144
149
|
"vue": "^3.5.30",
|
|
145
150
|
"yaml": "^2.8.3",
|
|
146
|
-
"@scalar/openapi-upgrader": "0.2.
|
|
147
|
-
"@scalar/
|
|
148
|
-
"@scalar/
|
|
149
|
-
"@scalar/snippetz": "0.9.
|
|
150
|
-
"@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",
|
|
151
156
|
"@scalar/validation": "0.6.0",
|
|
152
|
-
"@scalar/
|
|
157
|
+
"@scalar/json-magic": "0.12.15"
|
|
153
158
|
},
|
|
154
159
|
"devDependencies": {
|
|
155
160
|
"@google-cloud/storage": "7.16.0",
|