@nodaro/sdk 2.51.0 → 2.52.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 (45) hide show
  1. package/dist/{chunk-HPSENMVN.cjs → chunk-AY7XKACE.cjs} +10 -6
  2. package/dist/chunk-AY7XKACE.cjs.map +1 -0
  3. package/dist/{chunk-OMX7JBGY.cjs → chunk-FDTE4C5W.cjs} +3 -3
  4. package/dist/{chunk-OMX7JBGY.cjs.map → chunk-FDTE4C5W.cjs.map} +1 -1
  5. package/dist/chunk-ISKOLJJJ.cjs +4 -0
  6. package/dist/chunk-ISKOLJJJ.cjs.map +1 -0
  7. package/dist/chunk-K6BWJ7ZY.js +3 -0
  8. package/dist/chunk-K6BWJ7ZY.js.map +1 -0
  9. package/dist/chunk-LR5TGCJP.js +31 -0
  10. package/dist/chunk-LR5TGCJP.js.map +1 -0
  11. package/dist/{chunk-XISHBW5I.js → chunk-NFVYOMNV.js} +3 -3
  12. package/dist/{chunk-XISHBW5I.js.map → chunk-NFVYOMNV.js.map} +1 -1
  13. package/dist/{chunk-6FZN3QQO.cjs → chunk-TVPYDC5T.cjs} +2 -2
  14. package/dist/chunk-TVPYDC5T.cjs.map +1 -0
  15. package/dist/chunk-UIDVH3GP.cjs +33 -0
  16. package/dist/chunk-UIDVH3GP.cjs.map +1 -0
  17. package/dist/{chunk-EC6MC46Y.js → chunk-WUVTKMAQ.js} +8 -4
  18. package/dist/chunk-WUVTKMAQ.js.map +1 -0
  19. package/dist/{chunk-WYYDWJFF.js → chunk-ZVKEPVDQ.js} +2 -2
  20. package/dist/chunk-ZVKEPVDQ.js.map +1 -0
  21. package/dist/entries/billing.cjs +2 -2
  22. package/dist/entries/billing.d.cts +7 -0
  23. package/dist/entries/billing.d.ts +7 -0
  24. package/dist/entries/billing.js +1 -1
  25. package/dist/entries/client.cjs +9 -8
  26. package/dist/entries/client.d.cts +3 -0
  27. package/dist/entries/client.d.ts +3 -0
  28. package/dist/entries/client.js +4 -3
  29. package/dist/entries/core.cjs +5 -5
  30. package/dist/entries/core.js +1 -1
  31. package/dist/entries/user-settings.cjs +13 -0
  32. package/dist/entries/user-settings.cjs.map +1 -0
  33. package/dist/entries/user-settings.d.cts +115 -0
  34. package/dist/entries/user-settings.d.ts +115 -0
  35. package/dist/entries/user-settings.js +4 -0
  36. package/dist/entries/user-settings.js.map +1 -0
  37. package/dist/index.cjs +16 -10
  38. package/dist/index.d.cts +1 -0
  39. package/dist/index.d.ts +1 -0
  40. package/dist/index.js +5 -3
  41. package/package.json +6 -1
  42. package/dist/chunk-6FZN3QQO.cjs.map +0 -1
  43. package/dist/chunk-EC6MC46Y.js.map +0 -1
  44. package/dist/chunk-HPSENMVN.cjs.map +0 -1
  45. package/dist/chunk-WYYDWJFF.js.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/client.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4DO,IAAM,YAAA,GAAN,MAAM,aAAA,SAAqB,gBAAA,CAAiB;AAAA,EACxC,SAAA;AAAA,EACA,QAAA;AAAA;AAAA,EAEA,QAAA;AAAA;AAAA,EAEA,KAAA;AAAA,EACA,IAAA;AAAA,EACA,QAAA;AAAA,EACA,UAAA;AAAA,EACA,KAAA;AAAA,EACA,OAAA;AAAA,EACA,aAAA;AAAA,EACA,KAAA;AAAA;AAAA,EAEA,QAAA;AAAA,EACA,IAAA;AAAA,EACA,UAAA;AAAA,EACA,SAAA;AAAA,EACA,OAAA;AAAA,EACA,SAAA;AAAA,EACA,SAAA;AAAA,EACA,MAAA;AAAA,EACA,YAAA;AAAA,EACA,MAAA;AAAA,EACA,GAAA;AAAA,EACA,KAAA;AAAA,EACA,KAAA;AAAA,EACA,OAAA;AAAA;AAAA,EAEA,YAAA;AAAA;AAAA,EAEA,OAAA;AAAA,EACA,OAAA;AAAA,EACA,OAAA;AAAA;AAAA,EAEA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AAI,iBAAA,CAAkB,IAAI,CAAA;AAC3C,IAAA,IAAA,CAAK,aAAA,GAAgB,IAAI,qBAAA,CAAsB,IAAI,CAAA;AACnD,IAAA,IAAA,CAAK,UAAA,GAAa,IAAI,kBAAA,CAAmB,IAAI,CAAA;AAC7C,IAAA,IAAA,CAAK,IAAA,GAAO,IAAI,YAAA,CAAa,IAAI,CAAA;AAAA,EACnC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAaA,cAAc,WAAA,EAA0C;AAMtD,IAAA,MAAM,aAAA,GAAgB,KAAK,eAAe,CAAA;AAC1C,IAAA,OAAO,IAAI,aAAA,CAAa;AAAA,MACtB,SAAS,IAAA,CAAK,OAAA;AAAA,MACd,MAAM,IAAA,CAAK,IAAA;AAAA,MACX,WAAW,IAAA,CAAK,SAAA;AAAA,MAChB,GAAI,aAAA,GAAgB,EAAE,KAAA,EAAO,aAAA,KAAkB,EAAC;AAAA,MAChD,GAAI,KAAK,kBAAkB,CAAA,GAAI,EAAE,WAAA,EAAa,IAAA,CAAK,WAAA,EAAY,GAAI,EAAC;AAAA,MACpE,GAAI,WAAA,GAAc,EAAE,WAAA,KAAgB;AAAC,KACtC,CAAA;AAAA,EACH;AACF;AAGO,SAAS,aAAa,IAAA,EAAmC;AAC9D,EAAA,OAAO,IAAI,aAAa,IAAI,CAAA;AAC9B","file":"chunk-WUVTKMAQ.js","sourcesContent":["import { WorkflowsResource } from \"./resources/workflows.js\"\nimport { ProjectsResource } from \"./resources/projects.js\"\nimport { SessionsResource } from \"./resources/sessions.js\"\nimport { TrashResource } from \"./resources/trash.js\"\nimport { JobsResource } from \"./resources/jobs.js\"\nimport { VideoProResource } from \"./resources/video-pro.js\"\nimport { ExecutionsResource } from \"./resources/executions.js\"\nimport { NodesResource } from \"./resources/nodes.js\"\nimport { Scene3DResource } from \"./resources/scene3d.js\"\nimport { DeveloperAppsResource } from \"./resources/developer-apps.js\"\nimport { OAuthResource } from \"./resources/oauth.js\"\nimport { WebhooksResource } from \"./resources/webhooks.js\"\nimport { AppsResource } from \"./resources/apps.js\"\nimport { CharactersResource } from \"./resources/characters.js\"\nimport { LocationsResource } from \"./resources/locations.js\"\nimport { ObjectsResource } from \"./resources/objects.js\"\nimport { CreaturesResource } from \"./resources/creatures.js\"\nimport { PipelinesResource } from \"./resources/pipelines.js\"\nimport { ReduceResource } from \"./resources/reduce.js\"\nimport { PromptHelperResource } from \"./resources/prompt-helper.js\"\nimport { VoicesResource } from \"./resources/voices.js\"\nimport { LlmResource } from \"./resources/llm.js\"\nimport { MediaResource } from \"./resources/media.js\"\nimport { AudioResource } from \"./resources/audio.js\"\nimport { CreditsResource } from \"./resources/credits.js\"\nimport { BillingResource } from \"./resources/billing.js\"\nimport { UserSettingsResource } from \"./resources/user-settings.js\"\nimport { UploadsResource } from \"./resources/uploads.js\"\nimport { LibraryResource } from \"./resources/library.js\"\nimport { GalleryResource } from \"./resources/gallery.js\"\nimport { PresetsResource } from \"./resources/node-presets.js\"\nimport { SavedPostsResource } from \"./resources/saved-posts.js\"\nimport { CollectionsResource } from \"./resources/collections.js\"\nimport { PalettesResource } from \"./resources/palettes.js\"\nimport { MoodboardsResource } from \"./resources/moodboards.js\"\nimport { CompetitorsResource } from \"./resources/competitors.js\"\nimport { PickerCatalogsResource } from \"./resources/picker-catalogs.js\"\nimport { CatalogsResource } from \"./resources/catalogs.js\"\nimport { ModelsResource } from \"./resources/models.js\"\nimport { ShotsResource } from \"./resources/shots.js\"\nimport { RecastResource } from \"./resources/recast.js\"\nimport { CastSwapResource } from \"./resources/cast-swap.js\"\nimport { TrendsResource } from \"./resources/trends.js\"\nimport { StudioResource } from \"./resources/studio.js\"\nimport { CopilotResource } from \"./resources/copilot.js\"\nimport { CommunityResource } from \"./resources/community.js\"\nimport { TemplatesResource } from \"./resources/templates.js\"\nimport { TutorialsResource } from \"./resources/tutorials.js\"\nimport { OrganizationsResource } from \"./resources/organizations.js\"\nimport { WorkspacesResource } from \"./resources/workspaces.js\"\nimport { EditResource } from \"./resources/edit.js\"\nimport { NodaroClientCore, type ClientOptions } from \"./core.js\"\n\nexport { CLIENT_HEADER } from \"./core.js\"\nexport type { ClientOptions, UserIdentity, ConnectedApp } from \"./core.js\"\n\n/**\n * The full client: the core (`./core.ts` — config, transport, identity) and\n * every resource.\n */\nexport class NodaroClient extends NodaroClientCore {\n readonly workflows: WorkflowsResource\n readonly projects: ProjectsResource\n /** Generation sessions inside projects (Create Image / Video / Music). */\n readonly sessions: SessionsResource\n /** Your Trash: items removed from sessions and deleted jobs. */\n readonly trash: TrashResource\n readonly jobs: JobsResource\n readonly videoPro: VideoProResource\n readonly executions: ExecutionsResource\n readonly nodes: NodesResource\n readonly scene3d: Scene3DResource\n readonly developerApps: DeveloperAppsResource\n readonly oauth: OAuthResource\n /** Outbound webhooks: endpoints that receive your job.completed / job.failed. */\n readonly webhooks: WebhooksResource\n readonly apps: AppsResource\n readonly characters: CharactersResource\n readonly locations: LocationsResource\n readonly objects: ObjectsResource\n readonly creatures: CreaturesResource\n readonly pipelines: PipelinesResource\n readonly reduce: ReduceResource\n readonly promptHelper: PromptHelperResource\n readonly voices: VoicesResource\n readonly llm: LlmResource\n readonly media: MediaResource\n readonly audio: AudioResource\n readonly credits: CreditsResource\n /** The signed-in person's own settings (the interface language, the monthly statement opt-in, …). */\n readonly userSettings: UserSettingsResource\n /** Plans and prices, the subscription, and how this deployment bills. */\n readonly billing: BillingResource\n readonly uploads: UploadsResource\n readonly library: LibraryResource\n /** The public gallery and your favorites. */\n readonly gallery: GalleryResource\n readonly presets: PresetsResource\n readonly savedPosts: SavedPostsResource\n readonly collections: CollectionsResource\n /** Your colour palettes — a generate-image direction (`direction.colorLook: paletteDirectionId(id)`). */\n readonly palettes: PalettesResource\n /** Your moodboards — a generate-image direction (`direction.style: moodboardDirectionId(id)`). */\n readonly moodboards: MoodboardsResource\n readonly competitors: CompetitorsResource\n readonly pickerCatalogs: PickerCatalogsResource\n readonly catalogs: CatalogsResource\n readonly models: ModelsResource\n readonly shots: ShotsResource\n readonly recast: RecastResource\n /** Cast Swap: replace the people and/or location in a short video (Cloud). */\n readonly castSwap: CastSwapResource\n /** Trends: ready-made Cast Swap recipes you fill with your own pictures (Cloud). */\n readonly trends: TrendsResource\n readonly studio: StudioResource\n readonly copilot: CopilotResource\n readonly community: CommunityResource\n readonly templates: TemplatesResource\n readonly tutorials: TutorialsResource\n readonly organizations: OrganizationsResource\n readonly workspaces: WorkspacesResource\n readonly edit: EditResource\n\n constructor(opts: ClientOptions) {\n super(opts)\n\n this.workflows = new WorkflowsResource(this)\n this.projects = new ProjectsResource(this)\n this.sessions = new SessionsResource(this)\n this.trash = new TrashResource(this)\n this.jobs = new JobsResource(this)\n this.videoPro = new VideoProResource(this)\n this.executions = new ExecutionsResource(this)\n this.nodes = new NodesResource(this)\n this.scene3d = new Scene3DResource(this)\n this.developerApps = new DeveloperAppsResource(this)\n this.oauth = new OAuthResource(this)\n this.webhooks = new WebhooksResource(this)\n this.apps = new AppsResource(this)\n this.characters = new CharactersResource(this)\n this.locations = new LocationsResource(this)\n this.objects = new ObjectsResource(this)\n this.creatures = new CreaturesResource(this)\n this.pipelines = new PipelinesResource(this)\n this.reduce = new ReduceResource(this)\n this.promptHelper = new PromptHelperResource(this)\n this.voices = new VoicesResource(this)\n this.llm = new LlmResource(this)\n this.media = new MediaResource(this)\n this.audio = new AudioResource(this)\n this.credits = new CreditsResource(this)\n this.userSettings = new UserSettingsResource(this)\n this.billing = new BillingResource(this)\n this.uploads = new UploadsResource(this)\n this.library = new LibraryResource(this)\n this.gallery = new GalleryResource(this)\n this.presets = new PresetsResource(this)\n this.savedPosts = new SavedPostsResource(this)\n this.collections = new CollectionsResource(this)\n this.palettes = new PalettesResource(this)\n this.moodboards = new MoodboardsResource(this)\n this.competitors = new CompetitorsResource(this)\n this.pickerCatalogs = new PickerCatalogsResource(this)\n this.catalogs = new CatalogsResource(this)\n this.models = new ModelsResource(this)\n this.shots = new ShotsResource(this)\n this.recast = new RecastResource(this)\n this.castSwap = new CastSwapResource(this)\n this.trends = new TrendsResource(this)\n this.studio = new StudioResource(this)\n this.copilot = new CopilotResource(this)\n this.community = new CommunityResource(this)\n this.templates = new TemplatesResource(this)\n this.tutorials = new TutorialsResource(this)\n this.organizations = new OrganizationsResource(this)\n this.workspaces = new WorkspacesResource(this)\n this.edit = new EditResource(this)\n }\n\n /**\n * A client that acts in `workspaceId`, sharing this one's auth and config.\n *\n * A NEW client rather than a setter, deliberately. A mutable selection is\n * the bug this whole axis exists to prevent: two concurrent operations\n * against one client would race over which workspace they were in, and the\n * loser would create work in the wrong place with nothing failing. A\n * per-workspace client cannot be raced.\n *\n * Pass `null` for the personal space.\n */\n withWorkspace(workspaceId: string | null): NodaroClient {\n // The two private settings are read by bracket access, which TypeScript\n // allows on a subclass and which adds no member to the declarations. Read\n // through `this` (not a side table keyed by the instance), so a client\n // wrapped in a Proxy (Vue/Pinia `reactive()`) or reached through\n // `Object.create(client)` still works.\n const fetchOverride = this[\"fetchOverride\"]\n return new NodaroClient({\n baseUrl: this.baseUrl,\n auth: this.auth,\n timeoutMs: this.timeoutMs,\n ...(fetchOverride ? { fetch: fetchOverride } : {}),\n ...(this[\"sendClientHeader\"] ? { clientLabel: this.clientLabel } : {}),\n ...(workspaceId ? { workspaceId } : {}),\n })\n }\n}\n\n/** Factory function — preferred entry point. */\nexport function createClient(opts: ClientOptions): NodaroClient {\n return new NodaroClient(opts)\n}\n"]}
