UNPKG

@datocms/cma-client

Version:
51 lines (50 loc) 1.74 kB
import BaseResource from '../../BaseResource.js'; import type * as ApiTypes from '../ApiTypes.js'; import type * as RawApiTypes from '../RawApiTypes.js'; export default class Session extends BaseResource { static readonly TYPE: "session"; /** * Create a new session * * Read more: https://www.datocms.com/docs/content-management-api/resources/session/create * * @throws {ApiError} * @throws {TimeoutError} * * @deprecated This API call is to be considered private and might change without notice */ create(body: ApiTypes.SessionCreateSchema): Promise<ApiTypes.Session>; /** * Create a new session * * Read more: https://www.datocms.com/docs/content-management-api/resources/session/create * * @throws {ApiError} * @throws {TimeoutError} * * @deprecated This API call is to be considered private and might change without notice */ rawCreate(body: RawApiTypes.SessionCreateSchema): Promise<RawApiTypes.SessionCreateTargetSchema>; /** * Destroy the current session * * Read more: https://www.datocms.com/docs/content-management-api/resources/session/destroy * * @throws {ApiError} * @throws {TimeoutError} * * @deprecated This API call is to be considered private and might change without notice */ destroy(): Promise<void>; /** * Destroy the current session * * Read more: https://www.datocms.com/docs/content-management-api/resources/session/destroy * * @throws {ApiError} * @throws {TimeoutError} * * @deprecated This API call is to be considered private and might change without notice */ rawDestroy(): Promise<void>; }