@nodaro/sdk 2.65.0 → 2.66.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 (189) hide show
  1. package/dist/{chunk-4BAHF762.cjs → chunk-7FLTDTHR.cjs} +2 -2
  2. package/dist/chunk-7FLTDTHR.cjs.map +1 -0
  3. package/dist/{chunk-SVWEWBXI.js → chunk-ADW6LPRT.js} +17 -2
  4. package/dist/chunk-ADW6LPRT.js.map +1 -0
  5. package/dist/{chunk-3HL3IHVE.js → chunk-CSIPRLX3.js} +3 -3
  6. package/dist/{chunk-3HL3IHVE.js.map → chunk-CSIPRLX3.js.map} +1 -1
  7. package/dist/{chunk-KP2DIIKO.cjs → chunk-DQQRFBWY.cjs} +5 -5
  8. package/dist/{chunk-KP2DIIKO.cjs.map → chunk-DQQRFBWY.cjs.map} +1 -1
  9. package/dist/{chunk-MQRPXZW5.js → chunk-EBQXAOHW.js} +3 -3
  10. package/dist/{chunk-MQRPXZW5.js.map → chunk-EBQXAOHW.js.map} +1 -1
  11. package/dist/{chunk-DR5WM36L.cjs → chunk-EWVQFW5L.cjs} +22 -22
  12. package/dist/chunk-EWVQFW5L.cjs.map +1 -0
  13. package/dist/{chunk-7QK2NXJA.js → chunk-F3AV3TC7.js} +2 -2
  14. package/dist/chunk-F3AV3TC7.js.map +1 -0
  15. package/dist/{chunk-UPGZTLK7.cjs → chunk-F6KAMECM.cjs} +6 -3
  16. package/dist/chunk-F6KAMECM.cjs.map +1 -0
  17. package/dist/{chunk-P6E4QDJN.js → chunk-GG7DOKTH.js} +2 -2
  18. package/dist/chunk-GG7DOKTH.js.map +1 -0
  19. package/dist/{chunk-S4BERJXU.js → chunk-GQU5FXYB.js} +4 -4
  20. package/dist/{chunk-S4BERJXU.js.map → chunk-GQU5FXYB.js.map} +1 -1
  21. package/dist/chunk-HADYBDBT.js +19 -0
  22. package/dist/chunk-HADYBDBT.js.map +1 -0
  23. package/dist/chunk-HFDTOEAL.cjs +21 -0
  24. package/dist/chunk-HFDTOEAL.cjs.map +1 -0
  25. package/dist/{chunk-A75Q7UEU.js → chunk-JC66EEFI.js} +3 -3
  26. package/dist/{chunk-A75Q7UEU.js.map → chunk-JC66EEFI.js.map} +1 -1
  27. package/dist/{chunk-CRIQLLR2.js → chunk-JZO5WWKX.js} +51 -7
  28. package/dist/chunk-JZO5WWKX.js.map +1 -0
  29. package/dist/{chunk-YLXCXVYF.cjs → chunk-KAYCRIMA.cjs} +5 -5
  30. package/dist/{chunk-YLXCXVYF.cjs.map → chunk-KAYCRIMA.cjs.map} +1 -1
  31. package/dist/{chunk-L3RTC4FL.js → chunk-KEZMNVN3.js} +3 -3
  32. package/dist/chunk-KEZMNVN3.js.map +1 -0
  33. package/dist/{chunk-Y6V6CBY5.js → chunk-KNNSGWHO.js} +2 -2
  34. package/dist/{chunk-Y6V6CBY5.js.map → chunk-KNNSGWHO.js.map} +1 -1
  35. package/dist/{chunk-HW3CSUVC.cjs → chunk-LCQIQFWD.cjs} +17 -2
  36. package/dist/chunk-LCQIQFWD.cjs.map +1 -0
  37. package/dist/{chunk-DHJRS65Q.js → chunk-LQMJFFST.js} +6 -4
  38. package/dist/chunk-LQMJFFST.js.map +1 -0
  39. package/dist/{chunk-QUYZCZ33.js → chunk-LTRJNCXB.js} +23 -19
  40. package/dist/chunk-LTRJNCXB.js.map +1 -0
  41. package/dist/{chunk-JDEZHITT.js → chunk-MC77SD42.js} +2 -2
  42. package/dist/chunk-MC77SD42.js.map +1 -0
  43. package/dist/{chunk-VQOUF4F5.js → chunk-MCXZV3CW.js} +20 -9
  44. package/dist/chunk-MCXZV3CW.js.map +1 -0
  45. package/dist/{chunk-XZYJBJ2K.cjs → chunk-MOGPM5RM.cjs} +38 -34
  46. package/dist/chunk-MOGPM5RM.cjs.map +1 -0
  47. package/dist/{chunk-T23YD5BR.js → chunk-MYUJEVP6.js} +3 -3
  48. package/dist/{chunk-T23YD5BR.js.map → chunk-MYUJEVP6.js.map} +1 -1
  49. package/dist/chunk-N4FKPJ7J.cjs +4 -0
  50. package/dist/chunk-N4FKPJ7J.cjs.map +1 -0
  51. package/dist/{chunk-TBFA6QPH.cjs → chunk-O6LQV6BD.cjs} +4 -4
  52. package/dist/{chunk-TBFA6QPH.cjs.map → chunk-O6LQV6BD.cjs.map} +1 -1
  53. package/dist/{chunk-2DZWWIJ4.cjs → chunk-OI4RCW2J.cjs} +2 -2
  54. package/dist/chunk-OI4RCW2J.cjs.map +1 -0
  55. package/dist/{chunk-UIM5SLPP.cjs → chunk-PHBOLYRT.cjs} +4 -4
  56. package/dist/{chunk-UIM5SLPP.cjs.map → chunk-PHBOLYRT.cjs.map} +1 -1
  57. package/dist/{chunk-A5UGBCAW.js → chunk-Q6HMDIC4.js} +3 -3
  58. package/dist/{chunk-A5UGBCAW.js.map → chunk-Q6HMDIC4.js.map} +1 -1
  59. package/dist/{chunk-P2JYDWZT.cjs → chunk-QHCVKMSF.cjs} +3 -2
  60. package/dist/chunk-QHCVKMSF.cjs.map +1 -0
  61. package/dist/{chunk-7QOCWJKD.cjs → chunk-RPV4QBHS.cjs} +2 -2
  62. package/dist/{chunk-7QOCWJKD.cjs.map → chunk-RPV4QBHS.cjs.map} +1 -1
  63. package/dist/chunk-RQ6GE7KG.js +3 -0
  64. package/dist/chunk-RQ6GE7KG.js.map +1 -0
  65. package/dist/{chunk-QTO2U6JZ.cjs → chunk-S5BOU6JG.cjs} +6 -4
  66. package/dist/chunk-S5BOU6JG.cjs.map +1 -0
  67. package/dist/{chunk-3CB4WYEY.cjs → chunk-S5VSDJAM.cjs} +51 -7
  68. package/dist/chunk-S5VSDJAM.cjs.map +1 -0
  69. package/dist/{chunk-WNXX3B2A.js → chunk-SNPDM72K.js} +3 -2
  70. package/dist/chunk-SNPDM72K.js.map +1 -0
  71. package/dist/{chunk-ZVG5ODVY.cjs → chunk-UBZ2XVHM.cjs} +5 -5
  72. package/dist/{chunk-ZVG5ODVY.cjs.map → chunk-UBZ2XVHM.cjs.map} +1 -1
  73. package/dist/{chunk-WUKIJJG2.cjs → chunk-W63ZKKYT.cjs} +2 -2
  74. package/dist/chunk-W63ZKKYT.cjs.map +1 -0
  75. package/dist/{chunk-GRATHB3C.cjs → chunk-WSMZ3AAU.cjs} +9 -9
  76. package/dist/{chunk-GRATHB3C.cjs.map → chunk-WSMZ3AAU.cjs.map} +1 -1
  77. package/dist/{chunk-GGIWDFER.cjs → chunk-XSYNVD3X.cjs} +20 -9
  78. package/dist/chunk-XSYNVD3X.cjs.map +1 -0
  79. package/dist/{chunk-P2C33IOF.js → chunk-YEOK5A5H.js} +6 -3
  80. package/dist/chunk-YEOK5A5H.js.map +1 -0
  81. package/dist/entries/billing.cjs +2 -2
  82. package/dist/entries/billing.d.cts +18 -7
  83. package/dist/entries/billing.d.ts +18 -7
  84. package/dist/entries/billing.js +1 -1
  85. package/dist/entries/cast-swap.cjs +2 -2
  86. package/dist/entries/cast-swap.d.cts +22 -17
  87. package/dist/entries/cast-swap.d.ts +22 -17
  88. package/dist/entries/cast-swap.js +1 -1
  89. package/dist/entries/characters.d.cts +1 -1
  90. package/dist/entries/characters.d.ts +1 -1
  91. package/dist/entries/client.cjs +26 -25
  92. package/dist/entries/client.d.cts +4 -1
  93. package/dist/entries/client.d.ts +4 -1
  94. package/dist/entries/client.js +21 -20
  95. package/dist/entries/copilot.cjs +4 -4
  96. package/dist/entries/copilot.js +3 -3
  97. package/dist/entries/core.cjs +6 -6
  98. package/dist/entries/core.js +2 -2
  99. package/dist/entries/creatures.d.cts +1 -1
  100. package/dist/entries/creatures.d.ts +1 -1
  101. package/dist/entries/credits.cjs +2 -2
  102. package/dist/entries/credits.d.cts +89 -1
  103. package/dist/entries/credits.d.ts +89 -1
  104. package/dist/entries/credits.js +1 -1
  105. package/dist/entries/edit.cjs +7 -7
  106. package/dist/entries/edit.js +2 -2
  107. package/dist/entries/errors.cjs +28 -28
  108. package/dist/entries/errors.d.cts +6 -3
  109. package/dist/entries/errors.d.ts +6 -3
  110. package/dist/entries/errors.js +1 -1
  111. package/dist/entries/gallery.cjs +2 -2
  112. package/dist/entries/gallery.d.cts +5 -0
  113. package/dist/entries/gallery.d.ts +5 -0
  114. package/dist/entries/gallery.js +1 -1
  115. package/dist/entries/jobs.cjs +2 -2
  116. package/dist/entries/jobs.d.cts +26 -1
  117. package/dist/entries/jobs.d.ts +26 -1
  118. package/dist/entries/jobs.js +1 -1
  119. package/dist/entries/library.cjs +2 -2
  120. package/dist/entries/library.d.cts +6 -0
  121. package/dist/entries/library.d.ts +6 -0
  122. package/dist/entries/library.js +1 -1
  123. package/dist/entries/locations.d.cts +1 -1
  124. package/dist/entries/locations.d.ts +1 -1
  125. package/dist/entries/media.cjs +4 -4
  126. package/dist/entries/media.js +3 -3
  127. package/dist/entries/models.cjs +2 -2
  128. package/dist/entries/models.d.cts +2 -0
  129. package/dist/entries/models.d.ts +2 -0
  130. package/dist/entries/models.js +1 -1
  131. package/dist/entries/nodes.cjs +3 -3
  132. package/dist/entries/nodes.d.cts +1 -1
  133. package/dist/entries/nodes.d.ts +1 -1
  134. package/dist/entries/nodes.js +2 -2
  135. package/dist/entries/objects.d.cts +1 -1
  136. package/dist/entries/objects.d.ts +1 -1
  137. package/dist/entries/scene3d.d.cts +2 -2
  138. package/dist/entries/scene3d.d.ts +2 -2
  139. package/dist/entries/studio.cjs +5 -5
  140. package/dist/entries/studio.js +2 -2
  141. package/dist/entries/surface.cjs +13 -0
  142. package/dist/entries/surface.cjs.map +1 -0
  143. package/dist/entries/surface.d.cts +47 -0
  144. package/dist/entries/surface.d.ts +47 -0
  145. package/dist/entries/surface.js +4 -0
  146. package/dist/entries/surface.js.map +1 -0
  147. package/dist/entries/uploads.cjs +2 -2
  148. package/dist/entries/uploads.d.cts +4 -1
  149. package/dist/entries/uploads.d.ts +4 -1
  150. package/dist/entries/uploads.js +1 -1
  151. package/dist/entries/voices.cjs +2 -2
  152. package/dist/entries/voices.d.cts +32 -9
  153. package/dist/entries/voices.d.ts +32 -9
  154. package/dist/entries/voices.js +1 -1
  155. package/dist/index.cjs +89 -83
  156. package/dist/index.d.cts +5 -4
  157. package/dist/index.d.ts +5 -4
  158. package/dist/index.js +24 -22
  159. package/dist/{nodes-BXL3qXlY.d.ts → nodes-C9O2tdGH.d.ts} +17 -1
  160. package/dist/{nodes-Dx8rpU12.d.cts → nodes-WkaQjuwS.d.cts} +17 -1
  161. package/dist/supabase-browser.cjs +43 -5
  162. package/dist/supabase-browser.cjs.map +1 -1
  163. package/dist/supabase-browser.d.cts +11 -0
  164. package/dist/supabase-browser.d.ts +11 -0
  165. package/dist/supabase-browser.js +43 -5
  166. package/dist/supabase-browser.js.map +1 -1
  167. package/package.json +8 -3
  168. package/dist/chunk-2DZWWIJ4.cjs.map +0 -1
  169. package/dist/chunk-3CB4WYEY.cjs.map +0 -1
  170. package/dist/chunk-4BAHF762.cjs.map +0 -1
  171. package/dist/chunk-7QK2NXJA.js.map +0 -1
  172. package/dist/chunk-CRIQLLR2.js.map +0 -1
  173. package/dist/chunk-DHJRS65Q.js.map +0 -1
  174. package/dist/chunk-DR5WM36L.cjs.map +0 -1
  175. package/dist/chunk-GGIWDFER.cjs.map +0 -1
  176. package/dist/chunk-HW3CSUVC.cjs.map +0 -1
  177. package/dist/chunk-JDEZHITT.js.map +0 -1
  178. package/dist/chunk-L3RTC4FL.js.map +0 -1
  179. package/dist/chunk-P2C33IOF.js.map +0 -1
  180. package/dist/chunk-P2JYDWZT.cjs.map +0 -1
  181. package/dist/chunk-P6E4QDJN.js.map +0 -1
  182. package/dist/chunk-QTO2U6JZ.cjs.map +0 -1
  183. package/dist/chunk-QUYZCZ33.js.map +0 -1
  184. package/dist/chunk-SVWEWBXI.js.map +0 -1
  185. package/dist/chunk-UPGZTLK7.cjs.map +0 -1
  186. package/dist/chunk-VQOUF4F5.js.map +0 -1
  187. package/dist/chunk-WNXX3B2A.js.map +0 -1
  188. package/dist/chunk-WUKIJJG2.cjs.map +0 -1
  189. package/dist/chunk-XZYJBJ2K.cjs.map +0 -1
