@doczilla/node
Version:
Doczilla API wrapper
65 lines (64 loc) • 1.93 kB
TypeScript
import type { AsyncFromTemplate, AsyncJob, CreateFromTemplate, CreateTemplate, ListTemplateResponse, SyncFromTemplate, SyncJob, Template, UpdateTemplate } from '../generated';
import { BaseService } from './BaseService';
export declare class TemplateService extends BaseService {
/**
* Create the template and directly return the raw result.
* @param id
* @param requestBody
* @returns Buffer
* @throws AxiosError
*/
direct(id: string, requestBody: CreateFromTemplate): Promise<Buffer>;
/**
* Create the template and write the result directly in your bucket.
* @param id
* @param requestBody
* @returns SyncJob
* @throws AxiosError
*/
sync(id: string, requestBody: SyncFromTemplate): Promise<SyncJob>;
/**
* Queue the creation of the template and call the webhook with the result.
* @param id
* @param requestBody
* @returns AsyncJob
* @throws AxiosError
*/
async(id: string, requestBody: AsyncFromTemplate): Promise<AsyncJob>;
/**
* List all available templates.
* @param params
* @returns ListTemplateResponse
* @throws AxiosError
*/
list(params?: {
page?: number;
}): Promise<ListTemplateResponse>;
/**
* Creates a new template with the provided request body.
* @param requestBody
* @returns Template
* @throws AxiosError
*/
create(requestBody: CreateTemplate): Promise<Template>;
/**
* Get one template.
* @param id
* @returns Template
* @throws AxiosError
*/
get(id: string): Promise<Template>;
/**
* Update one template.
* @param id
* @param requestBody
* @throws AxiosError
*/
update(id: string, requestBody: UpdateTemplate): Promise<void>;
/**
* Delete one template.
* @param id
* @throws AxiosError
*/
delete(id: string): Promise<void>;
}