@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
@@ -51,7 +51,7 @@ const requestBody_js_1 = require("../../../../core/requestBody.js");
51
51
  const environments = __importStar(require("../../../../environments.js"));
52
52
  const handleNonStatusCodeError_js_1 = require("../../../../errors/handleNonStatusCodeError.js");
53
53
  const errors = __importStar(require("../../../../errors/index.js"));
54
- const Spyglass = __importStar(require("../../../index.js"));
54
+ const spyglass = __importStar(require("../../../index.js"));
55
55
  /**
56
56
  * Search accounts, ads, and related data.
57
57
  */
@@ -94,30 +94,30 @@ class SearchClient {
94
94
  * A `query` search runs a language model, so it bills a minimum of one
95
95
  * row even when nothing matches.
96
96
  *
97
- * @param {Spyglass.SearchBrandsV2Request} request
97
+ * @param {spyglass.SearchBrandsRequest} request
98
98
  * @param {SearchClient.RequestOptions} requestOptions - Request-specific configuration.
99
99
  *
100
- * @throws {@link Spyglass.BadRequestError}
101
- * @throws {@link Spyglass.UnauthorizedError}
102
- * @throws {@link Spyglass.PaymentRequiredError}
103
- * @throws {@link Spyglass.ForbiddenError}
104
- * @throws {@link Spyglass.MethodNotAllowedError}
105
- * @throws {@link Spyglass.ContentTooLargeError}
106
- * @throws {@link Spyglass.TooManyRequestsError}
107
- * @throws {@link Spyglass.InternalServerError}
100
+ * @throws {@link spyglass.BadRequestError}
101
+ * @throws {@link spyglass.UnauthorizedError}
102
+ * @throws {@link spyglass.PaymentRequiredError}
103
+ * @throws {@link spyglass.ForbiddenError}
104
+ * @throws {@link spyglass.MethodNotAllowedError}
105
+ * @throws {@link spyglass.ContentTooLargeError}
106
+ * @throws {@link spyglass.TooManyRequestsError}
107
+ * @throws {@link spyglass.InternalServerError}
108
108
  * @throws {@link errors.SpyglassError}
109
109
  * @throws {@link errors.SpyglassTimeoutError}
110
110
  *
111
111
  * @example
112
- * await client.search.searchBrandsV2({
112
+ * await client.search.brands({
113
113
  * names: ["Nike"],
114
114
  * limit: 3
115
115
  * })
116
116
  */
117
- searchBrandsV2(request = {}, requestOptions) {
118
- return core.HttpResponsePromise.fromPromise(this.__searchBrandsV2(request, requestOptions));
117
+ brands(request = {}, requestOptions) {
118
+ return core.HttpResponsePromise.fromPromise(this.__brands(request, requestOptions));
119
119
  }
120
- __searchBrandsV2() {
120
+ __brands() {
121
121
  return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
122
122
  var _a, _b, _c, _d, _e, _f, _g, _h, _j;
123
123
  const _authRequest = yield this._options.authProvider.getAuthRequest();
@@ -142,21 +142,21 @@ class SearchClient {
142
142
  if (_response.error.reason === "status-code") {
143
143
  switch (_response.error.statusCode) {
144
144
  case 400:
145
- throw new Spyglass.BadRequestError(_response.error.body, _response.rawResponse);
145
+ throw new spyglass.BadRequestError(_response.error.body, _response.rawResponse);
146
146
  case 401:
147
- throw new Spyglass.UnauthorizedError(_response.error.body, _response.rawResponse);
147
+ throw new spyglass.UnauthorizedError(_response.error.body, _response.rawResponse);
148
148
  case 402:
149
- throw new Spyglass.PaymentRequiredError(_response.error.body, _response.rawResponse);
149
+ throw new spyglass.PaymentRequiredError(_response.error.body, _response.rawResponse);
150
150
  case 403:
151
- throw new Spyglass.ForbiddenError(_response.error.body, _response.rawResponse);
151
+ throw new spyglass.ForbiddenError(_response.error.body, _response.rawResponse);
152
152
  case 405:
153
- throw new Spyglass.MethodNotAllowedError(_response.error.body, _response.rawResponse);
153
+ throw new spyglass.MethodNotAllowedError(_response.error.body, _response.rawResponse);
154
154
  case 413:
155
- throw new Spyglass.ContentTooLargeError(_response.error.body, _response.rawResponse);
155
+ throw new spyglass.ContentTooLargeError(_response.error.body, _response.rawResponse);
156
156
  case 429:
157
- throw new Spyglass.TooManyRequestsError(_response.error.body, _response.rawResponse);
157
+ throw new spyglass.TooManyRequestsError(_response.error.body, _response.rawResponse);
158
158
  case 500:
159
- throw new Spyglass.InternalServerError(_response.error.body, _response.rawResponse);
159
+ throw new spyglass.InternalServerError(_response.error.body, _response.rawResponse);
160
160
  default:
161
161
  throw new errors.SpyglassError({
162
162
  statusCode: _response.error.statusCode,
@@ -205,17 +205,17 @@ class SearchClient {
205
205
  * A `query` search runs a language model, so it bills a minimum of one
206
206
  * row even when nothing matches.
207
207
  *
208
- * @param {Spyglass.SearchCreatorsRequest} request
208
+ * @param {spyglass.SearchCreatorsRequest} request
209
209
  * @param {SearchClient.RequestOptions} requestOptions - Request-specific configuration.
210
210
  *
211
- * @throws {@link Spyglass.BadRequestError}
212
- * @throws {@link Spyglass.UnauthorizedError}
213
- * @throws {@link Spyglass.PaymentRequiredError}
214
- * @throws {@link Spyglass.ForbiddenError}
215
- * @throws {@link Spyglass.MethodNotAllowedError}
216
- * @throws {@link Spyglass.ContentTooLargeError}
217
- * @throws {@link Spyglass.TooManyRequestsError}
218
- * @throws {@link Spyglass.InternalServerError}
211
+ * @throws {@link spyglass.BadRequestError}
212
+ * @throws {@link spyglass.UnauthorizedError}
213
+ * @throws {@link spyglass.PaymentRequiredError}
214
+ * @throws {@link spyglass.ForbiddenError}
215
+ * @throws {@link spyglass.MethodNotAllowedError}
216
+ * @throws {@link spyglass.ContentTooLargeError}
217
+ * @throws {@link spyglass.TooManyRequestsError}
218
+ * @throws {@link spyglass.InternalServerError}
219
219
  * @throws {@link errors.SpyglassError}
220
220
  * @throws {@link errors.SpyglassTimeoutError}
221
221
  *
@@ -254,21 +254,21 @@ class SearchClient {
254
254
  if (_response.error.reason === "status-code") {
255
255
  switch (_response.error.statusCode) {
256
256
  case 400:
257
- throw new Spyglass.BadRequestError(_response.error.body, _response.rawResponse);
257
+ throw new spyglass.BadRequestError(_response.error.body, _response.rawResponse);
258
258
  case 401:
259
- throw new Spyglass.UnauthorizedError(_response.error.body, _response.rawResponse);
259
+ throw new spyglass.UnauthorizedError(_response.error.body, _response.rawResponse);
260
260
  case 402:
261
- throw new Spyglass.PaymentRequiredError(_response.error.body, _response.rawResponse);
261
+ throw new spyglass.PaymentRequiredError(_response.error.body, _response.rawResponse);
262
262
  case 403:
263
- throw new Spyglass.ForbiddenError(_response.error.body, _response.rawResponse);
263
+ throw new spyglass.ForbiddenError(_response.error.body, _response.rawResponse);
264
264
  case 405:
265
- throw new Spyglass.MethodNotAllowedError(_response.error.body, _response.rawResponse);
265
+ throw new spyglass.MethodNotAllowedError(_response.error.body, _response.rawResponse);
266
266
  case 413:
267
- throw new Spyglass.ContentTooLargeError(_response.error.body, _response.rawResponse);
267
+ throw new spyglass.ContentTooLargeError(_response.error.body, _response.rawResponse);
268
268
  case 429:
269
- throw new Spyglass.TooManyRequestsError(_response.error.body, _response.rawResponse);
269
+ throw new spyglass.TooManyRequestsError(_response.error.body, _response.rawResponse);
270
270
  case 500:
271
- throw new Spyglass.InternalServerError(_response.error.body, _response.rawResponse);
271
+ throw new spyglass.InternalServerError(_response.error.body, _response.rawResponse);
272
272
  default:
273
273
  throw new errors.SpyglassError({
274
274
  statusCode: _response.error.statusCode,
@@ -289,17 +289,17 @@ class SearchClient {
289
289
  * Costs 2,000 microdollars ($0.0020) per account returned, charged against your plan's monthly credits.
290
290
  * An id that matches nothing returns 404 and is free.
291
291
  *
292
- * @param {Spyglass.GetAccountRequest} request
292
+ * @param {spyglass.GetAccountRequest} request
293
293
  * @param {SearchClient.RequestOptions} requestOptions - Request-specific configuration.
294
294
  *
295
- * @throws {@link Spyglass.BadRequestError}
296
- * @throws {@link Spyglass.UnauthorizedError}
297
- * @throws {@link Spyglass.PaymentRequiredError}
298
- * @throws {@link Spyglass.ForbiddenError}
299
- * @throws {@link Spyglass.NotFoundError}
300
- * @throws {@link Spyglass.MethodNotAllowedError}
301
- * @throws {@link Spyglass.TooManyRequestsError}
302
- * @throws {@link Spyglass.InternalServerError}
295
+ * @throws {@link spyglass.BadRequestError}
296
+ * @throws {@link spyglass.UnauthorizedError}
297
+ * @throws {@link spyglass.PaymentRequiredError}
298
+ * @throws {@link spyglass.ForbiddenError}
299
+ * @throws {@link spyglass.NotFoundError}
300
+ * @throws {@link spyglass.MethodNotAllowedError}
301
+ * @throws {@link spyglass.TooManyRequestsError}
302
+ * @throws {@link spyglass.InternalServerError}
303
303
  * @throws {@link errors.SpyglassError}
304
304
  * @throws {@link errors.SpyglassTimeoutError}
305
305
  *
@@ -334,21 +334,21 @@ class SearchClient {
334
334
  if (_response.error.reason === "status-code") {
335
335
  switch (_response.error.statusCode) {
336
336
  case 400:
337
- throw new Spyglass.BadRequestError(_response.error.body, _response.rawResponse);
337
+ throw new spyglass.BadRequestError(_response.error.body, _response.rawResponse);
338
338
  case 401:
339
- throw new Spyglass.UnauthorizedError(_response.error.body, _response.rawResponse);
339
+ throw new spyglass.UnauthorizedError(_response.error.body, _response.rawResponse);
340
340
  case 402:
341
- throw new Spyglass.PaymentRequiredError(_response.error.body, _response.rawResponse);
341
+ throw new spyglass.PaymentRequiredError(_response.error.body, _response.rawResponse);
342
342
  case 403:
343
- throw new Spyglass.ForbiddenError(_response.error.body, _response.rawResponse);
343
+ throw new spyglass.ForbiddenError(_response.error.body, _response.rawResponse);
344
344
  case 404:
345
- throw new Spyglass.NotFoundError(_response.error.body, _response.rawResponse);
345
+ throw new spyglass.NotFoundError(_response.error.body, _response.rawResponse);
346
346
  case 405:
347
- throw new Spyglass.MethodNotAllowedError(_response.error.body, _response.rawResponse);
347
+ throw new spyglass.MethodNotAllowedError(_response.error.body, _response.rawResponse);
348
348
  case 429:
349
- throw new Spyglass.TooManyRequestsError(_response.error.body, _response.rawResponse);
349
+ throw new spyglass.TooManyRequestsError(_response.error.body, _response.rawResponse);
350
350
  case 500:
351
- throw new Spyglass.InternalServerError(_response.error.body, _response.rawResponse);
351
+ throw new spyglass.InternalServerError(_response.error.body, _response.rawResponse);
352
352
  default:
353
353
  throw new errors.SpyglassError({
354
354
  statusCode: _response.error.statusCode,
@@ -368,16 +368,16 @@ class SearchClient {
368
368
  * Limited to 120 requests per minute per user.
369
369
  * This call is free and does not use credits.
370
370
  *
371
- * @param {Spyglass.SearchTaxonomiesRequest} request
371
+ * @param {spyglass.SearchTaxonomiesRequest} request
372
372
  * @param {SearchClient.RequestOptions} requestOptions - Request-specific configuration.
373
373
  *
374
- * @throws {@link Spyglass.BadRequestError}
375
- * @throws {@link Spyglass.UnauthorizedError}
376
- * @throws {@link Spyglass.PaymentRequiredError}
377
- * @throws {@link Spyglass.ForbiddenError}
378
- * @throws {@link Spyglass.MethodNotAllowedError}
379
- * @throws {@link Spyglass.TooManyRequestsError}
380
- * @throws {@link Spyglass.InternalServerError}
374
+ * @throws {@link spyglass.BadRequestError}
375
+ * @throws {@link spyglass.UnauthorizedError}
376
+ * @throws {@link spyglass.PaymentRequiredError}
377
+ * @throws {@link spyglass.ForbiddenError}
378
+ * @throws {@link spyglass.MethodNotAllowedError}
379
+ * @throws {@link spyglass.TooManyRequestsError}
380
+ * @throws {@link spyglass.InternalServerError}
381
381
  * @throws {@link errors.SpyglassError}
382
382
  * @throws {@link errors.SpyglassTimeoutError}
383
383
  *
@@ -420,19 +420,19 @@ class SearchClient {
420
420
  if (_response.error.reason === "status-code") {
421
421
  switch (_response.error.statusCode) {
422
422
  case 400:
423
- throw new Spyglass.BadRequestError(_response.error.body, _response.rawResponse);
423
+ throw new spyglass.BadRequestError(_response.error.body, _response.rawResponse);
424
424
  case 401:
425
- throw new Spyglass.UnauthorizedError(_response.error.body, _response.rawResponse);
425
+ throw new spyglass.UnauthorizedError(_response.error.body, _response.rawResponse);
426
426
  case 402:
427
- throw new Spyglass.PaymentRequiredError(_response.error.body, _response.rawResponse);
427
+ throw new spyglass.PaymentRequiredError(_response.error.body, _response.rawResponse);
428
428
  case 403:
429
- throw new Spyglass.ForbiddenError(_response.error.body, _response.rawResponse);
429
+ throw new spyglass.ForbiddenError(_response.error.body, _response.rawResponse);
430
430
  case 405:
431
- throw new Spyglass.MethodNotAllowedError(_response.error.body, _response.rawResponse);
431
+ throw new spyglass.MethodNotAllowedError(_response.error.body, _response.rawResponse);
432
432
  case 429:
433
- throw new Spyglass.TooManyRequestsError(_response.error.body, _response.rawResponse);
433
+ throw new spyglass.TooManyRequestsError(_response.error.body, _response.rawResponse);
434
434
  case 500:
435
- throw new Spyglass.InternalServerError(_response.error.body, _response.rawResponse);
435
+ throw new spyglass.InternalServerError(_response.error.body, _response.rawResponse);
436
436
  default:
437
437
  throw new errors.SpyglassError({
438
438
  statusCode: _response.error.statusCode,
@@ -454,31 +454,31 @@ class SearchClient {
454
454
  * The call bills a minimum of one row even when nothing matches. In that
455
455
  * case `count` is 0 but you are charged for one row.
456
456
  *
457
- * @param {Spyglass.GetMediaV2Request} request
457
+ * @param {spyglass.GetMediaRequest} request
458
458
  * @param {SearchClient.RequestOptions} requestOptions - Request-specific configuration.
459
459
  *
460
- * @throws {@link Spyglass.BadRequestError}
461
- * @throws {@link Spyglass.UnauthorizedError}
462
- * @throws {@link Spyglass.PaymentRequiredError}
463
- * @throws {@link Spyglass.ForbiddenError}
464
- * @throws {@link Spyglass.NotFoundError}
465
- * @throws {@link Spyglass.MethodNotAllowedError}
466
- * @throws {@link Spyglass.ContentTooLargeError}
467
- * @throws {@link Spyglass.TooManyRequestsError}
468
- * @throws {@link Spyglass.InternalServerError}
460
+ * @throws {@link spyglass.BadRequestError}
461
+ * @throws {@link spyglass.UnauthorizedError}
462
+ * @throws {@link spyglass.PaymentRequiredError}
463
+ * @throws {@link spyglass.ForbiddenError}
464
+ * @throws {@link spyglass.NotFoundError}
465
+ * @throws {@link spyglass.MethodNotAllowedError}
466
+ * @throws {@link spyglass.ContentTooLargeError}
467
+ * @throws {@link spyglass.TooManyRequestsError}
468
+ * @throws {@link spyglass.InternalServerError}
469
469
  * @throws {@link errors.SpyglassError}
470
470
  * @throws {@link errors.SpyglassTimeoutError}
471
471
  *
472
472
  * @example
473
- * await client.search.getMediaV2({
473
+ * await client.search.getMedia({
474
474
  * query: "comfort-focused video ads",
475
475
  * limit: 20
476
476
  * })
477
477
  */
478
- getMediaV2(request = {}, requestOptions) {
479
- return core.HttpResponsePromise.fromPromise(this.__getMediaV2(request, requestOptions));
478
+ getMedia(request = {}, requestOptions) {
479
+ return core.HttpResponsePromise.fromPromise(this.__getMedia(request, requestOptions));
480
480
  }
481
- __getMediaV2() {
481
+ __getMedia() {
482
482
  return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
483
483
  var _a, _b, _c, _d, _e, _f, _g, _h, _j;
484
484
  const _authRequest = yield this._options.authProvider.getAuthRequest();
@@ -503,23 +503,23 @@ class SearchClient {
503
503
  if (_response.error.reason === "status-code") {
504
504
  switch (_response.error.statusCode) {
505
505
  case 400:
506
- throw new Spyglass.BadRequestError(_response.error.body, _response.rawResponse);
506
+ throw new spyglass.BadRequestError(_response.error.body, _response.rawResponse);
507
507
  case 401:
508
- throw new Spyglass.UnauthorizedError(_response.error.body, _response.rawResponse);
508
+ throw new spyglass.UnauthorizedError(_response.error.body, _response.rawResponse);
509
509
  case 402:
510
- throw new Spyglass.PaymentRequiredError(_response.error.body, _response.rawResponse);
510
+ throw new spyglass.PaymentRequiredError(_response.error.body, _response.rawResponse);
511
511
  case 403:
512
- throw new Spyglass.ForbiddenError(_response.error.body, _response.rawResponse);
512
+ throw new spyglass.ForbiddenError(_response.error.body, _response.rawResponse);
513
513
  case 404:
514
- throw new Spyglass.NotFoundError(_response.error.body, _response.rawResponse);
514
+ throw new spyglass.NotFoundError(_response.error.body, _response.rawResponse);
515
515
  case 405:
516
- throw new Spyglass.MethodNotAllowedError(_response.error.body, _response.rawResponse);
516
+ throw new spyglass.MethodNotAllowedError(_response.error.body, _response.rawResponse);
517
517
  case 413:
518
- throw new Spyglass.ContentTooLargeError(_response.error.body, _response.rawResponse);
518
+ throw new spyglass.ContentTooLargeError(_response.error.body, _response.rawResponse);
519
519
  case 429:
520
- throw new Spyglass.TooManyRequestsError(_response.error.body, _response.rawResponse);
520
+ throw new spyglass.TooManyRequestsError(_response.error.body, _response.rawResponse);
521
521
  case 500:
522
- throw new Spyglass.InternalServerError(_response.error.body, _response.rawResponse);
522
+ throw new spyglass.InternalServerError(_response.error.body, _response.rawResponse);
523
523
  default:
524
524
  throw new errors.SpyglassError({
525
525
  statusCode: _response.error.statusCode,
@@ -542,17 +542,17 @@ class SearchClient {
542
542
  * Limited to 120 requests per minute per user.
543
543
  * 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.
544
544
  *
545
- * @param {Spyglass.GetBrandMediaInsightsRequest} request
545
+ * @param {spyglass.GetBrandMediaInsightsRequest} request
546
546
  * @param {SearchClient.RequestOptions} requestOptions - Request-specific configuration.
547
547
  *
548
- * @throws {@link Spyglass.BadRequestError}
549
- * @throws {@link Spyglass.UnauthorizedError}
550
- * @throws {@link Spyglass.PaymentRequiredError}
551
- * @throws {@link Spyglass.ForbiddenError}
552
- * @throws {@link Spyglass.NotFoundError}
553
- * @throws {@link Spyglass.MethodNotAllowedError}
554
- * @throws {@link Spyglass.TooManyRequestsError}
555
- * @throws {@link Spyglass.InternalServerError}
548
+ * @throws {@link spyglass.BadRequestError}
549
+ * @throws {@link spyglass.UnauthorizedError}
550
+ * @throws {@link spyglass.PaymentRequiredError}
551
+ * @throws {@link spyglass.ForbiddenError}
552
+ * @throws {@link spyglass.NotFoundError}
553
+ * @throws {@link spyglass.MethodNotAllowedError}
554
+ * @throws {@link spyglass.TooManyRequestsError}
555
+ * @throws {@link spyglass.InternalServerError}
556
556
  * @throws {@link errors.SpyglassError}
557
557
  * @throws {@link errors.SpyglassTimeoutError}
558
558
  *
@@ -600,21 +600,21 @@ class SearchClient {
600
600
  if (_response.error.reason === "status-code") {
601
601
  switch (_response.error.statusCode) {
602
602
  case 400:
603
- throw new Spyglass.BadRequestError(_response.error.body, _response.rawResponse);
603
+ throw new spyglass.BadRequestError(_response.error.body, _response.rawResponse);
604
604
  case 401:
605
- throw new Spyglass.UnauthorizedError(_response.error.body, _response.rawResponse);
605
+ throw new spyglass.UnauthorizedError(_response.error.body, _response.rawResponse);
606
606
  case 402:
607
- throw new Spyglass.PaymentRequiredError(_response.error.body, _response.rawResponse);
607
+ throw new spyglass.PaymentRequiredError(_response.error.body, _response.rawResponse);
608
608
  case 403:
609
- throw new Spyglass.ForbiddenError(_response.error.body, _response.rawResponse);
609
+ throw new spyglass.ForbiddenError(_response.error.body, _response.rawResponse);
610
610
  case 404:
611
- throw new Spyglass.NotFoundError(_response.error.body, _response.rawResponse);
611
+ throw new spyglass.NotFoundError(_response.error.body, _response.rawResponse);
612
612
  case 405:
613
- throw new Spyglass.MethodNotAllowedError(_response.error.body, _response.rawResponse);
613
+ throw new spyglass.MethodNotAllowedError(_response.error.body, _response.rawResponse);
614
614
  case 429:
615
- throw new Spyglass.TooManyRequestsError(_response.error.body, _response.rawResponse);
615
+ throw new spyglass.TooManyRequestsError(_response.error.body, _response.rawResponse);
616
616
  case 500:
617
- throw new Spyglass.InternalServerError(_response.error.body, _response.rawResponse);
617
+ throw new spyglass.InternalServerError(_response.error.body, _response.rawResponse);
618
618
  default:
619
619
  throw new errors.SpyglassError({
620
620
  statusCode: _response.error.statusCode,
@@ -633,17 +633,17 @@ class SearchClient {
633
633
  * Limited to 120 requests per minute per user.
634
634
  * 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.
635
635
  *
636
- * @param {Spyglass.GetBrandLandingPagesRequest} request
636
+ * @param {spyglass.GetBrandLandingPagesRequest} request
637
637
  * @param {SearchClient.RequestOptions} requestOptions - Request-specific configuration.
638
638
  *
639
- * @throws {@link Spyglass.BadRequestError}
640
- * @throws {@link Spyglass.UnauthorizedError}
641
- * @throws {@link Spyglass.PaymentRequiredError}
642
- * @throws {@link Spyglass.ForbiddenError}
643
- * @throws {@link Spyglass.NotFoundError}
644
- * @throws {@link Spyglass.MethodNotAllowedError}
645
- * @throws {@link Spyglass.TooManyRequestsError}
646
- * @throws {@link Spyglass.InternalServerError}
639
+ * @throws {@link spyglass.BadRequestError}
640
+ * @throws {@link spyglass.UnauthorizedError}
641
+ * @throws {@link spyglass.PaymentRequiredError}
642
+ * @throws {@link spyglass.ForbiddenError}
643
+ * @throws {@link spyglass.NotFoundError}
644
+ * @throws {@link spyglass.MethodNotAllowedError}
645
+ * @throws {@link spyglass.TooManyRequestsError}
646
+ * @throws {@link spyglass.InternalServerError}
647
647
  * @throws {@link errors.SpyglassError}
648
648
  * @throws {@link errors.SpyglassTimeoutError}
649
649
  *
@@ -689,21 +689,21 @@ class SearchClient {
689
689
  if (_response.error.reason === "status-code") {
690
690
  switch (_response.error.statusCode) {
691
691
  case 400:
692
- throw new Spyglass.BadRequestError(_response.error.body, _response.rawResponse);
692
+ throw new spyglass.BadRequestError(_response.error.body, _response.rawResponse);
693
693
  case 401:
694
- throw new Spyglass.UnauthorizedError(_response.error.body, _response.rawResponse);
694
+ throw new spyglass.UnauthorizedError(_response.error.body, _response.rawResponse);
695
695
  case 402:
696
- throw new Spyglass.PaymentRequiredError(_response.error.body, _response.rawResponse);
696
+ throw new spyglass.PaymentRequiredError(_response.error.body, _response.rawResponse);
697
697
  case 403:
698
- throw new Spyglass.ForbiddenError(_response.error.body, _response.rawResponse);
698
+ throw new spyglass.ForbiddenError(_response.error.body, _response.rawResponse);
699
699
  case 404:
700
- throw new Spyglass.NotFoundError(_response.error.body, _response.rawResponse);
700
+ throw new spyglass.NotFoundError(_response.error.body, _response.rawResponse);
701
701
  case 405:
702
- throw new Spyglass.MethodNotAllowedError(_response.error.body, _response.rawResponse);
702
+ throw new spyglass.MethodNotAllowedError(_response.error.body, _response.rawResponse);
703
703
  case 429:
704
- throw new Spyglass.TooManyRequestsError(_response.error.body, _response.rawResponse);
704
+ throw new spyglass.TooManyRequestsError(_response.error.body, _response.rawResponse);
705
705
  case 500:
706
- throw new Spyglass.InternalServerError(_response.error.body, _response.rawResponse);
706
+ throw new spyglass.InternalServerError(_response.error.body, _response.rawResponse);
707
707
  default:
708
708
  throw new errors.SpyglassError({
709
709
  statusCode: _response.error.statusCode,
@@ -740,17 +740,17 @@ class SearchClient {
740
740
  * Each comment page fetched live (`limit`, default 1) is one billed
741
741
  * unit. Cached posts do not scrape and are not billed.
742
742
  *
743
- * @param {Spyglass.GetCommentsRequest} request
743
+ * @param {spyglass.GetCommentsRequest} request
744
744
  * @param {SearchClient.RequestOptions} requestOptions - Request-specific configuration.
745
745
  *
746
- * @throws {@link Spyglass.BadRequestError}
747
- * @throws {@link Spyglass.UnauthorizedError}
748
- * @throws {@link Spyglass.PaymentRequiredError}
749
- * @throws {@link Spyglass.ForbiddenError}
750
- * @throws {@link Spyglass.MethodNotAllowedError}
751
- * @throws {@link Spyglass.ContentTooLargeError}
752
- * @throws {@link Spyglass.TooManyRequestsError}
753
- * @throws {@link Spyglass.InternalServerError}
746
+ * @throws {@link spyglass.BadRequestError}
747
+ * @throws {@link spyglass.UnauthorizedError}
748
+ * @throws {@link spyglass.PaymentRequiredError}
749
+ * @throws {@link spyglass.ForbiddenError}
750
+ * @throws {@link spyglass.MethodNotAllowedError}
751
+ * @throws {@link spyglass.ContentTooLargeError}
752
+ * @throws {@link spyglass.TooManyRequestsError}
753
+ * @throws {@link spyglass.InternalServerError}
754
754
  * @throws {@link errors.SpyglassError}
755
755
  * @throws {@link errors.SpyglassTimeoutError}
756
756
  *
@@ -789,21 +789,21 @@ class SearchClient {
789
789
  if (_response.error.reason === "status-code") {
790
790
  switch (_response.error.statusCode) {
791
791
  case 400:
792
- throw new Spyglass.BadRequestError(_response.error.body, _response.rawResponse);
792
+ throw new spyglass.BadRequestError(_response.error.body, _response.rawResponse);
793
793
  case 401:
794
- throw new Spyglass.UnauthorizedError(_response.error.body, _response.rawResponse);
794
+ throw new spyglass.UnauthorizedError(_response.error.body, _response.rawResponse);
795
795
  case 402:
796
- throw new Spyglass.PaymentRequiredError(_response.error.body, _response.rawResponse);
796
+ throw new spyglass.PaymentRequiredError(_response.error.body, _response.rawResponse);
797
797
  case 403:
798
- throw new Spyglass.ForbiddenError(_response.error.body, _response.rawResponse);
798
+ throw new spyglass.ForbiddenError(_response.error.body, _response.rawResponse);
799
799
  case 405:
800
- throw new Spyglass.MethodNotAllowedError(_response.error.body, _response.rawResponse);
800
+ throw new spyglass.MethodNotAllowedError(_response.error.body, _response.rawResponse);
801
801
  case 413:
802
- throw new Spyglass.ContentTooLargeError(_response.error.body, _response.rawResponse);
802
+ throw new spyglass.ContentTooLargeError(_response.error.body, _response.rawResponse);
803
803
  case 429:
804
- throw new Spyglass.TooManyRequestsError(_response.error.body, _response.rawResponse);
804
+ throw new spyglass.TooManyRequestsError(_response.error.body, _response.rawResponse);
805
805
  case 500:
806
- throw new Spyglass.InternalServerError(_response.error.body, _response.rawResponse);
806
+ throw new spyglass.InternalServerError(_response.error.body, _response.rawResponse);
807
807
  default:
808
808
  throw new errors.SpyglassError({
809
809
  statusCode: _response.error.statusCode,
@@ -1,4 +1,4 @@
1
- import type * as Spyglass from "../../../../index.js";
1
+ import type * as spyglass from "../../../../index.js";
2
2
  /**
3
3
  * @example
4
4
  * {
@@ -8,6 +8,6 @@ import type * as Spyglass from "../../../../index.js";
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.js";
1
+ import type * as spyglass from "../../../../index.js";
2
2
  /**
3
3
  * @example
4
4
  * {
@@ -9,7 +9,7 @@ import type * as Spyglass from "../../../../index.js";
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
  */