@spyglasshq/sdk 0.1.0 → 0.1.1
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 +248 -66
- package/dist/cjs/BaseClient.js +3 -3
- package/dist/cjs/Client.d.ts +4 -4
- package/dist/cjs/Client.js +3 -3
- package/dist/cjs/api/errors/BadRequestError.d.ts +3 -3
- package/dist/cjs/api/errors/ContentTooLargeError.d.ts +3 -3
- package/dist/cjs/api/errors/ForbiddenError.d.ts +3 -3
- package/dist/cjs/api/errors/InternalServerError.d.ts +3 -3
- package/dist/cjs/api/errors/MethodNotAllowedError.d.ts +3 -3
- package/dist/cjs/api/errors/NotFoundError.d.ts +3 -3
- package/dist/cjs/api/errors/PaymentRequiredError.d.ts +3 -3
- package/dist/cjs/api/errors/TooManyRequestsError.d.ts +3 -3
- package/dist/cjs/api/errors/UnauthorizedError.d.ts +3 -3
- package/dist/cjs/api/resources/account/client/Client.d.ts +9 -9
- package/dist/cjs/api/resources/account/client/Client.js +15 -15
- package/dist/cjs/api/resources/indexing/client/Client.d.ts +19 -19
- package/dist/cjs/api/resources/indexing/client/Client.js +31 -31
- package/dist/cjs/api/resources/search/client/Client.d.ts +85 -85
- package/dist/cjs/api/resources/search/client/Client.js +145 -145
- package/dist/cjs/api/resources/search/client/requests/GetBrandLandingPagesRequest.d.ts +2 -2
- package/dist/cjs/api/resources/search/client/requests/GetBrandMediaInsightsRequest.d.ts +2 -2
- package/dist/cjs/api/resources/search/client/requests/{GetMediaV2Request.d.ts → GetMediaRequest.d.ts} +13 -13
- package/dist/cjs/api/resources/search/client/requests/{GetMediaV2Request.js → GetMediaRequest.js} +14 -14
- package/dist/{esm/api/resources/search/client/requests/SearchBrandsV2Request.d.mts → cjs/api/resources/search/client/requests/SearchBrandsRequest.d.ts} +4 -4
- package/dist/cjs/api/resources/search/client/requests/{SearchBrandsV2Request.js → SearchBrandsRequest.js} +5 -5
- package/dist/cjs/api/resources/search/client/requests/index.d.ts +2 -2
- package/dist/cjs/api/resources/search/client/requests/index.js +5 -5
- package/dist/cjs/api/resources/search/types/GetAccountResponse.d.ts +2 -2
- package/dist/cjs/api/resources/search/types/{GetMediaV2Response.d.ts → GetMediaResponse.d.ts} +3 -3
- package/dist/cjs/api/resources/search/types/{GetMediaV2Response.js → GetMediaResponse.js} +5 -5
- package/dist/{esm/api/resources/search/types/SearchBrandsV2Response.d.mts → cjs/api/resources/search/types/SearchBrandsResponse.d.ts} +3 -3
- package/dist/cjs/api/resources/search/types/{SearchBrandsV2Response.js → SearchBrandsResponse.js} +5 -5
- package/dist/cjs/api/resources/search/types/index.d.ts +2 -2
- package/dist/cjs/api/resources/search/types/index.js +2 -2
- package/dist/cjs/index.d.ts +2 -2
- package/dist/cjs/index.js +3 -3
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/BaseClient.mjs +3 -3
- package/dist/esm/Client.d.mts +4 -4
- package/dist/esm/Client.mjs +1 -1
- package/dist/esm/api/errors/BadRequestError.d.mts +3 -3
- package/dist/esm/api/errors/ContentTooLargeError.d.mts +3 -3
- package/dist/esm/api/errors/ForbiddenError.d.mts +3 -3
- package/dist/esm/api/errors/InternalServerError.d.mts +3 -3
- package/dist/esm/api/errors/MethodNotAllowedError.d.mts +3 -3
- package/dist/esm/api/errors/NotFoundError.d.mts +3 -3
- package/dist/esm/api/errors/PaymentRequiredError.d.mts +3 -3
- package/dist/esm/api/errors/TooManyRequestsError.d.mts +3 -3
- package/dist/esm/api/errors/UnauthorizedError.d.mts +3 -3
- package/dist/esm/api/resources/account/client/Client.d.mts +9 -9
- package/dist/esm/api/resources/account/client/Client.mjs +15 -15
- package/dist/esm/api/resources/indexing/client/Client.d.mts +19 -19
- package/dist/esm/api/resources/indexing/client/Client.mjs +31 -31
- package/dist/esm/api/resources/search/client/Client.d.mts +85 -85
- package/dist/esm/api/resources/search/client/Client.mjs +145 -145
- package/dist/esm/api/resources/search/client/requests/GetBrandLandingPagesRequest.d.mts +2 -2
- package/dist/esm/api/resources/search/client/requests/GetBrandMediaInsightsRequest.d.mts +2 -2
- package/dist/esm/api/resources/search/client/requests/{GetMediaV2Request.d.mts → GetMediaRequest.d.mts} +13 -13
- package/dist/esm/api/resources/search/client/requests/{GetMediaV2Request.mjs → GetMediaRequest.mjs} +13 -13
- package/dist/{cjs/api/resources/search/client/requests/SearchBrandsV2Request.d.ts → esm/api/resources/search/client/requests/SearchBrandsRequest.d.mts} +4 -4
- package/dist/esm/api/resources/search/client/requests/{SearchBrandsV2Request.mjs → SearchBrandsRequest.mjs} +4 -4
- package/dist/esm/api/resources/search/client/requests/index.d.mts +2 -2
- package/dist/esm/api/resources/search/client/requests/index.mjs +2 -2
- package/dist/esm/api/resources/search/types/GetAccountResponse.d.mts +2 -2
- package/dist/esm/api/resources/search/types/{GetMediaV2Response.d.mts → GetMediaResponse.d.mts} +3 -3
- package/dist/esm/api/resources/search/types/{GetMediaV2Response.mjs → GetMediaResponse.mjs} +4 -4
- package/dist/{cjs/api/resources/search/types/SearchBrandsV2Response.d.ts → esm/api/resources/search/types/SearchBrandsResponse.d.mts} +3 -3
- package/dist/esm/api/resources/search/types/{SearchBrandsV2Response.mjs → SearchBrandsResponse.mjs} +4 -4
- package/dist/esm/api/resources/search/types/index.d.mts +2 -2
- package/dist/esm/api/resources/search/types/index.mjs +2 -2
- package/dist/esm/index.d.mts +2 -2
- package/dist/esm/index.mjs +2 -2
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +17 -2
- package/reference.md +23 -23
package/dist/cjs/api/resources/search/client/requests/{GetMediaV2Request.js → GetMediaRequest.js}
RENAMED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
// This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.
|
|
5
|
-
var
|
|
6
|
-
(function (
|
|
4
|
+
exports.GetMediaRequest = void 0;
|
|
5
|
+
var GetMediaRequest;
|
|
6
|
+
(function (GetMediaRequest) {
|
|
7
7
|
let Channel;
|
|
8
8
|
(function (Channel) {
|
|
9
9
|
Channel.Item = {
|
|
@@ -11,7 +11,7 @@ var GetMediaV2Request;
|
|
|
11
11
|
Instagram: "INSTAGRAM",
|
|
12
12
|
Tiktok: "TIKTOK",
|
|
13
13
|
};
|
|
14
|
-
})(Channel =
|
|
14
|
+
})(Channel = GetMediaRequest.Channel || (GetMediaRequest.Channel = {}));
|
|
15
15
|
let Format;
|
|
16
16
|
(function (Format) {
|
|
17
17
|
Format.Item = {
|
|
@@ -21,7 +21,7 @@ var GetMediaV2Request;
|
|
|
21
21
|
Image: "IMAGE",
|
|
22
22
|
Dco: "DCO",
|
|
23
23
|
};
|
|
24
|
-
})(Format =
|
|
24
|
+
})(Format = GetMediaRequest.Format || (GetMediaRequest.Format = {}));
|
|
25
25
|
let Duration;
|
|
26
26
|
(function (Duration) {
|
|
27
27
|
Duration.Item = {
|
|
@@ -30,8 +30,8 @@ var GetMediaV2Request;
|
|
|
30
30
|
Thirty60: "30-60",
|
|
31
31
|
Sixty: "60+",
|
|
32
32
|
};
|
|
33
|
-
})(Duration =
|
|
34
|
-
|
|
33
|
+
})(Duration = GetMediaRequest.Duration || (GetMediaRequest.Duration = {}));
|
|
34
|
+
GetMediaRequest.Status = {
|
|
35
35
|
Active: "ACTIVE",
|
|
36
36
|
Inactive: "INACTIVE",
|
|
37
37
|
All: "ALL",
|
|
@@ -67,7 +67,7 @@ var GetMediaV2Request;
|
|
|
67
67
|
TextOverlay: "Text Overlay",
|
|
68
68
|
Greenscreen: "Greenscreen",
|
|
69
69
|
};
|
|
70
|
-
})(Categories =
|
|
70
|
+
})(Categories = GetMediaRequest.Categories || (GetMediaRequest.Categories = {}));
|
|
71
71
|
let FunnelStage;
|
|
72
72
|
(function (FunnelStage) {
|
|
73
73
|
FunnelStage.Item = {
|
|
@@ -77,7 +77,7 @@ var GetMediaV2Request;
|
|
|
77
77
|
ProductAware: "PRODUCT_AWARE",
|
|
78
78
|
MostAware: "MOST_AWARE",
|
|
79
79
|
};
|
|
80
|
-
})(FunnelStage =
|
|
80
|
+
})(FunnelStage = GetMediaRequest.FunnelStage || (GetMediaRequest.FunnelStage = {}));
|
|
81
81
|
let Language;
|
|
82
82
|
(function (Language) {
|
|
83
83
|
Language.Item = {
|
|
@@ -233,8 +233,8 @@ var GetMediaV2Request;
|
|
|
233
233
|
Xhosa: "Xhosa",
|
|
234
234
|
Khasi: "Khasi",
|
|
235
235
|
};
|
|
236
|
-
})(Language =
|
|
237
|
-
|
|
236
|
+
})(Language = GetMediaRequest.Language || (GetMediaRequest.Language = {}));
|
|
237
|
+
GetMediaRequest.DatePreset = {
|
|
238
238
|
Today: "today",
|
|
239
239
|
Yesterday: "yesterday",
|
|
240
240
|
Last3Days: "last-3-days",
|
|
@@ -250,11 +250,11 @@ var GetMediaV2Request;
|
|
|
250
250
|
YearToDate: "year-to-date",
|
|
251
251
|
LastYear: "last-year",
|
|
252
252
|
};
|
|
253
|
-
|
|
253
|
+
GetMediaRequest.LandingPageMatch = {
|
|
254
254
|
Contains: "contains",
|
|
255
255
|
Equals: "equals",
|
|
256
256
|
};
|
|
257
|
-
|
|
257
|
+
GetMediaRequest.SortBy = {
|
|
258
258
|
MostRecent: "MOST_RECENT",
|
|
259
259
|
Oldest: "OLDEST",
|
|
260
260
|
LongestRun: "LONGEST_RUN",
|
|
@@ -265,4 +265,4 @@ var GetMediaV2Request;
|
|
|
265
265
|
HighestEngagement: "HIGHEST_ENGAGEMENT",
|
|
266
266
|
HighestOutlier: "HIGHEST_OUTLIER",
|
|
267
267
|
};
|
|
268
|
-
})(
|
|
268
|
+
})(GetMediaRequest || (exports.GetMediaRequest = GetMediaRequest = {}));
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
* limit: 3
|
|
6
6
|
* }
|
|
7
7
|
*/
|
|
8
|
-
export interface
|
|
9
|
-
brandIds?:
|
|
8
|
+
export interface SearchBrandsRequest {
|
|
9
|
+
brandIds?: SearchBrandsRequest.BrandIds.Item[];
|
|
10
10
|
names?: string[];
|
|
11
11
|
igUsername?: string;
|
|
12
12
|
tiktokUsername?: string;
|
|
@@ -14,12 +14,12 @@ export interface SearchBrandsV2Request {
|
|
|
14
14
|
location?: string;
|
|
15
15
|
minFollowers?: number;
|
|
16
16
|
maxFollowers?: number;
|
|
17
|
-
sortBy?:
|
|
17
|
+
sortBy?: SearchBrandsRequest.SortBy;
|
|
18
18
|
offset?: number;
|
|
19
19
|
limit?: number;
|
|
20
20
|
taxonomy?: string[];
|
|
21
21
|
}
|
|
22
|
-
export declare namespace
|
|
22
|
+
export declare namespace SearchBrandsRequest {
|
|
23
23
|
type BrandIds = BrandIds.Item[];
|
|
24
24
|
namespace BrandIds {
|
|
25
25
|
/**
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
// This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.
|
|
5
|
-
var
|
|
6
|
-
(function (
|
|
7
|
-
|
|
4
|
+
exports.SearchBrandsRequest = void 0;
|
|
5
|
+
var SearchBrandsRequest;
|
|
6
|
+
(function (SearchBrandsRequest) {
|
|
7
|
+
SearchBrandsRequest.SortBy = {
|
|
8
8
|
Name: "NAME",
|
|
9
9
|
MostFollowers: "MOST_FOLLOWERS",
|
|
10
10
|
LeastFollowers: "LEAST_FOLLOWERS",
|
|
@@ -12,4 +12,4 @@ var SearchBrandsV2Request;
|
|
|
12
12
|
HighestEngagement: "HIGHEST_ENGAGEMENT",
|
|
13
13
|
MostActiveAds: "MOST_ACTIVE_ADS",
|
|
14
14
|
};
|
|
15
|
-
})(
|
|
15
|
+
})(SearchBrandsRequest || (exports.SearchBrandsRequest = SearchBrandsRequest = {}));
|
|
@@ -2,7 +2,7 @@ export type { GetAccountRequest } from "./GetAccountRequest.js";
|
|
|
2
2
|
export type { GetBrandLandingPagesRequest } from "./GetBrandLandingPagesRequest.js";
|
|
3
3
|
export type { GetBrandMediaInsightsRequest } from "./GetBrandMediaInsightsRequest.js";
|
|
4
4
|
export type { GetCommentsRequest } from "./GetCommentsRequest.js";
|
|
5
|
-
export {
|
|
6
|
-
export {
|
|
5
|
+
export { GetMediaRequest } from "./GetMediaRequest.js";
|
|
6
|
+
export { SearchBrandsRequest } from "./SearchBrandsRequest.js";
|
|
7
7
|
export { SearchCreatorsRequest } from "./SearchCreatorsRequest.js";
|
|
8
8
|
export type { SearchTaxonomiesRequest } from "./SearchTaxonomiesRequest.js";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SearchCreatorsRequest = exports.
|
|
4
|
-
var
|
|
5
|
-
Object.defineProperty(exports, "
|
|
6
|
-
var
|
|
7
|
-
Object.defineProperty(exports, "
|
|
3
|
+
exports.SearchCreatorsRequest = exports.SearchBrandsRequest = exports.GetMediaRequest = void 0;
|
|
4
|
+
var GetMediaRequest_js_1 = require("./GetMediaRequest.js");
|
|
5
|
+
Object.defineProperty(exports, "GetMediaRequest", { enumerable: true, get: function () { return GetMediaRequest_js_1.GetMediaRequest; } });
|
|
6
|
+
var SearchBrandsRequest_js_1 = require("./SearchBrandsRequest.js");
|
|
7
|
+
Object.defineProperty(exports, "SearchBrandsRequest", { enumerable: true, get: function () { return SearchBrandsRequest_js_1.SearchBrandsRequest; } });
|
|
8
8
|
var SearchCreatorsRequest_js_1 = require("./SearchCreatorsRequest.js");
|
|
9
9
|
Object.defineProperty(exports, "SearchCreatorsRequest", { enumerable: true, get: function () { return SearchCreatorsRequest_js_1.SearchCreatorsRequest; } });
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type * as
|
|
2
|
-
export type GetAccountResponse =
|
|
1
|
+
import type * as spyglass from "../../../index.js";
|
|
2
|
+
export type GetAccountResponse = spyglass.GetAccountResponse.Brand | spyglass.GetAccountResponse.Creator;
|
|
3
3
|
export declare namespace GetAccountResponse {
|
|
4
4
|
interface Brand {
|
|
5
5
|
type: "BRAND";
|
package/dist/cjs/api/resources/search/types/{GetMediaV2Response.d.ts → GetMediaResponse.d.ts}
RENAMED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export interface
|
|
1
|
+
export interface GetMediaResponse {
|
|
2
2
|
count: number;
|
|
3
|
-
media:
|
|
3
|
+
media: GetMediaResponse.Media.Item[];
|
|
4
4
|
}
|
|
5
|
-
export declare namespace
|
|
5
|
+
export declare namespace GetMediaResponse {
|
|
6
6
|
type Media = Media.Item[];
|
|
7
7
|
namespace Media {
|
|
8
8
|
interface Item {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
// This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.
|
|
5
|
-
var
|
|
6
|
-
(function (
|
|
4
|
+
exports.GetMediaResponse = void 0;
|
|
5
|
+
var GetMediaResponse;
|
|
6
|
+
(function (GetMediaResponse) {
|
|
7
7
|
let Media;
|
|
8
8
|
(function (Media) {
|
|
9
9
|
let Item;
|
|
@@ -53,5 +53,5 @@ var GetMediaV2Response;
|
|
|
53
53
|
};
|
|
54
54
|
})(UgcCharacter = Item.UgcCharacter || (Item.UgcCharacter = {}));
|
|
55
55
|
})(Item = Media.Item || (Media.Item = {}));
|
|
56
|
-
})(Media =
|
|
57
|
-
})(
|
|
56
|
+
})(Media = GetMediaResponse.Media || (GetMediaResponse.Media = {}));
|
|
57
|
+
})(GetMediaResponse || (exports.GetMediaResponse = GetMediaResponse = {}));
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export interface
|
|
1
|
+
export interface SearchBrandsResponse {
|
|
2
2
|
count: number;
|
|
3
|
-
brands:
|
|
3
|
+
brands: SearchBrandsResponse.Brands.Item[];
|
|
4
4
|
unmatchedIds?: string[] | undefined;
|
|
5
5
|
}
|
|
6
|
-
export declare namespace
|
|
6
|
+
export declare namespace SearchBrandsResponse {
|
|
7
7
|
type Brands = Brands.Item[];
|
|
8
8
|
namespace Brands {
|
|
9
9
|
interface Item {
|
package/dist/cjs/api/resources/search/types/{SearchBrandsV2Response.js → SearchBrandsResponse.js}
RENAMED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
// This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.
|
|
5
|
-
var
|
|
6
|
-
(function (
|
|
4
|
+
exports.SearchBrandsResponse = void 0;
|
|
5
|
+
var SearchBrandsResponse;
|
|
6
|
+
(function (SearchBrandsResponse) {
|
|
7
7
|
let Brands;
|
|
8
8
|
(function (Brands) {
|
|
9
9
|
let Item;
|
|
@@ -12,5 +12,5 @@ var SearchBrandsV2Response;
|
|
|
12
12
|
Brand: "BRAND",
|
|
13
13
|
};
|
|
14
14
|
})(Item = Brands.Item || (Brands.Item = {}));
|
|
15
|
-
})(Brands =
|
|
16
|
-
})(
|
|
15
|
+
})(Brands = SearchBrandsResponse.Brands || (SearchBrandsResponse.Brands = {}));
|
|
16
|
+
})(SearchBrandsResponse || (exports.SearchBrandsResponse = SearchBrandsResponse = {}));
|
|
@@ -4,7 +4,7 @@ export * from "./GetBrandLandingPagesResponse.js";
|
|
|
4
4
|
export * from "./GetBrandMediaInsightsRequestType.js";
|
|
5
5
|
export * from "./GetBrandMediaInsightsResponse.js";
|
|
6
6
|
export * from "./GetCommentsResponse.js";
|
|
7
|
-
export * from "./
|
|
8
|
-
export * from "./
|
|
7
|
+
export * from "./GetMediaResponse.js";
|
|
8
|
+
export * from "./SearchBrandsResponse.js";
|
|
9
9
|
export * from "./SearchCreatorsResponse.js";
|
|
10
10
|
export * from "./SearchTaxonomiesResponse.js";
|
|
@@ -20,7 +20,7 @@ __exportStar(require("./GetBrandLandingPagesResponse.js"), exports);
|
|
|
20
20
|
__exportStar(require("./GetBrandMediaInsightsRequestType.js"), exports);
|
|
21
21
|
__exportStar(require("./GetBrandMediaInsightsResponse.js"), exports);
|
|
22
22
|
__exportStar(require("./GetCommentsResponse.js"), exports);
|
|
23
|
-
__exportStar(require("./
|
|
24
|
-
__exportStar(require("./
|
|
23
|
+
__exportStar(require("./GetMediaResponse.js"), exports);
|
|
24
|
+
__exportStar(require("./SearchBrandsResponse.js"), exports);
|
|
25
25
|
__exportStar(require("./SearchCreatorsResponse.js"), exports);
|
|
26
26
|
__exportStar(require("./SearchTaxonomiesResponse.js"), exports);
|
package/dist/cjs/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export * as
|
|
1
|
+
export * as spyglass from "./api/index.js";
|
|
2
2
|
export type { BaseClientOptions, BaseRequestOptions } from "./BaseClient.js";
|
|
3
|
-
export {
|
|
3
|
+
export { Spyglass } from "./Client.js";
|
|
4
4
|
export { SpyglassEnvironment } from "./environments.js";
|
|
5
5
|
export { SpyglassError, SpyglassTimeoutError } from "./errors/index.js";
|
|
6
6
|
export * from "./exports.js";
|
package/dist/cjs/index.js
CHANGED
|
@@ -36,10 +36,10 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
36
36
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
37
37
|
};
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.SpyglassTimeoutError = exports.SpyglassError = exports.SpyglassEnvironment = exports.
|
|
40
|
-
exports.
|
|
39
|
+
exports.SpyglassTimeoutError = exports.SpyglassError = exports.SpyglassEnvironment = exports.Spyglass = exports.spyglass = void 0;
|
|
40
|
+
exports.spyglass = __importStar(require("./api/index.js"));
|
|
41
41
|
var Client_js_1 = require("./Client.js");
|
|
42
|
-
Object.defineProperty(exports, "
|
|
42
|
+
Object.defineProperty(exports, "Spyglass", { enumerable: true, get: function () { return Client_js_1.Spyglass; } });
|
|
43
43
|
var environments_js_1 = require("./environments.js");
|
|
44
44
|
Object.defineProperty(exports, "SpyglassEnvironment", { enumerable: true, get: function () { return environments_js_1.SpyglassEnvironment; } });
|
|
45
45
|
var index_js_1 = require("./errors/index.js");
|
package/dist/cjs/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "0.1.
|
|
1
|
+
export declare const SDK_VERSION = "0.1.1";
|
package/dist/cjs/version.js
CHANGED
package/dist/esm/BaseClient.mjs
CHANGED
|
@@ -5,9 +5,9 @@ import * as core from "./core/index.mjs";
|
|
|
5
5
|
export function normalizeClientOptions(options) {
|
|
6
6
|
const headers = mergeHeaders({
|
|
7
7
|
"X-Fern-Language": "JavaScript",
|
|
8
|
-
"X-Fern-SDK-Name": "@
|
|
9
|
-
"X-Fern-SDK-Version": "0.1.
|
|
10
|
-
"User-Agent": "@
|
|
8
|
+
"X-Fern-SDK-Name": "@spyglasshq/sdk",
|
|
9
|
+
"X-Fern-SDK-Version": "0.1.1",
|
|
10
|
+
"User-Agent": "@spyglasshq/sdk/0.1.1",
|
|
11
11
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
12
12
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
13
13
|
}, options === null || options === void 0 ? void 0 : options.headers);
|
package/dist/esm/Client.d.mts
CHANGED
|
@@ -4,17 +4,17 @@ import { SearchClient } from "./api/resources/search/client/Client.mjs";
|
|
|
4
4
|
import type { BaseClientOptions, BaseRequestOptions } from "./BaseClient.mjs";
|
|
5
5
|
import { type NormalizedClientOptionsWithAuth } from "./BaseClient.mjs";
|
|
6
6
|
import * as core from "./core/index.mjs";
|
|
7
|
-
export declare namespace
|
|
7
|
+
export declare namespace Spyglass {
|
|
8
8
|
type Options = BaseClientOptions;
|
|
9
9
|
interface RequestOptions extends BaseRequestOptions {
|
|
10
10
|
}
|
|
11
11
|
}
|
|
12
|
-
export declare class
|
|
13
|
-
protected readonly _options: NormalizedClientOptionsWithAuth<
|
|
12
|
+
export declare class Spyglass {
|
|
13
|
+
protected readonly _options: NormalizedClientOptionsWithAuth<Spyglass.Options>;
|
|
14
14
|
protected _search: SearchClient | undefined;
|
|
15
15
|
protected _account: AccountClient | undefined;
|
|
16
16
|
protected _indexing: IndexingClient | undefined;
|
|
17
|
-
constructor(options:
|
|
17
|
+
constructor(options: Spyglass.Options);
|
|
18
18
|
get search(): SearchClient;
|
|
19
19
|
get account(): AccountClient;
|
|
20
20
|
get indexing(): IndexingClient;
|
package/dist/esm/Client.mjs
CHANGED
|
@@ -13,7 +13,7 @@ import { IndexingClient } from "./api/resources/indexing/client/Client.mjs";
|
|
|
13
13
|
import { SearchClient } from "./api/resources/search/client/Client.mjs";
|
|
14
14
|
import { normalizeClientOptionsWithAuth } from "./BaseClient.mjs";
|
|
15
15
|
import * as core from "./core/index.mjs";
|
|
16
|
-
export class
|
|
16
|
+
export class Spyglass {
|
|
17
17
|
constructor(options) {
|
|
18
18
|
this._options = normalizeClientOptionsWithAuth(options);
|
|
19
19
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type * as core from "../../core/index.mjs";
|
|
2
2
|
import * as errors from "../../errors/index.mjs";
|
|
3
|
-
import type * as
|
|
3
|
+
import type * as spyglass from "../index.mjs";
|
|
4
4
|
export declare class BadRequestError extends errors.SpyglassError {
|
|
5
|
-
readonly body:
|
|
6
|
-
constructor(body:
|
|
5
|
+
readonly body: spyglass.Error_;
|
|
6
|
+
constructor(body: spyglass.Error_, rawResponse?: core.RawResponse);
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type * as core from "../../core/index.mjs";
|
|
2
2
|
import * as errors from "../../errors/index.mjs";
|
|
3
|
-
import type * as
|
|
3
|
+
import type * as spyglass from "../index.mjs";
|
|
4
4
|
export declare class ContentTooLargeError extends errors.SpyglassError {
|
|
5
|
-
readonly body:
|
|
6
|
-
constructor(body:
|
|
5
|
+
readonly body: spyglass.Error_;
|
|
6
|
+
constructor(body: spyglass.Error_, rawResponse?: core.RawResponse);
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type * as core from "../../core/index.mjs";
|
|
2
2
|
import * as errors from "../../errors/index.mjs";
|
|
3
|
-
import type * as
|
|
3
|
+
import type * as spyglass from "../index.mjs";
|
|
4
4
|
export declare class ForbiddenError extends errors.SpyglassError {
|
|
5
|
-
readonly body:
|
|
6
|
-
constructor(body:
|
|
5
|
+
readonly body: spyglass.Error_;
|
|
6
|
+
constructor(body: spyglass.Error_, rawResponse?: core.RawResponse);
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type * as core from "../../core/index.mjs";
|
|
2
2
|
import * as errors from "../../errors/index.mjs";
|
|
3
|
-
import type * as
|
|
3
|
+
import type * as spyglass from "../index.mjs";
|
|
4
4
|
export declare class InternalServerError extends errors.SpyglassError {
|
|
5
|
-
readonly body:
|
|
6
|
-
constructor(body:
|
|
5
|
+
readonly body: spyglass.Error_;
|
|
6
|
+
constructor(body: spyglass.Error_, rawResponse?: core.RawResponse);
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type * as core from "../../core/index.mjs";
|
|
2
2
|
import * as errors from "../../errors/index.mjs";
|
|
3
|
-
import type * as
|
|
3
|
+
import type * as spyglass from "../index.mjs";
|
|
4
4
|
export declare class MethodNotAllowedError extends errors.SpyglassError {
|
|
5
|
-
readonly body:
|
|
6
|
-
constructor(body:
|
|
5
|
+
readonly body: spyglass.Error_;
|
|
6
|
+
constructor(body: spyglass.Error_, rawResponse?: core.RawResponse);
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type * as core from "../../core/index.mjs";
|
|
2
2
|
import * as errors from "../../errors/index.mjs";
|
|
3
|
-
import type * as
|
|
3
|
+
import type * as spyglass from "../index.mjs";
|
|
4
4
|
export declare class NotFoundError extends errors.SpyglassError {
|
|
5
|
-
readonly body:
|
|
6
|
-
constructor(body:
|
|
5
|
+
readonly body: spyglass.Error_;
|
|
6
|
+
constructor(body: spyglass.Error_, rawResponse?: core.RawResponse);
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type * as core from "../../core/index.mjs";
|
|
2
2
|
import * as errors from "../../errors/index.mjs";
|
|
3
|
-
import type * as
|
|
3
|
+
import type * as spyglass from "../index.mjs";
|
|
4
4
|
export declare class PaymentRequiredError extends errors.SpyglassError {
|
|
5
|
-
readonly body:
|
|
6
|
-
constructor(body:
|
|
5
|
+
readonly body: spyglass.Error_;
|
|
6
|
+
constructor(body: spyglass.Error_, rawResponse?: core.RawResponse);
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type * as core from "../../core/index.mjs";
|
|
2
2
|
import * as errors from "../../errors/index.mjs";
|
|
3
|
-
import type * as
|
|
3
|
+
import type * as spyglass from "../index.mjs";
|
|
4
4
|
export declare class TooManyRequestsError extends errors.SpyglassError {
|
|
5
|
-
readonly body:
|
|
6
|
-
constructor(body:
|
|
5
|
+
readonly body: spyglass.Error_;
|
|
6
|
+
constructor(body: spyglass.Error_, rawResponse?: core.RawResponse);
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type * as core from "../../core/index.mjs";
|
|
2
2
|
import * as errors from "../../errors/index.mjs";
|
|
3
|
-
import type * as
|
|
3
|
+
import type * as spyglass from "../index.mjs";
|
|
4
4
|
export declare class UnauthorizedError extends errors.SpyglassError {
|
|
5
|
-
readonly body:
|
|
6
|
-
constructor(body:
|
|
5
|
+
readonly body: spyglass.Error_;
|
|
6
|
+
constructor(body: spyglass.Error_, rawResponse?: core.RawResponse);
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.mjs";
|
|
2
2
|
import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.mjs";
|
|
3
3
|
import * as core from "../../../../core/index.mjs";
|
|
4
|
-
import * as
|
|
4
|
+
import * as spyglass from "../../../index.mjs";
|
|
5
5
|
export declare namespace AccountClient {
|
|
6
6
|
type Options = BaseClientOptions;
|
|
7
7
|
interface RequestOptions extends BaseRequestOptions {
|
|
@@ -24,19 +24,19 @@ export declare class AccountClient {
|
|
|
24
24
|
*
|
|
25
25
|
* @param {AccountClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
26
26
|
*
|
|
27
|
-
* @throws {@link
|
|
28
|
-
* @throws {@link
|
|
29
|
-
* @throws {@link
|
|
30
|
-
* @throws {@link
|
|
31
|
-
* @throws {@link
|
|
32
|
-
* @throws {@link
|
|
33
|
-
* @throws {@link
|
|
27
|
+
* @throws {@link spyglass.BadRequestError}
|
|
28
|
+
* @throws {@link spyglass.UnauthorizedError}
|
|
29
|
+
* @throws {@link spyglass.PaymentRequiredError}
|
|
30
|
+
* @throws {@link spyglass.ForbiddenError}
|
|
31
|
+
* @throws {@link spyglass.MethodNotAllowedError}
|
|
32
|
+
* @throws {@link spyglass.TooManyRequestsError}
|
|
33
|
+
* @throws {@link spyglass.InternalServerError}
|
|
34
34
|
* @throws {@link errors.SpyglassError}
|
|
35
35
|
* @throws {@link errors.SpyglassTimeoutError}
|
|
36
36
|
*
|
|
37
37
|
* @example
|
|
38
38
|
* await client.account.getCreditUsage()
|
|
39
39
|
*/
|
|
40
|
-
getCreditUsage(requestOptions?: AccountClient.RequestOptions): core.HttpResponsePromise<
|
|
40
|
+
getCreditUsage(requestOptions?: AccountClient.RequestOptions): core.HttpResponsePromise<spyglass.GetCreditUsageResponse>;
|
|
41
41
|
private __getCreditUsage;
|
|
42
42
|
}
|
|
@@ -14,7 +14,7 @@ import * as core from "../../../../core/index.mjs";
|
|
|
14
14
|
import * as environments from "../../../../environments.mjs";
|
|
15
15
|
import { handleNonStatusCodeError } from "../../../../errors/handleNonStatusCodeError.mjs";
|
|
16
16
|
import * as errors from "../../../../errors/index.mjs";
|
|
17
|
-
import * as
|
|
17
|
+
import * as spyglass from "../../../index.mjs";
|
|
18
18
|
/**
|
|
19
19
|
* The API key's team: credits and the billing period.
|
|
20
20
|
*/
|
|
@@ -33,13 +33,13 @@ export class AccountClient {
|
|
|
33
33
|
*
|
|
34
34
|
* @param {AccountClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
35
35
|
*
|
|
36
|
-
* @throws {@link
|
|
37
|
-
* @throws {@link
|
|
38
|
-
* @throws {@link
|
|
39
|
-
* @throws {@link
|
|
40
|
-
* @throws {@link
|
|
41
|
-
* @throws {@link
|
|
42
|
-
* @throws {@link
|
|
36
|
+
* @throws {@link spyglass.BadRequestError}
|
|
37
|
+
* @throws {@link spyglass.UnauthorizedError}
|
|
38
|
+
* @throws {@link spyglass.PaymentRequiredError}
|
|
39
|
+
* @throws {@link spyglass.ForbiddenError}
|
|
40
|
+
* @throws {@link spyglass.MethodNotAllowedError}
|
|
41
|
+
* @throws {@link spyglass.TooManyRequestsError}
|
|
42
|
+
* @throws {@link spyglass.InternalServerError}
|
|
43
43
|
* @throws {@link errors.SpyglassError}
|
|
44
44
|
* @throws {@link errors.SpyglassTimeoutError}
|
|
45
45
|
*
|
|
@@ -71,19 +71,19 @@ export class AccountClient {
|
|
|
71
71
|
if (_response.error.reason === "status-code") {
|
|
72
72
|
switch (_response.error.statusCode) {
|
|
73
73
|
case 400:
|
|
74
|
-
throw new
|
|
74
|
+
throw new spyglass.BadRequestError(_response.error.body, _response.rawResponse);
|
|
75
75
|
case 401:
|
|
76
|
-
throw new
|
|
76
|
+
throw new spyglass.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
77
77
|
case 402:
|
|
78
|
-
throw new
|
|
78
|
+
throw new spyglass.PaymentRequiredError(_response.error.body, _response.rawResponse);
|
|
79
79
|
case 403:
|
|
80
|
-
throw new
|
|
80
|
+
throw new spyglass.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
81
81
|
case 405:
|
|
82
|
-
throw new
|
|
82
|
+
throw new spyglass.MethodNotAllowedError(_response.error.body, _response.rawResponse);
|
|
83
83
|
case 429:
|
|
84
|
-
throw new
|
|
84
|
+
throw new spyglass.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
85
85
|
case 500:
|
|
86
|
-
throw new
|
|
86
|
+
throw new spyglass.InternalServerError(_response.error.body, _response.rawResponse);
|
|
87
87
|
default:
|
|
88
88
|
throw new errors.SpyglassError({
|
|
89
89
|
statusCode: _response.error.statusCode,
|