@nodaro/sdk 2.54.0 → 2.56.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (237) hide show
  1. package/dist/{chunk-P6AM42UB.cjs → chunk-2KX5ZE6M.cjs} +2 -2
  2. package/dist/chunk-2KX5ZE6M.cjs.map +1 -0
  3. package/dist/{chunk-JOVJAKBT.cjs → chunk-2LOTDOUV.cjs} +6 -6
  4. package/dist/chunk-2LOTDOUV.cjs.map +1 -0
  5. package/dist/{chunk-AN36M6HO.js → chunk-37LL6BPM.js} +5 -5
  6. package/dist/chunk-37LL6BPM.js.map +1 -0
  7. package/dist/{chunk-22P4X3N5.cjs → chunk-3CVWTUK5.cjs} +26 -8
  8. package/dist/chunk-3CVWTUK5.cjs.map +1 -0
  9. package/dist/{chunk-7CUWAVWB.js → chunk-4FSWJTRS.js} +3 -3
  10. package/dist/{chunk-7CUWAVWB.js.map → chunk-4FSWJTRS.js.map} +1 -1
  11. package/dist/{chunk-DV6GTEX5.js → chunk-4SZUSZXK.js} +2 -2
  12. package/dist/{chunk-DV6GTEX5.js.map → chunk-4SZUSZXK.js.map} +1 -1
  13. package/dist/{chunk-L6T44A3G.js → chunk-4VP2GFIZ.js} +20 -5
  14. package/dist/chunk-4VP2GFIZ.js.map +1 -0
  15. package/dist/{chunk-NKH2UFSD.cjs → chunk-4WOT5OAY.cjs} +5 -5
  16. package/dist/{chunk-NKH2UFSD.cjs.map → chunk-4WOT5OAY.cjs.map} +1 -1
  17. package/dist/{chunk-W5RMFTPA.cjs → chunk-57GANTLV.cjs} +2 -2
  18. package/dist/chunk-57GANTLV.cjs.map +1 -0
  19. package/dist/{chunk-HK5FSTKG.cjs → chunk-A3XA6UNM.cjs} +2 -2
  20. package/dist/chunk-A3XA6UNM.cjs.map +1 -0
  21. package/dist/{chunk-AUKHMT53.js → chunk-BGOZRZHY.js} +3 -3
  22. package/dist/{chunk-AUKHMT53.js.map → chunk-BGOZRZHY.js.map} +1 -1
  23. package/dist/{chunk-PBFODIFT.js → chunk-CBDUHYTR.js} +2 -2
  24. package/dist/chunk-CBDUHYTR.js.map +1 -0
  25. package/dist/{chunk-OSMKIRKI.cjs → chunk-DFT4LD2H.cjs} +4 -4
  26. package/dist/{chunk-OSMKIRKI.cjs.map → chunk-DFT4LD2H.cjs.map} +1 -1
  27. package/dist/{chunk-RBX3QTKB.js → chunk-E6X6BGRO.js} +3 -3
  28. package/dist/{chunk-RBX3QTKB.js.map → chunk-E6X6BGRO.js.map} +1 -1
  29. package/dist/{chunk-47ULSVO2.js → chunk-FTCAT2LK.js} +3 -3
  30. package/dist/chunk-FTCAT2LK.js.map +1 -0
  31. package/dist/{chunk-QGVOAPUI.js → chunk-GIQDM2MH.js} +2 -2
  32. package/dist/chunk-GIQDM2MH.js.map +1 -0
  33. package/dist/{chunk-65VIIZEF.cjs → chunk-GJH73EGF.cjs} +2 -2
  34. package/dist/{chunk-65VIIZEF.cjs.map → chunk-GJH73EGF.cjs.map} +1 -1
  35. package/dist/{chunk-HAVIVOLO.js → chunk-HFYNZ4SO.js} +2 -2
  36. package/dist/chunk-HFYNZ4SO.js.map +1 -0
  37. package/dist/{chunk-THLTFB6I.js → chunk-HJLSOT5C.js} +2 -2
  38. package/dist/chunk-HJLSOT5C.js.map +1 -0
  39. package/dist/{chunk-D2ILCSOQ.js → chunk-HK6XP5EN.js} +3 -3
  40. package/dist/{chunk-D2ILCSOQ.js.map → chunk-HK6XP5EN.js.map} +1 -1
  41. package/dist/{chunk-HWSYNUSC.js → chunk-HUYI5G3D.js} +2 -2
  42. package/dist/chunk-HUYI5G3D.js.map +1 -0
  43. package/dist/{chunk-JVDUGVLX.cjs → chunk-MIXRL6I2.cjs} +2 -2
  44. package/dist/chunk-MIXRL6I2.cjs.map +1 -0
  45. package/dist/{chunk-SF2CMKWA.cjs → chunk-OMJ45CW4.cjs} +9 -9
  46. package/dist/{chunk-SF2CMKWA.cjs.map → chunk-OMJ45CW4.cjs.map} +1 -1
  47. package/dist/{chunk-DAONQZPI.cjs → chunk-PDX742CC.cjs} +2 -2
  48. package/dist/chunk-PDX742CC.cjs.map +1 -0
  49. package/dist/{chunk-EZXFDCII.js → chunk-PQ6G5EM7.js} +15 -15
  50. package/dist/{chunk-EZXFDCII.js.map → chunk-PQ6G5EM7.js.map} +1 -1
  51. package/dist/{chunk-FRQJNGJS.cjs → chunk-Q4MFQC2J.cjs} +5 -5
  52. package/dist/{chunk-FRQJNGJS.cjs.map → chunk-Q4MFQC2J.cjs.map} +1 -1
  53. package/dist/{chunk-VHTDOACT.cjs → chunk-Q7W4QNE5.cjs} +22 -22
  54. package/dist/chunk-Q7W4QNE5.cjs.map +1 -0
  55. package/dist/{chunk-XZRBRXGJ.cjs → chunk-RIMDKJSQ.cjs} +28 -28
  56. package/dist/{chunk-XZRBRXGJ.cjs.map → chunk-RIMDKJSQ.cjs.map} +1 -1
  57. package/dist/{chunk-BQAW4RX2.js → chunk-VEQLP5TA.js} +25 -7
  58. package/dist/chunk-VEQLP5TA.js.map +1 -0
  59. package/dist/{chunk-I3MEBVLP.js → chunk-XZPSJG2X.js} +2 -2
  60. package/dist/chunk-XZPSJG2X.js.map +1 -0
  61. package/dist/{chunk-O74MSMFH.cjs → chunk-XZQ6Z4T6.cjs} +2 -2
  62. package/dist/chunk-XZQ6Z4T6.cjs.map +1 -0
  63. package/dist/{chunk-FM2KM5TY.cjs → chunk-Z4B4SZ33.cjs} +21 -4
  64. package/dist/chunk-Z4B4SZ33.cjs.map +1 -0
  65. package/dist/{developer-apps-zSQXWmEG.d.ts → developer-apps-CMUzKpE9.d.cts} +2 -0
  66. package/dist/{developer-apps-zSQXWmEG.d.cts → developer-apps-CMUzKpE9.d.ts} +2 -0
  67. package/dist/entries/apps.d.cts +1 -1
  68. package/dist/entries/apps.d.ts +1 -1
  69. package/dist/entries/audio.d.cts +1 -1
  70. package/dist/entries/audio.d.ts +1 -1
  71. package/dist/entries/billing.d.cts +1 -1
  72. package/dist/entries/billing.d.ts +1 -1
  73. package/dist/entries/cast-swap.cjs +2 -2
  74. package/dist/entries/cast-swap.d.cts +13 -1
  75. package/dist/entries/cast-swap.d.ts +13 -1
  76. package/dist/entries/cast-swap.js +1 -1
  77. package/dist/entries/catalogs.d.cts +1 -1
  78. package/dist/entries/catalogs.d.ts +1 -1
  79. package/dist/entries/characters.cjs +10 -10
  80. package/dist/entries/characters.d.cts +11 -3
  81. package/dist/entries/characters.d.ts +11 -3
  82. package/dist/entries/characters.js +1 -1
  83. package/dist/entries/client.cjs +21 -21
  84. package/dist/entries/client.d.cts +5 -5
  85. package/dist/entries/client.d.ts +5 -5
  86. package/dist/entries/client.js +16 -16
  87. package/dist/entries/collections.d.cts +1 -1
  88. package/dist/entries/collections.d.ts +1 -1
  89. package/dist/entries/community.d.cts +1 -1
  90. package/dist/entries/community.d.ts +1 -1
  91. package/dist/entries/competitors.d.cts +1 -1
  92. package/dist/entries/competitors.d.ts +1 -1
  93. package/dist/entries/copilot.cjs +4 -4
  94. package/dist/entries/copilot.d.cts +1 -1
  95. package/dist/entries/copilot.d.ts +1 -1
  96. package/dist/entries/copilot.js +3 -3
  97. package/dist/entries/core.cjs +6 -6
  98. package/dist/entries/core.d.cts +1 -1
  99. package/dist/entries/core.d.ts +1 -1
  100. package/dist/entries/core.js +2 -2
  101. package/dist/entries/creatures.cjs +6 -6
  102. package/dist/entries/creatures.d.cts +11 -3
  103. package/dist/entries/creatures.d.ts +11 -3
  104. package/dist/entries/creatures.js +1 -1
  105. package/dist/entries/credits.d.cts +1 -1
  106. package/dist/entries/credits.d.ts +1 -1
  107. package/dist/entries/developer-apps.d.cts +1 -1
  108. package/dist/entries/developer-apps.d.ts +1 -1
  109. package/dist/entries/edit.cjs +7 -7
  110. package/dist/entries/edit.d.cts +1 -1
  111. package/dist/entries/edit.d.ts +1 -1
  112. package/dist/entries/edit.js +2 -2
  113. package/dist/entries/errors.cjs +32 -24
  114. package/dist/entries/errors.d.cts +28 -4
  115. package/dist/entries/errors.d.ts +28 -4
  116. package/dist/entries/errors.js +1 -1
  117. package/dist/entries/executions.d.cts +1 -1
  118. package/dist/entries/executions.d.ts +1 -1
  119. package/dist/entries/gallery.d.cts +1 -1
  120. package/dist/entries/gallery.d.ts +1 -1
  121. package/dist/entries/jobs.cjs +2 -2
  122. package/dist/entries/jobs.d.cts +7 -4
  123. package/dist/entries/jobs.d.ts +7 -4
  124. package/dist/entries/jobs.js +1 -1
  125. package/dist/entries/keepers.d.cts +1 -1
  126. package/dist/entries/keepers.d.ts +1 -1
  127. package/dist/entries/library.d.cts +1 -1
  128. package/dist/entries/library.d.ts +1 -1
  129. package/dist/entries/llm.d.cts +1 -1
  130. package/dist/entries/llm.d.ts +1 -1
  131. package/dist/entries/locations.cjs +5 -5
  132. package/dist/entries/locations.d.cts +11 -3
  133. package/dist/entries/locations.d.ts +11 -3
  134. package/dist/entries/locations.js +1 -1
  135. package/dist/entries/media.cjs +4 -4
  136. package/dist/entries/media.d.cts +34 -5
  137. package/dist/entries/media.d.ts +34 -5
  138. package/dist/entries/media.js +3 -3
  139. package/dist/entries/models.d.cts +1 -1
  140. package/dist/entries/models.d.ts +1 -1
  141. package/dist/entries/moodboards.d.cts +1 -1
  142. package/dist/entries/moodboards.d.ts +1 -1
  143. package/dist/entries/node-presets.d.cts +1 -1
  144. package/dist/entries/node-presets.d.ts +1 -1
  145. package/dist/entries/nodes.cjs +3 -3
  146. package/dist/entries/nodes.d.cts +3 -3
  147. package/dist/entries/nodes.d.ts +3 -3
  148. package/dist/entries/nodes.js +2 -2
  149. package/dist/entries/oauth.d.cts +1 -1
  150. package/dist/entries/oauth.d.ts +1 -1
  151. package/dist/entries/objects.cjs +6 -6
  152. package/dist/entries/objects.d.cts +11 -3
  153. package/dist/entries/objects.d.ts +11 -3
  154. package/dist/entries/objects.js +1 -1
  155. package/dist/entries/organizations.d.cts +1 -1
  156. package/dist/entries/organizations.d.ts +1 -1
  157. package/dist/entries/palettes.d.cts +1 -1
  158. package/dist/entries/palettes.d.ts +1 -1
  159. package/dist/entries/picker-catalogs.d.cts +1 -1
  160. package/dist/entries/picker-catalogs.d.ts +1 -1
  161. package/dist/entries/pipelines.d.cts +1 -1
  162. package/dist/entries/pipelines.d.ts +1 -1
  163. package/dist/entries/projects.d.cts +1 -1
  164. package/dist/entries/projects.d.ts +1 -1
  165. package/dist/entries/prompt-helper.d.cts +1 -1
  166. package/dist/entries/prompt-helper.d.ts +1 -1
  167. package/dist/entries/recast.d.cts +1 -1
  168. package/dist/entries/recast.d.ts +1 -1
  169. package/dist/entries/reduce.d.cts +1 -1
  170. package/dist/entries/reduce.d.ts +1 -1
  171. package/dist/entries/saved-posts.d.cts +1 -1
  172. package/dist/entries/saved-posts.d.ts +1 -1
  173. package/dist/entries/scene3d.d.cts +4 -4
  174. package/dist/entries/scene3d.d.ts +4 -4
  175. package/dist/entries/sessions.d.cts +1 -1
  176. package/dist/entries/sessions.d.ts +1 -1
  177. package/dist/entries/shots.d.cts +1 -1
  178. package/dist/entries/shots.d.ts +1 -1
  179. package/dist/entries/studio.cjs +5 -5
  180. package/dist/entries/studio.d.cts +3 -3
  181. package/dist/entries/studio.d.ts +3 -3
  182. package/dist/entries/studio.js +2 -2
  183. package/dist/entries/templates.d.cts +1 -1
  184. package/dist/entries/templates.d.ts +1 -1
  185. package/dist/entries/trash.d.cts +1 -1
  186. package/dist/entries/trash.d.ts +1 -1
  187. package/dist/entries/trends.cjs +2 -2
  188. package/dist/entries/trends.d.cts +37 -17
  189. package/dist/entries/trends.d.ts +37 -17
  190. package/dist/entries/trends.js +1 -1
  191. package/dist/entries/tutorials.d.cts +1 -1
  192. package/dist/entries/tutorials.d.ts +1 -1
  193. package/dist/entries/uploads.d.cts +1 -1
  194. package/dist/entries/uploads.d.ts +1 -1
  195. package/dist/entries/user-settings.d.cts +1 -1
  196. package/dist/entries/user-settings.d.ts +1 -1
  197. package/dist/entries/video-pro.d.cts +1 -1
  198. package/dist/entries/video-pro.d.ts +1 -1
  199. package/dist/entries/voices.d.cts +1 -1
  200. package/dist/entries/voices.d.ts +1 -1
  201. package/dist/entries/webhooks.d.cts +3 -3
  202. package/dist/entries/webhooks.d.ts +3 -3
  203. package/dist/entries/workflows.d.cts +1 -1
  204. package/dist/entries/workflows.d.ts +1 -1
  205. package/dist/entries/workspaces.d.cts +1 -1
  206. package/dist/entries/workspaces.d.ts +1 -1
  207. package/dist/index.cjs +90 -82
  208. package/dist/index.d.cts +6 -6
  209. package/dist/index.d.ts +6 -6
  210. package/dist/index.js +16 -16
  211. package/dist/{nodes-DuXF6XVv.d.ts → nodes-1u7MPrD5.d.ts} +11 -1
  212. package/dist/{nodes-bY51Z1Os.d.cts → nodes-BZavad1T.d.cts} +11 -1
  213. package/dist/{studio-productions-r2-VZsKj.d.cts → studio-productions-CMiS827q.d.cts} +1 -1
  214. package/dist/{studio-productions-DtTE8mdl.d.ts → studio-productions-DkI51Z9M.d.ts} +1 -1
  215. package/dist/{webhooks-BJawEIz8.d.ts → webhooks-C2DZTK4n.d.ts} +1 -1
  216. package/dist/{webhooks-Dn_DtNTD.d.cts → webhooks-tg3VN39V.d.cts} +1 -1
  217. package/package.json +3 -3
  218. package/dist/chunk-22P4X3N5.cjs.map +0 -1
  219. package/dist/chunk-47ULSVO2.js.map +0 -1
  220. package/dist/chunk-AN36M6HO.js.map +0 -1
  221. package/dist/chunk-BQAW4RX2.js.map +0 -1
  222. package/dist/chunk-DAONQZPI.cjs.map +0 -1
  223. package/dist/chunk-FM2KM5TY.cjs.map +0 -1
  224. package/dist/chunk-HAVIVOLO.js.map +0 -1
  225. package/dist/chunk-HK5FSTKG.cjs.map +0 -1
  226. package/dist/chunk-HWSYNUSC.js.map +0 -1
  227. package/dist/chunk-I3MEBVLP.js.map +0 -1
  228. package/dist/chunk-JOVJAKBT.cjs.map +0 -1
  229. package/dist/chunk-JVDUGVLX.cjs.map +0 -1
  230. package/dist/chunk-L6T44A3G.js.map +0 -1
  231. package/dist/chunk-O74MSMFH.cjs.map +0 -1
  232. package/dist/chunk-P6AM42UB.cjs.map +0 -1
  233. package/dist/chunk-PBFODIFT.js.map +0 -1
  234. package/dist/chunk-QGVOAPUI.js.map +0 -1
  235. package/dist/chunk-THLTFB6I.js.map +0 -1
  236. package/dist/chunk-VHTDOACT.cjs.map +0 -1
  237. package/dist/chunk-W5RMFTPA.cjs.map +0 -1
