@nodaro/sdk 2.47.0 → 2.51.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 (88) hide show
  1. package/dist/{chunk-KBHDUHKM.js → chunk-2SQ7V6EX.js} +2 -2
  2. package/dist/chunk-2SQ7V6EX.js.map +1 -0
  3. package/dist/{chunk-FIMBPKIH.cjs → chunk-4BAHF762.cjs} +43 -2
  4. package/dist/chunk-4BAHF762.cjs.map +1 -0
  5. package/dist/chunk-6FZN3QQO.cjs +146 -0
  6. package/dist/chunk-6FZN3QQO.cjs.map +1 -0
  7. package/dist/{chunk-5MOJSYHI.js → chunk-7QK2NXJA.js} +43 -2
  8. package/dist/chunk-7QK2NXJA.js.map +1 -0
  9. package/dist/{chunk-JTAW54UM.js → chunk-AEUPH7EE.js} +2 -2
  10. package/dist/{chunk-34PU2DAT.cjs.map → chunk-AEUPH7EE.js.map} +1 -1
  11. package/dist/{chunk-DIF7A5OH.cjs → chunk-E5MJK3W5.cjs} +2 -2
  12. package/dist/chunk-E5MJK3W5.cjs.map +1 -0
  13. package/dist/{chunk-I7AHLDXV.js → chunk-EC6MC46Y.js} +10 -10
  14. package/dist/{chunk-I7AHLDXV.js.map → chunk-EC6MC46Y.js.map} +1 -1
  15. package/dist/{chunk-NP6KDFIJ.cjs → chunk-HPSENMVN.cjs} +18 -18
  16. package/dist/{chunk-NP6KDFIJ.cjs.map → chunk-HPSENMVN.cjs.map} +1 -1
  17. package/dist/{chunk-XKDVEQVD.cjs → chunk-LTZKNAXM.cjs} +2 -2
  18. package/dist/chunk-LTZKNAXM.cjs.map +1 -0
  19. package/dist/{chunk-OWG3XAHQ.js → chunk-OCRUDBPG.js} +10 -6
  20. package/dist/chunk-OCRUDBPG.js.map +1 -0
  21. package/dist/{chunk-MYTMNPCP.cjs → chunk-OMX7JBGY.cjs} +3 -3
  22. package/dist/{chunk-MYTMNPCP.cjs.map → chunk-OMX7JBGY.cjs.map} +1 -1
  23. package/dist/{chunk-7LTVS75S.cjs → chunk-P6AM42UB.cjs} +2 -2
  24. package/dist/chunk-P6AM42UB.cjs.map +1 -0
  25. package/dist/{chunk-34PU2DAT.cjs → chunk-Q45PC4YD.cjs} +2 -2
  26. package/dist/chunk-Q45PC4YD.cjs.map +1 -0
  27. package/dist/{chunk-PQHZUWSL.js → chunk-THLTFB6I.js} +2 -2
  28. package/dist/chunk-THLTFB6I.js.map +1 -0
  29. package/dist/{chunk-GDDV5U32.cjs → chunk-TY2S25W5.cjs} +10 -6
  30. package/dist/chunk-TY2S25W5.cjs.map +1 -0
  31. package/dist/chunk-WYYDWJFF.js +144 -0
  32. package/dist/chunk-WYYDWJFF.js.map +1 -0
  33. package/dist/{chunk-FCYN4N3M.js → chunk-XISHBW5I.js} +3 -3
  34. package/dist/{chunk-FCYN4N3M.js.map → chunk-XISHBW5I.js.map} +1 -1
  35. package/dist/{chunk-XILR6TFO.js → chunk-YXVMQEJX.js} +2 -2
  36. package/dist/chunk-YXVMQEJX.js.map +1 -0
  37. package/dist/entries/billing.cjs +2 -2
  38. package/dist/entries/billing.d.cts +202 -3
  39. package/dist/entries/billing.d.ts +202 -3
  40. package/dist/entries/billing.js +1 -1
  41. package/dist/entries/cast-swap.cjs +2 -2
  42. package/dist/entries/cast-swap.d.cts +34 -31
  43. package/dist/entries/cast-swap.d.ts +34 -31
  44. package/dist/entries/cast-swap.js +1 -1
  45. package/dist/entries/client.cjs +14 -14
  46. package/dist/entries/client.js +9 -9
  47. package/dist/entries/core.cjs +5 -5
  48. package/dist/entries/core.js +1 -1
  49. package/dist/entries/credits.cjs +2 -2
  50. package/dist/entries/credits.d.cts +179 -1
  51. package/dist/entries/credits.d.ts +179 -1
  52. package/dist/entries/credits.js +1 -1
  53. package/dist/entries/jobs.cjs +2 -2
  54. package/dist/entries/jobs.d.cts +18 -7
  55. package/dist/entries/jobs.d.ts +18 -7
  56. package/dist/entries/jobs.js +1 -1
  57. package/dist/entries/node-presets.cjs +2 -2
  58. package/dist/entries/node-presets.d.cts +6 -0
  59. package/dist/entries/node-presets.d.ts +6 -0
  60. package/dist/entries/node-presets.js +1 -1
  61. package/dist/entries/trash.cjs +2 -2
  62. package/dist/entries/trash.d.cts +4 -1
  63. package/dist/entries/trash.d.ts +4 -1
  64. package/dist/entries/trash.js +1 -1
  65. package/dist/entries/trends.cjs +2 -2
  66. package/dist/entries/trends.d.cts +22 -13
  67. package/dist/entries/trends.d.ts +22 -13
  68. package/dist/entries/trends.js +1 -1
  69. package/dist/index.cjs +22 -22
  70. package/dist/index.d.cts +2 -2
  71. package/dist/index.d.ts +2 -2
  72. package/dist/index.js +9 -9
  73. package/package.json +3 -3
  74. package/dist/chunk-5MOJSYHI.js.map +0 -1
  75. package/dist/chunk-7LTVS75S.cjs.map +0 -1
  76. package/dist/chunk-DIF7A5OH.cjs.map +0 -1
  77. package/dist/chunk-FIMBPKIH.cjs.map +0 -1
  78. package/dist/chunk-GDDV5U32.cjs.map +0 -1
  79. package/dist/chunk-J4WFSKY6.js +0 -50
  80. package/dist/chunk-J4WFSKY6.js.map +0 -1
  81. package/dist/chunk-JTAW54UM.js.map +0 -1
  82. package/dist/chunk-KBHDUHKM.js.map +0 -1
  83. package/dist/chunk-NGKODS3J.cjs +0 -52
  84. package/dist/chunk-NGKODS3J.cjs.map +0 -1
  85. package/dist/chunk-OWG3XAHQ.js.map +0 -1
  86. package/dist/chunk-PQHZUWSL.js.map +0 -1
  87. package/dist/chunk-XILR6TFO.js.map +0 -1
  88. package/dist/chunk-XKDVEQVD.cjs.map +0 -1
