Skip to content

The platform for continuously improving AI agents.

2.3 KB
Raw Blame
/* tslint:disable */
/* eslint-disable */
/**
 * Overbae API
 * Backend API for the Overclaw / Overmind platform.
 *
 * The version of the OpenAPI document: 2.0.0
 *
 *
 * 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 { UserMe } from './UserMe';
import {
    UserMeFromJSON,
    UserMeFromJSONTyped,
    UserMeToJSON,
    UserMeToJSONTyped,
} from './UserMe';

/**
 *
 * @export
 * @interface GuestSession
 */
export interface GuestSession {
    /**
     *
     * @type {string}
     * @memberof GuestSession
     */
    access: string;
    /**
     *
     * @type {string}
     * @memberof GuestSession
     */
    refresh: string;
    /**
     *
     * @type {string}
     * @memberof GuestSession
     */
    projectId: string;
    /**
     *
     * @type {UserMe}
     * @memberof GuestSession
     */
    user: UserMe;
}

/**
 * Check if a given object implements the GuestSession interface.
 */
export function instanceOfGuestSession(value: object): value is GuestSession {
    if (!('access' in value) || value['access'] === undefined) return false;
    if (!('refresh' in value) || value['refresh'] === undefined) return false;
    if (!('projectId' in value) || value['projectId'] === undefined) return false;
    if (!('user' in value) || value['user'] === undefined) return false;
    return true;
}

export function GuestSessionFromJSON(json: any): GuestSession {
    return GuestSessionFromJSONTyped(json, false);
}

export function GuestSessionFromJSONTyped(json: any, ignoreDiscriminator: boolean): GuestSession {
    if (json == null) {
        return json;
    }
    return {

        'access': json['access'],
        'refresh': json['refresh'],
        'projectId': json['project_id'],
        'user': UserMeFromJSON(json['user']),
    };
}

export function GuestSessionToJSON(json: any): GuestSession {
    return GuestSessionToJSONTyped(json, false);
}

export function GuestSessionToJSONTyped(value?: GuestSession | null, ignoreDiscriminator: boolean = false): any {
    if (value == null) {
        return value;
    }

    return {

        'access': value['access'],
        'refresh': value['refresh'],
        'project_id': value['projectId'],
        'user': UserMeToJSON(value['user']),
    };
}