@unityclaw/sdk 1.0.6 → 1.0.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.cts CHANGED
@@ -18,18 +18,62 @@ interface UrlFieldItem {
18
18
  text: string;
19
19
  link: string;
20
20
  }
21
- /** Attachment field item from bitable */
21
+ /** Attachment field item from backend ParameterModel */
22
22
  interface AttachmentFieldItem {
23
23
  tmp_url: string;
24
24
  name?: string;
25
25
  type?: string;
26
26
  size?: number;
27
27
  }
28
+ /** Local file attachment input (auto-uploaded to get tmp_url) */
29
+ interface LocalAttachmentFieldItem {
30
+ path?: string;
31
+ localPath?: string;
32
+ filePath?: string;
33
+ name?: string;
34
+ type?: string;
35
+ size?: number;
36
+ }
37
+ /** Attachment input supported by SDK request methods */
38
+ type AttachmentInput = AttachmentFieldItem | LocalAttachmentFieldItem;
28
39
  /** Label/option field item */
29
40
  interface LabelFieldItem {
30
41
  value: string | boolean | number;
31
42
  label: string;
32
43
  }
44
+ /** Supported primitive value for single-select style fields */
45
+ type SelectPrimitive = string | boolean | number;
46
+ /** Select input can be either raw value or LabelFieldItem */
47
+ type SelectValue<T extends SelectPrimitive = SelectPrimitive> = LabelFieldItem | T;
48
+ /** Union type for text input (string or TextFieldItem array) */
49
+ type TextInput = string | TextFieldItem[];
50
+ declare const GEMINI_IMAGE_ASPECT_RATIOS: readonly ["1:1", "9:16", "16:9", "4:3", "3:4", "3:2", "2:3", "5:4", "4:5", "21:9", "1:4", "1:8", "4:1", "8:1"];
51
+ type GeminiImageAspectRatio = (typeof GEMINI_IMAGE_ASPECT_RATIOS)[number];
52
+ declare const GEMINI_IMAGE_SIZES: readonly ["1K", "2K", "4K", "1K_pro", "2K_pro", "4K_pro"];
53
+ type GeminiImageSize = (typeof GEMINI_IMAGE_SIZES)[number];
54
+ declare const JIMENG_IMAGE_MODELS: readonly ["doubao-seedream-5-0-260128", "doubao-seedream-4-5-251128"];
55
+ type JiMengImageModel = (typeof JIMENG_IMAGE_MODELS)[number];
56
+ declare const JIMENG_IMAGE_SIZES: readonly ["2048x2048", "1728x2304", "2304x1728", "2848x1600", "1600x2848", "2496x1664", "1664x2496", "3136x1344", "3072x3072", "2592x3456", "3456x2592", "4096x2304", "2304x4096", "3744x2496", "2496x3744", "4704x2016", "4096x4096", "3520x4704", "4704x3520", "5504x3040", "3040x5504", "4992x3328", "3328x4992", "6240x2656"];
57
+ type JiMengImageSize = (typeof JIMENG_IMAGE_SIZES)[number];
58
+ declare const JIMENG_IMAGE_WEB_SEARCH_OPTIONS: readonly ["true", "false"];
59
+ type JiMengImageWebSearchOption = (typeof JIMENG_IMAGE_WEB_SEARCH_OPTIONS)[number];
60
+ declare const KLING_MODELS: readonly ["kling-v1", "kling-v1-5", "kling-v1-6", "kling-v2-master", "kling-v2-1", "kling-v2-1-master", "kling-v2-5-turbo", "kling-v2-6"];
61
+ type KlingModel = (typeof KLING_MODELS)[number];
62
+ declare const KLING_ASPECT_RATIOS: readonly ["16:9", "9:16", "1:1"];
63
+ type KlingAspectRatio = (typeof KLING_ASPECT_RATIOS)[number];
64
+ declare const KLING_DURATIONS: readonly ["5", "10"];
65
+ type KlingDuration = (typeof KLING_DURATIONS)[number];
66
+ declare const WAN_DEFAULT_MODELS: readonly ["wan2.6-t2v", "wan2.6-i2v", "wan2.6-i2v-flash", "wan2.6-r2v"];
67
+ type WanModel = (typeof WAN_DEFAULT_MODELS)[number] | string;
68
+ declare const WAN_SHOT_TYPES: readonly ["single", "multi"];
69
+ type WanShotType = (typeof WAN_SHOT_TYPES)[number];
70
+ type MiniMaxModel = 'MiniMax-Hailuo-2.3' | 'MiniMax-Hailuo-2.3-Fast' | 'MiniMax-Hailuo-02' | `I2V-${string}` | `S2V-${string}` | string;
71
+ declare const DOC_CONVERT_INPUT_FORMATS: readonly ["image", "pdf"];
72
+ type DocConvertInputFormat = (typeof DOC_CONVERT_INPUT_FORMATS)[number];
73
+ declare const DOC_CONVERT_OUTPUT_FORMATS: readonly ["docx", "pptx", "xlsx", "pdf", "image"];
74
+ type DocConvertOutputFormat = (typeof DOC_CONVERT_OUTPUT_FORMATS)[number];
75
+ declare const DOC_TRANSLATE_LANGUAGE_CODES: readonly ["en", "zh", "zh-TW", "ja", "ko", "es", "fr", "de", "pt", "ru", "ar", "it", "nl", "pl", "tr", "vi", "th", "id"];
76
+ type DocTranslateLanguageCode = (typeof DOC_TRANSLATE_LANGUAGE_CODES)[number] | string;
33
77
  /** Bitable context */
