totalum-sdk 1.5.0 → 1.5.2

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.
package/CHANGELOG.md CHANGED
@@ -20,6 +20,20 @@ regenerated), plus the request each call sends to SDK-API (`compat/requests/*.js
20
20
  - **Dist-tags:** `next` is the newest release; `latest` moves only by a decision at launch. `dev` holds the old
21
21
  `0.1.0-dev.N` prereleases.
22
22
 
23
+ ## 1.5.2 — 2026-09-30
24
+
25
+ ### Changed
26
+
27
+ - `payments.getStatus()`: one internal field is no longer part of the result (SDK-API stopped returning it; nothing in
28
+ an app reads it). The JSDoc of `payments.refunds.create` is shorter. No request changed.
29
+
30
+ ## 1.5.1 — 2026-09-30
31
+
32
+ ### Fixed
33
+
34
+ - The JSDoc of `totalum.web` and `totalum.realtime` (and `totalum-sdk.md`) no longer describe how a price is derived:
35
+ every paid call is billed in credits, reported in `usage.credits`. No type or request changed.
36
+
23
37
  ## 1.5.0 — 2026-09-30
24
38
 
25
39
  ### Added
@@ -97,8 +111,7 @@ regenerated), plus the request each call sends to SDK-API (`compat/requests/*.js
97
111
  (PGM binds `dev` on the preview Worker, `live` on the published one; not sent when unset). SDK-API charges in live
98
112
  mode only from the published site, once the owner onboarded the live Stripe account and switched live on; the
99
113
  preview, the sandbox and apps on older SDKs stay in test mode.
100
- - **`payments.refunds.create({ paymentIntentId, amount?, reason? })`**: a refund on the project's connected account;
101
- Totalum's application fee is refunded with it.
114
+ - **`payments.refunds.create({ paymentIntentId, amount?, reason? })`**: a refund on the project's connected account.
102
115
  - `PaymentsStatus.liveEnabled`: whether the owner switched the published site to live payments.
103
116
 
104
117
  ## 1.1.0 — 2026-09-28
@@ -723,7 +723,6 @@ declare const PaymentsStatus: ZodObject<{
723
723
  pastDue: ZodArray<ZodString>;
724
724
  eventuallyDue: ZodArray<ZodString>;
725
725
  }, $strip>;
726
- applicationFeeBps: ZodInt;
727
726
  liveEnabled: ZodBoolean;
728
727
  disconnectedAt: ZodOptional<ZodNullable<ZodISODateTime>>;
729
728
  }, $strip>;
@@ -821,8 +820,8 @@ declare const CustomerPortalLinkOutput: ZodObject<{
821
820
  }, $strip>;
822
821
  type CustomerPortalLinkOutput = output<typeof CustomerPortalLinkOutput>;
823
822
  /**
824
- * `POST /v1/payments/refunds`: a refund on the connected account of the request's mode; Totalum's application fee is
825
- * refunded with it (pro rata). Omit `amount` for a full refund. Disputes are the merchant's, in their Stripe Dashboard.
823
+ * `POST /v1/payments/refunds`: a refund on the connected account of the request's mode. Omit `amount` for a full
824
+ * refund. Disputes are the merchant's, in their Stripe Dashboard.
826
825
  */
827
826
  declare const RefundInput: ZodObject<{
828
827
  paymentIntentId: ZodString;
@@ -1,5 +1,5 @@
1
- import { d as CronJobInput, c as CronJob, e as CronJobPatch } from '../_types/integrations.d-BAiASM2Q.js';
2
- export { f as CronRun, g as CronRunsPage } from '../_types/integrations.d-BAiASM2Q.js';
1
+ import { d as CronJobInput, c as CronJob, e as CronJobPatch } from '../_types/integrations.d-e2_1yv7Y.js';
2
+ export { f as CronRun, g as CronRunsPage } from '../_types/integrations.d-e2_1yv7Y.js';
3
3
  import { T as TotalumClientOptions } from '../_types/errors.d-CgwliLKZ.js';
4
4
  export { a as TotalumError, b as TotalumErrorCode, i as isTotalumError } from '../_types/errors.d-CgwliLKZ.js';
5
5
  import '../_types/coerce.d-N9EPblpL.js';
@@ -1,5 +1,5 @@
1
- import { E as EmailSendInput, k as EmailView } from '../_types/integrations.d-BAiASM2Q.js';
2
- export { j as EmailSendOutput } from '../_types/integrations.d-BAiASM2Q.js';
1
+ import { E as EmailSendInput, k as EmailView } from '../_types/integrations.d-e2_1yv7Y.js';
2
+ export { j as EmailSendOutput } from '../_types/integrations.d-e2_1yv7Y.js';
3
3
  import { T as TotalumClientOptions } from '../_types/errors.d-CgwliLKZ.js';
4
4
  export { a as TotalumError, b as TotalumErrorCode, i as isTotalumError } from '../_types/errors.d-CgwliLKZ.js';
5
5
  import '../_types/coerce.d-N9EPblpL.js';
@@ -1,5 +1,5 @@
1
- import { F as FileDescriptor, l as FileUploadUrlInput, n as FilesListQuery } from '../_types/integrations.d-BAiASM2Q.js';
2
- export { m as FileUploadUrlOutput, o as FilesPage } from '../_types/integrations.d-BAiASM2Q.js';
1
+ import { F as FileDescriptor, l as FileUploadUrlInput, n as FilesListQuery } from '../_types/integrations.d-e2_1yv7Y.js';
2
+ export { m as FileUploadUrlOutput, o as FilesPage } from '../_types/integrations.d-e2_1yv7Y.js';
3
3
  import { T as TotalumClientOptions } from '../_types/errors.d-CgwliLKZ.js';
4
4
  export { a as TotalumError, b as TotalumErrorCode, i as isTotalumError } from '../_types/errors.d-CgwliLKZ.js';
5
5
  import '../_types/coerce.d-N9EPblpL.js';
package/dist/index.d.ts CHANGED
@@ -32,7 +32,7 @@ import { totalumWebhooks } from './webhooks/index.js';
32
32
  export { TotalumWebhookError, TotalumWebhooks, verifyWebhook } from './webhooks/index.js';
33
33
  export { D1Database, D1DatabaseSession, D1ExecResult, D1PreparedStatement, D1Result, READ_YOUR_WRITES_COOKIE, TotalumD1ClientCode, TotalumD1Error, TotalumD1ErrorCode, TotalumD1Options, isTotalumD1Error, totalumD1, withTotalumSession } from './d1/index.js';
34
34
  export { T as TotalumClientOptions, a as TotalumError, b as TotalumErrorCode, i as isTotalumError } from './_types/errors.d-CgwliLKZ.js';
35
- export { C as CheckoutInput, a as CheckoutOutput, b as CheckoutSession, c as CronJob, d as CronJobInput, e as CronJobPatch, f as CronRun, g as CronRunsPage, h as CustomerPortalLinkInput, i as CustomerPortalLinkOutput, E as EmailSendInput, j as EmailSendOutput, k as EmailView, F as FileDescriptor, l as FileUploadUrlInput, m as FileUploadUrlOutput, n as FilesListQuery, o as FilesPage, J as JobCreated, O as OnboardingLinkInput, p as OnboardingLinkOutput, P as PaymentsStatus, q as PdfFromHtmlInput, r as PdfFromUrlInput, s as PdfOutput, R as RefundInput, t as RefundOutput, S as ScanDocumentInput, u as ScanOcrInput, v as ScanOcrOutput, w as ScreenshotInput, x as ScreenshotOutput, y as SeoIndexNowKey, z as SeoNotifyOutput, A as SpeakInput, B as StoredMedia, T as TranscribeInput, D as TranscribeOutput, W as WebJob, G as WebScrapeOutput, H as WebSearchOutput } from './_types/integrations.d-BAiASM2Q.js';
35
+ export { C as CheckoutInput, a as CheckoutOutput, b as CheckoutSession, c as CronJob, d as CronJobInput, e as CronJobPatch, f as CronRun, g as CronRunsPage, h as CustomerPortalLinkInput, i as CustomerPortalLinkOutput, E as EmailSendInput, j as EmailSendOutput, k as EmailView, F as FileDescriptor, l as FileUploadUrlInput, m as FileUploadUrlOutput, n as FilesListQuery, o as FilesPage, J as JobCreated, O as OnboardingLinkInput, p as OnboardingLinkOutput, P as PaymentsStatus, q as PdfFromHtmlInput, r as PdfFromUrlInput, s as PdfOutput, R as RefundInput, t as RefundOutput, S as ScanDocumentInput, u as ScanOcrInput, v as ScanOcrOutput, w as ScreenshotInput, x as ScreenshotOutput, y as SeoIndexNowKey, z as SeoNotifyOutput, A as SpeakInput, B as StoredMedia, T as TranscribeInput, D as TranscribeOutput, W as WebJob, G as WebScrapeOutput, H as WebSearchOutput } from './_types/integrations.d-e2_1yv7Y.js';
36
36
  export { L as LogsPage, S as SiteAnalyticsOutput, a as SiteDimension, b as SiteMetric } from './_types/ops.d-DahecA8l.js';
37
37
  export { W as WebhookConfig, a as WebhookEvent, b as WebhookSecretOutput } from './_types/billing.d-D-B_EzGQ.js';
38
38
  import './_types/coerce.d-N9EPblpL.js';
@@ -1,5 +1,5 @@
1
- import { O as OnboardingLinkInput, C as CheckoutInput, h as CustomerPortalLinkInput, R as RefundInput } from '../_types/integrations.d-BAiASM2Q.js';
2
- export { a as CheckoutOutput, b as CheckoutSession, i as CustomerPortalLinkOutput, p as OnboardingLinkOutput, P as PaymentsStatus, t as RefundOutput } from '../_types/integrations.d-BAiASM2Q.js';
1
+ import { O as OnboardingLinkInput, C as CheckoutInput, h as CustomerPortalLinkInput, R as RefundInput } from '../_types/integrations.d-e2_1yv7Y.js';
2
+ export { a as CheckoutOutput, b as CheckoutSession, i as CustomerPortalLinkOutput, p as OnboardingLinkOutput, P as PaymentsStatus, t as RefundOutput } from '../_types/integrations.d-e2_1yv7Y.js';
3
3
  import { T as TotalumClientOptions } from '../_types/errors.d-CgwliLKZ.js';
4
4
  export { a as TotalumError, b as TotalumErrorCode, i as isTotalumError } from '../_types/errors.d-CgwliLKZ.js';
5
5
  import '../_types/coerce.d-N9EPblpL.js';
@@ -25,7 +25,6 @@ declare function totalumPayments(options?: TotalumClientOptions): {
25
25
  pastDue: string[];
26
26
  eventuallyDue: string[];
27
27
  };
28
- applicationFeeBps: number;
29
28
  liveEnabled: boolean;
30
29
  disconnectedAt?: string | null | undefined;
31
30
  }>;
@@ -59,7 +58,7 @@ declare function totalumPayments(options?: TotalumClientOptions): {
59
58
  url: string;
60
59
  }>;
61
60
  refunds: {
62
- /** Refund a payment (all of it, or `amount` in the smallest unit); Totalum's fee is refunded with it. */
61
+ /** Refund a payment (all of it, or `amount` in the smallest unit). */
63
62
  create: (input: RefundInput) => Promise<{
64
63
  id: string;
65
64
  status: string;
@@ -23,7 +23,7 @@ export function totalumPayments(options = {}) {
23
23
  /** Stripe's hosted portal where a customer manages their subscriptions and saved cards. */
24
24
  customerPortalLink: (input) => call('POST', '/v1/payments/customer-portal-link', input),
25
25
  refunds: {
26
- /** Refund a payment (all of it, or `amount` in the smallest unit); Totalum's fee is refunded with it. */
26
+ /** Refund a payment (all of it, or `amount` in the smallest unit). */
27
27
  create: (input) => call('POST', '/v1/payments/refunds', input),
28
28
  },
29
29
  };
@@ -1,5 +1,5 @@
1
- import { q as PdfFromHtmlInput, r as PdfFromUrlInput } from '../_types/integrations.d-BAiASM2Q.js';
2
- export { s as PdfOutput } from '../_types/integrations.d-BAiASM2Q.js';
1
+ import { q as PdfFromHtmlInput, r as PdfFromUrlInput } from '../_types/integrations.d-e2_1yv7Y.js';
2
+ export { s as PdfOutput } from '../_types/integrations.d-e2_1yv7Y.js';
3
3
  import { T as TotalumClientOptions } from '../_types/errors.d-CgwliLKZ.js';
4
4
  export { a as TotalumError, b as TotalumErrorCode, i as isTotalumError } from '../_types/errors.d-CgwliLKZ.js';
5
5
  import '../_types/coerce.d-N9EPblpL.js';
@@ -57,7 +57,7 @@ type RealtimePublishOutput = output<typeof RealtimePublishOutput>;
57
57
  /**
58
58
  * `totalum.realtime` server side (plan 05 §6.14.1) over SDK-API `/v1/realtime/*` (scope `realtime`). The app's own
59
59
  * server mints a short-lived ticket after its own auth check and hands `{ticket, url}` to the page; the page opens the
60
- * `wss://` `url` and never holds a key. A room costs awake room-minutes × 4, never connections or messages.
60
+ * `wss://` `url` and never holds a key. A room is billed in credits per awake room-minute, never per connection or message.
61
61
  */
62
62
  declare function totalumRealtime(options?: TotalumClientOptions): {
63
63
  /**
@@ -3,7 +3,7 @@ export { TotalumError, isTotalumError } from '../errors.js';
3
3
  /**
4
4
  * `totalum.realtime` server side (plan 05 §6.14.1) over SDK-API `/v1/realtime/*` (scope `realtime`). The app's own
5
5
  * server mints a short-lived ticket after its own auth check and hands `{ticket, url}` to the page; the page opens the
6
- * `wss://` `url` and never holds a key. A room costs awake room-minutes × 4, never connections or messages.
6
+ * `wss://` `url` and never holds a key. A room is billed in credits per awake room-minute, never per connection or message.
7
7
  */
8
8
  export function totalumRealtime(options = {}) {
9
9
  const call = jsonClient(options);
@@ -1,5 +1,5 @@
1
- import { S as ScanDocumentInput, u as ScanOcrInput } from '../_types/integrations.d-BAiASM2Q.js';
2
- export { v as ScanOcrOutput } from '../_types/integrations.d-BAiASM2Q.js';
1
+ import { S as ScanDocumentInput, u as ScanOcrInput } from '../_types/integrations.d-e2_1yv7Y.js';
2
+ export { v as ScanOcrOutput } from '../_types/integrations.d-e2_1yv7Y.js';
3
3
  import { T as TotalumClientOptions } from '../_types/errors.d-CgwliLKZ.js';
4
4
  export { a as TotalumError, b as TotalumErrorCode, i as isTotalumError } from '../_types/errors.d-CgwliLKZ.js';
5
5
  import '../_types/coerce.d-N9EPblpL.js';
@@ -1,4 +1,4 @@
1
- export { y as SeoIndexNowKey, z as SeoNotifyOutput } from '../_types/integrations.d-BAiASM2Q.js';
1
+ export { y as SeoIndexNowKey, z as SeoNotifyOutput } from '../_types/integrations.d-e2_1yv7Y.js';
2
2
  import { T as TotalumClientOptions } from '../_types/errors.d-CgwliLKZ.js';
3
3
  export { a as TotalumError, b as TotalumErrorCode, i as isTotalumError } from '../_types/errors.d-CgwliLKZ.js';
4
4
  import '../_types/coerce.d-N9EPblpL.js';
@@ -1,5 +1,5 @@
1
- import { T as TranscribeInput, A as SpeakInput, B as StoredMedia } from '../_types/integrations.d-BAiASM2Q.js';
2
- export { D as TranscribeOutput } from '../_types/integrations.d-BAiASM2Q.js';
1
+ import { T as TranscribeInput, A as SpeakInput, B as StoredMedia } from '../_types/integrations.d-e2_1yv7Y.js';
2
+ export { D as TranscribeOutput } from '../_types/integrations.d-e2_1yv7Y.js';
3
3
  import { T as TotalumClientOptions } from '../_types/errors.d-CgwliLKZ.js';
4
4
  export { a as TotalumError, b as TotalumErrorCode, i as isTotalumError } from '../_types/errors.d-CgwliLKZ.js';
5
5
  import '../_types/coerce.d-N9EPblpL.js';
@@ -1,12 +1,12 @@
1
- import { I as WebScrapeInput, K as WebSearchInput, L as WebMapInput, M as WebCrawlInput, w as ScreenshotInput } from '../_types/integrations.d-BAiASM2Q.js';
2
- export { J as JobCreated, x as ScreenshotOutput, W as WebJob, G as WebScrapeOutput, H as WebSearchOutput } from '../_types/integrations.d-BAiASM2Q.js';
1
+ import { I as WebScrapeInput, K as WebSearchInput, L as WebMapInput, M as WebCrawlInput, w as ScreenshotInput } from '../_types/integrations.d-e2_1yv7Y.js';
2
+ export { J as JobCreated, x as ScreenshotOutput, W as WebJob, G as WebScrapeOutput, H as WebSearchOutput } from '../_types/integrations.d-e2_1yv7Y.js';
3
3
  import { T as TotalumClientOptions } from '../_types/errors.d-CgwliLKZ.js';
4
4
  export { a as TotalumError, b as TotalumErrorCode, i as isTotalumError } from '../_types/errors.d-CgwliLKZ.js';
5
5
  import '../_types/coerce.d-N9EPblpL.js';
6
6
 
7
7
  /**
8
8
  * `totalum.web` (plan 05 §6.2) over SDK-API `/v1/web/*` (scope `web`): Firecrawl scrape/search/map/crawl and Browser
9
- * Run screenshots, charged provider cost × 4 / $0.07 — every result carries `usage.credits`.
9
+ * Run screenshots, billed in credits — every result carries `usage.credits`.
10
10
  */
11
11
  declare function totalumWeb(options?: TotalumClientOptions): {
12
12
  /**
package/dist/web/index.js CHANGED
@@ -2,7 +2,7 @@ import { envelopeClient, withUsage } from '../http.js';
2
2
  export { TotalumError, isTotalumError } from '../errors.js';
3
3
  /**
4
4
  * `totalum.web` (plan 05 §6.2) over SDK-API `/v1/web/*` (scope `web`): Firecrawl scrape/search/map/crawl and Browser
5
- * Run screenshots, charged provider cost × 4 / $0.07 — every result carries `usage.credits`.
5
+ * Run screenshots, billed in credits — every result carries `usage.credits`.
6
6
  */
7
7
  export function totalumWeb(options = {}) {
8
8
  const call = envelopeClient(options);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "totalum-sdk",
3
- "version": "1.5.0",
3
+ "version": "1.5.2",
4
4
  "description": "The SDK generated Totalum apps import: every integration namespace over SDK-API (totalum-sdk, or one subpath each: /files, /ai, /web, \u2026) and totalum-sdk/d1, the D1 driver",
5
5
  "license": "UNLICENSED",
6
6
  "type": "module",
package/totalum-sdk.md CHANGED
@@ -206,7 +206,7 @@ preview and in the sandbox; live mode only on the published site, once the owner
206
206
  #### `payments.getStatus`
207
207
 
208
208
  ```ts
209
- payments.getStatus(): Promise<{ enabled: boolean; mode: 'connect' | 'own_key'; accountId: string | null; livemode: boolean; chargesEnabled: boolean; payoutsEnabled: boolean; detailsSubmitted: boolean; requirements: { currentlyDue: string[]; pastDue: string[]; eventuallyDue: string[]; }; applicationFeeBps: number; liveEnabled: boolean; disconnectedAt?: string | null | undefined; }>
209
+ payments.getStatus(): Promise<{ enabled: boolean; mode: 'connect' | 'own_key'; accountId: string | null; livemode: boolean; chargesEnabled: boolean; payoutsEnabled: boolean; detailsSubmitted: boolean; requirements: { currentlyDue: string[]; pastDue: string[]; eventuallyDue: string[]; }; liveEnabled: boolean; disconnectedAt?: string | null | undefined; }>
210
210
  ```
211
211
 
212
212
  Whether the project's Stripe account can take payments (charges, payouts, pending requirements).
@@ -250,7 +250,7 @@ Stripe's hosted portal where a customer manages their subscriptions and saved ca
250
250
  payments.refunds.create(input: { paymentIntentId: string; amount?: number | undefined; reason?: 'duplicate' | 'fraudulent' | 'requested_by_customer' | undefined; }): Promise<{ id: string; status: string; amount: number; currency: string; }>
251
251
  ```
252
252
 
253
- Refund a payment (all of it, or `amount` in the smallest unit); Totalum's fee is refunded with it.
253
+ Refund a payment (all of it, or `amount` in the smallest unit).
254
254
 
255
255
  ## `totalum-sdk/webhooks`
256
256
 
@@ -318,7 +318,7 @@ totalumWeb(options?: TotalumClientOptions)
318
318
  ```
319
319
 
320
320
  `totalum.web` over SDK-API `/v1/web/*` (scope `web`): Firecrawl scrape/search/map/crawl and Browser
321
- Run screenshots, charged provider cost × 4 / $0.07 — every result carries `usage.credits`.
321
+ Run screenshots, billed in credits — every result carries `usage.credits`.
322
322
 
323
323
  #### `web.scrape`
324
324
 
@@ -889,7 +889,7 @@ totalumRealtime(options?: TotalumClientOptions)
889
889
 
890
890
  `totalum.realtime` server side over SDK-API `/v1/realtime/*` (scope `realtime`). The app's own
891
891
  server mints a short-lived ticket after its own auth check and hands `{ticket, url}` to the page; the page opens the
892
- `wss://` `url` and never holds a key. A room costs awake room-minutes × 4, never connections or messages.
892
+ `wss://` `url` and never holds a key. A room is billed in credits per awake room-minute, never per connection or message.
893
893
 
894
894
  #### `realtime.ticket`
895
895
 
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.5.0",
2
+ "version": "1.5.2",
3
3
  "methods": [
4
4
  {
5
5
  "call": "totalum.files.upload(input, { name?, contentType?, private?, folder? })",
@@ -48,7 +48,7 @@
48
48
  },
49
49
  {
50
50
  "call": "totalum.payments.getStatus()",
51
- "returns": "{ enabled, mode: 'connect' | 'own_key', accountId, livemode, chargesEnabled, payoutsEnabled, detailsSubmitted, requirements, applicationFeeBps, liveEnabled, disconnectedAt? }"
51
+ "returns": "{ enabled, mode: 'connect' | 'own_key', accountId, livemode, chargesEnabled, payoutsEnabled, detailsSubmitted, requirements, liveEnabled, disconnectedAt? }"
52
52
  },
53
53
  {
54
54
  "call": "totalum.payments.onboardingLink({ returnUrl, refreshUrl, type?: 'account_onboarding' | 'account_update', country? })",