@@ -140,5 +140,5 @@ var BillingResource = class {
140
140
  };
141
141
 
142
142
  export { BillingResource };
143
- //# sourceMappingURL=chunk-WYYDWJFF.js.map
144
- //# sourceMappingURL=chunk-WYYDWJFF.js.map
143
+ //# sourceMappingURL=chunk-ZVKEPVDQ.js.map
144
+ //# sourceMappingURL=chunk-ZVKEPVDQ.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/resources/billing.ts"],"names":[],"mappings":";AAsLO,IAAM,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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,EASA,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-ZVKEPVDQ.js","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 /** How many nodes of one workflow run at once. */\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. `ForbiddenError` with the code\n * `self_serve_disabled` on a deployment that does not sell to its users.\n * **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 * prorated by Stripe; the new tier applies at once. `NotFoundError` with no\n * active subscription; `400` on a pack's price or the current one.\n * **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"]}
@@ -1,13 +1,13 @@
1
1
  'use strict';
2
2
 
3
3
  require('../chunk-IS26FJO7.cjs');
4
- var chunk6FZN3QQO_cjs = require('../chunk-6FZN3QQO.cjs');
4
+ var chunkTVPYDC5T_cjs = require('../chunk-TVPYDC5T.cjs');
5
5
 
6
6
 
