@sogni-ai/sogni-client 5.72.1 → 5.74.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.
Files changed (52) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/README.md +59 -0
  3. package/dist/Account/index.d.ts +5 -0
  4. package/dist/Account/index.js +50 -23
  5. package/dist/Account/index.js.map +1 -1
  6. package/dist/Account/subscription.types.d.ts +2 -0
  7. package/dist/Account/types.d.ts +9 -0
  8. package/dist/ApiClient/WebSocketClient/events.d.ts +6 -0
  9. package/dist/Projects/Job.d.ts +24 -0
  10. package/dist/Projects/Job.js +38 -18
  11. package/dist/Projects/Job.js.map +1 -1
  12. package/dist/Projects/createJobRequestMessage.d.ts +12 -0
  13. package/dist/Projects/createJobRequestMessage.js +80 -0
  14. package/dist/Projects/createJobRequestMessage.js.map +1 -1
  15. package/dist/Projects/index.d.ts +4 -1
  16. package/dist/Projects/index.js +23 -7
  17. package/dist/Projects/index.js.map +1 -1
  18. package/dist/Projects/recovery.js +2 -0
  19. package/dist/Projects/recovery.js.map +1 -1
  20. package/dist/Projects/types/RawProject.d.ts +7 -0
  21. package/dist/Projects/types/events.d.ts +6 -0
  22. package/dist/Projects/types/index.d.ts +52 -0
  23. package/dist/Projects/types/index.js.map +1 -1
  24. package/dist/version.d.ts +1 -1
  25. package/dist/version.js +1 -1
  26. package/dist-esm/Account/index.js +50 -23
  27. package/dist-esm/Account/index.js.map +1 -1
  28. package/dist-esm/Projects/Job.js +37 -18
  29. package/dist-esm/Projects/Job.js.map +1 -1
  30. package/dist-esm/Projects/createJobRequestMessage.js +79 -0
  31. package/dist-esm/Projects/createJobRequestMessage.js.map +1 -1
  32. package/dist-esm/Projects/index.js +25 -9
  33. package/dist-esm/Projects/index.js.map +1 -1
  34. package/dist-esm/Projects/recovery.js +2 -0
  35. package/dist-esm/Projects/recovery.js.map +1 -1
  36. package/dist-esm/Projects/types/index.js.map +1 -1
  37. package/dist-esm/version.js +1 -1
  38. package/llms-full.txt +48 -0
  39. package/llms.txt +2 -0
  40. package/package.json +3 -1
  41. package/src/Account/index.ts +51 -4
  42. package/src/Account/subscription.types.ts +2 -0
  43. package/src/Account/types.ts +10 -0
  44. package/src/ApiClient/WebSocketClient/events.ts +6 -0
  45. package/src/Projects/Job.ts +62 -1
  46. package/src/Projects/createJobRequestMessage.ts +90 -0
  47. package/src/Projects/index.ts +24 -4
  48. package/src/Projects/recovery.ts +1 -0
  49. package/src/Projects/types/RawProject.ts +7 -0
  50. package/src/Projects/types/events.ts +6 -0
  51. package/src/Projects/types/index.ts +52 -0
  52. package/src/version.ts +1 -1