@@ -8,8 +8,10 @@ import '@nodaro/shared/organizations';
8
8
  * (`backend/src/ee/routes/billing.ts`, `backend/src/routes/billing-surface.ts`),
9
9
  * the source of truth: keep these in sync if they change.
10
10
  *
11
- * Buying, changing the plan and the payment settings stay in the Nodaro app:
12
- * those routes refuse API and app tokens, so they have no method here.
11
+ * Buying, the plan, the payment settings, the receipts and the invoices answer
12
+ * a SIGNED-IN SESSION only (`supabaseAuth`, the credential a first-party web
13
+ * app holds): those routes refuse an API key and an app's OAuth token with
14
+ * `403 forbidden` (`ForbiddenError`). Their methods are marked so below.
13
15
  */
14
16
  /** A sum of money in its currency's major unit (`12` = 12.00), with its ISO-4217 code (`"USD"`). */
15
17
  interface BillingMoney {
@@ -203,6 +205,203 @@ declare class BillingResource {
203
205
  * when the provider could not answer — not a zero balance. Every edition.
204
206
  */
205
207
  account(): Promise<BillingAccountSummary | null>;
208
+ /**
209
+ * `GET /v1/billing/transactions` → the account's credit purchases, newest
210
+ * first: subscription payments and credit packs, each with its Stripe
211
+ * receipt link when one was captured. **Signed-in session only.**
212
+ */
213
+ purchases(): Promise<BillingPurchase[]>;
214
+ /**
215
+ * `GET /v1/billing/invoices` → every payment as a document, newest first:
216
+ * a Stripe invoice (with its PDF) for each subscription payment, a hosted
217
+ * receipt for each credit pack or load. **Signed-in session only.**
218
+ */
219
+ invoices(): Promise<BillingDocument[]>;
220
+ /**
221
+ * `GET /v1/billing/payment-method` → the card and the billing details on
222
+ * file with Stripe; both `null` for an account that has not bought yet
223
+ * (never an error). **Signed-in session only.**
224
+ */
225
+ paymentMethod(): Promise<BillingPaymentMethod>;
226
+ /**
227
+ * `GET /v1/billing/auto-recharge` → the automatic top-up setting: when the
228
+ * balance falls under `thresholdCredits`, `amountUsd` is loaded from the
229
+ * saved card. **Signed-in session only.**
230
+ */
231
+ autoRecharge(): Promise<BillingAutoRecharge>;
232
+ /**
233
+ * `PUT /v1/billing/auto-recharge` → changes the automatic top-up. Enabling
234
+ * needs both `thresholdCredits` (100–100,000) and `amountUsd` (a whole
235
+ * amount in the load range); the server answers `400` otherwise. A change
236
+ * clears the failure count. **Signed-in session only.**
237
+ */
238
+ setAutoRecharge(input: BillingAutoRechargeInput): Promise<BillingAutoRechargeSaved>;
239
+ /**
240
+ * `POST /v1/billing/create-checkout-session` → a Stripe Checkout page for a
241
+ * plan or a credit pack (`priceId` from {@link BillingPlansResult}): send
242
+ * the person to `url`. Pass `returnPath` (a path on your own origin, such
243
+ * as `"/billing"`) to have Stripe bring them back to your app with
244
+ * `checkout=success` or `checkout=cancelled` in the query; without it the
245
+ * Nodaro app's own pages are used. `ForbiddenError` with the code
246
+ * `self_serve_disabled` on a deployment that does not sell to its users.
247
+ * **Signed-in session only.**
248
+ */
249
+ checkout(input: BillingCheckoutInput): Promise<BillingCheckoutSession>;
250
+ /**
251
+ * `POST /v1/billing/create-load-session` → a Stripe Checkout page that loads
252
+ * a whole amount (`amountUsd`, within {@link BillingPlansResult.topUpRange})
253
+ * as credits at the packs' rate; `credits` is what it will grant. The card
254
+ * is saved for auto top-up. `returnPath` as in {@link checkout}.
255
+ * **Signed-in session only.**
256
+ */
257
+ loadCredits(input: BillingLoadInput): Promise<BillingLoadSession>;
258
+ /**
259
+ * `POST /v1/billing/manage-subscription` → a Stripe Customer Portal page
260
+ * (the card, the billing address, the invoices, cancelling): send the person
261
+ * to `url`; `returnPath` is where the portal's Back goes (default the app's
262
+ * `/billing`). `NotFoundError` before a first purchase — Stripe does not
263
+ * know the account yet. **Signed-in session only.**
264
+ */
265
+ portal(input?: BillingPortalInput): Promise<BillingPortalSession>;
266
+ /**
267
+ * `POST /v1/billing/change-plan` → moves the active subscription to another
268
+ * plan's price (`newPriceId`, a subscription price from the plans list),
269
+ * prorated by Stripe; the new tier applies at once. `NotFoundError` with no
270
+ * active subscription; `400` on a pack's price or the current one.
271
+ * **Signed-in session only.**
272
+ */
273
+ changePlan(input: BillingChangePlanInput): Promise<BillingChangePlanResult>;
274
+ }
275
+ /** One credit purchase (`billing.purchases()`), as the `transactions` row names it. */
276
+ interface BillingPurchase {
277
+ id: string;
278
+ /** The Stripe payment or subscription id. */
279
+ stripe_transaction_id: string | null;
280
+ /** `"subscription"` (a plan payment), `"topup"` (a credit pack or a load) or `"refund"` (money given back: `credits_granted` negative). */
281
+ type: string;
282
+ /** What was paid, in US dollars (on a refund, the sum given back). */
283
+ amount_usd: number;
284
+ /** Negative on a refund. */
285
+ credits_granted: number;
286
+ /** The plan paid for, on a subscription payment. */
287
+ tier: string | null;
288
+ /** ISO-8601. */
289
+ created_at: string;
290
+ /** Stripe's hosted receipt; `null` when none was captured. */
291
+ receipt_url: string | null;
292
+ }
293
+ /** A payment document: a Stripe invoice (a subscription payment) or a receipt (a credit purchase). */
294
+ interface BillingDocument {
295
+ id: string;
296
+ kind: "invoice" | "receipt";
297
+ /** The invoice number Stripe printed; `null` on a receipt. */
298
+ number: string | null;
299
+ /** ISO-8601. */
300
+ at: string;
301
+ amount: BillingMoney;
302
+ /** The credits the payment granted; `null` on an invoice (the plan's credits come with the period). Negative on a refund. */
303
+ credits: number | null;
304
+ /** `"paid"`, `"open"`, `"void"`, `"uncollectible"`, or `"refunded"` (a receipt for money given back: `amount` and `credits` negative). */
305
+ status: string;
306
+ description: string | null;
307
+ /** The PDF, on an invoice; `null` on a receipt. */
308
+ pdfUrl: string | null;
309
+ /** The hosted page: Stripe's invoice page, or the receipt. */
310
+ url: string | null;
311
+ }
312
+ /** The card on file, as Stripe shows it. */
313
+ interface BillingCard {
314
+ /** `"visa"`, `"mastercard"`, … */
315
+ brand: string;
316
+ last4: string;
317
+ expMonth: number;
318
+ expYear: number;
319
+ }
320
+ /** The name, email and country on file. */
321
+ interface BillingDetails {
322
+ name: string | null;
323
+ email: string | null;
324
+ /** ISO-3166 alpha-2. */
325
+ country: string | null;
326
+ }
327
+ /** The answer of `billing.paymentMethod()`: both `null` before a first purchase. */
328
+ interface BillingPaymentMethod {
329
+ card: BillingCard | null;
330
+ billingDetails: BillingDetails | null;
331
+ }
332
+ /** The automatic top-up setting (`billing.autoRecharge()`). */
333
+ interface BillingAutoRecharge {
334
+ enabled: boolean;
335
+ /** Load when the balance falls under this many credits; `null` when never set. */
336
+ thresholdCredits: number | null;
337
+ /** The whole dollar amount loaded each time; `null` when never set. */
338
+ amountUsd: number | null;
339
+ /** Failed attempts in a row; the server stops trying after a few, until the setting is saved again. */
340
+ failureCount: number;
341
+ /** ISO-8601; `null` before the first attempt. */
342
+ lastAttemptAt: string | null;
343
+ /** Whether a card is saved to charge; without one, enabling cannot work. */
344
+ hasSavedCard: boolean;
345
+ }
346
+ /** What `billing.setAutoRecharge()` sends; `thresholdCredits` and `amountUsd` are both required to enable. */
347
+ interface BillingAutoRechargeInput {
348
+ enabled: boolean;
349
+ thresholdCredits?: number;
350
+ amountUsd?: number;
351
+ }
352
+ /** What `billing.setAutoRecharge()` answers: the fields as sent (`null` for one left out, even when a stored value remains); read {@link BillingResource.autoRecharge} for the whole setting. */
353
+ interface BillingAutoRechargeSaved {
354
+ enabled: boolean;
355
+ thresholdCredits: number | null;
356
+ amountUsd: number | null;
357
+ }
358
+ /** What `billing.checkout()` sends. */
359
+ interface BillingCheckoutInput {
360
+ /** A plan's monthly or yearly price id, or a credit pack's (`BillingTopUp.id`). */
361
+ priceId: string;
362
+ /** Inferred from the price when omitted. */
363
+ mode?: "subscription" | "payment";
364
+ /** A path on the calling origin Stripe brings the person back to (`"/billing"`, a query allowed): one leading `/`, no host, no `#`. Wins over `embedded`. */
365
+ returnPath?: string;
366
+ /** Set by an embedded first-party surface: return to the app's public checkout-complete page. */
367
+ embedded?: boolean;
368
+ }
369
+ /** A Stripe Checkout page to send the person to. */
370
+ interface BillingCheckoutSession {
371
+ url: string | null;
372
+ }
373
+ /** What `billing.loadCredits()` sends. */
374
+ interface BillingLoadInput {
375
+ /** A whole dollar amount within `topUpRange`. */
376
+ amountUsd: number;
377
+ /** As in {@link BillingCheckoutInput.returnPath}; wins over `embedded`. */
378
+ returnPath?: string;
379
+ embedded?: boolean;
380
+ }
381
+ /** A Stripe Checkout page for a load, and the credits it grants. */
382
+ interface BillingLoadSession {
383
+ url: string | null;
384
+ credits: number;
385
+ }
386
+ /** What `billing.portal()` sends. */
387
+ interface BillingPortalInput {
388
+ /** Where the portal's Back goes: a path on the calling origin; default the app's `/billing`. */
389
+ returnPath?: string;
390
+ }
391
+ /** A Stripe Customer Portal page to send the person to. */
392
+ interface BillingPortalSession {
393
+ url: string;
394
+ }
395
+ /** What `billing.changePlan()` sends. */
396
+ interface BillingChangePlanInput {
397
+ /** A subscription price id from the plans list. */
398
+ newPriceId: string;
399
+ }
400
+ /** What `billing.changePlan()` answers. */
401
+ interface BillingChangePlanResult {
402
+ subscriptionId: string;
403
+ /** The plan now in force: `"basic"`, `"standard"`, … */
404
+ tier: string;
206
405
  }
207
406
 
208
- export { type BillingAccountSummary, type BillingMoney, type BillingMonthlyPrice, type BillingPlan, type BillingPlanPrices, type BillingPlansResult, type BillingPriceCredits, BillingResource, type BillingSubscription, type BillingSubscriptionResult, type BillingSurface, type BillingTopUp, type BillingUsageCategory, type BillingYearlyPrice };
407
+ export { type BillingAccountSummary, type BillingAutoRecharge, type BillingAutoRechargeInput, type BillingAutoRechargeSaved, type BillingCard, type BillingChangePlanInput, type BillingChangePlanResult, type BillingCheckoutInput, type BillingCheckoutSession, type BillingDetails, type BillingDocument, type BillingLoadInput, type BillingLoadSession, type BillingMoney, type BillingMonthlyPrice, type BillingPaymentMethod, type BillingPlan, type BillingPlanPrices, type BillingPlansResult, type BillingPortalInput, type BillingPortalSession, type BillingPriceCredits, type BillingPurchase, BillingResource, type BillingSubscription, type BillingSubscriptionResult, type BillingSurface, type BillingTopUp, type BillingUsageCategory, type BillingYearlyPrice };
@@ -1,4 +1,4 @@
1
1
  import '../chunk-M6Y5TOYE.js';
2
- export { BillingResource } from '../chunk-J4WFSKY6.js';
2
+ export { BillingResource } from '../chunk-WYYDWJFF.js';
3
3
  //# sourceMappingURL=billing.js.map
4
4
  //# sourceMappingURL=billing.js.map
@@ -1,13 +1,13 @@
1
1
  'use strict';
2
2
 
3
3
  require('../chunk-RQSGS7ZK.cjs');
4
- var chunkGDDV5U32_cjs = require('../chunk-GDDV5U32.cjs');
4
+ var chunkTY2S25W5_cjs = require('../chunk-TY2S25W5.cjs');
5
5
 
6
6
 
7
7
 
8
8
  Object.defineProperty(exports, "CastSwapResource", {
9
9
  enumerable: true,
10
- get: function () { return chunkGDDV5U32_cjs.CastSwapResource; }
10
+ get: function () { return chunkTY2S25W5_cjs.CastSwapResource; }
11
11
  });
12
12
  //# sourceMappingURL=cast-swap.cjs.map
13
13
  //# sourceMappingURL=cast-swap.cjs.map
@@ -15,8 +15,8 @@ import '@nodaro/shared/organizations';
15
15
  * photos if it fails, and is turned off with `prepareReferences: false`.
16
16
  * Locations are not prepared.
17
17
  *
18
- * Engines: a run is made on Nodaro Motion Pro (`engine` left out, or
19
- * `"motion-pro"`) or Nodaro Motion Lite (`"motion-lite"`). Lite renders 720p
18
+ * Engines: a run is made on Nodaro Motion Prism (`engine` left out, or
19
+ * `"motion-prism"`) or Nodaro Motion Pulse (`"motion-pulse"`). Pulse renders 720p
20
20
  * (its default) or 1080p and has no draft; it makes a new take guided by the
21
21
  * clip and pictures, so its Full Quality is a new take at 1080p rather than
22
22
  * the same take re-rendered (`CastSwapFullQualityEstimate.kind`).
@@ -40,7 +40,7 @@ import '@nodaro/shared/organizations';
40
40
  * anything is charged: 400 `validation_error` (the body: no role with images,
41
41
  * no reference and no `prePrompt` or `postPrompt`, more roles of a kind
42
42
  * than allowed, more than 30 images in all, `draft: true` above 480p, a
43
- * `prePrompt` or `postPrompt` over 4,000 characters); on Nodaro Motion Lite,
43
+ * `prePrompt` or `postPrompt` over 4,000 characters); on Nodaro Motion Pulse,
44
44
  * `draft_unsupported` (`draft: true`), `resolution_unsupported` (480p),
