totalum-sdk 1.10.0 → 1.10.1

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 (55) hide show
  1. package/dist/_types/{coerce.d-3Xj4xYuy.d.ts → coerce.d-DiNiCkat.d.ts} +1 -1
  2. package/dist/_types/{errors.d-BBRayxHv.d.ts → errors.d-BfXTsxYG.d.ts} +6 -6
  3. package/dist/_types/{integrations.d-Hj3BqI02.d.ts → integrations.d-DL2_rTOs.d.ts} +11 -11
  4. package/dist/_types/{ops.d-D_3lqkJ2.d.ts → ops.d-fwLDriUN.d.ts} +3 -3
  5. package/dist/ai/index.d.ts +11 -12
  6. package/dist/ai/index.js +3 -3
  7. package/dist/analytics/index.d.ts +5 -5
  8. package/dist/analytics/index.js +1 -1
  9. package/dist/browser/index.d.ts +10 -10
  10. package/dist/browser/index.js +4 -4
  11. package/dist/cron/index.d.ts +10 -10
  12. package/dist/cron/index.js +5 -5
  13. package/dist/d1/d1-limits.js +1 -1
  14. package/dist/d1/errors.js +3 -3
  15. package/dist/d1/https.js +3 -3
  16. package/dist/d1/index.d.ts +12 -12
  17. package/dist/d1/index.js +2 -2
  18. package/dist/d1/lazy.js +4 -4
  19. package/dist/d1/libsql.js +5 -5
  20. package/dist/d1/migrate-rules.js +5 -5
  21. package/dist/d1/native-shape.js +2 -2
  22. package/dist/d1/retry.js +3 -3
  23. package/dist/d1/session.js +3 -3
  24. package/dist/d1/sql.js +2 -2
  25. package/dist/email/index.d.ts +6 -6
  26. package/dist/email/index.js +1 -1
  27. package/dist/errors.js +4 -4
  28. package/dist/files/index.d.ts +11 -11
  29. package/dist/files/index.js +4 -4
  30. package/dist/http.js +7 -7
  31. package/dist/index.d.ts +5 -5
  32. package/dist/index.js +1 -1
  33. package/dist/logs/index.d.ts +6 -6
  34. package/dist/logs/index.js +1 -1
  35. package/dist/payments/index.d.ts +7 -7
  36. package/dist/payments/index.js +2 -2
  37. package/dist/pdf/index.d.ts +6 -6
  38. package/dist/pdf/index.js +1 -1
  39. package/dist/react/index.d.ts +1 -1
  40. package/dist/realtime/index.d.ts +5 -5
  41. package/dist/realtime/index.js +1 -1
  42. package/dist/scan/index.d.ts +6 -6
  43. package/dist/scan/index.js +1 -1
  44. package/dist/seo/index.d.ts +5 -5
  45. package/dist/seo/index.js +1 -1
  46. package/dist/speech/index.d.ts +6 -6
  47. package/dist/speech/index.js +1 -1
  48. package/dist/vectors/index.d.ts +4 -4
  49. package/dist/web/index.d.ts +6 -6
  50. package/dist/web/index.js +1 -1
  51. package/dist/webhooks/index.d.ts +5 -5
  52. package/dist/webhooks/index.js +4 -4
  53. package/package.json +1 -1
  54. package/totalum-sdk.md +23 -23
  55. package/totalum-sdk.signatures.json +1 -1
package/dist/seo/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { jsonClient } from '../http.js';
2
2
  export { TotalumError, isTotalumError } from '../errors.js';
