totalum-sdk 0.1.0-dev.5 → 0.1.0-dev.7

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/dist/d1/libsql.js CHANGED
@@ -1,5 +1,11 @@
1
1
  import { TotalumD1Error } from './errors.js';
2
2
  import { assertBindable, pickFirst } from './sql.js';
3
+ /**
4
+ * D1 enforces foreign keys; a Turso database on the new engine (A3.24) starts every connection with them off, and each
5
+ * Hrana request is a new connection. So every request carries the pragma, inside the one transaction libsql opens for
6
+ * it (the new engine applies it there; libSQL has them on already and ignores it inside a transaction).
7
+ */
8
+ const FOREIGN_KEYS_ON = { sql: 'PRAGMA foreign_keys = ON', args: [] };
3
9
  /**
4
10
  * The Turso path (A3.8, plan 05 §3.10): a `D1Database`-compatible executor over a libsql client created with
5
11
  * `intMode: 'bigint'` (integers beyond 2^53 then degrade to the same double D1 returns instead of throwing).
@@ -42,8 +48,9 @@ export function libsqlExecutor(client) {
42
48
  assertBindable(values);
43
49
  return new LibsqlD1Statement(this.sql, values);
44
50
  }
45
- execute() {
46
- return run(() => client.execute({ sql: this.sql, args: this.args }));
51
+ async execute() {
52
+ const [, rs] = await run(() => client.batch([FOREIGN_KEYS_ON, { sql: this.sql, args: this.args }], 'deferred'));
53
+ return rs;
47
54
  }
48
55
  async first(colName) {
49
56
  return pickFirst(toResult(await this.execute()).results, colName);
@@ -68,7 +75,9 @@ export function libsqlExecutor(client) {
68
75
  sql: s.sql,
69
76
  args: s.args,
70
77
  }));
71
- return (await run(() => client.batch(stmts, 'write'))).map((rs) => toResult(rs));
78
+ return (await run(() => client.batch([FOREIGN_KEYS_ON, ...stmts], 'write')))
79
+ .slice(1)
80
+ .map((rs) => toResult(rs));
72
81
  },
73
82
  };
74
83
  }
@@ -79,6 +88,11 @@ function fromLibsqlValue(v) {
79
88
  return Array.from(new Uint8Array(v));
80
89
  return v;
81
90
  }
91
+ /**
92
+ * The new engine (A3.24, recorded 2026-09-24) words the same SQLite failures as `Tursodb error: Runtime error: <msg> (19)`
93
+ * or `Tursodb error: Parse error: <msg>`, and a composite key as `t.(a, b)` where SQLite says `t.a, t.b`.
94
+ */
95
+ const TURSODB_PREFIX = /^Tursodb error: [A-Za-z ]+ error: /;
82
96
  /**
83
97
  * `LibsqlError { code, message: '<CODE>: <sqlite message>' }` → the `D1_ERROR: <sqlite message>: <CODE>` shape. A
84
98
  * remote Turso database (recorded 2026-09-23) also prefixes `SQLite error: `, answers `SQLITE_UNKNOWN` where SQLite
@@ -96,7 +110,13 @@ function mapLibsqlError(e) {
96
110
  const text = err.message
97
111
  .replace(/^((SQLITE_\w+|SQL_PARSE_ERROR|SQL_INPUT_ERROR): )+/, '')
98
112
  .replace(/^SQLite (input )?error: /, '')
99
- .replace(/ \(at offset (\d+)\)$/, ' at offset $1');
113
+ .replace(/ \(at offset (\d+)\)$/, ' at offset $1')
114
+ .replace(TURSODB_PREFIX, '')
115
+ .replace(/ \(\d+\)$/, '')
116
+ .replace(/(\w+)\.\(([^)]+)\)/, (_, t, cols) => cols
117
+ .split(', ')
118
+ .map((c) => `${t}.${c}`)
119
+ .join(', '));
100
120
  const sqliteMessage = `${text}: ${code}`;
101
121
  return new TotalumD1Error('SQL_ERROR', `D1_ERROR: ${sqliteMessage}`, {
102
122
  status: 400,
@@ -0,0 +1,38 @@
1
+ /** Set on every mutating response; while the browser holds it, its reads go to the primary (read-your-writes). */
2
+ export const READ_YOUR_WRITES_COOKIE = '__tlm_d1_w';
3
+ /** Replicas lag the primary by 30–75 ms (Cloudflare); 10 s leaves a wide margin (research 46 §6.3). */
4
+ const WINDOW_SECONDS = 10;
5
+ const READS = new Set(['GET', 'HEAD']);
6
+ /**
7
+ * Runs one request of a Worker with a replicated D1 (A3.23, research 46 §6.3): a `GET`/`HEAD` reads through a
8
+ * `first-unconstrained` session — the nearest replica — unless the browser wrote in the last 10 s; any other method
9
+ * uses the plain binding (writes go to the primary; measured faster than any session) and its response sets the short
10
+ * cookie that sends that browser's next reads to the primary. `run` receives the env to hand to the app, whose
11
+ * `totalumD1()` reads `TOTALUM_DB` from it on every statement. No D1 binding (Turso, a laptop): `run(env)` unchanged.
12
+ */
13
+ export async function withTotalumSession(request, env, run) {
14
+ const db = env.TOTALUM_DB;
15
+ if (typeof db?.withSession !== 'function')
16
+ return run(env);
17
+ const binding = db;
18
+ if (!READS.has(request.method)) {
19
+ const res = await run(env);
20
+ if (res.status === 101)
21
+ return res; // a WebSocket upgrade cannot be re-wrapped
22
+ const out = new Response(res.body, res);
23
+ out.headers.append('set-cookie', `${READ_YOUR_WRITES_COOKIE}=1; Max-Age=${String(WINDOW_SECONDS)}; Path=/; HttpOnly; Secure; SameSite=None; Partitioned`);
24
+ return out;
25
+ }
26
+ const cookies = request.headers.get('cookie') ?? '';
27
+ if (new RegExp(`(?:^|;\\s*)${READ_YOUR_WRITES_COOKIE}=`).test(cookies))
28
+ return run(env);
29
+ const session = binding.withSession('first-unconstrained');
30
+ const replicaDb = {
31
+ prepare: (sql) => session.prepare(sql),
32
+ batch: (statements) => session.batch(statements),
33
+ exec: (sql) => binding.exec(sql),
34
+ dump: () => binding.dump(),
35
+ withSession: (c) => binding.withSession(c),
36
+ };
37
+ return run({ ...env, TOTALUM_DB: replicaDb });
38
+ }
@@ -1,8 +1,8 @@
1
- import { E as EmailSendInput, j as EmailView } from '../_types/integrations.d-Cii20Vl4.js';
2
- export { i as EmailSendOutput } from '../_types/integrations.d-Cii20Vl4.js';
3
- import { T as TotalumClientOptions } from '../_types/errors.d-ZrZKjL3U.js';
4
- export { a as TotalumError, i as isTotalumError } from '../_types/errors.d-ZrZKjL3U.js';
5
- import '../_types/coerce.d-C1KWvgPp.js';
1
+ import { E as EmailSendInput, j as EmailView } from '../_types/integrations.d-BKPWost0.js';
2
+ export { i as EmailSendOutput } from '../_types/integrations.d-BKPWost0.js';
3
+ import { T as TotalumClientOptions } from '../_types/errors.d-yrue1e9O.js';
4
+ export { a as TotalumError, i as isTotalumError } from '../_types/errors.d-yrue1e9O.js';
5
+ import '../_types/coerce.d-RtY2zQyw.js';
6
6
 
