@nodaro/sdk 2.33.0 → 2.38.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 (197) hide show
  1. package/dist/{chunk-GKQSA24K.cjs → chunk-3WNEIBTH.cjs} +43 -35
  2. package/dist/chunk-3WNEIBTH.cjs.map +1 -0
  3. package/dist/{chunk-JMOKD6ZP.js → chunk-7CUWAVWB.js} +3 -3
  4. package/dist/{chunk-JMOKD6ZP.js.map → chunk-7CUWAVWB.js.map} +1 -1
  5. package/dist/{chunk-E5BM4BLO.js → chunk-7IWVDWSP.js} +20 -3
  6. package/dist/chunk-7IWVDWSP.js.map +1 -0
  7. package/dist/{chunk-RHJRLXKY.cjs → chunk-7XOK277W.cjs} +9 -9
  8. package/dist/{chunk-RHJRLXKY.cjs.map → chunk-7XOK277W.cjs.map} +1 -1
  9. package/dist/{chunk-3QBH2VE2.cjs → chunk-A7QSOD2S.cjs} +20 -3
  10. package/dist/chunk-A7QSOD2S.cjs.map +1 -0
  11. package/dist/{chunk-VV4TZG5S.js → chunk-AUKHMT53.js} +3 -3
  12. package/dist/chunk-AUKHMT53.js.map +1 -0
  13. package/dist/{chunk-JSCC2N7N.js → chunk-AVOQ5DG4.js} +29 -21
  14. package/dist/chunk-AVOQ5DG4.js.map +1 -0
  15. package/dist/{chunk-I6CXC345.js → chunk-D2ILCSOQ.js} +3 -3
  16. package/dist/{chunk-I6CXC345.js.map → chunk-D2ILCSOQ.js.map} +1 -1
  17. package/dist/{chunk-4NLVBYMW.js → chunk-DQAYIVVS.js} +42 -8
  18. package/dist/chunk-DQAYIVVS.js.map +1 -0
  19. package/dist/chunk-ED3ZOX3M.js +54 -0
  20. package/dist/chunk-ED3ZOX3M.js.map +1 -0
  21. package/dist/{chunk-5ALNFATQ.cjs → chunk-EK672FFM.cjs} +2 -2
  22. package/dist/chunk-EK672FFM.cjs.map +1 -0
  23. package/dist/{chunk-OXQKE5EG.cjs → chunk-ETX3TLNB.cjs} +43 -9
  24. package/dist/{chunk-4NLVBYMW.js.map → chunk-ETX3TLNB.cjs.map} +1 -1
  25. package/dist/{chunk-BRV7Z4GD.cjs → chunk-FHVNTS4E.cjs} +2 -2
  26. package/dist/{chunk-BRV7Z4GD.cjs.map → chunk-FHVNTS4E.cjs.map} +1 -1
  27. package/dist/{chunk-N6GLZOE4.cjs → chunk-FM2KM5TY.cjs} +52 -10
  28. package/dist/chunk-FM2KM5TY.cjs.map +1 -0
  29. package/dist/{chunk-53SXNN3A.js → chunk-FQNCIP6K.js} +2 -2
  30. package/dist/chunk-FQNCIP6K.js.map +1 -0
  31. package/dist/{chunk-KNMW722T.cjs → chunk-FRQJNGJS.cjs} +5 -5
  32. package/dist/{chunk-KNMW722T.cjs.map → chunk-FRQJNGJS.cjs.map} +1 -1
  33. package/dist/{chunk-4CXB7RA6.js → chunk-IGMWFEFB.js} +6 -4
  34. package/dist/chunk-IGMWFEFB.js.map +1 -0
  35. package/dist/{chunk-56NJIP7P.cjs → chunk-IISVYX5J.cjs} +5 -5
  36. package/dist/{chunk-56NJIP7P.cjs.map → chunk-IISVYX5J.cjs.map} +1 -1
  37. package/dist/{chunk-6OGGJQVA.js → chunk-ILG5DHQQ.js} +2 -2
  38. package/dist/chunk-ILG5DHQQ.js.map +1 -0
  39. package/dist/{chunk-ZQQABQMH.cjs → chunk-JTOEHQQJ.cjs} +12 -2
  40. package/dist/chunk-JTOEHQQJ.cjs.map +1 -0
  41. package/dist/{chunk-ZXJQSFIA.js → chunk-JUON5NXA.js} +2 -2
  42. package/dist/{chunk-ZXJQSFIA.js.map → chunk-JUON5NXA.js.map} +1 -1
  43. package/dist/chunk-KARJ7P7Y.js +3 -0
  44. package/dist/chunk-KARJ7P7Y.js.map +1 -0
  45. package/dist/{chunk-JGS6YBDW.js → chunk-L6T44A3G.js} +51 -11
  46. package/dist/chunk-L6T44A3G.js.map +1 -0
  47. package/dist/{chunk-U4T3Z3K7.cjs → chunk-NKH2UFSD.cjs} +5 -5
  48. package/dist/chunk-NKH2UFSD.cjs.map +1 -0
  49. package/dist/{chunk-E2ZXHS6E.js → chunk-OIPPTBW4.js} +2 -2
  50. package/dist/chunk-OIPPTBW4.js.map +1 -0
  51. package/dist/{chunk-DKEYSJCE.cjs → chunk-OIYMTGYN.cjs} +2 -2
  52. package/dist/chunk-OIYMTGYN.cjs.map +1 -0
  53. package/dist/{chunk-NLQQHJ25.cjs → chunk-OSMKIRKI.cjs} +4 -4
  54. package/dist/{chunk-NLQQHJ25.cjs.map → chunk-OSMKIRKI.cjs.map} +1 -1
  55. package/dist/chunk-PG2GBS3K.cjs +4 -0
  56. package/dist/chunk-PG2GBS3K.cjs.map +1 -0
  57. package/dist/{chunk-GB724HW2.cjs → chunk-PQ7OKM3E.cjs} +6 -4
  58. package/dist/chunk-PQ7OKM3E.cjs.map +1 -0
  59. package/dist/{chunk-Y5CYFNNW.js → chunk-Q6HY2Q5V.js} +4 -4
  60. package/dist/{chunk-Y5CYFNNW.js.map → chunk-Q6HY2Q5V.js.map} +1 -1
  61. package/dist/chunk-QGOEQGAE.js +102 -0
  62. package/dist/chunk-QGOEQGAE.js.map +1 -0
  63. package/dist/{chunk-B7RG6AUQ.cjs → chunk-QZHRXPN5.cjs} +22 -22
  64. package/dist/chunk-QZHRXPN5.cjs.map +1 -0
  65. package/dist/chunk-RQSGS7ZK.cjs +4 -0
  66. package/dist/chunk-RQSGS7ZK.cjs.map +1 -0
  67. package/dist/{chunk-KGKCAGRD.cjs → chunk-TCLNSVYA.cjs} +2 -2
  68. package/dist/chunk-TCLNSVYA.cjs.map +1 -0
  69. package/dist/chunk-U2B7YQ2N.cjs +56 -0
  70. package/dist/chunk-U2B7YQ2N.cjs.map +1 -0
  71. package/dist/chunk-VCEYLJ2Q.cjs +104 -0
  72. package/dist/chunk-VCEYLJ2Q.cjs.map +1 -0
  73. package/dist/{chunk-VGWOIWRQ.cjs → chunk-VHSMOBU7.cjs} +2 -2
  74. package/dist/{chunk-VGWOIWRQ.cjs.map → chunk-VHSMOBU7.cjs.map} +1 -1
  75. package/dist/{chunk-T3SYREY4.js → chunk-WY4QRJZW.js} +12 -2
  76. package/dist/chunk-WY4QRJZW.js.map +1 -0
  77. package/dist/chunk-YCVRQZT3.js +3 -0
  78. package/dist/chunk-YCVRQZT3.js.map +1 -0
  79. package/dist/{chunk-DPSMVOM3.js → chunk-YSZM3N7Q.js} +2 -2
  80. package/dist/chunk-YSZM3N7Q.js.map +1 -0
  81. package/dist/{chunk-5A7J24LN.js → chunk-Z7UZ3FD3.js} +3 -3
  82. package/dist/{chunk-5A7J24LN.js.map → chunk-Z7UZ3FD3.js.map} +1 -1
  83. package/dist/{chunk-6ECW23GA.js → chunk-ZDSC6KBT.js} +3 -3
  84. package/dist/chunk-ZDSC6KBT.js.map +1 -0
  85. package/dist/entries/apps.cjs +2 -2
  86. package/dist/entries/apps.d.cts +4 -0
  87. package/dist/entries/apps.d.ts +4 -0
  88. package/dist/entries/apps.js +1 -1
  89. package/dist/entries/cast-swap.cjs +13 -0
  90. package/dist/entries/cast-swap.cjs.map +1 -0
  91. package/dist/entries/cast-swap.d.cts +380 -0
  92. package/dist/entries/cast-swap.d.ts +380 -0
  93. package/dist/entries/cast-swap.js +4 -0
  94. package/dist/entries/cast-swap.js.map +1 -0
  95. package/dist/entries/characters.d.cts +2 -2
  96. package/dist/entries/characters.d.ts +2 -2
  97. package/dist/entries/client.cjs +29 -27
  98. package/dist/entries/client.d.cts +8 -2
  99. package/dist/entries/client.d.ts +8 -2
  100. package/dist/entries/client.js +24 -22
  101. package/dist/entries/copilot.cjs +4 -4
  102. package/dist/entries/copilot.js +3 -3
  103. package/dist/entries/core.cjs +6 -6
  104. package/dist/entries/core.js +2 -2
  105. package/dist/entries/creatures.d.cts +2 -2
  106. package/dist/entries/creatures.d.ts +2 -2
  107. package/dist/entries/credits.cjs +2 -2
  108. package/dist/entries/credits.d.cts +37 -2
  109. package/dist/entries/credits.d.ts +37 -2
  110. package/dist/entries/credits.js +1 -1
  111. package/dist/entries/edit.cjs +7 -7
  112. package/dist/entries/edit.d.cts +3 -0
  113. package/dist/entries/edit.d.ts +3 -0
  114. package/dist/entries/edit.js +2 -2
  115. package/dist/entries/errors.cjs +30 -22
  116. package/dist/entries/errors.d.cts +42 -4
  117. package/dist/entries/errors.d.ts +42 -4
  118. package/dist/entries/errors.js +1 -1
  119. package/dist/entries/jobs.cjs +2 -2
  120. package/dist/entries/jobs.d.cts +76 -4
  121. package/dist/entries/jobs.d.ts +76 -4
  122. package/dist/entries/jobs.js +1 -1
  123. package/dist/entries/locations.d.cts +2 -2
  124. package/dist/entries/locations.d.ts +2 -2
  125. package/dist/entries/media.cjs +4 -4
  126. package/dist/entries/media.d.cts +39 -5
  127. package/dist/entries/media.d.ts +39 -5
  128. package/dist/entries/media.js +3 -3
  129. package/dist/entries/nodes.cjs +3 -3
  130. package/dist/entries/nodes.d.cts +2 -2
  131. package/dist/entries/nodes.d.ts +2 -2
  132. package/dist/entries/nodes.js +2 -2
  133. package/dist/entries/objects.d.cts +2 -2
  134. package/dist/entries/objects.d.ts +2 -2
  135. package/dist/entries/prompt-helper.cjs +2 -2
  136. package/dist/entries/prompt-helper.d.cts +3 -1
  137. package/dist/entries/prompt-helper.d.ts +3 -1
  138. package/dist/entries/prompt-helper.js +1 -1
  139. package/dist/entries/scene3d.d.cts +3 -3
  140. package/dist/entries/scene3d.d.ts +3 -3
  141. package/dist/entries/studio.cjs +5 -5
  142. package/dist/entries/studio.d.cts +2 -2
  143. package/dist/entries/studio.d.ts +2 -2
  144. package/dist/entries/studio.js +2 -2
  145. package/dist/entries/templates.cjs +2 -2
  146. package/dist/entries/templates.d.cts +4 -0
  147. package/dist/entries/templates.d.ts +4 -0
  148. package/dist/entries/templates.js +1 -1
  149. package/dist/entries/trends.cjs +13 -0
  150. package/dist/entries/trends.cjs.map +1 -0
  151. package/dist/entries/trends.d.cts +295 -0
  152. package/dist/entries/trends.d.ts +295 -0
  153. package/dist/entries/trends.js +4 -0
  154. package/dist/entries/trends.js.map +1 -0
  155. package/dist/entries/tutorials.cjs +2 -2
  156. package/dist/entries/tutorials.d.cts +4 -0
  157. package/dist/entries/tutorials.d.ts +4 -0
  158. package/dist/entries/tutorials.js +1 -1
  159. package/dist/entries/uploads.cjs +2 -2
  160. package/dist/entries/uploads.d.cts +14 -1
  161. package/dist/entries/uploads.d.ts +14 -1
  162. package/dist/entries/uploads.js +1 -1
  163. package/dist/entries/workflows.cjs +2 -2
  164. package/dist/entries/workflows.d.cts +6 -0
  165. package/dist/entries/workflows.d.ts +6 -0
  166. package/dist/entries/workflows.js +1 -1
  167. package/dist/index.cjs +158 -138
  168. package/dist/index.d.cts +8 -6
  169. package/dist/index.d.ts +8 -6
  170. package/dist/index.js +33 -29
  171. package/dist/{nodes-C-wrO6Sg.d.ts → nodes-9WpYNWtS.d.ts} +35 -1
  172. package/dist/{nodes-J8ByUN8z.d.cts → nodes-BDUk5Aej.d.cts} +35 -1
  173. package/dist/{studio-productions-vbCNSbtf.d.ts → studio-productions-DtTE8mdl.d.ts} +35 -1
  174. package/dist/{studio-productions-DUHvdSvk.d.cts → studio-productions-r2-VZsKj.d.cts} +35 -1
  175. package/package.json +12 -2
  176. package/dist/chunk-3QBH2VE2.cjs.map +0 -1
  177. package/dist/chunk-4CXB7RA6.js.map +0 -1
  178. package/dist/chunk-53SXNN3A.js.map +0 -1
  179. package/dist/chunk-5ALNFATQ.cjs.map +0 -1
  180. package/dist/chunk-6ECW23GA.js.map +0 -1
  181. package/dist/chunk-6OGGJQVA.js.map +0 -1
  182. package/dist/chunk-B7RG6AUQ.cjs.map +0 -1
  183. package/dist/chunk-DKEYSJCE.cjs.map +0 -1
  184. package/dist/chunk-DPSMVOM3.js.map +0 -1
  185. package/dist/chunk-E2ZXHS6E.js.map +0 -1
  186. package/dist/chunk-E5BM4BLO.js.map +0 -1
  187. package/dist/chunk-GB724HW2.cjs.map +0 -1
  188. package/dist/chunk-GKQSA24K.cjs.map +0 -1
  189. package/dist/chunk-JGS6YBDW.js.map +0 -1
  190. package/dist/chunk-JSCC2N7N.js.map +0 -1
  191. package/dist/chunk-KGKCAGRD.cjs.map +0 -1
  192. package/dist/chunk-N6GLZOE4.cjs.map +0 -1
  193. package/dist/chunk-OXQKE5EG.cjs.map +0 -1
  194. package/dist/chunk-T3SYREY4.js.map +0 -1
  195. package/dist/chunk-U4T3Z3K7.cjs.map +0 -1
  196. package/dist/chunk-VV4TZG5S.js.map +0 -1
  197. package/dist/chunk-ZQQABQMH.cjs.map +0 -1
