@nodaro/sdk 2.45.1 → 2.47.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 (95) hide show
  1. package/dist/chunk-6NTKEXT5.js +3 -0
  2. package/dist/chunk-6NTKEXT5.js.map +1 -0
  3. package/dist/{chunk-34JMD6ZO.cjs → chunk-7LTVS75S.cjs} +36 -12
  4. package/dist/chunk-7LTVS75S.cjs.map +1 -0
  5. package/dist/{chunk-J6FHBQ4Z.cjs → chunk-DIF7A5OH.cjs} +2 -2
  6. package/dist/chunk-DIF7A5OH.cjs.map +1 -0
  7. package/dist/{chunk-3Y5TV37H.js → chunk-FCYN4N3M.js} +3 -3
  8. package/dist/{chunk-3Y5TV37H.js.map → chunk-FCYN4N3M.js.map} +1 -1
  9. package/dist/{chunk-55ZX6TE3.cjs → chunk-GDDV5U32.cjs} +6 -6
  10. package/dist/chunk-GDDV5U32.cjs.map +1 -0
  11. package/dist/{chunk-JB4GVP4Q.js → chunk-GW76IRQD.js} +2 -2
  12. package/dist/{chunk-JB4GVP4Q.js.map → chunk-GW76IRQD.js.map} +1 -1
  13. package/dist/{chunk-RQY2WJD3.js → chunk-I7AHLDXV.js} +13 -9
  14. package/dist/chunk-I7AHLDXV.js.map +1 -0
  15. package/dist/chunk-KBHDUHKM.js +21 -0
  16. package/dist/chunk-KBHDUHKM.js.map +1 -0
  17. package/dist/{chunk-WFWZBYBS.cjs → chunk-MYTMNPCP.cjs} +3 -3
  18. package/dist/{chunk-WFWZBYBS.cjs.map → chunk-MYTMNPCP.cjs.map} +1 -1
  19. package/dist/{chunk-A7HOOWKS.cjs → chunk-NP6KDFIJ.cjs} +19 -15
  20. package/dist/chunk-NP6KDFIJ.cjs.map +1 -0
  21. package/dist/{chunk-HKDIIFG2.js → chunk-OWG3XAHQ.js} +6 -6
  22. package/dist/chunk-OWG3XAHQ.js.map +1 -0
  23. package/dist/{chunk-6MQ2LTJZ.js → chunk-PQHZUWSL.js} +36 -12
  24. package/dist/chunk-PQHZUWSL.js.map +1 -0
  25. package/dist/{chunk-5IXZLQNT.cjs → chunk-TK2CEVSK.cjs} +2 -2
  26. package/dist/{chunk-5IXZLQNT.cjs.map → chunk-TK2CEVSK.cjs.map} +1 -1
  27. package/dist/chunk-UANHMQ3A.cjs +4 -0
  28. package/dist/chunk-UANHMQ3A.cjs.map +1 -0
  29. package/dist/{chunk-PEMLIAPZ.cjs → chunk-WMT7HEBZ.cjs} +40 -7
  30. package/dist/chunk-WMT7HEBZ.cjs.map +1 -0
  31. package/dist/{chunk-Y6VDCZPB.js → chunk-WS4ZQ4AA.js} +40 -7
  32. package/dist/chunk-WS4ZQ4AA.js.map +1 -0
  33. package/dist/{chunk-CKHCSZCV.js → chunk-XILR6TFO.js} +2 -2
  34. package/dist/chunk-XILR6TFO.js.map +1 -0
  35. package/dist/chunk-XKDVEQVD.cjs +23 -0
  36. package/dist/chunk-XKDVEQVD.cjs.map +1 -0
  37. package/dist/entries/cast-swap.cjs +2 -2
  38. package/dist/entries/cast-swap.d.cts +126 -146
  39. package/dist/entries/cast-swap.d.ts +126 -146
  40. package/dist/entries/cast-swap.js +1 -1
  41. package/dist/entries/characters.d.cts +1 -1
  42. package/dist/entries/characters.d.ts +1 -1
  43. package/dist/entries/client.cjs +14 -13
  44. package/dist/entries/client.d.cts +4 -1
  45. package/dist/entries/client.d.ts +4 -1
  46. package/dist/entries/client.js +9 -8
  47. package/dist/entries/core.cjs +5 -5
  48. package/dist/entries/core.js +1 -1
  49. package/dist/entries/creatures.d.cts +1 -1
  50. package/dist/entries/creatures.d.ts +1 -1
  51. package/dist/entries/jobs.cjs +2 -2
  52. package/dist/entries/jobs.d.cts +57 -8
  53. package/dist/entries/jobs.d.ts +57 -8
  54. package/dist/entries/jobs.js +1 -1
  55. package/dist/entries/locations.d.cts +1 -1
  56. package/dist/entries/locations.d.ts +1 -1
  57. package/dist/entries/nodes.cjs +2 -2
  58. package/dist/entries/nodes.d.cts +1 -1
  59. package/dist/entries/nodes.d.ts +1 -1
  60. package/dist/entries/nodes.js +1 -1
  61. package/dist/entries/objects.d.cts +1 -1
  62. package/dist/entries/objects.d.ts +1 -1
  63. package/dist/entries/scene3d.d.cts +2 -2
  64. package/dist/entries/scene3d.d.ts +2 -2
  65. package/dist/entries/sessions.cjs +2 -2
  66. package/dist/entries/sessions.d.cts +58 -8
  67. package/dist/entries/sessions.d.ts +58 -8
  68. package/dist/entries/sessions.js +1 -1
  69. package/dist/entries/trash.cjs +13 -0
  70. package/dist/entries/trash.cjs.map +1 -0
  71. package/dist/entries/trash.d.cts +71 -0
  72. package/dist/entries/trash.d.ts +71 -0
  73. package/dist/entries/trash.js +4 -0
  74. package/dist/entries/trash.js.map +1 -0
  75. package/dist/entries/trends.cjs +2 -2
  76. package/dist/entries/trends.d.cts +30 -21
  77. package/dist/entries/trends.d.ts +30 -21
  78. package/dist/entries/trends.js +1 -1
  79. package/dist/index.cjs +30 -24
  80. package/dist/index.d.cts +5 -4
  81. package/dist/index.d.ts +5 -4
  82. package/dist/index.js +11 -9
  83. package/dist/{nodes-MThDit8l.d.ts → nodes-C9j0PFto.d.ts} +11 -1
  84. package/dist/{nodes-Szl6HrZ_.d.cts → nodes-DGIefTze.d.cts} +11 -1
  85. package/package.json +7 -2
  86. package/dist/chunk-34JMD6ZO.cjs.map +0 -1
  87. package/dist/chunk-55ZX6TE3.cjs.map +0 -1
  88. package/dist/chunk-6MQ2LTJZ.js.map +0 -1
  89. package/dist/chunk-A7HOOWKS.cjs.map +0 -1
  90. package/dist/chunk-CKHCSZCV.js.map +0 -1
  91. package/dist/chunk-HKDIIFG2.js.map +0 -1
  92. package/dist/chunk-J6FHBQ4Z.cjs.map +0 -1
  93. package/dist/chunk-PEMLIAPZ.cjs.map +0 -1
  94. package/dist/chunk-RQY2WJD3.js.map +0 -1
  95. package/dist/chunk-Y6VDCZPB.js.map +0 -1
package/dist/index.cjs CHANGED
@@ -1,5 +1,6 @@
1
1
  'use strict';
2
2
 
3
+ require('./chunk-ZE5RISBZ.cjs');
3
4
  require('./chunk-QRHJEITQ.cjs');
4
5
  require('./chunk-KTTL7BND.cjs');
5
6
  var chunkWSA4LMWR_cjs = require('./chunk-WSA4LMWR.cjs');
@@ -10,9 +11,9 @@ require('./chunk-VYK6MBL4.cjs');
10
11
  require('./chunk-OA6FWYZF.cjs');
11
12
  require('./chunk-ZJGFLJ2Z.cjs');
12
13
  require('./chunk-37YCKZX4.cjs');
14
+ require('./chunk-UANHMQ3A.cjs');
13
15
  require('./chunk-PG2GBS3K.cjs');
14
16
  require('./chunk-VLCNNA76.cjs');
15
- require('./chunk-ZE5RISBZ.cjs');
16
17
  require('./chunk-LLNNHLCE.cjs');
17
18
  require('./chunk-7MYKT2L4.cjs');
18
19
  require('./chunk-ZQPLRNKX.cjs');
@@ -51,20 +52,21 @@ require('./chunk-IS26FJO7.cjs');
51
52
  require('./chunk-RQSGS7ZK.cjs');
52
53
  require('./chunk-43NO4SGC.cjs');
53
54
  require('./chunk-JOX5BJ6K.cjs');
54
- var chunkA7HOOWKS_cjs = require('./chunk-A7HOOWKS.cjs');
55
+ var chunkNP6KDFIJ_cjs = require('./chunk-NP6KDFIJ.cjs');
56
+ var chunkJTOEHQQJ_cjs = require('./chunk-JTOEHQQJ.cjs');
55
57
  var chunkW5VHATSR_cjs = require('./chunk-W5VHATSR.cjs');
56
58
  var chunkR63TTR35_cjs = require('./chunk-R63TTR35.cjs');
57
59
  var chunk3B47IHB3_cjs = require('./chunk-3B47IHB3.cjs');
58
60
  var chunkWUM6CWTE_cjs = require('./chunk-WUM6CWTE.cjs');
59
61
  var chunkLKH5M44B_cjs = require('./chunk-LKH5M44B.cjs');
60
62
  var chunkYDRXBRW2_cjs = require('./chunk-YDRXBRW2.cjs');
61
- var chunkPEMLIAPZ_cjs = require('./chunk-PEMLIAPZ.cjs');
63
+ var chunkWMT7HEBZ_cjs = require('./chunk-WMT7HEBZ.cjs');
62
64
  var chunkMBFUMWI5_cjs = require('./chunk-MBFUMWI5.cjs');
63
65
  var chunkNKH2UFSD_cjs = require('./chunk-NKH2UFSD.cjs');
64
66
  var chunkUIBYZNDR_cjs = require('./chunk-UIBYZNDR.cjs');
65
- var chunkJ6FHBQ4Z_cjs = require('./chunk-J6FHBQ4Z.cjs');
67
+ var chunkXKDVEQVD_cjs = require('./chunk-XKDVEQVD.cjs');
68
+ var chunkDIF7A5OH_cjs = require('./chunk-DIF7A5OH.cjs');
66
69
  var chunkKMNSPC72_cjs = require('./chunk-KMNSPC72.cjs');
67
- var chunkJTOEHQQJ_cjs = require('./chunk-JTOEHQQJ.cjs');
68
70
  var chunkNBVARNVA_cjs = require('./chunk-NBVARNVA.cjs');
69
71
  var chunk7YHIFCJ4_cjs = require('./chunk-7YHIFCJ4.cjs');
70
72
  var chunkCOCKKMNP_cjs = require('./chunk-COCKKMNP.cjs');
@@ -77,14 +79,14 @@ var chunk22P4X3N5_cjs = require('./chunk-22P4X3N5.cjs');
77
79
  var chunk7QOCWJKD_cjs = require('./chunk-7QOCWJKD.cjs');
78
80
  var chunkZCWKX4V6_cjs = require('./chunk-ZCWKX4V6.cjs');
79
81
  var chunk34PU2DAT_cjs = require('./chunk-34PU2DAT.cjs');
80
- var chunk5IXZLQNT_cjs = require('./chunk-5IXZLQNT.cjs');
82
+ var chunkTK2CEVSK_cjs = require('./chunk-TK2CEVSK.cjs');
81
83
  var chunkGVIFLUYZ_cjs = require('./chunk-GVIFLUYZ.cjs');
82
84
  var chunkCR5E2SF3_cjs = require('./chunk-CR5E2SF3.cjs');
83
85
  var chunkJ5LGGCAS_cjs = require('./chunk-J5LGGCAS.cjs');
84
86
  var chunkSF2CMKWA_cjs = require('./chunk-SF2CMKWA.cjs');
85
87
  var chunkSBV5MWEL_cjs = require('./chunk-SBV5MWEL.cjs');
86
88
  var chunkWUKIJJG2_cjs = require('./chunk-WUKIJJG2.cjs');
87
- var chunk34JMD6ZO_cjs = require('./chunk-34JMD6ZO.cjs');
89
+ var chunk7LTVS75S_cjs = require('./chunk-7LTVS75S.cjs');
88
90
  var chunk2DZWWIJ4_cjs = require('./chunk-2DZWWIJ4.cjs');
89
91
  var chunkSS3B6PHT_cjs = require('./chunk-SS3B6PHT.cjs');
90
92
  var chunkMQ74AKA2_cjs = require('./chunk-MQ74AKA2.cjs');
@@ -93,7 +95,7 @@ var chunk43FVH6LJ_cjs = require('./chunk-43FVH6LJ.cjs');
93
95
  var chunkYFS2LMG4_cjs = require('./chunk-YFS2LMG4.cjs');
94
96
  var chunkOSMKIRKI_cjs = require('./chunk-OSMKIRKI.cjs');
95
97
  require('./chunk-FRQJNGJS.cjs');
96
- var chunkWFWZBYBS_cjs = require('./chunk-WFWZBYBS.cjs');
98
+ var chunkMYTMNPCP_cjs = require('./chunk-MYTMNPCP.cjs');
97
99
  var chunkFM2KM5TY_cjs = require('./chunk-FM2KM5TY.cjs');
98
100
  var chunkHGCVWOGK_cjs = require('./chunk-HGCVWOGK.cjs');
99
101
  var chunkFIMBPKIH_cjs = require('./chunk-FIMBPKIH.cjs');
@@ -101,7 +103,7 @@ var chunkA3S55XGF_cjs = require('./chunk-A3S55XGF.cjs');
101
103
  var chunkJOXZ4ZIF_cjs = require('./chunk-JOXZ4ZIF.cjs');
102
104
  var chunkGA4LZZKQ_cjs = require('./chunk-GA4LZZKQ.cjs');
103
105
  var chunkNGKODS3J_cjs = require('./chunk-NGKODS3J.cjs');
104
- var chunk55ZX6TE3_cjs = require('./chunk-55ZX6TE3.cjs');
106
+ var chunkGDDV5U32_cjs = require('./chunk-GDDV5U32.cjs');
105
107
  var chunkBPWUWUZ3_cjs = require('./chunk-BPWUWUZ3.cjs');
106
108
  var chunkHAKYPZLB_cjs = require('./chunk-HAKYPZLB.cjs');
107
109
 
@@ -141,11 +143,15 @@ Object.defineProperty(exports, "unwrapEditPlanOutput", {
141
143
  });
142
144
  Object.defineProperty(exports, "NodaroClient", {
143
145
  enumerable: true,
144
- get: function () { return chunkA7HOOWKS_cjs.NodaroClient; }
146
+ get: function () { return chunkNP6KDFIJ_cjs.NodaroClient; }
145
147
  });
146
148
  Object.defineProperty(exports, "createClient", {
147
149
  enumerable: true,
148
- get: function () { return chunkA7HOOWKS_cjs.createClient; }
150
+ get: function () { return chunkNP6KDFIJ_cjs.createClient; }
151
+ });
152
+ Object.defineProperty(exports, "UploadsResource", {
153
+ enumerable: true,
154
+ get: function () { return chunkJTOEHQQJ_cjs.UploadsResource; }
149
155
  });