7
7
  /**
8
8
  * `totalum.email` (plan 05 §6.4) over SDK-API `/v1/email/*` (scope `email`): Resend, HTML sent byte for byte, charged
@@ -1,8 +1,8 @@
1
- import { F as FileDescriptor, k as FileUploadUrlInput, m as FilesListQuery } from '../_types/integrations.d-Cii20Vl4.js';
2
- export { l as FileUploadUrlOutput, n as FilesPage } from '../_types/integrations.d-Cii20Vl4.js';
1
+ import { F as FileDescriptor, k as FileUploadUrlInput, m as FilesListQuery } from '../_types/integrations.d-BKPWost0.js';
2
+ export { l as FileUploadUrlOutput, n as FilesPage } from '../_types/integrations.d-BKPWost0.js';
3
3
  import { TotalumClientOptions } from '../ai/index.js';
4
- export { a as TotalumError, b as TotalumErrorCode, i as isTotalumError } from '../_types/errors.d-ZrZKjL3U.js';
5
- import '../_types/coerce.d-C1KWvgPp.js';
4
+ export { a as TotalumError, b as TotalumErrorCode, i as isTotalumError } from '../_types/errors.d-yrue1e9O.js';
5
+ import '../_types/coerce.d-RtY2zQyw.js';
6
6
 
7
7
  interface TotalumFilesOptions extends TotalumClientOptions {
8
8
  /** The public files host; default `TOTALUM_FILES_URL`, else `https://files.totalum-project.com` (A10.1). */
