@flatfile/safe-api
Version:
Flatfile Safe API client with streaming capabilities
51 lines (50 loc) • 2.01 kB
TypeScript
import { Flatfile } from "@flatfile/api";
import { GetRequest } from "../utils/requests/get.request";
import { PatchRequest } from "../utils/requests/patch.request";
import { PostRequest } from "../utils/requests/post.request";
import { RetryOptions } from "../utils/requests/safe.request";
export type BulkCreateWorkbookConfig = {
silent?: boolean;
spaceId: string;
config: Flatfile.CreateWorkbookConfig;
workbooks: Omit<Flatfile.CreateWorkbookConfig, "sheets" | "spaceId" | "environmentId">[];
};
export type BulkUpdateLockStatus = {
spaceId: string;
workbookIds: string[];
status: boolean;
};
export type BulkCreateWorkbookResponse = Array<{
success: true;
workbookId: string;
} | {
success: false;
error: string;
}>;
export declare class GetWorkbookRequest extends GetRequest<Flatfile.Workbook> {
path: string;
constructor(workbookId: string, options?: RetryOptions);
}
export declare class ListWorkbooksRequest extends GetRequest<Flatfile.Workbook[]> {
path: string;
constructor(opts?: Flatfile.ListWorkbooksRequest, options?: RetryOptions);
}
export declare class UpdateWorkbookRequest extends PatchRequest<Flatfile.Workbook, Flatfile.WorkbookUpdate> {
retry: boolean;
path: string;
constructor(workbookId: string, update: Flatfile.WorkbookUpdate, options?: RetryOptions);
}
export declare class CreateWorkbookRequest extends PostRequest<Flatfile.Workbook, Flatfile.CreateWorkbookConfig> {
retry: boolean;
path: string;
constructor(config: Flatfile.CreateWorkbookConfig, options?: RetryOptions);
}
export declare class BulkCreateWorkbookRequest extends PostRequest<BulkCreateWorkbookResponse, BulkCreateWorkbookConfig> {
retry: boolean;
path: string;
constructor(config: BulkCreateWorkbookConfig, options?: RetryOptions);
}
export declare class BulkSetLockStatusRequest extends PostRequest<any, BulkUpdateLockStatus> {
path: string;
constructor(config: BulkUpdateLockStatus, options?: RetryOptions);
}