totalum-sdk 0.1.0-dev.9 → 1.0.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 +60 -0
- package/dist/_types/{billing.d-BbSZh1wY.d.ts → billing.d-BcRcDH4Y.d.ts} +1 -1
- package/dist/_types/{coerce.d-C0KIW76L.d.ts → coerce.d-BXj_o-j6.d.ts} +1 -1
- package/dist/_types/{errors.d-Cu3q_E_r.d.ts → errors.d-Dtt-BIwJ.d.ts} +26 -2
- package/dist/_types/{integrations.d-BNGV70e3.d.ts → integrations.d-DjOeFaYn.d.ts} +2 -2
- package/dist/_types/{ops.d-C9375KIG.d.ts → ops.d-BKBWL6Qf.d.ts} +2 -2
- package/dist/ai/index.d.ts +42 -26
- package/dist/ai/index.js +13 -9
- package/dist/analytics/index.d.ts +4 -4
- package/dist/browser/index.d.ts +60 -5
- package/dist/browser/index.js +22 -5
- package/dist/cron/index.d.ts +5 -5
- package/dist/cron/index.js +2 -10
- package/dist/d1/index.d.ts +6 -4
- package/dist/d1/lazy.js +21 -3
- package/dist/d1/session.js +83 -15
- package/dist/deprecate.js +16 -0
- package/dist/email/index.d.ts +12 -6
- package/dist/email/index.js +4 -3
- package/dist/files/index.d.ts +11 -9
- package/dist/files/index.js +10 -5
- package/dist/index.d.ts +11 -8
- package/dist/index.js +3 -0
- package/dist/logs/index.d.ts +5 -5
- package/dist/payments/index.d.ts +5 -5
- package/dist/pdf/index.d.ts +5 -5
- package/dist/realtime/index.d.ts +2 -2
- package/dist/scan/index.d.ts +14 -6
- package/dist/scan/index.js +5 -1
- package/dist/seo/index.d.ts +4 -4
- package/dist/speech/index.d.ts +26 -13
- package/dist/speech/index.js +24 -12
- package/dist/vectors/index.d.ts +167 -0
- package/dist/vectors/index.js +28 -0
- package/dist/web/index.d.ts +6 -6
- package/dist/web/index.js +1 -1
- package/dist/webhooks/index.d.ts +4 -4
- package/package.json +13 -3
- package/totalum-sdk.md +120 -24
- package/totalum-sdk.signatures.json +313 -0
package/dist/seo/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export { w as SeoIndexNowKey, x as SeoNotifyOutput } from '../_types/integrations.d-
|
|
2
|
-
import { T as TotalumClientOptions } from '../_types/errors.d-
|
|
3
|
-
export { a as TotalumError, i as isTotalumError } from '../_types/errors.d-
|
|
4
|
-
import '../_types/coerce.d-
|
|
1
|
+
export { w as SeoIndexNowKey, x as SeoNotifyOutput } from '../_types/integrations.d-DjOeFaYn.js';
|
|
2
|
+
import { T as TotalumClientOptions } from '../_types/errors.d-Dtt-BIwJ.js';
|
|
3
|
+
export { a as TotalumError, b as TotalumErrorCode, i as isTotalumError } from '../_types/errors.d-Dtt-BIwJ.js';
|
|
4
|
+
import '../_types/coerce.d-BXj_o-j6.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,12 +1,25 @@
|
|
|
1
|
-
import { T as TranscribeInput, y as SpeakInput, z as StoredMedia } from '../_types/integrations.d-
|
|
2
|
-
export { A as TranscribeOutput } from '../_types/integrations.d-
|
|
3
|
-
import { T as TotalumClientOptions } from '../_types/errors.d-
|
|
4
|
-
export { a as TotalumError, i as isTotalumError } from '../_types/errors.d-
|
|
5
|
-
import '../_types/coerce.d-
|
|
1
|
+
import { T as TranscribeInput, y as SpeakInput, z as StoredMedia } from '../_types/integrations.d-DjOeFaYn.js';
|
|
2
|
+
export { A as TranscribeOutput } from '../_types/integrations.d-DjOeFaYn.js';
|
|
3
|
+
import { T as TotalumClientOptions } from '../_types/errors.d-Dtt-BIwJ.js';
|
|
4
|
+
export { a as TotalumError, b as TotalumErrorCode, i as isTotalumError } from '../_types/errors.d-Dtt-BIwJ.js';
|
|
5
|
+
import '../_types/coerce.d-BXj_o-j6.js';
|
|
6
6
|
|
|
7
|
+
/** The audio bytes of `synthesize` without `store`, and what the call cost (`usage.credits`, the call's hold). */
|
|
8
|
+
interface SpeechAudio {
|
|
9
|
+
audio: ArrayBuffer;
|
|
10
|
+
contentType: string;
|
|
11
|
+
usage: {
|
|
12
|
+
credits: number;
|
|
13
|
+
};
|
|
14
|
+
/** @deprecated Since 1.0.0: use `usage.credits` (the same number). */
|
|
15
|
+
readonly credits: number;
|
|
16
|
+
}
|
|
7
17
|
/** `totalum.speech` (plan 05 §6.8) over `/v1/speech/*` (scope `speech`): OpenRouter speech through Totalum. */
|
|
8
18
|
declare function totalumSpeech(options?: TotalumClientOptions): {
|
|
9
|
-
/**
|
|
19
|
+
/**
|
|
20
|
+
* Speech to text from `audioBase64` (+ `filename` with its extension) or a `url` — a public one, or a file this
|
|
21
|
+
* project stored; optional language, word timestamps and speakers.
|
|
22
|
+
*/
|
|
10
23
|
transcribe: (input: TranscribeInput) => Promise<{
|
|
11
24
|
text: string;
|
|
12
25
|
durationSec: number;
|
|
@@ -28,14 +41,14 @@ declare function totalumSpeech(options?: TotalumClientOptions): {
|
|
|
28
41
|
end: number;
|
|
29
42
|
}[] | undefined;
|
|
30
43
|
}>;
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
}
|
|
44
|
+
synthesize: {
|
|
45
|
+
(input: SpeakInput & {
|
|
46
|
+
store: true;
|
|
47
|
+
}): Promise<StoredMedia>;
|
|
48
|
+
(input: SpeakInput): Promise<StoredMedia | SpeechAudio>;
|
|
49
|
+
};
|
|
37
50
|
};
|
|
38
51
|
type TotalumSpeech = ReturnType<typeof totalumSpeech>;
|
|
39
52
|
|
|
40
53
|
export { SpeakInput, StoredMedia, TotalumClientOptions, TranscribeInput, totalumSpeech };
|
|
41
|
-
export type { TotalumSpeech };
|
|
54
|
+
export type { SpeechAudio, TotalumSpeech };
|
package/dist/speech/index.js
CHANGED
|
@@ -1,22 +1,34 @@
|
|
|
1
|
+
import { deprecated } from '../deprecate.js';
|
|
1
2
|
import { jsonClient, rawClient } from '../http.js';
|
|
2
3
|
export { TotalumError, isTotalumError } from '../errors.js';
|
|
3
4
|
/** `totalum.speech` (plan 05 §6.8) over `/v1/speech/*` (scope `speech`): OpenRouter speech through Totalum. */
|
|
4
5
|
export function totalumSpeech(options = {}) {
|
|
5
6
|
const call = jsonClient(options);
|
|
6
7
|
const raw = rawClient(options);
|
|
8
|
+
async function synthesize(input) {
|
|
9
|
+
if (input.store)
|
|
10
|
+
return call('POST', '/v1/speech/speak', input);
|
|
11
|
+
const res = await raw('/v1/speech/speak', input);
|
|
12
|
+
const credits = Number(res.headers.get('x-totalum-credits') ?? 0);
|
|
13
|
+
const audio = {
|
|
14
|
+
audio: await res.arrayBuffer(),
|
|
15
|
+
contentType: res.headers.get('content-type') ?? 'audio/mpeg',
|
|
16
|
+
usage: { credits },
|
|
17
|
+
};
|
|
18
|
+
return Object.defineProperty(audio, 'credits', {
|
|
19
|
+
enumerable: true,
|
|
20
|
+
get() {
|
|
21
|
+
deprecated('speech.synthesize().credits', 'speech.synthesize().usage.credits');
|
|
22
|
+
return credits;
|
|
23
|
+
},
|
|
24
|
+
});
|
|
25
|
+
}
|
|
7
26
|
return {
|
|
8
|
-
/**
|
|
27
|
+
/**
|
|
28
|
+
* Speech to text from `audioBase64` (+ `filename` with its extension) or a `url` — a public one, or a file this
|
|
29
|
+
* project stored; optional language, word timestamps and speakers.
|
|
30
|
+
*/
|
|
9
31
|
transcribe: (input) => call('POST', '/v1/speech/transcribe', input),
|
|
10
|
-
|
|
11
|
-
synthesize: async (input) => {
|
|
12
|
-
if (input.store)
|
|
13
|
-
return call('POST', '/v1/speech/speak', input);
|
|
14
|
-
const res = await raw('/v1/speech/speak', input);
|
|
15
|
-
return {
|
|
16
|
-
audio: await res.arrayBuffer(),
|
|
17
|
-
contentType: res.headers.get('content-type') ?? 'audio/mpeg',
|
|
18
|
-
credits: Number(res.headers.get('x-totalum-credits') ?? 0),
|
|
19
|
-
};
|
|
20
|
-
},
|
|
32
|
+
synthesize,
|
|
21
33
|
};
|
|
22
34
|
}
|
|
@@ -0,0 +1,167 @@
|
|
|
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-Dtt-BIwJ.js';
|
|
2
|
+
export { a as TotalumError, b as TotalumErrorCode, i as isTotalumError } from '../_types/errors.d-Dtt-BIwJ.js';
|
|
3
|
+
|
|
4
|
+
/** `text` = the `embed` preset's space; `image` = the `embed-image` preset's text+image space. */
|
|
5
|
+
declare const VectorSpace: ZodEnum<{
|
|
6
|
+
text: "text";
|
|
7
|
+
image: "image";
|
|
8
|
+
}>;
|
|
9
|
+
type VectorSpace = output<typeof VectorSpace>;
|
|
10
|
+
/** ≤ 9 KiB as JSON (Vectorize keeps 10 KiB); keys starting with `_` are reserved. */
|
|
11
|
+
declare const VectorMetadata: ZodRecord<ZodString, ZodUnion<readonly [ZodString, ZodNumber, ZodBoolean, ZodArray<ZodString>]>>;
|
|
12
|
+
type VectorMetadata = output<typeof VectorMetadata>;
|
|
13
|
+
declare const VectorUpsertItem: ZodObject<{
|
|
14
|
+
id: ZodString;
|
|
15
|
+
values: ZodOptional<ZodArray<ZodNumber>>;
|
|
16
|
+
text: ZodOptional<ZodString>;
|
|
17
|
+
image: ZodOptional<ZodString>;
|
|
18
|
+
space: ZodOptional<ZodEnum<{
|
|
19
|
+
text: "text";
|
|
20
|
+
image: "image";
|
|
21
|
+
}>>;
|
|
22
|
+
metadata: ZodOptional<ZodRecord<ZodString, ZodUnion<readonly [ZodString, ZodNumber, ZodBoolean, ZodArray<ZodString>]>>>;
|
|
23
|
+
}, $strip>;
|
|
24
|
+
type VectorUpsertItem = output<typeof VectorUpsertItem>;
|
|
25
|
+
/** A Vectorize metadata filter on `VECTOR_FILTER_KEYS` only. */
|
|
26
|
+
declare const VectorFilter: ZodRecord<ZodEnum<{
|
|
27
|
+
type: "type";
|
|
28
|
+
source: "source";
|
|
29
|
+
page: "page";
|
|
30
|
+
tag: "tag";
|
|
31
|
+
group: "group";
|
|
32
|
+
}> & $partial, ZodUnion<readonly [ZodUnion<readonly [ZodString, ZodNumber, ZodBoolean]>, ZodObject<{
|
|
33
|
+
$eq: ZodOptional<ZodUnion<readonly [ZodString, ZodNumber, ZodBoolean]>>;
|
|
34
|
+
$ne: ZodOptional<ZodUnion<readonly [ZodString, ZodNumber, ZodBoolean]>>;
|
|
35
|
+
$in: ZodOptional<ZodArray<ZodUnion<readonly [ZodString, ZodNumber, ZodBoolean]>>>;
|
|
36
|
+
$nin: ZodOptional<ZodArray<ZodUnion<readonly [ZodString, ZodNumber, ZodBoolean]>>>;
|
|
37
|
+
$lt: ZodOptional<ZodUnion<readonly [ZodNumber, ZodString]>>;
|
|
38
|
+
$lte: ZodOptional<ZodUnion<readonly [ZodNumber, ZodString]>>;
|
|
39
|
+
$gt: ZodOptional<ZodUnion<readonly [ZodNumber, ZodString]>>;
|
|
40
|
+
$gte: ZodOptional<ZodUnion<readonly [ZodNumber, ZodString]>>;
|
|
41
|
+
}, $strict>]>>;
|
|
42
|
+
type VectorFilter = output<typeof VectorFilter>;
|
|
43
|
+
/**
|
|
44
|
+
* `POST /v1/vectors/query`: one of `text`, `values` or `image`. `space: 'image'` searches the images (with `text`,
|
|
45
|
+
* the words are embedded by `embed-image`: image search by text); an `image` query is always in the image space.
|
|
46
|
+
*/
|
|
47
|
+
declare const VectorsQueryInput: ZodObject<{
|
|
48
|
+
text: ZodOptional<ZodString>;
|
|
49
|
+
values: ZodOptional<ZodArray<ZodNumber>>;
|
|
50
|
+
image: ZodOptional<ZodString>;
|
|
51
|
+
space: ZodOptional<ZodEnum<{
|
|
52
|
+
text: "text";
|
|
53
|
+
image: "image";
|
|
54
|
+
}>>;
|
|
55
|
+
topK: ZodOptional<ZodInt>;
|
|
56
|
+
filter: ZodOptional<ZodRecord<ZodEnum<{
|
|
57
|
+
type: "type";
|
|
58
|
+
source: "source";
|
|
59
|
+
page: "page";
|
|
60
|
+
tag: "tag";
|
|
61
|
+
group: "group";
|
|
62
|
+
}> & $partial, ZodUnion<readonly [ZodUnion<readonly [ZodString, ZodNumber, ZodBoolean]>, ZodObject<{
|
|
63
|
+
$eq: ZodOptional<ZodUnion<readonly [ZodString, ZodNumber, ZodBoolean]>>;
|
|
64
|
+
$ne: ZodOptional<ZodUnion<readonly [ZodString, ZodNumber, ZodBoolean]>>;
|
|
65
|
+
$in: ZodOptional<ZodArray<ZodUnion<readonly [ZodString, ZodNumber, ZodBoolean]>>>;
|
|
66
|
+
$nin: ZodOptional<ZodArray<ZodUnion<readonly [ZodString, ZodNumber, ZodBoolean]>>>;
|
|
67
|
+
$lt: ZodOptional<ZodUnion<readonly [ZodNumber, ZodString]>>;
|
|
68
|
+
$lte: ZodOptional<ZodUnion<readonly [ZodNumber, ZodString]>>;
|
|
69
|
+
$gt: ZodOptional<ZodUnion<readonly [ZodNumber, ZodString]>>;
|
|
70
|
+
$gte: ZodOptional<ZodUnion<readonly [ZodNumber, ZodString]>>;
|
|
71
|
+
}, $strict>]>>>;
|
|
72
|
+
includeValues: ZodOptional<ZodBoolean>;
|
|
73
|
+
}, $strip>;
|
|
74
|
+
type VectorsQueryInput = output<typeof VectorsQueryInput>;
|
|
75
|
+
declare const VectorMatch: ZodObject<{
|
|
76
|
+
id: ZodString;
|
|
77
|
+
score: ZodNumber;
|
|
78
|
+
space: ZodEnum<{
|
|
79
|
+
text: "text";
|
|
80
|
+
image: "image";
|
|
81
|
+
}>;
|
|
82
|
+
metadata: ZodOptional<ZodRecord<ZodString, ZodUnion<readonly [ZodString, ZodNumber, ZodBoolean, ZodArray<ZodString>]>>>;
|
|
83
|
+
values: ZodOptional<ZodArray<ZodNumber>>;
|
|
84
|
+
}, $strip>;
|
|
85
|
+
type VectorMatch = output<typeof VectorMatch>;
|
|
86
|
+
declare const VectorRecord: ZodObject<{
|
|
87
|
+
id: ZodString;
|
|
88
|
+
space: ZodEnum<{
|
|
89
|
+
text: "text";
|
|
90
|
+
image: "image";
|
|
91
|
+
}>;
|
|
92
|
+
values: ZodArray<ZodNumber>;
|
|
93
|
+
metadata: ZodOptional<ZodRecord<ZodString, ZodUnion<readonly [ZodString, ZodNumber, ZodBoolean, ZodArray<ZodString>]>>>;
|
|
94
|
+
}, $strip>;
|
|
95
|
+
type VectorRecord = output<typeof VectorRecord>;
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* `totalum.vectors` over `/v1/vectors/*` (scope `vectors`; server-side code only: it needs the project key). Every
|
|
99
|
+
* project environment has its own private vector store: ids, namespaces and indexes are Totalum's, never yours to
|
|
100
|
+
* name, and `x-totalum-env` (the `env` option) keeps dev and live apart. Vectors are 1,024 numbers; `text` is
|
|
101
|
+
* embedded with the `embed` model and `image` (a project file key, a files URL, an https URL or a data URL) with the
|
|
102
|
+
* `embed-image` model, whose space also embeds text: search images by words with `space: 'image'`. Filter on the
|
|
103
|
+
* metadata keys `source`, `type`, `tag`, `group` (strings) and `page` (number).
|
|
104
|
+
*/
|
|
105
|
+
declare function totalumVectors(options?: TotalumClientOptions): {
|
|
106
|
+
/** Inserts or replaces up to 100 vectors (≤ 8 images) from `values`, `text` or `image`, with optional metadata. */
|
|
107
|
+
upsert: (vectors: VectorUpsertItem[]) => Promise<Omit<{
|
|
108
|
+
upserted: number;
|
|
109
|
+
count: number;
|
|
110
|
+
usage: {
|
|
111
|
+
credits: number;
|
|
112
|
+
vendor?: string | undefined;
|
|
113
|
+
units?: number | undefined;
|
|
114
|
+
vendorCostUsd?: number | undefined;
|
|
115
|
+
};
|
|
116
|
+
}, "usage"> & {
|
|
117
|
+
usage: {
|
|
118
|
+
vendor?: string | undefined;
|
|
119
|
+
units?: number | undefined;
|
|
120
|
+
credits: number;
|
|
121
|
+
};
|
|
122
|
+
}>;
|
|
123
|
+
/** The `topK` (≤ 50, default 5) closest vectors to `text`, `values` or `image`, with their metadata. */
|
|
124
|
+
query: (input: VectorsQueryInput) => Promise<{
|
|
125
|
+
matches: VectorMatch[];
|
|
126
|
+
} & {
|
|
127
|
+
usage: {
|
|
128
|
+
vendor?: string | undefined;
|
|
129
|
+
units?: number | undefined;
|
|
130
|
+
credits: number;
|
|
131
|
+
};
|
|
132
|
+
}>;
|
|
133
|
+
/** The stored vectors (values and metadata) of up to 100 ids; unknown ids are left out. */
|
|
134
|
+
get: (ids: string[]) => Promise<{
|
|
135
|
+
id: string;
|
|
136
|
+
space: "text" | "image";
|
|
137
|
+
values: number[];
|
|
138
|
+
metadata?: Record<string, string | number | boolean | string[]> | undefined;
|
|
139
|
+
}[]>;
|
|
140
|
+
/** Deletes up to 1,000 ids; answers how many existed and how many are left. */
|
|
141
|
+
delete: (ids: string[]) => Promise<Omit<{
|
|
142
|
+
deleted: number;
|
|
143
|
+
count: number;
|
|
144
|
+
usage: {
|
|
145
|
+
credits: number;
|
|
146
|
+
vendor?: string | undefined;
|
|
147
|
+
units?: number | undefined;
|
|
148
|
+
vendorCostUsd?: number | undefined;
|
|
149
|
+
};
|
|
150
|
+
}, "usage"> & {
|
|
151
|
+
usage: {
|
|
152
|
+
vendor?: string | undefined;
|
|
153
|
+
units?: number | undefined;
|
|
154
|
+
credits: number;
|
|
155
|
+
};
|
|
156
|
+
}>;
|
|
157
|
+
/** How many vectors this environment stores (free). */
|
|
158
|
+
count: () => Promise<{
|
|
159
|
+
count: number;
|
|
160
|
+
text: number;
|
|
161
|
+
image: number;
|
|
162
|
+
}>;
|
|
163
|
+
};
|
|
164
|
+
type TotalumVectors = ReturnType<typeof totalumVectors>;
|
|
165
|
+
|
|
166
|
+
export { TotalumClientOptions, VectorFilter, VectorMatch, VectorMetadata, VectorRecord, VectorSpace, VectorUpsertItem, VectorsQueryInput, totalumVectors };
|
|
167
|
+
export type { TotalumVectors };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { envelopeClient, jsonClient, withUsage } from '../http.js';
|
|
2
|
+
export { TotalumError, isTotalumError } from '../errors.js';
|
|
3
|
+
/**
|
|
4
|
+
* `totalum.vectors` over `/v1/vectors/*` (scope `vectors`; server-side code only: it needs the project key). Every
|
|
5
|
+
* project environment has its own private vector store: ids, namespaces and indexes are Totalum's, never yours to
|
|
6
|
+
* name, and `x-totalum-env` (the `env` option) keeps dev and live apart. Vectors are 1,024 numbers; `text` is
|
|
7
|
+
* embedded with the `embed` model and `image` (a project file key, a files URL, an https URL or a data URL) with the
|
|
8
|
+
* `embed-image` model, whose space also embeds text: search images by words with `space: 'image'`. Filter on the
|
|
9
|
+
* metadata keys `source`, `type`, `tag`, `group` (strings) and `page` (number).
|
|
10
|
+
*/
|
|
11
|
+
export function totalumVectors(options = {}) {
|
|
12
|
+
const call = envelopeClient(options);
|
|
13
|
+
const data = jsonClient(options);
|
|
14
|
+
return {
|
|
15
|
+
/** Inserts or replaces up to 100 vectors (≤ 8 images) from `values`, `text` or `image`, with optional metadata. */
|
|
16
|
+
upsert: async (vectors) => withUsage(await call('POST', '/v1/vectors/upsert', {
|
|
17
|
+
vectors,
|
|
18
|
+
})),
|
|
19
|
+
/** The `topK` (≤ 50, default 5) closest vectors to `text`, `values` or `image`, with their metadata. */
|
|
20
|
+
query: async (input) => withUsage(await call('POST', '/v1/vectors/query', input)),
|
|
21
|
+
/** The stored vectors (values and metadata) of up to 100 ids; unknown ids are left out. */
|
|
22
|
+
get: async (ids) => (await data('POST', '/v1/vectors/get', { ids })).vectors,
|
|
23
|
+
/** Deletes up to 1,000 ids; answers how many existed and how many are left. */
|
|
24
|
+
delete: async (ids) => withUsage(await call('POST', '/v1/vectors/delete', { ids })),
|
|
25
|
+
/** How many vectors this environment stores (free). */
|
|
26
|
+
count: () => data('GET', '/v1/vectors/count'),
|
|
27
|
+
};
|
|
28
|
+
}
|
package/dist/web/index.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { G as WebScrapeInput, H as WebSearchInput, I as WebMapInput, K as WebCrawlInput, u as ScreenshotInput } from '../_types/integrations.d-
|
|
2
|
-
export { J as JobCreated, v as ScreenshotOutput, W as WebJob, B as WebScrapeOutput, D as WebSearchOutput } from '../_types/integrations.d-
|
|
3
|
-
import { T as TotalumClientOptions } from '../_types/errors.d-
|
|
4
|
-
export { a as TotalumError, i as isTotalumError } from '../_types/errors.d-
|
|
5
|
-
import '../_types/coerce.d-
|
|
1
|
+
import { G as WebScrapeInput, H as WebSearchInput, I as WebMapInput, K as WebCrawlInput, u as ScreenshotInput } from '../_types/integrations.d-DjOeFaYn.js';
|
|
2
|
+
export { J as JobCreated, v as ScreenshotOutput, W as WebJob, B as WebScrapeOutput, D as WebSearchOutput } from '../_types/integrations.d-DjOeFaYn.js';
|
|
3
|
+
import { T as TotalumClientOptions } from '../_types/errors.d-Dtt-BIwJ.js';
|
|
4
|
+
export { a as TotalumError, b as TotalumErrorCode, i as isTotalumError } from '../_types/errors.d-Dtt-BIwJ.js';
|
|
5
|
+
import '../_types/coerce.d-BXj_o-j6.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 ×
|
|
9
|
+
* Run screenshots, charged provider cost × 4 / $0.07 — 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 ×
|
|
5
|
+
* Run screenshots, charged provider cost × 4 / $0.07 — every result carries `usage.credits`.
|
|
6
6
|
*/
|
|
7
7
|
export function totalumWeb(options = {}) {
|
|
8
8
|
const call = envelopeClient(options);
|
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 { i as isTotalumError } from '../_types/errors.d-
|
|
1
|
+
import { a as WebhookEvent } from '../_types/billing.d-BcRcDH4Y.js';
|
|
2
|
+
export { W as WebhookConfig, b as WebhookSecretOutput } from '../_types/billing.d-BcRcDH4Y.js';
|
|
3
|
+
import { T as TotalumClientOptions, a as TotalumError } from '../_types/errors.d-Dtt-BIwJ.js';
|
|
4
|
+
export { b as TotalumErrorCode, i as isTotalumError } from '../_types/errors.d-Dtt-BIwJ.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,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "totalum-sdk",
|
|
3
|
-
"version": "
|
|
4
|
-
"description": "The SDK generated Totalum apps import: every integration namespace over SDK-API (totalum-sdk, or one subpath each: /files, /ai, /web,
|
|
3
|
+
"version": "1.0.0",
|
|
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",
|
|
7
7
|
"packageManager": "pnpm@10.34.5",
|
|
@@ -10,7 +10,9 @@
|
|
|
10
10
|
},
|
|
11
11
|
"files": [
|
|
12
12
|
"dist",
|
|
13
|
-
"totalum-sdk.md"
|
|
13
|
+
"totalum-sdk.md",
|
|
14
|
+
"totalum-sdk.signatures.json",
|
|
15
|
+
"CHANGELOG.md"
|
|
14
16
|
],
|
|
15
17
|
"exports": {
|
|
16
18
|
".": {
|
|
@@ -45,6 +47,10 @@
|
|
|
45
47
|
"types": "./dist/scan/index.d.ts",
|
|
46
48
|
"default": "./dist/scan/index.js"
|
|
47
49
|
},
|
|
50
|
+
"./vectors": {
|
|
51
|
+
"types": "./dist/vectors/index.d.ts",
|
|
52
|
+
"default": "./dist/vectors/index.js"
|
|
53
|
+
},
|
|
48
54
|
"./speech": {
|
|
49
55
|
"types": "./dist/speech/index.d.ts",
|
|
50
56
|
"default": "./dist/speech/index.js"
|
|
@@ -92,7 +98,11 @@
|
|
|
92
98
|
"size": "node scripts/size.mjs",
|
|
93
99
|
"docs": "node scripts/gen-docs.mjs",
|
|
94
100
|
"docs:check": "node scripts/gen-docs.mjs --check",
|
|
101
|
+
"api": "node scripts/api-report.mjs",
|
|
102
|
+
"api:check": "node scripts/api-report.mjs --check",
|
|
103
|
+
"compat": "node scripts/compat.mjs",
|
|
95
104
|
"release:dev": "rm -rf dist && pnpm build && npm publish --tag dev",
|
|
105
|
+
"release:next": "rm -rf dist && pnpm build && pnpm types:check && pnpm api:check && pnpm compat && npm publish --tag next",
|
|
96
106
|
"typecheck": "tsc --noEmit",
|
|
97
107
|
"lint": "eslint . && prettier --check .",
|
|
98
108
|
"format": "prettier --write .",
|