@redocly/theme
Version:
Shared UI components lib
53 lines (47 loc) • 1.13 kB
text/typescript
import { UserClaims } from '@redocly/theme';
export type SecurityDetails = {
password?: string;
username?: string;
token?: {
token_type?: string;
access_token: string;
};
client_id?: string;
client_secret?: string;
scopes?: string[];
};
export type ConfigureRequestValues = {
headers?: Record<string, string>;
body?: Record<string, any>;
query?: Record<string, string>;
path?: Record<string, string>;
cookie?: Record<string, string>;
security?: SecurityDetails;
};
type Configure = {
requestValues?: ConfigureRequestValues;
};
type ContextProps = {
userClaims?: UserClaims;
operation: {
name: string;
path: string;
operationId?: string;
href?: string;
method: string;
};
};
export function configure(_context: ContextProps): Configure {
// const exampleRequestValues: ConfigureRequestValues = {
// body: {
// name: 'John Doe',
// },
// security: {
// token: {
// access_token: 'John Doe token',
// },
// },
// };
// return { requestValues: exampleRequestValues } satisfies Configure;
return {} satisfies Configure;
}