@nodaro/sdk 2.65.1 → 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 (199) hide show
  1. package/dist/{chunk-UIM5SLPP.cjs → chunk-3G65RIZS.cjs} +4 -4
  2. package/dist/{chunk-UIM5SLPP.cjs.map → chunk-3G65RIZS.cjs.map} +1 -1
  3. package/dist/{chunk-P2JYDWZT.cjs → chunk-4AD3CBDK.cjs} +14 -11
  4. package/dist/chunk-4AD3CBDK.cjs.map +1 -0
  5. package/dist/{chunk-GKTZHICS.cjs → chunk-4AZB4MN7.cjs} +5 -5
  6. package/dist/{chunk-GKTZHICS.cjs.map → chunk-4AZB4MN7.cjs.map} +1 -1
  7. package/dist/{chunk-T23YD5BR.js → chunk-4IXVKTA4.js} +5 -5
  8. package/dist/{chunk-T23YD5BR.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-4BAHF762.cjs → chunk-7FLTDTHR.cjs} +2 -2
  12. package/dist/chunk-7FLTDTHR.cjs.map +1 -0
  13. package/dist/{chunk-SVWEWBXI.js → chunk-ADW6LPRT.js} +17 -2
  14. package/dist/chunk-ADW6LPRT.js.map +1 -0
  15. package/dist/{chunk-HW6U7WXU.js → chunk-AKKCS7MF.js} +4 -4
  16. package/dist/{chunk-HW6U7WXU.js.map → chunk-AKKCS7MF.js.map} +1 -1
  17. package/dist/{chunk-YLXCXVYF.cjs → chunk-BETFYVOR.cjs} +5 -5
  18. package/dist/{chunk-YLXCXVYF.cjs.map → chunk-BETFYVOR.cjs.map} +1 -1
  19. package/dist/{chunk-MQRPXZW5.js → chunk-CCXY4ZJM.js} +3 -3
  20. package/dist/{chunk-MQRPXZW5.js.map → chunk-CCXY4ZJM.js.map} +1 -1
  21. package/dist/{chunk-E37CVHWW.js → chunk-CNST37UF.js} +2 -2
  22. package/dist/chunk-CNST37UF.js.map +1 -0
  23. package/dist/{chunk-K2QVR3LG.js → chunk-CYEIT3FA.js} +24 -20
  24. package/dist/chunk-CYEIT3FA.js.map +1 -0
  25. package/dist/{chunk-KP2DIIKO.cjs → chunk-EJJIA765.cjs} +5 -5
  26. package/dist/{chunk-KP2DIIKO.cjs.map → chunk-EJJIA765.cjs.map} +1 -1
  27. package/dist/{chunk-7QK2NXJA.js → chunk-F3AV3TC7.js} +2 -2
  28. package/dist/chunk-F3AV3TC7.js.map +1 -0
  29. package/dist/{chunk-UPGZTLK7.cjs → chunk-F6KAMECM.cjs} +6 -3
  30. package/dist/chunk-F6KAMECM.cjs.map +1 -0
  31. package/dist/{chunk-3HL3IHVE.js → chunk-FFT2YPB4.js} +3 -3
  32. package/dist/{chunk-3HL3IHVE.js.map → chunk-FFT2YPB4.js.map} +1 -1
  33. package/dist/{chunk-P6E4QDJN.js → chunk-GG7DOKTH.js} +2 -2
  34. package/dist/chunk-GG7DOKTH.js.map +1 -0
  35. package/dist/chunk-HADYBDBT.js +19 -0
  36. package/dist/chunk-HADYBDBT.js.map +1 -0
  37. package/dist/chunk-HFDTOEAL.cjs +21 -0
  38. package/dist/chunk-HFDTOEAL.cjs.map +1 -0
  39. package/dist/{chunk-WNXX3B2A.js → chunk-IJAJTVEW.js} +14 -11
  40. package/dist/chunk-IJAJTVEW.js.map +1 -0
  41. package/dist/{chunk-SS3B6PHT.cjs → chunk-ITQB5ADE.cjs} +2 -2
  42. package/dist/chunk-ITQB5ADE.cjs.map +1 -0
  43. package/dist/{chunk-CRIQLLR2.js → chunk-JZO5WWKX.js} +51 -7
  44. package/dist/chunk-JZO5WWKX.js.map +1 -0
  45. package/dist/{chunk-Y6V6CBY5.js → chunk-KNNSGWHO.js} +2 -2
  46. package/dist/{chunk-Y6V6CBY5.js.map → chunk-KNNSGWHO.js.map} +1 -1
  47. package/dist/{chunk-HW3CSUVC.cjs → chunk-LCQIQFWD.cjs} +17 -2
  48. package/dist/chunk-LCQIQFWD.cjs.map +1 -0
  49. package/dist/{chunk-3TRBBYSN.js → chunk-LQMJFFST.js} +6 -4
  50. package/dist/chunk-LQMJFFST.js.map +1 -0
  51. package/dist/{chunk-JDEZHITT.js → chunk-MC77SD42.js} +2 -2
  52. package/dist/chunk-MC77SD42.js.map +1 -0
  53. package/dist/chunk-N4FKPJ7J.cjs +4 -0
  54. package/dist/chunk-N4FKPJ7J.cjs.map +1 -0
  55. package/dist/{chunk-BYFLERF3.cjs → chunk-OET5W4QZ.cjs} +40 -36
  56. package/dist/chunk-OET5W4QZ.cjs.map +1 -0
  57. package/dist/{chunk-2DZWWIJ4.cjs → chunk-OI4RCW2J.cjs} +2 -2
  58. package/dist/chunk-OI4RCW2J.cjs.map +1 -0
  59. package/dist/{chunk-7LODCIQK.js → chunk-OJHJBNJZ.js} +2 -2
  60. package/dist/{chunk-7LODCIQK.js.map → chunk-OJHJBNJZ.js.map} +1 -1
  61. package/dist/{chunk-L3RTC4FL.js → chunk-RBUISD4V.js} +3 -3
  62. package/dist/chunk-RBUISD4V.js.map +1 -0
  63. package/dist/{chunk-7QOCWJKD.cjs → chunk-RPV4QBHS.cjs} +2 -2
  64. package/dist/{chunk-7QOCWJKD.cjs.map → chunk-RPV4QBHS.cjs.map} +1 -1
  65. package/dist/chunk-RQ6GE7KG.js +3 -0
  66. package/dist/chunk-RQ6GE7KG.js.map +1 -0
  67. package/dist/{chunk-C3LJ7HIH.cjs → chunk-S5BOU6JG.cjs} +6 -4
  68. package/dist/chunk-S5BOU6JG.cjs.map +1 -0
  69. package/dist/{chunk-3CB4WYEY.cjs → chunk-S5VSDJAM.cjs} +51 -7
  70. package/dist/chunk-S5VSDJAM.cjs.map +1 -0
  71. package/dist/{chunk-A75Q7UEU.js → chunk-SZ67PDKE.js} +3 -3
  72. package/dist/{chunk-A75Q7UEU.js.map → chunk-SZ67PDKE.js.map} +1 -1
  73. package/dist/{chunk-TBFA6QPH.cjs → chunk-TQLOD7OL.cjs} +4 -4
  74. package/dist/{chunk-TBFA6QPH.cjs.map → chunk-TQLOD7OL.cjs.map} +1 -1
  75. package/dist/{chunk-GRATHB3C.cjs → chunk-W4KKCHJA.cjs} +11 -11
  76. package/dist/{chunk-GRATHB3C.cjs.map → chunk-W4KKCHJA.cjs.map} +1 -1
  77. package/dist/{chunk-WUKIJJG2.cjs → chunk-W63ZKKYT.cjs} +2 -2
  78. package/dist/chunk-W63ZKKYT.cjs.map +1 -0
  79. package/dist/{chunk-DR5WM36L.cjs → chunk-XRYSHC2O.cjs} +22 -22
  80. package/dist/chunk-XRYSHC2O.cjs.map +1 -0
  81. package/dist/{chunk-A5UGBCAW.js → chunk-YE6X5BQ2.js} +3 -3
  82. package/dist/{chunk-A5UGBCAW.js.map → chunk-YE6X5BQ2.js.map} +1 -1
  83. package/dist/{chunk-P2C33IOF.js → chunk-YEOK5A5H.js} +6 -3
  84. package/dist/chunk-YEOK5A5H.js.map +1 -0
  85. package/dist/entries/apps.cjs +2 -2
  86. package/dist/entries/apps.d.cts +2 -1
  87. package/dist/entries/apps.d.ts +2 -1
  88. package/dist/entries/apps.js +1 -1
  89. package/dist/entries/cast-swap.cjs +2 -2
  90. package/dist/entries/cast-swap.d.cts +16 -12
  91. package/dist/entries/cast-swap.d.ts +16 -12
  92. package/dist/entries/cast-swap.js +1 -1
  93. package/dist/entries/characters.d.cts +1 -1
  94. package/dist/entries/characters.d.ts +1 -1
  95. package/dist/entries/client.cjs +27 -26
  96. package/dist/entries/client.d.cts +4 -1
  97. package/dist/entries/client.d.ts +4 -1
  98. package/dist/entries/client.js +22 -21
  99. package/dist/entries/copilot.cjs +4 -4
  100. package/dist/entries/copilot.js +3 -3
  101. package/dist/entries/core.cjs +6 -6
  102. package/dist/entries/core.js +2 -2
  103. package/dist/entries/creatures.d.cts +1 -1
  104. package/dist/entries/creatures.d.ts +1 -1
  105. package/dist/entries/credits.cjs +2 -2
  106. package/dist/entries/credits.d.cts +89 -1
  107. package/dist/entries/credits.d.ts +89 -1
  108. package/dist/entries/credits.js +1 -1
  109. package/dist/entries/edit.cjs +7 -7
  110. package/dist/entries/edit.d.cts +2 -2
  111. package/dist/entries/edit.d.ts +2 -2
  112. package/dist/entries/edit.js +2 -2
  113. package/dist/entries/errors.cjs +28 -28
  114. package/dist/entries/errors.d.cts +11 -6
  115. package/dist/entries/errors.d.ts +11 -6
  116. package/dist/entries/errors.js +1 -1
  117. package/dist/entries/gallery.cjs +2 -2
  118. package/dist/entries/gallery.d.cts +5 -0
  119. package/dist/entries/gallery.d.ts +5 -0
  120. package/dist/entries/gallery.js +1 -1
  121. package/dist/entries/jobs.cjs +2 -2
  122. package/dist/entries/jobs.d.cts +26 -1
  123. package/dist/entries/jobs.d.ts +26 -1
  124. package/dist/entries/jobs.js +1 -1
  125. package/dist/entries/library.cjs +2 -2
  126. package/dist/entries/library.d.cts +6 -0
  127. package/dist/entries/library.d.ts +6 -0
  128. package/dist/entries/library.js +1 -1
  129. package/dist/entries/llm.cjs +2 -2
  130. package/dist/entries/llm.d.cts +1 -1
  131. package/dist/entries/llm.d.ts +1 -1
  132. package/dist/entries/llm.js +1 -1
  133. package/dist/entries/locations.d.cts +1 -1
  134. package/dist/entries/locations.d.ts +1 -1
  135. package/dist/entries/media.cjs +4 -4
  136. package/dist/entries/media.js +3 -3
  137. package/dist/entries/models.cjs +2 -2
  138. package/dist/entries/models.d.cts +2 -0
  139. package/dist/entries/models.d.ts +2 -0
  140. package/dist/entries/models.js +1 -1
  141. package/dist/entries/nodes.cjs +3 -3
  142. package/dist/entries/nodes.d.cts +1 -1
  143. package/dist/entries/nodes.d.ts +1 -1
  144. package/dist/entries/nodes.js +2 -2
  145. package/dist/entries/objects.d.cts +1 -1
  146. package/dist/entries/objects.d.ts +1 -1
  147. package/dist/entries/scene3d.d.cts +2 -2
  148. package/dist/entries/scene3d.d.ts +2 -2
  149. package/dist/entries/studio.cjs +5 -5
  150. package/dist/entries/studio.js +2 -2
  151. package/dist/entries/surface.cjs +13 -0
  152. package/dist/entries/surface.cjs.map +1 -0
  153. package/dist/entries/surface.d.cts +47 -0
  154. package/dist/entries/surface.d.ts +47 -0
  155. package/dist/entries/surface.js +4 -0
  156. package/dist/entries/surface.js.map +1 -0
  157. package/dist/entries/uploads.cjs +2 -2
  158. package/dist/entries/uploads.d.cts +4 -1
  159. package/dist/entries/uploads.d.ts +4 -1
  160. package/dist/entries/uploads.js +1 -1
  161. package/dist/entries/voices.cjs +2 -2
  162. package/dist/entries/voices.d.cts +32 -9
  163. package/dist/entries/voices.d.ts +32 -9
  164. package/dist/entries/voices.js +1 -1
  165. package/dist/index.cjs +91 -85
  166. package/dist/index.d.cts +5 -4
  167. package/dist/index.d.ts +5 -4
  168. package/dist/index.js +25 -23
  169. package/dist/{nodes-BXL3qXlY.d.ts → nodes-CBWTkR37.d.ts} +18 -2
  170. package/dist/{nodes-Dx8rpU12.d.cts → nodes-YwzFHsJH.d.cts} +18 -2
  171. package/dist/supabase-browser.cjs +43 -5
  172. package/dist/supabase-browser.cjs.map +1 -1
  173. package/dist/supabase-browser.d.cts +11 -0
  174. package/dist/supabase-browser.d.ts +11 -0
  175. package/dist/supabase-browser.js +43 -5
  176. package/dist/supabase-browser.js.map +1 -1
  177. package/package.json +8 -3
  178. package/dist/chunk-2DZWWIJ4.cjs.map +0 -1
  179. package/dist/chunk-3CB4WYEY.cjs.map +0 -1
  180. package/dist/chunk-3TRBBYSN.js.map +0 -1
  181. package/dist/chunk-4BAHF762.cjs.map +0 -1
  182. package/dist/chunk-7QK2NXJA.js.map +0 -1
  183. package/dist/chunk-BYFLERF3.cjs.map +0 -1
  184. package/dist/chunk-C3LJ7HIH.cjs.map +0 -1
  185. package/dist/chunk-CRIQLLR2.js.map +0 -1
  186. package/dist/chunk-DR5WM36L.cjs.map +0 -1
  187. package/dist/chunk-E37CVHWW.js.map +0 -1
  188. package/dist/chunk-HW3CSUVC.cjs.map +0 -1
  189. package/dist/chunk-JDEZHITT.js.map +0 -1
  190. package/dist/chunk-K2QVR3LG.js.map +0 -1
  191. package/dist/chunk-L3RTC4FL.js.map +0 -1
  192. package/dist/chunk-P2C33IOF.js.map +0 -1
  193. package/dist/chunk-P2JYDWZT.cjs.map +0 -1
  194. package/dist/chunk-P6E4QDJN.js.map +0 -1
  195. package/dist/chunk-SS3B6PHT.cjs.map +0 -1
  196. package/dist/chunk-SVWEWBXI.js.map +0 -1
  197. package/dist/chunk-UPGZTLK7.cjs.map +0 -1
  198. package/dist/chunk-WNXX3B2A.js.map +0 -1
  199. package/dist/chunk-WUKIJJG2.cjs.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/resources/cast-swap.ts"],"names":[],"mappings":";;;AA2lBO,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;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAkBA,WAAA,GAA4C;AAC1C,IAAA,OAAO,IAAA,CAAK,MAAA,CAAO,OAAA,CAAQ,KAAA,EAAO,4BAA4B,CAAA;AAAA,EAChE;AAAA;AAAA,EAGA,MAAM,SAAS,MAAA,EAAmD;AAChE,IAAA,MAAM,KAAA,GAAQ,MAAM,IAAA,CAAK,MAAA,CAAO,OAAA,CAA0B,QAAQ,wBAAA,EAA0B,EAAE,IAAA,EAAM,MAAA,EAAQ,CAAA;AAE5G,IAAA,MAAM,MAAA,GAAS,sBAAA,CAAuB,KAAA,EAAO,MAAM,CAAA;AACnD,IAAA,OAAO,MAAA,IAAU,WAAW,KAAA,CAAM,MAAA,GAAS,EAAE,GAAG,KAAA,EAAO,QAAO,GAAI,KAAA;AAAA,EACpE;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-LQMJFFST.js","sourcesContent":["import { nodaroMotionEngineFrom } from \"@nodaro/shared/models\"\nimport type { NodaroClientCore } from \"../core.js\"\n\n/**\n * Nodaro Motion (the `castSwap` resource; routes `/v1/cast-swap`) — replace\n * the people, pets, products and/or the location in a short video with your\n * own references, keeping its motion, framing, timing and sound (the clip's\n * 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 Nodaro Motion Prism (`engine` left out, or\n * `\"motion-prism\"`) or Nodaro Motion Pulse (`\"motion-pulse\"`). Pulse renders 720p\n * (its default) or 1080p and has no draft; it makes a new take guided by the\n * clip and pictures, so its Full Quality is a new take at 1080p rather than\n * the same take re-rendered (`CastSwapFullQualityEstimate.kind`).\n *\n * How the clip is prepared for the video model (for one, whether faces are\n * hidden first, and whether a refused clip is retried) is set by Nodaro for\n * each engine; a run cannot change it. `faceMasking` is no longer read\n * (deprecated: accepted and ignored).\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, no `prePrompt` or `postPrompt` and no art style (Flex on\n * Nodaro Motion Prism), 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); on Nodaro Motion Pulse,\n * `draft_unsupported` (`draft: true`), `resolution_unsupported` (480p),\n * `output_format_unsupported` (a MOV edit output) and `too_many_images` (more\n * than 10 images in the run, across every role and fixed reference);\n * `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`, `unnamed_role_needs_picture` (a role with no name\n * and no image), `no_roles_in_preview` (a preview that would change nothing,\n * judged on what it sends: no role kept in it with images, no fixed\n * reference, no `prePrompt` or `postPrompt` and no art style), `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; Nodaro Motion Pulse'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 engine a Nodaro Motion run is made on, by its public id. Left out =\n * `\"motion-prism\"`.\n *\n * - `\"motion-prism\"` (Nodaro Motion Prism): 480p (the default, a draft unless\n * `draft: false`), 720p or 1080p; Full Quality re-renders a draft's own take\n * at 1080p.\n * - `\"motion-pulse\"` (Nodaro Motion Pulse): 720p (the default) or 1080p, never a\n * draft (`draft: true` answers 400 `draft_unsupported`); Full Quality makes a\n * new take at 1080p from a completed 720p run's inputs. A preview is still\n * 4 s from `previewStart`.\n */\nexport type CastSwapEngine = \"motion-prism\" | \"motion-pulse\"\n\n/**\n * The engine ids an older client sent: the earlier public ids (`\"motion-pro\"`\n * = `\"motion-prism\"`, `\"motion-lite\"` = `\"motion-pulse\"`) and the internal\n * ones (`\"seedance-2-5\"`, `\"kling-4\"`). Still accepted in a request; never\n * returned.\n * @deprecated use {@link CastSwapEngine}.\n */\nexport type CastSwapEngineLegacyId = \"motion-pro\" | \"motion-lite\" | \"seedance-2-5\" | \"kling-4\"\n\n/**\n * How a run follows its clip. Left out = `\"precise\"`.\n *\n * - `\"precise\"`: follows the clip exactly.\n * - `\"motion\"`: follows the clip's movement and takes the looks from your\n * photos, more freely than `\"precise\"`. Its price may differ from\n * `\"precise\"`'s: the estimate shows the exact price.\n */\nexport type CastSwapStyle = \"precise\" | \"motion\"\n\n/**\n * Where a Nodaro Motion Pulse run cuts the clip to whole seconds (Pulse renders\n * whole 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 CastSwapMotionLength = \"cut-end\" | \"cut-start\"\n\n/** @deprecated use {@link CastSwapMotionLength}. */\nexport type CastSwapKlingLength = CastSwapMotionLength\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 that would\n * change nothing (no role kept in it with images, no fixed reference, no pre\n * or post prompt and no art style) 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 *\n * Direct runs only: omit it (or leave it empty) and the role is named by its\n * first picture — matched to the subject in the video it fits best; such a\n * role needs at least one image (else 400 `unnamed_role_needs_picture`). A\n * trend run's roles are always named (400 `role_name_required`).\n */\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 *\n * Direct runs only: omit it (or leave it empty) and the role is named by its\n * first picture — matched to the subject in the video it fits best; such a\n * role needs at least one image (else 400 `unnamed_role_needs_picture`). A\n * trend run's roles are always named (400 `role_name_required`).\n */\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 *\n * Direct runs only: omit it (or leave it empty) and the role is named by its\n * first picture — matched to the subject in the video it fits best; such a\n * role needs at least one image (else 400 `unnamed_role_needs_picture`). A\n * trend run's roles are always named (400 `role_name_required`).\n */\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 * @deprecated Nodaro sets this per engine; a run's `faceMasking` is ignored.\n */\nexport interface CastSwapFaceMaskingZone {\n leftPct?: number\n rightPct?: number\n topPct?: number\n bottomPct?: number\n}\n\n/**\n * @deprecated Nodaro sets how the clip is prepared for the video model, per\n * engine; a run cannot change it. A `faceMasking` sent is accepted and\n * ignored (no error), so older code keeps working unchanged.\n */\nexport interface CastSwapFaceMasking {\n mode: \"off\" | \"always\" | \"auto\"\n fill?: \"blur\" | \"depth\"\n minFaceHeightPct?: number\n maxFaceHeightPct?: number\n zone?: CastSwapFaceMaskingZone | null\n blurStrengthPct?: number\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, a fixed reference, a `prePrompt` or `postPrompt`, or an art\n * style (`direction`, Flex on Nodaro Motion Prism) is required. With an art\n * style and nothing to swap, a run restyles the whole clip (see `direction`).\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 engine (see {@link CastSwapEngine}). Default `\"motion-prism\"`. The job\n * records it in `input_data.engine`, and a completed job's output in its\n * `engine`. The ids an older client sent ({@link CastSwapEngineLegacyId})\n * are still accepted.\n */\n engine?: CastSwapEngine | CastSwapEngineLegacyId\n /**\n * How the run follows the clip (see {@link CastSwapStyle}). Default\n * `\"precise\"`; the job records it in `input_data.style`.\n */\n style?: CastSwapStyle\n /**\n * A direct run on Nodaro Motion Prism: an art style that restyles the whole\n * video, as a `direction.style` id of the platform's `style` picker catalog\n * (the same ids an image's `direction.style` takes); the platform words it.\n * A Flex run (`style: \"motion\"`) takes one, and so does a Precise run where\n * {@link CastSwapResource.styleChoice} answers `preciseArtStyle` true for the\n * engine. Nodaro may make such a Precise request the way a Flex run is made\n * (its engine does by default, unless Nodaro turns that off): its estimate,\n * price and Full Quality are then a Flex run's, while the job still records\n * the style sent (`input_data.style` absent, or `\"precise\"`; jobs made so\n * before the style was kept record `\"motion\"`). Otherwise it is Precise's edit\n * of the clip, drawn in the art style. Refused with\n * 400 `unknown_art_style` (not in the catalog), `art_style_not_supported` (a\n * saved moodboard, `moodboard:…`) or `art_style_needs_flex` (a trend run, a\n * Flex run whose prompt is made Precise by Nodaro's setting for how Flex\n * runs are prepared, or a Precise request on an engine from before Precise\n * runs took one), and on Nodaro Motion Pulse with `art_style_needs_prism`.\n * The estimate (sent with the same `direction`) shows the price: it changes\n * only where Nodaro's setting for such runs first redraws the role pictures\n * in the art style.\n *\n * Style only: with no role with images and no fixed reference, the art style\n * alone is the run's change (a pre or post prompt is still added). It\n * restyles the whole clip, keeping the people, places, motion and sound, and\n * is charged for what it runs (the estimate shows it; no clip-preparation\n * `privacy` part). By default a black-and-white art style comes out\n * monochrome. Nodaro may run it the way other art-style runs run instead,\n * priced as those are and not made monochrome.\n * A preview takes its full run's path. Runs this way only on a Flex run, and\n * only where {@link CastSwapResource.styleChoice} answers `styleOnly` true\n * for the engine; elsewhere on Nodaro Motion Prism an art style alone is\n * refused (on a Precise run that stays Precise too, unless\n * {@link CastSwapResource.styleChoice} answers `preciseArtStyleAlone` true for\n * the engine, where it is that run's change), and one with a pre or post prompt\n * runs as any other art-style run. The job records it in\n * `input_data.direction`.\n */\n direction?: { style: string }\n /**\n * Nodaro Motion Pulse only (Prism ignores it): which end of the clip is cut to\n * whole seconds (see {@link CastSwapMotionLength}). Default `\"cut-end\"`.\n */\n motionLength?: CastSwapMotionLength\n /** @deprecated use {@link motionLength} (still accepted). */\n klingLength?: CastSwapKlingLength\n /**\n * The output resolution. Nodaro Motion Prism: `\"480p\"` (default), `\"720p\"` or\n * `\"1080p\"`. Nodaro Motion Pulse: `\"720p\"` (default) or `\"1080p\"`; `\"480p\"`\n * answers 400.\n */\n resolution?: \"480p\" | \"720p\" | \"1080p\"\n /**\n * Render as a draft (Nodaro Motion Prism only). Defaults to `true` at 480p and\n * `false` above it; `true` with `\"720p\"` or `\"1080p\"` answers 400 (draft is\n * 480p only). Nodaro Motion Pulse has no draft: `true` answers 400\n * `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 /**\n * Ignored: Nodaro sets how the clip is prepared, per engine. Accepted (no\n * error) so older code keeps working.\n * @deprecated leave it out.\n */\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, by its public id (absent from an older\n * server = `\"motion-prism\"`). An id an older server answers is read as the\n * public id it names.\n */\n engine?: CastSwapEngine\n /**\n * What is held when the run starts. The run is charged what it actually\n * costs, which is expected to be `expectedCredits`.\n */\n totalCredits: number\n /**\n * The charge the run is expected to come to. Never above `totalCredits`\n * (on Nodaro Motion Pulse it equals it: Pulse renders exactly the length\n * asked for, so the hold is what it settles at). Absent from an older\n * server: read `totalCredits` then.\n */\n expectedCredits?: number\n /**\n * The parts of the quote, by name, for display only:\n * - `base`: the run itself (its base fee). A server before Cast Swap 0.396.0\n * names it `castSwap` instead: read `base`, else `castSwap`;\n * - `references`: preparing the reference pictures (0 when\n * `prepareReferences` is off or there is nothing to prepare);\n * - `motion`: what the video holds (on Nodaro Motion Pulse, what it costs);\n * - `motionExpected`: what the video is expected to be charged, never above\n * `motion` (Nodaro Motion Prism);\n * - `privacy`: preparing the clip, when the engine's setting does. In both\n * totals when it always runs; outside both when it is the retry\n * (`privacyCredits`).\n * - `prompt`: the prompt written for the run by a language model, when\n * Nodaro's setting for the engine does so (absent otherwise).\n * - `referenceAudio`: preparing the clip's sound for the video model, when\n * Nodaro's setting for the engine runs that step (absent otherwise).\n *\n * `motion` and `motionExpected` are alternatives, so the parts sum to more\n * than either total: read `totalCredits` and `expectedCredits`, never the\n * sum. Other parts may appear.\n */\n breakdown: {\n base?: number\n /** @deprecated read {@link base} (an older server answered this name for the same part). */\n castSwap?: number\n references: number\n motion?: number\n motionExpected?: number\n privacy?: number\n prompt?: number\n referenceAudio?: number\n } & Record<string, number>\n /**\n * The extra credits charged only if the video model refuses the clip and\n * the run is retried (Nodaro's setting for the engine decides whether it\n * does). Not in `totalCredits` or `expectedCredits`; `run()` needs credits\n * for both the hold and this (else 402).\n */\n privacyCredits?: number\n /** @deprecated read {@link privacyCredits} (an older server answered this name). */\n maskingCredits?: number\n /**\n * `true` when the video is made at Auto length (every Nodaro Motion Prism\n * run): the final charge is expected to come out lower than `totalCredits`,\n * at about `expectedCredits`. `false` on Nodaro Motion Pulse.\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 Nodaro\n * Motion Prism draft's own take at 1080p; `\"new-take\"` makes a new Nodaro Motion Pulse 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 Nodaro Motion Prism\n * draft, or a completed Nodaro Motion Pulse 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 server: `\"same-take\"`.\n */\n kind?: CastSwapFullQualityKind\n /** The quote in credits: `breakdown.base` plus the 1080p render (same take) or the new take. */\n totalCredits: number\n /**\n * The parts of the quote, by name, for display only: `base` (the Full\n * Quality job's own steps; a server before Cast Swap 0.396.0 names it\n * `castSwap` instead: read `base`, else `castSwap`), and `motionHd` (a same\n * take: the 1080p render, 0 when an earlier try of this draft already\n * finished that render, which is then reused) or `motion` (a new take).\n */\n breakdown: {\n base?: number\n /** @deprecated read {@link base} (an older server answered this name for the same part). */\n castSwap?: number\n motionHd?: number\n motion?: number\n } & Record<string, 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 Nodaro Motion 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 Nodaro Motion Prism draft nor a\n * Nodaro Motion Pulse run at 720p (a Pulse 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\n/**\n * Who decides a direct run's style on one engine:\n * - `\"user\"`: the person (the request's `style`, left out = `\"precise\"`);\n * show a Style control;\n * - `\"precise\"`: Nodaro's own apps run Precise on that engine and show no\n * Style control; it changes no request: a direct run and quote take the\n * request's `style`, as on `\"user\"`;\n * - `\"flex\"`: an admin forced it — every direct run and quote of that engine\n * runs Flex (`style: \"motion\"`) whatever the request's `style` says; show\n * no Style control.\n *\n * A trend run keeps its own trend's style.\n */\nexport type CastSwapStyleChoiceOption = \"user\" | \"precise\" | \"flex\"\n\n/** What {@link CastSwapResource.styleChoice} answers: every engine's choice, by its public id. */\nexport interface CastSwapStyleChoice {\n engines: Record<CastSwapEngine, CastSwapStyleChoiceOption>\n /**\n * Per engine, whether the engine takes style-only runs: a Flex run\n * (`style: \"motion\"`) with an art style (`direction`) and nothing to swap\n * (no role with images, no fixed reference). It follows the engine alone, so\n * read it with {@link engines}: an engine answered `\"flex\"` makes a Precise\n * request Flex too, and one answered `\"precise\"` changes no request, so a\n * Flex request there runs as on `\"user\"`. Nodaro Motion Pulse is always\n * `false` (it takes no art style). Absent from an older server, and\n * an engine missing from it: `false`.\n */\n styleOnly?: Partial<Record<CastSwapEngine, boolean>>\n /**\n * Per engine, whether a Precise run (no `style`, or `\"precise\"`) takes an\n * art style (`direction`), as a Flex run does. Nodaro may run such a request as\n * a Flex run (see {@link CastSwapParams}'s `direction`), which this does not\n * say; otherwise it is Precise's edit of the clip, drawn in the art style, and,\n * where {@link CastSwapStyleChoice.preciseArtStyleAlone} is not true for the\n * engine, not on its own: a Precise run with nothing else to change is then refused.\n * Nodaro Motion Pulse is always `false` (it takes no art style). Absent from\n * an older server, and an engine missing from it: `false` (offer an art style\n * on Flex runs alone).\n */\n preciseArtStyle?: Partial<Record<CastSwapEngine, boolean>>\n /**\n * Per engine, whether an art style (`direction`) alone is a Precise run's\n * change there, so the run needs no role, reference or prompt. Nodaro may run\n * such a request as a Flex run (see {@link CastSwapParams}'s `direction`), which\n * this does not say. It answers\n * `false` until the engine takes such runs. Nodaro Motion Pulse is always\n * `false` (it takes no art style). Absent from an older server, and an engine\n * missing from it: `false`.\n */\n preciseArtStyleAlone?: Partial<Record<CastSwapEngine, boolean>>\n}\n\nexport class CastSwapResource {\n constructor(private client: NodaroClientCore) {}\n\n /**\n * Start a Nodaro Motion 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 /**\n * Whether people choose a direct run's style, per engine\n * (`GET /v1/cast-swap/style-choice`): `\"user\"` = show a Style control;\n * `\"precise\"` = Nodaro's own apps run Precise on that engine and hide the\n * control, while a run's `style` is still taken as sent; `\"flex\"` = an admin\n * forced Flex for the engine, so a run's `style` is overridden and the\n * control is best hidden. Its\n * `styleOnly` says, per engine, whether a Flex run with an art style and\n * nothing to swap restyles the whole clip there. Where it is not `true`\n * (absent, or an engine missing from it, included) on Nodaro Motion Prism, an\n * art style alone is refused, and one with a pre or post prompt runs as any\n * other art-style run. Its `preciseArtStyle` says, per engine, whether a\n * Precise run takes an art style there too, and its `preciseArtStyleAlone`\n * whether that art style alone is the run's change.\n * Public (no sign-in needed); the answer may be up to a minute old.\n */\n styleChoice(): Promise<CastSwapStyleChoice> {\n return this.client.request(\"GET\", \"/v1/cast-swap/style-choice\")\n }\n\n /** Quote a run before starting it (`POST /v1/cast-swap/estimate`); spends nothing. */\n async estimate(params: CastSwapParams): Promise<CastSwapEstimate> {\n const quote = await this.client.request<CastSwapEstimate>(\"POST\", \"/v1/cast-swap/estimate\", { body: params })\n // An older server names the engine by an earlier id: answered as the public id it names.\n const engine = nodaroMotionEngineFrom(quote?.engine)\n return engine && engine !== quote.engine ? { ...quote, engine } : quote\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 Nodaro Motion Prism DRAFT run, or a finished Nodaro Motion Pulse\n * run at 720p (a Nodaro Motion 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 * Nodaro Motion Prism draft's own take re-rendered, or a new Nodaro Motion Pulse 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"]}
