profoundai 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (406) hide show
  1. package/CHANGELOG.md +71 -0
  2. package/LICENSE +201 -0
  3. package/README.md +356 -0
  4. package/api-promise.d.mts +2 -0
  5. package/api-promise.d.mts.map +1 -0
  6. package/api-promise.d.ts +2 -0
  7. package/api-promise.d.ts.map +1 -0
  8. package/api-promise.js +6 -0
  9. package/api-promise.js.map +1 -0
  10. package/api-promise.mjs +2 -0
  11. package/api-promise.mjs.map +1 -0
  12. package/client.d.mts +190 -0
  13. package/client.d.mts.map +1 -0
  14. package/client.d.ts +190 -0
  15. package/client.d.ts.map +1 -0
  16. package/client.js +470 -0
  17. package/client.js.map +1 -0
  18. package/client.mjs +466 -0
  19. package/client.mjs.map +1 -0
  20. package/core/api-promise.d.mts +46 -0
  21. package/core/api-promise.d.mts.map +1 -0
  22. package/core/api-promise.d.ts +46 -0
  23. package/core/api-promise.d.ts.map +1 -0
  24. package/core/api-promise.js +74 -0
  25. package/core/api-promise.js.map +1 -0
  26. package/core/api-promise.mjs +70 -0
  27. package/core/api-promise.mjs.map +1 -0
  28. package/core/error.d.mts +46 -0
  29. package/core/error.d.mts.map +1 -0
  30. package/core/error.d.ts +46 -0
  31. package/core/error.d.ts.map +1 -0
  32. package/core/error.js +113 -0
  33. package/core/error.js.map +1 -0
  34. package/core/error.mjs +97 -0
  35. package/core/error.mjs.map +1 -0
  36. package/core/resource.d.mts +6 -0
  37. package/core/resource.d.mts.map +1 -0
  38. package/core/resource.d.ts +6 -0
  39. package/core/resource.d.ts.map +1 -0
  40. package/core/resource.js +11 -0
  41. package/core/resource.js.map +1 -0
  42. package/core/resource.mjs +7 -0
  43. package/core/resource.mjs.map +1 -0
  44. package/core/uploads.d.mts +3 -0
  45. package/core/uploads.d.mts.map +1 -0
  46. package/core/uploads.d.ts +3 -0
  47. package/core/uploads.d.ts.map +1 -0
  48. package/core/uploads.js +6 -0
  49. package/core/uploads.js.map +1 -0
  50. package/core/uploads.mjs +2 -0
  51. package/core/uploads.mjs.map +1 -0
  52. package/error.d.mts +2 -0
  53. package/error.d.mts.map +1 -0
  54. package/error.d.ts +2 -0
  55. package/error.d.ts.map +1 -0
  56. package/error.js +6 -0
  57. package/error.js.map +1 -0
  58. package/error.mjs +2 -0
  59. package/error.mjs.map +1 -0
  60. package/index.d.mts +6 -0
  61. package/index.d.mts.map +1 -0
  62. package/index.d.ts +6 -0
  63. package/index.d.ts.map +1 -0
  64. package/index.js +30 -0
  65. package/index.js.map +1 -0
  66. package/index.mjs +7 -0
  67. package/index.mjs.map +1 -0
  68. package/internal/builtin-types.d.mts +73 -0
  69. package/internal/builtin-types.d.mts.map +1 -0
  70. package/internal/builtin-types.d.ts +73 -0
  71. package/internal/builtin-types.d.ts.map +1 -0
  72. package/internal/builtin-types.js +4 -0
  73. package/internal/builtin-types.js.map +1 -0
  74. package/internal/builtin-types.mjs +3 -0
  75. package/internal/builtin-types.mjs.map +1 -0
  76. package/internal/detect-platform.d.mts +15 -0
  77. package/internal/detect-platform.d.mts.map +1 -0
  78. package/internal/detect-platform.d.ts +15 -0
  79. package/internal/detect-platform.d.ts.map +1 -0
  80. package/internal/detect-platform.js +162 -0
  81. package/internal/detect-platform.js.map +1 -0
  82. package/internal/detect-platform.mjs +157 -0
  83. package/internal/detect-platform.mjs.map +1 -0
  84. package/internal/errors.d.mts +3 -0
  85. package/internal/errors.d.mts.map +1 -0
  86. package/internal/errors.d.ts +3 -0
  87. package/internal/errors.d.ts.map +1 -0
  88. package/internal/errors.js +41 -0
  89. package/internal/errors.js.map +1 -0
  90. package/internal/errors.mjs +36 -0
  91. package/internal/errors.mjs.map +1 -0
  92. package/internal/headers.d.mts +20 -0
  93. package/internal/headers.d.mts.map +1 -0
  94. package/internal/headers.d.ts +20 -0
  95. package/internal/headers.d.ts.map +1 -0
  96. package/internal/headers.js +79 -0
  97. package/internal/headers.js.map +1 -0
  98. package/internal/headers.mjs +74 -0
  99. package/internal/headers.mjs.map +1 -0
  100. package/internal/parse.d.mts +12 -0
  101. package/internal/parse.d.mts.map +1 -0
  102. package/internal/parse.d.ts +12 -0
  103. package/internal/parse.d.ts.map +1 -0
  104. package/internal/parse.js +35 -0
  105. package/internal/parse.js.map +1 -0
  106. package/internal/parse.mjs +32 -0
  107. package/internal/parse.mjs.map +1 -0
  108. package/internal/request-options.d.mts +75 -0
  109. package/internal/request-options.d.mts.map +1 -0
  110. package/internal/request-options.d.ts +75 -0
  111. package/internal/request-options.d.ts.map +1 -0
  112. package/internal/request-options.js +14 -0
  113. package/internal/request-options.js.map +1 -0
  114. package/internal/request-options.mjs +10 -0
  115. package/internal/request-options.mjs.map +1 -0
  116. package/internal/shim-types.d.mts +17 -0
  117. package/internal/shim-types.d.mts.map +1 -0
  118. package/internal/shim-types.d.ts +17 -0
  119. package/internal/shim-types.d.ts.map +1 -0
  120. package/internal/shim-types.js +4 -0
  121. package/internal/shim-types.js.map +1 -0
  122. package/internal/shim-types.mjs +3 -0
  123. package/internal/shim-types.mjs.map +1 -0
  124. package/internal/shims.d.mts +20 -0
  125. package/internal/shims.d.mts.map +1 -0
  126. package/internal/shims.d.ts +20 -0
  127. package/internal/shims.d.ts.map +1 -0
  128. package/internal/shims.js +92 -0
  129. package/internal/shims.js.map +1 -0
  130. package/internal/shims.mjs +85 -0
  131. package/internal/shims.mjs.map +1 -0
  132. package/internal/to-file.d.mts +45 -0
  133. package/internal/to-file.d.mts.map +1 -0
  134. package/internal/to-file.d.ts +45 -0
  135. package/internal/to-file.d.ts.map +1 -0
  136. package/internal/to-file.js +91 -0
  137. package/internal/to-file.js.map +1 -0
  138. package/internal/to-file.mjs +88 -0
  139. package/internal/to-file.mjs.map +1 -0
  140. package/internal/tslib.js +81 -0
  141. package/internal/tslib.mjs +17 -0
  142. package/internal/types.d.mts +69 -0
  143. package/internal/types.d.mts.map +1 -0
  144. package/internal/types.d.ts +69 -0
  145. package/internal/types.d.ts.map +1 -0
  146. package/internal/types.js +4 -0
  147. package/internal/types.js.map +1 -0
  148. package/internal/types.mjs +3 -0
  149. package/internal/types.mjs.map +1 -0
  150. package/internal/uploads.d.mts +42 -0
  151. package/internal/uploads.d.mts.map +1 -0
  152. package/internal/uploads.d.ts +42 -0
  153. package/internal/uploads.d.ts.map +1 -0
  154. package/internal/uploads.js +141 -0
  155. package/internal/uploads.js.map +1 -0
  156. package/internal/uploads.mjs +131 -0
  157. package/internal/uploads.mjs.map +1 -0
  158. package/internal/utils/base64.d.mts +3 -0
  159. package/internal/utils/base64.d.mts.map +1 -0
  160. package/internal/utils/base64.d.ts +3 -0
  161. package/internal/utils/base64.d.ts.map +1 -0
  162. package/internal/utils/base64.js +38 -0
  163. package/internal/utils/base64.js.map +1 -0
  164. package/internal/utils/base64.mjs +33 -0
  165. package/internal/utils/base64.mjs.map +1 -0
  166. package/internal/utils/bytes.d.mts +4 -0
  167. package/internal/utils/bytes.d.mts.map +1 -0
  168. package/internal/utils/bytes.d.ts +4 -0
  169. package/internal/utils/bytes.d.ts.map +1 -0
  170. package/internal/utils/bytes.js +31 -0
  171. package/internal/utils/bytes.js.map +1 -0
  172. package/internal/utils/bytes.mjs +26 -0
  173. package/internal/utils/bytes.mjs.map +1 -0
  174. package/internal/utils/env.d.mts +9 -0
  175. package/internal/utils/env.d.mts.map +1 -0
  176. package/internal/utils/env.d.ts +9 -0
  177. package/internal/utils/env.d.ts.map +1 -0
  178. package/internal/utils/env.js +22 -0
  179. package/internal/utils/env.js.map +1 -0
  180. package/internal/utils/env.mjs +18 -0
  181. package/internal/utils/env.mjs.map +1 -0
  182. package/internal/utils/log.d.mts +37 -0
  183. package/internal/utils/log.d.mts.map +1 -0
  184. package/internal/utils/log.d.ts +37 -0
  185. package/internal/utils/log.d.ts.map +1 -0
  186. package/internal/utils/log.js +86 -0
  187. package/internal/utils/log.js.map +1 -0
  188. package/internal/utils/log.mjs +80 -0
  189. package/internal/utils/log.mjs.map +1 -0
  190. package/internal/utils/path.d.mts +15 -0
  191. package/internal/utils/path.d.mts.map +1 -0
  192. package/internal/utils/path.d.ts +15 -0
  193. package/internal/utils/path.d.ts.map +1 -0
  194. package/internal/utils/path.js +79 -0
  195. package/internal/utils/path.js.map +1 -0
  196. package/internal/utils/path.mjs +74 -0
  197. package/internal/utils/path.mjs.map +1 -0
  198. package/internal/utils/sleep.d.mts +2 -0
  199. package/internal/utils/sleep.d.mts.map +1 -0
  200. package/internal/utils/sleep.d.ts +2 -0
  201. package/internal/utils/sleep.d.ts.map +1 -0
  202. package/internal/utils/sleep.js +7 -0
  203. package/internal/utils/sleep.js.map +1 -0
  204. package/internal/utils/sleep.mjs +3 -0
  205. package/internal/utils/sleep.mjs.map +1 -0
  206. package/internal/utils/uuid.d.mts +5 -0
  207. package/internal/utils/uuid.d.mts.map +1 -0
  208. package/internal/utils/uuid.d.ts +5 -0
  209. package/internal/utils/uuid.d.ts.map +1 -0
  210. package/internal/utils/uuid.js +19 -0
  211. package/internal/utils/uuid.js.map +1 -0
  212. package/internal/utils/uuid.mjs +15 -0
  213. package/internal/utils/uuid.mjs.map +1 -0
  214. package/internal/utils/values.d.mts +18 -0
  215. package/internal/utils/values.d.mts.map +1 -0
  216. package/internal/utils/values.d.ts +18 -0
  217. package/internal/utils/values.d.ts.map +1 -0
  218. package/internal/utils/values.js +112 -0
  219. package/internal/utils/values.js.map +1 -0
  220. package/internal/utils/values.mjs +94 -0
  221. package/internal/utils/values.mjs.map +1 -0
  222. package/internal/utils.d.mts +7 -0
  223. package/internal/utils.d.mts.map +1 -0
  224. package/internal/utils.d.ts +7 -0
  225. package/internal/utils.d.ts.map +1 -0
  226. package/internal/utils.js +11 -0
  227. package/internal/utils.js.map +1 -0
  228. package/internal/utils.mjs +8 -0
  229. package/internal/utils.mjs.map +1 -0
  230. package/package.json +138 -0
  231. package/resource.d.mts +2 -0
  232. package/resource.d.mts.map +1 -0
  233. package/resource.d.ts +2 -0
  234. package/resource.d.ts.map +1 -0
  235. package/resource.js +6 -0
  236. package/resource.js.map +1 -0
  237. package/resource.mjs +2 -0
  238. package/resource.mjs.map +1 -0
  239. package/resources/index.d.mts +6 -0
  240. package/resources/index.d.mts.map +1 -0
  241. package/resources/index.d.ts +6 -0
  242. package/resources/index.d.ts.map +1 -0
  243. package/resources/index.js +15 -0
  244. package/resources/index.js.map +1 -0
  245. package/resources/index.mjs +7 -0
  246. package/resources/index.mjs.map +1 -0
  247. package/resources/logs/index.d.mts +3 -0
  248. package/resources/logs/index.d.mts.map +1 -0
  249. package/resources/logs/index.d.ts +3 -0
  250. package/resources/logs/index.d.ts.map +1 -0
  251. package/resources/logs/index.js +9 -0
  252. package/resources/logs/index.js.map +1 -0
  253. package/resources/logs/index.mjs +4 -0
  254. package/resources/logs/index.mjs.map +1 -0
  255. package/resources/logs/logs.d.mts +10 -0
  256. package/resources/logs/logs.d.mts.map +1 -0
  257. package/resources/logs/logs.d.ts +10 -0
  258. package/resources/logs/logs.d.ts.map +1 -0
  259. package/resources/logs/logs.js +17 -0
  260. package/resources/logs/logs.js.map +1 -0
  261. package/resources/logs/logs.mjs +12 -0
  262. package/resources/logs/logs.mjs.map +1 -0
  263. package/resources/logs/raw.d.mts +192 -0
  264. package/resources/logs/raw.d.mts.map +1 -0
  265. package/resources/logs/raw.d.ts +192 -0
  266. package/resources/logs/raw.d.ts.map +1 -0
  267. package/resources/logs/raw.js +21 -0
  268. package/resources/logs/raw.js.map +1 -0
  269. package/resources/logs/raw.mjs +17 -0
  270. package/resources/logs/raw.mjs.map +1 -0
  271. package/resources/logs.d.mts +2 -0
  272. package/resources/logs.d.mts.map +1 -0
  273. package/resources/logs.d.ts +2 -0
  274. package/resources/logs.d.ts.map +1 -0
  275. package/resources/logs.js +6 -0
  276. package/resources/logs.js.map +1 -0
  277. package/resources/logs.mjs +3 -0
  278. package/resources/logs.mjs.map +1 -0
  279. package/resources/organizations/categories.d.mts +48 -0
  280. package/resources/organizations/categories.d.mts.map +1 -0
  281. package/resources/organizations/categories.d.ts +48 -0
  282. package/resources/organizations/categories.d.ts.map +1 -0
  283. package/resources/organizations/categories.js +34 -0
  284. package/resources/organizations/categories.js.map +1 -0
  285. package/resources/organizations/categories.mjs +30 -0
  286. package/resources/organizations/categories.mjs.map +1 -0
  287. package/resources/organizations/index.d.mts +3 -0
  288. package/resources/organizations/index.d.mts.map +1 -0
  289. package/resources/organizations/index.d.ts +3 -0
  290. package/resources/organizations/index.d.ts.map +1 -0
  291. package/resources/organizations/index.js +9 -0
  292. package/resources/organizations/index.js.map +1 -0
  293. package/resources/organizations/index.mjs +4 -0
  294. package/resources/organizations/index.mjs.map +1 -0
  295. package/resources/organizations/organizations.d.mts +35 -0
  296. package/resources/organizations/organizations.d.mts.map +1 -0
  297. package/resources/organizations/organizations.d.ts +35 -0
  298. package/resources/organizations/organizations.d.ts.map +1 -0
  299. package/resources/organizations/organizations.js +35 -0
  300. package/resources/organizations/organizations.js.map +1 -0
  301. package/resources/organizations/organizations.mjs +30 -0
  302. package/resources/organizations/organizations.mjs.map +1 -0
  303. package/resources/organizations.d.mts +2 -0
  304. package/resources/organizations.d.mts.map +1 -0
  305. package/resources/organizations.d.ts +2 -0
  306. package/resources/organizations.d.ts.map +1 -0
  307. package/resources/organizations.js +6 -0
  308. package/resources/organizations.js.map +1 -0
  309. package/resources/organizations.mjs +3 -0
  310. package/resources/organizations.mjs.map +1 -0
  311. package/resources/prompts.d.mts +82 -0
  312. package/resources/prompts.d.mts.map +1 -0
  313. package/resources/prompts.d.ts +82 -0
  314. package/resources/prompts.d.ts.map +1 -0
  315. package/resources/prompts.js +15 -0
  316. package/resources/prompts.js.map +1 -0
  317. package/resources/prompts.mjs +11 -0
  318. package/resources/prompts.mjs.map +1 -0
  319. package/resources/reports.d.mts +256 -0
  320. package/resources/reports.d.mts.map +1 -0
  321. package/resources/reports.d.ts +256 -0
  322. package/resources/reports.d.ts.map +1 -0
  323. package/resources/reports.js +57 -0
  324. package/resources/reports.js.map +1 -0
  325. package/resources/reports.mjs +53 -0
  326. package/resources/reports.mjs.map +1 -0
  327. package/resources/shared.d.mts +14 -0
  328. package/resources/shared.d.mts.map +1 -0
  329. package/resources/shared.d.ts +14 -0
  330. package/resources/shared.d.ts.map +1 -0
  331. package/resources/shared.js +4 -0
  332. package/resources/shared.js.map +1 -0
  333. package/resources/shared.mjs +3 -0
  334. package/resources/shared.mjs.map +1 -0
  335. package/resources.d.mts +2 -0
  336. package/resources.d.mts.map +1 -0
  337. package/resources.d.ts +2 -0
  338. package/resources.d.ts.map +1 -0
  339. package/resources.js +5 -0
  340. package/resources.js.map +1 -0
  341. package/resources.mjs +2 -0
  342. package/resources.mjs.map +1 -0
  343. package/src/api-promise.ts +2 -0
  344. package/src/client.ts +775 -0
  345. package/src/core/README.md +3 -0
  346. package/src/core/api-promise.ts +92 -0
  347. package/src/core/error.ts +130 -0
  348. package/src/core/resource.ts +11 -0
  349. package/src/core/uploads.ts +2 -0
  350. package/src/error.ts +2 -0
  351. package/src/index.ts +22 -0
  352. package/src/internal/README.md +3 -0
  353. package/src/internal/builtin-types.ts +93 -0
  354. package/src/internal/detect-platform.ts +196 -0
  355. package/src/internal/errors.ts +33 -0
  356. package/src/internal/headers.ts +97 -0
  357. package/src/internal/parse.ts +50 -0
  358. package/src/internal/request-options.ts +91 -0
  359. package/src/internal/shim-types.ts +26 -0
  360. package/src/internal/shims.ts +107 -0
  361. package/src/internal/to-file.ts +154 -0
  362. package/src/internal/types.ts +95 -0
  363. package/src/internal/uploads.ts +187 -0
  364. package/src/internal/utils/base64.ts +40 -0
  365. package/src/internal/utils/bytes.ts +32 -0
  366. package/src/internal/utils/env.ts +18 -0
  367. package/src/internal/utils/log.ts +127 -0
  368. package/src/internal/utils/path.ts +88 -0
  369. package/src/internal/utils/sleep.ts +3 -0
  370. package/src/internal/utils/uuid.ts +17 -0
  371. package/src/internal/utils/values.ts +105 -0
  372. package/src/internal/utils.ts +8 -0
  373. package/src/lib/.keep +4 -0
  374. package/src/resource.ts +2 -0
  375. package/src/resources/index.ts +21 -0
  376. package/src/resources/logs/index.ts +10 -0
  377. package/src/resources/logs/logs.ts +21 -0
  378. package/src/resources/logs/raw.ts +301 -0
  379. package/src/resources/logs.ts +3 -0
  380. package/src/resources/organizations/categories.ts +83 -0
  381. package/src/resources/organizations/index.ts +16 -0
  382. package/src/resources/organizations/organizations.ts +74 -0
  383. package/src/resources/organizations.ts +3 -0
  384. package/src/resources/prompts.ts +136 -0
  385. package/src/resources/reports.ts +338 -0
  386. package/src/resources/shared.ts +16 -0
  387. package/src/resources.ts +1 -0
  388. package/src/tsconfig.json +11 -0
  389. package/src/uploads.ts +2 -0
  390. package/src/version.ts +1 -0
  391. package/uploads.d.mts +2 -0
  392. package/uploads.d.mts.map +1 -0
  393. package/uploads.d.ts +2 -0
  394. package/uploads.d.ts.map +1 -0
  395. package/uploads.js +6 -0
  396. package/uploads.js.map +1 -0
  397. package/uploads.mjs +2 -0
  398. package/uploads.mjs.map +1 -0
  399. package/version.d.mts +2 -0
  400. package/version.d.mts.map +1 -0
  401. package/version.d.ts +2 -0
  402. package/version.d.ts.map +1 -0
  403. package/version.js +5 -0
  404. package/version.js.map +1 -0
  405. package/version.mjs +2 -0
  406. package/version.mjs.map +1 -0