package/dist/index.d.ts CHANGED
@@ -17,7 +17,7 @@ export { TotalumPayments } from './payments/index.js';
17
17
  import { totalumPdf } from './pdf/index.js';
18
18
  export { TotalumPdf } from './pdf/index.js';
19
19
  import { totalumRealtime } from './realtime/index.js';
20
- export { RealtimeTicketInput, RealtimeTicketOutput, TotalumRealtime } from './realtime/index.js';
20
+ export { RealtimePublishInput, RealtimePublishOutput, RealtimeTicketInput, RealtimeTicketOutput, TotalumRealtime } from './realtime/index.js';
21
21
  import { totalumScan } from './scan/index.js';
22
22
  export { ScanDocumentResult, TotalumScan } from './scan/index.js';
23
23
  import { totalumSeo } from './seo/index.js';
@@ -28,12 +28,12 @@ import { totalumWeb } from './web/index.js';
28
28
  export { TotalumWeb } from './web/index.js';
29
29
  import { totalumWebhooks } from './webhooks/index.js';
30
30
  export { TotalumWebhookError, TotalumWebhooks, verifyWebhook } from './webhooks/index.js';
31
- export { D1Database, D1DatabaseSession, D1ExecResult, D1PreparedStatement, D1Result, TotalumD1ClientCode, TotalumD1Error, TotalumD1ErrorCode, TotalumD1Options, isTotalumD1Error, totalumD1 } from './d1/index.js';
32
- export { T as TotalumClientOptions, a as TotalumError, b as TotalumErrorCode, i as isTotalumError } from './_types/errors.d-ZrZKjL3U.js';
33
- export { C as CheckoutInput, a as CheckoutOutput, b as CronJob, c as CronJobInput, d as CronJobPatch, e as CronRun, f as CronRunsPage, g as CustomerPortalLinkInput, h as CustomerPortalLinkOutput, E as EmailSendInput, i as EmailSendOutput, j as EmailView, F as FileDescriptor, k as FileUploadUrlInput, l as FileUploadUrlOutput, m as FilesListQuery, n as FilesPage, J as JobCreated, O as OnboardingLinkInput, o as OnboardingLinkOutput, P as PaymentsStatus, p as PdfFromHtmlInput, q as PdfFromUrlInput, r as PdfOutput, S as ScanDocumentInput, s as ScanOcrInput, t as ScanOcrOutput, u as ScreenshotInput, v as ScreenshotOutput, w as SeoIndexNowKey, x as SeoNotifyOutput, y as SpeakInput, z as StoredMedia, T as TranscribeInput, A as TranscribeOutput, W as WebJob, B as WebScrapeOutput, D as WebSearchOutput } from './_types/integrations.d-Cii20Vl4.js';
34
- export { L as LogsPage, S as SiteAnalyticsOutput, a as SiteDimension, b as SiteMetric } from './_types/ops.d-BIgDkhpR.js';
35
- export { W as WebhookConfig, a as WebhookEvent, b as WebhookSecretOutput } from './_types/billing.d-Cj9gNbAW.js';
36
- import './_types/coerce.d-C1KWvgPp.js';
31
+ export { D1Database, D1DatabaseSession, D1ExecResult, D1PreparedStatement, D1Result, READ_YOUR_WRITES_COOKIE, TotalumD1ClientCode, TotalumD1Error, TotalumD1ErrorCode, TotalumD1Options, isTotalumD1Error, totalumD1, withTotalumSession } from './d1/index.js';
32
+ export { T as TotalumClientOptions, a as TotalumError, b as TotalumErrorCode, i as isTotalumError } from './_types/errors.d-yrue1e9O.js';
33
+ export { C as CheckoutInput, a as CheckoutOutput, b as CronJob, c as CronJobInput, d as CronJobPatch, e as CronRun, f as CronRunsPage, g as CustomerPortalLinkInput, h as CustomerPortalLinkOutput, E as EmailSendInput, i as EmailSendOutput, j as EmailView, F as FileDescriptor, k as FileUploadUrlInput, l as FileUploadUrlOutput, m as FilesListQuery, n as FilesPage, J as JobCreated, O as OnboardingLinkInput, o as OnboardingLinkOutput, P as PaymentsStatus, p as PdfFromHtmlInput, q as PdfFromUrlInput, r as PdfOutput, S as ScanDocumentInput, s as ScanOcrInput, t as ScanOcrOutput, u as ScreenshotInput, v as ScreenshotOutput, w as SeoIndexNowKey, x as SeoNotifyOutput, y as SpeakInput, z as StoredMedia, T as TranscribeInput, A as TranscribeOutput, W as WebJob, B as WebScrapeOutput, D as WebSearchOutput } from './_types/integrations.d-BKPWost0.js';
34
+ export { L as LogsPage, S as SiteAnalyticsOutput, a as SiteDimension, b as SiteMetric } from './_types/ops.d-BOMT9yln.js';
35
+ export { W as WebhookConfig, a as WebhookEvent, b as WebhookSecretOutput } from './_types/billing.d-C1exPLN6.js';
36
+ import './_types/coerce.d-RtY2zQyw.js';
37
37
 
