@spyglasshq/sdk 0.1.9 → 0.1.11
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 +30 -14
- package/dist/cjs/BaseClient.d.ts +4 -4
- package/dist/cjs/BaseClient.js +7 -7
- package/dist/cjs/Client.d.ts +13 -13
- package/dist/cjs/Client.js +46 -64
- package/dist/cjs/api/client/index.d.ts +1 -1
- package/dist/cjs/api/client/requests/SearchBrandsRequest.d.ts +4 -4
- package/dist/cjs/api/client/requests/SearchBrandsRequest.js +6 -6
- package/dist/cjs/api/client/requests/SearchCreatorsRequest.d.ts +4 -4
- package/dist/cjs/api/client/requests/SearchCreatorsRequest.js +174 -174
- package/dist/cjs/api/client/requests/SearchMediaRequest.d.ts +6 -2
- package/dist/cjs/api/client/requests/SearchMediaRequest.js +227 -223
- package/dist/cjs/api/client/requests/index.d.ts +5 -5
- package/dist/cjs/api/errors/BadRequestError.d.ts +3 -3
- package/dist/cjs/api/errors/BadRequestError.js +2 -2
- package/dist/cjs/api/errors/ContentTooLargeError.d.ts +3 -3
- package/dist/cjs/api/errors/ContentTooLargeError.js +2 -2
- package/dist/cjs/api/errors/ForbiddenError.d.ts +3 -3
- package/dist/cjs/api/errors/ForbiddenError.js +2 -2
- package/dist/cjs/api/errors/InternalServerError.d.ts +3 -3
- package/dist/cjs/api/errors/InternalServerError.js +2 -2
- package/dist/cjs/api/errors/MethodNotAllowedError.d.ts +3 -3
- package/dist/cjs/api/errors/MethodNotAllowedError.js +2 -2
- package/dist/cjs/api/errors/NotFoundError.d.ts +3 -3
- package/dist/cjs/api/errors/NotFoundError.js +2 -2
- package/dist/cjs/api/errors/PaymentRequiredError.d.ts +3 -3
- package/dist/cjs/api/errors/PaymentRequiredError.js +2 -2
- package/dist/cjs/api/errors/TooManyRequestsError.d.ts +3 -3
- package/dist/cjs/api/errors/TooManyRequestsError.js +2 -2
- package/dist/cjs/api/errors/UnauthorizedError.d.ts +3 -3
- package/dist/cjs/api/errors/UnauthorizedError.js +2 -2
- package/dist/cjs/api/errors/index.d.ts +9 -9
- package/dist/cjs/api/index.d.ts +4 -4
- package/dist/cjs/api/resources/account/client/Client.d.ts +67 -7
- package/dist/cjs/api/resources/account/client/Client.js +208 -42
- package/dist/cjs/api/resources/account/client/index.d.ts +1 -1
- package/dist/cjs/api/resources/account/client/requests/CampaignsAccountRequest.d.ts +18 -0
- package/dist/cjs/api/resources/account/client/requests/CampaignsAccountRequest.js +3 -0
- package/dist/cjs/api/resources/account/client/requests/CollabsAccountRequest.d.ts +12 -0
- package/dist/cjs/api/resources/account/client/requests/CollabsAccountRequest.js +3 -0
- package/dist/cjs/api/resources/account/client/requests/InsightsAccountRequest.d.ts +1 -1
- package/dist/cjs/api/resources/account/client/requests/LandingPagesAccountRequest.d.ts +2 -1
- package/dist/cjs/api/resources/account/client/requests/index.d.ts +7 -5
- package/dist/cjs/api/resources/account/exports.d.ts +2 -2
- package/dist/cjs/api/resources/account/index.d.ts +2 -2
- package/dist/cjs/api/resources/account/types/CampaignsAccountRequestDatePreset.d.ts +17 -0
- package/dist/cjs/api/resources/account/types/CampaignsAccountRequestDatePreset.js +20 -0
- package/dist/cjs/api/resources/account/types/CampaignsAccountRequestSortBy.d.ts +5 -0
- package/dist/cjs/api/resources/account/types/CampaignsAccountRequestSortBy.js +8 -0
- package/dist/cjs/api/resources/account/types/CampaignsAccountRequestType.d.ts +5 -0
- package/dist/cjs/api/resources/account/types/CampaignsAccountRequestType.js +8 -0
- package/dist/cjs/api/resources/account/types/CampaignsAccountResponse.d.ts +20 -0
- package/dist/cjs/api/resources/account/types/CampaignsAccountResponse.js +3 -0
- package/dist/cjs/api/resources/account/types/CollabsAccountResponse.d.ts +14 -0
- package/dist/cjs/api/resources/account/types/CollabsAccountResponse.js +3 -0
- package/dist/cjs/api/resources/account/types/GetAccountResponse.d.ts +3 -3
- package/dist/cjs/api/resources/account/types/IndexAccountResponse.js +2 -2
- package/dist/cjs/api/resources/account/types/IndexStatusAccountResponse.js +2 -2
- package/dist/cjs/api/resources/account/types/InsightsAccountRequestType.js +4 -4
- package/dist/cjs/api/resources/account/types/InsightsAccountResponse.d.ts +2 -12
- package/dist/cjs/api/resources/account/types/LandingPagesAccountRequestShowInactive.js +2 -2
- package/dist/cjs/api/resources/account/types/index.d.ts +12 -7
- package/dist/cjs/api/resources/account/types/index.js +5 -0
- package/dist/cjs/api/resources/index.d.ts +3 -3
- package/dist/cjs/api/types/Error_.js +11 -11
- package/dist/cjs/api/types/SearchBrandsResponse.js +1 -1
- package/dist/cjs/api/types/SearchCreatorsResponse.js +1 -1
- package/dist/cjs/api/types/SearchMediaResponse.js +26 -26
- package/dist/cjs/api/types/index.d.ts +7 -7
- package/dist/cjs/auth/BearerAuthProvider.d.ts +1 -1
- package/dist/cjs/auth/BearerAuthProvider.js +2 -2
- package/dist/cjs/auth/index.d.ts +1 -1
- package/dist/cjs/core/auth/AuthProvider.d.ts +2 -2
- package/dist/cjs/core/auth/AuthProvider.js +3 -3
- package/dist/cjs/core/auth/BasicAuth.js +7 -7
- package/dist/cjs/core/auth/BearerToken.js +1 -1
- package/dist/cjs/core/auth/NoOpAuthProvider.d.ts +2 -2
- package/dist/cjs/core/auth/index.d.ts +5 -5
- package/dist/cjs/core/base64.js +4 -4
- package/dist/cjs/core/exports.d.ts +1 -1
- package/dist/cjs/core/fetcher/APIResponse.d.ts +1 -1
- package/dist/cjs/core/fetcher/BinaryResponse.d.ts +4 -4
- package/dist/cjs/core/fetcher/BinaryResponse.js +1 -1
- package/dist/cjs/core/fetcher/EndpointSupplier.d.ts +2 -2
- package/dist/cjs/core/fetcher/EndpointSupplier.js +1 -1
- package/dist/cjs/core/fetcher/Fetcher.d.ts +11 -11
- package/dist/cjs/core/fetcher/Fetcher.js +50 -56
- package/dist/cjs/core/fetcher/Headers.js +10 -10
- package/dist/cjs/core/fetcher/HttpResponsePromise.d.ts +2 -2
- package/dist/cjs/core/fetcher/RawResponse.d.ts +1 -1
- package/dist/cjs/core/fetcher/RawResponse.js +6 -6
- package/dist/cjs/core/fetcher/Supplier.js +1 -1
- package/dist/cjs/core/fetcher/createRequestUrl.js +1 -1
- package/dist/cjs/core/fetcher/getErrorResponseBody.js +11 -11
- package/dist/cjs/core/fetcher/getRequestBody.d.ts +2 -2
- package/dist/cjs/core/fetcher/getRequestBody.js +4 -4
- package/dist/cjs/core/fetcher/getResponseBody.d.ts +2 -2
- package/dist/cjs/core/fetcher/getResponseBody.js +11 -11
- package/dist/cjs/core/fetcher/index.d.ts +13 -13
- package/dist/cjs/core/fetcher/makePassthroughRequest.d.ts +2 -2
- package/dist/cjs/core/fetcher/makePassthroughRequest.js +7 -7
- package/dist/cjs/core/fetcher/makeRequest.js +3 -3
- package/dist/cjs/core/fetcher/redactUrl.js +36 -36
- package/dist/cjs/core/fetcher/requestWithRetries.js +4 -4
- package/dist/cjs/core/fetcher/signals.js +2 -2
- package/dist/cjs/core/index.d.ts +6 -6
- package/dist/cjs/core/logging/exports.d.ts +1 -1
- package/dist/cjs/core/logging/index.d.ts +1 -1
- package/dist/cjs/core/logging/logger.js +4 -4
- package/dist/cjs/core/requestBody.js +1 -1
- package/dist/cjs/core/runtime/index.d.ts +1 -1
- package/dist/cjs/core/runtime/runtime.d.ts +1 -1
- package/dist/cjs/core/runtime/runtime.js +35 -37
- package/dist/cjs/core/url/QueryStringBuilder.d.ts +1 -1
- package/dist/cjs/core/url/QueryStringBuilder.js +3 -3
- package/dist/cjs/core/url/encodePathParam.js +8 -10
- package/dist/cjs/core/url/index.d.ts +4 -4
- package/dist/cjs/core/url/join.js +11 -11
- package/dist/cjs/core/url/qs.d.ts +1 -1
- package/dist/cjs/core/url/qs.js +14 -14
- package/dist/cjs/environments.js +1 -1
- package/dist/cjs/errors/SpyglassError.d.ts +1 -1
- package/dist/cjs/errors/SpyglassError.js +3 -3
- package/dist/cjs/errors/SpyglassTimeoutError.d.ts +1 -1
- package/dist/cjs/errors/SpyglassTimeoutError.js +1 -1
- package/dist/cjs/errors/handleNonStatusCodeError.d.ts +1 -1
- package/dist/cjs/errors/handleNonStatusCodeError.js +5 -5
- package/dist/cjs/errors/index.d.ts +2 -2
- package/dist/cjs/exports.d.ts +1 -1
- package/dist/cjs/index.d.ts +6 -6
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/BaseClient.d.mts +4 -4
- package/dist/esm/BaseClient.mjs +10 -10
- package/dist/esm/Client.d.mts +13 -13
- package/dist/esm/Client.mjs +55 -73
- package/dist/esm/api/client/index.d.mts +1 -1
- package/dist/esm/api/client/index.mjs +1 -1
- package/dist/esm/api/client/requests/SearchBrandsRequest.d.mts +4 -4
- package/dist/esm/api/client/requests/SearchBrandsRequest.mjs +6 -6
- package/dist/esm/api/client/requests/SearchCreatorsRequest.d.mts +4 -4
- package/dist/esm/api/client/requests/SearchCreatorsRequest.mjs +174 -174
- package/dist/esm/api/client/requests/SearchMediaRequest.d.mts +6 -2
- package/dist/esm/api/client/requests/SearchMediaRequest.mjs +227 -223
- package/dist/esm/api/client/requests/index.d.mts +5 -5
- package/dist/esm/api/client/requests/index.mjs +3 -3
- package/dist/esm/api/errors/BadRequestError.d.mts +3 -3
- package/dist/esm/api/errors/BadRequestError.mjs +3 -3
- package/dist/esm/api/errors/ContentTooLargeError.d.mts +3 -3
- package/dist/esm/api/errors/ContentTooLargeError.mjs +3 -3
- package/dist/esm/api/errors/ForbiddenError.d.mts +3 -3
- package/dist/esm/api/errors/ForbiddenError.mjs +3 -3
- package/dist/esm/api/errors/InternalServerError.d.mts +3 -3
- package/dist/esm/api/errors/InternalServerError.mjs +3 -3
- package/dist/esm/api/errors/MethodNotAllowedError.d.mts +3 -3
- package/dist/esm/api/errors/MethodNotAllowedError.mjs +3 -3
- package/dist/esm/api/errors/NotFoundError.d.mts +3 -3
- package/dist/esm/api/errors/NotFoundError.mjs +3 -3
- package/dist/esm/api/errors/PaymentRequiredError.d.mts +3 -3
- package/dist/esm/api/errors/PaymentRequiredError.mjs +3 -3
- package/dist/esm/api/errors/TooManyRequestsError.d.mts +3 -3
- package/dist/esm/api/errors/TooManyRequestsError.mjs +3 -3
- package/dist/esm/api/errors/UnauthorizedError.d.mts +3 -3
- package/dist/esm/api/errors/UnauthorizedError.mjs +3 -3
- package/dist/esm/api/errors/index.d.mts +9 -9
- package/dist/esm/api/errors/index.mjs +9 -9
- package/dist/esm/api/index.d.mts +4 -4
- package/dist/esm/api/index.mjs +4 -4
- package/dist/esm/api/resources/account/client/Client.d.mts +67 -7
- package/dist/esm/api/resources/account/client/Client.mjs +216 -50
- package/dist/esm/api/resources/account/client/index.d.mts +1 -1
- package/dist/esm/api/resources/account/client/index.mjs +1 -1
- package/dist/esm/api/resources/account/client/requests/CampaignsAccountRequest.d.mts +18 -0
- package/dist/esm/api/resources/account/client/requests/CampaignsAccountRequest.mjs +2 -0
- package/dist/esm/api/resources/account/client/requests/CollabsAccountRequest.d.mts +12 -0
- package/dist/esm/api/resources/account/client/requests/CollabsAccountRequest.mjs +2 -0
- package/dist/esm/api/resources/account/client/requests/InsightsAccountRequest.d.mts +1 -1
- package/dist/esm/api/resources/account/client/requests/LandingPagesAccountRequest.d.mts +2 -1
- package/dist/esm/api/resources/account/client/requests/index.d.mts +7 -5
- package/dist/esm/api/resources/account/exports.d.mts +2 -2
- package/dist/esm/api/resources/account/exports.mjs +2 -2
- package/dist/esm/api/resources/account/index.d.mts +2 -2
- package/dist/esm/api/resources/account/index.mjs +2 -2
- package/dist/esm/api/resources/account/types/CampaignsAccountRequestDatePreset.d.mts +17 -0
- package/dist/esm/api/resources/account/types/CampaignsAccountRequestDatePreset.mjs +17 -0
- package/dist/esm/api/resources/account/types/CampaignsAccountRequestSortBy.d.mts +5 -0
- package/dist/esm/api/resources/account/types/CampaignsAccountRequestSortBy.mjs +5 -0
- package/dist/esm/api/resources/account/types/CampaignsAccountRequestType.d.mts +5 -0
- package/dist/esm/api/resources/account/types/CampaignsAccountRequestType.mjs +5 -0
- package/dist/esm/api/resources/account/types/CampaignsAccountResponse.d.mts +20 -0
- package/dist/esm/api/resources/account/types/CampaignsAccountResponse.mjs +2 -0
- package/dist/esm/api/resources/account/types/CollabsAccountResponse.d.mts +14 -0
- package/dist/esm/api/resources/account/types/CollabsAccountResponse.mjs +2 -0
- package/dist/esm/api/resources/account/types/GetAccountResponse.d.mts +3 -3
- package/dist/esm/api/resources/account/types/IndexAccountResponse.mjs +2 -2
- package/dist/esm/api/resources/account/types/IndexStatusAccountResponse.mjs +2 -2
- package/dist/esm/api/resources/account/types/InsightsAccountRequestType.mjs +4 -4
- package/dist/esm/api/resources/account/types/InsightsAccountResponse.d.mts +2 -12
- package/dist/esm/api/resources/account/types/LandingPagesAccountRequestShowInactive.mjs +2 -2
- package/dist/esm/api/resources/account/types/index.d.mts +12 -7
- package/dist/esm/api/resources/account/types/index.mjs +12 -7
- package/dist/esm/api/resources/index.d.mts +3 -3
- package/dist/esm/api/resources/index.mjs +3 -3
- package/dist/esm/api/types/Error_.mjs +11 -11
- package/dist/esm/api/types/SearchBrandsResponse.mjs +1 -1
- package/dist/esm/api/types/SearchCreatorsResponse.mjs +1 -1
- package/dist/esm/api/types/SearchMediaResponse.mjs +26 -26
- package/dist/esm/api/types/index.d.mts +7 -7
- package/dist/esm/api/types/index.mjs +7 -7
- package/dist/esm/auth/BearerAuthProvider.d.mts +1 -1
- package/dist/esm/auth/BearerAuthProvider.mjs +4 -4
- package/dist/esm/auth/index.d.mts +1 -1
- package/dist/esm/auth/index.mjs +1 -1
- package/dist/esm/core/auth/AuthProvider.d.mts +2 -2
- package/dist/esm/core/auth/AuthProvider.mjs +3 -3
- package/dist/esm/core/auth/BasicAuth.mjs +8 -8
- package/dist/esm/core/auth/BearerToken.mjs +1 -1
- package/dist/esm/core/auth/NoOpAuthProvider.d.mts +2 -2
- package/dist/esm/core/auth/index.d.mts +5 -5
- package/dist/esm/core/auth/index.mjs +4 -4
- package/dist/esm/core/base64.mjs +4 -4
- package/dist/esm/core/exports.d.mts +1 -1
- package/dist/esm/core/exports.mjs +1 -1
- package/dist/esm/core/fetcher/APIResponse.d.mts +1 -1
- package/dist/esm/core/fetcher/BinaryResponse.d.mts +4 -4
- package/dist/esm/core/fetcher/BinaryResponse.mjs +1 -1
- package/dist/esm/core/fetcher/EndpointSupplier.d.mts +2 -2
- package/dist/esm/core/fetcher/EndpointSupplier.mjs +1 -1
- package/dist/esm/core/fetcher/Fetcher.d.mts +11 -11
- package/dist/esm/core/fetcher/Fetcher.mjs +64 -70
- package/dist/esm/core/fetcher/Headers.mjs +10 -10
- package/dist/esm/core/fetcher/HttpResponsePromise.d.mts +2 -2
- package/dist/esm/core/fetcher/RawResponse.d.mts +1 -1
- package/dist/esm/core/fetcher/RawResponse.mjs +7 -7
- package/dist/esm/core/fetcher/Supplier.mjs +1 -1
- package/dist/esm/core/fetcher/createRequestUrl.mjs +2 -2
- package/dist/esm/core/fetcher/getErrorResponseBody.mjs +13 -13
- package/dist/esm/core/fetcher/getRequestBody.d.mts +2 -2
- package/dist/esm/core/fetcher/getRequestBody.mjs +6 -6
- package/dist/esm/core/fetcher/getResponseBody.d.mts +2 -2
- package/dist/esm/core/fetcher/getResponseBody.mjs +13 -13
- package/dist/esm/core/fetcher/index.d.mts +13 -13
- package/dist/esm/core/fetcher/index.mjs +7 -7
- package/dist/esm/core/fetcher/makePassthroughRequest.d.mts +2 -2
- package/dist/esm/core/fetcher/makePassthroughRequest.mjs +16 -16
- package/dist/esm/core/fetcher/makeRequest.mjs +4 -4
- package/dist/esm/core/fetcher/redactUrl.mjs +36 -36
- package/dist/esm/core/fetcher/requestWithRetries.mjs +4 -4
- package/dist/esm/core/fetcher/signals.mjs +2 -2
- package/dist/esm/core/index.d.mts +6 -6
- package/dist/esm/core/index.mjs +6 -6
- package/dist/esm/core/logging/exports.d.mts +1 -1
- package/dist/esm/core/logging/exports.mjs +1 -1
- package/dist/esm/core/logging/index.d.mts +1 -1
- package/dist/esm/core/logging/index.mjs +1 -1
- package/dist/esm/core/logging/logger.mjs +4 -4
- package/dist/esm/core/requestBody.mjs +1 -1
- package/dist/esm/core/runtime/index.d.mts +1 -1
- package/dist/esm/core/runtime/index.mjs +1 -1
- package/dist/esm/core/runtime/runtime.d.mts +1 -1
- package/dist/esm/core/runtime/runtime.mjs +35 -37
- package/dist/esm/core/url/QueryStringBuilder.d.mts +1 -1
- package/dist/esm/core/url/QueryStringBuilder.mjs +4 -4
- package/dist/esm/core/url/encodePathParam.mjs +8 -10
- package/dist/esm/core/url/index.d.mts +4 -4
- package/dist/esm/core/url/index.mjs +4 -4
- package/dist/esm/core/url/join.mjs +11 -11
- package/dist/esm/core/url/qs.d.mts +1 -1
- package/dist/esm/core/url/qs.mjs +14 -14
- package/dist/esm/environments.mjs +1 -1
- package/dist/esm/errors/SpyglassError.d.mts +1 -1
- package/dist/esm/errors/SpyglassError.mjs +4 -4
- package/dist/esm/errors/SpyglassTimeoutError.d.mts +1 -1
- package/dist/esm/errors/SpyglassTimeoutError.mjs +2 -2
- package/dist/esm/errors/handleNonStatusCodeError.d.mts +1 -1
- package/dist/esm/errors/handleNonStatusCodeError.mjs +6 -6
- package/dist/esm/errors/index.d.mts +2 -2
- package/dist/esm/errors/index.mjs +2 -2
- package/dist/esm/exports.d.mts +1 -1
- package/dist/esm/exports.mjs +1 -1
- package/dist/esm/index.d.mts +6 -6
- package/dist/esm/index.mjs +5 -5
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +91 -91
- package/reference.md +232 -91
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type * as core from
|
|
2
|
-
import * as errors from
|
|
3
|
-
import type * as spyglass from
|
|
1
|
+
import type * as core from "../../core/index.js";
|
|
2
|
+
import * as errors from "../../errors/index.js";
|
|
3
|
+
import type * as spyglass from "../index.js";
|
|
4
4
|
export declare class MethodNotAllowedError extends errors.SpyglassError {
|
|
5
5
|
readonly body: spyglass.Error_;
|
|
6
6
|
constructor(body: spyglass.Error_, rawResponse?: core.RawResponse);
|
|
@@ -39,7 +39,7 @@ const errors = __importStar(require("../../errors/index.js"));
|
|
|
39
39
|
class MethodNotAllowedError extends errors.SpyglassError {
|
|
40
40
|
constructor(body, rawResponse) {
|
|
41
41
|
super({
|
|
42
|
-
message:
|
|
42
|
+
message: "MethodNotAllowedError",
|
|
43
43
|
statusCode: 405,
|
|
44
44
|
body: body,
|
|
45
45
|
rawResponse: rawResponse,
|
|
@@ -48,7 +48,7 @@ class MethodNotAllowedError extends errors.SpyglassError {
|
|
|
48
48
|
if (Error.captureStackTrace) {
|
|
49
49
|
Error.captureStackTrace(this, this.constructor);
|
|
50
50
|
}
|
|
51
|
-
this.name =
|
|
51
|
+
this.name = "MethodNotAllowedError";
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
54
|
exports.MethodNotAllowedError = MethodNotAllowedError;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type * as core from
|
|
2
|
-
import * as errors from
|
|
3
|
-
import type * as spyglass from
|
|
1
|
+
import type * as core from "../../core/index.js";
|
|
2
|
+
import * as errors from "../../errors/index.js";
|
|
3
|
+
import type * as spyglass from "../index.js";
|
|
4
4
|
export declare class NotFoundError extends errors.SpyglassError {
|
|
5
5
|
readonly body: spyglass.Error_;
|
|
6
6
|
constructor(body: spyglass.Error_, rawResponse?: core.RawResponse);
|
|
@@ -39,7 +39,7 @@ const errors = __importStar(require("../../errors/index.js"));
|
|
|
39
39
|
class NotFoundError extends errors.SpyglassError {
|
|
40
40
|
constructor(body, rawResponse) {
|
|
41
41
|
super({
|
|
42
|
-
message:
|
|
42
|
+
message: "NotFoundError",
|
|
43
43
|
statusCode: 404,
|
|
44
44
|
body: body,
|
|
45
45
|
rawResponse: rawResponse,
|
|
@@ -48,7 +48,7 @@ class NotFoundError extends errors.SpyglassError {
|
|
|
48
48
|
if (Error.captureStackTrace) {
|
|
49
49
|
Error.captureStackTrace(this, this.constructor);
|
|
50
50
|
}
|
|
51
|
-
this.name =
|
|
51
|
+
this.name = "NotFoundError";
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
54
|
exports.NotFoundError = NotFoundError;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type * as core from
|
|
2
|
-
import * as errors from
|
|
3
|
-
import type * as spyglass from
|
|
1
|
+
import type * as core from "../../core/index.js";
|
|
2
|
+
import * as errors from "../../errors/index.js";
|
|
3
|
+
import type * as spyglass from "../index.js";
|
|
4
4
|
export declare class PaymentRequiredError extends errors.SpyglassError {
|
|
5
5
|
readonly body: spyglass.Error_;
|
|
6
6
|
constructor(body: spyglass.Error_, rawResponse?: core.RawResponse);
|
|
@@ -39,7 +39,7 @@ const errors = __importStar(require("../../errors/index.js"));
|
|
|
39
39
|
class PaymentRequiredError extends errors.SpyglassError {
|
|
40
40
|
constructor(body, rawResponse) {
|
|
41
41
|
super({
|
|
42
|
-
message:
|
|
42
|
+
message: "PaymentRequiredError",
|
|
43
43
|
statusCode: 402,
|
|
44
44
|
body: body,
|
|
45
45
|
rawResponse: rawResponse,
|
|
@@ -48,7 +48,7 @@ class PaymentRequiredError extends errors.SpyglassError {
|
|
|
48
48
|
if (Error.captureStackTrace) {
|
|
49
49
|
Error.captureStackTrace(this, this.constructor);
|
|
50
50
|
}
|
|
51
|
-
this.name =
|
|
51
|
+
this.name = "PaymentRequiredError";
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
54
|
exports.PaymentRequiredError = PaymentRequiredError;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type * as core from
|
|
2
|
-
import * as errors from
|
|
3
|
-
import type * as spyglass from
|
|
1
|
+
import type * as core from "../../core/index.js";
|
|
2
|
+
import * as errors from "../../errors/index.js";
|
|
3
|
+
import type * as spyglass from "../index.js";
|
|
4
4
|
export declare class TooManyRequestsError extends errors.SpyglassError {
|
|
5
5
|
readonly body: spyglass.Error_;
|
|
6
6
|
constructor(body: spyglass.Error_, rawResponse?: core.RawResponse);
|
|
@@ -39,7 +39,7 @@ const errors = __importStar(require("../../errors/index.js"));
|
|
|
39
39
|
class TooManyRequestsError extends errors.SpyglassError {
|
|
40
40
|
constructor(body, rawResponse) {
|
|
41
41
|
super({
|
|
42
|
-
message:
|
|
42
|
+
message: "TooManyRequestsError",
|
|
43
43
|
statusCode: 429,
|
|
44
44
|
body: body,
|
|
45
45
|
rawResponse: rawResponse,
|
|
@@ -48,7 +48,7 @@ class TooManyRequestsError extends errors.SpyglassError {
|
|
|
48
48
|
if (Error.captureStackTrace) {
|
|
49
49
|
Error.captureStackTrace(this, this.constructor);
|
|
50
50
|
}
|
|
51
|
-
this.name =
|
|
51
|
+
this.name = "TooManyRequestsError";
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
54
|
exports.TooManyRequestsError = TooManyRequestsError;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type * as core from
|
|
2
|
-
import * as errors from
|
|
3
|
-
import type * as spyglass from
|
|
1
|
+
import type * as core from "../../core/index.js";
|
|
2
|
+
import * as errors from "../../errors/index.js";
|
|
3
|
+
import type * as spyglass from "../index.js";
|
|
4
4
|
export declare class UnauthorizedError extends errors.SpyglassError {
|
|
5
5
|
readonly body: spyglass.Error_;
|
|
6
6
|
constructor(body: spyglass.Error_, rawResponse?: core.RawResponse);
|
|
@@ -39,7 +39,7 @@ const errors = __importStar(require("../../errors/index.js"));
|
|
|
39
39
|
class UnauthorizedError extends errors.SpyglassError {
|
|
40
40
|
constructor(body, rawResponse) {
|
|
41
41
|
super({
|
|
42
|
-
message:
|
|
42
|
+
message: "UnauthorizedError",
|
|
43
43
|
statusCode: 401,
|
|
44
44
|
body: body,
|
|
45
45
|
rawResponse: rawResponse,
|
|
@@ -48,7 +48,7 @@ class UnauthorizedError extends errors.SpyglassError {
|
|
|
48
48
|
if (Error.captureStackTrace) {
|
|
49
49
|
Error.captureStackTrace(this, this.constructor);
|
|
50
50
|
}
|
|
51
|
-
this.name =
|
|
51
|
+
this.name = "UnauthorizedError";
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
54
|
exports.UnauthorizedError = UnauthorizedError;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export * from
|
|
3
|
-
export * from
|
|
4
|
-
export * from
|
|
5
|
-
export * from
|
|
6
|
-
export * from
|
|
7
|
-
export * from
|
|
8
|
-
export * from
|
|
9
|
-
export * from
|
|
1
|
+
export * from "./BadRequestError.js";
|
|
2
|
+
export * from "./ContentTooLargeError.js";
|
|
3
|
+
export * from "./ForbiddenError.js";
|
|
4
|
+
export * from "./InternalServerError.js";
|
|
5
|
+
export * from "./MethodNotAllowedError.js";
|
|
6
|
+
export * from "./NotFoundError.js";
|
|
7
|
+
export * from "./PaymentRequiredError.js";
|
|
8
|
+
export * from "./TooManyRequestsError.js";
|
|
9
|
+
export * from "./UnauthorizedError.js";
|
package/dist/cjs/api/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export * from
|
|
3
|
-
export * from
|
|
4
|
-
export * from
|
|
1
|
+
export * from "./client/index.js";
|
|
2
|
+
export * from "./errors/index.js";
|
|
3
|
+
export * from "./resources/index.js";
|
|
4
|
+
export * from "./types/index.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { BaseClientOptions, BaseRequestOptions } from
|
|
2
|
-
import { type NormalizedClientOptionsWithAuth } from
|
|
3
|
-
import * as core from
|
|
4
|
-
import * as spyglass from
|
|
1
|
+
import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.js";
|
|
2
|
+
import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.js";
|
|
3
|
+
import * as core from "../../../../core/index.js";
|
|
4
|
+
import * as spyglass from "../../../index.js";
|
|
5
5
|
export declare namespace AccountClient {
|
|
6
6
|
type Options = BaseClientOptions;
|
|
7
7
|
interface RequestOptions extends BaseRequestOptions {
|
|
@@ -16,7 +16,7 @@ export declare class AccountClient {
|
|
|
16
16
|
* (`gender`, `ageRange`, ...) are present only on `CREATOR`.
|
|
17
17
|
*
|
|
18
18
|
* Limited to 120 requests per minute per user.
|
|
19
|
-
* Costs
|
|
19
|
+
* Costs $0.0010 per account returned, charged against your plan's monthly credits.
|
|
20
20
|
* An id that matches nothing returns 404 and is free.
|
|
21
21
|
*
|
|
22
22
|
* @param {spyglass.GetAccountRequest} request
|
|
@@ -49,7 +49,7 @@ export declare class AccountClient {
|
|
|
49
49
|
* `totals` to creatives that started within the requested window.
|
|
50
50
|
*
|
|
51
51
|
* Limited to 120 requests per minute per user.
|
|
52
|
-
* Costs
|
|
52
|
+
* Costs $0.0005 per cluster returned, charged against your plan's monthly credits. The count field is what you were charged for.
|
|
53
53
|
*
|
|
54
54
|
* @param {spyglass.InsightsAccountRequest} request
|
|
55
55
|
* @param {AccountClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -73,12 +73,72 @@ export declare class AccountClient {
|
|
|
73
73
|
*/
|
|
74
74
|
insights(request: spyglass.InsightsAccountRequest, requestOptions?: AccountClient.RequestOptions): core.HttpResponsePromise<spyglass.InsightsAccountResponse>;
|
|
75
75
|
private __insights;
|
|
76
|
+
/**
|
|
77
|
+
* Return an account’s campaigns or offers, newest start date first.
|
|
78
|
+
* `datePreset`, or `startDate` and `endDate`, filter by campaign
|
|
79
|
+
* start date. Omit both for all time.
|
|
80
|
+
*
|
|
81
|
+
* Limited to 120 requests per minute per user.
|
|
82
|
+
* Costs $0.0005 per campaign returned, charged against your plan's monthly credits. The count field is what you were charged for.
|
|
83
|
+
*
|
|
84
|
+
* @param {spyglass.CampaignsAccountRequest} request
|
|
85
|
+
* @param {AccountClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
86
|
+
*
|
|
87
|
+
* @throws {@link spyglass.BadRequestError}
|
|
88
|
+
* @throws {@link spyglass.UnauthorizedError}
|
|
89
|
+
* @throws {@link spyglass.PaymentRequiredError}
|
|
90
|
+
* @throws {@link spyglass.ForbiddenError}
|
|
91
|
+
* @throws {@link spyglass.NotFoundError}
|
|
92
|
+
* @throws {@link spyglass.MethodNotAllowedError}
|
|
93
|
+
* @throws {@link spyglass.TooManyRequestsError}
|
|
94
|
+
* @throws {@link spyglass.InternalServerError}
|
|
95
|
+
* @throws {@link errors.SpyglassError}
|
|
96
|
+
* @throws {@link errors.SpyglassTimeoutError}
|
|
97
|
+
*
|
|
98
|
+
* @example
|
|
99
|
+
* await client.account.campaigns({
|
|
100
|
+
* id: "id",
|
|
101
|
+
* type: "CAMPAIGN"
|
|
102
|
+
* })
|
|
103
|
+
*/
|
|
104
|
+
campaigns(request: spyglass.CampaignsAccountRequest, requestOptions?: AccountClient.RequestOptions): core.HttpResponsePromise<spyglass.CampaignsAccountResponse>;
|
|
105
|
+
private __campaigns;
|
|
106
|
+
/**
|
|
107
|
+
* Return the creators an account has collaborated with, ordered from
|
|
108
|
+
* most media to least. Works for both brands and creators.
|
|
109
|
+
* mediaCount is how many of that account’s media items tag the
|
|
110
|
+
* creator.
|
|
111
|
+
*
|
|
112
|
+
* Limited to 120 requests per minute per user.
|
|
113
|
+
* Costs $0.0005 per collab returned, charged against your plan's monthly credits. The count field is what you were charged for.
|
|
114
|
+
*
|
|
115
|
+
* @param {spyglass.CollabsAccountRequest} request
|
|
116
|
+
* @param {AccountClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
117
|
+
*
|
|
118
|
+
* @throws {@link spyglass.BadRequestError}
|
|
119
|
+
* @throws {@link spyglass.UnauthorizedError}
|
|
120
|
+
* @throws {@link spyglass.PaymentRequiredError}
|
|
121
|
+
* @throws {@link spyglass.ForbiddenError}
|
|
122
|
+
* @throws {@link spyglass.NotFoundError}
|
|
123
|
+
* @throws {@link spyglass.MethodNotAllowedError}
|
|
124
|
+
* @throws {@link spyglass.TooManyRequestsError}
|
|
125
|
+
* @throws {@link spyglass.InternalServerError}
|
|
126
|
+
* @throws {@link errors.SpyglassError}
|
|
127
|
+
* @throws {@link errors.SpyglassTimeoutError}
|
|
128
|
+
*
|
|
129
|
+
* @example
|
|
130
|
+
* await client.account.collabs({
|
|
131
|
+
* id: "id"
|
|
132
|
+
* })
|
|
133
|
+
*/
|
|
134
|
+
collabs(request: spyglass.CollabsAccountRequest, requestOptions?: AccountClient.RequestOptions): core.HttpResponsePromise<spyglass.CollabsAccountResponse>;
|
|
135
|
+
private __collabs;
|
|
76
136
|
/**
|
|
77
137
|
* Return the landing-page URLs an account sends ad traffic to, ranked by
|
|
78
138
|
* how often they appear across its ads.
|
|
79
139
|
*
|
|
80
140
|
* Limited to 120 requests per minute per user.
|
|
81
|
-
* Costs
|
|
141
|
+
* Costs $0.0025 per landing page returned, charged against your plan's monthly credits. The count field is what you were charged for.
|
|
82
142
|
*
|
|
83
143
|
* @param {spyglass.LandingPagesAccountRequest} request
|
|
84
144
|
* @param {AccountClient.RequestOptions} requestOptions - Request-specific configuration.
|