@nodaro/sdk 2.66.0 → 2.66.1

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 (97) hide show
  1. package/dist/{chunk-PHBOLYRT.cjs → chunk-3G65RIZS.cjs} +4 -4
  2. package/dist/{chunk-PHBOLYRT.cjs.map → chunk-3G65RIZS.cjs.map} +1 -1
  3. package/dist/{chunk-QHCVKMSF.cjs → chunk-4AD3CBDK.cjs} +13 -11
  4. package/dist/chunk-4AD3CBDK.cjs.map +1 -0
  5. package/dist/{chunk-UBZ2XVHM.cjs → chunk-4AZB4MN7.cjs} +5 -5
  6. package/dist/{chunk-UBZ2XVHM.cjs.map → chunk-4AZB4MN7.cjs.map} +1 -1
  7. package/dist/{chunk-MYUJEVP6.js → chunk-4IXVKTA4.js} +5 -5
  8. package/dist/{chunk-MYUJEVP6.js.map → chunk-4IXVKTA4.js.map} +1 -1
  9. package/dist/{chunk-JOXZ4ZIF.cjs → chunk-7BMKQ36V.cjs} +2 -2
  10. package/dist/{chunk-JOXZ4ZIF.cjs.map → chunk-7BMKQ36V.cjs.map} +1 -1
  11. package/dist/{chunk-GQU5FXYB.js → chunk-AKKCS7MF.js} +4 -4
  12. package/dist/{chunk-GQU5FXYB.js.map → chunk-AKKCS7MF.js.map} +1 -1
  13. package/dist/{chunk-KAYCRIMA.cjs → chunk-BETFYVOR.cjs} +5 -5
  14. package/dist/{chunk-KAYCRIMA.cjs.map → chunk-BETFYVOR.cjs.map} +1 -1
  15. package/dist/{chunk-EBQXAOHW.js → chunk-CCXY4ZJM.js} +3 -3
  16. package/dist/{chunk-EBQXAOHW.js.map → chunk-CCXY4ZJM.js.map} +1 -1
  17. package/dist/{chunk-E37CVHWW.js → chunk-CNST37UF.js} +2 -2
  18. package/dist/chunk-CNST37UF.js.map +1 -0
  19. package/dist/{chunk-LTRJNCXB.js → chunk-CYEIT3FA.js} +10 -10
  20. package/dist/{chunk-LTRJNCXB.js.map → chunk-CYEIT3FA.js.map} +1 -1
  21. package/dist/{chunk-DQQRFBWY.cjs → chunk-EJJIA765.cjs} +5 -5
  22. package/dist/{chunk-DQQRFBWY.cjs.map → chunk-EJJIA765.cjs.map} +1 -1
  23. package/dist/{chunk-CSIPRLX3.js → chunk-FFT2YPB4.js} +3 -3
  24. package/dist/{chunk-CSIPRLX3.js.map → chunk-FFT2YPB4.js.map} +1 -1
  25. package/dist/{chunk-SNPDM72K.js → chunk-IJAJTVEW.js} +13 -11
  26. package/dist/chunk-IJAJTVEW.js.map +1 -0
  27. package/dist/{chunk-SS3B6PHT.cjs → chunk-ITQB5ADE.cjs} +2 -2
  28. package/dist/chunk-ITQB5ADE.cjs.map +1 -0
  29. package/dist/{chunk-MOGPM5RM.cjs → chunk-OET5W4QZ.cjs} +18 -18
  30. package/dist/{chunk-MOGPM5RM.cjs.map → chunk-OET5W4QZ.cjs.map} +1 -1
  31. package/dist/{chunk-7LODCIQK.js → chunk-OJHJBNJZ.js} +2 -2
  32. package/dist/{chunk-7LODCIQK.js.map → chunk-OJHJBNJZ.js.map} +1 -1
  33. package/dist/{chunk-KEZMNVN3.js → chunk-RBUISD4V.js} +3 -3
  34. package/dist/{chunk-KEZMNVN3.js.map → chunk-RBUISD4V.js.map} +1 -1
  35. package/dist/{chunk-JC66EEFI.js → chunk-SZ67PDKE.js} +3 -3
  36. package/dist/{chunk-JC66EEFI.js.map → chunk-SZ67PDKE.js.map} +1 -1
  37. package/dist/{chunk-O6LQV6BD.cjs → chunk-TQLOD7OL.cjs} +4 -4
  38. package/dist/{chunk-O6LQV6BD.cjs.map → chunk-TQLOD7OL.cjs.map} +1 -1
  39. package/dist/{chunk-WSMZ3AAU.cjs → chunk-W4KKCHJA.cjs} +11 -11
  40. package/dist/{chunk-WSMZ3AAU.cjs.map → chunk-W4KKCHJA.cjs.map} +1 -1
  41. package/dist/{chunk-EWVQFW5L.cjs → chunk-XRYSHC2O.cjs} +22 -22
  42. package/dist/{chunk-EWVQFW5L.cjs.map → chunk-XRYSHC2O.cjs.map} +1 -1
  43. package/dist/{chunk-Q6HMDIC4.js → chunk-YE6X5BQ2.js} +3 -3
  44. package/dist/{chunk-Q6HMDIC4.js.map → chunk-YE6X5BQ2.js.map} +1 -1
  45. package/dist/entries/apps.cjs +2 -2
  46. package/dist/entries/apps.d.cts +2 -1
  47. package/dist/entries/apps.d.ts +2 -1
  48. package/dist/entries/apps.js +1 -1
  49. package/dist/entries/characters.d.cts +1 -1
  50. package/dist/entries/characters.d.ts +1 -1
  51. package/dist/entries/client.cjs +16 -16
  52. package/dist/entries/client.d.cts +1 -1
  53. package/dist/entries/client.d.ts +1 -1
  54. package/dist/entries/client.js +11 -11
  55. package/dist/entries/copilot.cjs +4 -4
  56. package/dist/entries/copilot.js +3 -3
  57. package/dist/entries/core.cjs +6 -6
  58. package/dist/entries/core.js +2 -2
  59. package/dist/entries/creatures.d.cts +1 -1
  60. package/dist/entries/creatures.d.ts +1 -1
  61. package/dist/entries/edit.cjs +7 -7
  62. package/dist/entries/edit.d.cts +2 -2
  63. package/dist/entries/edit.d.ts +2 -2
  64. package/dist/entries/edit.js +2 -2
  65. package/dist/entries/errors.cjs +28 -28
  66. package/dist/entries/errors.d.cts +5 -3
  67. package/dist/entries/errors.d.ts +5 -3
  68. package/dist/entries/errors.js +1 -1
  69. package/dist/entries/llm.cjs +2 -2
  70. package/dist/entries/llm.d.cts +1 -1
  71. package/dist/entries/llm.d.ts +1 -1
  72. package/dist/entries/llm.js +1 -1
  73. package/dist/entries/locations.d.cts +1 -1
  74. package/dist/entries/locations.d.ts +1 -1
  75. package/dist/entries/media.cjs +4 -4
  76. package/dist/entries/media.js +3 -3
  77. package/dist/entries/nodes.cjs +3 -3
  78. package/dist/entries/nodes.d.cts +1 -1
  79. package/dist/entries/nodes.d.ts +1 -1
  80. package/dist/entries/nodes.js +2 -2
  81. package/dist/entries/objects.d.cts +1 -1
  82. package/dist/entries/objects.d.ts +1 -1
  83. package/dist/entries/scene3d.d.cts +2 -2
  84. package/dist/entries/scene3d.d.ts +2 -2
  85. package/dist/entries/studio.cjs +5 -5
  86. package/dist/entries/studio.js +2 -2
  87. package/dist/index.cjs +57 -57
  88. package/dist/index.d.cts +1 -1
  89. package/dist/index.d.ts +1 -1
  90. package/dist/index.js +11 -11
  91. package/dist/{nodes-C9O2tdGH.d.ts → nodes-CBWTkR37.d.ts} +1 -1
  92. package/dist/{nodes-WkaQjuwS.d.cts → nodes-YwzFHsJH.d.cts} +1 -1
  93. package/package.json +3 -3
  94. package/dist/chunk-E37CVHWW.js.map +0 -1
  95. package/dist/chunk-QHCVKMSF.cjs.map +0 -1
  96. package/dist/chunk-SNPDM72K.js.map +0 -1
  97. package/dist/chunk-SS3B6PHT.cjs.map +0 -1
package/dist/index.cjs CHANGED
@@ -57,7 +57,7 @@ require('./chunk-IS26FJO7.cjs');
57
57
  require('./chunk-RQSGS7ZK.cjs');
58
58
  require('./chunk-43NO4SGC.cjs');
59
59
  require('./chunk-JOX5BJ6K.cjs');
60
- var chunkMOGPM5RM_cjs = require('./chunk-MOGPM5RM.cjs');
60
+ var chunkOET5W4QZ_cjs = require('./chunk-OET5W4QZ.cjs');
61
61
  var chunk3B47IHB3_cjs = require('./chunk-3B47IHB3.cjs');
62
62
  var chunkWUM6CWTE_cjs = require('./chunk-WUM6CWTE.cjs');
63
63
  var chunkLKH5M44B_cjs = require('./chunk-LKH5M44B.cjs');
@@ -74,7 +74,7 @@ var chunkSYVNY3AH_cjs = require('./chunk-SYVNY3AH.cjs');
74
74
  var chunkYDRXBRW2_cjs = require('./chunk-YDRXBRW2.cjs');
75
75
  var chunkWMT7HEBZ_cjs = require('./chunk-WMT7HEBZ.cjs');
76
76
  var chunkMBFUMWI5_cjs = require('./chunk-MBFUMWI5.cjs');
77
- var chunkKAYCRIMA_cjs = require('./chunk-KAYCRIMA.cjs');
77
+ var chunkBETFYVOR_cjs = require('./chunk-BETFYVOR.cjs');
78
78
  var chunkHFDTOEAL_cjs = require('./chunk-HFDTOEAL.cjs');
