mirror of
https://github.com/tribufu/sdk-js
synced 2025-09-23 14:34:27 +00:00
131 lines
3.5 KiB
TypeScript
131 lines
3.5 KiB
TypeScript
/* tslint:disable */
|
|
/* eslint-disable */
|
|
/**
|
|
* Tribufu API
|
|
* REST API to access Tribufu services.
|
|
*
|
|
* The version of the OpenAPI document: 1.1.0
|
|
* Contact: contact@tribufu.com
|
|
*
|
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
* https://openapi-generator.tech
|
|
* Do not edit the class manually.
|
|
*/
|
|
|
|
import { mapValues } from '../runtime';
|
|
import type { CodeChallengeMethod } from './CodeChallengeMethod';
|
|
import {
|
|
CodeChallengeMethodFromJSON,
|
|
CodeChallengeMethodFromJSONTyped,
|
|
CodeChallengeMethodToJSON,
|
|
CodeChallengeMethodToJSONTyped,
|
|
} from './CodeChallengeMethod';
|
|
import type { ResponseType } from './ResponseType';
|
|
import {
|
|
ResponseTypeFromJSON,
|
|
ResponseTypeFromJSONTyped,
|
|
ResponseTypeToJSON,
|
|
ResponseTypeToJSONTyped,
|
|
} from './ResponseType';
|
|
|
|
/**
|
|
*
|
|
* @export
|
|
* @interface AuthorizeRequest
|
|
*/
|
|
export interface AuthorizeRequest {
|
|
/**
|
|
*
|
|
* @type {ResponseType}
|
|
* @memberof AuthorizeRequest
|
|
*/
|
|
responseType?: ResponseType;
|
|
/**
|
|
*
|
|
* @type {string}
|
|
* @memberof AuthorizeRequest
|
|
*/
|
|
clientId?: string | null;
|
|
/**
|
|
*
|
|
* @type {string}
|
|
* @memberof AuthorizeRequest
|
|
*/
|
|
codeChallenge?: string | null;
|
|
/**
|
|
*
|
|
* @type {CodeChallengeMethod}
|
|
* @memberof AuthorizeRequest
|
|
*/
|
|
codeChallengeMethod?: CodeChallengeMethod;
|
|
/**
|
|
*
|
|
* @type {string}
|
|
* @memberof AuthorizeRequest
|
|
*/
|
|
redirectUri?: string | null;
|
|
/**
|
|
*
|
|
* @type {string}
|
|
* @memberof AuthorizeRequest
|
|
*/
|
|
scope?: string | null;
|
|
/**
|
|
*
|
|
* @type {string}
|
|
* @memberof AuthorizeRequest
|
|
*/
|
|
state?: string | null;
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
* Check if a given object implements the AuthorizeRequest interface.
|
|
*/
|
|
export function instanceOfAuthorizeRequest(value: object): value is AuthorizeRequest {
|
|
return true;
|
|
}
|
|
|
|
export function AuthorizeRequestFromJSON(json: any): AuthorizeRequest {
|
|
return AuthorizeRequestFromJSONTyped(json, false);
|
|
}
|
|
|
|
export function AuthorizeRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): AuthorizeRequest {
|
|
if (json == null) {
|
|
return json;
|
|
}
|
|
return {
|
|
|
|
'responseType': json['response_type'] == null ? undefined : ResponseTypeFromJSON(json['response_type']),
|
|
'clientId': json['client_id'] == null ? undefined : json['client_id'],
|
|
'codeChallenge': json['code_challenge'] == null ? undefined : json['code_challenge'],
|
|
'codeChallengeMethod': json['code_challenge_method'] == null ? undefined : CodeChallengeMethodFromJSON(json['code_challenge_method']),
|
|
'redirectUri': json['redirect_uri'] == null ? undefined : json['redirect_uri'],
|
|
'scope': json['scope'] == null ? undefined : json['scope'],
|
|
'state': json['state'] == null ? undefined : json['state'],
|
|
};
|
|
}
|
|
|
|
export function AuthorizeRequestToJSON(json: any): AuthorizeRequest {
|
|
return AuthorizeRequestToJSONTyped(json, false);
|
|
}
|
|
|
|
export function AuthorizeRequestToJSONTyped(value?: AuthorizeRequest | null, ignoreDiscriminator: boolean = false): any {
|
|
if (value == null) {
|
|
return value;
|
|
}
|
|
|
|
return {
|
|
|
|
'response_type': ResponseTypeToJSON(value['responseType']),
|
|
'client_id': value['clientId'],
|
|
'code_challenge': value['codeChallenge'],
|
|
'code_challenge_method': CodeChallengeMethodToJSON(value['codeChallengeMethod']),
|
|
'redirect_uri': value['redirectUri'],
|
|
'scope': value['scope'],
|
|
'state': value['state'],
|
|
};
|
|
}
|
|
|