UNPKG

dingtalk-docs-cool-app

Version:

钉钉文档酷应用插件扩展 开发者初始化包

68 lines (67 loc) 2.14 kB
import { FormItem } from './types/formItem'; import { type FieldResultType } from './types/resultType'; import { type ExecuteContext, type ExecuteResult } from './types/execute'; import { type Authorization } from './types/auth'; interface FieldOptions { disableAutoUpdate?: boolean; } interface FieldDecorator { id?: string; name?: string; authorizations?: Authorization; formItems: FormItem[]; execute?: (context: ExecuteContext, formData: Record<string, any>) => Promise<ExecuteResult>; resultType: FieldResultType; options?: FieldOptions; domainList?: string[]; i18nMap?: { [key: string]: object; }; } export declare class FieldDecoratorKit { private decorator?; private domainList?; setDecorator(decorator: FieldDecorator): void; getDecorator(): FieldDecorator | undefined; setDomainList(domainList: string[]): void; getDomainList(): string[] | undefined; t(key: string): string; } export declare const fieldDecoratorKit: FieldDecoratorKit; export declare const getManifestByFieldDecorator: (fieldDecorator: FieldDecoratorKit) => { name?: undefined; i18nMap?: undefined; isDebug?: undefined; fields?: undefined; extensionSubType?: undefined; } | { name: { 'zh-CN': string; }; i18nMap: { [key: string]: object; }; isDebug: boolean; fields: { fieldType: import(".").FieldType; uiSchema: { fieldMetaEditor: { component: string; props: { schema: { items: FormItem[]; authorizations: Authorization | undefined; }; }; }; }; presetFieldConfig: { externalEditorConfig: {}; fieldProperty: any; }; }[]; extensionSubType: string; }; export declare const getAuthertications: (manifest: any) => Authorization | null; export declare const getAuthenticationHeader: (manifest: any, authId: string, config: string | Record<string, string>) => Record<string, string>; export {};