7
7
 
8
8
  Object.defineProperty(exports, "BillingResource", {
9
9
  enumerable: true,
10
- get: function () { return chunk6FZN3QQO_cjs.BillingResource; }
10
+ get: function () { return chunkTVPYDC5T_cjs.BillingResource; }
11
11
  });
12
12
  //# sourceMappingURL=billing.cjs.map
13
13
  //# sourceMappingURL=billing.cjs.map
@@ -25,11 +25,15 @@ interface BillingPriceCredits {
25
25
  }
26
26
  /** A monthly price, and what it grants. */
27
27
  interface BillingMonthlyPrice extends BillingMoney {
28
+ /** 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. */
29
+ priceId: string;
28
30
  /** `null` when the price does not state it. */
29
31
  credits: BillingPriceCredits | null;
30
32
  }
31
33
  /** A yearly price, what it comes to per month, and what it grants. */
32
34
  interface BillingYearlyPrice extends BillingMoney {
35
+ /** 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. */
36
+ priceId: string;
33
37
  /** The yearly amount spread over the months it pays for; `null` when that cannot be said. */
34
38
  perMonth: number | null;
35
39
  /** What the price grants — the plan's credits every month, as a monthly price; `null` when the price does not state it. */
@@ -56,10 +60,13 @@ interface BillingPlan {
56
60
  }
57
61
  /** A credit pack: this many credits for this price. */
58
62
  interface BillingTopUp {
63
+ /** The pack's own id (`"topup-25"`), not a Stripe id. */
59
64
  id: string;
60
65
  credits: number;
61
66
  /** `null` when the pack's price cannot be stated right now: show it as unavailable. */
62
67
  price: BillingMoney | null;
68
+ /** 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}. */
69
+ priceId: string | null;
63
70
  }
64
71
  /** The answer of `GET /v1/billing/plans`. */
65
72
  interface BillingPlansResult {
@@ -25,11 +25,15 @@ interface BillingPriceCredits {
25
25
  }
26
26
  /** A monthly price, and what it grants. */
27
27
  interface BillingMonthlyPrice extends BillingMoney {
28
+ /** 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. */
29
+ priceId: string;
28
30
  /** `null` when the price does not state it. */
29
31
  credits: BillingPriceCredits | null;
30
32
  }
31
33
  /** A yearly price, what it comes to per month, and what it grants. */
32
34
  interface BillingYearlyPrice extends BillingMoney {
35
+ /** 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. */
36
+ priceId: string;
33
37
  /** The yearly amount spread over the months it pays for; `null` when that cannot be said. */
34
38
  perMonth: number | null;
35
39
  /** What the price grants — the plan's credits every month, as a monthly price; `null` when the price does not state it. */
@@ -56,10 +60,13 @@ interface BillingPlan {
56
60
  }
57
61
  /** A credit pack: this many credits for this price. */
58
62
  interface BillingTopUp {
63
+ /** The pack's own id (`"topup-25"`), not a Stripe id. */
59
64
  id: string;
60
65
  credits: number;
61
66
  /** `null` when the pack's price cannot be stated right now: show it as unavailable. */
62
67
  price: BillingMoney | null;
68
+ /** 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}. */
69
+ priceId: string | null;
63
70
  }
64
71
  /** The answer of `GET /v1/billing/plans`. */
65
72
  interface BillingPlansResult {
@@ -1,4 +1,4 @@
1
1
  import '../chunk-M6Y5TOYE.js';
2
- export { BillingResource } from '../chunk-WYYDWJFF.js';
2
+ export { BillingResource } from '../chunk-ZVKEPVDQ.js';
3
3
  //# sourceMappingURL=billing.js.map
4
4
  //# sourceMappingURL=billing.js.map
@@ -1,7 +1,8 @@
1
1
  'use strict';
2
2
 
3
- var chunkHPSENMVN_cjs = require('../chunk-HPSENMVN.cjs');
3
+ var chunkAY7XKACE_cjs = require('../chunk-AY7XKACE.cjs');
4
4
  require('../chunk-JTOEHQQJ.cjs');
5
+ require('../chunk-UIDVH3GP.cjs');
5
6
  require('../chunk-W5VHATSR.cjs');
6
7
  require('../chunk-R63TTR35.cjs');
7
8
  require('../chunk-3B47IHB3.cjs');
@@ -43,14 +44,14 @@ require('../chunk-43FVH6LJ.cjs');
43
44
  require('../chunk-YFS2LMG4.cjs');
44
45
  require('../chunk-OSMKIRKI.cjs');
45
46
  require('../chunk-FRQJNGJS.cjs');
46
- var chunkOMX7JBGY_cjs = require('../chunk-OMX7JBGY.cjs');
47
+ var chunkFDTE4C5W_cjs = require('../chunk-FDTE4C5W.cjs');
47
48
  require('../chunk-FM2KM5TY.cjs');
48
49
  require('../chunk-HGCVWOGK.cjs');
49
50
  require('../chunk-4BAHF762.cjs');
50
51
  require('../chunk-A3S55XGF.cjs');
51
52
  require('../chunk-JOXZ4ZIF.cjs');
52
53
  require('../chunk-GA4LZZKQ.cjs');
53
- require('../chunk-6FZN3QQO.cjs');
54
+ require('../chunk-TVPYDC5T.cjs');
54
55
  require('../chunk-TY2S25W5.cjs');
55
56
  require('../chunk-BPWUWUZ3.cjs');
56
57
  require('../chunk-HAKYPZLB.cjs');
@@ -59,23 +60,23 @@ require('../chunk-HAKYPZLB.cjs');
59
60
 
60
61
  Object.defineProperty(exports, "NodaroClient", {
61
62
  enumerable: true,
62
- get: function () { return chunkHPSENMVN_cjs.NodaroClient; }
63
+ get: function () { return chunkAY7XKACE_cjs.NodaroClient; }
63
64
  });
64
65
  Object.defineProperty(exports, "createClient", {
65
66
  enumerable: true,
66
- get: function () { return chunkHPSENMVN_cjs.createClient; }
67
+ get: function () { return chunkAY7XKACE_cjs.createClient; }
67
68
  });
68
69
  Object.defineProperty(exports, "CallbackAuth", {
69
70
  enumerable: true,
70
- get: function () { return chunkOMX7JBGY_cjs.CallbackAuth; }
71
+ get: function () { return chunkFDTE4C5W_cjs.CallbackAuth; }
71
72
  });
72
73
  Object.defineProperty(exports, "StaticTokenAuth", {
73
74
  enumerable: true,
74
- get: function () { return chunkOMX7JBGY_cjs.StaticTokenAuth; }
75
+ get: function () { return chunkFDTE4C5W_cjs.StaticTokenAuth; }
75
76
  });
76
77
  Object.defineProperty(exports, "supabaseAuth", {
77
78
  enumerable: true,
78
- get: function () { return chunkOMX7JBGY_cjs.supabaseAuth; }
79
+ get: function () { return chunkFDTE4C5W_cjs.supabaseAuth; }
79
80
  });
80
81
  //# sourceMappingURL=client.cjs.map
81
82
  //# sourceMappingURL=client.cjs.map
@@ -25,6 +25,7 @@ import { MediaResource } from './media.cjs';
25
25
  import { AudioResource } from './audio.cjs';
26
26
  import { CreditsResource } from './credits.cjs';
27
27
  import { BillingResource } from './billing.cjs';
28
+ import { UserSettingsResource } from './user-settings.cjs';
28
29
  import { UploadsResource } from './uploads.cjs';
29
30
  import { LibraryResource } from './library.cjs';
30
31
  import { GalleryResource } from './gallery.cjs';
@@ -105,6 +106,8 @@ declare class NodaroClient extends NodaroClientCore {
105
106
  readonly media: MediaResource;
106
107
  readonly audio: AudioResource;
107
108
  readonly credits: CreditsResource;
109
+ /** The signed-in person's own settings (the interface language, the monthly statement opt-in, …). */
110
+ readonly userSettings: UserSettingsResource;
108
111
  /** Plans and prices, the subscription, and how this deployment bills. */
109
112
  readonly billing: BillingResource;
110
113
  readonly uploads: UploadsResource;
@@ -25,6 +25,7 @@ import { MediaResource } from './media.js';
25
25
  import { AudioResource } from './audio.js';
26
26
  import { CreditsResource } from './credits.js';
27
27
  import { BillingResource } from './billing.js';
28
+ import { UserSettingsResource } from './user-settings.js';
28
29
  import { UploadsResource } from './uploads.js';
29
30
  import { LibraryResource } from './library.js';
30
31
  import { GalleryResource } from './gallery.js';
@@ -105,6 +106,8 @@ declare class NodaroClient extends NodaroClientCore {
105
106
  readonly media: MediaResource;
106
107
  readonly audio: AudioResource;
107
108
  readonly credits: CreditsResource;
109
+ /** The signed-in person's own settings (the interface language, the monthly statement opt-in, …). */
110
+ readonly userSettings: UserSettingsResource;
108
111
  /** Plans and prices, the subscription, and how this deployment bills. */
109
112
  readonly billing: BillingResource;
110
113
  readonly uploads: UploadsResource;
@@ -1,5 +1,6 @@
1
- export { NodaroClient, createClient } from '../chunk-EC6MC46Y.js';
1
+ export { NodaroClient, createClient } from '../chunk-WUVTKMAQ.js';
2
2
  import '../chunk-WY4QRJZW.js';
3
+ import '../chunk-LR5TGCJP.js';
3
4
  import '../chunk-ERLXU47J.js';
4
5
  import '../chunk-T7N7DFQJ.js';
5
6
  import '../chunk-YN6CBIIB.js';
@@ -41,14 +42,14 @@ import '../chunk-SFB4YLCS.js';
41
42
  import '../chunk-BU5A6K4C.js';
42
43
  import '../chunk-D2ILCSOQ.js';
43
44
  import '../chunk-7CUWAVWB.js';
44
- export { CallbackAuth, StaticTokenAuth, supabaseAuth } from '../chunk-XISHBW5I.js';
45
+ export { CallbackAuth, StaticTokenAuth, supabaseAuth } from '../chunk-NFVYOMNV.js';
45
46
  import '../chunk-L6T44A3G.js';
46
47
  import '../chunk-CK3AMMSC.js';
47
48
  import '../chunk-7QK2NXJA.js';
48
49
  import '../chunk-65E3JBFZ.js';
49
50
  import '../chunk-7LODCIQK.js';
50
51
  import '../chunk-3QFTP5P5.js';
51
- import '../chunk-WYYDWJFF.js';
52
+ import '../chunk-ZVKEPVDQ.js';
52
53
  import '../chunk-OCRUDBPG.js';
53
54
  import '../chunk-KG4R454Z.js';
54
55
  import '../chunk-EJSGJDZY.js';
@@ -1,26 +1,26 @@
1
1
  'use strict';
2
2
 
3
3
  require('../chunk-X7XP5WBP.cjs');
4
- var chunkOMX7JBGY_cjs = require('../chunk-OMX7JBGY.cjs');
4
+ var chunkFDTE4C5W_cjs = require('../chunk-FDTE4C5W.cjs');
5
5
  require('../chunk-FM2KM5TY.cjs');
6
6
 
7
7
 
8
8
 
9
9
  Object.defineProperty(exports, "CallbackAuth", {
10
10
  enumerable: true,
11
- get: function () { return chunkOMX7JBGY_cjs.CallbackAuth; }
11
+ get: function () { return chunkFDTE4C5W_cjs.CallbackAuth; }
12
12
  });
13
13
  Object.defineProperty(exports, "NodaroClientCore", {
14
14
  enumerable: true,
15
- get: function () { return chunkOMX7JBGY_cjs.NodaroClientCore; }
15
+ get: function () { return chunkFDTE4C5W_cjs.NodaroClientCore; }
16
16
  });
17
17
  Object.defineProperty(exports, "StaticTokenAuth", {
18
18
  enumerable: true,
19
- get: function () { return chunkOMX7JBGY_cjs.StaticTokenAuth; }
19
+ get: function () { return chunkFDTE4C5W_cjs.StaticTokenAuth; }
20
20
  });
21
21
  Object.defineProperty(exports, "supabaseAuth", {
22
22
  enumerable: true,
23
- get: function () { return chunkOMX7JBGY_cjs.supabaseAuth; }
23
+ get: function () { return chunkFDTE4C5W_cjs.supabaseAuth; }
24
24
  });
25
25
  //# sourceMappingURL=core.cjs.map
26
26
  //# sourceMappingURL=core.cjs.map
@@ -1,5 +1,5 @@
1
1
  import '../chunk-AUDHV3OE.js';
2
- export { CallbackAuth, NodaroClientCore, StaticTokenAuth, supabaseAuth } from '../chunk-XISHBW5I.js';
2
+ export { CallbackAuth, NodaroClientCore, StaticTokenAuth, supabaseAuth } from '../chunk-NFVYOMNV.js';
3
3
  import '../chunk-L6T44A3G.js';
4
4
  //# sourceMappingURL=core.js.map
5
5
  //# sourceMappingURL=core.js.map
@@ -0,0 +1,13 @@
1
+ 'use strict';
2
+
3
+ require('../chunk-ISKOLJJJ.cjs');
4
+ var chunkUIDVH3GP_cjs = require('../chunk-UIDVH3GP.cjs');
5
+
6
+
7
+
8
+ Object.defineProperty(exports, "UserSettingsResource", {
9
+ enumerable: true,
10
+ get: function () { return chunkUIDVH3GP_cjs.UserSettingsResource; }
11
+ });
12
+ //# sourceMappingURL=user-settings.cjs.map
13
+ //# sourceMappingURL=user-settings.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"user-settings.cjs"}
@@ -0,0 +1,115 @@
1
+ import { N as NodaroClientCore } from '../developer-apps-zSQXWmEG.cjs';
2
+ import '@nodaro/shared/apps';
3
+ import '@nodaro/shared/organizations';
4
+
5
+ /**
6
+ * The signed-in person's own settings — the shape of `GET` / `PATCH
7
+ * /v1/user/settings` (`backend/src/routes/user-settings.ts`, the source of
8
+ * truth: keep these in sync if they change). A first-party app renders the
9
+ * ones it cares about (the monthly statement opt-in on a billing screen, the
10
+ * interface language) and sends back only the fields it changes.
11
+ */
12
+ /** How `{nodeRef}` placeholders render in prompt fields. */
13
+ type VariableDisplayMode = "raw" | "annotated" | "resolved";
14
+ /** What double-clicking a canvas node does. */
15
+ type NodeDoubleClickAction = "zoom" | "settings";
16
+ /** The interface languages Nodaro ships; the server refuses any other value. */
17
+ type UserSettingsLocale = "en" | "es" | "fr" | "de" | "pt-BR" | "ru" | "hi" | "ja" | "ko" | "zh-CN" | "he" | "ar";
18
+ /** One of the person's own Generate Text templates. */
19
+ interface UserTextTemplate {
20
+ id: string;
21
+ /** Up to 80 characters. */
22
+ label: string;
23
+ /** Up to 10,000 characters. */
24
+ systemPrompt: string;
25
+ defaultInput?: string;
26
+ /** 1–16,384. */
27
+ defaultMaxTokens?: number;
28
+ llmModel?: string;
29
+ reasoningEffort?: string;
30
+ fansOut?: boolean;
31
+ requiresImageRef?: boolean;
32
+ }
33
+ /** Per-user MCP defaults, sparse: a key left out keeps its stored value. */
34
+ interface UserMcpPreferences {
35
+ image?: {
36
+ model?: string;
37
+ aspectRatio?: string;
38
+ resolution?: string;
39
+ quality?: string;
40
+ };
41
+ video?: {
42
+ model?: string;
43
+ aspectRatio?: string;
44
+ duration?: number;
45
+ resolution?: string;
46
+ };
47
+ audio?: {
48
+ ttsModel?: string;
49
+ musicModel?: string;
50
+ };
51
+ flows?: {
52
+ enabled?: boolean;
53
+ };
54
+ }
55
+ interface UserSettings {
56
+ /** The stored billing tier (`"free"`, `"basic"`, …). */
57
+ tier: string | null;
58
+ /** Whether generations are visible in the public gallery. */
59
+ publicOutputs: boolean;
60
+ /** Per-template overrides of the system prompts, by template key. */
61
+ promptTemplates: Record<string, string>;
62
+ /** The person's own Generate Text templates. */
63
+ textTemplates: UserTextTemplate[];
64
+ /** The interface language; `null` = the browser's. */
65
+ preferredLocale: UserSettingsLocale | null;
66
+ mcpPreferences: UserMcpPreferences;
67
+ showRecentNodes: boolean;
68
+ showMostUsedNodes: boolean;
69
+ variableDisplayMode: VariableDisplayMode;
70
+ nodeDoubleClickAction: NodeDoubleClickAction;
71
+ /** A statement of last month's credit usage by email on the 1st. Default `false`. */
72
+ monthlyStatementEmail: boolean;
73
+ }
74
+ /**
75
+ * What `update()` sends: only the fields to change. `promptTemplates` and
76
+ * `textTemplates` REPLACE the stored value whole (send the full map or list;
77
+ * a template key the server does not know, or a value equal to the default,
78
+ * is dropped); `mcpPreferences` merges one axis at a time.
79
+ */
80
+ interface UserSettingsPatch {
81
+ /** `false` needs the Standard plan or above on Nodaro Cloud (`ForbiddenError` otherwise). */
82
+ publicOutputs?: boolean;
83
+ promptTemplates?: Record<string, string>;
84
+ /** Up to 100. */
85
+ textTemplates?: UserTextTemplate[];
86
+ preferredLocale?: UserSettingsLocale | null;
87
+ mcpPreferences?: UserMcpPreferences;
88
+ showRecentNodes?: boolean;
89
+ showMostUsedNodes?: boolean;
90
+ variableDisplayMode?: VariableDisplayMode;
91
+ nodeDoubleClickAction?: NodeDoubleClickAction;
92
+ monthlyStatementEmail?: boolean;
93
+ }
94
+ /** What `update()` answers: the settings as saved (without `tier`). */
95
+ type UserSettingsSaved = Omit<UserSettings, "tier">;
96
+ declare class UserSettingsResource {
97
+ private client;
98
+ constructor(client: NodaroClientCore);
99
+ /**
100
+ * `GET /v1/user/settings` → the person's own settings. Throws
101
+ * `UnauthorizedError` (401) when signed out, `NotFoundError` with no
102
+ * profile row.
103
+ */
104
+ get(): Promise<UserSettings>;
105
+ /**
106
+ * `PATCH /v1/user/settings` → changes the fields sent and answers the
107
+ * settings as saved. A `NodaroError` with status 400 names an invalid
108
+ * value (`validation_error`), or says so for a patch with nothing to
109
+ * change; `ForbiddenError` for `publicOutputs: false` below the Standard
110
+ * plan; `NotFoundError` with no profile row.
111
+ */
112
+ update(patch: UserSettingsPatch): Promise<UserSettingsSaved>;
113
+ }
114
+
115
+ export { type NodeDoubleClickAction, type UserMcpPreferences, type UserSettings, type UserSettingsLocale, type UserSettingsPatch, UserSettingsResource, type UserSettingsSaved, type UserTextTemplate, type VariableDisplayMode };
@@ -0,0 +1,115 @@
1
+ import { N as NodaroClientCore } from '../developer-apps-zSQXWmEG.js';
2
+ import '@nodaro/shared/apps';
3
+ import '@nodaro/shared/organizations';
4
+
5
+ /**
6
+ * The signed-in person's own settings — the shape of `GET` / `PATCH
7
+ * /v1/user/settings` (`backend/src/routes/user-settings.ts`, the source of
8
+ * truth: keep these in sync if they change). A first-party app renders the
9
+ * ones it cares about (the monthly statement opt-in on a billing screen, the
10
+ * interface language) and sends back only the fields it changes.
11
+ */
12
+ /** How `{nodeRef}` placeholders render in prompt fields. */
13
+ type VariableDisplayMode = "raw" | "annotated" | "resolved";
14
+ /** What double-clicking a canvas node does. */
15
+ type NodeDoubleClickAction = "zoom" | "settings";
16
+ /** The interface languages Nodaro ships; the server refuses any other value. */
17
+ type UserSettingsLocale = "en" | "es" | "fr" | "de" | "pt-BR" | "ru" | "hi" | "ja" | "ko" | "zh-CN" | "he" | "ar";
18
+ /** One of the person's own Generate Text templates. */
19
+ interface UserTextTemplate {
20
+ id: string;
21
+ /** Up to 80 characters. */
22
+ label: string;
23
+ /** Up to 10,000 characters. */
24
+ systemPrompt: string;
25
+ defaultInput?: string;
26
+ /** 1–16,384. */
27
+ defaultMaxTokens?: number;
28
+ llmModel?: string;
29
+ reasoningEffort?: string;
30
+ fansOut?: boolean;
31
+ requiresImageRef?: boolean;
32
+ }
33
+ /** Per-user MCP defaults, sparse: a key left out keeps its stored value. */
34
+ interface UserMcpPreferences {
35
+ image?: {
36
+ model?: string;
37
+ aspectRatio?: string;
38
+ resolution?: string;
39
+ quality?: string;
40
+ };
41
+ video?: {
42
+ model?: string;
43
+ aspectRatio?: string;
44
+ duration?: number;
45
+ resolution?: string;
46
+ };
47
+ audio?: {
48
+ ttsModel?: string;
49
+ musicModel?: string;
50
+ };
51
+ flows?: {
52
+ enabled?: boolean;
53
+ };
54
+ }
55
+ interface UserSettings {
56
+ /** The stored billing tier (`"free"`, `"basic"`, …). */
57
+ tier: string | null;
58
+ /** Whether generations are visible in the public gallery. */
59
+ publicOutputs: boolean;
60
+ /** Per-template overrides of the system prompts, by template key. */
61
+ promptTemplates: Record<string, string>;
62
+ /** The person's own Generate Text templates. */
63
+ textTemplates: UserTextTemplate[];
64
+ /** The interface language; `null` = the browser's. */
65
+ preferredLocale: UserSettingsLocale | null;
66
+ mcpPreferences: UserMcpPreferences;
67
+ showRecentNodes: boolean;
68
+ showMostUsedNodes: boolean;
69
+ variableDisplayMode: VariableDisplayMode;
70
+ nodeDoubleClickAction: NodeDoubleClickAction;
71
+ /** A statement of last month's credit usage by email on the 1st. Default `false`. */
72
+ monthlyStatementEmail: boolean;
73
+ }
74
+ /**
75
+ * What `update()` sends: only the fields to change. `promptTemplates` and
76
+ * `textTemplates` REPLACE the stored value whole (send the full map or list;
77
+ * a template key the server does not know, or a value equal to the default,
78
+ * is dropped); `mcpPreferences` merges one axis at a time.
79
+ */
80
+ interface UserSettingsPatch {
81
+ /** `false` needs the Standard plan or above on Nodaro Cloud (`ForbiddenError` otherwise). */
82
+ publicOutputs?: boolean;
83
+ promptTemplates?: Record<string, string>;
84
+ /** Up to 100. */
85
+ textTemplates?: UserTextTemplate[];
86
+ preferredLocale?: UserSettingsLocale | null;
87
+ mcpPreferences?: UserMcpPreferences;
88
+ showRecentNodes?: boolean;
89
+ showMostUsedNodes?: boolean;
90
+ variableDisplayMode?: VariableDisplayMode;
91
+ nodeDoubleClickAction?: NodeDoubleClickAction;
92
+ monthlyStatementEmail?: boolean;
93
+ }
94
+ /** What `update()` answers: the settings as saved (without `tier`). */
95
+ type UserSettingsSaved = Omit<UserSettings, "tier">;
96
+ declare class UserSettingsResource {
97
+ private client;
98
+ constructor(client: NodaroClientCore);
99
+ /**
100
+ * `GET /v1/user/settings` → the person's own settings. Throws
101
+ * `UnauthorizedError` (401) when signed out, `NotFoundError` with no
102
+ * profile row.
103
+ */
104
+ get(): Promise<UserSettings>;
105
+ /**
106
+ * `PATCH /v1/user/settings` → changes the fields sent and answers the
107
+ * settings as saved. A `NodaroError` with status 400 names an invalid
108
+ * value (`validation_error`), or says so for a patch with nothing to
109
+ * change; `ForbiddenError` for `publicOutputs: false` below the Standard
110
+ * plan; `NotFoundError` with no profile row.
111
+ */
112
+ update(patch: UserSettingsPatch): Promise<UserSettingsSaved>;
113
+ }
114
+
115
+ export { type NodeDoubleClickAction, type UserMcpPreferences, type UserSettings, type UserSettingsLocale, type UserSettingsPatch, UserSettingsResource, type UserSettingsSaved, type UserTextTemplate, type VariableDisplayMode };
@@ -0,0 +1,4 @@
1
+ import '../chunk-K6BWJ7ZY.js';
2
+ export { UserSettingsResource } from '../chunk-LR5TGCJP.js';
3
+ //# sourceMappingURL=user-settings.js.map
4
+ //# sourceMappingURL=user-settings.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"user-settings.js"}