@spyglasshq/sdk 0.1.0 → 0.1.2

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 +93 -89
  19. package/dist/cjs/api/resources/search/client/Client.js +153 -149
  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 +93 -89
  56. package/dist/esm/api/resources/search/client/Client.mjs +153 -149
  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 +31 -27
@@ -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 Spyglass from "../../../index.mjs";
4
+ import * as spyglass from "../../../index.mjs";
5
5
  export declare namespace IndexingClient {
6
6
  type Options = BaseClientOptions;
7
7
  interface RequestOptions extends BaseRequestOptions {
@@ -25,16 +25,16 @@ export declare class IndexingClient {
25
25
  * Limited to 50 requests per minute per user.
26
26
  * This call is free.
27
27
  *
28
- * @param {Spyglass.IndexBrandRequest} request
28
+ * @param {spyglass.IndexBrandRequest} request
29
29
  * @param {IndexingClient.RequestOptions} requestOptions - Request-specific configuration.
30
30
  *
31
- * @throws {@link Spyglass.BadRequestError}
32
- * @throws {@link Spyglass.UnauthorizedError}
33
- * @throws {@link Spyglass.ForbiddenError}
34
- * @throws {@link Spyglass.MethodNotAllowedError}
35
- * @throws {@link Spyglass.ContentTooLargeError}
36
- * @throws {@link Spyglass.TooManyRequestsError}
37
- * @throws {@link Spyglass.InternalServerError}
31
+ * @throws {@link spyglass.BadRequestError}
32
+ * @throws {@link spyglass.UnauthorizedError}
33
+ * @throws {@link spyglass.ForbiddenError}
34
+ * @throws {@link spyglass.MethodNotAllowedError}
35
+ * @throws {@link spyglass.ContentTooLargeError}
36
+ * @throws {@link spyglass.TooManyRequestsError}
37
+ * @throws {@link spyglass.InternalServerError}
38
38
  * @throws {@link errors.SpyglassError}
39
39
  * @throws {@link errors.SpyglassTimeoutError}
40
40
  *
@@ -43,7 +43,7 @@ export declare class IndexingClient {
43
43
  * websiteUrl: "https://www.nike.com"
44
44
  * })
45
45
  */
46
- indexBrand(request: Spyglass.IndexBrandRequest, requestOptions?: IndexingClient.RequestOptions): core.HttpResponsePromise<Spyglass.IndexBrandResponse>;
46
+ indexBrand(request: spyglass.IndexBrandRequest, requestOptions?: IndexingClient.RequestOptions): core.HttpResponsePromise<spyglass.IndexBrandResponse>;
47
47
  private __indexBrand;
48
48
  /**
49
49
  * Poll whether a brand finished indexing after POST /account/index.
@@ -51,16 +51,16 @@ export declare class IndexingClient {
51
51
  * Limited to 300 requests per minute per user.
52
52
  * This call is free.
53
53
  *
54
- * @param {Spyglass.IndexBrandStatusRequest} request
54
+ * @param {spyglass.IndexBrandStatusRequest} request
55
55
  * @param {IndexingClient.RequestOptions} requestOptions - Request-specific configuration.
56
56
  *
57
- * @throws {@link Spyglass.BadRequestError}
58
- * @throws {@link Spyglass.UnauthorizedError}
59
- * @throws {@link Spyglass.ForbiddenError}
60
- * @throws {@link Spyglass.NotFoundError}
61
- * @throws {@link Spyglass.MethodNotAllowedError}
62
- * @throws {@link Spyglass.TooManyRequestsError}
63
- * @throws {@link Spyglass.InternalServerError}
57
+ * @throws {@link spyglass.BadRequestError}
58
+ * @throws {@link spyglass.UnauthorizedError}
59
+ * @throws {@link spyglass.ForbiddenError}
60
+ * @throws {@link spyglass.NotFoundError}
61
+ * @throws {@link spyglass.MethodNotAllowedError}
62
+ * @throws {@link spyglass.TooManyRequestsError}
63
+ * @throws {@link spyglass.InternalServerError}
64
64
  * @throws {@link errors.SpyglassError}
65
65
  * @throws {@link errors.SpyglassTimeoutError}
66
66
  *
@@ -69,6 +69,6 @@ export declare class IndexingClient {
69
69
  * id: "id"
70
70
  * })
71
71
  */
72
- indexBrandStatus(request: Spyglass.IndexBrandStatusRequest, requestOptions?: IndexingClient.RequestOptions): core.HttpResponsePromise<Spyglass.IndexBrandStatusResponse>;
72
+ indexBrandStatus(request: spyglass.IndexBrandStatusRequest, requestOptions?: IndexingClient.RequestOptions): core.HttpResponsePromise<spyglass.IndexBrandStatusResponse>;
73
73
  private __indexBrandStatus;
74
74
  }
@@ -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
  * Add an account we do not have yet, then poll until ready.
21
21
  */
@@ -35,16 +35,16 @@ export class IndexingClient {
35
35
  * Limited to 50 requests per minute per user.
36
36
  * This call is free.
37
37
  *
38
- * @param {Spyglass.IndexBrandRequest} request
38
+ * @param {spyglass.IndexBrandRequest} request
39
39
  * @param {IndexingClient.RequestOptions} requestOptions - Request-specific configuration.
40
40
  *
41
- * @throws {@link Spyglass.BadRequestError}
42
- * @throws {@link Spyglass.UnauthorizedError}
43
- * @throws {@link Spyglass.ForbiddenError}
44
- * @throws {@link Spyglass.MethodNotAllowedError}
45
- * @throws {@link Spyglass.ContentTooLargeError}
46
- * @throws {@link Spyglass.TooManyRequestsError}
47
- * @throws {@link Spyglass.InternalServerError}
41
+ * @throws {@link spyglass.BadRequestError}
42
+ * @throws {@link spyglass.UnauthorizedError}
43
+ * @throws {@link spyglass.ForbiddenError}
44
+ * @throws {@link spyglass.MethodNotAllowedError}
45
+ * @throws {@link spyglass.ContentTooLargeError}
46
+ * @throws {@link spyglass.TooManyRequestsError}
47
+ * @throws {@link spyglass.InternalServerError}
48
48
  * @throws {@link errors.SpyglassError}
49
49
  * @throws {@link errors.SpyglassTimeoutError}
50
50
  *
@@ -81,19 +81,19 @@ export class IndexingClient {
81
81
  if (_response.error.reason === "status-code") {
82
82
  switch (_response.error.statusCode) {
83
83
  case 400:
84
- throw new Spyglass.BadRequestError(_response.error.body, _response.rawResponse);
84
+ throw new spyglass.BadRequestError(_response.error.body, _response.rawResponse);
85
85
  case 401:
86
- throw new Spyglass.UnauthorizedError(_response.error.body, _response.rawResponse);
86
+ throw new spyglass.UnauthorizedError(_response.error.body, _response.rawResponse);
87
87
  case 403:
88
- throw new Spyglass.ForbiddenError(_response.error.body, _response.rawResponse);
88
+ throw new spyglass.ForbiddenError(_response.error.body, _response.rawResponse);
89
89
  case 405:
90
- throw new Spyglass.MethodNotAllowedError(_response.error.body, _response.rawResponse);
90
+ throw new spyglass.MethodNotAllowedError(_response.error.body, _response.rawResponse);
91
91
  case 413:
92
- throw new Spyglass.ContentTooLargeError(_response.error.body, _response.rawResponse);
92
+ throw new spyglass.ContentTooLargeError(_response.error.body, _response.rawResponse);
93
93
  case 429:
94
- throw new Spyglass.TooManyRequestsError(_response.error.body, _response.rawResponse);
94
+ throw new spyglass.TooManyRequestsError(_response.error.body, _response.rawResponse);
95
95
  case 500:
96
- throw new Spyglass.InternalServerError(_response.error.body, _response.rawResponse);
96
+ throw new spyglass.InternalServerError(_response.error.body, _response.rawResponse);
97
97
  default:
98
98
  throw new errors.SpyglassError({
99
99
  statusCode: _response.error.statusCode,
@@ -111,16 +111,16 @@ export class IndexingClient {
111
111
  * Limited to 300 requests per minute per user.
112
112
  * This call is free.
113
113
  *
114
- * @param {Spyglass.IndexBrandStatusRequest} request
114
+ * @param {spyglass.IndexBrandStatusRequest} request
115
115
  * @param {IndexingClient.RequestOptions} requestOptions - Request-specific configuration.
116
116
  *
117
- * @throws {@link Spyglass.BadRequestError}
118
- * @throws {@link Spyglass.UnauthorizedError}
119
- * @throws {@link Spyglass.ForbiddenError}
120
- * @throws {@link Spyglass.NotFoundError}
121
- * @throws {@link Spyglass.MethodNotAllowedError}
122
- * @throws {@link Spyglass.TooManyRequestsError}
123
- * @throws {@link Spyglass.InternalServerError}
117
+ * @throws {@link spyglass.BadRequestError}
118
+ * @throws {@link spyglass.UnauthorizedError}
119
+ * @throws {@link spyglass.ForbiddenError}
120
+ * @throws {@link spyglass.NotFoundError}
121
+ * @throws {@link spyglass.MethodNotAllowedError}
122
+ * @throws {@link spyglass.TooManyRequestsError}
123
+ * @throws {@link spyglass.InternalServerError}
124
124
  * @throws {@link errors.SpyglassError}
125
125
  * @throws {@link errors.SpyglassTimeoutError}
126
126
  *
@@ -155,19 +155,19 @@ export class IndexingClient {
155
155
  if (_response.error.reason === "status-code") {
156
156
  switch (_response.error.statusCode) {
157
157
  case 400:
158
- throw new Spyglass.BadRequestError(_response.error.body, _response.rawResponse);
158
+ throw new spyglass.BadRequestError(_response.error.body, _response.rawResponse);
159
159
  case 401:
160
- throw new Spyglass.UnauthorizedError(_response.error.body, _response.rawResponse);
160
+ throw new spyglass.UnauthorizedError(_response.error.body, _response.rawResponse);
161
161
  case 403:
162
- throw new Spyglass.ForbiddenError(_response.error.body, _response.rawResponse);
162
+ throw new spyglass.ForbiddenError(_response.error.body, _response.rawResponse);
163
163
  case 404:
164
- throw new Spyglass.NotFoundError(_response.error.body, _response.rawResponse);
164
+ throw new spyglass.NotFoundError(_response.error.body, _response.rawResponse);
165
165
  case 405:
166
- throw new Spyglass.MethodNotAllowedError(_response.error.body, _response.rawResponse);
166
+ throw new spyglass.MethodNotAllowedError(_response.error.body, _response.rawResponse);
167
167
  case 429:
168
- throw new Spyglass.TooManyRequestsError(_response.error.body, _response.rawResponse);
168
+ throw new spyglass.TooManyRequestsError(_response.error.body, _response.rawResponse);
169
169
  case 500:
170
- throw new Spyglass.InternalServerError(_response.error.body, _response.rawResponse);
170
+ throw new spyglass.InternalServerError(_response.error.body, _response.rawResponse);
171
171
  default:
172
172
  throw new errors.SpyglassError({
173
173
  statusCode: _response.error.statusCode,
@@ -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 Spyglass from "../../../index.mjs";
4
+ import * as spyglass from "../../../index.mjs";
5
5
  export declare namespace SearchClient {
6
6
  type Options = BaseClientOptions;
7
7
  interface RequestOptions extends BaseRequestOptions {
@@ -14,7 +14,10 @@ export declare class SearchClient {
14
14
  protected readonly _options: NormalizedClientOptionsWithAuth<SearchClient.Options>;
15
15
  constructor(options: SearchClient.Options);
16
16
  /**
17
- * Find brands (advertisers) only.
17
+ * Find brands.
18
+ * Search semantically with `query`, or look them up by name, id, or
19
+ * social handle. Either way, you can also narrow the results with
20
+ * filters such as product taxonomy, location, and follower count.
18
21
  *
19
22
  * Send one search field. Each field is its own mode:
20
23
  *
@@ -48,32 +51,33 @@ export declare class SearchClient {
48
51
  * A `query` search runs a language model, so it bills a minimum of one
49
52
  * row even when nothing matches.
50
53
  *
51
- * @param {Spyglass.SearchBrandsV2Request} request
54
+ * @param {spyglass.SearchBrandsRequest} request
52
55
  * @param {SearchClient.RequestOptions} requestOptions - Request-specific configuration.
53
56
  *
54
- * @throws {@link Spyglass.BadRequestError}
55
- * @throws {@link Spyglass.UnauthorizedError}
56
- * @throws {@link Spyglass.PaymentRequiredError}
57
- * @throws {@link Spyglass.ForbiddenError}
58
- * @throws {@link Spyglass.MethodNotAllowedError}
59
- * @throws {@link Spyglass.ContentTooLargeError}
60
- * @throws {@link Spyglass.TooManyRequestsError}
61
- * @throws {@link Spyglass.InternalServerError}
57
+ * @throws {@link spyglass.BadRequestError}
58
+ * @throws {@link spyglass.UnauthorizedError}
59
+ * @throws {@link spyglass.PaymentRequiredError}
60
+ * @throws {@link spyglass.ForbiddenError}
61
+ * @throws {@link spyglass.MethodNotAllowedError}
62
+ * @throws {@link spyglass.ContentTooLargeError}
63
+ * @throws {@link spyglass.TooManyRequestsError}
64
+ * @throws {@link spyglass.InternalServerError}
62
65
  * @throws {@link errors.SpyglassError}
63
66
  * @throws {@link errors.SpyglassTimeoutError}
64
67
  *
65
68
  * @example
66
- * await client.search.searchBrandsV2({
69
+ * await client.search.brands({
67
70
  * names: ["Nike"],
68
71
  * limit: 3
69
72
  * })
70
73
  */
71
- searchBrandsV2(request?: Spyglass.SearchBrandsV2Request, requestOptions?: SearchClient.RequestOptions): core.HttpResponsePromise<Spyglass.SearchBrandsV2Response>;
72
- private __searchBrandsV2;
74
+ brands(request?: spyglass.SearchBrandsRequest, requestOptions?: SearchClient.RequestOptions): core.HttpResponsePromise<spyglass.SearchBrandsResponse>;
75
+ private __brands;
73
76
  /**
74
- * Find creators only.
75
- *
76
- * They also accept profile filters: `gender`, `ageRange`, `ethnicity`, `location` and `language`.
77
+ * Find creators.
78
+ * Search semantically with `query`, or look them up by name, id, or
79
+ * social handle. Either way, you can also narrow the results with
80
+ * filters such as audience profile, location, and follower count.
77
81
  *
78
82
  * Send one search field. Each field is its own mode:
79
83
  *
@@ -107,17 +111,17 @@ export declare class SearchClient {
107
111
  * A `query` search runs a language model, so it bills a minimum of one
108
112
  * row even when nothing matches.
109
113
  *
110
- * @param {Spyglass.SearchCreatorsRequest} request
114
+ * @param {spyglass.SearchCreatorsRequest} request
111
115
  * @param {SearchClient.RequestOptions} requestOptions - Request-specific configuration.
112
116
  *
113
- * @throws {@link Spyglass.BadRequestError}
114
- * @throws {@link Spyglass.UnauthorizedError}
115
- * @throws {@link Spyglass.PaymentRequiredError}
116
- * @throws {@link Spyglass.ForbiddenError}
117
- * @throws {@link Spyglass.MethodNotAllowedError}
118
- * @throws {@link Spyglass.ContentTooLargeError}
119
- * @throws {@link Spyglass.TooManyRequestsError}
120
- * @throws {@link Spyglass.InternalServerError}
117
+ * @throws {@link spyglass.BadRequestError}
118
+ * @throws {@link spyglass.UnauthorizedError}
119
+ * @throws {@link spyglass.PaymentRequiredError}
120
+ * @throws {@link spyglass.ForbiddenError}
121
+ * @throws {@link spyglass.MethodNotAllowedError}
122
+ * @throws {@link spyglass.ContentTooLargeError}
123
+ * @throws {@link spyglass.TooManyRequestsError}
124
+ * @throws {@link spyglass.InternalServerError}
121
125
  * @throws {@link errors.SpyglassError}
122
126
  * @throws {@link errors.SpyglassTimeoutError}
123
127
  *
@@ -128,7 +132,7 @@ export declare class SearchClient {
128
132
  * gender: "female"
129
133
  * })
130
134
  */
131
- creators(request?: Spyglass.SearchCreatorsRequest, requestOptions?: SearchClient.RequestOptions): core.HttpResponsePromise<Spyglass.SearchCreatorsResponse>;
135
+ creators(request?: spyglass.SearchCreatorsRequest, requestOptions?: SearchClient.RequestOptions): core.HttpResponsePromise<spyglass.SearchCreatorsResponse>;
132
136
  private __creators;
133
137
  /**
134
138
  * Fetch a single brand or creator by id. The `type` field tells you
@@ -139,17 +143,17 @@ export declare class SearchClient {
139
143
  * Costs 2,000 microdollars ($0.0020) per account returned, charged against your plan's monthly credits.
140
144
  * An id that matches nothing returns 404 and is free.
141
145
  *
142
- * @param {Spyglass.GetAccountRequest} request
146
+ * @param {spyglass.GetAccountRequest} request
143
147
  * @param {SearchClient.RequestOptions} requestOptions - Request-specific configuration.
144
148
  *
145
- * @throws {@link Spyglass.BadRequestError}
146
- * @throws {@link Spyglass.UnauthorizedError}
147
- * @throws {@link Spyglass.PaymentRequiredError}
148
- * @throws {@link Spyglass.ForbiddenError}
149
- * @throws {@link Spyglass.NotFoundError}
150
- * @throws {@link Spyglass.MethodNotAllowedError}
151
- * @throws {@link Spyglass.TooManyRequestsError}
152
- * @throws {@link Spyglass.InternalServerError}
149
+ * @throws {@link spyglass.BadRequestError}
150
+ * @throws {@link spyglass.UnauthorizedError}
151
+ * @throws {@link spyglass.PaymentRequiredError}
152
+ * @throws {@link spyglass.ForbiddenError}
153
+ * @throws {@link spyglass.NotFoundError}
154
+ * @throws {@link spyglass.MethodNotAllowedError}
155
+ * @throws {@link spyglass.TooManyRequestsError}
156
+ * @throws {@link spyglass.InternalServerError}
153
157
  * @throws {@link errors.SpyglassError}
154
158
  * @throws {@link errors.SpyglassTimeoutError}
155
159
  *
@@ -158,7 +162,7 @@ export declare class SearchClient {
158
162
  * id: "id"
159
163
  * })
160
164
  */
161
- getAccount(request: Spyglass.GetAccountRequest, requestOptions?: SearchClient.RequestOptions): core.HttpResponsePromise<Spyglass.GetAccountResponse>;
165
+ getAccount(request: spyglass.GetAccountRequest, requestOptions?: SearchClient.RequestOptions): core.HttpResponsePromise<spyglass.GetAccountResponse>;
162
166
  private __getAccount;
163
167
  /**
164
168
  * Find taxonomy paths you can pass to POST /media as `taxonomy`.
@@ -168,16 +172,16 @@ export declare class SearchClient {
168
172
  * Limited to 120 requests per minute per user.
169
173
  * This call is free and does not use credits.
170
174
  *
171
- * @param {Spyglass.SearchTaxonomiesRequest} request
175
+ * @param {spyglass.SearchTaxonomiesRequest} request
172
176
  * @param {SearchClient.RequestOptions} requestOptions - Request-specific configuration.
173
177
  *
174
- * @throws {@link Spyglass.BadRequestError}
175
- * @throws {@link Spyglass.UnauthorizedError}
176
- * @throws {@link Spyglass.PaymentRequiredError}
177
- * @throws {@link Spyglass.ForbiddenError}
178
- * @throws {@link Spyglass.MethodNotAllowedError}
179
- * @throws {@link Spyglass.TooManyRequestsError}
180
- * @throws {@link Spyglass.InternalServerError}
178
+ * @throws {@link spyglass.BadRequestError}
179
+ * @throws {@link spyglass.UnauthorizedError}
180
+ * @throws {@link spyglass.PaymentRequiredError}
181
+ * @throws {@link spyglass.ForbiddenError}
182
+ * @throws {@link spyglass.MethodNotAllowedError}
183
+ * @throws {@link spyglass.TooManyRequestsError}
184
+ * @throws {@link spyglass.InternalServerError}
181
185
  * @throws {@link errors.SpyglassError}
182
186
  * @throws {@link errors.SpyglassTimeoutError}
183
187
  *
@@ -186,7 +190,7 @@ export declare class SearchClient {
186
190
  * query: "running shoes"
187
191
  * })
188
192
  */
189
- taxonomies(request: Spyglass.SearchTaxonomiesRequest, requestOptions?: SearchClient.RequestOptions): core.HttpResponsePromise<Spyglass.SearchTaxonomiesResponse>;
193
+ taxonomies(request: spyglass.SearchTaxonomiesRequest, requestOptions?: SearchClient.RequestOptions): core.HttpResponsePromise<spyglass.SearchTaxonomiesResponse>;
190
194
  private __taxonomies;
191
195
  /**
192
196
  * Return creatives. Pass `brandId` to scope to one brand or creator,
@@ -198,29 +202,29 @@ export declare class SearchClient {
198
202
  * The call bills a minimum of one row even when nothing matches. In that
199
203
  * case `count` is 0 but you are charged for one row.
200
204
  *
201
- * @param {Spyglass.GetMediaV2Request} request
205
+ * @param {spyglass.GetMediaRequest} request
202
206
  * @param {SearchClient.RequestOptions} requestOptions - Request-specific configuration.
203
207
  *
204
- * @throws {@link Spyglass.BadRequestError}
205
- * @throws {@link Spyglass.UnauthorizedError}
206
- * @throws {@link Spyglass.PaymentRequiredError}
207
- * @throws {@link Spyglass.ForbiddenError}
208
- * @throws {@link Spyglass.NotFoundError}
209
- * @throws {@link Spyglass.MethodNotAllowedError}
210
- * @throws {@link Spyglass.ContentTooLargeError}
211
- * @throws {@link Spyglass.TooManyRequestsError}
212
- * @throws {@link Spyglass.InternalServerError}
208
+ * @throws {@link spyglass.BadRequestError}
209
+ * @throws {@link spyglass.UnauthorizedError}
210
+ * @throws {@link spyglass.PaymentRequiredError}
211
+ * @throws {@link spyglass.ForbiddenError}
212
+ * @throws {@link spyglass.NotFoundError}
213
+ * @throws {@link spyglass.MethodNotAllowedError}
214
+ * @throws {@link spyglass.ContentTooLargeError}
215
+ * @throws {@link spyglass.TooManyRequestsError}
216
+ * @throws {@link spyglass.InternalServerError}
213
217
  * @throws {@link errors.SpyglassError}
214
218
  * @throws {@link errors.SpyglassTimeoutError}
215
219
  *
216
220
  * @example
217
- * await client.search.getMediaV2({
221
+ * await client.search.getMedia({
218
222
  * query: "comfort-focused video ads",
219
223
  * limit: 20
220
224
  * })
221
225
  */
222
- getMediaV2(request?: Spyglass.GetMediaV2Request, requestOptions?: SearchClient.RequestOptions): core.HttpResponsePromise<Spyglass.GetMediaV2Response>;
223
- private __getMediaV2;
226
+ getMedia(request?: spyglass.GetMediaRequest, requestOptions?: SearchClient.RequestOptions): core.HttpResponsePromise<spyglass.GetMediaResponse>;
227
+ private __getMedia;
224
228
  /**
225
229
  * Return clustered creative themes for an account. `MEDIA_MIX` returns a
226
230
  * breakdown by media type; the other types return weekly buckets plus
@@ -232,17 +236,17 @@ export declare class SearchClient {
232
236
  * Limited to 120 requests per minute per user.
233
237
  * 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.
234
238
  *
235
- * @param {Spyglass.GetBrandMediaInsightsRequest} request
239
+ * @param {spyglass.GetBrandMediaInsightsRequest} request
236
240
  * @param {SearchClient.RequestOptions} requestOptions - Request-specific configuration.
237
241
  *
238
- * @throws {@link Spyglass.BadRequestError}
239
- * @throws {@link Spyglass.UnauthorizedError}
240
- * @throws {@link Spyglass.PaymentRequiredError}
241
- * @throws {@link Spyglass.ForbiddenError}
242
- * @throws {@link Spyglass.NotFoundError}
243
- * @throws {@link Spyglass.MethodNotAllowedError}
244
- * @throws {@link Spyglass.TooManyRequestsError}
245
- * @throws {@link Spyglass.InternalServerError}
242
+ * @throws {@link spyglass.BadRequestError}
243
+ * @throws {@link spyglass.UnauthorizedError}
244
+ * @throws {@link spyglass.PaymentRequiredError}
245
+ * @throws {@link spyglass.ForbiddenError}
246
+ * @throws {@link spyglass.NotFoundError}
247
+ * @throws {@link spyglass.MethodNotAllowedError}
248
+ * @throws {@link spyglass.TooManyRequestsError}
249
+ * @throws {@link spyglass.InternalServerError}
246
250
  * @throws {@link errors.SpyglassError}
247
251
  * @throws {@link errors.SpyglassTimeoutError}
248
252
  *
@@ -252,7 +256,7 @@ export declare class SearchClient {
252
256
  * type: "HOOK"
253
257
  * })
254
258
  */
255
- getBrandMediaInsights(request: Spyglass.GetBrandMediaInsightsRequest, requestOptions?: SearchClient.RequestOptions): core.HttpResponsePromise<Spyglass.GetBrandMediaInsightsResponse>;
259
+ getBrandMediaInsights(request: spyglass.GetBrandMediaInsightsRequest, requestOptions?: SearchClient.RequestOptions): core.HttpResponsePromise<spyglass.GetBrandMediaInsightsResponse>;
256
260
  private __getBrandMediaInsights;
257
261
  /**
258
262
  * Return the landing-page URLs a brand sends ad traffic to, ranked by
@@ -261,17 +265,17 @@ export declare class SearchClient {
261
265
  * Limited to 120 requests per minute per user.
262
266
  * 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.
263
267
  *
264
- * @param {Spyglass.GetBrandLandingPagesRequest} request
268
+ * @param {spyglass.GetBrandLandingPagesRequest} request
265
269
  * @param {SearchClient.RequestOptions} requestOptions - Request-specific configuration.
266
270
  *
267
- * @throws {@link Spyglass.BadRequestError}
268
- * @throws {@link Spyglass.UnauthorizedError}
269
- * @throws {@link Spyglass.PaymentRequiredError}
270
- * @throws {@link Spyglass.ForbiddenError}
271
- * @throws {@link Spyglass.NotFoundError}
272
- * @throws {@link Spyglass.MethodNotAllowedError}
273
- * @throws {@link Spyglass.TooManyRequestsError}
274
- * @throws {@link Spyglass.InternalServerError}
271
+ * @throws {@link spyglass.BadRequestError}
272
+ * @throws {@link spyglass.UnauthorizedError}
273
+ * @throws {@link spyglass.PaymentRequiredError}
274
+ * @throws {@link spyglass.ForbiddenError}
275
+ * @throws {@link spyglass.NotFoundError}
276
+ * @throws {@link spyglass.MethodNotAllowedError}
277
+ * @throws {@link spyglass.TooManyRequestsError}
278
+ * @throws {@link spyglass.InternalServerError}
275
279
  * @throws {@link errors.SpyglassError}
276
280
  * @throws {@link errors.SpyglassTimeoutError}
277
281
  *
@@ -280,7 +284,7 @@ export declare class SearchClient {
280
284
  * id: "id"
281
285
  * })
282
286
  */
283
- getBrandLandingPages(request: Spyglass.GetBrandLandingPagesRequest, requestOptions?: SearchClient.RequestOptions): core.HttpResponsePromise<Spyglass.GetBrandLandingPagesResponse>;
287
+ getBrandLandingPages(request: spyglass.GetBrandLandingPagesRequest, requestOptions?: SearchClient.RequestOptions): core.HttpResponsePromise<spyglass.GetBrandLandingPagesResponse>;
284
288
  private __getBrandLandingPages;
285
289
  /**
286
290
  * Return public comments for specific Instagram or TikTok posts.
@@ -307,17 +311,17 @@ export declare class SearchClient {
307
311
  * Each comment page fetched live (`limit`, default 1) is one billed
308
312
  * unit. Cached posts do not scrape and are not billed.
309
313
  *
310
- * @param {Spyglass.GetCommentsRequest} request
314
+ * @param {spyglass.GetCommentsRequest} request
311
315
  * @param {SearchClient.RequestOptions} requestOptions - Request-specific configuration.
312
316
  *
313
- * @throws {@link Spyglass.BadRequestError}
314
- * @throws {@link Spyglass.UnauthorizedError}
315
- * @throws {@link Spyglass.PaymentRequiredError}
316
- * @throws {@link Spyglass.ForbiddenError}
317
- * @throws {@link Spyglass.MethodNotAllowedError}
318
- * @throws {@link Spyglass.ContentTooLargeError}
319
- * @throws {@link Spyglass.TooManyRequestsError}
320
- * @throws {@link Spyglass.InternalServerError}
317
+ * @throws {@link spyglass.BadRequestError}
318
+ * @throws {@link spyglass.UnauthorizedError}
319
+ * @throws {@link spyglass.PaymentRequiredError}
320
+ * @throws {@link spyglass.ForbiddenError}
321
+ * @throws {@link spyglass.MethodNotAllowedError}
322
+ * @throws {@link spyglass.ContentTooLargeError}
323
+ * @throws {@link spyglass.TooManyRequestsError}
324
+ * @throws {@link spyglass.InternalServerError}
321
325
  * @throws {@link errors.SpyglassError}
322
326
  * @throws {@link errors.SpyglassTimeoutError}
323
327
  *
@@ -328,6 +332,6 @@ export declare class SearchClient {
328
332
  * limit: 1
329
333
  * })
330
334
  */
331
- getComments(request?: Spyglass.GetCommentsRequest, requestOptions?: SearchClient.RequestOptions): core.HttpResponsePromise<Spyglass.GetCommentsResponse>;
335
+ getComments(request?: spyglass.GetCommentsRequest, requestOptions?: SearchClient.RequestOptions): core.HttpResponsePromise<spyglass.GetCommentsResponse>;
332
336
  private __getComments;
333
337
  }