mcpscraper-sdk 0.51.0 → 0.52.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/README.md +5 -4
- package/dist/index.cjs +13 -3
- package/dist/index.d.cts +485 -68
- package/dist/index.d.ts +485 -68
- package/dist/index.js +13 -3
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@ Official TypeScript/JavaScript client for the [mcpscraper.dev](https://mcpscrape
|
|
|
4
4
|
|
|
5
5
|
[Release history](https://github.com/VilovietaSEO/mcpscraper-sdk/blob/main/CHANGELOG.md)
|
|
6
6
|
|
|
7
|
-
This is a thin HTTP client generated against [`../../contracts/scraper.openapi.
|
|
7
|
+
This is a thin HTTP client generated against [`../../contracts/scraper.openapi.generated.json`](../../contracts/scraper.openapi.generated.json), the complete public REST contract for the hosted API. It contains no scraping, proxy, or billing logic — only typed request/response plumbing.
|
|
8
8
|
|
|
9
9
|
## Install
|
|
10
10
|
|
|
@@ -181,14 +181,15 @@ Use `mcpscraper-memory-sdk`'s `MemoryClient` when you prefer its Memory-first na
|
|
|
181
181
|
|
|
182
182
|
## Regenerating types
|
|
183
183
|
|
|
184
|
-
`src/schema.ts` is generated from the OpenAPI
|
|
184
|
+
`src/schema.ts` is generated from the complete OpenAPI projection and checked in. For server-owned Maps search and directory routes, update `contracts/server-rest.v1.json` from the server artifact. Other public routes remain in the curated `contracts/scraper.openapi.yaml` base. Regenerate both language models from the repository root:
|
|
185
185
|
|
|
186
186
|
```bash
|
|
187
|
-
npm run generate
|
|
187
|
+
npm run generate:rest
|
|
188
|
+
npm run verify:rest-contract
|
|
188
189
|
```
|
|
189
190
|
|
|
190
191
|
## See also
|
|
191
192
|
|
|
192
193
|
[Repo README](../../README.md) (multi-language examples with real sample output) · [`mcpscraper-memory-sdk`](../memory) (Node, full 121-tool direct-memory surface) · [`mcpscraper-sdk` on PyPI](https://pypi.org/project/mcpscraper-sdk/) · [`mcpscraper-cli`](../cli)
|
|
193
194
|
|
|
194
|
-
Release changes: [SDK 0.
|
|
195
|
+
Release changes: [SDK 0.52.0 release notes](https://github.com/VilovietaSEO/mcpscraper-sdk/releases/tag/v0.52.0).
|
package/dist/index.cjs
CHANGED
|
@@ -340,7 +340,8 @@ var MapsNamespace = class {
|
|
|
340
340
|
}
|
|
341
341
|
r;
|
|
342
342
|
search(params, options = {}) {
|
|
343
|
-
|
|
343
|
+
const headers = options.idempotencyKey ? { "Idempotency-Key": options.idempotencyKey } : {};
|
|
344
|
+
return this.r.call("POST", "/maps/search", params, headers, options);
|
|
344
345
|
}
|
|
345
346
|
place(params, options = {}) {
|
|
346
347
|
const headers = {
|
|
@@ -386,8 +387,17 @@ var DirectoryNamespace = class {
|
|
|
386
387
|
this.r = r;
|
|
387
388
|
}
|
|
388
389
|
r;
|
|
389
|
-
run(params) {
|
|
390
|
-
return this.r.call(
|
|
390
|
+
run(params, options = {}) {
|
|
391
|
+
return this.r.call(
|
|
392
|
+
"POST",
|
|
393
|
+
"/directory/run",
|
|
394
|
+
params,
|
|
395
|
+
options.idempotencyKey ? { "Idempotency-Key": options.idempotencyKey } : {},
|
|
396
|
+
options
|
|
397
|
+
);
|
|
398
|
+
}
|
|
399
|
+
status(jobId, options = {}) {
|
|
400
|
+
return this.r.call("GET", `/directory/jobs/${encodeURIComponent(jobId)}`, void 0, {}, options);
|
|
391
401
|
}
|
|
392
402
|
};
|
|
393
403
|
var SerpIntelligenceNamespace = class {
|