nylas
Version:
A NodeJS wrapper for the Nylas REST API for email, contacts, and calendar.
33 lines (32 loc) • 1.23 kB
TypeScript
import { Overrides } from '../config.js';
import { NylasBaseResponse, NylasResponse } from '../models/response.js';
import { CreateSessionRequest, Session } from '../models/scheduler.js';
import { Resource } from './resource.js';
/**
* The parameters for the {@link Sessions.create} method
* @property identifier The identifier of the grant to act upon
* @property requestBody The request body to create a session
*/
export interface CreateSessionParams {
requestBody: CreateSessionRequest;
}
/**
* The parameters for the {@link Sessions.destroy} method
* @property identifier The identifier of the grant to act upon
* @property sessionId The id of the Session to retrieve. Use "primary" to refer to the primary session associated with grant.
*/
export interface DestroySessionParams {
sessionId: string;
}
export declare class Sessions extends Resource {
/**
* Create a Session
* @return The created session
*/
create({ requestBody, overrides, }: CreateSessionParams & Overrides): Promise<NylasResponse<Session>>;
/**
* Delete a Session
* @return The deleted Session
*/
destroy({ sessionId, overrides, }: DestroySessionParams & Overrides): Promise<NylasBaseResponse>;
}