79
79
  var chunkUIBYZNDR_cjs = require('./chunk-UIBYZNDR.cjs');
80
80
  var chunk57GANTLV_cjs = require('./chunk-57GANTLV.cjs');
@@ -85,16 +85,16 @@ var chunkG4AFHCNA_cjs = require('./chunk-G4AFHCNA.cjs');
85
85
  var chunkLAWYFC4G_cjs = require('./chunk-LAWYFC4G.cjs');
86
86
  var chunkTCLNSVYA_cjs = require('./chunk-TCLNSVYA.cjs');
87
87
  var chunkKXEWTYS4_cjs = require('./chunk-KXEWTYS4.cjs');
88
- var chunkSS3B6PHT_cjs = require('./chunk-SS3B6PHT.cjs');
88
+ var chunkITQB5ADE_cjs = require('./chunk-ITQB5ADE.cjs');
89
89
  var chunkMIXRL6I2_cjs = require('./chunk-MIXRL6I2.cjs');
90
- var chunkPHBOLYRT_cjs = require('./chunk-PHBOLYRT.cjs');
90
+ var chunk3G65RIZS_cjs = require('./chunk-3G65RIZS.cjs');
91
91
  var chunkRPV4QBHS_cjs = require('./chunk-RPV4QBHS.cjs');
92
92
  var chunkZCWKX4V6_cjs = require('./chunk-ZCWKX4V6.cjs');
93
93
  var chunkQ45PC4YD_cjs = require('./chunk-Q45PC4YD.cjs');
94
- var chunkEWVQFW5L_cjs = require('./chunk-EWVQFW5L.cjs');
94
+ var chunkXRYSHC2O_cjs = require('./chunk-XRYSHC2O.cjs');
95
95
  var chunkGVIFLUYZ_cjs = require('./chunk-GVIFLUYZ.cjs');
96
96
  var chunkA3S55XGF_cjs = require('./chunk-A3S55XGF.cjs');
97
- var chunkWSMZ3AAU_cjs = require('./chunk-WSMZ3AAU.cjs');
97
+ var chunkW4KKCHJA_cjs = require('./chunk-W4KKCHJA.cjs');
98
98
  var chunkVUTNNRDW_cjs = require('./chunk-VUTNNRDW.cjs');
99
99
  var chunkW63ZKKYT_cjs = require('./chunk-W63ZKKYT.cjs');
100
100
  var chunkLCQIQFWD_cjs = require('./chunk-LCQIQFWD.cjs');
@@ -104,13 +104,13 @@ var chunkWK4VXPPZ_cjs = require('./chunk-WK4VXPPZ.cjs');
104
104
  var chunk43FVH6LJ_cjs = require('./chunk-43FVH6LJ.cjs');
105
105
  var chunkYFS2LMG4_cjs = require('./chunk-YFS2LMG4.cjs');
106
106
  var chunk4DCXJ77J_cjs = require('./chunk-4DCXJ77J.cjs');
107
- var chunkO6LQV6BD_cjs = require('./chunk-O6LQV6BD.cjs');
108
- require('./chunk-DQQRFBWY.cjs');
109
- var chunkUBZ2XVHM_cjs = require('./chunk-UBZ2XVHM.cjs');
110
- var chunkQHCVKMSF_cjs = require('./chunk-QHCVKMSF.cjs');
107
+ var chunkTQLOD7OL_cjs = require('./chunk-TQLOD7OL.cjs');
108
+ require('./chunk-EJJIA765.cjs');
109
+ var chunk4AZB4MN7_cjs = require('./chunk-4AZB4MN7.cjs');
110
+ var chunk4AD3CBDK_cjs = require('./chunk-4AD3CBDK.cjs');
111
111
  var chunkA3XA6UNM_cjs = require('./chunk-A3XA6UNM.cjs');
112
112
  var chunk7FLTDTHR_cjs = require('./chunk-7FLTDTHR.cjs');
113
- var chunkJOXZ4ZIF_cjs = require('./chunk-JOXZ4ZIF.cjs');
113
+ var chunk7BMKQ36V_cjs = require('./chunk-7BMKQ36V.cjs');
114
114
  var chunkPGT4BXR2_cjs = require('./chunk-PGT4BXR2.cjs');
115
115
  var chunkXSYNVD3X_cjs = require('./chunk-XSYNVD3X.cjs');
116
116
  var chunkS5BOU6JG_cjs = require('./chunk-S5BOU6JG.cjs');
@@ -153,11 +153,11 @@ Object.defineProperty(exports, "unwrapEditPlanOutput", {
153
153
  });
154
154
  Object.defineProperty(exports, "NodaroClient", {
155
155
  enumerable: true,
156
- get: function () { return chunkMOGPM5RM_cjs.NodaroClient; }
156
+ get: function () { return chunkOET5W4QZ_cjs.NodaroClient; }
157
157
  });
158
158
  Object.defineProperty(exports, "createClient", {
159
159
  enumerable: true,
160
- get: function () { return chunkMOGPM5RM_cjs.createClient; }
160
+ get: function () { return chunkOET5W4QZ_cjs.createClient; }
161
161
  });