38
38
  /** The options of `createTotalum()`: every namespace's options in one object (each falls back to its env var). */
39
39
  type TotalumOptions = TotalumAiOptions & TotalumFilesOptions;
@@ -1,8 +1,8 @@
1
- import { c as LogsQueryInput } from '../_types/ops.d-BIgDkhpR.js';
2
- export { L as LogsPage } from '../_types/ops.d-BIgDkhpR.js';
3
- import { T as TotalumClientOptions } from '../_types/errors.d-ZrZKjL3U.js';
4
- export { a as TotalumError, i as isTotalumError } from '../_types/errors.d-ZrZKjL3U.js';
5
- import '../_types/coerce.d-C1KWvgPp.js';
1
+ import { c as LogsQueryInput } from '../_types/ops.d-BOMT9yln.js';
2
+ export { L as LogsPage } from '../_types/ops.d-BOMT9yln.js';
3
+ import { T as TotalumClientOptions } from '../_types/errors.d-yrue1e9O.js';
4
+ export { a as TotalumError, i as isTotalumError } from '../_types/errors.d-yrue1e9O.js';
5
+ import '../_types/coerce.d-RtY2zQyw.js';
6
6
 
7
7
  /** A `logs.query` filter: the window (default the last hour), level, substring, status class, path, request id, env. */
8
8
  type LogsQuery = Omit<LogsQueryInput, 'caller' | 'runId'>;
@@ -1,8 +1,8 @@
1
- import { O as OnboardingLinkInput, C as CheckoutInput, g as CustomerPortalLinkInput } from '../_types/integrations.d-Cii20Vl4.js';
2
- export { a as CheckoutOutput, h as CustomerPortalLinkOutput, o as OnboardingLinkOutput, P as PaymentsStatus } from '../_types/integrations.d-Cii20Vl4.js';
3
- import { T as TotalumClientOptions } from '../_types/errors.d-ZrZKjL3U.js';
4
- export { a as TotalumError, i as isTotalumError } from '../_types/errors.d-ZrZKjL3U.js';
5
- import '../_types/coerce.d-C1KWvgPp.js';
1
+ import { O as OnboardingLinkInput, C as CheckoutInput, g as CustomerPortalLinkInput } from '../_types/integrations.d-BKPWost0.js';
2
+ export { a as CheckoutOutput, h as CustomerPortalLinkOutput, o as OnboardingLinkOutput, P as PaymentsStatus } from '../_types/integrations.d-BKPWost0.js';
3
+ import { T as TotalumClientOptions } from '../_types/errors.d-yrue1e9O.js';
4
+ export { a as TotalumError, i as isTotalumError } from '../_types/errors.d-yrue1e9O.js';
5
+ import '../_types/coerce.d-RtY2zQyw.js';
6
6
 