@@ -39,5 +39,5 @@ var GalleryResource = class {
39
39
  };
40
40
 
41
41
  export { GalleryResource };
42
- //# sourceMappingURL=chunk-JDEZHITT.js.map
43
- //# sourceMappingURL=chunk-JDEZHITT.js.map
42
+ //# sourceMappingURL=chunk-MC77SD42.js.map
43
+ //# sourceMappingURL=chunk-MC77SD42.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/resources/gallery.ts"],"names":[],"mappings":";AAsEO,IAAM,kBAAN,MAAsB;AAAA,EAC3B,YAAoB,MAAA,EAA0B;AAA1B,IAAA,IAAA,CAAA,MAAA,GAAA,MAAA;AAAA,EAA2B;AAAA,EAA3B,MAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMpB,MAAA,CAAO,MAAA,GAA8B,EAAC,EAAyB;AAC7D,IAAA,OAAO,IAAA,CAAK,MAAA,CAAO,OAAA,CAAqB,KAAA,EAAO,aAAA,EAAe;AAAA,MAC5D,KAAA,EAAO;AAAA,QACL,MAAM,MAAA,CAAO,IAAA;AAAA,QACb,QAAQ,MAAA,CAAO,MAAA;AAAA,QACf,eAAe,MAAA,CAAO,aAAA;AAAA,QACtB,OAAO,MAAA,CAAO,KAAA;AAAA,QACd,QAAQ,MAAA,CAAO;AAAA;AACjB,KACD,CAAA;AAAA,EACH;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQA,eAAe,KAAA,EAA8C;AAC3D,IAAA,OAAO,IAAA,CAAK,MAAA,CAAO,OAAA,CAA8B,MAAA,EAAQ,sBAAA,EAAwB,EAAE,IAAA,EAAM,EAAE,KAAA,EAAM,EAAG,CAAA;AAAA,EACtG;AAAA;AAAA;AAAA;AAAA;AAAA,EAMA,MAAM,SAAA,GAA+B;AACnC,IAAA,MAAM,MAAM,MAAM,IAAA,CAAK,MAAA,CAAO,OAAA,CAA4B,OAAO,uBAAuB,CAAA;AACxF,IAAA,OAAO,GAAA,CAAI,IAAA;AAAA,EACb;AACF","file":"chunk-MC77SD42.js","sourcesContent":["import type { NodaroClientCore } from \"../core.js\"\n\nexport type GalleryMediaType = \"image\" | \"video\" | \"audio\"\n\n/**\n * One gallery card (`GET /v1/gallery`): a completed generation with media.\n * Mirrors the route's item shape — never whose it is.\n */\nexport interface GalleryItem {\n /** The job id — pass it to `toggleFavorite`, or `client.jobs.get`. */\n readonly id: string\n readonly type: GalleryMediaType\n /** The kind of job that made it (`generate-image`, `image-to-video`, …). */\n readonly jobName: string\n readonly outputUrl: string\n readonly thumbnailUrl: string | null\n /** When the job completed. */\n readonly createdAt: string\n readonly prompt: string | null\n readonly model: string | null\n /**\n * The owner's own name for the job (`client.jobs.rename`), or `null` until\n * named. Public like the prompt beside it. Absent from an older server.\n */\n readonly title?: string | null\n /** A private 720p Preview render (Apply EDL at proxy quality). Present only when true. */\n readonly preview?: true\n}\n\nexport interface BrowseGalleryParams {\n /** Only this media kind. */\n readonly type?: GalleryMediaType\n /**\n * Only this person's work. Your own id lists your own items, private ones\n * included; anyone else's lists their public ones.\n */\n readonly userId?: string\n /**\n * With YOUR OWN `userId` (from `client.me()`): only the items you\n * favorited. Anyone else's favorites are refused — `UnauthorizedError`\n * without a token, `ForbiddenError` with another person's `userId` or none.\n */\n readonly favoritesOnly?: boolean\n /** Page size, 1–50 (default 20). */\n readonly limit?: number\n /** The previous page's `nextCursor`. */\n readonly cursor?: string\n}\n\nexport interface GalleryPage {\n readonly data: GalleryItem[]\n /** Pass back as `cursor` for the next page; `null` on the last one. */\n readonly nextCursor: string | null\n /** Counted on the first page only (no cursor). */\n readonly totalCount?: number\n}\n\n/** What {@link GalleryResource.toggleFavorite} answers: whether the job is now a favorite. */\nexport interface ToggleFavoriteResult {\n readonly favorited: boolean\n}\n\n/**\n * Gallery — the public gallery of completed generations, and your favorites.\n *\n * A favorite is a bookmark on a generation: one of your own, or anyone's in\n * the public gallery. Your jobs carry it as `Job.favorited`, and\n * `client.jobs.list({ favorited: true })` lists them. Not available on a\n * deployment that hides the gallery (the routes answer 404 there).\n */\nexport class GalleryResource {\n constructor(private client: NodaroClientCore) {}\n\n /**\n * `GET /v1/gallery` → a page of the public gallery, newest first (no auth\n * needed), or one person's work with `userId`.\n */\n browse(params: BrowseGalleryParams = {}): Promise<GalleryPage> {\n return this.client.request<GalleryPage>(\"GET\", \"/v1/gallery\", {\n query: {\n type: params.type,\n userId: params.userId,\n favoritesOnly: params.favoritesOnly,\n limit: params.limit,\n cursor: params.cursor,\n },\n })\n }\n\n /**\n * Favorite a job, or un-favorite it when it already is\n * (`POST /v1/gallery/favorite`). You can favorite your own jobs and public\n * ones; another person's private job is a `NotFoundError`. OAuth apps need\n * the `assets:write` scope.\n */\n toggleFavorite(jobId: string): Promise<ToggleFavoriteResult> {\n return this.client.request<ToggleFavoriteResult>(\"POST\", \"/v1/gallery/favorite\", { body: { jobId } })\n }\n\n /**\n * Your favorited job ids, newest first (`GET /v1/gallery/favorites`). OAuth\n * apps need the `assets:read` or `jobs:read` scope.\n */\n async favorites(): Promise<string[]> {\n const res = await this.client.request<{ data: string[] }>(\"GET\", \"/v1/gallery/favorites\")\n return res.data\n }\n}\n"]}
@@ -0,0 +1,4 @@
1
+ 'use strict';
2
+
3
+ //# sourceMappingURL=chunk-N4FKPJ7J.cjs.map
4
+ //# sourceMappingURL=chunk-N4FKPJ7J.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"chunk-N4FKPJ7J.cjs"}
@@ -1,23 +1,24 @@
1
1
  'use strict';
