@acedatacloud/sdk 2026.718.1 → 2026.727.0
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.mts +22 -5
- package/dist/index.d.ts +22 -5
- package/dist/index.js +1017 -35
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1017 -35
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/client.ts +3 -0
- package/src/resources/providers/digitalhuman.ts +123 -0
- package/src/resources/providers/dreamina.ts +68 -0
- package/src/resources/providers/fish.ts +146 -0
- package/src/resources/providers/flux.ts +71 -0
- package/src/resources/providers/hailuo.ts +65 -0
- package/src/resources/providers/happyhorse.ts +89 -0
- package/src/resources/providers/index.ts +53 -0
- package/src/resources/providers/localization.ts +45 -0
- package/src/resources/providers/luma.ts +83 -0
- package/src/resources/providers/maestro.ts +84 -0
- package/src/resources/providers/nano-banana.ts +74 -0
- package/src/resources/providers/producer.ts +182 -0
- package/src/resources/providers/seedance.ts +89 -0
- package/src/resources/providers/seedream.ts +95 -0
- package/src/resources/providers/suno.ts +437 -0
- package/src/resources/providers/wan.ts +92 -0
- package/src/runtime/payment.ts +5 -3
- package/src/runtime/tasks.ts +165 -11
- package/src/runtime/transport.ts +20 -12
package/dist/index.d.mts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* When the API returns `402 Payment Required`, the transport calls the
|
|
5
5
|
* configured `PaymentHandler` to produce the extra headers (typically
|
|
6
|
-
* `
|
|
6
|
+
* `PAYMENT-SIGNATURE`) to attach to the retry. This keeps the SDK free of any
|
|
7
7
|
* chain-specific signing logic, and lets callers plug in a real x402
|
|
8
8
|
* implementation such as `@acedatacloud/x402-client`.
|
|
9
9
|
*/
|
|
@@ -11,7 +11,9 @@
|
|
|
11
11
|
interface PaymentRequirement {
|
|
12
12
|
scheme: string;
|
|
13
13
|
network: string;
|
|
14
|
-
|
|
14
|
+
amount?: string;
|
|
15
|
+
/** @deprecated Legacy challenge field. */
|
|
16
|
+
maxAmountRequired?: string;
|
|
15
17
|
maxTimeoutSeconds?: number;
|
|
16
18
|
resource?: string;
|
|
17
19
|
description?: string;
|
|
@@ -34,7 +36,7 @@ interface PaymentHandlerContext {
|
|
|
34
36
|
}
|
|
35
37
|
/** Result a payment handler must return. */
|
|
36
38
|
interface PaymentHandlerResult {
|
|
37
|
-
/** Extra headers to attach to the retry (
|
|
39
|
+
/** Extra headers to attach to the retry (normally `PAYMENT-SIGNATURE`). */
|
|
38
40
|
headers: Record<string, string>;
|
|
39
41
|
}
|
|
40
42
|
/** A callable that signs/settles a payment and returns retry headers. */
|
|
@@ -175,7 +177,18 @@ declare class Chat {
|
|
|
175
177
|
constructor(transport: Transport);
|
|
176
178
|
}
|
|
177
179
|
|
|
178
|
-
/**
|
|
180
|
+
/**
|
|
181
|
+
* Task polling for long-running operations.
|
|
182
|
+
*
|
|
183
|
+
* A generation call always returns a handle, never sometimes a handle and
|
|
184
|
+
* sometimes a plain object — the caller decides whether to wait. When the server
|
|
185
|
+
* answers synchronously (some endpoints do for fast or cached results) the
|
|
186
|
+
* handle is born already complete, so `wait()` returns immediately rather than
|
|
187
|
+
* polling for something that has already arrived.
|
|
188
|
+
*
|
|
189
|
+
* Kept behaviourally identical to the Python and Go implementations; a
|
|
190
|
+
* divergence here is a cross-language bug that only shows up in production.
|
|
191
|
+
*/
|
|
179
192
|
|
|
180
193
|
interface TaskHandleOptions {
|
|
181
194
|
pollInterval?: number;
|
|
@@ -186,7 +199,11 @@ declare class TaskHandle {
|
|
|
186
199
|
private pollEndpoint;
|
|
187
200
|
private transport;
|
|
188
201
|
private _result;
|
|
189
|
-
constructor(taskId: string, pollEndpoint: string, transport: Transport);
|
|
202
|
+
constructor(taskId: string, pollEndpoint: string, transport: Transport, submitted?: Record<string, unknown>);
|
|
203
|
+
get done(): boolean;
|
|
204
|
+
/** Artifact URLs, once completed. */
|
|
205
|
+
urls(): string[];
|
|
206
|
+
progress(): number | null;
|
|
190
207
|
get(): Promise<Record<string, unknown>>;
|
|
191
208
|
isCompleted(): Promise<boolean>;
|
|
192
209
|
wait(opts?: TaskHandleOptions): Promise<Record<string, unknown>>;
|
package/dist/index.d.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* When the API returns `402 Payment Required`, the transport calls the
|
|
5
5
|
* configured `PaymentHandler` to produce the extra headers (typically
|
|
6
|
-
* `
|
|
6
|
+
* `PAYMENT-SIGNATURE`) to attach to the retry. This keeps the SDK free of any
|
|
7
7
|
* chain-specific signing logic, and lets callers plug in a real x402
|
|
8
8
|
* implementation such as `@acedatacloud/x402-client`.
|
|
9
9
|
*/
|
|
@@ -11,7 +11,9 @@
|
|
|
11
11
|
interface PaymentRequirement {
|
|
12
12
|
scheme: string;
|
|
13
13
|
network: string;
|
|
14
|
-
|
|
14
|
+
amount?: string;
|
|
15
|
+
/** @deprecated Legacy challenge field. */
|
|
16
|
+
maxAmountRequired?: string;
|
|
15
17
|
maxTimeoutSeconds?: number;
|
|
16
18
|
resource?: string;
|
|
17
19
|
description?: string;
|
|
@@ -34,7 +36,7 @@ interface PaymentHandlerContext {
|
|
|
34
36
|
}
|
|
35
37
|
/** Result a payment handler must return. */
|
|
36
38
|
interface PaymentHandlerResult {
|
|
37
|
-
/** Extra headers to attach to the retry (
|
|
39
|
+
/** Extra headers to attach to the retry (normally `PAYMENT-SIGNATURE`). */
|
|
38
40
|
headers: Record<string, string>;
|
|
39
41
|
}
|
|
40
42
|
/** A callable that signs/settles a payment and returns retry headers. */
|
|
@@ -175,7 +177,18 @@ declare class Chat {
|
|
|
175
177
|
constructor(transport: Transport);
|
|
176
178
|
}
|
|
177
179
|
|
|
178
|
-
/**
|
|
180
|
+
/**
|
|
181
|
+
* Task polling for long-running operations.
|
|
182
|
+
*
|
|
183
|
+
* A generation call always returns a handle, never sometimes a handle and
|
|
184
|
+
* sometimes a plain object — the caller decides whether to wait. When the server
|
|
185
|
+
* answers synchronously (some endpoints do for fast or cached results) the
|
|
186
|
+
* handle is born already complete, so `wait()` returns immediately rather than
|
|
187
|
+
* polling for something that has already arrived.
|
|
188
|
+
*
|
|
189
|
+
* Kept behaviourally identical to the Python and Go implementations; a
|
|
190
|
+
* divergence here is a cross-language bug that only shows up in production.
|
|
191
|
+
*/
|
|
179
192
|
|
|
180
193
|
interface TaskHandleOptions {
|
|
181
194
|
pollInterval?: number;
|
|
@@ -186,7 +199,11 @@ declare class TaskHandle {
|
|
|
186
199
|
private pollEndpoint;
|
|
187
200
|
private transport;
|
|
188
201
|
private _result;
|
|
189
|
-
constructor(taskId: string, pollEndpoint: string, transport: Transport);
|
|
202
|
+
constructor(taskId: string, pollEndpoint: string, transport: Transport, submitted?: Record<string, unknown>);
|
|
203
|
+
get done(): boolean;
|
|
204
|
+
/** Artifact URLs, once completed. */
|
|
205
|
+
urls(): string[];
|
|
206
|
+
progress(): number | null;
|
|
190
207
|
get(): Promise<Record<string, unknown>>;
|
|
191
208
|
isCompleted(): Promise<boolean>;
|
|
192
209
|
wait(opts?: TaskHandleOptions): Promise<Record<string, unknown>>;
|