7
7
  /**
8
8
  * `totalum.payments` (plan 05, plan 11 §9.5) over SDK-API `/v1/payments/*` with a project key (scope `payments`): Stripe
@@ -1,8 +1,8 @@
1
- import { p as PdfFromHtmlInput, q as PdfFromUrlInput } from '../_types/integrations.d-Cii20Vl4.js';
2
- export { r as PdfOutput } from '../_types/integrations.d-Cii20Vl4.js';
3
- import { T as TotalumClientOptions } from '../_types/errors.d-ZrZKjL3U.js';
4
- export { a as TotalumError, i as isTotalumError } from '../_types/errors.d-ZrZKjL3U.js';
5
- import '../_types/coerce.d-C1KWvgPp.js';
1
+ import { p as PdfFromHtmlInput, q as PdfFromUrlInput } from '../_types/integrations.d-BKPWost0.js';
2
+ export { r as PdfOutput } from '../_types/integrations.d-BKPWost0.js';
3
+ import { T as TotalumClientOptions } from '../_types/errors.d-yrue1e9O.js';
4
+ export { a as TotalumError, i as isTotalumError } from '../_types/errors.d-yrue1e9O.js';
5
+ import '../_types/coerce.d-RtY2zQyw.js';
6
6
 
7
7
  /** `totalum.pdf` (plan 04 §5.5) over `/v1/pdf/*` (scope `files:write`): a new file in the project's storage each time. */
8
8
  declare function totalumPdf(options?: TotalumClientOptions): {
@@ -1,5 +1,5 @@
1
- import { Z as ZodObject, d as ZodString, c as ZodOptional, h as ZodRecord, g as ZodUnknown, m as $strip, j as ZodBoolean, l as ZodInt, o as output, t as ZodISODateTime, T as TotalumClientOptions } from '../_types/errors.d-ZrZKjL3U.js';
2
- export { a as TotalumError, i as isTotalumError } from '../_types/errors.d-ZrZKjL3U.js';
1
+ import { Z as ZodObject, c as ZodOptional, d as ZodString, g as ZodUnknown, m as $strip, o as output, t as ZodISODateTime, l as ZodInt, h as ZodRecord, j as ZodBoolean, T as TotalumClientOptions } from '../_types/errors.d-yrue1e9O.js';
2
+ export { a as TotalumError, i as isTotalumError } from '../_types/errors.d-yrue1e9O.js';
3
3
 
4
4
  /** `POST /v1/realtime/tickets` (scope `realtime`). `ttl` is the join window in seconds, not the session length. */
5
5
  declare const RealtimeTicketInput: ZodObject<{
@@ -32,6 +32,27 @@ declare const RealtimeTicketOutput: ZodObject<{
32
32
  expiresAt: ZodISODateTime;
33
33
  }, $strip>;
34
34
  type RealtimeTicketOutput = output<typeof RealtimeTicketOutput>;
35
+ /**
36
+ * `POST /v1/realtime/rooms/:room/publish` (scope `realtime`; plan 04 §5.16): server-side publish over HTTPS from the
37
+ * app's own routes or a cron job. The room is resolved inside the key's project (A8.6); `identity` defaults to
38
+ * `{id: 'server'}`. Answers `202`.
39
+ */
40
+ declare const RealtimePublishInput: ZodObject<{
41
+ event: ZodOptional<ZodString>;
42
+ data: ZodUnknown;
43
+ identity: ZodOptional<ZodObject<{
44
+ id: ZodString;
45
+ name: ZodOptional<ZodString>;
46
+ }, $strip>>;
47
+ }, $strip>;
48
+ type RealtimePublishInput = output<typeof RealtimePublishInput>;
49
+ /** The delivery confirmation: the message id and the number of sockets it was fanned out to. */
50
+ declare const RealtimePublishOutput: ZodObject<{
51
+ messageId: ZodString;
52
+ at: ZodISODateTime;
53
+ connections: ZodInt;
54
+ }, $strip>;
55
+ type RealtimePublishOutput = output<typeof RealtimePublishOutput>;
35
56
 
36
57
  /**
37
58
  * `totalum.realtime` server side (plan 05 §6.14.1) over SDK-API `/v1/realtime/*` (scope `realtime`). The app's own
@@ -61,8 +82,22 @@ declare function totalumRealtime(options?: TotalumClientOptions): {
61
82
  };
62
83
  expiresAt: string;
63
84
  }>;
85
+ /**
86
+ * Publishes one message to every socket subscribed to `room`, from the app's own server (a route handler, a cron
87
+ * job): no socket needed. Subscribers receive the same `message` frame a socket publish sends, with `event`
88
+ * (default `message`) and `identity` (default `{ id: 'server' }`). Resolves with the message id, its timestamp
89
+ * and the number of sockets it was sent to (`0` when nobody is connected — it is not queued).
90
+ *
91
+ * @example
92
+ * const { connections } = await realtime.publish(`orders:${shopId}`, { event: 'order.created', data: { orderId } });
93
+ */
94
+ publish: (room: string, input: RealtimePublishInput) => Promise<{
95
+ messageId: string;
96
+ at: string;
97
+ connections: number;
98
+ }>;
64
99
  };
65
100
  type TotalumRealtime = ReturnType<typeof totalumRealtime>;
66
101
 
67
- export { RealtimeTicketInput, RealtimeTicketOutput, TotalumClientOptions, totalumRealtime };
102
+ export { RealtimePublishInput, RealtimePublishOutput, RealtimeTicketInput, RealtimeTicketOutput, TotalumClientOptions, totalumRealtime };
68
103
  export type { TotalumRealtime };
@@ -16,5 +16,15 @@ export function totalumRealtime(options = {}) {
16
16
  * const { url } = await realtime.ticket({ room: `chat:${orgId}`, identity: { id: user.id }, permissions: { publish: true } });
17
17
  */
18
18
  ticket: (input) => call('POST', '/v1/realtime/tickets', input),
19
+ /**
20
+ * Publishes one message to every socket subscribed to `room`, from the app's own server (a route handler, a cron
21
+ * job): no socket needed. Subscribers receive the same `message` frame a socket publish sends, with `event`
22
+ * (default `message`) and `identity` (default `{ id: 'server' }`). Resolves with the message id, its timestamp
23
+ * and the number of sockets it was sent to (`0` when nobody is connected — it is not queued).
24
+ *
25
+ * @example
26
+ * const { connections } = await realtime.publish(`orders:${shopId}`, { event: 'order.created', data: { orderId } });
27
+ */
28
+ publish: (room, input) => call('POST', `/v1/realtime/rooms/${encodeURIComponent(room)}/publish`, input),
19
29
  };
20
30
  }