package/dist/index.d.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  export { AppRun, AppRunResult, AppRunResumePlan, AppRunResumeRefusalCode, AppRunResumeResult, AppRunResumeStep, AppsResource, DeleteAppRunResult, ListAppRunsParams, ListAppsParams, ListAppsResult, PublishedApp, PublishedAppDetail, ResumeAppRunOptions, RunAppOptions } from './entries/apps.js';
2
2
  export { AudioResource, TranscribeJobOutput, TranscribeWord } from './entries/audio.js';
3
3
  export { BillingAccountSummary, BillingMoney, BillingMonthlyPrice, BillingPlan, BillingPlanPrices, BillingPlansResult, BillingPriceCredits, BillingResource, BillingSubscription, BillingSubscriptionResult, BillingSurface, BillingTopUp, BillingUsageCategory, BillingYearlyPrice } from './entries/billing.js';
4
+ export { CastSwapEstimate, CastSwapFaceMasking, CastSwapFaceMaskingZone, CastSwapFullQualityEstimate, CastSwapFullQualityParams, CastSwapFullQualityRefusalCode, CastSwapFullQualityResult, CastSwapLocationRole, CastSwapParams, CastSwapPersonRole, CastSwapPetRole, CastSwapProductRole, CastSwapReference, CastSwapResource, CastSwapRole, CastSwapRolePreviewSettings, CastSwapRunOptions, CastSwapTraitSource } from './entries/cast-swap.js';
4
5
  export { CatalogsListResponse, CatalogsResource, ProjectedCatalog, ProjectedCatalogDimension, ProjectedCatalogOption, ProjectedCatalogSection } from './entries/catalogs.js';
5
6
  export { ApprovePortraitResult, Character, CharacterDetail, CharacterTrainingState, CharacterTrainingStatus, CharacterUsage, CharactersResource, DuplicateCharacterInput, GenerateAssetInput, GenerateCharacterInput, GenerateCharacterResult, GenerateMotionInput, GetCharacterOptions, ListCharactersParams, ListCharactersResult, RecaptionResult, ReferencePhoto, ReferencePhotoKind, TrainCharacterInput, TrainCharacterRefusalCode, TrainCharacterResult, UpsertCharacterInput, UpsertCharacterResult, buildPersonSeedPrompt } from './entries/characters.js';
6
7
  export { NodaroClient, createClient } from './entries/client.js';
