@scalar/workspace-store 0.56.1 → 0.57.1
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 +12 -0
- package/dist/entities/auth/schema.d.ts +220 -20
- package/dist/entities/auth/schema.d.ts.map +1 -1
- package/dist/schemas/reference-config/index.d.ts +28 -4
- package/dist/schemas/reference-config/index.d.ts.map +1 -1
- package/dist/schemas/reference-config/settings.d.ts +28 -4
- package/dist/schemas/reference-config/settings.d.ts.map +1 -1
- package/dist/schemas/v3.1/strict/oauth-flow.d.ts +19 -1
- package/dist/schemas/v3.1/strict/oauth-flow.d.ts.map +1 -1
- package/dist/schemas/v3.1/strict/oauth-flow.js +6 -1
- package/dist/schemas/v3.1/strict/oauthflows.d.ts +16 -0
- package/dist/schemas/v3.1/strict/oauthflows.d.ts.map +1 -1
- package/dist/schemas/v3.1/strict/openapi-document.d.ts +980 -140
- package/dist/schemas/v3.1/strict/openapi-document.d.ts.map +1 -1
- package/dist/schemas/v3.1/strict/security-scheme.d.ts +14 -5
- package/dist/schemas/v3.1/strict/security-scheme.d.ts.map +1 -1
- package/dist/schemas/v3.1/strict/security-scheme.js +5 -2
- package/dist/schemas/v3.2/openapi/index.d.ts +144 -0
- package/dist/schemas/v3.2/openapi/index.d.ts.map +1 -0
- package/dist/schemas/v3.2/openapi/index.js +713 -0
- package/dist/schemas/v3.2/openapi/reference.d.ts +4 -0
- package/dist/schemas/v3.2/openapi/reference.d.ts.map +1 -0
- package/dist/schemas/v3.2/openapi/reference.js +29 -0
- package/dist/schemas/v3.2/strict/callback.d.ts +15 -0
- package/dist/schemas/v3.2/strict/callback.d.ts.map +1 -0
- package/dist/schemas/v3.2/strict/callback.js +6 -0
- package/dist/schemas/v3.2/strict/components.d.ts +173 -0
- package/dist/schemas/v3.2/strict/components.d.ts.map +1 -0
- package/dist/schemas/v3.2/strict/components.js +29 -0
- package/dist/schemas/v3.2/strict/contact.d.ts +19 -0
- package/dist/schemas/v3.2/strict/contact.d.ts.map +1 -0
- package/dist/schemas/v3.2/strict/contact.js +10 -0
- package/dist/schemas/v3.2/strict/discriminator.d.ts +27 -0
- package/dist/schemas/v3.2/strict/discriminator.d.ts.map +1 -0
- package/dist/schemas/v3.2/strict/discriminator.js +14 -0
- package/dist/schemas/v3.2/strict/encoding.d.ts +62 -0
- package/dist/schemas/v3.2/strict/encoding.d.ts.map +1 -0
- package/dist/schemas/v3.2/strict/encoding.js +33 -0
- package/dist/schemas/v3.2/strict/example.d.ts +50 -0
- package/dist/schemas/v3.2/strict/example.d.ts.map +1 -0
- package/dist/schemas/v3.2/strict/example.js +22 -0
- package/dist/schemas/v3.2/strict/external-documentation.d.ts +15 -0
- package/dist/schemas/v3.2/strict/external-documentation.d.ts.map +1 -0
- package/dist/schemas/v3.2/strict/external-documentation.js +8 -0
- package/dist/schemas/v3.2/strict/header.d.ts +97 -0
- package/dist/schemas/v3.2/strict/header.d.ts.map +1 -0
- package/dist/schemas/v3.2/strict/header.js +39 -0
- package/dist/schemas/v3.2/strict/info.d.ts +54 -0
- package/dist/schemas/v3.2/strict/info.d.ts.map +1 -0
- package/dist/schemas/v3.2/strict/info.js +24 -0
- package/dist/schemas/v3.2/strict/license.d.ts +19 -0
- package/dist/schemas/v3.2/strict/license.d.ts.map +1 -0
- package/dist/schemas/v3.2/strict/license.js +10 -0
- package/dist/schemas/v3.2/strict/link.d.ts +44 -0
- package/dist/schemas/v3.2/strict/link.d.ts.map +1 -0
- package/dist/schemas/v3.2/strict/link.js +23 -0
- package/dist/schemas/v3.2/strict/media-type.d.ts +78 -0
- package/dist/schemas/v3.2/strict/media-type.d.ts.map +1 -0
- package/dist/schemas/v3.2/strict/media-type.js +26 -0
- package/dist/schemas/v3.2/strict/oauth-flow.d.ts +159 -0
- package/dist/schemas/v3.2/strict/oauth-flow.d.ts.map +1 -0
- package/dist/schemas/v3.2/strict/oauth-flow.js +44 -0
- package/dist/schemas/v3.2/strict/oauthflows.d.ts +116 -0
- package/dist/schemas/v3.2/strict/oauthflows.d.ts.map +1 -0
- package/dist/schemas/v3.2/strict/oauthflows.js +17 -0
- package/dist/schemas/v3.2/strict/openapi-document.d.ts +64576 -0
- package/dist/schemas/v3.2/strict/openapi-document.d.ts.map +1 -0
- package/dist/schemas/v3.2/strict/openapi-document.js +154 -0
- package/dist/schemas/v3.2/strict/operation.d.ts +165 -0
- package/dist/schemas/v3.2/strict/operation.d.ts.map +1 -0
- package/dist/schemas/v3.2/strict/operation.js +40 -0
- package/dist/schemas/v3.2/strict/parameter.d.ts +142 -0
- package/dist/schemas/v3.2/strict/parameter.d.ts.map +1 -0
- package/dist/schemas/v3.2/strict/parameter.js +58 -0
- package/dist/schemas/v3.2/strict/path-item.d.ts +189 -0
- package/dist/schemas/v3.2/strict/path-item.d.ts.map +1 -0
- package/dist/schemas/v3.2/strict/path-item.js +41 -0
- package/dist/schemas/v3.2/strict/paths.d.ts +20 -0
- package/dist/schemas/v3.2/strict/paths.d.ts.map +1 -0
- package/dist/schemas/v3.2/strict/paths.js +9 -0
- package/dist/schemas/v3.2/strict/ref-definitions.d.ts +76 -0
- package/dist/schemas/v3.2/strict/ref-definitions.d.ts.map +1 -0
- package/dist/schemas/v3.2/strict/ref-definitions.js +80 -0
- package/dist/schemas/v3.2/strict/reference.d.ts +63 -0
- package/dist/schemas/v3.2/strict/reference.d.ts.map +1 -0
- package/dist/schemas/v3.2/strict/reference.js +23 -0
- package/dist/schemas/v3.2/strict/request-body.d.ts +23 -0
- package/dist/schemas/v3.2/strict/request-body.d.ts.map +1 -0
- package/dist/schemas/v3.2/strict/request-body.js +13 -0
- package/dist/schemas/v3.2/strict/response.d.ts +50 -0
- package/dist/schemas/v3.2/strict/response.d.ts.map +1 -0
- package/dist/schemas/v3.2/strict/response.js +15 -0
- package/dist/schemas/v3.2/strict/responses.d.ts +32 -0
- package/dist/schemas/v3.2/strict/responses.d.ts.map +1 -0
- package/dist/schemas/v3.2/strict/responses.js +13 -0
- package/dist/schemas/v3.2/strict/schema.d.ts +1330 -0
- package/dist/schemas/v3.2/strict/schema.d.ts.map +1 -0
- package/dist/schemas/v3.2/strict/schema.js +205 -0
- package/dist/schemas/v3.2/strict/security-requirement.d.ts +23 -0
- package/dist/schemas/v3.2/strict/security-requirement.d.ts.map +1 -0
- package/dist/schemas/v3.2/strict/security-requirement.js +13 -0
- package/dist/schemas/v3.2/strict/security-scheme.d.ts +95 -0
- package/dist/schemas/v3.2/strict/security-scheme.d.ts.map +1 -0
- package/dist/schemas/v3.2/strict/security-scheme.js +46 -0
- package/dist/schemas/v3.2/strict/server-variable.d.ts +19 -0
- package/dist/schemas/v3.2/strict/server-variable.d.ts.map +1 -0
- package/dist/schemas/v3.2/strict/server-variable.js +10 -0
- package/dist/schemas/v3.2/strict/server.d.ts +24 -0
- package/dist/schemas/v3.2/strict/server.d.ts.map +1 -0
- package/dist/schemas/v3.2/strict/server.js +13 -0
- package/dist/schemas/v3.2/strict/tag.d.ts +44 -0
- package/dist/schemas/v3.2/strict/tag.d.ts.map +1 -0
- package/dist/schemas/v3.2/strict/tag.js +22 -0
- package/dist/schemas/v3.2/strict/type-guards.d.ts +24 -0
- package/dist/schemas/v3.2/strict/type-guards.d.ts.map +1 -0
- package/dist/schemas/v3.2/strict/type-guards.js +25 -0
- package/dist/schemas/v3.2/strict/xml.d.ts +39 -0
- package/dist/schemas/v3.2/strict/xml.d.ts.map +1 -0
- package/dist/schemas/v3.2/strict/xml.js +26 -0
- package/package.json +5 -5
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export const isObjectSchema = (schema) => {
|
|
2
|
+
return ('type' in schema && (schema.type === 'object' || (Array.isArray(schema.type) && schema.type.includes('object'))));
|
|
3
|
+
};
|
|
4
|
+
export const isArraySchema = (schema) => {
|
|
5
|
+
return 'type' in schema && (schema.type === 'array' || (Array.isArray(schema.type) && schema.type.includes('array')));
|
|
6
|
+
};
|
|
7
|
+
export const isStringSchema = (schema) => {
|
|
8
|
+
return ('type' in schema && (schema.type === 'string' || (Array.isArray(schema.type) && schema.type.includes('string'))));
|
|
9
|
+
};
|
|
10
|
+
export const isNumberSchema = (schema) => {
|
|
11
|
+
return ('type' in schema &&
|
|
12
|
+
(schema.type === 'number' ||
|
|
13
|
+
schema.type === 'integer' ||
|
|
14
|
+
(Array.isArray(schema.type) && schema.type.includes('number')) ||
|
|
15
|
+
(Array.isArray(schema.type) && schema.type.includes('integer'))));
|
|
16
|
+
};
|
|
17
|
+
/** Special type guard to remove our internal type */
|
|
18
|
+
export const isSchema = (schema) => schema !== undefined && 'type' in schema;
|
|
19
|
+
/**
|
|
20
|
+
* Type guard to check if the given parameter is a ParameterWithContentObject,
|
|
21
|
+
* i.e., it has a 'content' property defined.
|
|
22
|
+
*/
|
|
23
|
+
export const isContentTypeParameterObject = (parameter) => {
|
|
24
|
+
return 'content' in parameter && parameter.content !== undefined;
|
|
25
|
+
};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A metadata object that allows for more fine-tuned XML model definitions.
|
|
3
|
+
*
|
|
4
|
+
* When using arrays, XML element names are not inferred (for singular/plural forms) and the name field SHOULD be used to add that information. See examples for expected behavior.
|
|
5
|
+
*/
|
|
6
|
+
export declare const XMLObjectSchemaDefinition: import("@scalar/typebox").TObject<{
|
|
7
|
+
/** Replaces the name of the element/attribute used for the described schema property. When defined within items, it will affect the name of the individual XML elements within the list. When defined alongside type being "array" (outside the items), it will affect the wrapping element if and only if wrapped is true. If wrapped is false, it will be ignored. */
|
|
8
|
+
name: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
9
|
+
/** The URI of the namespace definition. Value MUST be in the form of a non-relative URI. */
|
|
10
|
+
namespace: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
11
|
+
/** The prefix to be used for the name. */
|
|
12
|
+
prefix: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
13
|
+
/** Declares whether the property definition translates to an attribute instead of an element. Default value is false. */
|
|
14
|
+
attribute: import("@scalar/typebox").TOptional<import("@scalar/typebox").TBoolean>;
|
|
15
|
+
/** MAY be used only for an array definition. Signifies whether the array is wrapped (for example, <books><book/><book/></books>) or unwrapped (<book/><book/>). Default value is false. The definition takes effect only when defined alongside type being "array" (outside the items). */
|
|
16
|
+
wrapped: import("@scalar/typebox").TOptional<import("@scalar/typebox").TBoolean>;
|
|
17
|
+
/** Declares the type of XML node used to represent the described schema. Valid values are "element", "attribute", "text", "cdata", and "none". Added in OpenAPI 3.2. */
|
|
18
|
+
nodeType: import("@scalar/typebox").TOptional<import("@scalar/typebox").TUnion<[import("@scalar/typebox").TLiteral<"element">, import("@scalar/typebox").TLiteral<"attribute">, import("@scalar/typebox").TLiteral<"text">, import("@scalar/typebox").TLiteral<"cdata">, import("@scalar/typebox").TLiteral<"none">]>>;
|
|
19
|
+
}>;
|
|
20
|
+
/**
|
|
21
|
+
* A metadata object that allows for more fine-tuned XML model definitions.
|
|
22
|
+
*
|
|
23
|
+
* When using arrays, XML element names are not inferred (for singular/plural forms) and the name field SHOULD be used to add that information. See examples for expected behavior.
|
|
24
|
+
*/
|
|
25
|
+
export type XMLObject = {
|
|
26
|
+
/** Replaces the name of the element/attribute used for the described schema property. When defined within items, it will affect the name of the individual XML elements within the list. When defined alongside type being "array" (outside the items), it will affect the wrapping element if and only if wrapped is true. If wrapped is false, it will be ignored. */
|
|
27
|
+
name?: string;
|
|
28
|
+
/** The URI of the namespace definition. Value MUST be in the form of a non-relative URI. */
|
|
29
|
+
namespace?: string;
|
|
30
|
+
/** The prefix to be used for the name. */
|
|
31
|
+
prefix?: string;
|
|
32
|
+
/** Declares whether the property definition translates to an attribute instead of an element. Default value is false. */
|
|
33
|
+
attribute?: boolean;
|
|
34
|
+
/** MAY be used only for an array definition. Signifies whether the array is wrapped (for example, <books><book/><book/></books>) or unwrapped (<book/><book/>). Default value is false. The definition takes effect only when defined alongside type being "array" (outside the items). */
|
|
35
|
+
wrapped?: boolean;
|
|
36
|
+
/** Declares the type of XML node used to represent the described schema. Valid values are "element", "attribute", "text", "cdata", and "none". Added in OpenAPI 3.2. */
|
|
37
|
+
nodeType?: 'element' | 'attribute' | 'text' | 'cdata' | 'none';
|
|
38
|
+
};
|
|
39
|
+
//# sourceMappingURL=xml.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"xml.d.ts","sourceRoot":"","sources":["../../../../src/schemas/v3.2/strict/xml.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,eAAO,MAAM,yBAAyB;IACpC,wWAAwW;;IAExW,4FAA4F;;IAE5F,0CAA0C;;IAE1C,yHAAyH;;IAEzH,2RAA2R;;IAE3R,wKAAwK;;EAUxK,CAAA;AAEF;;;;GAIG;AACH,MAAM,MAAM,SAAS,GAAG;IACtB,wWAAwW;IACxW,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,4FAA4F;IAC5F,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,0CAA0C;IAC1C,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,yHAAyH;IACzH,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,2RAA2R;IAC3R,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,wKAAwK;IACxK,QAAQ,CAAC,EAAE,SAAS,GAAG,WAAW,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,CAAA;CAC/D,CAAA"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Type } from '@scalar/typebox';
|
|
2
|
+
/**
|
|
3
|
+
* A metadata object that allows for more fine-tuned XML model definitions.
|
|
4
|
+
*
|
|
5
|
+
* When using arrays, XML element names are not inferred (for singular/plural forms) and the name field SHOULD be used to add that information. See examples for expected behavior.
|
|
6
|
+
*/
|
|
7
|
+
export const XMLObjectSchemaDefinition = Type.Object({
|
|
8
|
+
/** Replaces the name of the element/attribute used for the described schema property. When defined within items, it will affect the name of the individual XML elements within the list. When defined alongside type being "array" (outside the items), it will affect the wrapping element if and only if wrapped is true. If wrapped is false, it will be ignored. */
|
|
9
|
+
name: Type.Optional(Type.String()),
|
|
10
|
+
/** The URI of the namespace definition. Value MUST be in the form of a non-relative URI. */
|
|
11
|
+
namespace: Type.Optional(Type.String()),
|
|
12
|
+
/** The prefix to be used for the name. */
|
|
13
|
+
prefix: Type.Optional(Type.String()),
|
|
14
|
+
/** Declares whether the property definition translates to an attribute instead of an element. Default value is false. */
|
|
15
|
+
attribute: Type.Optional(Type.Boolean()),
|
|
16
|
+
/** MAY be used only for an array definition. Signifies whether the array is wrapped (for example, <books><book/><book/></books>) or unwrapped (<book/><book/>). Default value is false. The definition takes effect only when defined alongside type being "array" (outside the items). */
|
|
17
|
+
wrapped: Type.Optional(Type.Boolean()),
|
|
18
|
+
/** Declares the type of XML node used to represent the described schema. Valid values are "element", "attribute", "text", "cdata", and "none". Added in OpenAPI 3.2. */
|
|
19
|
+
nodeType: Type.Optional(Type.Union([
|
|
20
|
+
Type.Literal('element'),
|
|
21
|
+
Type.Literal('attribute'),
|
|
22
|
+
Type.Literal('text'),
|
|
23
|
+
Type.Literal('cdata'),
|
|
24
|
+
Type.Literal('none'),
|
|
25
|
+
])),
|
|
26
|
+
});
|
package/package.json
CHANGED
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"openapi",
|
|
17
17
|
"scalar"
|
|
18
18
|
],
|
|
19
|
-
"version": "0.
|
|
19
|
+
"version": "0.57.1",
|
|
20
20
|
"engines": {
|
|
21
21
|
"node": ">=22"
|
|
22
22
|
},
|
|
@@ -150,12 +150,12 @@
|
|
|
150
150
|
"yaml": "^2.9.0",
|
|
151
151
|
"@scalar/asyncapi-upgrader": "0.1.5",
|
|
152
152
|
"@scalar/helpers": "0.10.0",
|
|
153
|
-
"@scalar/json-magic": "0.12.20",
|
|
154
153
|
"@scalar/openapi-upgrader": "0.2.13",
|
|
154
|
+
"@scalar/json-magic": "0.13.0",
|
|
155
|
+
"@scalar/snippetz": "0.9.26",
|
|
155
156
|
"@scalar/schemas": "0.8.1",
|
|
156
|
-
"@scalar/
|
|
157
|
-
"@scalar/types": "0.
|
|
158
|
-
"@scalar/validation": "0.6.2"
|
|
157
|
+
"@scalar/validation": "0.6.2",
|
|
158
|
+
"@scalar/types": "0.18.0"
|
|
159
159
|
},
|
|
160
160
|
"devDependencies": {
|
|
161
161
|
"@google-cloud/storage": "7.16.0",
|