@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
@@ -1 +0,0 @@
1
- export * from "./requests/index.js";
@@ -1,17 +0,0 @@
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
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./requests/index.js"), exports);
@@ -1,8 +0,0 @@
1
- export type { GetAccountRequest } from "./GetAccountRequest.js";
2
- export type { GetBrandLandingPagesRequest } from "./GetBrandLandingPagesRequest.js";
3
- export type { GetBrandMediaInsightsRequest } from "./GetBrandMediaInsightsRequest.js";
4
- export type { GetCommentsRequest } from "./GetCommentsRequest.js";
5
- export { GetMediaRequest } from "./GetMediaRequest.js";
6
- export { SearchBrandsRequest } from "./SearchBrandsRequest.js";
7
- export { SearchCreatorsRequest } from "./SearchCreatorsRequest.js";
8
- export type { SearchTaxonomiesRequest } from "./SearchTaxonomiesRequest.js";
@@ -1,2 +0,0 @@
1
- export { SearchClient } from "./client/Client.js";
2
- export * from "./client/index.js";
@@ -1,21 +0,0 @@
1
- "use strict";
2
- // This file was auto-generated by Fern from our API Definition.
3
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
4
- if (k2 === undefined) k2 = k;
5
- var desc = Object.getOwnPropertyDescriptor(m, k);
6
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
7
- desc = { enumerable: true, get: function() { return m[k]; } };
8
- }
9
- Object.defineProperty(o, k2, desc);
10
- }) : (function(o, m, k, k2) {
11
- if (k2 === undefined) k2 = k;
12
- o[k2] = m[k];
13
- }));
14
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
16
- };
17
- Object.defineProperty(exports, "__esModule", { value: true });
18
- exports.SearchClient = void 0;
19
- var Client_js_1 = require("./client/Client.js");
20
- Object.defineProperty(exports, "SearchClient", { enumerable: true, get: function () { return Client_js_1.SearchClient; } });
21
- __exportStar(require("./client/index.js"), exports);
@@ -1,2 +0,0 @@
1
- export * from "./client/index.js";
2
- export * from "./types/index.js";
@@ -1,18 +0,0 @@
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
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./client/index.js"), exports);
18
- __exportStar(require("./types/index.js"), exports);
@@ -1,5 +0,0 @@
1
- export declare const GetBrandLandingPagesRequestShowInactive: {
2
- readonly True: "true";
3
- readonly False: "false";
4
- };
5
- export type GetBrandLandingPagesRequestShowInactive = (typeof GetBrandLandingPagesRequestShowInactive)[keyof typeof GetBrandLandingPagesRequestShowInactive];
@@ -1,7 +0,0 @@
1
- export declare const GetBrandMediaInsightsRequestType: {
2
- readonly Hook: "HOOK";
3
- readonly TargetPersona: "TARGET_PERSONA";
4
- readonly AdAngle: "AD_ANGLE";
5
- readonly MediaMix: "MEDIA_MIX";
6
- };
7
- export type GetBrandMediaInsightsRequestType = (typeof GetBrandMediaInsightsRequestType)[keyof typeof GetBrandMediaInsightsRequestType];
@@ -1,10 +0,0 @@
1
- export * from "./GetAccountResponse.js";
2
- export * from "./GetBrandLandingPagesRequestShowInactive.js";
3
- export * from "./GetBrandLandingPagesResponse.js";
4
- export * from "./GetBrandMediaInsightsRequestType.js";
5
- export * from "./GetBrandMediaInsightsResponse.js";
6
- export * from "./GetCommentsResponse.js";
7
- export * from "./GetMediaResponse.js";
8
- export * from "./SearchBrandsResponse.js";
9
- export * from "./SearchCreatorsResponse.js";
10
- export * from "./SearchTaxonomiesResponse.js";
@@ -1,26 +0,0 @@
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
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./GetAccountResponse.js"), exports);
18
- __exportStar(require("./GetBrandLandingPagesRequestShowInactive.js"), exports);
19
- __exportStar(require("./GetBrandLandingPagesResponse.js"), exports);
20
- __exportStar(require("./GetBrandMediaInsightsRequestType.js"), exports);
21
- __exportStar(require("./GetBrandMediaInsightsResponse.js"), exports);
22
- __exportStar(require("./GetCommentsResponse.js"), exports);
23
- __exportStar(require("./GetMediaResponse.js"), exports);
24
- __exportStar(require("./SearchBrandsResponse.js"), exports);
25
- __exportStar(require("./SearchCreatorsResponse.js"), exports);
26
- __exportStar(require("./SearchTaxonomiesResponse.js"), exports);
@@ -1,74 +0,0 @@
1
- import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.mjs";
2
- import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.mjs";
3
- import * as core from "../../../../core/index.mjs";
4
- import * as spyglass from "../../../index.mjs";
5
- export declare namespace IndexingClient {
6
- type Options = BaseClientOptions;
7
- interface RequestOptions extends BaseRequestOptions {
8
- }
9
- }
10
- /**
11
- * Add an account we do not have yet, then poll until ready.
12
- */
13
- export declare class IndexingClient {
14
- protected readonly _options: NormalizedClientOptionsWithAuth<IndexingClient.Options>;
15
- constructor(options: IndexingClient.Options);
16
- /**
17
- * Look up a brand by website URL, or start indexing it if we do not
18
- * have it yet. Pass a single `websiteUrl`. Instagram and TikTok
19
- * profile URLs are accepted and resolved as creators.
20
- *
21
- * This endpoint does not consume credits. An existing brand returns
22
- * `status: "already_exists"`. A new brand is created and sync is
23
- * queued, returning `status: "indexing"` and the new `brandId`.
24
- *
25
- * Limited to 50 requests per minute per user.
26
- * This call is free.
27
- *
28
- * @param {spyglass.IndexBrandRequest} request
29
- * @param {IndexingClient.RequestOptions} requestOptions - Request-specific configuration.
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}
38
- * @throws {@link errors.SpyglassError}
39
- * @throws {@link errors.SpyglassTimeoutError}
40
- *
41
- * @example
42
- * await client.indexing.indexBrand({
43
- * websiteUrl: "https://www.nike.com"
44
- * })
45
- */
46
- indexBrand(request: spyglass.IndexBrandRequest, requestOptions?: IndexingClient.RequestOptions): core.HttpResponsePromise<spyglass.IndexBrandResponse>;
47
- private __indexBrand;
48
- /**
49
- * Poll whether a brand finished indexing after POST /account/index.
50
- *
51
- * Limited to 300 requests per minute per user.
52
- * This call is free.
53
- *
54
- * @param {spyglass.IndexBrandStatusRequest} request
55
- * @param {IndexingClient.RequestOptions} requestOptions - Request-specific configuration.
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}
64
- * @throws {@link errors.SpyglassError}
65
- * @throws {@link errors.SpyglassTimeoutError}
66
- *
67
- * @example
68
- * await client.indexing.indexBrandStatus({
69
- * id: "id"
70
- * })
71
- */
72
- indexBrandStatus(request: spyglass.IndexBrandStatusRequest, requestOptions?: IndexingClient.RequestOptions): core.HttpResponsePromise<spyglass.IndexBrandStatusResponse>;
73
- private __indexBrandStatus;
74
- }
@@ -1,182 +0,0 @@
1
- // This file was auto-generated by Fern from our API Definition.
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
- import { normalizeClientOptionsWithAuth } from "../../../../BaseClient.mjs";
12
- import { mergeHeaders } from "../../../../core/headers.mjs";
13
- import * as core from "../../../../core/index.mjs";
14
- import { mergeAdditionalBodyParameters } from "../../../../core/requestBody.mjs";
15
- import * as environments from "../../../../environments.mjs";
16
- import { handleNonStatusCodeError } from "../../../../errors/handleNonStatusCodeError.mjs";
17
- import * as errors from "../../../../errors/index.mjs";
18
- import * as spyglass from "../../../index.mjs";
19
- /**
20
- * Add an account we do not have yet, then poll until ready.
21
- */
22
- export class IndexingClient {
23
- constructor(options) {
24
- this._options = normalizeClientOptionsWithAuth(options);
25
- }
26
- /**
27
- * Look up a brand by website URL, or start indexing it if we do not
28
- * have it yet. Pass a single `websiteUrl`. Instagram and TikTok
29
- * profile URLs are accepted and resolved as creators.
30
- *
31
- * This endpoint does not consume credits. An existing brand returns
32
- * `status: "already_exists"`. A new brand is created and sync is
33
- * queued, returning `status: "indexing"` and the new `brandId`.
34
- *
35
- * Limited to 50 requests per minute per user.
36
- * This call is free.
37
- *
38
- * @param {spyglass.IndexBrandRequest} request
39
- * @param {IndexingClient.RequestOptions} requestOptions - Request-specific configuration.
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}
48
- * @throws {@link errors.SpyglassError}
49
- * @throws {@link errors.SpyglassTimeoutError}
50
- *
51
- * @example
52
- * await client.indexing.indexBrand({
53
- * websiteUrl: "https://www.nike.com"
54
- * })
55
- */
56
- indexBrand(request, requestOptions) {
57
- return core.HttpResponsePromise.fromPromise(this.__indexBrand(request, requestOptions));
58
- }
59
- __indexBrand(request, requestOptions) {
60
- return __awaiter(this, void 0, void 0, function* () {
61
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
62
- const _authRequest = yield this._options.authProvider.getAuthRequest();
63
- const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
64
- const _response = yield core.fetcher({
65
- 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"),
66
- method: "POST",
67
- headers: _headers,
68
- contentType: "application/json",
69
- queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
70
- requestType: "json",
71
- body: mergeAdditionalBodyParameters(request, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.additionalBodyParameters),
72
- 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,
73
- 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,
74
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
75
- fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
76
- logging: this._options.logging,
77
- });
78
- if (_response.ok) {
79
- return { data: _response.body, rawResponse: _response.rawResponse };
80
- }
81
- if (_response.error.reason === "status-code") {
82
- switch (_response.error.statusCode) {
83
- case 400:
84
- throw new spyglass.BadRequestError(_response.error.body, _response.rawResponse);
85
- case 401:
86
- throw new spyglass.UnauthorizedError(_response.error.body, _response.rawResponse);
87
- case 403:
88
- throw new spyglass.ForbiddenError(_response.error.body, _response.rawResponse);
89
- case 405:
90
- throw new spyglass.MethodNotAllowedError(_response.error.body, _response.rawResponse);
91
- case 413:
92
- throw new spyglass.ContentTooLargeError(_response.error.body, _response.rawResponse);
93
- case 429:
94
- throw new spyglass.TooManyRequestsError(_response.error.body, _response.rawResponse);
95
- case 500:
96
- throw new spyglass.InternalServerError(_response.error.body, _response.rawResponse);
97
- default:
98
- throw new errors.SpyglassError({
99
- statusCode: _response.error.statusCode,
100
- body: _response.error.body,
101
- rawResponse: _response.rawResponse,
102
- });
103
- }
104
- }
105
- return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/account/index");
106
- });
107
- }
108
- /**
109
- * Poll whether a brand finished indexing after POST /account/index.
110
- *
111
- * Limited to 300 requests per minute per user.
112
- * This call is free.
113
- *
114
- * @param {spyglass.IndexBrandStatusRequest} request
115
- * @param {IndexingClient.RequestOptions} requestOptions - Request-specific configuration.
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}
124
- * @throws {@link errors.SpyglassError}
125
- * @throws {@link errors.SpyglassTimeoutError}
126
- *
127
- * @example
128
- * await client.indexing.indexBrandStatus({
129
- * id: "id"
130
- * })
131
- */
132
- indexBrandStatus(request, requestOptions) {
133
- return core.HttpResponsePromise.fromPromise(this.__indexBrandStatus(request, requestOptions));
134
- }
135
- __indexBrandStatus(request, requestOptions) {
136
- return __awaiter(this, void 0, void 0, function* () {
137
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
138
- const { id } = request;
139
- const _authRequest = yield this._options.authProvider.getAuthRequest();
140
- const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
141
- const _response = yield core.fetcher({
142
- 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`),
143
- method: "GET",
144
- headers: _headers,
145
- queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
146
- 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,
147
- 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,
148
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
149
- fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
150
- logging: this._options.logging,
151
- });
152
- if (_response.ok) {
153
- return { data: _response.body, rawResponse: _response.rawResponse };
154
- }
155
- if (_response.error.reason === "status-code") {
156
- switch (_response.error.statusCode) {
157
- case 400:
158
- throw new spyglass.BadRequestError(_response.error.body, _response.rawResponse);
159
- case 401:
160
- throw new spyglass.UnauthorizedError(_response.error.body, _response.rawResponse);
161
- case 403:
162
- throw new spyglass.ForbiddenError(_response.error.body, _response.rawResponse);
163
- case 404:
164
- throw new spyglass.NotFoundError(_response.error.body, _response.rawResponse);
165
- case 405:
166
- throw new spyglass.MethodNotAllowedError(_response.error.body, _response.rawResponse);
167
- case 429:
168
- throw new spyglass.TooManyRequestsError(_response.error.body, _response.rawResponse);
169
- case 500:
170
- throw new spyglass.InternalServerError(_response.error.body, _response.rawResponse);
171
- default:
172
- throw new errors.SpyglassError({
173
- statusCode: _response.error.statusCode,
174
- body: _response.error.body,
175
- rawResponse: _response.rawResponse,
176
- });
177
- }
178
- }
179
- return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/account/{id}/index-status");
180
- });
181
- }
182
- }
@@ -1,2 +0,0 @@
1
- export type { IndexBrandRequest } from "./IndexBrandRequest.mjs";
2
- export type { IndexBrandStatusRequest } from "./IndexBrandStatusRequest.mjs";
@@ -1,2 +0,0 @@
1
- export { IndexingClient } from "./client/Client.mjs";
2
- export * from "./client/index.mjs";
@@ -1,3 +0,0 @@
1
- // This file was auto-generated by Fern from our API Definition.
2
- export { IndexingClient } from "./client/Client.mjs";
3
- export * from "./client/index.mjs";
@@ -1,2 +0,0 @@
1
- export * from "./client/index.mjs";
2
- export * from "./types/index.mjs";
@@ -1,2 +0,0 @@
1
- export * from "./client/index.mjs";
2
- export * from "./types/index.mjs";
@@ -1,8 +0,0 @@
1
- // This file was auto-generated by Fern from our API Definition.
2
- export var IndexBrandResponse;
3
- (function (IndexBrandResponse) {
4
- IndexBrandResponse.Status = {
5
- AlreadyExists: "already_exists",
6
- Indexing: "indexing",
7
- };
8
- })(IndexBrandResponse || (IndexBrandResponse = {}));
@@ -1,8 +0,0 @@
1
- // This file was auto-generated by Fern from our API Definition.
2
- export var IndexBrandStatusResponse;
3
- (function (IndexBrandStatusResponse) {
4
- IndexBrandStatusResponse.Status = {
5
- Indexing: "indexing",
6
- Ready: "ready",
7
- };
8
- })(IndexBrandStatusResponse || (IndexBrandStatusResponse = {}));
@@ -1,2 +0,0 @@
1
- export * from "./IndexBrandResponse.mjs";
2
- export * from "./IndexBrandStatusResponse.mjs";
@@ -1,2 +0,0 @@
1
- export * from "./IndexBrandResponse.mjs";
2
- export * from "./IndexBrandStatusResponse.mjs";