45
45
  * `output_format_unsupported` (a MOV edit output) and `too_many_images` (more
46
46
  * than 10 images in the run, across every role and fixed reference);
@@ -51,32 +51,34 @@ import '@nodaro/shared/organizations';
51
51
  * `inPreview: false`, always refused even with a prompt, or with no role kept
52
52
  * in it that has images and no `prePrompt` or `postPrompt`), `prompt_too_long`
53
53
  * (the prompt would build too long: a `{role:N}` reads as the role's name when
54
- * it sends no images; Nodaro Motion Lite's cap is 8,000 characters); 401; 402 `insufficient_credits` (`run()` only); 404
54
+ * it sends no images; Nodaro Motion Pulse's cap is 8,000 characters); 401; 402 `insufficient_credits` (`run()` only); 404
55
55
  * (a `sessionId` you may not use, `run()` only); 422 `job_blocked` (`run()`
56
56
  * only); 503 `host_too_old` (both); 503 `estimate_unavailable` (`estimate()`
57
57
  * only).
58
58
  */
59
59
  /**
60
60
  * The engine a Nodaro Motion run is made on, by its public id. Left out =
61
- * `"motion-pro"`.
61
+ * `"motion-prism"`.
62
62
  *
63
- * - `"motion-pro"` (Nodaro Motion Pro): 480p (the default, a draft unless
63
+ * - `"motion-prism"` (Nodaro Motion Prism): 480p (the default, a draft unless
64
64
  * `draft: false`), 720p or 1080p; Full Quality re-renders a draft's own take
65
65
  * at 1080p.
66
- * - `"motion-lite"` (Nodaro Motion Lite): 720p (the default) or 1080p, never a
66
+ * - `"motion-pulse"` (Nodaro Motion Pulse): 720p (the default) or 1080p, never a
67
67
  * draft (`draft: true` answers 400 `draft_unsupported`); Full Quality makes a
68
68
  * new take at 1080p from a completed 720p run's inputs. A preview is still
69
69
  * 4 s from `previewStart`.
70
70
  */
71
- type CastSwapEngine = "motion-pro" | "motion-lite";
71
+ type CastSwapEngine = "motion-prism" | "motion-pulse";
72
72
  /**
73
- * The engine ids an older client sent (`"seedance-2-5"` = `"motion-pro"`,
74
- * `"kling-4"` = `"motion-lite"`). Still accepted in a request; never returned.
73
+ * The engine ids an older client sent: the earlier public ids (`"motion-pro"`
74
+ * = `"motion-prism"`, `"motion-lite"` = `"motion-pulse"`) and the internal
75
+ * ones (`"seedance-2-5"`, `"kling-4"`). Still accepted in a request; never
76
+ * returned.
75
77
  * @deprecated use {@link CastSwapEngine}.
76
78
  */
77
- type CastSwapEngineLegacyId = "seedance-2-5" | "kling-4";
79
+ type CastSwapEngineLegacyId = "motion-pro" | "motion-lite" | "seedance-2-5" | "kling-4";
78
80
  /**
79
- * Where a Nodaro Motion Lite run cuts the clip to whole seconds (Lite renders
81
+ * Where a Nodaro Motion Pulse run cuts the clip to whole seconds (Pulse renders
80
82
  * whole seconds; asked for more than the clip, it would stretch the motion):
81
83
  * - `"cut-end"` (the default): drop the fraction of a second at its end;
82
84
  * - `"cut-start"`: drop it at its start.
@@ -228,29 +230,29 @@ interface CastSwapParams {
228
230
  /** Where the preview starts, in seconds. Default 0. */
229
231
  previewStart?: number;
230
232
  /**
231
- * The engine (see {@link CastSwapEngine}). Default `"motion-pro"`. The job
233
+ * The engine (see {@link CastSwapEngine}). Default `"motion-prism"`. The job
232
234
  * records it in `input_data.engine`, and a completed job's output in its
233
235
  * `engine`. The ids an older client sent ({@link CastSwapEngineLegacyId})
234
236
  * are still accepted.
235
237
  */
236
238
  engine?: CastSwapEngine | CastSwapEngineLegacyId;
237
239
  /**
238
- * Nodaro Motion Lite only (Pro ignores it): which end of the clip is cut to
240
+ * Nodaro Motion Pulse only (Prism ignores it): which end of the clip is cut to
239
241
  * whole seconds (see {@link CastSwapMotionLength}). Default `"cut-end"`.
240
242
  */
241
243
  motionLength?: CastSwapMotionLength;
242
244
  /** @deprecated use {@link motionLength} (still accepted). */
243
245
  klingLength?: CastSwapKlingLength;
244
246
  /**
245
- * The output resolution. Nodaro Motion Pro: `"480p"` (default), `"720p"` or
246
- * `"1080p"`. Nodaro Motion Lite: `"720p"` (default) or `"1080p"`; `"480p"`
247
+ * The output resolution. Nodaro Motion Prism: `"480p"` (default), `"720p"` or
248
+ * `"1080p"`. Nodaro Motion Pulse: `"720p"` (default) or `"1080p"`; `"480p"`
247
249
  * answers 400.
248
250
  */
249
251
  resolution?: "480p" | "720p" | "1080p";
250
252
  /**
251
- * Render as a draft (Nodaro Motion Pro only). Defaults to `true` at 480p and
253
+ * Render as a draft (Nodaro Motion Prism only). Defaults to `true` at 480p and
252
254
  * `false` above it; `true` with `"720p"` or `"1080p"` answers 400 (draft is
253
- * 480p only). Nodaro Motion Lite has no draft: `true` answers 400
255
+ * 480p only). Nodaro Motion Pulse has no draft: `true` answers 400
254
256
  * `draft_unsupported`.
255
257
  */
256
258
  draft?: boolean;
@@ -281,7 +283,8 @@ interface CastSwapParams {
281
283
  interface CastSwapEstimate {
282
284
  /**
283
285
  * The engine the run would use, by its public id (absent from an older
284
- * server = `"motion-pro"`).
286
+ * server = `"motion-prism"`). An id an older server answers is read as the
287
+ * public id it names.
285
288
  */
286
289
  engine?: CastSwapEngine;
287
290
  /**
@@ -291,7 +294,7 @@ interface CastSwapEstimate {
291
294
  totalCredits: number;
292
295
  /**
293
296
  * The charge the run is expected to come to. Never above `totalCredits`
294
- * (on Nodaro Motion Lite it equals it: Lite renders exactly the length
297
+ * (on Nodaro Motion Pulse it equals it: Pulse renders exactly the length
295
298
  * asked for, so the hold is what it settles at). Absent from an older
296
299
  * server: read `totalCredits` then.
297
300
  */
@@ -302,9 +305,9 @@ interface CastSwapEstimate {
302
305
  * names it `castSwap` instead: read `base`, else `castSwap`;
303
306
  * - `references`: preparing the reference pictures (0 when
304
307
  * `prepareReferences` is off or there is nothing to prepare);
305
- * - `motion`: what the video holds (on Nodaro Motion Lite, what it costs);
308
+ * - `motion`: what the video holds (on Nodaro Motion Pulse, what it costs);
306
309
  * - `motionExpected`: what the video is expected to be charged, never above
307
- * `motion` (Nodaro Motion Pro);
310
+ * `motion` (Nodaro Motion Prism);
308
311
  * - `privacy`: preparing the clip, when the engine's setting does. In both
309
312
  * totals when it always runs; outside both when it is the retry
310
313
  * (`privacyCredits`).
@@ -332,9 +335,9 @@ interface CastSwapEstimate {
332
335
  /** @deprecated read {@link privacyCredits} (an older server answered this name). */
333
336
  maskingCredits?: number;
334
337
  /**
335
- * `true` when the video is made at Auto length (every Nodaro Motion Pro
338
+ * `true` when the video is made at Auto length (every Nodaro Motion Prism
336
339
  * run): the final charge is expected to come out lower than `totalCredits`,
337
- * at about `expectedCredits`. `false` on Nodaro Motion Lite.
340
+ * at about `expectedCredits`. `false` on Nodaro Motion Pulse.
338
341
  */
339
342
  settlesLower: boolean;
340
343
  }
@@ -352,15 +355,15 @@ interface CastSwapRunOptions {
352
355
  }
353
356
  /**
354
357
  * What a Full Quality version would be: `"same-take"` re-renders a Nodaro
355
- * Motion Pro draft's own take at 1080p; `"new-take"` makes a new Nodaro Motion Lite take at
358
+ * Motion Prism draft's own take at 1080p; `"new-take"` makes a new Nodaro Motion Pulse take at
356
359
  * 1080p from a 720p run's inputs (it will not match the 720p run frame for
357
360
  * frame). The 720p run or draft stays either way.
358
361
  */
359
362
  type CastSwapFullQualityKind = "same-take" | "new-take";
360
363
  /**
361
364
  * What a Full Quality version of a run would cost
362
- * (`POST /v1/cast-swap/:jobId/full-quality/estimate`): a Nodaro Motion Pro
363
- * draft, or a completed Nodaro Motion Lite run at 720p.
365
+ * (`POST /v1/cast-swap/:jobId/full-quality/estimate`): a Nodaro Motion Prism
366
+ * draft, or a completed Nodaro Motion Pulse run at 720p.
364
367
  */
365
368
  interface CastSwapFullQualityEstimate {
366
369
  /**
@@ -405,8 +408,8 @@ interface CastSwapFullQualityResult {
405
408
  * - `not_found` (404): not your job, or not a Nodaro Motion run; also a
406
409
  * `sessionId` you may not use;
407
410
  * - `not_completed` (409): the run has not finished;
408
- * - `not_a_draft` (409): the run is neither a Nodaro Motion Pro draft nor a
409
- * Nodaro Motion Lite run at 720p (a Lite run at 1080p is already Full Quality);
411
+ * - `not_a_draft` (409): the run is neither a Nodaro Motion Prism draft nor a
412
+ * Nodaro Motion Pulse run at 720p (a Pulse run at 1080p is already Full Quality);
410
413
  * - `draft_expired` (410): more than 7 days after the draft completed, or
411
414
  * the draft can no longer be finished at Full Quality;
412
415
  * - `full_quality_pending` (409, `details.retryable: true`): not final — an
@@ -445,7 +448,7 @@ declare class CastSwapResource {
445
448
  /**
446
449
  * Quote finishing a run at Full Quality (`POST
447
450
  * /v1/cast-swap/:jobId/full-quality/estimate`); spends nothing. `jobId` is a
448
- * finished Nodaro Motion Pro DRAFT run, or a finished Nodaro Motion Lite
451
+ * finished Nodaro Motion Prism DRAFT run, or a finished Nodaro Motion Pulse
449
452
  * run at 720p (a Nodaro Motion or trend run); the quote's `kind` says whether it is the same take
450
453
  * re-rendered or a new take. The quote
451
454
  * does not look for a Full Quality already running: when one is,
@@ -456,7 +459,7 @@ declare class CastSwapResource {
456
459
  /**
457
460
  * Finish a run at Full Quality (`POST /v1/cast-swap/:jobId/full-quality`):
458
461
  * at 1080p, with the clip's audio, as a new job linked to the run — a
459
- * Nodaro Motion Pro draft's own take re-rendered, or a new Nodaro Motion Lite take from a
462
+ * Nodaro Motion Prism draft's own take re-rendered, or a new Nodaro Motion Pulse take from a
460
463
  * 720p run's inputs (the quote's `kind`). SPENDS CREDITS: quote it first with
461
464
  * {@link fullQualityEstimate}. Answers 202 `{ jobId }`, or 200
462
465
  * `{ jobId, existing: true }` when this run's Full Quality is already
@@ -15,8 +15,8 @@ import '@nodaro/shared/organizations';
15
15
  * photos if it fails, and is turned off with `prepareReferences: false`.
16
16
  * Locations are not prepared.
17
17
  *
18
- * Engines: a run is made on Nodaro Motion Pro (`engine` left out, or
19
- * `"motion-pro"`) or Nodaro Motion Lite (`"motion-lite"`). Lite renders 720p
18
+ * Engines: a run is made on Nodaro Motion Prism (`engine` left out, or
19
+ * `"motion-prism"`) or Nodaro Motion Pulse (`"motion-pulse"`). Pulse renders 720p
20
20
  * (its default) or 1080p and has no draft; it makes a new take guided by the
21
21
  * clip and pictures, so its Full Quality is a new take at 1080p rather than
22
22
  * the same take re-rendered (`CastSwapFullQualityEstimate.kind`).
@@ -40,7 +40,7 @@ import '@nodaro/shared/organizations';
40
40
  * anything is charged: 400 `validation_error` (the body: no role with images,
41
41
  * no reference and no `prePrompt` or `postPrompt`, more roles of a kind
42
42
  * than allowed, more than 30 images in all, `draft: true` above 480p, a
43
- * `prePrompt` or `postPrompt` over 4,000 characters); on Nodaro Motion Lite,
43
+ * `prePrompt` or `postPrompt` over 4,000 characters); on Nodaro Motion Pulse,
44
44
  * `draft_unsupported` (`draft: true`), `resolution_unsupported` (480p),
45
45
  * `output_format_unsupported` (a MOV edit output) and `too_many_images` (more
46
46
  * than 10 images in the run, across every role and fixed reference);
@@ -51,32 +51,34 @@ import '@nodaro/shared/organizations';
51
51
  * `inPreview: false`, always refused even with a prompt, or with no role kept
52
52
  * in it that has images and no `prePrompt` or `postPrompt`), `prompt_too_long`
53
53
  * (the prompt would build too long: a `{role:N}` reads as the role's name when
54
- * it sends no images; Nodaro Motion Lite's cap is 8,000 characters); 401; 402 `insufficient_credits` (`run()` only); 404
54
+ * it sends no images; Nodaro Motion Pulse's cap is 8,000 characters); 401; 402 `insufficient_credits` (`run()` only); 404
55
55
  * (a `sessionId` you may not use, `run()` only); 422 `job_blocked` (`run()`
56
56
  * only); 503 `host_too_old` (both); 503 `estimate_unavailable` (`estimate()`
57
57
  * only).
58
58
  */
59
59
  /**
60
60
  * The engine a Nodaro Motion run is made on, by its public id. Left out =
61
- * `"motion-pro"`.
61
+ * `"motion-prism"`.
62
62
  *
63
- * - `"motion-pro"` (Nodaro Motion Pro): 480p (the default, a draft unless
63
+ * - `"motion-prism"` (Nodaro Motion Prism): 480p (the default, a draft unless
64
64
  * `draft: false`), 720p or 1080p; Full Quality re-renders a draft's own take
65
65
  * at 1080p.
66
- * - `"motion-lite"` (Nodaro Motion Lite): 720p (the default) or 1080p, never a
66
+ * - `"motion-pulse"` (Nodaro Motion Pulse): 720p (the default) or 1080p, never a
67
67
  * draft (`draft: true` answers 400 `draft_unsupported`); Full Quality makes a
68
68
  * new take at 1080p from a completed 720p run's inputs. A preview is still
69
69
  * 4 s from `previewStart`.
70
70
  */
71
- type CastSwapEngine = "motion-pro" | "motion-lite";
71
+ type CastSwapEngine = "motion-prism" | "motion-pulse";
72
72
  /**
73
- * The engine ids an older client sent (`"seedance-2-5"` = `"motion-pro"`,
74
- * `"kling-4"` = `"motion-lite"`). Still accepted in a request; never returned.
73
+ * The engine ids an older client sent: the earlier public ids (`"motion-pro"`
74
+ * = `"motion-prism"`, `"motion-lite"` = `"motion-pulse"`) and the internal
75
+ * ones (`"seedance-2-5"`, `"kling-4"`). Still accepted in a request; never
76
+ * returned.
75
77
  * @deprecated use {@link CastSwapEngine}.
76
78
  */
77
- type CastSwapEngineLegacyId = "seedance-2-5" | "kling-4";
79
+ type CastSwapEngineLegacyId = "motion-pro" | "motion-lite" | "seedance-2-5" | "kling-4";
78
80
  /**
79
- * Where a Nodaro Motion Lite run cuts the clip to whole seconds (Lite renders
81
+ * Where a Nodaro Motion Pulse run cuts the clip to whole seconds (Pulse renders
80
82
  * whole seconds; asked for more than the clip, it would stretch the motion):
81
83
  * - `"cut-end"` (the default): drop the fraction of a second at its end;
82
84
  * - `"cut-start"`: drop it at its start.
@@ -228,29 +230,29 @@ interface CastSwapParams {
228
230
  /** Where the preview starts, in seconds. Default 0. */
229
231
  previewStart?: number;
230
232
  /**
231
- * The engine (see {@link CastSwapEngine}). Default `"motion-pro"`. The job
233
+ * The engine (see {@link CastSwapEngine}). Default `"motion-prism"`. The job
232
234
  * records it in `input_data.engine`, and a completed job's output in its
233
235
  * `engine`. The ids an older client sent ({@link CastSwapEngineLegacyId})
234
236
  * are still accepted.
235
237
  */
236
238
  engine?: CastSwapEngine | CastSwapEngineLegacyId;
237
239
  /**
238
- * Nodaro Motion Lite only (Pro ignores it): which end of the clip is cut to
240
+ * Nodaro Motion Pulse only (Prism ignores it): which end of the clip is cut to
239
241
  * whole seconds (see {@link CastSwapMotionLength}). Default `"cut-end"`.
240
242
  */
241
243
  motionLength?: CastSwapMotionLength;
242
244
  /** @deprecated use {@link motionLength} (still accepted). */
243
245
  klingLength?: CastSwapKlingLength;
244
246
  /**
245
- * The output resolution. Nodaro Motion Pro: `"480p"` (default), `"720p"` or
246
- * `"1080p"`. Nodaro Motion Lite: `"720p"` (default) or `"1080p"`; `"480p"`
247
+ * The output resolution. Nodaro Motion Prism: `"480p"` (default), `"720p"` or
248
+ * `"1080p"`. Nodaro Motion Pulse: `"720p"` (default) or `"1080p"`; `"480p"`
247
249
  * answers 400.
248
250
  */
249
251
  resolution?: "480p" | "720p" | "1080p";
250
252
  /**
251
- * Render as a draft (Nodaro Motion Pro only). Defaults to `true` at 480p and
253
+ * Render as a draft (Nodaro Motion Prism only). Defaults to `true` at 480p and
252
254
  * `false` above it; `true` with `"720p"` or `"1080p"` answers 400 (draft is
253
- * 480p only). Nodaro Motion Lite has no draft: `true` answers 400
255
+ * 480p only). Nodaro Motion Pulse has no draft: `true` answers 400
254
256
  * `draft_unsupported`.
255
257
  */
256
258
  draft?: boolean;
@@ -281,7 +283,8 @@ interface CastSwapParams {
281
283
  interface CastSwapEstimate {
282
284
  /**
283
285
  * The engine the run would use, by its public id (absent from an older
284
- * server = `"motion-pro"`).
286
+ * server = `"motion-prism"`). An id an older server answers is read as the
287
+ * public id it names.
285
288
  */
286
289
  engine?: CastSwapEngine;
287
290
  /**
@@ -291,7 +294,7 @@ interface CastSwapEstimate {
291
294
  totalCredits: number;
292
295
  /**
293
296
  * The charge the run is expected to come to. Never above `totalCredits`
294
- * (on Nodaro Motion Lite it equals it: Lite renders exactly the length
297
+ * (on Nodaro Motion Pulse it equals it: Pulse renders exactly the length
295
298
  * asked for, so the hold is what it settles at). Absent from an older
296
299
  * server: read `totalCredits` then.
297
300
  */
@@ -302,9 +305,9 @@ interface CastSwapEstimate {
302
305
  * names it `castSwap` instead: read `base`, else `castSwap`;
303
306
  * - `references`: preparing the reference pictures (0 when
304
307
  * `prepareReferences` is off or there is nothing to prepare);
305
- * - `motion`: what the video holds (on Nodaro Motion Lite, what it costs);
308
+ * - `motion`: what the video holds (on Nodaro Motion Pulse, what it costs);
306
309
  * - `motionExpected`: what the video is expected to be charged, never above
307
- * `motion` (Nodaro Motion Pro);
310
+ * `motion` (Nodaro Motion Prism);
308
311
  * - `privacy`: preparing the clip, when the engine's setting does. In both
309
312
  * totals when it always runs; outside both when it is the retry
310
313
  * (`privacyCredits`).
@@ -332,9 +335,9 @@ interface CastSwapEstimate {
332
335
  /** @deprecated read {@link privacyCredits} (an older server answered this name). */
333
336
  maskingCredits?: number;
334
337
  /**
335
- * `true` when the video is made at Auto length (every Nodaro Motion Pro
338
+ * `true` when the video is made at Auto length (every Nodaro Motion Prism
336
339
  * run): the final charge is expected to come out lower than `totalCredits`,
337
- * at about `expectedCredits`. `false` on Nodaro Motion Lite.
340
+ * at about `expectedCredits`. `false` on Nodaro Motion Pulse.
338
341
  */
339
342
  settlesLower: boolean;
340
343
  }
@@ -352,15 +355,15 @@ interface CastSwapRunOptions {
352
355
  }
353
356
  /**
354
357
  * What a Full Quality version would be: `"same-take"` re-renders a Nodaro
355
- * Motion Pro draft's own take at 1080p; `"new-take"` makes a new Nodaro Motion Lite take at
358
+ * Motion Prism draft's own take at 1080p; `"new-take"` makes a new Nodaro Motion Pulse take at
356
359
  * 1080p from a 720p run's inputs (it will not match the 720p run frame for
357
360
  * frame). The 720p run or draft stays either way.
358
361
  */
359
362
  type CastSwapFullQualityKind = "same-take" | "new-take";
360
363
  /**
361
364
  * What a Full Quality version of a run would cost
362
- * (`POST /v1/cast-swap/:jobId/full-quality/estimate`): a Nodaro Motion Pro
363
- * draft, or a completed Nodaro Motion Lite run at 720p.
365
+ * (`POST /v1/cast-swap/:jobId/full-quality/estimate`): a Nodaro Motion Prism
366
+ * draft, or a completed Nodaro Motion Pulse run at 720p.
364
367
  */
365
368
  interface CastSwapFullQualityEstimate {
366
369
  /**
@@ -405,8 +408,8 @@ interface CastSwapFullQualityResult {
405
408
  * - `not_found` (404): not your job, or not a Nodaro Motion run; also a
406
409
  * `sessionId` you may not use;
407
410
  * - `not_completed` (409): the run has not finished;
408
- * - `not_a_draft` (409): the run is neither a Nodaro Motion Pro draft nor a
409
- * Nodaro Motion Lite run at 720p (a Lite run at 1080p is already Full Quality);
411
+ * - `not_a_draft` (409): the run is neither a Nodaro Motion Prism draft nor a
412
+ * Nodaro Motion Pulse run at 720p (a Pulse run at 1080p is already Full Quality);
410
413
  * - `draft_expired` (410): more than 7 days after the draft completed, or
411
414
  * the draft can no longer be finished at Full Quality;
412
415
  * - `full_quality_pending` (409, `details.retryable: true`): not final — an
@@ -445,7 +448,7 @@ declare class CastSwapResource {
445
448
  /**
446
449
  * Quote finishing a run at Full Quality (`POST
447
450
  * /v1/cast-swap/:jobId/full-quality/estimate`); spends nothing. `jobId` is a
448
- * finished Nodaro Motion Pro DRAFT run, or a finished Nodaro Motion Lite
451
+ * finished Nodaro Motion Prism DRAFT run, or a finished Nodaro Motion Pulse
449
452
  * run at 720p (a Nodaro Motion or trend run); the quote's `kind` says whether it is the same take
450
453
  * re-rendered or a new take. The quote
451
454
  * does not look for a Full Quality already running: when one is,
@@ -456,7 +459,7 @@ declare class CastSwapResource {
456
459
  /**
457
460
  * Finish a run at Full Quality (`POST /v1/cast-swap/:jobId/full-quality`):
458
461
  * at 1080p, with the clip's audio, as a new job linked to the run — a
459
- * Nodaro Motion Pro draft's own take re-rendered, or a new Nodaro Motion Lite take from a
462
+ * Nodaro Motion Prism draft's own take re-rendered, or a new Nodaro Motion Pulse take from a
460
463
  * 720p run's inputs (the quote's `kind`). SPENDS CREDITS: quote it first with
461
464
  * {@link fullQualityEstimate}. Answers 202 `{ jobId }`, or 200
462
465
  * `{ jobId, existing: true }` when this run's Full Quality is already
@@ -1,4 +1,4 @@
1
1
  import '../chunk-KARJ7P7Y.js';
2
- export { CastSwapResource } from '../chunk-OWG3XAHQ.js';
2
+ export { CastSwapResource } from '../chunk-OCRUDBPG.js';
3
3
  //# sourceMappingURL=cast-swap.js.map
4
4
  //# sourceMappingURL=cast-swap.js.map