@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.
Files changed (77) hide show
  1. package/README.md +248 -66
  2. package/dist/cjs/BaseClient.js +3 -3
  3. package/dist/cjs/Client.d.ts +4 -4
  4. package/dist/cjs/Client.js +3 -3
  5. package/dist/cjs/api/errors/BadRequestError.d.ts +3 -3
  6. package/dist/cjs/api/errors/ContentTooLargeError.d.ts +3 -3
  7. package/dist/cjs/api/errors/ForbiddenError.d.ts +3 -3
  8. package/dist/cjs/api/errors/InternalServerError.d.ts +3 -3
  9. package/dist/cjs/api/errors/MethodNotAllowedError.d.ts +3 -3
  10. package/dist/cjs/api/errors/NotFoundError.d.ts +3 -3
  11. package/dist/cjs/api/errors/PaymentRequiredError.d.ts +3 -3
  12. package/dist/cjs/api/errors/TooManyRequestsError.d.ts +3 -3
  13. package/dist/cjs/api/errors/UnauthorizedError.d.ts +3 -3
  14. package/dist/cjs/api/resources/account/client/Client.d.ts +9 -9
  15. package/dist/cjs/api/resources/account/client/Client.js +15 -15
  16. package/dist/cjs/api/resources/indexing/client/Client.d.ts +19 -19
  17. package/dist/cjs/api/resources/indexing/client/Client.js +31 -31
  18. package/dist/cjs/api/resources/search/client/Client.d.ts +85 -85
  19. package/dist/cjs/api/resources/search/client/Client.js +145 -145
  20. package/dist/cjs/api/resources/search/client/requests/GetBrandLandingPagesRequest.d.ts +2 -2
  21. package/dist/cjs/api/resources/search/client/requests/GetBrandMediaInsightsRequest.d.ts +2 -2
  22. package/dist/cjs/api/resources/search/client/requests/{GetMediaV2Request.d.ts → GetMediaRequest.d.ts} +13 -13
  23. package/dist/cjs/api/resources/search/client/requests/{GetMediaV2Request.js → GetMediaRequest.js} +14 -14
  24. package/dist/{esm/api/resources/search/client/requests/SearchBrandsV2Request.d.mts → cjs/api/resources/search/client/requests/SearchBrandsRequest.d.ts} +4 -4
  25. package/dist/cjs/api/resources/search/client/requests/{SearchBrandsV2Request.js → SearchBrandsRequest.js} +5 -5
  26. package/dist/cjs/api/resources/search/client/requests/index.d.ts +2 -2
  27. package/dist/cjs/api/resources/search/client/requests/index.js +5 -5
  28. package/dist/cjs/api/resources/search/types/GetAccountResponse.d.ts +2 -2
  29. package/dist/cjs/api/resources/search/types/{GetMediaV2Response.d.ts → GetMediaResponse.d.ts} +3 -3
  30. package/dist/cjs/api/resources/search/types/{GetMediaV2Response.js → GetMediaResponse.js} +5 -5
  31. package/dist/{esm/api/resources/search/types/SearchBrandsV2Response.d.mts → cjs/api/resources/search/types/SearchBrandsResponse.d.ts} +3 -3
  32. package/dist/cjs/api/resources/search/types/{SearchBrandsV2Response.js → SearchBrandsResponse.js} +5 -5
  33. package/dist/cjs/api/resources/search/types/index.d.ts +2 -2
  34. package/dist/cjs/api/resources/search/types/index.js +2 -2
  35. package/dist/cjs/index.d.ts +2 -2
  36. package/dist/cjs/index.js +3 -3
  37. package/dist/cjs/version.d.ts +1 -1
  38. package/dist/cjs/version.js +1 -1
  39. package/dist/esm/BaseClient.mjs +3 -3
  40. package/dist/esm/Client.d.mts +4 -4
  41. package/dist/esm/Client.mjs +1 -1
  42. package/dist/esm/api/errors/BadRequestError.d.mts +3 -3
  43. package/dist/esm/api/errors/ContentTooLargeError.d.mts +3 -3
  44. package/dist/esm/api/errors/ForbiddenError.d.mts +3 -3
  45. package/dist/esm/api/errors/InternalServerError.d.mts +3 -3
  46. package/dist/esm/api/errors/MethodNotAllowedError.d.mts +3 -3
  47. package/dist/esm/api/errors/NotFoundError.d.mts +3 -3
  48. package/dist/esm/api/errors/PaymentRequiredError.d.mts +3 -3
  49. package/dist/esm/api/errors/TooManyRequestsError.d.mts +3 -3
  50. package/dist/esm/api/errors/UnauthorizedError.d.mts +3 -3
  51. package/dist/esm/api/resources/account/client/Client.d.mts +9 -9
  52. package/dist/esm/api/resources/account/client/Client.mjs +15 -15
  53. package/dist/esm/api/resources/indexing/client/Client.d.mts +19 -19
  54. package/dist/esm/api/resources/indexing/client/Client.mjs +31 -31
  55. package/dist/esm/api/resources/search/client/Client.d.mts +85 -85
  56. package/dist/esm/api/resources/search/client/Client.mjs +145 -145
  57. package/dist/esm/api/resources/search/client/requests/GetBrandLandingPagesRequest.d.mts +2 -2
  58. package/dist/esm/api/resources/search/client/requests/GetBrandMediaInsightsRequest.d.mts +2 -2
  59. package/dist/esm/api/resources/search/client/requests/{GetMediaV2Request.d.mts → GetMediaRequest.d.mts} +13 -13
  60. package/dist/esm/api/resources/search/client/requests/{GetMediaV2Request.mjs → GetMediaRequest.mjs} +13 -13
  61. package/dist/{cjs/api/resources/search/client/requests/SearchBrandsV2Request.d.ts → esm/api/resources/search/client/requests/SearchBrandsRequest.d.mts} +4 -4
  62. package/dist/esm/api/resources/search/client/requests/{SearchBrandsV2Request.mjs → SearchBrandsRequest.mjs} +4 -4
  63. package/dist/esm/api/resources/search/client/requests/index.d.mts +2 -2
  64. package/dist/esm/api/resources/search/client/requests/index.mjs +2 -2
  65. package/dist/esm/api/resources/search/types/GetAccountResponse.d.mts +2 -2
  66. package/dist/esm/api/resources/search/types/{GetMediaV2Response.d.mts → GetMediaResponse.d.mts} +3 -3
  67. package/dist/esm/api/resources/search/types/{GetMediaV2Response.mjs → GetMediaResponse.mjs} +4 -4
  68. package/dist/{cjs/api/resources/search/types/SearchBrandsV2Response.d.ts → esm/api/resources/search/types/SearchBrandsResponse.d.mts} +3 -3
  69. package/dist/esm/api/resources/search/types/{SearchBrandsV2Response.mjs → SearchBrandsResponse.mjs} +4 -4
  70. package/dist/esm/api/resources/search/types/index.d.mts +2 -2
  71. package/dist/esm/api/resources/search/types/index.mjs +2 -2
  72. package/dist/esm/index.d.mts +2 -2
  73. package/dist/esm/index.mjs +2 -2
  74. package/dist/esm/version.d.mts +1 -1
  75. package/dist/esm/version.mjs +1 -1
  76. package/package.json +17 -2
  77. package/reference.md +23 -23
