frappe-js-sdk
Version:
TypeScript/JavaScript client for Frappe Framework REST API
18 lines (17 loc) • 549 B
TypeScript
export interface Error {
httpStatus: number;
httpStatusText: string;
message: string;
exception: string;
exc?: string;
exc_type?: string;
_server_messages?: string;
}
export interface TokenParams {
/** Whether to use token for API calls */
useToken: boolean;
/** Function that returns the token as a string - this could be fetched from LocalStorage or auth providers like Firebase, Auth0 etc. */
token?: () => string;
/** Type of token to be used for authentication */
type: 'Bearer' | 'token';
}