magicbell
Version:
MagicBell API wrapper
42 lines (41 loc) • 1.77 kB
TypeScript
import { type FromSchema } from 'json-schema-to-ts';
import { Resource } from '../client/resource.js';
import { type RequestOptions } from '../client/types.js';
import * as schemas from '../schemas/imports.js';
type CreateImportsResponse = FromSchema<typeof schemas.CreateImportsResponseSchema>;
type CreateImportsPayload = FromSchema<typeof schemas.CreateImportsPayloadSchema>;
type GetImportsResponse = FromSchema<typeof schemas.GetImportsResponseSchema>;
export declare class Imports extends Resource {
path: string;
entity: string;
/**
* Enqueues an import - currently only supported for users. Amongst other things,
* the users import allows associating slack channels (if you have already setup
* the oauth apps).
*
* @param options - override client request options.
* @returns
**/
create(options?: RequestOptions): Promise<CreateImportsResponse>;
/**
* Enqueues an import - currently only supported for users. Amongst other things,
* the users import allows associating slack channels (if you have already setup
* the oauth apps).
*
* @param data
* @param options - override client request options.
* @returns
**/
create(data: CreateImportsPayload, options?: RequestOptions): Promise<CreateImportsResponse>;
/**
* Query the status of the import for a summary of imported records and failures
* for each record that could not be imported successfully.
*
* @param importId - ID of the import.
* The ID of the import is returned when the import is created.
* @param options - override client request options.
* @returns
**/
get(importId: string, options?: RequestOptions): Promise<GetImportsResponse>;
}
export {};