@spyglasshq/sdk 0.1.2 → 0.1.4

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 (189) hide show
  1. package/README.md +40 -42
  2. package/dist/cjs/BaseClient.js +2 -2
  3. package/dist/cjs/Client.d.ts +257 -6
  4. package/dist/cjs/Client.js +574 -9
  5. package/dist/cjs/api/{resources/search/client/requests/GetMediaRequest.d.ts → client/requests/SearchMediaRequest.d.ts} +13 -13
  6. package/dist/cjs/api/{resources/search/client/requests/GetMediaRequest.js → client/requests/SearchMediaRequest.js} +14 -14
  7. package/dist/cjs/api/client/requests/index.d.ts +5 -0
  8. package/dist/cjs/api/{resources/search/client → client}/requests/index.js +3 -3
  9. package/dist/cjs/api/index.d.ts +1 -0
  10. package/dist/cjs/api/index.js +1 -0
  11. package/dist/cjs/api/resources/account/client/Client.d.ts +131 -11
  12. package/dist/cjs/api/resources/account/client/Client.js +353 -14
  13. package/dist/cjs/api/resources/account/client/index.d.ts +1 -1
  14. package/dist/cjs/api/resources/account/client/index.js +15 -0
  15. package/dist/cjs/api/resources/{indexing/client/requests/IndexBrandRequest.d.ts → account/client/requests/IndexAccountRequest.d.ts} +1 -1
  16. package/dist/{esm/api/resources/indexing/client/requests/IndexBrandStatusRequest.d.mts → cjs/api/resources/account/client/requests/IndexStatusAccountRequest.d.ts} +1 -1
  17. package/dist/cjs/api/resources/{search/client/requests/GetBrandMediaInsightsRequest.d.ts → account/client/requests/InsightsAccountRequest.d.ts} +2 -2
  18. package/dist/cjs/api/resources/{search/client/requests/GetBrandLandingPagesRequest.d.ts → account/client/requests/LandingPagesAccountRequest.d.ts} +2 -2
  19. package/dist/cjs/api/resources/account/client/requests/index.d.ts +5 -0
  20. package/dist/{esm/api/resources/indexing/types/IndexBrandResponse.d.mts → cjs/api/resources/account/types/IndexAccountResponse.d.ts} +3 -3
  21. package/dist/cjs/api/resources/account/types/IndexAccountResponse.js +11 -0
  22. package/dist/cjs/api/resources/{indexing/types/IndexBrandStatusResponse.d.ts → account/types/IndexStatusAccountResponse.d.ts} +3 -3
  23. package/dist/cjs/api/resources/account/types/IndexStatusAccountResponse.js +11 -0
  24. package/dist/cjs/api/resources/account/types/InsightsAccountRequestType.d.ts +7 -0
  25. package/dist/cjs/api/resources/{search/types/GetBrandMediaInsightsRequestType.js → account/types/InsightsAccountRequestType.js} +2 -2
  26. package/dist/cjs/api/resources/{search/types/GetBrandMediaInsightsResponse.d.ts → account/types/InsightsAccountResponse.d.ts} +1 -1
  27. package/dist/cjs/api/resources/account/types/LandingPagesAccountRequestShowInactive.d.ts +5 -0
  28. package/dist/cjs/api/resources/{search/types/GetBrandLandingPagesRequestShowInactive.js → account/types/LandingPagesAccountRequestShowInactive.js} +2 -2
  29. package/dist/cjs/api/resources/{search/types/GetBrandLandingPagesResponse.d.ts → account/types/LandingPagesAccountResponse.d.ts} +3 -3
  30. package/dist/cjs/api/resources/account/types/index.d.ts +7 -1
  31. package/dist/cjs/api/resources/account/types/index.js +7 -1
  32. package/dist/cjs/api/resources/index.d.ts +1 -6
  33. package/dist/cjs/api/resources/index.js +5 -10
  34. package/dist/{esm/api/resources/search/types/GetMediaResponse.d.mts → cjs/api/types/SearchMediaResponse.d.ts} +3 -3
  35. package/dist/cjs/api/{resources/search/types/GetMediaResponse.js → types/SearchMediaResponse.js} +5 -5
  36. package/dist/cjs/api/types/index.d.ts +6 -0
  37. package/dist/cjs/api/types/index.js +6 -0
  38. package/dist/cjs/version.d.ts +1 -1
  39. package/dist/cjs/version.js +1 -1
  40. package/dist/esm/BaseClient.mjs +2 -2
  41. package/dist/esm/Client.d.mts +257 -6
  42. package/dist/esm/Client.mjs +574 -9
  43. package/dist/esm/api/{resources/search/client/requests/GetMediaRequest.d.mts → client/requests/SearchMediaRequest.d.mts} +13 -13
  44. package/dist/esm/api/{resources/search/client/requests/GetMediaRequest.mjs → client/requests/SearchMediaRequest.mjs} +13 -13
  45. package/dist/esm/api/client/requests/index.d.mts +5 -0
  46. package/dist/esm/api/{resources/search/client → client}/requests/index.mjs +1 -1
  47. package/dist/esm/api/index.d.mts +1 -0
  48. package/dist/esm/api/index.mjs +1 -0
  49. package/dist/esm/api/resources/account/client/Client.d.mts +131 -11
  50. package/dist/esm/api/resources/account/client/Client.mjs +353 -14
  51. package/dist/esm/api/resources/account/client/index.d.mts +1 -1
  52. package/dist/esm/api/resources/account/client/index.mjs +1 -1
  53. package/dist/esm/api/resources/{indexing/client/requests/IndexBrandRequest.d.mts → account/client/requests/IndexAccountRequest.d.mts} +1 -1
  54. package/dist/{cjs/api/resources/indexing/client/requests/IndexBrandStatusRequest.d.ts → esm/api/resources/account/client/requests/IndexStatusAccountRequest.d.mts} +1 -1
  55. package/dist/esm/api/resources/{search/client/requests/GetBrandMediaInsightsRequest.d.mts → account/client/requests/InsightsAccountRequest.d.mts} +2 -2
  56. package/dist/esm/api/resources/{search/client/requests/GetBrandLandingPagesRequest.d.mts → account/client/requests/LandingPagesAccountRequest.d.mts} +2 -2
  57. package/dist/esm/api/resources/account/client/requests/index.d.mts +5 -0
  58. package/dist/{cjs/api/resources/indexing/types/IndexBrandResponse.d.ts → esm/api/resources/account/types/IndexAccountResponse.d.mts} +3 -3
  59. package/dist/esm/api/resources/account/types/IndexAccountResponse.mjs +8 -0
  60. package/dist/esm/api/resources/{indexing/types/IndexBrandStatusResponse.d.mts → account/types/IndexStatusAccountResponse.d.mts} +3 -3
  61. package/dist/esm/api/resources/account/types/IndexStatusAccountResponse.mjs +8 -0
  62. package/dist/esm/api/resources/account/types/InsightsAccountRequestType.d.mts +7 -0
  63. package/dist/esm/api/resources/{search/types/GetBrandMediaInsightsRequestType.mjs → account/types/InsightsAccountRequestType.mjs} +1 -1
  64. package/dist/esm/api/resources/{search/types/GetBrandMediaInsightsResponse.d.mts → account/types/InsightsAccountResponse.d.mts} +1 -1
  65. package/dist/esm/api/resources/account/types/LandingPagesAccountRequestShowInactive.d.mts +5 -0
  66. package/dist/esm/api/resources/{search/types/GetBrandLandingPagesRequestShowInactive.mjs → account/types/LandingPagesAccountRequestShowInactive.mjs} +1 -1
  67. package/dist/esm/api/resources/{search/types/GetBrandLandingPagesResponse.d.mts → account/types/LandingPagesAccountResponse.d.mts} +3 -3
  68. package/dist/esm/api/resources/account/types/index.d.mts +7 -1
  69. package/dist/esm/api/resources/account/types/index.mjs +7 -1
  70. package/dist/esm/api/resources/index.d.mts +1 -6
  71. package/dist/esm/api/resources/index.mjs +1 -6
  72. package/dist/{cjs/api/resources/search/types/GetMediaResponse.d.ts → esm/api/types/SearchMediaResponse.d.mts} +3 -3
  73. package/dist/esm/api/{resources/search/types/GetMediaResponse.mjs → types/SearchMediaResponse.mjs} +4 -4
  74. package/dist/esm/api/types/index.d.mts +6 -0
  75. package/dist/esm/api/types/index.mjs +6 -0
  76. package/dist/esm/version.d.mts +1 -1
  77. package/dist/esm/version.mjs +1 -1
  78. package/package.json +1 -23
  79. package/reference.md +109 -111
  80. package/dist/cjs/api/resources/indexing/client/Client.d.ts +0 -74
  81. package/dist/cjs/api/resources/indexing/client/Client.js +0 -219
  82. package/dist/cjs/api/resources/indexing/client/requests/index.d.ts +0 -2
  83. package/dist/cjs/api/resources/indexing/exports.d.ts +0 -2
  84. package/dist/cjs/api/resources/indexing/exports.js +0 -21
  85. package/dist/cjs/api/resources/indexing/index.d.ts +0 -2
  86. package/dist/cjs/api/resources/indexing/index.js +0 -18
  87. package/dist/cjs/api/resources/indexing/types/IndexBrandResponse.js +0 -11
  88. package/dist/cjs/api/resources/indexing/types/IndexBrandStatusResponse.js +0 -11
  89. package/dist/cjs/api/resources/indexing/types/index.d.ts +0 -2
  90. package/dist/cjs/api/resources/indexing/types/index.js +0 -18
  91. package/dist/cjs/api/resources/search/client/Client.d.ts +0 -337
  92. package/dist/cjs/api/resources/search/client/Client.js +0 -823
  93. package/dist/cjs/api/resources/search/client/index.d.ts +0 -1
  94. package/dist/cjs/api/resources/search/client/index.js +0 -17
  95. package/dist/cjs/api/resources/search/client/requests/index.d.ts +0 -8
  96. package/dist/cjs/api/resources/search/exports.d.ts +0 -2
  97. package/dist/cjs/api/resources/search/exports.js +0 -21
  98. package/dist/cjs/api/resources/search/index.d.ts +0 -2
  99. package/dist/cjs/api/resources/search/index.js +0 -18
  100. package/dist/cjs/api/resources/search/types/GetBrandLandingPagesRequestShowInactive.d.ts +0 -5
  101. package/dist/cjs/api/resources/search/types/GetBrandMediaInsightsRequestType.d.ts +0 -7
  102. package/dist/cjs/api/resources/search/types/index.d.ts +0 -10
  103. package/dist/cjs/api/resources/search/types/index.js +0 -26
  104. package/dist/esm/api/resources/indexing/client/Client.d.mts +0 -74
  105. package/dist/esm/api/resources/indexing/client/Client.mjs +0 -182
  106. package/dist/esm/api/resources/indexing/client/requests/index.d.mts +0 -2
  107. package/dist/esm/api/resources/indexing/exports.d.mts +0 -2
  108. package/dist/esm/api/resources/indexing/exports.mjs +0 -3
  109. package/dist/esm/api/resources/indexing/index.d.mts +0 -2
  110. package/dist/esm/api/resources/indexing/index.mjs +0 -2
  111. package/dist/esm/api/resources/indexing/types/IndexBrandResponse.mjs +0 -8
  112. package/dist/esm/api/resources/indexing/types/IndexBrandStatusResponse.mjs +0 -8
  113. package/dist/esm/api/resources/indexing/types/index.d.mts +0 -2
  114. package/dist/esm/api/resources/indexing/types/index.mjs +0 -2
  115. package/dist/esm/api/resources/search/client/Client.d.mts +0 -337
  116. package/dist/esm/api/resources/search/client/Client.mjs +0 -786
  117. package/dist/esm/api/resources/search/client/index.d.mts +0 -1
  118. package/dist/esm/api/resources/search/client/index.mjs +0 -1
  119. package/dist/esm/api/resources/search/client/requests/index.d.mts +0 -8
  120. package/dist/esm/api/resources/search/exports.d.mts +0 -2
  121. package/dist/esm/api/resources/search/exports.mjs +0 -3
  122. package/dist/esm/api/resources/search/index.d.mts +0 -2
  123. package/dist/esm/api/resources/search/index.mjs +0 -2
  124. package/dist/esm/api/resources/search/types/GetBrandLandingPagesRequestShowInactive.d.mts +0 -5
  125. package/dist/esm/api/resources/search/types/GetBrandMediaInsightsRequestType.d.mts +0 -7
  126. package/dist/esm/api/resources/search/types/index.d.mts +0 -10
  127. package/dist/esm/api/resources/search/types/index.mjs +0 -10
  128. /package/dist/cjs/api/{resources/indexing/client → client}/index.d.ts +0 -0
  129. /package/dist/cjs/api/{resources/indexing/client → client}/index.js +0 -0
  130. /package/dist/cjs/api/{resources/search/client → client}/requests/GetCommentsRequest.d.ts +0 -0
  131. /package/dist/cjs/api/{resources/search/client → client}/requests/GetCommentsRequest.js +0 -0
  132. /package/dist/cjs/api/{resources/search/client → client}/requests/SearchBrandsRequest.d.ts +0 -0
  133. /package/dist/cjs/api/{resources/search/client → client}/requests/SearchBrandsRequest.js +0 -0
  134. /package/dist/cjs/api/{resources/search/client → client}/requests/SearchCreatorsRequest.d.ts +0 -0
  135. /package/dist/cjs/api/{resources/search/client → client}/requests/SearchCreatorsRequest.js +0 -0
  136. /package/dist/cjs/api/{resources/search/client → client}/requests/SearchTaxonomiesRequest.d.ts +0 -0
  137. /package/dist/cjs/api/{resources/search/client → client}/requests/SearchTaxonomiesRequest.js +0 -0
  138. /package/dist/cjs/api/resources/{search → account}/client/requests/GetAccountRequest.d.ts +0 -0
  139. /package/dist/cjs/api/resources/{search → account}/client/requests/GetAccountRequest.js +0 -0
  140. /package/dist/cjs/api/resources/account/{types/GetCreditUsageResponse.js → client/requests/IndexAccountRequest.js} +0 -0
  141. /package/dist/cjs/api/resources/{indexing/client/requests/IndexBrandRequest.js → account/client/requests/IndexStatusAccountRequest.js} +0 -0
  142. /package/dist/cjs/api/resources/{indexing/client/requests/IndexBrandStatusRequest.js → account/client/requests/InsightsAccountRequest.js} +0 -0
  143. /package/dist/cjs/api/resources/{search/client/requests/GetBrandLandingPagesRequest.js → account/client/requests/LandingPagesAccountRequest.js} +0 -0
  144. /package/dist/cjs/api/resources/{indexing → account}/client/requests/index.js +0 -0
  145. /package/dist/cjs/api/resources/{search → account}/types/GetAccountResponse.d.ts +0 -0
  146. /package/dist/cjs/api/resources/{search → account}/types/GetAccountResponse.js +0 -0
  147. /package/dist/cjs/api/resources/{search/client/requests/GetBrandMediaInsightsRequest.js → account/types/InsightsAccountResponse.js} +0 -0
  148. /package/dist/cjs/api/resources/{search/types/GetBrandLandingPagesResponse.js → account/types/LandingPagesAccountResponse.js} +0 -0
  149. /package/dist/cjs/api/{resources/search/types → types}/GetCommentsResponse.d.ts +0 -0
  150. /package/dist/cjs/api/{resources/search/types → types}/GetCommentsResponse.js +0 -0
  151. /package/dist/cjs/api/{resources/account/types → types}/GetCreditUsageResponse.d.ts +0 -0
  152. /package/dist/cjs/api/{resources/search/types/GetBrandMediaInsightsResponse.js → types/GetCreditUsageResponse.js} +0 -0
  153. /package/dist/cjs/api/{resources/search/types → types}/SearchBrandsResponse.d.ts +0 -0
  154. /package/dist/cjs/api/{resources/search/types → types}/SearchBrandsResponse.js +0 -0
  155. /package/dist/cjs/api/{resources/search/types → types}/SearchCreatorsResponse.d.ts +0 -0
  156. /package/dist/cjs/api/{resources/search/types → types}/SearchCreatorsResponse.js +0 -0
  157. /package/dist/cjs/api/{resources/search/types → types}/SearchTaxonomiesResponse.d.ts +0 -0
  158. /package/dist/cjs/api/{resources/search/types → types}/SearchTaxonomiesResponse.js +0 -0
  159. /package/dist/esm/api/{resources/indexing/client → client}/index.d.mts +0 -0
  160. /package/dist/esm/api/{resources/indexing/client → client}/index.mjs +0 -0
  161. /package/dist/esm/api/{resources/search/client → client}/requests/GetCommentsRequest.d.mts +0 -0
  162. /package/dist/esm/api/{resources/search/client → client}/requests/GetCommentsRequest.mjs +0 -0
  163. /package/dist/esm/api/{resources/search/client → client}/requests/SearchBrandsRequest.d.mts +0 -0
  164. /package/dist/esm/api/{resources/search/client → client}/requests/SearchBrandsRequest.mjs +0 -0
  165. /package/dist/esm/api/{resources/search/client → client}/requests/SearchCreatorsRequest.d.mts +0 -0
  166. /package/dist/esm/api/{resources/search/client → client}/requests/SearchCreatorsRequest.mjs +0 -0
  167. /package/dist/esm/api/{resources/search/client → client}/requests/SearchTaxonomiesRequest.d.mts +0 -0
  168. /package/dist/esm/api/{resources/search/client → client}/requests/SearchTaxonomiesRequest.mjs +0 -0
  169. /package/dist/esm/api/resources/{search → account}/client/requests/GetAccountRequest.d.mts +0 -0
  170. /package/dist/esm/api/resources/{search → account}/client/requests/GetAccountRequest.mjs +0 -0
  171. /package/dist/esm/api/resources/account/{types/GetCreditUsageResponse.mjs → client/requests/IndexAccountRequest.mjs} +0 -0
  172. /package/dist/esm/api/resources/{indexing/client/requests/IndexBrandRequest.mjs → account/client/requests/IndexStatusAccountRequest.mjs} +0 -0
  173. /package/dist/esm/api/resources/{indexing/client/requests/IndexBrandStatusRequest.mjs → account/client/requests/InsightsAccountRequest.mjs} +0 -0
  174. /package/dist/esm/api/resources/{search/client/requests/GetBrandLandingPagesRequest.mjs → account/client/requests/LandingPagesAccountRequest.mjs} +0 -0
  175. /package/dist/esm/api/resources/{indexing → account}/client/requests/index.mjs +0 -0
  176. /package/dist/esm/api/resources/{search → account}/types/GetAccountResponse.d.mts +0 -0
  177. /package/dist/esm/api/resources/{search → account}/types/GetAccountResponse.mjs +0 -0
  178. /package/dist/esm/api/resources/{search/client/requests/GetBrandMediaInsightsRequest.mjs → account/types/InsightsAccountResponse.mjs} +0 -0
  179. /package/dist/esm/api/resources/{search/types/GetBrandLandingPagesResponse.mjs → account/types/LandingPagesAccountResponse.mjs} +0 -0
  180. /package/dist/esm/api/{resources/search/types → types}/GetCommentsResponse.d.mts +0 -0
  181. /package/dist/esm/api/{resources/search/types → types}/GetCommentsResponse.mjs +0 -0
  182. /package/dist/esm/api/{resources/account/types → types}/GetCreditUsageResponse.d.mts +0 -0
  183. /package/dist/esm/api/{resources/search/types/GetBrandMediaInsightsResponse.mjs → types/GetCreditUsageResponse.mjs} +0 -0
  184. /package/dist/esm/api/{resources/search/types → types}/SearchBrandsResponse.d.mts +0 -0
  185. /package/dist/esm/api/{resources/search/types → types}/SearchBrandsResponse.mjs +0 -0
  186. /package/dist/esm/api/{resources/search/types → types}/SearchCreatorsResponse.d.mts +0 -0
  187. /package/dist/esm/api/{resources/search/types → types}/SearchCreatorsResponse.mjs +0 -0
  188. /package/dist/esm/api/{resources/search/types → types}/SearchTaxonomiesResponse.d.mts +0 -0
  189. /package/dist/esm/api/{resources/search/types → types}/SearchTaxonomiesResponse.mjs +0 -0