150
156
  Object.defineProperty(exports, "VideoProResource", {
151
157
  enumerable: true,
@@ -177,7 +183,7 @@ Object.defineProperty(exports, "Scene3DResource", {
177
183
  });
178
184
  Object.defineProperty(exports, "SessionsResource", {
179
185
  enumerable: true,
180
- get: function () { return chunkPEMLIAPZ_cjs.SessionsResource; }
186
+ get: function () { return chunkWMT7HEBZ_cjs.SessionsResource; }
181
187
  });
182
188
  Object.defineProperty(exports, "ShotsResource", {
183
189
  enumerable: true,
@@ -199,18 +205,18 @@ Object.defineProperty(exports, "TemplatesResource", {
199
205
  enumerable: true,
200
206
  get: function () { return chunkUIBYZNDR_cjs.TemplatesResource; }
201
207
  });
208
+ Object.defineProperty(exports, "TrashResource", {
209
+ enumerable: true,
210
+ get: function () { return chunkXKDVEQVD_cjs.TrashResource; }
211
+ });
202
212
  Object.defineProperty(exports, "TrendsResource", {
203
213
  enumerable: true,
204
- get: function () { return chunkJ6FHBQ4Z_cjs.TrendsResource; }
214
+ get: function () { return chunkDIF7A5OH_cjs.TrendsResource; }
205
215
  });
206
216
  Object.defineProperty(exports, "TutorialsResource", {
207
217
  enumerable: true,
208
218
  get: function () { return chunkKMNSPC72_cjs.TutorialsResource; }
209
219
  });
210
- Object.defineProperty(exports, "UploadsResource", {
211
- enumerable: true,
212
- get: function () { return chunkJTOEHQQJ_cjs.UploadsResource; }
213
- });
214
220
  Object.defineProperty(exports, "PALETTE_DIRECTION_PREFIX", {
215
221
  enumerable: true,
216
222
  get: function () { return chunkNBVARNVA_cjs.PALETTE_DIRECTION_PREFIX; }
@@ -277,7 +283,7 @@ Object.defineProperty(exports, "PresetsResource", {
277
283
  });
278
284
  Object.defineProperty(exports, "NodesResource", {
279
285
  enumerable: true,
280
- get: function () { return chunk5IXZLQNT_cjs.NodesResource; }
286
+ get: function () { return chunkTK2CEVSK_cjs.NodesResource; }
281
287
  });
282
288
  Object.defineProperty(exports, "OAuthResource", {
283
289
  enumerable: true,
@@ -345,7 +351,7 @@ Object.defineProperty(exports, "GalleryResource", {
345
351
  });
346
352
  Object.defineProperty(exports, "JobsResource", {
347
353
  enumerable: true,
348
- get: function () { return chunk34JMD6ZO_cjs.JobsResource; }
354
+ get: function () { return chunk7LTVS75S_cjs.JobsResource; }
349
355
  });
350
356
  Object.defineProperty(exports, "LibraryResource", {
351
357
  enumerable: true,
@@ -389,19 +395,19 @@ Object.defineProperty(exports, "CopilotResource", {
389
395
  });
390
396
  Object.defineProperty(exports, "CallbackAuth", {
391
397
  enumerable: true,
392
- get: function () { return chunkWFWZBYBS_cjs.CallbackAuth; }
398
+ get: function () { return chunkMYTMNPCP_cjs.CallbackAuth; }
393
399
  });
394
400
  Object.defineProperty(exports, "NodaroClientCore", {
395
401
  enumerable: true,
396
- get: function () { return chunkWFWZBYBS_cjs.NodaroClientCore; }
402
+ get: function () { return chunkMYTMNPCP_cjs.NodaroClientCore; }
397
403
  });
398
404
  Object.defineProperty(exports, "StaticTokenAuth", {
399
405
  enumerable: true,
400
- get: function () { return chunkWFWZBYBS_cjs.StaticTokenAuth; }
406
+ get: function () { return chunkMYTMNPCP_cjs.StaticTokenAuth; }
401
407
  });
402
408
  Object.defineProperty(exports, "supabaseAuth", {
403
409
  enumerable: true,
404
- get: function () { return chunkWFWZBYBS_cjs.supabaseAuth; }
410
+ get: function () { return chunkMYTMNPCP_cjs.supabaseAuth; }
405
411
  });
406
412
  Object.defineProperty(exports, "AlreadyRunningError", {
407
413
  enumerable: true,
@@ -537,7 +543,7 @@ Object.defineProperty(exports, "BillingResource", {
537
543
  });
538
544
  Object.defineProperty(exports, "CastSwapResource", {
539
545
  enumerable: true,
540
- get: function () { return chunk55ZX6TE3_cjs.CastSwapResource; }
546
+ get: function () { return chunkGDDV5U32_cjs.CastSwapResource; }
541
547
  });
542
548
  Object.defineProperty(exports, "CatalogsResource", {
543
549
  enumerable: true,
package/dist/index.d.cts CHANGED
@@ -1,7 +1,7 @@
1
1
  export { AppRun, AppRunResult, AppRunResumePlan, AppRunResumeRefusalCode, AppRunResumeResult, AppRunResumeStep, AppsResource, DeleteAppRunResult, ListAppRunsParams, ListAppsParams, ListAppsResult, PublishedApp, PublishedAppDetail, ResumeAppRunOptions, RunAppOptions } from './entries/apps.cjs';
2
2
  export { AudioResource, TranscribeJobOutput, TranscribeWord } from './entries/audio.cjs';
3
3
  export { BillingAccountSummary, BillingMoney, BillingMonthlyPrice, BillingPlan, BillingPlanPrices, BillingPlansResult, BillingPriceCredits, BillingResource, BillingSubscription, BillingSubscriptionResult, BillingSurface, BillingTopUp, BillingUsageCategory, BillingYearlyPrice } from './entries/billing.cjs';
4
- export { CastSwapEngine, CastSwapEstimate, CastSwapFaceMasking, CastSwapFaceMaskingZone, CastSwapFullQualityEstimate, CastSwapFullQualityKind, CastSwapFullQualityParams, CastSwapFullQualityRefusalCode, CastSwapFullQualityResult, CastSwapKlingLength, CastSwapLocationRole, CastSwapParams, CastSwapPersonRole, CastSwapPetRole, CastSwapProductRole, CastSwapReference, CastSwapResource, CastSwapRole, CastSwapRolePreviewSettings, CastSwapRunOptions, CastSwapTraitSource } from './entries/cast-swap.cjs';
4
+ export { CastSwapEngine, CastSwapEngineLegacyId, CastSwapEstimate, CastSwapFaceMasking, CastSwapFaceMaskingZone, CastSwapFullQualityEstimate, CastSwapFullQualityKind, CastSwapFullQualityParams, CastSwapFullQualityRefusalCode, CastSwapFullQualityResult, CastSwapKlingLength, CastSwapLocationRole, CastSwapMotionLength, CastSwapParams, CastSwapPersonRole, CastSwapPetRole, CastSwapProductRole, CastSwapReference, CastSwapResource, CastSwapRole, CastSwapRolePreviewSettings, CastSwapRunOptions, CastSwapTraitSource } from './entries/cast-swap.cjs';
5
5
  export { CatalogsListResponse, CatalogsResource, ProjectedCatalog, ProjectedCatalogDimension, ProjectedCatalogOption, ProjectedCatalogSection } from './entries/catalogs.cjs';
6
6
  export { ApprovePortraitResult, Character, CharacterDetail, CharacterTrainingState, CharacterTrainingStatus, CharacterUsage, CharactersResource, DuplicateCharacterInput, GenerateAssetInput, GenerateCharacterInput, GenerateCharacterResult, GenerateMotionInput, GetCharacterOptions, ListCharactersParams, ListCharactersResult, RecaptionResult, ReferencePhoto, ReferencePhotoKind, TrainCharacterInput, TrainCharacterRefusalCode, TrainCharacterResult, UpsertCharacterInput, UpsertCharacterResult, buildPersonSeedPrompt } from './entries/characters.cjs';
7
7
  export { NodaroClient, createClient } from './entries/client.cjs';
@@ -19,7 +19,7 @@ export { ApplyEdlInput, AudioSyncInput, AudioSyncOffset, AudioSyncResult, AudioS
19
19
  export { AlreadyRunningError, AppRunVersionChangedError, CREDIT_CAP_CODES, ContinuationPreviewPendingError, ContinuationRefusedError, CreditCapCode, CreditCapExceededError, ForbiddenError, HeldFinalRun, InsufficientCreditsError, JobAbortedError, JobBlockedError, JobFailedError, JobHeldError, JobTimeoutError, NodaroError, NotFoundError, RateLimitedError, StorageExceededError, StudioOpError, StudioPreviewAppliedError, StudioPreviewUnavailable, UnauthorizedError, WorkflowConflictCode, WorkflowConflictError, throwFromResponse } from './entries/errors.cjs';
20
20
  export { CancelExecutionParams, ExecutionStatus, ExecutionTriggerType, ExecutionsResource, ListExecutionsForWorkflowParams, ListExecutionsPage, NodeExecutionState, WorkflowExecution, WorkflowExecutionSummary } from './entries/executions.cjs';
21
21
  export { BrowseGalleryParams, GalleryItem, GalleryMediaType, GalleryPage, GalleryResource, ToggleFavoriteResult } from './entries/gallery.cjs';
22
- export { CancelJobResult, CreditStatus, CreditsHint, DeleteJobResult, InputRefusedHint, Job, JobErrorHint, JobFromUploadParams, JobRating, JobRatingFilter, JobSource, JobStatus, JobStatusResult, JobsResource, ListJobsPage, ListJobsParams, PolicyBlockHint, RateJobResult, SafetyBlockHint } from './entries/jobs.cjs';
22
+ export { CancelJobResult, CreditStatus, CreditsHint, DeleteJobResult, InputRefusedHint, Job, JobErrorHint, JobFromUploadParams, JobRating, JobRatingFilter, JobSessionRef, JobSource, JobStatus, JobStatusResult, JobsResource, ListJobsPage, ListJobsParams, PolicyBlockHint, RateJobResult, SafetyBlockHint } from './entries/jobs.cjs';
23
23
  export { LibraryAsset, LibraryResource, ListLibraryParams, ListLibraryResult } from './entries/library.cjs';
24
24
  export { LlmResource, LlmStructuredInput, LlmStructuredJobInput, LlmStructuredJobOutput, LlmStructuredResult } from './entries/llm.cjs';
25
25
  export { ApproveMainImageResult, CreateLocationInput, GenerateLocationAssetInput, GenerateLocationInput, GenerateLocationMotionInput, GenerateLocationResult, GenerateSurroundContinuationInput, ListLocationsParams, Location, LocationDetail, LocationReferencePhoto, LocationReferencePhotoKind, LocationsResource, RecaptionLocationResult, UpdateLocationInput, UpdateLocationResult } from './entries/locations.cjs';
@@ -31,7 +31,7 @@ export { CreateNodePresetGroupInput, CreateNodePresetInput, FactoryPresetEntry,
31
31
  export { ConnectedReference, DescribedReference, GenericEdge, GenericNode } from '@nodaro/shared/types';
32
32
  export { VideoCharacterReference, VideoCharacterVoice } from '@nodaro/shared/video';
33
33
  export { AudioFxPreset, GenerateMaskOutput, GenerateMaskRequest, VideoDepthColormap, VideoDepthModelSize, VideoDepthProvider, VideoDepthResolution } from '@nodaro/shared/media';
34
- export { A as AssembleNarratedVideoParams, B as BatchJobOutcome, E as EditImageCommonParams, a as EditImageFromTaskParams, b as EditImageFromUrlParams, c as EditImageParams, d as EditScene3DParams, G as GenerateImageBatchGroup, e as GenerateImageBatchOutput, f as GenerateImageBatchResult, g as GenerateImageParams, h as GenerateMaskJobOutput, i as GenerateMaskParams, j as GenerateScene3DParams, k as GenerateVideoParams, l as GenerationSessionParams, I as ImageJobStarted, m as ImageToImageParams, J as JobOutputImage, N as NodeCategory, n as NodeCreditRate, o as NodeDescriptor, p as NodeInputField, q as NodeInputSchema, r as NodeJobOutput, s as NodeQuote, t as NodesResource, O as OutputType, P as Pro3DRenderJobOutput, u as Pro3DRenderParams, v as Pro3DRenderQuote, w as Pro3DRenderRunOptions, x as Pro3DRenderRunParams, Q as QuoteAdjustment, y as QuoteWarning, R as ReferenceCaptionParams, z as RenderScene3DParams, C as RetainedScene3DEditParams, D as RetainedScene3DEditResult, F as RunAndWaitOptions, H as RunManyResult, K as RunNodeAdjustment, L as RunNodeOptions, M as RunNodeResult, S as RunNodeWarning, T as SCENE3D_DELIVERY_ASSET_USAGE, U as Scene3DAuthoringEngine, V as Scene3DCapabilities, W as Scene3DDelivery, X as Scene3DDeliveryAsset, Y as Scene3DDeliveryAssetKind, Z as Scene3DJobOutput, _ as SocialSearchJobOutput, $ as SplitImageParams, a0 as SplitImageResult, a1 as SplitImageTile, a2 as StructuredReferenceParams, a3 as Subject, a4 as TextToSpeechParams, a5 as TextToVideoParams, a6 as VideoDepthParams, a7 as VideoToVideoParams, a8 as VideoUpscaleParams } from './nodes-Szl6HrZ_.cjs';
34
+ export { A as AssembleNarratedVideoParams, B as BatchJobOutcome, E as EditImageCommonParams, a as EditImageFromTaskParams, b as EditImageFromUrlParams, c as EditImageParams, d as EditScene3DParams, G as GenerateImageBatchGroup, e as GenerateImageBatchOutput, f as GenerateImageBatchResult, g as GenerateImageParams, h as GenerateMaskJobOutput, i as GenerateMaskParams, j as GenerateScene3DParams, k as GenerateVideoParams, l as GenerationSessionParams, I as ImageJobStarted, m as ImageToImageParams, J as JobOutputImage, N as NodeCategory, n as NodeCreditRate, o as NodeDescriptor, p as NodeInputField, q as NodeInputSchema, r as NodeJobOutput, s as NodeQuote, t as NodesResource, O as OutputType, P as Pro3DRenderJobOutput, u as Pro3DRenderParams, v as Pro3DRenderQuote, w as Pro3DRenderRunOptions, x as Pro3DRenderRunParams, Q as QuoteAdjustment, y as QuoteWarning, R as ReferenceCaptionParams, z as RenderScene3DParams, C as RetainedScene3DEditParams, D as RetainedScene3DEditResult, F as RunAndWaitOptions, H as RunManyResult, K as RunNodeAdjustment, L as RunNodeOptions, M as RunNodeResult, S as RunNodeWarning, T as SCENE3D_DELIVERY_ASSET_USAGE, U as Scene3DAuthoringEngine, V as Scene3DCapabilities, W as Scene3DDelivery, X as Scene3DDeliveryAsset, Y as Scene3DDeliveryAssetKind, Z as Scene3DJobOutput, _ as SocialSearchJobOutput, $ as SplitImageParams, a0 as SplitImageResult, a1 as SplitImageTile, a2 as StructuredReferenceParams, a3 as Subject, a4 as TextToSpeechParams, a5 as TextToVideoParams, a6 as VideoDepthParams, a7 as VideoToVideoParams, a8 as VideoUpscaleParams } from './nodes-DGIefTze.cjs';
35
35
  export { TopazUpscaleFactor } from '@nodaro/shared/credits';
36
36
  export { CHARACTER_ASPECT_DEFAULTS, CHARACTER_ASPECT_OPTIONS, CHARACTER_STYLES, OBJECT_ASPECT_DEFAULTS as CREATURE_ASPECT_DEFAULTS, OBJECT_ASPECT_OPTIONS as CREATURE_ASPECT_OPTIONS, CREATURE_ATTACH_COLUMNS, CharacterAspectRatio, ObjectAspectRatio as CreatureAspectRatio, CreatureAttachColumn, EntityStyle, ImageToImageAttachColumn, LOCATION_ASSET_TYPES, LOCATION_ATTACH_COLUMNS, LocationAssetType, LocationAttachColumn, OBJECT_ASPECT_DEFAULTS, OBJECT_ASPECT_OPTIONS, OBJECT_ASSET_TYPES, OBJECT_ATTACH_COLUMNS, ObjectAspectRatio, ObjectAssetType, ObjectAttachColumn, SURROUND_DIRECTIONS, SurroundDirection } from '@nodaro/shared/entities';
37
37
  export { AccessTokenResponse, ExchangeCodeInput, OAuthAppInfo, OAuthResource } from './entries/oauth.cjs';
@@ -49,10 +49,11 @@ export { BrowseCommunityParams, BrowseCommunityResult, CloneListingResult, Commu
49
49
  export { ReduceInput, ReduceResource, ReduceResult } from './entries/reduce.cjs';
50
50
  export { SavedPostsResource } from './entries/saved-posts.cjs';
51
51
  export { Scene3DResource } from './entries/scene3d.cjs';
52
- export { CreateSessionInput, GenerationSession, ListSessionItemsParams, ListSessionsParams, SessionItem, SessionPage, SessionsResource, UpdateSessionInput } from './entries/sessions.cjs';
52
+ export { CreateSessionInput, GenerationSession, ListSessionItemsParams, ListSessionsParams, MoveSessionItemsInput, SessionItem, SessionPage, SessionsResource, UpdateSessionInput } from './entries/sessions.cjs';
53
53
  export { CreateShotInput, Shot, ShotEntityRef, ShotMode, ShotsResource, UpdateShotInput } from './entries/shots.cjs';
54
54
  export { StudioDocumentJson, StudioEditInput, StudioGenerationReply, StudioKeyframeAcceptanceInput, StudioKeyframeGenerationInput, StudioKeyframeRecord, StudioProductionCapabilities, StudioProductionRecord, StudioProductionReply, StudioResource, StudioShotGenerationInput } from './entries/studio.cjs';
55
55
  export { BrowseTemplatesParams, BrowseTemplatesResult, CloneTemplateParams, CloneTemplateResult, Template, TemplateBrowseCard, TemplateSort, TemplatesResource } from './entries/templates.cjs';
56
+ export { ListTrashParams, TrashEntry, TrashPage, TrashResource, TrashSession } from './entries/trash.cjs';
56
57
  export { ListTrendRunsParams, ListTrendsParams, TrendCard, TrendChipKey, TrendChips, TrendChoice, TrendDetail, TrendDetailSlot, TrendEngine, TrendEstimate, TrendExample, TrendOriginal, TrendPage, TrendResolution, TrendRun, TrendRunDisplaySlot, TrendRunOptions, TrendRunRequest, TrendRunSlot, TrendSlotKind, TrendTag, TrendsResource } from './entries/trends.cjs';
57
58
  export { TutorialCategory, TutorialFlowItem, TutorialVideoItem, TutorialsResource } from './entries/tutorials.cjs';
58
59
  export { UploadJsonResult, UploadResult, UploadsResource } from './entries/uploads.cjs';
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  export { AppRun, AppRunResult, AppRunResumePlan, AppRunResumeRefusalCode, AppRunResumeResult, AppRunResumeStep, AppsResource, DeleteAppRunResult, ListAppRunsParams, ListAppsParams, ListAppsResult, PublishedApp, PublishedAppDetail, ResumeAppRunOptions, RunAppOptions } from './entries/apps.js';
2
2
  export { AudioResource, TranscribeJobOutput, TranscribeWord } from './entries/audio.js';
3
3
  export { BillingAccountSummary, BillingMoney, BillingMonthlyPrice, BillingPlan, BillingPlanPrices, BillingPlansResult, BillingPriceCredits, BillingResource, BillingSubscription, BillingSubscriptionResult, BillingSurface, BillingTopUp, BillingUsageCategory, BillingYearlyPrice } from './entries/billing.js';
4
- export { CastSwapEngine, CastSwapEstimate, CastSwapFaceMasking, CastSwapFaceMaskingZone, CastSwapFullQualityEstimate, CastSwapFullQualityKind, CastSwapFullQualityParams, CastSwapFullQualityRefusalCode, CastSwapFullQualityResult, CastSwapKlingLength, CastSwapLocationRole, CastSwapParams, CastSwapPersonRole, CastSwapPetRole, CastSwapProductRole, CastSwapReference, CastSwapResource, CastSwapRole, CastSwapRolePreviewSettings, CastSwapRunOptions, CastSwapTraitSource } from './entries/cast-swap.js';
4
+ export { CastSwapEngine, CastSwapEngineLegacyId, CastSwapEstimate, CastSwapFaceMasking, CastSwapFaceMaskingZone, CastSwapFullQualityEstimate, CastSwapFullQualityKind, CastSwapFullQualityParams, CastSwapFullQualityRefusalCode, CastSwapFullQualityResult, CastSwapKlingLength, CastSwapLocationRole, CastSwapMotionLength, CastSwapParams, CastSwapPersonRole, CastSwapPetRole, CastSwapProductRole, CastSwapReference, CastSwapResource, CastSwapRole, CastSwapRolePreviewSettings, CastSwapRunOptions, CastSwapTraitSource } from './entries/cast-swap.js';
5
5
  export { CatalogsListResponse, CatalogsResource, ProjectedCatalog, ProjectedCatalogDimension, ProjectedCatalogOption, ProjectedCatalogSection } from './entries/catalogs.js';
6
6
  export { ApprovePortraitResult, Character, CharacterDetail, CharacterTrainingState, CharacterTrainingStatus, CharacterUsage, CharactersResource, DuplicateCharacterInput, GenerateAssetInput, GenerateCharacterInput, GenerateCharacterResult, GenerateMotionInput, GetCharacterOptions, ListCharactersParams, ListCharactersResult, RecaptionResult, ReferencePhoto, ReferencePhotoKind, TrainCharacterInput, TrainCharacterRefusalCode, TrainCharacterResult, UpsertCharacterInput, UpsertCharacterResult, buildPersonSeedPrompt } from './entries/characters.js';
7
7
  export { NodaroClient, createClient } from './entries/client.js';
@@ -19,7 +19,7 @@ export { ApplyEdlInput, AudioSyncInput, AudioSyncOffset, AudioSyncResult, AudioS
19
19
  export { AlreadyRunningError, AppRunVersionChangedError, CREDIT_CAP_CODES, ContinuationPreviewPendingError, ContinuationRefusedError, CreditCapCode, CreditCapExceededError, ForbiddenError, HeldFinalRun, InsufficientCreditsError, JobAbortedError, JobBlockedError, JobFailedError, JobHeldError, JobTimeoutError, NodaroError, NotFoundError, RateLimitedError, StorageExceededError, StudioOpError, StudioPreviewAppliedError, StudioPreviewUnavailable, UnauthorizedError, WorkflowConflictCode, WorkflowConflictError, throwFromResponse } from './entries/errors.js';
20
20
  export { CancelExecutionParams, ExecutionStatus, ExecutionTriggerType, ExecutionsResource, ListExecutionsForWorkflowParams, ListExecutionsPage, NodeExecutionState, WorkflowExecution, WorkflowExecutionSummary } from './entries/executions.js';
21
21
  export { BrowseGalleryParams, GalleryItem, GalleryMediaType, GalleryPage, GalleryResource, ToggleFavoriteResult } from './entries/gallery.js';
22
- export { CancelJobResult, CreditStatus, CreditsHint, DeleteJobResult, InputRefusedHint, Job, JobErrorHint, JobFromUploadParams, JobRating, JobRatingFilter, JobSource, JobStatus, JobStatusResult, JobsResource, ListJobsPage, ListJobsParams, PolicyBlockHint, RateJobResult, SafetyBlockHint } from './entries/jobs.js';
22
+ export { CancelJobResult, CreditStatus, CreditsHint, DeleteJobResult, InputRefusedHint, Job, JobErrorHint, JobFromUploadParams, JobRating, JobRatingFilter, JobSessionRef, JobSource, JobStatus, JobStatusResult, JobsResource, ListJobsPage, ListJobsParams, PolicyBlockHint, RateJobResult, SafetyBlockHint } from './entries/jobs.js';
23
23
  export { LibraryAsset, LibraryResource, ListLibraryParams, ListLibraryResult } from './entries/library.js';
24
24
  export { LlmResource, LlmStructuredInput, LlmStructuredJobInput, LlmStructuredJobOutput, LlmStructuredResult } from './entries/llm.js';
25
25
  export { ApproveMainImageResult, CreateLocationInput, GenerateLocationAssetInput, GenerateLocationInput, GenerateLocationMotionInput, GenerateLocationResult, GenerateSurroundContinuationInput, ListLocationsParams, Location, LocationDetail, LocationReferencePhoto, LocationReferencePhotoKind, LocationsResource, RecaptionLocationResult, UpdateLocationInput, UpdateLocationResult } from './entries/locations.js';
@@ -31,7 +31,7 @@ export { CreateNodePresetGroupInput, CreateNodePresetInput, FactoryPresetEntry,
31
31
  export { ConnectedReference, DescribedReference, GenericEdge, GenericNode } from '@nodaro/shared/types';
32
32
  export { VideoCharacterReference, VideoCharacterVoice } from '@nodaro/shared/video';
33
33
  export { AudioFxPreset, GenerateMaskOutput, GenerateMaskRequest, VideoDepthColormap, VideoDepthModelSize, VideoDepthProvider, VideoDepthResolution } from '@nodaro/shared/media';
34
- export { A as AssembleNarratedVideoParams, B as BatchJobOutcome, E as EditImageCommonParams, a as EditImageFromTaskParams, b as EditImageFromUrlParams, c as EditImageParams, d as EditScene3DParams, G as GenerateImageBatchGroup, e as GenerateImageBatchOutput, f as GenerateImageBatchResult, g as GenerateImageParams, h as GenerateMaskJobOutput, i as GenerateMaskParams, j as GenerateScene3DParams, k as GenerateVideoParams, l as GenerationSessionParams, I as ImageJobStarted, m as ImageToImageParams, J as JobOutputImage, N as NodeCategory, n as NodeCreditRate, o as NodeDescriptor, p as NodeInputField, q as NodeInputSchema, r as NodeJobOutput, s as NodeQuote, t as NodesResource, O as OutputType, P as Pro3DRenderJobOutput, u as Pro3DRenderParams, v as Pro3DRenderQuote, w as Pro3DRenderRunOptions, x as Pro3DRenderRunParams, Q as QuoteAdjustment, y as QuoteWarning, R as ReferenceCaptionParams, z as RenderScene3DParams, C as RetainedScene3DEditParams, D as RetainedScene3DEditResult, F as RunAndWaitOptions, H as RunManyResult, K as RunNodeAdjustment, L as RunNodeOptions, M as RunNodeResult, S as RunNodeWarning, T as SCENE3D_DELIVERY_ASSET_USAGE, U as Scene3DAuthoringEngine, V as Scene3DCapabilities, W as Scene3DDelivery, X as Scene3DDeliveryAsset, Y as Scene3DDeliveryAssetKind, Z as Scene3DJobOutput, _ as SocialSearchJobOutput, $ as SplitImageParams, a0 as SplitImageResult, a1 as SplitImageTile, a2 as StructuredReferenceParams, a3 as Subject, a4 as TextToSpeechParams, a5 as TextToVideoParams, a6 as VideoDepthParams, a7 as VideoToVideoParams, a8 as VideoUpscaleParams } from './nodes-MThDit8l.js';
34
+ export { A as AssembleNarratedVideoParams, B as BatchJobOutcome, E as EditImageCommonParams, a as EditImageFromTaskParams, b as EditImageFromUrlParams, c as EditImageParams, d as EditScene3DParams, G as GenerateImageBatchGroup, e as GenerateImageBatchOutput, f as GenerateImageBatchResult, g as GenerateImageParams, h as GenerateMaskJobOutput, i as GenerateMaskParams, j as GenerateScene3DParams, k as GenerateVideoParams, l as GenerationSessionParams, I as ImageJobStarted, m as ImageToImageParams, J as JobOutputImage, N as NodeCategory, n as NodeCreditRate, o as NodeDescriptor, p as NodeInputField, q as NodeInputSchema, r as NodeJobOutput, s as NodeQuote, t as NodesResource, O as OutputType, P as Pro3DRenderJobOutput, u as Pro3DRenderParams, v as Pro3DRenderQuote, w as Pro3DRenderRunOptions, x as Pro3DRenderRunParams, Q as QuoteAdjustment, y as QuoteWarning, R as ReferenceCaptionParams, z as RenderScene3DParams, C as RetainedScene3DEditParams, D as RetainedScene3DEditResult, F as RunAndWaitOptions, H as RunManyResult, K as RunNodeAdjustment, L as RunNodeOptions, M as RunNodeResult, S as RunNodeWarning, T as SCENE3D_DELIVERY_ASSET_USAGE, U as Scene3DAuthoringEngine, V as Scene3DCapabilities, W as Scene3DDelivery, X as Scene3DDeliveryAsset, Y as Scene3DDeliveryAssetKind, Z as Scene3DJobOutput, _ as SocialSearchJobOutput, $ as SplitImageParams, a0 as SplitImageResult, a1 as SplitImageTile, a2 as StructuredReferenceParams, a3 as Subject, a4 as TextToSpeechParams, a5 as TextToVideoParams, a6 as VideoDepthParams, a7 as VideoToVideoParams, a8 as VideoUpscaleParams } from './nodes-C9j0PFto.js';
35
35
  export { TopazUpscaleFactor } from '@nodaro/shared/credits';
36
36
  export { CHARACTER_ASPECT_DEFAULTS, CHARACTER_ASPECT_OPTIONS, CHARACTER_STYLES, OBJECT_ASPECT_DEFAULTS as CREATURE_ASPECT_DEFAULTS, OBJECT_ASPECT_OPTIONS as CREATURE_ASPECT_OPTIONS, CREATURE_ATTACH_COLUMNS, CharacterAspectRatio, ObjectAspectRatio as CreatureAspectRatio, CreatureAttachColumn, EntityStyle, ImageToImageAttachColumn, LOCATION_ASSET_TYPES, LOCATION_ATTACH_COLUMNS, LocationAssetType, LocationAttachColumn, OBJECT_ASPECT_DEFAULTS, OBJECT_ASPECT_OPTIONS, OBJECT_ASSET_TYPES, OBJECT_ATTACH_COLUMNS, ObjectAspectRatio, ObjectAssetType, ObjectAttachColumn, SURROUND_DIRECTIONS, SurroundDirection } from '@nodaro/shared/entities';
37
37
  export { AccessTokenResponse, ExchangeCodeInput, OAuthAppInfo, OAuthResource } from './entries/oauth.js';
@@ -49,10 +49,11 @@ export { BrowseCommunityParams, BrowseCommunityResult, CloneListingResult, Commu
49
49
  export { ReduceInput, ReduceResource, ReduceResult } from './entries/reduce.js';
50
50
  export { SavedPostsResource } from './entries/saved-posts.js';
51
51
  export { Scene3DResource } from './entries/scene3d.js';
52
- export { CreateSessionInput, GenerationSession, ListSessionItemsParams, ListSessionsParams, SessionItem, SessionPage, SessionsResource, UpdateSessionInput } from './entries/sessions.js';
52
+ export { CreateSessionInput, GenerationSession, ListSessionItemsParams, ListSessionsParams, MoveSessionItemsInput, SessionItem, SessionPage, SessionsResource, UpdateSessionInput } from './entries/sessions.js';
53
53
  export { CreateShotInput, Shot, ShotEntityRef, ShotMode, ShotsResource, UpdateShotInput } from './entries/shots.js';
54
54
  export { StudioDocumentJson, StudioEditInput, StudioGenerationReply, StudioKeyframeAcceptanceInput, StudioKeyframeGenerationInput, StudioKeyframeRecord, StudioProductionCapabilities, StudioProductionRecord, StudioProductionReply, StudioResource, StudioShotGenerationInput } from './entries/studio.js';
55
55
  export { BrowseTemplatesParams, BrowseTemplatesResult, CloneTemplateParams, CloneTemplateResult, Template, TemplateBrowseCard, TemplateSort, TemplatesResource } from './entries/templates.js';
56
+ export { ListTrashParams, TrashEntry, TrashPage, TrashResource, TrashSession } from './entries/trash.js';
56
57
  export { ListTrendRunsParams, ListTrendsParams, TrendCard, TrendChipKey, TrendChips, TrendChoice, TrendDetail, TrendDetailSlot, TrendEngine, TrendEstimate, TrendExample, TrendOriginal, TrendPage, TrendResolution, TrendRun, TrendRunDisplaySlot, TrendRunOptions, TrendRunRequest, TrendRunSlot, TrendSlotKind, TrendTag, TrendsResource } from './entries/trends.js';
57
58
  export { TutorialCategory, TutorialFlowItem, TutorialVideoItem, TutorialsResource } from './entries/tutorials.js';
58
59
  export { UploadJsonResult, UploadResult, UploadsResource } from './entries/uploads.js';
package/dist/index.js CHANGED
@@ -1,3 +1,4 @@
1
+ import './chunk-CGNVHN4V.js';
1
2
  import './chunk-VPAUN75Q.js';
2
3
  import './chunk-MEKI37WI.js';
3
4
  export { WebhookSignatureError, verifyWebhookSignature } from './chunk-VGTRKXF2.js';
@@ -8,9 +9,9 @@ import './chunk-D3PW7AHZ.js';
8
9
  import './chunk-BKP6F2IX.js';
9
10
  import './chunk-PMTM26LL.js';
10
11
  import './chunk-LHRQXWI5.js';
12
+ import './chunk-6NTKEXT5.js';
11
13
  import './chunk-YCVRQZT3.js';
12
14
  import './chunk-VT237QF2.js';
13
- import './chunk-CGNVHN4V.js';
14
15
  import './chunk-HLHR3R4P.js';
15
16
  import './chunk-QVQCKOBM.js';
16
17
  import './chunk-IQ6KWSXP.js';
@@ -49,20 +50,21 @@ import './chunk-M6Y5TOYE.js';
49
50
  import './chunk-KARJ7P7Y.js';
50
51
  import './chunk-SUCHGNYT.js';
51
52
  import './chunk-SLPD47SR.js';
52
- export { NodaroClient, createClient } from './chunk-RQY2WJD3.js';
53
+ export { NodaroClient, createClient } from './chunk-I7AHLDXV.js';
54
+ export { UploadsResource } from './chunk-WY4QRJZW.js';
53
55
  export { VideoProResource } from './chunk-ERLXU47J.js';
54
56
  export { VoicesResource } from './chunk-T7N7DFQJ.js';
55
57
  export { WebhooksResource } from './chunk-YN6CBIIB.js';
56
58
  export { WorkflowsResource } from './chunk-33HT46A3.js';
57
59
  export { WorkspacesResource } from './chunk-Z5GLY4R3.js';
58
60
  export { SCENE3D_DELIVERY_ASSET_USAGE, Scene3DResource } from './chunk-NNHWH7ER.js';
59
- export { SessionsResource } from './chunk-Y6VDCZPB.js';
61
+ export { SessionsResource } from './chunk-WS4ZQ4AA.js';
60
62
  export { ShotsResource } from './chunk-WVFAQBS7.js';
61
63
  export { StudioProductionsResource, StudioResource, isStudioGenerateEstimate } from './chunk-AUKHMT53.js';
62
64
  export { TemplatesResource } from './chunk-M7VSFZMV.js';
63
- export { TrendsResource } from './chunk-CKHCSZCV.js';
65
+ export { TrashResource } from './chunk-KBHDUHKM.js';
66
+ export { TrendsResource } from './chunk-XILR6TFO.js';
64
67
  export { TutorialsResource } from './chunk-HPXE3NZW.js';
65
- export { UploadsResource } from './chunk-WY4QRJZW.js';
66
68
  export { PALETTE_DIRECTION_PREFIX, PalettesResource, paletteDirectionId } from './chunk-WEQWU2IC.js';
67
69
  export { PickerCatalogsResource } from './chunk-KFZOJBI5.js';
68
70
  export { PipelinesResource } from './chunk-K4RQOSJH.js';
@@ -75,14 +77,14 @@ export { MediaResource } from './chunk-BQAW4RX2.js';
75
77
  export { ModelsResource } from './chunk-Y6V6CBY5.js';
76
78
  export { MOODBOARD_DIRECTION_PREFIX, MoodboardsResource, moodboardDirectionId } from './chunk-YVU2M7MI.js';
77
79
  export { PresetsResource } from './chunk-JTAW54UM.js';
78
- export { NodesResource } from './chunk-JB4GVP4Q.js';
80
+ export { NodesResource } from './chunk-GW76IRQD.js';
79
81
  export { OAuthResource } from './chunk-Z7LGWNI7.js';
80
82
  export { OBJECT_ASPECT_DEFAULTS, OBJECT_ASPECT_OPTIONS, OBJECT_ASSET_TYPES, OBJECT_ATTACH_COLUMNS, ObjectsResource } from './chunk-7LSFG2AF.js';
81
83
  export { OrganizationsResource } from './chunk-ALSLZG3U.js';
82
84
  export { CLIP_PACK_MAX_TARGET_SEC, CLIP_PACK_MIN_TARGET_SEC, EditResource, TRAILER_FORMATS, USE_CASE_NODE_TYPES } from './chunk-RBX3QTKB.js';
83
85
  export { ExecutionsResource, OUTPUT_BEARING_NODE_STATUSES, nodeStateMayCarryOutput } from './chunk-Z3ZKFI2M.js';
84
86
  export { GalleryResource } from './chunk-JDEZHITT.js';
85
- export { JobsResource } from './chunk-6MQ2LTJZ.js';
87
+ export { JobsResource } from './chunk-PQHZUWSL.js';
86
88
  export { LibraryResource } from './chunk-P6E4QDJN.js';
87
89
  export { LlmResource } from './chunk-E37CVHWW.js';
88
90
  export { LOCATION_ASSET_TYPES, LOCATION_ATTACH_COLUMNS, LocationsResource, SURROUND_DIRECTIONS } from './chunk-TVENC6PH.js';
@@ -91,7 +93,7 @@ export { CommunityResource } from './chunk-SFB4YLCS.js';
91
93
  export { CompetitorsResource } from './chunk-BU5A6K4C.js';
92
94
  export { CopilotResource } from './chunk-D2ILCSOQ.js';
93
95
  import './chunk-7CUWAVWB.js';
94
- export { CallbackAuth, NodaroClientCore, StaticTokenAuth, supabaseAuth } from './chunk-3Y5TV37H.js';
96
+ export { CallbackAuth, NodaroClientCore, StaticTokenAuth, supabaseAuth } from './chunk-FCYN4N3M.js';
95
97
  export { AlreadyRunningError, AppRunVersionChangedError, CREDIT_CAP_CODES, ContinuationPreviewPendingError, ContinuationRefusedError, CreditCapExceededError, ForbiddenError, InsufficientCreditsError, JobAbortedError, JobBlockedError, JobFailedError, JobHeldError, JobTimeoutError, NodaroError, NotFoundError, RateLimitedError, StorageExceededError, StudioOpError, StudioPreviewAppliedError, StudioPreviewUnavailable, UnauthorizedError, WorkflowConflictError, throwFromResponse } from './chunk-L6T44A3G.js';
96
98
  export { OBJECT_ASPECT_DEFAULTS as CREATURE_ASPECT_DEFAULTS, OBJECT_ASPECT_OPTIONS as CREATURE_ASPECT_OPTIONS, CREATURE_ASSET_TYPES, CREATURE_ATTACH_COLUMNS, CreaturesResource } from './chunk-CK3AMMSC.js';
97
99
  export { CreditsResource } from './chunk-5MOJSYHI.js';
@@ -99,7 +101,7 @@ export { DeveloperAppsResource } from './chunk-65E3JBFZ.js';
99
101
  export { AppsResource } from './chunk-7LODCIQK.js';
100
102
  export { AudioResource } from './chunk-3QFTP5P5.js';
101
103
  export { BillingResource } from './chunk-J4WFSKY6.js';
102
- export { CastSwapResource } from './chunk-HKDIIFG2.js';
104
+ export { CastSwapResource } from './chunk-OWG3XAHQ.js';
103
105
  export { CatalogsResource } from './chunk-KG4R454Z.js';
104
106
  export { CHARACTER_ASPECT_DEFAULTS, CHARACTER_ASPECT_OPTIONS, CHARACTER_STYLES, CharactersResource, PEOPLE, PERSON_DIMENSION_LABELS, PERSON_DIMENSION_ORDER, buildPersonHints, buildPersonSeedPrompt } from './chunk-EJSGJDZY.js';
105
107
  //# sourceMappingURL=index.js.map
@@ -1043,7 +1043,12 @@ interface TextToVideoParams extends StructuredReferenceParams, ReferenceCaptionP
1043
1043
  /**
1044
1044
  * Typed request body for `nodes.run("video-upscale", …)` / `runAndWait`.
1045
1045
  *
1046
- * - `topaz` (default): upscale any `videoUrl` by `upscaleFactor`.
1046
+ * - `topaz` (default): upscale any `videoUrl` to `targetResolution` (the
1047
+ * frame's short side: 720p / 1080p / 4k, default 1080p) at `targetFps`
1048
+ * (15–60, default the source's own rate; added frames are interpolated).
1049
+ * Metered: the run holds a ceiling read from its output size and is charged
1050
+ * what the upscale actually costs, never more. `upscaleFactor` is the legacy
1051
+ * lever, mapped over the source's short side when no `targetResolution` is set.
1047
1052
  * - `veo-1080p` / `veo-4k`: re-render a VEO generation by its `taskId`.
1048
1053
  * - `seedance-2-5-hd`: finalize a Seedance 2.5 DRAFT (a `draft: true` run) —
1049
1054
  * the same take re-rendered at 1080p at the draft's own length. Name the
@@ -1057,6 +1062,11 @@ interface TextToVideoParams extends StructuredReferenceParams, ReferenceCaptionP
1057
1062
  interface VideoUpscaleParams extends GenerationSessionParams {
1058
1063
  provider?: "topaz" | "veo-1080p" | "veo-4k" | "seedance-2-5-hd";
1059
1064
  videoUrl?: string;
1065
+ /** topaz: output resolution — the frame's short side. Default "1080p". */
1066
+ targetResolution?: "720p" | "1080p" | "4k";
1067
+ /** topaz: output frame rate, 15–60. Default: the source's own rate. */
1068
+ targetFps?: number;
1069
+ /** @deprecated Legacy topaz lever — use `targetResolution`. */
1060
1070
  upscaleFactor?: "1" | "2" | "4";
1061
1071
  taskId?: string;
1062
1072
  sourceJobId?: string;
@@ -1043,7 +1043,12 @@ interface TextToVideoParams extends StructuredReferenceParams, ReferenceCaptionP
1043
1043
  /**
1044
1044
  * Typed request body for `nodes.run("video-upscale", …)` / `runAndWait`.
1045
1045
  *
1046
- * - `topaz` (default): upscale any `videoUrl` by `upscaleFactor`.
1046
+ * - `topaz` (default): upscale any `videoUrl` to `targetResolution` (the
1047
+ * frame's short side: 720p / 1080p / 4k, default 1080p) at `targetFps`
1048
+ * (15–60, default the source's own rate; added frames are interpolated).
1049
+ * Metered: the run holds a ceiling read from its output size and is charged
1050
+ * what the upscale actually costs, never more. `upscaleFactor` is the legacy
1051
+ * lever, mapped over the source's short side when no `targetResolution` is set.
1047
1052
  * - `veo-1080p` / `veo-4k`: re-render a VEO generation by its `taskId`.
1048
1053
  * - `seedance-2-5-hd`: finalize a Seedance 2.5 DRAFT (a `draft: true` run) —
1049
1054
  * the same take re-rendered at 1080p at the draft's own length. Name the
@@ -1057,6 +1062,11 @@ interface TextToVideoParams extends StructuredReferenceParams, ReferenceCaptionP
1057
1062
  interface VideoUpscaleParams extends GenerationSessionParams {
1058
1063
  provider?: "topaz" | "veo-1080p" | "veo-4k" | "seedance-2-5-hd";
1059
1064
  videoUrl?: string;
1065
+ /** topaz: output resolution — the frame's short side. Default "1080p". */
1066
+ targetResolution?: "720p" | "1080p" | "4k";
1067
+ /** topaz: output frame rate, 15–60. Default: the source's own rate. */
1068
+ targetFps?: number;
1069
+ /** @deprecated Legacy topaz lever — use `targetResolution`. */
1060
1070
  upscaleFactor?: "1" | "2" | "4";
1061
1071
  taskId?: string;
1062
1072
  sourceJobId?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nodaro/sdk",
3
- "version": "2.45.1",
3
+ "version": "2.47.0",
4
4
  "description": "Typed REST client for the Nodaro API — workflows, jobs, executions, apps, characters, and more.",
5
5
  "type": "module",
6
6
  "license": "Apache-2.0",
@@ -240,6 +240,11 @@
240
240
  "import": "./dist/entries/templates.js",
241
241
  "require": "./dist/entries/templates.cjs"
242
242
  },
243
+ "./trash": {
244
+ "types": "./dist/entries/trash.d.ts",
245
+ "import": "./dist/entries/trash.js",
246
+ "require": "./dist/entries/trash.cjs"
247
+ },
243
248
  "./trends": {
244
249
  "types": "./dist/entries/trends.d.ts",
245
250
  "import": "./dist/entries/trends.js",
@@ -307,7 +312,7 @@
307
312
  "test:watch": "vitest"
308
313
  },
309
314
  "dependencies": {
310
- "@nodaro/shared": "^3.43.0",
315
+ "@nodaro/shared": "^3.44.0",
311
316
  "@nodaro/prompts": "^1.42.1"
312
317
  },
313
318
  "peerDependencies": {
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/resources/jobs.ts"],"names":[],"mappings":";;;AAmQA,SAAS,UAAU,KAAA,EAAmE;AACpF,EAAA,IAAI,KAAA,KAAU,QAAW,OAAO,MAAA;AAChC,EAAA,OAAO,OAAO,KAAA,KAAU,QAAA,GAAW,KAAA,GAAQ,KAAA,CAAM,KAAK,GAAG,CAAA;AAC3D;AAgCO,IAAM,eAAN,MAAmB;AAAA,EACxB,YAAoB,MAAA,EAA0B;AAA1B,IAAA,IAAA,CAAA,MAAA,GAAA,MAAA;AAAA,EAA2B;AAAA,EAA3B,MAAA;AAAA;AAAA,EAGpB,IAAI,EAAA,EAAoC;AACtC,IAAA,OAAO,IAAA,CAAK,OAAO,OAAA,CAAQ,KAAA,EAAO,YAAY,kBAAA,CAAmB,EAAE,CAAC,CAAA,CAAE,CAAA;AAAA,EACxE;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAWA,IAAA,CAAK,MAAA,GAAyB,EAAC,EAA0B;AACvD,IAAA,MAAM,EAAE,MAAA,EAAQ,IAAA,EAAM,MAAA,EAAQ,GAAG,MAAK,GAAI,MAAA;AAC1C,IAAA,OAAO,IAAA,CAAK,MAAA,CAAO,OAAA,CAAsB,KAAA,EAAO,UAAA,EAAY;AAAA,MAC1D,KAAA,EAAO,EAAE,GAAG,IAAA,EAAM,QAAQ,SAAA,CAAU,MAAM,CAAA,EAAG,IAAA,EAAM,UAAU,IAAI,CAAA,EAAG,MAAA,EAAQ,SAAA,CAAU,MAAM,CAAA;AAAE,KAC/F,CAAA;AAAA,EACH;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAWA,WAAW,MAAA,EAAqD;AAC9D,IAAA,OAAO,IAAA,CAAK,OAAO,OAAA,CAAuB,MAAA,EAAQ,wBAAwB,EAAE,IAAA,EAAM,QAAQ,CAAA;AAAA,EAC5F;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQA,IAAA,CAAK,IAAY,MAAA,EAAkD;AACjE,IAAA,OAAO,IAAA,CAAK,OAAO,OAAA,CAAuB,KAAA,EAAO,YAAY,kBAAA,CAAmB,EAAE,CAAC,CAAA,OAAA,CAAA,EAAW;AAAA,MAC5F,IAAA,EAAM,EAAE,MAAA;AAAO,KAChB,CAAA;AAAA,EACH;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQA,UAAU,EAAA,EAAgD;AACxD,IAAA,OAAO,KAAK,MAAA,CAAO,OAAA;AAAA,MACjB,KAAA;AAAA,MACA,CAAA,SAAA,EAAY,kBAAA,CAAmB,EAAE,CAAC,CAAA,OAAA;AAAA,KACpC;AAAA,EACF;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAWA,OAAO,EAAA,EAAsC;AAC3C,IAAA,OAAO,KAAK,MAAA,CAAO,OAAA;AAAA,MACjB,MAAA;AAAA,MACA,CAAA,SAAA,EAAY,kBAAA,CAAmB,EAAE,CAAC,CAAA,OAAA;AAAA,KACpC;AAAA,EACF;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQA,OAAO,EAAA,EAAsC;AAC3C,IAAA,OAAO,KAAK,MAAA,CAAO,OAAA;AAAA,MACjB,QAAA;AAAA,MACA,CAAA,SAAA,EAAY,kBAAA,CAAmB,EAAE,CAAC,CAAA;AAAA,KACpC;AAAA,EACF;AACF","file":"chunk-34JMD6ZO.cjs","sourcesContent":["import type { NodaroClientCore } from \"../core.js\"\n\n/**\n * A job's lifecycle status. Hand-copied mirror of `JOB_STATUSES` in the\n * platform's `backend/src/lib/job-status.ts` — nothing links the two at build\n * time, so a new member has to be added here in the same change.\n *\n * `pending_review` is IN-FLIGHT, NOT TERMINAL: a job policy registered by the\n * deployment held the output for a human reviewer. Treat it like `processing`\n * in a `switch` — keep waiting, do not re-run — and it resolves to `completed`\n * (approved), `failed` (rejected, carrying an `error_hint` with\n * `kind: \"policy-block\"`) or `cancelled` (a held job is cancellable like any\n * in-flight job). `credit_status` reads `\"reserved\"` for the whole hold. Only\n * appears on deployments that register a job policy; `runAndWait` throws\n * {@link JobHeldError} on the first held tick rather than waiting it out.\n */\nexport type JobStatus =\n | \"pending\"\n | \"queued\"\n | \"processing\"\n | \"pending_review\"\n | \"completed\"\n | \"failed\"\n | \"cancelled\"\n\n/**\n * A PROVIDER's verdict: the model's own safety filter refused the output.\n * `class` distinguishes a deterministic block (copyright/likeness — retrying\n * the same request never helps) from `safety`, whose filter is known to be\n * non-deterministic for some models: `retried` says whether the worker\n * already spent its one extra attempt, and `suggestedProvider` — present\n * only when the catalog declares a fallback for the model that failed — is a\n * real model id the SAME prompt/references can be retried on.\n */\nexport type SafetyBlockHint = {\n kind: \"safety-block\"\n class: \"copyright\" | \"likeness\" | \"safety\"\n retried: boolean\n suggestedProvider?: string\n /**\n * Present when the provider refused the INPUT VIDEO itself — not the prompt,\n * a reference image or the output. Sending a different clip is the fix.\n */\n subject?: \"input_video\"\n}\n\n/**\n * A NODARO-side verdict, not a provider's: a job policy registered by the\n * deployment rejected the request (`hookPoint: \"request\"` — nothing ran, and\n * the call itself failed with {@link JobBlockedError}) or the finished output\n * (`hookPoint: \"result\"` — the result was blocked and never published).\n *\n * `reason` is USER-SAFE BY CONTRACT — the platform guarantees the policy's\n * machine text (scores, labels) never reaches it — so show it to the person\n * who made the request as-is. `policyId` identifies the deployment's policy,\n * not a Nodaro product feature. Only occurs on deployments that register a\n * job policy.\n */\nexport type PolicyBlockHint = {\n kind: \"policy-block\"\n policyId: string\n reason: string\n hookPoint: \"request\" | \"result\"\n}\n\n/**\n * The job ran out of credits partway: a step that reserves its own credits\n * (for example, the video a Cast Swap or trend run dispatches) was refused —\n * the balance could not cover it, or a plan or workspace cap was reached. The\n * job failed and its credits were refunded; ask the person to top up (or raise\n * the cap), then run it again.\n *\n * `code` is the refusal's own code, a lowercase snake_case token — for\n * example `insufficient_credits`, `free_video_limit`, `instance_cap_reached`,\n * `budget_exceeded`, `member_cap_exceeded` or `user_allowance_exceeded`. Treat\n * an unknown code like `insufficient_credits`.\n */\nexport type CreditsHint = {\n kind: \"credits\"\n code: string\n}\n\n/**\n * The provider refused the job's input video without naming a content-policy\n * class (its message is about the file, not a policy). Treat it like any\n * other failure — no fallback model is offered — except that the input to\n * change is known: send a different clip.\n */\nexport type InputRefusedHint = {\n kind: \"input-refused\"\n subject: \"input_video\"\n}\n\n/**\n * A job's `jobs.error_hint` (migration 376) — a user-safe, machine-readable\n * failure verdict, so a caller can act on it without parsing `error_message`\n * prose. One column, several verdict sources; `kind` is the discriminant.\n *\n * HAND-COPIED MIRROR of `ErrorHint` in the platform's\n * `backend/src/lib/safety-block.ts` (which names this file in its own\n * comment). Nothing links the two at build time: a new arm there has to be\n * pasted here verbatim in the same change, with a changeset.\n * `packages/client/dist/index.d.ts` is REBUILT, never hand-edited.\n */\nexport type JobErrorHint = SafetyBlockHint | PolicyBlockHint | CreditsHint | InputRefusedHint\n\n/**\n * The billing lifecycle of a job's credit reservation — `usage_logs.status`\n * for the job's `usage_log_id`. `null` when the job has no usage log (e.g. a\n * free run) or hasn't reserved credits yet.\n */\nexport type CreditStatus = \"reserved\" | \"committed\" | \"refunded\"\n\n/** A job owner's rating of their job — set with {@link JobsResource.rate}. */\nexport type JobRating = \"good\" | \"bad\"\n\n/**\n * The `rating` filter of {@link JobsResource.list}: one rating, any rating\n * (`\"rated\"`) or none (`\"unrated\"`).\n */\nexport type JobRatingFilter = JobRating | \"rated\" | \"unrated\"\n\n/**\n * Job record returned to non-admin SDK consumers. Field names are snake_case\n * to match the wire format (per the OpenAPI fix in Phase 1).\n *\n * Sensitive fields stripped server-side for non-admin callers:\n * `provider`, `provider_cost`, `display_cost`, `credits_actual`. USD\n * pricing is admin-only across api/sdk/mcp — non-admin consumers see\n * only the `credits` abstraction. Server-only nested job data (including\n * Recast's private remux base) is stripped for every caller, including admins.\n */\nexport interface Job {\n id: string\n status: JobStatus\n progress: number\n user_id: string\n input_data: unknown\n output_data: unknown\n error_message: string | null\n /** Present on a failed job the worker classified as a provider\n * content-policy block (`kind: \"safety-block\"`) or that a deployment's job\n * policy rejected (`kind: \"policy-block\"`); absent/null otherwise.\n * User-safe by construction — narrow on `kind` before reading the rest. */\n error_hint?: JobErrorHint | null\n /** PR9: the job's credit reservation lifecycle, derived server-side from\n * `usage_logs.status`. `null` when there is no usage log to report. Never\n * changes the meaning of `credits` (the reserved amount) below. */\n credit_status?: CreditStatus | null\n /** The credits HELD when the job was accepted. Never changes — a job can\n * settle below it; read {@link Job.credits_charged} for what it cost. */\n credits: number | null\n /**\n * What the job actually cost once its hold settled. Can be lower than\n * `credits` (the unused part goes back to the balance), `0` when the hold was\n * refunded, `null` while the job is still running or when it reserved\n * nothing of its own. Sum this — not `credits` — to total spend. Returned by\n * `get()` and `list()`.\n */\n credits_charged?: number | null\n job_type: string | null\n created_at: string\n started_at: string | null\n completed_at: string | null\n /**\n * Provenance: which kind of caller created the job — one of\n * `\"internal\" | \"mcp\" | \"app\" | \"cli\" | \"sdk\" | \"extension\" | \"web\" | \"api\"`.\n * `source_detail` narrows it (origin host, `extension/<name>` label,\n * `sdk/<version>`, MCP client name, developer-app id). Descriptive only;\n * lets a library view label or filter media by origin.\n */\n source?: string | null\n source_detail?: string | null\n /** The generation session this job was born in (the `sessionId` sent with\n * the generation request), or null. See `client.sessions`. */\n session_id?: string | null\n /**\n * Whether the job's owner favorited it (`client.gallery.toggleFavorite`).\n * Returned by `get()` and `list()`. Absent from an older server, and when\n * the server could not read it for a moment — treat absent as unknown,\n * never as `false`.\n */\n favorited?: boolean\n /**\n * The owner's rating of the job ({@link JobsResource.rate}), or `null` when\n * unrated. Returned by `get()` and `list()`; absent like `favorited`.\n */\n rating?: JobRating | null\n}\n\nexport interface CancelJobResult {\n success: true\n cancelled: number\n /**\n * `true` when the job could not be stopped because its provider call is\n * already running — a metered LLM job's call, an external provider task. It\n * finishes and is charged only what it used.\n */\n inFlight?: boolean\n}\n\n/**\n * The kind of caller that created a job (`Job.source`). Hand-copied mirror of\n * `JOB_SOURCES` in the platform's `backend/src/lib/job-source.ts`.\n */\nexport type JobSource = \"internal\" | \"mcp\" | \"app\" | \"cli\" | \"sdk\" | \"extension\" | \"web\" | \"api\"\n\nexport interface DeleteJobResult {\n success: true\n}\n\nexport interface ListJobsParams {\n /** One status or several (a job matching any of them). An unknown status is a 400. */\n status?: JobStatus | readonly JobStatus[]\n /** Exact match on `input_data.type` — the route that created the job\n * (`\"llm-structured\"`, `\"video-analysis\"`, …). One value or several (up to 20). */\n type?: string | readonly string[]\n /** Exact match on `input_data.origin` — the client app that sent it. */\n origin?: string\n /** The surface that created the job (`Job.source`): `\"mcp\"` lists what your\n * MCP clients (Claude, ChatGPT, …) made. One value or several. */\n source?: JobSource | readonly JobSource[]\n /** `true`: only jobs you favorited; `false`: only jobs you did not. */\n favorited?: boolean\n /** Your rating: `\"good\"`, `\"bad\"`, any (`\"rated\"`) or none (`\"unrated\"`). */\n rating?: JobRatingFilter\n /** The jobs of one generate-image batch (`count` / `models`) — its `batchId`. */\n batchId?: string\n /** Page size, 1–100 (server default 50). */\n limit?: number\n /** The previous page's `next`. */\n cursor?: string\n}\n\n/** What {@link JobsResource.rate} answers: the job's rating now. */\nexport interface RateJobResult {\n data: { jobId: string; rating: JobRating | null }\n}\n\n/**\n * {@link JobsResource.fromUpload}'s body: an image edited in the browser,\n * already stored with `client.uploads.upload`, and what it was made from.\n */\nexport interface JobFromUploadParams {\n /** The edited image's `assetId`, as `client.uploads.upload` returned it. */\n assetId: string\n /** The job whose image was edited. */\n sourceJobId?: string\n /** Which of `sourceJobId`'s images was edited, when it made several. Default: its `imageUrl`. */\n sourceImageUrl?: string\n /** The upload that was edited, when the source is not a job. Not with `sourceJobId`. */\n sourceAssetId?: string\n /** The editor's design state, stored with `client.uploads.uploadJson`, so the edit can be reopened. */\n editStateUrl?: string\n /** The generation session to file the job in. */\n sessionId?: string\n}\n\n/** A list filter value as the query string carries it: several are comma-separated. */\nfunction listParam(value: string | readonly string[] | undefined): string | undefined {\n if (value === undefined) return undefined\n return typeof value === \"string\" ? value : value.join(\",\")\n}\n\nexport interface ListJobsPage {\n /**\n * A page may hold fewer than `limit` rows — even none — and still carry a\n * `next`. Page on `next`, never on `data.length`.\n */\n data: Job[]\n /** Pass back as `cursor` for the next page; `null` on the last one. */\n next: string | null\n}\n\n/**\n * Lean job status returned by `GET /v1/jobs/:id/status`. Skips the\n * `input_data` JSONB and cost columns. Its `output_data` still goes\n * through the server-only nested-field redaction. Intended for poll loops that\n * only need progress/output/error, and when the job finished.\n */\nexport interface JobStatusResult {\n id: string\n status: JobStatus\n progress?: number\n output_data?: unknown\n error_message?: string | null\n /** PR9: see {@link Job.error_hint}. */\n error_hint?: JobErrorHint | null\n /** PR9: see {@link Job.credit_status}. */\n credit_status?: CreditStatus | null\n /** When the job finished, on the server's clock; null until it has. */\n completed_at?: string | null\n}\n\nexport class JobsResource {\n constructor(private client: NodaroClientCore) {}\n\n /** Get a single job by ID. */\n get(id: string): Promise<{ data: Job }> {\n return this.client.request(\"GET\", `/v1/jobs/${encodeURIComponent(id)}`)\n }\n\n /**\n * Your jobs, newest first (`GET /v1/jobs`), cursor-paginated. `type` and\n * `origin` filter on the job's own `input_data`, which every job carries —\n * a client app lists its runs with `{ type: \"llm-structured\", origin: \"studio\" }`.\n * `status` and `type` take one value or a list; `favorited` and `rating`\n * filter on your own marks, `source` on the surface that created the job.\n * Every filter combines with AND, and each job\n * carries `favorited` and `rating`.\n */\n list(params: ListJobsParams = {}): Promise<ListJobsPage> {\n const { status, type, source, ...rest } = params\n return this.client.request<ListJobsPage>(\"GET\", \"/v1/jobs\", {\n query: { ...rest, status: listParam(status), type: listParam(type), source: listParam(source) },\n })\n }\n\n /**\n * Record an image edited in the browser as a job (`POST /v1/jobs/from-upload`):\n * a completed, private, free `image-edit` job whose `output_data.imageUrl` is\n * the upload, linked to its source in `input_data` (`sourceJobId` /\n * `sourceAssetId`, `sourceImageUrl`). It then lists, rates, favorites and\n * files into a session like any image job. One upload is one job: the same\n * `assetId` again returns the same job. OAuth apps need the `assets:write`\n * scope. A deployment's job policy can refuse the image ({@link JobBlockedError}).\n */\n fromUpload(params: JobFromUploadParams): Promise<{ data: Job }> {\n return this.client.request<{ data: Job }>(\"POST\", \"/v1/jobs/from-upload\", { body: params })\n }\n\n /**\n * Rate one of your jobs `\"good\"` or `\"bad\"`, or clear the rating with\n * `null` (`PUT /v1/jobs/:id/rating`). Only the job's owner rates it — anyone\n * else's job is a `NotFoundError`. The rating reads back as `Job.rating`\n * and filters {@link list}. OAuth apps need the `assets:write` scope.\n */\n rate(id: string, rating: JobRating | null): Promise<RateJobResult> {\n return this.client.request<RateJobResult>(\"PUT\", `/v1/jobs/${encodeURIComponent(id)}/rating`, {\n body: { rating },\n })\n }\n\n /**\n * Get the lean status of a single job (poll-loop friendly).\n * Hits `GET /v1/jobs/:id/status` — returns only id/status/progress/\n * output_data/error_message, with far less wire/CPU cost than `get()`.\n * Same auth + ownership semantics as {@link get}.\n */\n getStatus(id: string): Promise<{ data: JobStatusResult }> {\n return this.client.request(\n \"GET\",\n `/v1/jobs/${encodeURIComponent(id)}/status`,\n )\n }\n\n /**\n * Cancel a job. Server route is `POST /v1/jobs/:jobId/cancel`.\n * Refunds any reserved credit holds. A running LLM job priced per model\n * (metered) whose call has already started answers\n * `{ success: true, cancelled: 0, inFlight: true }`: it finishes and is\n * charged only what it used. A job stopped before its call starts is\n * refunded, except for what an earlier attempt of the same job already used\n * (a retry after a billed attempt): that is charged.\n */\n cancel(id: string): Promise<CancelJobResult> {\n return this.client.request(\n \"POST\",\n `/v1/jobs/${encodeURIComponent(id)}/cancel`,\n )\n }\n\n /**\n * Delete a job and the private media it produced. Server route is\n * `DELETE /v1/jobs/:jobId`. Only the job's owner (or an admin) may delete it;\n * a job that is still running is deleted as-is — cancel it first when its\n * worker should stop ({@link cancel}).\n */\n delete(id: string): Promise<DeleteJobResult> {\n return this.client.request(\n \"DELETE\",\n `/v1/jobs/${encodeURIComponent(id)}`,\n )\n }\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/resources/cast-swap.ts"],"names":[],"mappings":";;;AAwdO,IAAM,mBAAN,MAAuB;AAAA,EAC5B,YAAoB,MAAA,EAA0B;AAA1B,IAAA,IAAA,CAAA,MAAA,GAAA,MAAA;AAAA,EAA2B;AAAA,EAA3B,MAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EASpB,GAAA,CAAI,QAAwB,OAAA,EAA6E;AACvG,IAAA,OAAO,IAAA,CAAK,MAAA,CAAO,OAAA,CAAQ,MAAA,EAAQ,eAAA,EAAiB;AAAA,MAClD,IAAA,EAAM,MAAA;AAAA,MACN,GAAI,OAAA,EAAS,cAAA,GAAiB,EAAE,OAAA,EAAS,EAAE,iBAAA,EAAmB,OAAA,CAAQ,cAAA,EAAe,EAAE,GAAI;AAAC,KAC7F,CAAA;AAAA,EACH;AAAA;AAAA,EAGA,SAAS,MAAA,EAAmD;AAC1D,IAAA,OAAO,IAAA,CAAK,OAAO,OAAA,CAAQ,MAAA,EAAQ,0BAA0B,EAAE,IAAA,EAAM,QAAQ,CAAA;AAAA,EAC/E;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAYA,oBAAoB,KAAA,EAAqD;AACvE,IAAA,OAAO,IAAA,CAAK,MAAA,CAAO,OAAA,CAAQ,MAAA,EAAQ,CAAA,cAAA,EAAiB,kBAAA,CAAmB,KAAK,CAAC,CAAA,sBAAA,CAAA,EAA0B,EAAE,IAAA,EAAM,IAAI,CAAA;AAAA,EACrH;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAcA,WAAA,CAAY,KAAA,EAAe,MAAA,GAAoC,EAAC,EAAuC;AACrG,IAAA,MAAM,IAAA,GAAO,OAAO,SAAA,KAAc,MAAA,GAAY,EAAE,SAAA,EAAW,MAAA,CAAO,SAAA,EAAU,GAAI,EAAC;AACjF,IAAA,OAAO,IAAA,CAAK,MAAA,CAAO,OAAA,CAAQ,MAAA,EAAQ,CAAA,cAAA,EAAiB,kBAAA,CAAmB,KAAK,CAAC,CAAA,aAAA,CAAA,EAAiB,EAAE,IAAA,EAAM,CAAA;AAAA,EACxG;AACF","file":"chunk-55ZX6TE3.cjs","sourcesContent":["import type { NodaroClientCore } from \"../core.js\"\n\n/**\n * Cast Swap — replace the people, pets, products and/or the location in a\n * short video with your own references, keeping its motion, framing, timing\n * and sound (the clip's audio is kept, and the result is the clip's length).\n *\n * Before the video, each person, pet and product role's photos are turned\n * into one clean reference picture by an image model. This costs extra\n * credits (`breakdown.references` in the estimate), charged when it runs, even\n * if the video then fails; it adds about a minute, falls back to your own\n * photos if it fails, and is turned off with `prepareReferences: false`.\n * Locations are not prepared.\n *\n * Engines: a run is made on Seedance 2.5 (`engine` left out, or\n * `\"seedance-2-5\"`) or Kling 4 (`\"kling-4\"`). Kling 4 renders 720p (its\n * default) or 1080p and has no draft; it makes a new take guided by the clip\n * and pictures, so its Full Quality is a new take at 1080p rather than the\n * same take re-rendered (`CastSwapFullQualityEstimate.kind`).\n *\n * Cloud edition only: `/v1/cast-swap` is served by the cloud plugin and 404s\n * on self-hosted installs. `run()` answers 202 with a job id; follow it with\n * `client.jobs.get(jobId)` / `client.jobs.getStatus(jobId)` like any other job.\n *\n * Repeats: pass `{ idempotencyKey }` to `run()` and it is sent as the\n * `Idempotency-Key` header. A repeat with the same key within the credit\n * guard's dedup window (about 10 s) answers 200 `{ jobId, deduped: true }` with\n * an `X-Dedup-Hit` header; a later one answers 202 with the first run's\n * `jobId`. Nothing new is started or charged.\n *\n * Refusals (thrown as a `NodaroError` subclass; body `{ error: { code, message } }`), before\n * anything is charged: 400 `validation_error` (the body: no role with images,\n * no reference and no `prePrompt` or `postPrompt`, more roles of a kind\n * than allowed, more than 30 images in all, `draft: true` above 480p, a\n * `prePrompt` or `postPrompt` over 4,000 characters, a `faceMasking` setting\n * out of range); on Kling 4, `draft_unsupported` (`draft: true`),\n * `resolution_unsupported` (480p), `output_format_unsupported` (a MOV edit\n * output) and `too_many_images` (more than 10 images in the run, across every\n * role and fixed reference); `raw_reference_token` (also in a reference's `line`),\n * `invalid_role_mention` (also any `{role:N}` in a reference's `line`),\n * `unsafe_url`, `video_unreadable`, `clip_out_of_range` (4–30 s),\n * `preview_out_of_range`, `no_roles_in_preview` (a preview with every role\n * `inPreview: false`, always refused even with a prompt, or with no role kept\n * in it that has images and no `prePrompt` or `postPrompt`), `prompt_too_long`\n * (the prompt would build too long: a `{role:N}` reads as the role's name when\n * it sends no images; Kling 4's cap is 8,000 characters); 401; 402 `insufficient_credits` (`run()` only); 404\n * (a `sessionId` you may not use, `run()` only); 422 `job_blocked` (`run()`\n * only); 503 `host_too_old` (both); 503 `estimate_unavailable` (`estimate()`\n * only).\n */\n\n/**\n * The video engine a Cast Swap run is made on. Left out = `\"seedance-2-5\"`.\n *\n * - `\"seedance-2-5\"`: 480p (the default, a draft unless `draft: false`), 720p\n * or 1080p; Full Quality re-renders a draft's own take at 1080p.\n * - `\"kling-4\"`: 720p (the default) or 1080p, never a draft (`draft: true`\n * answers 400 `draft_unsupported`); Full Quality makes a new take at 1080p\n * from a completed 720p run's inputs. A preview is still 4 s from\n * `previewStart`.\n */\nexport type CastSwapEngine = \"seedance-2-5\" | \"kling-4\"\n\n/**\n * Where a Kling 4 run cuts the clip to whole seconds (Kling renders whole\n * seconds; asked for more than the clip, it would stretch the motion):\n * - `\"cut-end\"` (the default): drop the fraction of a second at its end;\n * - `\"cut-start\"`: drop it at its start.\n */\nexport type CastSwapKlingLength = \"cut-end\" | \"cut-start\"\n\n/** Whether a swapped subject takes this trait from the references (`\"new\"`) or keeps the video's (`\"original\"`). */\nexport type CastSwapTraitSource = \"new\" | \"original\"\n\n/**\n * Preview-only settings, on every role kind; a full run (`preview` not `true`)\n * ignores both.\n */\nexport interface CastSwapRolePreviewSettings {\n /** The name used instead of `name` in a preview. Same rules as `name` (1–200 characters). */\n previewName?: string\n /**\n * `false` leaves this role out of the preview: its reference images are not\n * sent, not prepared and not charged, and a `{role:N}` naming it reads as its\n * `previewName`, else its `name`. Default `true`. A preview with every role\n * left out (always refused, even with a prompt), or with no role kept in it\n * that has images and no pre / post prompt, answers 400 `no_roles_in_preview`.\n */\n inPreview?: boolean\n}\n\n/** A person in the video to recast. */\nexport interface CastSwapPersonRole extends CastSwapRolePreviewSettings {\n kind: \"person\"\n /** How the person is told apart in the video, e.g. `\"the woman that attacks\"`. */\n name: string\n /** 0–3 images of ONE person. Empty or `null` keeps the original person. */\n images: string[] | null\n /** Body from the references or the video. Default `\"new\"`. */\n body?: CastSwapTraitSource\n /** Outfit from the references or the video. Default `\"new\"`. */\n outfit?: CastSwapTraitSource\n /** Hairstyle and haircut from the references or the video. Default `\"new\"`. */\n hair?: CastSwapTraitSource\n}\n\n/** The place the video happens in. */\nexport interface CastSwapLocationRole extends CastSwapRolePreviewSettings {\n kind: \"location\"\n /** How the place is named. Default `\"the setting\"`. */\n name?: string\n /** 0–3 images of ONE place. Empty or `null` keeps the original place. */\n images: string[] | null\n}\n\n/** An animal in the video to recast. */\nexport interface CastSwapPetRole extends CastSwapRolePreviewSettings {\n kind: \"pet\"\n /** How the animal is told apart in the video, e.g. `\"the dog\"`. */\n name: string\n /** 0–3 images of ONE animal. Empty or `null` keeps the original animal. */\n images: string[] | null\n /** Body (shape, size and build) from the references or the video. Default `\"new\"`. */\n body?: CastSwapTraitSource\n /** Coat (fur, colors and markings) from the references or the video. Default `\"new\"`. */\n coat?: CastSwapTraitSource\n}\n\n/** An object in the video to recast. */\nexport interface CastSwapProductRole extends CastSwapRolePreviewSettings {\n kind: \"product\"\n /** How the object is told apart in the video, e.g. `\"the can\"`. */\n name: string\n /** 0–3 images of ONE product. Empty or `null` keeps the original object. */\n images: string[] | null\n /** Shape and proportions from the references or the video. Default `\"new\"`. */\n shape?: CastSwapTraitSource\n /** Finish (colors, materials, label and markings) from the references or the video. Default `\"new\"`. */\n finish?: CastSwapTraitSource\n}\n\nexport type CastSwapRole = CastSwapPersonRole | CastSwapLocationRole | CastSwapPetRole | CastSwapProductRole\n\n/**\n * A fixed reference: 1–3 images of ONE thing that no role replaces, and the\n * line that says what it is (`\"the glass she drinks from\"`). Sent as given,\n * never prepared; its images count toward the 30.\n */\nexport interface CastSwapReference {\n /** 1–3 http(s) image URLs of one thing. */\n images: string[]\n /**\n * What it is, 1–500 characters. `{image}` in the line stands for this\n * reference's first image (`\"Use {image} for the sky\"`); a line without it\n * gets it appended. A `{role:N}` or a raw `{image:` / `{video:` / `{audio:`\n * token answers 400.\n */\n line: string\n}\n\n/**\n * Margins of the frame, each 0–49 %: a face whose centre lies in a margin is\n * not masked, so only faces inside the inner rectangle are. A margin left out\n * of a zone that is given is 0. (A `zone` left out altogether is 10 % at the\n * left and right: see `CastSwapFaceMasking.zone`.)\n */\nexport interface CastSwapFaceMaskingZone {\n /** % of the frame's width from the left edge. Default 0 in a zone that is given. */\n leftPct?: number\n /** % of the frame's width from the right edge. Default 0 in a zone that is given. */\n rightPct?: number\n /** % of the frame's height from the top edge. Default 0. */\n topPct?: number\n /** % of the frame's height from the bottom edge. Default 0. */\n bottomPct?: number\n}\n\n/**\n * Face masking: the faces in the source clip are covered before the video\n * model sees it, keeping their movement and lip timing while the rest of the\n * clip is sent as it is.\n *\n * - `\"off\"` (the same as leaving `faceMasking` out): the clip is sent as it is.\n * - `\"always\"`: the faces are masked before the first attempt. Its credits are\n * in the quote (`breakdown.masking`, counted in `totalCredits`).\n * - `\"auto\"`: the run starts unmasked; only if the video model refuses the\n * source clip is it retried once with the faces masked. Any other failure is\n * not retried. The extra credits, charged only when that retry runs, are the\n * estimate's `maskingCredits` (not in `totalCredits`).\n *\n * A completed job's output carries `faceMasking: { applied, reason }`:\n * `applied` is whether the video was made from the masked clip, and `reason`\n * is `\"always\"` (masked before the first attempt), `\"input_refused\"` (`auto`\n * retried after the source clip was refused), `\"no_faces\"` (no face was left\n * to mask after the filters: an `always` run continues unmasked; an `auto`\n * run fails with the original refusal instead) or `\"off\"`.\n */\nexport interface CastSwapFaceMasking {\n mode: \"off\" | \"always\" | \"auto\"\n /** What covers a masked face: `\"blur\"` (default) or `\"depth\"` (a depth-color view of it). */\n fill?: \"blur\" | \"depth\"\n /** Mask only faces at least this % of the frame's height, 0–100. Default 15. */\n minFaceHeightPct?: number\n /**\n * Mask only faces at most this % of the frame's height, 0–100. Default 0 (no\n * limit). When above 0 it must be at least `minFaceHeightPct` (else 400).\n */\n maxFaceHeightPct?: number\n /**\n * Leave out faces near the edges of the frame. Default (left out):\n * `{ leftPct: 10, rightPct: 10, topPct: 0, bottomPct: 0 }`, so people at the\n * left and right edges are not masked. `null`, or all four margins 0, means\n * no margins.\n */\n zone?: CastSwapFaceMaskingZone | null\n /** The blur's strength, 0.1–5 % of the frame's width (`fill: \"blur\"`). Default 2. */\n blurStrengthPct?: number\n /** How sure the face finder must be, 0.05–0.95: lower finds more faces. Default 0.5. */\n threshold?: number\n}\n\n/** The body of `POST /v1/cast-swap` and `POST /v1/cast-swap/estimate`. */\nexport interface CastSwapParams {\n /** The source clip, 4–30 seconds. */\n videoUrl: string\n /**\n * Who and what to swap: at most 6 person roles, 1 location role, 3 pet roles\n * and 3 product roles, with at most 30 images in all. A role with no images\n * is skipped (that subject or place stays as in the video). At least one role\n * with images, or a `prePrompt` or `postPrompt`, is required.\n */\n roles: CastSwapRole[]\n /**\n * Fixed references (at most 5): things the video should show that no role\n * replaces, each with the line that names it. Their images count toward the\n * 30. A reference alone is enough for a run (no role needs images).\n */\n references?: CastSwapReference[]\n /**\n * Your own words placed at the start of the prompt, before the role\n * instructions; at most 4,000 characters. Mention a role as `{role:N}`, as in\n * `postPrompt`; the same 400 refusals apply (an N outside 1..`roles.length`,\n * a raw `{image:` / `{video:` / `{audio:` token).\n */\n prePrompt?: string\n /**\n * Extra instructions in your own words, at most 4,000 characters. Mention a\n * role as `{role:N}`, where N is its 1-based position in `roles`\n * (`{role:1}` is `roles[0]`; empty roles count).\n *\n * The route answers 400, before charging, for an N outside 1..`roles.length`,\n * for a raw `{image:` / `{video:` / `{audio:` token in the pre or post prompt\n * or a role's `name`, for a clip outside 4–30 s, and for a preview past the clip's\n * end (`previewStart + 4` > its length).\n */\n postPrompt?: string\n /** `true` runs on 4 seconds of the clip, starting at `previewStart`: a cheap check of the roles and choices. */\n preview?: boolean\n /** Where the preview starts, in seconds. Default 0. */\n previewStart?: number\n /**\n * The video engine (see {@link CastSwapEngine}). Default `\"seedance-2-5\"`.\n * The job records it in `input_data.engine`, and a completed job's output\n * in its `engine`. A Cast Swap engine older than Kling 4 support ignores\n * the field and runs Seedance 2.5: a Kling 4 quote names `engine:\n * \"kling-4\"`, so check the estimate's `engine` before running.\n */\n engine?: CastSwapEngine\n /**\n * Kling 4 only (Seedance 2.5 ignores it): which end of the clip is cut to\n * whole seconds (see {@link CastSwapKlingLength}). Default `\"cut-end\"`.\n */\n klingLength?: CastSwapKlingLength\n /**\n * The output resolution. Seedance 2.5: `\"480p\"` (default), `\"720p\"` or\n * `\"1080p\"`. Kling 4: `\"720p\"` (default) or `\"1080p\"`; `\"480p\"` answers 400.\n */\n resolution?: \"480p\" | \"720p\" | \"1080p\"\n /**\n * Render as a draft (Seedance 2.5 only). Defaults to `true` at 480p and\n * `false` above it; `true` with `\"720p\"` or `\"1080p\"` answers 400 (draft is\n * 480p only). Kling 4 has no draft: `true` answers 400 `draft_unsupported`.\n */\n draft?: boolean\n /**\n * Turn each person, pet and product role's photos into one clean reference\n * picture before the video (extra credits, shown in `breakdown.references`;\n * about a minute longer; falls back to your own photos if it fails).\n * Default `true`.\n */\n prepareReferences?: boolean\n /** Mask the faces in the source clip (see {@link CastSwapFaceMasking}). Default: off. */\n faceMasking?: CastSwapFaceMasking\n /**\n * `\"draft\"` means 480p draft.\n * @deprecated use `resolution` + `draft`.\n */\n quality?: \"draft\"\n /** A generation session to file the result in. */\n sessionId?: string\n /** The client app that sent the run (stored on the job as `input_data.origin`). */\n origin?: string\n}\n\n/** What a run would cost, in credits. */\nexport interface CastSwapEstimate {\n /**\n * The engine the run would use. Sent by an engine that knows Kling 4 on a\n * Kling 4 quote (`\"kling-4\"`); absent = Seedance 2.5.\n */\n engine?: CastSwapEngine\n /**\n * What is held when the run starts: `breakdown.castSwap +\n * breakdown.seedance + breakdown.references` (on Kling 4,\n * `breakdown.kling` in place of `breakdown.seedance`), plus\n * `breakdown.masking` with face masking `\"always\"`. The run is charged what it actually costs, which\n * is expected to be `expectedCredits`.\n */\n totalCredits: number\n /**\n * The charge the run is expected to come to: `breakdown.castSwap +\n * breakdown.seedanceExpected + breakdown.references`, plus\n * `breakdown.masking` with face masking `\"always\"` (the hold, with the video\n * model's expected charge in place of its hold). Never above `totalCredits`.\n * With `\"auto\"` the masking is in neither total (see `maskingCredits`).\n * `totalCredits` is what is held when the run starts; the run is charged\n * what it actually costs.\n *\n * Absent from an older Cast Swap engine: read `totalCredits` then. On\n * Kling 4 it equals `totalCredits` (Kling renders exactly the length asked\n * for, so the hold is what it settles at).\n */\n expectedCredits?: number\n /**\n * The parts of the quote:\n * - `castSwap`: the run itself;\n * - `seedance`: what the video model it calls holds (the video's length is\n * left to the model, so it is held at the model's longest output);\n * - `seedanceExpected`: what the video model is expected to be charged (the\n * clip in and about as much out), never above `seedance`. It takes\n * `seedance`'s place in `expectedCredits`; it is not added to it. Absent\n * from an older Cast Swap engine, like `expectedCredits`;\n * - `kling`: Kling 4 only, in place of `seedance` and `seedanceExpected`:\n * what the Kling take costs (held and charged alike);\n * - `references`: preparing the reference pictures (0 when\n * `prepareReferences` is off or there is nothing to prepare);\n * - `masking`: masking the faces, present only when `faceMasking` is on.\n * With `\"always\"` it is in both totals; with `\"auto\"` it equals\n * `maskingCredits` and is in neither.\n *\n * So the parts sum to more than either total: `seedance` and\n * `seedanceExpected` are alternatives, and `\"auto\"` masking is outside both.\n */\n breakdown: { castSwap: number; seedance?: number; references: number; seedanceExpected?: number; kling?: number; masking?: number }\n /**\n * Face masking `\"auto\"` only: the extra credits charged if the source clip\n * is refused and the run is retried with the faces masked. Not in\n * `totalCredits` or `expectedCredits`; `run()` needs credits for both the\n * hold and this (else 402).\n */\n maskingCredits?: number\n /**\n * `true` when the video is made at Auto length (every Seedance 2.5 run): the\n * final charge is expected to come out lower than `totalCredits`, at about\n * `expectedCredits`. `false` on Kling 4.\n */\n settlesLower: boolean\n}\n\n/** Per-call options for {@link CastSwapResource.run}. */\nexport interface CastSwapRunOptions {\n /**\n * Sent as the `Idempotency-Key` header, unchanged (the SDK checks nothing;\n * an empty string sends no header, like no key).\n * The server takes 8–200 characters and answers 400 for any other length.\n * Reuse the same value when retrying the same run: within about 10 s the\n * repeat answers 200 `{ jobId, deduped: true }`, later 202 with the first\n * run's `jobId`. Nothing new is started or charged.\n */\n idempotencyKey?: string\n}\n\n/**\n * What a Full Quality version would be: `\"same-take\"` re-renders a Seedance\n * 2.5 draft's own take at 1080p; `\"new-take\"` makes a new Kling 4 take at\n * 1080p from a 720p run's inputs (it will not match the 720p run frame for\n * frame). The 720p run or draft stays either way.\n */\nexport type CastSwapFullQualityKind = \"same-take\" | \"new-take\"\n\n/**\n * What a Full Quality version of a run would cost\n * (`POST /v1/cast-swap/:jobId/full-quality/estimate`): a Seedance 2.5 draft,\n * or a completed Kling 4 run at 720p.\n */\nexport interface CastSwapFullQualityEstimate {\n /**\n * Which Full Quality this is ({@link CastSwapFullQualityKind}), so it can\n * be worded right. Absent from an older Cast Swap engine: `\"same-take\"`.\n */\n kind?: CastSwapFullQualityKind\n /** The quote in credits: `breakdown.castSwap` + `breakdown.seedanceHd` (same take) or `breakdown.kling` (new take). */\n totalCredits: number\n /**\n * `castSwap`: the Full Quality job's own steps; `seedanceHd` (a same take):\n * the 1080p render of the draft's take (0 when an earlier try of this draft\n * already finished that render, which is then reused); `kling` (a new take,\n * in place of `seedanceHd`): the new Kling 4 take at 1080p.\n */\n breakdown: { castSwap: number; seedanceHd?: number; kling?: number }\n /** ISO time until which the run can be finished at Full Quality (7 days after it completed). */\n availableUntil: string\n}\n\n/** Options for {@link CastSwapResource.fullQuality}. */\nexport interface CastSwapFullQualityParams {\n /** A generation session to file the Full Quality result in. */\n sessionId?: string\n}\n\n/** The Full Quality job (`POST /v1/cast-swap/:jobId/full-quality`). */\nexport interface CastSwapFullQualityResult {\n jobId: string\n /** `true` when this run's Full Quality was already running or done: that job is answered, nothing new is started or charged. */\n existing?: boolean\n}\n\n/**\n * The `code` of a Full Quality refusal (`NodaroError.code`), all before\n * anything is charged:\n * - `unauthorized` (401): no authenticated user;\n * - `not_found` (404): not your job, or not a Cast Swap run; also a\n * `sessionId` you may not use;\n * - `not_completed` (409): the run has not finished;\n * - `not_a_draft` (409): the run is neither a Seedance 2.5 draft nor a\n * Kling 4 run at 720p (a Kling 4 run at 1080p is already Full Quality);\n * - `draft_expired` (410): more than 7 days after the draft completed, or\n * the draft can no longer be finished at Full Quality;\n * - `full_quality_pending` (409, `details.retryable: true`): not final — an\n * earlier try's 1080p render of this draft is being reviewed, or has not\n * started yet; try again later (once the review ends). The only refusal\n * that ends on its own;\n * - `full_quality_unavailable` (409): final — nothing kept to re-render, no\n * readable completion time, or the 1080p finalize refuses this draft; on\n * the start only, also \"failed too many times\" (every try failed) or no\n * try can be started for this run;\n * - `insufficient_credits` (402), or in a workspace `budget_exceeded`,\n * `member_cap_exceeded` or `user_allowance_exceeded`;\n * - `job_blocked` (422): the request was blocked by the job policy;\n * - `job_read_failed` (503, retryable), `estimate_unavailable` (503, try\n * again shortly), `host_too_old` (503).\n *\n * Open-ended: a code not listed here may still arrive.\n */\nexport type CastSwapFullQualityRefusalCode =\n | \"unauthorized\"\n | \"not_found\"\n | \"not_completed\"\n | \"not_a_draft\"\n | \"draft_expired\"\n | \"full_quality_pending\"\n | \"full_quality_unavailable\"\n | \"insufficient_credits\"\n | \"budget_exceeded\"\n | \"member_cap_exceeded\"\n | \"user_allowance_exceeded\"\n | \"job_blocked\"\n | \"job_read_failed\"\n | \"estimate_unavailable\"\n | \"host_too_old\"\n | (string & {})\n\nexport class CastSwapResource {\n constructor(private client: NodaroClientCore) {}\n\n /**\n * Start a Cast Swap run (`POST /v1/cast-swap`, 202 `{ jobId }`). Returns the\n * job to follow. With `options.idempotencyKey` (sent as the\n * `Idempotency-Key` header; 8–200 characters, else 400) a repeat with the\n * same key within about 10 s answers 200 `{ jobId, deduped: true }`, a later\n * one 202 with the first run's `jobId`; nothing new starts.\n */\n run(params: CastSwapParams, options?: CastSwapRunOptions): Promise<{ jobId: string; deduped?: boolean }> {\n return this.client.request(\"POST\", \"/v1/cast-swap\", {\n body: params,\n ...(options?.idempotencyKey ? { headers: { \"Idempotency-Key\": options.idempotencyKey } } : {}),\n })\n }\n\n /** Quote a run before starting it (`POST /v1/cast-swap/estimate`); spends nothing. */\n estimate(params: CastSwapParams): Promise<CastSwapEstimate> {\n return this.client.request(\"POST\", \"/v1/cast-swap/estimate\", { body: params })\n }\n\n /**\n * Quote finishing a run at Full Quality (`POST\n * /v1/cast-swap/:jobId/full-quality/estimate`); spends nothing. `jobId` is a\n * finished Seedance 2.5 DRAFT run, or a finished Kling 4 run at 720p (a Cast\n * Swap or trend run); the quote's `kind` says whether it is the same take\n * re-rendered or a new take. The quote\n * does not look for a Full Quality already running: when one is,\n * {@link fullQuality} answers it (`existing: true`) and charges nothing.\n * Refusals: {@link CastSwapFullQualityRefusalCode}.\n */\n fullQualityEstimate(jobId: string): Promise<CastSwapFullQualityEstimate> {\n return this.client.request(\"POST\", `/v1/cast-swap/${encodeURIComponent(jobId)}/full-quality/estimate`, { body: {} })\n }\n\n /**\n * Finish a run at Full Quality (`POST /v1/cast-swap/:jobId/full-quality`):\n * at 1080p, with the clip's audio, as a new job linked to the run — a\n * Seedance 2.5 draft's own take re-rendered, or a new Kling 4 take from a\n * 720p run's inputs (the quote's `kind`). SPENDS CREDITS: quote it first with\n * {@link fullQualityEstimate}. Answers 202 `{ jobId }`, or 200\n * `{ jobId, existing: true }` when this run's Full Quality is already\n * running or done (one per run; a failed one may be asked again). Follow\n * the job with `client.jobs.get(jobId)`. No `Idempotency-Key` is taken: the\n * server keys the job by the draft. The new job keeps the draft's origin.\n * Refusals: {@link CastSwapFullQualityRefusalCode}.\n */\n fullQuality(jobId: string, params: CastSwapFullQualityParams = {}): Promise<CastSwapFullQualityResult> {\n const body = params.sessionId !== undefined ? { sessionId: params.sessionId } : {}\n return this.client.request(\"POST\", `/v1/cast-swap/${encodeURIComponent(jobId)}/full-quality`, { body })\n }\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/resources/jobs.ts"],"names":[],"mappings":";AAmQA,SAAS,UAAU,KAAA,EAAmE;AACpF,EAAA,IAAI,KAAA,KAAU,QAAW,OAAO,MAAA;AAChC,EAAA,OAAO,OAAO,KAAA,KAAU,QAAA,GAAW,KAAA,GAAQ,KAAA,CAAM,KAAK,GAAG,CAAA;AAC3D;AAgCO,IAAM,eAAN,MAAmB;AAAA,EACxB,YAAoB,MAAA,EAA0B;AAA1B,IAAA,IAAA,CAAA,MAAA,GAAA,MAAA;AAAA,EAA2B;AAAA,EAA3B,MAAA;AAAA;AAAA,EAGpB,IAAI,EAAA,EAAoC;AACtC,IAAA,OAAO,IAAA,CAAK,OAAO,OAAA,CAAQ,KAAA,EAAO,YAAY,kBAAA,CAAmB,EAAE,CAAC,CAAA,CAAE,CAAA;AAAA,EACxE;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAWA,IAAA,CAAK,MAAA,GAAyB,EAAC,EAA0B;AACvD,IAAA,MAAM,EAAE,MAAA,EAAQ,IAAA,EAAM,MAAA,EAAQ,GAAG,MAAK,GAAI,MAAA;AAC1C,IAAA,OAAO,IAAA,CAAK,MAAA,CAAO,OAAA,CAAsB,KAAA,EAAO,UAAA,EAAY;AAAA,MAC1D,KAAA,EAAO,EAAE,GAAG,IAAA,EAAM,QAAQ,SAAA,CAAU,MAAM,CAAA,EAAG,IAAA,EAAM,UAAU,IAAI,CAAA,EAAG,MAAA,EAAQ,SAAA,CAAU,MAAM,CAAA;AAAE,KAC/F,CAAA;AAAA,EACH;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAWA,WAAW,MAAA,EAAqD;AAC9D,IAAA,OAAO,IAAA,CAAK,OAAO,OAAA,CAAuB,MAAA,EAAQ,wBAAwB,EAAE,IAAA,EAAM,QAAQ,CAAA;AAAA,EAC5F;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQA,IAAA,CAAK,IAAY,MAAA,EAAkD;AACjE,IAAA,OAAO,IAAA,CAAK,OAAO,OAAA,CAAuB,KAAA,EAAO,YAAY,kBAAA,CAAmB,EAAE,CAAC,CAAA,OAAA,CAAA,EAAW;AAAA,MAC5F,IAAA,EAAM,EAAE,MAAA;AAAO,KAChB,CAAA;AAAA,EACH;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQA,UAAU,EAAA,EAAgD;AACxD,IAAA,OAAO,KAAK,MAAA,CAAO,OAAA;AAAA,MACjB,KAAA;AAAA,MACA,CAAA,SAAA,EAAY,kBAAA,CAAmB,EAAE,CAAC,CAAA,OAAA;AAAA,KACpC;AAAA,EACF;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAWA,OAAO,EAAA,EAAsC;AAC3C,IAAA,OAAO,KAAK,MAAA,CAAO,OAAA;AAAA,MACjB,MAAA;AAAA,MACA,CAAA,SAAA,EAAY,kBAAA,CAAmB,EAAE,CAAC,CAAA,OAAA;AAAA,KACpC;AAAA,EACF;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQA,OAAO,EAAA,EAAsC;AAC3C,IAAA,OAAO,KAAK,MAAA,CAAO,OAAA;AAAA,MACjB,QAAA;AAAA,MACA,CAAA,SAAA,EAAY,kBAAA,CAAmB,EAAE,CAAC,CAAA;AAAA,KACpC;AAAA,EACF;AACF","file":"chunk-6MQ2LTJZ.js","sourcesContent":["import type { NodaroClientCore } from \"../core.js\"\n\n/**\n * A job's lifecycle status. Hand-copied mirror of `JOB_STATUSES` in the\n * platform's `backend/src/lib/job-status.ts` — nothing links the two at build\n * time, so a new member has to be added here in the same change.\n *\n * `pending_review` is IN-FLIGHT, NOT TERMINAL: a job policy registered by the\n * deployment held the output for a human reviewer. Treat it like `processing`\n * in a `switch` — keep waiting, do not re-run — and it resolves to `completed`\n * (approved), `failed` (rejected, carrying an `error_hint` with\n * `kind: \"policy-block\"`) or `cancelled` (a held job is cancellable like any\n * in-flight job). `credit_status` reads `\"reserved\"` for the whole hold. Only\n * appears on deployments that register a job policy; `runAndWait` throws\n * {@link JobHeldError} on the first held tick rather than waiting it out.\n */\nexport type JobStatus =\n | \"pending\"\n | \"queued\"\n | \"processing\"\n | \"pending_review\"\n | \"completed\"\n | \"failed\"\n | \"cancelled\"\n\n/**\n * A PROVIDER's verdict: the model's own safety filter refused the output.\n * `class` distinguishes a deterministic block (copyright/likeness — retrying\n * the same request never helps) from `safety`, whose filter is known to be\n * non-deterministic for some models: `retried` says whether the worker\n * already spent its one extra attempt, and `suggestedProvider` — present\n * only when the catalog declares a fallback for the model that failed — is a\n * real model id the SAME prompt/references can be retried on.\n */\nexport type SafetyBlockHint = {\n kind: \"safety-block\"\n class: \"copyright\" | \"likeness\" | \"safety\"\n retried: boolean\n suggestedProvider?: string\n /**\n * Present when the provider refused the INPUT VIDEO itself — not the prompt,\n * a reference image or the output. Sending a different clip is the fix.\n */\n subject?: \"input_video\"\n}\n\n/**\n * A NODARO-side verdict, not a provider's: a job policy registered by the\n * deployment rejected the request (`hookPoint: \"request\"` — nothing ran, and\n * the call itself failed with {@link JobBlockedError}) or the finished output\n * (`hookPoint: \"result\"` — the result was blocked and never published).\n *\n * `reason` is USER-SAFE BY CONTRACT — the platform guarantees the policy's\n * machine text (scores, labels) never reaches it — so show it to the person\n * who made the request as-is. `policyId` identifies the deployment's policy,\n * not a Nodaro product feature. Only occurs on deployments that register a\n * job policy.\n */\nexport type PolicyBlockHint = {\n kind: \"policy-block\"\n policyId: string\n reason: string\n hookPoint: \"request\" | \"result\"\n}\n\n/**\n * The job ran out of credits partway: a step that reserves its own credits\n * (for example, the video a Cast Swap or trend run dispatches) was refused —\n * the balance could not cover it, or a plan or workspace cap was reached. The\n * job failed and its credits were refunded; ask the person to top up (or raise\n * the cap), then run it again.\n *\n * `code` is the refusal's own code, a lowercase snake_case token — for\n * example `insufficient_credits`, `free_video_limit`, `instance_cap_reached`,\n * `budget_exceeded`, `member_cap_exceeded` or `user_allowance_exceeded`. Treat\n * an unknown code like `insufficient_credits`.\n */\nexport type CreditsHint = {\n kind: \"credits\"\n code: string\n}\n\n/**\n * The provider refused the job's input video without naming a content-policy\n * class (its message is about the file, not a policy). Treat it like any\n * other failure — no fallback model is offered — except that the input to\n * change is known: send a different clip.\n */\nexport type InputRefusedHint = {\n kind: \"input-refused\"\n subject: \"input_video\"\n}\n\n/**\n * A job's `jobs.error_hint` (migration 376) — a user-safe, machine-readable\n * failure verdict, so a caller can act on it without parsing `error_message`\n * prose. One column, several verdict sources; `kind` is the discriminant.\n *\n * HAND-COPIED MIRROR of `ErrorHint` in the platform's\n * `backend/src/lib/safety-block.ts` (which names this file in its own\n * comment). Nothing links the two at build time: a new arm there has to be\n * pasted here verbatim in the same change, with a changeset.\n * `packages/client/dist/index.d.ts` is REBUILT, never hand-edited.\n */\nexport type JobErrorHint = SafetyBlockHint | PolicyBlockHint | CreditsHint | InputRefusedHint\n\n/**\n * The billing lifecycle of a job's credit reservation — `usage_logs.status`\n * for the job's `usage_log_id`. `null` when the job has no usage log (e.g. a\n * free run) or hasn't reserved credits yet.\n */\nexport type CreditStatus = \"reserved\" | \"committed\" | \"refunded\"\n\n/** A job owner's rating of their job — set with {@link JobsResource.rate}. */\nexport type JobRating = \"good\" | \"bad\"\n\n/**\n * The `rating` filter of {@link JobsResource.list}: one rating, any rating\n * (`\"rated\"`) or none (`\"unrated\"`).\n */\nexport type JobRatingFilter = JobRating | \"rated\" | \"unrated\"\n\n/**\n * Job record returned to non-admin SDK consumers. Field names are snake_case\n * to match the wire format (per the OpenAPI fix in Phase 1).\n *\n * Sensitive fields stripped server-side for non-admin callers:\n * `provider`, `provider_cost`, `display_cost`, `credits_actual`. USD\n * pricing is admin-only across api/sdk/mcp — non-admin consumers see\n * only the `credits` abstraction. Server-only nested job data (including\n * Recast's private remux base) is stripped for every caller, including admins.\n */\nexport interface Job {\n id: string\n status: JobStatus\n progress: number\n user_id: string\n input_data: unknown\n output_data: unknown\n error_message: string | null\n /** Present on a failed job the worker classified as a provider\n * content-policy block (`kind: \"safety-block\"`) or that a deployment's job\n * policy rejected (`kind: \"policy-block\"`); absent/null otherwise.\n * User-safe by construction — narrow on `kind` before reading the rest. */\n error_hint?: JobErrorHint | null\n /** PR9: the job's credit reservation lifecycle, derived server-side from\n * `usage_logs.status`. `null` when there is no usage log to report. Never\n * changes the meaning of `credits` (the reserved amount) below. */\n credit_status?: CreditStatus | null\n /** The credits HELD when the job was accepted. Never changes — a job can\n * settle below it; read {@link Job.credits_charged} for what it cost. */\n credits: number | null\n /**\n * What the job actually cost once its hold settled. Can be lower than\n * `credits` (the unused part goes back to the balance), `0` when the hold was\n * refunded, `null` while the job is still running or when it reserved\n * nothing of its own. Sum this — not `credits` — to total spend. Returned by\n * `get()` and `list()`.\n */\n credits_charged?: number | null\n job_type: string | null\n created_at: string\n started_at: string | null\n completed_at: string | null\n /**\n * Provenance: which kind of caller created the job — one of\n * `\"internal\" | \"mcp\" | \"app\" | \"cli\" | \"sdk\" | \"extension\" | \"web\" | \"api\"`.\n * `source_detail` narrows it (origin host, `extension/<name>` label,\n * `sdk/<version>`, MCP client name, developer-app id). Descriptive only;\n * lets a library view label or filter media by origin.\n */\n source?: string | null\n source_detail?: string | null\n /** The generation session this job was born in (the `sessionId` sent with\n * the generation request), or null. See `client.sessions`. */\n session_id?: string | null\n /**\n * Whether the job's owner favorited it (`client.gallery.toggleFavorite`).\n * Returned by `get()` and `list()`. Absent from an older server, and when\n * the server could not read it for a moment — treat absent as unknown,\n * never as `false`.\n */\n favorited?: boolean\n /**\n * The owner's rating of the job ({@link JobsResource.rate}), or `null` when\n * unrated. Returned by `get()` and `list()`; absent like `favorited`.\n */\n rating?: JobRating | null\n}\n\nexport interface CancelJobResult {\n success: true\n cancelled: number\n /**\n * `true` when the job could not be stopped because its provider call is\n * already running — a metered LLM job's call, an external provider task. It\n * finishes and is charged only what it used.\n */\n inFlight?: boolean\n}\n\n/**\n * The kind of caller that created a job (`Job.source`). Hand-copied mirror of\n * `JOB_SOURCES` in the platform's `backend/src/lib/job-source.ts`.\n */\nexport type JobSource = \"internal\" | \"mcp\" | \"app\" | \"cli\" | \"sdk\" | \"extension\" | \"web\" | \"api\"\n\nexport interface DeleteJobResult {\n success: true\n}\n\nexport interface ListJobsParams {\n /** One status or several (a job matching any of them). An unknown status is a 400. */\n status?: JobStatus | readonly JobStatus[]\n /** Exact match on `input_data.type` — the route that created the job\n * (`\"llm-structured\"`, `\"video-analysis\"`, …). One value or several (up to 20). */\n type?: string | readonly string[]\n /** Exact match on `input_data.origin` — the client app that sent it. */\n origin?: string\n /** The surface that created the job (`Job.source`): `\"mcp\"` lists what your\n * MCP clients (Claude, ChatGPT, …) made. One value or several. */\n source?: JobSource | readonly JobSource[]\n /** `true`: only jobs you favorited; `false`: only jobs you did not. */\n favorited?: boolean\n /** Your rating: `\"good\"`, `\"bad\"`, any (`\"rated\"`) or none (`\"unrated\"`). */\n rating?: JobRatingFilter\n /** The jobs of one generate-image batch (`count` / `models`) — its `batchId`. */\n batchId?: string\n /** Page size, 1–100 (server default 50). */\n limit?: number\n /** The previous page's `next`. */\n cursor?: string\n}\n\n/** What {@link JobsResource.rate} answers: the job's rating now. */\nexport interface RateJobResult {\n data: { jobId: string; rating: JobRating | null }\n}\n\n/**\n * {@link JobsResource.fromUpload}'s body: an image edited in the browser,\n * already stored with `client.uploads.upload`, and what it was made from.\n */\nexport interface JobFromUploadParams {\n /** The edited image's `assetId`, as `client.uploads.upload` returned it. */\n assetId: string\n /** The job whose image was edited. */\n sourceJobId?: string\n /** Which of `sourceJobId`'s images was edited, when it made several. Default: its `imageUrl`. */\n sourceImageUrl?: string\n /** The upload that was edited, when the source is not a job. Not with `sourceJobId`. */\n sourceAssetId?: string\n /** The editor's design state, stored with `client.uploads.uploadJson`, so the edit can be reopened. */\n editStateUrl?: string\n /** The generation session to file the job in. */\n sessionId?: string\n}\n\n/** A list filter value as the query string carries it: several are comma-separated. */\nfunction listParam(value: string | readonly string[] | undefined): string | undefined {\n if (value === undefined) return undefined\n return typeof value === \"string\" ? value : value.join(\",\")\n}\n\nexport interface ListJobsPage {\n /**\n * A page may hold fewer than `limit` rows — even none — and still carry a\n * `next`. Page on `next`, never on `data.length`.\n */\n data: Job[]\n /** Pass back as `cursor` for the next page; `null` on the last one. */\n next: string | null\n}\n\n/**\n * Lean job status returned by `GET /v1/jobs/:id/status`. Skips the\n * `input_data` JSONB and cost columns. Its `output_data` still goes\n * through the server-only nested-field redaction. Intended for poll loops that\n * only need progress/output/error, and when the job finished.\n */\nexport interface JobStatusResult {\n id: string\n status: JobStatus\n progress?: number\n output_data?: unknown\n error_message?: string | null\n /** PR9: see {@link Job.error_hint}. */\n error_hint?: JobErrorHint | null\n /** PR9: see {@link Job.credit_status}. */\n credit_status?: CreditStatus | null\n /** When the job finished, on the server's clock; null until it has. */\n completed_at?: string | null\n}\n\nexport class JobsResource {\n constructor(private client: NodaroClientCore) {}\n\n /** Get a single job by ID. */\n get(id: string): Promise<{ data: Job }> {\n return this.client.request(\"GET\", `/v1/jobs/${encodeURIComponent(id)}`)\n }\n\n /**\n * Your jobs, newest first (`GET /v1/jobs`), cursor-paginated. `type` and\n * `origin` filter on the job's own `input_data`, which every job carries —\n * a client app lists its runs with `{ type: \"llm-structured\", origin: \"studio\" }`.\n * `status` and `type` take one value or a list; `favorited` and `rating`\n * filter on your own marks, `source` on the surface that created the job.\n * Every filter combines with AND, and each job\n * carries `favorited` and `rating`.\n */\n list(params: ListJobsParams = {}): Promise<ListJobsPage> {\n const { status, type, source, ...rest } = params\n return this.client.request<ListJobsPage>(\"GET\", \"/v1/jobs\", {\n query: { ...rest, status: listParam(status), type: listParam(type), source: listParam(source) },\n })\n }\n\n /**\n * Record an image edited in the browser as a job (`POST /v1/jobs/from-upload`):\n * a completed, private, free `image-edit` job whose `output_data.imageUrl` is\n * the upload, linked to its source in `input_data` (`sourceJobId` /\n * `sourceAssetId`, `sourceImageUrl`). It then lists, rates, favorites and\n * files into a session like any image job. One upload is one job: the same\n * `assetId` again returns the same job. OAuth apps need the `assets:write`\n * scope. A deployment's job policy can refuse the image ({@link JobBlockedError}).\n */\n fromUpload(params: JobFromUploadParams): Promise<{ data: Job }> {\n return this.client.request<{ data: Job }>(\"POST\", \"/v1/jobs/from-upload\", { body: params })\n }\n\n /**\n * Rate one of your jobs `\"good\"` or `\"bad\"`, or clear the rating with\n * `null` (`PUT /v1/jobs/:id/rating`). Only the job's owner rates it — anyone\n * else's job is a `NotFoundError`. The rating reads back as `Job.rating`\n * and filters {@link list}. OAuth apps need the `assets:write` scope.\n */\n rate(id: string, rating: JobRating | null): Promise<RateJobResult> {\n return this.client.request<RateJobResult>(\"PUT\", `/v1/jobs/${encodeURIComponent(id)}/rating`, {\n body: { rating },\n })\n }\n\n /**\n * Get the lean status of a single job (poll-loop friendly).\n * Hits `GET /v1/jobs/:id/status` — returns only id/status/progress/\n * output_data/error_message, with far less wire/CPU cost than `get()`.\n * Same auth + ownership semantics as {@link get}.\n */\n getStatus(id: string): Promise<{ data: JobStatusResult }> {\n return this.client.request(\n \"GET\",\n `/v1/jobs/${encodeURIComponent(id)}/status`,\n )\n }\n\n /**\n * Cancel a job. Server route is `POST /v1/jobs/:jobId/cancel`.\n * Refunds any reserved credit holds. A running LLM job priced per model\n * (metered) whose call has already started answers\n * `{ success: true, cancelled: 0, inFlight: true }`: it finishes and is\n * charged only what it used. A job stopped before its call starts is\n * refunded, except for what an earlier attempt of the same job already used\n * (a retry after a billed attempt): that is charged.\n */\n cancel(id: string): Promise<CancelJobResult> {\n return this.client.request(\n \"POST\",\n `/v1/jobs/${encodeURIComponent(id)}/cancel`,\n )\n }\n\n /**\n * Delete a job and the private media it produced. Server route is\n * `DELETE /v1/jobs/:jobId`. Only the job's owner (or an admin) may delete it;\n * a job that is still running is deleted as-is — cancel it first when its\n * worker should stop ({@link cancel}).\n */\n delete(id: string): Promise<DeleteJobResult> {\n return this.client.request(\n \"DELETE\",\n `/v1/jobs/${encodeURIComponent(id)}`,\n )\n }\n}\n"]}