@acedatacloud/sdk 2026.503.0 → 2026.504.1

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.
@@ -0,0 +1,88 @@
1
+ /** Veo-specific video generation and editing resources. */
2
+
3
+ import { Transport } from '../runtime/transport';
4
+
5
+ export type VeoModel = 'veo2' | 'veo2-fast' | 'veo3' | 'veo3-fast' | 'veo31-fast' | 'veo31' | 'veo31-fast-ingredients' | (string & {});
6
+
7
+ export class Veo {
8
+ constructor(private transport: Transport) {}
9
+
10
+ async generate(opts: {
11
+ action: 'text2video' | 'image2video' | 'ingredients2video' | 'get1080p';
12
+ prompt?: string;
13
+ model?: VeoModel;
14
+ resolution?: '4k' | '1080p' | 'gif';
15
+ videoId?: string;
16
+ translation?: string;
17
+ aspectRatio?: '9:16' | '1:1' | '3:4' | '4:3' | '16:9';
18
+ imageUrls?: string[];
19
+ callbackUrl?: string;
20
+ [key: string]: unknown;
21
+ }): Promise<Record<string, unknown>> {
22
+ const { action, prompt, model, resolution, videoId, translation, aspectRatio, imageUrls, callbackUrl, ...rest } = opts;
23
+ const body: Record<string, unknown> = { action, ...rest };
24
+ if (prompt !== undefined) body.prompt = prompt;
25
+ if (model !== undefined) body.model = model;
26
+ if (resolution !== undefined) body.resolution = resolution;
27
+ if (videoId !== undefined) body.video_id = videoId;
28
+ if (translation !== undefined) body.translation = translation;
29
+ if (aspectRatio !== undefined) body.aspect_ratio = aspectRatio;
30
+ if (imageUrls !== undefined) body.image_urls = imageUrls;
31
+ if (callbackUrl !== undefined) body.callback_url = callbackUrl;
32
+ return this.transport.request('POST', '/veo/videos', { json: body });
33
+ }
34
+
35
+ async upsample(opts: {
36
+ videoId: string;
37
+ action: '1080p' | '4k' | 'gif';
38
+ callbackUrl?: string;
39
+ [key: string]: unknown;
40
+ }): Promise<Record<string, unknown>> {
41
+ const { videoId, action, callbackUrl, ...rest } = opts;
42
+ const body: Record<string, unknown> = { video_id: videoId, action, ...rest };
43
+ if (callbackUrl !== undefined) body.callback_url = callbackUrl;
44
+ return this.transport.request('POST', '/veo/upsample', { json: body });
45
+ }
46
+
47
+ async extend(opts: {
48
+ videoId: string;
49
+ model: 'veo31-fast' | 'veo31' | (string & {});
50
+ prompt?: string;
51
+ callbackUrl?: string;
52
+ [key: string]: unknown;
53
+ }): Promise<Record<string, unknown>> {
54
+ const { videoId, model, prompt, callbackUrl, ...rest } = opts;
55
+ const body: Record<string, unknown> = { video_id: videoId, model, ...rest };
56
+ if (prompt !== undefined) body.prompt = prompt;
57
+ if (callbackUrl !== undefined) body.callback_url = callbackUrl;
58
+ return this.transport.request('POST', '/veo/extend', { json: body });
59
+ }
60
+
61
+ async reshoot(opts: {
62
+ videoId: string;
63
+ motionType: 'STATIONARY' | 'STATIONARY_UP' | 'STATIONARY_DOWN' | 'STATIONARY_LEFT' | 'STATIONARY_RIGHT' | 'STATIONARY_DOLLY_IN_ZOOM_OUT' | 'STATIONARY_DOLLY_OUT_ZOOM_IN' | 'UP' | 'DOWN' | 'LEFT_TO_RIGHT' | 'RIGHT_TO_LEFT' | 'FORWARD' | 'BACKWARD' | 'DOLLY_IN_ZOOM_OUT' | 'DOLLY_OUT_ZOOM_IN' | (string & {});
64
+ callbackUrl?: string;
65
+ [key: string]: unknown;
66
+ }): Promise<Record<string, unknown>> {
67
+ const { videoId, motionType, callbackUrl, ...rest } = opts;
68
+ const body: Record<string, unknown> = { video_id: videoId, motion_type: motionType, ...rest };
69
+ if (callbackUrl !== undefined) body.callback_url = callbackUrl;
70
+ return this.transport.request('POST', '/veo/reshoot', { json: body });
71
+ }
72
+
73
+ async objects(opts: {
74
+ videoId: string;
75
+ action: 'insert' | 'remove';
76
+ prompt?: string;
77
+ imageMask?: string;
78
+ callbackUrl?: string;
79
+ [key: string]: unknown;
80
+ }): Promise<Record<string, unknown>> {
81
+ const { videoId, action, prompt, imageMask, callbackUrl, ...rest } = opts;
82
+ const body: Record<string, unknown> = { video_id: videoId, action, ...rest };
83
+ if (prompt !== undefined) body.prompt = prompt;
84
+ if (imageMask !== undefined) body.image_mask = imageMask;
85
+ if (callbackUrl !== undefined) body.callback_url = callbackUrl;
86
+ return this.transport.request('POST', '/veo/objects', { json: body });
87
+ }
88
+ }
@@ -0,0 +1,61 @@
1
+ /** WebExtrator web render & extract resources. */
2
+
3
+ import { Transport } from '../runtime/transport';
4
+
5
+ export class WebExtrator {
6
+ constructor(private transport: Transport) {}
7
+
8
+ async extract(opts: {
9
+ url: string;
10
+ expectedType?: 'product' | 'article' | 'general';
11
+ enableLlm?: boolean;
12
+ waitUntil?: 'load' | 'domcontentloaded' | 'networkidle' | 'commit';
13
+ timeout?: number;
14
+ delay?: number;
15
+ waitForSelector?: string;
16
+ blockResources?: string[];
17
+ headers?: Record<string, string>;
18
+ userAgent?: string;
19
+ callbackUrl?: string;
20
+ [key: string]: unknown;
21
+ }): Promise<Record<string, unknown>> {
22
+ const { url, expectedType, enableLlm, waitUntil, timeout, delay, waitForSelector, blockResources, headers, userAgent, callbackUrl, ...rest } = opts;
23
+ const body: Record<string, unknown> = { url, ...rest };
24
+ if (expectedType !== undefined) body.expected_type = expectedType;
25
+ if (enableLlm !== undefined) body.enable_llm = enableLlm;
26
+ if (waitUntil !== undefined) body.wait_until = waitUntil;
27
+ if (timeout !== undefined) body.timeout = timeout;
28
+ if (delay !== undefined) body.delay = delay;
29
+ if (waitForSelector !== undefined) body.wait_for_selector = waitForSelector;
30
+ if (blockResources !== undefined) body.block_resources = blockResources;
31
+ if (headers !== undefined) body.headers = headers;
32
+ if (userAgent !== undefined) body.user_agent = userAgent;
33
+ if (callbackUrl !== undefined) body.callback_url = callbackUrl;
34
+ return this.transport.request('POST', '/webextrator/extract', { json: body });
35
+ }
36
+
37
+ async render(opts: {
38
+ url: string;
39
+ waitUntil?: 'load' | 'domcontentloaded' | 'networkidle' | 'commit';
40
+ timeout?: number;
41
+ delay?: number;
42
+ waitForSelector?: string;
43
+ blockResources?: string[];
44
+ headers?: Record<string, string>;
45
+ userAgent?: string;
46
+ callbackUrl?: string;
47
+ [key: string]: unknown;
48
+ }): Promise<Record<string, unknown>> {
49
+ const { url, waitUntil, timeout, delay, waitForSelector, blockResources, headers, userAgent, callbackUrl, ...rest } = opts;
50
+ const body: Record<string, unknown> = { url, ...rest };
51
+ if (waitUntil !== undefined) body.wait_until = waitUntil;
52
+ if (timeout !== undefined) body.timeout = timeout;
53
+ if (delay !== undefined) body.delay = delay;
54
+ if (waitForSelector !== undefined) body.wait_for_selector = waitForSelector;
55
+ if (blockResources !== undefined) body.block_resources = blockResources;
56
+ if (headers !== undefined) body.headers = headers;
57
+ if (userAgent !== undefined) body.user_agent = userAgent;
58
+ if (callbackUrl !== undefined) body.callback_url = callbackUrl;
59
+ return this.transport.request('POST', '/webextrator/render', { json: body });
60
+ }
61
+ }