@@ -47,32 +47,32 @@ exports.AccountClient = void 0;
47
47
  const BaseClient_js_1 = require("../../../../BaseClient.js");
48
48
  const headers_js_1 = require("../../../../core/headers.js");
49
49
  const core = __importStar(require("../../../../core/index.js"));
50
+ const requestBody_js_1 = require("../../../../core/requestBody.js");
50
51
  const environments = __importStar(require("../../../../environments.js"));
51
52
  const handleNonStatusCodeError_js_1 = require("../../../../errors/handleNonStatusCodeError.js");
52
53
  const errors = __importStar(require("../../../../errors/index.js"));
53
54
  const spyglass = __importStar(require("../../../index.js"));
54
- /**
55
- * The API key's team: credits and the billing period.
56
- */
57
55
  class AccountClient {
58
56
  constructor(options) {
59
57
  this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
60
58
  }
61
59
  /**
62
- * Credits left on the API key's team, the credits included in the
63
- * plan, and the current billing period. Granted credits count toward
64
- * `remainingCredits` and not `planCredits`.
60
+ * Fetch a single brand or creator by id. The `type` field tells you
61
+ * which one you got: `BRAND` or `CREATOR`, and the creator-only fields
62
+ * (`gender`, `ageRange`, ...) are present only on `CREATOR`.
65
63
  *
66
64
  * Limited to 120 requests per minute per user.
67
- * This call is free and does not use credits. It still responds when
68
- * the team is out of credits.
65
+ * Costs 2,000 microdollars ($0.0020) per account returned, charged against your plan's monthly credits.
66
+ * An id that matches nothing returns 404 and is free.
69
67
  *
68
+ * @param {spyglass.GetAccountRequest} request
70
69
  * @param {AccountClient.RequestOptions} requestOptions - Request-specific configuration.
71
70
  *
72
71
  * @throws {@link spyglass.BadRequestError}
73
72
  * @throws {@link spyglass.UnauthorizedError}
74
73
  * @throws {@link spyglass.PaymentRequiredError}
75
74
  * @throws {@link spyglass.ForbiddenError}
75
+ * @throws {@link spyglass.NotFoundError}
76
76
  * @throws {@link spyglass.MethodNotAllowedError}
77
77
  * @throws {@link spyglass.TooManyRequestsError}
78
78
  * @throws {@link spyglass.InternalServerError}
@@ -80,18 +80,21 @@ class AccountClient {
80
80
  * @throws {@link errors.SpyglassTimeoutError}
81
81
  *
82
82
  * @example
83
- * await client.account.getCreditUsage()
83
+ * await client.account.get({
84
+ * id: "id"
85
+ * })
84
86
  */
85
- getCreditUsage(requestOptions) {
86
- return core.HttpResponsePromise.fromPromise(this.__getCreditUsage(requestOptions));
87
+ get(request, requestOptions) {
88
+ return core.HttpResponsePromise.fromPromise(this.__get(request, requestOptions));
87
89
  }
88
- __getCreditUsage(requestOptions) {
90
+ __get(request, requestOptions) {
89
91
  return __awaiter(this, void 0, void 0, function* () {
90
92
  var _a, _b, _c, _d, _e, _f, _g, _h, _j;
93
+ const { id } = request;
91
94
  const _authRequest = yield this._options.authProvider.getAuthRequest();
92
95
  const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
93
96
  const _response = yield core.fetcher({
94
- url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.SpyglassEnvironment.Default, "team/credit-usage"),
97
+ url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.SpyglassEnvironment.Default, `account/${core.url.encodePathParam(id, errors.SpyglassError)}`),
95
98
  method: "GET",
96
99
  headers: _headers,
97
100
  queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
@@ -114,6 +117,8 @@ class AccountClient {
114
117
  throw new spyglass.PaymentRequiredError(_response.error.body, _response.rawResponse);
115
118
  case 403:
116
119
  throw new spyglass.ForbiddenError(_response.error.body, _response.rawResponse);
120
+ case 404:
121
+ throw new spyglass.NotFoundError(_response.error.body, _response.rawResponse);
117
122
  case 405:
118
123
  throw new spyglass.MethodNotAllowedError(_response.error.body, _response.rawResponse);
119
124
  case 429:
@@ -128,7 +133,341 @@ class AccountClient {
128
133
  });
129
134
  }
130
135
  }
131
- return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/team/credit-usage");
136
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/account/{id}");
137
+ });
138
+ }
139
+ /**
140
+ * Return clustered creative themes for an account. `MEDIA_MIX` returns a
141
+ * breakdown by media type; the other types return weekly buckets plus
142
+ * ranked totals, highest first.
143
+ *
144
+ * `maxDaysBack` filters both the weekly bucket series and ranked
145
+ * `totals` to creatives that started within the requested window.
146
+ *
147
+ * Limited to 120 requests per minute per user.
148
+ * 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.
149
+ *
150
+ * @param {spyglass.InsightsAccountRequest} request
151
+ * @param {AccountClient.RequestOptions} requestOptions - Request-specific configuration.
152
+ *
153
+ * @throws {@link spyglass.BadRequestError}
154
+ * @throws {@link spyglass.UnauthorizedError}
155
+ * @throws {@link spyglass.PaymentRequiredError}
156
+ * @throws {@link spyglass.ForbiddenError}
157
+ * @throws {@link spyglass.NotFoundError}
158
+ * @throws {@link spyglass.MethodNotAllowedError}
159
+ * @throws {@link spyglass.TooManyRequestsError}
160
+ * @throws {@link spyglass.InternalServerError}
161
+ * @throws {@link errors.SpyglassError}
162
+ * @throws {@link errors.SpyglassTimeoutError}
163
+ *
164
+ * @example
165
+ * await client.account.insights({
166
+ * id: "id",
167
+ * type: "HOOK"
168
+ * })
169
+ */
170
+ insights(request, requestOptions) {
171
+ return core.HttpResponsePromise.fromPromise(this.__insights(request, requestOptions));
172
+ }
173
+ __insights(request, requestOptions) {
174
+ return __awaiter(this, void 0, void 0, function* () {
175
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
176
+ const { id, type: type_, maxDaysBack, limit } = request;
177
+ const _queryParams = {
178
+ type: type_,
179
+ maxDaysBack,
180
+ limit,
181
+ };
182
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
183
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
184
+ const _response = yield core.fetcher({
185
+ url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.SpyglassEnvironment.Default, `account/${core.url.encodePathParam(id, errors.SpyglassError)}/insights`),
186
+ method: "GET",
187
+ headers: _headers,
188
+ queryString: core.url
189
+ .queryBuilder()
190
+ .addMany(_queryParams)
191
+ .mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams)
192
+ .build(),
193
+ timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
194
+ maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
195
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
196
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
197
+ logging: this._options.logging,
198
+ });
199
+ if (_response.ok) {
200
+ return { data: _response.body, rawResponse: _response.rawResponse };
201
+ }
202
+ if (_response.error.reason === "status-code") {
203
+ switch (_response.error.statusCode) {
204
+ case 400:
205
+ throw new spyglass.BadRequestError(_response.error.body, _response.rawResponse);
206
+ case 401:
207
+ throw new spyglass.UnauthorizedError(_response.error.body, _response.rawResponse);
208
+ case 402:
209
+ throw new spyglass.PaymentRequiredError(_response.error.body, _response.rawResponse);
210
+ case 403:
211
+ throw new spyglass.ForbiddenError(_response.error.body, _response.rawResponse);
212
+ case 404:
213
+ throw new spyglass.NotFoundError(_response.error.body, _response.rawResponse);
214
+ case 405:
215
+ throw new spyglass.MethodNotAllowedError(_response.error.body, _response.rawResponse);
216
+ case 429:
217
+ throw new spyglass.TooManyRequestsError(_response.error.body, _response.rawResponse);
218
+ case 500:
219
+ throw new spyglass.InternalServerError(_response.error.body, _response.rawResponse);
220
+ default:
221
+ throw new errors.SpyglassError({
222
+ statusCode: _response.error.statusCode,
223
+ body: _response.error.body,
224
+ rawResponse: _response.rawResponse,
225
+ });
226
+ }
227
+ }
228
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/account/{id}/insights");
229
+ });
230
+ }
231
+ /**
232
+ * Return the landing-page URLs an account sends ad traffic to, ranked by
233
+ * how often they appear across its ads.
234
+ *
235
+ * Limited to 120 requests per minute per user.
236
+ * 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.
237
+ *
238
+ * @param {spyglass.LandingPagesAccountRequest} request
239
+ * @param {AccountClient.RequestOptions} requestOptions - Request-specific configuration.
240
+ *
241
+ * @throws {@link spyglass.BadRequestError}
242
+ * @throws {@link spyglass.UnauthorizedError}
243
+ * @throws {@link spyglass.PaymentRequiredError}
244
+ * @throws {@link spyglass.ForbiddenError}
245
+ * @throws {@link spyglass.NotFoundError}
246
+ * @throws {@link spyglass.MethodNotAllowedError}
247
+ * @throws {@link spyglass.TooManyRequestsError}
248
+ * @throws {@link spyglass.InternalServerError}
249
+ * @throws {@link errors.SpyglassError}
250
+ * @throws {@link errors.SpyglassTimeoutError}
251
+ *
252
+ * @example
253
+ * await client.account.landingPages({
254
+ * id: "id"
255
+ * })
256
+ */
257
+ landingPages(request, requestOptions) {
258
+ return core.HttpResponsePromise.fromPromise(this.__landingPages(request, requestOptions));
259
+ }
260
+ __landingPages(request, requestOptions) {
261
+ return __awaiter(this, void 0, void 0, function* () {
262
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
263
+ const { id, showInactive, limit } = request;
264
+ const _queryParams = {
265
+ showInactive: showInactive != null ? showInactive : undefined,
266
+ limit,
267
+ };
268
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
269
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
270
+ const _response = yield core.fetcher({
271
+ url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.SpyglassEnvironment.Default, `account/${core.url.encodePathParam(id, errors.SpyglassError)}/landing-pages`),
272
+ method: "GET",
273
+ headers: _headers,
274
+ queryString: core.url
275
+ .queryBuilder()
276
+ .addMany(_queryParams)
277
+ .mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams)
278
+ .build(),
279
+ timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
280
+ maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
281
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
282
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
283
+ logging: this._options.logging,
284
+ });
285
+ if (_response.ok) {
286
+ return { data: _response.body, rawResponse: _response.rawResponse };
287
+ }
288
+ if (_response.error.reason === "status-code") {
289
+ switch (_response.error.statusCode) {
290
+ case 400:
291
+ throw new spyglass.BadRequestError(_response.error.body, _response.rawResponse);
292
+ case 401:
293
+ throw new spyglass.UnauthorizedError(_response.error.body, _response.rawResponse);
294
+ case 402:
295
+ throw new spyglass.PaymentRequiredError(_response.error.body, _response.rawResponse);
296
+ case 403:
297
+ throw new spyglass.ForbiddenError(_response.error.body, _response.rawResponse);
298
+ case 404:
299
+ throw new spyglass.NotFoundError(_response.error.body, _response.rawResponse);
300
+ case 405:
301
+ throw new spyglass.MethodNotAllowedError(_response.error.body, _response.rawResponse);
302
+ case 429:
303
+ throw new spyglass.TooManyRequestsError(_response.error.body, _response.rawResponse);
304
+ case 500:
305
+ throw new spyglass.InternalServerError(_response.error.body, _response.rawResponse);
306
+ default:
307
+ throw new errors.SpyglassError({
308
+ statusCode: _response.error.statusCode,
309
+ body: _response.error.body,
310
+ rawResponse: _response.rawResponse,
311
+ });
312
+ }
313
+ }
314
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/account/{id}/landing-pages");
315
+ });
316
+ }
317
+ /**
318
+ * Look up a brand by website URL, or start indexing it if we do not
319
+ * have it yet. Pass a single `websiteUrl`. Instagram and TikTok
320
+ * profile URLs are accepted and resolved as creators.
321
+ *
322
+ * This endpoint does not consume credits. An existing brand returns
323
+ * `status: "already_exists"`. A new brand is created and sync is
324
+ * queued, returning `status: "indexing"` and the new `brandId`.
325
+ *
326
+ * Limited to 50 requests per minute per user.
327
+ * This call is free.
328
+ *
329
+ * @param {spyglass.IndexAccountRequest} request
330
+ * @param {AccountClient.RequestOptions} requestOptions - Request-specific configuration.
331
+ *
332
+ * @throws {@link spyglass.BadRequestError}
333
+ * @throws {@link spyglass.UnauthorizedError}
334
+ * @throws {@link spyglass.ForbiddenError}
335
+ * @throws {@link spyglass.MethodNotAllowedError}
336
+ * @throws {@link spyglass.ContentTooLargeError}
337
+ * @throws {@link spyglass.TooManyRequestsError}
338
+ * @throws {@link spyglass.InternalServerError}
339
+ * @throws {@link errors.SpyglassError}
340
+ * @throws {@link errors.SpyglassTimeoutError}
341
+ *
342
+ * @example
343
+ * await client.account.index({
344
+ * websiteUrl: "https://www.nike.com"
345
+ * })
346
+ */
347
+ index(request, requestOptions) {
348
+ return core.HttpResponsePromise.fromPromise(this.__index(request, requestOptions));
349
+ }
350
+ __index(request, requestOptions) {
351
+ return __awaiter(this, void 0, void 0, function* () {
352
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
353
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
354
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
355
+ const _response = yield core.fetcher({
356
+ url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.SpyglassEnvironment.Default, "account/index"),
357
+ method: "POST",
358
+ headers: _headers,
359
+ contentType: "application/json",
360
+ queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
361
+ requestType: "json",
362
+ body: (0, requestBody_js_1.mergeAdditionalBodyParameters)(request, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.additionalBodyParameters),
363
+ timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
364
+ maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
365
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
366
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
367
+ logging: this._options.logging,
368
+ });
369
+ if (_response.ok) {
370
+ return { data: _response.body, rawResponse: _response.rawResponse };
371
+ }
372
+ if (_response.error.reason === "status-code") {
373
+ switch (_response.error.statusCode) {
374
+ case 400:
375
+ throw new spyglass.BadRequestError(_response.error.body, _response.rawResponse);
376
+ case 401:
377
+ throw new spyglass.UnauthorizedError(_response.error.body, _response.rawResponse);
378
+ case 403:
379
+ throw new spyglass.ForbiddenError(_response.error.body, _response.rawResponse);
380
+ case 405:
381
+ throw new spyglass.MethodNotAllowedError(_response.error.body, _response.rawResponse);
382
+ case 413:
383
+ throw new spyglass.ContentTooLargeError(_response.error.body, _response.rawResponse);
384
+ case 429:
385
+ throw new spyglass.TooManyRequestsError(_response.error.body, _response.rawResponse);
386
+ case 500:
387
+ throw new spyglass.InternalServerError(_response.error.body, _response.rawResponse);
388
+ default:
389
+ throw new errors.SpyglassError({
390
+ statusCode: _response.error.statusCode,
391
+ body: _response.error.body,
392
+ rawResponse: _response.rawResponse,
393
+ });
394
+ }
395
+ }
396
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/account/index");
397
+ });
398
+ }
399
+ /**
400
+ * Poll whether a brand finished indexing after POST /account/index.
401
+ *
402
+ * Limited to 300 requests per minute per user.
403
+ * This call is free.
404
+ *
405
+ * @param {spyglass.IndexStatusAccountRequest} request
406
+ * @param {AccountClient.RequestOptions} requestOptions - Request-specific configuration.
407
+ *
408
+ * @throws {@link spyglass.BadRequestError}
409
+ * @throws {@link spyglass.UnauthorizedError}
410
+ * @throws {@link spyglass.ForbiddenError}
411
+ * @throws {@link spyglass.NotFoundError}
412
+ * @throws {@link spyglass.MethodNotAllowedError}
413
+ * @throws {@link spyglass.TooManyRequestsError}
414
+ * @throws {@link spyglass.InternalServerError}
415
+ * @throws {@link errors.SpyglassError}
416
+ * @throws {@link errors.SpyglassTimeoutError}
417
+ *
418
+ * @example
419
+ * await client.account.indexStatus({
420
+ * id: "id"
421
+ * })
422
+ */
423
+ indexStatus(request, requestOptions) {
424
+ return core.HttpResponsePromise.fromPromise(this.__indexStatus(request, requestOptions));
425
+ }
426
+ __indexStatus(request, requestOptions) {
427
+ return __awaiter(this, void 0, void 0, function* () {
428
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
429
+ const { id } = request;
430
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
431
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
432
+ const _response = yield core.fetcher({
433
+ url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.SpyglassEnvironment.Default, `account/${core.url.encodePathParam(id, errors.SpyglassError)}/index-status`),
434
+ method: "GET",
435
+ headers: _headers,
436
+ queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
437
+ timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
438
+ maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
439
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
440
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
441
+ logging: this._options.logging,
442
+ });
443
+ if (_response.ok) {
444
+ return { data: _response.body, rawResponse: _response.rawResponse };
445
+ }
446
+ if (_response.error.reason === "status-code") {
447
+ switch (_response.error.statusCode) {
448
+ case 400:
449
+ throw new spyglass.BadRequestError(_response.error.body, _response.rawResponse);
450
+ case 401:
451
+ throw new spyglass.UnauthorizedError(_response.error.body, _response.rawResponse);
452
+ case 403:
453
+ throw new spyglass.ForbiddenError(_response.error.body, _response.rawResponse);
454
+ case 404:
455
+ throw new spyglass.NotFoundError(_response.error.body, _response.rawResponse);
456
+ case 405:
457
+ throw new spyglass.MethodNotAllowedError(_response.error.body, _response.rawResponse);
458
+ case 429:
459
+ throw new spyglass.TooManyRequestsError(_response.error.body, _response.rawResponse);
460
+ case 500:
461
+ throw new spyglass.InternalServerError(_response.error.body, _response.rawResponse);
462
+ default:
463
+ throw new errors.SpyglassError({
464
+ statusCode: _response.error.statusCode,
465
+ body: _response.error.body,
466
+ rawResponse: _response.rawResponse,
467
+ });
468
+ }
469
+ }
470
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/account/{id}/index-status");
132
471
  });