@@ -12,10 +12,10 @@ var chunkSYVNY3AH_cjs = require('./chunk-SYVNY3AH.cjs');
12
12
  var chunkYDRXBRW2_cjs = require('./chunk-YDRXBRW2.cjs');
13
13
  var chunkWMT7HEBZ_cjs = require('./chunk-WMT7HEBZ.cjs');
14
14
  var chunkMBFUMWI5_cjs = require('./chunk-MBFUMWI5.cjs');
15
- var chunkNKH2UFSD_cjs = require('./chunk-NKH2UFSD.cjs');
15
+ var chunk4WOT5OAY_cjs = require('./chunk-4WOT5OAY.cjs');
16
16
  var chunkUIBYZNDR_cjs = require('./chunk-UIBYZNDR.cjs');
17
17
  var chunkLTZKNAXM_cjs = require('./chunk-LTZKNAXM.cjs');
18
- var chunkDAONQZPI_cjs = require('./chunk-DAONQZPI.cjs');
18
+ var chunkPDX742CC_cjs = require('./chunk-PDX742CC.cjs');
19
19
  var chunkJ5LGGCAS_cjs = require('./chunk-J5LGGCAS.cjs');
20
20
  var chunkNBVARNVA_cjs = require('./chunk-NBVARNVA.cjs');
21
21
  var chunk7YHIFCJ4_cjs = require('./chunk-7YHIFCJ4.cjs');
@@ -24,38 +24,38 @@ var chunkLAWYFC4G_cjs = require('./chunk-LAWYFC4G.cjs');
24
24
  var chunkTCLNSVYA_cjs = require('./chunk-TCLNSVYA.cjs');
25
25
  var chunkKXEWTYS4_cjs = require('./chunk-KXEWTYS4.cjs');
26
26
  var chunkGB6C5OEZ_cjs = require('./chunk-GB6C5OEZ.cjs');
27
- var chunkJVDUGVLX_cjs = require('./chunk-JVDUGVLX.cjs');
28
- var chunk22P4X3N5_cjs = require('./chunk-22P4X3N5.cjs');
27
+ var chunkMIXRL6I2_cjs = require('./chunk-MIXRL6I2.cjs');
28
+ var chunk3CVWTUK5_cjs = require('./chunk-3CVWTUK5.cjs');
29
29
  var chunk7QOCWJKD_cjs = require('./chunk-7QOCWJKD.cjs');
30
30
  var chunkZCWKX4V6_cjs = require('./chunk-ZCWKX4V6.cjs');
31
31
  var chunkQ45PC4YD_cjs = require('./chunk-Q45PC4YD.cjs');
32
- var chunkVHTDOACT_cjs = require('./chunk-VHTDOACT.cjs');
32
+ var chunkQ7W4QNE5_cjs = require('./chunk-Q7W4QNE5.cjs');
33
33
  var chunkGVIFLUYZ_cjs = require('./chunk-GVIFLUYZ.cjs');
34
- var chunkW5RMFTPA_cjs = require('./chunk-W5RMFTPA.cjs');
35
- var chunkSF2CMKWA_cjs = require('./chunk-SF2CMKWA.cjs');
34
+ var chunk57GANTLV_cjs = require('./chunk-57GANTLV.cjs');
35
+ var chunkOMJ45CW4_cjs = require('./chunk-OMJ45CW4.cjs');
36
36
  var chunkSBV5MWEL_cjs = require('./chunk-SBV5MWEL.cjs');
37
37
  var chunkWUKIJJG2_cjs = require('./chunk-WUKIJJG2.cjs');
38
- var chunkP6AM42UB_cjs = require('./chunk-P6AM42UB.cjs');
38
+ var chunk2KX5ZE6M_cjs = require('./chunk-2KX5ZE6M.cjs');
39
39
  var chunkRR45WBME_cjs = require('./chunk-RR45WBME.cjs');
40
40
  var chunk2DZWWIJ4_cjs = require('./chunk-2DZWWIJ4.cjs');
41
41
  var chunkSS3B6PHT_cjs = require('./chunk-SS3B6PHT.cjs');
42
42
  var chunkWK4VXPPZ_cjs = require('./chunk-WK4VXPPZ.cjs');
43
43
  var chunk43FVH6LJ_cjs = require('./chunk-43FVH6LJ.cjs');
44
44
  var chunkYFS2LMG4_cjs = require('./chunk-YFS2LMG4.cjs');
45
- var chunkOSMKIRKI_cjs = require('./chunk-OSMKIRKI.cjs');
46
- var chunkJOVJAKBT_cjs = require('./chunk-JOVJAKBT.cjs');
47
- var chunkHK5FSTKG_cjs = require('./chunk-HK5FSTKG.cjs');
45
+ var chunkDFT4LD2H_cjs = require('./chunk-DFT4LD2H.cjs');
46
+ var chunk2LOTDOUV_cjs = require('./chunk-2LOTDOUV.cjs');
47
+ var chunkA3XA6UNM_cjs = require('./chunk-A3XA6UNM.cjs');
48
48
  var chunk4BAHF762_cjs = require('./chunk-4BAHF762.cjs');
49
49
  var chunkA3S55XGF_cjs = require('./chunk-A3S55XGF.cjs');
50
50
  var chunkJOXZ4ZIF_cjs = require('./chunk-JOXZ4ZIF.cjs');
51
51
  var chunkGA4LZZKQ_cjs = require('./chunk-GA4LZZKQ.cjs');
52
52
  var chunkTVPYDC5T_cjs = require('./chunk-TVPYDC5T.cjs');
53
- var chunk65VIIZEF_cjs = require('./chunk-65VIIZEF.cjs');
53
+ var chunkGJH73EGF_cjs = require('./chunk-GJH73EGF.cjs');
54
54
  var chunkBPWUWUZ3_cjs = require('./chunk-BPWUWUZ3.cjs');
55
- var chunkO74MSMFH_cjs = require('./chunk-O74MSMFH.cjs');
55
+ var chunkXZQ6Z4T6_cjs = require('./chunk-XZQ6Z4T6.cjs');
56
56
 
57
57
  // src/client.ts