@@ -15,7 +15,7 @@ import { mergeAdditionalBodyParameters } from "../../../../core/requestBody.mjs"
15
15
  import * as environments from "../../../../environments.mjs";
16
16
  import { handleNonStatusCodeError } from "../../../../errors/handleNonStatusCodeError.mjs";
17
17
  import * as errors from "../../../../errors/index.mjs";
18
- import * as Spyglass from "../../../index.mjs";
18
+ import * as spyglass from "../../../index.mjs";
19
19
  /**
20
20
  * Search accounts, ads, and related data.
21
21
  */
@@ -58,30 +58,30 @@ export class SearchClient {
58
58
  * A `query` search runs a language model, so it bills a minimum of one
59
59
  * row even when nothing matches.
60
60
  *
61
- * @param {Spyglass.SearchBrandsV2Request} request
61
+ * @param {spyglass.SearchBrandsRequest} request
62
62
  * @param {SearchClient.RequestOptions} requestOptions - Request-specific configuration.
63
63
  *
64
- * @throws {@link Spyglass.BadRequestError}
65
- * @throws {@link Spyglass.UnauthorizedError}
66
- * @throws {@link Spyglass.PaymentRequiredError}
67
- * @throws {@link Spyglass.ForbiddenError}
68
- * @throws {@link Spyglass.MethodNotAllowedError}
69
- * @throws {@link Spyglass.ContentTooLargeError}
70
- * @throws {@link Spyglass.TooManyRequestsError}
71
- * @throws {@link Spyglass.InternalServerError}
64
+ * @throws {@link spyglass.BadRequestError}
65
+ * @throws {@link spyglass.UnauthorizedError}
66
+ * @throws {@link spyglass.PaymentRequiredError}
67
+ * @throws {@link spyglass.ForbiddenError}
68
+ * @throws {@link spyglass.MethodNotAllowedError}
69
+ * @throws {@link spyglass.ContentTooLargeError}
70
+ * @throws {@link spyglass.TooManyRequestsError}
71
+ * @throws {@link spyglass.InternalServerError}
72
72
  * @throws {@link errors.SpyglassError}
73
73
  * @throws {@link errors.SpyglassTimeoutError}
74
74
  *
75
75
  * @example
76
- * await client.search.searchBrandsV2({
76
+ * await client.search.brands({
77
77
  * names: ["Nike"],
78
78
  * limit: 3
79
79
  * })
80
80
  */
81
- searchBrandsV2(request = {}, requestOptions) {
82
- return core.HttpResponsePromise.fromPromise(this.__searchBrandsV2(request, requestOptions));
81
+ brands(request = {}, requestOptions) {
82
+ return core.HttpResponsePromise.fromPromise(this.__brands(request, requestOptions));
83
83
  }
84
- __searchBrandsV2() {
84
+ __brands() {
85
85
  return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
86
86
  var _a, _b, _c, _d, _e, _f, _g, _h, _j;
87
87
  const _authRequest = yield this._options.authProvider.getAuthRequest();
@@ -106,21 +106,21 @@ export class SearchClient {
106
106
  if (_response.error.reason === "status-code") {
107
107
  switch (_response.error.statusCode) {
108
108
  case 400:
109
- throw new Spyglass.BadRequestError(_response.error.body, _response.rawResponse);
109
+ throw new spyglass.BadRequestError(_response.error.body, _response.rawResponse);
110
110
  case 401:
111
- throw new Spyglass.UnauthorizedError(_response.error.body, _response.rawResponse);
111
+ throw new spyglass.UnauthorizedError(_response.error.body, _response.rawResponse);
112
112
  case 402:
113
- throw new Spyglass.PaymentRequiredError(_response.error.body, _response.rawResponse);
113
+ throw new spyglass.PaymentRequiredError(_response.error.body, _response.rawResponse);
114
114
  case 403:
115
- throw new Spyglass.ForbiddenError(_response.error.body, _response.rawResponse);
115
+ throw new spyglass.ForbiddenError(_response.error.body, _response.rawResponse);
116
116
  case 405:
117
- throw new Spyglass.MethodNotAllowedError(_response.error.body, _response.rawResponse);
117
+ throw new spyglass.MethodNotAllowedError(_response.error.body, _response.rawResponse);
118
118
  case 413:
119
- throw new Spyglass.ContentTooLargeError(_response.error.body, _response.rawResponse);
119
+ throw new spyglass.ContentTooLargeError(_response.error.body, _response.rawResponse);
120
120
  case 429:
121
- throw new Spyglass.TooManyRequestsError(_response.error.body, _response.rawResponse);
121
+ throw new spyglass.TooManyRequestsError(_response.error.body, _response.rawResponse);
122
122
  case 500:
123
- throw new Spyglass.InternalServerError(_response.error.body, _response.rawResponse);
123
+ throw new spyglass.InternalServerError(_response.error.body, _response.rawResponse);
124
124
  default:
125
125
  throw new errors.SpyglassError({
126
126
  statusCode: _response.error.statusCode,
@@ -169,17 +169,17 @@ export class SearchClient {
169
169
  * A `query` search runs a language model, so it bills a minimum of one
170
170
  * row even when nothing matches.
171
171
  *
172
- * @param {Spyglass.SearchCreatorsRequest} request
172
+ * @param {spyglass.SearchCreatorsRequest} request
173
173
  * @param {SearchClient.RequestOptions} requestOptions - Request-specific configuration.
174
174
  *
175
- * @throws {@link Spyglass.BadRequestError}
176
- * @throws {@link Spyglass.UnauthorizedError}
177
- * @throws {@link Spyglass.PaymentRequiredError}
178
- * @throws {@link Spyglass.ForbiddenError}
179
- * @throws {@link Spyglass.MethodNotAllowedError}
180
- * @throws {@link Spyglass.ContentTooLargeError}
181
- * @throws {@link Spyglass.TooManyRequestsError}
182
- * @throws {@link Spyglass.InternalServerError}
175
+ * @throws {@link spyglass.BadRequestError}
176
+ * @throws {@link spyglass.UnauthorizedError}
177
+ * @throws {@link spyglass.PaymentRequiredError}
178
+ * @throws {@link spyglass.ForbiddenError}
179
+ * @throws {@link spyglass.MethodNotAllowedError}
180
+ * @throws {@link spyglass.ContentTooLargeError}
181
+ * @throws {@link spyglass.TooManyRequestsError}
182
+ * @throws {@link spyglass.InternalServerError}
183
183
  * @throws {@link errors.SpyglassError}
184
184
  * @throws {@link errors.SpyglassTimeoutError}
185
185
  *
@@ -218,21 +218,21 @@ export class SearchClient {
218
218
  if (_response.error.reason === "status-code") {
219
219
  switch (_response.error.statusCode) {
220
220
  case 400:
221
- throw new Spyglass.BadRequestError(_response.error.body, _response.rawResponse);
221
+ throw new spyglass.BadRequestError(_response.error.body, _response.rawResponse);
222
222
  case 401:
223
- throw new Spyglass.UnauthorizedError(_response.error.body, _response.rawResponse);
223
+ throw new spyglass.UnauthorizedError(_response.error.body, _response.rawResponse);
224
224
  case 402:
225
- throw new Spyglass.PaymentRequiredError(_response.error.body, _response.rawResponse);
225
+ throw new spyglass.PaymentRequiredError(_response.error.body, _response.rawResponse);
226
226
  case 403:
227
- throw new Spyglass.ForbiddenError(_response.error.body, _response.rawResponse);
227
+ throw new spyglass.ForbiddenError(_response.error.body, _response.rawResponse);
228
228
  case 405:
229
- throw new Spyglass.MethodNotAllowedError(_response.error.body, _response.rawResponse);
229
+ throw new spyglass.MethodNotAllowedError(_response.error.body, _response.rawResponse);
230
230
  case 413:
231
- throw new Spyglass.ContentTooLargeError(_response.error.body, _response.rawResponse);
231
+ throw new spyglass.ContentTooLargeError(_response.error.body, _response.rawResponse);
232
232
  case 429:
233
- throw new Spyglass.TooManyRequestsError(_response.error.body, _response.rawResponse);
233
+ throw new spyglass.TooManyRequestsError(_response.error.body, _response.rawResponse);
234
234
  case 500:
235
- throw new Spyglass.InternalServerError(_response.error.body, _response.rawResponse);
235
+ throw new spyglass.InternalServerError(_response.error.body, _response.rawResponse);
236
236
  default:
237
237
  throw new errors.SpyglassError({
238
238
  statusCode: _response.error.statusCode,
@@ -253,17 +253,17 @@ export class SearchClient {
253
253
  * Costs 2,000 microdollars ($0.0020) per account returned, charged against your plan's monthly credits.
254
254
  * An id that matches nothing returns 404 and is free.
255
255
  *
256
- * @param {Spyglass.GetAccountRequest} request
256
+ * @param {spyglass.GetAccountRequest} request
257
257
  * @param {SearchClient.RequestOptions} requestOptions - Request-specific configuration.
258
258
  *
259
- * @throws {@link Spyglass.BadRequestError}
260
- * @throws {@link Spyglass.UnauthorizedError}
261
- * @throws {@link Spyglass.PaymentRequiredError}
262
- * @throws {@link Spyglass.ForbiddenError}
263
- * @throws {@link Spyglass.NotFoundError}
264
- * @throws {@link Spyglass.MethodNotAllowedError}
265
- * @throws {@link Spyglass.TooManyRequestsError}
266
- * @throws {@link Spyglass.InternalServerError}
259
+ * @throws {@link spyglass.BadRequestError}
260
+ * @throws {@link spyglass.UnauthorizedError}
261
+ * @throws {@link spyglass.PaymentRequiredError}
262
+ * @throws {@link spyglass.ForbiddenError}
263
+ * @throws {@link spyglass.NotFoundError}
264
+ * @throws {@link spyglass.MethodNotAllowedError}
265
+ * @throws {@link spyglass.TooManyRequestsError}
266
+ * @throws {@link spyglass.InternalServerError}
267
267
  * @throws {@link errors.SpyglassError}
268
268
  * @throws {@link errors.SpyglassTimeoutError}
269
269
  *
@@ -298,21 +298,21 @@ export class SearchClient {
298
298
  if (_response.error.reason === "status-code") {
299
299
  switch (_response.error.statusCode) {
300
300
  case 400:
301
- throw new Spyglass.BadRequestError(_response.error.body, _response.rawResponse);
301
+ throw new spyglass.BadRequestError(_response.error.body, _response.rawResponse);
302
302
  case 401:
303
- throw new Spyglass.UnauthorizedError(_response.error.body, _response.rawResponse);
303
+ throw new spyglass.UnauthorizedError(_response.error.body, _response.rawResponse);
304
304
  case 402:
305
- throw new Spyglass.PaymentRequiredError(_response.error.body, _response.rawResponse);
305
+ throw new spyglass.PaymentRequiredError(_response.error.body, _response.rawResponse);
306
306
  case 403:
307
- throw new Spyglass.ForbiddenError(_response.error.body, _response.rawResponse);
307
+ throw new spyglass.ForbiddenError(_response.error.body, _response.rawResponse);
308
308
  case 404:
309
- throw new Spyglass.NotFoundError(_response.error.body, _response.rawResponse);
309
+ throw new spyglass.NotFoundError(_response.error.body, _response.rawResponse);
310
310
  case 405:
311
- throw new Spyglass.MethodNotAllowedError(_response.error.body, _response.rawResponse);
311
+ throw new spyglass.MethodNotAllowedError(_response.error.body, _response.rawResponse);
312
312
  case 429:
313
- throw new Spyglass.TooManyRequestsError(_response.error.body, _response.rawResponse);
313
+ throw new spyglass.TooManyRequestsError(_response.error.body, _response.rawResponse);
314
314
  case 500:
315
- throw new Spyglass.InternalServerError(_response.error.body, _response.rawResponse);
315
+ throw new spyglass.InternalServerError(_response.error.body, _response.rawResponse);
316
316
  default:
317
317
  throw new errors.SpyglassError({
318
318
  statusCode: _response.error.statusCode,
@@ -332,16 +332,16 @@ export class SearchClient {
332
332
  * Limited to 120 requests per minute per user.
333
333
  * This call is free and does not use credits.
334
334
  *
335
- * @param {Spyglass.SearchTaxonomiesRequest} request
335
+ * @param {spyglass.SearchTaxonomiesRequest} request
336
336
  * @param {SearchClient.RequestOptions} requestOptions - Request-specific configuration.
337
337
  *
338
- * @throws {@link Spyglass.BadRequestError}
339
- * @throws {@link Spyglass.UnauthorizedError}
340
- * @throws {@link Spyglass.PaymentRequiredError}
341
- * @throws {@link Spyglass.ForbiddenError}
342
- * @throws {@link Spyglass.MethodNotAllowedError}
343
- * @throws {@link Spyglass.TooManyRequestsError}
344
- * @throws {@link Spyglass.InternalServerError}
338
+ * @throws {@link spyglass.BadRequestError}
339
+ * @throws {@link spyglass.UnauthorizedError}
340
+ * @throws {@link spyglass.PaymentRequiredError}
341
+ * @throws {@link spyglass.ForbiddenError}
342
+ * @throws {@link spyglass.MethodNotAllowedError}
343
+ * @throws {@link spyglass.TooManyRequestsError}
344
+ * @throws {@link spyglass.InternalServerError}
345
345
  * @throws {@link errors.SpyglassError}
346
346
  * @throws {@link errors.SpyglassTimeoutError}
347
347
  *
@@ -384,19 +384,19 @@ export class SearchClient {
384
384
  if (_response.error.reason === "status-code") {
385
385
  switch (_response.error.statusCode) {
386
386
  case 400:
387
- throw new Spyglass.BadRequestError(_response.error.body, _response.rawResponse);
387
+ throw new spyglass.BadRequestError(_response.error.body, _response.rawResponse);
388
388
  case 401:
389
- throw new Spyglass.UnauthorizedError(_response.error.body, _response.rawResponse);
389
+ throw new spyglass.UnauthorizedError(_response.error.body, _response.rawResponse);
390
390
  case 402:
391
- throw new Spyglass.PaymentRequiredError(_response.error.body, _response.rawResponse);
391
+ throw new spyglass.PaymentRequiredError(_response.error.body, _response.rawResponse);
392
392
  case 403:
393
- throw new Spyglass.ForbiddenError(_response.error.body, _response.rawResponse);
393
+ throw new spyglass.ForbiddenError(_response.error.body, _response.rawResponse);
394
394
  case 405:
395
- throw new Spyglass.MethodNotAllowedError(_response.error.body, _response.rawResponse);
395
+ throw new spyglass.MethodNotAllowedError(_response.error.body, _response.rawResponse);
396
396
  case 429:
397
- throw new Spyglass.TooManyRequestsError(_response.error.body, _response.rawResponse);
397
+ throw new spyglass.TooManyRequestsError(_response.error.body, _response.rawResponse);
398
398
  case 500:
399
- throw new Spyglass.InternalServerError(_response.error.body, _response.rawResponse);
399
+ throw new spyglass.InternalServerError(_response.error.body, _response.rawResponse);
400
400
  default:
401
401
  throw new errors.SpyglassError({
402
402
  statusCode: _response.error.statusCode,
@@ -418,31 +418,31 @@ export class SearchClient {
418
418
  * The call bills a minimum of one row even when nothing matches. In that
419
419
  * case `count` is 0 but you are charged for one row.
420
420
  *
421
- * @param {Spyglass.GetMediaV2Request} request
421
+ * @param {spyglass.GetMediaRequest} request
422
422
  * @param {SearchClient.RequestOptions} requestOptions - Request-specific configuration.
423
423
  *
424
- * @throws {@link Spyglass.BadRequestError}
425
- * @throws {@link Spyglass.UnauthorizedError}
426
- * @throws {@link Spyglass.PaymentRequiredError}
427
- * @throws {@link Spyglass.ForbiddenError}
428
- * @throws {@link Spyglass.NotFoundError}
429
- * @throws {@link Spyglass.MethodNotAllowedError}
430
- * @throws {@link Spyglass.ContentTooLargeError}
431
- * @throws {@link Spyglass.TooManyRequestsError}
432
- * @throws {@link Spyglass.InternalServerError}
424
+ * @throws {@link spyglass.BadRequestError}
425
+ * @throws {@link spyglass.UnauthorizedError}
426
+ * @throws {@link spyglass.PaymentRequiredError}
427
+ * @throws {@link spyglass.ForbiddenError}
428
+ * @throws {@link spyglass.NotFoundError}
429
+ * @throws {@link spyglass.MethodNotAllowedError}
430
+ * @throws {@link spyglass.ContentTooLargeError}
431
+ * @throws {@link spyglass.TooManyRequestsError}
432
+ * @throws {@link spyglass.InternalServerError}
433
433
  * @throws {@link errors.SpyglassError}
434
434
  * @throws {@link errors.SpyglassTimeoutError}
435
435
  *
436
436
  * @example
437
- * await client.search.getMediaV2({
437
+ * await client.search.getMedia({
438
438
  * query: "comfort-focused video ads",
439
439
  * limit: 20
440
440
  * })
441
441
  */
442
- getMediaV2(request = {}, requestOptions) {
443
- return core.HttpResponsePromise.fromPromise(this.__getMediaV2(request, requestOptions));
442
+ getMedia(request = {}, requestOptions) {
443
+ return core.HttpResponsePromise.fromPromise(this.__getMedia(request, requestOptions));
444
444
  }
445
- __getMediaV2() {
445
+ __getMedia() {
446
446
  return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
447
447
  var _a, _b, _c, _d, _e, _f, _g, _h, _j;
448
448
  const _authRequest = yield this._options.authProvider.getAuthRequest();
@@ -467,23 +467,23 @@ export class SearchClient {
467
467
  if (_response.error.reason === "status-code") {
468
468
  switch (_response.error.statusCode) {
469
469
  case 400:
470
- throw new Spyglass.BadRequestError(_response.error.body, _response.rawResponse);
470
+ throw new spyglass.BadRequestError(_response.error.body, _response.rawResponse);
471
471
  case 401:
472
- throw new Spyglass.UnauthorizedError(_response.error.body, _response.rawResponse);
472
+ throw new spyglass.UnauthorizedError(_response.error.body, _response.rawResponse);
473
473
  case 402:
474
- throw new Spyglass.PaymentRequiredError(_response.error.body, _response.rawResponse);
474
+ throw new spyglass.PaymentRequiredError(_response.error.body, _response.rawResponse);
475
475
  case 403:
476
- throw new Spyglass.ForbiddenError(_response.error.body, _response.rawResponse);
476
+ throw new spyglass.ForbiddenError(_response.error.body, _response.rawResponse);
477
477
  case 404:
478
- throw new Spyglass.NotFoundError(_response.error.body, _response.rawResponse);
478
+ throw new spyglass.NotFoundError(_response.error.body, _response.rawResponse);
479
479
  case 405:
480
- throw new Spyglass.MethodNotAllowedError(_response.error.body, _response.rawResponse);
480
+ throw new spyglass.MethodNotAllowedError(_response.error.body, _response.rawResponse);
481
481
  case 413:
482
- throw new Spyglass.ContentTooLargeError(_response.error.body, _response.rawResponse);
482
+ throw new spyglass.ContentTooLargeError(_response.error.body, _response.rawResponse);
483
483
  case 429:
484
- throw new Spyglass.TooManyRequestsError(_response.error.body, _response.rawResponse);
484
+ throw new spyglass.TooManyRequestsError(_response.error.body, _response.rawResponse);
485
485
  case 500:
486
- throw new Spyglass.InternalServerError(_response.error.body, _response.rawResponse);
486
+ throw new spyglass.InternalServerError(_response.error.body, _response.rawResponse);
487
487
  default:
488
488
  throw new errors.SpyglassError({
489
489
  statusCode: _response.error.statusCode,
@@ -506,17 +506,17 @@ export class SearchClient {
506
506
  * Limited to 120 requests per minute per user.
507
507
  * Costs 1,000 microdollars ($0.0010) per cluster returned, charged against your plan's monthly credits. The count field is what you were charged for.
508
508
  *
509
- * @param {Spyglass.GetBrandMediaInsightsRequest} request
509
+ * @param {spyglass.GetBrandMediaInsightsRequest} request
510
510
  * @param {SearchClient.RequestOptions} requestOptions - Request-specific configuration.
511
511
  *
512
- * @throws {@link Spyglass.BadRequestError}
513
- * @throws {@link Spyglass.UnauthorizedError}
514
- * @throws {@link Spyglass.PaymentRequiredError}
515
- * @throws {@link Spyglass.ForbiddenError}
516
- * @throws {@link Spyglass.NotFoundError}
517
- * @throws {@link Spyglass.MethodNotAllowedError}
518
- * @throws {@link Spyglass.TooManyRequestsError}
519
- * @throws {@link Spyglass.InternalServerError}
512
+ * @throws {@link spyglass.BadRequestError}
513
+ * @throws {@link spyglass.UnauthorizedError}
514
+ * @throws {@link spyglass.PaymentRequiredError}
515
+ * @throws {@link spyglass.ForbiddenError}
516
+ * @throws {@link spyglass.NotFoundError}
517
+ * @throws {@link spyglass.MethodNotAllowedError}
518
+ * @throws {@link spyglass.TooManyRequestsError}
519
+ * @throws {@link spyglass.InternalServerError}
520
520
  * @throws {@link errors.SpyglassError}
521
521
  * @throws {@link errors.SpyglassTimeoutError}
522
522
  *
@@ -564,21 +564,21 @@ export class SearchClient {
564
564
  if (_response.error.reason === "status-code") {
565
565
  switch (_response.error.statusCode) {
566
566
  case 400:
567
- throw new Spyglass.BadRequestError(_response.error.body, _response.rawResponse);
567
+ throw new spyglass.BadRequestError(_response.error.body, _response.rawResponse);
568
568
  case 401:
569
- throw new Spyglass.UnauthorizedError(_response.error.body, _response.rawResponse);
569
+ throw new spyglass.UnauthorizedError(_response.error.body, _response.rawResponse);
570
570
  case 402:
571
- throw new Spyglass.PaymentRequiredError(_response.error.body, _response.rawResponse);
571
+ throw new spyglass.PaymentRequiredError(_response.error.body, _response.rawResponse);
572
572
  case 403:
573
- throw new Spyglass.ForbiddenError(_response.error.body, _response.rawResponse);
573
+ throw new spyglass.ForbiddenError(_response.error.body, _response.rawResponse);
574
574
  case 404:
575
- throw new Spyglass.NotFoundError(_response.error.body, _response.rawResponse);
575
+ throw new spyglass.NotFoundError(_response.error.body, _response.rawResponse);
576
576
  case 405:
577
- throw new Spyglass.MethodNotAllowedError(_response.error.body, _response.rawResponse);
577
+ throw new spyglass.MethodNotAllowedError(_response.error.body, _response.rawResponse);
578
578
  case 429:
579
- throw new Spyglass.TooManyRequestsError(_response.error.body, _response.rawResponse);
579
+ throw new spyglass.TooManyRequestsError(_response.error.body, _response.rawResponse);
580
580
  case 500:
581
- throw new Spyglass.InternalServerError(_response.error.body, _response.rawResponse);
581
+ throw new spyglass.InternalServerError(_response.error.body, _response.rawResponse);
582
582
  default:
583
583
  throw new errors.SpyglassError({
584
584
  statusCode: _response.error.statusCode,
@@ -597,17 +597,17 @@ export class SearchClient {
597
597
  * Limited to 120 requests per minute per user.
598
598
  * Costs 5,000 microdollars ($0.0050) per landing page returned, charged against your plan's monthly credits. The count field is what you were charged for.
599
599
  *
600
- * @param {Spyglass.GetBrandLandingPagesRequest} request
600
+ * @param {spyglass.GetBrandLandingPagesRequest} request
601
601
  * @param {SearchClient.RequestOptions} requestOptions - Request-specific configuration.
602
602
  *
603
- * @throws {@link Spyglass.BadRequestError}
604
- * @throws {@link Spyglass.UnauthorizedError}
605
- * @throws {@link Spyglass.PaymentRequiredError}
606
- * @throws {@link Spyglass.ForbiddenError}
607
- * @throws {@link Spyglass.NotFoundError}
608
- * @throws {@link Spyglass.MethodNotAllowedError}
609
- * @throws {@link Spyglass.TooManyRequestsError}
610
- * @throws {@link Spyglass.InternalServerError}
603
+ * @throws {@link spyglass.BadRequestError}
604
+ * @throws {@link spyglass.UnauthorizedError}
605
+ * @throws {@link spyglass.PaymentRequiredError}
606
+ * @throws {@link spyglass.ForbiddenError}
607
+ * @throws {@link spyglass.NotFoundError}
608
+ * @throws {@link spyglass.MethodNotAllowedError}
609
+ * @throws {@link spyglass.TooManyRequestsError}
610
+ * @throws {@link spyglass.InternalServerError}
611
611
  * @throws {@link errors.SpyglassError}
612
612
  * @throws {@link errors.SpyglassTimeoutError}
613
613
  *
@@ -653,21 +653,21 @@ export class SearchClient {
653
653
  if (_response.error.reason === "status-code") {
654
654
  switch (_response.error.statusCode) {
655
655
  case 400:
656
- throw new Spyglass.BadRequestError(_response.error.body, _response.rawResponse);
656
+ throw new spyglass.BadRequestError(_response.error.body, _response.rawResponse);
657
657
  case 401:
658
- throw new Spyglass.UnauthorizedError(_response.error.body, _response.rawResponse);
658
+ throw new spyglass.UnauthorizedError(_response.error.body, _response.rawResponse);
659
659
  case 402:
660
- throw new Spyglass.PaymentRequiredError(_response.error.body, _response.rawResponse);
660
+ throw new spyglass.PaymentRequiredError(_response.error.body, _response.rawResponse);
661
661
  case 403:
662
- throw new Spyglass.ForbiddenError(_response.error.body, _response.rawResponse);
662
+ throw new spyglass.ForbiddenError(_response.error.body, _response.rawResponse);
663
663
  case 404:
664
- throw new Spyglass.NotFoundError(_response.error.body, _response.rawResponse);
664
+ throw new spyglass.NotFoundError(_response.error.body, _response.rawResponse);
665
665
  case 405:
666
- throw new Spyglass.MethodNotAllowedError(_response.error.body, _response.rawResponse);
666
+ throw new spyglass.MethodNotAllowedError(_response.error.body, _response.rawResponse);
667
667
  case 429:
668
- throw new Spyglass.TooManyRequestsError(_response.error.body, _response.rawResponse);
668
+ throw new spyglass.TooManyRequestsError(_response.error.body, _response.rawResponse);
669
669
  case 500:
670
- throw new Spyglass.InternalServerError(_response.error.body, _response.rawResponse);
670
+ throw new spyglass.InternalServerError(_response.error.body, _response.rawResponse);
671
671
  default:
672
672
  throw new errors.SpyglassError({
673
673
  statusCode: _response.error.statusCode,
@@ -704,17 +704,17 @@ export class SearchClient {
704
704
  * Each comment page fetched live (`limit`, default 1) is one billed
705
705
  * unit. Cached posts do not scrape and are not billed.
706
706
  *
707
- * @param {Spyglass.GetCommentsRequest} request
707
+ * @param {spyglass.GetCommentsRequest} request
708
708
  * @param {SearchClient.RequestOptions} requestOptions - Request-specific configuration.
709
709
  *
710
- * @throws {@link Spyglass.BadRequestError}
711
- * @throws {@link Spyglass.UnauthorizedError}
712
- * @throws {@link Spyglass.PaymentRequiredError}
713
- * @throws {@link Spyglass.ForbiddenError}
714
- * @throws {@link Spyglass.MethodNotAllowedError}
715
- * @throws {@link Spyglass.ContentTooLargeError}
716
- * @throws {@link Spyglass.TooManyRequestsError}
717
- * @throws {@link Spyglass.InternalServerError}
710
+ * @throws {@link spyglass.BadRequestError}
711
+ * @throws {@link spyglass.UnauthorizedError}
712
+ * @throws {@link spyglass.PaymentRequiredError}
713
+ * @throws {@link spyglass.ForbiddenError}
714
+ * @throws {@link spyglass.MethodNotAllowedError}
715
+ * @throws {@link spyglass.ContentTooLargeError}
716
+ * @throws {@link spyglass.TooManyRequestsError}
717
+ * @throws {@link spyglass.InternalServerError}
718
718
  * @throws {@link errors.SpyglassError}
719
719
  * @throws {@link errors.SpyglassTimeoutError}
720
720
  *
@@ -753,21 +753,21 @@ export class SearchClient {
753
753
  if (_response.error.reason === "status-code") {
754
754
  switch (_response.error.statusCode) {
755
755
  case 400:
756
- throw new Spyglass.BadRequestError(_response.error.body, _response.rawResponse);
756
+ throw new spyglass.BadRequestError(_response.error.body, _response.rawResponse);
757
757
  case 401:
758
- throw new Spyglass.UnauthorizedError(_response.error.body, _response.rawResponse);
758
+ throw new spyglass.UnauthorizedError(_response.error.body, _response.rawResponse);
759
759
  case 402:
760
- throw new Spyglass.PaymentRequiredError(_response.error.body, _response.rawResponse);
760
+ throw new spyglass.PaymentRequiredError(_response.error.body, _response.rawResponse);
761
761
  case 403:
762
- throw new Spyglass.ForbiddenError(_response.error.body, _response.rawResponse);
762
+ throw new spyglass.ForbiddenError(_response.error.body, _response.rawResponse);
763
763
  case 405:
764
- throw new Spyglass.MethodNotAllowedError(_response.error.body, _response.rawResponse);
764
+ throw new spyglass.MethodNotAllowedError(_response.error.body, _response.rawResponse);
765
765
  case 413:
766
- throw new Spyglass.ContentTooLargeError(_response.error.body, _response.rawResponse);
766
+ throw new spyglass.ContentTooLargeError(_response.error.body, _response.rawResponse);
767
767
  case 429:
768
- throw new Spyglass.TooManyRequestsError(_response.error.body, _response.rawResponse);
768
+ throw new spyglass.TooManyRequestsError(_response.error.body, _response.rawResponse);
769
769
  case 500:
770
- throw new Spyglass.InternalServerError(_response.error.body, _response.rawResponse);
770
+ throw new spyglass.InternalServerError(_response.error.body, _response.rawResponse);
771
771
  default:
772
772
  throw new errors.SpyglassError({
773
773
  statusCode: _response.error.statusCode,
@@ -1,4 +1,4 @@
1
- import type * as Spyglass from "../../../../index.mjs";
1
+ import type * as spyglass from "../../../../index.mjs";
2
2
  /**
3
3
  * @example
4
4
  * {
@@ -8,6 +8,6 @@ import type * as Spyglass from "../../../../index.mjs";
8
8
  export interface GetBrandLandingPagesRequest {
9
9
  /** Brand or creator id returned by POST /brands or POST /creators. */
10
10
  id: string;
11
- showInactive?: Spyglass.GetBrandLandingPagesRequestShowInactive;
11
+ showInactive?: spyglass.GetBrandLandingPagesRequestShowInactive;
12
12
  limit?: number;
13
13
  }
@@ -1,4 +1,4 @@
1
- import type * as Spyglass from "../../../../index.mjs";
1
+ import type * as spyglass from "../../../../index.mjs";
2
2
  /**
3
3
  * @example
4
4
  * {
@@ -9,7 +9,7 @@ import type * as Spyglass from "../../../../index.mjs";
9
9
  export interface GetBrandMediaInsightsRequest {
10
10
  /** Brand or creator id returned by POST /brands or POST /creators. */
11
11
  id: string;
12
- type: Spyglass.GetBrandMediaInsightsRequestType;
12
+ type: spyglass.GetBrandMediaInsightsRequestType;
13
13
  maxDaysBack?: number;
14
14
  limit?: number;
15
15
  }
@@ -5,20 +5,20 @@
5
5
  * limit: 20
6
6
  * }
7
7
  */
8
- export interface GetMediaV2Request {
8
+ export interface GetMediaRequest {
9
9
  /** Brand id given as a platform string or uuid */
10
- brandId?: GetMediaV2Request.BrandId;
10
+ brandId?: GetMediaRequest.BrandId;
11
11
  query?: string;
12
- channel?: GetMediaV2Request.Channel.Item[];
13
- format?: GetMediaV2Request.Format.Item[];
14
- duration?: GetMediaV2Request.Duration.Item[];
15
- status?: GetMediaV2Request.Status;
16
- categories?: GetMediaV2Request.Categories.Item[];
12
+ channel?: GetMediaRequest.Channel.Item[];
13
+ format?: GetMediaRequest.Format.Item[];
14
+ duration?: GetMediaRequest.Duration.Item[];
15
+ status?: GetMediaRequest.Status;
16
+ categories?: GetMediaRequest.Categories.Item[];
17
17
  taxonomy?: string[];
18
- funnelStage?: GetMediaV2Request.FunnelStage.Item[];
19
- language?: GetMediaV2Request.Language.Item[];
18
+ funnelStage?: GetMediaRequest.FunnelStage.Item[];
19
+ language?: GetMediaRequest.Language.Item[];
20
20
  location?: string[];
21
- datePreset?: GetMediaV2Request.DatePreset;
21
+ datePreset?: GetMediaRequest.DatePreset;
22
22
  startDate?: string;
23
23
  endDate?: string;
24
24
  minDaysRun?: number;
@@ -26,15 +26,15 @@ export interface GetMediaV2Request {
26
26
  minViewCount?: number;
27
27
  maxViewCount?: number;
28
28
  landingPage?: string;
29
- landingPageMatch?: GetMediaV2Request.LandingPageMatch;
29
+ landingPageMatch?: GetMediaRequest.LandingPageMatch;
30
30
  lowImpressions?: boolean;
31
31
  partnershipAd?: boolean;
32
32
  crossposted?: boolean;
33
- sortBy?: GetMediaV2Request.SortBy;
33
+ sortBy?: GetMediaRequest.SortBy;
34
34
  limit?: number;
35
35
  offset?: number;
36
36
  }
37
- export declare namespace GetMediaV2Request {
37
+ export declare namespace GetMediaRequest {
38
38
  /**
39
39
  * Brand id given as a platform string or uuid
40
40
  */