@acedatacloud/sdk 2026.804.0 → 2026.807.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 +40 -0
- package/dist/index.d.ts +40 -0
- package/dist/index.js +64 -7
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +64 -7
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/client.ts +3 -0
- package/src/resources/captcha.ts +66 -0
- package/src/resources/providers/suno.ts +3 -3
- package/src/resources/tasks.ts +1 -0
package/dist/index.d.mts
CHANGED
|
@@ -177,6 +177,45 @@ declare class Chat {
|
|
|
177
177
|
constructor(transport: Transport);
|
|
178
178
|
}
|
|
179
179
|
|
|
180
|
+
/** Captcha resources (`/captcha/*`). */
|
|
181
|
+
|
|
182
|
+
declare class Recognition {
|
|
183
|
+
private transport;
|
|
184
|
+
constructor(transport: Transport);
|
|
185
|
+
hcaptcha(opts?: {
|
|
186
|
+
queries?: string[];
|
|
187
|
+
question?: string;
|
|
188
|
+
async?: boolean;
|
|
189
|
+
[key: string]: unknown;
|
|
190
|
+
}): Promise<Record<string, unknown>>;
|
|
191
|
+
}
|
|
192
|
+
declare class Token {
|
|
193
|
+
private transport;
|
|
194
|
+
constructor(transport: Transport);
|
|
195
|
+
hcaptcha(opts: {
|
|
196
|
+
websiteKey: string;
|
|
197
|
+
websiteUrl: string;
|
|
198
|
+
rqdata?: string;
|
|
199
|
+
proxy?: string;
|
|
200
|
+
async?: boolean;
|
|
201
|
+
[key: string]: unknown;
|
|
202
|
+
}): Promise<Record<string, unknown>>;
|
|
203
|
+
}
|
|
204
|
+
declare class Tasks$2 {
|
|
205
|
+
private transport;
|
|
206
|
+
constructor(transport: Transport);
|
|
207
|
+
retrieve(opts: {
|
|
208
|
+
taskId: string;
|
|
209
|
+
[key: string]: unknown;
|
|
210
|
+
}): Promise<Record<string, unknown>>;
|
|
211
|
+
}
|
|
212
|
+
declare class Captcha {
|
|
213
|
+
readonly recognition: Recognition;
|
|
214
|
+
readonly token: Token;
|
|
215
|
+
readonly tasks: Tasks$2;
|
|
216
|
+
constructor(transport: Transport);
|
|
217
|
+
}
|
|
218
|
+
|
|
180
219
|
/**
|
|
181
220
|
* Task polling for long-running operations.
|
|
182
221
|
*
|
|
@@ -740,6 +779,7 @@ interface AceDataCloudOptions {
|
|
|
740
779
|
declare class AceDataCloud {
|
|
741
780
|
readonly aichat: AiChat;
|
|
742
781
|
readonly chat: Chat;
|
|
782
|
+
readonly captcha: Captcha;
|
|
743
783
|
readonly images: Images$1;
|
|
744
784
|
readonly audio: Audio;
|
|
745
785
|
readonly video: Video;
|
package/dist/index.d.ts
CHANGED
|
@@ -177,6 +177,45 @@ declare class Chat {
|
|
|
177
177
|
constructor(transport: Transport);
|
|
178
178
|
}
|
|
179
179
|
|
|
180
|
+
/** Captcha resources (`/captcha/*`). */
|
|
181
|
+
|
|
182
|
+
declare class Recognition {
|
|
183
|
+
private transport;
|
|
184
|
+
constructor(transport: Transport);
|
|
185
|
+
hcaptcha(opts?: {
|
|
186
|
+
queries?: string[];
|
|
187
|
+
question?: string;
|
|
188
|
+
async?: boolean;
|
|
189
|
+
[key: string]: unknown;
|
|
190
|
+
}): Promise<Record<string, unknown>>;
|
|
191
|
+
}
|
|
192
|
+
declare class Token {
|
|
193
|
+
private transport;
|
|
194
|
+
constructor(transport: Transport);
|
|
195
|
+
hcaptcha(opts: {
|
|
196
|
+
websiteKey: string;
|
|
197
|
+
websiteUrl: string;
|
|
198
|
+
rqdata?: string;
|
|
199
|
+
proxy?: string;
|
|
200
|
+
async?: boolean;
|
|
201
|
+
[key: string]: unknown;
|
|
202
|
+
}): Promise<Record<string, unknown>>;
|
|
203
|
+
}
|
|
204
|
+
declare class Tasks$2 {
|
|
205
|
+
private transport;
|
|
206
|
+
constructor(transport: Transport);
|
|
207
|
+
retrieve(opts: {
|
|
208
|
+
taskId: string;
|
|
209
|
+
[key: string]: unknown;
|
|
210
|
+
}): Promise<Record<string, unknown>>;
|
|
211
|
+
}
|
|
212
|
+
declare class Captcha {
|
|
213
|
+
readonly recognition: Recognition;
|
|
214
|
+
readonly token: Token;
|
|
215
|
+
readonly tasks: Tasks$2;
|
|
216
|
+
constructor(transport: Transport);
|
|
217
|
+
}
|
|
218
|
+
|
|
180
219
|
/**
|
|
181
220
|
* Task polling for long-running operations.
|
|
182
221
|
*
|
|
@@ -740,6 +779,7 @@ interface AceDataCloudOptions {
|
|
|
740
779
|
declare class AceDataCloud {
|
|
741
780
|
readonly aichat: AiChat;
|
|
742
781
|
readonly chat: Chat;
|
|
782
|
+
readonly captcha: Captcha;
|
|
743
783
|
readonly images: Images$1;
|
|
744
784
|
readonly audio: Audio;
|
|
745
785
|
readonly video: Video;
|
package/dist/index.js
CHANGED
|
@@ -490,6 +490,60 @@ var Chat = class {
|
|
|
490
490
|
}
|
|
491
491
|
};
|
|
492
492
|
|
|
493
|
+
// src/resources/captcha.ts
|
|
494
|
+
var Recognition = class {
|
|
495
|
+
constructor(transport) {
|
|
496
|
+
this.transport = transport;
|
|
497
|
+
}
|
|
498
|
+
transport;
|
|
499
|
+
hcaptcha(opts = {}) {
|
|
500
|
+
const { queries, question, ...rest } = opts;
|
|
501
|
+
const body = { ...rest };
|
|
502
|
+
if (queries !== void 0) body.queries = queries;
|
|
503
|
+
if (question !== void 0) body.question = question;
|
|
504
|
+
return this.transport.request("POST", "/captcha/recognition/hcaptcha", { json: body });
|
|
505
|
+
}
|
|
506
|
+
};
|
|
507
|
+
var Token = class {
|
|
508
|
+
constructor(transport) {
|
|
509
|
+
this.transport = transport;
|
|
510
|
+
}
|
|
511
|
+
transport;
|
|
512
|
+
hcaptcha(opts) {
|
|
513
|
+
const { websiteKey, websiteUrl, rqdata, proxy, ...rest } = opts;
|
|
514
|
+
const body = {
|
|
515
|
+
website_key: websiteKey,
|
|
516
|
+
website_url: websiteUrl,
|
|
517
|
+
...rest
|
|
518
|
+
};
|
|
519
|
+
if (rqdata !== void 0) body.rqdata = rqdata;
|
|
520
|
+
if (proxy !== void 0) body.proxy = proxy;
|
|
521
|
+
return this.transport.request("POST", "/captcha/token/hcaptcha", { json: body });
|
|
522
|
+
}
|
|
523
|
+
};
|
|
524
|
+
var Tasks = class {
|
|
525
|
+
constructor(transport) {
|
|
526
|
+
this.transport = transport;
|
|
527
|
+
}
|
|
528
|
+
transport;
|
|
529
|
+
retrieve(opts) {
|
|
530
|
+
const { taskId: taskId14, ...rest } = opts;
|
|
531
|
+
return this.transport.request("POST", "/captcha/tasks", {
|
|
532
|
+
json: { task_id: taskId14, ...rest }
|
|
533
|
+
});
|
|
534
|
+
}
|
|
535
|
+
};
|
|
536
|
+
var Captcha = class {
|
|
537
|
+
recognition;
|
|
538
|
+
token;
|
|
539
|
+
tasks;
|
|
540
|
+
constructor(transport) {
|
|
541
|
+
this.recognition = new Recognition(transport);
|
|
542
|
+
this.token = new Token(transport);
|
|
543
|
+
this.tasks = new Tasks(transport);
|
|
544
|
+
}
|
|
545
|
+
};
|
|
546
|
+
|
|
493
547
|
// src/runtime/tasks.ts
|
|
494
548
|
var DONE = /* @__PURE__ */ new Set(["succeed", "succeeded", "success", "completed", "complete", "finished"]);
|
|
495
549
|
var FAILED = /* @__PURE__ */ new Set(["failed", "failure", "error", "cancelled", "canceled", "rejected"]);
|
|
@@ -772,9 +826,10 @@ var SERVICE_TASK_ENDPOINTS = {
|
|
|
772
826
|
wan: "/wan/tasks",
|
|
773
827
|
pika: "/pika/tasks",
|
|
774
828
|
pixverse: "/pixverse/tasks",
|
|
775
|
-
webextrator: "/webextrator/tasks"
|
|
829
|
+
webextrator: "/webextrator/tasks",
|
|
830
|
+
captcha: "/captcha/tasks"
|
|
776
831
|
};
|
|
777
|
-
var
|
|
832
|
+
var Tasks2 = class {
|
|
778
833
|
constructor(transport) {
|
|
779
834
|
this.transport = transport;
|
|
780
835
|
}
|
|
@@ -977,7 +1032,7 @@ var Embeddings = class {
|
|
|
977
1032
|
return this.transport.request("POST", "/openai/embeddings", { json: body });
|
|
978
1033
|
}
|
|
979
1034
|
};
|
|
980
|
-
var
|
|
1035
|
+
var Tasks3 = class {
|
|
981
1036
|
constructor(transport) {
|
|
982
1037
|
this.transport = transport;
|
|
983
1038
|
}
|
|
@@ -1015,7 +1070,7 @@ var OpenAI = class {
|
|
|
1015
1070
|
this.responses = new Responses(transport);
|
|
1016
1071
|
this.images = new Images2(transport);
|
|
1017
1072
|
this.embeddings = new Embeddings(transport);
|
|
1018
|
-
this.tasks = new
|
|
1073
|
+
this.tasks = new Tasks3(transport);
|
|
1019
1074
|
}
|
|
1020
1075
|
};
|
|
1021
1076
|
|
|
@@ -2046,7 +2101,7 @@ var Suno = class {
|
|
|
2046
2101
|
if (options.lyricPrompt !== void 0) body["lyric_prompt"] = options.lyricPrompt;
|
|
2047
2102
|
if (options.vocalGender !== void 0) body["vocal_gender"] = options.vocalGender;
|
|
2048
2103
|
if (options.samplesStart !== void 0) body["samples_start"] = options.samplesStart;
|
|
2049
|
-
if (options.
|
|
2104
|
+
if (options.negativeTags !== void 0) body["negative_tags"] = options.negativeTags;
|
|
2050
2105
|
if (options.styleInfluence !== void 0) body["style_influence"] = options.styleInfluence;
|
|
2051
2106
|
if (options.mashupAudioIds !== void 0) body["mashup_audio_ids"] = options.mashupAudioIds;
|
|
2052
2107
|
if (options.overpaintingEnd !== void 0) body["overpainting_end"] = options.overpaintingEnd;
|
|
@@ -2057,7 +2112,7 @@ var Suno = class {
|
|
|
2057
2112
|
if (options.underpaintingStart !== void 0) body["underpainting_start"] = options.underpaintingStart;
|
|
2058
2113
|
if (options.replaceSectionStart !== void 0) body["replace_section_start"] = options.replaceSectionStart;
|
|
2059
2114
|
for (const [key, value] of Object.entries(options)) {
|
|
2060
|
-
if (!["action", "async", "audioId", "audioUrls", "audioWeight", "callbackUrl", "continueAt", "custom", "duration", "instrumental", "lyric", "lyricPrompt", "mashupAudioIds", "maxWait", "model", "overpaintingEnd", "overpaintingStart", "personaId", "pollInterval", "prompt", "replaceSectionEnd", "replaceSectionStart", "samplesEnd", "samplesStart", "style", "styleInfluence", "
|
|
2115
|
+
if (!["action", "async", "audioId", "audioUrls", "audioWeight", "callbackUrl", "continueAt", "custom", "duration", "instrumental", "lyric", "lyricPrompt", "mashupAudioIds", "maxWait", "model", "overpaintingEnd", "overpaintingStart", "personaId", "pollInterval", "prompt", "replaceSectionEnd", "replaceSectionStart", "samplesEnd", "samplesStart", "style", "styleInfluence", "negativeTags", "title", "underpaintingEnd", "underpaintingStart", "variationCategory", "vocalGender", "wait", "weirdness"].includes(key) && value !== void 0) {
|
|
2061
2116
|
body[key] = value;
|
|
2062
2117
|
}
|
|
2063
2118
|
}
|
|
@@ -2300,6 +2355,7 @@ function attachProviders(client, transport) {
|
|
|
2300
2355
|
var AceDataCloud = class {
|
|
2301
2356
|
aichat;
|
|
2302
2357
|
chat;
|
|
2358
|
+
captcha;
|
|
2303
2359
|
images;
|
|
2304
2360
|
audio;
|
|
2305
2361
|
video;
|
|
@@ -2327,11 +2383,12 @@ var AceDataCloud = class {
|
|
|
2327
2383
|
});
|
|
2328
2384
|
this.aichat = new AiChat(this.transport);
|
|
2329
2385
|
this.chat = new Chat(this.transport);
|
|
2386
|
+
this.captcha = new Captcha(this.transport);
|
|
2330
2387
|
this.images = new Images(this.transport);
|
|
2331
2388
|
this.audio = new Audio(this.transport);
|
|
2332
2389
|
this.video = new Video(this.transport);
|
|
2333
2390
|
this.search = new Search(this.transport);
|
|
2334
|
-
this.tasks = new
|
|
2391
|
+
this.tasks = new Tasks2(this.transport);
|
|
2335
2392
|
this.files = new Files(this.transport);
|
|
2336
2393
|
this.platform = new Platform(this.transport);
|
|
2337
2394
|
this.openai = new OpenAI(this.transport);
|