@scalar/types
Version:
Types to work with Scalar packages
139 lines • 3.86 kB
TypeScript
/**
* This file is autogenerated. Do not edit it.
*
* Generated at: 2026-05-20T20:41:54.922Z
*/
/**
* Default selected OAuth scopes.
*
* @example
* ```json
* { "x-default-scopes": ["profile", "email"] }
* ```
*/
export type XDefaultScopes = {
/** Scopes pre-selected in the OAuth consent UI */
'x-default-scopes'?: string[];
};
/** Persisted OAuth authorization URL override. Do not export when exporting the document. */
export type XScalarAuthUrl = {
/** Override for the OAuth authorization endpoint URL */
'x-scalar-secret-auth-url'?: string;
};
/**
* Where OAuth2 credentials are sent for this security scheme.
*
* @example
* ```yaml
* x-scalar-credentials-location: header
* ```
*/
export type XScalarCredentialsLocation = {
/** Where OAuth2 credentials are sent (`header` or `body`) */
'x-scalar-credentials-location'?: 'header' | 'body';
};
/** Persisted OAuth client ID. Do not export when exporting the document. */
export type XScalarSecretClientId = {
/** OAuth client ID */
'x-scalar-secret-client-id': string;
};
/** Persisted OAuth client secret (sensitive). Do not export when exporting the document. */
export type XScalarSecretClientSecret = {
/** OAuth client secret */
'x-scalar-secret-client-secret': string;
};
/**
* Persisted HTTP basic credentials (sensitive). Do not export when exporting the document.
*
* @example
* ```yaml
* x-scalar-secret-username: api-user
* x-scalar-secret-password: secret
* ```
*/
export type XScalarSecretHTTP = {
/** HTTP basic auth username */
'x-scalar-secret-username': string;
/** HTTP basic auth password */
'x-scalar-secret-password': string;
};
/** Persisted OAuth redirect URI. Do not export when exporting the document. */
export type XScalarSecretRedirectUri = {
/** OAuth redirect URI registered for this client */
'x-scalar-secret-redirect-uri': string;
};
/** Persisted OAuth refresh token (sensitive). Do not export when exporting the document. */
export type XScalarSecretRefreshToken = {
/** Persisted OAuth refresh token */
'x-scalar-secret-refresh-token'?: string;
};
/**
* Persisted OAuth access token (sensitive). Do not export when exporting the document.
*
* @example
* ```yaml
* x-scalar-secret-token: eyJhbG...
* ```
*/
export type XScalarSecretToken = {
/** Persisted OAuth access token */
'x-scalar-secret-token': string;
};
/**
* Additional OAuth token request body parameters.
*
* @example
* ```yaml
* x-scalar-security-body:
* audience: https://api.example.com
* resource: user-profile
* ```
*/
export type XScalarSecurityBody = {
/** Additional body parameters for the OAuth token request */
'x-scalar-security-body'?: Record<string, string>;
};
/**
* Additional OAuth authorize query parameters.
*
* @example
* ```yaml
* x-scalar-security-query:
* prompt: consent
* audience: scalar
* ```
*/
export type XScalarSecurityQuery = {
/** Additional query parameters for the OAuth authorize request */
'x-scalar-security-query'?: Record<string, string>;
};
/** Persisted OAuth token URL override. Do not export when exporting the document. */
export type XScalarTokenUrl = {
/** Override for the OAuth token endpoint URL */
'x-scalar-secret-token-url'?: string;
};
/**
* Custom OAuth2 access token field name.
*
* @example
* ```yaml
* x-tokenName: custom_access_token
* ```
*/
export type XTokenName = {
/** Custom field name for the OAuth2 access token in responses */
'x-tokenName'?: string;
};
/**
* Enables Proof Key for Code Exchange (PKCE) for the OAuth2 authorization code flow.
*
* @example
* ```yaml
* x-usePkce: SHA-256
* ```
*/
export type XusePkce = {
/** PKCE mode: `SHA-256`, `plain`, or `no` (disabled) */
'x-usePkce': 'no' | 'SHA-256' | 'plain';
};
//# sourceMappingURL=index.d.ts.map