@scalar/workspace-store 0.1.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/.turbo/turbo-build.log +10 -0
- package/CHANGELOG.md +13 -0
- package/README.md +199 -0
- package/dist/create-server-workspace-store.d.ts +151 -0
- package/dist/create-server-workspace-store.d.ts.map +1 -0
- package/dist/create-server-workspace-store.js +199 -0
- package/dist/create-server-workspace-store.js.map +7 -0
- package/dist/create-workspace-store.d.ts +19773 -0
- package/dist/create-workspace-store.d.ts.map +1 -0
- package/dist/create-workspace-store.js +186 -0
- package/dist/create-workspace-store.js.map +7 -0
- package/dist/helpers/general.d.ts +88 -0
- package/dist/helpers/general.d.ts.map +1 -0
- package/dist/helpers/general.js +38 -0
- package/dist/helpers/general.js.map +7 -0
- package/dist/helpers/json-path-utils.d.ts +23 -0
- package/dist/helpers/json-path-utils.d.ts.map +1 -0
- package/dist/helpers/json-path-utils.js +16 -0
- package/dist/helpers/json-path-utils.js.map +7 -0
- package/dist/helpers/proxy.d.ts +63 -0
- package/dist/helpers/proxy.d.ts.map +1 -0
- package/dist/helpers/proxy.js +100 -0
- package/dist/helpers/proxy.js.map +7 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +13 -0
- package/dist/index.js.map +7 -0
- package/dist/schemas/callback.d.ts +1095 -0
- package/dist/schemas/callback.d.ts.map +1 -0
- package/dist/schemas/callback.js +11 -0
- package/dist/schemas/callback.js.map +7 -0
- package/dist/schemas/components.d.ts +2461 -0
- package/dist/schemas/components.d.ts.map +1 -0
- package/dist/schemas/components.js +38 -0
- package/dist/schemas/components.js.map +7 -0
- package/dist/schemas/contact.d.ts +10 -0
- package/dist/schemas/contact.d.ts.map +1 -0
- package/dist/schemas/contact.js +13 -0
- package/dist/schemas/contact.js.map +7 -0
- package/dist/schemas/discriminator.d.ts +12 -0
- package/dist/schemas/discriminator.d.ts.map +1 -0
- package/dist/schemas/discriminator.js +11 -0
- package/dist/schemas/discriminator.js.map +7 -0
- package/dist/schemas/encoding.d.ts +23 -0
- package/dist/schemas/encoding.d.ts.map +1 -0
- package/dist/schemas/encoding.js +13 -0
- package/dist/schemas/encoding.js.map +7 -0
- package/dist/schemas/example.d.ts +16 -0
- package/dist/schemas/example.d.ts.map +1 -0
- package/dist/schemas/example.js +15 -0
- package/dist/schemas/example.js.map +7 -0
- package/dist/schemas/external-documentation.d.ts +8 -0
- package/dist/schemas/external-documentation.d.ts.map +1 -0
- package/dist/schemas/external-documentation.js +11 -0
- package/dist/schemas/external-documentation.js.map +7 -0
- package/dist/schemas/header.d.ts +18 -0
- package/dist/schemas/header.d.ts.map +1 -0
- package/dist/schemas/header.js +13 -0
- package/dist/schemas/header.js.map +7 -0
- package/dist/schemas/info.d.ts +28 -0
- package/dist/schemas/info.d.ts.map +1 -0
- package/dist/schemas/info.js +23 -0
- package/dist/schemas/info.js.map +7 -0
- package/dist/schemas/license.d.ts +10 -0
- package/dist/schemas/license.d.ts.map +1 -0
- package/dist/schemas/license.js +13 -0
- package/dist/schemas/license.js.map +7 -0
- package/dist/schemas/link.d.ts +30 -0
- package/dist/schemas/link.d.ts.map +1 -0
- package/dist/schemas/link.js +20 -0
- package/dist/schemas/link.js.map +7 -0
- package/dist/schemas/media-type.d.ts +55 -0
- package/dist/schemas/media-type.d.ts.map +1 -0
- package/dist/schemas/media-type.js +19 -0
- package/dist/schemas/media-type.js.map +7 -0
- package/dist/schemas/oauth-flow.d.ts +12 -0
- package/dist/schemas/oauth-flow.d.ts.map +1 -0
- package/dist/schemas/oauth-flow.js +15 -0
- package/dist/schemas/oauth-flow.js.map +7 -0
- package/dist/schemas/oauthflows.d.ts +34 -0
- package/dist/schemas/oauthflows.d.ts.map +1 -0
- package/dist/schemas/oauthflows.js +16 -0
- package/dist/schemas/oauthflows.js.map +7 -0
- package/dist/schemas/openapi-document.d.ts +4683 -0
- package/dist/schemas/openapi-document.d.ts.map +1 -0
- package/dist/schemas/openapi-document.js +35 -0
- package/dist/schemas/openapi-document.js.map +7 -0
- package/dist/schemas/operation-without-callback.d.ts +190 -0
- package/dist/schemas/operation-without-callback.d.ts.map +1 -0
- package/dist/schemas/operation-without-callback.js +39 -0
- package/dist/schemas/operation-without-callback.js.map +7 -0
- package/dist/schemas/parameter.d.ts +25 -0
- package/dist/schemas/parameter.d.ts.map +1 -0
- package/dist/schemas/parameter.js +22 -0
- package/dist/schemas/parameter.js.map +7 -0
- package/dist/schemas/path-item.d.ts +1106 -0
- package/dist/schemas/path-item.d.ts.map +1 -0
- package/dist/schemas/path-item.js +37 -0
- package/dist/schemas/path-item.js.map +7 -0
- package/dist/schemas/paths.d.ts +1093 -0
- package/dist/schemas/paths.d.ts.map +1 -0
- package/dist/schemas/paths.js +11 -0
- package/dist/schemas/paths.js.map +7 -0
- package/dist/schemas/reference.d.ts +17 -0
- package/dist/schemas/reference.d.ts.map +1 -0
- package/dist/schemas/reference.js +15 -0
- package/dist/schemas/reference.js.map +7 -0
- package/dist/schemas/request-body.d.ts +54 -0
- package/dist/schemas/request-body.d.ts.map +1 -0
- package/dist/schemas/request-body.js +14 -0
- package/dist/schemas/request-body.js.map +7 -0
- package/dist/schemas/response.d.ts +84 -0
- package/dist/schemas/response.d.ts.map +1 -0
- package/dist/schemas/response.js +19 -0
- package/dist/schemas/response.js.map +7 -0
- package/dist/schemas/responses.d.ts +94 -0
- package/dist/schemas/responses.d.ts.map +1 -0
- package/dist/schemas/responses.js +8 -0
- package/dist/schemas/responses.js.map +7 -0
- package/dist/schemas/schema.d.ts +34 -0
- package/dist/schemas/schema.d.ts.map +1 -0
- package/dist/schemas/schema.js +22 -0
- package/dist/schemas/schema.js.map +7 -0
- package/dist/schemas/security-requirement.d.ts +11 -0
- package/dist/schemas/security-requirement.d.ts.map +1 -0
- package/dist/schemas/security-requirement.js +10 -0
- package/dist/schemas/security-requirement.js.map +7 -0
- package/dist/schemas/security-scheme.d.ts +137 -0
- package/dist/schemas/security-scheme.d.ts.map +1 -0
- package/dist/schemas/security-scheme.js +56 -0
- package/dist/schemas/security-scheme.js.map +7 -0
- package/dist/schemas/server-variable.d.ts +10 -0
- package/dist/schemas/server-variable.d.ts.map +1 -0
- package/dist/schemas/server-variable.js +13 -0
- package/dist/schemas/server-variable.js.map +7 -0
- package/dist/schemas/server-workspace.d.ts +14043 -0
- package/dist/schemas/server-workspace.d.ts.map +1 -0
- package/dist/schemas/server-workspace.js +29 -0
- package/dist/schemas/server-workspace.js.map +7 -0
- package/dist/schemas/server.d.ts +14 -0
- package/dist/schemas/server.d.ts.map +1 -0
- package/dist/schemas/server.js +14 -0
- package/dist/schemas/server.js.map +7 -0
- package/dist/schemas/tag.d.ts +13 -0
- package/dist/schemas/tag.d.ts.map +1 -0
- package/dist/schemas/tag.js +14 -0
- package/dist/schemas/tag.js.map +7 -0
- package/dist/schemas/xml.d.ts +18 -0
- package/dist/schemas/xml.d.ts.map +1 -0
- package/dist/schemas/xml.js +17 -0
- package/dist/schemas/xml.js.map +7 -0
- package/esbuild.ts +6 -0
- package/package.json +54 -0
- package/src/create-server-workspace-store.test.ts +429 -0
- package/src/create-server-workspace-store.ts +339 -0
- package/src/create-workspace-store.test.ts +488 -0
- package/src/create-workspace-store.ts +282 -0
- package/src/helpers/general.ts +115 -0
- package/src/helpers/json-path-utils.test.ts +13 -0
- package/src/helpers/json-path-utils.ts +38 -0
- package/src/helpers/proxy.test.ts +61 -0
- package/src/helpers/proxy.ts +213 -0
- package/src/index.ts +8 -0
- package/src/schemas/callback.ts +13 -0
- package/src/schemas/components.ts +36 -0
- package/src/schemas/contact.ts +11 -0
- package/src/schemas/discriminator.ts +13 -0
- package/src/schemas/encoding.ts +17 -0
- package/src/schemas/example.ts +17 -0
- package/src/schemas/external-documentation.ts +9 -0
- package/src/schemas/header.ts +19 -0
- package/src/schemas/info.ts +23 -0
- package/src/schemas/license.ts +11 -0
- package/src/schemas/link.ts +24 -0
- package/src/schemas/media-type.ts +21 -0
- package/src/schemas/oauth-flow.ts +13 -0
- package/src/schemas/oauthflows.ts +16 -0
- package/src/schemas/openapi-document.ts +34 -0
- package/src/schemas/operation-without-callback.ts +37 -0
- package/src/schemas/parameter.ts +26 -0
- package/src/schemas/path-item.ts +35 -0
- package/src/schemas/paths.ts +11 -0
- package/src/schemas/reference.ts +18 -0
- package/src/schemas/request-body.ts +12 -0
- package/src/schemas/response.ts +16 -0
- package/src/schemas/responses.ts +14 -0
- package/src/schemas/schema.ts +26 -0
- package/src/schemas/security-requirement.ts +16 -0
- package/src/schemas/security-scheme.ts +58 -0
- package/src/schemas/server-variable.ts +11 -0
- package/src/schemas/server-workspace.ts +36 -0
- package/src/schemas/server.ts +12 -0
- package/src/schemas/tag.ts +12 -0
- package/src/schemas/xml.ts +19 -0
- package/test/helpers.ts +16 -0
- package/tsconfig.build.json +12 -0
- package/tsconfig.json +8 -0
- package/vite.config.ts +9 -0
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
export declare const DescriptionSchema: import("@sinclair/typebox").TObject<{
|
|
2
|
+
/** A description for security scheme. CommonMark syntax MAY be used for rich text representation. */
|
|
3
|
+
description: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
4
|
+
}>;
|
|
5
|
+
export declare const ApiKeySchema: import("@sinclair/typebox").TIntersect<[import("@sinclair/typebox").TObject<{
|
|
6
|
+
/** A description for security scheme. CommonMark syntax MAY be used for rich text representation. */
|
|
7
|
+
description: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
8
|
+
}>, import("@sinclair/typebox").TObject<{
|
|
9
|
+
/** REQUIRED. The type of the security scheme. Valid values are "apiKey", "http", "mutualTLS", "oauth2", "openIdConnect". */
|
|
10
|
+
type: import("@sinclair/typebox").TLiteral<"apiKey">;
|
|
11
|
+
/** REQUIRED. The name of the header, query or cookie parameter to be used. */
|
|
12
|
+
name: import("@sinclair/typebox").TString;
|
|
13
|
+
/** REQUIRED. The location of the API key. Valid values are "query", "header", or "cookie". */
|
|
14
|
+
in: import("@sinclair/typebox").TString;
|
|
15
|
+
}>]>;
|
|
16
|
+
export declare const HttpSchema: import("@sinclair/typebox").TIntersect<[import("@sinclair/typebox").TObject<{
|
|
17
|
+
/** A description for security scheme. CommonMark syntax MAY be used for rich text representation. */
|
|
18
|
+
description: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
19
|
+
}>, import("@sinclair/typebox").TObject<{
|
|
20
|
+
/** REQUIRED. The type of the security scheme. Valid values are "apiKey", "http", "mutualTLS", "oauth2", "openIdConnect". */
|
|
21
|
+
type: import("@sinclair/typebox").TLiteral<"http">;
|
|
22
|
+
/** REQUIRED. The name of the HTTP Authentication scheme to be used in the Authorization header as defined in RFC7235. The values used SHOULD be registered in the IANA Authentication Scheme registry. The value is case-insensitive, as defined in RFC7235. */
|
|
23
|
+
scheme: import("@sinclair/typebox").TString;
|
|
24
|
+
/** A hint to the client to identify how the bearer token is formatted. Bearer tokens are usually generated by an authorization server, so this information is primarily for documentation purposes. */
|
|
25
|
+
bearerFormat: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
26
|
+
}>]>;
|
|
27
|
+
export declare const OAuth2: import("@sinclair/typebox").TIntersect<[import("@sinclair/typebox").TObject<{
|
|
28
|
+
/** A description for security scheme. CommonMark syntax MAY be used for rich text representation. */
|
|
29
|
+
description: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
30
|
+
}>, import("@sinclair/typebox").TObject<{
|
|
31
|
+
/** REQUIRED. The type of the security scheme. Valid values are "apiKey", "http", "mutualTLS", "oauth2", "openIdConnect". */
|
|
32
|
+
type: import("@sinclair/typebox").TLiteral<"oauth2">;
|
|
33
|
+
/** REQUIRED. An object containing configuration information for the flow types supported. */
|
|
34
|
+
flows: import("@sinclair/typebox").TObject<{
|
|
35
|
+
implicit: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
36
|
+
authorizationUrl: import("@sinclair/typebox").TString;
|
|
37
|
+
tokenUrl: import("@sinclair/typebox").TString;
|
|
38
|
+
refreshUrl: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
39
|
+
scopes: import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TString>;
|
|
40
|
+
}>>;
|
|
41
|
+
password: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
42
|
+
authorizationUrl: import("@sinclair/typebox").TString;
|
|
43
|
+
tokenUrl: import("@sinclair/typebox").TString;
|
|
44
|
+
refreshUrl: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
45
|
+
scopes: import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TString>;
|
|
46
|
+
}>>;
|
|
47
|
+
clientCredentials: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
48
|
+
authorizationUrl: import("@sinclair/typebox").TString;
|
|
49
|
+
tokenUrl: import("@sinclair/typebox").TString;
|
|
50
|
+
refreshUrl: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
51
|
+
scopes: import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TString>;
|
|
52
|
+
}>>;
|
|
53
|
+
authorizationCode: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
54
|
+
authorizationUrl: import("@sinclair/typebox").TString;
|
|
55
|
+
tokenUrl: import("@sinclair/typebox").TString;
|
|
56
|
+
refreshUrl: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
57
|
+
scopes: import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TString>;
|
|
58
|
+
}>>;
|
|
59
|
+
}>;
|
|
60
|
+
}>]>;
|
|
61
|
+
export declare const OpenIdConnect: import("@sinclair/typebox").TIntersect<[import("@sinclair/typebox").TObject<{
|
|
62
|
+
/** A description for security scheme. CommonMark syntax MAY be used for rich text representation. */
|
|
63
|
+
description: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
64
|
+
}>, import("@sinclair/typebox").TObject<{
|
|
65
|
+
/** REQUIRED. The type of the security scheme. Valid values are "apiKey", "http", "mutualTLS", "oauth2", "openIdConnect". */
|
|
66
|
+
type: import("@sinclair/typebox").TLiteral<"openIdConnect">;
|
|
67
|
+
/** REQUIRED. Well-known URL to discover the [[OpenID-Connect-Discovery]] provider metadata. */
|
|
68
|
+
openIdConnectUrl: import("@sinclair/typebox").TString;
|
|
69
|
+
}>]>;
|
|
70
|
+
/**
|
|
71
|
+
* Defines a security scheme that can be used by the operations.
|
|
72
|
+
*
|
|
73
|
+
* Supported schemes are HTTP authentication, an API key (either as a header, a cookie parameter or as a query parameter), mutual TLS (use of a client certificate), OAuth2's common flows (implicit, password, client credentials and authorization code) as defined in RFC6749, and [[OpenID-Connect-Core]]. Please note that as of 2020, the implicit flow is about to be deprecated by OAuth 2.0 Security Best Current Practice. Recommended for most use cases is Authorization Code Grant flow with PKCE.
|
|
74
|
+
*/
|
|
75
|
+
export declare const SecuritySchemeObject: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TIntersect<[import("@sinclair/typebox").TObject<{
|
|
76
|
+
/** A description for security scheme. CommonMark syntax MAY be used for rich text representation. */
|
|
77
|
+
description: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
78
|
+
}>, import("@sinclair/typebox").TObject<{
|
|
79
|
+
/** REQUIRED. The type of the security scheme. Valid values are "apiKey", "http", "mutualTLS", "oauth2", "openIdConnect". */
|
|
80
|
+
type: import("@sinclair/typebox").TLiteral<"apiKey">;
|
|
81
|
+
/** REQUIRED. The name of the header, query or cookie parameter to be used. */
|
|
82
|
+
name: import("@sinclair/typebox").TString;
|
|
83
|
+
/** REQUIRED. The location of the API key. Valid values are "query", "header", or "cookie". */
|
|
84
|
+
in: import("@sinclair/typebox").TString;
|
|
85
|
+
}>]>, import("@sinclair/typebox").TIntersect<[import("@sinclair/typebox").TObject<{
|
|
86
|
+
/** A description for security scheme. CommonMark syntax MAY be used for rich text representation. */
|
|
87
|
+
description: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
88
|
+
}>, import("@sinclair/typebox").TObject<{
|
|
89
|
+
/** REQUIRED. The type of the security scheme. Valid values are "apiKey", "http", "mutualTLS", "oauth2", "openIdConnect". */
|
|
90
|
+
type: import("@sinclair/typebox").TLiteral<"http">;
|
|
91
|
+
/** REQUIRED. The name of the HTTP Authentication scheme to be used in the Authorization header as defined in RFC7235. The values used SHOULD be registered in the IANA Authentication Scheme registry. The value is case-insensitive, as defined in RFC7235. */
|
|
92
|
+
scheme: import("@sinclair/typebox").TString;
|
|
93
|
+
/** A hint to the client to identify how the bearer token is formatted. Bearer tokens are usually generated by an authorization server, so this information is primarily for documentation purposes. */
|
|
94
|
+
bearerFormat: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
95
|
+
}>]>, import("@sinclair/typebox").TIntersect<[import("@sinclair/typebox").TObject<{
|
|
96
|
+
/** A description for security scheme. CommonMark syntax MAY be used for rich text representation. */
|
|
97
|
+
description: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
98
|
+
}>, import("@sinclair/typebox").TObject<{
|
|
99
|
+
/** REQUIRED. The type of the security scheme. Valid values are "apiKey", "http", "mutualTLS", "oauth2", "openIdConnect". */
|
|
100
|
+
type: import("@sinclair/typebox").TLiteral<"oauth2">;
|
|
101
|
+
/** REQUIRED. An object containing configuration information for the flow types supported. */
|
|
102
|
+
flows: import("@sinclair/typebox").TObject<{
|
|
103
|
+
implicit: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
104
|
+
authorizationUrl: import("@sinclair/typebox").TString;
|
|
105
|
+
tokenUrl: import("@sinclair/typebox").TString;
|
|
106
|
+
refreshUrl: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
107
|
+
scopes: import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TString>;
|
|
108
|
+
}>>;
|
|
109
|
+
password: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
110
|
+
authorizationUrl: import("@sinclair/typebox").TString;
|
|
111
|
+
tokenUrl: import("@sinclair/typebox").TString;
|
|
112
|
+
refreshUrl: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
113
|
+
scopes: import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TString>;
|
|
114
|
+
}>>;
|
|
115
|
+
clientCredentials: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
116
|
+
authorizationUrl: import("@sinclair/typebox").TString;
|
|
117
|
+
tokenUrl: import("@sinclair/typebox").TString;
|
|
118
|
+
refreshUrl: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
119
|
+
scopes: import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TString>;
|
|
120
|
+
}>>;
|
|
121
|
+
authorizationCode: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
122
|
+
authorizationUrl: import("@sinclair/typebox").TString;
|
|
123
|
+
tokenUrl: import("@sinclair/typebox").TString;
|
|
124
|
+
refreshUrl: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
125
|
+
scopes: import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TString>;
|
|
126
|
+
}>>;
|
|
127
|
+
}>;
|
|
128
|
+
}>]>, import("@sinclair/typebox").TIntersect<[import("@sinclair/typebox").TObject<{
|
|
129
|
+
/** A description for security scheme. CommonMark syntax MAY be used for rich text representation. */
|
|
130
|
+
description: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
131
|
+
}>, import("@sinclair/typebox").TObject<{
|
|
132
|
+
/** REQUIRED. The type of the security scheme. Valid values are "apiKey", "http", "mutualTLS", "oauth2", "openIdConnect". */
|
|
133
|
+
type: import("@sinclair/typebox").TLiteral<"openIdConnect">;
|
|
134
|
+
/** REQUIRED. Well-known URL to discover the [[OpenID-Connect-Discovery]] provider metadata. */
|
|
135
|
+
openIdConnectUrl: import("@sinclair/typebox").TString;
|
|
136
|
+
}>]>]>;
|
|
137
|
+
//# sourceMappingURL=security-scheme.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"security-scheme.d.ts","sourceRoot":"","sources":["../../src/schemas/security-scheme.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,iBAAiB;IAC5B,qGAAqG;;EAErG,CAAA;AAEF,eAAO,MAAM,YAAY;IAJvB,qGAAqG;;;IAOnG,4HAA4H;;IAE5H,8EAA8E;;IAE9E,8FAA8F;;IAGhG,CAAA;AAEF,eAAO,MAAM,UAAU;IAhBrB,qGAAqG;;;IAmBnG,4HAA4H;;IAE5H,gQAAgQ;;IAEhQ,uMAAuM;;IAGzM,CAAA;AAEF,eAAO,MAAM,MAAM;IA5BjB,qGAAqG;;;IA+BnG,4HAA4H;;IAE5H,6FAA6F;;;;;;;;;;;;;;;;;;;;;;;;;;;IAG/F,CAAA;AAEF,eAAO,MAAM,aAAa;IAtCxB,qGAAqG;;;IAyCnG,4HAA4H;;IAE5H,+FAA+F;;IAGjG,CAAA;AAEF;;;;GAIG;AACH,eAAO,MAAM,oBAAoB;IArD/B,qGAAqG;;;IAOnG,4HAA4H;;IAE5H,8EAA8E;;IAE9E,8FAA8F;;;IAXhG,qGAAqG;;;IAmBnG,4HAA4H;;IAE5H,gQAAgQ;;IAEhQ,uMAAuM;;;IAvBzM,qGAAqG;;;IA+BnG,4HAA4H;;IAE5H,6FAA6F;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAjC/F,qGAAqG;;;IAyCnG,4HAA4H;;IAE5H,+FAA+F;;MAUF,CAAA"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { Type } from "@sinclair/typebox";
|
|
2
|
+
import { OAuthFlowsObject } from "./oauthflows.js";
|
|
3
|
+
const DescriptionSchema = Type.Object({
|
|
4
|
+
/** A description for security scheme. CommonMark syntax MAY be used for rich text representation. */
|
|
5
|
+
description: Type.Optional(Type.String())
|
|
6
|
+
});
|
|
7
|
+
const ApiKeySchema = Type.Intersect([
|
|
8
|
+
DescriptionSchema,
|
|
9
|
+
Type.Object({
|
|
10
|
+
/** REQUIRED. The type of the security scheme. Valid values are "apiKey", "http", "mutualTLS", "oauth2", "openIdConnect". */
|
|
11
|
+
type: Type.Literal("apiKey"),
|
|
12
|
+
/** REQUIRED. The name of the header, query or cookie parameter to be used. */
|
|
13
|
+
name: Type.String(),
|
|
14
|
+
/** REQUIRED. The location of the API key. Valid values are "query", "header", or "cookie". */
|
|
15
|
+
in: Type.String()
|
|
16
|
+
})
|
|
17
|
+
]);
|
|
18
|
+
const HttpSchema = Type.Intersect([
|
|
19
|
+
DescriptionSchema,
|
|
20
|
+
Type.Object({
|
|
21
|
+
/** REQUIRED. The type of the security scheme. Valid values are "apiKey", "http", "mutualTLS", "oauth2", "openIdConnect". */
|
|
22
|
+
type: Type.Literal("http"),
|
|
23
|
+
/** REQUIRED. The name of the HTTP Authentication scheme to be used in the Authorization header as defined in RFC7235. The values used SHOULD be registered in the IANA Authentication Scheme registry. The value is case-insensitive, as defined in RFC7235. */
|
|
24
|
+
scheme: Type.String(),
|
|
25
|
+
/** A hint to the client to identify how the bearer token is formatted. Bearer tokens are usually generated by an authorization server, so this information is primarily for documentation purposes. */
|
|
26
|
+
bearerFormat: Type.Optional(Type.String())
|
|
27
|
+
})
|
|
28
|
+
]);
|
|
29
|
+
const OAuth2 = Type.Intersect([
|
|
30
|
+
DescriptionSchema,
|
|
31
|
+
Type.Object({
|
|
32
|
+
/** REQUIRED. The type of the security scheme. Valid values are "apiKey", "http", "mutualTLS", "oauth2", "openIdConnect". */
|
|
33
|
+
type: Type.Literal("oauth2"),
|
|
34
|
+
/** REQUIRED. An object containing configuration information for the flow types supported. */
|
|
35
|
+
flows: OAuthFlowsObject
|
|
36
|
+
})
|
|
37
|
+
]);
|
|
38
|
+
const OpenIdConnect = Type.Intersect([
|
|
39
|
+
DescriptionSchema,
|
|
40
|
+
Type.Object({
|
|
41
|
+
/** REQUIRED. The type of the security scheme. Valid values are "apiKey", "http", "mutualTLS", "oauth2", "openIdConnect". */
|
|
42
|
+
type: Type.Literal("openIdConnect"),
|
|
43
|
+
/** REQUIRED. Well-known URL to discover the [[OpenID-Connect-Discovery]] provider metadata. */
|
|
44
|
+
openIdConnectUrl: Type.String()
|
|
45
|
+
})
|
|
46
|
+
]);
|
|
47
|
+
const SecuritySchemeObject = Type.Union([ApiKeySchema, HttpSchema, OAuth2, OpenIdConnect]);
|
|
48
|
+
export {
|
|
49
|
+
ApiKeySchema,
|
|
50
|
+
DescriptionSchema,
|
|
51
|
+
HttpSchema,
|
|
52
|
+
OAuth2,
|
|
53
|
+
OpenIdConnect,
|
|
54
|
+
SecuritySchemeObject
|
|
55
|
+
};
|
|
56
|
+
//# sourceMappingURL=security-scheme.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/schemas/security-scheme.ts"],
|
|
4
|
+
"sourcesContent": ["import { Type } from '@sinclair/typebox'\nimport { OAuthFlowsObject } from './oauthflows'\n\nexport const DescriptionSchema = Type.Object({\n /** A description for security scheme. CommonMark syntax MAY be used for rich text representation. */\n description: Type.Optional(Type.String()),\n})\n\nexport const ApiKeySchema = Type.Intersect([\n DescriptionSchema,\n Type.Object({\n /** REQUIRED. The type of the security scheme. Valid values are \"apiKey\", \"http\", \"mutualTLS\", \"oauth2\", \"openIdConnect\". */\n type: Type.Literal('apiKey'),\n /** REQUIRED. The name of the header, query or cookie parameter to be used. */\n name: Type.String(),\n /** REQUIRED. The location of the API key. Valid values are \"query\", \"header\", or \"cookie\". */\n in: Type.String(),\n }),\n])\n\nexport const HttpSchema = Type.Intersect([\n DescriptionSchema,\n Type.Object({\n /** REQUIRED. The type of the security scheme. Valid values are \"apiKey\", \"http\", \"mutualTLS\", \"oauth2\", \"openIdConnect\". */\n type: Type.Literal('http'),\n /** REQUIRED. The name of the HTTP Authentication scheme to be used in the Authorization header as defined in RFC7235. The values used SHOULD be registered in the IANA Authentication Scheme registry. The value is case-insensitive, as defined in RFC7235. */\n scheme: Type.String(),\n /** A hint to the client to identify how the bearer token is formatted. Bearer tokens are usually generated by an authorization server, so this information is primarily for documentation purposes. */\n bearerFormat: Type.Optional(Type.String()),\n }),\n])\n\nexport const OAuth2 = Type.Intersect([\n DescriptionSchema,\n Type.Object({\n /** REQUIRED. The type of the security scheme. Valid values are \"apiKey\", \"http\", \"mutualTLS\", \"oauth2\", \"openIdConnect\". */\n type: Type.Literal('oauth2'),\n /** REQUIRED. An object containing configuration information for the flow types supported. */\n flows: OAuthFlowsObject,\n }),\n])\n\nexport const OpenIdConnect = Type.Intersect([\n DescriptionSchema,\n Type.Object({\n /** REQUIRED. The type of the security scheme. Valid values are \"apiKey\", \"http\", \"mutualTLS\", \"oauth2\", \"openIdConnect\". */\n type: Type.Literal('openIdConnect'),\n /** REQUIRED. Well-known URL to discover the [[OpenID-Connect-Discovery]] provider metadata. */\n openIdConnectUrl: Type.String(),\n }),\n])\n\n/**\n * Defines a security scheme that can be used by the operations.\n *\n * Supported schemes are HTTP authentication, an API key (either as a header, a cookie parameter or as a query parameter), mutual TLS (use of a client certificate), OAuth2's common flows (implicit, password, client credentials and authorization code) as defined in RFC6749, and [[OpenID-Connect-Core]]. Please note that as of 2020, the implicit flow is about to be deprecated by OAuth 2.0 Security Best Current Practice. Recommended for most use cases is Authorization Code Grant flow with PKCE.\n */\nexport const SecuritySchemeObject = Type.Union([ApiKeySchema, HttpSchema, OAuth2, OpenIdConnect])\n"],
|
|
5
|
+
"mappings": "AAAA,SAAS,YAAY;AACrB,SAAS,wBAAwB;AAE1B,MAAM,oBAAoB,KAAK,OAAO;AAAA;AAAA,EAE3C,aAAa,KAAK,SAAS,KAAK,OAAO,CAAC;AAC1C,CAAC;AAEM,MAAM,eAAe,KAAK,UAAU;AAAA,EACzC;AAAA,EACA,KAAK,OAAO;AAAA;AAAA,IAEV,MAAM,KAAK,QAAQ,QAAQ;AAAA;AAAA,IAE3B,MAAM,KAAK,OAAO;AAAA;AAAA,IAElB,IAAI,KAAK,OAAO;AAAA,EAClB,CAAC;AACH,CAAC;AAEM,MAAM,aAAa,KAAK,UAAU;AAAA,EACvC;AAAA,EACA,KAAK,OAAO;AAAA;AAAA,IAEV,MAAM,KAAK,QAAQ,MAAM;AAAA;AAAA,IAEzB,QAAQ,KAAK,OAAO;AAAA;AAAA,IAEpB,cAAc,KAAK,SAAS,KAAK,OAAO,CAAC;AAAA,EAC3C,CAAC;AACH,CAAC;AAEM,MAAM,SAAS,KAAK,UAAU;AAAA,EACnC;AAAA,EACA,KAAK,OAAO;AAAA;AAAA,IAEV,MAAM,KAAK,QAAQ,QAAQ;AAAA;AAAA,IAE3B,OAAO;AAAA,EACT,CAAC;AACH,CAAC;AAEM,MAAM,gBAAgB,KAAK,UAAU;AAAA,EAC1C;AAAA,EACA,KAAK,OAAO;AAAA;AAAA,IAEV,MAAM,KAAK,QAAQ,eAAe;AAAA;AAAA,IAElC,kBAAkB,KAAK,OAAO;AAAA,EAChC,CAAC;AACH,CAAC;AAOM,MAAM,uBAAuB,KAAK,MAAM,CAAC,cAAc,YAAY,QAAQ,aAAa,CAAC;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/** An object representing a Server Variable for server URL template substitution. */
|
|
2
|
+
export declare const ServerVariableObject: import("@sinclair/typebox").TObject<{
|
|
3
|
+
/** An enumeration of string values to be used if the substitution options are from a limited set. The array MUST NOT be empty. */
|
|
4
|
+
enum: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>>;
|
|
5
|
+
/** REQUIRED. The default value to use for substitution, which SHALL be sent if an alternate value is not supplied. If the enum is defined, the value MUST exist in the enum's values. Note that this behavior is different from the Schema Object's default keyword, which documents the receiver's behavior rather than inserting the value into the data. */
|
|
6
|
+
default: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
7
|
+
/** An optional description for the server variable. CommonMark syntax MAY be used for rich text representation. */
|
|
8
|
+
description: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
9
|
+
}>;
|
|
10
|
+
//# sourceMappingURL=server-variable.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"server-variable.d.ts","sourceRoot":"","sources":["../../src/schemas/server-variable.ts"],"names":[],"mappings":"AAEA,qFAAqF;AACrF,eAAO,MAAM,oBAAoB;IAC/B,kIAAkI;;IAElI,+VAA+V;;IAE/V,mHAAmH;;EAEnH,CAAA"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Type } from "@sinclair/typebox";
|
|
2
|
+
const ServerVariableObject = Type.Object({
|
|
3
|
+
/** An enumeration of string values to be used if the substitution options are from a limited set. The array MUST NOT be empty. */
|
|
4
|
+
enum: Type.Optional(Type.Array(Type.String())),
|
|
5
|
+
/** REQUIRED. The default value to use for substitution, which SHALL be sent if an alternate value is not supplied. If the enum is defined, the value MUST exist in the enum's values. Note that this behavior is different from the Schema Object's default keyword, which documents the receiver's behavior rather than inserting the value into the data. */
|
|
6
|
+
default: Type.Optional(Type.String()),
|
|
7
|
+
/** An optional description for the server variable. CommonMark syntax MAY be used for rich text representation. */
|
|
8
|
+
description: Type.Optional(Type.String())
|
|
9
|
+
});
|
|
10
|
+
export {
|
|
11
|
+
ServerVariableObject
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=server-variable.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/schemas/server-variable.ts"],
|
|
4
|
+
"sourcesContent": ["import { Type } from '@sinclair/typebox'\n\n/** An object representing a Server Variable for server URL template substitution. */\nexport const ServerVariableObject = Type.Object({\n /** An enumeration of string values to be used if the substitution options are from a limited set. The array MUST NOT be empty. */\n enum: Type.Optional(Type.Array(Type.String())),\n /** REQUIRED. The default value to use for substitution, which SHALL be sent if an alternate value is not supplied. If the enum is defined, the value MUST exist in the enum's values. Note that this behavior is different from the Schema Object's default keyword, which documents the receiver's behavior rather than inserting the value into the data. */\n default: Type.Optional(Type.String()),\n /** An optional description for the server variable. CommonMark syntax MAY be used for rich text representation. */\n description: Type.Optional(Type.String()),\n})\n"],
|
|
5
|
+
"mappings": "AAAA,SAAS,YAAY;AAGd,MAAM,uBAAuB,KAAK,OAAO;AAAA;AAAA,EAE9C,MAAM,KAAK,SAAS,KAAK,MAAM,KAAK,OAAO,CAAC,CAAC;AAAA;AAAA,EAE7C,SAAS,KAAK,SAAS,KAAK,OAAO,CAAC;AAAA;AAAA,EAEpC,aAAa,KAAK,SAAS,KAAK,OAAO,CAAC;AAC1C,CAAC;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|