slightning-coco-widget
Version:
SLIGHTNING 的 CoCo 控件框架。
68 lines (67 loc) • 1.8 kB
TypeScript
export * from './field';
export * from './record';
export * from './node';
export * from './view';
export * from './space';
export * from './datasheet.create.ro';
/**
* Attachment interface.
*/
export interface IAttachment {
token: string;
name: string;
size: number;
width: number;
height: number;
mimeType: string;
bucket: string;
preview?: string;
url?: string;
}
export interface IHttpSuccessResponse<T> {
success: true;
code: number;
message: string;
data: T;
}
export interface IHttpErrorResponse<T> {
success: false;
code: number;
message: string;
data?: T;
}
export declare type IHttpResponse<T = any> = IHttpSuccessResponse<T> | IHttpErrorResponse<T>;
export interface IVikaClientConfig {
/**
* API Token
*/
token: string;
/**
* The default is the column name 'name'. Specifying 'id' will use fieldId as the query and
* return method (using id will avoid code failure due to column name changes).
*/
fieldKey?: 'name' | 'id';
/**
* Request expiration time, default 60000ms (10 seconds).
*/
requestTimeout?: number;
/**
* Destination server address.
*/
host?: string;
/**
* Log Level.
*/
logLevel?: 'Error' | 'Warn' | 'Log' | 'Debug';
/**
* Disable the SDK custom user-agent, request header information collected for
* API usage statistics. In some browser security policies,
* environments that do not allow user-agent modification,
* you can actively disable this feature.
*/
disableClientUserAgent?: boolean;
/**
* If you need to use it in WeChat applet, you need to add request adapter.
*/
adapter?: any;
}