3
- /** `totalum.seo` (plan 05 §6.10) over SDK-API `/v1/seo/*` (scope `seo`): IndexNow for verified custom domains, free. */
3
+ /** `totalum.seo` over the Totalum API `/v1/seo/*` (scope `seo`): IndexNow for verified custom domains, free. */
4
4
  export function totalumSeo(options = {}) {
5
5
  const call = jsonClient(options);
6
6
  return {
@@ -1,8 +1,8 @@
1
- import { T as TranscribeInput, A as SpeakInput, B as StoredMedia } from '../_types/integrations.d-Hj3BqI02.js';
2
- export { H as TranscribeOutput } from '../_types/integrations.d-Hj3BqI02.js';
3
- import { T as TotalumClientOptions } from '../_types/errors.d-BBRayxHv.js';
4
- export { a as TotalumError, b as TotalumErrorCode, i as isTotalumError } from '../_types/errors.d-BBRayxHv.js';
5
- import '../_types/coerce.d-3Xj4xYuy.js';
1
+ import { T as TranscribeInput, A as SpeakInput, B as StoredMedia } from '../_types/integrations.d-DL2_rTOs.js';
2
+ export { H as TranscribeOutput } from '../_types/integrations.d-DL2_rTOs.js';
3
+ import { T as TotalumClientOptions } from '../_types/errors.d-BfXTsxYG.js';
4
+ export { a as TotalumError, b as TotalumErrorCode, i as isTotalumError } from '../_types/errors.d-BfXTsxYG.js';
5
+ import '../_types/coerce.d-DiNiCkat.js';
6
6
 
7
7
  /** The audio bytes of `synthesize` without `store`, and what the call cost (`usage.credits`, the call's hold). */
8
8
  interface SpeechAudio {
@@ -14,7 +14,7 @@ interface SpeechAudio {
14
14
  /** @deprecated Since 1.0.0: use `usage.credits` (the same number). */
15
15
  readonly credits: number;
16
16
  }
17
- /** `totalum.speech` (plan 05 §6.8) over `/v1/speech/*` (scope `speech`): speech to text and text to speech through Totalum. */
17
+ /** `totalum.speech` over `/v1/speech/*` (scope `speech`): speech to text and text to speech through Totalum. */
18
18
  declare function totalumSpeech(options?: TotalumClientOptions): {
19
19
  /**
20
20
  * Speech to text from `audioBase64` (+ `filename` with its extension) or a `url` — a public one, or a file this
@@ -1,7 +1,7 @@
1
1
  import { deprecated } from '../deprecate.js';
2
2
  import { jsonClient, rawClient } from '../http.js';
3
3
  export { TotalumError, isTotalumError } from '../errors.js';
4
- /** `totalum.speech` (plan 05 §6.8) over `/v1/speech/*` (scope `speech`): speech to text and text to speech through Totalum. */
4
+ /** `totalum.speech` over `/v1/speech/*` (scope `speech`): speech to text and text to speech through Totalum. */
5
5
  export function totalumSpeech(options = {}) {
6
6
  const call = jsonClient(options);
7
7
  const raw = rawClient(options);
@@ -1,5 +1,5 @@
1
- import { Z as ZodObject, d as ZodString, c as ZodOptional, e as ZodArray, k as ZodNumber, f as ZodEnum, h as ZodRecord, n as ZodUnion, j as ZodBoolean, m as $strip, o as output, l as ZodInt, q as $partial, x as $strict, T as TotalumClientOptions, U as Usage } from '../_types/errors.d-BBRayxHv.js';
2
- export { a as TotalumError, b as TotalumErrorCode, i as isTotalumError } from '../_types/errors.d-BBRayxHv.js';
1
+ import { Z as ZodObject, d as ZodString, c as ZodOptional, e as ZodArray, k as ZodNumber, f as ZodEnum, h as ZodRecord, n as ZodUnion, j as ZodBoolean, m as $strip, o as output, l as ZodInt, q as $partial, x as $strict, T as TotalumClientOptions, U as Usage } from '../_types/errors.d-BfXTsxYG.js';
2
+ export { a as TotalumError, b as TotalumErrorCode, i as isTotalumError } from '../_types/errors.d-BfXTsxYG.js';
3
3
 
4
4
  /** `text` = the `embed` preset's space; `image` = the `embed-image` preset's text+image space. */
5
5
  declare const VectorSpace: ZodEnum<{
@@ -7,7 +7,7 @@ declare const VectorSpace: ZodEnum<{
7
7
  image: "image";
8
8
  }>;
9
9
  type VectorSpace = output<typeof VectorSpace>;
10
- /** ≤ 9 KiB as JSON (Vectorize keeps 10 KiB); keys starting with `_` are reserved. */
10
+ /** ≤ 9 KiB as JSON (the vector index keeps 10 KiB); keys starting with `_` are reserved. */
11
11
  declare const VectorMetadata: ZodRecord<ZodString, ZodUnion<readonly [ZodString, ZodNumber, ZodBoolean, ZodArray<ZodString>]>>;
12
12
  type VectorMetadata = output<typeof VectorMetadata>;
13
13
  declare const VectorUpsertItem: ZodObject<{
@@ -22,7 +22,7 @@ declare const VectorUpsertItem: ZodObject<{
22
22
  metadata: ZodOptional<ZodRecord<ZodString, ZodUnion<readonly [ZodString, ZodNumber, ZodBoolean, ZodArray<ZodString>]>>>;
23
23
  }, $strip>;
24
24
  type VectorUpsertItem = output<typeof VectorUpsertItem>;
25
- /** A Vectorize metadata filter on `VECTOR_FILTER_KEYS` only. */
25
+ /** A the vector index metadata filter on `VECTOR_FILTER_KEYS` only. */
26
26
  declare const VectorFilter: ZodRecord<ZodEnum<{
27
27
  type: "type";
28
28
  source: "source";
@@ -1,11 +1,11 @@
1
- import { T as TotalumClientOptions, U as Usage } from '../_types/errors.d-BBRayxHv.js';
2
- export { a as TotalumError, b as TotalumErrorCode, i as isTotalumError } from '../_types/errors.d-BBRayxHv.js';
3
- import { L as WebScrapeInput, M as WebSearchInput, N as WebMapInput, Q as WebCrawlInput, w as ScreenshotInput } from '../_types/integrations.d-Hj3BqI02.js';
4
- export { J as JobCreated, x as ScreenshotOutput, W as WebJob, I as WebScrapeOutput, K as WebSearchOutput } from '../_types/integrations.d-Hj3BqI02.js';
5
- import '../_types/coerce.d-3Xj4xYuy.js';
1
+ import { T as TotalumClientOptions, U as Usage } from '../_types/errors.d-BfXTsxYG.js';
2
+ export { a as TotalumError, b as TotalumErrorCode, i as isTotalumError } from '../_types/errors.d-BfXTsxYG.js';
3
+ import { L as WebScrapeInput, M as WebSearchInput, N as WebMapInput, Q as WebCrawlInput, w as ScreenshotInput } from '../_types/integrations.d-DL2_rTOs.js';
4
+ export { J as JobCreated, x as ScreenshotOutput, W as WebJob, I as WebScrapeOutput, K as WebSearchOutput } from '../_types/integrations.d-DL2_rTOs.js';
5
+ import '../_types/coerce.d-DiNiCkat.js';
6
6
 
7
7
  /**
8
- * `totalum.web` (plan 05 §6.2) over SDK-API `/v1/web/*` (scope `web`): scrape, search, map, crawl and screenshots,
8
+ * `totalum.web` over the Totalum API `/v1/web/*` (scope `web`): scrape, search, map, crawl and screenshots,
9
9
  * billed in credits — every result carries `usage.credits`.
10
10
  */
11
11
  declare function totalumWeb(options?: TotalumClientOptions): {
package/dist/web/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { envelopeClient, withUsage } from '../http.js';
2
2
  export { TotalumError, isTotalumError } from '../errors.js';
3
3
  /**
4
- * `totalum.web` (plan 05 §6.2) over SDK-API `/v1/web/*` (scope `web`): scrape, search, map, crawl and screenshots,
4
+ * `totalum.web` over the Totalum API `/v1/web/*` (scope `web`): scrape, search, map, crawl and screenshots,
5
5
  * billed in credits — every result carries `usage.credits`.
6
6
  */
7
7
  export function totalumWeb(options = {}) {
@@ -1,5 +1,5 @@
1
- import { Z as ZodObject, d as ZodString, u as ZodISODateTime, f as ZodEnum, c as ZodOptional, j as ZodBoolean, h as ZodRecord, g as ZodUnknown, m as $strip, o as output, w as ZodNullable, p as ZodURL, T as TotalumClientOptions, a as TotalumError } from '../_types/errors.d-BBRayxHv.js';
2
- export { b as TotalumErrorCode, i as isTotalumError } from '../_types/errors.d-BBRayxHv.js';
1
+ import { Z as ZodObject, d as ZodString, u as ZodISODateTime, f as ZodEnum, c as ZodOptional, j as ZodBoolean, h as ZodRecord, g as ZodUnknown, m as $strip, o as output, w as ZodNullable, p as ZodURL, T as TotalumClientOptions, a as TotalumError } from '../_types/errors.d-BfXTsxYG.js';
2
+ export { b as TotalumErrorCode, i as isTotalumError } from '../_types/errors.d-BfXTsxYG.js';
3
3
 
4
4
  /** The delivery body: `{id, type, createdAt, projectId, env, livemode?, data}`, idempotent by `id`. */
5
5
  declare const WebhookEvent: ZodObject<{
@@ -28,14 +28,14 @@ declare const WebhookSecretOutput: ZodObject<{
28
28
  }, $strip>;
29
29
  type WebhookSecretOutput = output<typeof WebhookSecretOutput>;
30
30
 
31
- /** A webhook refusal (plan 05 §7.2): the codes never travel, the app answers 400. */
31
+ /** A webhook refusal: the codes never travel, the app answers 400. */
32
32
  declare class TotalumWebhookError extends TotalumError {
33
33
  name: string;
34
34
  readonly errorCode: 'WEBHOOK_SECRET_MISSING' | 'WEBHOOK_SIGNATURE_INVALID' | 'WEBHOOK_TIMESTAMP_EXPIRED';
35
35
  constructor(errorCode: TotalumWebhookError['errorCode'], message: string);
36
36
  }
37
37
  /**
38
- * `totalum.webhooks.verify` (plan 04 §5.13): checks `Totalum-Signature: t=…,v1=…` — HMAC-SHA256 keyed with the
38
+ * `totalum.webhooks.verify`: checks `Totalum-Signature: t=…,v1=…` — HMAC-SHA256 keyed with the
39
39
  * endpoint's secret string over `${t}.${rawBody}` — within ±300 s, and returns the parsed event. Pass the body exactly
40
40
  * as received (`await request.text()`). `secret` defaults to `TOTALUM_WEBHOOK_SECRET`, which Totalum sets on the
41
41
  * preview, the published site and the sandbox (a rotation reaches them at once): never ask the owner to set it.
@@ -45,7 +45,7 @@ declare class TotalumWebhookError extends TotalumError {
45
45
  */
46
46
  declare function verifyWebhook(rawBody: string, headers: Headers | Record<string, string | undefined>, secret?: string | undefined, now?: number): Promise<WebhookEvent>;
47
47
  /**
48
- * `totalum.webhooks` (plan 04 §5.13) over SDK-API `/v1/webhooks` (a key with scope `*`): where the project receives its
48
+ * `totalum.webhooks` over the Totalum API `/v1/webhooks` (a key with scope `*`): where the project receives its
49
49
  * signed events (payments, e-mail, browser programs, `project.credits.exhausted`) and the secret they are signed with.
50
50
  */
51
51
  declare function totalumWebhooks(options?: TotalumClientOptions): {
@@ -1,10 +1,10 @@
1
1
  import { TotalumError } from '../errors.js';
2
2
  import { jsonClient, readEnv } from '../http.js';
3
3
  export { TotalumError, isTotalumError } from '../errors.js';
4
- /** Literals type-locked to contracts, so the published package imports nothing at runtime (plan 05 §1). */
4
+ /** Literals type-locked to contracts, so the published package imports nothing at runtime. */
5
5
  const SIGNATURE_HEADER = 'Totalum-Signature';
6
6
  const TOLERANCE_SECONDS = 300;
7
- /** A webhook refusal (plan 05 §7.2): the codes never travel, the app answers 400. */
7
+ /** A webhook refusal: the codes never travel, the app answers 400. */
8
8
  export class TotalumWebhookError extends TotalumError {
9
9
  name = 'TotalumWebhookError';
10
10
  constructor(errorCode, message) {
@@ -13,7 +13,7 @@ export class TotalumWebhookError extends TotalumError {
13
13
  }
14
14
  const enc = new TextEncoder();
15
15
  /**
16
- * `totalum.webhooks.verify` (plan 04 §5.13): checks `Totalum-Signature: t=…,v1=…` — HMAC-SHA256 keyed with the
16
+ * `totalum.webhooks.verify`: checks `Totalum-Signature: t=…,v1=…` — HMAC-SHA256 keyed with the
17
17
  * endpoint's secret string over `${t}.${rawBody}` — within ±300 s, and returns the parsed event. Pass the body exactly
18
18
  * as received (`await request.text()`). `secret` defaults to `TOTALUM_WEBHOOK_SECRET`, which Totalum sets on the
19
19
  * preview, the published site and the sandbox (a rotation reaches them at once): never ask the owner to set it.
@@ -44,7 +44,7 @@ export async function verifyWebhook(rawBody, headers, secret = readEnv('TOTALUM_
44
44
  throw new TotalumWebhookError('WEBHOOK_SIGNATURE_INVALID', 'Totalum-Signature does not match');
45
45
  }
46
46
  /**
47
- * `totalum.webhooks` (plan 04 §5.13) over SDK-API `/v1/webhooks` (a key with scope `*`): where the project receives its
47
+ * `totalum.webhooks` over the Totalum API `/v1/webhooks` (a key with scope `*`): where the project receives its
48
48
  * signed events (payments, e-mail, browser programs, `project.credits.exhausted`) and the secret they are signed with.
49
49
  */
50
50
  export function totalumWebhooks(options = {}) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "totalum-sdk",
3
- "version": "1.10.0",
3
+ "version": "1.10.1",
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
@@ -36,7 +36,7 @@ Every failure throws `TotalumError` (`isTotalumError(e)`) with `errorCode` (froz
36
36
  `requestId`; `TotalumD1Error` (`message` shaped like a native D1 error) and `TotalumWebhookError` extend it. A capped
37
37
  or disabled feature (`FEATURE_LIMIT_REACHED` 429, `FEATURE_DISABLED` 403) refuses only its own namespace; at a zero
38
38
  balance paid calls answer `INSUFFICIENT_CREDITS` 402. A project makes at most 100 built-in calls per second (AI, e-mail,
39
- file uploads, web, scan, PDF, speech, vectors, browser, realtime, payments): above it SDK-API answers `RATE_LIMITED` 429 with
39
+ file uploads, web, scan, PDF, speech, vectors, browser, realtime, payments): above it the Totalum API answers `RATE_LIMITED` 429 with
40
40
  `Retry-After`, which the SDK retries twice (with jitter) before throwing — handle it, and never fan out hundreds of calls
41
41
  at once (batch, queue or `await` them in small groups).
42
42
 
@@ -100,7 +100,7 @@ totalumD1(options?: TotalumD1Options): D1Database
100
100
 
101
101
  A `D1Database` for the project's own database wherever the code runs: the bound
102
102
  `TOTALUM_DB` inside a Worker, the libsql adapter when the environment moved to Turso, the local D1 that
103
- `initOpenNextCloudflareForDev()` binds under `next dev`, and an HTTPS client to SDK-API everywhere else.
103
+ `initOpenNextCloudflareForDev()` binds under `next dev`, and an HTTPS client to the Totalum API everywhere else.
104
104
  Detection happens on the first statement, never at call time.
105
105
 
106
106
  ## `totalum-sdk/files`
@@ -111,9 +111,9 @@ Detection happens on the first statement, never at call time.
111
111
  totalumFiles(options?: TotalumFilesOptions)
112
112
  ```
113
113
 
114
- `totalum.files` over HTTPS with the project key. Every call returns the file
114
+ `totalum.files` (the Totalum API ) over HTTPS with the project key. Every call returns the file
115
115
  descriptor `{key, fileName, fileSize, contentType, fileUrl, visibility, createdAt}` meant to be stored as-is in the
116
- row's file column; failures throw `TotalumError` with SDK-API's frozen code.
116
+ row's file column; failures throw `TotalumError` with the Totalum API's frozen code.
117
117
 
118
118
  #### `files.upload`
119
119
 
@@ -121,7 +121,7 @@ row's file column; failures throw `TotalumError` with SDK-API's frozen code.
121
121
  files.upload(input: string | Blob | ArrayBuffer | Uint8Array<ArrayBufferLike>, opts?: UploadOptions): Promise<{ key: string; fileName: string; fileSize: number; contentType: string; fileUrl: string | null; visibility: 'public-by-link' | 'private'; createdAt: string; etag?: string | undefined; storageClass?: 'Standard' | 'InfrequentAccess' | undefined; name?: string | undefined; url?: string | null | undefined; size?: number | undefined; id?: string | undefined; fileNameId?: string | undefined; }>
122
122
  ```
123
123
 
124
- Up to 25 MB through SDK-API; larger files go through `getUploadUrl` + `complete`.
124
+ Up to 25 MB through the Totalum API; larger files go through `getUploadUrl` + `complete`.
125
125
 
126
126
  #### `files.getUploadUrl`
127
127
 
@@ -204,7 +204,7 @@ The object itself (private files included), with `Range` support; errors throw l
204
204
  files.url(key: string): string
205
205
  ```
206
206
 
207
- Sync, no I/O: the public URL of a `p/` key, or the authenticated SDK-API URL of a private `pv/` key.
207
+ Sync, no I/O: the public URL of a `p/` key, or the authenticated the Totalum API URL of a private `pv/` key.
208
208
 
209
209
  ## `totalum-sdk/payments`
210
210
 
@@ -214,9 +214,9 @@ Sync, no I/O: the public URL of a `p/` key, or the authenticated SDK-API URL of
214
214
  totalumPayments(options?: TotalumClientOptions)
215
215
  ```
216
216
 
217
- `totalum.payments` over SDK-API `/v1/payments/*` with a project key (scope `payments`): Stripe
217
+ `totalum.payments` over the Totalum API `/v1/payments/*` with a project key (scope `payments`): Stripe
218
218
  Connect direct charges on the project's own connected account. Card data never passes through here — send buyers to
219
- the hosted Checkout `url` (SAQ-A); SDK-API refuses card fields with `CARD_DATA_NOT_ACCEPTED`. Stripe test mode on the
219
+ the hosted Checkout `url` (SAQ-A); the Totalum API refuses card fields with `CARD_DATA_NOT_ACCEPTED`. Stripe test mode on the
220
220
  preview and in the sandbox; live mode only on the published site, once the owner onboarded and switched live on.
221
221
 
222
222
  #### `payments.getStatus`
@@ -318,7 +318,7 @@ const event = await verifyWebhook(await request.text(), request.headers);
318
318
  totalumWebhooks(options?: TotalumClientOptions)
319
319
  ```
320
320
 
321
- `totalum.webhooks` over SDK-API `/v1/webhooks` (a key with scope `*`): where the project receives its
321
+ `totalum.webhooks` over the Totalum API `/v1/webhooks` (a key with scope `*`): where the project receives its
322
322
  signed events (payments, e-mail, browser programs, `project.credits.exhausted`) and the secret they are signed with.
323
323
 
324
324
  #### `webhooks.verify`
@@ -361,7 +361,7 @@ A new signing secret, shown once; the old one keeps co-signing for 24 h. Totalum
361
361
  totalumWeb(options?: TotalumClientOptions)
362
362
  ```
363
363
 
364
- `totalum.web` over SDK-API `/v1/web/*` (scope `web`): scrape, search, map, crawl and screenshots,
364
+ `totalum.web` over the Totalum API `/v1/web/*` (scope `web`): scrape, search, map, crawl and screenshots,
365
365
  billed in credits — every result carries `usage.credits`.
366
366
 
367
367
  #### `web.scrape`
@@ -573,10 +573,10 @@ The stored file `{key, url, usage}` with `store: true`; else the audio bytes `{a
573
573
  totalumAi(options?: TotalumAiOptions)
574
574
  ```
575
575
 
576
- `totalum.ai` over SDK-API `/v1/ai/*` (scope `ai`): a `model` is a preset (`fast`,
576
+ `totalum.ai` over the Totalum API `/v1/ai/*` (scope `ai`): a `model` is a preset (`fast`,
577
577
  `smart`, `reasoning`, `vision`, `image`, `image-edit`, `video`, `tts`, `stt`, `embed` — each follows the newest model
578
578
  of its family, resolved by Totalum) or a pinned model id; every call returned with the Totalum credits it was
579
- charged (`usage.credits`, never tokens or a vendor cost). No `ai.agent()` — the
579
+ charged (`usage.credits`, never tokens). No `ai.agent()` — the
580
580
  agent loop is the template's `src/agents/` on the Vercel AI SDK, pointed at `gatewayConfig()`.
581
581
 
582
582
  #### `ai.chat`
@@ -715,7 +715,7 @@ The OpenAI-compatible API for any OpenAI-compatible client: `new OpenAI(ai.gatew
715
715
  totalumEmail(options?: TotalumClientOptions)
716
716
  ```
717
717
 
718
- `totalum.email` over SDK-API `/v1/email/*` (scope `email`): HTML sent byte for byte, charged
718
+ `totalum.email` over the Totalum API `/v1/email/*` (scope `email`): HTML sent byte for byte, charged
719
719
  per recipient. On dev only allow-listed recipients are accepted (`DEV_RECIPIENT_NOT_ALLOWED`).
720
720
 
721
721
  #### `email.send`
@@ -746,7 +746,7 @@ email.get(id: string): Promise<{ id: string; from: string; to: string[]; subject
746
746
  totalumCron(options?: TotalumClientOptions)
747
747
  ```
748
748
 
749
- `totalum.cron` over SDK-API `/v1/cron/*` (scope `cron`): HTTP jobs against the project's own host,
749
+ `totalum.cron` over the Totalum API `/v1/cron/*` (scope `cron`): HTTP jobs against the project's own host,
750
750
  fired by Totalum's Scheduler; limits per plan (`429 CRON_LIMIT_REACHED {limit, plan}`, `400 INVALID_SCHEDULE
751
751
  {minIntervalSeconds}`). Executions cost nothing. `timezone` (IANA) reads the schedule on that zone's clock, daylight
752
752
  saving included; `pauseAfterFailures` (1–100, default 3; `null` = never) sets how many failed runs in a row pause it.
@@ -761,10 +761,10 @@ A job that calls a URL of the project's own host on a cron `schedule` (or `{ eve
761
761
 
762
762
  ```ts
763
763
  await cron.create({
764
- name: 'daily-report',
765
- schedule: '0 8 * * *', // 08:00 in Madrid all year
766
- timezone: 'Europe/Madrid',
767
- request: { method: 'POST', url: 'https://my-app.totalum-project.com/api/cron/report' },
764
+ name: 'daily-report',
765
+ schedule: '0 8 * * *', // 08:00 in Madrid all year
766
+ timezone: 'Europe/Madrid',
767
+ request: { method: 'POST', url: 'https://my-app.totalum-project.com/api/cron/report' },
768
768
  });
769
769
  ```
770
770
 
@@ -840,7 +840,7 @@ Fires a job now, outside its schedule.
840
840
  totalumSeo(options?: TotalumClientOptions)
841
841
  ```
842
842
 
843
- `totalum.seo` over SDK-API `/v1/seo/*` (scope `seo`): IndexNow for verified custom domains, free.
843
+ `totalum.seo` over the Totalum API `/v1/seo/*` (scope `seo`): IndexNow for verified custom domains, free.
844
844
 
845
845
  #### `seo.notifyChanged`
846
846
 
@@ -866,7 +866,7 @@ The key the template serves at `/<key>.txt`.
866
866
  totalumBrowser(options?: TotalumClientOptions)
867
867
  ```
868
868
 
869
- `totalum.browser` over SDK-API `/v1/browser/*` (scope `browser`): remote browser sessions driven entirely
869
+ `totalum.browser` over the Totalum API `/v1/browser/*` (scope `browser`): remote browser sessions driven entirely
870
870
  over HTTPS, so every command works from a Worker. A command's refusal throws `TotalumError` with its frozen
871
871
  code (`ACTION_TIMEOUT`, `ACTION_FAILED`, …); `actions()` returns every result instead.
872
872
 
@@ -935,7 +935,7 @@ Polls until the program leaves `pending`/`running` (the `browser.program.complet
935
935
  totalumRealtime(options?: TotalumClientOptions)
936
936
  ```
937
937
 
938
- `totalum.realtime` server side over SDK-API `/v1/realtime/*` (scope `realtime`). The app's own
938
+ `totalum.realtime` server side over the Totalum API `/v1/realtime/*` (scope `realtime`). The app's own
939
939
  server mints a short-lived ticket after its own auth check and hands `{ticket, url}` to the page; the page opens the
940
940
  `wss://` `url` and never holds a key.
941
941
 
@@ -981,7 +981,7 @@ const { connections } = await realtime.publish(`orders:${shopId}`, { event: 'ord
981
981
  totalumLogs(options?: TotalumClientOptions)
982
982
  ```
983
983
 
984
- `totalum.logs` over SDK-API `/v1/logs` (scope `logs:read`; the agent's sandbox key reads its dev
984
+ `totalum.logs` over the Totalum API `/v1/logs` (scope `logs:read`; the agent's sandbox key reads its dev
985
985
  preview for free): the Worker invocations of the published app (`env: 'live'`) or the preview (`'dev'`). Free.
986
986
 
987
987
  #### `logs.query`
@@ -1004,7 +1004,7 @@ const { items } = await logs.query({ level: 'error', env: 'live' });
1004
1004
  totalumAnalytics(options?: TotalumClientOptions)
1005
1005
  ```
1006
1006
 
1007
- `totalum.analytics` over SDK-API `/v1/analytics/site` (scope `analytics:read`): the site's own traffic. Free.
1007
+ `totalum.analytics` over the Totalum API `/v1/analytics/site` (scope `analytics:read`): the site's own traffic. Free.
1008
1008
 
1009
1009
  #### `analytics.site`
1010
1010
 
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.10.0",
2
+ "version": "1.10.1",
3
3
  "methods": [
4
4
  {
5
5
  "call": "totalum.files.upload(input, { name?, contentType?, private?, folder? })",