@@ -126,6 +126,14 @@ export interface BaseProjectParams {
126
126
  * - tokens: opt out of Unlimited coverage and use Spark/SOGNI tokens.
127
127
  */
128
128
  billingMode?: BillingMode;
129
+ /**
130
+ * Opt in to Priority mode for this generation. Paid Unlimited plans on Fast
131
+ * only, with plan billing; excludes third-party vendor models. Uses 1.5× daily
132
+ * and monthly usage credits for
133
+ * earlier queue placement, behind Premium Spark. Does not change render speed.
134
+ * @default false
135
+ */
136
+ priorityMode?: boolean;
129
137
  /**
130
138
  * Optional client app/source label to attach to the project request for server-side attribution.
131
139
  */
@@ -484,6 +492,35 @@ export interface VideoProjectParams extends BaseProjectParams {
484
492
  * first/last-frame generation.
485
493
  */
486
494
  seedanceTaskType?: SeedanceTaskType;
495
+ /**
496
+ * Seedance 2.5 only: render this job as a 480p draft that can later be
497
+ * finalized at 1080p with `seedanceDraftJobId`. Every normal Seedance 2.5
498
+ * input is accepted (prompt, references, frames, duration, seed, audio,
499
+ * `seedanceTaskType`), the size must be the 480p class, and the price is the
500
+ * same as the same 480p job. A normal job can never be finalized, so choose
501
+ * draft mode when submitting.
502
+ *
503
+ * A completed draft job reports `job.seedanceDraft` and
504
+ * `job.seedanceDraftExpiresAt`, the time after which it can no longer be
505
+ * finalized. Mutually exclusive with `seedanceDraftJobId`.
506
+ */
507
+ seedanceDraft?: boolean;
508
+ /**
509
+ * Seedance 2.5 only: finalize a completed draft at 1080p. This is the draft's
510
+ * Sogni job id (`job.id` of a job created with `seedanceDraft: true`), on the
511
+ * same `modelId`, by the account that created the draft, before
512
+ * `seedanceDraftExpiresAt`.
513
+ *
514
+ * The final inherits the draft's prompt, media, duration, aspect ratio, seed
515
+ * and audio setting: omit references, first/last frames, audio, `duration`,
516
+ * `frames`, `ratio`, `seed`, `generateAudio` and `seedanceTaskType`, and pass
517
+ * an empty `positivePrompt` (it is not used). `numberOfMedia` must be 1. The
518
+ * output is the draft's aspect ratio at 1080p, priced at 1080p for the draft's
519
+ * duration. `outputFormat` and `returnLastFrame` may still be set. The
520
+ * completed final reports the draft it came from as `job.seedanceDraftJobId`.
521
+ * Mutually exclusive with `seedanceDraft`.
522
+ */
523
+ seedanceDraftJobId?: string;
487
524
  /**
488
525
  * @deprecated Ignored. Alibaba's Wan 3 API does not expose edit or extend
489
526
  * task modes. Pass `referenceVideo`/`referenceVideoUrls` for loose reference
@@ -1225,6 +1262,8 @@ export type MediaUrlParams = {
1225
1262
  };
1226
1263
 
1227
1264
  export interface EstimateRequest {
1265
+ /** Include Priority mode's 1.5× usage in the daily-capacity estimate. */
1266
+ priorityMode?: boolean;
1228
1267
  /**
1229
1268
  * Network to use. Can be 'fast' or 'relaxed'
1230
1269
  * @default 'fast'
@@ -1303,6 +1342,8 @@ export interface EstimateRequest {
1303
1342
  }
1304
1343
 
1305
1344
  export interface VideoEstimateRequest {
1345
+ /** Include Priority mode's 1.5× usage in the daily-capacity estimate. */
1346
+ priorityMode?: boolean;
1306
1347
  /** FlashVSR source geometry for an estimate. The server verifies the uploaded file at admission. */
1307
1348
  sourceWidth?: number;
1308
1349
  sourceHeight?: number;
@@ -1353,6 +1394,15 @@ export interface VideoEstimateRequest {
1353
1394
  * Optional estimate-only signal: non-empty list implies Seedance video-input pricing.
1354
1395
  */
1355
1396
  referenceVideoUrls?: string[];
1397
+ /** Seedance 2.5: quote a 480p draft. It is priced the same as the same 480p job. */
1398
+ seedanceDraft?: boolean;
1399
+ /**
1400
+ * Seedance 2.5: quote finalizing this draft (its Sogni job id) at 1080p. The
1401
+ * server prices the final from the draft itself (its duration, aspect ratio and
1402
+ * any input video) for the account that owns it, so `width`, `height`,
1403
+ * `duration` and `fps` do not change the quote; pass the draft's values.
1404
+ */
1405
+ seedanceDraftJobId?: string;
1356
1406
  /**
1357
1407
  * Network the job will render on. A Relaxed render never draws on the plan's
1358
1408
  * daily fair-use capacity, so its estimate carries no `dailyFairUsePct`.
@@ -1368,6 +1418,8 @@ export interface VideoEstimateRequest {
1368
1418
  }
1369
1419
 
1370
1420
  export interface AudioEstimateRequest {
1421
+ /** Include Priority mode's 1.5× usage in the daily-capacity estimate. */
1422
+ priorityMode?: boolean;
1371
1423
  tokenType: TokenType;
1372
1424
  model: string;
1373
1425
  duration: number;
package/src/version.ts CHANGED
@@ -1,3 +1,3 @@
1
1
  // AUTO-GENERATED by scripts/generate-version.mjs — do not edit.
2
2
  // Source of truth: package.json version.
3
- export const LIB_VERSION = '5.72.1';
3
+ export const LIB_VERSION = '5.74.0';