162
162
  Object.defineProperty(exports, "WebhooksResource", {
163
163
  enumerable: true,
@@ -229,15 +229,15 @@ Object.defineProperty(exports, "ShotsResource", {
229
229
  });
230
230
  Object.defineProperty(exports, "StudioProductionsResource", {
231
231
  enumerable: true,
232
- get: function () { return chunkKAYCRIMA_cjs.StudioProductionsResource; }
232
+ get: function () { return chunkBETFYVOR_cjs.StudioProductionsResource; }
233
233
  });
234
234
  Object.defineProperty(exports, "StudioResource", {
235
235
  enumerable: true,
236
- get: function () { return chunkKAYCRIMA_cjs.StudioResource; }
236
+ get: function () { return chunkBETFYVOR_cjs.StudioResource; }
237
237
  });
238
238
  Object.defineProperty(exports, "isStudioGenerateEstimate", {
239
239
  enumerable: true,
240
- get: function () { return chunkKAYCRIMA_cjs.isStudioGenerateEstimate; }
240
+ get: function () { return chunkBETFYVOR_cjs.isStudioGenerateEstimate; }
241
241
  });
242
242
  Object.defineProperty(exports, "SurfaceResource", {
243
243
  enumerable: true,
@@ -305,7 +305,7 @@ Object.defineProperty(exports, "RecastResource", {
305
305
  });
306
306
  Object.defineProperty(exports, "LlmResource", {
307
307
  enumerable: true,
308
- get: function () { return chunkSS3B6PHT_cjs.LlmResource; }
308
+ get: function () { return chunkITQB5ADE_cjs.LlmResource; }
309
309
  });
310
310
  Object.defineProperty(exports, "LOCATION_ASSET_TYPES", {
311
311
  enumerable: true,
@@ -325,7 +325,7 @@ Object.defineProperty(exports, "SURROUND_DIRECTIONS", {
325
325
  });
326
326
  Object.defineProperty(exports, "MediaResource", {
327
327
  enumerable: true,
328
- get: function () { return chunkPHBOLYRT_cjs.MediaResource; }
328
+ get: function () { return chunk3G65RIZS_cjs.MediaResource; }
329
329
  });
330
330
  Object.defineProperty(exports, "ModelsResource", {
331
331
  enumerable: true,
@@ -349,7 +349,7 @@ Object.defineProperty(exports, "PresetsResource", {
349
349
  });
350
350
  Object.defineProperty(exports, "NodesResource", {
351
351
  enumerable: true,
352
- get: function () { return chunkEWVQFW5L_cjs.NodesResource; }
352
+ get: function () { return chunkXRYSHC2O_cjs.NodesResource; }
353
353
  });
354
354
  Object.defineProperty(exports, "OAuthResource", {
355
355
  enumerable: true,
@@ -361,23 +361,23 @@ Object.defineProperty(exports, "DeveloperAppsResource", {
361
361
  });
362
362
  Object.defineProperty(exports, "CLIP_PACK_MAX_TARGET_SEC", {
363
363
  enumerable: true,
364
- get: function () { return chunkWSMZ3AAU_cjs.CLIP_PACK_MAX_TARGET_SEC; }
364
+ get: function () { return chunkW4KKCHJA_cjs.CLIP_PACK_MAX_TARGET_SEC; }
365
365
  });
366
366
  Object.defineProperty(exports, "CLIP_PACK_MIN_TARGET_SEC", {
367
367
  enumerable: true,
368
- get: function () { return chunkWSMZ3AAU_cjs.CLIP_PACK_MIN_TARGET_SEC; }
368
+ get: function () { return chunkW4KKCHJA_cjs.CLIP_PACK_MIN_TARGET_SEC; }
369
369
  });
370
370
  Object.defineProperty(exports, "EditResource", {
371
371
  enumerable: true,
372
- get: function () { return chunkWSMZ3AAU_cjs.EditResource; }
372
+ get: function () { return chunkW4KKCHJA_cjs.EditResource; }
373
373
  });
374
374
  Object.defineProperty(exports, "TRAILER_FORMATS", {
375
375
  enumerable: true,
376
- get: function () { return chunkWSMZ3AAU_cjs.TRAILER_FORMATS; }
376
+ get: function () { return chunkW4KKCHJA_cjs.TRAILER_FORMATS; }
377
377
  });
378
378
  Object.defineProperty(exports, "USE_CASE_NODE_TYPES", {
379
379
  enumerable: true,
380
- get: function () { return chunkWSMZ3AAU_cjs.USE_CASE_NODE_TYPES; }
380
+ get: function () { return chunkW4KKCHJA_cjs.USE_CASE_NODE_TYPES; }
381
381
  });
382
382
  Object.defineProperty(exports, "ExecutionsResource", {
383
383
  enumerable: true,
@@ -429,131 +429,131 @@ Object.defineProperty(exports, "ContentRightsResource", {
429
429
  });
430
430
  Object.defineProperty(exports, "CopilotResource", {
431
431
  enumerable: true,
432
- get: function () { return chunkO6LQV6BD_cjs.CopilotResource; }
432
+ get: function () { return chunkTQLOD7OL_cjs.CopilotResource; }
433
433
  });
434
434
  Object.defineProperty(exports, "CallbackAuth", {
435
435
  enumerable: true,
436
- get: function () { return chunkUBZ2XVHM_cjs.CallbackAuth; }
436
+ get: function () { return chunk4AZB4MN7_cjs.CallbackAuth; }
437
437
  });
438
438
  Object.defineProperty(exports, "NodaroClientCore", {
439
439
  enumerable: true,
440
- get: function () { return chunkUBZ2XVHM_cjs.NodaroClientCore; }
440
+ get: function () { return chunk4AZB4MN7_cjs.NodaroClientCore; }
441
441
  });
442
442
  Object.defineProperty(exports, "StaticTokenAuth", {
443
443
  enumerable: true,
444
- get: function () { return chunkUBZ2XVHM_cjs.StaticTokenAuth; }
444
+ get: function () { return chunk4AZB4MN7_cjs.StaticTokenAuth; }
445
445
  });
446
446
  Object.defineProperty(exports, "supabaseAuth", {
447
447
  enumerable: true,
448
- get: function () { return chunkUBZ2XVHM_cjs.supabaseAuth; }
448
+ get: function () { return chunk4AZB4MN7_cjs.supabaseAuth; }
449
449
  });
450
450
  Object.defineProperty(exports, "AlreadyRunningError", {
451
451
  enumerable: true,
452
- get: function () { return chunkQHCVKMSF_cjs.AlreadyRunningError; }
452
+ get: function () { return chunk4AD3CBDK_cjs.AlreadyRunningError; }
453
453
  });
454
454
  Object.defineProperty(exports, "AppRunVersionChangedError", {
455
455
  enumerable: true,
456
- get: function () { return chunkQHCVKMSF_cjs.AppRunVersionChangedError; }
456
+ get: function () { return chunk4AD3CBDK_cjs.AppRunVersionChangedError; }
457
457
  });
458
458
  Object.defineProperty(exports, "CREDIT_CAP_CODES", {
459
459
  enumerable: true,
460
- get: function () { return chunkQHCVKMSF_cjs.CREDIT_CAP_CODES; }
460
+ get: function () { return chunk4AD3CBDK_cjs.CREDIT_CAP_CODES; }
461
461
  });
462
462
  Object.defineProperty(exports, "ContinuationPreviewPendingError", {
463
463
  enumerable: true,
464
- get: function () { return chunkQHCVKMSF_cjs.ContinuationPreviewPendingError; }
464
+ get: function () { return chunk4AD3CBDK_cjs.ContinuationPreviewPendingError; }
465
465
  });
466
466
  Object.defineProperty(exports, "ContinuationRefusedError", {
467
467
  enumerable: true,
468
- get: function () { return chunkQHCVKMSF_cjs.ContinuationRefusedError; }
468
+ get: function () { return chunk4AD3CBDK_cjs.ContinuationRefusedError; }
469
469
  });
470
470
  Object.defineProperty(exports, "CreditCapExceededError", {
471
471
  enumerable: true,
472
- get: function () { return chunkQHCVKMSF_cjs.CreditCapExceededError; }
472
+ get: function () { return chunk4AD3CBDK_cjs.CreditCapExceededError; }
473
473
  });
474
474
  Object.defineProperty(exports, "ForbiddenError", {
475
475
  enumerable: true,
476
- get: function () { return chunkQHCVKMSF_cjs.ForbiddenError; }
476
+ get: function () { return chunk4AD3CBDK_cjs.ForbiddenError; }
477
477
  });
478
478
  Object.defineProperty(exports, "IMPORT_REFUSAL_CODES", {
479
479
  enumerable: true,
480
- get: function () { return chunkQHCVKMSF_cjs.IMPORT_REFUSAL_CODES; }
480
+ get: function () { return chunk4AD3CBDK_cjs.IMPORT_REFUSAL_CODES; }
481
481
  });
482
482
  Object.defineProperty(exports, "ImportRefusedError", {
483
483
  enumerable: true,
484
- get: function () { return chunkQHCVKMSF_cjs.ImportRefusedError; }
484
+ get: function () { return chunk4AD3CBDK_cjs.ImportRefusedError; }
485
485
  });
486
486
  Object.defineProperty(exports, "InsufficientCreditsError", {
487
487
  enumerable: true,
488
- get: function () { return chunkQHCVKMSF_cjs.InsufficientCreditsError; }
488
+ get: function () { return chunk4AD3CBDK_cjs.InsufficientCreditsError; }
489
489
  });
490
490
  Object.defineProperty(exports, "JobAbortedError", {
491
491
  enumerable: true,
492
- get: function () { return chunkQHCVKMSF_cjs.JobAbortedError; }
492
+ get: function () { return chunk4AD3CBDK_cjs.JobAbortedError; }
493
493
  });
494
494
  Object.defineProperty(exports, "JobBlockedError", {
495
495
  enumerable: true,
496
- get: function () { return chunkQHCVKMSF_cjs.JobBlockedError; }
496
+ get: function () { return chunk4AD3CBDK_cjs.JobBlockedError; }
497
497
  });
498
498
  Object.defineProperty(exports, "JobFailedError", {
499
499
  enumerable: true,
500
- get: function () { return chunkQHCVKMSF_cjs.JobFailedError; }
500
+ get: function () { return chunk4AD3CBDK_cjs.JobFailedError; }
501
501
  });
502
502
  Object.defineProperty(exports, "JobHeldError", {
503
503
  enumerable: true,
504
- get: function () { return chunkQHCVKMSF_cjs.JobHeldError; }
504
+ get: function () { return chunk4AD3CBDK_cjs.JobHeldError; }
505
505
  });
506
506
  Object.defineProperty(exports, "JobTimeoutError", {
507
507
  enumerable: true,
508
- get: function () { return chunkQHCVKMSF_cjs.JobTimeoutError; }
508
+ get: function () { return chunk4AD3CBDK_cjs.JobTimeoutError; }
509
509
  });
510
510
  Object.defineProperty(exports, "MODEL_UNAVAILABLE_CODES", {
511
511
  enumerable: true,
512
- get: function () { return chunkQHCVKMSF_cjs.MODEL_UNAVAILABLE_CODES; }
512
+ get: function () { return chunk4AD3CBDK_cjs.MODEL_UNAVAILABLE_CODES; }
513
513
  });
514
514
  Object.defineProperty(exports, "ModelUnavailableError", {
515
515
  enumerable: true,
516
- get: function () { return chunkQHCVKMSF_cjs.ModelUnavailableError; }
516
+ get: function () { return chunk4AD3CBDK_cjs.ModelUnavailableError; }
517
517
  });
518
518
  Object.defineProperty(exports, "NodaroError", {
519
519
  enumerable: true,
520
- get: function () { return chunkQHCVKMSF_cjs.NodaroError; }
520
+ get: function () { return chunk4AD3CBDK_cjs.NodaroError; }
521
521
  });
522
522
  Object.defineProperty(exports, "NotFoundError", {
523
523
  enumerable: true,
524
- get: function () { return chunkQHCVKMSF_cjs.NotFoundError; }
524
+ get: function () { return chunk4AD3CBDK_cjs.NotFoundError; }
525
525
  });
526
526
  Object.defineProperty(exports, "RateLimitedError", {
527
527
  enumerable: true,
528
- get: function () { return chunkQHCVKMSF_cjs.RateLimitedError; }
528
+ get: function () { return chunk4AD3CBDK_cjs.RateLimitedError; }
529
529
  });
530
530
  Object.defineProperty(exports, "StorageExceededError", {
531
531
  enumerable: true,
532
- get: function () { return chunkQHCVKMSF_cjs.StorageExceededError; }
532
+ get: function () { return chunk4AD3CBDK_cjs.StorageExceededError; }
533
533
  });
534
534
  Object.defineProperty(exports, "StudioOpError", {
535
535
  enumerable: true,
536
- get: function () { return chunkQHCVKMSF_cjs.StudioOpError; }
536
+ get: function () { return chunk4AD3CBDK_cjs.StudioOpError; }
537
537
  });
538
538
  Object.defineProperty(exports, "StudioPreviewAppliedError", {
539
539
  enumerable: true,
540
- get: function () { return chunkQHCVKMSF_cjs.StudioPreviewAppliedError; }
540
+ get: function () { return chunk4AD3CBDK_cjs.StudioPreviewAppliedError; }
541
541
  });
542
542
  Object.defineProperty(exports, "StudioPreviewUnavailable", {
543
543
  enumerable: true,
544
- get: function () { return chunkQHCVKMSF_cjs.StudioPreviewUnavailable; }
544
+ get: function () { return chunk4AD3CBDK_cjs.StudioPreviewUnavailable; }
545
545
  });
546
546
  Object.defineProperty(exports, "UnauthorizedError", {
547
547
  enumerable: true,
548
- get: function () { return chunkQHCVKMSF_cjs.UnauthorizedError; }
548
+ get: function () { return chunk4AD3CBDK_cjs.UnauthorizedError; }
549
549
  });
550
550
  Object.defineProperty(exports, "WorkflowConflictError", {
551
551
  enumerable: true,
552
- get: function () { return chunkQHCVKMSF_cjs.WorkflowConflictError; }
552
+ get: function () { return chunk4AD3CBDK_cjs.WorkflowConflictError; }
553
553
  });
554
554
  Object.defineProperty(exports, "throwFromResponse", {
555
555
  enumerable: true,
556
- get: function () { return chunkQHCVKMSF_cjs.throwFromResponse; }
556
+ get: function () { return chunk4AD3CBDK_cjs.throwFromResponse; }
557
557
  });
558
558
  Object.defineProperty(exports, "CREATURE_ASPECT_DEFAULTS", {
559
559
  enumerable: true,
@@ -581,7 +581,7 @@ Object.defineProperty(exports, "CreditsResource", {
581
581
  });
582
582
  Object.defineProperty(exports, "AppsResource", {
583
583
  enumerable: true,
584
- get: function () { return chunkJOXZ4ZIF_cjs.AppsResource; }
584
+ get: function () { return chunk7BMKQ36V_cjs.AppsResource; }
585
585
  });
586
586
  Object.defineProperty(exports, "AudioResource", {
587
587
  enumerable: true,
package/dist/index.d.cts CHANGED
@@ -33,7 +33,7 @@ export { CreateNodePresetGroupInput, CreateNodePresetInput, FactoryPresetEntry,
33
33
  export { ConnectedReference, DescribedReference, GenericEdge, GenericNode } from '@nodaro/shared/types';
34
34
  export { VideoCharacterReference, VideoCharacterVoice } from '@nodaro/shared/video';
35
35
  export { AudioFxPreset, GenerateMaskOutput, GenerateMaskRequest, VideoDepthColormap, VideoDepthModelSize, VideoDepthProvider, VideoDepthResolution } from '@nodaro/shared/media';
36
- 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-WkaQjuwS.cjs';
36
+ 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-YwzFHsJH.cjs';
37
37
  export { TopazUpscaleFactor } from '@nodaro/shared/credits';
38
38
  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';
39
39
  export { AccessTokenResponse, ExchangeCodeInput, OAuthAppInfo, OAuthResource } from './entries/oauth.cjs';
package/dist/index.d.ts CHANGED
@@ -33,7 +33,7 @@ export { CreateNodePresetGroupInput, CreateNodePresetInput, FactoryPresetEntry,
33
33
  export { ConnectedReference, DescribedReference, GenericEdge, GenericNode } from '@nodaro/shared/types';
34
34
  export { VideoCharacterReference, VideoCharacterVoice } from '@nodaro/shared/video';
35
35
  export { AudioFxPreset, GenerateMaskOutput, GenerateMaskRequest, VideoDepthColormap, VideoDepthModelSize, VideoDepthProvider, VideoDepthResolution } from '@nodaro/shared/media';
36
- 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-C9O2tdGH.js';
36
+ 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-CBWTkR37.js';
37
37
  export { TopazUpscaleFactor } from '@nodaro/shared/credits';
38
38
  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';
39
39
  export { AccessTokenResponse, ExchangeCodeInput, OAuthAppInfo, OAuthResource } from './entries/oauth.js';
package/dist/index.js CHANGED
@@ -55,7 +55,7 @@ import './chunk-M6Y5TOYE.js';
55
55
  import './chunk-KARJ7P7Y.js';
56
56
  import './chunk-SUCHGNYT.js';
57
57
  import './chunk-SLPD47SR.js';
58
- export { NodaroClient, createClient } from './chunk-LTRJNCXB.js';
58
+ export { NodaroClient, createClient } from './chunk-CYEIT3FA.js';
59
59
  export { WebhooksResource } from './chunk-YN6CBIIB.js';
60
60
  export { WorkflowsResource } from './chunk-33HT46A3.js';
61
61
  export { WorkspacesResource } from './chunk-Z5GLY4R3.js';
@@ -72,7 +72,7 @@ export { SavedPostsResource } from './chunk-NCCBS6GU.js';
72
72
  export { SCENE3D_DELIVERY_ASSET_USAGE, Scene3DResource } from './chunk-NNHWH7ER.js';
73
73
  export { SessionsResource } from './chunk-WS4ZQ4AA.js';
74
74
  export { ShotsResource } from './chunk-WVFAQBS7.js';
75
- export { StudioProductionsResource, StudioResource, isStudioGenerateEstimate } from './chunk-Q6HMDIC4.js';
75
+ export { StudioProductionsResource, StudioResource, isStudioGenerateEstimate } from './chunk-YE6X5BQ2.js';
76
76
  export { SurfaceResource } from './chunk-HADYBDBT.js';
77
77
  export { TemplatesResource } from './chunk-M7VSFZMV.js';
78
78
  export { OBJECT_ASPECT_DEFAULTS, OBJECT_ASPECT_OPTIONS, OBJECT_ASSET_TYPES, OBJECT_ATTACH_COLUMNS, ObjectsResource } from './chunk-GIQDM2MH.js';
@@ -83,16 +83,16 @@ export { PipelinesResource } from './chunk-J2DBYYXC.js';
83
83
  export { ProjectsResource } from './chunk-H7VQTG4M.js';
84
84
  export { PromptHelperResource } from './chunk-OIPPTBW4.js';
85
85
  export { RecastResource } from './chunk-AJVSMNPZ.js';
86
- export { LlmResource } from './chunk-E37CVHWW.js';
86
+ export { LlmResource } from './chunk-CNST37UF.js';
87
87
  export { LOCATION_ASSET_TYPES, LOCATION_ATTACH_COLUMNS, LocationsResource, SURROUND_DIRECTIONS } from './chunk-XZPSJG2X.js';
88
- export { MediaResource } from './chunk-CSIPRLX3.js';
88
+ export { MediaResource } from './chunk-FFT2YPB4.js';
89
89
  export { ModelsResource } from './chunk-KNNSGWHO.js';
90
90
  export { MOODBOARD_DIRECTION_PREFIX, MoodboardsResource, moodboardDirectionId } from './chunk-YVU2M7MI.js';
91
91
  export { PresetsResource } from './chunk-AEUPH7EE.js';
92
- export { NodesResource } from './chunk-KEZMNVN3.js';
92
+ export { NodesResource } from './chunk-RBUISD4V.js';
93
93
  export { OAuthResource } from './chunk-Z7LGWNI7.js';
94
94
  export { DeveloperAppsResource } from './chunk-65E3JBFZ.js';
95
- export { CLIP_PACK_MAX_TARGET_SEC, CLIP_PACK_MIN_TARGET_SEC, EditResource, TRAILER_FORMATS, USE_CASE_NODE_TYPES } from './chunk-MYUJEVP6.js';
95
+ export { CLIP_PACK_MAX_TARGET_SEC, CLIP_PACK_MIN_TARGET_SEC, EditResource, TRAILER_FORMATS, USE_CASE_NODE_TYPES } from './chunk-4IXVKTA4.js';
96
96
  export { ExecutionsResource, OUTPUT_BEARING_NODE_STATUSES, nodeStateMayCarryOutput } from './chunk-22XXTB2R.js';
97
97
  export { GalleryResource } from './chunk-MC77SD42.js';
98
98
  export { JobsResource } from './chunk-ADW6LPRT.js';
@@ -102,13 +102,13 @@ export { CollectionsResource } from './chunk-4WRDR4GN.js';
102
102
  export { CommunityResource } from './chunk-SFB4YLCS.js';
103
103
  export { CompetitorsResource } from './chunk-BU5A6K4C.js';
104
104
  export { ContentRightsResource } from './chunk-HAS6PMQN.js';
105
- export { CopilotResource } from './chunk-EBQXAOHW.js';
106
- import './chunk-JC66EEFI.js';
107
- export { CallbackAuth, NodaroClientCore, StaticTokenAuth, supabaseAuth } from './chunk-GQU5FXYB.js';
108
- export { AlreadyRunningError, AppRunVersionChangedError, CREDIT_CAP_CODES, ContinuationPreviewPendingError, ContinuationRefusedError, CreditCapExceededError, ForbiddenError, IMPORT_REFUSAL_CODES, ImportRefusedError, InsufficientCreditsError, JobAbortedError, JobBlockedError, JobFailedError, JobHeldError, JobTimeoutError, MODEL_UNAVAILABLE_CODES, ModelUnavailableError, NodaroError, NotFoundError, RateLimitedError, StorageExceededError, StudioOpError, StudioPreviewAppliedError, StudioPreviewUnavailable, UnauthorizedError, WorkflowConflictError, throwFromResponse } from './chunk-SNPDM72K.js';
105
+ export { CopilotResource } from './chunk-CCXY4ZJM.js';
106
+ import './chunk-SZ67PDKE.js';
107
+ export { CallbackAuth, NodaroClientCore, StaticTokenAuth, supabaseAuth } from './chunk-AKKCS7MF.js';
108
+ export { AlreadyRunningError, AppRunVersionChangedError, CREDIT_CAP_CODES, ContinuationPreviewPendingError, ContinuationRefusedError, CreditCapExceededError, ForbiddenError, IMPORT_REFUSAL_CODES, ImportRefusedError, InsufficientCreditsError, JobAbortedError, JobBlockedError, JobFailedError, JobHeldError, JobTimeoutError, MODEL_UNAVAILABLE_CODES, ModelUnavailableError, NodaroError, NotFoundError, RateLimitedError, StorageExceededError, StudioOpError, StudioPreviewAppliedError, StudioPreviewUnavailable, UnauthorizedError, WorkflowConflictError, throwFromResponse } from './chunk-IJAJTVEW.js';
109
109
  export { OBJECT_ASPECT_DEFAULTS as CREATURE_ASPECT_DEFAULTS, OBJECT_ASPECT_OPTIONS as CREATURE_ASPECT_OPTIONS, CREATURE_ASSET_TYPES, CREATURE_ATTACH_COLUMNS, CreaturesResource } from './chunk-HUYI5G3D.js';
110
110
  export { CreditsResource } from './chunk-F3AV3TC7.js';
111
- export { AppsResource } from './chunk-7LODCIQK.js';
111
+ export { AppsResource } from './chunk-OJHJBNJZ.js';
112
112
  export { AudioResource } from './chunk-OHC4JIUP.js';
113
113
  export { BillingResource } from './chunk-MCXZV3CW.js';
114
114
  export { CastSwapResource } from './chunk-LQMJFFST.js';
@@ -332,7 +332,7 @@ interface ImageToImageParams extends GenerationSessionParams {
332
332
  background?: ImageBackground;
333
333
  /** 0–1: how far the result may move from the source (taken by the models in `I2I_STRENGTH_SUPPORT`). */
334
334
  strength?: number;
335
- /** `"auto"` on a model without a native auto keeps the source image's shape (the model's nearest ratio). */
335
+ /** `"auto"` keeps the source image's shape: on a model without a native auto, and on GPT Image 2.6 (whose own auto renders square), as the model's nearest ratio. */
336
336
  aspectRatio?: ImageAspectRatio;
337
337
  /** Up to 5,000 characters. */
338
338
  negativePrompt?: string;
@@ -332,7 +332,7 @@ interface ImageToImageParams extends GenerationSessionParams {
332
332
  background?: ImageBackground;
333
333
  /** 0–1: how far the result may move from the source (taken by the models in `I2I_STRENGTH_SUPPORT`). */
334
334
  strength?: number;
335
- /** `"auto"` on a model without a native auto keeps the source image's shape (the model's nearest ratio). */
335
+ /** `"auto"` keeps the source image's shape: on a model without a native auto, and on GPT Image 2.6 (whose own auto renders square), as the model's nearest ratio. */
336
336
  aspectRatio?: ImageAspectRatio;
337
337
  /** Up to 5,000 characters. */
338
338
  negativePrompt?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nodaro/sdk",
3
- "version": "2.66.0",
3
+ "version": "2.66.1",
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",
@@ -337,8 +337,8 @@
337
337
  "test:watch": "vitest"
338
338
  },
339
339
  "dependencies": {
340
- "@nodaro/shared": "^3.56.0",
341
- "@nodaro/prompts": "^1.51.0"
340
+ "@nodaro/shared": "^3.58.0",
341
+ "@nodaro/prompts": "^1.53.0"
342
342
  },
343
343
  "peerDependencies": {
344
344
  "@fingerprintjs/fingerprintjs": "^5.2.0",
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/resources/llm.ts"],"names":[],"mappings":";AAoEO,IAAM,cAAN,MAAkB;AAAA,EACvB,YAAoB,MAAA,EAA0B;AAA1B,IAAA,IAAA,CAAA,MAAA,GAAA,MAAA;AAAA,EAA2B;AAAA,EAA3B,MAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQpB,WAAwB,KAAA,EAA4D;AAClF,IAAA,OAAO,IAAA,CAAK,OAAO,OAAA,CAAgC,MAAA,EAAQ,sBAAsB,EAAE,IAAA,EAAM,OAAO,CAAA;AAAA,EAClG;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAYA,cAAc,KAAA,EAA0D;AACtE,IAAA,OAAO,IAAA,CAAK,OAAO,OAAA,CAA2B,MAAA,EAAQ,2BAA2B,EAAE,IAAA,EAAM,OAAO,CAAA;AAAA,EAClG;AACF","file":"chunk-E37CVHWW.js","sourcesContent":["import type { NodaroClientCore } from \"../core.js\"\n\n/**\n * Structured LLM output — `POST /v1/llm/structured` and its asynchronous\n * twin. The platform supplies the model lane, forced JSON-Schema output with\n * validation and error-fed retries, the job row and the credit lifecycle; the\n * caller supplies its own system prompt and schema (an app-owned vocabulary\n * the platform cannot know — Nodaro Studio's production plan is the first).\n */\nexport interface LlmStructuredInput {\n /** The system prompt (≤ 100,000 chars). */\n system: string\n /** The user turn (1–100,000 chars). */\n input: string\n /** A JSON Schema OBJECT (`type: \"object\"`, ≤ 64 KB, ≤ 20 levels) in the\n * keyword subset the server converts — see the API guide. */\n jsonSchema: Record<string, unknown>\n /** Names the forced-output tool the provider sees (≤ 64 chars). */\n schemaName?: string\n llmModel?: string\n reasoningEffort?: string\n /** Invalid answers fed back with their error before the call fails (0–3, default 2). */\n maxRetries?: number\n /** Your app's slug — attribution only; `jobs.list({ origin })` finds the rows. */\n origin?: string\n advancedMode?: boolean\n temperature?: number\n maxTokens?: number\n}\n\nexport interface LlmStructuredResult<T = unknown> {\n jobId: string\n output: T\n usage: { inputTokens: number; outputTokens: number }\n}\n\nexport interface LlmStructuredJobInput extends LlmStructuredInput {\n /** Display label stored on the job (≤ 120 chars) — a run list's row title. */\n label?: string\n /** Draft FROM this video: the platform analyzes it first (`POST\n * /v1/video-analysis`, a separate job you own) and appends the analysis\n * to `input` before the LLM call. */\n videoUrl?: string\n /** Analysis options, handed to the analysis route unchanged (its tiers). */\n videoAnalysis?: { llmModel?: string; selectionMode?: \"choose\" | \"combine\" }\n /** Draft from THIS finished `video-analysis` job of yours instead of\n * analyzing `videoUrl` again: no second analysis, no second analysis\n * charge — a retry after a failed draft, another model, different\n * notes. `videoUrl` may still ride beside it as the record of the source.\n * 422 when the job is not yours, does not exist, or is not a finished,\n * readable video analysis (`analysis_not_found` / `not_analysis` /\n * `analysis_failed` / `analysis_not_ready` / `invalid_analysis` — never a\n * 404, which means the route itself is absent). Not combinable with\n * `videoAnalysis`. */\n analysisJobId?: string\n}\n\n/** `output_data` of an `llm-structured` job as it progresses: `stage` while\n * running (`analyzing` only for movie runs), then the result. */\nexport interface LlmStructuredJobOutput<T = unknown> {\n stage?: \"analyzing\" | \"drafting\"\n output?: T\n inputTokens?: number\n outputTokens?: number\n analysisJobId?: string\n analysisCredits?: number\n}\n\nexport class LlmResource {\n constructor(private client: NodaroClientCore) {}\n\n /**\n * Synchronous forced-schema completion (`POST /v1/llm/structured`). A call\n * can run several minutes — longer than the client's default 60 s\n * `timeoutMs`; construct the client with a larger `timeoutMs` for this\n * call, or use {@link LlmResource.structuredJob}.\n */\n structured<T = unknown>(input: LlmStructuredInput): Promise<LlmStructuredResult<T>> {\n return this.client.request<LlmStructuredResult<T>>(\"POST\", \"/v1/llm/structured\", { body: input })\n }\n\n /**\n * The same call as a job (`POST /v1/llm/structured/jobs`): answers `{ jobId }`\n * at once. Poll `jobs.getStatus(jobId)` — `output_data` is an\n * {@link LlmStructuredJobOutput}; `error_message` says why a run failed.\n * `jobs.list({ type: \"llm-structured\", origin })` finds every run later.\n * Throws `NotFoundError` on a platform that predates the route. An instance\n * that proxies its LLM calls to nodaro.ai answers `503 provider_unavailable`\n * permanently — the SDK surfaces that as a generic `NodaroError` with the\n * same code; treat it as unavailable here, not as transient.\n */\n structuredJob(input: LlmStructuredJobInput): Promise<{ jobId: string }> {\n return this.client.request<{ jobId: string }>(\"POST\", \"/v1/llm/structured/jobs\", { body: input })\n }\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/errors.ts"],"names":[],"mappings":";;;AAEO,IAAM,WAAA,GAAN,cAA0B,KAAA,CAAM;AAAA,EAUrC,WAAA,CACE,OAAA,EACgB,IAAA,EACA,MAAA,EAChB,OAAA,EACA;AACA,IAAA,KAAA,CAAM,OAAO,CAAA;AAJG,IAAA,IAAA,CAAA,IAAA,GAAA,IAAA;AACA,IA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CAAqB,KAAK,OAAA,EAAS,QAAA,CAAS,UAAA,EAAY,IAAA,CAAK,IAAI,CAAA;AAC/F,EAAA,MAAM,IAAI,WAAA,CAAY,OAAA,EAAS,IAAA,EAAM,MAAM,CAAA;AAC7C","file":"chunk-QHCVKMSF.cjs","sourcesContent":["import type { StudioOpsResponse } from \"./resources/studio-productions.js\"\n\nexport class NodaroError extends Error {\n /**\n * Every other field of the server's error envelope (`{ error: { code,\n * message, … } }`), as it was sent: for example a trend refusal's `slot`, a\n * publish refusal's `reasons`, a validation error's `issues`. Empty when the\n * envelope had nothing else, or for an error the SDK made itself. A copy —\n * changing it changes nothing else.\n */\n public readonly details: Readonly<Record<string, unknown>> = {}\n\n constructor(\n message: string,\n public readonly code: string,\n public readonly status: number,\n details?: Readonly<Record<string, unknown>>,\n ) {\n super(message)\n this.name = \"NodaroError\"\n if (details) this.details = { ...details }\n }\n}\n\nexport class UnauthorizedError extends NodaroError {\n constructor(message = \"Authentication required\") {\n super(message, \"unauthorized\", 401)\n this.name = \"UnauthorizedError\"\n }\n}\n\nexport class ForbiddenError extends NodaroError {\n /** `code` defaults to `\"forbidden\"`; {@link ModelUnavailableError} passes its own. */\n constructor(message = \"Forbidden\", public readonly missingScope?: string, code = \"forbidden\") {\n super(message, code, 403)\n this.name = \"ForbiddenError\"\n }\n}\n\nexport type ModelUnavailableCode = \"model_not_available\" | \"model_disabled\"\n\n/**\n * The 403 codes {@link ModelUnavailableError} carries: a model this\n * deployment does not offer (`model_not_available` — outside its edition or\n * surface, or hidden by its operator) and a model an admin switched off on\n * the models page (`model_disabled`).\n */\nexport const MODEL_UNAVAILABLE_CODES: ReadonlySet<ModelUnavailableCode> = new Set<ModelUnavailableCode>([\n \"model_not_available\",\n \"model_disabled\",\n])\n\n/**\n * HTTP 403 refusing the MODEL, not the caller: this deployment does not offer\n * it, or an admin switched it off. Answered by the credit guard before any\n * credits are held (the LLM and pipeline lanes still answer a switched-off\n * model with a 402 for now).\n * Choosing another model is the remedy — retrying, topping up or a wider\n * scope changes nothing. A {@link ForbiddenError}, so existing catches keep\n * working; `code` is the server's own code and says which. The envelope\n * names no model: what was refused is the request's own `provider` (or, for\n * a fan-out, one of its `models`).\n */\nexport class ModelUnavailableError extends ForbiddenError {\n declare readonly code: ModelUnavailableCode\n\n constructor(code: ModelUnavailableCode, message = \"This model is not available\") {\n super(message, undefined, code)\n this.name = \"ModelUnavailableError\"\n }\n}\n\nexport type ImportRefusalCode =\n | \"imports_blocked\"\n | \"import_source_disabled\"\n | \"link_imports_disabled\"\n | \"rights_confirmation_required\"\n | \"rights_authorization_required\"\n | \"rights_confirmation_not_found\"\n | \"rights_confirmation_mismatch\"\n | \"rights_confirmation_stale\"\n | \"rights_confirmation_expired\"\n | \"rights_confirmation_used\"\n\n/**\n * The 403 codes {@link ImportRefusedError} carries: imports of links are\n * blocked on the account, or the account is closed, under the deployment's\n * repeat-infringer policy (`imports_blocked`; the message says until when),\n * the link's site is disabled by an administrator (`import_source_disabled`),\n * the deployment turned link imports off (`link_imports_disabled`), or the\n * content rights confirmation is missing while the deployment requires\n * one (`rights_confirmation_required`; for an import through an API key or an\n * AI agent with no standing authorization, `rights_authorization_required`),\n * does not exist, is for another link or account, was made under an older\n * declaration, expired, or was used for an import already.\n */\nexport const IMPORT_REFUSAL_CODES: ReadonlySet<ImportRefusalCode> = new Set<ImportRefusalCode>([\n \"imports_blocked\",\n \"import_source_disabled\",\n \"link_imports_disabled\",\n \"rights_confirmation_required\",\n \"rights_authorization_required\",\n \"rights_confirmation_not_found\",\n \"rights_confirmation_mismatch\",\n \"rights_confirmation_stale\",\n \"rights_confirmation_expired\",\n \"rights_confirmation_used\",\n])\n\n/**\n * HTTP 403 refusing an IMPORT OF A LINK (`media.downloadVideo`,\n * `uploads.importUrl`, the audio imports): the content rights check or the\n * site's policy said no, before anything was fetched. A\n * {@link ForbiddenError}, so existing catches keep working; `code` is the\n * server's own code and says which. The remedy for a `rights_confirmation_*`\n * code is `contentRights.confirm({ url })` again and a new import with the\n * answered id; for `rights_authorization_required` it is the person giving\n * the standing authorization in their settings (`contentRights.authorize`, in\n * their own session); `imports_blocked` lasts until the date its message names\n * or until an administrator lifts it, and the account's owner reads why in\n * their settings; an `import_source_disabled` site has no remedy on the\n * caller's side, and the message names no site; `link_imports_disabled` means\n * a link to another site is refused on this deployment altogether (upload the\n * file instead).\n */\nexport class ImportRefusedError extends ForbiddenError {\n declare readonly code: ImportRefusalCode\n\n constructor(code: ImportRefusalCode, message = \"This link can't be imported here.\") {\n super(message, undefined, code)\n this.name = \"ImportRefusedError\"\n }\n}\n\nexport class NotFoundError extends NodaroError {\n constructor(message = \"Not found\") {\n super(message, \"not_found\", 404)\n this.name = \"NotFoundError\"\n }\n}\n\nexport class RateLimitedError extends NodaroError {\n constructor(message = \"Rate limited\") {\n super(message, \"rate_limited\", 429)\n this.name = \"RateLimitedError\"\n }\n}\n\n/**\n * HTTP 402: the run costs more than the caller may spend. `code` is the\n * refusal's own code — `insufficient_credits` for the caller's own balance, or\n * another 402 code such as `free_video_limit`. A spending cap someone else set\n * (a workspace budget, a member cap, a per-user allowance) is the subclass\n * {@link CreditCapExceededError}, so `instanceof InsufficientCreditsError`\n * still catches every 402.\n */\nexport class InsufficientCreditsError extends NodaroError {\n constructor(\n message = \"Insufficient credits\",\n public readonly required?: number,\n public readonly available?: number,\n code = \"insufficient_credits\",\n ) {\n super(message, code, 402)\n this.name = \"InsufficientCreditsError\"\n }\n}\n\n/** The 402 codes of a spending cap set by someone other than the caller. */\nexport type CreditCapCode = \"budget_exceeded\" | \"member_cap_exceeded\" | \"user_allowance_exceeded\"\n\n/**\n * The 402 codes {@link CreditCapExceededError} carries: the workspace's budget\n * (`budget_exceeded`), the caller's cap in that workspace\n * (`member_cap_exceeded`), the deployment's per-user allowance\n * (`user_allowance_exceeded`).\n */\nexport const CREDIT_CAP_CODES: ReadonlySet<CreditCapCode> = new Set<CreditCapCode>([\n \"budget_exceeded\",\n \"member_cap_exceeded\",\n \"user_allowance_exceeded\",\n])\n\n/**\n * HTTP 402 from a spending cap, not from the caller's own balance: topping up\n * does not help — whoever set the cap (the workspace's owner, the deployment's\n * operator) has to raise it. An {@link InsufficientCreditsError}, so existing\n * catches keep working; `code` says which cap. `available`, when sent, is what\n * the cap has left.\n */\nexport class CreditCapExceededError extends InsufficientCreditsError {\n declare readonly code: CreditCapCode\n\n constructor(code: CreditCapCode, message = \"A credit cap cannot cover this run\", required?: number, available?: number) {\n super(message, required, available, code)\n this.name = \"CreditCapExceededError\"\n }\n}\n\n/**\n * HTTP 413: what was sent does not fit. `code` is always `storage_exceeded`;\n * `reason` is the platform's own code, when the answer carried one:\n * `storage_limit_exceeded` is a full storage, while `file_too_large` is a\n * single file over the limit, not a full storage (likewise\n * `payload_too_large`, `post_too_large`, `duration_exceeded`).\n */\nexport class StorageExceededError extends NodaroError {\n constructor(\n message = \"Storage exceeded\",\n public readonly limitBytes?: number,\n /** The platform's own code for this 413, e.g. `storage_limit_exceeded` or `file_too_large`. */\n public readonly reason?: string,\n ) {\n super(message, \"storage_exceeded\", 413)\n this.name = \"StorageExceededError\"\n }\n}\n\n/**\n * Optimistic-concurrency rejection (HTTP 409 `workflow_conflict`): the workflow\n * was written by another tab/device after the state carried in\n * `expectedUpdatedAt`/`expectedVersion` was read. `currentRecord` — when the\n * server includes it — is the full current workflow: merge your changes onto it\n * and retry with its fresh `updatedAt`, no follow-up GET needed.\n */\nexport class WorkflowConflictError extends NodaroError {\n constructor(\n message = \"Workflow was updated by another writer\",\n public readonly currentUpdatedAt?: string,\n public readonly currentVersion?: number,\n public readonly currentRecord?: Record<string, unknown>,\n /**\n * The wire code this conflict actually arrived with.\n *\n * `production_busy` is the studio production routes' own 409: the row\n * changed under a read-modify-write and the server exhausted its retries.\n * It is the same situation and the same remedy — re-read and apply again —\n * so it is the same ERROR, and a caller catching `WorkflowConflictError`\n * handles both. The code stays truthful because a caller that logs or\n * branches on it should see what the server said, not what the class is\n * usually called.\n */\n code: WorkflowConflictCode = \"workflow_conflict\",\n ) {\n super(message, code, 409)\n this.name = \"WorkflowConflictError\"\n }\n}\n\n/** The 409 codes that mean \"somebody else wrote first; re-read and retry\". */\nexport type WorkflowConflictCode = \"workflow_conflict\" | \"production_busy\"\n\n/**\n * A studio operation batch was refused, and the error names WHICH operation\n * (`opIndex`, zero-based) was wrong. Nothing in the batch was written: a batch\n * applies atomically or not at all, so fix that one operation and send the\n * whole batch again.\n *\n * Selected by SHAPE — any 4xx carrying a numeric `opIndex` — not by a list of\n * codes, so a new refusal reason (`op_invalid`, `op_target_missing`, whatever\n * the server adds next) reaches the caller as this error without an SDK\n * release. `code` is whatever the server sent.\n */\nexport class StudioOpError extends NodaroError {\n constructor(\n message: string,\n code: string,\n status: number,\n /** Zero-based index into the `ops` array that was sent. */\n public readonly opIndex: number,\n ) {\n super(message, code, status)\n this.name = \"StudioOpError\"\n }\n}\n\n/** The 409 codes whose answer names the job to turn to instead (a top-level `jobId`). */\nconst CONTINUATION_REFUSAL_CODES: ReadonlySet<string> = new Set([\n \"already_running\",\n \"continuation_superseded\",\n \"render_final_already_rendered\",\n])\n\n/**\n * A 409 that names the job to turn to instead: continuing a use-case run\n * (`client.edit.continueUseCase`) answers `already_running` (a continuation is\n * under way, or one that already completed — follow `jobId`),\n * `continuation_superseded` (a later continuation failed too — continue\n * `jobId` instead) or `render_final_already_rendered` (a Render final with this\n * very edit already completed — `jobId` holds the result). `code` and `status`\n * are what the server sent. Selected for exactly those three codes when the\n * answer carries a top-level `jobId`; every other 409 stays a plain\n * `NodaroError`.\n */\nexport class ContinuationRefusedError extends NodaroError {\n constructor(\n message: string,\n code: string,\n /** The job the refusal names. */\n public readonly jobId: string,\n ) {\n super(message, code, 409)\n this.name = \"ContinuationRefusedError\"\n }\n}\n\n/**\n * The one run that finishes a continuation held at a Preview review (the\n * `next` of {@link ContinuationPreviewPendingError}): pass these three fields\n * to `client.workflows.run`. It continues that execution, runs each held render\n * at Final and each held Tighten Episode continuing the run that made its\n * Preview, then every node after them.\n */\nexport interface HeldFinalRun {\n continueFromExecutionId: string\n /** The nodes it runs, in canvas order. */\n nodeIds: string[]\n /** For this run only: each held render at Final, each held use-case node's `useCaseContinue`. */\n inputOverrides: Record<string, Record<string, unknown>>\n}\n\n/**\n * HTTP 409 `continuation_preview_pending`: a continue-from-failed\n * (`client.workflows.run` with `continueMode: \"from-failed\"`) whose run's\n * newest later continuation completed by stopping at a Preview review, so\n * continuing again would stop there too. `executionId` is that continuation;\n * `renderNodeIds` the Apply EDL renders and `reviewNodeIds` the Tighten Episode\n * nodes holding it; `next` the run that finishes them — send it first\n * (`client.workflows.run(workflowId, error.next)`), then continue. Absent only\n * when the server could not name it. For a single held render, `next` is that\n * render's `client.workflows.renderFinal`.\n */\nexport class ContinuationPreviewPendingError extends NodaroError {\n constructor(\n message: string,\n public readonly executionId: string,\n public readonly renderNodeIds: readonly string[],\n public readonly reviewNodeIds: readonly string[],\n public readonly next?: HeldFinalRun,\n ) {\n super(message, \"continuation_preview_pending\", 409)\n this.name = \"ContinuationPreviewPendingError\"\n }\n}\n\nconst stringList = (v: unknown): string[] => (Array.isArray(v) ? v.filter((id): id is string => typeof id === \"string\") : [])\n\n/** A `next` as the server sends it, or undefined for anything else. */\nfunction heldFinalRunOf(v: unknown): HeldFinalRun | undefined {\n if (!v || typeof v !== \"object\") return undefined\n const r = v as Record<string, unknown>\n if (typeof r.continueFromExecutionId !== \"string\" || !Array.isArray(r.nodeIds)) return undefined\n if (!r.inputOverrides || typeof r.inputOverrides !== \"object\" || Array.isArray(r.inputOverrides)) return undefined\n return {\n continueFromExecutionId: r.continueFromExecutionId,\n nodeIds: stringList(r.nodeIds),\n inputOverrides: r.inputOverrides as Record<string, Record<string, unknown>>,\n }\n}\n\n/**\n * HTTP 409 `already_running` that names the execution under way (a top-level\n * `executionId`): the run you asked to start or continue is still running —\n * follow `executionId` (`client.executions.get`) instead of starting it again.\n * Sent by the workflow run route and by an app run's Retry\n * (`client.apps.resume`). An `already_running` that names a job instead stays\n * {@link ContinuationRefusedError}; one that names nothing, a plain\n * `NodaroError`.\n */\nexport class AlreadyRunningError extends NodaroError {\n constructor(\n message: string,\n /** The execution under way. */\n public readonly executionId: string,\n ) {\n super(message, \"already_running\", 409)\n this.name = \"AlreadyRunningError\"\n }\n}\n\n/**\n * HTTP 409 `app_run_version_changed`: a Retry of a failed app run\n * (`client.apps.resume`) refused because the app is on another version than\n * the one the run ran — continuing would mix them. `runVersion` is the run's\n * version, `appVersion` the one you are on (the `version` you sent, else the\n * app's latest). Start the run over (`client.apps.run`) to run `appVersion`,\n * or send `{ version: runVersion }` to continue on the run's own version.\n * Nothing was written or billed. Selected by code; the two numbers are\n * `undefined` when the answer does not carry them.\n */\nexport class AppRunVersionChangedError extends NodaroError {\n constructor(\n message: string,\n public readonly runVersion?: number,\n public readonly appVersion?: number,\n ) {\n super(message, \"app_run_version_changed\", 409)\n this.name = \"AppRunVersionChangedError\"\n }\n}\n\n/**\n * HTTP 422 `job_blocked`. A job policy registered by this deployment refused\n * the generation **before it ran** — no job was created, nothing was reserved\n * and nothing was charged. `message` is the policy's user-safe text: show it\n * as-is. Do not retry the identical request; whether the same input would be\n * judged differently is the deployment's policy's business.\n *\n * Only occurs on deployments that register a job policy. Selected by `code`,\n * not by status, the same way `workflow_conflict` narrows a 409 above — any\n * other 422 stays a plain `NodaroError`.\n */\nexport class JobBlockedError extends NodaroError {\n constructor(message = \"Blocked by this deployment's content policy\") {\n super(message, \"job_blocked\", 422)\n this.name = \"JobBlockedError\"\n }\n}\n\n/**\n * A job reached a terminal `failed`/`cancelled` status while being awaited by\n * `nodes.runAndWait` / `nodes.runMany`. Not an HTTP-level error (the polls\n * themselves succeeded), so `status` is 0 — distinguish it by type/`code`.\n * Carries the job's own `error_message` (as the message) and `jobId`.\n */\nexport class JobFailedError extends NodaroError {\n constructor(\n message: string,\n public readonly jobId: string,\n /** The terminal status that triggered the failure (`failed` | `cancelled`). */\n public readonly jobStatus: \"failed\" | \"cancelled\" = \"failed\",\n ) {\n super(message, \"job_failed\", 0)\n this.name = \"JobFailedError\"\n }\n}\n\n/**\n * `nodes.runAndWait` polled past its `maxMs` deadline without the job reaching\n * a terminal status. Time the job spent `queued` (waiting for a free slot)\n * does not count toward the deadline. Not an HTTP error — `status` is 0; catch\n * by type/`code`.\n */\nexport class JobTimeoutError extends NodaroError {\n constructor(\n message: string,\n public readonly jobId: string,\n /** The wall-clock deadline (ms) that was exceeded. */\n public readonly timeoutMs: number,\n ) {\n super(message, \"job_timeout\", 0)\n this.name = \"JobTimeoutError\"\n }\n}\n\n/**\n * The caller's `AbortSignal` fired while `nodes.runAndWait` was polling (or it\n * was already aborted on entry). Polling stops and this rejects. Not an HTTP\n * error — `status` is 0; catch by type/`code`.\n */\nexport class JobAbortedError extends NodaroError {\n constructor(message = \"Aborted\", public readonly jobId?: string) {\n super(message, \"job_aborted\", 0)\n this.name = \"JobAbortedError\"\n }\n}\n\n/**\n * A batch preview was asked for and this deployment cannot give one, so\n * NOTHING was sent: the batch is still unapplied and the production untouched.\n *\n * A preview is two requests because the route's body is parsed in strip mode —\n * a deployment that predates the preview silently DROPS the flag and APPLIES\n * the batch. So the SDK asks with an EMPTY batch first and sends the real one\n * only when that answer carries the `dryRun` marker. This is what it throws\n * when the answer does not: whatever the older deployment made of an empty\n * batch, the caller's batch never left.\n *\n * The remedy is a deployment that serves the preview — there is nothing to\n * retry here. To apply the batch instead, send it without the flag.\n *\n * A deployment that REFUSES the empty batch outright throws its own error\n * instead of this one, which is the right way round: the route's message says\n * more than \"unavailable\" does.\n *\n * Not an HTTP error: the request itself succeeded and answered the older shape.\n * `status` is 0; catch by type/`code`.\n */\nexport class StudioPreviewUnavailable extends NodaroError {\n constructor(\n message = \"This deployment does not preview operation batches; nothing was sent\",\n ) {\n super(message, \"studio_preview_unavailable\", 0)\n this.name = \"StudioPreviewUnavailable\"\n }\n}\n\n/**\n * A batch preview was asked for and the batch was APPLIED instead. The\n * production is written; this is the opposite of {@link\n * StudioPreviewUnavailable}, where nothing was sent.\n *\n * How it happens: the preview's proving ping and the batch are two requests,\n * and a fleet mid-rollout can serve them from different deployments. The ping\n * answers the marker, the batch reaches a deployment that predates the preview,\n * parses in strip mode, drops the flag and writes. The SDK cannot recall that\n * request — by the time the answer comes back the change has landed — so it\n * refuses to call the result a preview, which is the only thing still in its\n * gift. `receipts` and `warnings` are on both shapes, so an unchecked reply\n * would have shown a person what ALREADY happened under the heading of what\n * would.\n *\n * `applied` is what the route answered: the ordinary apply reply, whose\n * `production` and `version` are now the truth. Adopt them the way a plain\n * apply's caller does — do NOT re-send the batch, and do not present it for\n * approval.\n *\n * Not an HTTP error: the request succeeded, at the wrong thing. `status` is 0.\n */\nexport class StudioPreviewAppliedError extends NodaroError {\n constructor(\n /**\n * The apply reply the route sent back, as it sent it. An answer this\n * package does not recognise arrives here unchanged rather than being\n * dressed up: it is what the deployment said about a batch it took.\n *\n * `undefined` when the answer carried no body at all — a 204, an empty\n * envelope. The refusal still fires, because a non-preview answer is never\n * handed back as a preview, but there is nothing to report and the SDK will\n * not invent it: whether the batch was applied is unknown from here, and\n * the caller settles it by re-reading the production.\n */\n public readonly applied: StudioOpsResponse | undefined,\n message = applied\n ? \"Asked for a preview and this deployment APPLIED the batch; the change is written — see `applied`\"\n : \"Asked for a preview and this deployment answered with neither one nor a body to read; the batch may have been applied — re-read the production before deciding anything\",\n ) {\n super(message, \"studio_preview_applied\", 0)\n this.name = \"StudioPreviewAppliedError\"\n }\n}\n\n/**\n * The awaited job entered `pending_review`: a job policy registered by this\n * deployment held its output for a human reviewer. `pending_review` is\n * IN-FLIGHT, not terminal, so `nodes.runAndWait` / `nodes.runMany` end the\n * poll on the first tick they observe it rather than burning `maxMs` on a\n * status that no longer moves on its own.\n *\n * This does NOT cancel the job — the output exists, a human is reviewing it,\n * and the credit reservation stays `reserved` for the whole hold. Do not\n * re-run the request (a duplicate would be held too): re-fetch with\n * `jobs.get(jobId)` later, or surface \"awaiting review\" to your user and poll\n * `jobs.getStatus()` yourself. It resolves to `completed` (approved), `failed`\n * (rejected, with `error_hint.kind === \"policy-block\"`) or `cancelled`.\n *\n * Not an HTTP error — `status` is 0; catch by type/`code`.\n */\nexport class JobHeldError extends NodaroError {\n constructor(\n message: string,\n public readonly jobId: string,\n ) {\n super(message, \"job_held\", 0)\n this.name = \"JobHeldError\"\n }\n}\n\n/** The `{ error: { code, message, … } }` envelope every current route sends. */\ninterface ApiErrorEnvelope {\n code?: string\n message?: string\n missingScope?: string\n required?: number\n available?: number\n limitBytes?: number\n opIndex?: number\n [key: string]: unknown\n}\n\ninterface ApiErrorBody {\n /** The envelope — or, on an older route, a bare string (see {@link readErrorBody}). */\n error?: ApiErrorEnvelope | string\n /** A top-level message: an older route's, a bare validation answer's, or the server framework's own. */\n message?: unknown\n /** OAuth's human text (RFC 6749 §5.2), beside a bare-string `error`. */\n error_description?: unknown\n /** A bare validation answer's per-field issues (`{ message, issues }`). */\n issues?: unknown\n /** A refusal that names another job (see {@link ContinuationRefusedError}). */\n jobId?: unknown\n /** `continuation_preview_pending`: the held continuation, what holds it, and the run that finishes it. */\n executionId?: unknown\n renderNodeIds?: unknown\n reviewNodeIds?: unknown\n next?: unknown\n /** The credit guard's 402 sends its figures beside the envelope: what the run needs… */\n required?: unknown\n /** …and what the caller has (withheld on a deployment-paid instance). */\n balance?: unknown\n /** A per-user allowance's 402: what the allowance has left. */\n remaining?: unknown\n /** `app_run_version_changed`: the version the run ran, and the one the caller is on. */\n runVersion?: unknown\n appVersion?: unknown\n}\n\nconst finite = (v: unknown): number | undefined => (typeof v === \"number\" && Number.isFinite(v) ? v : undefined)\n\n/** A machine code as an older route writes it: lower snake_case, never a sentence or a reason phrase. */\nconst BARE_CODE = /^[a-z][a-z0-9_]*$/\n\nconst nonEmpty = (v: unknown): string | undefined => (typeof v === \"string\" && v.length > 0 ? v : undefined)\n\n/**\n * Where a body keeps its code and its human message. Most routes send the\n * envelope `{ error: { code, message } }`; three other shapes reach the SDK\n * too, and each is read for what it says rather than collapsed into\n * `internal_error` / \"Request failed\":\n *\n * - an older route's bare string, `{ error: \"<code>\", message?, … }` (character\n * training, a few profile and billing routes), and OAuth's\n * `{ error: \"<code>\", error_description }`. A snake_case string is the code;\n * a sentence (`\"Profile not found\"`) is the message.\n * - a bare validation answer, `{ message, issues: [...] }`: `validation_error`.\n * - the server framework's own answer, `{ statusCode, error: \"<reason phrase>\",\n * message }` (a route it does not have): the reason phrase is neither, the\n * message is kept — so \"no such route\" stays distinguishable from \"no such\n * resource\".\n *\n * At HTTP 500 and above only the CODE is read from outside the envelope. Text\n * there can be whatever the server failed with: the framework's own answer to\n * an uncaught throw is `{ statusCode: 500, error: \"Internal Server Error\",\n * message: <the raw error> }`, and the server's sanitizer rewrites only the\n * `internal_error` envelope. The envelope's own message is a route's chosen\n * sentence and is read at every status, as before.\n *\n * `message` is undefined when the body carries no human text it may show, so a\n * typed class keeps its own default (\"Not found\").\n */\nfunction readErrorBody(status: number, body: ApiErrorBody): { code: string | undefined; message: string | undefined; envelope: ApiErrorEnvelope } {\n const raw = body.error\n const envelope: ApiErrorEnvelope = raw && typeof raw === \"object\" ? raw : {}\n const bare = typeof raw === \"string\" ? raw : undefined\n const bareCode = bare !== undefined && BARE_CODE.test(bare) ? bare : undefined\n // Words with a space between them are human text: an older route's sentence,\n // or the framework's reason phrase — which always arrives with a real\n // `message`, read first. A single capitalised word (\"Unauthorized\") is a\n // reason phrase alone and says nothing the status does not.\n const bareSentence = bare !== undefined && bareCode === undefined && /\\s/.test(bare.trim()) ? bare : undefined\n const code =\n nonEmpty(envelope.code) ??\n bareCode ??\n (status === 400 && raw === undefined && Array.isArray(body.issues) ? \"validation_error\" : undefined)\n const outside = status >= 500 ? undefined : (nonEmpty(body.message) ?? nonEmpty(body.error_description) ?? bareSentence)\n const message = nonEmpty(envelope.message) ?? outside\n return { code, message, envelope }\n}\n\n/** The envelope's fields other than `code` and `message` (see {@link NodaroError.details}). */\nfunction envelopeDetails(envelope: ApiErrorEnvelope): Record<string, unknown> {\n const out: Record<string, unknown> = {}\n for (const [key, value] of Object.entries(envelope)) {\n if (key !== \"code\" && key !== \"message\") out[key] = value\n }\n return out\n}\n\nexport function throwFromResponse(status: number, body: ApiErrorBody): never {\n try {\n selectError(status, body)\n } catch (err) {\n // Every class carries the envelope's other fields, whichever was chosen.\n if (err instanceof NodaroError) {\n const raw = body && typeof body === \"object\" ? body.error : undefined\n if (raw && typeof raw === \"object\") Object.defineProperty(err, \"details\", { value: envelopeDetails(raw), enumerable: true })\n }\n throw err\n }\n}\n\nfunction selectError(status: number, body: ApiErrorBody): never {\n // A body that is not an object (an empty answer, `null`, a bare string) still\n // throws by its status.\n const parsed: ApiErrorBody = body && typeof body === \"object\" ? body : {}\n const read = readErrorBody(status, parsed)\n const envelope = read.envelope\n const code = read.code ?? \"internal_error\"\n // A typed class falls back to its own default; a generic error to the code\n // it carries, which says more than \"Request failed\" does.\n const message = read.message ?? (read.code ? read.code : \"Request failed\")\n if (status === 401) throw new UnauthorizedError(read.message)\n if (status === 409 && (code === \"workflow_conflict\" || code === \"production_busy\")) {\n throw new WorkflowConflictError(\n read.message,\n envelope.currentUpdatedAt as string | undefined,\n envelope.currentVersion as number | undefined,\n envelope.currentRecord as Record<string, unknown> | undefined,\n code,\n )\n }\n // By shape, not by code — see StudioOpError. Only the studio operations route\n // sends an op index, so this cannot capture anyone else's 400.\n if (status >= 400 && status < 500 && typeof envelope.opIndex === \"number\") {\n throw new StudioOpError(message, code, status, envelope.opIndex)\n }\n if (status === 409 && CONTINUATION_REFUSAL_CODES.has(code) && typeof parsed.jobId === \"string\") {\n throw new ContinuationRefusedError(message, code, parsed.jobId)\n }\n if (status === 409 && code === \"continuation_preview_pending\" && typeof parsed.executionId === \"string\") {\n throw new ContinuationPreviewPendingError(\n message,\n parsed.executionId,\n stringList(parsed.renderNodeIds),\n stringList(parsed.reviewNodeIds),\n heldFinalRunOf(parsed.next),\n )\n }\n if (status === 409 && code === \"already_running\" && typeof parsed.executionId === \"string\") {\n throw new AlreadyRunningError(message, parsed.executionId)\n }\n if (status === 409 && code === \"app_run_version_changed\") {\n throw new AppRunVersionChangedError(message, finite(parsed.runVersion), finite(parsed.appVersion))\n }\n if (status === 422 && code === \"job_blocked\") throw new JobBlockedError(read.message)\n // The model, not the caller — before the scope line, so its own code is\n // kept (a plain ForbiddenError says \"forbidden\" whatever the server sent).\n const modelCode = read.code as ModelUnavailableCode | undefined\n if (status === 403 && modelCode !== undefined && MODEL_UNAVAILABLE_CODES.has(modelCode)) {\n throw new ModelUnavailableError(modelCode, read.message)\n }\n // An import of a link refused by the content rights check or the site's policy: its own code is kept.\n const importCode = read.code as ImportRefusalCode | undefined\n if (status === 403 && importCode !== undefined && IMPORT_REFUSAL_CODES.has(importCode)) {\n throw new ImportRefusedError(importCode, read.message)\n }\n if (status === 403 && code === \"insufficient_scope\") {\n throw new ForbiddenError(read.message, envelope.missingScope)\n }\n if (status === 403) throw new ForbiddenError(read.message)\n // A 404 the framework answered itself (no route at that path) carries its\n // message at the top level, not under `error`; `readErrorBody` keeps it so\n // callers can tell \"no such route\" from \"no such resource\".\n if (status === 404) throw new NotFoundError(read.message)\n if (status === 429) throw new RateLimitedError(read.message)\n if (status === 402) {\n // The credit guard puts `required` / `balance` (an allowance: `remaining`)\n // beside the envelope; an envelope that carries them (`required` /\n // `available`) is read first.\n const required = finite(envelope.required) ?? finite(parsed.required)\n const available = finite(envelope.available) ?? finite(parsed.balance) ?? finite(parsed.remaining)\n const capCode = read.code as CreditCapCode | undefined\n if (capCode !== undefined && CREDIT_CAP_CODES.has(capCode)) {\n throw new CreditCapExceededError(capCode, read.message, required, available)\n }\n throw new InsufficientCreditsError(read.message, required, available, read.code ?? \"insufficient_credits\")\n }\n if (status === 413) throw new StorageExceededError(read.message, envelope.limitBytes, read.code)\n throw new NodaroError(message, code, status)\n}\n"]}