34
78
  interface BitableContext {
35
79
  logID: string;
@@ -70,123 +114,196 @@ interface APIResponse<T = unknown> {
70
114
  /** Attachment result in API responses */
71
115
  interface AttachmentResult {
72
116
  name: string;
73
- contentType: 'attachment/url';
117
+ contentType: string;
74
118
  content: string;
75
119
  /** Local file path after download (only available when downloadAttachments is true) */
76
120
  localPath?: string;
77
121
  }
78
122
  /** Image generation parameters */
79
123
  interface ImageGenParams {
80
- prompt: string | TextFieldItem[];
81
- attachment?: AttachmentFieldItem[];
82
- model?: LabelFieldItem | string;
83
- aspect_ratio?: LabelFieldItem | string;
84
- size?: LabelFieldItem | string;
85
- model_selector?: LabelFieldItem;
86
- web_search?: LabelFieldItem;
87
- image_count?: LabelFieldItem | number;
124
+ prompt: TextInput;
125
+ attachment?: AttachmentInput[];
126
+ model?: SelectValue;
127
+ aspect_ratio?: SelectValue;
128
+ size?: SelectValue;
129
+ model_selector?: SelectValue;
130
+ web_search?: SelectValue;
131
+ image_count?: SelectValue | number;
88
132
  }
89
133
  /** Gemini image generation params */
90
134
  interface GeminiImageParams {
91
- prompt: string | TextFieldItem[];
92
- attachment?: AttachmentFieldItem[];
93
- model?: LabelFieldItem;
94
- aspect_ratio?: LabelFieldItem;
95
- size?: LabelFieldItem;
135
+ prompt: TextInput;
136
+ attachment?: AttachmentInput[];
137
+ model?: SelectValue;
138
+ aspect_ratio?: SelectValue<GeminiImageAspectRatio | ''>;
139
+ size?: SelectValue<GeminiImageSize>;
96
140
  }
97
141
  /** JiMeng image generation params */
98
142
  interface JiMengImageParams {
99
- prompt: string | TextFieldItem[];
100
- attachment?: AttachmentFieldItem[];
101
- size: LabelFieldItem;
102
- model_selector?: LabelFieldItem;
103
- web_search?: LabelFieldItem;
104
- image_count?: LabelFieldItem | number;
105
- model?: string;
143
+ prompt: TextInput;
144
+ attachment?: AttachmentInput[];
145
+ size: SelectValue<JiMengImageSize | string>;
146
+ model_selector?: SelectValue<JiMengImageModel>;
147
+ web_search?: SelectValue<JiMengImageWebSearchOption>;
148
+ image_count?: SelectValue<number | string> | number;
149
+ model?: JiMengImageModel | string;
106
150
  }
107
151
  /** Sora video generation params */
108
152
  interface SoraVideoParams {
109
- attachment?: AttachmentFieldItem[];
110
- prompt?: string | TextFieldItem[];
111
- orientation: LabelFieldItem;
153
+ attachment?: AttachmentInput[];
154
+ prompt?: TextInput;
155
+ orientation: SelectValue<string>;
112
156
  }
113
157
  /** Veo video generation params */
114
158
  interface VeoVideoParams {
115
- prompt?: string | TextFieldItem[];
116
- attachment?: AttachmentFieldItem[];
117
- first_frame?: AttachmentFieldItem[];
118
- last_frame?: AttachmentFieldItem[];
119
- aspect_ratio?: LabelFieldItem;
120
- resolution?: LabelFieldItem;
121
- duration?: LabelFieldItem;
159
+ prompt?: TextInput;
160
+ attachment?: AttachmentInput[];
161
+ first_frame?: AttachmentInput[];
162
+ last_frame?: AttachmentInput[];
163
+ aspect_ratio?: SelectValue<string>;
164
+ resolution?: SelectValue<string>;
165
+ duration?: SelectValue<string>;
122
166
  }
123
167
  /** Kling video generation params */
124
168
  interface KlingVideoParams {
125
- attachment?: AttachmentFieldItem[];
126
- prompt?: string | TextFieldItem[];
127
- aspect_ratio?: LabelFieldItem;
128
- duration?: LabelFieldItem;
129
- model?: LabelFieldItem;
169
+ attachment?: AttachmentInput[];
170
+ prompt?: TextInput;
171
+ aspect_ratio?: SelectValue<KlingAspectRatio>;
172
+ duration?: SelectValue<KlingDuration | string>;
173
+ model?: SelectValue<KlingModel | string>;
130
174
  }
131
175
  /** JiMeng video generation params */
132
176
  interface JiMengVideoParams {
133
- action: LabelFieldItem;
134
- attachment?: AttachmentFieldItem[];
135
- prompt?: string | TextFieldItem[];
136
- aspect_ratio: LabelFieldItem;
177
+ action: SelectValue<'t2v' | 'i2v' | string>;
178
+ attachment?: AttachmentInput[];
179
+ prompt?: TextInput;
180
+ aspect_ratio: SelectValue<string>;
137
181
  }
138
182
  /** Doubao video generation params */
139
183
  interface DoubaoVideoParams {
140
- action?: LabelFieldItem;
141
- attachment?: AttachmentFieldItem[];
142
- prompt?: string | TextFieldItem[];
143
- resolution: LabelFieldItem;
144
- ratio: LabelFieldItem;
145
- duration?: LabelFieldItem;
184
+ action?: SelectValue<'t2v' | 'i2v' | string>;
185
+ attachment?: AttachmentInput[];
186
+ prompt?: TextInput;
187
+ resolution: SelectValue<string>;
188
+ ratio: SelectValue<string>;
189
+ duration?: SelectValue<string | number>;
146
190
  }
147
191
  /** Wan video generation params */
148
192
  interface WanVideoParams {
149
- attachment?: AttachmentFieldItem[];
150
- prompt?: string | TextFieldItem[];
151
- size?: LabelFieldItem;
152
- duration?: LabelFieldItem;
153
- model?: LabelFieldItem;
154
- shot_type?: LabelFieldItem;
193
+ attachment?: AttachmentInput[];
194
+ prompt?: TextInput;
195
+ size?: SelectValue<string>;
196
+ duration?: SelectValue<string | number>;
197
+ model?: SelectValue<WanModel>;
198
+ shot_type?: SelectValue<WanShotType | string>;
155
199
  }
156
200
  /** MiniMax video generation params */
157
201
  interface MiniMaxVideoParams {
158
- attachment?: AttachmentFieldItem[];
159
- prompt?: string | TextFieldItem[];
160
- size?: LabelFieldItem;
161
- duration?: LabelFieldItem;
162
- model?: LabelFieldItem;
202
+ attachment?: AttachmentInput[];
203
+ prompt?: TextInput;
204
+ size?: SelectValue<string>;
205
+ duration?: SelectValue<string | number>;
206
+ model?: SelectValue<MiniMaxModel>;
163
207
  }
164
208
  /** Document translation params */
165
209
  interface DocTranslateParams {
166
- attachment: AttachmentFieldItem[];
167
- source_language: LabelFieldItem | string;
168
- target_language: LabelFieldItem | string;
210
+ attachment: AttachmentInput[];
211
+ source_language: SelectValue<DocTranslateLanguageCode> | DocTranslateLanguageCode;
212
+ target_language: SelectValue<DocTranslateLanguageCode> | DocTranslateLanguageCode;
169
213
  }
170
214
  /** Document conversion params */
171
215
  interface DocConvertParams {
172
- attachment?: AttachmentFieldItem[];
173
- input_format?: string;
174
- output_format?: string;
216
+ attachment: AttachmentInput[];
217
+ input_format?: DocConvertInputFormat | string;
218
+ output_format: DocConvertOutputFormat | string;
219
+ }
220
+ interface MediaSourceItem {
221
+ tmp_url?: string;
222
+ link?: string;
223
+ text?: string;
224
+ type?: string;
225
+ name?: string;
226
+ size?: number;
227
+ path?: string;
228
+ localPath?: string;
229
+ filePath?: string;
230
+ }
231
+ /** Link-like input item used by media stats/user-info endpoints */
232
+ interface MediaLinkItem {
233
+ link?: string;
234
+ text?: string;
235
+ type?: string;
175
236
  }
176
237
  /** Media analysis params */
177
238
  interface MediaAnalysisParams {
178
- url: Array<{
179
- tmp_url?: string;
180
- link?: string;
181
- text?: string;
182
- type?: string;
183
- }>;
239
+ url: MediaSourceItem[];
184
240
  }
185
241
  /** Media analysis result */
186
242
  interface MediaAnalysisResult {
187
243
  summary: string;
188
244
  subtitle: string;
189
245
  }
246
+ /** Media stats params */
247
+ interface MediaStatsParams {
248
+ link: MediaLinkItem[];
249
+ }
250
+ /** Media stats result */
251
+ interface MediaStatsResult {
252
+ author_name?: string;
253
+ title?: string;
254
+ tag_text?: string;
255
+ play_count?: string;
256
+ like_count?: string;
257
+ comment_count?: string;
258
+ collect_count?: string;
259
+ share_count?: string;
260
+ download_urls?: string;
261
+ cover?: string;
262
+ duration?: string;
263
+ created?: string;
264
+ updated?: string;
265
+ [key: string]: string | undefined;
266
+ }
267
+ /** Media user info params */
268
+ interface MediaUserInfoParams {
269
+ link: MediaLinkItem[];
270
+ }
271
+ /** Media user info result */
272
+ interface MediaUserInfoResult {
273
+ user_id?: string;
274
+ nickname?: string;
275
+ signature?: string;
276
+ follower_count?: string;
277
+ following_count?: string;
278
+ like_count?: string;
279
+ post_count?: string;
280
+ updated?: string;
281
+ [key: string]: string | undefined;
282
+ }
283
+ /** Xiaohongshu download params */
284
+ interface XiaohongshuDownloadParams {
285
+ url: MediaSourceItem[];
286
+ }
287
+ /** Xiaohongshu download result */
288
+ interface XiaohongshuDownloadResult {
289
+ cover_url?: string;
290
+ video_urls?: string[] | string;
291
+ [key: string]: unknown;
292
+ }
293
+ /** Video frame extraction params */
294
+ interface VideoFrameParams {
295
+ attachment: AttachmentInput[];
296
+ frame_option?: SelectValue<'first' | 'last' | ''>;
297
+ frame?: string;
298
+ }
299
+ declare const IDP_TYPES: readonly ["bank_card", "vehicle_license", "train_invoice", "taxi_invoice", "id_card", "vat_invoice", "business_license", "business_card", "contract"];
300
+ type IDPType = (typeof IDP_TYPES)[number];
301
+ /** IDP extraction params */
302
+ interface IDPExtractParams {
303
+ attachments: AttachmentInput[];
304
+ }
305
+ /** IDP extraction result (fields vary by idp type) */
306
+ type IDPExtractResult = Record<string, unknown>;
190
307
  /** OpenClaw shortcut params */
191
308
  interface OpenClawShortcutParams {
192
309
  task: string;
@@ -200,10 +317,12 @@ interface UnityClawClientConfig {
200
317
  baseUrl?: string;
201
318
  /** Task folder directory (default: ./tasks) */
202
319
  taskDir?: string;
203
- /** Request timeout in ms (default: 300000 = 5min) */
320
+ /** Request timeout in ms (default: 900000 = 15min) */
204
321
  timeout?: number;
205
322
  /** Whether to download attachments to local (default: true) */
206
323
  downloadAttachments?: boolean;
324
+ /** Whether to auto-upload local files to /api/upload and fill tmp_url (default: true) */
325
+ autoUploadLocalFiles?: boolean;
207
326
  /** Custom context overrides */
208
327
  context?: Partial<SDKContext>;
209
328
  }
@@ -230,8 +349,6 @@ type DeepPartial<T> = {
230
349
  };
231
350
  /** Extract value from LabelFieldItem or return primitive */
232
351
  type LabelValue<T extends LabelFieldItem | string | number | boolean | undefined> = T extends LabelFieldItem ? T['value'] : T;
233
- /** Union type for text input (string or TextFieldItem array) */
234
- type TextInput = string | TextFieldItem[];
235
352
 
236
353
  /**
237
354
  * Task Folder Manager
@@ -576,74 +693,73 @@ declare class DocumentAPI {
576
693
  */
577
694
  translate(params: {
578
695
  attachment: DocTranslateParams['attachment'];
579
- source_language: LabelFieldItem | string;
580
- target_language: LabelFieldItem | string;
696
+ source_language: DocTranslateParams['source_language'];
697
+ target_language: DocTranslateParams['target_language'];
581
698
  }): Promise<TaskResult<APIResponse<AttachmentResult[]>>>;
582
699
  /**
583
- * Convert image to Word document
584
- * @see /api/doc_convert/image2word
700
+ * Generic document conversion (recommended entrypoint).
701
+ * Uses /api/doc_convert/image or /api/doc_convert/pdf based on input_format.
702
+ */
703
+ convertDocument(params: {
704
+ attachment: DocConvertParams['attachment'];
705
+ input_format?: SelectValue<DocConvertInputFormat | string> | DocConvertInputFormat | string;
706
+ output_format: SelectValue<DocConvertOutputFormat | string> | DocConvertOutputFormat | string;
707
+ }): Promise<TaskResult<APIResponse<AttachmentResult[]>>>;
708
+ /**
709
+ * @deprecated Use convertDocument({ input_format: 'image', output_format: 'docx' })
585
710
  */
586
711
  image2Word(params: {
587
712
  attachment: DocConvertParams['attachment'];
588
713
  }): Promise<TaskResult<APIResponse<AttachmentResult[]>>>;
589
714
  /**
590
- * Convert image to PowerPoint
591
- * @see /api/doc_convert/image2ppt
715
+ * @deprecated Use convertDocument({ input_format: 'image', output_format: 'pptx' })
592
716
  */
593
717
  image2Ppt(params: {
594
718
  attachment: DocConvertParams['attachment'];
595
719
  }): Promise<TaskResult<APIResponse<AttachmentResult[]>>>;
596
720
  /**
597
- * Convert image to Excel
598
- * @see /api/doc_convert/image2excel
721
+ * @deprecated Use convertDocument({ input_format: 'image', output_format: 'xlsx' })
599
722
  */
600
723
  image2Excel(params: {
601
724
  attachment: DocConvertParams['attachment'];
602
725
  }): Promise<TaskResult<APIResponse<AttachmentResult[]>>>;
603
726
  /**
604
- * Convert image to PDF
605
- * @see /api/doc_convert/image2pdf
727
+ * @deprecated Use convertDocument({ input_format: 'image', output_format: 'pdf' })
606
728
  */
607
729
  image2Pdf(params: {
608
730
  attachment: DocConvertParams['attachment'];
609
731
  }): Promise<TaskResult<APIResponse<AttachmentResult[]>>>;
610
732
  /**
611
- * Convert PDF to Word document
612
- * @see /api/doc_convert/pdf2word
733
+ * @deprecated Use convertDocument({ input_format: 'pdf', output_format: 'docx' })
613
734
  */
614
735
  pdf2Word(params: {
615
736
  attachment: DocConvertParams['attachment'];
616
737
  }): Promise<TaskResult<APIResponse<AttachmentResult[]>>>;
617
738
  /**
618
- * Convert PDF to PowerPoint
619
- * @see /api/doc_convert/pdf2ppt
739
+ * @deprecated Use convertDocument({ input_format: 'pdf', output_format: 'pptx' })
620
740
  */
621
741
  pdf2Ppt(params: {
622
742
  attachment: DocConvertParams['attachment'];
623
743
  }): Promise<TaskResult<APIResponse<AttachmentResult[]>>>;
624
744
  /**
625
- * Convert PDF to Excel
626
- * @see /api/doc_convert/pdf2excel
745
+ * @deprecated Use convertDocument({ input_format: 'pdf', output_format: 'xlsx' })
627
746
  */
628
747
  pdf2Excel(params: {
629
748
  attachment: DocConvertParams['attachment'];
630
749
  }): Promise<TaskResult<APIResponse<AttachmentResult[]>>>;
631
750
  /**
632
- * Convert PDF to image
633
- * @see /api/doc_convert/pdf2image
751
+ * @deprecated Use convertDocument({ input_format: 'pdf', output_format: 'image' })
634
752
  */
635
753
  pdf2Image(params: {
636
754
  attachment: DocConvertParams['attachment'];
637
755
  }): Promise<TaskResult<APIResponse<AttachmentResult[]>>>;
638
756
  /**
639
- * Generic document conversion
640
- * @see /api/doc_convert/image
641
- * @see /api/doc_convert/pdf
757
+ * Backward-compatible alias of convertDocument().
642
758
  */
643
759
  convert(params: {
644
760
  attachment: DocConvertParams['attachment'];
645
- input_format?: string;
646
- output_format: string;
761
+ input_format?: SelectValue<DocConvertInputFormat | string> | DocConvertInputFormat | string;
762
+ output_format: SelectValue<DocConvertOutputFormat | string> | DocConvertOutputFormat | string;
647
763
  }): Promise<TaskResult<APIResponse<AttachmentResult[]>>>;
648
764
  }
649
765
 
@@ -714,6 +830,50 @@ declare class MediaAPI {
714
830
  analyzeSocialVideo(params: {
715
831
  url: string;
716
832
  }): Promise<TaskResult<APIResponse<MediaAnalysisResult>>>;
833
+ /**
834
+ * Fetch media stats from social video links.
835
+ * @see /api/media_stats
836
+ */
837
+ stats(params: MediaStatsParams): Promise<TaskResult<APIResponse<MediaStatsResult>>>;
838
+ /**
839
+ * Fetch media user profile information from homepage links.
840
+ * @see /api/media_user_info
841
+ */
842
+ userInfo(params: MediaUserInfoParams): Promise<TaskResult<APIResponse<MediaUserInfoResult>>>;
843
+ /**
844
+ * Download Xiaohongshu media links.
845
+ * @see /api/xiaohongshu/download
846
+ */
847
+ downloadXiaohongshu(params: XiaohongshuDownloadParams): Promise<TaskResult<APIResponse<XiaohongshuDownloadResult>>>;
848
+ /**
849
+ * Extract one frame from video attachment.
850
+ * @see /api/video/frame
851
+ */
852
+ extractFrame(params: VideoFrameParams): Promise<TaskResult<APIResponse<AttachmentResult[]>>>;
853
+ }
854
+
855
+ /**
856
+ * IDP (Document Information Extraction) APIs
857
+ * Unified wrappers for /api/idp/{type}
858
+ */
859
+
860
+ declare class IDPAPI {
861
+ private client;
862
+ constructor(client: UnityClawClient);
863
+ /**
864
+ * Generic IDP extraction call.
865
+ * @see /api/idp/{type}
866
+ */
867
+ extract(type: IDPType, params: IDPExtractParams): Promise<TaskResult<APIResponse<IDPExtractResult>>>;
868
+ bankCard(params: IDPExtractParams): Promise<TaskResult<APIResponse<IDPExtractResult>>>;
869
+ vehicleLicense(params: IDPExtractParams): Promise<TaskResult<APIResponse<IDPExtractResult>>>;
870
+ trainInvoice(params: IDPExtractParams): Promise<TaskResult<APIResponse<IDPExtractResult>>>;
871
+ taxiInvoice(params: IDPExtractParams): Promise<TaskResult<APIResponse<IDPExtractResult>>>;
872
+ idCard(params: IDPExtractParams): Promise<TaskResult<APIResponse<IDPExtractResult>>>;
873
+ vatInvoice(params: IDPExtractParams): Promise<TaskResult<APIResponse<IDPExtractResult>>>;
874
+ businessLicense(params: IDPExtractParams): Promise<TaskResult<APIResponse<IDPExtractResult>>>;
875
+ businessCard(params: IDPExtractParams): Promise<TaskResult<APIResponse<IDPExtractResult>>>;
876
+ contract(params: IDPExtractParams): Promise<TaskResult<APIResponse<IDPExtractResult>>>;
717
877
  }
718
878
 
719
879
  /**
@@ -746,6 +906,7 @@ declare class UnityClawClient {
746
906
  readonly video: VideoAPI;
747
907
  readonly document: DocumentAPI;
748
908
  readonly media: MediaAPI;
909
+ readonly idp: IDPAPI;
749
910
  constructor(config?: UnityClawClientConfig);
750
911
  /**
751
912
  * Get the underlying HTTP client for custom requests
@@ -768,6 +929,8 @@ declare class UnityClawClient {
768
929
  * This is the core method that handles task folder creation, logging, and error handling
769
930
  */
770
931
  request<T = unknown>(endpoint: string, params: Record<string, unknown>, contextOverrides?: Partial<SDKContext>): Promise<TaskResult<APIResponse<T>>>;
932
+ private uploadLocalFile;
933
+ private normalizeParams;
771
934
  /**
772
935
  * Generate image using Gemini API
773
936
  * @deprecated Use client.image.gemini() instead
@@ -832,4 +995,4 @@ declare function setConfigValue(key: string, value: string): void;
832
995
  /** Get a config value */
833
996
  declare function getConfigValue(key: string): string | undefined;
834
997
 
835
- export { type APIResponse, type AttachmentFieldItem, type AttachmentResult, type BitableContext, CONFIG_DIR, CONFIG_FILE, type Context, DEFAULT_TASKS_DIR, type DeepPartial, type DocConvertParams, type DocTranslateParams, DocumentAPI, type DoubaoVideoParams, type GeminiImageParams, ImageAPI, type ImageGenParams, type JiMengImageParams, type JiMengVideoParams, type KlingVideoParams, type LabelFieldItem, type LabelValue, MediaAPI, type MediaAnalysisParams, type MediaAnalysisResult, type MiniMaxVideoParams, type OpenClawShortcutParams, type SDKContext, type SoraVideoParams, type TaskFolderContext, TaskFolderManager, type TaskFolderOptions, type TaskLog, type TaskResult, type TextFieldItem, type TextInput, UnityClawClient, type UnityClawClientConfig, type UnityClawConfig, type UrlFieldItem, type VeoVideoParams, VideoAPI, type WanVideoParams, getConfigPath, getConfigValue, loadConfig, saveConfig, setConfigValue };
998
+ export { type APIResponse, type AttachmentFieldItem, type AttachmentInput, type AttachmentResult, type BitableContext, CONFIG_DIR, CONFIG_FILE, type Context, DEFAULT_TASKS_DIR, DOC_CONVERT_INPUT_FORMATS, DOC_CONVERT_OUTPUT_FORMATS, DOC_TRANSLATE_LANGUAGE_CODES, type DeepPartial, type DocConvertInputFormat, type DocConvertOutputFormat, type DocConvertParams, type DocTranslateLanguageCode, type DocTranslateParams, DocumentAPI, type DoubaoVideoParams, GEMINI_IMAGE_ASPECT_RATIOS, GEMINI_IMAGE_SIZES, type GeminiImageAspectRatio, type GeminiImageParams, type GeminiImageSize, IDPAPI, type IDPExtractParams, type IDPExtractResult, type IDPType, IDP_TYPES, ImageAPI, type ImageGenParams, JIMENG_IMAGE_MODELS, JIMENG_IMAGE_SIZES, JIMENG_IMAGE_WEB_SEARCH_OPTIONS, type JiMengImageModel, type JiMengImageParams, type JiMengImageSize, type JiMengImageWebSearchOption, type JiMengVideoParams, KLING_ASPECT_RATIOS, KLING_DURATIONS, KLING_MODELS, type KlingAspectRatio, type KlingDuration, type KlingModel, type KlingVideoParams, type LabelFieldItem, type LabelValue, type LocalAttachmentFieldItem, MediaAPI, type MediaAnalysisParams, type MediaAnalysisResult, type MediaLinkItem, type MediaSourceItem, type MediaStatsParams, type MediaStatsResult, type MediaUserInfoParams, type MediaUserInfoResult, type MiniMaxModel, type MiniMaxVideoParams, type OpenClawShortcutParams, type SDKContext, type SelectPrimitive, type SelectValue, type SoraVideoParams, type TaskFolderContext, TaskFolderManager, type TaskFolderOptions, type TaskLog, type TaskResult, type TextFieldItem, type TextInput, UnityClawClient, type UnityClawClientConfig, type UnityClawConfig, type UrlFieldItem, type VeoVideoParams, VideoAPI, type VideoFrameParams, WAN_DEFAULT_MODELS, WAN_SHOT_TYPES, type WanModel, type WanShotType, type WanVideoParams, type XiaohongshuDownloadParams, type XiaohongshuDownloadResult, getConfigPath, getConfigValue, loadConfig, saveConfig, setConfigValue };