@@ -12,13 +13,13 @@ export { ActionCard, ActionCardKind, ActionCardPriority, AdviceFamily, AdviceRec
12
13
  export { CompetitorsResource } from './entries/competitors.js';
13
14
  export { CopilotMemorySavedFrameData, CopilotMessage, CopilotMessagePart, CopilotMetadataFrameData, CopilotModelTier, CopilotResource, CopilotRunMode, CopilotRunProposalFrameData, CopilotRunProposalNode, CopilotStreamFrame, CopilotStreamOptions, CopilotSurface, CopilotThread, CopilotThreadWorkflow, CopilotToolCallFrameData, CopilotWiredAsset, CopilotWorkflowCreatedFrameData, CopilotWorkflowUpdateFrameData, CreateCopilotThreadInput } from './entries/copilot.js';
14
15
  export { ApproveCreatureMainImageResult, CREATURE_ASSET_TYPES, CreateCreatureInput, Creature, CreatureAssetType, CreatureDetail, CreatureReferencePhoto, CreatureReferencePhotoKind, CreatureVoice, CreaturesResource, GenerateCreatureAssetInput, GenerateCreatureAssetResult, GenerateCreatureInput, GenerateCreatureMotionInput, GenerateCreatureMotionResult, GenerateCreatureResult, ListCreaturesParams, RecaptionCreatureResult, UpdateCreatureInput, UpdateCreatureResult, UpsertCreatureInput, UpsertCreatureResult } from './entries/creatures.js';
15
- export { CreditTransaction, CreditTransactionsOptions, CreditTransactionsPage, CreditsResource, FreeGrantState, ModelCostsResult, SignupGrantClaimResult, SignupKeys, UserBalance, WelcomeOfferClaimInput, WelcomeOfferClaimResult, WelcomeOfferSeenResult, WelcomeOfferState } from './entries/credits.js';
16
+ export { CreditTransaction, CreditTransactionsOptions, CreditTransactionsPage, CreditsResource, FreeGrantState, ModelCostError, ModelCostResult, ModelCostsResult, SignupGrantClaimResult, SignupKeys, UserBalance, WelcomeOfferClaimInput, WelcomeOfferClaimResult, WelcomeOfferSeenResult, WelcomeOfferState } from './entries/credits.js';
16
17
  export { ChapterSet, EditPlanMode, EditPlanTier, Edl, EdlClipSet, SpeakerMapResult, Transcript, unwrapEditPlanOutput } from '@nodaro/shared/edl';
17
18
  export { ApplyEdlInput, AudioSyncInput, AudioSyncOffset, AudioSyncResult, AudioSyncSource, CLIP_PACK_MAX_TARGET_SEC, CLIP_PACK_MIN_TARGET_SEC, CameraSwitchInput, ClipPackEmphasis, ClipPackInput, EditJobResult, EditPlanInput, EditPlanSource, EditResource, EpisodeChaptersInput, EpisodeTrailerInput, SilenceDetectInput, SilenceRanges, SpeakerLayoutInput, SpeakerMapInput, SpeakerMapSource, TRAILER_FORMATS, TightenEpisodeEstimate, TightenEpisodeInput, TightenEpisodeJobResult, TrailerFormat, UseCaseContinueInput, UseCaseEstimate, UseCaseJobResult, UseCaseRecordingsInput, UseCaseRequestOptions } from './entries/edit.js';
18
- export { AlreadyRunningError, AppRunVersionChangedError, ContinuationPreviewPendingError, ContinuationRefusedError, ForbiddenError, HeldFinalRun, InsufficientCreditsError, JobAbortedError, JobBlockedError, JobFailedError, JobHeldError, JobTimeoutError, NodaroError, NotFoundError, RateLimitedError, StorageExceededError, StudioOpError, StudioPreviewAppliedError, StudioPreviewUnavailable, UnauthorizedError, WorkflowConflictCode, WorkflowConflictError, throwFromResponse } from './entries/errors.js';
19
+ export { AlreadyRunningError, AppRunVersionChangedError, CREDIT_CAP_CODES, ContinuationPreviewPendingError, ContinuationRefusedError, CreditCapCode, CreditCapExceededError, ForbiddenError, HeldFinalRun, InsufficientCreditsError, JobAbortedError, JobBlockedError, JobFailedError, JobHeldError, JobTimeoutError, NodaroError, NotFoundError, RateLimitedError, StorageExceededError, StudioOpError, StudioPreviewAppliedError, StudioPreviewUnavailable, UnauthorizedError, WorkflowConflictCode, WorkflowConflictError, throwFromResponse } from './entries/errors.js';
19
20
  export { CancelExecutionParams, ExecutionStatus, ExecutionTriggerType, ExecutionsResource, ListExecutionsForWorkflowParams, ListExecutionsPage, NodeExecutionState, WorkflowExecution, WorkflowExecutionSummary } from './entries/executions.js';
20
21
  export { BrowseGalleryParams, GalleryItem, GalleryMediaType, GalleryPage, GalleryResource, ToggleFavoriteResult } from './entries/gallery.js';
21
- export { CancelJobResult, CreditStatus, DeleteJobResult, Job, JobErrorHint, JobRating, JobRatingFilter, JobStatus, JobStatusResult, JobsResource, ListJobsPage, ListJobsParams, PolicyBlockHint, RateJobResult, SafetyBlockHint } from './entries/jobs.js';
22
+ export { CancelJobResult, CreditStatus, CreditsHint, DeleteJobResult, InputRefusedHint, Job, JobErrorHint, JobFromUploadParams, JobRating, JobRatingFilter, JobStatus, JobStatusResult, JobsResource, ListJobsPage, ListJobsParams, PolicyBlockHint, RateJobResult, SafetyBlockHint } from './entries/jobs.js';
22
23
  export { LibraryAsset, LibraryResource, ListLibraryParams, ListLibraryResult } from './entries/library.js';
23
24
  export { LlmResource, LlmStructuredInput, LlmStructuredJobInput, LlmStructuredJobOutput, LlmStructuredResult } from './entries/llm.js';
24
25
  export { ApproveMainImageResult, CreateLocationInput, GenerateLocationAssetInput, GenerateLocationInput, GenerateLocationMotionInput, GenerateLocationResult, GenerateSurroundContinuationInput, ListLocationsParams, Location, LocationDetail, LocationReferencePhoto, LocationReferencePhotoKind, LocationsResource, RecaptionLocationResult, UpdateLocationInput, UpdateLocationResult } from './entries/locations.js';
@@ -30,7 +31,7 @@ export { CreateNodePresetGroupInput, CreateNodePresetInput, FactoryPresetEntry,
30
31
  export { ConnectedReference, DescribedReference, GenericEdge, GenericNode } from '@nodaro/shared/types';
31
32
  export { VideoCharacterReference, VideoCharacterVoice } from '@nodaro/shared/video';
32
33
  export { AudioFxPreset, GenerateMaskOutput, GenerateMaskRequest, VideoDepthColormap, VideoDepthModelSize, VideoDepthProvider, VideoDepthResolution } from '@nodaro/shared/media';
33
- export { A as AssembleNarratedVideoParams, B as BatchJobOutcome, E as EditImageCommonParams, a as EditImageFromTaskParams, b as EditImageFromUrlParams, c as EditImageParams, d as EditScene3DParams, G as GenerateImageBatchGroup, e as GenerateImageBatchOutput, f as GenerateImageBatchResult, g as GenerateImageParams, h as GenerateMaskJobOutput, i as GenerateMaskParams, j as GenerateScene3DParams, k as GenerateVideoParams, l as GenerationSessionParams, I as ImageJobStarted, m as ImageToImageParams, J as JobOutputImage, N as NodeCategory, n as NodeCreditRate, o as NodeDescriptor, p as NodeInputField, q as NodeInputSchema, r as NodeJobOutput, s as NodeQuote, t as NodesResource, O as OutputType, P as Pro3DRenderJobOutput, u as Pro3DRenderParams, v as Pro3DRenderQuote, w as Pro3DRenderRunOptions, x as Pro3DRenderRunParams, Q as QuoteAdjustment, y as QuoteWarning, R as ReferenceCaptionParams, z as RenderScene3DParams, C as RetainedScene3DEditParams, D as RetainedScene3DEditResult, F as RunAndWaitOptions, H as RunManyResult, K as RunNodeAdjustment, L as RunNodeOptions, M as RunNodeResult, S as RunNodeWarning, T as SCENE3D_DELIVERY_ASSET_USAGE, U as Scene3DAuthoringEngine, V as Scene3DCapabilities, W as Scene3DDelivery, X as Scene3DDeliveryAsset, Y as Scene3DDeliveryAssetKind, Z as Scene3DJobOutput, _ as SocialSearchJobOutput, $ as SplitImageParams, a0 as SplitImageResult, a1 as SplitImageTile, a2 as StructuredReferenceParams, a3 as Subject, a4 as TextToSpeechParams, a5 as TextToVideoParams, a6 as VideoDepthParams, a7 as VideoToVideoParams, a8 as VideoUpscaleParams } from './nodes-C-wrO6Sg.js';
34
+ export { A as AssembleNarratedVideoParams, B as BatchJobOutcome, E as EditImageCommonParams, a as EditImageFromTaskParams, b as EditImageFromUrlParams, c as EditImageParams, d as EditScene3DParams, G as GenerateImageBatchGroup, e as GenerateImageBatchOutput, f as GenerateImageBatchResult, g as GenerateImageParams, h as GenerateMaskJobOutput, i as GenerateMaskParams, j as GenerateScene3DParams, k as GenerateVideoParams, l as GenerationSessionParams, I as ImageJobStarted, m as ImageToImageParams, J as JobOutputImage, N as NodeCategory, n as NodeCreditRate, o as NodeDescriptor, p as NodeInputField, q as NodeInputSchema, r as NodeJobOutput, s as NodeQuote, t as NodesResource, O as OutputType, P as Pro3DRenderJobOutput, u as Pro3DRenderParams, v as Pro3DRenderQuote, w as Pro3DRenderRunOptions, x as Pro3DRenderRunParams, Q as QuoteAdjustment, y as QuoteWarning, R as ReferenceCaptionParams, z as RenderScene3DParams, C as RetainedScene3DEditParams, D as RetainedScene3DEditResult, F as RunAndWaitOptions, H as RunManyResult, K as RunNodeAdjustment, L as RunNodeOptions, M as RunNodeResult, S as RunNodeWarning, T as SCENE3D_DELIVERY_ASSET_USAGE, U as Scene3DAuthoringEngine, V as Scene3DCapabilities, W as Scene3DDelivery, X as Scene3DDeliveryAsset, Y as Scene3DDeliveryAssetKind, Z as Scene3DJobOutput, _ as SocialSearchJobOutput, $ as SplitImageParams, a0 as SplitImageResult, a1 as SplitImageTile, a2 as StructuredReferenceParams, a3 as Subject, a4 as TextToSpeechParams, a5 as TextToVideoParams, a6 as VideoDepthParams, a7 as VideoToVideoParams, a8 as VideoUpscaleParams } from './nodes-9WpYNWtS.js';
34
35
  export { TopazUpscaleFactor } from '@nodaro/shared/credits';
35
36
  export { CHARACTER_ASPECT_DEFAULTS, CHARACTER_ASPECT_OPTIONS, CHARACTER_STYLES, OBJECT_ASPECT_DEFAULTS as CREATURE_ASPECT_DEFAULTS, OBJECT_ASPECT_OPTIONS as CREATURE_ASPECT_OPTIONS, CREATURE_ATTACH_COLUMNS, CharacterAspectRatio, ObjectAspectRatio as CreatureAspectRatio, CreatureAttachColumn, EntityStyle, ImageToImageAttachColumn, LOCATION_ASSET_TYPES, LOCATION_ATTACH_COLUMNS, LocationAssetType, LocationAttachColumn, OBJECT_ASPECT_DEFAULTS, OBJECT_ASPECT_OPTIONS, OBJECT_ASSET_TYPES, OBJECT_ATTACH_COLUMNS, ObjectAspectRatio, ObjectAssetType, ObjectAttachColumn, SURROUND_DIRECTIONS, SurroundDirection } from '@nodaro/shared/entities';
36
37
  export { AccessTokenResponse, ExchangeCodeInput, OAuthAppInfo, OAuthResource } from './entries/oauth.js';
@@ -52,8 +53,9 @@ export { CreateSessionInput, GenerationSession, ListSessionItemsParams, ListSess
52
53
  export { CreateShotInput, Shot, ShotEntityRef, ShotMode, ShotsResource, UpdateShotInput } from './entries/shots.js';
53
54
  export { StudioDocumentJson, StudioEditInput, StudioGenerationReply, StudioKeyframeAcceptanceInput, StudioKeyframeGenerationInput, StudioKeyframeRecord, StudioProductionCapabilities, StudioProductionRecord, StudioProductionReply, StudioResource, StudioShotGenerationInput } from './entries/studio.js';
54
55
  export { BrowseTemplatesParams, BrowseTemplatesResult, CloneTemplateParams, CloneTemplateResult, Template, TemplateBrowseCard, TemplateSort, TemplatesResource } from './entries/templates.js';
56
+ export { ListTrendRunsParams, ListTrendsParams, TrendCard, TrendChips, TrendChoice, TrendDetail, TrendDetailSlot, TrendEstimate, TrendExample, TrendPage, TrendResolution, TrendRun, TrendRunDisplaySlot, TrendRunOptions, TrendRunRequest, TrendRunSlot, TrendSlotKind, TrendTag, TrendsResource } from './entries/trends.js';
55
57
  export { TutorialCategory, TutorialFlowItem, TutorialVideoItem, TutorialsResource } from './entries/tutorials.js';
56
- export { UploadResult, UploadsResource } from './entries/uploads.js';
58
+ export { UploadJsonResult, UploadResult, UploadsResource } from './entries/uploads.js';
57
59
  export { ContinueVideoProResult, StopVideoProResult, VideoProResource } from './entries/video-pro.js';
58
60
  export { DubbingInput, VcpAnalysis, VcpAnalysisSpeaker, VcpAnalyzeInput, VcpExportInput, VcpExportTrack, VoiceChangerProInput, VoiceChangerProVoice, VoiceDesignInput, VoiceRemixInput, VoicesResource } from './entries/voices.js';
59
61
  export { C as CreateWebhookEndpointInput, a as CreatedWebhookEndpoint, J as JobWebhookEvent, L as ListWebhookDeliveriesParams, P as PingWebhookEvent, R as RotateWebhookSecretInput, b as RotatedWebhookSecret, U as UpdateWebhookEndpointInput, W as WebhookDelivery, c as WebhookDeliveryPage, d as WebhookDeliveryStatus, e as WebhookEndpoint, f as WebhookEvent, g as WebhookEventType, h as WebhookJobEvent, i as WebhooksResource } from './webhooks-BJawEIz8.js';
@@ -62,7 +64,7 @@ export { ExecutionOutcome, NodeExecutionStatus, NodeSkipReason, OUTPUT_BEARING_N
62
64
  export { AddCollaboratorInput, Collaborator, CreateWorkflowInput, DroppedCollaborator, ListWorkflowsParams, RenderFinalParams, RenderFinalQuote, RunWorkflowOptions, RunWorkflowParams, RunWorkflowResult, SharedWorkflow, UpdateWorkflowInput, Workflow, WorkflowsResource } from './entries/workflows.js';
63
65
  export { CreateWorkspaceInput, WorkspacesResource } from './entries/workspaces.js';
64
66
  export { AnimateSubGate, ChatEnabledStage, PipelineInput, PipelineMode, PipelineStageName, PipelineStatus, ProposedChange, SharedVoice, SubGateName, Voice, VoiceClone, VoiceLibraryParams, VoiceLibraryResponse } from '@nodaro/shared/pipeline';
65
- export { G as GetProductionOptions, L as ListStudioProductionsOptions, S as StudioClientRequestId, a as StudioCloneRequest, b as StudioCreateProductionRequest, c as StudioDescribeRequest, d as StudioExportPlanOptions, e as StudioExportPlanResponse, f as StudioExportStep, g as StudioFrameRequest, h as StudioGenerateEstimate, i as StudioGenerateOptions, j as StudioGenerateRequest, k as StudioGenerateResponse, l as StudioGenerateResult, m as StudioImportSummary, n as StudioJobStartedResponse, o as StudioListProductionsResponse, p as StudioMediaResponse, q as StudioMusicRequest, r as StudioOpClass, s as StudioOpsDryRunReceipt, t as StudioOpsDryRunResponse, u as StudioOpsImpact, v as StudioOpsReceipt, w as StudioOpsRequest, x as StudioOpsResponse, y as StudioPlanIssue, z as StudioProduction, A as StudioProductionDetail, B as StudioProductionResponse, C as StudioProductionsResource, D as StudioReconcileResponse, E as StudioRevoiceRequest, F as StudioSkillResponse, H as StudioValidatePlanResponse, I as StudioVideoLane, J as StudioVoiceRequest, K as isStudioGenerateEstimate } from './studio-productions-vbCNSbtf.js';
67
+ export { G as GetProductionOptions, L as ListStudioProductionsOptions, S as StudioClientRequestId, a as StudioCloneRequest, b as StudioCreateProductionRequest, c as StudioDescribeRequest, d as StudioExportPlanOptions, e as StudioExportPlanResponse, f as StudioExportStep, g as StudioFrameRequest, h as StudioGenerateEstimate, i as StudioGenerateOptions, j as StudioGenerateRequest, k as StudioGenerateResponse, l as StudioGenerateResult, m as StudioImportSummary, n as StudioJobStartedResponse, o as StudioListProductionsResponse, p as StudioMediaResponse, q as StudioMusicRequest, r as StudioOpClass, s as StudioOpsDryRunReceipt, t as StudioOpsDryRunResponse, u as StudioOpsImpact, v as StudioOpsReceipt, w as StudioOpsRequest, x as StudioOpsResponse, y as StudioOpsText, z as StudioPlanIssue, A as StudioProduction, B as StudioProductionDetail, C as StudioProductionResponse, D as StudioProductionsResource, E as StudioReconcileResponse, F as StudioRevoiceRequest, H as StudioSkillResponse, I as StudioValidatePlanResponse, J as StudioVideoLane, K as StudioVoiceRequest, M as isStudioGenerateEstimate } from './studio-productions-DtTE8mdl.js';
66
68
  export { PEOPLE, PERSON_DIMENSION_LABELS, PERSON_DIMENSION_ORDER, PersonValue, buildPersonHints } from '@nodaro/prompts/person';
67
69
  import '@nodaro/shared/captions';
68
70
  import '@nodaro/prompts/presets';
package/dist/index.js CHANGED
@@ -1,14 +1,17 @@
1
+ import './chunk-VPAUN75Q.js';
2
+ import './chunk-MEKI37WI.js';
1
3
  export { WebhookSignatureError, verifyWebhookSignature } from './chunk-VGTRKXF2.js';
2
4
  import './chunk-PGYQ754I.js';
3
5
  import './chunk-FHEYAW5H.js';
6
+ import './chunk-CRCPRZFN.js';
4
7
  import './chunk-D3PW7AHZ.js';
5
8
  import './chunk-BKP6F2IX.js';
6
9
  import './chunk-PMTM26LL.js';
7
10
  import './chunk-LHRQXWI5.js';
11
+ import './chunk-YCVRQZT3.js';
8
12
  import './chunk-VT237QF2.js';
9
13
  import './chunk-CGNVHN4V.js';
10
- import './chunk-VPAUN75Q.js';
11
- import './chunk-MEKI37WI.js';
14
+ import './chunk-HLHR3R4P.js';
12
15
  import './chunk-QVQCKOBM.js';
13
16
  import './chunk-IQ6KWSXP.js';
14
17
  import './chunk-KZQKFBRN.js';
@@ -16,7 +19,7 @@ import './chunk-7A7HYFGM.js';
16
19
  export { RECAST_SEGMENT_PACKS } from './chunk-RJIJVVXS.js';
17
20
  import './chunk-6JFNBAKV.js';
18
21
  import './chunk-OJDBSKC2.js';
19
- import './chunk-CRCPRZFN.js';
22
+ import './chunk-ES2E65HT.js';
20
23
  import './chunk-OMH7ATOQ.js';
21
24
  import './chunk-37Y5QAVA.js';
22
25
  import './chunk-NX67YIF3.js';
@@ -24,7 +27,7 @@ export { PROMPT_PREFIX_KEY, PROMPT_SUFFIX_KEY } from './chunk-ZYPH2FPT.js';
24
27
  import './chunk-X7RDNMN7.js';
25
28
  import './chunk-OLPA44QJ.js';
26
29
  export { USAGE_GROUP_BYS, WORKSPACE_HEADER } from './chunk-RKVRCNMB.js';
27
- import './chunk-HLHR3R4P.js';
30
+ export { unwrapEditPlanOutput } from './chunk-UKB64254.js';
28
31
  import './chunk-CJFIOVBA.js';
29
32
  import './chunk-OPR4TULG.js';
30
33
  import './chunk-C22RJDW3.js';
@@ -32,7 +35,7 @@ import './chunk-I3TYBAOX.js';
32
35
  import './chunk-A3THLBFG.js';
33
36
  import './chunk-UIFFNTUX.js';
34
37
  import './chunk-HFBR6G36.js';
35
- import './chunk-ES2E65HT.js';
38
+ import './chunk-Z5OMWAQX.js';
36
39
  import './chunk-GAZJ2PA3.js';
37
40
  import './chunk-GD24ZRFD.js';
38
41
  import './chunk-ELSOVJPF.js';
@@ -40,63 +43,64 @@ import './chunk-AUDHV3OE.js';
40
43
  import './chunk-EXLAHZKF.js';
41
44
  import './chunk-V4GPQ6Y2.js';
42
45
  import './chunk-YOOZB4RL.js';
43
- export { unwrapEditPlanOutput } from './chunk-UKB64254.js';
44
46
  import './chunk-3PPSGM5X.js';
45
47
  import './chunk-HRXXGGSJ.js';
46
48
  import './chunk-M6Y5TOYE.js';
49
+ import './chunk-KARJ7P7Y.js';
47
50
  import './chunk-SUCHGNYT.js';
48
51
  import './chunk-SLPD47SR.js';
49
- export { NodaroClient, createClient } from './chunk-JSCC2N7N.js';
52
+ export { NodaroClient, createClient } from './chunk-AVOQ5DG4.js';
53
+ export { VideoProResource } from './chunk-ERLXU47J.js';
54
+ export { VoicesResource } from './chunk-T7N7DFQJ.js';
50
55
  export { WebhooksResource } from './chunk-YN6CBIIB.js';
51
- export { WorkflowsResource } from './chunk-ZXJQSFIA.js';
56
+ export { WorkflowsResource } from './chunk-JUON5NXA.js';
52
57
  export { WorkspacesResource } from './chunk-Z5GLY4R3.js';
58
+ export { SCENE3D_DELIVERY_ASSET_USAGE, Scene3DResource } from './chunk-NNHWH7ER.js';
53
59
  export { SessionsResource } from './chunk-Y6VDCZPB.js';
54
60
  export { ShotsResource } from './chunk-WVFAQBS7.js';
55
- export { StudioProductionsResource, StudioResource, isStudioGenerateEstimate } from './chunk-VV4TZG5S.js';
56
- export { TemplatesResource } from './chunk-6OGGJQVA.js';
57
- export { TutorialsResource } from './chunk-DPSMVOM3.js';
58
- export { UploadsResource } from './chunk-T3SYREY4.js';
59
- export { VideoProResource } from './chunk-ERLXU47J.js';
60
- export { VoicesResource } from './chunk-T7N7DFQJ.js';
61
+ export { StudioProductionsResource, StudioResource, isStudioGenerateEstimate } from './chunk-AUKHMT53.js';
62
+ export { TemplatesResource } from './chunk-ILG5DHQQ.js';
63
+ export { TrendsResource } from './chunk-QGOEQGAE.js';
64
+ export { TutorialsResource } from './chunk-YSZM3N7Q.js';
65
+ export { UploadsResource } from './chunk-WY4QRJZW.js';
66
+ export { PALETTE_DIRECTION_PREFIX, PalettesResource, paletteDirectionId } from './chunk-WEQWU2IC.js';
61
67
  export { PickerCatalogsResource } from './chunk-BLA44UCM.js';
62
68
  export { PipelinesResource } from './chunk-K4RQOSJH.js';
63
69
  export { ProjectsResource } from './chunk-H7VQTG4M.js';
64
- export { PromptHelperResource } from './chunk-E2ZXHS6E.js';
70
+ export { PromptHelperResource } from './chunk-OIPPTBW4.js';
65
71
  export { RecastResource } from './chunk-AJVSMNPZ.js';
66
72
  export { ReduceResource } from './chunk-IHKIYVZQ.js';
67
73
  export { SavedPostsResource } from './chunk-NCCBS6GU.js';
68
- export { SCENE3D_DELIVERY_ASSET_USAGE, Scene3DResource } from './chunk-NNHWH7ER.js';
74
+ export { MediaResource } from './chunk-DQAYIVVS.js';
69
75
  export { ModelsResource } from './chunk-Y6V6CBY5.js';
70
76
  export { MOODBOARD_DIRECTION_PREFIX, MoodboardsResource, moodboardDirectionId } from './chunk-YVU2M7MI.js';
71
77
  export { PresetsResource } from './chunk-JTAW54UM.js';
72
- export { NodesResource } from './chunk-6ECW23GA.js';
78
+ export { NodesResource } from './chunk-ZDSC6KBT.js';
73
79
  export { OAuthResource } from './chunk-Z7LGWNI7.js';
74
80
  export { OBJECT_ASPECT_DEFAULTS, OBJECT_ASPECT_OPTIONS, OBJECT_ASSET_TYPES, OBJECT_ATTACH_COLUMNS, ObjectsResource } from './chunk-7LSFG2AF.js';
75
81
  export { OrganizationsResource } from './chunk-ALSLZG3U.js';
76
- export { PALETTE_DIRECTION_PREFIX, PalettesResource, paletteDirectionId } from './chunk-WEQWU2IC.js';
82
+ export { CLIP_PACK_MAX_TARGET_SEC, CLIP_PACK_MIN_TARGET_SEC, EditResource, TRAILER_FORMATS, USE_CASE_NODE_TYPES } from './chunk-Z7UZ3FD3.js';
77
83
  export { ExecutionsResource, OUTPUT_BEARING_NODE_STATUSES, nodeStateMayCarryOutput } from './chunk-Z3ZKFI2M.js';
78
84
  export { GalleryResource } from './chunk-JDEZHITT.js';
79
- export { JobsResource } from './chunk-E5BM4BLO.js';
85
+ export { JobsResource } from './chunk-7IWVDWSP.js';
80
86
  export { LibraryResource } from './chunk-P6E4QDJN.js';
81
87
  export { LlmResource } from './chunk-E37CVHWW.js';
82
88
  export { LOCATION_ASSET_TYPES, LOCATION_ATTACH_COLUMNS, LocationsResource, SURROUND_DIRECTIONS } from './chunk-TVENC6PH.js';
83
- export { MediaResource } from './chunk-4NLVBYMW.js';
89
+ export { CollectionsResource } from './chunk-4WRDR4GN.js';
84
90
  export { CommunityResource } from './chunk-SFB4YLCS.js';
85
91
  export { CompetitorsResource } from './chunk-BU5A6K4C.js';
86
- export { CopilotResource } from './chunk-I6CXC345.js';
87
- import './chunk-JMOKD6ZP.js';
88
- export { CallbackAuth, NodaroClientCore, StaticTokenAuth, supabaseAuth } from './chunk-Y5CYFNNW.js';
92
+ export { CopilotResource } from './chunk-D2ILCSOQ.js';
93
+ import './chunk-7CUWAVWB.js';
94
+ export { CallbackAuth, NodaroClientCore, StaticTokenAuth, supabaseAuth } from './chunk-Q6HY2Q5V.js';
95
+ export { AlreadyRunningError, AppRunVersionChangedError, CREDIT_CAP_CODES, ContinuationPreviewPendingError, ContinuationRefusedError, CreditCapExceededError, ForbiddenError, InsufficientCreditsError, JobAbortedError, JobBlockedError, JobFailedError, JobHeldError, JobTimeoutError, NodaroError, NotFoundError, RateLimitedError, StorageExceededError, StudioOpError, StudioPreviewAppliedError, StudioPreviewUnavailable, UnauthorizedError, WorkflowConflictError, throwFromResponse } from './chunk-L6T44A3G.js';
89
96
  export { OBJECT_ASPECT_DEFAULTS as CREATURE_ASPECT_DEFAULTS, OBJECT_ASPECT_OPTIONS as CREATURE_ASPECT_OPTIONS, CREATURE_ASSET_TYPES, CREATURE_ATTACH_COLUMNS, CreaturesResource } from './chunk-CK3AMMSC.js';
90
- export { CreditsResource } from './chunk-4CXB7RA6.js';
97
+ export { CreditsResource } from './chunk-IGMWFEFB.js';
91
98
  export { DeveloperAppsResource } from './chunk-65E3JBFZ.js';
92
- export { CLIP_PACK_MAX_TARGET_SEC, CLIP_PACK_MIN_TARGET_SEC, EditResource, TRAILER_FORMATS, USE_CASE_NODE_TYPES } from './chunk-5A7J24LN.js';
93
- export { AlreadyRunningError, AppRunVersionChangedError, ContinuationPreviewPendingError, ContinuationRefusedError, ForbiddenError, InsufficientCreditsError, JobAbortedError, JobBlockedError, JobFailedError, JobHeldError, JobTimeoutError, NodaroError, NotFoundError, RateLimitedError, StorageExceededError, StudioOpError, StudioPreviewAppliedError, StudioPreviewUnavailable, UnauthorizedError, WorkflowConflictError, throwFromResponse } from './chunk-JGS6YBDW.js';
94
- export { AppsResource } from './chunk-53SXNN3A.js';
99
+ export { AppsResource } from './chunk-FQNCIP6K.js';
95
100
  export { AudioResource } from './chunk-3QFTP5P5.js';
96
101
  export { BillingResource } from './chunk-J4WFSKY6.js';
102
+ export { CastSwapResource } from './chunk-ED3ZOX3M.js';
97
103
  export { CatalogsResource } from './chunk-KG4R454Z.js';
98
104
  export { CHARACTER_ASPECT_DEFAULTS, CHARACTER_ASPECT_OPTIONS, CHARACTER_STYLES, CharactersResource, PEOPLE, PERSON_DIMENSION_LABELS, PERSON_DIMENSION_ORDER, buildPersonHints, buildPersonSeedPrompt } from './chunk-EJSGJDZY.js';
99
- import './chunk-Z5OMWAQX.js';
100
- export { CollectionsResource } from './chunk-4WRDR4GN.js';
101
105
  //# sourceMappingURL=index.js.map
102
106
  //# sourceMappingURL=index.js.map
@@ -521,6 +521,25 @@ interface VideoToVideoParams extends GenerationSessionParams {
521
521
  promptExtend?: boolean;
522
522
  /** Seedance 2.5 only: a 480p draft, finalized later with `video-upscale`. */
523
523
  draft?: boolean;
524
+ /**
525
+ * Seedance edit only (refused on other models): more images the edit can use.
526
+ * They follow `referenceImageUrl` when it is sent, so with it they are
527
+ * `{image:2}`, `{image:3}`, …, without it `{image:1}`, `{image:2}`, ….
528
+ * The model's cap applies (30 images on `seedance-2-5`).
529
+ */
530
+ referenceImageUrls?: string[];
531
+ /**
532
+ * Seedance edit only (refused on other models): extra clips the edit can use.
533
+ * Do not repeat `videoUrl` here: the source clip is `{video:1}`, these are
534
+ * `{video:2}`, `{video:3}`, …. The source counts toward the model's cap
535
+ * (10 clips on `seedance-2-5`), and every clip's length is priced.
536
+ */
537
+ referenceVideoUrls?: string[];
538
+ /**
539
+ * Seedance edit only (refused on other models): audio the edit can use,
540
+ * `{audio:1}`, `{audio:2}`, …. The model's cap applies (10 on `seedance-2-5`).
541
+ */
542
+ referenceAudioUrls?: string[];
524
543
  [k: string]: unknown;
525
544
  }
526
545
  /** One way the platform shaped the price — shown so a client can explain it. */
@@ -611,6 +630,12 @@ interface NodeDescriptor {
611
630
  * without a credit system (community/business omit the field entirely;
612
631
  * it is meaningful on Cloud only). */
613
632
  creditCost?: number | string;
633
+ /** `creditCost` is an ESTIMATE: a metered LLM node's typical call on its
634
+ * default model, charged its actual usage after the run (shown `~N`).
635
+ * Absent for a fixed price, and under the tier-pricing rollback. A metered
636
+ * LLM node whose default model has no price yet lists `creditCost:
637
+ * "unpriced"` (a run on it is refused `llm_model_unpriced`). */
638
+ estimate?: true;
614
639
  /** A node charged per unit of its own measure (its `creditCost` is a word
615
640
  * such as `"per-1000-frames"`): the charged price of one unit and how a run
616
641
  * rounds. Cloud only, like `creditCost`. */
@@ -997,6 +1022,10 @@ interface TextToVideoParams extends StructuredReferenceParams, ReferenceCaptionP
997
1022
  * { provider: "seedance-2-5-hd", sourceJobId })`: the same take, frame for
998
1023
  * frame, at 1080p. Drafts are kept about 7 days. */
999
1024
  draft?: boolean;
1025
+ /** Absent / `true`: a copyright refusal is retried once with a reworded
1026
+ * prompt. `false` = a copyright refusal fails the job instead of retrying
1027
+ * once with a reworded prompt. */
1028
+ contentPolicyRewrite?: boolean;
1000
1029
  [k: string]: unknown;
1001
1030
  }
1002
1031
  /**
@@ -1156,7 +1185,9 @@ interface RunAndWaitOptions {
1156
1185
  readonly signal?: AbortSignal;
1157
1186
  /**
1158
1187
  * Also cancel the job when `signal` aborts after it was submitted
1159
- * (`POST /v1/jobs/:id/cancel`, which refunds its credit hold). Best effort:
1188
+ * (`POST /v1/jobs/:id/cancel`, which refunds its credit hold — except a
1189
+ * metered LLM job whose call has started: it answers `inFlight: true`,
1190
+ * finishes, and is charged what it used). Best effort:
1160
1191
  * a failed cancel still rejects with the {@link JobAbortedError}. Default
1161
1192
  * `false` — aborting only stops waiting.
1162
1193
  */
@@ -1274,6 +1305,9 @@ declare class NodesResource {
1274
1305
  quote(type: "text-to-video", params: TextToVideoParams): Promise<NodeQuote>;
1275
1306
  quote(type: "generate-video", params: GenerateVideoParams): Promise<NodeQuote>;
1276
1307
  quote(type: "video-to-video", params: VideoToVideoParams): Promise<NodeQuote>;
1308
+ /** A Seedance 2.5 draft's 1080p finalize (`seedance-2-5-hd`) is priced from
1309
+ * the draft itself, including the clips it was made with. */
1310
+ quote(type: "video-upscale", params: VideoUpscaleParams): Promise<NodeQuote>;
1277
1311
  quote(type: string, params?: Record<string, unknown>): Promise<NodeQuote>;
1278
1312
  /**
1279
1313
  * Run a single async node to completion: {@link run} it, extract the
@@ -521,6 +521,25 @@ interface VideoToVideoParams extends GenerationSessionParams {
521
521
  promptExtend?: boolean;
522
522
  /** Seedance 2.5 only: a 480p draft, finalized later with `video-upscale`. */
523
523
  draft?: boolean;
524
+ /**
525
+ * Seedance edit only (refused on other models): more images the edit can use.
526
+ * They follow `referenceImageUrl` when it is sent, so with it they are
527
+ * `{image:2}`, `{image:3}`, …, without it `{image:1}`, `{image:2}`, ….
528
+ * The model's cap applies (30 images on `seedance-2-5`).
529
+ */
530
+ referenceImageUrls?: string[];
531
+ /**
532
+ * Seedance edit only (refused on other models): extra clips the edit can use.
533
+ * Do not repeat `videoUrl` here: the source clip is `{video:1}`, these are
534
+ * `{video:2}`, `{video:3}`, …. The source counts toward the model's cap
535
+ * (10 clips on `seedance-2-5`), and every clip's length is priced.
536
+ */
537
+ referenceVideoUrls?: string[];
538
+ /**
539
+ * Seedance edit only (refused on other models): audio the edit can use,
540
+ * `{audio:1}`, `{audio:2}`, …. The model's cap applies (10 on `seedance-2-5`).
541
+ */
542
+ referenceAudioUrls?: string[];
524
543
  [k: string]: unknown;
525
544
  }
526
545
  /** One way the platform shaped the price — shown so a client can explain it. */
@@ -611,6 +630,12 @@ interface NodeDescriptor {
611
630
  * without a credit system (community/business omit the field entirely;
612
631
  * it is meaningful on Cloud only). */
613
632
  creditCost?: number | string;
633
+ /** `creditCost` is an ESTIMATE: a metered LLM node's typical call on its
634
+ * default model, charged its actual usage after the run (shown `~N`).
635
+ * Absent for a fixed price, and under the tier-pricing rollback. A metered
636
+ * LLM node whose default model has no price yet lists `creditCost:
637
+ * "unpriced"` (a run on it is refused `llm_model_unpriced`). */
638
+ estimate?: true;
614
639
  /** A node charged per unit of its own measure (its `creditCost` is a word
615
640
  * such as `"per-1000-frames"`): the charged price of one unit and how a run
616
641
  * rounds. Cloud only, like `creditCost`. */
@@ -997,6 +1022,10 @@ interface TextToVideoParams extends StructuredReferenceParams, ReferenceCaptionP
997
1022
  * { provider: "seedance-2-5-hd", sourceJobId })`: the same take, frame for
998
1023
  * frame, at 1080p. Drafts are kept about 7 days. */
999
1024
  draft?: boolean;
1025
+ /** Absent / `true`: a copyright refusal is retried once with a reworded
1026
+ * prompt. `false` = a copyright refusal fails the job instead of retrying
1027
+ * once with a reworded prompt. */
1028
+ contentPolicyRewrite?: boolean;
1000
1029
  [k: string]: unknown;
1001
1030
  }
1002
1031
  /**
@@ -1156,7 +1185,9 @@ interface RunAndWaitOptions {
1156
1185
  readonly signal?: AbortSignal;
1157
1186
  /**
1158
1187
  * Also cancel the job when `signal` aborts after it was submitted
1159
- * (`POST /v1/jobs/:id/cancel`, which refunds its credit hold). Best effort:
1188
+ * (`POST /v1/jobs/:id/cancel`, which refunds its credit hold — except a
1189
+ * metered LLM job whose call has started: it answers `inFlight: true`,
1190
+ * finishes, and is charged what it used). Best effort:
1160
1191
  * a failed cancel still rejects with the {@link JobAbortedError}. Default
1161
1192
  * `false` — aborting only stops waiting.
1162
1193
  */
@@ -1274,6 +1305,9 @@ declare class NodesResource {
1274
1305
  quote(type: "text-to-video", params: TextToVideoParams): Promise<NodeQuote>;
1275
1306
  quote(type: "generate-video", params: GenerateVideoParams): Promise<NodeQuote>;
1276
1307
  quote(type: "video-to-video", params: VideoToVideoParams): Promise<NodeQuote>;
1308
+ /** A Seedance 2.5 draft's 1080p finalize (`seedance-2-5-hd`) is priced from
1309
+ * the draft itself, including the clips it was made with. */
1310
+ quote(type: "video-upscale", params: VideoUpscaleParams): Promise<NodeQuote>;
1277
1311
  quote(type: string, params?: Record<string, unknown>): Promise<NodeQuote>;
1278
1312
  /**
1279
1313
  * Run a single async node to completion: {@link run} it, extract the
@@ -145,6 +145,23 @@ interface StudioOpsImpact {
145
145
  /** Shots bound to any of those frames. */
146
146
  shotIds: string[];
147
147
  }
148
+ /**
149
+ * A sentence as data: the id of the template a client words it from, and the
150
+ * values that fill the template's slots.
151
+ *
152
+ * It travels beside the English wording, never instead of it. A client that
153
+ * words the sentence in the person's language builds it from `template` and
154
+ * `vars`, and shows the English wording whenever it has no wording for
155
+ * `template` or `vars` does not fill it — so a template id it has never heard of
156
+ * costs nothing. A template id is permanent: a change to its slots or its
157
+ * meaning ships as a new id.
158
+ */
159
+ interface StudioOpsText {
160
+ /** The template's id. */
161
+ template: string;
162
+ /** What fills the template's slots, by slot name. */
163
+ vars: Record<string, string | number>;
164
+ }
148
165
  /**
149
166
  * One line of what an operation did, in the words a change log would use.
150
167
  *
@@ -156,6 +173,13 @@ interface StudioOpsReceipt {
156
173
  op: string;
157
174
  /** Past tense, naming the target the way a person would. */
158
175
  summary: string;
176
+ /**
177
+ * `summary` as data, for a client that words receipts in the person's
178
+ * language. `summary` is always present and always English; read `detail`
179
+ * only when you have wording for its template, and show `summary` when you do
180
+ * not. Absent when the studio service that answered predates it.
181
+ */
182
+ detail?: StudioOpsText;
159
183
  /** Ids the operation MINTED — never ids the caller supplied. */
160
184
  ids?: string[];
161
185
  /**
@@ -181,6 +205,14 @@ interface StudioOpsResponse {
181
205
  * batch; a refusal does.
182
206
  */
183
207
  warnings: string[];
208
+ /**
209
+ * `warnings` as data, by position: entry `i` words `warnings[i]`, and `null`
210
+ * means that warning has no wording but the English one. The service sends it
211
+ * only when it is exactly as long as `warnings`, so treat a list of any other
212
+ * length as absent. Absent too when the studio service that answered predates
213
+ * it.
214
+ */
215
+ warningDetails?: Array<StudioOpsText | null>;
184
216
  }
185
217
  /**
186
218
  * An operation's confirmation class — the vocabulary's own four letters.
@@ -229,6 +261,8 @@ interface StudioOpsDryRunResponse {
229
261
  receipts: StudioOpsDryRunReceipt[];
230
262
  /** The same things an apply would have said. */
231
263
  warnings: string[];
264
+ /** The same data behind them an apply would have sent: see {@link StudioOpsResponse.warningDetails}. */
265
+ warningDetails?: Array<StudioOpsText | null>;
232
266
  }
233
267
  /** What landing the finished jobs did. */
234
268
  interface StudioReconcileResponse {
@@ -569,4 +603,4 @@ declare class StudioProductionsResource {
569
603
  clone(productionId: string, input?: StudioCloneRequest): Promise<StudioProduction>;
570
604
  }
571
605
 
572
- export { type StudioProductionDetail as A, type StudioProductionResponse as B, StudioProductionsResource as C, type StudioReconcileResponse as D, type StudioRevoiceRequest as E, type StudioSkillResponse as F, type GetProductionOptions as G, type StudioValidatePlanResponse as H, type StudioVideoLane as I, type StudioVoiceRequest as J, isStudioGenerateEstimate as K, type ListStudioProductionsOptions as L, type StudioClientRequestId as S, type StudioCloneRequest as a, type StudioCreateProductionRequest as b, type StudioDescribeRequest as c, type StudioExportPlanOptions as d, type StudioExportPlanResponse as e, type StudioExportStep as f, type StudioFrameRequest as g, type StudioGenerateEstimate as h, type StudioGenerateOptions as i, type StudioGenerateRequest as j, type StudioGenerateResponse as k, type StudioGenerateResult as l, type StudioImportSummary as m, type StudioJobStartedResponse as n, type StudioListProductionsResponse as o, type StudioMediaResponse as p, type StudioMusicRequest as q, type StudioOpClass as r, type StudioOpsDryRunReceipt as s, type StudioOpsDryRunResponse as t, type StudioOpsImpact as u, type StudioOpsReceipt as v, type StudioOpsRequest as w, type StudioOpsResponse as x, type StudioPlanIssue as y, type StudioProduction as z };
606
+ export { type StudioProduction as A, type StudioProductionDetail as B, type StudioProductionResponse as C, StudioProductionsResource as D, type StudioReconcileResponse as E, type StudioRevoiceRequest as F, type GetProductionOptions as G, type StudioSkillResponse as H, type StudioValidatePlanResponse as I, type StudioVideoLane as J, type StudioVoiceRequest as K, type ListStudioProductionsOptions as L, isStudioGenerateEstimate as M, type StudioClientRequestId as S, type StudioCloneRequest as a, type StudioCreateProductionRequest as b, type StudioDescribeRequest as c, type StudioExportPlanOptions as d, type StudioExportPlanResponse as e, type StudioExportStep as f, type StudioFrameRequest as g, type StudioGenerateEstimate as h, type StudioGenerateOptions as i, type StudioGenerateRequest as j, type StudioGenerateResponse as k, type StudioGenerateResult as l, type StudioImportSummary as m, type StudioJobStartedResponse as n, type StudioListProductionsResponse as o, type StudioMediaResponse as p, type StudioMusicRequest as q, type StudioOpClass as r, type StudioOpsDryRunReceipt as s, type StudioOpsDryRunResponse as t, type StudioOpsImpact as u, type StudioOpsReceipt as v, type StudioOpsRequest as w, type StudioOpsResponse as x, type StudioOpsText as y, type StudioPlanIssue as z };
@@ -145,6 +145,23 @@ interface StudioOpsImpact {
145
145
  /** Shots bound to any of those frames. */
146
146
  shotIds: string[];
147
147
  }
148
+ /**
149
+ * A sentence as data: the id of the template a client words it from, and the
150
+ * values that fill the template's slots.
151
+ *
152
+ * It travels beside the English wording, never instead of it. A client that
153
+ * words the sentence in the person's language builds it from `template` and
154
+ * `vars`, and shows the English wording whenever it has no wording for
155
+ * `template` or `vars` does not fill it — so a template id it has never heard of
156
+ * costs nothing. A template id is permanent: a change to its slots or its
157
+ * meaning ships as a new id.
158
+ */
159
+ interface StudioOpsText {
160
+ /** The template's id. */
161
+ template: string;
162
+ /** What fills the template's slots, by slot name. */
163
+ vars: Record<string, string | number>;
164
+ }
148
165
  /**
149
166
  * One line of what an operation did, in the words a change log would use.
150
167
  *
@@ -156,6 +173,13 @@ interface StudioOpsReceipt {
156
173
  op: string;
157
174
  /** Past tense, naming the target the way a person would. */
158
175
  summary: string;
176
+ /**
177
+ * `summary` as data, for a client that words receipts in the person's
178
+ * language. `summary` is always present and always English; read `detail`
179
+ * only when you have wording for its template, and show `summary` when you do
180
+ * not. Absent when the studio service that answered predates it.
181
+ */
182
+ detail?: StudioOpsText;
159
183
  /** Ids the operation MINTED — never ids the caller supplied. */
160
184
  ids?: string[];
161
185
  /**
@@ -181,6 +205,14 @@ interface StudioOpsResponse {
181
205
  * batch; a refusal does.
182
206
  */
183
207
  warnings: string[];
208
+ /**
209
+ * `warnings` as data, by position: entry `i` words `warnings[i]`, and `null`
210
+ * means that warning has no wording but the English one. The service sends it
211
+ * only when it is exactly as long as `warnings`, so treat a list of any other
212
+ * length as absent. Absent too when the studio service that answered predates
213
+ * it.
214
+ */
215
+ warningDetails?: Array<StudioOpsText | null>;
184
216
  }
185
217
  /**
186
218
  * An operation's confirmation class — the vocabulary's own four letters.
@@ -229,6 +261,8 @@ interface StudioOpsDryRunResponse {
229
261
  receipts: StudioOpsDryRunReceipt[];
230
262
  /** The same things an apply would have said. */
231
263
  warnings: string[];
264
+ /** The same data behind them an apply would have sent: see {@link StudioOpsResponse.warningDetails}. */
265
+ warningDetails?: Array<StudioOpsText | null>;
232
266
  }