133
472
  }
134
473
  }
@@ -1 +1 @@
1
- export {};
1
+ export * from "./requests/index.js";
@@ -1,2 +1,17 @@
1
1
  "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
2
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./requests/index.js"), exports);
@@ -4,6 +4,6 @@
4
4
  * websiteUrl: "https://www.nike.com"
5
5
  * }
6
6
  */
7
- export interface IndexBrandRequest {
7
+ export interface IndexAccountRequest {
8
8
  websiteUrl: string;
9
9
  }
@@ -4,7 +4,7 @@
4
4
  * id: "id"
5
5
  * }
6
6
  */
7
- export interface IndexBrandStatusRequest {
7
+ export interface IndexStatusAccountRequest {
8
8
  /** Brand or creator id returned by POST /brands or POST /creators. */
9
9
  id: string;
10
10
  }
@@ -6,10 +6,10 @@ import type * as spyglass from "../../../../index.js";
6
6
  * type: "HOOK"
7
7
  * }
8
8
  */
9
- export interface GetBrandMediaInsightsRequest {
9
+ export interface InsightsAccountRequest {
10
10
  /** Brand or creator id returned by POST /brands or POST /creators. */
11
11
  id: string;
12
- type: spyglass.GetBrandMediaInsightsRequestType;
12
+ type: spyglass.InsightsAccountRequestType;
13
13
  maxDaysBack?: number;
14
14
  limit?: number;
15
15
  }
@@ -5,9 +5,9 @@ import type * as spyglass from "../../../../index.js";
5
5
  * id: "id"
6
6
  * }
