scrapebadger 0.66.0 → 0.67.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/dist/index.d.cts +15 -2
- package/dist/index.d.ts +15 -2
- package/dist/index.js +7 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +7 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -17764,16 +17764,29 @@ declare class LoopNetClient {
|
|
|
17764
17764
|
* Perplexity API client. // --- BEGIN generated by sdk/codegen/facade — do not edit ---
|
|
17765
17765
|
*/
|
|
17766
17766
|
|
|
17767
|
+
/**
|
|
17768
|
+
* Query parameters for the Perplexity GET methods.
|
|
17769
|
+
*
|
|
17770
|
+
* `country` is best-effort: when that market has no exit left, another one
|
|
17771
|
+
* answers and the response `country` says which. Set `strictCountry: true`
|
|
17772
|
+
* to answer only from an exit in `country` (required with it); when none
|
|
17773
|
+
* answers in time the call fails with HTTP 503 `country_unavailable` and is
|
|
17774
|
+
* not billed. On the POST forms, put `strict_country: true` in the body.
|
|
17775
|
+
*/
|
|
17776
|
+
type PerplexityParams = Record<string, string | number | boolean | undefined> & {
|
|
17777
|
+
/** Answer only from an exit in `country`, never another one. Sent only when true. */
|
|
17778
|
+
strictCountry?: boolean;
|
|
17779
|
+
};
|
|
17767
17780
|
/** Client for all Perplexity API operations. (Generated from the OpenAPI spec.) */
|
|
17768
17781
|
declare class PerplexityClient {
|
|
17769
17782
|
private readonly client;
|
|
17770
17783
|
constructor(client: BaseClient);
|
|
17771
17784
|
/** Ask Perplexity a question. Generated from the OpenAPI spec; returns the raw response object. */
|
|
17772
|
-
askPerplexityAQuestion(params?:
|
|
17785
|
+
askPerplexityAQuestion(params?: PerplexityParams): Promise<Record<string, unknown>>;
|
|
17773
17786
|
/** Ask Perplexity a question (POST). Generated from the OpenAPI spec; returns the raw response object. */
|
|
17774
17787
|
askPerplexityAQuestionPost(body?: unknown, params?: Record<string, string | number | boolean | undefined>): Promise<Record<string, unknown>>;
|
|
17775
17788
|
/** Measure a brand's visibility in a Perplexity answer. Generated from the OpenAPI spec; returns the raw response object. */
|
|
17776
|
-
measureABrandSVisibilityInAPerplexityAnswer(params?:
|
|
17789
|
+
measureABrandSVisibilityInAPerplexityAnswer(params?: PerplexityParams): Promise<Record<string, unknown>>;
|
|
17777
17790
|
/** Measure a brand's visibility in a Perplexity answer (POST). Generated from the OpenAPI spec; returns the raw response object. */
|
|
17778
17791
|
measureABrandSVisibilityInAPerplexityAnswerPost(body?: unknown, params?: Record<string, string | number | boolean | undefined>): Promise<Record<string, unknown>>;
|
|
17779
17792
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -17764,16 +17764,29 @@ declare class LoopNetClient {
|
|
|
17764
17764
|
* Perplexity API client. // --- BEGIN generated by sdk/codegen/facade — do not edit ---
|
|
17765
17765
|
*/
|
|
17766
17766
|
|
|
17767
|
+
/**
|
|
17768
|
+
* Query parameters for the Perplexity GET methods.
|
|
17769
|
+
*
|
|
17770
|
+
* `country` is best-effort: when that market has no exit left, another one
|
|
17771
|
+
* answers and the response `country` says which. Set `strictCountry: true`
|
|
17772
|
+
* to answer only from an exit in `country` (required with it); when none
|
|
17773
|
+
* answers in time the call fails with HTTP 503 `country_unavailable` and is
|
|
17774
|
+
* not billed. On the POST forms, put `strict_country: true` in the body.
|
|
17775
|
+
*/
|
|
17776
|
+
type PerplexityParams = Record<string, string | number | boolean | undefined> & {
|
|
17777
|
+
/** Answer only from an exit in `country`, never another one. Sent only when true. */
|
|
17778
|
+
strictCountry?: boolean;
|
|
17779
|
+
};
|
|
17767
17780
|
/** Client for all Perplexity API operations. (Generated from the OpenAPI spec.) */
|
|
17768
17781
|
declare class PerplexityClient {
|
|
17769
17782
|
private readonly client;
|
|
17770
17783
|
constructor(client: BaseClient);
|
|
17771
17784
|
/** Ask Perplexity a question. Generated from the OpenAPI spec; returns the raw response object. */
|
|
17772
|
-
askPerplexityAQuestion(params?:
|
|
17785
|
+
askPerplexityAQuestion(params?: PerplexityParams): Promise<Record<string, unknown>>;
|
|
17773
17786
|
/** Ask Perplexity a question (POST). Generated from the OpenAPI spec; returns the raw response object. */
|
|
17774
17787
|
askPerplexityAQuestionPost(body?: unknown, params?: Record<string, string | number | boolean | undefined>): Promise<Record<string, unknown>>;
|
|
17775
17788
|
/** Measure a brand's visibility in a Perplexity answer. Generated from the OpenAPI spec; returns the raw response object. */
|
|
17776
|
-
measureABrandSVisibilityInAPerplexityAnswer(params?:
|
|
17789
|
+
measureABrandSVisibilityInAPerplexityAnswer(params?: PerplexityParams): Promise<Record<string, unknown>>;
|
|
17777
17790
|
/** Measure a brand's visibility in a Perplexity answer (POST). Generated from the OpenAPI spec; returns the raw response object. */
|
|
17778
17791
|
measureABrandSVisibilityInAPerplexityAnswerPost(body?: unknown, params?: Record<string, string | number | boolean | undefined>): Promise<Record<string, unknown>>;
|
|
17779
17792
|
}
|
package/dist/index.js
CHANGED
|
@@ -9,7 +9,7 @@ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
|
9
9
|
var WebSocket__default = /*#__PURE__*/_interopDefault(WebSocket);
|
|
10
10
|
|
|
11
11
|
// src/internal/version.ts
|
|
12
|
-
var SDK_VERSION = "0.
|
|
12
|
+
var SDK_VERSION = "0.67.0";
|
|
13
13
|
|
|
14
14
|
// src/internal/exceptions.ts
|
|
15
15
|
var ScrapeBadgerError = class _ScrapeBadgerError extends Error {
|
|
@@ -9741,6 +9741,10 @@ var LoopNetClient = class {
|
|
|
9741
9741
|
};
|
|
9742
9742
|
|
|
9743
9743
|
// src/perplexity/client.ts
|
|
9744
|
+
function toQuery(params) {
|
|
9745
|
+
const { strictCountry, ...rest } = params;
|
|
9746
|
+
return strictCountry ? { ...rest, strict_country: true } : rest;
|
|
9747
|
+
}
|
|
9744
9748
|
var PerplexityClient = class {
|
|
9745
9749
|
client;
|
|
9746
9750
|
constructor(client) {
|
|
@@ -9748,7 +9752,7 @@ var PerplexityClient = class {
|
|
|
9748
9752
|
}
|
|
9749
9753
|
/** Ask Perplexity a question. Generated from the OpenAPI spec; returns the raw response object. */
|
|
9750
9754
|
async askPerplexityAQuestion(params = {}) {
|
|
9751
|
-
return this.client.request("/v1/perplexity/ask", { params });
|
|
9755
|
+
return this.client.request("/v1/perplexity/ask", { params: toQuery(params) });
|
|
9752
9756
|
}
|
|
9753
9757
|
/** Ask Perplexity a question (POST). Generated from the OpenAPI spec; returns the raw response object. */
|
|
9754
9758
|
async askPerplexityAQuestionPost(body, params = {}) {
|
|
@@ -9756,7 +9760,7 @@ var PerplexityClient = class {
|
|
|
9756
9760
|
}
|
|
9757
9761
|
/** Measure a brand's visibility in a Perplexity answer. Generated from the OpenAPI spec; returns the raw response object. */
|
|
9758
9762
|
async measureABrandSVisibilityInAPerplexityAnswer(params = {}) {
|
|
9759
|
-
return this.client.request("/v1/perplexity/brand-visibility", { params });
|
|
9763
|
+
return this.client.request("/v1/perplexity/brand-visibility", { params: toQuery(params) });
|
|
9760
9764
|
}
|
|
9761
9765
|
/** Measure a brand's visibility in a Perplexity answer (POST). Generated from the OpenAPI spec; returns the raw response object. */
|
|
9762
9766
|
async measureABrandSVisibilityInAPerplexityAnswerPost(body, params = {}) {
|