2
2
 
3
+ var chunk3B47IHB3_cjs = require('./chunk-3B47IHB3.cjs');
3
4
  var chunkWUM6CWTE_cjs = require('./chunk-WUM6CWTE.cjs');
4
5
  var chunkLKH5M44B_cjs = require('./chunk-LKH5M44B.cjs');
6
+ var chunkLTZKNAXM_cjs = require('./chunk-LTZKNAXM.cjs');
5
7
  var chunkRKW3N463_cjs = require('./chunk-RKW3N463.cjs');
6
8
  var chunkHVF5DRGQ_cjs = require('./chunk-HVF5DRGQ.cjs');
7
9
  var chunkKMNSPC72_cjs = require('./chunk-KMNSPC72.cjs');
8
- var chunkUPGZTLK7_cjs = require('./chunk-UPGZTLK7.cjs');
10
+ var chunkF6KAMECM_cjs = require('./chunk-F6KAMECM.cjs');
9
11
  var chunkUIDVH3GP_cjs = require('./chunk-UIDVH3GP.cjs');
10
12
  var chunkW5VHATSR_cjs = require('./chunk-W5VHATSR.cjs');
11
- var chunk3CB4WYEY_cjs = require('./chunk-3CB4WYEY.cjs');
12
- var chunk3B47IHB3_cjs = require('./chunk-3B47IHB3.cjs');
13
+ var chunkS5VSDJAM_cjs = require('./chunk-S5VSDJAM.cjs');
13
14
  var chunkGB6C5OEZ_cjs = require('./chunk-GB6C5OEZ.cjs');
