@kintone/customize-uploader
Version:
A kintone customize uploader
34 lines (33 loc) • 1.53 kB
TypeScript
import type { Option as ApiClientOption, UpdateAppCustomizeParameter } from "../../KintoneApiClient";
import KintoneApiClient from "../../KintoneApiClient";
type MethodParameter = "GET" | "POST" | "PUT" | "DELETE";
declare const ApiPath: {
readonly File: "/k/v1/file.json";
readonly Customize: "/k/v1/app/customize.json";
};
declare const ApiPreviewPath: {
readonly Customize: "/k/v1/preview/app/customize.json";
readonly Deploy: "/k/v1/preview/app/deploy.json";
};
type ApiPathValues = (typeof ApiPath)[keyof typeof ApiPath];
type ApiPreviewPathValues = (typeof ApiPreviewPath)[keyof typeof ApiPreviewPath];
type PathParameter = ApiPathValues | ApiPreviewPathValues;
export default class MockKintoneApiClient extends KintoneApiClient {
logs: Array<{
method: MethodParameter;
path: PathParameter;
body?: Record<string, unknown>;
contentType?: string;
}>;
willBeReturnResponse: any;
constructor(...args: [string, string, string, string, string, string, ApiClientOption]);
willBeReturn(path: PathParameter, method: MethodParameter, willBeReturn: string | object): this;
getAppCustomize(appId: string): Promise<any>;
deploySetting(appId: string): Promise<any>;
downloadFile(fileKey: string): Promise<any>;
waitFinishingDeploy(appId: string, callback: () => void): Promise<any>;
uploadFile(filePath: string): Promise<any>;
updateCustomizeSetting(params: UpdateAppCustomizeParameter): Promise<any>;
private getByPathResponse;
}
export {};