7
7
  */
8
- export interface GetBrandLandingPagesRequest {
8
+ export interface LandingPagesAccountRequest {
9
9
  /** Brand or creator id returned by POST /brands or POST /creators. */
10
10
  id: string;
11
- showInactive?: spyglass.GetBrandLandingPagesRequestShowInactive;
11
+ showInactive?: spyglass.LandingPagesAccountRequestShowInactive;
12
12
  limit?: number;
13
13
  }
@@ -0,0 +1,5 @@
1
+ export type { GetAccountRequest } from "./GetAccountRequest.js";
2
+ export type { IndexAccountRequest } from "./IndexAccountRequest.js";
3
+ export type { IndexStatusAccountRequest } from "./IndexStatusAccountRequest.js";
4
+ export type { InsightsAccountRequest } from "./InsightsAccountRequest.js";
5
+ export type { LandingPagesAccountRequest } from "./LandingPagesAccountRequest.js";
@@ -1,8 +1,8 @@
1
- export interface IndexBrandResponse {
1
+ export interface IndexAccountResponse {
2
2
  brandId: string;
3
- status: IndexBrandResponse.Status;
3
+ status: IndexAccountResponse.Status;
4
4
  }
5
- export declare namespace IndexBrandResponse {
5
+ export declare namespace IndexAccountResponse {
6
6
  const Status: {
7
7
  readonly AlreadyExists: "already_exists";
8
8
  readonly Indexing: "indexing";
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.IndexAccountResponse = void 0;
5
+ var IndexAccountResponse;
6
+ (function (IndexAccountResponse) {
7
+ IndexAccountResponse.Status = {
8
+ AlreadyExists: "already_exists",
9
+ Indexing: "indexing",
10
+ };
11
+ })(IndexAccountResponse || (exports.IndexAccountResponse = IndexAccountResponse = {}));
@@ -1,7 +1,7 @@
1
- export interface IndexBrandStatusResponse {
2
- status: IndexBrandStatusResponse.Status;
1
+ export interface IndexStatusAccountResponse {
2
+ status: IndexStatusAccountResponse.Status;
3
3
  }
4
- export declare namespace IndexBrandStatusResponse {
4
+ export declare namespace IndexStatusAccountResponse {
5
5
  const Status: {
6
6
  readonly Indexing: "indexing";
7
7
  readonly Ready: "ready";
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.IndexStatusAccountResponse = void 0;
5
+ var IndexStatusAccountResponse;
6
+ (function (IndexStatusAccountResponse) {
7
+ IndexStatusAccountResponse.Status = {
8
+ Indexing: "indexing",
9
+ Ready: "ready",
10
+ };
11
+ })(IndexStatusAccountResponse || (exports.IndexStatusAccountResponse = IndexStatusAccountResponse = {}));
@@ -0,0 +1,7 @@
1
+ export declare const InsightsAccountRequestType: {
2
+ readonly Hook: "HOOK";
3
+ readonly TargetPersona: "TARGET_PERSONA";
4
+ readonly AdAngle: "AD_ANGLE";
5
+ readonly MediaMix: "MEDIA_MIX";
6
+ };
7
+ export type InsightsAccountRequestType = (typeof InsightsAccountRequestType)[keyof typeof InsightsAccountRequestType];
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  // This file was auto-generated by Fern from our API Definition.
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.GetBrandMediaInsightsRequestType = void 0;
5
- exports.GetBrandMediaInsightsRequestType = {
4
+ exports.InsightsAccountRequestType = void 0;
5
+ exports.InsightsAccountRequestType = {
6
6
  Hook: "HOOK",
7
7
  TargetPersona: "TARGET_PERSONA",
8
8
  AdAngle: "AD_ANGLE",
@@ -1,4 +1,4 @@
1
- export type GetBrandMediaInsightsResponse = {
1
+ export type InsightsAccountResponse = {
2
2
  type: "MEDIA_MIX";
3
3
  count: number;
4
4
  rows: {
@@ -0,0 +1,5 @@
1
+ export declare const LandingPagesAccountRequestShowInactive: {
2
+ readonly True: "true";
3
+ readonly False: "false";
4
+ };
5
+ export type LandingPagesAccountRequestShowInactive = (typeof LandingPagesAccountRequestShowInactive)[keyof typeof LandingPagesAccountRequestShowInactive];
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  // This file was auto-generated by Fern from our API Definition.
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.GetBrandLandingPagesRequestShowInactive = void 0;
5
- exports.GetBrandLandingPagesRequestShowInactive = {
4
+ exports.LandingPagesAccountRequestShowInactive = void 0;
5
+ exports.LandingPagesAccountRequestShowInactive = {
6
6
  True: "true",
7
7
  False: "false",
8
8
  };
@@ -1,8 +1,8 @@
1
- export interface GetBrandLandingPagesResponse {
1
+ export interface LandingPagesAccountResponse {
2
2
  count: number;
3
- landingPages: GetBrandLandingPagesResponse.LandingPages.Item[];
3
+ landingPages: LandingPagesAccountResponse.LandingPages.Item[];
4
4
  }
5
- export declare namespace GetBrandLandingPagesResponse {
5
+ export declare namespace LandingPagesAccountResponse {
6
6
  type LandingPages = LandingPages.Item[];
7
7
  namespace LandingPages {
8
8
  interface Item {
@@ -1 +1,7 @@
1
- export * from "./GetCreditUsageResponse.js";
1
+ export * from "./GetAccountResponse.js";
2
+ export * from "./IndexAccountResponse.js";
3
+ export * from "./IndexStatusAccountResponse.js";
4
+ export * from "./InsightsAccountRequestType.js";
5
+ export * from "./InsightsAccountResponse.js";
6
+ export * from "./LandingPagesAccountRequestShowInactive.js";
7
+ export * from "./LandingPagesAccountResponse.js";
@@ -14,4 +14,10 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./GetCreditUsageResponse.js"), exports);
17
+ __exportStar(require("./GetAccountResponse.js"), exports);
18
+ __exportStar(require("./IndexAccountResponse.js"), exports);
19
+ __exportStar(require("./IndexStatusAccountResponse.js"), exports);
20
+ __exportStar(require("./InsightsAccountRequestType.js"), exports);
21
+ __exportStar(require("./InsightsAccountResponse.js"), exports);
22
+ __exportStar(require("./LandingPagesAccountRequestShowInactive.js"), exports);
23
+ __exportStar(require("./LandingPagesAccountResponse.js"), exports);
@@ -1,8 +1,3 @@
1
+ export * from "./account/client/requests/index.js";
1
2
  export * as account from "./account/index.js";
2
3
  export * from "./account/types/index.js";
3
- export * from "./indexing/client/requests/index.js";
4
- export * as indexing from "./indexing/index.js";
5
- export * from "./indexing/types/index.js";
6
- export * from "./search/client/requests/index.js";
7
- export * as search from "./search/index.js";
8
- export * from "./search/types/index.js";