14
15
  var chunkSYVNY3AH_cjs = require('./chunk-SYVNY3AH.cjs');
15
16
  var chunkYDRXBRW2_cjs = require('./chunk-YDRXBRW2.cjs');
16
17
  var chunkWMT7HEBZ_cjs = require('./chunk-WMT7HEBZ.cjs');
17
18
  var chunkMBFUMWI5_cjs = require('./chunk-MBFUMWI5.cjs');
18
- var chunkYLXCXVYF_cjs = require('./chunk-YLXCXVYF.cjs');
19
+ var chunkBETFYVOR_cjs = require('./chunk-BETFYVOR.cjs');
20
+ var chunkHFDTOEAL_cjs = require('./chunk-HFDTOEAL.cjs');
19
21
  var chunkUIBYZNDR_cjs = require('./chunk-UIBYZNDR.cjs');
20
- var chunkLTZKNAXM_cjs = require('./chunk-LTZKNAXM.cjs');
21
22
  var chunk57GANTLV_cjs = require('./chunk-57GANTLV.cjs');
22
23
  var chunkJ5LGGCAS_cjs = require('./chunk-J5LGGCAS.cjs');
23
24
  var chunkNBVARNVA_cjs = require('./chunk-NBVARNVA.cjs');
@@ -26,38 +27,38 @@ var chunkG4AFHCNA_cjs = require('./chunk-G4AFHCNA.cjs');
26
27
  var chunkLAWYFC4G_cjs = require('./chunk-LAWYFC4G.cjs');
27
28
  var chunkTCLNSVYA_cjs = require('./chunk-TCLNSVYA.cjs');
28
29
  var chunkKXEWTYS4_cjs = require('./chunk-KXEWTYS4.cjs');
29
- var chunkSS3B6PHT_cjs = require('./chunk-SS3B6PHT.cjs');
30
+ var chunkITQB5ADE_cjs = require('./chunk-ITQB5ADE.cjs');
30
31
  var chunkMIXRL6I2_cjs = require('./chunk-MIXRL6I2.cjs');
31
- var chunkUIM5SLPP_cjs = require('./chunk-UIM5SLPP.cjs');
32
- var chunk7QOCWJKD_cjs = require('./chunk-7QOCWJKD.cjs');
32
+ var chunk3G65RIZS_cjs = require('./chunk-3G65RIZS.cjs');
33
+ var chunkRPV4QBHS_cjs = require('./chunk-RPV4QBHS.cjs');
33
34
  var chunkZCWKX4V6_cjs = require('./chunk-ZCWKX4V6.cjs');
34
35
  var chunkQ45PC4YD_cjs = require('./chunk-Q45PC4YD.cjs');
35
- var chunkDR5WM36L_cjs = require('./chunk-DR5WM36L.cjs');
36
+ var chunkXRYSHC2O_cjs = require('./chunk-XRYSHC2O.cjs');
36
37
  var chunkGVIFLUYZ_cjs = require('./chunk-GVIFLUYZ.cjs');
37
38
  var chunkA3S55XGF_cjs = require('./chunk-A3S55XGF.cjs');
38
- var chunkGRATHB3C_cjs = require('./chunk-GRATHB3C.cjs');
39
+ var chunkW4KKCHJA_cjs = require('./chunk-W4KKCHJA.cjs');
39
40
  var chunkVUTNNRDW_cjs = require('./chunk-VUTNNRDW.cjs');
40
- var chunkWUKIJJG2_cjs = require('./chunk-WUKIJJG2.cjs');
41
- var chunkHW3CSUVC_cjs = require('./chunk-HW3CSUVC.cjs');
41
+ var chunkW63ZKKYT_cjs = require('./chunk-W63ZKKYT.cjs');
42
+ var chunkLCQIQFWD_cjs = require('./chunk-LCQIQFWD.cjs');
42
43
  var chunkRR45WBME_cjs = require('./chunk-RR45WBME.cjs');
43
- var chunk2DZWWIJ4_cjs = require('./chunk-2DZWWIJ4.cjs');
44
+ var chunkOI4RCW2J_cjs = require('./chunk-OI4RCW2J.cjs');
44
45
  var chunkWK4VXPPZ_cjs = require('./chunk-WK4VXPPZ.cjs');
45
46
  var chunk43FVH6LJ_cjs = require('./chunk-43FVH6LJ.cjs');
46
47
  var chunkYFS2LMG4_cjs = require('./chunk-YFS2LMG4.cjs');
47
48
  var chunk4DCXJ77J_cjs = require('./chunk-4DCXJ77J.cjs');
48
- var chunkTBFA6QPH_cjs = require('./chunk-TBFA6QPH.cjs');
49
- var chunkGKTZHICS_cjs = require('./chunk-GKTZHICS.cjs');
49
+ var chunkTQLOD7OL_cjs = require('./chunk-TQLOD7OL.cjs');
50
+ var chunk4AZB4MN7_cjs = require('./chunk-4AZB4MN7.cjs');
50
51
  var chunkA3XA6UNM_cjs = require('./chunk-A3XA6UNM.cjs');
51
- var chunk4BAHF762_cjs = require('./chunk-4BAHF762.cjs');
52
- var chunkJOXZ4ZIF_cjs = require('./chunk-JOXZ4ZIF.cjs');
52
+ var chunk7FLTDTHR_cjs = require('./chunk-7FLTDTHR.cjs');
53
+ var chunk7BMKQ36V_cjs = require('./chunk-7BMKQ36V.cjs');
53
54
  var chunkPGT4BXR2_cjs = require('./chunk-PGT4BXR2.cjs');
54
55
  var chunkXSYNVD3X_cjs = require('./chunk-XSYNVD3X.cjs');
55
- var chunkC3LJ7HIH_cjs = require('./chunk-C3LJ7HIH.cjs');
56
+ var chunkS5BOU6JG_cjs = require('./chunk-S5BOU6JG.cjs');
56
57
  var chunkBPWUWUZ3_cjs = require('./chunk-BPWUWUZ3.cjs');
57
58
  var chunkXZQ6Z4T6_cjs = require('./chunk-XZQ6Z4T6.cjs');
58
59
 
59
60
  // src/client.ts
