totalum-sdk 1.11.1 → 1.12.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 +11 -0
- package/dist/_types/{coerce.d-D_rylvPs.d.ts → coerce.d-Cp5NZQN-.d.ts} +1 -1
- package/dist/_types/{errors.d-BPpY5QKu.d.ts → errors.d-ve4rY-Hx.d.ts} +17 -3
- package/dist/_types/{integrations.d-BTZHy48D.d.ts → integrations.d-BRhNKT7K.d.ts} +2 -2
- package/dist/_types/{ops.d-Ce5zJyX0.d.ts → ops.d-DIC4u0go.d.ts} +2 -2
- package/dist/ai/index.d.ts +3 -3
- package/dist/analytics/index.d.ts +4 -4
- package/dist/browser/index.d.ts +22 -4
- package/dist/connections/index.d.ts +2 -2
- package/dist/cron/index.d.ts +5 -5
- package/dist/d1/index.d.ts +2 -2
- package/dist/email/index.d.ts +5 -5
- package/dist/files/index.d.ts +5 -5
- package/dist/index.d.ts +5 -5
- 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 +5 -5
- package/dist/seo/index.d.ts +1082 -8
- package/dist/seo/index.js +289 -4
- package/dist/speech/index.d.ts +5 -5
- package/dist/vectors/index.d.ts +2 -2
- package/dist/web/index.d.ts +5 -5
- package/dist/webhooks/index.d.ts +2 -2
- package/package.json +1 -1
- package/totalum-sdk.md +1509 -14
- package/totalum-sdk.signatures.json +69 -1
package/dist/seo/index.js
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
|
-
import { jsonClient } from '../http.js';
|
|
1
|
+
import { envelopeClient, jsonClient, withUsage } from '../http.js';
|
|
2
2
|
export { TotalumError, isTotalumError } from '../errors.js';
|
|
3
3
|
/**
|
|
4
|
-
* Creates the `seo` namespace (the same object as `totalum.seo`, scope `seo`):
|
|
5
|
-
*
|
|
4
|
+
* Creates the `seo` namespace (the same object as `totalum.seo`, scope `seo`): search and AI-answer research —
|
|
5
|
+
* Google results, AI Overviews and AI Mode, Maps, what ChatGPT, Claude, Gemini and Perplexity answer and cite,
|
|
6
|
+
* keyword ideas and volumes, competitors and keyword gaps, backlinks and on-page analysis — for a country and
|
|
7
|
+
* language (ISO codes, e.g. `es`/`es`), billed in credits (every result carries `usage.credits`); plus IndexNow for
|
|
8
|
+
* verified custom domains, free. The plan limits the research calls per minute and per month.
|
|
6
9
|
*
|
|
7
10
|
* @param options - The project key, API URL and environment; each falls back to its environment variable.
|
|
8
11
|
* @returns The `seo` namespace: the methods below.
|
|
@@ -10,10 +13,12 @@ export { TotalumError, isTotalumError } from '../errors.js';
|
|
|
10
13
|
* import { totalumSeo } from 'totalum-sdk/seo';
|
|
11
14
|
*
|
|
12
15
|
* const seo = totalumSeo();
|
|
13
|
-
* await seo.
|
|
16
|
+
* const { keywords } = await seo.keywords.ideas({ keywords: ['dentista'], country: 'es', language: 'es' });
|
|
14
17
|
*/
|
|
15
18
|
export function totalumSeo(options = {}) {
|
|
16
19
|
const call = jsonClient(options);
|
|
20
|
+
const paid = envelopeClient(options);
|
|
21
|
+
const post = async (route, input) => withUsage(await paid('POST', `/v1/seo/${route}`, input));
|
|
17
22
|
return {
|
|
18
23
|
/**
|
|
19
24
|
* Tells the search engines that use IndexNow (Bing, Yandex, Seznam, Naver, …) that these pages of the project's
|
|
@@ -44,5 +49,285 @@ export function totalumSeo(options = {}) {
|
|
|
44
49
|
* { "key": "99d8cc52…", "keyLocation": "https://acme.totalum.app/99d8cc52….txt" }
|
|
45
50
|
*/
|
|
46
51
|
indexNowKey: () => call('GET', '/v1/seo/indexnow-key'),
|
|
52
|
+
/**
|
|
53
|
+
* The countries and languages the research methods accept, and for each country the languages keyword, domain
|
|
54
|
+
* and AI data exist in (search results take any listed language). Free.
|
|
55
|
+
*
|
|
56
|
+
* @returns Every country and language code.
|
|
57
|
+
* @throws FORBIDDEN_SCOPE (403) The key lacks the `seo` scope.
|
|
58
|
+
* @example
|
|
59
|
+
* const { countries } = await totalum.seo.locations();
|
|
60
|
+
* //=>
|
|
61
|
+
* { "countries": [{ "country": "es", "name": "Spain", "dataLanguages": ["es"] }, …], "languages": [{ "language": "ca", "name": "Catalan" }, …] }
|
|
62
|
+
*/
|
|
63
|
+
locations: () => call('GET', '/v1/seo/locations'),
|
|
64
|
+
serp: {
|
|
65
|
+
/**
|
|
66
|
+
* Google's results for a keyword as searched from a country (or one of its cities), in a language: the organic
|
|
67
|
+
* results, the featured snippet, "People also ask", related searches and the AI Overview with its sources. Use
|
|
68
|
+
* it to see what ranks and what the page that ranks must answer.
|
|
69
|
+
*
|
|
70
|
+
* @param input - The keyword, where it is searched from and how many results.
|
|
71
|
+
* @returns The results page and the credits it cost.
|
|
72
|
+
* @throws SEO_CITY_NOT_FOUND (400) No such city in `country`.
|
|
73
|
+
* @throws NOT_AVAILABLE_IN_COUNTRY (400) No data for that country and language.
|
|
74
|
+
* @throws RATE_LIMIT_EXCEEDED (429) The plan's SEO calls per minute or per month are used up; `details.period`.
|
|
75
|
+
* @throws PROVIDER_TIMEOUT (504) The search took too long; retry.
|
|
76
|
+
* @throws PROVIDER_UNAVAILABLE (503) Search data is unavailable; retry later.
|
|
77
|
+
* @example
|
|
78
|
+
* const page = await totalum.seo.serp.google({ keyword: 'dentista barcelona', country: 'es', language: 'es', city: 'Barcelona' });
|
|
79
|
+
* //=>
|
|
80
|
+
* {
|
|
81
|
+
* "keyword": "dentista barcelona",
|
|
82
|
+
* "totalResults": 3150000,
|
|
83
|
+
* "organic": [{ "position": 1, "title": "Clínica Dental …", "url": "https://www.example.es/", "domain": "www.example.es", "snippet": "…", "breadcrumb": "https://www.example.es" }],
|
|
84
|
+
* "featuredSnippet": null,
|
|
85
|
+
* "peopleAlsoAsk": [{ "question": "¿Cuánto cuesta un empaste en Barcelona?", "answer": null }],
|
|
86
|
+
* "relatedSearches": ["dentista barcelona urgencias"],
|
|
87
|
+
* "aiOverview": null,
|
|
88
|
+
* "usage": { "credits": 0.1429 }
|
|
89
|
+
* }
|
|
90
|
+
*/
|
|
91
|
+
google: (input) => post('serp/google', input),
|
|
92
|
+
/**
|
|
93
|
+
* Google's AI Mode answer for a question and the pages it cites, where Google offers AI Mode.
|
|
94
|
+
*
|
|
95
|
+
* @param input - The question and where it is asked from.
|
|
96
|
+
* @returns The answer, its sources and the credits it cost.
|
|
97
|
+
* @throws NOT_AVAILABLE_IN_COUNTRY (400) Google does not offer AI Mode there, or no data for that country and language.
|
|
98
|
+
* @throws RATE_LIMIT_EXCEEDED (429) The plan's SEO calls per minute or per month are used up; `details.period`.
|
|
99
|
+
* @throws PROVIDER_TIMEOUT (504) The search took too long; retry.
|
|
100
|
+
* @throws PROVIDER_UNAVAILABLE (503) Search data is unavailable; retry later.
|
|
101
|
+
* @example
|
|
102
|
+
* const ai = await totalum.seo.serp.aiMode({ keyword: 'best budgeting apps', country: 'us', language: 'en' });
|
|
103
|
+
* //=>
|
|
104
|
+
* { "keyword": "best budgeting apps", "answer": "Popular choices include …", "sources": [{ "title": "…", "url": "https://…", "domain": "…" }], "usage": { "credits": 0.2858 } }
|
|
105
|
+
*/
|
|
106
|
+
aiMode: (input) => post('serp/google-ai-mode', input),
|
|
107
|
+
/**
|
|
108
|
+
* Google Maps results for a search (local businesses): name, category, address, phone, website, rating and
|
|
109
|
+
* reviews — the local competitors of a business.
|
|
110
|
+
*
|
|
111
|
+
* @param input - The search, where it is made from and how many results.
|
|
112
|
+
* @returns The places, best first, and the credits it cost.
|
|
113
|
+
* @throws SEO_CITY_NOT_FOUND (400) No such city in `country`.
|
|
114
|
+
* @throws NOT_AVAILABLE_IN_COUNTRY (400) No data for that country and language.
|
|
115
|
+
* @throws RATE_LIMIT_EXCEEDED (429) The plan's SEO calls per minute or per month are used up; `details.period`.
|
|
116
|
+
* @throws PROVIDER_TIMEOUT (504) The search took too long; retry.
|
|
117
|
+
* @throws PROVIDER_UNAVAILABLE (503) Search data is unavailable; retry later.
|
|
118
|
+
* @example
|
|
119
|
+
* const { results } = await totalum.seo.serp.maps({ keyword: 'dentista', country: 'es', language: 'es', city: 'Barcelona', depth: 10 });
|
|
120
|
+
* //=>
|
|
121
|
+
* { "keyword": "dentista", "results": [{ "position": 1, "title": "Clínica Dental …", "category": "Dentista", "rating": 4.9, "reviews": 812, … }], "usage": { "credits": 0.1429 } }
|
|
122
|
+
*/
|
|
123
|
+
maps: (input) => post('serp/google-maps', input),
|
|
124
|
+
},
|
|
125
|
+
ai: {
|
|
126
|
+
/**
|
|
127
|
+
* What an AI assistant (ChatGPT, Claude, Gemini or Perplexity) answers to a question, with the web searches it
|
|
128
|
+
* ran, the pages it cited and their domains — to see which brands and sites the AIs recommend (GEO). Among the
|
|
129
|
+
* dearer research calls: ask a few real questions, not dozens.
|
|
130
|
+
*
|
|
131
|
+
* @param input - The question, the assistant and the country its web search runs from.
|
|
132
|
+
* @returns The answer, its sources and the credits it cost.
|
|
133
|
+
* @throws SEO_REQUEST_REJECTED (400) The question or model was refused; `details.field`.
|
|
134
|
+
* @throws RATE_LIMIT_EXCEEDED (429) The plan's SEO calls per minute or per month are used up; `details.period`.
|
|
135
|
+
* @throws PROVIDER_TIMEOUT (504) The answer took too long; retry.
|
|
136
|
+
* @throws PROVIDER_UNAVAILABLE (503) The AI data is unavailable; retry later.
|
|
137
|
+
* @example
|
|
138
|
+
* const a = await totalum.seo.ai.answer({ prompt: 'Mejor clínica dental en Barcelona', platform: 'chatgpt', country: 'es' });
|
|
139
|
+
* //=>
|
|
140
|
+
* { "platform": "chatgpt", "model": "…", "answer": "Algunas de las clínicas mejor valoradas …", "sources": [{ "title": "…", "url": "https://…", "domain": "…" }], "citedDomains": ["www.doctoralia.es"], "searchQueries": ["mejor clínica dental barcelona"], "usage": { "credits": 2.1883 } }
|
|
141
|
+
*/
|
|
142
|
+
answer: (input) => post('ai/answer', input),
|
|
143
|
+
/**
|
|
144
|
+
* ChatGPT's search answer for a query as shown to users in a country: the answer, the sources and search results
|
|
145
|
+
* it showed, and the brands it named.
|
|
146
|
+
*
|
|
147
|
+
* @param input - The query and the country and language.
|
|
148
|
+
* @returns The answer, its sources, brands and the credits it cost.
|
|
149
|
+
* @throws NOT_AVAILABLE_IN_COUNTRY (400) No data for that country and language.
|
|
150
|
+
* @throws RATE_LIMIT_EXCEEDED (429) The plan's SEO calls per minute or per month are used up; `details.period`.
|
|
151
|
+
* @throws PROVIDER_TIMEOUT (504) The answer took too long; retry.
|
|
152
|
+
* @throws PROVIDER_UNAVAILABLE (503) The AI data is unavailable; retry later.
|
|
153
|
+
* @example
|
|
154
|
+
* const s = await totalum.seo.ai.chatgptSearch({ keyword: 'best budgeting app', country: 'us', language: 'en' });
|
|
155
|
+
* //=>
|
|
156
|
+
* { "keyword": "best budgeting app", "answer": "…", "sources": [], "searchResults": [], "brands": [{ "name": "YNAB", "category": "Software" }], "searchQueries": ["best budgeting app 2026"], "usage": { "credits": 0.2858 } }
|
|
157
|
+
*/
|
|
158
|
+
chatgptSearch: (input) => post('ai/chatgpt-search', input),
|
|
159
|
+
/**
|
|
160
|
+
* Where a domain, or a keyword or brand, is mentioned in AI answers (Google's AI Overviews; ChatGPT for the
|
|
161
|
+
* United States in English): the questions and answers, or the most cited domains or pages. Give exactly one
|
|
162
|
+
* of `domain` or `keyword`. The dearest research call: use it once per brand, not per page.
|
|
163
|
+
*
|
|
164
|
+
* @param input - The domain or keyword, the place, the AI and the view.
|
|
165
|
+
* @returns The mentions (or top domains or pages) and the credits it cost.
|
|
166
|
+
* @throws VALIDATION_ERROR (400) Neither or both of `domain` and `keyword`.
|
|
167
|
+
* @throws NOT_AVAILABLE_IN_COUNTRY (400) No data for that country and language.
|
|
168
|
+
* @throws RATE_LIMIT_EXCEEDED (429) The plan's SEO calls per minute or per month are used up; `details.period`.
|
|
169
|
+
* @throws PROVIDER_UNAVAILABLE (503) The AI data is unavailable; retry later.
|
|
170
|
+
* @example
|
|
171
|
+
* const m = await totalum.seo.ai.mentions({ keyword: 'budgeting app', country: 'us', language: 'en', view: 'top-domains', limit: 5 });
|
|
172
|
+
* //=>
|
|
173
|
+
* { "totalCount": 1814, "domains": [{ "domain": "www.nerdwallet.com", "mentions": 416, "aiSearchVolume": 316550 }], "usage": { "credits": 7.5 } }
|
|
174
|
+
*/
|
|
175
|
+
mentions: (input) => post('ai/mentions', input),
|
|
176
|
+
/**
|
|
177
|
+
* How often keywords are asked to AI assistants per month (AI search volume), per keyword.
|
|
178
|
+
*
|
|
179
|
+
* @param input - Up to 1,000 keywords and the place.
|
|
180
|
+
* @returns The AI search volume per keyword and the credits it cost.
|
|
181
|
+
* @throws NOT_AVAILABLE_IN_COUNTRY (400) No data for that country and language.
|
|
182
|
+
* @throws RATE_LIMIT_EXCEEDED (429) The plan's SEO calls per minute or per month are used up; `details.period`.
|
|
183
|
+
* @throws PROVIDER_UNAVAILABLE (503) The AI data is unavailable; retry later.
|
|
184
|
+
* @example
|
|
185
|
+
* const v = await totalum.seo.ai.keywordVolume({ keywords: ['budget planner'], country: 'us', language: 'en' });
|
|
186
|
+
* //=>
|
|
187
|
+
* { "keywords": [{ "keyword": "budget planner", "aiSearchVolume": 3241, "monthlySearches": [{ "year": 2026, "month": 10, "aiSearchVolume": 3241 }] }], "usage": { "credits": 0.7215 } }
|
|
188
|
+
*/
|
|
189
|
+
keywordVolume: (input) => post('ai/keyword-volume', input),
|
|
190
|
+
},
|
|
191
|
+
keywords: {
|
|
192
|
+
/**
|
|
193
|
+
* Keyword ideas around seed keywords (phrases containing the first seed first, then wider ideas), each with its
|
|
194
|
+
* monthly Google search volume, cost per click, competition, difficulty and intent — to choose what a page or an
|
|
195
|
+
* article targets.
|
|
196
|
+
*
|
|
197
|
+
* @param input - Up to 20 seed keywords, the place and how many ideas.
|
|
198
|
+
* @returns The ideas and the credits it cost.
|
|
199
|
+
* @throws NOT_AVAILABLE_IN_COUNTRY (400) No keyword data for that country and language.
|
|
200
|
+
* @throws RATE_LIMIT_EXCEEDED (429) The plan's SEO calls per minute or per month are used up; `details.period`.
|
|
201
|
+
* @throws PROVIDER_UNAVAILABLE (503) Keyword data is unavailable; retry later.
|
|
202
|
+
* @example
|
|
203
|
+
* const { keywords } = await totalum.seo.keywords.ideas({ keywords: ['dentista barcelona'], country: 'es', language: 'es', limit: 20 });
|
|
204
|
+
* //=>
|
|
205
|
+
* { "keywords": [{ "keyword": "dentista barcelona", "searchVolume": 4400, "cpc": 2.1, "competition": 0.4, "competitionLevel": "medium", "difficulty": 31, "intent": "commercial", "trend": { "monthly": 0, "quarterly": 22, "yearly": -18 }, "monthlySearches": [{ "year": 2026, "month": 10, "searchVolume": 4400 }] }], "usage": { "credits": 2.0572 } }
|
|
206
|
+
*/
|
|
207
|
+
ideas: (input) => post('keywords/ideas', input),
|
|
208
|
+
/**
|
|
209
|
+
* The searches Google relates to a keyword ("related searches", followed `depth` hops), with the same data as
|
|
210
|
+
* `ideas` — topic clusters and article ideas.
|
|
211
|
+
*
|
|
212
|
+
* @param input - The keyword, the place, the depth and how many.
|
|
213
|
+
* @returns The related keywords and the credits it cost.
|
|
214
|
+
* @throws NOT_AVAILABLE_IN_COUNTRY (400) No keyword data for that country and language.
|
|
215
|
+
* @throws RATE_LIMIT_EXCEEDED (429) The plan's SEO calls per minute or per month are used up; `details.period`.
|
|
216
|
+
* @throws PROVIDER_UNAVAILABLE (503) Keyword data is unavailable; retry later.
|
|
217
|
+
* @example
|
|
218
|
+
* const { keywords } = await totalum.seo.keywords.related({ keyword: 'emergency fund', country: 'us', language: 'en', limit: 20 });
|
|
219
|
+
* //=>
|
|
220
|
+
* { "keywords": [{ "keyword": "how much emergency fund", "searchVolume": 2900, "difficulty": 22, "intent": "informational", … }], "usage": { "credits": 0.9343 } }
|
|
221
|
+
*/
|
|
222
|
+
related: (input) => post('keywords/related', input),
|
|
223
|
+
/**
|
|
224
|
+
* The search data of keywords you already have (up to 700): volume, cost per click, competition, difficulty,
|
|
225
|
+
* intent and the last 12 months.
|
|
226
|
+
*
|
|
227
|
+
* @param input - The keywords and the place.
|
|
228
|
+
* @returns One row per keyword found and the credits it cost.
|
|
229
|
+
* @throws NOT_AVAILABLE_IN_COUNTRY (400) No keyword data for that country and language.
|
|
230
|
+
* @throws RATE_LIMIT_EXCEEDED (429) The plan's SEO calls per minute or per month are used up; `details.period`.
|
|
231
|
+
* @throws PROVIDER_UNAVAILABLE (503) Keyword data is unavailable; retry later.
|
|
232
|
+
* @example
|
|
233
|
+
* const { keywords } = await totalum.seo.keywords.overview({ keywords: ['implantes dentales barcelona', 'ortodoncia invisible barcelona'], country: 'es', language: 'es' });
|
|
234
|
+
* //=>
|
|
235
|
+
* { "keywords": [{ "keyword": "implantes dentales barcelona", "searchVolume": 1900, "difficulty": 28, … }], "usage": { "credits": 0.8743 } }
|
|
236
|
+
*/
|
|
237
|
+
overview: (input) => post('keywords/overview', input),
|
|
238
|
+
/**
|
|
239
|
+
* Google Trends interest over time (0–100) for up to 5 keywords, worldwide or in a country — seasonality and
|
|
240
|
+
* which wording is rising.
|
|
241
|
+
*
|
|
242
|
+
* @param input - The keywords, the place (optional) and the period.
|
|
243
|
+
* @returns The timeline and the credits it cost.
|
|
244
|
+
* @throws RATE_LIMIT_EXCEEDED (429) The plan's SEO calls per minute or per month are used up; `details.period`.
|
|
245
|
+
* @throws PROVIDER_UNAVAILABLE (503) Trends data is unavailable; retry later.
|
|
246
|
+
* @example
|
|
247
|
+
* const t = await totalum.seo.keywords.trends({ keywords: ['budget app', 'expense tracker'], country: 'us' });
|
|
248
|
+
* //=>
|
|
249
|
+
* { "keywords": ["budget app", "expense tracker"], "timeline": [{ "from": "2025-11-23", "to": "2025-11-29", "values": [71, 40] }], "usage": { "credits": 0.7858 } }
|
|
250
|
+
*/
|
|
251
|
+
trends: (input) => post('keywords/trends', input),
|
|
252
|
+
},
|
|
253
|
+
domain: {
|
|
254
|
+
/**
|
|
255
|
+
* The keywords a domain ranks for on Google in a country, with its position, the ranking URL and the estimated
|
|
256
|
+
* traffic — what a competitor gets its visits from.
|
|
257
|
+
*
|
|
258
|
+
* @param input - The domain, the place and how many keywords.
|
|
259
|
+
* @returns The ranked keywords, best first, and the credits it cost.
|
|
260
|
+
* @throws NOT_AVAILABLE_IN_COUNTRY (400) No data for that country and language.
|
|
261
|
+
* @throws RATE_LIMIT_EXCEEDED (429) The plan's SEO calls per minute or per month are used up; `details.period`.
|
|
262
|
+
* @throws PROVIDER_UNAVAILABLE (503) Domain data is unavailable; retry later.
|
|
263
|
+
* @example
|
|
264
|
+
* const d = await totalum.seo.domain.keywords({ domain: 'example.es', country: 'es', language: 'es', limit: 20 });
|
|
265
|
+
* //=>
|
|
266
|
+
* { "domain": "example.es", "totalCount": 1273, "keywords": [{ "keyword": "…", "position": 1, "url": "https://example.es/p", "traffic": 2.97, "searchVolume": 880, … }], "usage": { "credits": 0.9 } }
|
|
267
|
+
*/
|
|
268
|
+
keywords: (input) => post('domain/keywords', input),
|
|
269
|
+
/**
|
|
270
|
+
* The domains that compete with a domain on Google in a country (most shared keywords first).
|
|
271
|
+
*
|
|
272
|
+
* @param input - The domain, the place and how many competitors.
|
|
273
|
+
* @returns The competitors and the credits it cost.
|
|
274
|
+
* @throws NOT_AVAILABLE_IN_COUNTRY (400) No data for that country and language.
|
|
275
|
+
* @throws RATE_LIMIT_EXCEEDED (429) The plan's SEO calls per minute or per month are used up; `details.period`.
|
|
276
|
+
* @throws PROVIDER_UNAVAILABLE (503) Domain data is unavailable; retry later.
|
|
277
|
+
* @example
|
|
278
|
+
* const c = await totalum.seo.domain.competitors({ domain: 'example.es', country: 'es', language: 'es', limit: 5 });
|
|
279
|
+
* //=>
|
|
280
|
+
* { "domain": "example.es", "competitors": [{ "domain": "rival.es", "sharedKeywords": 540, "avgPosition": 18.2, "organicKeywords": 9000, "traffic": 12000 }], "usage": { "credits": 0.9086 } }
|
|
281
|
+
*/
|
|
282
|
+
competitors: (input) => post('domain/competitors', input),
|
|
283
|
+
/**
|
|
284
|
+
* The keyword gap between a domain and a competitor: the keywords the competitor ranks for and the domain does
|
|
285
|
+
* not (`missing`), or that both rank for (`shared`).
|
|
286
|
+
*
|
|
287
|
+
* @param input - The domain, the competitor, the place, the mode and how many.
|
|
288
|
+
* @returns The keywords with both positions and the credits it cost.
|
|
289
|
+
* @throws NOT_AVAILABLE_IN_COUNTRY (400) No data for that country and language.
|
|
290
|
+
* @throws RATE_LIMIT_EXCEEDED (429) The plan's SEO calls per minute or per month are used up; `details.period`.
|
|
291
|
+
* @throws PROVIDER_UNAVAILABLE (503) Domain data is unavailable; retry later.
|
|
292
|
+
* @example
|
|
293
|
+
* const g = await totalum.seo.domain.keywordGap({ domain: 'example.es', competitor: 'rival.es', country: 'es', language: 'es' });
|
|
294
|
+
* //=>
|
|
295
|
+
* { "domain": "example.es", "competitor": "rival.es", "keywords": [{ "keyword": "…", "competitorPosition": 3, "competitorUrl": "https://rival.es/p", "domainPosition": null, "domainUrl": null, … }], "usage": { "credits": 0.9 } }
|
|
296
|
+
*/
|
|
297
|
+
keywordGap: (input) => post('domain/keyword-gap', input),
|
|
298
|
+
/**
|
|
299
|
+
* A domain's backlink profile: authority rank, backlinks, referring domains, spam score and where its links come
|
|
300
|
+
* from.
|
|
301
|
+
*
|
|
302
|
+
* @param input - The domain.
|
|
303
|
+
* @returns The summary and the credits it cost.
|
|
304
|
+
* @throws RATE_LIMIT_EXCEEDED (429) The plan's SEO calls per minute or per month are used up; `details.period`.
|
|
305
|
+
* @throws PROVIDER_UNAVAILABLE (503) Backlink data is unavailable; retry later.
|
|
306
|
+
* @example
|
|
307
|
+
* const b = await totalum.seo.domain.backlinks({ domain: 'example.es' });
|
|
308
|
+
* //=>
|
|
309
|
+
* { "domain": "example.es", "rank": 212, "backlinks": 667, "referringDomains": 235, "spamScore": 11, …, "usage": { "credits": 1.7169 } }
|
|
310
|
+
*/
|
|
311
|
+
backlinks: (input) => post('domain/backlinks-summary', input),
|
|
312
|
+
},
|
|
313
|
+
page: {
|
|
314
|
+
/**
|
|
315
|
+
* Reads one public page as a search engine does: title, description, canonical, headings, word count, links,
|
|
316
|
+
* images, structured data, social tags, an on-page score with the issues found, and its main text by section —
|
|
317
|
+
* the structure of a page that ranks.
|
|
318
|
+
*
|
|
319
|
+
* @param input - The page's URL.
|
|
320
|
+
* @returns The page analysis and the credits it cost.
|
|
321
|
+
* @throws SEO_REQUEST_REJECTED (400) The page could not be read; `details.field`.
|
|
322
|
+
* @throws RATE_LIMIT_EXCEEDED (429) The plan's SEO calls per minute or per month are used up; `details.period`.
|
|
323
|
+
* @throws PROVIDER_TIMEOUT (504) The page took too long; retry.
|
|
324
|
+
* @throws PROVIDER_UNAVAILABLE (503) Page analysis is unavailable; retry later.
|
|
325
|
+
* @example
|
|
326
|
+
* const p = await totalum.seo.page.analyze({ url: 'https://www.example.es/' });
|
|
327
|
+
* //=>
|
|
328
|
+
* { "url": "https://www.example.es/", "statusCode": 200, "title": "Ejemplo", "headings": { "h1": ["Ejemplo"], "h2": ["…"], "h3": [] }, "wordCount": 2418, "hasStructuredData": true, "score": 91.59, "issues": ["title_too_long"], "content": [{ "heading": "Ejemplo", "level": 1, "text": "…" }], …, "usage": { "credits": 0.0215 } }
|
|
329
|
+
*/
|
|
330
|
+
analyze: (input) => post('page/analyze', input),
|
|
331
|
+
},
|
|
47
332
|
};
|
|
48
333
|
}
|
package/dist/speech/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { T as TranscribeInput, A as SpeakInput, B as StoredMedia } from '../_types/integrations.d-
|
|
2
|
-
export { H as TranscribeOutput } from '../_types/integrations.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 { T as TranscribeInput, A as SpeakInput, B as StoredMedia } from '../_types/integrations.d-BRhNKT7K.js';
|
|
2
|
+
export { H as TranscribeOutput } from '../_types/integrations.d-BRhNKT7K.js';
|
|
3
|
+
import { T as TotalumClientOptions } from '../_types/errors.d-ve4rY-Hx.js';
|
|
4
|
+
export { a as TotalumError, b as TotalumErrorCode, i as isTotalumError } from '../_types/errors.d-ve4rY-Hx.js';
|
|
5
|
+
import '../_types/coerce.d-Cp5NZQN-.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,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,
|
|
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, A as $strict, T as TotalumClientOptions, U as Usage } from '../_types/errors.d-ve4rY-Hx.js';
|
|
2
|
+
export { a as TotalumError, b as TotalumErrorCode, i as isTotalumError } from '../_types/errors.d-ve4rY-Hx.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<{
|
package/dist/web/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { T as TotalumClientOptions, U as Usage } from '../_types/errors.d-
|
|
2
|
-
export { a as TotalumError, b as TotalumErrorCode, i as isTotalumError } from '../_types/errors.d-
|
|
3
|
-
import { L as WebScrapeInput, M as WebSearchInput, N as WebMapInput, Q as WebCrawlInput, w as ScreenshotInput } from '../_types/integrations.d-
|
|
4
|
-
export { J as JobCreated, x as ScreenshotOutput, W as WebJob, I as WebScrapeOutput, K as WebSearchOutput } from '../_types/integrations.d-
|
|
5
|
-
import '../_types/coerce.d-
|
|
1
|
+
import { T as TotalumClientOptions, U as Usage } from '../_types/errors.d-ve4rY-Hx.js';
|
|
2
|
+
export { a as TotalumError, b as TotalumErrorCode, i as isTotalumError } from '../_types/errors.d-ve4rY-Hx.js';
|
|
3
|
+
import { L as WebScrapeInput, M as WebSearchInput, N as WebMapInput, Q as WebCrawlInput, w as ScreenshotInput } from '../_types/integrations.d-BRhNKT7K.js';
|
|
4
|
+
export { J as JobCreated, x as ScreenshotOutput, W as WebJob, I as WebScrapeOutput, K as WebSearchOutput } from '../_types/integrations.d-BRhNKT7K.js';
|
|
5
|
+
import '../_types/coerce.d-Cp5NZQN-.js';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* Creates the `web` namespace (the same object as `totalum.web`, scope `web`): scrape, search, map, crawl and
|
package/dist/webhooks/index.d.ts
CHANGED
|
@@ -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-
|
|
2
|
-
export { b as TotalumErrorCode, i as isTotalumError } from '../_types/errors.d-
|
|
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-ve4rY-Hx.js';
|
|
2
|
+
export { b as TotalumErrorCode, i as isTotalumError } from '../_types/errors.d-ve4rY-Hx.js';
|
|
3
3
|
|
|
4
4
|
/** The delivery body: `{id, type, createdAt, projectId, env, livemode?, data}`, idempotent by `id`. */
|
|
5
5
|
declare const WebhookEvent: ZodObject<{
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "totalum-sdk",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.12.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",
|