@scalar/types 0.1.13 → 0.1.15
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/api-reference/api-reference-configuration.d.ts +41 -11
- package/dist/api-reference/api-reference-configuration.d.ts.map +1 -1
- package/dist/api-reference/api-reference-configuration.js +274 -290
- package/dist/api-reference/api-reference-configuration.js.map +7 -0
- package/dist/api-reference/api-reference-configuration.test.js +224 -0
- package/dist/api-reference/api-reference-configuration.test.js.map +7 -0
- package/dist/api-reference/api-reference-plugin.d.ts +16 -2
- package/dist/api-reference/api-reference-plugin.d.ts.map +1 -1
- package/dist/api-reference/api-reference-plugin.js +28 -22
- package/dist/api-reference/api-reference-plugin.js.map +7 -0
- package/dist/api-reference/authentication-configuration.d.ts +2 -2
- package/dist/api-reference/authentication-configuration.d.ts.map +1 -1
- package/dist/api-reference/authentication-configuration.js +1 -0
- package/dist/api-reference/authentication-configuration.js.map +7 -0
- package/dist/api-reference/authentication-configuration.test-d.js +45 -0
- package/dist/api-reference/authentication-configuration.test-d.js.map +7 -0
- package/dist/api-reference/html-api.d.ts +1 -1
- package/dist/api-reference/html-api.d.ts.map +1 -1
- package/dist/api-reference/html-api.js +1 -0
- package/dist/api-reference/html-api.js.map +7 -0
- package/dist/api-reference/html-rendering-configuration.d.ts +1 -1
- package/dist/api-reference/html-rendering-configuration.d.ts.map +1 -1
- package/dist/api-reference/html-rendering-configuration.js +19 -21
- package/dist/api-reference/html-rendering-configuration.js.map +7 -0
- package/dist/api-reference/index.d.ts +4 -5
- package/dist/api-reference/index.d.ts.map +1 -1
- package/dist/api-reference/index.js +17 -3
- package/dist/api-reference/index.js.map +7 -0
- package/dist/entities/index.d.ts +1 -1
- package/dist/entities/index.d.ts.map +1 -1
- package/dist/entities/index.js +21 -1
- package/dist/entities/index.js.map +7 -0
- package/dist/entities/security-scheme.d.ts +104 -0
- package/dist/entities/security-scheme.d.ts.map +1 -1
- package/dist/entities/security-scheme.js +118 -157
- package/dist/entities/security-scheme.js.map +7 -0
- package/dist/entities/security-scheme.test.js +318 -0
- package/dist/entities/security-scheme.test.js.map +7 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -4
- package/dist/index.js.map +7 -0
- package/dist/legacy/index.d.ts +1 -1
- package/dist/legacy/index.d.ts.map +1 -1
- package/dist/legacy/index.js +2 -1
- package/dist/legacy/index.js.map +7 -0
- package/dist/legacy/reference-config.d.ts +2 -2
- package/dist/legacy/reference-config.d.ts.map +1 -1
- package/dist/legacy/reference-config.js +10 -8
- package/dist/legacy/reference-config.js.map +7 -0
- package/dist/snippetz/index.d.ts +1 -1
- package/dist/snippetz/index.d.ts.map +1 -1
- package/dist/snippetz/index.js +2 -1
- package/dist/snippetz/index.js.map +7 -0
- package/dist/snippetz/snippetz.d.ts +1 -1
- package/dist/snippetz/snippetz.d.ts.map +1 -1
- package/dist/snippetz/snippetz.js +39 -40
- package/dist/snippetz/snippetz.js.map +7 -0
- package/dist/snippetz/snippetz.test-d.js +28 -0
- package/dist/snippetz/snippetz.test-d.js.map +7 -0
- package/dist/utils/index.d.ts +2 -2
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +5 -1
- package/dist/utils/index.js.map +7 -0
- package/dist/utils/nanoid.js +7 -11
- package/dist/utils/nanoid.js.map +7 -0
- package/dist/utils/nanoid.test.js +29 -0
- package/dist/utils/nanoid.test.js.map +7 -0
- package/dist/utils/utility-types.js +1 -0
- package/dist/utils/utility-types.js.map +7 -0
- package/package.json +6 -10
- package/dist/api-reference/helpers/migrate-theme-variables.d.ts +0 -10
- package/dist/api-reference/helpers/migrate-theme-variables.d.ts.map +0 -1
- package/dist/api-reference/helpers/migrate-theme-variables.js +0 -22
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"security-scheme.d.ts","sourceRoot":"","sources":["../../src/entities/security-scheme.ts"],"names":[],"mappings":"AAAA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAkNxE,CAAA;AAEJ;;;;GAIG;AACH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAA;AACjE,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAA"}
|
|
@@ -1,184 +1,145 @@
|
|
|
1
|
-
import { z } from
|
|
2
|
-
import { nanoidSchema } from
|
|
3
|
-
|
|
4
|
-
// ---------------------------------------------------------------------------
|
|
5
|
-
// COMMON PROPS FOR ALL SECURITY SCHEMES
|
|
6
|
-
/** Some common properties used in all security schemes */
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { nanoidSchema } from "../utils/nanoid.js";
|
|
7
3
|
const commonProps = z.object({
|
|
8
|
-
|
|
9
|
-
|
|
4
|
+
/* A description for security scheme. CommonMark syntax MAY be used for rich text representation. */
|
|
5
|
+
description: z.string().optional()
|
|
10
6
|
});
|
|
11
7
|
const extendedSecuritySchema = z.object({
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
8
|
+
uid: nanoidSchema.brand(),
|
|
9
|
+
/** The name key that links a security requirement to a security object */
|
|
10
|
+
nameKey: z.string().optional().default("")
|
|
15
11
|
});
|
|
16
|
-
|
|
17
|
-
// API KEY
|
|
18
|
-
const securitySchemeApiKeyIn = ['query', 'header', 'cookie'];
|
|
12
|
+
const securitySchemeApiKeyIn = ["query", "header", "cookie"];
|
|
19
13
|
const oasSecuritySchemeApiKey = commonProps.extend({
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
14
|
+
type: z.literal("apiKey"),
|
|
15
|
+
/** REQUIRED. The name of the header, query or cookie parameter to be used. */
|
|
16
|
+
name: z.string().optional().default(""),
|
|
17
|
+
/** REQUIRED. The location of the API key. Valid values are "query", "header" or "cookie". */
|
|
18
|
+
in: z.enum(securitySchemeApiKeyIn).optional().default("header").catch("header")
|
|
25
19
|
});
|
|
26
20
|
const apiKeyValueSchema = z.object({
|
|
27
|
-
|
|
21
|
+
value: z.string().default("")
|
|
28
22
|
});
|
|
29
23
|
const securityApiKeySchema = oasSecuritySchemeApiKey.merge(extendedSecuritySchema).merge(apiKeyValueSchema);
|
|
30
|
-
// ---------------------------------------------------------------------------
|
|
31
|
-
// HTTP
|
|
32
24
|
const oasSecuritySchemeHttp = commonProps.extend({
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
* A hint to the client to identify how the bearer token is formatted.
|
|
46
|
-
* Bearer tokens are usually generated by an authorization server, so
|
|
47
|
-
* this information is primarily for documentation purposes.
|
|
48
|
-
*/
|
|
49
|
-
bearerFormat: z
|
|
50
|
-
.union([z.literal('JWT'), z.string()])
|
|
51
|
-
.optional()
|
|
52
|
-
.default('JWT'),
|
|
25
|
+
type: z.literal("http"),
|
|
26
|
+
/**
|
|
27
|
+
* REQUIRED. The name of the HTTP Authorization scheme to be used in the Authorization header as defined in
|
|
28
|
+
* [RFC7235]. The values used SHOULD be registered in the IANA Authentication Scheme registry.
|
|
29
|
+
*/
|
|
30
|
+
scheme: z.string().toLowerCase().pipe(z.enum(["basic", "bearer"])).optional().default("basic"),
|
|
31
|
+
/**
|
|
32
|
+
* A hint to the client to identify how the bearer token is formatted.
|
|
33
|
+
* Bearer tokens are usually generated by an authorization server, so
|
|
34
|
+
* this information is primarily for documentation purposes.
|
|
35
|
+
*/
|
|
36
|
+
bearerFormat: z.union([z.literal("JWT"), z.string()]).optional().default("JWT")
|
|
53
37
|
});
|
|
54
38
|
const httpValueSchema = z.object({
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
39
|
+
username: z.string().default(""),
|
|
40
|
+
password: z.string().default(""),
|
|
41
|
+
token: z.string().default("")
|
|
58
42
|
});
|
|
59
43
|
const securityHttpSchema = oasSecuritySchemeHttp.merge(extendedSecuritySchema).merge(httpValueSchema);
|
|
60
|
-
// ---------------------------------------------------------------------------
|
|
61
|
-
// OPENID CONNECT
|
|
62
44
|
const oasSecuritySchemeOpenId = commonProps.extend({
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
45
|
+
type: z.literal("openIdConnect"),
|
|
46
|
+
/**
|
|
47
|
+
* REQUIRED. OpenId Connect URL to discover OAuth2 configuration values. This MUST be in the
|
|
48
|
+
* form of a URL. The OpenID Connect standard requires the use of TLS.
|
|
49
|
+
*/
|
|
50
|
+
openIdConnectUrl: z.string().optional().default("")
|
|
69
51
|
});
|
|
70
52
|
const securityOpenIdSchema = oasSecuritySchemeOpenId.merge(extendedSecuritySchema);
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
* REQUIRED. The authorization URL to be used for this flow. This MUST be in
|
|
74
|
-
* the form of a URL. The OAuth2 standard requires the use of TLS.
|
|
75
|
-
*/
|
|
76
|
-
const authorizationUrl = z.string().default('');
|
|
77
|
-
/**
|
|
78
|
-
* REQUIRED. The token URL to be used for this flow. This MUST be in the
|
|
79
|
-
* form of a URL. The OAuth2 standard requires the use of TLS.
|
|
80
|
-
*/
|
|
81
|
-
const tokenUrl = z.string().default('');
|
|
82
|
-
/** Common properties used across all oauth2 flows */
|
|
53
|
+
const authorizationUrl = z.string().default("");
|
|
54
|
+
const tokenUrl = z.string().default("");
|
|
83
55
|
const flowsCommon = z.object({
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
56
|
+
/**
|
|
57
|
+
* The URL to be used for obtaining refresh tokens. This MUST be in the form of a
|
|
58
|
+
* URL. The OAuth2 standard requires the use of TLS.
|
|
59
|
+
*/
|
|
60
|
+
"refreshUrl": z.string().optional().default(""),
|
|
61
|
+
/**
|
|
62
|
+
* REQUIRED. The available scopes for the OAuth2 security scheme. A map
|
|
63
|
+
* between the scope name and a short description for it. The map MAY be empty.
|
|
64
|
+
*/
|
|
65
|
+
"scopes": z.record(z.string(), z.string().optional().default("")).optional().default({}).catch({}),
|
|
66
|
+
"selectedScopes": z.array(z.string()).optional().default([]),
|
|
67
|
+
/** Extension to save the client Id associated with an oauth flow */
|
|
68
|
+
"x-scalar-client-id": z.string().optional().default(""),
|
|
69
|
+
/** The auth token */
|
|
70
|
+
"token": z.string().default(""),
|
|
71
|
+
/** Additional query parameters for the OAuth authorization request. Example: { prompt: 'consent', audience: 'scalar' }. */
|
|
72
|
+
"x-scalar-security-query": z.record(z.string(), z.string()).optional()
|
|
99
73
|
});
|
|
100
|
-
|
|
101
|
-
const
|
|
102
|
-
/** Options for the x-usePkce extension */
|
|
103
|
-
const pkceOptions = ['SHA-256', 'plain', 'no'];
|
|
104
|
-
/** Oauth2 security scheme */
|
|
74
|
+
const defaultRedirectUri = typeof window !== "undefined" ? window.location.origin + window.location.pathname : "";
|
|
75
|
+
const pkceOptions = ["SHA-256", "plain", "no"];
|
|
105
76
|
const oasSecuritySchemeOauth2 = commonProps.extend({
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
password: z.string().default(''),
|
|
125
|
-
}),
|
|
126
|
-
/** Configuration for the OAuth Client Credentials flow. Previously called application in OpenAPI 2.0. */
|
|
127
|
-
clientCredentials: flowsCommon.extend({
|
|
128
|
-
type: z.literal('clientCredentials').default('clientCredentials'),
|
|
129
|
-
tokenUrl,
|
|
130
|
-
clientSecret: z.string().default(''),
|
|
131
|
-
}),
|
|
132
|
-
/** Configuration for the OAuth Authorization Code flow. Previously called accessCode in OpenAPI 2.0.*/
|
|
133
|
-
authorizationCode: flowsCommon.extend({
|
|
134
|
-
'type': z.literal('authorizationCode').default('authorizationCode'),
|
|
135
|
-
authorizationUrl,
|
|
136
|
-
'x-usePkce': z.enum(pkceOptions).optional().default('no'),
|
|
137
|
-
'x-scalar-redirect-uri': z.string().optional().default(defaultRedirectUri),
|
|
138
|
-
tokenUrl,
|
|
139
|
-
'clientSecret': z.string().default(''),
|
|
140
|
-
}),
|
|
141
|
-
})
|
|
142
|
-
.partial()
|
|
143
|
-
.default({
|
|
144
|
-
implicit: { type: 'implicit', authorizationUrl: 'http://localhost:8080' },
|
|
77
|
+
type: z.literal("oauth2"),
|
|
78
|
+
/** The default scopes for the oauth flow */
|
|
79
|
+
"x-default-scopes": z.string().or(z.array(z.string())).optional(),
|
|
80
|
+
/** REQUIRED. An object containing configuration information for the flow types supported. */
|
|
81
|
+
flows: z.object({
|
|
82
|
+
/** Configuration for the OAuth Implicit flow */
|
|
83
|
+
implicit: flowsCommon.extend({
|
|
84
|
+
"type": z.literal("implicit").default("implicit"),
|
|
85
|
+
authorizationUrl,
|
|
86
|
+
"x-scalar-redirect-uri": z.string().optional().default(defaultRedirectUri)
|
|
87
|
+
}),
|
|
88
|
+
/** Configuration for the OAuth Resource Owner Password flow */
|
|
89
|
+
password: flowsCommon.extend({
|
|
90
|
+
type: z.literal("password").default("password"),
|
|
91
|
+
tokenUrl,
|
|
92
|
+
clientSecret: z.string().default(""),
|
|
93
|
+
username: z.string().default(""),
|
|
94
|
+
password: z.string().default("")
|
|
145
95
|
}),
|
|
96
|
+
/** Configuration for the OAuth Client Credentials flow. Previously called application in OpenAPI 2.0. */
|
|
97
|
+
clientCredentials: flowsCommon.extend({
|
|
98
|
+
type: z.literal("clientCredentials").default("clientCredentials"),
|
|
99
|
+
tokenUrl,
|
|
100
|
+
clientSecret: z.string().default("")
|
|
101
|
+
}),
|
|
102
|
+
/** Configuration for the OAuth Authorization Code flow. Previously called accessCode in OpenAPI 2.0.*/
|
|
103
|
+
authorizationCode: flowsCommon.extend({
|
|
104
|
+
"type": z.literal("authorizationCode").default("authorizationCode"),
|
|
105
|
+
authorizationUrl,
|
|
106
|
+
"x-usePkce": z.enum(pkceOptions).optional().default("no"),
|
|
107
|
+
"x-scalar-redirect-uri": z.string().optional().default(defaultRedirectUri),
|
|
108
|
+
tokenUrl,
|
|
109
|
+
"clientSecret": z.string().default("")
|
|
110
|
+
})
|
|
111
|
+
}).partial().default({
|
|
112
|
+
implicit: { type: "implicit", authorizationUrl: "http://localhost:8080" }
|
|
113
|
+
})
|
|
146
114
|
});
|
|
147
115
|
const securityOauthSchema = oasSecuritySchemeOauth2.merge(extendedSecuritySchema);
|
|
148
|
-
// ---------------------------------------------------------------------------
|
|
149
|
-
// Final Types
|
|
150
|
-
/**
|
|
151
|
-
* Security Requirement
|
|
152
|
-
* Lists the required security schemes to execute this operation OR the whole collection/spec.
|
|
153
|
-
* The name used for each property MUST correspond to a security scheme declared in the Security
|
|
154
|
-
* Schemes under the Components Object.
|
|
155
|
-
*
|
|
156
|
-
* The key (name) here will be matched to the key of the securityScheme for linking
|
|
157
|
-
*
|
|
158
|
-
* @see https://spec.openapis.org/oas/latest.html#security-requirement-object
|
|
159
|
-
*/
|
|
160
116
|
const oasSecurityRequirementSchema = z.record(z.string(), z.array(z.string()).optional().default([]));
|
|
161
|
-
/** OAS Compliant security schemes */
|
|
162
117
|
const oasSecuritySchemeSchema = z.union([
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
118
|
+
oasSecuritySchemeApiKey,
|
|
119
|
+
oasSecuritySchemeHttp,
|
|
120
|
+
oasSecuritySchemeOauth2,
|
|
121
|
+
oasSecuritySchemeOpenId
|
|
167
122
|
]);
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
.
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
}
|
|
179
|
-
});
|
|
180
|
-
}
|
|
181
|
-
return data;
|
|
123
|
+
const securitySchemeSchema = z.discriminatedUnion("type", [securityApiKeySchema, securityHttpSchema, securityOpenIdSchema, securityOauthSchema]).transform((data) => {
|
|
124
|
+
if (data.type === "oauth2" && data["x-default-scopes"]?.length) {
|
|
125
|
+
const keys = Object.keys(data.flows);
|
|
126
|
+
keys.forEach((key) => {
|
|
127
|
+
if (data.flows[key]?.selectedScopes && data["x-default-scopes"]) {
|
|
128
|
+
data.flows[key].selectedScopes = [data["x-default-scopes"]].flat();
|
|
129
|
+
}
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
return data;
|
|
182
133
|
});
|
|
183
|
-
|
|
184
|
-
|
|
134
|
+
export {
|
|
135
|
+
oasSecurityRequirementSchema,
|
|
136
|
+
oasSecuritySchemeSchema,
|
|
137
|
+
pkceOptions,
|
|
138
|
+
securityApiKeySchema,
|
|
139
|
+
securityHttpSchema,
|
|
140
|
+
securityOauthSchema,
|
|
141
|
+
securityOpenIdSchema,
|
|
142
|
+
securitySchemeApiKeyIn,
|
|
143
|
+
securitySchemeSchema
|
|
144
|
+
};
|
|
145
|
+
//# sourceMappingURL=security-scheme.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/entities/security-scheme.ts"],
|
|
4
|
+
"sourcesContent": ["import { z } from 'zod'\n\nimport { type ENTITY_BRANDS, nanoidSchema } from '../utils/nanoid'\n\n// ---------------------------------------------------------------------------\n// COMMON PROPS FOR ALL SECURITY SCHEMES\n\n/** Some common properties used in all security schemes */\nconst commonProps = z.object({\n /* A description for security scheme. CommonMark syntax MAY be used for rich text representation. */\n description: z.string().optional(),\n})\n\nconst extendedSecuritySchema = z.object({\n uid: nanoidSchema.brand<ENTITY_BRANDS['SECURITY_SCHEME']>(),\n /** The name key that links a security requirement to a security object */\n nameKey: z.string().optional().default(''),\n})\n\n// ---------------------------------------------------------------------------\n// API KEY\n\nexport const securitySchemeApiKeyIn = ['query', 'header', 'cookie'] as const\n\nconst oasSecuritySchemeApiKey = commonProps.extend({\n type: z.literal('apiKey'),\n /** REQUIRED. The name of the header, query or cookie parameter to be used. */\n name: z.string().optional().default(''),\n /** REQUIRED. The location of the API key. Valid values are \"query\", \"header\" or \"cookie\". */\n in: z.enum(securitySchemeApiKeyIn).optional().default('header').catch('header'),\n})\n\nconst apiKeyValueSchema = z.object({\n value: z.string().default(''),\n})\n\nexport const securityApiKeySchema = oasSecuritySchemeApiKey.merge(extendedSecuritySchema).merge(apiKeyValueSchema)\nexport type SecuritySchemeApiKey = z.infer<typeof securityApiKeySchema>\n\n// ---------------------------------------------------------------------------\n// HTTP\n\nconst oasSecuritySchemeHttp = commonProps.extend({\n type: z.literal('http'),\n /**\n * REQUIRED. The name of the HTTP Authorization scheme to be used in the Authorization header as defined in\n * [RFC7235]. The values used SHOULD be registered in the IANA Authentication Scheme registry.\n */\n scheme: z\n .string()\n .toLowerCase()\n .pipe(z.enum(['basic', 'bearer']))\n .optional()\n .default('basic'),\n /**\n * A hint to the client to identify how the bearer token is formatted.\n * Bearer tokens are usually generated by an authorization server, so\n * this information is primarily for documentation purposes.\n */\n bearerFormat: z\n .union([z.literal('JWT'), z.string()])\n .optional()\n .default('JWT'),\n})\n\nconst httpValueSchema = z.object({\n username: z.string().default(''),\n password: z.string().default(''),\n token: z.string().default(''),\n})\n\nexport const securityHttpSchema = oasSecuritySchemeHttp.merge(extendedSecuritySchema).merge(httpValueSchema)\nexport type SecuritySchemaHttp = z.infer<typeof securityHttpSchema>\n\n// ---------------------------------------------------------------------------\n// OPENID CONNECT\nconst oasSecuritySchemeOpenId = commonProps.extend({\n type: z.literal('openIdConnect'),\n /**\n * REQUIRED. OpenId Connect URL to discover OAuth2 configuration values. This MUST be in the\n * form of a URL. The OpenID Connect standard requires the use of TLS.\n */\n openIdConnectUrl: z.string().optional().default(''),\n})\n\nexport const securityOpenIdSchema = oasSecuritySchemeOpenId.merge(extendedSecuritySchema)\nexport type SecuritySchemaOpenId = z.infer<typeof securityOpenIdSchema>\n\n// ---------------------------------------------------------------------------\n\n/**\n * REQUIRED. The authorization URL to be used for this flow. This MUST be in\n * the form of a URL. The OAuth2 standard requires the use of TLS.\n */\nconst authorizationUrl = z.string().default('')\n\n/**\n * REQUIRED. The token URL to be used for this flow. This MUST be in the\n * form of a URL. The OAuth2 standard requires the use of TLS.\n */\nconst tokenUrl = z.string().default('')\n\n/** Common properties used across all oauth2 flows */\nconst flowsCommon = z.object({\n /**\n * The URL to be used for obtaining refresh tokens. This MUST be in the form of a\n * URL. The OAuth2 standard requires the use of TLS.\n */\n 'refreshUrl': z.string().optional().default(''),\n /**\n * REQUIRED. The available scopes for the OAuth2 security scheme. A map\n * between the scope name and a short description for it. The map MAY be empty.\n */\n 'scopes': z.record(z.string(), z.string().optional().default('')).optional().default({}).catch({}),\n 'selectedScopes': z.array(z.string()).optional().default([]),\n /** Extension to save the client Id associated with an oauth flow */\n 'x-scalar-client-id': z.string().optional().default(''),\n /** The auth token */\n 'token': z.string().default(''),\n /** Additional query parameters for the OAuth authorization request. Example: { prompt: 'consent', audience: 'scalar' }. */\n 'x-scalar-security-query': z.record(z.string(), z.string()).optional(),\n})\n\n/** Setup a default redirect uri if we can */\nconst defaultRedirectUri = typeof window !== 'undefined' ? window.location.origin + window.location.pathname : ''\n\n/** Options for the x-usePkce extension */\nexport const pkceOptions = ['SHA-256', 'plain', 'no'] as const\n\n/** Oauth2 security scheme */\nconst oasSecuritySchemeOauth2 = commonProps.extend({\n type: z.literal('oauth2'),\n /** The default scopes for the oauth flow */\n 'x-default-scopes': z.string().or(z.array(z.string())).optional(),\n /** REQUIRED. An object containing configuration information for the flow types supported. */\n flows: z\n .object({\n /** Configuration for the OAuth Implicit flow */\n implicit: flowsCommon.extend({\n 'type': z.literal('implicit').default('implicit'),\n authorizationUrl,\n 'x-scalar-redirect-uri': z.string().optional().default(defaultRedirectUri),\n }),\n /** Configuration for the OAuth Resource Owner Password flow */\n password: flowsCommon.extend({\n type: z.literal('password').default('password'),\n tokenUrl,\n clientSecret: z.string().default(''),\n username: z.string().default(''),\n password: z.string().default(''),\n }),\n /** Configuration for the OAuth Client Credentials flow. Previously called application in OpenAPI 2.0. */\n clientCredentials: flowsCommon.extend({\n type: z.literal('clientCredentials').default('clientCredentials'),\n tokenUrl,\n clientSecret: z.string().default(''),\n }),\n /** Configuration for the OAuth Authorization Code flow. Previously called accessCode in OpenAPI 2.0.*/\n authorizationCode: flowsCommon.extend({\n 'type': z.literal('authorizationCode').default('authorizationCode'),\n authorizationUrl,\n 'x-usePkce': z.enum(pkceOptions).optional().default('no'),\n 'x-scalar-redirect-uri': z.string().optional().default(defaultRedirectUri),\n tokenUrl,\n 'clientSecret': z.string().default(''),\n }),\n })\n .partial()\n .default({\n implicit: { type: 'implicit', authorizationUrl: 'http://localhost:8080' },\n }),\n})\n\nexport const securityOauthSchema = oasSecuritySchemeOauth2.merge(extendedSecuritySchema)\n\nexport type SecuritySchemeOauth2 = z.infer<typeof securityOauthSchema>\nexport type SecuritySchemeOauth2Payload = z.input<typeof securityOauthSchema>\nexport type Oauth2Flow = NonNullable<\n SecuritySchemeOauth2['flows']['authorizationCode' | 'clientCredentials' | 'implicit' | 'password']\n>\n/** Payload for the oauth 2 flows + extensions */\nexport type Oauth2FlowPayload = NonNullable<SecuritySchemeOauth2Payload['flows']>[\n | 'authorizationCode'\n | 'clientCredentials'\n | 'implicit'\n | 'password'] &\n Record<`x-${string}`, string>\n\n// ---------------------------------------------------------------------------\n// Final Types\n\n/**\n * Security Requirement\n * Lists the required security schemes to execute this operation OR the whole collection/spec.\n * The name used for each property MUST correspond to a security scheme declared in the Security\n * Schemes under the Components Object.\n *\n * The key (name) here will be matched to the key of the securityScheme for linking\n *\n * @see https://spec.openapis.org/oas/latest.html#security-requirement-object\n */\nexport const oasSecurityRequirementSchema = z.record(z.string(), z.array(z.string()).optional().default([]))\n\n/** OAS Compliant security schemes */\nexport const oasSecuritySchemeSchema = z.union([\n oasSecuritySchemeApiKey,\n oasSecuritySchemeHttp,\n oasSecuritySchemeOauth2,\n oasSecuritySchemeOpenId,\n])\n\n/** Extended security schemes for workspace usage */\nexport const securitySchemeSchema = z\n .discriminatedUnion('type', [securityApiKeySchema, securityHttpSchema, securityOpenIdSchema, securityOauthSchema])\n .transform((data) => {\n // Set selected scopes from x-default-scopes\n if (data.type === 'oauth2' && data['x-default-scopes']?.length) {\n const keys = Object.keys(data.flows) as Array<keyof typeof data.flows>\n keys.forEach((key) => {\n if (data.flows[key]?.selectedScopes && data['x-default-scopes']) {\n data.flows[key].selectedScopes = [data['x-default-scopes']].flat()\n }\n })\n }\n return data\n })\n\n/**\n * Security Scheme Object\n *\n * @see https://spec.openapis.org/oas/latest.html#security-scheme-object\n */\nexport type SecurityScheme = z.infer<typeof securitySchemeSchema>\nexport type SecuritySchemePayload = z.input<typeof securitySchemeSchema>\n"],
|
|
5
|
+
"mappings": "AAAA,SAAS,SAAS;AAElB,SAA6B,oBAAoB;AAMjD,MAAM,cAAc,EAAE,OAAO;AAAA;AAAA,EAE3B,aAAa,EAAE,OAAO,EAAE,SAAS;AACnC,CAAC;AAED,MAAM,yBAAyB,EAAE,OAAO;AAAA,EACtC,KAAK,aAAa,MAAwC;AAAA;AAAA,EAE1D,SAAS,EAAE,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE;AAC3C,CAAC;AAKM,MAAM,yBAAyB,CAAC,SAAS,UAAU,QAAQ;AAElE,MAAM,0BAA0B,YAAY,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