@scalar/workspace-store 0.70.0 → 0.71.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 +35 -0
- package/dist/entities/auth/schema.d.ts +150 -0
- package/dist/entities/auth/schema.d.ts.map +1 -1
- package/dist/events/definitions/operation.d.ts +1 -1
- package/dist/events/definitions/operation.d.ts.map +1 -1
- package/dist/helpers/is-file-schema.d.ts +4 -0
- package/dist/helpers/is-file-schema.d.ts.map +1 -0
- package/dist/helpers/is-file-schema.js +53 -0
- package/dist/helpers/resolve-form-schema.d.ts +1 -1
- package/dist/helpers/resolve-form-schema.d.ts.map +1 -1
- package/dist/helpers/resolve-form-schema.js +13 -3
- package/dist/request-example/builder/helpers/get-example-from-schema.d.ts +9 -2
- 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 +538 -74
- package/dist/request-example/builder/security/secret-types.d.ts +4 -0
- package/dist/request-example/builder/security/secret-types.d.ts.map +1 -1
- package/dist/request-example/context/security/extract-security-scheme-secrets.d.ts +5 -1
- package/dist/request-example/context/security/extract-security-scheme-secrets.d.ts.map +1 -1
- package/dist/request-example/context/security/extract-security-scheme-secrets.js +26 -6
- package/dist/request-example/context/security/get-selected-security.js +3 -3
- package/dist/request-example/context/security/resolve-credential-placeholders.d.ts +13 -0
- package/dist/request-example/context/security/resolve-credential-placeholders.d.ts.map +1 -0
- package/dist/request-example/context/security/resolve-credential-placeholders.js +73 -0
- package/dist/request-example/index.d.ts +3 -1
- package/dist/request-example/index.d.ts.map +1 -1
- package/dist/request-example/index.js +3 -1
- package/dist/schemas/extensions/document/x-scalar-sdk-installation.d.ts +4 -0
- package/dist/schemas/extensions/document/x-scalar-sdk-installation.d.ts.map +1 -1
- package/dist/schemas/extensions/document/x-scalar-sdk-installation.js +2 -0
- package/dist/schemas/extensions/operation/x-code-samples.d.ts +11 -0
- package/dist/schemas/extensions/operation/x-code-samples.d.ts.map +1 -1
- package/dist/schemas/extensions/operation/x-code-samples.js +2 -0
- package/dist/schemas/extensions/security/x-scalar-credential-placeholders.d.ts +24 -0
- package/dist/schemas/extensions/security/x-scalar-credential-placeholders.d.ts.map +1 -0
- package/dist/schemas/extensions/security/x-scalar-credential-placeholders.js +17 -0
- package/dist/schemas/reference-config/index.d.ts +30 -0
- package/dist/schemas/reference-config/index.d.ts.map +1 -1
- package/dist/schemas/reference-config/settings.d.ts +30 -0
- package/dist/schemas/reference-config/settings.d.ts.map +1 -1
- package/dist/schemas/v3.1/strict/info.d.ts +1 -0
- package/dist/schemas/v3.1/strict/info.d.ts.map +1 -1
- package/dist/schemas/v3.1/strict/openapi-document.d.ts +1050 -0
- package/dist/schemas/v3.1/strict/openapi-document.d.ts.map +1 -1
- package/dist/schemas/v3.1/strict/operation.d.ts +4 -0
- package/dist/schemas/v3.1/strict/operation.d.ts.map +1 -1
- package/dist/schemas/v3.1/strict/security-scheme.d.ts +27 -1
- package/dist/schemas/v3.1/strict/security-scheme.d.ts.map +1 -1
- package/dist/schemas/v3.1/strict/security-scheme.js +2 -1
- package/dist/schemas/v3.2/openapi/index.d.ts +1 -0
- package/dist/schemas/v3.2/openapi/index.d.ts.map +1 -1
- package/dist/schemas/v3.2/openapi/index.js +2 -0
- package/dist/schemas/v3.2/strict/info.d.ts +1 -0
- package/dist/schemas/v3.2/strict/info.d.ts.map +1 -1
- package/dist/schemas/v3.2/strict/openapi-document.d.ts +1050 -0
- package/dist/schemas/v3.2/strict/openapi-document.d.ts.map +1 -1
- package/dist/schemas/v3.2/strict/operation.d.ts +4 -0
- package/dist/schemas/v3.2/strict/operation.d.ts.map +1 -1
- package/dist/schemas/v3.2/strict/security-scheme.d.ts +27 -1
- package/dist/schemas/v3.2/strict/security-scheme.d.ts.map +1 -1
- package/dist/schemas/v3.2/strict/security-scheme.js +2 -1
- package/package.json +9 -9
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { SecuritySchemeOpenIdConnect } from '@scalar/types/api-reference';
|
|
1
2
|
import type { AuthSecretField } from '../../../helpers/auth-secret-fields.js';
|
|
2
3
|
import type { EncryptionSchemeType, SaslSchemeType } from './broker-scheme-types.js';
|
|
3
4
|
import type { XScalarAuthUrl, XScalarCredentialsLocation, XScalarSecretClientCertificate, XScalarSecretClientId, XScalarSecretClientSecret, XScalarSecretHTTP, XScalarSecretPrivateKey, XScalarSecretRedirectUri, XScalarSecretRefreshToken, XScalarSecretServiceName, XScalarSecretToken, XScalarTokenUrl } from '../../../schemas/extensions/security/index.js';
|
|
@@ -45,6 +46,9 @@ export type OAuth2ObjectSecret = Omit<OAuth2Object, 'flows'> & {
|
|
|
45
46
|
};
|
|
46
47
|
export type OpenIdConnectObjectSecret = OpenIdConnectObject & {
|
|
47
48
|
flows?: OAuthFlowsObjectSecret;
|
|
49
|
+
/** Configuration is kept separate so defaults cannot bypass discovery. */
|
|
50
|
+
configuredFlows?: SecuritySchemeOpenIdConnect['flows'];
|
|
51
|
+
'x-default-scopes'?: string[];
|
|
48
52
|
};
|
|
49
53
|
/**
|
|
50
54
|
* Base shape for AsyncAPI broker-only security schemes. These types live outside the strict
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"secret-types.d.ts","sourceRoot":"","sources":["../../../../src/request-example/builder/security/secret-types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAA;AACnE,OAAO,KAAK,EAAE,oBAAoB,EAAE,cAAc,EAAE,MAAM,wDAAwD,CAAA;AAClH,OAAO,KAAK,EACV,cAAc,EACd,0BAA0B,EAC1B,8BAA8B,EAC9B,qBAAqB,EACrB,yBAAyB,EACzB,iBAAiB,EACjB,uBAAuB,EACvB,wBAAwB,EACxB,yBAAyB,EACzB,wBAAwB,EACxB,kBAAkB,EAClB,eAAe,EAChB,MAAM,+BAA+B,CAAA;AACtC,OAAO,KAAK,EACV,0BAA0B,EAC1B,0BAA0B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AgF;AAChF,MAAM,MAAM,kBAAkB,GAAG;IAC/B,IAAI,EAAE,QAAQ,CAAA;IACd,EAAE,EAAE,MAAM,GAAG,UAAU,CAAA;IACvB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB,CAAA;AAED,MAAM,MAAM,kBAAkB,GAAG,CAAC,YAAY,GAAG,kBAAkB,CAAC,GAAG,kBAAkB,GAAG,qBAAqB,CAAA;AACjH,MAAM,MAAM,gBAAgB,GAAG,UAAU,GAAG,iBAAiB,GAAG,kBAAkB,GAAG,qBAAqB,CAAA;AAC1G,wGAAwG;AACxG,MAAM,MAAM,qBAAqB,GAAG,eAAe,CAAA;AACnD,MAAM,MAAM,kBAAkB,GAAG,IAAI,CAAC,YAAY,EAAE,OAAO,CAAC,GAAG;IAAE,KAAK,EAAE,sBAAsB,CAAA;CAAE,CAAA;AAChG,MAAM,MAAM,yBAAyB,GAAG,mBAAmB,GAAG;
|
|
1
|
+
{"version":3,"file":"secret-types.d.ts","sourceRoot":"","sources":["../../../../src/request-example/builder/security/secret-types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,6BAA6B,CAAA;AAE9E,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAA;AACnE,OAAO,KAAK,EAAE,oBAAoB,EAAE,cAAc,EAAE,MAAM,wDAAwD,CAAA;AAClH,OAAO,KAAK,EACV,cAAc,EACd,0BAA0B,EAC1B,8BAA8B,EAC9B,qBAAqB,EACrB,yBAAyB,EACzB,iBAAiB,EACjB,uBAAuB,EACvB,wBAAwB,EACxB,yBAAyB,EACzB,wBAAwB,EACxB,kBAAkB,EAClB,eAAe,EAChB,MAAM,+BAA+B,CAAA;AACtC,OAAO,KAAK,EACV,0BAA0B,EAC1B,0BAA0B,EAC1B,4BAA4B,EAC5B,iBAAiB,EACjB,iBAAiB,EAClB,MAAM,kCAAkC,CAAA;AACzC,OAAO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AAE1F,MAAM,MAAM,0BAA0B,GAClC,kBAAkB,GAClB,gBAAgB,GAChB,qBAAqB,GACrB,yBAAyB,GACzB,kBAAkB,GAClB,gBAAgB,GAChB,gBAAgB,GAChB,sBAAsB,GACtB,kBAAkB,CAAA"}
|
|
@@ -1,10 +1,14 @@
|
|
|
1
|
+
import type { SecuritySchemeOpenIdConnect } from '@scalar/types/api-reference';
|
|
1
2
|
import type { SecurityScheme } from '@scalar/types/entities';
|
|
2
3
|
import type { AuthStore } from '@scalar/workspace-store/entities/auth';
|
|
3
4
|
import type { DeepPartial } from '@scalar/workspace-store/helpers/overrides-proxy';
|
|
4
5
|
import type { SecuritySchemeObject } from '@scalar/workspace-store/schemas/v3.2/strict/openapi-document';
|
|
6
|
+
import type { PartialDeep } from 'type-fest';
|
|
5
7
|
import type { BrokerApiKeyObject, EncryptionObjectSecret, SaslObjectSecret, SecuritySchemeObjectSecret } from '../../builder/security/secret-types.js';
|
|
6
8
|
/** A combined scheme that includes both the auth store secrets and a deep partial of the config auth */
|
|
7
|
-
export type ConfigAuthScheme = SecuritySchemeObject & DeepPartial<SecurityScheme
|
|
9
|
+
export type ConfigAuthScheme = SecuritySchemeObject & (DeepPartial<Exclude<SecurityScheme, {
|
|
10
|
+
type: 'openIdConnect';
|
|
11
|
+
}>> | PartialDeep<SecuritySchemeOpenIdConnect>);
|
|
8
12
|
type BrokerSchemeType = SaslObjectSecret['type'] | EncryptionObjectSecret['type'] | 'X509' | 'gssapi';
|
|
9
13
|
type BrokerAuthScheme = {
|
|
10
14
|
[T in BrokerSchemeType]: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"extract-security-scheme-secrets.d.ts","sourceRoot":"","sources":["../../../../src/request-example/context/security/extract-security-scheme-secrets.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAA;AAC5D,OAAO,KAAK,EAAE,SAAS,EAA2C,MAAM,uCAAuC,CAAA;AAE/G,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iDAAiD,CAAA;AAQlF,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,8DAA8D,CAAA;
|
|
1
|
+
{"version":3,"file":"extract-security-scheme-secrets.d.ts","sourceRoot":"","sources":["../../../../src/request-example/context/security/extract-security-scheme-secrets.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,6BAA6B,CAAA;AAC9E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAA;AAC5D,OAAO,KAAK,EAAE,SAAS,EAA2C,MAAM,uCAAuC,CAAA;AAE/G,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iDAAiD,CAAA;AAQlF,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,8DAA8D,CAAA;AACxG,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,WAAW,CAAA;AAE5C,OAAO,KAAK,EAEV,kBAAkB,EAClB,sBAAsB,EAWtB,gBAAgB,EAChB,0BAA0B,EAG3B,MAAM,iDAAiD,CAAA;AAGxD,wGAAwG;AACxG,MAAM,MAAM,gBAAgB,GAAG,oBAAoB,GACjD,CAAC,WAAW,CAAC,OAAO,CAAC,cAAc,EAAE;IAAE,IAAI,EAAE,eAAe,CAAA;CAAE,CAAC,CAAC,GAAG,WAAW,CAAC,2BAA2B,CAAC,CAAC,CAAA;AAE9G,KAAK,gBAAgB,GAAG,gBAAgB,CAAC,MAAM,CAAC,GAAG,sBAAsB,CAAC,MAAM,CAAC,GAAG,MAAM,GAAG,QAAQ,CAAA;AACrG,KAAK,gBAAgB,GAAG;KACrB,CAAC,IAAI,gBAAgB,GAAG;QACvB,IAAI,EAAE,CAAC,CAAA;QACP,WAAW,CAAC,EAAE,MAAM,CAAA;QACpB,QAAQ,CAAC,EAAE,MAAM,CAAA;QACjB,QAAQ,CAAC,EAAE,MAAM,CAAA;QACjB,KAAK,CAAC,EAAE,MAAM,CAAA;KACf;CACF,CAAC,gBAAgB,CAAC,CAAA;AAuQnB,6DAA6D;AAC7D,eAAO,MAAM,4BAA4B,WAE/B,gBAAgB,GAAG,gBAAgB,GAAG,CAAC,kBAAkB,GAAG;IAAE,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,aAC5E,SAAS,QACd,MAAM,gBACE,MAAM,sBACA,MAAM,KACzB,0BA+IF,CAAA"}
|
|
@@ -227,21 +227,41 @@ scheme, authStore, name, documentSlug, oauth2RedirectUri) => {
|
|
|
227
227
|
'x-default-scopes': mergedDefaultScopes,
|
|
228
228
|
};
|
|
229
229
|
}
|
|
230
|
-
//
|
|
230
|
+
// Configuration supplies defaults, but only discovery can make an OIDC flow available.
|
|
231
231
|
if (scheme.type === 'openIdConnect') {
|
|
232
|
+
const { flows: configuredFlows, ...baseScheme } = scheme;
|
|
232
233
|
const storeSecrets = secrets?.type === 'openIdConnect' ? secrets : undefined;
|
|
233
|
-
const
|
|
234
|
+
const discoveredFlows = {
|
|
234
235
|
implicit: storeSecrets?.implicit,
|
|
235
236
|
password: storeSecrets?.password,
|
|
236
237
|
clientCredentials: storeSecrets?.clientCredentials,
|
|
237
238
|
authorizationCode: storeSecrets?.authorizationCode,
|
|
238
239
|
deviceAuthorization: storeSecrets?.deviceAuthorization,
|
|
239
|
-
}
|
|
240
|
-
|
|
241
|
-
|
|
240
|
+
};
|
|
241
|
+
const configuredKeys = objectEntries(configuredFlows ?? {}).filter(([, flow]) => isObject(flow));
|
|
242
|
+
const preferredFlow = configuredKeys.length === 1 ? configuredKeys[0]?.[0] : undefined;
|
|
243
|
+
const flows = Object.fromEntries(objectEntries(discoveredFlows)
|
|
244
|
+
.filter(([, flow]) => flow !== undefined)
|
|
245
|
+
.map(([key, flow]) => [
|
|
246
|
+
key,
|
|
247
|
+
{
|
|
248
|
+
// Use the auth UI's shared ordering mechanism for the initial tab.
|
|
249
|
+
...(key === preferredFlow ? { 'x-order': -1 } : {}),
|
|
250
|
+
...configuredFlows?.[key],
|
|
251
|
+
...flow,
|
|
252
|
+
},
|
|
253
|
+
]));
|
|
254
|
+
const extracted = extractOAuthFlowSecrets(flows, storeSecrets, oauth2RedirectUri, false);
|
|
255
|
+
// Seed scope defaults even before discovery so selecting an optional scheme keeps them.
|
|
256
|
+
const configuredScopes = configuredKeys
|
|
257
|
+
.filter(([key]) => !storeSecrets || discoveredFlows[key] !== undefined)
|
|
258
|
+
.flatMap(([, flow]) => flow?.selectedScopes ?? []);
|
|
259
|
+
const defaultScopes = Array.from(new Set([...(scheme['x-default-scopes'] ?? []), ...configuredScopes]));
|
|
242
260
|
return {
|
|
243
|
-
...
|
|
261
|
+
...baseScheme,
|
|
262
|
+
...(configuredFlows ? { configuredFlows } : {}),
|
|
244
263
|
...(objectEntries(extracted.flows).length ? { flows: extracted.flows } : {}),
|
|
264
|
+
...(defaultScopes.length ? { 'x-default-scopes': defaultScopes } : {}),
|
|
245
265
|
};
|
|
246
266
|
}
|
|
247
267
|
// SASL-style schemes (userPassword, plain, scramSha256, scramSha512): username + password,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { getResolvedRef } from '@scalar/workspace-store/helpers/get-resolved-ref';
|
|
2
2
|
import { isAuthOptional } from './is-auth-optional.js';
|
|
3
|
-
/** Extracts the default scopes for a security scheme
|
|
3
|
+
/** Extracts the default scopes for a security scheme for OAuth2 and OpenID Connect */
|
|
4
4
|
const getDefaultScopes = (scheme) => {
|
|
5
|
-
if (scheme?.type !== 'oauth2') {
|
|
5
|
+
if (scheme?.type !== 'oauth2' && scheme?.type !== 'openIdConnect') {
|
|
6
6
|
return [];
|
|
7
7
|
}
|
|
8
8
|
return scheme['x-default-scopes'] ?? [];
|
|
@@ -13,7 +13,7 @@ const applyDefaultScopes = (requirement, securitySchemes) => {
|
|
|
13
13
|
return [name, [...scopes]];
|
|
14
14
|
}
|
|
15
15
|
const scheme = getResolvedRef(securitySchemes[name]);
|
|
16
|
-
const defaultScopes = scheme
|
|
16
|
+
const defaultScopes = getDefaultScopes(scheme);
|
|
17
17
|
if (Array.isArray(defaultScopes) && defaultScopes.length > 0) {
|
|
18
18
|
return [name, [...defaultScopes]];
|
|
19
19
|
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { SecuritySchemeObjectSecret } from '../../builder/security/secret-types.js';
|
|
2
|
+
/** The original template remains in the document; these values are only used for rendering and copying. */
|
|
3
|
+
export type ResolvedCredentialPlaceholders = {
|
|
4
|
+
content: string;
|
|
5
|
+
displayContent: string;
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* Insert explicitly declared {{name}} placeholders from the selected security schemes.
|
|
9
|
+
* Missing values and ambiguous names stay unchanged. Substitutions are literal, single-pass,
|
|
10
|
+
* and never written back to the API description. Masking is separate from copyable content.
|
|
11
|
+
*/
|
|
12
|
+
export declare const resolveCredentialPlaceholders: (template: string, securitySchemes: SecuritySchemeObjectSecret[]) => ResolvedCredentialPlaceholders;
|
|
13
|
+
//# sourceMappingURL=resolve-credential-placeholders.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolve-credential-placeholders.d.ts","sourceRoot":"","sources":["../../../../src/request-example/context/security/resolve-credential-placeholders.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,iDAAiD,CAAA;AAMjG,2GAA2G;AAC3G,MAAM,MAAM,8BAA8B,GAAG;IAC3C,OAAO,EAAE,MAAM,CAAA;IACf,cAAc,EAAE,MAAM,CAAA;CACvB,CAAA;AA+BD;;;;GAIG;AACH,eAAO,MAAM,6BAA6B,aAC9B,MAAM,mBACC,0BAA0B,EAAE,KAC5C,8BA+CF,CAAA"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { CREDENTIAL_PLACEHOLDER_FIELDS } from '@scalar/helpers/http/credential-placeholder-fields';
|
|
2
|
+
import { isObject } from '@scalar/helpers/object/is-object';
|
|
3
|
+
import { encode } from 'js-base64';
|
|
4
|
+
/** Use the same OAuth flow as the request builder, never credentials from inactive flows. */
|
|
5
|
+
const getCredentialValues = (scheme) => {
|
|
6
|
+
if (scheme.type === 'apiKey') {
|
|
7
|
+
return { token: scheme['x-scalar-secret-token'] };
|
|
8
|
+
}
|
|
9
|
+
if (scheme.type === 'http') {
|
|
10
|
+
return scheme.scheme === 'basic'
|
|
11
|
+
? { username: scheme['x-scalar-secret-username'], password: scheme['x-scalar-secret-password'] }
|
|
12
|
+
: { token: scheme['x-scalar-secret-token'] };
|
|
13
|
+
}
|
|
14
|
+
if (scheme.type === 'oauth2' || scheme.type === 'openIdConnect') {
|
|
15
|
+
const flow = Object.values(scheme.flows ?? {}).find((flow) => flow?.['x-scalar-secret-token']);
|
|
16
|
+
if (!flow) {
|
|
17
|
+
return {};
|
|
18
|
+
}
|
|
19
|
+
return {
|
|
20
|
+
token: flow['x-scalar-secret-token'],
|
|
21
|
+
clientId: flow['x-scalar-secret-client-id'],
|
|
22
|
+
clientSecret: 'x-scalar-secret-client-secret' in flow ? flow['x-scalar-secret-client-secret'] : undefined,
|
|
23
|
+
username: 'x-scalar-secret-username' in flow ? flow['x-scalar-secret-username'] : undefined,
|
|
24
|
+
password: 'x-scalar-secret-password' in flow ? flow['x-scalar-secret-password'] : undefined,
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
return {};
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* Insert explicitly declared {{name}} placeholders from the selected security schemes.
|
|
31
|
+
* Missing values and ambiguous names stay unchanged. Substitutions are literal, single-pass,
|
|
32
|
+
* and never written back to the API description. Masking is separate from copyable content.
|
|
33
|
+
*/
|
|
34
|
+
export const resolveCredentialPlaceholders = (template, securitySchemes) => {
|
|
35
|
+
const bindings = new Map();
|
|
36
|
+
const maskedValues = new Set();
|
|
37
|
+
for (const scheme of securitySchemes) {
|
|
38
|
+
const values = getCredentialValues(scheme);
|
|
39
|
+
const extension = scheme['x-scalar-credential-placeholders'];
|
|
40
|
+
const mappings = isObject(extension) ? Object.entries(extension) : [];
|
|
41
|
+
// A public field must never unmask an equal value belonging to another secret field.
|
|
42
|
+
for (const [field, value] of Object.entries(values)) {
|
|
43
|
+
if (!value) {
|
|
44
|
+
continue;
|
|
45
|
+
}
|
|
46
|
+
const fieldMappings = mappings.filter(([, mapping]) => isObject(mapping) && mapping.field === field);
|
|
47
|
+
if (!fieldMappings.length || fieldMappings.some(([, mapping]) => mapping.mask !== false)) {
|
|
48
|
+
maskedValues.add(value);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
if (scheme.type === 'http' && scheme.scheme === 'basic') {
|
|
52
|
+
maskedValues.add(encode(`${values.username ?? ''}:${values.password ?? ''}`));
|
|
53
|
+
}
|
|
54
|
+
for (const [name, mapping] of mappings) {
|
|
55
|
+
if (!isObject(mapping) || !CREDENTIAL_PLACEHOLDER_FIELDS.some((field) => field === mapping.field)) {
|
|
56
|
+
continue;
|
|
57
|
+
}
|
|
58
|
+
const value = values[mapping.field];
|
|
59
|
+
bindings.set(name, bindings.has(name) || !value ? null : { value, mask: mapping.mask !== false });
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
// Resolve each string once so placeholder-like text inside credentials stays literal.
|
|
63
|
+
const replace = (mask) => template.replace(/\{\{([A-Za-z_][A-Za-z0-9_.-]*)\}\}/g, (placeholder, name) => {
|
|
64
|
+
const binding = bindings.get(name);
|
|
65
|
+
if (!binding) {
|
|
66
|
+
return placeholder;
|
|
67
|
+
}
|
|
68
|
+
return mask && (binding.mask || [...maskedValues].some((secret) => secret && binding.value.includes(secret)))
|
|
69
|
+
? '••••••••'
|
|
70
|
+
: binding.value;
|
|
71
|
+
});
|
|
72
|
+
return { content: replace(false), displayContent: replace(true) };
|
|
73
|
+
};
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
export type { ApiKeyObjectSecret, BuildRequestData, BuildRequestFailureCode, BuildRequestResult, EncryptionObjectSecret, GssapiObjectSecret, HttpObjectSecret, OAuth2ObjectSecret, OAuthFlowAuthorizationCodeSecret, OAuthFlowClientCredentialsSecret, OAuthFlowDeviceAuthorizationSecret, OAuthFlowImplicitSecret, OAuthFlowPasswordSecret, OAuthFlowsObjectSecret, OpenIdConnectObjectSecret, RequestPayload, ResolveRequestFactoryUrlError, ResolveRequestFactoryUrlResult, SaslObjectSecret, SecuritySchemeObjectSecret, X509ObjectSecret, } from './builder/index.js';
|
|
2
2
|
export { BUILD_REQUEST_FAILED, INVALID_REQUEST_FACTORY_URL, MISSING_REQUEST_SERVER_BASE, type RequestFactory, type SerializedFormProperty, buildDottedNestedRowPredicate, buildRequest, buildRequestSecurity, coerceLeafValueToSchemaType, coerceUntypedValue, deSerializeParameter, deSerializeSchemaValue, filterDisabledProperties, filterGlobalCookie, getEnvironmentVariables, getExample, getExampleFromBody, getExampleFromSchema, getResolvedUrl, getSchemaExampleFromBody, getSelectedBodyContentType, getServerVariables, isEncryptionSchemeType, isParamDisabled, isSaslSchemeType, requestFactory, resolveExecutableRequestUrl, resolveLeafSchema, resolveRequestFactoryUrl, serializeContentValue, serializeCookieStyle, serializeDeepObjectStyle, serializeFormPropertyWithEncoding, serializeFormStyle, serializeFormStyleForCookies, serializeMultipartArray, serializePipeDelimitedStyle, serializeSimpleStyle, serializeSpaceDelimitedStyle, } from './builder/index.js';
|
|
3
|
-
export { needsMultipartEncoding } from './builder/body/build-multipart.js';
|
|
3
|
+
export { getMultipartItemSchema, needsMultipartEncoding } from './builder/body/build-multipart.js';
|
|
4
4
|
export { buildRequestBody } from './builder/body/build-request-body.js';
|
|
5
5
|
export { serializeMultipartBody } from './builder/body/encode-multipart-body.js';
|
|
6
|
+
export { MAX_MULTIPART_NESTING } from './builder/body/multipart-limits.js';
|
|
6
7
|
export type { MergedSecuritySchemes } from './context/index.js';
|
|
7
8
|
export { type BuildRequestExampleContext, combineParams, filterDisabledDefaultHeaders, getActiveEnvironment, getActiveProxyUrl, getDefaultHeaders, getRequestExampleContext, getSecurityRequirements, getSecuritySchemes, getSelectedSecurity, getSelectedServer, getServers, isAuthOptional, mergeSecurity, restoreConventionalDefaultHeaderNames, restoreConventionalHeaderName, } from './context/index.js';
|
|
9
|
+
export { resolveCredentialPlaceholders } from './context/security/resolve-credential-placeholders.js';
|
|
8
10
|
export { CONTEXT_FUNCTION_NAMES, type ContextFunctionEntry, type ContextFunctionName, POPULAR_CONTEXT_FUNCTION_KEYS, contextFunctions, getContextFunctionComment, isContextFunctionName, } from './functions.js';
|
|
9
11
|
export { createVariablesStoreForRequest } from './variable-store/index.js';
|
|
10
12
|
export type { VariableEntry, VariablesStore } from './variable-store/types.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/request-example/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,kBAAkB,EAClB,gBAAgB,EAChB,uBAAuB,EACvB,kBAAkB,EAClB,sBAAsB,EACtB,kBAAkB,EAClB,gBAAgB,EAChB,kBAAkB,EAClB,gCAAgC,EAChC,gCAAgC,EAChC,kCAAkC,EAClC,uBAAuB,EACvB,uBAAuB,EACvB,sBAAsB,EACtB,yBAAyB,EACzB,cAAc,EACd,6BAA6B,EAC7B,8BAA8B,EAC9B,gBAAgB,EAChB,0BAA0B,EAC1B,gBAAgB,GACjB,MAAM,WAAW,CAAA;AAClB,OAAO,EACL,oBAAoB,EACpB,2BAA2B,EAC3B,2BAA2B,EAC3B,KAAK,cAAc,EACnB,KAAK,sBAAsB,EAC3B,6BAA6B,EAC7B,YAAY,EACZ,oBAAoB,EACpB,2BAA2B,EAC3B,kBAAkB,EAClB,oBAAoB,EACpB,sBAAsB,EACtB,wBAAwB,EACxB,kBAAkB,EAClB,uBAAuB,EACvB,UAAU,EACV,kBAAkB,EAClB,oBAAoB,EACpB,cAAc,EACd,wBAAwB,EACxB,0BAA0B,EAC1B,kBAAkB,EAClB,sBAAsB,EACtB,eAAe,EACf,gBAAgB,EAChB,cAAc,EACd,2BAA2B,EAC3B,iBAAiB,EACjB,wBAAwB,EACxB,qBAAqB,EACrB,oBAAoB,EACpB,wBAAwB,EACxB,iCAAiC,EACjC,kBAAkB,EAClB,4BAA4B,EAC5B,uBAAuB,EACvB,2BAA2B,EAC3B,oBAAoB,EACpB,4BAA4B,GAC7B,MAAM,WAAW,CAAA;AAClB,OAAO,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/request-example/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,kBAAkB,EAClB,gBAAgB,EAChB,uBAAuB,EACvB,kBAAkB,EAClB,sBAAsB,EACtB,kBAAkB,EAClB,gBAAgB,EAChB,kBAAkB,EAClB,gCAAgC,EAChC,gCAAgC,EAChC,kCAAkC,EAClC,uBAAuB,EACvB,uBAAuB,EACvB,sBAAsB,EACtB,yBAAyB,EACzB,cAAc,EACd,6BAA6B,EAC7B,8BAA8B,EAC9B,gBAAgB,EAChB,0BAA0B,EAC1B,gBAAgB,GACjB,MAAM,WAAW,CAAA;AAClB,OAAO,EACL,oBAAoB,EACpB,2BAA2B,EAC3B,2BAA2B,EAC3B,KAAK,cAAc,EACnB,KAAK,sBAAsB,EAC3B,6BAA6B,EAC7B,YAAY,EACZ,oBAAoB,EACpB,2BAA2B,EAC3B,kBAAkB,EAClB,oBAAoB,EACpB,sBAAsB,EACtB,wBAAwB,EACxB,kBAAkB,EAClB,uBAAuB,EACvB,UAAU,EACV,kBAAkB,EAClB,oBAAoB,EACpB,cAAc,EACd,wBAAwB,EACxB,0BAA0B,EAC1B,kBAAkB,EAClB,sBAAsB,EACtB,eAAe,EACf,gBAAgB,EAChB,cAAc,EACd,2BAA2B,EAC3B,iBAAiB,EACjB,wBAAwB,EACxB,qBAAqB,EACrB,oBAAoB,EACpB,wBAAwB,EACxB,iCAAiC,EACjC,kBAAkB,EAClB,4BAA4B,EAC5B,uBAAuB,EACvB,2BAA2B,EAC3B,oBAAoB,EACpB,4BA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Y_URL, MISSING_REQUEST_SERVER_BASE, buildDottedNestedRowPredicate, buildRequest, buildRequestSecurity, coerceLeafValueToSchemaType, coerceUntypedValue, deSerializeParameter, deSerializeSchemaValue, filterDisabledProperties, filterGlobalCookie, getEnvironmentVariables, getExample, getExampleFromBody, getExampleFromSchema, getResolvedUrl, getSchemaExampleFromBody, getSelectedBodyContentType, getServerVariables, isEncryptionSchemeType, isParamDisabled, isSaslSchemeType, requestFactory, resolveExecutableRequestUrl, resolveLeafSchema, resolveRequestFactoryUrl, serializeContentValue, serializeCookieStyle, serializeDeepObjectStyle, serializeFormPropertyWithEncoding, serializeFormStyle, serializeFormStyleForCookies, serializeMultipartArray, serializePipeDelimitedStyle, serializeSimpleStyle, serializeSpaceDelimitedStyle, } from './builder/index.js';
|
|
2
|
-
export { needsMultipartEncoding } from './builder/body/build-multipart.js';
|
|
2
|
+
export { getMultipartItemSchema, needsMultipartEncoding } from './builder/body/build-multipart.js';
|
|
3
3
|
export { buildRequestBody } from './builder/body/build-request-body.js';
|
|
4
4
|
export { serializeMultipartBody } from './builder/body/encode-multipart-body.js';
|
|
5
|
+
export { MAX_MULTIPART_NESTING } from './builder/body/multipart-limits.js';
|
|
5
6
|
export { combineParams, filterDisabledDefaultHeaders, getActiveEnvironment, getActiveProxyUrl, getDefaultHeaders, getRequestExampleContext, getSecurityRequirements, getSecuritySchemes, getSelectedSecurity, getSelectedServer, getServers, isAuthOptional, mergeSecurity, restoreConventionalDefaultHeaderNames, restoreConventionalHeaderName, } from './context/index.js';
|
|
7
|
+
export { resolveCredentialPlaceholders } from './context/security/resolve-credential-placeholders.js';
|
|
6
8
|
export { CONTEXT_FUNCTION_NAMES, POPULAR_CONTEXT_FUNCTION_KEYS, contextFunctions, getContextFunctionComment, isContextFunctionName, } from './functions.js';
|
|
7
9
|
export { createVariablesStoreForRequest } from './variable-store/index.js';
|
|
8
10
|
export { getXmlBodyExample } from './xml/get-xml-body-example.js';
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export declare const XScalarSdkInstallationSchema: import("@scalar/typebox").TObject<{
|
|
2
2
|
'x-scalar-sdk-installation': import("@scalar/typebox").TOptional<import("@scalar/typebox").TArray<import("@scalar/typebox").TObject<{
|
|
3
3
|
lang: import("@scalar/typebox").TString;
|
|
4
|
+
label: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
4
5
|
description: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
5
6
|
source: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
6
7
|
}>>>;
|
|
@@ -9,6 +10,8 @@ export type XScalarSdkInstallation = {
|
|
|
9
10
|
/** Scalar SDK installation information. */
|
|
10
11
|
'x-scalar-sdk-installation'?: {
|
|
11
12
|
lang: string;
|
|
13
|
+
/** Display label for the SDK tab. Defaults to lang. */
|
|
14
|
+
label?: string;
|
|
12
15
|
/** Installation instructions in Markdown (supports fenced code blocks). */
|
|
13
16
|
description?: string;
|
|
14
17
|
/**
|
|
@@ -22,6 +25,7 @@ export type XScalarSdkInstallation = {
|
|
|
22
25
|
export declare const XScalarSdkInstallation: import("@scalar/validation").ObjectSchema<{
|
|
23
26
|
'x-scalar-sdk-installation': import("@scalar/validation").OptionalSchema<import("@scalar/validation").ArraySchema<import("@scalar/validation").ObjectSchema<{
|
|
24
27
|
lang: import("@scalar/validation").StringSchema;
|
|
28
|
+
label: import("@scalar/validation").OptionalSchema<import("@scalar/validation").StringSchema>;
|
|
25
29
|
description: import("@scalar/validation").OptionalSchema<import("@scalar/validation").StringSchema>;
|
|
26
30
|
source: import("@scalar/validation").OptionalSchema<import("@scalar/validation").StringSchema>;
|
|
27
31
|
}>>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"x-scalar-sdk-installation.d.ts","sourceRoot":"","sources":["../../../../src/schemas/extensions/document/x-scalar-sdk-installation.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"x-scalar-sdk-installation.d.ts","sourceRoot":"","sources":["../../../../src/schemas/extensions/document/x-scalar-sdk-installation.ts"],"names":[],"mappings":"AAUA,eAAO,MAAM,4BAA4B;;;;;;;EAEvC,CAAA;AAeF,MAAM,MAAM,sBAAsB,GAAG;IACnC,2CAA2C;IAC3C,2BAA2B,CAAC,EAAE;QAC5B,IAAI,EAAE,MAAM,CAAA;QACZ,uDAAuD;QACvD,KAAK,CAAC,EAAE,MAAM,CAAA;QACd,2EAA2E;QAC3E,WAAW,CAAC,EAAE,MAAM,CAAA;QACpB;;;;WAIG;QACH,MAAM,CAAC,EAAE,MAAM,CAAA;KAChB,EAAE,CAAA;CACJ,CAAA;AAED,eAAO,MAAM,sBAAsB;;;;;;;EAYlC,CAAA"}
|
|
@@ -2,6 +2,7 @@ import { Type } from '@scalar/typebox';
|
|
|
2
2
|
import { array, object, optional, string } from '@scalar/validation';
|
|
3
3
|
const XScalarSdkInstallationItemSchema = Type.Object({
|
|
4
4
|
lang: Type.String(),
|
|
5
|
+
label: Type.Optional(Type.String()),
|
|
5
6
|
description: Type.Optional(Type.String()),
|
|
6
7
|
source: Type.Optional(Type.String()),
|
|
7
8
|
});
|
|
@@ -10,6 +11,7 @@ export const XScalarSdkInstallationSchema = Type.Object({
|
|
|
10
11
|
});
|
|
11
12
|
const XScalarSdkInstallationItem = object({
|
|
12
13
|
lang: string(),
|
|
14
|
+
label: optional(string()),
|
|
13
15
|
description: optional(string()),
|
|
14
16
|
source: optional(string()),
|
|
15
17
|
}, {
|
|
@@ -2,6 +2,7 @@ export declare const XCodeSamplesSchema: import("@scalar/typebox").TObject<{
|
|
|
2
2
|
'x-codeSamples': import("@scalar/typebox").TOptional<import("@scalar/typebox").TArray<import("@scalar/typebox").TObject<{
|
|
3
3
|
lang: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
4
4
|
label: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
5
|
+
group: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
5
6
|
source: import("@scalar/typebox").TString;
|
|
6
7
|
example: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
7
8
|
contentType: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
@@ -9,6 +10,7 @@ export declare const XCodeSamplesSchema: import("@scalar/typebox").TObject<{
|
|
|
9
10
|
'x-code-samples': import("@scalar/typebox").TOptional<import("@scalar/typebox").TArray<import("@scalar/typebox").TObject<{
|
|
10
11
|
lang: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
11
12
|
label: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
13
|
+
group: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
12
14
|
source: import("@scalar/typebox").TString;
|
|
13
15
|
example: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
14
16
|
contentType: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
@@ -16,6 +18,7 @@ export declare const XCodeSamplesSchema: import("@scalar/typebox").TObject<{
|
|
|
16
18
|
'x-custom-examples': import("@scalar/typebox").TOptional<import("@scalar/typebox").TArray<import("@scalar/typebox").TObject<{
|
|
17
19
|
lang: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
18
20
|
label: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
21
|
+
group: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
19
22
|
source: import("@scalar/typebox").TString;
|
|
20
23
|
example: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
21
24
|
contentType: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
@@ -43,6 +46,7 @@ export declare const XCodeSamplesSchema: import("@scalar/typebox").TObject<{
|
|
|
43
46
|
'x-scalar-examples': import("@scalar/typebox").TOptional<import("@scalar/typebox").TArray<import("@scalar/typebox").TObject<{
|
|
44
47
|
lang: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
45
48
|
label: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
49
|
+
group: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
46
50
|
source: import("@scalar/typebox").TString;
|
|
47
51
|
example: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
48
52
|
contentType: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
@@ -51,6 +55,8 @@ export declare const XCodeSamplesSchema: import("@scalar/typebox").TObject<{
|
|
|
51
55
|
export type XCodeSample = {
|
|
52
56
|
lang?: string;
|
|
53
57
|
label?: string;
|
|
58
|
+
/** Optional heading in the code sample picker. */
|
|
59
|
+
group?: string;
|
|
54
60
|
source: string;
|
|
55
61
|
/** Request body example key used by this sample. */
|
|
56
62
|
example?: string;
|
|
@@ -74,6 +80,7 @@ export type XLanguageExample = {
|
|
|
74
80
|
export declare const XCodeSample: import("@scalar/validation").ObjectSchema<{
|
|
75
81
|
lang: import("@scalar/validation").OptionalSchema<import("@scalar/validation").StringSchema>;
|
|
76
82
|
label: import("@scalar/validation").OptionalSchema<import("@scalar/validation").StringSchema>;
|
|
83
|
+
group: import("@scalar/validation").OptionalSchema<import("@scalar/validation").StringSchema>;
|
|
77
84
|
source: import("@scalar/validation").StringSchema;
|
|
78
85
|
example: import("@scalar/validation").OptionalSchema<import("@scalar/validation").StringSchema>;
|
|
79
86
|
contentType: import("@scalar/validation").OptionalSchema<import("@scalar/validation").StringSchema>;
|
|
@@ -94,6 +101,7 @@ export declare const XCodeSamples: import("@scalar/validation").ObjectSchema<{
|
|
|
94
101
|
'x-codeSamples': import("@scalar/validation").OptionalSchema<import("@scalar/validation").ArraySchema<import("@scalar/validation").ObjectSchema<{
|
|
95
102
|
lang: import("@scalar/validation").OptionalSchema<import("@scalar/validation").StringSchema>;
|
|
96
103
|
label: import("@scalar/validation").OptionalSchema<import("@scalar/validation").StringSchema>;
|
|
104
|
+
group: import("@scalar/validation").OptionalSchema<import("@scalar/validation").StringSchema>;
|
|
97
105
|
source: import("@scalar/validation").StringSchema;
|
|
98
106
|
example: import("@scalar/validation").OptionalSchema<import("@scalar/validation").StringSchema>;
|
|
99
107
|
contentType: import("@scalar/validation").OptionalSchema<import("@scalar/validation").StringSchema>;
|
|
@@ -101,6 +109,7 @@ export declare const XCodeSamples: import("@scalar/validation").ObjectSchema<{
|
|
|
101
109
|
'x-code-samples': import("@scalar/validation").OptionalSchema<import("@scalar/validation").ArraySchema<import("@scalar/validation").ObjectSchema<{
|
|
102
110
|
lang: import("@scalar/validation").OptionalSchema<import("@scalar/validation").StringSchema>;
|
|
103
111
|
label: import("@scalar/validation").OptionalSchema<import("@scalar/validation").StringSchema>;
|
|
112
|
+
group: import("@scalar/validation").OptionalSchema<import("@scalar/validation").StringSchema>;
|
|
104
113
|
source: import("@scalar/validation").StringSchema;
|
|
105
114
|
example: import("@scalar/validation").OptionalSchema<import("@scalar/validation").StringSchema>;
|
|
106
115
|
contentType: import("@scalar/validation").OptionalSchema<import("@scalar/validation").StringSchema>;
|
|
@@ -108,6 +117,7 @@ export declare const XCodeSamples: import("@scalar/validation").ObjectSchema<{
|
|
|
108
117
|
'x-custom-examples': import("@scalar/validation").OptionalSchema<import("@scalar/validation").ArraySchema<import("@scalar/validation").ObjectSchema<{
|
|
109
118
|
lang: import("@scalar/validation").OptionalSchema<import("@scalar/validation").StringSchema>;
|
|
110
119
|
label: import("@scalar/validation").OptionalSchema<import("@scalar/validation").StringSchema>;
|
|
120
|
+
group: import("@scalar/validation").OptionalSchema<import("@scalar/validation").StringSchema>;
|
|
111
121
|
source: import("@scalar/validation").StringSchema;
|
|
112
122
|
example: import("@scalar/validation").OptionalSchema<import("@scalar/validation").StringSchema>;
|
|
113
123
|
contentType: import("@scalar/validation").OptionalSchema<import("@scalar/validation").StringSchema>;
|
|
@@ -135,6 +145,7 @@ export declare const XCodeSamples: import("@scalar/validation").ObjectSchema<{
|
|
|
135
145
|
'x-scalar-examples': import("@scalar/validation").OptionalSchema<import("@scalar/validation").ArraySchema<import("@scalar/validation").ObjectSchema<{
|
|
136
146
|
lang: import("@scalar/validation").OptionalSchema<import("@scalar/validation").StringSchema>;
|
|
137
147
|
label: import("@scalar/validation").OptionalSchema<import("@scalar/validation").StringSchema>;
|
|
148
|
+
group: import("@scalar/validation").OptionalSchema<import("@scalar/validation").StringSchema>;
|
|
138
149
|
source: import("@scalar/validation").StringSchema;
|
|
139
150
|
example: import("@scalar/validation").OptionalSchema<import("@scalar/validation").StringSchema>;
|
|
140
151
|
contentType: import("@scalar/validation").OptionalSchema<import("@scalar/validation").StringSchema>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"x-code-samples.d.ts","sourceRoot":"","sources":["../../../../src/schemas/extensions/operation/x-code-samples.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"x-code-samples.d.ts","sourceRoot":"","sources":["../../../../src/schemas/extensions/operation/x-code-samples.ts"],"names":[],"mappings":"AAwCA,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAQ7B,CAAA;AAEF,MAAM,MAAM,WAAW,GAAG;IACxB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,kDAAkD;IAClD,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,MAAM,EAAE,MAAM,CAAA;IACd,oDAAoD;IACpD,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,mDAAmD;IACnD,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB,CAAA;AAED,0CAA0C;AAC1C,MAAM,MAAM,iBAAiB,GAAG;IAC9B,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,oBAAoB,CAAC,EAAE,MAAM,CAAA;CAC9B,CAAA;AAED,yEAAyE;AACzE,MAAM,MAAM,gBAAgB,GAAG;IAC7B,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAChC,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB,CAAA;AAED,eAAO,MAAM,WAAW;;;;;;;EAOtB,CAAA;AAuBF,MAAM,MAAM,YAAY,GAAG;IACzB,eAAe,CAAC,EAAE,WAAW,EAAE,CAAA;IAC/B,gBAAgB,CAAC,EAAE,WAAW,EAAE,CAAA;IAChC,mBAAmB,CAAC,EAAE,WAAW,EAAE,CAAA;IACnC,UAAU,CAAC,EAAE;QACX,cAAc,CAAC,EAAE,iBAAiB,EAAE,CAAA;QACpC,mBAAmB,CAAC,EAAE,MAAM,EAAE,CAAA;KAC/B,CAAA;IACD,sBAAsB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAC/C,sBAAsB,CAAC,EAAE,gBAAgB,GAAG,gBAAgB,EAAE,CAAA;IAC9D,mBAAmB,CAAC,EAAE,WAAW,EAAE,CAAA;CACpC,CAAA;AAED,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAQvB,CAAA"}
|
|
@@ -3,6 +3,7 @@ import { array, object, optional, record, string, union, unknown } from '@scalar
|
|
|
3
3
|
const XCodeSampleSchema = Type.Object({
|
|
4
4
|
lang: Type.Optional(Type.String()),
|
|
5
5
|
label: Type.Optional(Type.String()),
|
|
6
|
+
group: Type.Optional(Type.String()),
|
|
6
7
|
source: Type.String(),
|
|
7
8
|
example: Type.Optional(Type.String()),
|
|
8
9
|
contentType: Type.Optional(Type.String()),
|
|
@@ -43,6 +44,7 @@ export const XCodeSamplesSchema = Type.Object({
|
|
|
43
44
|
export const XCodeSample = object({
|
|
44
45
|
lang: optional(string()),
|
|
45
46
|
label: optional(string()),
|
|
47
|
+
group: optional(string()),
|
|
46
48
|
source: string(),
|
|
47
49
|
example: optional(string()),
|
|
48
50
|
contentType: optional(string()),
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { CREDENTIAL_PLACEHOLDER_FIELDS } from '@scalar/helpers/http/credential-placeholder-fields';
|
|
2
|
+
import { type TLiteral } from '@scalar/typebox';
|
|
3
|
+
/** Credential fields that can be inserted into documentation examples. */
|
|
4
|
+
export type CredentialPlaceholderField = (typeof CREDENTIAL_PLACEHOLDER_FIELDS)[number];
|
|
5
|
+
/** Explicit bindings keep ordinary template syntax unrelated to authentication unchanged. */
|
|
6
|
+
export type XScalarCredentialPlaceholders = {
|
|
7
|
+
'x-scalar-credential-placeholders'?: Record<string, {
|
|
8
|
+
field: CredentialPlaceholderField;
|
|
9
|
+
mask?: boolean;
|
|
10
|
+
}>;
|
|
11
|
+
};
|
|
12
|
+
export declare const XScalarCredentialPlaceholdersSchema: import("@scalar/typebox").TObject<{
|
|
13
|
+
'x-scalar-credential-placeholders': import("@scalar/typebox").TOptional<import("@scalar/typebox").TRecord<import("@scalar/typebox").TString, import("@scalar/typebox").TObject<{
|
|
14
|
+
field: import("@scalar/typebox").TUnion<[TLiteral<"clientId" | "clientSecret" | "password" | "token" | "username">, ...TLiteral<"clientId" | "clientSecret" | "password" | "token" | "username">[]]>;
|
|
15
|
+
mask: import("@scalar/typebox").TOptional<import("@scalar/typebox").TBoolean>;
|
|
16
|
+
}>>>;
|
|
17
|
+
}>;
|
|
18
|
+
export declare const XScalarCredentialPlaceholders: import("@scalar/validation").ObjectSchema<{
|
|
19
|
+
'x-scalar-credential-placeholders': import("@scalar/validation").OptionalSchema<import("@scalar/validation").RecordSchema<import("@scalar/validation").StringSchema, import("@scalar/validation").ObjectSchema<{
|
|
20
|
+
field: import("@scalar/validation").UnionSchema<import("@scalar/validation").LiteralSchema<"clientId" | "clientSecret" | "password" | "token" | "username">[]>;
|
|
21
|
+
mask: import("@scalar/validation").OptionalSchema<import("@scalar/validation").BooleanSchema>;
|
|
22
|
+
}>>>;
|
|
23
|
+
}>;
|
|
24
|
+
//# sourceMappingURL=x-scalar-credential-placeholders.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"x-scalar-credential-placeholders.d.ts","sourceRoot":"","sources":["../../../../src/schemas/extensions/security/x-scalar-credential-placeholders.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,6BAA6B,EAAE,MAAM,oDAAoD,CAAA;AAClG,OAAO,EAAE,KAAK,QAAQ,EAAQ,MAAM,iBAAiB,CAAA;AAGrD,0EAA0E;AAC1E,MAAM,MAAM,0BAA0B,GAAG,CAAC,OAAO,6BAA6B,CAAC,CAAC,MAAM,CAAC,CAAA;AAEvF,6FAA6F;AAC7F,MAAM,MAAM,6BAA6B,GAAG;IAC1C,kCAAkC,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE;QAAE,KAAK,EAAE,0BAA0B,CAAC;QAAC,IAAI,CAAC,EAAE,OAAO,CAAA;KAAE,CAAC,CAAA;CAC3G,CAAA;AAED,eAAO,MAAM,mCAAmC;;;;;EAgB9C,CAAA;AAEF,eAAO,MAAM,6BAA6B;;;;;EAUxC,CAAA"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { CREDENTIAL_PLACEHOLDER_FIELDS } from '@scalar/helpers/http/credential-placeholder-fields';
|
|
2
|
+
import { Type } from '@scalar/typebox';
|
|
3
|
+
import { boolean, literal, object, optional, record, string, union } from '@scalar/validation';
|
|
4
|
+
export const XScalarCredentialPlaceholdersSchema = Type.Object({
|
|
5
|
+
'x-scalar-credential-placeholders': Type.Optional(Type.Record(Type.String(), Type.Object({
|
|
6
|
+
field: Type.Union(
|
|
7
|
+
// Keep the non-empty tuple shape used by downstream schema transformations.
|
|
8
|
+
CREDENTIAL_PLACEHOLDER_FIELDS.map((field) => Type.Literal(field))),
|
|
9
|
+
mask: Type.Optional(Type.Boolean()),
|
|
10
|
+
}))),
|
|
11
|
+
});
|
|
12
|
+
export const XScalarCredentialPlaceholders = object({
|
|
13
|
+
'x-scalar-credential-placeholders': optional(record(string(), object({
|
|
14
|
+
field: union(CREDENTIAL_PLACEHOLDER_FIELDS.map((field) => literal(field))),
|
|
15
|
+
mask: optional(boolean()),
|
|
16
|
+
}))),
|
|
17
|
+
});
|
|
@@ -347,6 +347,7 @@ export declare const ReferenceConfigSchema: import("@scalar/typebox").TObject<{
|
|
|
347
347
|
'x-codeSamples': import("@scalar/typebox").TOptional<TArray<import("@scalar/typebox").TObject<{
|
|
348
348
|
lang: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
349
349
|
label: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
350
|
+
group: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
350
351
|
source: import("@scalar/typebox").TString;
|
|
351
352
|
example: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
352
353
|
contentType: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
@@ -354,6 +355,7 @@ export declare const ReferenceConfigSchema: import("@scalar/typebox").TObject<{
|
|
|
354
355
|
'x-code-samples': import("@scalar/typebox").TOptional<TArray<import("@scalar/typebox").TObject<{
|
|
355
356
|
lang: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
356
357
|
label: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
358
|
+
group: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
357
359
|
source: import("@scalar/typebox").TString;
|
|
358
360
|
example: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
359
361
|
contentType: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
@@ -361,6 +363,7 @@ export declare const ReferenceConfigSchema: import("@scalar/typebox").TObject<{
|
|
|
361
363
|
'x-custom-examples': import("@scalar/typebox").TOptional<TArray<import("@scalar/typebox").TObject<{
|
|
362
364
|
lang: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
363
365
|
label: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
366
|
+
group: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
364
367
|
source: import("@scalar/typebox").TString;
|
|
365
368
|
example: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
366
369
|
contentType: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
@@ -388,6 +391,7 @@ export declare const ReferenceConfigSchema: import("@scalar/typebox").TObject<{
|
|
|
388
391
|
'x-scalar-examples': import("@scalar/typebox").TOptional<TArray<import("@scalar/typebox").TObject<{
|
|
389
392
|
lang: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
390
393
|
label: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
394
|
+
group: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
391
395
|
source: import("@scalar/typebox").TString;
|
|
392
396
|
example: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
393
397
|
contentType: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
@@ -1332,6 +1336,7 @@ export declare const ReferenceConfigSchema: import("@scalar/typebox").TObject<{
|
|
|
1332
1336
|
}>, import("@scalar/typebox").TObject<{
|
|
1333
1337
|
'x-scalar-sdk-installation': import("@scalar/typebox").TOptional<TArray<import("@scalar/typebox").TObject<{
|
|
1334
1338
|
lang: import("@scalar/typebox").TString;
|
|
1339
|
+
label: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
1335
1340
|
description: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
1336
1341
|
source: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
1337
1342
|
}>>>;
|
|
@@ -1485,6 +1490,11 @@ export declare const ReferenceConfigSchema: import("@scalar/typebox").TObject<{
|
|
|
1485
1490
|
deprecated: import("@scalar/typebox").TOptional<import("@scalar/typebox").TBoolean>;
|
|
1486
1491
|
}>, import("@scalar/typebox").TObject<{
|
|
1487
1492
|
'x-scalar-ignore': import("@scalar/typebox").TOptional<import("@scalar/typebox").TBoolean>;
|
|
1493
|
+
}>, import("@scalar/typebox").TObject<{
|
|
1494
|
+
'x-scalar-credential-placeholders': import("@scalar/typebox").TOptional<import("@scalar/typebox").TRecord<import("@scalar/typebox").TString, import("@scalar/typebox").TObject<{
|
|
1495
|
+
field: TLiteral<"clientId" | "clientSecret" | "password" | "token" | "username">;
|
|
1496
|
+
mask: import("@scalar/typebox").TOptional<import("@scalar/typebox").TBoolean>;
|
|
1497
|
+
}>>>;
|
|
1488
1498
|
}>]>, import("@scalar/typebox").TObject<{
|
|
1489
1499
|
type: TLiteral<"apiKey">;
|
|
1490
1500
|
name: import("@scalar/typebox").TString;
|
|
@@ -1494,6 +1504,11 @@ export declare const ReferenceConfigSchema: import("@scalar/typebox").TObject<{
|
|
|
1494
1504
|
deprecated: import("@scalar/typebox").TOptional<import("@scalar/typebox").TBoolean>;
|
|
1495
1505
|
}>, import("@scalar/typebox").TObject<{
|
|
1496
1506
|
'x-scalar-ignore': import("@scalar/typebox").TOptional<import("@scalar/typebox").TBoolean>;
|
|
1507
|
+
}>, import("@scalar/typebox").TObject<{
|
|
1508
|
+
'x-scalar-credential-placeholders': import("@scalar/typebox").TOptional<import("@scalar/typebox").TRecord<import("@scalar/typebox").TString, import("@scalar/typebox").TObject<{
|
|
1509
|
+
field: TLiteral<"clientId" | "clientSecret" | "password" | "token" | "username">;
|
|
1510
|
+
mask: import("@scalar/typebox").TOptional<import("@scalar/typebox").TBoolean>;
|
|
1511
|
+
}>>>;
|
|
1497
1512
|
}>]>, import("@scalar/typebox").TObject<{
|
|
1498
1513
|
type: TLiteral<"http">;
|
|
1499
1514
|
scheme: import("@scalar/typebox").TUnion<[TLiteral<"basic">, TLiteral<"bearer">]>;
|
|
@@ -1503,6 +1518,11 @@ export declare const ReferenceConfigSchema: import("@scalar/typebox").TObject<{
|
|
|
1503
1518
|
deprecated: import("@scalar/typebox").TOptional<import("@scalar/typebox").TBoolean>;
|
|
1504
1519
|
}>, import("@scalar/typebox").TObject<{
|
|
1505
1520
|
'x-scalar-ignore': import("@scalar/typebox").TOptional<import("@scalar/typebox").TBoolean>;
|
|
1521
|
+
}>, import("@scalar/typebox").TObject<{
|
|
1522
|
+
'x-scalar-credential-placeholders': import("@scalar/typebox").TOptional<import("@scalar/typebox").TRecord<import("@scalar/typebox").TString, import("@scalar/typebox").TObject<{
|
|
1523
|
+
field: TLiteral<"clientId" | "clientSecret" | "password" | "token" | "username">;
|
|
1524
|
+
mask: import("@scalar/typebox").TOptional<import("@scalar/typebox").TBoolean>;
|
|
1525
|
+
}>>>;
|
|
1506
1526
|
}>]>, import("@scalar/typebox").TObject<{
|
|
1507
1527
|
type: TLiteral<"mutualTLS">;
|
|
1508
1528
|
}>]>, import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TObject<{
|
|
@@ -1510,6 +1530,11 @@ export declare const ReferenceConfigSchema: import("@scalar/typebox").TObject<{
|
|
|
1510
1530
|
deprecated: import("@scalar/typebox").TOptional<import("@scalar/typebox").TBoolean>;
|
|
1511
1531
|
}>, import("@scalar/typebox").TObject<{
|
|
1512
1532
|
'x-scalar-ignore': import("@scalar/typebox").TOptional<import("@scalar/typebox").TBoolean>;
|
|
1533
|
+
}>, import("@scalar/typebox").TObject<{
|
|
1534
|
+
'x-scalar-credential-placeholders': import("@scalar/typebox").TOptional<import("@scalar/typebox").TRecord<import("@scalar/typebox").TString, import("@scalar/typebox").TObject<{
|
|
1535
|
+
field: TLiteral<"clientId" | "clientSecret" | "password" | "token" | "username">;
|
|
1536
|
+
mask: import("@scalar/typebox").TOptional<import("@scalar/typebox").TBoolean>;
|
|
1537
|
+
}>>>;
|
|
1513
1538
|
}>]>, import("@scalar/typebox").TObject<{
|
|
1514
1539
|
type: TLiteral<"oauth2">;
|
|
1515
1540
|
flows: import("@scalar/typebox").TRef<"OAuthFlowsObject">;
|
|
@@ -1521,6 +1546,11 @@ export declare const ReferenceConfigSchema: import("@scalar/typebox").TObject<{
|
|
|
1521
1546
|
deprecated: import("@scalar/typebox").TOptional<import("@scalar/typebox").TBoolean>;
|
|
1522
1547
|
}>, import("@scalar/typebox").TObject<{
|
|
1523
1548
|
'x-scalar-ignore': import("@scalar/typebox").TOptional<import("@scalar/typebox").TBoolean>;
|
|
1549
|
+
}>, import("@scalar/typebox").TObject<{
|
|
1550
|
+
'x-scalar-credential-placeholders': import("@scalar/typebox").TOptional<import("@scalar/typebox").TRecord<import("@scalar/typebox").TString, import("@scalar/typebox").TObject<{
|
|
1551
|
+
field: TLiteral<"clientId" | "clientSecret" | "password" | "token" | "username">;
|
|
1552
|
+
mask: import("@scalar/typebox").TOptional<import("@scalar/typebox").TBoolean>;
|
|
1553
|
+
}>>>;
|
|
1524
1554
|
}>]>, import("@scalar/typebox").TObject<{
|
|
1525
1555
|
type: TLiteral<"openIdConnect">;
|
|
1526
1556
|
openIdConnectUrl: import("@scalar/typebox").TString;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/schemas/reference-config/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,MAAM,EAAE,KAAK,QAAQ,EAAQ,MAAM,iBAAiB,CAAA;AAClE,OAAO,EAA2C,KAAK,gBAAgB,EAAE,MAAM,wBAAwB,CAAA;AACvG,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAE7C,OAAO,EAAE,KAAK,UAAU,EAAuC,MAAM,cAAc,CAAA;AACnF,OAAO,EAAE,KAAK,QAAQ,EAAmC,MAAM,YAAY,CAAA;AAC3E,OAAO,EAAE,KAAK,IAAI,EAA2B,MAAM,QAAQ,CAAA;AAC3D,OAAO,EAAE,KAAK,OAAO,EAAiC,MAAM,WAAW,CAAA;AACvE,OAAO,EAAE,KAAK,QAAQ,EAAmC,MAAM,YAA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