@@ -0,0 +1,256 @@
1
+ import { APIResource } from "../core/resource.mjs";
2
+ import * as Shared from "./shared.mjs";
3
+ import { APIPromise } from "../core/api-promise.mjs";
4
+ import { RequestOptions } from "../internal/request-options.mjs";
5
+ export declare class Reports extends APIResource {
6
+ /**
7
+ * Get citations for a given category.
8
+ *
9
+ * @example
10
+ * ```ts
11
+ * const response = await client.reports.citations({
12
+ * category_id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
13
+ * end_date: '2019-12-27T18:11:19.117Z',
14
+ * metrics: ['count'],
15
+ * start_date: '2019-12-27T18:11:19.117Z',
16
+ * });
17
+ * ```
18
+ */
19
+ citations(body: ReportCitationsParams, options?: RequestOptions): APIPromise<ReportCitationsResponse>;
20
+ /**
21
+ * Get citations for a given category.
22
+ *
23
+ * @example
24
+ * ```ts
25
+ * const reportResponse = await client.reports.sentiment({
26
+ * category_id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
27
+ * end_date: '2019-12-27T18:11:19.117Z',
28
+ * metrics: ['positive'],
29
+ * start_date: '2019-12-27T18:11:19.117Z',
30
+ * });
31
+ * ```
32
+ */
33
+ sentiment(body: ReportSentimentParams, options?: RequestOptions): APIPromise<ReportResponse>;
34
+ /**
35
+ * Query visibility report.
36
+ *
37
+ * @example
38
+ * ```ts
39
+ * const reportResponse = await client.reports.visibility({
40
+ * category_id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
41
+ * end_date: '2019-12-27T18:11:19.117Z',
42
+ * metrics: ['share_of_voice'],
43
+ * start_date: '2019-12-27T18:11:19.117Z',
44
+ * });
45
+ * ```
46
+ */
47
+ visibility(body: ReportVisibilityParams, options?: RequestOptions): APIPromise<ReportResponse>;
48
+ }
49
+ /**
50
+ * Base model for report information.
51
+ */
52
+ export interface ReportInfo {
53
+ total_rows: number;
54
+ query?: {
55
+ [key: string]: unknown;
56
+ } | null;
57
+ }
58
+ /**
59
+ * Base response model for reports.
60
+ */
61
+ export interface ReportResponse {
62
+ data: Array<ReportResult>;
63
+ /**
64
+ * Base model for report information.
65
+ */
66
+ info: ReportInfo;
67
+ }
68
+ /**
69
+ * Base model for report results.
70
+ */
71
+ export interface ReportResult {
72
+ dimensions: Array<string>;
73
+ metrics: Array<number>;
74
+ }
75
+ export interface ReportCitationsResponse {
76
+ data: Array<ReportResult>;
77
+ /**
78
+ * Base model for report information.
79
+ */
80
+ info: ReportInfo;
81
+ }
82
+ export interface ReportCitationsParams {
83
+ category_id: string;
84
+ /**
85
+ * End date for the report. Accepts formats: YYYY-MM-DD, YYYY-MM-DD HH:MM, or full
86
+ * ISO timestamp.
87
+ */
88
+ end_date: string;
89
+ metrics: Array<'count' | 'share_of_voice'>;
90
+ /**
91
+ * Start date for the report. Accepts formats: YYYY-MM-DD, YYYY-MM-DD HH:MM, or
92
+ * full ISO timestamp.
93
+ */
94
+ start_date: string;
95
+ /**
96
+ * Date interval for the report. (only used with date dimension)
97
+ */
98
+ date_interval?: 'day' | 'week' | 'month' | 'year';
99
+ /**
100
+ * Dimensions to group the report by.
101
+ */
102
+ dimensions?: Array<'hostname' | 'path' | 'date' | 'region' | 'topic' | 'model' | 'tag' | 'prompt'>;
103
+ /**
104
+ * List of filters to apply to the report. Each filter has an operator, field, and
105
+ * value.
106
+ */
107
+ filters?: Array<ReportCitationsParams.Filter>;
108
+ /**
109
+ * Custom ordering of the report results.
110
+ *
111
+ * The order is a record of key-value pairs where:
112
+ *
113
+ * - key is the field to order by, which can be a metric or dimension
114
+ * - value is the direction of the order, either 'asc' for ascending or 'desc' for
115
+ * descending.
116
+ *
117
+ * When not specified, the default order is the first metric in the query
118
+ * descending.
119
+ */
120
+ order_by?: {
121
+ [key: string]: 'asc' | 'desc';
122
+ };
123
+ /**
124
+ * Pagination settings for the report results.
125
+ */
126
+ pagination?: Shared.Pagination;
127
+ }
128
+ export declare namespace ReportCitationsParams {
129
+ interface Filter {
130
+ field: 'hostname' | 'path' | 'region' | 'topic' | 'model' | 'tag';
131
+ operator: 'is' | 'not_is' | 'in' | 'not_in' | 'contains' | 'not_contains' | 'contains_case_insensitive' | 'not_contains_case_insensitive' | 'matches';
132
+ /**
133
+ * Value for the filter. Can be a single value or a list of depending on the
134
+ * operator.
135
+ */
136
+ value: string | Array<string> | number | Array<number>;
137
+ }
138
+ }
139
+ export interface ReportSentimentParams {
140
+ category_id: string;
141
+ /**
142
+ * End date for the report. Accepts formats: YYYY-MM-DD, YYYY-MM-DD HH:MM, or full
143
+ * ISO timestamp.
144
+ */
145
+ end_date: string;
146
+ metrics: Array<'positive' | 'negative'>;
147
+ /**
148
+ * Start date for the report. Accepts formats: YYYY-MM-DD, YYYY-MM-DD HH:MM, or
149
+ * full ISO timestamp.
150
+ */
151
+ start_date: string;
152
+ /**
153
+ * Date interval for the report. (only used with date dimension)
154
+ */
155
+ date_interval?: 'day' | 'week' | 'month' | 'year';
156
+ /**
157
+ * Dimensions to group the report by.
158
+ */
159
+ dimensions?: Array<'theme' | 'date' | 'region' | 'topic' | 'model' | 'asset_name' | 'tag' | 'prompt'>;
160
+ /**
161
+ * List of filters to apply to the report. Each filter has an operator, field, and
162
+ * value.
163
+ */
164
+ filters?: Array<ReportSentimentParams.Filter>;
165
+ /**
166
+ * Custom ordering of the report results.
167
+ *
168
+ * The order is a record of key-value pairs where:
169
+ *
170
+ * - key is the field to order by, which can be a metric or dimension
171
+ * - value is the direction of the order, either 'asc' for ascending or 'desc' for
172
+ * descending.
173
+ *
174
+ * When not specified, the default order is the first metric in the query
175
+ * descending.
176
+ */
177
+ order_by?: {
178
+ [key: string]: 'asc' | 'desc';
179
+ };
180
+ /**
181
+ * Pagination settings for the report results.
182
+ */
183
+ pagination?: Shared.Pagination;
184
+ }
185
+ export declare namespace ReportSentimentParams {
186
+ interface Filter {
187
+ field: 'asset_name' | 'theme' | 'region' | 'topic' | 'model' | 'tag';
188
+ operator: 'is' | 'not_is' | 'in' | 'not_in' | 'contains' | 'not_contains' | 'contains_case_insensitive' | 'not_contains_case_insensitive' | 'matches';
189
+ /**
190
+ * Value for the filter. Can be a single value or a list of depending on the
191
+ * operator.
192
+ */
193
+ value: string | Array<string> | number | Array<number>;
194
+ }
195
+ }
196
+ export interface ReportVisibilityParams {
197
+ category_id: string;
198
+ /**
199
+ * End date for the report. Accepts formats: YYYY-MM-DD, YYYY-MM-DD HH:MM, or full
200
+ * ISO timestamp.
201
+ */
202
+ end_date: string;
203
+ metrics: Array<'share_of_voice' | 'mentions_count' | 'visibility_score'>;
204
+ /**
205
+ * Start date for the report. Accepts formats: YYYY-MM-DD, YYYY-MM-DD HH:MM, or
206
+ * full ISO timestamp.
207
+ */
208
+ start_date: string;
209
+ /**
210
+ * Date interval for the report. (only used with date dimension)
211
+ */
212
+ date_interval?: 'day' | 'week' | 'month' | 'year';
213
+ /**
214
+ * Dimensions to group the report by.
215
+ */
216
+ dimensions?: Array<'date' | 'region' | 'topic' | 'model' | 'asset_name' | 'prompt' | 'tag'>;
217
+ /**
218
+ * List of filters to apply to the report. Each filter has an operator, field, and
219
+ * value.
220
+ */
221
+ filters?: Array<ReportVisibilityParams.Filter>;
222
+ /**
223
+ * Custom ordering of the report results.
224
+ *
225
+ * The order is a record of key-value pairs where:
226
+ *
227
+ * - key is the field to order by, which can be a metric or dimension
228
+ * - value is the direction of the order, either 'asc' for ascending or 'desc' for
229
+ * descending.
230
+ *
231
+ * When not specified, the default order is the first metric in the query
232
+ * descending.
233
+ */
234
+ order_by?: {
235
+ [key: string]: 'asc' | 'desc';
236
+ };
237
+ /**
238
+ * Pagination settings for the report results.
239
+ */
240
+ pagination?: Shared.Pagination;
241
+ }
242
+ export declare namespace ReportVisibilityParams {
243
+ interface Filter {
244
+ field: 'region' | 'topic' | 'model' | 'asset_name' | 'prompt' | 'tag';
245
+ operator: 'is' | 'not_is' | 'in' | 'not_in' | 'contains' | 'not_contains' | 'contains_case_insensitive' | 'not_contains_case_insensitive' | 'matches';
246
+ /**
247
+ * Value for the filter. Can be a single value or a list of depending on the
248
+ * operator.
249
+ */
250
+ value: string | Array<string> | number | Array<number>;
251
+ }
252
+ }
253
+ export declare namespace Reports {
254
+ export { type ReportInfo as ReportInfo, type ReportResponse as ReportResponse, type ReportResult as ReportResult, type ReportCitationsResponse as ReportCitationsResponse, type ReportCitationsParams as ReportCitationsParams, type ReportSentimentParams as ReportSentimentParams, type ReportVisibilityParams as ReportVisibilityParams, };
255
+ }
256
+ //# sourceMappingURL=reports.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"reports.d.mts","sourceRoot":"","sources":["../src/resources/reports.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,MAAM;OACX,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAEzB,qBAAa,OAAQ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AAsB,CAAC,MAAM,CAAC,CAAC;IAE/C;;;;;;;;;;;OAWG;IACH,QAAQ,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,KAAK,GAAG,MAAM,CAAA;KAAE,CAAC;IAE7C;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC,UAAU,CAAC;CAChC;AAED,yBAAiB,sBAAsB,CAAC;IACtC,UAAiB,MAAM;QACrB,KAAK,EAAE,QAAQ,GAAG,OAAO,GAAG,OAAO,GAAG,YAAY,GAAG,QAAQ,GAAG,KAAK,CAAC;QAEtE,QAAQ,EACJ,IAAI,GACJ,QAAQ,GACR,IAAI,GACJ,QAAQ,GACR,UAAU,GACV,cAAc,GACd,2BAA2B,GAC3B,+BAA+B,GAC/B,SAAS,CAAC;QAEd;;;WAGG;QACH,KAAK,EAAE,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,GAAG,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC;KACxD;CACF;AAED,MAAM,CAAC,OAAO,WAAW,OAAO,CAAC;IAC/B,OAAO,EACL,KAAK,UAAU,IAAI,UAAU,EAC7B,KAAK,cAAc,IAAI,cAAc,EACrC,KAAK,YAAY,IAAI,YAAY,EACjC,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,sBAAsB,IAAI,sBAAsB,GACtD,CAAC;CACH"}
@@ -0,0 +1,256 @@
1
+ import { APIResource } from "../core/resource.js";
2
+ import * as Shared from "./shared.js";
3
+ import { APIPromise } from "../core/api-promise.js";
4
+ import { RequestOptions } from "../internal/request-options.js";
5
+ export declare class Reports extends APIResource {
6
+ /**
7
+ * Get citations for a given category.
8
+ *
9
+ * @example
10
+ * ```ts
11
+ * const response = await client.reports.citations({
12
+ * category_id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
13
+ * end_date: '2019-12-27T18:11:19.117Z',
14
+ * metrics: ['count'],
15
+ * start_date: '2019-12-27T18:11:19.117Z',
16
+ * });
17
+ * ```
18
+ */
19
+ citations(body: ReportCitationsParams, options?: RequestOptions): APIPromise<ReportCitationsResponse>;
20
+ /**
21
+ * Get citations for a given category.
22
+ *
23
+ * @example
24
+ * ```ts
25
+ * const reportResponse = await client.reports.sentiment({
26
+ * category_id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
27
+ * end_date: '2019-12-27T18:11:19.117Z',
28
+ * metrics: ['positive'],
29
+ * start_date: '2019-12-27T18:11:19.117Z',
30
+ * });
31
+ * ```
32
+ */
33
+ sentiment(body: ReportSentimentParams, options?: RequestOptions): APIPromise<ReportResponse>;
34
+ /**
35
+ * Query visibility report.
36
+ *
37
+ * @example
38
+ * ```ts
39
+ * const reportResponse = await client.reports.visibility({
40
+ * category_id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
41
+ * end_date: '2019-12-27T18:11:19.117Z',
42
+ * metrics: ['share_of_voice'],
43
+ * start_date: '2019-12-27T18:11:19.117Z',
44
+ * });
45
+ * ```
46
+ */
47
+ visibility(body: ReportVisibilityParams, options?: RequestOptions): APIPromise<ReportResponse>;
48
+ }
49
+ /**
50
+ * Base model for report information.
51
+ */
52
+ export interface ReportInfo {
53
+ total_rows: number;
54
+ query?: {
55
+ [key: string]: unknown;
56
+ } | null;
57
+ }
58
+ /**
59
+ * Base response model for reports.
60
+ */
61
+ export interface ReportResponse {
62
+ data: Array<ReportResult>;
63
+ /**
64
+ * Base model for report information.
65
+ */
66
+ info: ReportInfo;
67
+ }
68
+ /**
69
+ * Base model for report results.
70
+ */
71
+ export interface ReportResult {
72
+ dimensions: Array<string>;
73
+ metrics: Array<number>;
74
+ }
75
+ export interface ReportCitationsResponse {
76
+ data: Array<ReportResult>;
77
+ /**
78
+ * Base model for report information.
79
+ */
80
+ info: ReportInfo;
81
+ }
82
+ export interface ReportCitationsParams {
83
+ category_id: string;
84
+ /**
85
+ * End date for the report. Accepts formats: YYYY-MM-DD, YYYY-MM-DD HH:MM, or full
86
+ * ISO timestamp.
87
+ */
88
+ end_date: string;
89
+ metrics: Array<'count' | 'share_of_voice'>;
90
+ /**
91
+ * Start date for the report. Accepts formats: YYYY-MM-DD, YYYY-MM-DD HH:MM, or
92
+ * full ISO timestamp.
93
+ */
94
+ start_date: string;
95
+ /**
96
+ * Date interval for the report. (only used with date dimension)
97
+ */
98
+ date_interval?: 'day' | 'week' | 'month' | 'year';
99
+ /**
100
+ * Dimensions to group the report by.
101
+ */
102
+ dimensions?: Array<'hostname' | 'path' | 'date' | 'region' | 'topic' | 'model' | 'tag' | 'prompt'>;
103
+ /**
104
+ * List of filters to apply to the report. Each filter has an operator, field, and
105
+ * value.
106
+ */
107
+ filters?: Array<ReportCitationsParams.Filter>;
108
+ /**
109
+ * Custom ordering of the report results.
110
+ *
111
+ * The order is a record of key-value pairs where:
112
+ *
113
+ * - key is the field to order by, which can be a metric or dimension
114
+ * - value is the direction of the order, either 'asc' for ascending or 'desc' for
115
+ * descending.
116
+ *
117
+ * When not specified, the default order is the first metric in the query
118
+ * descending.
119
+ */
120
+ order_by?: {
121
+ [key: string]: 'asc' | 'desc';
122
+ };
123
+ /**
124
+ * Pagination settings for the report results.
125
+ */
126
+ pagination?: Shared.Pagination;
127
+ }
128
+ export declare namespace ReportCitationsParams {
129
+ interface Filter {
130
+ field: 'hostname' | 'path' | 'region' | 'topic' | 'model' | 'tag';
131
+ operator: 'is' | 'not_is' | 'in' | 'not_in' | 'contains' | 'not_contains' | 'contains_case_insensitive' | 'not_contains_case_insensitive' | 'matches';
132
+ /**
133
+ * Value for the filter. Can be a single value or a list of depending on the
134
+ * operator.
135
+ */
136
+ value: string | Array<string> | number | Array<number>;
137
+ }
138
+ }
139
+ export interface ReportSentimentParams {
140
+ category_id: string;
141
+ /**
142
+ * End date for the report. Accepts formats: YYYY-MM-DD, YYYY-MM-DD HH:MM, or full
143
+ * ISO timestamp.
144
+ */
145
+ end_date: string;
146
+ metrics: Array<'positive' | 'negative'>;
147
+ /**
148
+ * Start date for the report. Accepts formats: YYYY-MM-DD, YYYY-MM-DD HH:MM, or
149
+ * full ISO timestamp.
150
+ */
151
+ start_date: string;
152
+ /**
153
+ * Date interval for the report. (only used with date dimension)
154
+ */
155
+ date_interval?: 'day' | 'week' | 'month' | 'year';
156
+ /**
157
+ * Dimensions to group the report by.
158
+ */
159
+ dimensions?: Array<'theme' | 'date' | 'region' | 'topic' | 'model' | 'asset_name' | 'tag' | 'prompt'>;
160
+ /**
161
+ * List of filters to apply to the report. Each filter has an operator, field, and
162
+ * value.
163
+ */
164
+ filters?: Array<ReportSentimentParams.Filter>;
165
+ /**
166
+ * Custom ordering of the report results.
167
+ *
168
+ * The order is a record of key-value pairs where:
169
+ *
170
+ * - key is the field to order by, which can be a metric or dimension
171
+ * - value is the direction of the order, either 'asc' for ascending or 'desc' for
172
+ * descending.
173
+ *
174
+ * When not specified, the default order is the first metric in the query
175
+ * descending.
176
+ */
177
+ order_by?: {
178
+ [key: string]: 'asc' | 'desc';
179
+ };
180
+ /**
181
+ * Pagination settings for the report results.
182
+ */
183
+ pagination?: Shared.Pagination;
184
+ }
185
+ export declare namespace ReportSentimentParams {
186
+ interface Filter {
187
+ field: 'asset_name' | 'theme' | 'region' | 'topic' | 'model' | 'tag';
188
+ operator: 'is' | 'not_is' | 'in' | 'not_in' | 'contains' | 'not_contains' | 'contains_case_insensitive' | 'not_contains_case_insensitive' | 'matches';
189
+ /**
190
+ * Value for the filter. Can be a single value or a list of depending on the
191
+ * operator.
192
+ */
193
+ value: string | Array<string> | number | Array<number>;
194
+ }
195
+ }
196
+ export interface ReportVisibilityParams {
197
+ category_id: string;
198
+ /**
199
+ * End date for the report. Accepts formats: YYYY-MM-DD, YYYY-MM-DD HH:MM, or full
200
+ * ISO timestamp.
201
+ */
202
+ end_date: string;
203
+ metrics: Array<'share_of_voice' | 'mentions_count' | 'visibility_score'>;
204
+ /**
205
+ * Start date for the report. Accepts formats: YYYY-MM-DD, YYYY-MM-DD HH:MM, or
206
+ * full ISO timestamp.
207
+ */
208
+ start_date: string;
209
+ /**
210
+ * Date interval for the report. (only used with date dimension)
211
+ */
212
+ date_interval?: 'day' | 'week' | 'month' | 'year';
213
+ /**
214
+ * Dimensions to group the report by.
215
+ */
216
+ dimensions?: Array<'date' | 'region' | 'topic' | 'model' | 'asset_name' | 'prompt' | 'tag'>;
217
+ /**
218
+ * List of filters to apply to the report. Each filter has an operator, field, and
219
+ * value.
220
+ */
221
+ filters?: Array<ReportVisibilityParams.Filter>;
222
+ /**
223
+ * Custom ordering of the report results.
224
+ *
225
+ * The order is a record of key-value pairs where:
226
+ *
227
+ * - key is the field to order by, which can be a metric or dimension
228
+ * - value is the direction of the order, either 'asc' for ascending or 'desc' for
229
+ * descending.
230
+ *
231
+ * When not specified, the default order is the first metric in the query
232
+ * descending.
233
+ */
234
+ order_by?: {
235
+ [key: string]: 'asc' | 'desc';
236
+ };
237
+ /**
238
+ * Pagination settings for the report results.
239
+ */
240
+ pagination?: Shared.Pagination;
241
+ }
242
+ export declare namespace ReportVisibilityParams {
243
+ interface Filter {
244
+ field: 'region' | 'topic' | 'model' | 'asset_name' | 'prompt' | 'tag';
245
+ operator: 'is' | 'not_is' | 'in' | 'not_in' | 'contains' | 'not_contains' | 'contains_case_insensitive' | 'not_contains_case_insensitive' | 'matches';
246
+ /**
247
+ * Value for the filter. Can be a single value or a list of depending on the
248
+ * operator.
249
+ */
250
+ value: string | Array<string> | number | Array<number>;
251
+ }
252
+ }
253
+ export declare namespace Reports {
254
+ export { type ReportInfo as ReportInfo, type ReportResponse as ReportResponse, type ReportResult as ReportResult, type ReportCitationsResponse as ReportCitationsResponse, type ReportCitationsParams as ReportCitationsParams, type ReportSentimentParams as ReportSentimentParams, type ReportVisibilityParams as ReportVisibilityParams, };
255
+ }
256
+ //# sourceMappingURL=reports.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"reports.d.ts","sourceRo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AAM,GAAG,QAAQ,GAAG,OAAO,GAAG,OAAO,GAAG,YAAY,GAAG,QAAQ,GAAG,KAAK,CAAC,CAAC;IAE5F;;;OAGG;IACH,OAAO,CAAC,EAAE,KAAK,CAAC,sBAAsB,CAAC,MAAM,CAAC,CAAC;IAE/C;;;;;;;;;;;OAWG;IACH,QAAQ,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,KAAK,GAAG,MAAM,CAAA;KAAE,CAAC;IAE7C;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC,UAAU,CAAC;CAChC;AAED,yBAAiB,sBAAsB,CAAC;IACtC,UAAiB,MAAM;QACrB,KAAK,EAAE,QAAQ,GAAG,OAAO,GAAG,OAAO,GAAG,YAAY,GAAG,QAAQ,GAAG,KAAK,CAAC;QAEtE,QAAQ,EACJ,IAAI,GACJ,QAAQ,GACR,IAAI,GACJ,QAAQ,GACR,UAAU,GACV,cAAc,GACd,2BAA2B,GAC3B,+BAA+B,GAC/B,SAAS,CAAC;QAEd;;;WAGG;QACH,KAAK,EAAE,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,GAAG,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC;KACxD;CACF;AAED,MAAM,CAAC,OAAO,WAAW,OAAO,CAAC;IAC/B,OAAO,EACL,KAAK,UAAU,IAAI,UAAU,EAC7B,KAAK,cAAc,IAAI,cAAc,EACrC,KAAK,YAAY,IAAI,YAAY,EACjC,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,sBAAsB,IAAI,sBAAsB,GACtD,CAAC;CACH"}
@@ -0,0 +1,57 @@
1
+ "use strict";
2
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.Reports = void 0;
5
+ const resource_1 = require("../core/resource.js");
6
+ class Reports extends resource_1.APIResource {
7
+ /**
8
+ * Get citations for a given category.
9
+ *
10
+ * @example
11
+ * ```ts
12
+ * const response = await client.reports.citations({
13
+ * category_id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
14
+ * end_date: '2019-12-27T18:11:19.117Z',
15
+ * metrics: ['count'],
16
+ * start_date: '2019-12-27T18:11:19.117Z',
17
+ * });
18
+ * ```
19
+ */
20
+ citations(body, options) {
21
+ return this._client.post('/v1/reports/citations', { body, ...options });
22
+ }
23
+ /**
24
+ * Get citations for a given category.
25
+ *
26
+ * @example
27
+ * ```ts
28
+ * const reportResponse = await client.reports.sentiment({
29
+ * category_id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
30
+ * end_date: '2019-12-27T18:11:19.117Z',
31
+ * metrics: ['positive'],
32
+ * start_date: '2019-12-27T18:11:19.117Z',
33
+ * });
34
+ * ```
35
+ */
36
+ sentiment(body, options) {
37
+ return this._client.post('/v1/reports/sentiment', { body, ...options });
38
+ }
39
+ /**
40
+ * Query visibility report.
41
+ *
42
+ * @example
43
+ * ```ts
44
+ * const reportResponse = await client.reports.visibility({
45
+ * category_id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
46
+ * end_date: '2019-12-27T18:11:19.117Z',
47
+ * metrics: ['share_of_voice'],
48
+ * start_date: '2019-12-27T18:11:19.117Z',
49
+ * });
50
+ * ```
51
+ */
52
+ visibility(body, options) {
53
+ return this._client.post('/v1/reports/visibility', { body, ...options });
54
+ }
55
+ }
56
+ exports.Reports = Reports;
57
+ //# sourceMappingURL=reports.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"reports.js","sourceRoot":"","sources":["../src/resources/reports.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAK/C,MAAa,OAAQ,SAAQ,sBAAW;IACtC;;;;;;;;;;;;OAYG;IACH,SAAS,CAAC,IAA2B,EAAE,OAAwB;QAC7D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,uBAAuB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC1E,CAAC;IAED;;;;;;;;;;;;OAYG;IACH,SAAS,CAAC,IAA2B,EAAE,OAAwB;QAC7D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,uBAAuB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC1E,CAAC;IAED;;;;;;;;;;;;OAYG;IACH,UAAU,CAAC,IAA4B,EAAE,OAAwB;QAC/D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,wBAAwB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC3E,CAAC;CACF;AAnDD,0BAmDC"}
@@ -0,0 +1,53 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+ import { APIResource } from "../core/resource.mjs";
3
+ export class Reports extends APIResource {
4
+ /**
5
+ * Get citations for a given category.
6
+ *
7
+ * @example
8
+ * ```ts
9
+ * const response = await client.reports.citations({
10
+ * category_id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
11
+ * end_date: '2019-12-27T18:11:19.117Z',
12
+ * metrics: ['count'],
13
+ * start_date: '2019-12-27T18:11:19.117Z',
14
+ * });
15
+ * ```
16
+ */
17
+ citations(body, options) {
18
+ return this._client.post('/v1/reports/citations', { body, ...options });
19
+ }
20
+ /**
21
+ * Get citations for a given category.
22
+ *
23
+ * @example
24
+ * ```ts
25
+ * const reportResponse = await client.reports.sentiment({
26
+ * category_id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
27
+ * end_date: '2019-12-27T18:11:19.117Z',
28
+ * metrics: ['positive'],
29
+ * start_date: '2019-12-27T18:11:19.117Z',
30
+ * });
31
+ * ```
32
+ */
33
+ sentiment(body, options) {
34
+ return this._client.post('/v1/reports/sentiment', { body, ...options });
35
+ }
36
+ /**
37
+ * Query visibility report.
38
+ *
39
+ * @example
40
+ * ```ts
41
+ * const reportResponse = await client.reports.visibility({
42
+ * category_id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
43
+ * end_date: '2019-12-27T18:11:19.117Z',
44
+ * metrics: ['share_of_voice'],
45
+ * start_date: '2019-12-27T18:11:19.117Z',
46
+ * });
47
+ * ```
48
+ */
49
+ visibility(body, options) {
50
+ return this._client.post('/v1/reports/visibility', { body, ...options });
51
+ }
52
+ }
53
+ //# sourceMappingURL=reports.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"reports.mjs","sourceRoot":"","sources":["../src/resources/reports.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;AAKtB,MAAM,OAAO,OAAQ,SAAQ,WAAW;IACtC;;;;;;;;;;;;OAYG;IACH,SAAS,CAAC,IAA2B,EAAE,OAAwB;QAC7D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,uBAAuB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC1E,CAAC;IAED;;;;;;;;;;;;OAYG;IACH,SAAS,CAAC,IAA2B,EAAE,OAAwB;QAC7D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,uBAAuB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC1E,CAAC;IAED;;;;;;;;;;;;OAYG;IACH,UAAU,CAAC,IAA4B,EAAE,OAAwB;QAC/D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,wBAAwB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC3E,CAAC;CACF"}
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Report pagination model.
3
+ */
4
+ export interface Pagination {
5
+ /**
6
+ * Maximum number of results to return. Default is 10,000, maximum is 50,000.
7
+ */
8
+ limit?: number;
9
+ /**
10
+ * Offset for the results. Used for pagination.
11
+ */
12
+ offset?: number;
13
+ }
14
+ //# sourceMappingURL=shared.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shared.d.mts","sourceRoot":"","sources":["../src/resources/shared.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB"}