totalum-sdk 1.1.0 → 1.3.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.
- package/CHANGELOG.md +34 -0
- package/dist/_types/{billing.d-DWcflg9y.d.ts → billing.d-DYy1h_of.d.ts} +1 -1
- package/dist/_types/{coerce.d-BXj_o-j6.d.ts → coerce.d-C8UzvDNt.d.ts} +1 -1
- package/dist/_types/{errors.d-Dtt-BIwJ.d.ts → errors.d-D9Fn7nvE.d.ts} +16 -0
- package/dist/_types/{integrations.d-DjOeFaYn.d.ts → integrations.d-Cs7J3hnC.d.ts} +56 -4
- package/dist/_types/{ops.d-BKBWL6Qf.d.ts → ops.d-8jPJ2Znp.d.ts} +4 -4
- package/dist/ai/index.d.ts +12 -12
- package/dist/analytics/index.d.ts +4 -4
- package/dist/browser/index.d.ts +28 -4
- package/dist/cron/index.d.ts +5 -5
- package/dist/d1/index.d.ts +2 -2
- package/dist/d1/libsql.js +145 -19
- package/dist/d1/sql.js +14 -3
- package/dist/email/index.d.ts +5 -5
- package/dist/files/index.d.ts +5 -5
- package/dist/http.js +5 -0
- package/dist/index.d.ts +5 -5
- package/dist/logs/index.d.ts +5 -5
- package/dist/payments/index.d.ts +34 -7
- package/dist/payments/index.js +11 -1
- package/dist/pdf/index.d.ts +5 -5
- package/dist/realtime/index.d.ts +2 -2
- package/dist/scan/index.d.ts +5 -5
- package/dist/seo/index.d.ts +4 -4
- package/dist/speech/index.d.ts +5 -5
- package/dist/vectors/index.d.ts +7 -7
- package/dist/web/index.d.ts +5 -5
- package/dist/webhooks/index.d.ts +4 -4
- package/package.json +2 -1
- package/totalum-sdk.md +32 -14
- package/totalum-sdk.signatures.json +15 -7
package/dist/d1/libsql.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { TotalumD1Error } from './errors.js';
|
|
2
|
-
import { assertBindable, pickFirst } from './sql.js';
|
|
2
|
+
import { assertBindable, pickFirst, splitStatements } from './sql.js';
|
|
3
3
|
/**
|
|
4
4
|
* D1 enforces foreign keys; a Turso database on the new engine (A3.24) starts every connection with them off, and each
|
|
5
5
|
* Hrana request is a new connection. So every request carries the pragma, inside the one transaction libsql opens for
|
|
@@ -34,7 +34,21 @@ export function libsqlExecutor(client) {
|
|
|
34
34
|
return await f();
|
|
35
35
|
}
|
|
36
36
|
catch (e) {
|
|
37
|
-
throw mapLibsqlError(e);
|
|
37
|
+
throw mapLibsqlError(e, await primaryKeyOf(e));
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
/** Turso reports no extended code: whether `UNIQUE constraint failed: t.a, t.b` is t's primary key. */
|
|
41
|
+
const primaryKeyOf = async (e) => {
|
|
42
|
+
const err = e;
|
|
43
|
+
const m = typeof err.message === 'string' ? UNIQUE_COLUMNS.exec(sqliteText(err.message)) : null;
|
|
44
|
+
if (err.code !== 'SQLITE_CONSTRAINT' || err.extendedCode !== undefined || !m?.[1] || !m[2])
|
|
45
|
+
return undefined;
|
|
46
|
+
try {
|
|
47
|
+
const [rs] = await client.batch([{ sql: 'SELECT name FROM pragma_table_info(?) WHERE pk > 0 ORDER BY pk', args: [m[1]] }], 'deferred');
|
|
48
|
+
return rs?.rows.map((r) => String(r[0]));
|
|
49
|
+
}
|
|
50
|
+
catch {
|
|
51
|
+
return undefined;
|
|
38
52
|
}
|
|
39
53
|
};
|
|
40
54
|
class LibsqlD1Statement {
|
|
@@ -46,11 +60,11 @@ export function libsqlExecutor(client) {
|
|
|
46
60
|
}
|
|
47
61
|
bind(...values) {
|
|
48
62
|
assertBindable(values);
|
|
49
|
-
return new LibsqlD1Statement(this.sql, values);
|
|
63
|
+
return new LibsqlD1Statement(this.sql, values.map(asD1Binds));
|
|
50
64
|
}
|
|
51
65
|
async execute() {
|
|
52
|
-
const [, rs] = await run(() => client.batch([FOREIGN_KEYS_ON,
|
|
53
|
-
return rs;
|
|
66
|
+
const [, before, rs, after] = await run(() => client.batch([FOREIGN_KEYS_ON, TOTAL_CHANGES, d1Statement(this.sql, this.args), TOTAL_CHANGES], 'deferred'));
|
|
67
|
+
return withChanges(rs, before, after);
|
|
54
68
|
}
|
|
55
69
|
async first(colName) {
|
|
56
70
|
return pickFirst(toResult(await this.execute()).results, colName);
|
|
@@ -71,16 +85,99 @@ export function libsqlExecutor(client) {
|
|
|
71
85
|
return {
|
|
72
86
|
prepare: (sql) => new LibsqlD1Statement(sql),
|
|
73
87
|
async batch(statements) {
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
88
|
+
if (statements.length === 0)
|
|
89
|
+
throw d1Error(NO_STATEMENTS);
|
|
90
|
+
// each statement followed by `total_changes()`: D1's `changes` counts cascade and trigger rows too
|
|
91
|
+
const stmts = statements.flatMap((s) => [
|
|
92
|
+
d1Statement(s.sql, s.args),
|
|
93
|
+
TOTAL_CHANGES,
|
|
94
|
+
]);
|
|
95
|
+
const rs = await run(() => client.batch([FOREIGN_KEYS_ON, TOTAL_CHANGES, ...stmts], 'write'));
|
|
96
|
+
return statements.map((_, i) => toResult(withChanges(rs[2 + 2 * i], rs[1 + 2 * i], rs[3 + 2 * i])));
|
|
81
97
|
},
|
|
82
98
|
};
|
|
83
99
|
}
|
|
100
|
+
const TOTAL_CHANGES = { sql: 'SELECT total_changes()', args: [] };
|
|
101
|
+
/** `changes` as D1 reports it: every row the statement wrote, FK cascades and trigger writes included. */
|
|
102
|
+
function withChanges(rs, before, after) {
|
|
103
|
+
if (!rs)
|
|
104
|
+
throw new Error('libsql answered fewer results than statements');
|
|
105
|
+
const total = (x) => Number(x?.rows[0]?.[0] ?? Number.NaN);
|
|
106
|
+
const delta = total(after) - total(before);
|
|
107
|
+
return Number.isFinite(delta) ? { ...rs, rowsAffected: delta } : rs;
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* A JS value bound the way the D1 binding binds it: every number and boolean as a REAL, NaN / ±Infinity as NULL, and a
|
|
111
|
+
* lone UTF-16 surrogate as three U+FFFD — what D1 reads back (it stores the surrogate's 3 bytes, which decode as three
|
|
112
|
+
* replacement characters); Turso answers HTTP 400 to the unpaired surrogate itself.
|
|
113
|
+
*/
|
|
114
|
+
function asD1Binds(v) {
|
|
115
|
+
if (typeof v === 'string')
|
|
116
|
+
return wellFormed(v);
|
|
117
|
+
if (typeof v === 'boolean')
|
|
118
|
+
return v ? 1 : 0;
|
|
119
|
+
if (typeof v === 'number' && !Number.isFinite(v))
|
|
120
|
+
return null;
|
|
121
|
+
return v;
|
|
122
|
+
}
|
|
123
|
+
/** D1's own limits and refusals (SQLITE_LIMIT_SQL_LENGTH 100 000, SQLITE_LIMIT_VARIABLE_NUMBER 100, no SQL transactions). */
|
|
124
|
+
const MAX_SQL_BYTES = 100_000;
|
|
125
|
+
const MAX_VARIABLES = 100;
|
|
126
|
+
const NO_STATEMENTS = 'No SQL statements detected.';
|
|
127
|
+
const NO_TRANSACTIONS = "To execute a transaction, please use the state.storage.transaction() or state.storage.transactionSync() APIs instead of the SQL BEGIN TRANSACTION or SAVEPOINT statements. The JavaScript API is safer because it will automatically roll back on exceptions, and because it interacts correctly with Durable Objects' automatic atomic write coalescing.";
|
|
128
|
+
const TRANSACTION = /^(begin|commit|end|rollback|savepoint|release)\b/i;
|
|
129
|
+
const LONE_SURROGATE = /[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?<![\uD800-\uDBFF])[\uDC00-\uDFFF]/g;
|
|
130
|
+
const wellFormed = (s) => s.replace(LONE_SURROGATE, '\uFFFD\uFFFD\uFFFD');
|
|
131
|
+
function d1Statement(sql, args) {
|
|
132
|
+
const [first] = splitStatements(sql);
|
|
133
|
+
if (first === undefined)
|
|
134
|
+
throw d1Error(NO_STATEMENTS);
|
|
135
|
+
if (TRANSACTION.test(first))
|
|
136
|
+
throw d1Error(NO_TRANSACTIONS);
|
|
137
|
+
if (new TextEncoder().encode(sql).length > MAX_SQL_BYTES)
|
|
138
|
+
throw d1Error('statement too long: SQLITE_TOOBIG');
|
|
139
|
+
const at = variableOffset(sql, MAX_VARIABLES + 1);
|
|
140
|
+
if (at !== undefined)
|
|
141
|
+
throw d1Error(`too many SQL variables at offset ${String(at)}: SQLITE_ERROR`);
|
|
142
|
+
return { sql: wellFormed(sql), args };
|
|
143
|
+
}
|
|
144
|
+
/** The offset of the n-th `?` parameter outside literals, identifiers and comments (where SQLite stops). */
|
|
145
|
+
function variableOffset(sql, n) {
|
|
146
|
+
let seen = 0;
|
|
147
|
+
for (let i = 0; i < sql.length; i++) {
|
|
148
|
+
const c = sql[i];
|
|
149
|
+
if (c === "'" || c === '"' || c === '`' || c === '[') {
|
|
150
|
+
const close = c === '[' ? ']' : c;
|
|
151
|
+
do
|
|
152
|
+
i = sql.indexOf(close, i + 1);
|
|
153
|
+
while (i !== -1 && close !== ']' && sql[i + 1] === close && ++i);
|
|
154
|
+
if (i === -1)
|
|
155
|
+
return undefined;
|
|
156
|
+
}
|
|
157
|
+
else if (c === '-' && sql[i + 1] === '-') {
|
|
158
|
+
i = sql.indexOf('\n', i);
|
|
159
|
+
if (i === -1)
|
|
160
|
+
return undefined;
|
|
161
|
+
}
|
|
162
|
+
else if (c === '/' && sql[i + 1] === '*') {
|
|
163
|
+
i = sql.indexOf('*/', i + 2);
|
|
164
|
+
if (i === -1)
|
|
165
|
+
return undefined;
|
|
166
|
+
i++;
|
|
167
|
+
}
|
|
168
|
+
else if (c === '?' && ++seen === n)
|
|
169
|
+
return i;
|
|
170
|
+
}
|
|
171
|
+
return undefined;
|
|
172
|
+
}
|
|
173
|
+
/** A failure shaped as the binding throws it: `D1_ERROR: <message>`, SQLite's words again in `cause`. */
|
|
174
|
+
function d1Error(sqliteMessage) {
|
|
175
|
+
const e = new TotalumD1Error('SQL_ERROR', `D1_ERROR: ${sqliteMessage}`, {
|
|
176
|
+
status: 400,
|
|
177
|
+
details: { sqliteMessage },
|
|
178
|
+
});
|
|
179
|
+
return Object.assign(e, { cause: new Error(sqliteMessage) });
|
|
180
|
+
}
|
|
84
181
|
function fromLibsqlValue(v) {
|
|
85
182
|
if (typeof v === 'bigint')
|
|
86
183
|
return Number(v);
|
|
@@ -99,7 +196,7 @@ const TURSODB_PREFIX = /^Tursodb error: [A-Za-z ]+ error: /;
|
|
|
99
196
|
* says `SQLITE_ERROR`, reports name resolution as `SQL_INPUT_ERROR` (`SQLite input error: … (at offset N)`) and its own
|
|
100
197
|
* parser's failures as `SQL_PARSE_ERROR` (wording not SQLite's).
|
|
101
198
|
*/
|
|
102
|
-
function mapLibsqlError(e) {
|
|
199
|
+
function mapLibsqlError(e, primaryKey) {
|
|
103
200
|
const err = e;
|
|
104
201
|
if (typeof err.code !== 'string' || typeof err.message !== 'string')
|
|
105
202
|
return e;
|
|
@@ -107,7 +204,19 @@ function mapLibsqlError(e) {
|
|
|
107
204
|
if (!remote && !err.code.startsWith('SQLITE_'))
|
|
108
205
|
return e;
|
|
109
206
|
const code = remote || err.code === 'SQLITE_UNKNOWN' ? 'SQLITE_ERROR' : err.code;
|
|
110
|
-
const text = err.message
|
|
207
|
+
const text = sqliteText(err.message);
|
|
208
|
+
if (ARGUMENTS_MISMATCH.test(text))
|
|
209
|
+
return d1Error('Wrong number of parameter bindings for SQL query.');
|
|
210
|
+
if (text.startsWith('SQL string does not contain any statement'))
|
|
211
|
+
return d1Error(NO_STATEMENTS);
|
|
212
|
+
if (text.startsWith('SQL not allowed statement'))
|
|
213
|
+
return d1Error('not authorized: SQLITE_AUTH');
|
|
214
|
+
const extended = typeof err.extendedCode === 'string' ? err.extendedCode : extendedCodeOf(code, text, primaryKey);
|
|
215
|
+
return d1Error(`${text}: ${code}${extended && extended !== code ? ` (extended: ${extended})` : ''}`);
|
|
216
|
+
}
|
|
217
|
+
/** The SQLite message inside a libsql / Turso error, in SQLite's own words. */
|
|
218
|
+
function sqliteText(message) {
|
|
219
|
+
return message
|
|
111
220
|
.replace(/^((SQLITE_\w+|SQL_PARSE_ERROR|SQL_INPUT_ERROR): )+/, '')
|
|
112
221
|
.replace(/^SQLite (input )?error: /, '')
|
|
113
222
|
.replace(/ \(at offset (\d+)\)$/, ' at offset $1')
|
|
@@ -117,9 +226,26 @@ function mapLibsqlError(e) {
|
|
|
117
226
|
.split(', ')
|
|
118
227
|
.map((c) => `${t}.${c}`)
|
|
119
228
|
.join(', '));
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
229
|
+
}
|
|
230
|
+
const ARGUMENTS_MISMATCH = /^Input error: Number of arguments mismatch/;
|
|
231
|
+
const UNIQUE_COLUMNS = /UNIQUE constraint failed: (\w+)\.\(?([\w, .]+?)\)?$/;
|
|
232
|
+
/** SQLite's extended constraint code, read from its message (the remote answers only the primary code). */
|
|
233
|
+
function extendedCodeOf(code, text, primaryKey) {
|
|
234
|
+
if (code !== 'SQLITE_CONSTRAINT')
|
|
235
|
+
return undefined;
|
|
236
|
+
if (text.startsWith('FOREIGN KEY constraint failed'))
|
|
237
|
+
return 'SQLITE_CONSTRAINT_FOREIGNKEY';
|
|
238
|
+
if (text.startsWith('CHECK constraint failed'))
|
|
239
|
+
return 'SQLITE_CONSTRAINT_CHECK';
|
|
240
|
+
if (text.startsWith('NOT NULL constraint failed'))
|
|
241
|
+
return 'SQLITE_CONSTRAINT_NOTNULL';
|
|
242
|
+
if (text.startsWith('cannot store '))
|
|
243
|
+
return 'SQLITE_CONSTRAINT_DATATYPE';
|
|
244
|
+
if (!text.startsWith('UNIQUE constraint failed'))
|
|
245
|
+
return undefined;
|
|
246
|
+
const cols = UNIQUE_COLUMNS.exec(text)?.[2]
|
|
247
|
+
?.split(', ')
|
|
248
|
+
.map((c) => c.slice(c.indexOf('.') + 1));
|
|
249
|
+
const isPk = !!cols && !!primaryKey?.length && cols.join(',') === primaryKey.join(',');
|
|
250
|
+
return isPk ? 'SQLITE_CONSTRAINT_PRIMARYKEY' : 'SQLITE_CONSTRAINT_UNIQUE';
|
|
125
251
|
}
|
package/dist/d1/sql.js
CHANGED
|
@@ -9,7 +9,7 @@ export function assertBindable(values) {
|
|
|
9
9
|
v instanceof ArrayBuffer ||
|
|
10
10
|
ArrayBuffer.isView(v);
|
|
11
11
|
if (!ok)
|
|
12
|
-
throw
|
|
12
|
+
throw native('D1_TYPE_ERROR', `Type '${typeof v}' not supported for value '${describe(v)}'`);
|
|
13
13
|
}
|
|
14
14
|
}
|
|
15
15
|
/** The value as D1 prints it in `D1_TYPE_ERROR` (`${value}`). */
|
|
@@ -26,9 +26,18 @@ function describe(v) {
|
|
|
26
26
|
case 'function':
|
|
27
27
|
return 'function';
|
|
28
28
|
default:
|
|
29
|
-
|
|
29
|
+
try {
|
|
30
|
+
return String(v);
|
|
31
|
+
}
|
|
32
|
+
catch {
|
|
33
|
+
return '[object Object]';
|
|
34
|
+
}
|
|
30
35
|
}
|
|
31
36
|
}
|
|
37
|
+
/** An error as the binding throws it: `<CODE>: <message>`, the bare message again in `cause`. */
|
|
38
|
+
function native(code, message) {
|
|
39
|
+
return new Error(`${code}: ${message}`, { cause: new Error(message) });
|
|
40
|
+
}
|
|
32
41
|
/** `first(col)` as the binding does it: `null` on no rows, `D1_COLUMN_NOTFOUND` on an unknown column. */
|
|
33
42
|
export function pickFirst(results, colName) {
|
|
34
43
|
const row = results[0];
|
|
@@ -37,7 +46,9 @@ export function pickFirst(results, colName) {
|
|
|
37
46
|
if (colName === undefined)
|
|
38
47
|
return row;
|
|
39
48
|
if (!isRecord(row) || !(colName in row))
|
|
40
|
-
throw new Error(`D1_COLUMN_NOTFOUND: Column not found (${colName})
|
|
49
|
+
throw new Error(`D1_COLUMN_NOTFOUND: Column not found (${colName})`, {
|
|
50
|
+
cause: new Error('Column not found'),
|
|
51
|
+
});
|
|
41
52
|
return row[colName];
|
|
42
53
|
}
|
|
43
54
|
/**
|
package/dist/email/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { E as EmailSendInput,
|
|
2
|
-
export {
|
|
3
|
-
import { T as TotalumClientOptions } from '../_types/errors.d-
|
|
4
|
-
export { a as TotalumError, b as TotalumErrorCode, i as isTotalumError } from '../_types/errors.d-
|
|
5
|
-
import '../_types/coerce.d-
|
|
1
|
+
import { E as EmailSendInput, k as EmailView } from '../_types/integrations.d-Cs7J3hnC.js';
|
|
2
|
+
export { j as EmailSendOutput } from '../_types/integrations.d-Cs7J3hnC.js';
|
|
3
|
+
import { T as TotalumClientOptions } from '../_types/errors.d-D9Fn7nvE.js';
|
|
4
|
+
export { a as TotalumError, b as TotalumErrorCode, i as isTotalumError } from '../_types/errors.d-D9Fn7nvE.js';
|
|
5
|
+
import '../_types/coerce.d-C8UzvDNt.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
|
package/dist/files/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { F as FileDescriptor,
|
|
2
|
-
export {
|
|
3
|
-
import { T as TotalumClientOptions } from '../_types/errors.d-
|
|
4
|
-
export { a as TotalumError, b as TotalumErrorCode, i as isTotalumError } from '../_types/errors.d-
|
|
5
|
-
import '../_types/coerce.d-
|
|
1
|
+
import { F as FileDescriptor, l as FileUploadUrlInput, n as FilesListQuery } from '../_types/integrations.d-Cs7J3hnC.js';
|
|
2
|
+
export { m as FileUploadUrlOutput, o as FilesPage } from '../_types/integrations.d-Cs7J3hnC.js';
|
|
3
|
+
import { T as TotalumClientOptions } from '../_types/errors.d-D9Fn7nvE.js';
|
|
4
|
+
export { a as TotalumError, b as TotalumErrorCode, i as isTotalumError } from '../_types/errors.d-D9Fn7nvE.js';
|
|
5
|
+
import '../_types/coerce.d-C8UzvDNt.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/http.js
CHANGED
|
@@ -22,6 +22,11 @@ export async function send(options, method, route, body, extra = {}) {
|
|
|
22
22
|
authorization: `Bearer ${projectKey(options)}`,
|
|
23
23
|
'x-totalum-env': envOf(options),
|
|
24
24
|
};
|
|
25
|
+
// which deployment is calling (PGM binds `dev` on the preview Worker, `live` on the published one): payments charge
|
|
26
|
+
// in Stripe live mode only from `live` (plan 11 §9.4)
|
|
27
|
+
const usageEnv = readEnv('TOTALUM_USAGE_ENV');
|
|
28
|
+
if (usageEnv === 'dev' || usageEnv === 'live')
|
|
29
|
+
headers['x-totalum-usage-env'] = usageEnv;
|
|
25
30
|
const form = body instanceof FormData;
|
|
26
31
|
if (body !== undefined && !form)
|
|
27
32
|
headers['content-type'] = 'application/json';
|
package/dist/index.d.ts
CHANGED
|
@@ -31,11 +31,11 @@ export { TotalumWeb } from './web/index.js';
|
|
|
31
31
|
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
|
-
export { T as TotalumClientOptions, a as TotalumError, b as TotalumErrorCode, i as isTotalumError } from './_types/errors.d-
|
|
35
|
-
export { C as CheckoutInput, a as CheckoutOutput, b as
|
|
36
|
-
export { L as LogsPage, S as SiteAnalyticsOutput, a as SiteDimension, b as SiteMetric } from './_types/ops.d-
|
|
37
|
-
export { W as WebhookConfig, a as WebhookEvent, b as WebhookSecretOutput } from './_types/billing.d-
|
|
38
|
-
import './_types/coerce.d-
|
|
34
|
+
export { T as TotalumClientOptions, a as TotalumError, b as TotalumErrorCode, i as isTotalumError } from './_types/errors.d-D9Fn7nvE.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-Cs7J3hnC.js';
|
|
36
|
+
export { L as LogsPage, S as SiteAnalyticsOutput, a as SiteDimension, b as SiteMetric } from './_types/ops.d-8jPJ2Znp.js';
|
|
37
|
+
export { W as WebhookConfig, a as WebhookEvent, b as WebhookSecretOutput } from './_types/billing.d-DYy1h_of.js';
|
|
38
|
+
import './_types/coerce.d-C8UzvDNt.js';
|
|
39
39
|
|
|
40
40
|
/** The options of `createTotalum()`: every namespace's options in one object (each falls back to its env var). */
|
|
41
41
|
type TotalumOptions = TotalumAiOptions & TotalumFilesOptions;
|
package/dist/logs/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { c as LogsQueryInput } from '../_types/ops.d-
|
|
2
|
-
export { L as LogsPage } from '../_types/ops.d-
|
|
3
|
-
import { T as TotalumClientOptions } from '../_types/errors.d-
|
|
4
|
-
export { a as TotalumError, b as TotalumErrorCode, i as isTotalumError } from '../_types/errors.d-
|
|
5
|
-
import '../_types/coerce.d-
|
|
1
|
+
import { c as LogsQueryInput } from '../_types/ops.d-8jPJ2Znp.js';
|
|
2
|
+
export { L as LogsPage } from '../_types/ops.d-8jPJ2Znp.js';
|
|
3
|
+
import { T as TotalumClientOptions } from '../_types/errors.d-D9Fn7nvE.js';
|
|
4
|
+
export { a as TotalumError, b as TotalumErrorCode, i as isTotalumError } from '../_types/errors.d-D9Fn7nvE.js';
|
|
5
|
+
import '../_types/coerce.d-C8UzvDNt.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'>;
|
package/dist/payments/index.d.ts
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import { O as OnboardingLinkInput, C as CheckoutInput,
|
|
2
|
-
export { a as CheckoutOutput,
|
|
3
|
-
import { T as TotalumClientOptions } from '../_types/errors.d-
|
|
4
|
-
export { a as TotalumError, b as TotalumErrorCode, i as isTotalumError } from '../_types/errors.d-
|
|
5
|
-
import '../_types/coerce.d-
|
|
1
|
+
import { O as OnboardingLinkInput, C as CheckoutInput, h as CustomerPortalLinkInput, R as RefundInput } from '../_types/integrations.d-Cs7J3hnC.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-Cs7J3hnC.js';
|
|
3
|
+
import { T as TotalumClientOptions } from '../_types/errors.d-D9Fn7nvE.js';
|
|
4
|
+
export { a as TotalumError, b as TotalumErrorCode, i as isTotalumError } from '../_types/errors.d-D9Fn7nvE.js';
|
|
5
|
+
import '../_types/coerce.d-C8UzvDNt.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
|
|
9
9
|
* Connect direct charges on the project's own connected account. Card data never passes through here — send buyers to
|
|
10
|
-
* the hosted Checkout `url` (SAQ-A); SDK-API refuses card fields with `CARD_DATA_NOT_ACCEPTED`.
|
|
10
|
+
* the hosted Checkout `url` (SAQ-A); SDK-API refuses card fields with `CARD_DATA_NOT_ACCEPTED`. Stripe test mode on the
|
|
11
|
+
* preview and in the sandbox; live mode only on the published site, once the owner onboarded and switched live on.
|
|
11
12
|
*/
|
|
12
13
|
declare function totalumPayments(options?: TotalumClientOptions): {
|
|
13
14
|
/** Whether the project's Stripe account can take payments (charges, payouts, pending requirements). */
|
|
@@ -25,6 +26,8 @@ declare function totalumPayments(options?: TotalumClientOptions): {
|
|
|
25
26
|
eventuallyDue: string[];
|
|
26
27
|
};
|
|
27
28
|
applicationFeeBps: number;
|
|
29
|
+
liveEnabled: boolean;
|
|
30
|
+
disconnectedAt?: string | null | undefined;
|
|
28
31
|
}>;
|
|
29
32
|
/** Stripe's hosted onboarding for the project owner (single use; never for the agent's sandbox key). */
|
|
30
33
|
onboardingLink: (input: OnboardingLinkInput) => Promise<{
|
|
@@ -36,12 +39,36 @@ declare function totalumPayments(options?: TotalumClientOptions): {
|
|
|
36
39
|
id: string;
|
|
37
40
|
url: string;
|
|
38
41
|
}>;
|
|
42
|
+
/**
|
|
43
|
+
* A Checkout Session read back (`paymentStatus: 'paid'`, your `metadata`): the page Stripe returns the buyer to
|
|
44
|
+
* (`successUrl` with `?session_id={CHECKOUT_SESSION_ID}`) confirms the payment with it — no webhook needed.
|
|
45
|
+
*/
|
|
46
|
+
getCheckout: (sessionId: string) => Promise<{
|
|
47
|
+
id: string;
|
|
48
|
+
status: "expired" | "open" | "complete";
|
|
49
|
+
paymentStatus: "paid" | "unpaid" | "no_payment_required";
|
|
50
|
+
amountTotal: number | null;
|
|
51
|
+
currency: string | null;
|
|
52
|
+
metadata: Record<string, string>;
|
|
53
|
+
paymentIntentId: string | null;
|
|
54
|
+
customerEmail: string | null;
|
|
55
|
+
clientReferenceId: string | null;
|
|
56
|
+
}>;
|
|
39
57
|
/** Stripe's hosted portal where a customer manages their subscriptions and saved cards. */
|
|
40
58
|
customerPortalLink: (input: CustomerPortalLinkInput) => Promise<{
|
|
41
59
|
url: string;
|
|
42
60
|
}>;
|
|
61
|
+
refunds: {
|
|
62
|
+
/** Refund a payment (all of it, or `amount` in the smallest unit); Totalum's fee is refunded with it. */
|
|
63
|
+
create: (input: RefundInput) => Promise<{
|
|
64
|
+
id: string;
|
|
65
|
+
status: string;
|
|
66
|
+
amount: number;
|
|
67
|
+
currency: string;
|
|
68
|
+
}>;
|
|
69
|
+
};
|
|
43
70
|
};
|
|
44
71
|
type TotalumPayments = ReturnType<typeof totalumPayments>;
|
|
45
72
|
|
|
46
|
-
export { CheckoutInput, CustomerPortalLinkInput, OnboardingLinkInput, TotalumClientOptions, totalumPayments };
|
|
73
|
+
export { CheckoutInput, CustomerPortalLinkInput, OnboardingLinkInput, RefundInput, TotalumClientOptions, totalumPayments };
|
|
47
74
|
export type { TotalumPayments };
|
package/dist/payments/index.js
CHANGED
|
@@ -3,7 +3,8 @@ export { TotalumError, isTotalumError } from '../errors.js';
|
|
|
3
3
|
/**
|
|
4
4
|
* `totalum.payments` (plan 05, plan 11 §9.5) over SDK-API `/v1/payments/*` with a project key (scope `payments`): Stripe
|
|
5
5
|
* Connect direct charges on the project's own connected account. Card data never passes through here — send buyers to
|
|
6
|
-
* the hosted Checkout `url` (SAQ-A); SDK-API refuses card fields with `CARD_DATA_NOT_ACCEPTED`.
|
|
6
|
+
* the hosted Checkout `url` (SAQ-A); SDK-API refuses card fields with `CARD_DATA_NOT_ACCEPTED`. Stripe test mode on the
|
|
7
|
+
* preview and in the sandbox; live mode only on the published site, once the owner onboarded and switched live on.
|
|
7
8
|
*/
|
|
8
9
|
export function totalumPayments(options = {}) {
|
|
9
10
|
const call = jsonClient(options);
|
|
@@ -14,7 +15,16 @@ export function totalumPayments(options = {}) {
|
|
|
14
15
|
onboardingLink: (input) => call('POST', '/v1/payments/onboarding-link', input),
|
|
15
16
|
/** A hosted Checkout Session: `payment`, `subscription`, or `setup` (save a card for later). Redirect to `url`. */
|
|
16
17
|
createCheckout: (input) => call('POST', '/v1/payments/checkout', input),
|
|
18
|
+
/**
|
|
19
|
+
* A Checkout Session read back (`paymentStatus: 'paid'`, your `metadata`): the page Stripe returns the buyer to
|
|
20
|
+
* (`successUrl` with `?session_id={CHECKOUT_SESSION_ID}`) confirms the payment with it — no webhook needed.
|
|
21
|
+
*/
|
|
22
|
+
getCheckout: (sessionId) => call('GET', `/v1/payments/checkout/${encodeURIComponent(sessionId)}`),
|
|
17
23
|
/** Stripe's hosted portal where a customer manages their subscriptions and saved cards. */
|
|
18
24
|
customerPortalLink: (input) => call('POST', '/v1/payments/customer-portal-link', input),
|
|
25
|
+
refunds: {
|
|
26
|
+
/** Refund a payment (all of it, or `amount` in the smallest unit); Totalum's fee is refunded with it. */
|
|
27
|
+
create: (input) => call('POST', '/v1/payments/refunds', input),
|
|
28
|
+
},
|
|
19
29
|
};
|
|
20
30
|
}
|
package/dist/pdf/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export {
|
|
3
|
-
import { T as TotalumClientOptions } from '../_types/errors.d-
|
|
4
|
-
export { a as TotalumError, b as TotalumErrorCode, i as isTotalumError } from '../_types/errors.d-
|
|
5
|
-
import '../_types/coerce.d-
|
|
1
|
+
import { q as PdfFromHtmlInput, r as PdfFromUrlInput } from '../_types/integrations.d-Cs7J3hnC.js';
|
|
2
|
+
export { s as PdfOutput } from '../_types/integrations.d-Cs7J3hnC.js';
|
|
3
|
+
import { T as TotalumClientOptions } from '../_types/errors.d-D9Fn7nvE.js';
|
|
4
|
+
export { a as TotalumError, b as TotalumErrorCode, i as isTotalumError } from '../_types/errors.d-D9Fn7nvE.js';
|
|
5
|
+
import '../_types/coerce.d-C8UzvDNt.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): {
|
package/dist/realtime/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Z as ZodObject, c as ZodOptional, d as ZodString, g as ZodUnknown, m as $strip, o as output, u as ZodISODateTime, l as ZodInt, h as ZodRecord, j as ZodBoolean, T as TotalumClientOptions } from '../_types/errors.d-
|
|
2
|
-
export { a as TotalumError, b as TotalumErrorCode, i as isTotalumError } from '../_types/errors.d-
|
|
1
|
+
import { Z as ZodObject, c as ZodOptional, d as ZodString, g as ZodUnknown, m as $strip, o as output, u as ZodISODateTime, l as ZodInt, h as ZodRecord, j as ZodBoolean, T as TotalumClientOptions } from '../_types/errors.d-D9Fn7nvE.js';
|
|
2
|
+
export { a as TotalumError, b as TotalumErrorCode, i as isTotalumError } from '../_types/errors.d-D9Fn7nvE.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<{
|
package/dist/scan/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { S as ScanDocumentInput,
|
|
2
|
-
export {
|
|
3
|
-
import { T as TotalumClientOptions } from '../_types/errors.d-
|
|
4
|
-
export { a as TotalumError, b as TotalumErrorCode, i as isTotalumError } from '../_types/errors.d-
|
|
5
|
-
import '../_types/coerce.d-
|
|
1
|
+
import { S as ScanDocumentInput, u as ScanOcrInput } from '../_types/integrations.d-Cs7J3hnC.js';
|
|
2
|
+
export { v as ScanOcrOutput } from '../_types/integrations.d-Cs7J3hnC.js';
|
|
3
|
+
import { T as TotalumClientOptions } from '../_types/errors.d-D9Fn7nvE.js';
|
|
4
|
+
export { a as TotalumError, b as TotalumErrorCode, i as isTotalumError } from '../_types/errors.d-D9Fn7nvE.js';
|
|
5
|
+
import '../_types/coerce.d-C8UzvDNt.js';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* The v1 scan result: the extracted fields (one set per page with `processEveryPdfPageAsDifferentScan`), the v1
|
package/dist/seo/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export {
|
|
2
|
-
import { T as TotalumClientOptions } from '../_types/errors.d-
|
|
3
|
-
export { a as TotalumError, b as TotalumErrorCode, i as isTotalumError } from '../_types/errors.d-
|
|
4
|
-
import '../_types/coerce.d-
|
|
1
|
+
export { y as SeoIndexNowKey, z as SeoNotifyOutput } from '../_types/integrations.d-Cs7J3hnC.js';
|
|
2
|
+
import { T as TotalumClientOptions } from '../_types/errors.d-D9Fn7nvE.js';
|
|
3
|
+
export { a as TotalumError, b as TotalumErrorCode, i as isTotalumError } from '../_types/errors.d-D9Fn7nvE.js';
|
|
4
|
+
import '../_types/coerce.d-C8UzvDNt.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): {
|
package/dist/speech/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { T as TranscribeInput,
|
|
2
|
-
export {
|
|
3
|
-
import { T as TotalumClientOptions } from '../_types/errors.d-
|
|
4
|
-
export { a as TotalumError, b as TotalumErrorCode, i as isTotalumError } from '../_types/errors.d-
|
|
5
|
-
import '../_types/coerce.d-
|
|
1
|
+
import { T as TranscribeInput, A as SpeakInput, B as StoredMedia } from '../_types/integrations.d-Cs7J3hnC.js';
|
|
2
|
+
export { D as TranscribeOutput } from '../_types/integrations.d-Cs7J3hnC.js';
|
|
3
|
+
import { T as TotalumClientOptions } from '../_types/errors.d-D9Fn7nvE.js';
|
|
4
|
+
export { a as TotalumError, b as TotalumErrorCode, i as isTotalumError } from '../_types/errors.d-D9Fn7nvE.js';
|
|
5
|
+
import '../_types/coerce.d-C8UzvDNt.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 {
|
package/dist/vectors/index.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
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 } from '../_types/errors.d-
|
|
2
|
-
export { a as TotalumError, b as TotalumErrorCode, i as isTotalumError } from '../_types/errors.d-
|
|
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 } from '../_types/errors.d-D9Fn7nvE.js';
|
|
2
|
+
export { a as TotalumError, b as TotalumErrorCode, i as isTotalumError } from '../_types/errors.d-D9Fn7nvE.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<{
|
|
6
|
-
text: "text";
|
|
7
6
|
image: "image";
|
|
7
|
+
text: "text";
|
|
8
8
|
}>;
|
|
9
9
|
type VectorSpace = output<typeof VectorSpace>;
|
|
10
10
|
/** ≤ 9 KiB as JSON (Vectorize keeps 10 KiB); keys starting with `_` are reserved. */
|
|
@@ -16,8 +16,8 @@ declare const VectorUpsertItem: ZodObject<{
|
|
|
16
16
|
text: ZodOptional<ZodString>;
|
|
17
17
|
image: ZodOptional<ZodString>;
|
|
18
18
|
space: ZodOptional<ZodEnum<{
|
|
19
|
-
text: "text";
|
|
20
19
|
image: "image";
|
|
20
|
+
text: "text";
|
|
21
21
|
}>>;
|
|
22
22
|
metadata: ZodOptional<ZodRecord<ZodString, ZodUnion<readonly [ZodString, ZodNumber, ZodBoolean, ZodArray<ZodString>]>>>;
|
|
23
23
|
}, $strip>;
|
|
@@ -49,8 +49,8 @@ declare const VectorsQueryInput: ZodObject<{
|
|
|
49
49
|
values: ZodOptional<ZodArray<ZodNumber>>;
|
|
50
50
|
image: ZodOptional<ZodString>;
|
|
51
51
|
space: ZodOptional<ZodEnum<{
|
|
52
|
-
text: "text";
|
|
53
52
|
image: "image";
|
|
53
|
+
text: "text";
|
|
54
54
|
}>>;
|
|
55
55
|
topK: ZodOptional<ZodInt>;
|
|
56
56
|
filter: ZodOptional<ZodRecord<ZodEnum<{
|
|
@@ -76,8 +76,8 @@ declare const VectorMatch: ZodObject<{
|
|
|
76
76
|
id: ZodString;
|
|
77
77
|
score: ZodNumber;
|
|
78
78
|
space: ZodEnum<{
|
|
79
|
-
text: "text";
|
|
80
79
|
image: "image";
|
|
80
|
+
text: "text";
|
|
81
81
|
}>;
|
|
82
82
|
metadata: ZodOptional<ZodRecord<ZodString, ZodUnion<readonly [ZodString, ZodNumber, ZodBoolean, ZodArray<ZodString>]>>>;
|
|
83
83
|
values: ZodOptional<ZodArray<ZodNumber>>;
|
|
@@ -86,8 +86,8 @@ type VectorMatch = output<typeof VectorMatch>;
|
|
|
86
86
|
declare const VectorRecord: ZodObject<{
|
|
87
87
|
id: ZodString;
|
|
88
88
|
space: ZodEnum<{
|
|
89
|
-
text: "text";
|
|
90
89
|
image: "image";
|
|
90
|
+
text: "text";
|
|
91
91
|
}>;
|
|
92
92
|
values: ZodArray<ZodNumber>;
|
|
93
93
|
metadata: ZodOptional<ZodRecord<ZodString, ZodUnion<readonly [ZodString, ZodNumber, ZodBoolean, ZodArray<ZodString>]>>>;
|
package/dist/web/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export { J as JobCreated,
|
|
3
|
-
import { T as TotalumClientOptions } from '../_types/errors.d-
|
|
4
|
-
export { a as TotalumError, b as TotalumErrorCode, i as isTotalumError } from '../_types/errors.d-
|
|
5
|
-
import '../_types/coerce.d-
|
|
1
|
+
import { I as WebScrapeInput, K as WebSearchInput, L as WebMapInput, M as WebCrawlInput, w as ScreenshotInput } from '../_types/integrations.d-Cs7J3hnC.js';
|
|
2
|
+
export { J as JobCreated, x as ScreenshotOutput, W as WebJob, G as WebScrapeOutput, H as WebSearchOutput } from '../_types/integrations.d-Cs7J3hnC.js';
|
|
3
|
+
import { T as TotalumClientOptions } from '../_types/errors.d-D9Fn7nvE.js';
|
|
4
|
+
export { a as TotalumError, b as TotalumErrorCode, i as isTotalumError } from '../_types/errors.d-D9Fn7nvE.js';
|
|
5
|
+
import '../_types/coerce.d-C8UzvDNt.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
|
package/dist/webhooks/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { a as WebhookEvent } from '../_types/billing.d-
|
|
2
|
-
export { W as WebhookConfig, b as WebhookSecretOutput } from '../_types/billing.d-
|
|
3
|
-
import { T as TotalumClientOptions, a as TotalumError } from '../_types/errors.d-
|
|
4
|
-
export { b as TotalumErrorCode, i as isTotalumError } from '../_types/errors.d-
|
|
1
|
+
import { a as WebhookEvent } from '../_types/billing.d-DYy1h_of.js';
|
|
2
|
+
export { W as WebhookConfig, b as WebhookSecretOutput } from '../_types/billing.d-DYy1h_of.js';
|
|
3
|
+
import { T as TotalumClientOptions, a as TotalumError } from '../_types/errors.d-D9Fn7nvE.js';
|
|
4
|
+
export { b as TotalumErrorCode, i as isTotalumError } from '../_types/errors.d-D9Fn7nvE.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": "1.
|
|
3
|
+
"version": "1.3.0",
|
|
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",
|
|
@@ -110,6 +110,7 @@
|
|
|
110
110
|
"test:node": "vitest run --project node",
|
|
111
111
|
"test:workerd": "vitest run --project workerd",
|
|
112
112
|
"test:dev": "vitest run --config test/dev/vitest.config.ts",
|
|
113
|
+
"test:dev-patterns": "vitest run --config test/dev-patterns/vitest.config.ts",
|
|
113
114
|
"prepare": "lefthook install || echo \"lefthook: hooks not installed (git >= 2.31 required)\"",
|
|
114
115
|
"types:check": "node scripts/check-types.mjs"
|
|
115
116
|
},
|