Files
authentik/packages/client-ts/src/models/AgentTokenResponse.ts
Marc 'risson' Schmitt ef1d0b0279 packages/client-ts: init (#21120)
Co-authored-by: Jens Langhammer <jens@goauthentik.io>
2026-03-26 13:34:48 +01:00

75 lines
1.8 KiB
TypeScript

/* tslint:disable */
/* eslint-disable */
/**
* authentik
* Making authentication simple.
*
* The version of the OpenAPI document: 2026.5.0-rc1
* Contact: hello@goauthentik.io
*
* 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';
/**
* Base serializer class which doesn't implement create/update methods
* @export
* @interface AgentTokenResponse
*/
export interface AgentTokenResponse {
/**
*
* @type {string}
* @memberof AgentTokenResponse
*/
token: string;
/**
*
* @type {number}
* @memberof AgentTokenResponse
*/
expiresIn?: number;
}
/**
* Check if a given object implements the AgentTokenResponse interface.
*/
export function instanceOfAgentTokenResponse(value: object): value is AgentTokenResponse {
if (!('token' in value) || value['token'] === undefined) return false;
return true;
}
export function AgentTokenResponseFromJSON(json: any): AgentTokenResponse {
return AgentTokenResponseFromJSONTyped(json, false);
}
export function AgentTokenResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): AgentTokenResponse {
if (json == null) {
return json;
}
return {
'token': json['token'],
'expiresIn': json['expires_in'] == null ? undefined : json['expires_in'],
};
}
export function AgentTokenResponseToJSON(json: any): AgentTokenResponse {
return AgentTokenResponseToJSONTyped(json, false);
}
export function AgentTokenResponseToJSONTyped(value?: AgentTokenResponse | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'token': value['token'],
'expires_in': value['expiresIn'],
};
}