@@ -1,8 +1,8 @@
1
- import { S as ScanDocumentInput, s as ScanOcrInput } from '../_types/integrations.d-Cii20Vl4.js';
2
- export { t as ScanOcrOutput } from '../_types/integrations.d-Cii20Vl4.js';
3
- import { T as TotalumClientOptions } from '../_types/errors.d-ZrZKjL3U.js';
4
- export { a as TotalumError, i as isTotalumError } from '../_types/errors.d-ZrZKjL3U.js';
5
- import '../_types/coerce.d-C1KWvgPp.js';
1
+ import { S as ScanDocumentInput, s as ScanOcrInput } from '../_types/integrations.d-BKPWost0.js';
2
+ export { t as ScanOcrOutput } from '../_types/integrations.d-BKPWost0.js';
3
+ import { T as TotalumClientOptions } from '../_types/errors.d-yrue1e9O.js';
4
+ export { a as TotalumError, i as isTotalumError } from '../_types/errors.d-yrue1e9O.js';
5
+ import '../_types/coerce.d-RtY2zQyw.js';
6
6
 
7
7
  /** The v1 scan result: the extracted fields (one set per page with `processEveryPdfPageAsDifferentScan`) + `metadata`. */
8
8
  interface ScanDocumentResult {
@@ -1,7 +1,7 @@
1
- export { w as SeoIndexNowKey, x as SeoNotifyOutput } from '../_types/integrations.d-Cii20Vl4.js';
2
- import { T as TotalumClientOptions } from '../_types/errors.d-ZrZKjL3U.js';
3
- export { a as TotalumError, i as isTotalumError } from '../_types/errors.d-ZrZKjL3U.js';
4
- import '../_types/coerce.d-C1KWvgPp.js';
1
+ export { w as SeoIndexNowKey, x as SeoNotifyOutput } from '../_types/integrations.d-BKPWost0.js';
2
+ import { T as TotalumClientOptions } from '../_types/errors.d-yrue1e9O.js';
3
+ export { a as TotalumError, i as isTotalumError } from '../_types/errors.d-yrue1e9O.js';
4
+ import '../_types/coerce.d-RtY2zQyw.js';
5
5
 
6
6
  /** `totalum.seo` (plan 05 §6.10) over SDK-API `/v1/seo/*` (scope `seo`): IndexNow for verified custom domains, free. */
7
7
  declare function totalumSeo(options?: TotalumClientOptions): {
@@ -1,8 +1,8 @@
1
- import { T as TranscribeInput, y as SpeakInput, z as StoredMedia } from '../_types/integrations.d-Cii20Vl4.js';
2
- export { A as TranscribeOutput } from '../_types/integrations.d-Cii20Vl4.js';
3
- import { T as TotalumClientOptions } from '../_types/errors.d-ZrZKjL3U.js';
4
- export { a as TotalumError, i as isTotalumError } from '../_types/errors.d-ZrZKjL3U.js';
5
- import '../_types/coerce.d-C1KWvgPp.js';
1
+ import { T as TranscribeInput, y as SpeakInput, z as StoredMedia } from '../_types/integrations.d-BKPWost0.js';
2
+ export { A as TranscribeOutput } from '../_types/integrations.d-BKPWost0.js';
3
+ import { T as TotalumClientOptions } from '../_types/errors.d-yrue1e9O.js';
4
+ export { a as TotalumError, i as isTotalumError } from '../_types/errors.d-yrue1e9O.js';
5
+ import '../_types/coerce.d-RtY2zQyw.js';
6
6
 
7
7
  /** `totalum.speech` (plan 05 §6.8) over `/v1/speech/*` (scope `speech`): OpenRouter speech through Totalum. */
8
8
  declare function totalumSpeech(options?: TotalumClientOptions): {
@@ -1,8 +1,8 @@
1
- import { G as WebScrapeInput, H as WebSearchInput, I as WebMapInput, K as WebCrawlInput, u as ScreenshotInput } from '../_types/integrations.d-Cii20Vl4.js';
2
- export { J as JobCreated, v as ScreenshotOutput, W as WebJob, B as WebScrapeOutput, D as WebSearchOutput } from '../_types/integrations.d-Cii20Vl4.js';
3
- import { T as TotalumClientOptions } from '../_types/errors.d-ZrZKjL3U.js';
4
- export { a as TotalumError, i as isTotalumError } from '../_types/errors.d-ZrZKjL3U.js';
5
- import '../_types/coerce.d-C1KWvgPp.js';
1
+ import { G as WebScrapeInput, H as WebSearchInput, I as WebMapInput, K as WebCrawlInput, u as ScreenshotInput } from '../_types/integrations.d-BKPWost0.js';
2
+ export { J as JobCreated, v as ScreenshotOutput, W as WebJob, B as WebScrapeOutput, D as WebSearchOutput } from '../_types/integrations.d-BKPWost0.js';
3
+ import { T as TotalumClientOptions } from '../_types/errors.d-yrue1e9O.js';
4
+ export { a as TotalumError, i as isTotalumError } from '../_types/errors.d-yrue1e9O.js';
5
+ import '../_types/coerce.d-RtY2zQyw.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
@@ -1,7 +1,7 @@
1
- import { a as WebhookEvent } from '../_types/billing.d-Cj9gNbAW.js';
2
- export { W as WebhookConfig, b as WebhookSecretOutput } from '../_types/billing.d-Cj9gNbAW.js';
3
- import { T as TotalumClientOptions, a as TotalumError } from '../_types/errors.d-ZrZKjL3U.js';
4
- export { i as isTotalumError } from '../_types/errors.d-ZrZKjL3U.js';
1
+ import { a as WebhookEvent } from '../_types/billing.d-C1exPLN6.js';
2
+ export { W as WebhookConfig, b as WebhookSecretOutput } from '../_types/billing.d-C1exPLN6.js';
3
+ import { T as TotalumClientOptions, a as TotalumError } from '../_types/errors.d-yrue1e9O.js';
4
+ export { i as isTotalumError } from '../_types/errors.d-yrue1e9O.js';
5
5
 
6
6
  /** A webhook refusal (plan 05 §7.2): the codes never travel, the app answers 400. */
7
7
  declare class TotalumWebhookError extends TotalumError {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "totalum-sdk",
3
- "version": "0.1.0-dev.5",
3
+ "version": "0.1.0-dev.7",
4
4
  "description": "The SDK generated Totalum apps import: every integration namespace over SDK-API (totalum-sdk, or one subpath each: /files, /ai, /web, …) and totalum-sdk/d1, the D1 driver",
5
5
  "license": "UNLICENSED",
6
6
  "type": "module",