mirror of
https://github.com/tribufu/sdk-js
synced 2026-02-04 18:33:09 +00:00
Generate code with openapi-generator (#5)
This commit is contained in:
55
src/models/GrantType.ts
Normal file
55
src/models/GrantType.ts
Normal file
@@ -0,0 +1,55 @@
|
||||
/* 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.
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
*/
|
||||
export const GrantType = {
|
||||
AuthorizationCode: 'authorization_code',
|
||||
ClientCredentials: 'client_credentials',
|
||||
Password: 'password',
|
||||
RefreshToken: 'refresh_token'
|
||||
} as const;
|
||||
export type GrantType = typeof GrantType[keyof typeof GrantType];
|
||||
|
||||
|
||||
export function instanceOfGrantType(value: any): boolean {
|
||||
for (const key in GrantType) {
|
||||
if (Object.prototype.hasOwnProperty.call(GrantType, key)) {
|
||||
if (GrantType[key as keyof typeof GrantType] === value) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
export function GrantTypeFromJSON(json: any): GrantType {
|
||||
return GrantTypeFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function GrantTypeFromJSONTyped(json: any, ignoreDiscriminator: boolean): GrantType {
|
||||
return json as GrantType;
|
||||
}
|
||||
|
||||
export function GrantTypeToJSON(value?: GrantType | null): any {
|
||||
return value as any;
|
||||
}
|
||||
|
||||
export function GrantTypeToJSONTyped(value: any, ignoreDiscriminator: boolean): GrantType {
|
||||
return value as GrantType;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user