58
- var NodaroClient = class _NodaroClient extends chunkJOVJAKBT_cjs.NodaroClientCore {
58
+ var NodaroClient = class _NodaroClient extends chunk2LOTDOUV_cjs.NodaroClientCore {
59
59
  workflows;
60
60
  projects;
61
61
  /** Generation sessions inside projects (Create Image / Video / Music). */
@@ -125,26 +125,26 @@ var NodaroClient = class _NodaroClient extends chunkJOVJAKBT_cjs.NodaroClientCor
125
125
  this.projects = new chunkLAWYFC4G_cjs.ProjectsResource(this);
126
126
  this.sessions = new chunkWMT7HEBZ_cjs.SessionsResource(this);
127
127
  this.trash = new chunkLTZKNAXM_cjs.TrashResource(this);
128
- this.jobs = new chunkP6AM42UB_cjs.JobsResource(this);
128
+ this.jobs = new chunk2KX5ZE6M_cjs.JobsResource(this);
129
129
  this.videoPro = new chunkW5VHATSR_cjs.VideoProResource(this);
130
130
  this.executions = new chunkSBV5MWEL_cjs.ExecutionsResource(this);
131
- this.nodes = new chunkVHTDOACT_cjs.NodesResource(this);
131
+ this.nodes = new chunkQ7W4QNE5_cjs.NodesResource(this);
132
132
  this.scene3d = new chunkYDRXBRW2_cjs.Scene3DResource(this);
133
133
  this.developerApps = new chunkA3S55XGF_cjs.DeveloperAppsResource(this);
134
134
  this.oauth = new chunkGVIFLUYZ_cjs.OAuthResource(this);
135
135
  this.webhooks = new chunk3B47IHB3_cjs.WebhooksResource(this);
136
136
  this.apps = new chunkJOXZ4ZIF_cjs.AppsResource(this);
137
- this.characters = new chunkO74MSMFH_cjs.CharactersResource(this);
138
- this.locations = new chunkJVDUGVLX_cjs.LocationsResource(this);
139
- this.objects = new chunkW5RMFTPA_cjs.ObjectsResource(this);
140
- this.creatures = new chunkHK5FSTKG_cjs.CreaturesResource(this);
137
+ this.characters = new chunkXZQ6Z4T6_cjs.CharactersResource(this);
138
+ this.locations = new chunkMIXRL6I2_cjs.LocationsResource(this);
139
+ this.objects = new chunk57GANTLV_cjs.ObjectsResource(this);
140
+ this.creatures = new chunkA3XA6UNM_cjs.CreaturesResource(this);
141
141
  this.keepers = new chunkRR45WBME_cjs.KeepersResource(this);
142
142
  this.pipelines = new chunkCOCKKMNP_cjs.PipelinesResource(this);
143
143
  this.reduce = new chunkGB6C5OEZ_cjs.ReduceResource(this);
144
144
  this.promptHelper = new chunkTCLNSVYA_cjs.PromptHelperResource(this);
145
145
  this.voices = new chunkR63TTR35_cjs.VoicesResource(this);
146
146
  this.llm = new chunkSS3B6PHT_cjs.LlmResource(this);
147
- this.media = new chunk22P4X3N5_cjs.MediaResource(this);
147
+ this.media = new chunk3CVWTUK5_cjs.MediaResource(this);
148
148
  this.audio = new chunkGA4LZZKQ_cjs.AudioResource(this);
149
149
  this.credits = new chunk4BAHF762_cjs.CreditsResource(this);
150
150
  this.userSettings = new chunkUIDVH3GP_cjs.UserSettingsResource(this);
@@ -163,16 +163,16 @@ var NodaroClient = class _NodaroClient extends chunkJOVJAKBT_cjs.NodaroClientCor
163
163
  this.models = new chunk7QOCWJKD_cjs.ModelsResource(this);
164
164
  this.shots = new chunkMBFUMWI5_cjs.ShotsResource(this);
165
165
  this.recast = new chunkKXEWTYS4_cjs.RecastResource(this);
166
- this.castSwap = new chunk65VIIZEF_cjs.CastSwapResource(this);
167
- this.trends = new chunkDAONQZPI_cjs.TrendsResource(this);
168
- this.studio = new chunkNKH2UFSD_cjs.StudioResource(this);
169
- this.copilot = new chunkOSMKIRKI_cjs.CopilotResource(this);
166
+ this.castSwap = new chunkGJH73EGF_cjs.CastSwapResource(this);
167
+ this.trends = new chunkPDX742CC_cjs.TrendsResource(this);
168
+ this.studio = new chunk4WOT5OAY_cjs.StudioResource(this);
169
+ this.copilot = new chunkDFT4LD2H_cjs.CopilotResource(this);
170
170
  this.community = new chunk43FVH6LJ_cjs.CommunityResource(this);
171
171
  this.templates = new chunkUIBYZNDR_cjs.TemplatesResource(this);
172
172
  this.tutorials = new chunkKMNSPC72_cjs.TutorialsResource(this);
173
173
  this.organizations = new chunkJ5LGGCAS_cjs.OrganizationsResource(this);
174
174
  this.workspaces = new chunkLKH5M44B_cjs.WorkspacesResource(this);
175
- this.edit = new chunkSF2CMKWA_cjs.EditResource(this);
175
+ this.edit = new chunkOMJ45CW4_cjs.EditResource(this);
176
176
  }
177
177
  /**
178
178
  * A client that acts in `workspaceId`, sharing this one's auth and config.
@@ -203,5 +203,5 @@ function createClient(opts) {
203
203
 
204
204
  exports.NodaroClient = NodaroClient;
205
205
  exports.createClient = createClient;
206
- //# sourceMappingURL=chunk-XZRBRXGJ.cjs.map
207
- //# sourceMappingURL=chunk-XZRBRXGJ.cjs.map
206
+ //# sourceMappingURL=chunk-RIMDKJSQ.cjs.map
207
+ //# sourceMappingURL=chunk-RIMDKJSQ.cjs.map
@@ -1 +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","AudioResource","CreditsResource","UserSettingsResource","BillingResource","UploadsResource","LibraryResource","GalleryResource","PresetsResource","SavedPostsResource","CollectionsResource","PalettesResource","MoodboardsResource","CompetitorsResource","PickerCatalogsResource","CatalogsResource","ModelsResource","ShotsResource","RecastResource","CastSwapResource","TrendsResource","StudioResource","CopilotResource","CommunityResource","TemplatesResource","TutorialsResource","OrganizationsResource","WorkspacesResource","EditResource"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6DO,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,EACA,KAAA;AAAA,EACA,OAAA;AAAA;AAAA,EAEA,YAAA;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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AAkB,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-XZRBRXGJ.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 { 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 { 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 { 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 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 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 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.audio = new AudioResource(this)\n this.credits = new CreditsResource(this)\n this.userSettings = new UserSettingsResource(this)\n this.billing = new BillingResource(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.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"]}
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","AudioResource","CreditsResource","UserSettingsResource","BillingResource","UploadsResource","LibraryResource","GalleryResource","PresetsResource","SavedPostsResource","CollectionsResource","PalettesResource","MoodboardsResource","CompetitorsResource","PickerCatalogsResource","CatalogsResource","ModelsResource","ShotsResource","RecastResource","CastSwapResource","TrendsResource","StudioResource","CopilotResource","CommunityResource","TemplatesResource","TutorialsResource","OrganizationsResource","WorkspacesResource","EditResource"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6DO,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,EACA,KAAA;AAAA,EACA,OAAA;AAAA;AAAA,EAEA,YAAA;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,cAA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AAK,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-RIMDKJSQ.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 { 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 { 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 { 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 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 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 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.audio = new AudioResource(this)\n this.credits = new CreditsResource(this)\n this.userSettings = new UserSettingsResource(this)\n this.billing = new BillingResource(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.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"]}
@@ -1,4 +1,4 @@
1
- import { readSseStream } from './chunk-7CUWAVWB.js';
1
+ import { readSseStream } from './chunk-4FSWJTRS.js';
2
2
 
3
3
  // src/resources/media.ts
4
4
  var MediaResource = class {
@@ -16,7 +16,9 @@ var MediaResource = class {
16
16
  * `requireAudio: false` to accept a clip that really has no sound. Returns a
17
17
  * `downloadId`; progress streams from
18
18
  * `GET /v1/download-video/progress/:downloadId` (server-sent events) and the
19
- * finished file lands in your library.
19
+ * finished file lands in your library. A section is fetched with ±3 s of
20
+ * padding for the caller to trim; `exactSection: true` cuts it exactly at
21
+ * `sectionStartSec`–`sectionEndSec` instead.
20
22
  */
21
23
  downloadVideo(input) {
22
24
  return this.client.request("POST", "/v1/download-video", { body: input });
@@ -313,13 +315,29 @@ var MediaResource = class {
313
315
  * free, the source-preparation sibling of the priced `trimVideo` node.
314
316
  * `trim` is `[startTime, endTime]` in seconds; `deleteSource: true` removes
315
317
  * the source object afterwards when it is yours and nothing else references
316
- * it ("the cut replaces the original"). Answers the stored file.
318
+ * it ("the cut replaces the original"). Answers the stored file. The
319
+ * platform may take up to 300 s on a long file: pass `timeoutMs` to wait
320
+ * longer than the client's default.
317
321
  */
318
- process(input) {
319
- return this.client.request("POST", "/v1/media/process", { body: input });
322
+ process(input, options = {}) {
323
+ return this.client.request("POST", "/v1/media/process", { body: input, ...options });
324
+ }
325
+ /**
326
+ * Throw away a file you just made and no longer need (`POST /v1/media/discard`):
327
+ * a link download replaced before use, a cut superseded by a newer one, a
328
+ * picture imported then cancelled. Not a general delete. The file goes only
329
+ * when it is your own, was made by a link download (`downloadVideo`), a cut
330
+ * (`process`) or a URL import, is under 24 hours old, and no job of yours
331
+ * uses it (as an output or as an input such as a run's `videoUrl`);
332
+ * otherwise it is left untouched and the call fails with 409
333
+ * `not_discardable`. `discarded: false` means there was nothing of yours at
334
+ * that address (already gone, or not yours).
335
+ */
336
+ discard(input) {
337
+ return this.client.request("POST", "/v1/media/discard", { body: input });
320
338
  }
321
339
  };
322
340
 
323
341
  export { MediaResource };
324
- //# sourceMappingURL=chunk-BQAW4RX2.js.map
325
- //# sourceMappingURL=chunk-BQAW4RX2.js.map
342
+ //# sourceMappingURL=chunk-VEQLP5TA.js.map
343
+ //# sourceMappingURL=ch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mBAAA,EAAqB,EAAE,IAAA,EAAM,KAAA,EAAO,GAAG,OAAA,EAAS,CAAA;AAAA,EACnH;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAaA,QAAQ,KAAA,EAA+D;AACrE,IAAA,OAAO,IAAA,CAAK,OAAO,OAAA,CAAsC,MAAA,EAAQ,qBAAqB,EAAE,IAAA,EAAM,OAAO,CAAA;AAAA,EACvG;AACF","file":"chunk-VEQLP5TA.js","sourcesContent":["import type { NodaroClientCore } from \"../core.js\"\nimport { readSseStream } from \"../sse.js\"\nimport type { OverlayAnchor, VideoMaskRequest, MaskCompositeRequest } from \"@nodaro/shared/media\"\nimport type { CaptionStyle, CaptionLookId, SupportedFontName } from \"@nodaro/shared/captions\"\nimport type { TranscribeLane } from \"@nodaro/shared/models\"\nimport type { VideoOverlayRequest } from \"@nodaro/shared/video\"\n\n/** One word-timed caption entry (one per WORD for the kinetic styles). */\nexport interface CaptionEntry {\n text: string\n startMs: number\n endMs: number\n timestampMs?: number | null\n confidence?: number | null\n}\n\n/** Look + motion levers — see {@link MediaResource.addCaptions}. `look` is a\n * named preset the explicit levers override; an unset look renders as `outline`\n * (the default). The STYLING levers (`look`, `fontFamily`, `fontWeight`,\n * `strokeColor`/`strokeWidth`, `uppercase`, `positionY`, `maxWordsPerLine`) now\n * apply to the static `subtitle` style too — a subtitle carrying any of them\n * renders via Remotion. Only `highlightColor` (no spoken-word cursor to colour)\n * and `animate` (no motion to freeze) stay kinetic-only and are rejected (400)\n * on `subtitle`. */\nexport interface CaptionLookInput {\n look?: CaptionLookId\n fontFamily?: SupportedFontName\n fontWeight?: number\n strokeColor?: string\n strokeWidth?: number\n highlightColor?: string\n uppercase?: boolean\n positionY?: number\n /** Cap on how many words one caption LINE (or `tiktok-words` page) may hold,\n * 1-20, on TOP of the frame-width budget, sentence ends and pauses that\n * already close a line — 1-2 gives the punchy CapCut read, unset fits the\n * width. Applies to `word-highlight` / `karaoke` / `bouncy` / `tiktok-words`\n * and to a Remotion-rendered `subtitle`; inert on `word-pop` (always one\n * word). */\n maxWordsPerLine?: number\n /** Kinetic styles only. `false` freezes the per-word MOTION — the grouping,\n * line-holding and spoken-word highlight stay, only the movement stops;\n * default `true`. Rejected (400) on the static `subtitle` style. */\n animate?: boolean\n}\n\n/** One caption SEGMENT: a time range with optional style/look overrides and its\n * own words (`text`/`captions`, else the shared transcript filtered to range).\n * A segmented render is entirely Remotion, so any `style` is valid here. */\nexport interface CaptionSegmentInput extends CaptionLookInput {\n startMs: number\n endMs: number\n style?: CaptionStyle\n position?: \"bottom\" | \"top\" | \"center\"\n fontSize?: number\n color?: string\n backgroundColor?: string\n text?: string\n captions?: CaptionEntry[]\n}\n\n/** {@link MediaResource.addCaptions} input. */\nexport interface AddCaptionsInput extends CaptionLookInput {\n videoUrl: string\n text?: string\n captions?: CaptionEntry[]\n /** Transcribe the video's audio when no text/captions are given (default true). */\n autoTranscribe?: boolean\n transcribeProvider?: TranscribeLane\n style?: CaptionStyle\n position?: \"bottom\" | \"top\" | \"center\"\n fontSize?: number\n color?: string\n backgroundColor?: string\n /** Apply different treatments to time ranges in one call (non-overlapping). */\n segments?: CaptionSegmentInput[]\n}\n\n/**\n * Media ingestion + trimming — the source-preparation steps a Voice Changer Pro\n * flow (or any pipeline) needs before it has a clip to work on: pull a social\n * video into storage, copy a remote URL into storage, trim a video/audio to a\n * range, and probe a video's metadata. Each generation-style op returns a job id\n * to poll (`jobs.get(jobId)`); `videoMetadata` is a direct read.\n */\n/**\n * Where one overlay layer should go, in {@link MediaResource.imageOverlay}'s\n * percent units — the answer from {@link MediaResource.suggestOverlayPlacement}.\n */\nexport interface OverlayPlacement {\n /** The point on the base image the layer attaches to. */\n anchor: OverlayAnchor\n /** Offset from the anchor in % of the base width (negative on a right anchor = inward). */\n x: number\n /** Offset from the anchor in % of the base height (negative on a bottom anchor = inward). */\n y: number\n /** The layer's width in % of the base width. */\n width: number\n /** One sentence, plain language, on why this spot. */\n reason: string\n}\n\nexport class MediaResource {\n constructor(private client: NodaroClientCore) {}\n\n /**\n * Download a social video (YouTube / TikTok / Instagram / X / Facebook) into\n * your storage (`POST /v1/download-video`). `maxHeight` caps the resolution\n * (default \"best\"); `sectionStartSec` + `sectionEndSec` (both-or-neither) fetch\n * ONLY that time range instead of the whole video. A download that arrives\n * with no audio stream FAILS by default (it is usually a degraded source\n * response, and is retried through other routes first); pass\n * `requireAudio: false` to accept a clip that really has no sound. Returns a\n * `downloadId`; progress streams from\n * `GET /v1/download-video/progress/:downloadId` (server-sent events) and the\n * finished file lands in your library. A section is fetched with ±3 s of\n * padding for the caller to trim; `exactSection: true` cuts it exactly at\n * `sectionStartSec`–`sectionEndSec` instead.\n */\n downloadVideo(input: {\n url: string\n maxHeight?: number\n sectionStartSec?: number\n sectionEndSec?: number\n exactSection?: boolean\n requireAudio?: boolean\n }): Promise<{ downloadId: string }> {\n return this.client.request<{ downloadId: string }>(\"POST\", \"/v1/download-video\", { body: input })\n }\n\n /**\n * Stream the live progress of a {@link MediaResource.downloadVideo} import\n * (`GET /v1/download-video/progress/:downloadId`, server-sent events) as an\n * async iterable. Yields a {@link DownloadVideoProgress} roughly every 500ms\n * until the download reaches `completed` (its event carries the stored\n * `videoUrl`) or `failed` (its event carries `error`), then ends. The progress\n * state expires server-side shortly after the download starts existing, so\n * start iterating promptly after `downloadVideo` returns.\n *\n * No request timeout is applied (a large import legitimately takes minutes) —\n * pass an `AbortSignal` to cancel from the caller.\n */\n async *downloadVideoProgress(\n downloadId: string,\n opts: { signal?: AbortSignal } = {},\n ): AsyncGenerator<DownloadVideoProgress, void, undefined> {\n const url = `${this.client.baseUrl}/v1/download-video/progress/${encodeURIComponent(downloadId)}`\n const token = await this.client.auth.getToken()\n const res = await this.client.fetch(url, {\n headers: token ? { Authorization: `Bearer ${token}` } : {},\n signal: opts.signal,\n })\n // The shared reader owns the non-OK throw, the empty-body guard, the frame\n // parse and the cancel-on-early-exit — this route emits the same\n // `data: <json>` frames every other stream here does.\n yield* readSseStream<DownloadVideoProgress>(res, { label: \"progress stream\" })\n }\n\n /**\n * Copy an external media URL into your Nodaro storage (`POST /v1/save-to-storage`)\n * — a server-side fetch, so nothing round-trips through the client. Poll\n * `jobs.get(jobId)`.\n */\n saveToStorage(input: { mediaUrl: string; filename?: string; mediaType?: \"image\" | \"video\" | \"audio\" }): Promise<{ jobId: string }> {\n return this.client.request<{ jobId: string }>(\"POST\", \"/v1/save-to-storage\", { body: input })\n }\n\n /**\n * Composite 2–30 images into ONE large 2K/4K collage (`POST /v1/image-collage`).\n * `layout` `\"smart\"` (default — justified rows at each image's exact aspect\n * ratio, no cropping; the output height floats) or `\"grid\"` (uniform,\n * letterboxed cells). `imageSizes` is index-aligned with `imageUrls` and\n * gives per-image RELATIVE size hints for the smart layout: `0` auto\n * (\"don't care\", default), `1` big (~2× linear vs medium), `2` medium,\n * `3` small (~½ linear). All-equal hints change nothing; grid ignores them.\n * For storyboards, set `numbered` to stamp a 1-based sequence badge at each\n * image's corner (top-left by default; `badgePosition: \"top-right\"` moves it;\n * in `imageUrls` order) and pass `imageLabels`\n * (index-aligned with `imageUrls`; `null`/`\"\"`/omitted = no caption for that\n * image) to caption images after the number, e.g. `3 · Close-up`. Badges are\n * an overlay only — they never change the layout, the output size or the\n * credit cost. Poll `jobs.get(jobId)` for the finished image.\n */\n imageCollage(input: {\n imageUrls: string[]\n imageSizes?: Array<0 | 1 | 2 | 3>\n numbered?: boolean\n imageLabels?: Array<string | null>\n /** Corner the badges sit in — `\"top-left\"` (default, storyboard convention) or `\"top-right\"`. */\n badgePosition?: \"top-left\" | \"top-right\"\n layout?: \"smart\" | \"grid\"\n resolution?: \"2K\" | \"4K\"\n aspectRatio?: string\n gap?: number\n backgroundColor?: string\n }): Promise<{ jobId: string }> {\n return this.client.request<{ jobId: string }>(\"POST\", \"/v1/image-collage\", { body: input })\n }\n\n /**\n * Place 1–12 layers — pictures, real text, QR codes, shapes — on a base image,\n * pixel-exactly (`POST /v1/image-overlay`) — local, deterministic, no AI.\n * Every layer position/size is a PERCENT of the base image: `anchor` (nine\n * positions, default `\"center\"`), `x`/`y` (offset from the anchor in % of\n * the base width/height; negative on a right/bottom anchor moves inward),\n * `width` (% of the base width, default 25 — height follows the layer's\n * aspect unless `height` is set). Plus `opacity` (0..1), `rotation`\n * (degrees), `blend` (`\"over\"` | `\"multiply\"` | `\"screen\"`), `fit`,\n * `shadow` and `roundedCorners`. The output keeps the base's pixel size\n * unless `canvas` is set. Flat credit cost. Poll `jobs.get(jobId)` for the\n * finished image.\n */\n imageOverlay(input: {\n imageUrl: string\n layers: Array<{\n imageUrl: string\n anchor?: OverlayAnchor\n x?: number\n y?: number\n width?: number\n height?: number\n opacity?: number\n rotation?: number\n blend?: \"over\" | \"multiply\" | \"screen\"\n fit?: \"contain\" | \"cover\" | \"stretch\"\n shadow?: { blur: number; offsetX: number; offsetY: number; color: string; opacity: number }\n roundedCorners?: number\n zIndex?: number\n /** \"image\" (default, needs imageUrl) | \"text\" | \"qr\" | \"shape\" — see @nodaro/shared image-overlay-layers. */\n kind?: \"image\" | \"text\" | \"qr\" | \"shape\"\n text?: Record<string, unknown>\n qr?: Record<string, unknown>\n shape?: Record<string, unknown>\n effects?: Record<string, unknown>\n }>\n canvas?: { width: number; height: number; backgroundColor?: string }\n baseFit?: \"contain\" | \"cover\"\n outputFormat?: \"png\" | \"jpg\" | \"webp\"\n /** Extra platform renders (see OVERLAY_PLATFORMS in @nodaro/shared); returned as output `variants[]`. */\n variants?: string[]\n /** The mask the job also emits as output `maskUrl` (white = may change). Default \"around\". */\n maskMode?: \"none\" | \"layers\" | \"around\" | \"outside\"\n maskSpread?: number\n /** Fills every QR layer whose `qr.fromInput` is true — the node's QR link handle. */\n qrText?: string\n }): Promise<{ jobId: string }> {\n // The finished job's output: { imageUrl, width, height, maskUrl?, variants?: [{ id, label, width, height, url }] }.\n return this.client.request<{ jobId: string }>(\"POST\", \"/v1/image-overlay\", { body: input })\n }\n\n /**\n * Ask a vision model WHERE one overlay layer should sit on a base image\n * (`POST /v1/image-overlay/suggest-placement`) — it reads the picture and\n * keeps the element off the faces, the subject and the busiest texture.\n * The answer comes back in {@link MediaResource.imageOverlay}'s own percent\n * units — `anchor`, `x`/`y` offsets, `width` — so it drops straight onto a\n * layer (`const { reason, ...box } = placement`), plus a one-sentence\n * `reason` you can show a user. Nothing is composited here: apply the\n * placement yourself.\n *\n * `layerAspect` is the element's width / height (1 = square, the default) so\n * the proposed box stays in proportion; `intent` says what the element is\n * (\"a logo\", \"a price badge\"); `safeArea` is the always-visible region as\n * fractions of the canvas (a platform preset's safe area), which the\n * placement is kept inside. Unlike the other media calls this one answers\n * synchronously — there is nothing to poll; `jobId` is the billing record\n * (one image-to-text call).\n */\n suggestOverlayPlacement(input: {\n imageUrl: string\n layerAspect?: number\n intent?: string\n safeArea?: { x: number; y: number; w: number; h: number }\n llmModel?: string\n }): Promise<{ jobId: string; placement: OverlayPlacement }> {\n return this.client.request<{ jobId: string; placement: OverlayPlacement }>(\n \"POST\",\n \"/v1/image-overlay/suggest-placement\",\n { body: input },\n )\n }\n\n /**\n * Trim a video to a range (`POST /v1/trim-video`). Give the range in whichever\n * unit fits: `startTime`/`endTime` seconds, `trim*Frames`, `trim*Seconds`, or\n * `keepFirst`/`keepLastSeconds`. Poll `jobs.get(jobId)`.\n */\n trimVideo(input: {\n videoUrl: string\n startTime?: number\n endTime?: number\n trimStartFrames?: number\n trimEndFrames?: number\n trimStartSeconds?: number\n trimEndSeconds?: number\n keepFirstSeconds?: number\n keepLastSeconds?: number\n }): Promise<{ jobId: string }> {\n return this.client.request<{ jobId: string }>(\"POST\", \"/v1/trim-video\", { body: input })\n }\n\n /**\n * Burn captions into a video (`POST /v1/add-captions`). Give the words as\n * `text`, word-timed `captions[]`, or let it transcribe (`autoTranscribe`,\n * the default when neither is set).\n *\n * `style: \"subtitle\"` renders statically (FFmpeg) UNLESS it carries a styling\n * lever, in which case it — like the KINETIC styles (`word-highlight` /\n * `karaoke` / `tiktok-words` / `word-pop` / `bouncy`) — renders via Remotion.\n * `look` picks a preset — `outline` (Montserrat 900, UPPERCASE, black outline,\n * yellow spoken word — the TikTok/Reels read) or `clean`; an UNSET look renders\n * as `outline`. The explicit STYLING levers (`fontFamily`, `fontWeight`,\n * `strokeColor`/`strokeWidth`, `uppercase`, `positionY`, `maxWordsPerLine`)\n * override individual fields of it and now apply to `subtitle` too. Only\n * `highlightColor` (the spoken-word cursor) and `animate` stay kinetic-only\n * and are REJECTED on `subtitle`.\n *\n * `animate` (default true) freezes the per-word MOTION on the kinetic styles\n * when set to false — the grouping, line-holding and spoken-word highlight\n * stay; only the movement stops.\n *\n * `maxWordsPerLine` (1-20) caps how many words a line — or a `tiktok-words`\n * page — may hold, on top of the width budget / sentence ends / pauses that\n * already close one; it is inert on `word-pop`, which is always one word.\n * Like every lever here it exists top-level AND per segment, and a segment\n * that does not name its own inherits the top-level value.\n *\n * `segments[]` applies DIFFERENT treatments to non-overlapping time ranges in\n * one call (e.g. a large top intro, then a small bottom body); a segment that\n * names its own `look` starts fresh from that preset and does not inherit the\n * top-level explicit levers. Poll `jobs.get(jobId)`.\n *\n * `word-highlight` shows ONE held line at a time and a word's\n * `startMs`/`endMs` is its SPOKEN window (what times the highlight, not how\n * long the text is on screen) — so `captions[]` can be handed over verbatim\n * from an `audio.transcribe()` job's `output_data.words`, with\n * `autoTranscribe: false`.\n */\n addCaptions(input: AddCaptionsInput): Promise<{ jobId: string }> {\n const { autoTranscribe, transcribeProvider, ...rest } = input\n // The route body is camelCase except these two flags (worker snake_case);\n // omit each when unset so an absent flag stays absent on the wire.\n const body: Record<string, unknown> = {\n ...rest,\n ...(autoTranscribe !== undefined ? { auto_transcribe: autoTranscribe } : {}),\n ...(transcribeProvider !== undefined ? { transcribe_provider: transcribeProvider } : {}),\n }\n return this.client.request<{ jobId: string }>(\"POST\", \"/v1/add-captions\", { body })\n }\n\n /**\n * Trim (and extract) audio from a video or audio source\n * (`POST /v1/trim-audio`) to `[startTime, endTime]` seconds, in `audioFormat`\n * (`mp3` default / `wav` / `aac`). Poll `jobs.get(jobId)`.\n */\n trimAudio(input: {\n videoUrl?: string\n audioUrl?: string\n audioFormat?: \"mp3\" | \"wav\" | \"aac\"\n startTime?: number\n endTime?: number\n }): Promise<{ jobId: string }> {\n return this.client.request<{ jobId: string }>(\"POST\", \"/v1/trim-audio\", { body: input })\n }\n\n /**\n * Cut a video and/or an audio file into consecutive parts\n * (`POST /v1/split-media`). Every part is at most `chunkDuration` seconds and\n * at least `minPartDuration` (default 4, never above `chunkDuration`) — a\n * short leftover is evened out with the parts before it. Video is cut on\n * whole frames with each part's sound matching its picture; audio parts are\n * sample-exact, in `audioFormat` (`mp3` default / `wav` / `aac`). With both\n * sources each is split on its own. At most 200 parts per input. Poll\n * `jobs.get(jobId)`; the parts are on the completed job's `output_data` —\n * see {@link SplitMediaOutput}.\n */\n splitMedia(input: SplitMediaInput): Promise<{ jobId: string }> {\n return this.client.request<{ jobId: string }>(\"POST\", \"/v1/split-media\", { body: input })\n }\n\n /**\n * Turn one still image + one audio track into an MP4\n * (`POST /v1/still-to-video`) — locally rendered (FFmpeg), no AI model,\n * zero credits. The output duration IS the audio's duration; there is no\n * duration field. Optional `motion` animates the still (zoom / pan /\n * ken-burns) at `intensity` 1–10. `fit: \"contain\"` letterboxes with\n * `padColor` instead of cropping. Poll `jobs.get(jobId)`.\n */\n stillToVideo(input: {\n imageUrl: string\n audioUrl: string\n motion?: \"none\" | \"zoom-in\" | \"zoom-out\" | \"pan-left\" | \"pan-right\" | \"ken-burns\"\n intensity?: number\n resolution?: \"720p\" | \"1080p\" | \"4K\"\n aspectRatio?: \"16:9\" | \"9:16\" | \"1:1\" | \"4:3\"\n fps?: 24 | 30\n fit?: \"cover\" | \"contain\"\n padColor?: string\n }): Promise<{ jobId: string }> {\n return this.client.request<{ jobId: string }>(\"POST\", \"/v1/still-to-video\", { body: input })\n }\n\n /**\n * Turn 2–100 images + one optional audio track into an MP4 slideshow\n * (`POST /v1/slideshow`) — locally rendered (FFmpeg), zero credits. With\n * audio, the output duration IS the audio's duration (equal split unless\n * `imageDurations` pins rows — null entries = auto; mismatched pinned sums\n * scale proportionally and the factor is disclosed in the job output).\n * Without audio: N × `perImageDuration`, silent output. Transitions\n * consume the outgoing slide, so totals stay exact. For a single image use\n * `stillToVideo`. Poll `jobs.get(jobId)`.\n */\n slideshow(input: {\n imageUrls: string[]\n audioUrl?: string\n imageDurations?: Array<number | null>\n perImageDuration?: number\n transition?: string\n transitionDuration?: number\n motion?: \"none\" | \"zoom-in\" | \"zoom-out\" | \"ken-burns\" | \"alternate\"\n intensity?: number\n resolution?: \"720p\" | \"1080p\" | \"4K\"\n aspectRatio?: \"16:9\" | \"9:16\" | \"1:1\" | \"4:3\"\n fps?: 24 | 30\n fit?: \"cover\" | \"contain\"\n padColor?: string\n }): Promise<{ jobId: string }> {\n return this.client.request<{ jobId: string }>(\"POST\", \"/v1/slideshow\", { body: input })\n }\n\n /**\n * Place 1–20 timed image layers over a video (`POST /v1/video-overlay`) —\n * rendered locally (FFmpeg) in one pass, no AI; the base audio is kept\n * untouched. Each layer has an `imageUrl`, a `start` and an optional `end`\n * in seconds (no `end` = to the end of the video) and a placement: a\n * `preset` (`\"card\"`, `\"corner-badge\"` with a `corner`, `\"full-frame\"`) or\n * an explicit box in {@link MediaResource.imageOverlay}'s percent vocabulary\n * (`anchor`, `x`, `y`, `width`, `height`, `fit`) — an explicit box field\n * overrides the preset, and a layer with neither is a corner badge\n * (bottom-right, or the `corner` it names). `outputAspect` renders onto a\n * 16:9 / 9:16 / 1:1 / 4:5 canvas\n * (`baseFit` cover by default; `backgroundColor` pads `contain`). Poll\n * `jobs.get(jobId)`: the output carries `videoUrl`, `thumbnailUrl`, `width`,\n * `height`, `durationSec` and `warnings[]` (a layer clipped or skipped at the\n * video's end, an animated image's first frame, re-encoded audio).\n */\n videoOverlay(input: VideoOverlayRequest): Promise<{ jobId: string }> {\n return this.client.request<{ jobId: string }>(\"POST\", \"/v1/video-overlay\", { body: input })\n }\n\n /**\n * Track a subject described in plain text through a video and get a\n * black-and-white MASK VIDEO back (`POST /v1/video-mask`, SAM 3.1 by default,\n * or `provider: \"sam-3\"` at half the price) — white = the subject. Clips up\n * to 5 minutes at 30 fps (a faster clip counts\n * proportionally longer), priced by the clip's length. Poll\n * `jobs.get(jobId)`: the output carries `videoUrl` (the mask), `width`,\n * `height`, `frames`, `coverage` (the fraction of pixels selected, rounded\n * to 4 decimals) and `kept` (any region left on any frame: false only when\n * the size / zone filters left an empty mask — read it rather than\n * `coverage`, which a few pixels round to 0), and `recipe` (the version of\n * the masking algorithm that made it, `VIDEO_MASK_RECIPE`: it changes\n * whenever the same clip and settings would give a different mask). Feed the mask to\n * {@link MediaResource.maskComposite}.\n *\n * `holdLastMask: true` keeps the last mask on frames where the subject is\n * lost (a mask covering under 0.002 % of the frame, e.g. a face behind a\n * hand): each such frame after the first detection repeats the most recent\n * non-empty one, for at most 1 s of frames (`VIDEO_MASK_LIMITS.HOLD_MAX_SEC`;\n * longer gaps stay empty after that); the output then also carries `heldFrames`.\n * `minSubjectHeightPct` (0–100, default 0 = off) drops every connected\n * region whose bounding box is shorter than that % of the frame height\n * (extras' small faces behind the main subject); it runs before\n * `holdLastMask`, and the output then carries `droppedRegions`.\n * `maxSubjectHeightPct` (0–100, default 0 = off) is its mirror: it drops\n * regions TALLER than that % (keep only the small background faces). With\n * both set a region is kept when min ≤ height ≤ max; min > max is a 400.\n * `zone` (`{ leftPct, rightPct, topPct, bottomPct }`, each 0–49 % of the\n * frame, a margin left out = 0; default null = off) keeps only the regions\n * whose bounding-box centre lies inside the frame minus those margins (after\n * the size cuts, before `holdLastMask`). `perShot: true` finds the clip's\n * scene cuts first and segments each shot on its own: the subject is\n * detected again after every cut, `holdLastMask` never crosses a cut, and\n * each shot's mask is fitted to that shot's exact frame count; on a clip\n * with no cut it gives the same mask, fitted to the clip's exact frame\n * count. The output carries `shots` (1 when off). `redetectEverySec` (0 =\n * off, the default, or 1–10) also detects the subject again every that\n * many seconds — the clip (each shot, with `perShot`) is sent to the model\n * in pieces of at most that length, a last piece under 8 frames joining the\n * one before — so someone who walks in or turns to the camera mid-shot is\n * masked from the next boundary on. These boundaries are not cuts:\n * `holdLastMask` holds across them. Each piece is one more model request\n * (three run at a time), so it is slower; the price does not change. The\n * output's `chunks` counts the requests.\n */\n videoMask(input: VideoMaskRequest): Promise<{ jobId: string }> {\n return this.client.request<{ jobId: string }>(\"POST\", \"/v1/video-mask\", { body: input })\n }\n\n /**\n * Place a foreground video over a background video through a mask video\n * (`POST /v1/mask-composite`; white = foreground) — local FFmpeg, no AI.\n * The result follows the foreground's size, frame rate and length; the\n * background is fitted (`backgroundFit`, default cover) and loops when\n * shorter; the mask holds its last frame when shorter. Optional\n * `invertMask`, `feather` (0–20 px), `grow` (−10–10 px), `opacity` (0–1,\n * default 1: how strongly the foreground covers the background inside the\n * mask) and `audioSource` (foreground / background / mix / none). Priced per started 5 seconds of\n * the result (the video it follows up to 300 s). Poll `jobs.get(jobId)` for `videoUrl`.\n *\n * `fill` picks what fills the masked area: `video` (default — the\n * foreground, required then), `pixelate` (the background itself in\n * blocks of `pixelSizePct` % of the frame width, 0.2–10, default 1.25) or\n * `blur` (the background blurred, sigma `blurStrengthPct` % of the frame\n * width, 0.1–5, default 2). Pixelate and blur take no\n * `foregroundUrl` (one sent is ignored): the result follows the background\n * and is priced on its length, and it always carries the background's sound\n * (`audioSource` is ignored).\n */\n maskComposite(input: MaskCompositeRequest): Promise<{ jobId: string }> {\n return this.client.request<{ jobId: string }>(\"POST\", \"/v1/mask-composite\", { body: input })\n }\n\n /**\n * Probe a social video's metadata (`POST /v1/video-metadata`) — duration,\n * dimensions, title, live status — WITHOUT downloading it. A direct read, not a\n * job. Use it to decide whether to trim before importing.\n */\n videoMetadata(input: { url: string }): Promise<VideoMetadata> {\n return this.client.request<VideoMetadata>(\"POST\", \"/v1/video-metadata\", { body: input })\n }\n\n /**\n * Cut or crop a stored file (`POST /v1/media/process`) — synchronous and\n * free, the source-preparation sibling of the priced `trimVideo` node.\n * `trim` is `[startTime, endTime]` in seconds; `deleteSource: true` removes\n * the source object afterwards when it is yours and nothing else references\n * it (\"the cut replaces the original\"). Answers the stored file. The\n * platform may take up to 300 s on a long file: pass `timeoutMs` to wait\n * longer than the client's default.\n */\n process(\n input: MediaProcessInput,\n options: { timeoutMs?: number; signal?: AbortSignal } = {},\n ): Promise<{ data: MediaProcessResult }> {\n return this.client.request<{ data: MediaProcessResult }>(\"POST\", \"/v1/media/process\", { body: input, ...options })\n }\n\n /**\n * Throw away a file you just made and no longer need (`POST /v1/media/discard`):\n * a link download replaced before use, a cut superseded by a newer one, a\n * picture imported then cancelled. Not a general delete. The file goes only\n * when it is your own, was made by a link download (`downloadVideo`), a cut\n * (`process`) or a URL import, is under 24 hours old, and no job of yours\n * uses it (as an output or as an input such as a run's `videoUrl`);\n * otherwise it is left untouched and the call fails with 409\n * `not_discardable`. `discarded: false` means there was nothing of yours at\n * that address (already gone, or not yours).\n */\n discard(input: { url: string }): Promise<{ data: MediaDiscardResult }> {\n return this.client.request<{ data: MediaDiscardResult }>(\"POST\", \"/v1/media/discard\", { body: input })\n }\n}\n\n/**\n * One event from {@link MediaResource.downloadVideoProgress}. The stream ends\n * after a `completed` event (which carries the stored `videoUrl` + an optional\n * `thumbnailUrl`) or a `failed` event (which carries `error`).\n */\nexport interface DownloadVideoProgress {\n phase: \"downloading\" | \"processing\" | \"uploading\" | \"completed\" | \"failed\"\n /** Download percent (0–100). Section fetches report jumpy percents — display, don't sum. */\n percent: number\n /** The imported video's storage URL — set on the `completed` event. */\n videoUrl?: string\n /** Thumbnail storage URL — set on the `completed` event when one was captured. */\n thumbnailUrl?: string\n /** What went wrong — set on the `failed` event. */\n error?: string\n}\n\n/** Result of {@link MediaResource.videoMetadata}. Fields are best-effort — a probe may omit some. */\nexport interface VideoMetadata {\n durationSec?: number | null\n width?: number | null\n height?: number | null\n title?: string | null\n isLive?: boolean\n [key: string]: unknown\n}\n\n/** Body of {@link MediaResource.splitMedia} (`POST /v1/split-media`). At least one of `videoUrl` / `audioUrl`. */\nexport interface SplitMediaInput {\n /** Video to split. */\n videoUrl?: string\n /** Audio file to split (split on its own when a video is given too). */\n audioUrl?: string\n /** The longest a part may be, in seconds (at least 1). Every part is at most this long. */\n chunkDuration: number\n /** The shortest a part may be, in seconds (0 or more, default 4). Must not exceed `chunkDuration` (400 otherwise). */\n minPartDuration?: number\n /** Format of the audio parts. Default `mp3`. */\n audioFormat?: \"mp3\" | \"wav\" | \"aac\"\n}\n\n/** A completed split-media job's `output_data`. */\nexport interface SplitMediaOutput {\n /** The video parts, in order (when a video was split). */\n videoUrls?: string[]\n /** The audio parts, in order (when an audio file was split). */\n audioUrls?: string[]\n /** The number of parts — the larger of the two lists. */\n chunkCount: number\n /** Each part's exact length in seconds: the video parts' when a video was split, else the audio parts'. */\n partDurationsSec?: number[]\n /** The audio parts' lengths, only when BOTH a video and an audio file were split. */\n audioPartDurationsSec?: number[]\n}\n\nexport interface MediaProcessInput {\n sourceUrl: string\n type: \"video\" | \"audio\"\n trim?: { startTime: number; endTime: number }\n crop?: { x: number; y: number; width: number; height: number }\n format?: \"mp4\" | \"webm\" | \"mp3\" | \"wav\" | \"m4a\" | \"aac\"\n deleteSource?: boolean\n}\n\n/** Result of {@link MediaResource.discard}. */\nexport interface MediaDiscardResult {\n /** True when the file was deleted; false when there was nothing of yours at that address. */\n discarded: boolean\n}\n\nexport interface MediaProcessResult {\n url: string\n thumbnailUrl: string | null\n assetId: string | null\n sizeBytes: number\n mimeType: string\n metadata: Record<string, unknown>\n}\n"]}
@@ -191,5 +191,5 @@ var LocationsResource = class {
191
191
  };
192
192
 
193
193
  export { LocationsResource };
194
- //# sourceMappingURL=chunk-I3MEBVLP.js.map
195
- //# sourceMappingURL=chunk-I3MEBVLP.js.map
194
+ //# sourceMappingURL=chunk-XZPSJG2X.js.map
195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A,aAAA,CAAA;AAAA,MACvC,EAAE,MAAM,IAAA;AAAK,KACf;AAAA,EACF;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAYA,MAAM,gBAAA,CAAiB,EAAA,EAAY,cAAA,EAAyD;AAC1F,IAAA,MAAM,GAAA,GAAM,MAAM,IAAA,CAAK,MAAA,CAAO,OAAA;AAAA,MAC5B,MAAA;AAAA,MACA,CAAA,cAAA,EAAiB,kBAAA,CAAmB,EAAE,CAAC,CAAA,mBAAA,CAAA;AAAA,MACvC,EAAE,IAAA,EAAM,EAAE,cAAA,EAAe;AAAE,KAC7B;AAGA,IAAA,OAAO,EAAE,cAAA,EAAgB,GAAA,CAAI,gBAAgB,oBAAA,EAAsB,GAAA,CAAI,wBAAwB,IAAA,EAAK;AAAA,EACtG;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQA,UAAU,EAAA,EAA8C;AACtD,IAAA,OAAO,KAAK,MAAA,CAAO,OAAA;AAAA,MACjB,MAAA;AAAA,MACA,CAAA,cAAA,EAAiB,kBAAA,CAAmB,EAAE,CAAC,CAAA,YAAA;AAAA,KACzC;AAAA,EACF;AACF","file":"chunk-XZPSJG2X.js","sourcesContent":["import type { CharacterAspectRatio, SurroundDirection, LocationAssetType, LocationAttachColumn } from \"@nodaro/shared/entities\"\nexport type { LocationAssetType, LocationAttachColumn, CharacterAspectRatio, SurroundDirection } from \"@nodaro/shared/entities\"\nexport { LOCATION_ASSET_TYPES, LOCATION_ATTACH_COLUMNS, SURROUND_DIRECTIONS } from \"@nodaro/shared/entities\"\nimport type { NodaroClientCore } from \"../core.js\"\nimport type { SetKeeperCatalogInput, SetKeeperCatalogResult } from \"./keepers.js\"\nimport type { GenerationSessionParams } from \"./nodes.js\"\n\n/**\n * Re-export the shared `LocationAssetType` / `LocationAttachColumn` unions and\n * their runtime tuples so SDK consumers don't have to add `@nodaro/shared` as a\n * second dependency just to typecheck the `assetType` / `attachToColumn`\n * fields. Single source of truth lives in `@nodaro/shared/entity-prompts`.\n *\n * `CharacterAspectRatio` is re-exported alongside them — `generateMotion`'s\n * `aspectRatio` field reuses the same 4-value enum (1:1 / 3:4 / 16:9 / 9:16)\n * as characters; the route enforces this with `z.enum(CHARACTER_ASPECT_OPTIONS)`.\n */\n\n/**\n * Reference-photo kind discriminator — the mood-board roles a user can attach\n * to a location. Mirrors the `reference_photos.kind` Zod enum in\n * `backend/src/routes/locations.ts`. `other` is the free-form bucket.\n */\nexport type LocationReferencePhotoKind =\n | \"wide\"\n | \"interior\"\n | \"exterior\"\n | \"detail\"\n | \"moodBoard\"\n | \"other\"\n\nexport interface LocationReferencePhoto {\n url: string\n kind: LocationReferencePhotoKind\n}\n\n/**\n * A location record returned by Nodaro's REST API. Mirrors the camelCase\n * shape produced by `backend/src/routes/locations.ts::toCamel()`.\n *\n * Asset buckets (`timeOfDay`, `weather`, `angles`, `lighting`, `seasons`,\n * `atmosphereMotions`) are independent JSONB arrays keyed by a human-readable\n * variant name (e.g. `\"dawn\"`, `\"clear\"`, `\"wide\"`). Each entry's `url` points\n * at an R2-hosted asset.\n *\n * Identity-foundation fields:\n * - `referencePhotos` — caller-supplied mood-board refs (cap 20).\n * - `canonicalDescription` — ~80–120-word LLM-authored visual caption,\n * populated by `approveMainImage()` / `recaption()`. The wire still sends\n * `\"\"` on caption sub-failure (the breaking wire change is deferred to a\n * major bump), but `get()` normalizes `\"\"` → `null` so consumers see the\n * same `string | null` semantics as characters.\n * - `styleLock` — whether asset gens should anchor to the canonical style\n * captured at approval time. Defaults to `true` on new rows.\n */\nexport interface Location {\n id: string\n userId: string\n nodeId: string\n projectId: string | null\n name: string\n description: string | null\n category: string | null\n style: string | null\n sourceImageUrl: string | null\n /** MODEL_CATALOG image-model id the main image was generated with (or `null`).\n * Set on create + editable via the update route. */\n imageProvider: string | null\n timeOfDay: Array<{ name: string; url: string }>\n weather: Array<{ name: string; url: string }>\n angles: Array<{ name: string; url: string }>\n lighting: Array<{ name: string; url: string }>\n seasons: Array<{ name: string; url: string }>\n atmosphereMotions: Array<{ name: string; url: string }>\n /** Named Location Boards — dense reference sheets, one per variant/mood\n * (the `generate-image/location-board` factory preset rendered from the\n * location's images). A first-class bucket: community publish snapshots it\n * and clone hands the consumer their own copy to extend. Defaults to `[]`.\n * `type` marks an image-collage `\"identity\"` sheet vs a plain `\"looks\"`\n * board; `sourceImages` are the R2 URLs it was collaged from. Both optional\n * + backward-compatible (legacy boards have neither). */\n boards?: Array<{ name: string; url: string; type?: \"looks\" | \"identity\"; sourceImages?: string[] }> | null\n referencePhotos: LocationReferencePhoto[]\n /** `null` when no caption is set (or the LLM caption sub-failed) — the wire\n * sends `\"\"`, normalized to `null` in `get()` to match character semantics. */\n canonicalDescription: string | null\n styleLock: boolean\n /** The user's chosen DEFAULT asset take per variant (Studio version history).\n * OPAQUE map: key `\"<bucket>:<variant>\"` (e.g. `\"timeOfDay:dawn\"`) → the chosen\n * asset URL (one already present in that bucket). Stored verbatim — keys are\n * NOT normalized; soft-capped server-side at 200 keys / 2048-char values\n * (overflow dropped silently). Defaults to `{}`. */\n selectedAssetByVariant?: Record<string, string> | null\n /** Nodaro Keepers: whether this row is on the shared shelf (`client.keepers`).\n * Admin-set through `setCatalog`; `false` on everyone else's rows and on\n * every copy. Optional on the read surface for older servers. */\n catalog?: boolean\n /** The shelf order (lowest first); `0` when never set. */\n catalogSort?: number\n /** The shelf heading, or `null`. */\n catalogCategory?: string | null\n deletedAt: string | null\n createdAt: string\n updatedAt: string\n}\n\n/**\n * GET /v1/locations/:id appends a `pendingJobs` bucket the studio uses to\n * rehydrate spinners after a reload. Optional on the SDK surface — it doesn't\n * appear on `list()` rows.\n */\nexport interface LocationDetail extends Location {\n pendingJobs?: Array<{\n jobId: string\n assetType: string\n name: string\n status: string\n }>\n /**\n * Completed candidate main images for this location whose URL differs from\n * the current `sourceImageUrl`, newest first (max 5). Surfaced so a\n * \"pick from N\" UI can offer alternatives the user can promote via\n * `approveMainImage(id, jobId)`; until they pick, the current main image is\n * left untouched. Mirrors `CharacterDetail.previousCandidates`. Optional -\n * absent on `list()` rows, present (possibly empty) on `get()`.\n */\n previousCandidates?: Array<{\n jobId: string\n url: string\n createdAt: string\n }>\n}\n\n/**\n * Body for `client.locations.create()`. Mirrors the INSERT branch of\n * `upsertLocationBody` in `backend/src/routes/locations.ts`. `name` + `nodeId`\n * are required on create.\n */\nexport interface CreateLocationInput {\n nodeId: string\n name: string\n description?: string\n category?: string\n style?: string\n workflowId?: string\n projectId?: string\n sourceImageUrl?: string\n /** Persistent image-model id (a MODEL_CATALOG image model). Validated\n * server-side — unknown / non-image / \"\" is stored as `null`. */\n imageProvider?: string | null\n referencePhotos?: LocationReferencePhoto[]\n canonicalDescription?: string\n styleLock?: boolean\n /** The user's chosen DEFAULT asset take per variant. OPAQUE\n * `\"<bucket>:<variant>\"` → chosen-URL map; a write REPLACES the whole map.\n * Keys stored verbatim; soft-capped server-side at 200 keys / 2048-char values. */\n selectedAssetByVariant?: Record<string, string>\n}\n\n/**\n * Body for `client.locations.update()`. Mirrors the UPDATE branch of\n * `upsertLocationBody` in `backend/src/routes/locations.ts`.\n *\n * Worker-owned asset buckets (`timeOfDay`/`weather`/`angles`/`lighting`/\n * `seasons`/`atmosphereMotions`) are deliberately omitted — the route drops\n * them on UPDATE so a Studio auto-save with a stale snapshot cannot clobber\n * the worker's atomic `append_location_asset()` writes.\n *\n * `expectedUpdatedAt` is the optimistic-concurrency token: when present, the\n * UPDATE only succeeds if the row's `updated_at` still matches; on mismatch\n * the route returns 409 so the studio can re-fetch + merge.\n */\nexport interface UpdateLocationInput {\n name?: string\n description?: string\n category?: string\n style?: string\n sourceImageUrl?: string\n /** Persistent image-model id (a MODEL_CATALOG image model). Validated\n * server-side — unknown / non-image / \"\" is stored as `null`. */\n imageProvider?: string | null\n referencePhotos?: LocationReferencePhoto[]\n canonicalDescription?: string\n styleLock?: boolean\n /** The user's chosen DEFAULT asset take per variant. OPAQUE\n * `\"<bucket>:<variant>\"` → chosen-URL map; a write REPLACES the whole map\n * (omit to leave untouched). Keys stored verbatim; soft-capped server-side\n * at 200 keys / 2048-char values. */\n selectedAssetByVariant?: Record<string, string>\n /** Named Location Boards (see `Location.boards`) — whole-array replace,\n * USER-owned (unlike the worker-owned buckets it flows through UPDATE).\n * Server caps: 24 boards, 200-char names, 30 sourceImages per board. */\n boards?: Array<{ name: string; url: string; type?: \"looks\" | \"identity\"; sourceImages?: string[] }>\n /** ISO-8601 timestamp recording when PII consent was captured for this location. */\n piiConsentAt?: string\n expectedUpdatedAt?: string\n}\n\nexport interface UpdateLocationResult {\n id: string\n updatedAt: string\n}\n\nexport interface ListLocationsParams {\n /** When true, return archived locations instead of active ones. */\n archived?: boolean\n /**\n * Search words: only the locations whose name or description contains\n * every word (split on spaces, the first 5), in any order, ignoring case.\n * Each word is matched as written (`%`, `_` and `*` are not wildcards;\n * punctuation is kept); blank means no search; up to 200 characters.\n * Combines with the other filters and with `cursor` paging.\n */\n q?: string\n /**\n * Max rows to return (cap 500). OPT-IN: omitted, the server returns the\n * full legacy listing with no `nextCursor`; supplied, the response is one\n * page plus `nextCursor` — keep passing it back until it is `null`.\n */\n limit?: number\n /** Opaque cursor from a prior page's `nextCursor` (fetches the next page). */\n cursor?: string\n}\n\n/**\n * Input for `client.locations.generate()` — fires the\n * `POST /v1/generate-location` route. Produces 1–10 candidate\n * establishing shots; each lands as one `jobs` row in `pending` state and\n * is then enqueued for the worker.\n *\n * When `attachToLocationId` is set AND `count === 1`, the worker writes the\n * resulting URL directly to `locations.source_image_url` on completion —\n * caller doesn't need a separate `approveMainImage` call. Multi-candidate\n * batches MUST go through explicit approval so the user picks the winner.\n */\nexport interface GenerateLocationInput extends GenerationSessionParams {\n name: string\n description?: string\n userPrompt?: string\n category?: \"indoor\" | \"outdoor\" | \"urban\" | \"nature\" | \"fantasy\" | \"sci-fi\" | \"historical\" | \"futuristic\" | \"other\"\n style?: \"realistic\" | \"anime\" | \"3d-pixar\" | \"illustration\"\n sourceImageUrl?: string\n provider?: string\n /** Number of candidate images to generate (1–10; server-validated). */\n count?: number\n /** Auto-attach the result to this location row (single-candidate only). */\n attachToLocationId?: string\n /**\n * Credit-affecting quality tier (e.g. `\"high\"` for gpt-image). Priced like\n * generate-image (composite ids such as `gpt-image:high`); values the chosen\n * model doesn't support are ignored server-side, never rejected.\n */\n quality?: string\n /**\n * Credit-affecting output resolution (e.g. `\"2K\"` / `\"4K\"` / `\"2 MP\"`).\n * Priced like generate-image (composite ids such as `nano-banana-pro:4K`);\n * values the chosen model doesn't support are ignored server-side, never\n * rejected.\n */\n resolution?: string\n}\n\n/**\n * `generate()` response — `jobIds` is ALWAYS present (the harmonized contract,\n * matching characters). `jobId` is a deprecated back-compat alias populated only\n * on `count === 1`; prefer `jobIds`. (Will be removed on the next major.)\n */\nexport interface GenerateLocationResult {\n jobIds: string[]\n /** @deprecated count===1 back-compat alias — use `jobIds`. */\n jobId?: string\n}\n\n/**\n * Input for `client.locations.generateAsset()` — fires the\n * `POST /v1/generate-location-asset` route. Produces a single\n * timeOfDay / weather / seasons / angles / lighting / custom variant.\n *\n * When all three studio-path fields are set (`attachToLocationId` +\n * `attachToColumn` + `attachName`), the worker appends\n * `{ name: attachName, url: <result> }` to the named JSONB array column on\n * the user's location row on completion. `attachToColumn` is REQUIRED for\n * `assetType === \"custom\"` — the worker can't infer the bucket from the\n * asset type.\n */\nexport interface GenerateLocationAssetInput extends GenerationSessionParams {\n assetType: LocationAssetType\n variant: string\n name: string\n description?: string\n userPrompt?: string\n category?: string\n style?: \"realistic\" | \"anime\" | \"3d-pixar\" | \"illustration\"\n sourceImageUrl?: string\n provider?: string\n /** Optional framing override (the same 4-value enum as `generateMotion`).\n * Absent = the image model's default. The studio's 360° surround path pins\n * `\"16:9\"` so every ring view matches the establishing shot's frame. */\n aspectRatio?: CharacterAspectRatio\n attachToLocationId?: string\n attachToColumn?: LocationAttachColumn\n attachName?: string\n /**\n * Credit-affecting quality tier (e.g. `\"high\"` for gpt-image). Values the\n * chosen model doesn't support are ignored server-side, never rejected.\n */\n quality?: string\n /**\n * Credit-affecting output resolution (e.g. `\"2K\"` / `\"4K\"` / `\"2 MP\"`).\n * Values the chosen model doesn't support are ignored server-side, never\n * rejected.\n */\n resolution?: string\n}\n\n/**\n * Input for `client.locations.generateSurroundContinuation()` — fires the\n * `POST /v1/generate-surround-continuation` route. Generates one seamless 360°\n * ring view as an image-to-image continuation of `referenceImageUrl` (the\n * previous ring view, or the establishing shot for the first ring).\n *\n * The platform owns the whole pipeline: it builds the half-carry composite\n * server-side (carry the reference's trailing half into the new frame's leading\n * half per `direction`, gray the rest), paints the gray region, then\n * color-harmonizes the painted half to the carried half so there is no tonal\n * seam down the frame's center. The carried half stays pixel-exact, so a\n * panorama viewer stitching adjacent ring views stays geometrically seamless.\n *\n * When the studio path is set (`attachToLocationId` + `attachToColumn` +\n * `attachName`), the worker appends `{ name: attachName, url: <result> }` to the\n * location's bucket (studio uses `attachToColumn: \"angles\"`,\n * `attachName: \"Surround 45°\"`).\n */\nexport interface GenerateSurroundContinuationInput extends GenerationSessionParams {\n /** The previous ring view to continue from (i2i anchor). */\n referenceImageUrl: string\n /** Carry/paint axis: turn right, turn left, tilt up, or tilt down. Tilts\n * render the sky/ground (a thin horizon strip), not a horizontal continuation. */\n direction: SurroundDirection\n /** Ring angle (45, 90, …) — stored on the result as metadata. */\n degrees?: number\n /** Fraction of the frame carried from the reference. Omitted ⇒ per-direction\n * default (0.5 for a pan, 0.12 thin strip for a tilt). */\n carriedFraction?: number\n /** Upscale/denoise the result before it's chained as the next reference, to\n * slow cumulative softening down a long ring chain. Default false. */\n refine?: boolean\n /** Refine model when `refine` is set. `recraft-upscale` (1 cr, default) or\n * `topaz-image-upscale` (3 cr). */\n refineProvider?: \"recraft-upscale\" | \"topaz-image-upscale\"\n /** Optional free-form scene hint woven into the fill prompt. */\n userPrompt?: string\n /** Image model. Defaults to the platform's general image model (`gpt-image-2`). */\n provider?: string\n /** Studio pins `\"16:9\"` so every ring view matches the establishing frame. */\n aspectRatio?: CharacterAspectRatio\n attachToLocationId?: string\n attachToColumn?: LocationAttachColumn\n attachName?: string\n}\n\n/**\n * Input for `client.locations.generateMotion()` — fires the\n * `POST /v1/generate-location-motion` route. Produces a single atmospheric\n * motion clip (drifting fog, snowfall, rolling waves, etc.) animated FROM a\n * static establishing-shot image.\n *\n * Mirrors `client.characters.generateMotion()` minus the character-specific\n * fields (gender / baseOutfit / realLifeRefs). The route hardcodes the attach\n * column to `atmosphere_motions` — callers supply `attachToLocationId` +\n * `attachName` only.\n *\n * `sourceImageUrl` is REQUIRED — image-to-video needs a source frame and the\n * route has no fallback (no `source_image_url` column to pull from on the\n * locations row; the studio path supplies the canonical establishing-shot URL\n * explicitly).\n *\n * When the studio path is set (`attachToLocationId` + `attachName`), the\n * worker appends `{ name: attachName, url: <result> }` to the location row's\n * `atmosphere_motions` JSONB column on completion.\n */\nexport interface GenerateLocationMotionInput extends GenerationSessionParams {\n motionPrompt: string\n sourceImageUrl: string\n provider?: string\n name: string\n category?: string\n style?: \"realistic\" | \"anime\" | \"3d-pixar\" | \"illustration\"\n canonicalDescription?: string\n attachToLocationId?: string\n attachName?: string\n /**\n * Optional aspect ratio override. Defaults to 16:9 server-side via\n * `resolveLocationAspectRatio` (locations are cinematic establishing shots).\n * One of the 4-value `CharacterAspectRatio` union — locations reuse the\n * character aspect enum since the supported ratios are identical.\n */\n aspectRatio?: CharacterAspectRatio\n}\n\nexport interface ApproveMainImageResult {\n sourceImageUrl: string\n /**\n * LLM-authored caption. `null` when the LLM caption sub-failed — the wire\n * sends `\"\"`, normalized to `null` here so consumers see the same\n * `string | null` semantics as characters. The main image is still set; call\n * `recaption()` to retry.\n */\n canonicalDescription: string | null\n}\n\nexport interface RecaptionLocationResult {\n canonicalDescription: string\n}\n\nexport class LocationsResource {\n constructor(private client: NodaroClientCore) {}\n\n /**\n * List the caller's locations. By default returns active locations only;\n * pass `archived: true` to fetch soft-deleted rows for an \"archive\" view,\n * and `q` to keep the ones whose name or description contains it.\n */\n list(params: ListLocationsParams = {}): Promise<{ locations: Location[]; nextCursor?: string | null }> {\n const query: Record<string, string | undefined> = {}\n if (params.archived) query.archived = \"true\"\n if (params.q) query.q = params.q\n if (params.limit !== undefined) query.limit = String(params.limit)\n if (params.cursor) query.cursor = params.cursor\n return this.client.request(\"GET\", \"/v1/locations\", { query })\n }\n\n /**\n * Convenience wrapper for `list({ archived: true })`. Returns soft-deleted\n * rows so callers can drive a UI \"Archived\" tab without re-encoding the\n * query param. Mirrors `ObjectsResource.listArchived`.\n *\n * `archived` is omitted from the param type — it's always set to `true` here.\n */\n listArchived(params: Omit<ListLocationsParams, \"archived\"> = {}): Promise<{ locations: Location[]; nextCursor?: string | null }> {\n return this.list({ ...params, archived: true })\n }\n\n /**\n * Fetch a single location including in-flight asset job state. Soft-deleted\n * (archived) rows are returned by id intentionally so canvas nodes that\n * hold a stale `locationDbId` keep loading.\n */\n async get(id: string): Promise<LocationDetail> {\n const res = await this.client.request<LocationDetail>(\n \"GET\",\n `/v1/locations/${encodeURIComponent(id)}`,\n )\n // Normalize the wire `\"\"` caption (DB null / LLM sub-failure) → null so\n // consumers see the same `string | null` semantics as characters. New\n // object — never mutate the response.\n return { ...res, canonicalDescription: res.canonicalDescription || null }\n }\n\n /**\n * Create a new location. `name` + `nodeId` are required — the route 400s\n * otherwise. Returns the new row's id.\n *\n * Note: the underlying route is the same `POST /v1/locations` upsert that\n * powers `update()`. This convenience wrapper enforces the INSERT-required\n * fields at the type level and never sends an `id`.\n */\n create(data: CreateLocationInput): Promise<{ id: string }> {\n return this.client.request(\"POST\", \"/v1/locations\", { body: data })\n }\n\n /**\n * Update a location. Only the fields you pass are written — undefined keys\n * are NOT touched on the row. Worker-owned asset buckets are intentionally\n * not exposed on this surface (see `UpdateLocationInput` for the rationale).\n *\n * Optimistic-concurrency: pass `expectedUpdatedAt` to require the row's\n * `updated_at` still matches; on mismatch the route returns 409\n * `concurrent_modification`. The SDK surfaces that as a generic\n * `NodaroError` with the same code.\n */\n update(id: string, data: UpdateLocationInput): Promise<UpdateLocationResult> {\n return this.client.request(\"POST\", \"/v1/locations\", {\n body: { id, ...data },\n })\n }\n\n /**\n * Soft-delete (archive) a location. The row is hidden from `list()` by\n * default but still loadable via `get(id)` so canvas nodes pointing at it\n * keep working. Restore with `restore(id)`.\n */\n delete(id: string): Promise<{ success: true; archived: true }> {\n return this.client.request(\"DELETE\", `/v1/locations/${encodeURIComponent(id)}`)\n }\n\n /**\n * Un-archive a location. If the original name now collides (case-\n * insensitive) with an active row, the server auto-suffixes \"(restored)\"\n * and returns the effective name.\n */\n restore(id: string): Promise<{ id: string; name: string }> {\n return this.client.request(\"POST\", `/v1/locations/${encodeURIComponent(id)}/restore`)\n }\n\n /**\n * Admin only: put one of your own locations on the shared Nodaro Keepers\n * shelf (`client.keepers.catalog()`), or take it off. A first-party session\n * or your personal token; `forbidden` for anyone who is not a platform\n * admin, `not_found` for a row that is not yours.\n */\n setCatalog(id: string, input: SetKeeperCatalogInput): Promise<SetKeeperCatalogResult> {\n return this.client.request(\"PUT\", `/v1/locations/${encodeURIComponent(id)}/catalog`, { body: input })\n }\n\n /**\n * Fire `POST /v1/generate-location` to produce one or more candidate main\n * images. With `count > 1`, all jobs are reserved up-front before any\n * is enqueued — mid-batch failures roll back atomically.\n *\n * When `attachToLocationId` is set AND `count === 1`, the worker writes\n * the result directly to the row's `source_image_url`; otherwise you must\n * call `approveMainImage()` after picking a candidate.\n */\n async generate(data: GenerateLocationInput): Promise<GenerateLocationResult> {\n const res = await this.client.request<{ jobId?: string; jobIds?: string[] }>(\n \"POST\", \"/v1/generate-location\", { body: data },\n )\n // Tolerate the legacy `{ jobId }`-only shape (older server): synthesize jobIds.\n const jobIds = res.jobIds ?? (res.jobId ? [res.jobId] : [])\n return res.jobId ? { jobIds, jobId: res.jobId } : { jobIds }\n }\n\n /**\n * Fire `POST /v1/generate-location-asset` to produce a single variant.\n * When the studio path is set (`attachToLocationId` + `attachToColumn` +\n * `attachName`), the worker appends `{ name: attachName, url: <result> }`\n * to the named JSONB array column on completion.\n */\n generateAsset(data: GenerateLocationAssetInput): Promise<{ jobId: string }> {\n return this.client.request(\"POST\", \"/v1/generate-location-asset\", { body: data })\n }\n\n /**\n * Fire `POST /v1/generate-surround-continuation` to produce one seamless 360°\n * ring view as an i2i continuation of `referenceImageUrl`. The platform builds\n * the half-carry composite, paints the missing half, and color-harmonizes it\n * to the carried half (no tonal seam; carried half stays pixel-exact). When the\n * studio path is set, the worker appends the result to the location's bucket.\n */\n generateSurroundContinuation(data: GenerateSurroundContinuationInput): Promise<{ jobId: string }> {\n return this.client.request(\"POST\", \"/v1/generate-surround-continuation\", { body: data })\n }\n\n /**\n * Fire `POST /v1/generate-location-motion` to animate the location's\n * establishing shot into an atmospheric motion clip. Image-to-video, single\n * clip per call; the attach column is hardcoded to `atmosphere_motions`\n * server-side (locations have a single motion bucket so the caller doesn't\n * supply `attachToColumn`). When the studio path is set\n * (`attachToLocationId` + `attachName`), the worker appends\n * `{ name: attachName, url: <result> }` to the row's `atmosphere_motions`\n * column on completion.\n */\n generateMotion(data: GenerateLocationMotionInput): Promise<{ jobId: string }> {\n return this.client.request(\"POST\", \"/v1/generate-location-motion\", { body: data })\n }\n\n /**\n * Atomically remove ONE asset take (every entry matching `url`) from a\n * worker-owned bucket column — `POST /v1/locations/:id/remove-asset`. The\n * worker-owned buckets are deliberately not writable through `update()`\n * (a stale snapshot would race concurrent worker appends), so deleting a\n * take — e.g. a 360° surround view being regenerated — goes through this\n * single-statement server-side filter instead. 404s (`NotFoundError`) when\n * the url isn't in that bucket or the location isn't yours.\n */\n removeAsset(\n id: string,\n data: { column: LocationAttachColumn; url: string },\n ): Promise<{ removed: true }> {\n return this.client.request(\n \"POST\",\n `/v1/locations/${encodeURIComponent(id)}/remove-asset`,\n { body: data },\n )\n }\n\n /**\n * Approve a completed `generate-location` job as the location's main image.\n * Sets `source_image_url` and fires the LLM caption (Claude Sonnet vision)\n * inline. Returns the new main-image URL plus the caption.\n *\n * Caption-failure semantics: the route still sends `\"\"` on LLM sub-failure,\n * but the SDK normalizes `\"\"` → `null` here so `canonicalDescription` carries\n * the same `string | null` semantics as characters. The main image is still\n * set; call `recaption()` to retry.\n */\n async approveMainImage(id: string, candidateJobId: string): Promise<ApproveMainImageResult> {\n const res = await this.client.request<{ sourceImageUrl: string; canonicalDescription: string | null }>(\n \"POST\",\n `/v1/locations/${encodeURIComponent(id)}/approve-main-image`,\n { body: { candidateJobId } },\n )\n // Normalize the wire `\"\"` (LLM sub-failure) → null; build a new object\n // rather than mutating the response.\n return { sourceImageUrl: res.sourceImageUrl, canonicalDescription: res.canonicalDescription || null }\n }\n\n /**\n * Re-fire the LLM caption against the location's current main image. 502s\n * on LLM failure (unlike `approveMainImage` which preserves the side-effect\n * and returns \"\"); returns 400 `no_source_image` if no main image is set\n * yet.\n */\n recaption(id: string): Promise<RecaptionLocationResult> {\n return this.client.request(\n \"POST\",\n `/v1/locations/${encodeURIComponent(id)}/llm-caption`,\n )\n }\n}\n"]}
@@ -247,5 +247,5 @@ Object.defineProperty(exports, "CHARACTER_STYLES", {
247
247
  });
248
248
  exports.CharactersResource = CharactersResource;
249
249
  exports.buildPersonSeedPrompt = buildPersonSeedPrompt;
250
- //# sourceMappingURL=chunk-O74MSMFH.cjs.map
251
- //# sourceMappingURL=chunk-O74MSMFH.cjs.map
250
+ //# sourceMappingURL=chunk-XZQ6Z4T6.cjs.map
251
+ //# sourceMappingURL=chunk-XZQ6Z4T6.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/resources/characters.ts"],"names":["buildPersonHints"],"mappings":";;;;;;AAijBO,IAAM,qBAAN,MAAyB;AAAA,EAC9B,YAAoB,MAAA,EAA0B;AAA1B,IAAA,IAAA,CAAA,MAAA,GAAA,MAAA;AAAA,EAA2B;AAAA,EAA3B,MAAA;AAAA;AAAA;AAAA;AAAA;AAAA;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mB,EAAE,CAAC,CAAA,YAAA;AAAA,KAC1C;AAAA,EACF;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAgBA,KAAA,CAAM,EAAA,EAAY,KAAA,GAA6B,EAAC,EAAkC;AAChF,IAAA,OAAO,IAAA,CAAK,MAAA,CAAO,OAAA,CAAQ,MAAA,EAAQ,CAAA,eAAA,EAAkB,kBAAA,CAAmB,EAAE,CAAC,CAAA,MAAA,CAAA,EAAU,EAAE,IAAA,EAAM,KAAA,EAAO,CAAA;AAAA,EACtG;AAAA;AAAA;AAAA;AAAA;AAAA,EAMA,eAAe,EAAA,EAA8C;AAC3D,IAAA,OAAO,IAAA,CAAK,OAAO,OAAA,CAAQ,KAAA,EAAO,kBAAkB,kBAAA,CAAmB,EAAE,CAAC,CAAA,SAAA,CAAW,CAAA;AAAA,EACvF;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAUA,MAAM,WAAW,EAAA,EAA2B;AAC1C,IAAA,MAAM,IAAA,CAAK,OAAO,OAAA,CAAQ,QAAA,EAAU,kBAAkB,kBAAA,CAAmB,EAAE,CAAC,CAAA,KAAA,CAAO,CAAA;AAAA,EACrF;AACF;AAWO,SAAS,sBAAsB,KAAA,EAA4B;AAChE,EAAA,OAAOA,uBAAA,CAAiB,KAA8C,CAAA,CAAE,IAAA,CAAK,IAAI,CAAA;AACnF","file":"chunk-XZQ6Z4T6.cjs","sourcesContent":["import { buildPersonHints, PEOPLE, PERSON_DIMENSION_ORDER, PERSON_DIMENSION_LABELS, type PersonValue } from \"@nodaro/prompts/person\"\nimport type { CharacterAspectRatio, CharacterAttachColumn, EntityStyle } from \"@nodaro/shared/entities\"\nimport type { TtsProvider } from \"@nodaro/shared/models\"\nexport type { EntityStyle, CharacterAspectRatio } from \"@nodaro/shared/entities\"\nexport { CHARACTER_STYLES, CHARACTER_ASPECT_OPTIONS, CHARACTER_ASPECT_DEFAULTS } from \"@nodaro/shared/entities\"\nimport type { NodaroClientCore } from \"../core.js\"\nimport type { GenerationSessionParams, Subject } from \"./nodes.js\"\nimport type { SetKeeperCatalogInput, SetKeeperCatalogResult } from \"./keepers.js\"\n\n/**\n * Re-export the shared `EntityStyle` union (realistic | anime | 3d-pixar |\n * illustration) and `CHARACTER_STYLES` runtime tuple so SDK consumers don't\n * have to add `@nodaro/shared` as a second dependency just to typecheck the\n * `style` field. Single source of truth lives in `@nodaro/shared/entity-prompts`.\n */\n\n/**\n * Re-export the 4-value aspect-ratio union accepted by the generate-character*\n * routes. Single source of truth lives in `@nodaro/shared`. See\n * `CHARACTER_ASPECT_DEFAULTS` for the per-asset-type defaults.\n */\n\n/**\n * Structured Person composer, re-exported from `@nodaro/shared` so SDK\n * consumers can build a detailed person description — Identity, Body, and the\n * Face facial-geometry layer (cheekbones, canthal tilt, eyelid type, lip\n * fullness/shape, nose tip, etc.) — and feed it as `seedPrompt` / `description`\n * to `generate()` / `upsert()` without adding `@nodaro/shared` as a second dep.\n *\n * `buildPersonSeedPrompt` collapses a `PersonValue` into the same comma-joined\n * fragment the editor's Person picker produces (e.g. \"almond-shaped eyes,\n * sharply sculpted high cheekbones, full plump lips\"). Returns \"\" when empty.\n */\n\n\n/**\n * A character record returned by Nodaro's REST API. Mirrors the camelCase\n * shape produced by `backend/src/routes/characters.ts::toCamel()`.\n *\n * `expressions`, `poses`, `motions`, `angles`, `bodyAngles`,\n * `lightingVariations` are independent buckets keyed by a human-readable\n * variant name (e.g. `\"smile\"`, `\"standing\"`, `\"3/4 left\"`). Each entry's\n * `url` points at an R2-hosted asset.\n *\n * Identity-foundation fields:\n * - `referencePhotos` — caller-supplied real-life refs (max one per\n * non-`other` kind; cap 20 total). Drive the i2v / i2i path when a\n * provider supports multi-image conditioning.\n * - `realLifeRefsByVariant` — per-variant reference URLs (cap 20 keys,\n * 5 URLs per key). Keys are lowercased+trimmed.\n * - `referenceVideosByVariant` — per-label user-uploaded reference VIDEO\n * URLs (cap 20 keys, 5 URLs per key, lowercased+trimmed keys). Mirrors\n * `realLifeRefsByVariant` for video clips (e.g. emotion takes). Read the\n * chosen URLs off the row to drive generate-video's `referenceVideoUrls`.\n * - `seedPrompt` — short prompt fragment that scaffolds portrait gen.\n * - `canonicalDescription` — ~80–120-word LLM-authored visual caption,\n * populated by `approvePortrait()` / `recaption()`.\n */\nexport interface Character {\n id: string\n userId: string\n /** Canvas node linkage. `null` only on legacy clone rows that predate the\n * clone-side node_id fix (new clones mint one; creates always had one). */\n nodeId: string | null\n projectId: string | null\n name: string\n description: string | null\n gender: string | null\n style: string | null\n baseOutfit: string | null\n sourceImageUrl: string | null\n /** MODEL_CATALOG image-model id the main image was generated with (or `null`).\n * Set on create (the provider you generated with) + editable via `upsert`. */\n imageProvider: string | null\n expressions: Array<{ name: string; url: string }> | null\n poses: Array<{ name: string; url: string }> | null\n lightingVariations: Array<{ name: string; url: string }> | null\n angles: Array<{ name: string; url: string }> | null\n bodyAngles: Array<{ name: string; url: string }> | null\n motions: Array<{ name: string; url: string }> | null\n /** Named Character Boards — dense reference sheets, one per persona/look\n * (the `generate-image/character-board` factory preset rendered from the\n * character's images). A first-class bucket: community publish snapshots it\n * and clone hands the consumer their own copy to extend. Defaults to `[]`.\n * `type` marks an image-collage `\"identity\"` sheet vs a plain `\"looks\"`\n * board; `sourceImages` are the R2 URLs it was collaged from. Both optional\n * + backward-compatible (legacy boards have neither). */\n boards?: Array<{ name: string; url: string; type?: \"looks\" | \"identity\"; sourceImages?: string[] }> | null\n /** Per-label user-uploaded reference VIDEO URLs (R2), keyed by a\n * caller-owned label (lowercased+trimmed server-side). Mirrors\n * `realLifeRefsByVariant` for video clips; read the chosen URLs off the row\n * to feed generate-video's `referenceVideoUrls`. Defaults to `{}`. */\n referenceVideosByVariant?: Record<string, string[]> | null\n /** The user's chosen DEFAULT asset take per variant (Studio version history).\n * OPAQUE map: key `\"<bucket>:<variant>\"` (e.g. `\"bodyAngles:front\"`,\n * `\"expressions:smile\"`) → the chosen asset URL (one already present in that\n * bucket). Stored verbatim — keys are NOT normalized; soft-capped server-side\n * at 200 keys / 2048-char values (overflow dropped silently). Defaults to `{}`. */\n selectedAssetByVariant?: Record<string, string> | null\n /** `voiceType` records the selected voice's KIND (premade voices are\n * addressed by name; library/custom voices by id at text-to-speech time).\n * `previewUrl` is a playable audio sample (the voice's `preview_url` / clone\n * sample) the studio plays in an `<audio>` element — persisted so Voice Library\n * voices (which have no by-id lookup) stay previewable after reload. Client-\n * played only; the server never fetches it. `ttsProvider` is the library\n * voice's verified TTS provider (see `SharedVoice.recommendedProvider`) —\n * send it as the text-to-speech `provider` so the voice renders on a model\n * it's verified for. All optional — a character may have no voice, or a\n * legacy voice predating these fields. */\n voice: { voiceId: string; voiceName: string; traits: string; voiceType?: \"premade\" | \"library\" | \"custom\"; previewUrl?: string; ttsProvider?: TtsProvider } | null\n personality: {\n mood: string\n speechStyle: string\n movementStyle: string\n behavioralNotes: string\n } | null\n /** ~80–120-word LLM-authored visual caption (approve-portrait / recaption).\n * Optional on the read surface so existing literal consumers don't break;\n * the route always returns it (string | null). */\n canonicalDescription?: string | null\n /** Identity-lock strength for Character Studio asset generation. */\n identityLock?: \"off\" | \"soft\" | \"strict\"\n /** Nodaro Keepers: whether this row is on the shared shelf (`client.keepers`).\n * Admin-set through `setCatalog`; `false` on everyone else's rows and on\n * every copy. Optional on the read surface for older servers. */\n catalog?: boolean\n /** The shelf order (lowest first); `0` when never set. */\n catalogSort?: number\n /** The shelf heading, or `null`. */\n catalogCategory?: string | null\n deletedAt: string | null\n createdAt: string\n updatedAt: string\n}\n\n/**\n * GET /v1/characters/:id appends three live-progress buckets the studio uses\n * to rehydrate spinners after a reload. Optional in the SDK surface — they\n * don't appear on `list()` rows.\n */\nexport interface CharacterDetail extends Character {\n pendingJobs?: Array<{\n jobId: string\n assetType: \"expressions\" | \"poses\" | \"angles\" | \"bodyAngles\" | \"lighting\" | \"motions\"\n name: string\n }>\n portraitCandidates?: Array<{\n jobId: string\n url: string | undefined\n progress: number\n status: string\n }>\n /** Recently completed portrait takes (7 days, newest first): at most 5\n * alternates, never the current portrait — plus, with\n * `get(id, { candidates: \"all\" })`, the current portrait's own take. */\n previousCandidates?: Array<{\n jobId: string\n url: string\n createdAt: string\n /** The image model the take was requested with. */\n provider?: string\n /** The aspect ratio the request sent explicitly; absent when the take\n * used the default ratio. */\n aspectRatio?: string\n /** `true` only on the current portrait's own take (returned with\n * `candidates: \"all\"`); `false` on the alternates. */\n isPortrait?: boolean\n }>\n}\n\n/** Options for `client.characters.get()`. */\nexport interface GetCharacterOptions {\n /**\n * `\"all\"`: `previousCandidates` also carries the current portrait's own\n * take, flagged `isPortrait: true`, when its job is within the 7-day window\n * (the alternates stay at most 5). Default `\"alternates\"`: the current\n * portrait is left out.\n */\n candidates?: \"alternates\" | \"all\"\n}\n\nexport type ReferencePhotoKind =\n | \"frontFace\"\n | \"sideLeft\"\n | \"sideRight\"\n | \"threeQuarterLeft\"\n | \"threeQuarterRight\"\n | \"frontBody\"\n | \"other\"\n\nexport interface ReferencePhoto {\n url: string\n kind: ReferencePhotoKind\n}\n\n/**\n * Body for `client.characters.upsert()`. Mirrors `upsertCharacterBody` in\n * `backend/src/routes/characters.ts`. Omitting `id` triggers an INSERT;\n * supplying it triggers an UPDATE that only writes the fields you pass —\n * undefined keys are NOT touched on the row.\n *\n * `name` is optional at the type level. The route requires `name` on INSERT\n * (id absent) and rejects with `validation_error` otherwise; on UPDATE the\n * route just ignores `name` when omitted, which lets partial updates like\n * `update(id, { gender: \"female\" })` succeed without re-sending the same\n * name the caller already has.\n */\nexport interface UpsertCharacterInput {\n /** UUID of the character row; omit to create. */\n id?: string\n /** Canvas node id the character belongs to. REQUIRED on create (the route\n * 400s without it, like `name`); optional on update — the update branch\n * never touches node_id, so partial updates needn't round-trip it. */\n nodeId?: string\n workflowId?: string\n projectId?: string\n name?: string\n description?: string\n gender?: string\n style?: string\n baseOutfit?: string\n sourceImageUrl?: string\n /** Persistent image-model id (a MODEL_CATALOG image model). Validated\n * server-side — unknown / non-image / \"\" is stored as `null`. */\n imageProvider?: string | null\n expressions?: Array<{ name: string; url: string }>\n poses?: Array<{ name: string; url: string }>\n lightingVariations?: Array<{ name: string; url: string }>\n angles?: Array<{ name: string; url: string }>\n bodyAngles?: Array<{ name: string; url: string }>\n motions?: Array<{ name: string; url: string }>\n /** Named Character Boards (see `Character.boards`) — whole-array replace,\n * like the asset buckets. Server caps: 24 boards, 200-char names, 30\n * sourceImages per board. */\n boards?: Array<{ name: string; url: string; type?: \"looks\" | \"identity\"; sourceImages?: string[] }>\n /** See `Character.voice` — persisted alongside the voice so TTS can resolve a\n * library/custom voice by id, `previewUrl` keeps the sample playable after\n * reload, and `ttsProvider` keeps generation on a model the voice is\n * verified for. All optional. */\n voice?: { voiceId: string; voiceName: string; traits: string; voiceType?: \"premade\" | \"library\" | \"custom\"; previewUrl?: string; ttsProvider?: TtsProvider } | null\n personality?: {\n mood: string\n speechStyle: string\n movementStyle: string\n behavioralNotes: string\n } | null\n seedPrompt?: string\n canonicalDescription?: string\n /** Identity-lock strength for Character Studio asset generation (off/soft/strict). */\n identityLock?: \"off\" | \"soft\" | \"strict\"\n referencePhotos?: ReferencePhoto[]\n /** Per-variant real-life reference URLs. Keys are lowercased+trimmed server-side. */\n realLifeRefsByVariant?: Record<string, string[]>\n /** Per-label user-uploaded reference VIDEO URLs (e.g. emotion takes). Keys\n * are lowercased+trimmed server-side; max 20 keys, 5 URLs each. Stored R2\n * URLs are read back off the row to drive generate-video's\n * `referenceVideoUrls`. */\n referenceVideosByVariant?: Record<string, string[]>\n /** The user's chosen DEFAULT asset take per variant. OPAQUE\n * `\"<bucket>:<variant>\"` → chosen-URL map; a write REPLACES the whole map\n * (the studio sends the full map each save). Omit to leave the row untouched.\n * Keys stored verbatim; soft-capped server-side at 200 keys / 2048-char values. */\n selectedAssetByVariant?: Record<string, string>\n}\n\nexport interface UpsertCharacterResult {\n id: string\n name?: string\n}\n\nexport interface ListCharactersParams {\n /** Restrict to a single project. */\n projectId?: string\n /** When true, return archived characters instead of active ones. */\n archived?: boolean\n /**\n * Search words: only the characters whose name or description contains\n * every word (split on spaces, the first 5), in any order, ignoring case —\n * `\"red car\"` finds \"Car, red\". Each word is matched as written (`%`, `_`\n * and `*` are not wildcards; punctuation is kept); blank means no search; up\n * to 200 characters. Combines with the other filters and with `cursor`\n * paging.\n */\n q?: string\n /**\n * Max rows to return. Server defaults to 100, caps at 500. Omit to take the\n * server default — passing it just narrows further.\n */\n limit?: number\n /** Opaque cursor from a prior page's `nextCursor` (fetches the next page). */\n cursor?: string\n}\n\nexport interface ListCharactersResult {\n characters: Character[]\n /** Pass back as `cursor` for the next page; `null` when there are no more. */\n nextCursor: string | null\n}\n\nexport interface DuplicateCharacterInput {\n /** Optional canvas node id to bind the new row to. */\n nodeId?: string\n /** Optional project to drop the new row into. */\n projectId?: string\n}\n\nexport interface CharacterUsage {\n workflowCount: number\n workflows: Array<{ id: string; name: string }>\n}\n\n/**\n * Input for `client.characters.generate()` — fires the\n * `POST /v1/generate-character` route. Produces 1–10 portrait candidates;\n * each lands as one `jobs` row in `pending` state and is then enqueued for\n * the worker.\n *\n * Provide at least one of `seedPrompt`, `referencePhotos`, or `description`\n * (the backend's refinement rejects empty input with `validation_error`).\n *\n * When `attachToCharacterId` is set, the worker writes the resulting URL\n * directly to `characters.source_image_url` on completion — caller doesn't\n * need a separate `approvePortrait` call for single-candidate runs. Pass\n * `attachPortrait: false` to keep every take a candidate instead.\n */\nexport interface GenerateCharacterInput extends GenerationSessionParams {\n name: string\n description?: string\n userPrompt?: string\n gender?: string\n style?: EntityStyle\n baseOutfit?: string\n sourceImageUrl?: string\n provider?: string\n /** Auto-attach the result to this character row. */\n attachToCharacterId?: string\n /** `false`: the take stays a candidate; only the approve route\n * (`approvePortrait()`) sets the portrait. Omitted/`true`: the finished\n * take is written to the row's portrait. */\n attachPortrait?: boolean\n seedPrompt?: string\n /**\n * WHO the portrait shows — person, styling and props as picker-catalog ids\n * ({@link Subject}, the same type and bounds as `generateImage`'s). The\n * platform writes the wording and folds it into the portrait prompt after\n * `seedPrompt` (or `description`), so send ids rather than phrasing a pick\n * yourself. Not a prompt source on its own: one of `seedPrompt`,\n * `referencePhotos` or `description` is still required.\n */\n subject?: Subject\n referencePhotos?: ReferencePhoto[]\n /** Number of candidate images to generate (1–10; server-validated). */\n count?: number\n /**\n * Explicit aspect ratio. Highest precedence — overrides both the character\n * node toggle and the per-asset-type default (portraits default to `3:4`).\n * Must be one of the 4-value `CharacterAspectRatio` union.\n */\n aspectRatio?: CharacterAspectRatio\n /**\n * Character node toggle (per-canvas-node `defaultAssetAspectRatio`). Wins\n * against the per-asset-type default, loses to `aspectRatio`.\n */\n characterNodeAspectRatio?: CharacterAspectRatio\n /**\n * Credit-affecting quality tier (e.g. `\"high\"` for gpt-image). Priced like\n * generate-image (composite ids such as `gpt-image:high`); values the chosen\n * model doesn't support are ignored server-side, never rejected.\n */\n quality?: string\n /**\n * Credit-affecting output resolution (e.g. `\"2K\"` / `\"4K\"` / `\"2 MP\"`).\n * Priced like generate-image (composite ids such as `nano-banana-pro:4K`);\n * values the chosen model doesn't support are ignored server-side, never\n * rejected.\n */\n resolution?: string\n}\n\nexport interface GenerateCharacterResult {\n /** First job-id; convenience alias for `jobIds[0]`. */\n jobId: string\n /** All job-ids when `count > 1`. */\n jobIds: string[]\n}\n\nexport interface GenerateAssetInput extends GenerationSessionParams {\n assetType:\n | \"expressions\"\n | \"poses\"\n | \"lighting\"\n | \"angles\"\n | \"headAngles\"\n | \"bodyAngles\"\n | \"custom\"\n /** The named variant (e.g. `\"smile\"`, `\"standing\"`, `\"3/4 left\"`). */\n variant: string\n /** Display name of the character; appears in the prompt. */\n name: string\n description?: string\n userPrompt?: string\n gender?: string\n style?: EntityStyle\n baseOutfit?: string\n sourceImageUrl?: string\n /** Real-life reference URLs (cap 5). */\n realLifeRefs?: string[]\n provider?: string\n /** Auto-attach to character row + asset bucket on completion. */\n attachToCharacterId?: string\n /** Shared type — auto-includes new buckets (sheets/detail_closeups/outfit_variations); mirrors objects.ts/locations.ts. */\n attachToColumn?: CharacterAttachColumn\n attachName?: string\n /**\n * Explicit aspect ratio. Highest precedence — overrides both the character\n * node toggle and the per-asset-type default (expressions=1:1, poses=9:16,\n * headAngles=3:4, bodyAngles=9:16, lighting=3:4, angles=3:4, custom=3:4).\n */\n aspectRatio?: CharacterAspectRatio\n /**\n * Character node toggle (per-canvas-node `defaultAssetAspectRatio`). Wins\n * against the per-asset-type default, loses to `aspectRatio`.\n */\n characterNodeAspectRatio?: CharacterAspectRatio\n /**\n * Credit-affecting quality tier (e.g. `\"high\"` for gpt-image). Values the\n * chosen model doesn't support are ignored server-side, never rejected.\n */\n quality?: string\n /**\n * Credit-affecting output resolution (e.g. `\"2K\"` / `\"4K\"` / `\"2 MP\"`).\n * Values the chosen model doesn't support are ignored server-side, never\n * rejected.\n */\n resolution?: string\n}\n\nexport interface GenerateMotionInput extends GenerationSessionParams {\n motionPrompt: string\n /** Optional when `attachToCharacterId` is set — falls back to the row's portrait. */\n sourceImageUrl?: string\n provider?: string\n name: string\n description?: string\n motionDescription?: string\n gender?: string\n style?: EntityStyle\n baseOutfit?: string\n realLifeRefs?: string[]\n attachToCharacterId?: string\n attachName?: string\n /**\n * Explicit aspect ratio. Highest precedence — overrides both the character\n * node toggle and the motions default (`9:16`).\n */\n aspectRatio?: CharacterAspectRatio\n /**\n * Character node toggle (per-canvas-node `defaultAssetAspectRatio`). Wins\n * against the motions default, loses to `aspectRatio`.\n */\n characterNodeAspectRatio?: CharacterAspectRatio\n}\n\nexport interface ApprovePortraitResult {\n portraitUrl: string\n /**\n * LLM-authored caption. `null` when the LLM call failed during the approval\n * — the portrait is still set; call `recaption()` to retry.\n */\n canonicalDescription: string | null\n}\n\nexport interface RecaptionResult {\n canonicalDescription: string\n}\n\n/**\n * Where a character's high-fidelity training stands. `untrained`: nothing was\n * ever trained, the trained model was removed (`deleteLora`), or a training\n * could not be started (`training_dispatch_failed` — refunded; this resets the\n * status even for a character trained before). `queued` / `training`: in\n * flight. `succeeded` / `failed` / `cancelled`: the last training's outcome.\n *\n * Generation uses the trained model only while the status is `succeeded`.\n */\nexport type CharacterTrainingState = \"untrained\" | \"queued\" | \"training\" | \"succeeded\" | \"failed\" | \"cancelled\"\n\n/** `GET /v1/characters/:id/training` — the character's training record. */\nexport interface CharacterTrainingStatus {\n status: CharacterTrainingState\n /** The provider's id for the latest training; `null` before the first one. */\n trainingId: string | null\n /** Why the last training failed, as the user may read it; `null` otherwise. */\n error: string | null\n /**\n * When the last successful training finished (ISO 8601). It stays set through\n * a re-train, a failed or cancelled one, or one that could not be started —\n * but the model is used only while `status` is `succeeded`.\n */\n trainedAt: string | null\n /** The last successful training's model version; set or not, used only while `status` is `succeeded`. */\n version: string | null\n /** The token added to prompts for this character (`TOK_<slug>_<6hex>`); generation adds it for you. */\n triggerWord: string | null\n /** How many images the latest training used. */\n imageCount: number | null\n}\n\n/** Body for `characters.train()`. */\nexport interface TrainCharacterInput {\n /**\n * Train on these of the character's images only (max 200 URLs; at most 20\n * are used). Omitted or empty: every eligible image — the portrait,\n * reference photos, expressions, poses, head and body angles and lighting\n * variations. At least 4 distinct images must remain either way.\n */\n selectedImageUrls?: string[]\n}\n\n/** `POST /v1/characters/:id/train` — answered 202 while the training runs. */\nexport interface TrainCharacterResult {\n /** The training's job; it ends `completed`, `failed` or `cancelled` with the training. */\n jobId: string\n /** The provider's id for this training (also on `trainingStatus().trainingId`). */\n trainingId: string\n /** The token added to prompts for this character once trained. */\n triggerWord: string\n}\n\n/**\n * The `code` of a `NodaroError` `train()` can throw beyond the typed classes\n * (`ForbiddenError` — an app token without `assets:write`, `missingScope`\n * says so; `InsufficientCreditsError`; `RateLimitedError`; `JobBlockedError`;\n * `UnauthorizedError`; …):\n *\n * - `insufficient_training_images` (400) — fewer than 4 distinct images; the\n * message says how many there are.\n * - `validation_error` (400) — a malformed id or `selectedImageUrls`.\n * - `already_training_or_not_found` (409) — a training is already in flight,\n * or the character is not yours / archived.\n * - `claim_failed` (500) — the training slot could not be claimed; nothing\n * started. Retry.\n * - `training_dispatch_failed` (502) — the training could not be started;\n * nothing is charged.\n * - `public_url_not_configured` (503) — the deployment cannot receive the\n * provider's completion call.\n * - `price_not_configured` (503) — the deployment has no price for training.\n * - `dedup_race_winner_unresolvable` (503) — a duplicate of this request was\n * in flight and its outcome could not be read; this one reserved nothing.\n * Read {@link CharactersResource.trainingStatus} before retrying.\n */\nexport type TrainCharacterRefusalCode =\n | \"insufficient_training_images\"\n | \"validation_error\"\n | \"already_training_or_not_found\"\n | \"claim_failed\"\n | \"training_dispatch_failed\"\n | \"public_url_not_configured\"\n | \"price_not_configured\"\n | \"dedup_race_winner_unresolvable\"\n\nexport class CharactersResource {\n constructor(private client: NodaroClientCore) {}\n\n /**\n * List the caller's characters. By default returns active characters only;\n * pass `archived: true` to fetch soft-deleted rows for an \"archive\" view.\n * When `projectId` is set, only characters belonging to that project are\n * returned; `q` keeps the ones whose name or description contains it.\n *\n * Cursor-paginated: a response carrying a non-null `nextCursor` means more\n * rows exist. Pass it back as `cursor` to fetch the next page, and keep going\n * until `nextCursor` is `null` — a single call returns at most `limit` rows\n * (default 100), so treating one call as \"all characters\" silently truncates\n * the list for anyone past that count.\n *\n * ```ts\n * const all: Character[] = []\n * let cursor: string | undefined\n * do {\n * const page = await client.characters.list({ cursor })\n * all.push(...page.characters)\n * cursor = page.nextCursor ?? undefined\n * } while (cursor)\n * ```\n */\n list(params: ListCharactersParams = {}): Promise<ListCharactersResult> {\n const query: Record<string, string | undefined> = {}\n if (params.projectId) query.projectId = params.projectId\n if (params.archived) query.archived = \"true\"\n if (params.q) query.q = params.q\n if (params.limit !== undefined) query.limit = String(params.limit)\n if (params.cursor) query.cursor = params.cursor\n return this.client.request(\"GET\", \"/v1/characters\", { query })\n }\n\n /**\n * Fetch a single character including in-flight portrait / asset job state.\n * Soft-deleted (archived) rows are returned by id intentionally so canvas\n * nodes that hold a stale `characterDbId` keep loading. Pass\n * `{ candidates: \"all\" }` to also get the current portrait's own take in\n * `previousCandidates` (flagged `isPortrait: true`).\n */\n get(id: string, options: GetCharacterOptions = {}): Promise<CharacterDetail> {\n const query: Record<string, string | undefined> = {}\n if (options.candidates) query.candidates = options.candidates\n return this.client.request(\"GET\", `/v1/characters/${encodeURIComponent(id)}`, { query })\n }\n\n /**\n * Create or update a character. Omit `id` to create; supply it to update\n * (only the fields you pass get written — undefined keys are untouched).\n *\n * If the caller-supplied `name` collides with an existing active character\n * for this user, the request returns 409 `name_taken`. To auto-number a\n * placeholder, pass the placeholder name from `@nodaro/shared` and the\n * server will derive \"Untitled character 2\", \"Untitled character 3\", etc.\n */\n upsert(input: UpsertCharacterInput): Promise<UpsertCharacterResult> {\n return this.client.request(\"POST\", \"/v1/characters\", { body: input })\n }\n\n /**\n * Convenience wrapper around `upsert()` for creating new characters.\n * Equivalent to `upsert({ ...input, id: undefined })`. `name` is REQUIRED\n * on create — the route 400s on INSERT-without-name; we narrow the type\n * here so callers fail at compile-time rather than runtime.\n */\n create(\n input: Omit<UpsertCharacterInput, \"id\"> & { name: string },\n ): Promise<UpsertCharacterResult> {\n return this.upsert(input)\n }\n\n /**\n * Convenience wrapper around `upsert()` for updating an existing character.\n * Equivalent to `upsert({ ...input, id })`.\n */\n update(\n id: string,\n input: Omit<UpsertCharacterInput, \"id\">,\n ): Promise<UpsertCharacterResult> {\n return this.upsert({ ...input, id })\n }\n\n /**\n * Soft-delete (archive) a character. The row is hidden from `list()` by\n * default but still loadable via `get(id)` so canvas nodes pointing at it\n * keep working. Restore with `restore(id)`.\n */\n delete(id: string): Promise<{ success: true; archived: true }> {\n return this.client.request(\"DELETE\", `/v1/characters/${encodeURIComponent(id)}`)\n }\n\n /**\n * Un-archive a character. If the original name now collides with an\n * active row, the server auto-suffixes \"(restored)\" and returns the\n * effective name.\n */\n restore(id: string): Promise<{ id: string; name: string }> {\n return this.client.request(\"POST\", `/v1/characters/${encodeURIComponent(id)}/restore`)\n }\n\n /**\n * Duplicate (fork) a character to a new row with a `\"(copy)\"` suffix.\n * Asset URLs are shared by reference — the new row can diverge by\n * regenerating any of them.\n */\n duplicate(id: string, input: DuplicateCharacterInput = {}): Promise<{ id: string; name: string }> {\n return this.client.request(\n \"POST\",\n `/v1/characters/${encodeURIComponent(id)}/duplicate`,\n { body: input },\n )\n }\n\n /**\n * Count of the caller's workflows that reference this character. Powers the\n * library \"Archive\" confirmation modal in the editor.\n */\n usage(id: string): Promise<CharacterUsage> {\n return this.client.request(\"GET\", `/v1/characters/${encodeURIComponent(id)}/usage`)\n }\n\n /**\n * Admin only: put one of your own characters on the shared Nodaro Keepers\n * shelf (`client.keepers.catalog()`), or take it off. A first-party session\n * or your personal token; `forbidden` for anyone who is not a platform\n * admin, `not_found` for a row that is not yours.\n */\n setCatalog(id: string, input: SetKeeperCatalogInput): Promise<SetKeeperCatalogResult> {\n return this.client.request(\"PUT\", `/v1/characters/${encodeURIComponent(id)}/catalog`, { body: input })\n }\n\n /**\n * Fire `POST /v1/generate-character` to produce one or more portrait\n * candidates. With `count > 1`, all jobs are reserved up-front before any\n * is enqueued — mid-batch failures roll back atomically.\n *\n * When `attachToCharacterId` is set, the worker writes the result directly\n * to the row's `source_image_url` (unless `attachPortrait: false`);\n * otherwise you must call `approvePortrait()` after picking a candidate.\n */\n generate(input: GenerateCharacterInput): Promise<GenerateCharacterResult> {\n return this.client.request(\"POST\", \"/v1/generate-character\", { body: input })\n }\n\n /**\n * Fire `POST /v1/generate-character-asset` to produce a single\n * expression / pose / angle / lighting variant. When the studio path is\n * set (`attachToCharacterId` + `attachToColumn` + `attachName`), the\n * worker appends `{ name: attachName, url: <result> }` to the named\n * JSONB array column on completion.\n */\n generateAsset(input: GenerateAssetInput): Promise<{ jobId: string }> {\n return this.client.request(\"POST\", \"/v1/generate-character-asset\", { body: input })\n }\n\n /**\n * Fire `POST /v1/generate-character-motion` to animate the character's\n * portrait into a motion clip. The result is appended to the character's\n * `motions[]` bucket when `attachToCharacterId` is set.\n */\n generateMotion(input: GenerateMotionInput): Promise<{ jobId: string }> {\n return this.client.request(\"POST\", \"/v1/generate-character-motion\", { body: input })\n }\n\n /**\n * Approve a completed `generate-character` job as the character's portrait.\n * Sets `source_image_url` and fires the LLM caption (Claude Sonnet vision)\n * inline. Returns the new portrait URL plus the caption — `canonicalDescription`\n * is `null` if the LLM call sub-failed (portrait still set; retry via `recaption()`).\n */\n approvePortrait(id: string, candidateJobId: string): Promise<ApprovePortraitResult> {\n return this.client.request(\n \"POST\",\n `/v1/characters/${encodeURIComponent(id)}/approve-portrait`,\n { body: { candidateJobId } },\n )\n }\n\n /**\n * Re-fire the LLM caption against the character's current portrait. 502s on\n * LLM failure; returns 400 `no_portrait` if no portrait is set yet.\n */\n recaption(id: string): Promise<RecaptionResult> {\n return this.client.request(\n \"POST\",\n `/v1/characters/${encodeURIComponent(id)}/llm-caption`,\n )\n }\n\n /**\n * Start training a high-fidelity model of the character on its own images\n * (Nodaro Cloud only — other editions answer `NotFoundError`). Reserves the\n * training price up front and refunds it if the training fails or is\n * cancelled. Resolves at once (202); a training takes about 15 minutes —\n * follow it with {@link trainingStatus}. Once it succeeds, a workflow's\n * Generate Image node whose prompt @-mentions this one character runs on the\n * trained model.\n *\n * An OAuth app token needs the `assets:write` scope (`ForbiddenError`\n * otherwise, before anything is reserved); a session or personal API key\n * needs none. Refusals are `NodaroError`s whose `code` is a\n * {@link TrainCharacterRefusalCode}; rate-limited to 3 calls a minute.\n */\n train(id: string, input: TrainCharacterInput = {}): Promise<TrainCharacterResult> {\n return this.client.request(\"POST\", `/v1/characters/${encodeURIComponent(id)}/train`, { body: input })\n }\n\n /**\n * The character's training record (Nodaro Cloud only). Poll it while\n * `status` is `queued` or `training` — every 10 s or so is plenty.\n */\n trainingStatus(id: string): Promise<CharacterTrainingStatus> {\n return this.client.request(\"GET\", `/v1/characters/${encodeURIComponent(id)}/training`)\n }\n\n /**\n * Remove the character's trained model (Nodaro Cloud only): cancels a\n * training in flight and refunds its reservation, deletes the model, and\n * clears the training record (`trainingStatus` then reads `untrained`).\n * Generations go back to reference images. Cannot be undone — a new model\n * means a new, paid training. An OAuth app token needs the `assets:write`\n * scope (`ForbiddenError` otherwise), like deleting the character.\n */\n async deleteLora(id: string): Promise<void> {\n await this.client.request(\"DELETE\", `/v1/characters/${encodeURIComponent(id)}/lora`)\n }\n}\n\n/** Person catalog + hint helpers, re-exported from @nodaro/prompts (FSL-licensed). */\nexport { buildPersonHints, PEOPLE, PERSON_DIMENSION_ORDER, PERSON_DIMENSION_LABELS }\nexport type { PersonValue }\n\n/**\n * Collapse a PersonValue into the comma-joined seed-prompt fragment used by\n * `characters.generate({ seedPrompt })` — same composition the Nodaro editor\n * performs. Powered by @nodaro/prompts.\n */\nexport function buildPersonSeedPrompt(value: PersonValue): string {\n return buildPersonHints(value as Record<string, unknown> & PersonValue).join(\", \")\n}\n"]}