233
267
  /** What landing the finished jobs did. */
234
268
  interface StudioReconcileResponse {
@@ -569,4 +603,4 @@ declare class StudioProductionsResource {
569
603
  clone(productionId: string, input?: StudioCloneRequest): Promise<StudioProduction>;
570
604
  }
571
605
 
572
- export { type StudioProductionDetail as A, type StudioProductionResponse as B, StudioProductionsResource as C, type StudioReconcileResponse as D, type StudioRevoiceRequest as E, type StudioSkillResponse as F, type GetProductionOptions as G, type StudioValidatePlanResponse as H, type StudioVideoLane as I, type StudioVoiceRequest as J, isStudioGenerateEstimate as K, type ListStudioProductionsOptions as L, type StudioClientRequestId as S, type StudioCloneRequest as a, type StudioCreateProductionRequest as b, type StudioDescribeRequest as c, type StudioExportPlanOptions as d, type StudioExportPlanResponse as e, type StudioExportStep as f, type StudioFrameRequest as g, type StudioGenerateEstimate as h, type StudioGenerateOptions as i, type StudioGenerateRequest as j, type StudioGenerateResponse as k, type StudioGenerateResult as l, type StudioImportSummary as m, type StudioJobStartedResponse as n, type StudioListProductionsResponse as o, type StudioMediaResponse as p, type StudioMusicRequest as q, type StudioOpClass as r, type StudioOpsDryRunReceipt as s, type StudioOpsDryRunResponse as t, type StudioOpsImpact as u, type StudioOpsReceipt as v, type StudioOpsRequest as w, type StudioOpsResponse as x, type StudioPlanIssue as y, type StudioProduction as z };
606
+ export { type StudioProduction as A, type StudioProductionDetail as B, type StudioProductionResponse as C, StudioProductionsResource as D, type StudioReconcileResponse as E, type StudioRevoiceRequest as F, type GetProductionOptions as G, type StudioSkillResponse as H, type StudioValidatePlanResponse as I, type StudioVideoLane as J, type StudioVoiceRequest as K, type ListStudioProductionsOptions as L, isStudioGenerateEstimate as M, type StudioClientRequestId as S, type StudioCloneRequest as a, type StudioCreateProductionRequest as b, type StudioDescribeRequest as c, type StudioExportPlanOptions as d, type StudioExportPlanResponse as e, type StudioExportStep as f, type StudioFrameRequest as g, type StudioGenerateEstimate as h, type StudioGenerateOptions as i, type StudioGenerateRequest as j, type StudioGenerateResponse as k, type StudioGenerateResult as l, type StudioImportSummary as m, type StudioJobStartedResponse as n, type StudioListProductionsResponse as o, type StudioMediaResponse as p, type StudioMusicRequest as q, type StudioOpClass as r, type StudioOpsDryRunReceipt as s, type StudioOpsDryRunResponse as t, type StudioOpsImpact as u, type StudioOpsReceipt as v, type StudioOpsRequest as w, type StudioOpsResponse as x, type StudioOpsText as y, type StudioPlanIssue as z };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nodaro/sdk",
3
- "version": "2.33.0",
3
+ "version": "2.38.0",
4
4
  "description": "Typed REST client for the Nodaro API — workflows, jobs, executions, apps, characters, and more.",
5
5
  "type": "module",
6
6
  "license": "Apache-2.0",
@@ -35,6 +35,11 @@
35
35
  "import": "./dist/entries/billing.js",
36
36
  "require": "./dist/entries/billing.cjs"
37
37
  },