@@ -98,9 +98,11 @@ var BillingResource = class {
98
98
  * the person to `url`. Pass `returnPath` (a path on your own origin, such
99
99
  * as `"/billing"`) to have Stripe bring them back to your app with
100
100
  * `checkout=success` or `checkout=cancelled` in the query; without it the
101
- * Nodaro app's own pages are used. `ForbiddenError` with the code
102
- * `self_serve_disabled` on a deployment that does not sell to its users.
103
- * **Signed-in session only.**
101
+ * Nodaro app's own pages are used. Promotion codes apply to plans only. A
102
+ * plan's checkout answers `409` while the account already has a
103
+ * subscription: use {@link BillingResource.changePlan}. `ForbiddenError`
104
+ * with the code `self_serve_disabled` on a deployment that does not sell to
105
+ * its users. **Signed-in session only.**
104
106
  */
105
107
  async checkout(input) {
106
108
  const res = await this.client.request("POST", "/v1/billing/create-checkout-session", { body: input });
@@ -130,10 +132,19 @@ var BillingResource = class {
130
132
  }
131
133
  /**
132
134
  * `POST /v1/billing/change-plan` → moves the active subscription to another
133
- * plan's price (`newPriceId`, a subscription price from the plans list),
134
- * prorated by Stripe; the new tier applies at once. `NotFoundError` with no
135
- * active subscription; `400` on a pack's price or the current one.
136
- * **Signed-in session only.**
135
+ * plan's price (`newPriceId`, a subscription price from the plans list).
136
+ * An upgrade charges the price difference for the rest of the billing
137
+ * period at once and applies only when that payment succeeds; it adds the
138
+ * difference between the two plans' monthly credits, once per billing
139
+ * period. A downgrade applies at once and keeps the current credits until
140
+ * the period ends. An upgrade invoice settled for 0 adds no credits, and a
141
+ * monthly <-> yearly switch adds none either. `NotFoundError` with no
142
+ * active subscription; `400` on a pack's price or the current one; `409`
143
+ * when the subscription is not active. A `NodaroError` with status `409`
144
+ * and code `plan_change_payment_required` when the upgrade waits on its
145
+ * payment: the plan is unchanged and `details.invoiceUrl` is Stripe's page
146
+ * for paying it. `RateLimitedError` after 5 plan-change requests from one
147
+ * account in 24 hours. **Signed-in session only.**
137
148
  */
138
149
  async changePlan(input) {
139
150
  const res = await this.client.request("POST", "/v1/billing/change-plan", { body: input });
@@ -142,5 +153,5 @@ var BillingResource = class {
142
153
  };
143
154
 
144
155
  exports.BillingResource = BillingResource;
145
- //# sourceMappingURL=chunk-GGIWDFER.cjs.map
146
- //# sourceMappingURL=chunk-GGIWDFER.cjs.map
156
+ //# sourceMappingURL=chunk-XSYNVD3X.cjs.map
157
+ //# sourceMappingURL=chunk-XSYNVD3X.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/resources/billing.ts"],"names":[],"mappings":";;;AA0LO,IAAM,kBAAN,MAAsB;AAAA,EAC3B,YAAoB,MAAA,EAA0B;AAA1B,IAAA,IAAA,CAAA,MAAA,GAAA,MAAA;AAAA,EAA2B;AAAA,EAA3B,MAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EASpB,KAAA,GAAqC;AACnC,IAAA,OAAO,IAAA,CAAK,MAAA,CAAO,OAAA,CAA4B,KAAA,EAAO,mBAAmB,CAAA;AAAA,EAC3E;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAUA,YAAA,GAAmD;AACjD,IAAA,OAAO,IAAA,CAAK,MAAA,CAAO,OAAA,CAAmC,KAAA,EAAO,0BAA0B,CAAA;AAAA,EACzF;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOA,MAAM,OAAA,GAAmC;AACvC,IAAA,MAAM,MAAM,MAAM,IAAA,CAAK,MAAA,CAAO,OAAA,CAAkC,OAAO,qBAAqB,CAAA;AAC5F,IAAA,OAAO,GAAA,CAAI,IAAA;AAAA,EACb;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOA,MAAM,OAAA,GAAiD;AACrD,IAAA,MAAM,MAAM,MAAM,IAAA,CAAK,MAAA,CAAO,OAAA,CAAgD,OAAO,qBAAqB,CAAA;AAC1G,IAAA,OAAO,GAAA,CAAI,IAAA;AAAA,EACb;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EASA,MAAM,SAAA,GAAwC;AAC5C,IAAA,MAAM,MAAM,MAAM,IAAA,CAAK,MAAA,CAAO,OAAA,CAAqC,OAAO,0BAA0B,CAAA;AACpG,IAAA,OAAO,GAAA,CAAI,IAAA;AAAA,EACb;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOA,MAAM,QAAA,GAAuC;AAC3C,IAAA,MAAM,MAAM,MAAM,IAAA,CAAK,MAAA,CAAO,OAAA,CAAqC,OAAO,sBAAsB,CAAA;AAChG,IAAA,OAAO,GAAA,CAAI,IAAA;AAAA,EACb;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOA,MAAM,aAAA,GAA+C;AACnD,IAAA,MAAM,MAAM,MAAM,IAAA,CAAK,MAAA,CAAO,OAAA,CAAwC,OAAO,4BAA4B,CAAA;AACzG,IAAA,OAAO,GAAA,CAAI,IAAA;AAAA,EACb;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOA,MAAM,YAAA,GAA6C;AACjD,IAAA,MAAM,MAAM,MAAM,IAAA,CAAK,MAAA,CAAO,OAAA,CAAuC,OAAO,2BAA2B,CAAA;AACvG,IAAA,OAAO,GAAA,CAAI,IAAA;AAAA,EACb;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQA,MAAM,gBAAgB,KAAA,EAAoE;AACxF,IAAA,MAAM,GAAA,GAAM,MAAM,IAAA,CAAK,MAAA,CAAO,OAAA,CAA4C,OAAO,2BAAA,EAA6B,EAAE,IAAA,EAAM,KAAA,EAAO,CAAA;AAC7H,IAAA,OAAO,GAAA,CAAI,IAAA;AAAA,EACb;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAcA,MAAM,SAAS,KAAA,EAA8D;AAC3E,IAAA,MAAM,GAAA,GAAM,MAAM,IAAA,CAAK,MAAA,CAAO,OAAA,CAA0C,QAAQ,qCAAA,EAAuC,EAAE,IAAA,EAAM,KAAA,EAAO,CAAA;AACtI,IAAA,OAAO,GAAA,CAAI,IAAA;AAAA,EACb;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EASA,MAAM,YAAY,KAAA,EAAsD;AACtE,IAAA,MAAM,GAAA,GAAM,MAAM,IAAA,CAAK,MAAA,CAAO,OAAA,CAAsC,QAAQ,iCAAA,EAAmC,EAAE,IAAA,EAAM,KAAA,EAAO,CAAA;AAC9H,IAAA,OAAO,GAAA,CAAI,IAAA;AAAA,EACb;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EASA,MAAM,MAAA,CAAO,KAAA,GAA4B,EAAC,EAAkC;AAC1E,IAAA,MAAM,GAAA,GAAM,MAAM,IAAA,CAAK,MAAA,CAAO,OAAA,CAAwC,QAAQ,iCAAA,EAAmC,EAAE,IAAA,EAAM,KAAA,EAAO,CAAA;AAChI,IAAA,OAAO,GAAA,CAAI,IAAA;AAAA,EACb;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAkBA,MAAM,WAAW,KAAA,EAAiE;AAChF,IAAA,MAAM,GAAA,GAAM,MAAM,IAAA,CAAK,MAAA,CAAO,OAAA,CAA2C,QAAQ,yBAAA,EAA2B,EAAE,IAAA,EAAM,KAAA,EAAO,CAAA;AAC3H,IAAA,OAAO,GAAA,CAAI,IAAA;AAAA,EACb;AACF","file":"chunk-XSYNVD3X.cjs","sourcesContent":["import type { NodaroClientCore } from \"../core.js\"\n\n/**\n * Plans and prices, the subscription, and the billing surface — the shapes of\n * the `/v1/billing/*` routes an app may call. Mirrors the backend routes\n * (`backend/src/ee/routes/billing.ts`, `backend/src/routes/billing-surface.ts`),\n * the source of truth: keep these in sync if they change.\n *\n * Buying, the plan, the payment settings, the receipts and the invoices answer\n * a SIGNED-IN SESSION only (`supabaseAuth`, the credential a first-party web\n * app holds): those routes refuse an API key and an app's OAuth token with\n * `403 forbidden` (`ForbiddenError`). Their methods are marked so below.\n */\n\n/** A sum of money in its currency's major unit (`12` = 12.00), with its ISO-4217 code (`\"USD\"`). */\nexport interface BillingMoney {\n amount: number\n currency: string\n}\n\n/** The credits a price grants, and how often. */\nexport interface BillingPriceCredits {\n amount: number\n per: \"month\" | \"year\"\n}\n\n/** A monthly price, and what it grants. */\nexport interface BillingMonthlyPrice extends BillingMoney {\n /** The Stripe price id: pass it to {@link BillingResource.checkout} or {@link BillingResource.changePlan}; match the subscription's `stripe_price_id` to it to learn the interval. */\n priceId: string\n /** `null` when the price does not state it. */\n credits: BillingPriceCredits | null\n}\n\n/** A yearly price, what it comes to per month, and what it grants. */\nexport interface BillingYearlyPrice extends BillingMoney {\n /** The Stripe price id: pass it to {@link BillingResource.checkout} or {@link BillingResource.changePlan}; match the subscription's `stripe_price_id` to it to learn the interval. */\n priceId: string\n /** The yearly amount spread over the months it pays for; `null` when that cannot be said. */\n perMonth: number | null\n /** What the price grants — the plan's credits every month, as a monthly price; `null` when the price does not state it. */\n credits: BillingPriceCredits | null\n}\n\nexport interface BillingPlanPrices {\n /** `null` = Stripe cannot sell this price right now: show it as unavailable, never as free. */\n monthly: BillingMonthlyPrice | null\n yearly: BillingYearlyPrice | null\n}\n\n/** One plan on sale. */\nexport interface BillingPlan {\n /** `\"free\"`, `\"basic\"`, `\"standard\"`, … — the stable id. */\n id: string\n name: string\n /** `null` for the free plan: there is nothing to pay. */\n prices: BillingPlanPrices | null\n /** The free plan's one-time grant at sign-up; `null` on a paid plan, whose credits come with each price. */\n signupCredits: number | null\n /**\n * How many nodes of one workflow run at once. Once Nodaro Cloud enforces its\n * concurrency limits, the plan's limit on generations running at once,\n * shared by all of an account's runs.\n */\n parallelism: number\n /** Storage for your media, in bytes. */\n storageBytes: number\n}\n\n/** A credit pack: this many credits for this price. */\nexport interface BillingTopUp {\n /** The pack's own id (`\"topup-25\"`), not a Stripe id. */\n id: string\n credits: number\n /** `null` when the pack's price cannot be stated right now: show it as unavailable. */\n price: BillingMoney | null\n /** The Stripe price id for {@link BillingResource.checkout} (mode `\"payment\"`); `null` with the price. A pack can always be bought as a load of `price.amount` through {@link BillingResource.loadCredits}. */\n priceId: string | null\n}\n\n/** The answer of `GET /v1/billing/plans`. */\nexport interface BillingPlansResult {\n /** The free plan first, then each paid plan from the smallest. */\n data: BillingPlan[]\n /** The credit packs, from the smallest. */\n topUps: BillingTopUp[]\n /** Any whole amount in this range can be loaded as credits, at the same rate as the packs. */\n topUpRange: { min: number; max: number; currency: string }\n}\n\n/** The account's latest subscription record. */\nexport interface BillingSubscription {\n id: string\n stripe_subscription_id: string | null\n /** The plan id: `\"basic\"`, `\"standard\"`, … */\n tier: string\n /** `\"active\"`, `\"trialing\"`, `\"past_due\"`, `\"paused\"`, `\"canceled\"`, `\"incomplete\"` or `\"expired\"`. */\n status: string\n stripe_price_id: string | null\n /** ISO-8601. */\n current_period_start: string | null\n /** ISO-8601: when the current period ends (and renews, unless cancelled). */\n current_period_end: string | null\n /** True when the subscription ends at `current_period_end` instead of renewing. */\n cancel_at_period_end: boolean\n /** ISO-8601: when a scheduled cancellation takes effect. */\n cancel_at: string | null\n /** ISO-8601: when it was cancelled. */\n canceled_at: string | null\n}\n\n/** The answer of `GET /v1/billing/subscription`. */\nexport interface BillingSubscriptionResult {\n /** `null` when the account never subscribed. */\n data: BillingSubscription | null\n /**\n * The tier the account's entitlements follow: usually a plan id from\n * `plans()` (`\"free\"` included); `\"payg\"` — no subscription, but credits\n * bought (every model, no watermark); or a tier that is not on sale, such\n * as `\"enterprise\"`.\n */\n effectiveTier: string\n}\n\n/** How this deployment bills, the same for every caller (`GET /v1/billing/surface`). */\nexport interface BillingSurface {\n /** The billing-surface contract version (an integer). */\n contract: number\n /** The registered billing provider; `\"none\"` = this deployment meters nothing. */\n providerId: string\n /** The unit costs display in by default (`\"credits\"`, `\"usd\"`, or a deployment's own label). */\n displayUnit: string\n canReport: boolean\n canQuote: boolean\n canAccount: boolean\n /** Whether a cost view belongs on this deployment. */\n mountCostTab: boolean\n /** One billing account pays for every user here. */\n deploymentPayer: boolean\n}\n\n/** One row of {@link BillingAccountSummary.byCategory}. */\nexport interface BillingUsageCategory {\n category: string\n count: number\n /** Spend in the display unit; `null` = unavailable, never 0. */\n amount: number | null\n spent: BillingMoney | null\n}\n\n/**\n * The caller's account as the deployment's billing provider sees it\n * (`GET /v1/billing/account`). Money and amounts are `null` when the provider\n * could not say: show that distinctly, never as 0. A field the provider leaves\n * out is a concept it does not have.\n */\nexport interface BillingAccountSummary {\n /** A plain string; `\"unknown\"` is a real answer. */\n plan: string\n balance: number | null\n dailyAllowance: number | null\n unit: string\n /** `\"external_wallet\"` when the balance comes from a wallet outside Nodaro. */\n balanceSource?: \"external_wallet\"\n /** ISO-8601 start of the current usage period. */\n periodStart?: string | null\n /** Generations this period. */\n generations?: number | null\n /** Money spent this period. */\n spent?: BillingMoney | null\n /** Pay-as-you-go state. */\n payg?: {\n enabled: boolean\n reserve: number | null\n rate: { creditsPerUnit: number; currency: string } | null\n monthlyCap: BillingMoney | null\n } | null\n /** The daily cap and when it resets; prefer it over `dailyAllowance` when present. `limit: 0` means blocked. */\n daily?: { limit: number; used: number; remaining: number; resetsAt: string } | null\n /** Money value of the pay-as-you-go reserve. */\n reserveValue?: BillingMoney | null\n byCategory?: BillingUsageCategory[] | null\n /** The total the balance is drawn from, where the provider grants each user an allocation. */\n allocated?: number | null\n}\n\nexport class BillingResource {\n constructor(private client: NodaroClientCore) {}\n\n /**\n * `GET /v1/billing/plans` → the plans and credit packs on sale, with their\n * prices. Public: works with no credential, the same for every caller.\n * Nodaro Cloud only — a self-hosted instance answers 404. Throws on `403\n * self_serve_disabled` (this deployment does not sell to its users) and on\n * `503` (`stripe_not_configured`, or prices briefly unavailable).\n */\n plans(): Promise<BillingPlansResult> {\n return this.client.request<BillingPlansResult>(\"GET\", \"/v1/billing/plans\")\n }\n\n /**\n * `GET /v1/billing/subscription` → the account's latest subscription\n * (`null` when it never subscribed) and the tier its entitlements follow.\n * Match `effectiveTier` to a {@link BillingPlan} `id` to mark the current\n * plan (no match: pay-as-you-go, or a tier not on sale). Needs a signed-in\n * session, a personal API token without a workflow limit, or an app's OAuth\n * token. Nodaro Cloud only — a self-hosted instance answers 404.\n */\n subscription(): Promise<BillingSubscriptionResult> {\n return this.client.request<BillingSubscriptionResult>(\"GET\", \"/v1/billing/subscription\")\n }\n\n /**\n * `GET /v1/billing/surface` → how this deployment bills: whether it meters\n * at all (`providerId !== \"none\"`) and in which unit costs display. Public,\n * every edition.\n */\n async surface(): Promise<BillingSurface> {\n const res = await this.client.request<{ data: BillingSurface }>(\"GET\", \"/v1/billing/surface\")\n return res.data\n }\n\n /**\n * `GET /v1/billing/account` → the caller's plan and balance as the\n * deployment's billing provider reports them, in its display unit. `null`\n * when the provider could not answer — not a zero balance. Every edition.\n */\n async account(): Promise<BillingAccountSummary | null> {\n const res = await this.client.request<{ data: BillingAccountSummary | null }>(\"GET\", \"/v1/billing/account\")\n return res.data\n }\n\n // ── Signed-in session only (ForbiddenError on an API key or an app token) ──\n\n /**\n * `GET /v1/billing/transactions` → the account's credit purchases, newest\n * first: subscription payments and credit packs, each with its Stripe\n * receipt link when one was captured. **Signed-in session only.**\n */\n async purchases(): Promise<BillingPurchase[]> {\n const res = await this.client.request<{ data: BillingPurchase[] }>(\"GET\", \"/v1/billing/transactions\")\n return res.data\n }\n\n /**\n * `GET /v1/billing/invoices` → every payment as a document, newest first:\n * a Stripe invoice (with its PDF) for each subscription payment, a hosted\n * receipt for each credit pack or load. **Signed-in session only.**\n */\n async invoices(): Promise<BillingDocument[]> {\n const res = await this.client.request<{ data: BillingDocument[] }>(\"GET\", \"/v1/billing/invoices\")\n return res.data\n }\n\n /**\n * `GET /v1/billing/payment-method` → the card and the billing details on\n * file with Stripe; both `null` for an account that has not bought yet\n * (never an error). **Signed-in session only.**\n */\n async paymentMethod(): Promise<BillingPaymentMethod> {\n const res = await this.client.request<{ data: BillingPaymentMethod }>(\"GET\", \"/v1/billing/payment-method\")\n return res.data\n }\n\n /**\n * `GET /v1/billing/auto-recharge` → the automatic top-up setting: when the\n * balance falls under `thresholdCredits`, `amountUsd` is loaded from the\n * saved card. **Signed-in session only.**\n */\n async autoRecharge(): Promise<BillingAutoRecharge> {\n const res = await this.client.request<{ data: BillingAutoRecharge }>(\"GET\", \"/v1/billing/auto-recharge\")\n return res.data\n }\n\n /**\n * `PUT /v1/billing/auto-recharge` → changes the automatic top-up. Enabling\n * needs both `thresholdCredits` (100–100,000) and `amountUsd` (a whole\n * amount in the load range); the server answers `400` otherwise. A change\n * clears the failure count. **Signed-in session only.**\n */\n async setAutoRecharge(input: BillingAutoRechargeInput): Promise<BillingAutoRechargeSaved> {\n const res = await this.client.request<{ data: BillingAutoRechargeSaved }>(\"PUT\", \"/v1/billing/auto-recharge\", { body: input })\n return res.data\n }\n\n /**\n * `POST /v1/billing/create-checkout-session` → a Stripe Checkout page for a\n * plan or a credit pack (`priceId` from {@link BillingPlansResult}): send\n * the person to `url`. Pass `returnPath` (a path on your own origin, such\n * as `\"/billing\"`) to have Stripe bring them back to your app with\n * `checkout=success` or `checkout=cancelled` in the query; without it the\n * Nodaro app's own pages are used. Promotion codes apply to plans only. A\n * plan's checkout answers `409` while the account already has a\n * subscription: use {@link BillingResource.changePlan}. `ForbiddenError`\n * with the code `self_serve_disabled` on a deployment that does not sell to\n * its users. **Signed-in session only.**\n */\n async checkout(input: BillingCheckoutInput): Promise<BillingCheckoutSession> {\n const res = await this.client.request<{ data: BillingCheckoutSession }>(\"POST\", \"/v1/billing/create-checkout-session\", { body: input })\n return res.data\n }\n\n /**\n * `POST /v1/billing/create-load-session` → a Stripe Checkout page that loads\n * a whole amount (`amountUsd`, within {@link BillingPlansResult.topUpRange})\n * as credits at the packs' rate; `credits` is what it will grant. The card\n * is saved for auto top-up. `returnPath` as in {@link checkout}.\n * **Signed-in session only.**\n */\n async loadCredits(input: BillingLoadInput): Promise<BillingLoadSession> {\n const res = await this.client.request<{ data: BillingLoadSession }>(\"POST\", \"/v1/billing/create-load-session\", { body: input })\n return res.data\n }\n\n /**\n * `POST /v1/billing/manage-subscription` → a Stripe Customer Portal page\n * (the card, the billing address, the invoices, cancelling): send the person\n * to `url`; `returnPath` is where the portal's Back goes (default the app's\n * `/billing`). `NotFoundError` before a first purchase — Stripe does not\n * know the account yet. **Signed-in session only.**\n */\n async portal(input: BillingPortalInput = {}): Promise<BillingPortalSession> {\n const res = await this.client.request<{ data: BillingPortalSession }>(\"POST\", \"/v1/billing/manage-subscription\", { body: input })\n return res.data\n }\n\n /**\n * `POST /v1/billing/change-plan` → moves the active subscription to another\n * plan's price (`newPriceId`, a subscription price from the plans list).\n * An upgrade charges the price difference for the rest of the billing\n * period at once and applies only when that payment succeeds; it adds the\n * difference between the two plans' monthly credits, once per billing\n * period. A downgrade applies at once and keeps the current credits until\n * the period ends. An upgrade invoice settled for 0 adds no credits, and a\n * monthly <-> yearly switch adds none either. `NotFoundError` with no\n * active subscription; `400` on a pack's price or the current one; `409`\n * when the subscription is not active. A `NodaroError` with status `409`\n * and code `plan_change_payment_required` when the upgrade waits on its\n * payment: the plan is unchanged and `details.invoiceUrl` is Stripe's page\n * for paying it. `RateLimitedError` after 5 plan-change requests from one\n * account in 24 hours. **Signed-in session only.**\n */\n async changePlan(input: BillingChangePlanInput): Promise<BillingChangePlanResult> {\n const res = await this.client.request<{ data: BillingChangePlanResult }>(\"POST\", \"/v1/billing/change-plan\", { body: input })\n return res.data\n }\n}\n\n// ── Types of the signed-in-session methods ──\n\n/** One credit purchase (`billing.purchases()`), as the `transactions` row names it. */\nexport interface BillingPurchase {\n id: string\n /** The Stripe payment or subscription id. */\n stripe_transaction_id: string | null\n /** `\"subscription\"` (a plan payment), `\"topup\"` (a credit pack or a load) or `\"refund\"` (money given back: `credits_granted` negative). */\n type: string\n /** What was paid, in US dollars (on a refund, the sum given back). */\n amount_usd: number\n /** Negative on a refund. */\n credits_granted: number\n /** The plan paid for, on a subscription payment. */\n tier: string | null\n /** ISO-8601. */\n created_at: string\n /** Stripe's hosted receipt; `null` when none was captured. */\n receipt_url: string | null\n}\n\n/** A payment document: a Stripe invoice (a subscription payment) or a receipt (a credit purchase). */\nexport interface BillingDocument {\n id: string\n kind: \"invoice\" | \"receipt\"\n /** The invoice number Stripe printed; `null` on a receipt. */\n number: string | null\n /** ISO-8601. */\n at: string\n amount: BillingMoney\n /** The credits the payment granted; `null` on an invoice (the plan's credits come with the period). Negative on a refund. */\n credits: number | null\n /** `\"paid\"`, `\"open\"`, `\"void\"`, `\"uncollectible\"`, or `\"refunded\"` (a receipt for money given back: `amount` and `credits` negative). */\n status: string\n description: string | null\n /** The PDF, on an invoice; `null` on a receipt. */\n pdfUrl: string | null\n /** The hosted page: Stripe's invoice page, or the receipt. */\n url: string | null\n}\n\n/** The card on file, as Stripe shows it. */\nexport interface BillingCard {\n /** `\"visa\"`, `\"mastercard\"`, … */\n brand: string\n last4: string\n expMonth: number\n expYear: number\n}\n\n/** The name, email and country on file. */\nexport interface BillingDetails {\n name: string | null\n email: string | null\n /** ISO-3166 alpha-2. */\n country: string | null\n}\n\n/** The answer of `billing.paymentMethod()`: both `null` before a first purchase. */\nexport interface BillingPaymentMethod {\n card: BillingCard | null\n billingDetails: BillingDetails | null\n}\n\n/** The automatic top-up setting (`billing.autoRecharge()`). */\nexport interface BillingAutoRecharge {\n enabled: boolean\n /** Load when the balance falls under this many credits; `null` when never set. */\n thresholdCredits: number | null\n /** The whole dollar amount loaded each time; `null` when never set. */\n amountUsd: number | null\n /** Failed attempts in a row; the server stops trying after a few, until the setting is saved again. */\n failureCount: number\n /** ISO-8601; `null` before the first attempt. */\n lastAttemptAt: string | null\n /** Whether a card is saved to charge; without one, enabling cannot work. */\n hasSavedCard: boolean\n}\n\n/** What `billing.setAutoRecharge()` sends; `thresholdCredits` and `amountUsd` are both required to enable. */\nexport interface BillingAutoRechargeInput {\n enabled: boolean\n thresholdCredits?: number\n amountUsd?: number\n}\n\n/** What `billing.setAutoRecharge()` answers: the fields as sent (`null` for one left out, even when a stored value remains); read {@link BillingResource.autoRecharge} for the whole setting. */\nexport interface BillingAutoRechargeSaved {\n enabled: boolean\n thresholdCredits: number | null\n amountUsd: number | null\n}\n\n/** What `billing.checkout()` sends. */\nexport interface BillingCheckoutInput {\n /** A plan's monthly or yearly price id, or a credit pack's (`BillingTopUp.id`). */\n priceId: string\n /** Inferred from the price when omitted. */\n mode?: \"subscription\" | \"payment\"\n /** A path on the calling origin Stripe brings the person back to (`\"/billing\"`, a query allowed): one leading `/`, no host, no `#`. Wins over `embedded`. */\n returnPath?: string\n /** Set by an embedded first-party surface: return to the app's public checkout-complete page. */\n embedded?: boolean\n}\n\n/** A Stripe Checkout page to send the person to. */\nexport interface BillingCheckoutSession {\n url: string | null\n}\n\n/** What `billing.loadCredits()` sends. */\nexport interface BillingLoadInput {\n /** A whole dollar amount within `topUpRange`. */\n amountUsd: number\n /** As in {@link BillingCheckoutInput.returnPath}; wins over `embedded`. */\n returnPath?: string\n embedded?: boolean\n}\n\n/** A Stripe Checkout page for a load, and the credits it grants. */\nexport interface BillingLoadSession {\n url: string | null\n credits: number\n}\n\n/** What `billing.portal()` sends. */\nexport interface BillingPortalInput {\n /** Where the portal's Back goes: a path on the calling origin; default the app's `/billing`. */\n returnPath?: string\n}\n\n/** A Stripe Customer Portal page to send the person to. */\nexport interface BillingPortalSession {\n url: string\n}\n\n/** What `billing.changePlan()` sends. */\nexport interface BillingChangePlanInput {\n /** A subscription price id from the plans list. */\n newPriceId: string\n}\n\n/** What `billing.changePlan()` answers. */\nexport interface BillingChangePlanResult {\n subscriptionId: string\n /** The plan now in force: `\"basic\"`, `\"standard\"`, … */\n tier: string\n}\n"]}
@@ -42,7 +42,10 @@ var UploadsResource = class {
42
42
  * An import of a link runs the platform's content rights check: pass the
43
43
  * `confirmationId` from `contentRights.confirm({ url })` when the deployment
44
44
  * requires one (`403 rights_confirmation_required` otherwise). A site an
45
- * administrator disabled answers `403 import_source_disabled`.
45
+ * administrator disabled answers `403 import_source_disabled`, and a
46
+ * deployment that turned link imports off answers `403 link_imports_disabled`
47
+ * for a link to another site (a file of the deployment's own storage is still
48
+ * imported as before).
46
49
  */
47
50
  async importUrl(url, options = {}) {
48
51
  const res = await this.client.request("POST", "/v1/media/import-url", {
@@ -63,5 +66,5 @@ var UploadsResource = class {
63
66
  };
64
67
 
65
68
  export { UploadsResource };
66
- //# sourceMappingURL=chunk-P2C33IOF.js.map
67
- //# sourceMappingURL=chunk-P2C33IOF.js.map
69
+ //# sourceMappingURL=chunk-YEOK5A5H.js.map
70
+ //# sourceMappingURL=chunk-YEOK5A5H.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/resources/uploads.ts"],"names":[],"mappings":";AA4BO,IAAM,kBAAN,MAAsB;AAAA,EAC3B,YAAoB,MAAA,EAA0B;AAA1B,IAAA,IAAA,CAAA,MAAA,GAAA,MAAA;AAAA,EAA2B;AAAA,EAA3B,MAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAUpB,MAAM,OAAO,IAAA,EAAmC;AAC9C,IAAA,MAAM,IAAA,GAAO,IAAI,QAAA,EAAS;AAC1B,IAAA,IAAA,CAAK,MAAA,CAAO,QAAQ,IAAI,CAAA;AACxB,IAAA,MAAM,GAAA,GAAM,MAAM,IAAA,CAAK,MAAA,CAAO,OAAA;AAAA,MAC5B,MAAA;AAAA,MACA,YAAA;AAAA,MACA,EAAE,MAAM,IAAA;AAAK,KACf;AACA,IAAA,OAAO,GAAA,CAAI,IAAA;AAAA,EACb;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EA2BA,MAAM,SAAA,CAAU,GAAA,EAAa,OAAA,GAAuC,EAAC,EAA6B;AAChG,IAAA,MAAM,MAAM,MAAM,IAAA,CAAK,MAAA,CAAO,OAAA,CAAmC,QAAQ,sBAAA,EAAwB;AAAA,MAC/F,IAAA,EAAM,EAAE,GAAA,EAAK,GAAI,OAAA,CAAQ,cAAA,GAAiB,EAAE,cAAA,EAAgB,OAAA,CAAQ,cAAA,EAAe,GAAI,EAAC;AAAG,KAC5F,CAAA;AACD,IAAA,OAAO,GAAA,CAAI,IAAA;AAAA,EACb;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EASA,WAAW,IAAA,EAA+E;AACxF,IAAA,OAAO,IAAA,CAAK,OAAO,OAAA,CAA0B,MAAA,EAAQ,mBAAmB,EAAE,IAAA,EAAM,MAAM,CAAA;AAAA,EACxF;AACF","file":"chunk-YEOK5A5H.js","sourcesContent":["import type { NodaroClientCore } from \"../core.js\"\n\n/**\n * Result of a successful `POST /v1/upload`. Mirrors the route's `data` envelope\n * (`backend/src/routes/upload.ts`), the source of truth — keep in sync if that\n * response changes. The route also returns loosely-typed extracted `metadata`;\n * it is omitted here until a consumer needs a typed shape (add it shaped to\n * that need rather than inventing `Record<string, unknown>` surface now).\n */\nexport interface UploadResult {\n /** Public R2 URL of the stored asset (always present on success). */\n readonly url: string\n /** Storage row id; `null` when no asset row was written (e.g. unauthenticated). */\n readonly assetId: string | null\n /** Generated thumbnail URL (images/video); `null` for audio or on failure. */\n readonly thumbnailUrl: string | null\n /** Server-classified asset category (e.g. \"image\" | \"video\" | \"audio\"). */\n readonly category: string\n /** Display filename (server override or the original). */\n readonly filename: string\n /** Final MIME type after server normalization. */\n readonly mimeType: string\n /** Stored byte size. */\n readonly sizeBytes: number\n /** R2 object key. */\n readonly r2Key: string\n}\n\nexport class UploadsResource {\n constructor(private client: NodaroClientCore) {}\n\n /**\n * Upload one file (`POST /v1/upload`, multipart — the file rides the `file`\n * field). The SDK's `request` detects the `FormData` body and lets the\n * runtime set the multipart boundary. Returns the persisted asset's public\n * URL + storage metadata (unwraps the `{ data }` envelope). Throws\n * `StorageExceededError` (413) over the storage cap and the SDK's other typed\n * errors on the usual statuses.\n */\n async upload(file: File): Promise<UploadResult> {\n const form = new FormData()\n form.append(\"file\", file)\n const res = await this.client.request<{ data: UploadResult }>(\n \"POST\",\n \"/v1/upload\",\n { body: form },\n )\n return res.data\n }\n\n /**\n * Copy a picture from a web address into your storage\n * (`POST /v1/media/import-url`, body `{ url }`). The platform fetches it\n * (http(s) only, never a private address, up to 20 MB), keeps it only if it\n * decodes as an image (JPEG, PNG, WebP, GIF; HEIC/HEIF and AVIF are\n * converted to JPEG or PNG), and stores it as an upload of yours, so its address serves\n * the pixels to the browser (a canvas can read it). Returns the stored\n * picture (unwraps the `{ data }` envelope).\n *\n * Throws `StorageExceededError` on a 413, its `reason` telling the two\n * apart: `storage_limit_exceeded` is a full storage (the quota is in\n * `details` — `usedBytes`, `quotaBytes`, `remainingBytes`, `tier`), and\n * `file_too_large` a picture over 20 MB. Throws a `NodaroError` with `code`\n * `validation_error` (400: not an http(s) address, or not an image) or\n * `fetch_failed` (422: the address could not be reached or answered with an\n * error).\n *\n * An import of a link runs the platform's content rights check: pass the\n * `confirmationId` from `contentRights.confirm({ url })` when the deployment\n * requires one (`403 rights_confirmation_required` otherwise). A site an\n * administrator disabled answers `403 import_source_disabled`, and a\n * deployment that turned link imports off answers `403 link_imports_disabled`\n * for a link to another site (a file of the deployment's own storage is still\n * imported as before).\n */\n async importUrl(url: string, options: { confirmationId?: string } = {}): Promise<ImportUrlResult> {\n const res = await this.client.request<{ data: ImportUrlResult }>(\"POST\", \"/v1/media/import-url\", {\n body: { url, ...(options.confirmationId ? { confirmationId: options.confirmationId } : {}) },\n })\n return res.data\n }\n\n /**\n * Store a JSON document (`POST /v1/upload-json`, up to 25 MB) and get its\n * public URL — e.g. an image editor's design state, passed to\n * `client.jobs.fromUpload` as `editStateUrl` so the edit can be reopened.\n * The URL is unguessable but public: never store a secret in it. Creates no\n * library item.\n */\n uploadJson(json: Record<string, unknown> | readonly unknown[]): Promise<UploadJsonResult> {\n return this.client.request<UploadJsonResult>(\"POST\", \"/v1/upload-json\", { body: json })\n }\n}\n\n/** Result of {@link UploadsResource.uploadJson}. */\nexport interface UploadJsonResult {\n /** Public URL of the stored JSON document. */\n readonly url: string\n}\n\n/**\n * Result of {@link UploadsResource.importUrl}. Mirrors the route's `data`:\n * the fields of {@link UploadResult} it shares, plus the picture's size.\n */\nexport interface ImportUrlResult {\n /** Public URL of the stored picture. */\n readonly url: string\n /** Generated thumbnail URL; `null` when it could not be made. */\n readonly thumbnailUrl: string | null\n /** Storage row id; `null` when no asset row was written. */\n readonly assetId: string | null\n /** Final MIME type (a HEIC/HEIF or AVIF source is stored as JPEG or PNG). */\n readonly mimeType: string\n /** Stored byte size. */\n readonly sizeBytes: number\n /** Display filename: the address's last path segment, else `imported-<id>.<ext>`. */\n readonly filename: string\n /** Width in pixels; 0 when it could not be read. */\n readonly width: number\n /** Height in pixels; 0 when it could not be read. */\n readonly height: number\n}\n"]}
@@ -1,13 +1,13 @@
1
1
  'use strict';
2
2
 
3
3
  require('../chunk-IS26FJO7.cjs');
4
- var chunkGGIWDFER_cjs = require('../chunk-GGIWDFER.cjs');
4
+ var chunkXSYNVD3X_cjs = require('../chunk-XSYNVD3X.cjs');
5
5
 
6
6
 
7
7
 
8
8
  Object.defineProperty(exports, "BillingResource", {
9
9
  enumerable: true,
10
- get: function () { return chunkGGIWDFER_cjs.BillingResource; }
10
+ get: function () { return chunkXSYNVD3X_cjs.BillingResource; }
11
11
  });
12
12
  //# sourceMappingURL=billing.cjs.map
13
13
  //# sourceMappingURL=billing.cjs.map
@@ -253,9 +253,11 @@ declare class BillingResource {
253
253
  * the person to `url`. Pass `returnPath` (a path on your own origin, such
254
254
  * as `"/billing"`) to have Stripe bring them back to your app with
255
255
  * `checkout=success` or `checkout=cancelled` in the query; without it the
256
- * Nodaro app's own pages are used. `ForbiddenError` with the code
257
- * `self_serve_disabled` on a deployment that does not sell to its users.
258
- * **Signed-in session only.**
256
+ * Nodaro app's own pages are used. Promotion codes apply to plans only. A
257
+ * plan's checkout answers `409` while the account already has a
258
+ * subscription: use {@link BillingResource.changePlan}. `ForbiddenError`
259
+ * with the code `self_serve_disabled` on a deployment that does not sell to
260
+ * its users. **Signed-in session only.**
259
261
  */
260
262
  checkout(input: BillingCheckoutInput): Promise<BillingCheckoutSession>;
261
263
  /**
@@ -276,10 +278,19 @@ declare class BillingResource {
276
278
  portal(input?: BillingPortalInput): Promise<BillingPortalSession>;
277
279
  /**
278
280
  * `POST /v1/billing/change-plan` → moves the active subscription to another
279
- * plan's price (`newPriceId`, a subscription price from the plans list),
280
- * prorated by Stripe; the new tier applies at once. `NotFoundError` with no
281
- * active subscription; `400` on a pack's price or the current one.
282
- * **Signed-in session only.**
281
+ * plan's price (`newPriceId`, a subscription price from the plans list).
282
+ * An upgrade charges the price difference for the rest of the billing
283
+ * period at once and applies only when that payment succeeds; it adds the
284
+ * difference between the two plans' monthly credits, once per billing
285
+ * period. A downgrade applies at once and keeps the current credits until
286
+ * the period ends. An upgrade invoice settled for 0 adds no credits, and a
287
+ * monthly <-> yearly switch adds none either. `NotFoundError` with no
288
+ * active subscription; `400` on a pack's price or the current one; `409`
289
+ * when the subscription is not active. A `NodaroError` with status `409`
290
+ * and code `plan_change_payment_required` when the upgrade waits on its
291
+ * payment: the plan is unchanged and `details.invoiceUrl` is Stripe's page
292
+ * for paying it. `RateLimitedError` after 5 plan-change requests from one
293
+ * account in 24 hours. **Signed-in session only.**
283
294
  */
284
295
  changePlan(input: BillingChangePlanInput): Promise<BillingChangePlanResult>;
285
296
  }
@@ -253,9 +253,11 @@ declare class BillingResource {
253
253
  * the person to `url`. Pass `returnPath` (a path on your own origin, such
254
254
  * as `"/billing"`) to have Stripe bring them back to your app with
255
255
  * `checkout=success` or `checkout=cancelled` in the query; without it the
256
- * Nodaro app's own pages are used. `ForbiddenError` with the code
257
- * `self_serve_disabled` on a deployment that does not sell to its users.
258
- * **Signed-in session only.**
256
+ * Nodaro app's own pages are used. Promotion codes apply to plans only. A
257
+ * plan's checkout answers `409` while the account already has a
258
+ * subscription: use {@link BillingResource.changePlan}. `ForbiddenError`
259
+ * with the code `self_serve_disabled` on a deployment that does not sell to
260
+ * its users. **Signed-in session only.**
259
261
  */
260
262
  checkout(input: BillingCheckoutInput): Promise<BillingCheckoutSession>;
261
263
  /**
@@ -276,10 +278,19 @@ declare class BillingResource {
276
278
  portal(input?: BillingPortalInput): Promise<BillingPortalSession>;
277
279
  /**
278
280
  * `POST /v1/billing/change-plan` → moves the active subscription to another
279
- * plan's price (`newPriceId`, a subscription price from the plans list),
280
- * prorated by Stripe; the new tier applies at once. `NotFoundError` with no
281
- * active subscription; `400` on a pack's price or the current one.
282
- * **Signed-in session only.**
281
+ * plan's price (`newPriceId`, a subscription price from the plans list).
282
+ * An upgrade charges the price difference for the rest of the billing
283
+ * period at once and applies only when that payment succeeds; it adds the
284
+ * difference between the two plans' monthly credits, once per billing
285
+ * period. A downgrade applies at once and keeps the current credits until
286
+ * the period ends. An upgrade invoice settled for 0 adds no credits, and a
287
+ * monthly <-> yearly switch adds none either. `NotFoundError` with no
288
+ * active subscription; `400` on a pack's price or the current one; `409`
289
+ * when the subscription is not active. A `NodaroError` with status `409`
290
+ * and code `plan_change_payment_required` when the upgrade waits on its
291
+ * payment: the plan is unchanged and `details.invoiceUrl` is Stripe's page
292
+ * for paying it. `RateLimitedError` after 5 plan-change requests from one
293
+ * account in 24 hours. **Signed-in session only.**
283
294
  */
284
295
  changePlan(input: BillingChangePlanInput): Promise<BillingChangePlanResult>;
285
296
  }
@@ -1,4 +1,4 @@
1
1
  import '../chunk-M6Y5TOYE.js';
2
- export { BillingResource } from '../chunk-VQOUF4F5.js';
2
+ export { BillingResource } from '../chunk-MCXZV3CW.js';
3
3
  //# sourceMappingURL=billing.js.map
4
4
  //# sourceMappingURL=billing.js.map
@@ -1,13 +1,13 @@
1
1
  'use strict';
2
2
 
3
3
  require('../chunk-RQSGS7ZK.cjs');
4
- var chunkQTO2U6JZ_cjs = require('../chunk-QTO2U6JZ.cjs');
4
+ var chunkS5BOU6JG_cjs = require('../chunk-S5BOU6JG.cjs');
5
5
 
6
6
 
7
7
 
8
8
  Object.defineProperty(exports, "CastSwapResource", {
9
9
  enumerable: true,
10
- get: function () { return chunkQTO2U6JZ_cjs.CastSwapResource; }
10
+ get: function () { return chunkS5BOU6JG_cjs.CastSwapResource; }
11
11
  });
12
12
  //# sourceMappingURL=cast-swap.cjs.map
13
13
  //# sourceMappingURL=cast-swap.cjs.map
@@ -278,11 +278,12 @@ interface CastSwapParams {
278
278
  * (the same ids an image's `direction.style` takes); the platform words it.
279
279
  * A Flex run (`style: "motion"`) takes one, and so does a Precise run where
280
280
  * {@link CastSwapResource.styleChoice} answers `preciseArtStyle` true for the
281
- * engine. Nodaro may run such a Precise request as a Flex run (its engine does
282
- * by default, unless Nodaro turns that off), exactly as if `style: "motion"` had
283
- * been sent: its estimate, price and Full Quality are then a Flex run's, and the
284
- * job records `input_data.style: "motion"`. Otherwise it is Precise's edit of
285
- * the clip, drawn in the art style. Refused with
281
+ * engine. Nodaro may make such a Precise request the way a Flex run is made
282
+ * (its engine does by default, unless Nodaro turns that off): its estimate,
283
+ * price and Full Quality are then a Flex run's, while the job still records
284
+ * the style sent (`input_data.style` absent, or `"precise"`; jobs made so
285
+ * before the style was kept record `"motion"`). Otherwise it is Precise's edit
286
+ * of the clip, drawn in the art style. Refused with
286
287
  * 400 `unknown_art_style` (not in the catalog), `art_style_not_supported` (a
287
288
  * saved moodboard, `moodboard:…`) or `art_style_needs_flex` (a trend run, a
288
289
  * Flex run whose prompt is made Precise by Nodaro's setting for how Flex
@@ -514,9 +515,12 @@ type CastSwapFullQualityRefusalCode = "unauthorized" | "not_found" | "not_comple
514
515
  * Who decides a direct run's style on one engine:
515
516
  * - `"user"`: the person (the request's `style`, left out = `"precise"`);
516
517
  * show a Style control;
517
- * - `"precise"` / `"flex"`: an admin forced it — every direct run and quote
518
- * of that engine runs Precise / Flex (`style: "motion"`) whatever the
519
- * request's `style` says; show no Style control.
518
+ * - `"precise"`: Nodaro's own apps run Precise on that engine and show no
519
+ * Style control; it changes no request: a direct run and quote take the
520
+ * request's `style`, as on `"user"`;
521
+ * - `"flex"`: an admin forced it — every direct run and quote of that engine
522
+ * runs Flex (`style: "motion"`) whatever the request's `style` says; show
523
+ * no Style control.
520
524
  *
521
525
  * A trend run keeps its own trend's style.
522
526
  */
@@ -528,9 +532,9 @@ interface CastSwapStyleChoice {
528
532
  * Per engine, whether the engine takes style-only runs: a Flex run
529
533
  * (`style: "motion"`) with an art style (`direction`) and nothing to swap
530
534
  * (no role with images, no fixed reference). It follows the engine alone, so
531
- * read it with {@link engines}: an engine answered `"precise"` drops the art
532
- * style, so such a request is refused as `validation_error` and, with anything
533
- * else to change, runs and is quoted as Precise. Nodaro Motion Pulse is always
535
+ * read it with {@link engines}: an engine answered `"flex"` makes a Precise
536
+ * request Flex too, and one answered `"precise"` changes no request, so a
537
+ * Flex request there runs as on `"user"`. Nodaro Motion Pulse is always
534
538
  * `false` (it takes no art style). Absent from an older server, and
535
539
  * an engine missing from it: `false`.
536
540
  */
@@ -542,10 +546,9 @@ interface CastSwapStyleChoice {
542
546
  * say; otherwise it is Precise's edit of the clip, drawn in the art style, and,
543
547
  * where {@link CastSwapStyleChoice.preciseArtStyleAlone} is not true for the
544
548
  * engine, not on its own: a Precise run with nothing else to change is then refused.
545
- * Where it is `true`, an engine answered
546
- * `"precise"` keeps a Flex request's art style. Nodaro Motion Pulse is always
547
- * `false` (it takes no art style). Absent from an older server, and an engine
548
- * missing from it: `false` (offer an art style on Flex runs alone).
549
+ * Nodaro Motion Pulse is always `false` (it takes no art style). Absent from
550
+ * an older server, and an engine missing from it: `false` (offer an art style
551
+ * on Flex runs alone).
549
552
  */
550
553
  preciseArtStyle?: Partial<Record<CastSwapEngine, boolean>>;
551
554
  /**
@@ -576,8 +579,10 @@ declare class CastSwapResource {
576
579
  /**
577
580
  * Whether people choose a direct run's style, per engine
578
581
  * (`GET /v1/cast-swap/style-choice`): `"user"` = show a Style control;
579
- * `"precise"` / `"flex"` = an admin forced that style for the engine, so a
580
- * run's `style` is overridden and the control is best hidden. Its
582
+ * `"precise"` = Nodaro's own apps run Precise on that engine and hide the
583
+ * control, while a run's `style` is still taken as sent; `"flex"` = an admin
584
+ * forced Flex for the engine, so a run's `style` is overridden and the
585
+ * control is best hidden. Its
581
586
  * `styleOnly` says, per engine, whether a Flex run with an art style and
582
587
  * nothing to swap restyles the whole clip there. Where it is not `true`
583
588
  * (absent, or an engine missing from it, included) on Nodaro Motion Prism, an
@@ -278,11 +278,12 @@ interface CastSwapParams {
278
278
  * (the same ids an image's `direction.style` takes); the platform words it.
279
279
  * A Flex run (`style: "motion"`) takes one, and so does a Precise run where
280
280
  * {@link CastSwapResource.styleChoice} answers `preciseArtStyle` true for the
281
- * engine. Nodaro may run such a Precise request as a Flex run (its engine does
282
- * by default, unless Nodaro turns that off), exactly as if `style: "motion"` had
283
- * been sent: its estimate, price and Full Quality are then a Flex run's, and the
284
- * job records `input_data.style: "motion"`. Otherwise it is Precise's edit of
285
- * the clip, drawn in the art style. Refused with
281
+ * engine. Nodaro may make such a Precise request the way a Flex run is made
282
+ * (its engine does by default, unless Nodaro turns that off): its estimate,
283
+ * price and Full Quality are then a Flex run's, while the job still records
284
+ * the style sent (`input_data.style` absent, or `"precise"`; jobs made so
285
+ * before the style was kept record `"motion"`). Otherwise it is Precise's edit
286
+ * of the clip, drawn in the art style. Refused with
286
287
  * 400 `unknown_art_style` (not in the catalog), `art_style_not_supported` (a
287
288
  * saved moodboard, `moodboard:…`) or `art_style_needs_flex` (a trend run, a
288
289
  * Flex run whose prompt is made Precise by Nodaro's setting for how Flex
@@ -514,9 +515,12 @@ type CastSwapFullQualityRefusalCode = "unauthorized" | "not_found" | "not_comple
514
515
  * Who decides a direct run's style on one engine:
515
516
  * - `"user"`: the person (the request's `style`, left out = `"precise"`);
516
517
  * show a Style control;
517
- * - `"precise"` / `"flex"`: an admin forced it — every direct run and quote
518
- * of that engine runs Precise / Flex (`style: "motion"`) whatever the
519
- * request's `style` says; show no Style control.
518
+ * - `"precise"`: Nodaro's own apps run Precise on that engine and show no
519
+ * Style control; it changes no request: a direct run and quote take the
520
+ * request's `style`, as on `"user"`;
521
+ * - `"flex"`: an admin forced it — every direct run and quote of that engine
522
+ * runs Flex (`style: "motion"`) whatever the request's `style` says; show
523
+ * no Style control.
520
524
  *
521
525
  * A trend run keeps its own trend's style.
522
526
  */
@@ -528,9 +532,9 @@ interface CastSwapStyleChoice {
528
532
  * Per engine, whether the engine takes style-only runs: a Flex run
529
533
  * (`style: "motion"`) with an art style (`direction`) and nothing to swap
530
534
  * (no role with images, no fixed reference). It follows the engine alone, so
531
- * read it with {@link engines}: an engine answered `"precise"` drops the art
532
- * style, so such a request is refused as `validation_error` and, with anything
533
- * else to change, runs and is quoted as Precise. Nodaro Motion Pulse is always
535
+ * read it with {@link engines}: an engine answered `"flex"` makes a Precise
536
+ * request Flex too, and one answered `"precise"` changes no request, so a
537
+ * Flex request there runs as on `"user"`. Nodaro Motion Pulse is always
534
538
  * `false` (it takes no art style). Absent from an older server, and
535
539
  * an engine missing from it: `false`.
536
540
  */
@@ -542,10 +546,9 @@ interface CastSwapStyleChoice {
542
546
  * say; otherwise it is Precise's edit of the clip, drawn in the art style, and,
543
547
  * where {@link CastSwapStyleChoice.preciseArtStyleAlone} is not true for the
544
548
  * engine, not on its own: a Precise run with nothing else to change is then refused.
545
- * Where it is `true`, an engine answered
546
- * `"precise"` keeps a Flex request's art style. Nodaro Motion Pulse is always
547
- * `false` (it takes no art style). Absent from an older server, and an engine
548
- * missing from it: `false` (offer an art style on Flex runs alone).
549
+ * Nodaro Motion Pulse is always `false` (it takes no art style). Absent from
550
+ * an older server, and an engine missing from it: `false` (offer an art style
551
+ * on Flex runs alone).
549
552
  */
550
553
  preciseArtStyle?: Partial<Record<CastSwapEngine, boolean>>;
551
554
  /**
@@ -576,8 +579,10 @@ declare class CastSwapResource {
576
579
  /**
577
580
  * Whether people choose a direct run's style, per engine
578
581
  * (`GET /v1/cast-swap/style-choice`): `"user"` = show a Style control;
579
- * `"precise"` / `"flex"` = an admin forced that style for the engine, so a
580
- * run's `style` is overridden and the control is best hidden. Its
582
+ * `"precise"` = Nodaro's own apps run Precise on that engine and hide the
583
+ * control, while a run's `style` is still taken as sent; `"flex"` = an admin
584
+ * forced Flex for the engine, so a run's `style` is overridden and the
585
+ * control is best hidden. Its
581
586
  * `styleOnly` says, per engine, whether a Flex run with an art style and
582
587
  * nothing to swap restyles the whole clip there. Where it is not `true`
583
588
  * (absent, or an engine missing from it, included) on Nodaro Motion Prism, an
@@ -1,4 +1,4 @@
1
1
  import '../chunk-KARJ7P7Y.js';
2
- export { CastSwapResource } from '../chunk-DHJRS65Q.js';
2
+ export { CastSwapResource } from '../chunk-LQMJFFST.js';
3
3
  //# sourceMappingURL=cast-swap.js.map
4
4
  //# sourceMappingURL=cast-swap.js.map
@@ -4,7 +4,7 @@ import { EntityStyle, CharacterAspectRatio, CharacterAttachColumn } from '@nodar
4
4
  export { CHARACTER_ASPECT_DEFAULTS, CHARACTER_ASPECT_OPTIONS, CHARACTER_STYLES, CharacterAspectRatio, EntityStyle } from '@nodaro/shared/entities';
5
5
  import { TtsProvider } from '@nodaro/shared/models';
6
6
  import { N as NodaroClientCore } from '../developer-apps-CMUzKpE9.cjs';
7
- import { l as GenerationSessionParams, a3 as Subject } from '../nodes-Dx8rpU12.cjs';
7
+ import { l as GenerationSessionParams, a3 as Subject } from '../nodes-WkaQjuwS.cjs';
8
8
  import { SetKeeperCatalogInput, SetKeeperCatalogResult } from './keepers.cjs';
9
9
  import '@nodaro/shared/apps';
10
10
  import '@nodaro/shared/organizations';
@@ -4,7 +4,7 @@ import { EntityStyle, CharacterAspectRatio, CharacterAttachColumn } from '@nodar
4
4
  export { CHARACTER_ASPECT_DEFAULTS, CHARACTER_ASPECT_OPTIONS, CHARACTER_STYLES, CharacterAspectRatio, EntityStyle } from '@nodaro/shared/entities';
5
5
  import { TtsProvider } from '@nodaro/shared/models';
6
6
  import { N as NodaroClientCore } from '../developer-apps-CMUzKpE9.js';
7
- import { l as GenerationSessionParams, a3 as Subject } from '../nodes-BXL3qXlY.js';
7
+ import { l as GenerationSessionParams, a3 as Subject } from '../nodes-C9O2tdGH.js';
8
8
  import { SetKeeperCatalogInput, SetKeeperCatalogResult } from './keepers.js';
9
9
  import '@nodaro/shared/apps';
10
10
  import '@nodaro/shared/organizations';
@@ -1,24 +1,25 @@
1
1
  'use strict';
2
2
 
3
- var chunkXZYJBJ2K_cjs = require('../chunk-XZYJBJ2K.cjs');
3
+ var chunkMOGPM5RM_cjs = require('../chunk-MOGPM5RM.cjs');
4
+ require('../chunk-3B47IHB3.cjs');
4
5
  require('../chunk-WUM6CWTE.cjs');
5
6
  require('../chunk-LKH5M44B.cjs');
7
+ require('../chunk-LTZKNAXM.cjs');
6
8
  require('../chunk-RKW3N463.cjs');
7
9
  require('../chunk-HVF5DRGQ.cjs');
8
10
  require('../chunk-KMNSPC72.cjs');
9
- require('../chunk-UPGZTLK7.cjs');
11
+ require('../chunk-F6KAMECM.cjs');
10
12
  require('../chunk-UIDVH3GP.cjs');
11
13
  require('../chunk-W5VHATSR.cjs');
12
- require('../chunk-3CB4WYEY.cjs');
13
- require('../chunk-3B47IHB3.cjs');
14
+ require('../chunk-S5VSDJAM.cjs');
14
15
  require('../chunk-GB6C5OEZ.cjs');
15
16
  require('../chunk-SYVNY3AH.cjs');
16
17
  require('../chunk-YDRXBRW2.cjs');
17
18
  require('../chunk-WMT7HEBZ.cjs');
18
19
  require('../chunk-MBFUMWI5.cjs');
19
- require('../chunk-YLXCXVYF.cjs');
20
+ require('../chunk-KAYCRIMA.cjs');
21
+ require('../chunk-HFDTOEAL.cjs');
20
22
  require('../chunk-UIBYZNDR.cjs');
21
- require('../chunk-LTZKNAXM.cjs');
22
23
  require('../chunk-57GANTLV.cjs');
23
24
  require('../chunk-J5LGGCAS.cjs');
24
25
  require('../chunk-NBVARNVA.cjs');
@@ -29,33 +30,33 @@ require('../chunk-TCLNSVYA.cjs');
29
30
  require('../chunk-KXEWTYS4.cjs');
30
31
  require('../chunk-SS3B6PHT.cjs');
31
32
  require('../chunk-MIXRL6I2.cjs');
32
- require('../chunk-UIM5SLPP.cjs');
33
- require('../chunk-7QOCWJKD.cjs');
33
+ require('../chunk-PHBOLYRT.cjs');
34
+ require('../chunk-RPV4QBHS.cjs');
34
35
  require('../chunk-ZCWKX4V6.cjs');
35
36
  require('../chunk-Q45PC4YD.cjs');
36
- require('../chunk-DR5WM36L.cjs');
37
+ require('../chunk-EWVQFW5L.cjs');
37
38
  require('../chunk-GVIFLUYZ.cjs');
38
39
  require('../chunk-A3S55XGF.cjs');
39
- require('../chunk-GRATHB3C.cjs');
40
+ require('../chunk-WSMZ3AAU.cjs');
40
41
  require('../chunk-VUTNNRDW.cjs');
41
- require('../chunk-WUKIJJG2.cjs');
42
- require('../chunk-HW3CSUVC.cjs');
42
+ require('../chunk-W63ZKKYT.cjs');
43
+ require('../chunk-LCQIQFWD.cjs');
43
44
  require('../chunk-RR45WBME.cjs');
44
- require('../chunk-2DZWWIJ4.cjs');
45
+ require('../chunk-OI4RCW2J.cjs');
45
46
  require('../chunk-WK4VXPPZ.cjs');
46
47
  require('../chunk-43FVH6LJ.cjs');
47
48
  require('../chunk-YFS2LMG4.cjs');
48
49
  require('../chunk-4DCXJ77J.cjs');
49
- require('../chunk-TBFA6QPH.cjs');
50
- require('../chunk-KP2DIIKO.cjs');
51
- var chunkZVG5ODVY_cjs = require('../chunk-ZVG5ODVY.cjs');
52
- require('../chunk-P2JYDWZT.cjs');
50
+ require('../chunk-O6LQV6BD.cjs');
51
+ require('../chunk-DQQRFBWY.cjs');
52
+ var chunkUBZ2XVHM_cjs = require('../chunk-UBZ2XVHM.cjs');
53
+ require('../chunk-QHCVKMSF.cjs');
53
54
  require('../chunk-A3XA6UNM.cjs');
54
- require('../chunk-4BAHF762.cjs');
55
+ require('../chunk-7FLTDTHR.cjs');
55
56
  require('../chunk-JOXZ4ZIF.cjs');
56
57
  require('../chunk-PGT4BXR2.cjs');
57
- require('../chunk-GGIWDFER.cjs');
58
- require('../chunk-QTO2U6JZ.cjs');
58
+ require('../chunk-XSYNVD3X.cjs');
59
+ require('../chunk-S5BOU6JG.cjs');
59
60
  require('../chunk-BPWUWUZ3.cjs');
60
61
  require('../chunk-XZQ6Z4T6.cjs');
61
62
 
@@ -63,23 +64,23 @@ require('../chunk-XZQ6Z4T6.cjs');
63
64
 
64
65
  Object.defineProperty(exports, "NodaroClient", {
65
66
  enumerable: true,
66
- get: function () { return chunkXZYJBJ2K_cjs.NodaroClient; }
67
+ get: function () { return chunkMOGPM5RM_cjs.NodaroClient; }
67
68
  });
68
69
  Object.defineProperty(exports, "createClient", {
69
70
  enumerable: true,
70
- get: function () { return chunkXZYJBJ2K_cjs.createClient; }
71
+ get: function () { return chunkMOGPM5RM_cjs.createClient; }
71
72
  });
72
73
  Object.defineProperty(exports, "CallbackAuth", {
73
74
  enumerable: true,
74
- get: function () { return chunkZVG5ODVY_cjs.CallbackAuth; }
75
+ get: function () { return chunkUBZ2XVHM_cjs.CallbackAuth; }
75
76
  });
76
77
  Object.defineProperty(exports, "StaticTokenAuth", {
77
78
  enumerable: true,
78
- get: function () { return chunkZVG5ODVY_cjs.StaticTokenAuth; }
79
+ get: function () { return chunkUBZ2XVHM_cjs.StaticTokenAuth; }
79
80
  });
80
81
  Object.defineProperty(exports, "supabaseAuth", {
81
82
  enumerable: true,
82
- get: function () { return chunkZVG5ODVY_cjs.supabaseAuth; }
83
+ get: function () { return chunkUBZ2XVHM_cjs.supabaseAuth; }
83
84
  });
84
85
  //# sourceMappingURL=client.cjs.map
85
86
  //# sourceMappingURL=client.cjs.map
@@ -5,7 +5,7 @@ import { TrashResource } from './trash.cjs';
5
5
  import { JobsResource } from './jobs.cjs';
6
6
  import { VideoProResource } from './video-pro.cjs';
7
7
  import { ExecutionsResource } from './executions.cjs';
8
- import { t as NodesResource } from '../nodes-Dx8rpU12.cjs';
8
+ import { t as NodesResource } from '../nodes-WkaQjuwS.cjs';
9
9
  import { Scene3DResource } from './scene3d.cjs';
10
10
  import { N as NodaroClientCore, h as DeveloperAppsResource, a as ClientOptions } from '../developer-apps-CMUzKpE9.cjs';
11
11
  export { A as Auth, C as CallbackAuth, b as ConnectedApp, S as StaticTokenAuth, i as UserIdentity, s as supabaseAuth } from '../developer-apps-CMUzKpE9.cjs';
@@ -28,6 +28,7 @@ import { AudioResource } from './audio.cjs';
28
28
  import { CreditsResource } from './credits.cjs';
29
29
  import { BillingResource } from './billing.cjs';
30
30
  import { UserSettingsResource } from './user-settings.cjs';
31
+ import { SurfaceResource } from './surface.cjs';
31
32
  import { UploadsResource } from './uploads.cjs';
32
33
  import { LibraryResource } from './library.cjs';
33
34
  import { GalleryResource } from './gallery.cjs';
@@ -117,6 +118,8 @@ declare class NodaroClient extends NodaroClientCore {
117
118
  readonly userSettings: UserSettingsResource;
118
119
  /** Plans and prices, the subscription, and how this deployment bills. */
119
120
  readonly billing: BillingResource;
121
+ /** What this deployment offers the caller: node types, models and the worlds of the shared header. */
122
+ readonly surface: SurfaceResource;
120
123
  readonly uploads: UploadsResource;
121
124
  readonly library: LibraryResource;
122
125
  /** The public gallery and your favorites. */
@@ -5,7 +5,7 @@ import { TrashResource } from './trash.js';
5
5
  import { JobsResource } from './jobs.js';
6
6
  import { VideoProResource } from './video-pro.js';
7
7
  import { ExecutionsResource } from './executions.js';
8
- import { t as NodesResource } from '../nodes-BXL3qXlY.js';
8
+ import { t as NodesResource } from '../nodes-C9O2tdGH.js';
9
9
  import { Scene3DResource } from './scene3d.js';
10
10
  import { N as NodaroClientCore, h as DeveloperAppsResource, a as ClientOptions } from '../developer-apps-CMUzKpE9.js';
11
11
  export { A as Auth, C as CallbackAuth, b as ConnectedApp, S as StaticTokenAuth, i as UserIdentity, s as supabaseAuth } from '../developer-apps-CMUzKpE9.js';
@@ -28,6 +28,7 @@ import { AudioResource } from './audio.js';
28
28
  import { CreditsResource } from './credits.js';
29
29
  import { BillingResource } from './billing.js';
30
30
  import { UserSettingsResource } from './user-settings.js';
31
+ import { SurfaceResource } from './surface.js';
31
32
  import { UploadsResource } from './uploads.js';
32
33
  import { LibraryResource } from './library.js';
33
34
  import { GalleryResource } from './gallery.js';
@@ -117,6 +118,8 @@ declare class NodaroClient extends NodaroClientCore {
117
118
  readonly userSettings: UserSettingsResource;
118
119
  /** Plans and prices, the subscription, and how this deployment bills. */
119
120
  readonly billing: BillingResource;
121
+ /** What this deployment offers the caller: node types, models and the worlds of the shared header. */
122
+ readonly surface: SurfaceResource;
120
123
  readonly uploads: UploadsResource;
121
124
  readonly library: LibraryResource;
122
125
  /** The public gallery and your favorites. */