60
- var NodaroClient = class _NodaroClient extends chunkGKTZHICS_cjs.NodaroClientCore {
61
+ var NodaroClient = class _NodaroClient extends chunk4AZB4MN7_cjs.NodaroClientCore {
61
62
  workflows;
62
63
  projects;
63
64
  /** Generation sessions inside projects (Create Image / Video / Music). */
@@ -94,6 +95,8 @@ var NodaroClient = class _NodaroClient extends chunkGKTZHICS_cjs.NodaroClientCor
94
95
  userSettings;
95
96
  /** Plans and prices, the subscription, and how this deployment bills. */
96
97
  billing;
98
+ /** What this deployment offers the caller: node types, models and the worlds of the shared header. */
99
+ surface;
97
100
  uploads;
98
101
  library;
99
102
  /** The public gallery and your favorites. */
@@ -131,15 +134,15 @@ var NodaroClient = class _NodaroClient extends chunkGKTZHICS_cjs.NodaroClientCor
131
134
  this.projects = new chunkLAWYFC4G_cjs.ProjectsResource(this);
132
135
  this.sessions = new chunkWMT7HEBZ_cjs.SessionsResource(this);
133
136
  this.trash = new chunkLTZKNAXM_cjs.TrashResource(this);
134
- this.jobs = new chunkHW3CSUVC_cjs.JobsResource(this);
137
+ this.jobs = new chunkLCQIQFWD_cjs.JobsResource(this);
135
138
  this.videoPro = new chunkW5VHATSR_cjs.VideoProResource(this);
136
139
  this.executions = new chunkVUTNNRDW_cjs.ExecutionsResource(this);
137
- this.nodes = new chunkDR5WM36L_cjs.NodesResource(this);
140
+ this.nodes = new chunkXRYSHC2O_cjs.NodesResource(this);
138
141
  this.scene3d = new chunkYDRXBRW2_cjs.Scene3DResource(this);
139
142
  this.developerApps = new chunkA3S55XGF_cjs.DeveloperAppsResource(this);
140
143
  this.oauth = new chunkGVIFLUYZ_cjs.OAuthResource(this);
141
144
  this.webhooks = new chunk3B47IHB3_cjs.WebhooksResource(this);
142
- this.apps = new chunkJOXZ4ZIF_cjs.AppsResource(this);
145
+ this.apps = new chunk7BMKQ36V_cjs.AppsResource(this);
143
146
  this.characters = new chunkXZQ6Z4T6_cjs.CharactersResource(this);
144
147
  this.locations = new chunkMIXRL6I2_cjs.LocationsResource(this);
145
148
  this.objects = new chunk57GANTLV_cjs.ObjectsResource(this);
@@ -148,17 +151,18 @@ var NodaroClient = class _NodaroClient extends chunkGKTZHICS_cjs.NodaroClientCor
148
151
  this.pipelines = new chunkG4AFHCNA_cjs.PipelinesResource(this);
149
152
  this.reduce = new chunkGB6C5OEZ_cjs.ReduceResource(this);
150
153
  this.promptHelper = new chunkTCLNSVYA_cjs.PromptHelperResource(this);
151
- this.voices = new chunk3CB4WYEY_cjs.VoicesResource(this);
152
- this.llm = new chunkSS3B6PHT_cjs.LlmResource(this);
153
- this.media = new chunkUIM5SLPP_cjs.MediaResource(this);
154
+ this.voices = new chunkS5VSDJAM_cjs.VoicesResource(this);
155
+ this.llm = new chunkITQB5ADE_cjs.LlmResource(this);
156
+ this.media = new chunk3G65RIZS_cjs.MediaResource(this);
154
157
  this.contentRights = new chunk4DCXJ77J_cjs.ContentRightsResource(this);
155
158
  this.audio = new chunkPGT4BXR2_cjs.AudioResource(this);
156
- this.credits = new chunk4BAHF762_cjs.CreditsResource(this);
159
+ this.credits = new chunk7FLTDTHR_cjs.CreditsResource(this);
157
160
  this.userSettings = new chunkUIDVH3GP_cjs.UserSettingsResource(this);
158
161
  this.billing = new chunkXSYNVD3X_cjs.BillingResource(this);
159
- this.uploads = new chunkUPGZTLK7_cjs.UploadsResource(this);
160
- this.library = new chunk2DZWWIJ4_cjs.LibraryResource(this);
161
- this.gallery = new chunkWUKIJJG2_cjs.GalleryResource(this);
162
+ this.surface = new chunkHFDTOEAL_cjs.SurfaceResource(this);
163
+ this.uploads = new chunkF6KAMECM_cjs.UploadsResource(this);
164
+ this.library = new chunkOI4RCW2J_cjs.LibraryResource(this);
165
+ this.gallery = new chunkW63ZKKYT_cjs.GalleryResource(this);
162
166
  this.presets = new chunkQ45PC4YD_cjs.PresetsResource(this);
163
167
  this.savedPosts = new chunkSYVNY3AH_cjs.SavedPostsResource(this);
164
168
  this.collections = new chunkWK4VXPPZ_cjs.CollectionsResource(this);
@@ -167,20 +171,20 @@ var NodaroClient = class _NodaroClient extends chunkGKTZHICS_cjs.NodaroClientCor
167
171
  this.competitors = new chunkYFS2LMG4_cjs.CompetitorsResource(this);
168
172
  this.pickerCatalogs = new chunkEP4J3TLQ_cjs.PickerCatalogsResource(this);
169
173
  this.catalogs = new chunkBPWUWUZ3_cjs.CatalogsResource(this);
170
- this.models = new chunk7QOCWJKD_cjs.ModelsResource(this);
174
+ this.models = new chunkRPV4QBHS_cjs.ModelsResource(this);
171
175
  this.shots = new chunkMBFUMWI5_cjs.ShotsResource(this);
172
176
  this.recast = new chunkKXEWTYS4_cjs.RecastResource(this);
173
- this.castSwap = new chunkC3LJ7HIH_cjs.CastSwapResource(this);
177
+ this.castSwap = new chunkS5BOU6JG_cjs.CastSwapResource(this);
174
178
  this.trends = new chunkHVF5DRGQ_cjs.TrendsResource(this);
175
179
  this.trendRadar = new chunkRKW3N463_cjs.TrendRadarResource(this);
176
- this.studio = new chunkYLXCXVYF_cjs.StudioResource(this);
177
- this.copilot = new chunkTBFA6QPH_cjs.CopilotResource(this);
180
+ this.studio = new chunkBETFYVOR_cjs.StudioResource(this);
181
+ this.copilot = new chunkTQLOD7OL_cjs.CopilotResource(this);
178
182
  this.community = new chunk43FVH6LJ_cjs.CommunityResource(this);
179
183
  this.templates = new chunkUIBYZNDR_cjs.TemplatesResource(this);
180
184
  this.tutorials = new chunkKMNSPC72_cjs.TutorialsResource(this);
181
185
  this.organizations = new chunkJ5LGGCAS_cjs.OrganizationsResource(this);
182
186
  this.workspaces = new chunkLKH5M44B_cjs.WorkspacesResource(this);
183
- this.edit = new chunkGRATHB3C_cjs.EditResource(this);
187
+ this.edit = new chunkW4KKCHJA_cjs.EditResource(this);
184
188
  }
185
189
  /**
186
190
  * A client that acts in `workspaceId`, sharing this one's auth and config.
@@ -211,5 +215,5 @@ function createClient(opts) {
211
215
 
212
216
  exports.NodaroClient = NodaroClient;
213
217
  exports.createClient = createClient;
214
- //# sourceMappingURL=chunk-BYFLERF3.cjs.map
215
- //# sourceMappingURL=chunk-BYFLERF3.cjs.map
218
+ //# sourceMappingURL=chunk-OET5W4QZ.cjs.map
219
+ //# sourceMappingURL=chunk-OET5W4QZ.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/client.ts"],"names":["NodaroClientCore","WorkflowsResource","ProjectsResource","SessionsResource","TrashResource","JobsResource","VideoProResource","ExecutionsResource","NodesResource","Scene3DResource","DeveloperAppsResource","OAuthResource","WebhooksResource","AppsResource","CharactersResource","LocationsResource","ObjectsResource","CreaturesResource","KeepersResource","PipelinesResource","ReduceResource","PromptHelperResource","VoicesResource","LlmResource","MediaResource","ContentRightsResource","AudioResource","CreditsResource","UserSettingsResource","BillingResource","SurfaceResource","UploadsResource","LibraryResource","GalleryResource","PresetsResource","SavedPostsResource","CollectionsResource","PalettesResource","MoodboardsResource","CompetitorsResource","PickerCatalogsResource","CatalogsResource","ModelsResource","ShotsResource","RecastResource","CastSwapResource","TrendsResource","TrendRadarResource","StudioResource","CopilotResource","CommunityResource","TemplatesResource","TutorialsResource","OrganizationsResource","WorkspacesResource","EditResource"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgEO,IAAM,YAAA,GAAN,MAAM,aAAA,SAAqBA,kCAAA,CAAiB;AAAA,EACxC,SAAA;AAAA,EACA,QAAA;AAAA;AAAA,EAEA,QAAA;AAAA;AAAA,EAEA,KAAA;AAAA,EACA,IAAA;AAAA,EACA,QAAA;AAAA,EACA,UAAA;AAAA,EACA,KAAA;AAAA,EACA,OAAA;AAAA,EACA,aAAA;AAAA,EACA,KAAA;AAAA;AAAA,EAEA,QAAA;AAAA,EACA,IAAA;AAAA,EACA,UAAA;AAAA,EACA,SAAA;AAAA,EACA,OAAA;AAAA,EACA,SAAA;AAAA;AAAA,EAEA,OAAA;AAAA,EACA,SAAA;AAAA,EACA,MAAA;AAAA,EACA,YAAA;AAAA,EACA,MAAA;AAAA,EACA,GAAA;AAAA,EACA,KAAA;AAAA;AAAA,EAEA,aAAA;AAAA,EACA,KAAA;AAAA,EACA,OAAA;AAAA;AAAA,EAEA,YAAA;AAAA;AAAA,EAEA,OAAA;AAAA;AAAA,EAEA,OAAA;AAAA,EACA,OAAA;AAAA,EACA,OAAA;AAAA;AAAA,EAEA,OAAA;AAAA,EACA,OAAA;AAAA,EACA,UAAA;AAAA,EACA,WAAA;AAAA;AAAA,EAEA,QAAA;AAAA;AAAA,EAEA,UAAA;AAAA,EACA,WAAA;AAAA,EACA,cAAA;AAAA,EACA,QAAA;AAAA,EACA,MAAA;AAAA,EACA,KAAA;AAAA,EACA,MAAA;AAAA;AAAA,EAEA,QAAA;AAAA;AAAA,EAEA,MAAA;AAAA;AAAA,EAEA,UAAA;AAAA,EACA,MAAA;AAAA,EACA,OAAA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,GAAY,IAAIC,mCAAA,CAAkB,IAAI,CAAA;AAC3C,IAAA,IAAA,CAAK,SAAA,GAAY,IAAIC,mCAAA,CAAkB,IAAI,CAAA;AAC3C,IAAA,IAAA,CAAK,aAAA,GAAgB,IAAIC,uCAAA,CAAsB,IAAI,CAAA;AACnD,IAAA,IAAA,CAAK,UAAA,GAAa,IAAIC,oCAAA,CAAmB,IAAI,CAAA;AAC7C,IAAA,IAAA,CAAK,IAAA,GAAO,IAAIC,8BAAA,CAAa,IAAI,CAAA;AAAA,EACnC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAaA,cAAc,WAAA,EAA0C;AAMtD,IAAA,MAAM,aAAA,GAAgB,KAAK,eAAe,CAAA;AAC1C,IAAA,OAAO,IAAI,aAAA,CAAa;AAAA,MACtB,SAAS,IAAA,CAAK,OAAA;AAAA,MACd,MAAM,IAAA,CAAK,IAAA;AAAA,MACX,WAAW,IAAA,CAAK,SAAA;AAAA,MAChB,GAAI,aAAA,GAAgB,EAAE,KAAA,EAAO,aAAA,KAAkB,EAAC;AAAA,MAChD,GAAI,KAAK,kBAAkB,CAAA,GAAI,EAAE,WAAA,EAAa,IAAA,CAAK,WAAA,EAAY,GAAI,EAAC;AAAA,MACpE,GAAI,WAAA,GAAc,EAAE,WAAA,KAAgB;AAAC,KACtC,CAAA;AAAA,EACH;AACF;AAGO,SAAS,aAAa,IAAA,EAAmC;AAC9D,EAAA,OAAO,IAAI,aAAa,IAAI,CAAA;AAC9B","file":"chunk-OET5W4QZ.cjs","sourcesContent":["import { WorkflowsResource } from \"./resources/workflows.js\"\nimport { ProjectsResource } from \"./resources/projects.js\"\nimport { SessionsResource } from \"./resources/sessions.js\"\nimport { TrashResource } from \"./resources/trash.js\"\nimport { JobsResource } from \"./resources/jobs.js\"\nimport { VideoProResource } from \"./resources/video-pro.js\"\nimport { ExecutionsResource } from \"./resources/executions.js\"\nimport { NodesResource } from \"./resources/nodes.js\"\nimport { Scene3DResource } from \"./resources/scene3d.js\"\nimport { DeveloperAppsResource } from \"./resources/developer-apps.js\"\nimport { OAuthResource } from \"./resources/oauth.js\"\nimport { WebhooksResource } from \"./resources/webhooks.js\"\nimport { AppsResource } from \"./resources/apps.js\"\nimport { CharactersResource } from \"./resources/characters.js\"\nimport { LocationsResource } from \"./resources/locations.js\"\nimport { ObjectsResource } from \"./resources/objects.js\"\nimport { CreaturesResource } from \"./resources/creatures.js\"\nimport { KeepersResource } from \"./resources/keepers.js\"\nimport { PipelinesResource } from \"./resources/pipelines.js\"\nimport { ReduceResource } from \"./resources/reduce.js\"\nimport { PromptHelperResource } from \"./resources/prompt-helper.js\"\nimport { VoicesResource } from \"./resources/voices.js\"\nimport { LlmResource } from \"./resources/llm.js\"\nimport { MediaResource } from \"./resources/media.js\"\nimport { ContentRightsResource } from \"./resources/content-rights.js\"\nimport { AudioResource } from \"./resources/audio.js\"\nimport { CreditsResource } from \"./resources/credits.js\"\nimport { BillingResource } from \"./resources/billing.js\"\nimport { UserSettingsResource } from \"./resources/user-settings.js\"\nimport { SurfaceResource } from \"./resources/surface.js\"\nimport { UploadsResource } from \"./resources/uploads.js\"\nimport { LibraryResource } from \"./resources/library.js\"\nimport { GalleryResource } from \"./resources/gallery.js\"\nimport { PresetsResource } from \"./resources/node-presets.js\"\nimport { SavedPostsResource } from \"./resources/saved-posts.js\"\nimport { CollectionsResource } from \"./resources/collections.js\"\nimport { PalettesResource } from \"./resources/palettes.js\"\nimport { MoodboardsResource } from \"./resources/moodboards.js\"\nimport { CompetitorsResource } from \"./resources/competitors.js\"\nimport { PickerCatalogsResource } from \"./resources/picker-catalogs.js\"\nimport { CatalogsResource } from \"./resources/catalogs.js\"\nimport { ModelsResource } from \"./resources/models.js\"\nimport { ShotsResource } from \"./resources/shots.js\"\nimport { RecastResource } from \"./resources/recast.js\"\nimport { CastSwapResource } from \"./resources/cast-swap.js\"\nimport { TrendsResource } from \"./resources/trends.js\"\nimport { TrendRadarResource } from \"./resources/trend-radar.js\"\nimport { StudioResource } from \"./resources/studio.js\"\nimport { CopilotResource } from \"./resources/copilot.js\"\nimport { CommunityResource } from \"./resources/community.js\"\nimport { TemplatesResource } from \"./resources/templates.js\"\nimport { TutorialsResource } from \"./resources/tutorials.js\"\nimport { OrganizationsResource } from \"./resources/organizations.js\"\nimport { WorkspacesResource } from \"./resources/workspaces.js\"\nimport { EditResource } from \"./resources/edit.js\"\nimport { NodaroClientCore, type ClientOptions } from \"./core.js\"\n\nexport { CLIENT_HEADER } from \"./core.js\"\nexport type { ClientOptions, UserIdentity, ConnectedApp } from \"./core.js\"\n\n/**\n * The full client: the core (`./core.ts` — config, transport, identity) and\n * every resource.\n */\nexport class NodaroClient extends NodaroClientCore {\n readonly workflows: WorkflowsResource\n readonly projects: ProjectsResource\n /** Generation sessions inside projects (Create Image / Video / Music). */\n readonly sessions: SessionsResource\n /** Your Trash: items removed from sessions and deleted jobs. */\n readonly trash: TrashResource\n readonly jobs: JobsResource\n readonly videoPro: VideoProResource\n readonly executions: ExecutionsResource\n readonly nodes: NodesResource\n readonly scene3d: Scene3DResource\n readonly developerApps: DeveloperAppsResource\n readonly oauth: OAuthResource\n /** Outbound webhooks: endpoints that receive your job.completed / job.failed. */\n readonly webhooks: WebhooksResource\n readonly apps: AppsResource\n readonly characters: CharactersResource\n readonly locations: LocationsResource\n readonly objects: ObjectsResource\n readonly creatures: CreaturesResource\n /** The shared Nodaro Keepers catalog of characters, creatures, locations and objects. */\n readonly keepers: KeepersResource\n readonly pipelines: PipelinesResource\n readonly reduce: ReduceResource\n readonly promptHelper: PromptHelperResource\n readonly voices: VoicesResource\n readonly llm: LlmResource\n readonly media: MediaResource\n /** Content rights: the declaration confirmed before a link is imported, and the confirmation a download carries. */\n readonly contentRights: ContentRightsResource\n readonly audio: AudioResource\n readonly credits: CreditsResource\n /** The signed-in person's own settings (the interface language, the monthly statement opt-in, …). */\n readonly userSettings: UserSettingsResource\n /** Plans and prices, the subscription, and how this deployment bills. */\n readonly billing: BillingResource\n /** What this deployment offers the caller: node types, models and the worlds of the shared header. */\n readonly surface: SurfaceResource\n readonly uploads: UploadsResource\n readonly library: LibraryResource\n /** The public gallery and your favorites. */\n readonly gallery: GalleryResource\n readonly presets: PresetsResource\n readonly savedPosts: SavedPostsResource\n readonly collections: CollectionsResource\n /** Your colour palettes — a generate-image direction (`direction.colorLook: paletteDirectionId(id)`). */\n readonly palettes: PalettesResource\n /** Your moodboards — a generate-image direction (`direction.style: moodboardDirectionId(id)`). */\n readonly moodboards: MoodboardsResource\n readonly competitors: CompetitorsResource\n readonly pickerCatalogs: PickerCatalogsResource\n readonly catalogs: CatalogsResource\n readonly models: ModelsResource\n readonly shots: ShotsResource\n readonly recast: RecastResource\n /** Cast Swap: replace the people and/or location in a short video (Cloud). */\n readonly castSwap: CastSwapResource\n /** Trends: ready-made Cast Swap recipes you fill with your own pictures (Cloud). */\n readonly trends: TrendsResource\n /** Trend Radar: the daily run's candidate trends and the admin's decisions (Cloud, admin session only). */\n readonly trendRadar: TrendRadarResource\n readonly studio: StudioResource\n readonly copilot: CopilotResource\n readonly community: CommunityResource\n readonly templates: TemplatesResource\n readonly tutorials: TutorialsResource\n readonly organizations: OrganizationsResource\n readonly workspaces: WorkspacesResource\n readonly edit: EditResource\n\n constructor(opts: ClientOptions) {\n super(opts)\n\n this.workflows = new WorkflowsResource(this)\n this.projects = new ProjectsResource(this)\n this.sessions = new SessionsResource(this)\n this.trash = new TrashResource(this)\n this.jobs = new JobsResource(this)\n this.videoPro = new VideoProResource(this)\n this.executions = new ExecutionsResource(this)\n this.nodes = new NodesResource(this)\n this.scene3d = new Scene3DResource(this)\n this.developerApps = new DeveloperAppsResource(this)\n this.oauth = new OAuthResource(this)\n this.webhooks = new WebhooksResource(this)\n this.apps = new AppsResource(this)\n this.characters = new CharactersResource(this)\n this.locations = new LocationsResource(this)\n this.objects = new ObjectsResource(this)\n this.creatures = new CreaturesResource(this)\n this.keepers = new KeepersResource(this)\n this.pipelines = new PipelinesResource(this)\n this.reduce = new ReduceResource(this)\n this.promptHelper = new PromptHelperResource(this)\n this.voices = new VoicesResource(this)\n this.llm = new LlmResource(this)\n this.media = new MediaResource(this)\n this.contentRights = new ContentRightsResource(this)\n this.audio = new AudioResource(this)\n this.credits = new CreditsResource(this)\n this.userSettings = new UserSettingsResource(this)\n this.billing = new BillingResource(this)\n this.surface = new SurfaceResource(this)\n this.uploads = new UploadsResource(this)\n this.library = new LibraryResource(this)\n this.gallery = new GalleryResource(this)\n this.presets = new PresetsResource(this)\n this.savedPosts = new SavedPostsResource(this)\n this.collections = new CollectionsResource(this)\n this.palettes = new PalettesResource(this)\n this.moodboards = new MoodboardsResource(this)\n this.competitors = new CompetitorsResource(this)\n this.pickerCatalogs = new PickerCatalogsResource(this)\n this.catalogs = new CatalogsResource(this)\n this.models = new ModelsResource(this)\n this.shots = new ShotsResource(this)\n this.recast = new RecastResource(this)\n this.castSwap = new CastSwapResource(this)\n this.trends = new TrendsResource(this)\n this.trendRadar = new TrendRadarResource(this)\n this.studio = new StudioResource(this)\n this.copilot = new CopilotResource(this)\n this.community = new CommunityResource(this)\n this.templates = new TemplatesResource(this)\n this.tutorials = new TutorialsResource(this)\n this.organizations = new OrganizationsResource(this)\n this.workspaces = new WorkspacesResource(this)\n this.edit = new EditResource(this)\n }\n\n /**\n * A client that acts in `workspaceId`, sharing this one's auth and config.\n *\n * A NEW client rather than a setter, deliberately. A mutable selection is\n * the bug this whole axis exists to prevent: two concurrent operations\n * against one client would race over which workspace they were in, and the\n * loser would create work in the wrong place with nothing failing. A\n * per-workspace client cannot be raced.\n *\n * Pass `null` for the personal space.\n */\n withWorkspace(workspaceId: string | null): NodaroClient {\n // The two private settings are read by bracket access, which TypeScript\n // allows on a subclass and which adds no member to the declarations. Read\n // through `this` (not a side table keyed by the instance), so a client\n // wrapped in a Proxy (Vue/Pinia `reactive()`) or reached through\n // `Object.create(client)` still works.\n const fetchOverride = this[\"fetchOverride\"]\n return new NodaroClient({\n baseUrl: this.baseUrl,\n auth: this.auth,\n timeoutMs: this.timeoutMs,\n ...(fetchOverride ? { fetch: fetchOverride } : {}),\n ...(this[\"sendClientHeader\"] ? { clientLabel: this.clientLabel } : {}),\n ...(workspaceId ? { workspaceId } : {}),\n })\n }\n}\n\n/** Factory function — preferred entry point. */\nexport function createClient(opts: ClientOptions): NodaroClient {\n return new NodaroClient(opts)\n}\n"]}
@@ -28,5 +28,5 @@ var LibraryResource = class {
28
28
  };
29
29
 
30
30
  exports.LibraryResource = LibraryResource;
31
- //# sourceMappingURL=chunk-2DZWWIJ4.cjs.map
32
- //# sourceMappingURL=chunk-2DZWWIJ4.cjs.map
31
+ //# sourceMappingURL=chunk-OI4RCW2J.cjs.map
32
+ //# sourceMappingURL=chunk-OI4RCW2J.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/resources/library.ts"],"names":[],"mappings":";;;AAsGO,IAAM,kBAAN,MAAsB;AAAA,EAC3B,YAAoB,MAAA,EAA0B;AAA1B,IAAA,IAAA,CAAA,MAAA,GAAA,MAAA;AAAA,EAA2B;AAAA,EAA3B,MAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EASpB,IAAA,CAAK,MAAA,GAA4B,EAAC,EAA+B;AAC/D,IAAA,MAAM,EAAA,GAAK,IAAI,eAAA,EAAgB;AAC/B,IAAA,IAAI,OAAO,IAAA,EAAM,EAAA,CAAG,GAAA,CAAI,MAAA,EAAQ,OAAO,IAAI,CAAA;AAG3C,IAAA,IAAI,OAAO,CAAA,EAAG,EAAA,CAAG,GAAA,CAAI,GAAA,EAAK,OAAO,CAAC,CAAA;AAAA,SAAA,IACzB,OAAO,MAAA,EAAQ,EAAA,CAAG,GAAA,CAAI,QAAA,EAAU,OAAO,MAAM,CAAA;AACtD,IAAA,IAAI,MAAA,CAAO,UAAU,MAAA,EAAW,EAAA,CAAG,IAAI,OAAA,EAAS,MAAA,CAAO,MAAA,CAAO,KAAK,CAAC,CAAA;AACpE,IAAA,IAAI,OAAO,MAAA,EAAQ,EAAA,CAAG,GAAA,CAAI,QAAA,EAAU,OAAO,MAAM,CAAA;AACjD,IAAA,IAAI,MAAA,CAAO,UAAU,MAAA,EAAW,EAAA,CAAG,IAAI,OAAA,EAAS,MAAA,CAAO,MAAA,CAAO,KAAK,CAAC,CAAA;AACpE,IAAA,IAAI,OAAO,MAAA,EAAQ,EAAA,CAAG,GAAA,CAAI,QAAA,EAAU,OAAO,MAAM,CAAA;AACjD,IAAA,MAAM,KAAA,GAAQ,GAAG,QAAA,EAAS;AAC1B,IAAA,OAAO,IAAA,CAAK,MAAA,CAAO,OAAA,CAAQ,KAAA,EAAO,CAAA,WAAA,EAAc,QAAQ,CAAA,CAAA,EAAI,KAAK,CAAA,CAAA,GAAK,EAAE,CAAA,CAAE,CAAA;AAAA,EAC5E;AACF","file":"chunk-OI4RCW2J.cjs","sourcesContent":["import type { NodaroClientCore } from \"../core.js\"\n\n/**\n * A media asset in the caller's library (`GET /v1/library`). Mirrors the route's\n * camelCase row shape (`backend/src/routes/library.ts`), the source of truth —\n * keep in sync if that response changes. Covers BOTH uploaded files and saved\n * generations; `type` discriminates the media kind.\n */\nexport interface LibraryAsset {\n readonly id: string\n /** Media kind — filter the list with the same values via `type`. */\n readonly type: \"image\" | \"video\" | \"audio\"\n /** Display filename (server override or the original); `null` if unknown. */\n readonly filename: string | null\n readonly mimeType: string | null\n readonly sizeBytes: number | null\n /** Public R2 URL of the asset. */\n readonly url: string\n /** Generated thumbnail URL (images/video); `null` for audio or when absent. */\n readonly thumbnailUrl: string | null\n readonly metadata: Record<string, unknown>\n /** True when promoted to the shared (admin) library. */\n readonly isLibraryItem: boolean\n /** How the asset entered storage (e.g. \"manual_upload\" | \"generated\"). */\n readonly uploadSource: string\n /**\n * WHICH SURFACE the media came from — `\"internal\" | \"mcp\" | \"app\" | \"cli\" |\n * \"sdk\" | \"extension\" | \"web\" | \"api\"`. Distinct from `uploadSource`, which\n * says how it entered storage (uploaded vs generated), not who was calling.\n * `null` on assets created before origin tracking existed — render as\n * \"unknown\", don't infer.\n */\n readonly source: string | null\n /** Specific identity within `source` (origin host, `extension/<name>`, `sdk/<version>`, MCP client, app id). */\n readonly sourceDetail: string | null\n /**\n * The job that made the file, when known: `null` for an upload or once that\n * job's history was deleted. Optional because servers before this field\n * leave it out.\n */\n readonly jobId?: string | null\n /**\n * The name the owner gave the job that made the file\n * (`client.jobs.rename`), or `null` when it is unnamed or there is no job\n * (an upload). Not the file's `filename`. Absent from an older server.\n */\n readonly title?: string | null\n readonly createdAt: string\n}\n\nexport interface ListLibraryParams {\n /** Filter by media kind; `\"all\"` (default) returns every kind. */\n readonly type?: \"all\" | \"image\" | \"video\" | \"audio\"\n /**\n * Search words: only the assets whose filename contains every word (split\n * on spaces, the first 5), ignoring case. Each word is matched as written\n * (`%`, `_` and `*` are not wildcards); blank means no search; up to 200\n * characters.\n */\n readonly q?: string\n /**\n * @deprecated Use `q`. The original name of the filename search, still\n * accepted; when both are given, `q` is sent and `search` is not.\n */\n readonly search?: string\n /** Page size, 1–100 (default 40). */\n readonly limit?: number\n /** Opaque cursor from a prior page's `nextCursor` (fetches the next page). */\n readonly cursor?: string\n /**\n * `true` → EVERY asset the caller owns (the \"Storage\" view: uploads +\n * generations, regardless of the in-library flag). `false` (default) → only\n * assets explicitly saved to the library plus shared items (the in-editor\n * Media Library picker).\n */\n readonly owned?: boolean\n /**\n * Filter to media that originated from one surface (see\n * {@link LibraryAsset.source}) — e.g. `\"extension\"` for everything a\n * browser extension produced. Assets predating origin tracking have a null\n * source and match no value, so they appear only when this is omitted.\n */\n readonly source?: \"internal\" | \"mcp\" | \"app\" | \"cli\" | \"sdk\" | \"extension\" | \"web\" | \"api\"\n}\n\nexport interface ListLibraryResult {\n readonly data: LibraryAsset[]\n /** Pass back as `cursor` for the next page; `null` when there are no more. */\n readonly nextCursor: string | null\n /** Exact total (first page only — omitted on cursor-paged requests). */\n readonly totalCount?: number\n}\n\n/**\n * Library — the caller's media assets (uploaded files + saved generations).\n *\n * Read surface over `GET /v1/library`: a cursor-paginated, type-filterable,\n * filename-searchable list. This is the \"bring from your media\" source for\n * pickers that also offer upload + in-production stills. Writes (saving a\n * generation, promoting/removing) stay on their dedicated routes — not exposed\n * here until a consumer needs them.\n */\nexport class LibraryResource {\n constructor(private client: NodaroClientCore) {}\n\n /**\n * `GET /v1/library` → a page of the caller's media assets (newest first) plus\n * a `nextCursor`. Pass the returned `nextCursor` back as `cursor` for the next\n * page. Filter by `type` and search the filename with `q`; `owned: true`\n * returns the full Storage set (uploads + generations), the default only\n * library-saved + shared items.\n */\n list(params: ListLibraryParams = {}): Promise<ListLibraryResult> {\n const qs = new URLSearchParams()\n if (params.type) qs.set(\"type\", params.type)\n // `search` alone keeps its own name on the wire, so a server older than\n // `q` still filters.\n if (params.q) qs.set(\"q\", params.q)\n else if (params.search) qs.set(\"search\", params.search)\n if (params.limit !== undefined) qs.set(\"limit\", String(params.limit))\n if (params.cursor) qs.set(\"cursor\", params.cursor)\n if (params.owned !== undefined) qs.set(\"owned\", String(params.owned))\n if (params.source) qs.set(\"source\", params.source)\n const query = qs.toString()\n return this.client.request(\"GET\", `/v1/library${query ? `?${query}` : \"\"}`)\n }\n}\n"]}
@@ -76,5 +76,5 @@ var AppsResource = class {
76
76
  };
77
77
 
78
78
  export { AppsResource };
79
- //# sourceMappingURL=chunk-7LODCIQK.js.map
80
- //# sourceMappingURL=chunk-7LODCIQK.js.map
79
+ //# sourceMappingURL=chunk-OJHJBNJZ.js.map
80
+ //# sourceMappingURL=chunk-OJHJBNJZ.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/resources/apps.ts"],"names":[],"mappings":";AAoPO,IAAM,eAAN,MAAmB;AAAA,EACxB,YAAoB,MAAA,EAA0B;AAA1B,IAAA,IAAA,CAAA,MAAA,GAAA,MAAA;AAAA,EAA2B;AAAA,EAA3B,MAAA;AAAA;AAAA,EAGpB,IAAA,CA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AAA,GAAY,EAAE,OAAA,EAAS,IAAA,CAAK,OAAA,EAAQ,GAAI;AAAC;AAChE;AACF,KACF;AAAA,EACF;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAUA,SAAA,CAAU,MAAc,KAAA,EAA4C;AAClE,IAAA,OAAO,KAAK,MAAA,CAAO,OAAA;AAAA,MACjB,QAAA;AAAA,MACA,WAAW,kBAAA,CAAmB,IAAI,CAAC,CAAA,MAAA,EAAS,kBAAA,CAAmB,KAAK,CAAC,CAAA;AAAA,KACvE;AAAA,EACF;AACF","file":"chunk-7LODCIQK.js","sourcesContent":["import type { NodaroClientCore } from \"../core.js\"\n\n/**\n * A published app — a workflow wrapped in a curated input/output presentation.\n * Returned by the public `/v1/apps/browse` endpoint.\n */\nexport interface PublishedApp {\n id: string\n slug: string\n name: string\n description?: string | null\n creatorId: string\n creatorName?: string | null\n thumbnailUrl?: string | null\n category?: string | null\n isFeatured?: boolean\n runCount?: number\n /** The listed price per run; when `perMinuteCredits` is above 0, its fixed part. */\n estimatedCredits?: number | null\n /** The listed price holds a metered LLM call's ESTIMATE (its model's typical\n * call, charged its actual usage per token): show it `≈N`. Absent for a\n * fixed price, and on a deployment running the tier-pricing rollback. */\n estimatedCreditsIsEstimate?: true\n /**\n * Credits per minute of the recording the app is given, when its price\n * follows that recording's length: the price is `estimatedCredits` plus\n * this per minute. 0 or absent when the price does not depend on a\n * recording's length.\n */\n perMinuteCredits?: number\n /**\n * Credits for each item beyond the creator's saved items of a list input\n * the app's user fills: the price is the listed one plus this per further\n * item. 0 or absent when the app has no such input.\n */\n perItemCredits?: number\n /**\n * The listed price is a range: `estimatedCredits` (with `perMinuteCredits` /\n * `perItemCredits`) is \"from\" — the app's saved settings — and these are\n * \"up to\": the most a run can cost over the choices the app's user has (every\n * exposed field, at the creator's restricted values where set). Present only\n * when they differ from \"from\"; absent on an app published before the range\n * existed until its next publish.\n */\n maxEstimatedCredits?: number\n maxPerMinuteCredits?: number\n maxPerItemCredits?: number\n createdAt: string\n updatedAt: string\n}\n\nexport interface ListAppsParams {\n /** Substring search across app name + description. */\n search?: string\n /** Page size; backend caps at 50. */\n limit?: number\n /** Cursor token returned by the previous page. */\n cursor?: string\n /** Filter to a single category slug. */\n category?: string\n}\n\nexport interface ListAppsResult {\n data: PublishedApp[]\n nextCursor?: string | null\n}\n\n/**\n * App detail — includes the input schema (required + optional fields end users\n * fill in) and the output mapping (which workflow nodes produce which display\n * cards).\n */\nexport interface PublishedAppDetail extends PublishedApp {\n inputSchema: Record<string, unknown>\n outputs: Array<{ nodeId: string; label: string; type: string }>\n /**\n * The app run alone: the listed price less its Render final part (run and\n * charged separately) — fixed, per minute of the recording and per further\n * list item. Absent from a server that predates them; read the listed\n * `estimatedCredits` / `perMinuteCredits` / `perItemCredits` instead.\n */\n runEstimatedCredits?: number\n runPerMinuteCredits?: number\n runPerItemCredits?: number\n /**\n * Whether this server charges Edit Plan per started minute of the recording\n * (otherwise in 15/30/60/90/120/180-minute steps). Absent from a server that\n * predates it: read it as the steps.\n */\n editPlanPerMinute?: boolean\n}\n\nexport interface AppRunResult {\n /** The execution-id that was started — poll via client.executions.get(). */\n executionId: string\n status: \"pending\" | \"running\"\n /** App-run id (distinct from executionId — used by listRuns/getRun). */\n runId?: string\n}\n\nexport interface AppRun {\n id: string\n appSlug: string\n executionId: string\n status: \"pending\" | \"running\" | \"completed\" | \"failed\" | \"cancelled\"\n inputs: Record<string, unknown>\n outputs?: Array<{ nodeId: string; type: string; url?: string; text?: string }>\n startedAt: string\n finishedAt?: string | null\n}\n\nexport interface ListAppRunsParams {\n limit?: number\n cursor?: string\n}\n\n/**\n * Result of a soft-delete (archive) operation. The run is moved to the user's\n * archive in the Nodaro UI; restoration and permanent deletion are UI-only by\n * design — SDK / MCP / API delete callers can't accidentally destroy data.\n */\nexport interface DeleteAppRunResult {\n success: true\n archived: true\n}\n\n/** Advanced per-run options for `apps.run`. */\nexport interface RunAppOptions {\n /**\n * Raw node-data overrides keyed by node id → field → value, merged onto the\n * app's workflow for THIS run only. Reaches fields that are NOT exposed as app\n * inputs — e.g. `{ [nodeId]: { promptPrefix: \"…\", promptSuffix: \"…\" } }` to\n * wrap the end user's prompt with text they never see.\n */\n inputOverrides?: Record<string, Record<string, unknown>>\n}\n\n/** Options for `apps.resume` — the Retry of a failed app run. */\nexport interface ResumeAppRunOptions {\n /** Answer what the Retry would run and charge, and start nothing. */\n dryRun?: boolean\n /**\n * The app version you expect the Retry to run — the one starting over would\n * run. Absent: the app's latest. A run of another version is refused with\n * `app_run_version_changed`; send the run's own version (the refusal's\n * `runVersion`) to continue on it anyway.\n */\n version?: number\n}\n\n/** One step a Retry runs again. */\nexport interface AppRunResumeStep {\n nodeId: string\n type: string\n /** The node's label, or `null` when it has none. */\n label: string | null\n}\n\n/** What a Retry would do (`apps.resume(…, { dryRun: true })`); nothing is started. */\nexport interface AppRunResumePlan {\n runId: string\n /** The failed execution the Retry continues. */\n continuesExecutionId: string\n /** The app version the Retry runs (the run's own). */\n appVersion: number | null\n /** Every node the Retry runs, in graph order. */\n nodeIds: string[]\n /** The steps that run again. */\n steps: AppRunResumeStep[]\n /** What the Retry is expected to charge, the creator's fee included; `null` without credits. */\n estimatedCredits: number | null\n /** Clips handed back at no cost. */\n reusedClips: number\n /** Whether your balance and your app credits cover what the Retry holds while it runs; `null` without credits. */\n sufficient: boolean | null\n /** Your spendable balance; `null` without credits. */\n available: number | null\n /** Your app credits, present only when they are what stops the Retry (it would be refused `insufficient_app_credits`). */\n appCreditsAllowance?: number\n}\n\n/**\n * A Retry that started. `deduped: true` when a concurrent double press reached\n * the same Retry; a second call made while the first is pending is refused\n * with `already_running` (`AlreadyRunningError`) instead.\n */\nexport interface AppRunResumeResult {\n /** The Retry's execution — the run now points at it. Poll via client.executions.get(). */\n executionId: string\n runId: string\n status: \"pending\"\n /** Every node the Retry runs. */\n nodeIds: string[]\n /** `true` when a concurrent press had already started this Retry. */\n deduped?: true\n}\n\n/**\n * The `code` the server gives an `apps.resume` refusal. Nothing is written or\n * billed when a Retry is refused. How each arrives:\n * - `app_run_version_changed` as `AppRunVersionChangedError`;\n * - `already_running` as `AlreadyRunningError` (with the live `executionId`);\n * - `not_found` and `continuation_not_found` as `NotFoundError`, whose `code`\n * is always `not_found` (the server's message is kept);\n * - `insufficient_credits` and `insufficient_app_credits` as\n * `InsufficientCreditsError`, whose `code` is always `insufficient_credits`\n * (the server's message says which);\n * - the rest as `NodaroError` carrying this code.\n */\nexport type AppRunResumeRefusalCode =\n /** No such run of yours under this app. */\n | \"not_found\"\n /** The run's execution is not yours. */\n | \"continuation_not_found\"\n /** A malformed run id or body, or a component's run (continued by the run that called it). */\n | \"validation_error\"\n /** The app version the run ran is gone: start the run over. */\n | \"app_run_version_unavailable\"\n /** The app is on another version than the run ran: start over, or send `version` = the run's. */\n | \"app_run_version_changed\"\n /** The run's execution ran another workflow, or another version of it (rare). */\n | \"continuation_workflow_mismatch\"\n | \"continuation_version_mismatch\"\n /** The run did not fail (it completed or was stopped): start it over. */\n | \"continuation_not_failed\"\n /** The run is still running, a Retry of it is pending, or it was started again elsewhere. */\n | \"already_running\"\n /** Nothing is left to retry: every step completed (409), or the app runs no step (400). */\n | \"continuation_subset_required\"\n /** An input the run applied sets a field the app does not let a runner set. */\n | \"locked_field\"\n /**\n * The Retry would stop at a Preview with nobody to review it: retry it from the app page.\n * (The same refusal arrives under the other preview refusal codes when a review-on use-case\n * node holds the run; `isPreviewRefusalCode` in `@nodaro/shared/nodes` asks for all of them.)\n */\n | \"preview_review_required\"\n /** Your app credits cannot cover it. */\n | \"insufficient_app_credits\"\n /** Your balance cannot cover it. */\n | \"insufficient_credits\"\n /** Billing is briefly unavailable for a workspace run (503): try again shortly. */\n | \"billing_unavailable\"\n\nexport class AppsResource {\n constructor(private client: NodaroClientCore) {}\n\n /** List published apps. Public — no auth required for community apps. */\n list(params: ListAppsParams = {}): Promise<ListAppsResult> {\n const qs = new URLSearchParams()\n if (params.search) qs.set(\"search\", params.search)\n if (params.limit !== undefined) qs.set(\"limit\", String(params.limit))\n if (params.cursor) qs.set(\"cursor\", params.cursor)\n if (params.category) qs.set(\"category\", params.category)\n const query = qs.toString()\n return this.client.request(\"GET\", `/v1/apps/browse${query ? `?${query}` : \"\"}`)\n }\n\n /** Get one app's metadata + input schema by slug. */\n get(slug: string): Promise<{ data: PublishedAppDetail }> {\n return this.client.request(\"GET\", `/v1/app/${encodeURIComponent(slug)}`)\n }\n\n /**\n * Trigger an app run with the given input values. The keys in `inputs` must\n * match the app's input-schema field names (see `get(slug).inputSchema`).\n * `opts.inputOverrides` adds raw per-node overrides (see {@link RunAppOptions}).\n * Returns the execution-id for status polling via client.executions.get().\n */\n run(\n slug: string,\n inputs: Record<string, unknown> = {},\n opts: RunAppOptions = {},\n ): Promise<AppRunResult> {\n return this.client.request(\"POST\", `/v1/app/${encodeURIComponent(slug)}/run`, {\n body: { inputs, ...(opts.inputOverrides ? { inputOverrides: opts.inputOverrides } : {}) },\n })\n }\n\n /** List past runs for an app (the caller must own the app or the runs). */\n listRuns(slug: string, params: ListAppRunsParams = {}): Promise<{ data: AppRun[]; nextCursor?: string | null }> {\n const qs = new URLSearchParams()\n if (params.limit !== undefined) qs.set(\"limit\", String(params.limit))\n if (params.cursor) qs.set(\"cursor\", params.cursor)\n const query = qs.toString()\n return this.client.request(\n \"GET\",\n `/v1/app/${encodeURIComponent(slug)}/runs${query ? `?${query}` : \"\"}`,\n )\n }\n\n /** Get one app-run by id. */\n getRun(slug: string, runId: string): Promise<{ data: AppRun }> {\n return this.client.request(\n \"GET\",\n `/v1/app/${encodeURIComponent(slug)}/runs/${encodeURIComponent(runId)}`,\n )\n }\n\n /**\n * Retry a FAILED app run from where it stopped: only the steps it did not\n * complete run, and only those are charged; every step it completed hands\n * on its result. It runs the version the run ran, with the inputs the run\n * applied (it takes none of its own). The run's execution moves to the\n * Retry's.\n *\n * `{ dryRun: true }` answers what the Retry would run and charge\n * ({@link AppRunResumePlan}) and starts nothing — show it before a Retry.\n * Refusals are listed in {@link AppRunResumeRefusalCode}; to run with other\n * inputs or on the app's current version, start over with\n * `run(slug, inputs)` instead.\n *\n * @param slug The published app's slug.\n * @param runId The run's UUID (`AppRunResult.runId`, `AppRun.id`).\n */\n resume(slug: string, runId: string, opts: ResumeAppRunOptions & { dryRun: true }): Promise<{ data: AppRunResumePlan }>\n resume(slug: string, runId: string, opts?: ResumeAppRunOptions & { dryRun?: false }): Promise<AppRunResumeResult>\n resume(slug: string, runId: string, opts?: ResumeAppRunOptions): Promise<{ data: AppRunResumePlan } | AppRunResumeResult>\n resume(slug: string, runId: string, opts: ResumeAppRunOptions = {}): Promise<{ data: AppRunResumePlan } | AppRunResumeResult> {\n return this.client.request(\n \"POST\",\n `/v1/app/${encodeURIComponent(slug)}/runs/${encodeURIComponent(runId)}/resume`,\n {\n body: {\n ...(opts.dryRun ? { dryRun: true } : {}),\n ...(opts.version !== undefined ? { version: opts.version } : {}),\n },\n },\n )\n }\n\n /**\n * Archive (soft-delete) a published-app run. The run is hidden from the\n * default run list and can be restored or permanently deleted from the\n * archive view at https://app.nodaro.ai/archived-runs.\n *\n * @param slug The published app's slug (the last path segment of its URL).\n * @param runId The run's UUID.\n */\n deleteRun(slug: string, runId: string): Promise<DeleteAppRunResult> {\n return this.client.request(\n \"DELETE\",\n `/v1/app/${encodeURIComponent(slug)}/runs/${encodeURIComponent(runId)}`,\n )\n }\n}\n"]}
1
+ {"version":3,"sources":["../src/resources/apps.ts"],"names":[],"mappings":";AAqPO,IAAM,eAAN,MAAmB;AAAA,EACxB,YAAoB,MAAA,EAA0B;AAA1B,IAAA,IAAA,CAAA,MAAA,GAAA,MAAA;AAAA,EAA2B;AAAA,EAA3B,MAAA;AAAA;AAAA,EAGpB,IAAA,CAAK,MAAA,GAAyB,EAAC,EAA4B;AACzD,IAAA,MAAM,EAAA,GAAK,IAAI,eAAA,EAAgB;AAC/B,IAAA,IAAI,OAAO,MAAA,EAAQ,EAAA,CAA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;AAAA;AAAA;AAAA,EAUA,SAAA,CAAU,MAAc,KAAA,EAA4C;AAClE,IAAA,OAAO,KAAK,MAAA,CAAO,OAAA;AAAA,MACjB,QAAA;AAAA,MACA,WAAW,kBAAA,CAAmB,IAAI,CAAC,CAAA,MAAA,EAAS,kBAAA,CAAmB,KAAK,CAAC,CAAA;AAAA,KACvE;AAAA,EACF;AACF","file":"chunk-OJHJBNJZ.js","sourcesContent":["import type { NodaroClientCore } from \"../core.js\"\n\n/**\n * A published app — a workflow wrapped in a curated input/output presentation.\n * Returned by the public `/v1/apps/browse` endpoint.\n */\nexport interface PublishedApp {\n id: string\n slug: string\n name: string\n description?: string | null\n creatorId: string\n creatorName?: string | null\n thumbnailUrl?: string | null\n category?: string | null\n isFeatured?: boolean\n runCount?: number\n /** The listed price per run; when `perMinuteCredits` is above 0, its fixed part. */\n estimatedCredits?: number | null\n /** The listed price holds a metered LLM call's ESTIMATE (its model's typical\n * call, charged its actual usage per token): show it `≈N`. Absent for a\n * fixed price, and on a deployment running the tier-pricing rollback. */\n estimatedCreditsIsEstimate?: true\n /**\n * Credits per minute of the recording the app is given, when its price\n * follows that recording's length: the price is `estimatedCredits` plus\n * this per minute. 0 or absent when the price does not depend on a\n * recording's length.\n */\n perMinuteCredits?: number\n /**\n * Credits for each item beyond the creator's saved items of a list input\n * the app's user fills: the price is the listed one plus this per further\n * item. 0 or absent when the app has no such input.\n */\n perItemCredits?: number\n /**\n * The listed price is a range: `estimatedCredits` (with `perMinuteCredits` /\n * `perItemCredits`) is \"from\" — the app's saved settings — and these are\n * \"up to\": the most a run can cost over the choices the app's user has (every\n * exposed field, at the creator's restricted values where set). Present only\n * when they differ from \"from\"; absent on an app published before the range\n * existed until its next publish.\n */\n maxEstimatedCredits?: number\n maxPerMinuteCredits?: number\n maxPerItemCredits?: number\n createdAt: string\n updatedAt: string\n}\n\nexport interface ListAppsParams {\n /** Substring search across app name + description. */\n search?: string\n /** Page size; backend caps at 50. */\n limit?: number\n /** Cursor token returned by the previous page. */\n cursor?: string\n /** Filter to a single category slug. */\n category?: string\n}\n\nexport interface ListAppsResult {\n data: PublishedApp[]\n nextCursor?: string | null\n}\n\n/**\n * App detail — includes the input schema (required + optional fields end users\n * fill in) and the output mapping (which workflow nodes produce which display\n * cards).\n */\nexport interface PublishedAppDetail extends PublishedApp {\n inputSchema: Record<string, unknown>\n outputs: Array<{ nodeId: string; label: string; type: string }>\n /**\n * The app run alone: the listed price less its Render final part (run and\n * charged separately) — fixed, per minute of the recording and per further\n * list item. Absent from a server that predates them; read the listed\n * `estimatedCredits` / `perMinuteCredits` / `perItemCredits` instead.\n */\n runEstimatedCredits?: number\n runPerMinuteCredits?: number\n runPerItemCredits?: number\n /**\n * Whether this server charges Edit Plan per started minute of the recording\n * (otherwise in 15/30/60/90/120/180-minute steps). Absent from a server that\n * predates it: read it as the steps.\n */\n editPlanPerMinute?: boolean\n}\n\nexport interface AppRunResult {\n /** The execution-id that was started — poll via client.executions.get(). */\n executionId: string\n status: \"pending\" | \"running\"\n /** App-run id (distinct from executionId — used by listRuns/getRun). */\n runId?: string\n}\n\nexport interface AppRun {\n id: string\n appSlug: string\n executionId: string\n status: \"pending\" | \"running\" | \"completed\" | \"failed\" | \"cancelled\"\n inputs: Record<string, unknown>\n outputs?: Array<{ nodeId: string; type: string; url?: string; text?: string }>\n startedAt: string\n finishedAt?: string | null\n}\n\nexport interface ListAppRunsParams {\n limit?: number\n cursor?: string\n}\n\n/**\n * Result of a soft-delete (archive) operation. The run is moved to the user's\n * archive in the Nodaro UI; restoration and permanent deletion are UI-only by\n * design — SDK / MCP / API delete callers can't accidentally destroy data.\n */\nexport interface DeleteAppRunResult {\n success: true\n archived: true\n}\n\n/** Advanced per-run options for `apps.run`. */\nexport interface RunAppOptions {\n /**\n * Raw node-data overrides keyed by node id → field → value, merged onto the\n * app's workflow for THIS run only. Reaches fields that are NOT exposed as app\n * inputs — e.g. `{ [nodeId]: { promptPrefix: \"…\", promptSuffix: \"…\" } }` to\n * wrap the end user's prompt with text they never see.\n */\n inputOverrides?: Record<string, Record<string, unknown>>\n}\n\n/** Options for `apps.resume` — the Retry of a failed app run. */\nexport interface ResumeAppRunOptions {\n /** Answer what the Retry would run and charge, and start nothing. */\n dryRun?: boolean\n /**\n * The app version you expect the Retry to run — the one starting over would\n * run. Absent: the app's latest. A run of another version is refused with\n * `app_run_version_changed`; send the run's own version (the refusal's\n * `runVersion`) to continue on it anyway.\n */\n version?: number\n}\n\n/** One step a Retry runs again. */\nexport interface AppRunResumeStep {\n nodeId: string\n type: string\n /** The node's label, or `null` when it has none. */\n label: string | null\n}\n\n/** What a Retry would do (`apps.resume(…, { dryRun: true })`); nothing is started. */\nexport interface AppRunResumePlan {\n runId: string\n /** The failed execution the Retry continues. */\n continuesExecutionId: string\n /** The app version the Retry runs (the run's own). */\n appVersion: number | null\n /** Every node the Retry runs, in graph order. */\n nodeIds: string[]\n /** The steps that run again. */\n steps: AppRunResumeStep[]\n /** What the Retry is expected to charge, the creator's fee included; `null` without credits. */\n estimatedCredits: number | null\n /** Clips handed back at no cost. */\n reusedClips: number\n /** Whether your balance and your app credits cover what the Retry holds while it runs; `null` without credits. */\n sufficient: boolean | null\n /** Your spendable balance; `null` without credits. */\n available: number | null\n /** Your app credits, present only when they are what stops the Retry (it would be refused `insufficient_app_credits`). */\n appCreditsAllowance?: number\n}\n\n/**\n * A Retry that started. `deduped: true` when a concurrent double press reached\n * the same Retry; a second call made while the first is pending is refused\n * with `already_running` (`AlreadyRunningError`) instead.\n */\nexport interface AppRunResumeResult {\n /** The Retry's execution — the run now points at it. Poll via client.executions.get(). */\n executionId: string\n runId: string\n status: \"pending\"\n /** Every node the Retry runs. */\n nodeIds: string[]\n /** `true` when a concurrent press had already started this Retry. */\n deduped?: true\n}\n\n/**\n * The `code` the server gives an `apps.resume` refusal. Nothing is written or\n * billed when a Retry is refused. How each arrives:\n * - `app_run_version_changed` as `AppRunVersionChangedError`;\n * - `already_running` as `AlreadyRunningError` (with the live `executionId`);\n * - `not_found` and `continuation_not_found` as `NotFoundError`, whose `code`\n * is the server's own (`not_found` or `continuation_not_found`, with the\n * server's message);\n * - `insufficient_credits` and `insufficient_app_credits` as\n * `InsufficientCreditsError`, whose `code` is always `insufficient_credits`\n * (the server's message says which);\n * - the rest as `NodaroError` carrying this code.\n */\nexport type AppRunResumeRefusalCode =\n /** No such run of yours under this app. */\n | \"not_found\"\n /** The run's execution is not yours. */\n | \"continuation_not_found\"\n /** A malformed run id or body, or a component's run (continued by the run that called it). */\n | \"validation_error\"\n /** The app version the run ran is gone: start the run over. */\n | \"app_run_version_unavailable\"\n /** The app is on another version than the run ran: start over, or send `version` = the run's. */\n | \"app_run_version_changed\"\n /** The run's execution ran another workflow, or another version of it (rare). */\n | \"continuation_workflow_mismatch\"\n | \"continuation_version_mismatch\"\n /** The run did not fail (it completed or was stopped): start it over. */\n | \"continuation_not_failed\"\n /** The run is still running, a Retry of it is pending, or it was started again elsewhere. */\n | \"already_running\"\n /** Nothing is left to retry: every step completed (409), or the app runs no step (400). */\n | \"continuation_subset_required\"\n /** An input the run applied sets a field the app does not let a runner set. */\n | \"locked_field\"\n /**\n * The Retry would stop at a Preview with nobody to review it: retry it from the app page.\n * (The same refusal arrives under the other preview refusal codes when a review-on use-case\n * node holds the run; `isPreviewRefusalCode` in `@nodaro/shared/nodes` asks for all of them.)\n */\n | \"preview_review_required\"\n /** Your app credits cannot cover it. */\n | \"insufficient_app_credits\"\n /** Your balance cannot cover it. */\n | \"insufficient_credits\"\n /** Billing is briefly unavailable for a workspace run (503): try again shortly. */\n | \"billing_unavailable\"\n\nexport class AppsResource {\n constructor(private client: NodaroClientCore) {}\n\n /** List published apps. Public — no auth required for community apps. */\n list(params: ListAppsParams = {}): Promise<ListAppsResult> {\n const qs = new URLSearchParams()\n if (params.search) qs.set(\"search\", params.search)\n if (params.limit !== undefined) qs.set(\"limit\", String(params.limit))\n if (params.cursor) qs.set(\"cursor\", params.cursor)\n if (params.category) qs.set(\"category\", params.category)\n const query = qs.toString()\n return this.client.request(\"GET\", `/v1/apps/browse${query ? `?${query}` : \"\"}`)\n }\n\n /** Get one app's metadata + input schema by slug. */\n get(slug: string): Promise<{ data: PublishedAppDetail }> {\n return this.client.request(\"GET\", `/v1/app/${encodeURIComponent(slug)}`)\n }\n\n /**\n * Trigger an app run with the given input values. The keys in `inputs` must\n * match the app's input-schema field names (see `get(slug).inputSchema`).\n * `opts.inputOverrides` adds raw per-node overrides (see {@link RunAppOptions}).\n * Returns the execution-id for status polling via client.executions.get().\n */\n run(\n slug: string,\n inputs: Record<string, unknown> = {},\n opts: RunAppOptions = {},\n ): Promise<AppRunResult> {\n return this.client.request(\"POST\", `/v1/app/${encodeURIComponent(slug)}/run`, {\n body: { inputs, ...(opts.inputOverrides ? { inputOverrides: opts.inputOverrides } : {}) },\n })\n }\n\n /** List past runs for an app (the caller must own the app or the runs). */\n listRuns(slug: string, params: ListAppRunsParams = {}): Promise<{ data: AppRun[]; nextCursor?: string | null }> {\n const qs = new URLSearchParams()\n if (params.limit !== undefined) qs.set(\"limit\", String(params.limit))\n if (params.cursor) qs.set(\"cursor\", params.cursor)\n const query = qs.toString()\n return this.client.request(\n \"GET\",\n `/v1/app/${encodeURIComponent(slug)}/runs${query ? `?${query}` : \"\"}`,\n )\n }\n\n /** Get one app-run by id. */\n getRun(slug: string, runId: string): Promise<{ data: AppRun }> {\n return this.client.request(\n \"GET\",\n `/v1/app/${encodeURIComponent(slug)}/runs/${encodeURIComponent(runId)}`,\n )\n }\n\n /**\n * Retry a FAILED app run from where it stopped: only the steps it did not\n * complete run, and only those are charged; every step it completed hands\n * on its result. It runs the version the run ran, with the inputs the run\n * applied (it takes none of its own). The run's execution moves to the\n * Retry's.\n *\n * `{ dryRun: true }` answers what the Retry would run and charge\n * ({@link AppRunResumePlan}) and starts nothing — show it before a Retry.\n * Refusals are listed in {@link AppRunResumeRefusalCode}; to run with other\n * inputs or on the app's current version, start over with\n * `run(slug, inputs)` instead.\n *\n * @param slug The published app's slug.\n * @param runId The run's UUID (`AppRunResult.runId`, `AppRun.id`).\n */\n resume(slug: string, runId: string, opts: ResumeAppRunOptions & { dryRun: true }): Promise<{ data: AppRunResumePlan }>\n resume(slug: string, runId: string, opts?: ResumeAppRunOptions & { dryRun?: false }): Promise<AppRunResumeResult>\n resume(slug: string, runId: string, opts?: ResumeAppRunOptions): Promise<{ data: AppRunResumePlan } | AppRunResumeResult>\n resume(slug: string, runId: string, opts: ResumeAppRunOptions = {}): Promise<{ data: AppRunResumePlan } | AppRunResumeResult> {\n return this.client.request(\n \"POST\",\n `/v1/app/${encodeURIComponent(slug)}/runs/${encodeURIComponent(runId)}/resume`,\n {\n body: {\n ...(opts.dryRun ? { dryRun: true } : {}),\n ...(opts.version !== undefined ? { version: opts.version } : {}),\n },\n },\n )\n }\n\n /**\n * Archive (soft-delete) a published-app run. The run is hidden from the\n * default run list and can be restored or permanently deleted from the\n * archive view at https://app.nodaro.ai/archived-runs.\n *\n * @param slug The published app's slug (the last path segment of its URL).\n * @param runId The run's UUID.\n */\n deleteRun(slug: string, runId: string): Promise<DeleteAppRunResult> {\n return this.client.request(\n \"DELETE\",\n `/v1/app/${encodeURIComponent(slug)}/runs/${encodeURIComponent(runId)}`,\n )\n }\n}\n"]}
@@ -1,4 +1,4 @@
1
- import { JobAbortedError, NodaroError, JobFailedError, JobHeldError, JobTimeoutError, NotFoundError } from './chunk-WNXX3B2A.js';
1
+ import { JobAbortedError, NodaroError, JobFailedError, JobHeldError, JobTimeoutError, NotFoundError } from './chunk-IJAJTVEW.js';
2
2
  import { nodeRunRoute, NODE_TYPES_WITHOUT_RUN_ROUTE, NODE_RUN_ROUTES } from '@nodaro/shared/nodes';
3
3
  import { SOCIAL_POST_NODE_PLATFORM } from '@nodaro/shared/social';
4
4
 
@@ -221,5 +221,5 @@ var NodesResource = class {
221
221
  };
222
222
 
223
223
  export { NodesResource };
224
- //# sourceMappingURL=chunk-L3RTC4FL.js.map
225
- //# sourceMappingURL=chunk-L3RTC4FL.js.map
224
+ //# sourceMappingURL=chunk-RBUISD4V.js.map
225
+ //# sourceMappingURL=chunk-RBUISD4V.js.map