38
+ "./cast-swap": {
39
+ "types": "./dist/entries/cast-swap.d.ts",
40
+ "import": "./dist/entries/cast-swap.js",
41
+ "require": "./dist/entries/cast-swap.cjs"
42
+ },
38
43
  "./catalogs": {
39
44
  "types": "./dist/entries/catalogs.d.ts",
40
45
  "import": "./dist/entries/catalogs.js",
@@ -235,6 +240,11 @@
235
240
  "import": "./dist/entries/templates.js",
236
241
  "require": "./dist/entries/templates.cjs"
237
242
  },
243
+ "./trends": {
244
+ "types": "./dist/entries/trends.d.ts",
245
+ "import": "./dist/entries/trends.js",
246
+ "require": "./dist/entries/trends.cjs"
247
+ },
238
248
  "./tutorials": {
239
249
  "types": "./dist/entries/tutorials.d.ts",
240
250
  "import": "./dist/entries/tutorials.js",
@@ -297,7 +307,7 @@
297
307
  "test:watch": "vitest"
298
308
  },
299
309
  "dependencies": {
300
- "@nodaro/shared": "^3.37.0",
310
+ "@nodaro/shared": "^3.38.0",
301
311
  "@nodaro/prompts": "^1.40.0"
302
312
  },
303
313
  "peerDependencies": {
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/resources/jobs.ts"],"names":[],"mappings":";;;AAgMA,SAAS,UAAU,KAAA,EAAmE;AACpF,EAAA,IAAI,KAAA,KAAU,QAAW,OAAO,MAAA;AAChC,EAAA,OAAO,OAAO,KAAA,KAAU,QAAA,GAAW,KAAA,GAAQ,KAAA,CAAM,KAAK,GAAG,CAAA;AAC3D;AAgCO,IAAM,eAAN,MAAmB;AAAA,EACxB,YAAoB,MAAA,EAA0B;AAA1B,IAAA,IAAA,CAAA,MAAA,GAAA,MAAA;AAAA,EAA2B;AAAA,EAA3B,MAAA;AAAA;AAAA,EAGpB,IAAI,EAAA,EAAoC;AACtC,IAAA,OAAO,IAAA,CAAK,OAAO,OAAA,CAAQ,KAAA,EAAO,YAAY,kBAAA,CAAmB,EAAE,CAAC,CAAA,CAAE,CAAA;AAAA,EACxE;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAUA,IAAA,CAAK,MAAA,GAAyB,EAAC,EAA0B;AACvD,IAAA,MAAM,EAAE,MAAA,EAAQ,IAAA,EAAM,GAAG,MAAK,GAAI,MAAA;AAClC,IAAA,OAAO,IAAA,CAAK,MAAA,CAAO,OAAA,CAAsB,KAAA,EAAO,UAAA,EAAY;AAAA,MAC1D,KAAA,EAAO,EAAE,GAAG,IAAA,EAAM,MAAA,EAAQ,SAAA,CAAU,MAAM,CAAA,EAAG,IAAA,EAAM,SAAA,CAAU,IAAI,CAAA;AAAE,KACpE,CAAA;AAAA,EACH;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQA,IAAA,CAAK,IAAY,MAAA,EAAkD;AACjE,IAAA,OAAO,IAAA,CAAK,OAAO,OAAA,CAAuB,KAAA,EAAO,YAAY,kBAAA,CAAmB,EAAE,CAAC,CAAA,OAAA,CAAA,EAAW;AAAA,MAC5F,IAAA,EAAM,EAAE,MAAA;AAAO,KAChB,CAAA;AAAA,EACH;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQA,UAAU,EAAA,EAAgD;AACxD,IAAA,OAAO,KAAK,MAAA,CAAO,OAAA;AAAA,MACjB,KAAA;AAAA,MACA,CAAA,SAAA,EAAY,kBAAA,CAAmB,EAAE,CAAC,CAAA,OAAA;AAAA,KACpC;AAAA,EACF;AAAA;AAAA;AAAA;AAAA;AAAA,EAMA,OAAO,EAAA,EAAsC;AAC3C,IAAA,OAAO,KAAK,MAAA,CAAO,OAAA;AAAA,MACjB,MAAA;AAAA,MACA,CAAA,SAAA,EAAY,kBAAA,CAAmB,EAAE,CAAC,CAAA,OAAA;AAAA,KACpC;AAAA,EACF;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQA,OAAO,EAAA,EAAsC;AAC3C,IAAA,OAAO,KAAK,MAAA,CAAO,OAAA;AAAA,MACjB,QAAA;AAAA,MACA,CAAA,SAAA,EAAY,kBAAA,CAAmB,EAAE,CAAC,CAAA;AAAA,KACpC;AAAA,EACF;AACF","file":"chunk-3QBH2VE2.cjs","sourcesContent":["import type { NodaroClientCore } from \"../core.js\"\n\n/**\n * A job's lifecycle status. Hand-copied mirror of `JOB_STATUSES` in the\n * platform's `backend/src/lib/job-status.ts` — nothing links the two at build\n * time, so a new member has to be added here in the same change.\n *\n * `pending_review` is IN-FLIGHT, NOT TERMINAL: a job policy registered by the\n * deployment held the output for a human reviewer. Treat it like `processing`\n * in a `switch` — keep waiting, do not re-run — and it resolves to `completed`\n * (approved), `failed` (rejected, carrying an `error_hint` with\n * `kind: \"policy-block\"`) or `cancelled` (a held job is cancellable like any\n * in-flight job). `credit_status` reads `\"reserved\"` for the whole hold. Only\n * appears on deployments that register a job policy; `runAndWait` throws\n * {@link JobHeldError} on the first held tick rather than waiting it out.\n */\nexport type JobStatus =\n | \"pending\"\n | \"queued\"\n | \"processing\"\n | \"pending_review\"\n | \"completed\"\n | \"failed\"\n | \"cancelled\"\n\n/**\n * A PROVIDER's verdict: the model's own safety filter refused the output.\n * `class` distinguishes a deterministic block (copyright/likeness — retrying\n * the same request never helps) from `safety`, whose filter is known to be\n * non-deterministic for some models: `retried` says whether the worker\n * already spent its one extra attempt, and `suggestedProvider` — present\n * only when the catalog declares a fallback for the model that failed — is a\n * real model id the SAME prompt/references can be retried on.\n */\nexport type SafetyBlockHint = {\n kind: \"safety-block\"\n class: \"copyright\" | \"likeness\" | \"safety\"\n retried: boolean\n suggestedProvider?: string\n}\n\n/**\n * A NODARO-side verdict, not a provider's: a job policy registered by the\n * deployment rejected the request (`hookPoint: \"request\"` — nothing ran, and\n * the call itself failed with {@link JobBlockedError}) or the finished output\n * (`hookPoint: \"result\"` — the result was blocked and never published).\n *\n * `reason` is USER-SAFE BY CONTRACT — the platform guarantees the policy's\n * machine text (scores, labels) never reaches it — so show it to the person\n * who made the request as-is. `policyId` identifies the deployment's policy,\n * not a Nodaro product feature. Only occurs on deployments that register a\n * job policy.\n */\nexport type PolicyBlockHint = {\n kind: \"policy-block\"\n policyId: string\n reason: string\n hookPoint: \"request\" | \"result\"\n}\n\n/**\n * A job's `jobs.error_hint` (migration 376) — a user-safe, machine-readable\n * failure verdict, so a caller can act on it without parsing `error_message`\n * prose. One column, two verdict sources; `kind` is the discriminant.\n *\n * HAND-COPIED MIRROR of `ErrorHint` in the platform's\n * `backend/src/lib/safety-block.ts` (which names this file in its own\n * comment). Nothing links the two at build time: a new arm there has to be\n * pasted here verbatim in the same change, with a changeset.\n * `packages/client/dist/index.d.ts` is REBUILT, never hand-edited.\n */\nexport type JobErrorHint = SafetyBlockHint | PolicyBlockHint\n\n/**\n * The billing lifecycle of a job's credit reservation — `usage_logs.status`\n * for the job's `usage_log_id`. `null` when the job has no usage log (e.g. a\n * free run) or hasn't reserved credits yet.\n */\nexport type CreditStatus = \"reserved\" | \"committed\" | \"refunded\"\n\n/** A job owner's rating of their job — set with {@link JobsResource.rate}. */\nexport type JobRating = \"good\" | \"bad\"\n\n/**\n * The `rating` filter of {@link JobsResource.list}: one rating, any rating\n * (`\"rated\"`) or none (`\"unrated\"`).\n */\nexport type JobRatingFilter = JobRating | \"rated\" | \"unrated\"\n\n/**\n * Job record returned to non-admin SDK consumers. Field names are snake_case\n * to match the wire format (per the OpenAPI fix in Phase 1).\n *\n * Sensitive fields stripped server-side for non-admin callers:\n * `provider`, `provider_cost`, `display_cost`, `credits_actual`. USD\n * pricing is admin-only across api/sdk/mcp — non-admin consumers see\n * only the `credits` abstraction. Server-only nested job data (including\n * Recast's private remux base) is stripped for every caller, including admins.\n */\nexport interface Job {\n id: string\n status: JobStatus\n progress: number\n user_id: string\n input_data: unknown\n output_data: unknown\n error_message: string | null\n /** Present on a failed job the worker classified as a provider\n * content-policy block (`kind: \"safety-block\"`) or that a deployment's job\n * policy rejected (`kind: \"policy-block\"`); absent/null otherwise.\n * User-safe by construction — narrow on `kind` before reading the rest. */\n error_hint?: JobErrorHint | null\n /** PR9: the job's credit reservation lifecycle, derived server-side from\n * `usage_logs.status`. `null` when there is no usage log to report. Never\n * changes the meaning of `credits` (the reserved amount) below. */\n credit_status?: CreditStatus | null\n /** The credits HELD when the job was accepted. Never changes — a job can\n * settle below it; read {@link Job.credits_charged} for what it cost. */\n credits: number | null\n /**\n * What the job actually cost once its hold settled. Can be lower than\n * `credits` (the unused part goes back to the balance), `0` when the hold was\n * refunded, `null` while the job is still running or when it reserved\n * nothing of its own. Sum this — not `credits` — to total spend. Returned by\n * `get()` and `list()`.\n */\n credits_charged?: number | null\n job_type: string | null\n created_at: string\n started_at: string | null\n completed_at: string | null\n /**\n * Provenance: which kind of caller created the job — one of\n * `\"internal\" | \"mcp\" | \"app\" | \"cli\" | \"sdk\" | \"extension\" | \"web\" | \"api\"`.\n * `source_detail` narrows it (origin host, `extension/<name>` label,\n * `sdk/<version>`, MCP client name, developer-app id). Descriptive only;\n * lets a library view label or filter media by origin.\n */\n source?: string | null\n source_detail?: string | null\n /** The generation session this job was born in (the `sessionId` sent with\n * the generation request), or null. See `client.sessions`. */\n session_id?: string | null\n /**\n * Whether the job's owner favorited it (`client.gallery.toggleFavorite`).\n * Returned by `get()` and `list()`. Absent from an older server, and when\n * the server could not read it for a moment — treat absent as unknown,\n * never as `false`.\n */\n favorited?: boolean\n /**\n * The owner's rating of the job ({@link JobsResource.rate}), or `null` when\n * unrated. Returned by `get()` and `list()`; absent like `favorited`.\n */\n rating?: JobRating | null\n}\n\nexport interface CancelJobResult {\n success: true\n cancelled: number\n}\n\nexport interface DeleteJobResult {\n success: true\n}\n\nexport interface ListJobsParams {\n /** One status or several (a job matching any of them). An unknown status is a 400. */\n status?: JobStatus | readonly JobStatus[]\n /** Exact match on `input_data.type` — the route that created the job\n * (`\"llm-structured\"`, `\"video-analysis\"`, …). One value or several (up to 20). */\n type?: string | readonly string[]\n /** Exact match on `input_data.origin` — the client app that sent it. */\n origin?: string\n /** `true`: only jobs you favorited; `false`: only jobs you did not. */\n favorited?: boolean\n /** Your rating: `\"good\"`, `\"bad\"`, any (`\"rated\"`) or none (`\"unrated\"`). */\n rating?: JobRatingFilter\n /** The jobs of one generate-image batch (`count` / `models`) — its `batchId`. */\n batchId?: string\n /** Page size, 1–100 (server default 50). */\n limit?: number\n /** The previous page's `next`. */\n cursor?: string\n}\n\n/** What {@link JobsResource.rate} answers: the job's rating now. */\nexport interface RateJobResult {\n data: { jobId: string; rating: JobRating | null }\n}\n\n/** A list filter value as the query string carries it: several are comma-separated. */\nfunction listParam(value: string | readonly string[] | undefined): string | undefined {\n if (value === undefined) return undefined\n return typeof value === \"string\" ? value : value.join(\",\")\n}\n\nexport interface ListJobsPage {\n /**\n * A page may hold fewer than `limit` rows — even none — and still carry a\n * `next`. Page on `next`, never on `data.length`.\n */\n data: Job[]\n /** Pass back as `cursor` for the next page; `null` on the last one. */\n next: string | null\n}\n\n/**\n * Lean job status returned by `GET /v1/jobs/:id/status`. Skips the\n * `input_data` JSONB and cost columns. Its `output_data` still goes\n * through the server-only nested-field redaction. Intended for poll loops that\n * only need progress/output/error, and when the job finished.\n */\nexport interface JobStatusResult {\n id: string\n status: JobStatus\n progress?: number\n output_data?: unknown\n error_message?: string | null\n /** PR9: see {@link Job.error_hint}. */\n error_hint?: JobErrorHint | null\n /** PR9: see {@link Job.credit_status}. */\n credit_status?: CreditStatus | null\n /** When the job finished, on the server's clock; null until it has. */\n completed_at?: string | null\n}\n\nexport class JobsResource {\n constructor(private client: NodaroClientCore) {}\n\n /** Get a single job by ID. */\n get(id: string): Promise<{ data: Job }> {\n return this.client.request(\"GET\", `/v1/jobs/${encodeURIComponent(id)}`)\n }\n\n /**\n * Your jobs, newest first (`GET /v1/jobs`), cursor-paginated. `type` and\n * `origin` filter on the job's own `input_data`, which every job carries —\n * a client app lists its runs with `{ type: \"llm-structured\", origin: \"studio\" }`.\n * `status` and `type` take one value or a list; `favorited` and `rating`\n * filter on your own marks. Every filter combines with AND, and each job\n * carries `favorited` and `rating`.\n */\n list(params: ListJobsParams = {}): Promise<ListJobsPage> {\n const { status, type, ...rest } = params\n return this.client.request<ListJobsPage>(\"GET\", \"/v1/jobs\", {\n query: { ...rest, status: listParam(status), type: listParam(type) },\n })\n }\n\n /**\n * Rate one of your jobs `\"good\"` or `\"bad\"`, or clear the rating with\n * `null` (`PUT /v1/jobs/:id/rating`). Only the job's owner rates it — anyone\n * else's job is a `NotFoundError`. The rating reads back as `Job.rating`\n * and filters {@link list}. OAuth apps need the `assets:write` scope.\n */\n rate(id: string, rating: JobRating | null): Promise<RateJobResult> {\n return this.client.request<RateJobResult>(\"PUT\", `/v1/jobs/${encodeURIComponent(id)}/rating`, {\n body: { rating },\n })\n }\n\n /**\n * Get the lean status of a single job (poll-loop friendly).\n * Hits `GET /v1/jobs/:id/status` — returns only id/status/progress/\n * output_data/error_message, with far less wire/CPU cost than `get()`.\n * Same auth + ownership semantics as {@link get}.\n */\n getStatus(id: string): Promise<{ data: JobStatusResult }> {\n return this.client.request(\n \"GET\",\n `/v1/jobs/${encodeURIComponent(id)}/status`,\n )\n }\n\n /**\n * Cancel a job. Server route is `POST /v1/jobs/:jobId/cancel`.\n * Refunds any reserved credit holds.\n */\n cancel(id: string): Promise<CancelJobResult> {\n return this.client.request(\n \"POST\",\n `/v1/jobs/${encodeURIComponent(id)}/cancel`,\n )\n }\n\n /**\n * Delete a job and the private media it produced. Server route is\n * `DELETE /v1/jobs/:jobId`. Only the job's owner (or an admin) may delete it;\n * a job that is still running is deleted as-is — cancel it first when its\n * worker should stop ({@link cancel}).\n */\n delete(id: string): Promise<DeleteJobResult> {\n return this.client.request(\n \"DELETE\",\n `/v1/jobs/${encodeURIComponent(id)}`,\n )\n }\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/resources/credits.ts"],"names":[],"mappings":";AAmLA,IAAM,iBAAA,GAAoB,EAAA;AAEnB,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,EAOpB,MAAM,OAAA,GAAgC;AACpC,IAAA,MAAM,GAAA,GAAM,MAAM,IAAA,CAAK,MAAA,CAAO,OAAA;AAAA,MAC5B,KAAA;AAAA,MACA;AAAA,KACF;AACA,IAAA,OAAO,GAAA,CAAI,IAAA;AAAA,EACb;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EASA,YAAA,CAAa,OAAA,GAAqC,EAAC,EAAoC;AACrF,IAAA,OAAO,IAAA,CAAK,MAAA,CAAO,OAAA,CAAgC,KAAA,EAAO,0BAAA,EAA4B;AAAA,MACpF,OAAO,EAAE,KAAA,EAAO,QAAQ,KAAA,EAAO,MAAA,EAAQ,QAAQ,MAAA;AAAO,KACvD,CAAA;AAAA,EACH;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQA,WAAW,GAAA,EAA0C;AACnD,IAAA,OAAO,IAAA,CAAK,MAAA,CAAO,OAAA,CAA0B,MAAA,EAAQ,yBAAA,EAA2B;AAAA,MAC9E,MAAM,EAAE,MAAA,EAAQ,IAAI,KAAA,CAAM,CAAA,EAAG,iBAAiB,CAAA;AAAE,KACjD,CAAA;AAAA,EACH;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAcA,gBAAA,CAAiB,IAAA,GAAmB,EAAC,EAAoC;AACvE,IAAA,OAAO,IAAA,CAAK,MAAA,CAAO,OAAA,CAAgC,MAAA,EAAQ,gCAAA,EAAkC;AAAA,MAC3F,IAAA,EAAM;AAAA,KACP,CAAA;AAAA,EACH;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAiBA,iBAAA,CAAkB,KAAA,GAAgC,EAAC,EAAqC;AACtF,IAAA,OAAO,IAAA,CAAK,MAAA,CAAO,OAAA,CAAiC,MAAA,EAAQ,iCAAA,EAAmC;AAAA,MAC7F,IAAA,EAAM;AAAA,KACP,CAAA;AAAA,EACH;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAYA,oBAAA,GAAwD;AACtD,IAAA,OAAO,IAAA,CAAK,MAAA,CAAO,OAAA,CAAgC,MAAA,EAAQ,gCAAgC,CAAA;AAAA,EAC7F;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AASF","file":"chunk-4CXB7RA6.js","sourcesContent":["import type { NodaroClientCore } from \"../core.js\"\n\n/**\n * Authenticated user's credit balance — the shape of `GET /v1/user/credits`'s\n * `data` field. Mirrors the canonical `UserBalance` from the backend billing\n * module (`backend/src/ee/billing/credits.ts`), the source of truth: keep this\n * in sync if that interface changes.\n */\nexport interface UserBalance {\n total: number\n subscription: number\n topup: number\n dailySpent: number\n dailyLimit: number | null\n monthlyAllocation: number\n /** Stored billing tier. Display should prefer `effectiveTier`. */\n tier: string\n /** Derived entitlement tier: \"payg\" when stored-free with purchased credits. */\n effectiveTier: string\n features: Record<string, unknown>\n periodEnd: string | null\n /** Credits earned for app usage (free tier only — earned by running flows). */\n appCreditsAllowance: number\n /** Present when a deployment uses an external shared wallet. Raw credits;\n * null means unavailable. Do not substitute the personal `total` balance. */\n externalWallet?: { available: number | null }\n /**\n * Where the account's free signup grant stands. `\"withheld\"` means the\n * account works but the grant did not land — show the activation path.\n * Absent where the deployment has no signup grant.\n */\n freeGrantState?: FreeGrantState\n /**\n * Present only with `freeGrantState: \"withheld\"`, when the claim showed no\n * browser signals at all: the app may say \"free credits need a regular\n * browser — reload\", because a reload in one judges the account again.\n */\n freeGrantNotice?: \"browser_unmeasured\"\n /**\n * The welcome-credits opt-in. PRESENT only while the deployment has the\n * offer switched on — absent means \"no popup, no banner, no block\".\n */\n welcomeOffer?: WelcomeOfferState\n}\n\n/** Where an account's free signup grant stands. */\nexport type FreeGrantState = \"unclaimed\" | \"granted\" | \"withheld\" | \"revoked\"\n\n/** `UserBalance.welcomeOffer` — what an app needs to show the welcome offer. */\nexport interface WelcomeOfferState {\n /** The one-time popup was already shown (see `markWelcomeOfferSeen`). */\n popupSeen: boolean\n /**\n * The account already has its credits (granted elsewhere) but still owes\n * the email consent: the web apps block creation until it is given — the\n * claim records it.\n */\n consentPending: boolean\n /** The credits a claim grants. Name this figure in the offer; never hard-code it. */\n credits: number\n}\n\n/** What `claimWelcomeOffer` sends: the browser signals plus the app answering. */\nexport interface WelcomeOfferClaimInput extends SignupKeys {\n /**\n * The answering app's slug (lowercase letters, digits and `-`, up to 40\n * characters), recorded with the consent. A value outside that grammar is\n * stored as absent, never refused.\n */\n sourceApp?: string\n /**\n * The interface language the user answered in — the id of a language Nodaro\n * ships, such as `\"en\"`, `\"ja\"` or `\"pt-BR\"`. Matched exactly and\n * case-sensitively: `\"en-US\"` or `\"pt-br\"` is stored as absent, never refused.\n * Recorded with the consent as the language of the LATEST consent: a later\n * \"yes\" in another language replaces it.\n */\n locale?: string\n}\n\n/** The answer of `POST /v1/credits/welcome-offer/claim`. */\nexport interface WelcomeOfferClaimResult {\n /** The email consent is recorded. */\n consent: \"granted\"\n /** Where the free grant stands after the claim — `\"withheld\"` when the abuse gate refused it. */\n grant: FreeGrantState\n /** The grant's figure. A grant tops the subscription credits UP TO it (it is not added on top), so a claim that lands it leaves the subscription credits at no less than this. */\n credits: number\n}\n\n/** The answer of `POST /v1/credits/welcome-offer/seen`. */\nexport interface WelcomeOfferSeenResult {\n ok: true\n}\n\n/**\n * Result of `POST /v1/credits/model-costs` — a batch cost lookup for editor\n * cost previews. `data` maps each priced identifier → its credit cost.\n *\n * Per-model fault isolation (the route runs the lookups under\n * `Promise.allSettled`): identifiers with no pricing row are reported in\n * `missing` (undisplayable until an operator seeds a price) and lookup\n * failures in `errors`, instead of failing the whole batch. Callers typically\n * render `'—'` for any identifier that lands in `missing`. The hard-fail\n * policy still triggers at reservation time when the user actually runs the\n * node — this preview lookup is intentionally lenient.\n */\nexport interface ModelCostsResult {\n data: Record<string, number>\n missing: string[]\n errors: string[]\n}\n\n/**\n * The two browser signals a claim reports — SHA-256 hex digests computed by\n * `@nodaro/sdk/signup-signals` (`collectSignupKeys`). Either may be absent:\n * a browser that cannot be measured still claims, and the server treats the\n * absence as what it is. Any other value is stored as absent server-side.\n */\nexport interface SignupKeys {\n browserKey?: string\n deviceKey?: string\n}\n\n/** The answer of `POST /v1/credits/claim-signup-grant`. */\nexport interface SignupGrantClaimResult {\n /** Where the account's free grant stands after this call. */\n state: FreeGrantState\n /** True only when THIS call moved the credits — a repeat is `false` with the same state. */\n granted: boolean\n}\n\n/**\n * One row of `GET /v1/credits/transactions` — a run's reservation and how it\n * settled.\n *\n * Which amount to read: a run first HOLDS credits and is then settled — charged\n * all or part of the hold, the rest returned. `credits_charged` is what the run\n * cost (`null` while the hold is still open, `0` once refunded); sum it for\n * spend. `credits_reserved` is the hold, which never changes. `credits_used`\n * is the same hold under its original name, kept for existing integrations.\n */\nexport interface CreditTransaction {\n id: string\n /** ISO-8601. Also the paging cursor: pass the last row's value as `cursor`. */\n created_at: string\n /** Settled charge; `null` while `status` is `\"reserved\"`, `0` when refunded. */\n credits_charged: number | null\n /** The hold taken when the run was accepted. */\n credits_reserved: number | null\n /** The hold, under its original name. Prefer `credits_charged`. */\n credits_used: number | null\n /** The model or operation the credits were for. */\n action: string | null\n provider: string | null\n /** Reservation lifecycle: `\"reserved\"`, `\"committed\"` or `\"refunded\"`. */\n status: string | null\n /** The caller's own billing details for the run (model, which pool paid, …). */\n metadata: Record<string, unknown>\n /** `\"workspace\"` when a class or team budget paid, not your balance. */\n payer: \"user\" | \"workspace\"\n workspaceId: string | null\n}\n\n/** A page of {@link CreditTransaction}s, newest first. */\nexport interface CreditTransactionsPage {\n data: CreditTransaction[]\n /** Pass as `cursor` for the next page; `null` when there are no more rows. */\n nextCursor: string | null\n}\n\nexport interface CreditTransactionsOptions {\n /** Rows per page, 1–50 (server default 20). */\n limit?: number\n /** The `nextCursor` of the previous page. */\n cursor?: string\n}\n\n/** Max identifiers per `model-costs` batch — the route caps the request at 50. */\nconst MODEL_COSTS_LIMIT = 50\n\nexport class CreditsResource {\n constructor(private client: NodaroClientCore) {}\n\n /**\n * `GET /v1/user/credits` → the authenticated user's credit balance and tier\n * info. Throws `UnauthorizedError` (401) when signed out, and the SDK's\n * other typed errors on the usual statuses.\n */\n async balance(): Promise<UserBalance> {\n const res = await this.client.request<{ data: UserBalance }>(\n \"GET\",\n \"/v1/user/credits\",\n )\n return res.data\n }\n\n /**\n * `GET /v1/credits/transactions` → one page of the caller's credit\n * transactions, newest first, with `nextCursor` for the next page (`null`\n * at the end). Read `credits_charged` for what each run cost — it can be\n * below the hold (`credits_reserved`) and is `null` while the hold is open.\n * Cloud-only route: a self-hosted instance answers 404.\n */\n transactions(options: CreditTransactionsOptions = {}): Promise<CreditTransactionsPage> {\n return this.client.request<CreditTransactionsPage>(\"GET\", \"/v1/credits/transactions\", {\n query: { limit: options.limit, cursor: options.cursor },\n })\n }\n\n /**\n * `POST /v1/credits/model-costs` → per-identifier credit cost, for editor\n * cost previews. Capped at the first {@link MODEL_COSTS_LIMIT} identifiers\n * (the route's request limit). Preserves the `{ data, missing, errors }`\n * fault-isolation shape verbatim (see {@link ModelCostsResult}).\n */\n modelCosts(ids: string[]): Promise<ModelCostsResult> {\n return this.client.request<ModelCostsResult>(\"POST\", \"/v1/credits/model-costs\", {\n body: { models: ids.slice(0, MODEL_COSTS_LIMIT) },\n })\n }\n\n /**\n * `POST /v1/credits/claim-signup-grant` → claims the account's free signup\n * grant, once, with the browser signals of the page making the claim.\n *\n * Call it once per page load as soon as the session is known, and never\n * wait on it for rendering: it is idempotent (a decided account answers\n * with its state and `granted: false`), it costs the user nothing when it\n * fails (the next load asks again), and the signals are what make the\n * claim worth sending — collect them with `collectSignupKeys()` from\n * `@nodaro/sdk/signup-signals` and pass whatever came back, `{}` included.\n * Cloud-only route: a self-hosted instance answers 404.\n */\n claimSignupGrant(keys: SignupKeys = {}): Promise<SignupGrantClaimResult> {\n return this.client.request<SignupGrantClaimResult>(\"POST\", \"/v1/credits/claim-signup-grant\", {\n body: keys,\n })\n }\n\n /**\n * `POST /v1/credits/welcome-offer/claim` → the user's \"yes\" to the welcome\n * offer, as ONE server action: the marketing-email consent is recorded,\n * then the free signup grant is claimed with that consent. The abuse gate\n * still decides — consent is necessary, not sufficient — so read `grant`:\n * `\"granted\"` (the grant has landed: this call topped the subscription credits up to `credits` — not added on top — or it had landed before), `\"withheld\"` (refused), `\"revoked\"` (taken back earlier; nothing moves), `\"unclaimed\"` (nothing moved — treat as a failure and let the user retry).\n * Pass the browser signals from `collectSignupKeys()` and your app's slug.\n *\n * **Browser session only.** Usable from a first-party web app signed in\n * with a Supabase session (the consent is a person's choice in a browser);\n * an API key or OAuth app token is refused with 403. 409\n * `welcome_offer_disabled` while the deployment has the offer off — show\n * it only when `balance().welcomeOffer` is present. Cloud-only route: a\n * self-hosted instance answers 404.\n */\n claimWelcomeOffer(input: WelcomeOfferClaimInput = {}): Promise<WelcomeOfferClaimResult> {\n return this.client.request<WelcomeOfferClaimResult>(\"POST\", \"/v1/credits/welcome-offer/claim\", {\n body: input,\n })\n }\n\n /**\n * `POST /v1/credits/welcome-offer/seen` → records that the one-time welcome\n * popup was shown, so `balance().welcomeOffer.popupSeen` turns true on every\n * app. Idempotent (the first stamp wins); a failed call only means the popup\n * may show once more, so callers usually ignore errors.\n *\n * **Browser session only**, like {@link claimWelcomeOffer}: 403 for an API\n * key or OAuth app token, 409 `welcome_offer_disabled` while the offer is\n * off, 404 on a self-hosted instance.\n */\n markWelcomeOfferSeen(): Promise<WelcomeOfferSeenResult> {\n return this.client.request<WelcomeOfferSeenResult>(\"POST\", \"/v1/credits/welcome-offer/seen\")\n }\n\n // NOTE: no `estimate(...)` helper. The backend exposes\n // `POST /v1/credits/estimate-workflow` (body `{ nodes }` → `{ data: {\n // totalCredits, nodeCount } }`), but no consumer has a settled shape for it\n // yet (studio pre-checks `balance >= Σ modelCosts` client-side rather than\n // calling an estimate endpoint). Adding it now would be inventing an API\n // surface ahead of a real caller, so it's deliberately omitted — add it when\n // a consumer needs it, shaped to that need.\n}\n"]}