Generate code with openapi-generator (#5)

This commit is contained in:
Guilherme Werner
2025-05-27 08:11:22 -03:00
committed by GitHub
parent 1a8ffe89bc
commit be21a2496e
67 changed files with 8992 additions and 3492 deletions

View File

@@ -0,0 +1,130 @@
/* 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'],
};
}