@stainlessdev/xray 0.5.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 (390) hide show
  1. package/CHANGELOG.md +109 -0
  2. package/LICENSE +201 -0
  3. package/README.md +401 -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 +181 -0
  13. package/client.d.mts.map +1 -0
  14. package/client.d.ts +181 -0
  15. package/client.d.ts.map +1 -0
  16. package/client.js +477 -0
  17. package/client.js.map +1 -0
  18. package/client.mjs +473 -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/pagination.d.mts +57 -0
  37. package/core/pagination.d.mts.map +1 -0
  38. package/core/pagination.d.ts +57 -0
  39. package/core/pagination.d.ts.map +1 -0
  40. package/core/pagination.js +108 -0
  41. package/core/pagination.js.map +1 -0
  42. package/core/pagination.mjs +102 -0
  43. package/core/pagination.mjs.map +1 -0
  44. package/core/resource.d.mts +6 -0
  45. package/core/resource.d.mts.map +1 -0
  46. package/core/resource.d.ts +6 -0
  47. package/core/resource.d.ts.map +1 -0
  48. package/core/resource.js +11 -0
  49. package/core/resource.js.map +1 -0
  50. package/core/resource.mjs +7 -0
  51. package/core/resource.mjs.map +1 -0
  52. package/core/uploads.d.mts +3 -0
  53. package/core/uploads.d.mts.map +1 -0
  54. package/core/uploads.d.ts +3 -0
  55. package/core/uploads.d.ts.map +1 -0
  56. package/core/uploads.js +6 -0
  57. package/core/uploads.js.map +1 -0
  58. package/core/uploads.mjs +2 -0
  59. package/core/uploads.mjs.map +1 -0
  60. package/error.d.mts +2 -0
  61. package/error.d.mts.map +1 -0
  62. package/error.d.ts +2 -0
  63. package/error.d.ts.map +1 -0
  64. package/error.js +6 -0
  65. package/error.js.map +1 -0
  66. package/error.mjs +2 -0
  67. package/error.mjs.map +1 -0
  68. package/index.d.mts +7 -0
  69. package/index.d.mts.map +1 -0
  70. package/index.d.ts +7 -0
  71. package/index.d.ts.map +1 -0
  72. package/index.js +32 -0
  73. package/index.js.map +1 -0
  74. package/index.mjs +8 -0
  75. package/index.mjs.map +1 -0
  76. package/internal/builtin-types.d.mts +73 -0
  77. package/internal/builtin-types.d.mts.map +1 -0
  78. package/internal/builtin-types.d.ts +73 -0
  79. package/internal/builtin-types.d.ts.map +1 -0
  80. package/internal/builtin-types.js +4 -0
  81. package/internal/builtin-types.js.map +1 -0
  82. package/internal/builtin-types.mjs +3 -0
  83. package/internal/builtin-types.mjs.map +1 -0
  84. package/internal/detect-platform.d.mts +15 -0
  85. package/internal/detect-platform.d.mts.map +1 -0
  86. package/internal/detect-platform.d.ts +15 -0
  87. package/internal/detect-platform.d.ts.map +1 -0
  88. package/internal/detect-platform.js +162 -0
  89. package/internal/detect-platform.js.map +1 -0
  90. package/internal/detect-platform.mjs +157 -0
  91. package/internal/detect-platform.mjs.map +1 -0
  92. package/internal/errors.d.mts +3 -0
  93. package/internal/errors.d.mts.map +1 -0
  94. package/internal/errors.d.ts +3 -0
  95. package/internal/errors.d.ts.map +1 -0
  96. package/internal/errors.js +41 -0
  97. package/internal/errors.js.map +1 -0
  98. package/internal/errors.mjs +36 -0
  99. package/internal/errors.mjs.map +1 -0
  100. package/internal/headers.d.mts +20 -0
  101. package/internal/headers.d.mts.map +1 -0
  102. package/internal/headers.d.ts +20 -0
  103. package/internal/headers.d.ts.map +1 -0
  104. package/internal/headers.js +79 -0
  105. package/internal/headers.js.map +1 -0
  106. package/internal/headers.mjs +74 -0
  107. package/internal/headers.mjs.map +1 -0
  108. package/internal/parse.d.mts +12 -0
  109. package/internal/parse.d.mts.map +1 -0
  110. package/internal/parse.d.ts +12 -0
  111. package/internal/parse.d.ts.map +1 -0
  112. package/internal/parse.js +40 -0
  113. package/internal/parse.js.map +1 -0
  114. package/internal/parse.mjs +37 -0
  115. package/internal/parse.mjs.map +1 -0
  116. package/internal/qs/formats.d.mts +7 -0
  117. package/internal/qs/formats.d.mts.map +1 -0
  118. package/internal/qs/formats.d.ts +7 -0
  119. package/internal/qs/formats.d.ts.map +1 -0
  120. package/internal/qs/formats.js +13 -0
  121. package/internal/qs/formats.js.map +1 -0
  122. package/internal/qs/formats.mjs +9 -0
  123. package/internal/qs/formats.mjs.map +1 -0
  124. package/internal/qs/index.d.mts +10 -0
  125. package/internal/qs/index.d.mts.map +1 -0
  126. package/internal/qs/index.d.ts +10 -0
  127. package/internal/qs/index.d.ts.map +1 -0
  128. package/internal/qs/index.js +14 -0
  129. package/internal/qs/index.js.map +1 -0
  130. package/internal/qs/index.mjs +10 -0
  131. package/internal/qs/index.mjs.map +1 -0
  132. package/internal/qs/stringify.d.mts +3 -0
  133. package/internal/qs/stringify.d.mts.map +1 -0
  134. package/internal/qs/stringify.d.ts +3 -0
  135. package/internal/qs/stringify.d.ts.map +1 -0
  136. package/internal/qs/stringify.js +277 -0
  137. package/internal/qs/stringify.js.map +1 -0
  138. package/internal/qs/stringify.mjs +274 -0
  139. package/internal/qs/stringify.mjs.map +1 -0
  140. package/internal/qs/types.d.mts +57 -0
  141. package/internal/qs/types.d.mts.map +1 -0
  142. package/internal/qs/types.d.ts +57 -0
  143. package/internal/qs/types.d.ts.map +1 -0
  144. package/internal/qs/types.js +3 -0
  145. package/internal/qs/types.js.map +1 -0
  146. package/internal/qs/types.mjs +2 -0
  147. package/internal/qs/types.mjs.map +1 -0
  148. package/internal/qs/utils.d.mts +15 -0
  149. package/internal/qs/utils.d.mts.map +1 -0
  150. package/internal/qs/utils.d.ts +15 -0
  151. package/internal/qs/utils.d.ts.map +1 -0
  152. package/internal/qs/utils.js +230 -0
  153. package/internal/qs/utils.js.map +1 -0
  154. package/internal/qs/utils.mjs +217 -0
  155. package/internal/qs/utils.mjs.map +1 -0
  156. package/internal/request-options.d.mts +75 -0
  157. package/internal/request-options.d.mts.map +1 -0
  158. package/internal/request-options.d.ts +75 -0
  159. package/internal/request-options.d.ts.map +1 -0
  160. package/internal/request-options.js +14 -0
  161. package/internal/request-options.js.map +1 -0
  162. package/internal/request-options.mjs +10 -0
  163. package/internal/request-options.mjs.map +1 -0
  164. package/internal/shim-types.d.mts +17 -0
  165. package/internal/shim-types.d.mts.map +1 -0
  166. package/internal/shim-types.d.ts +17 -0
  167. package/internal/shim-types.d.ts.map +1 -0
  168. package/internal/shim-types.js +4 -0
  169. package/internal/shim-types.js.map +1 -0
  170. package/internal/shim-types.mjs +3 -0
  171. package/internal/shim-types.mjs.map +1 -0
  172. package/internal/shims.d.mts +20 -0
  173. package/internal/shims.d.mts.map +1 -0
  174. package/internal/shims.d.ts +20 -0
  175. package/internal/shims.d.ts.map +1 -0
  176. package/internal/shims.js +92 -0
  177. package/internal/shims.js.map +1 -0
  178. package/internal/shims.mjs +85 -0
  179. package/internal/shims.mjs.map +1 -0
  180. package/internal/to-file.d.mts +45 -0
  181. package/internal/to-file.d.mts.map +1 -0
  182. package/internal/to-file.d.ts +45 -0
  183. package/internal/to-file.d.ts.map +1 -0
  184. package/internal/to-file.js +91 -0
  185. package/internal/to-file.js.map +1 -0
  186. package/internal/to-file.mjs +88 -0
  187. package/internal/to-file.mjs.map +1 -0
  188. package/internal/tslib.js +81 -0
  189. package/internal/tslib.mjs +17 -0
  190. package/internal/types.d.mts +69 -0
  191. package/internal/types.d.mts.map +1 -0
  192. package/internal/types.d.ts +69 -0
  193. package/internal/types.d.ts.map +1 -0
  194. package/internal/types.js +4 -0
  195. package/internal/types.js.map +1 -0
  196. package/internal/types.mjs +3 -0
  197. package/internal/types.mjs.map +1 -0
  198. package/internal/uploads.d.mts +42 -0
  199. package/internal/uploads.d.mts.map +1 -0
  200. package/internal/uploads.d.ts +42 -0
  201. package/internal/uploads.d.ts.map +1 -0
  202. package/internal/uploads.js +141 -0
  203. package/internal/uploads.js.map +1 -0
  204. package/internal/uploads.mjs +131 -0
  205. package/internal/uploads.mjs.map +1 -0
  206. package/internal/utils/base64.d.mts +3 -0
  207. package/internal/utils/base64.d.mts.map +1 -0
  208. package/internal/utils/base64.d.ts +3 -0
  209. package/internal/utils/base64.d.ts.map +1 -0
  210. package/internal/utils/base64.js +38 -0
  211. package/internal/utils/base64.js.map +1 -0
  212. package/internal/utils/base64.mjs +33 -0
  213. package/internal/utils/base64.mjs.map +1 -0
  214. package/internal/utils/bytes.d.mts +4 -0
  215. package/internal/utils/bytes.d.mts.map +1 -0
  216. package/internal/utils/bytes.d.ts +4 -0
  217. package/internal/utils/bytes.d.ts.map +1 -0
  218. package/internal/utils/bytes.js +31 -0
  219. package/internal/utils/bytes.js.map +1 -0
  220. package/internal/utils/bytes.mjs +26 -0
  221. package/internal/utils/bytes.mjs.map +1 -0
  222. package/internal/utils/env.d.mts +9 -0
  223. package/internal/utils/env.d.mts.map +1 -0
  224. package/internal/utils/env.d.ts +9 -0
  225. package/internal/utils/env.d.ts.map +1 -0
  226. package/internal/utils/env.js +22 -0
  227. package/internal/utils/env.js.map +1 -0
  228. package/internal/utils/env.mjs +18 -0
  229. package/internal/utils/env.mjs.map +1 -0
  230. package/internal/utils/log.d.mts +37 -0
  231. package/internal/utils/log.d.mts.map +1 -0
  232. package/internal/utils/log.d.ts +37 -0
  233. package/internal/utils/log.d.ts.map +1 -0
  234. package/internal/utils/log.js +85 -0
  235. package/internal/utils/log.js.map +1 -0
  236. package/internal/utils/log.mjs +79 -0
  237. package/internal/utils/log.mjs.map +1 -0
  238. package/internal/utils/path.d.mts +15 -0
  239. package/internal/utils/path.d.mts.map +1 -0
  240. package/internal/utils/path.d.ts +15 -0
  241. package/internal/utils/path.d.ts.map +1 -0
  242. package/internal/utils/path.js +79 -0
  243. package/internal/utils/path.js.map +1 -0
  244. package/internal/utils/path.mjs +74 -0
  245. package/internal/utils/path.mjs.map +1 -0
  246. package/internal/utils/query.d.mts +2 -0
  247. package/internal/utils/query.d.mts.map +1 -0
  248. package/internal/utils/query.d.ts +2 -0
  249. package/internal/utils/query.d.ts.map +1 -0
  250. package/internal/utils/query.js +10 -0
  251. package/internal/utils/query.js.map +1 -0
  252. package/internal/utils/query.mjs +6 -0
  253. package/internal/utils/query.mjs.map +1 -0
  254. package/internal/utils/sleep.d.mts +2 -0
  255. package/internal/utils/sleep.d.mts.map +1 -0
  256. package/internal/utils/sleep.d.ts +2 -0
  257. package/internal/utils/sleep.d.ts.map +1 -0
  258. package/internal/utils/sleep.js +7 -0
  259. package/internal/utils/sleep.js.map +1 -0
  260. package/internal/utils/sleep.mjs +3 -0
  261. package/internal/utils/sleep.mjs.map +1 -0
  262. package/internal/utils/uuid.d.mts +5 -0
  263. package/internal/utils/uuid.d.mts.map +1 -0
  264. package/internal/utils/uuid.d.ts +5 -0
  265. package/internal/utils/uuid.d.ts.map +1 -0
  266. package/internal/utils/uuid.js +19 -0
  267. package/internal/utils/uuid.js.map +1 -0
  268. package/internal/utils/uuid.mjs +15 -0
  269. package/internal/utils/uuid.mjs.map +1 -0
  270. package/internal/utils/values.d.mts +18 -0
  271. package/internal/utils/values.d.mts.map +1 -0
  272. package/internal/utils/values.d.ts +18 -0
  273. package/internal/utils/values.d.ts.map +1 -0
  274. package/internal/utils/values.js +112 -0
  275. package/internal/utils/values.js.map +1 -0
  276. package/internal/utils/values.mjs +94 -0
  277. package/internal/utils/values.mjs.map +1 -0
  278. package/internal/utils.d.mts +8 -0
  279. package/internal/utils.d.mts.map +1 -0
  280. package/internal/utils.d.ts +8 -0
  281. package/internal/utils.d.ts.map +1 -0
  282. package/internal/utils.js +12 -0
  283. package/internal/utils.js.map +1 -0
  284. package/internal/utils.mjs +9 -0
  285. package/internal/utils.mjs.map +1 -0
  286. package/package.json +147 -0
  287. package/pagination.d.mts +2 -0
  288. package/pagination.d.mts.map +1 -0
  289. package/pagination.d.ts +2 -0
  290. package/pagination.d.ts.map +1 -0
  291. package/pagination.js +6 -0
  292. package/pagination.js.map +1 -0
  293. package/pagination.mjs +2 -0
  294. package/pagination.mjs.map +1 -0
  295. package/resource.d.mts +2 -0
  296. package/resource.d.mts.map +1 -0
  297. package/resource.d.ts +2 -0
  298. package/resource.d.ts.map +1 -0
  299. package/resource.js +6 -0
  300. package/resource.js.map +1 -0
  301. package/resource.mjs +2 -0
  302. package/resource.mjs.map +1 -0
  303. package/resources/index.d.mts +2 -0
  304. package/resources/index.d.mts.map +1 -0
  305. package/resources/index.d.ts +2 -0
  306. package/resources/index.d.ts.map +1 -0
  307. package/resources/index.js +7 -0
  308. package/resources/index.js.map +1 -0
  309. package/resources/index.mjs +3 -0
  310. package/resources/index.mjs.map +1 -0
  311. package/resources/request-logs.d.mts +324 -0
  312. package/resources/request-logs.d.mts.map +1 -0
  313. package/resources/request-logs.d.ts +324 -0
  314. package/resources/request-logs.d.ts.map +1 -0
  315. package/resources/request-logs.js +62 -0
  316. package/resources/request-logs.js.map +1 -0
  317. package/resources/request-logs.mjs +58 -0
  318. package/resources/request-logs.mjs.map +1 -0
  319. package/resources.d.mts +2 -0
  320. package/resources.d.mts.map +1 -0
  321. package/resources.d.ts +2 -0
  322. package/resources.d.ts.map +1 -0
  323. package/resources.js +5 -0
  324. package/resources.js.map +1 -0
  325. package/resources.mjs +2 -0
  326. package/resources.mjs.map +1 -0
  327. package/src/api-promise.ts +2 -0
  328. package/src/client.ts +768 -0
  329. package/src/core/README.md +3 -0
  330. package/src/core/api-promise.ts +92 -0
  331. package/src/core/error.ts +130 -0
  332. package/src/core/pagination.ts +169 -0
  333. package/src/core/resource.ts +11 -0
  334. package/src/core/uploads.ts +2 -0
  335. package/src/error.ts +2 -0
  336. package/src/index.ts +23 -0
  337. package/src/internal/README.md +3 -0
  338. package/src/internal/builtin-types.ts +93 -0
  339. package/src/internal/detect-platform.ts +196 -0
  340. package/src/internal/errors.ts +33 -0
  341. package/src/internal/headers.ts +97 -0
  342. package/src/internal/parse.ts +56 -0
  343. package/src/internal/qs/LICENSE.md +13 -0
  344. package/src/internal/qs/README.md +3 -0
  345. package/src/internal/qs/formats.ts +10 -0
  346. package/src/internal/qs/index.ts +13 -0
  347. package/src/internal/qs/stringify.ts +385 -0
  348. package/src/internal/qs/types.ts +71 -0
  349. package/src/internal/qs/utils.ts +265 -0
  350. package/src/internal/request-options.ts +91 -0
  351. package/src/internal/shim-types.ts +26 -0
  352. package/src/internal/shims.ts +107 -0
  353. package/src/internal/to-file.ts +154 -0
  354. package/src/internal/types.ts +95 -0
  355. package/src/internal/uploads.ts +187 -0
  356. package/src/internal/utils/base64.ts +40 -0
  357. package/src/internal/utils/bytes.ts +32 -0
  358. package/src/internal/utils/env.ts +18 -0
  359. package/src/internal/utils/log.ts +126 -0
  360. package/src/internal/utils/path.ts +88 -0
  361. package/src/internal/utils/query.ts +7 -0
  362. package/src/internal/utils/sleep.ts +3 -0
  363. package/src/internal/utils/uuid.ts +17 -0
  364. package/src/internal/utils/values.ts +105 -0
  365. package/src/internal/utils.ts +9 -0
  366. package/src/lib/.keep +4 -0
  367. package/src/pagination.ts +2 -0
  368. package/src/resource.ts +2 -0
  369. package/src/resources/index.ts +10 -0
  370. package/src/resources/request-logs.ts +405 -0
  371. package/src/resources.ts +1 -0
  372. package/src/tsconfig.json +11 -0
  373. package/src/uploads.ts +2 -0
  374. package/src/version.ts +1 -0
  375. package/uploads.d.mts +2 -0
  376. package/uploads.d.mts.map +1 -0
  377. package/uploads.d.ts +2 -0
  378. package/uploads.d.ts.map +1 -0
  379. package/uploads.js +6 -0
  380. package/uploads.js.map +1 -0
  381. package/uploads.mjs +2 -0
  382. package/uploads.mjs.map +1 -0
  383. package/version.d.mts +2 -0
  384. package/version.d.mts.map +1 -0
  385. package/version.d.ts +2 -0
  386. package/version.d.ts.map +1 -0
  387. package/version.js +5 -0
  388. package/version.js.map +1 -0
  389. package/version.mjs +2 -0
  390. package/version.mjs.map +1 -0
@@ -0,0 +1,324 @@
1
+ import { APIResource } from "../core/resource.mjs";
2
+ import { APIPromise } from "../core/api-promise.mjs";
3
+ import { CursorIDPage, type CursorIDPageParams, PagePromise } from "../core/pagination.mjs";
4
+ import { RequestOptions } from "../internal/request-options.mjs";
5
+ export declare class RequestLogs extends APIResource {
6
+ /**
7
+ * Retrieve a specific request log by its [request ID](/guides/request-id).
8
+ *
9
+ * Results are limited in accordance with X-ray's
10
+ * [tenancy model](/guides/tenancy/). Callers may want to set `X-Xray-Tenant-Id` to
11
+ * a specific tenant ID to query logs for that tenant, or omit it to query across
12
+ * all non-tenanted logs.
13
+ */
14
+ retrieve(requestID: string, params?: RequestLogRetrieveParams | null | undefined, options?: RequestOptions): APIPromise<RequestLogRetrieveResponse>;
15
+ /**
16
+ * List request logs by time and using a variety of optional filters.
17
+ *
18
+ * This is one of X-ray's most common API endpoints, returning a collection of
19
+ * request logs and accepting a variety of optional filters to narrow down results.
20
+ * For example, an integration might query for all request logs from a specific
21
+ * endpoint by invoking it with `request_method=GET` and
22
+ * `request_route=/api/v1/users/{user_id}`, or query via a customer-defined tag
23
+ * with `tags[sensitivity]=high`.
24
+ *
25
+ * The endpoint is paginated, ordered by `timestamp` and `request_id`. Order
26
+ * defaults to ascending (oldest first) but can be set to descending with the
27
+ * `order` query parameter. Many integrations will be querying for recent request
28
+ * logs, so setting `order=desc` is the more conventional form.
29
+ *
30
+ * Results are limited in accordance with X-ray's
31
+ * [tenancy model](/guides/tenancy/). Callers may want to set `X-Xray-Tenant-Id` to
32
+ * a specific tenant ID to query logs for that tenant, or omit it to query across
33
+ * all non-tenanted logs.
34
+ */
35
+ list(params?: RequestLogListParams | null | undefined, options?: RequestOptions): PagePromise<RequestLogListResponsesCursorIDPage, RequestLogListResponse>;
36
+ }
37
+ export type RequestLogListResponsesCursorIDPage = CursorIDPage<RequestLogListResponse>;
38
+ /**
39
+ * RequestLog represents a single HTTP request and response exchange from a service
40
+ * being traced by X-ray.
41
+ */
42
+ export interface RequestLogRetrieveResponse {
43
+ /**
44
+ * HTTP headers sent with the request, keyed by header name.
45
+ */
46
+ request_headers: {
47
+ [key: string]: Array<string>;
48
+ };
49
+ /**
50
+ * Unique identifier for the request, often an
51
+ * [X-ray request ID](/guides/request-id).
52
+ */
53
+ request_id: string;
54
+ /**
55
+ * HTTP method used for the request (e.g. `GET`, `POST`).
56
+ */
57
+ request_method: string;
58
+ /**
59
+ * Full path of the HTTP request (e.g. `/v1/users/123`).
60
+ */
61
+ request_path: string;
62
+ /**
63
+ * HTTP headers sent with the response, keyed by header name.
64
+ */
65
+ response_headers: {
66
+ [key: string]: Array<string>;
67
+ };
68
+ /**
69
+ * When the request was received.
70
+ */
71
+ timestamp: string;
72
+ /**
73
+ * Total time the request took in microseconds.
74
+ */
75
+ duration_us?: number;
76
+ /**
77
+ * IP address of the client that made the request.
78
+ */
79
+ ip?: string;
80
+ /**
81
+ * Raw body of the HTTP request.
82
+ *
83
+ * This property may be large and include relatively sensitive data, so it's
84
+ * omitted from responses by default. Include it using the `include` query
85
+ * parameter like `include=request_body`.
86
+ */
87
+ request_body?: string;
88
+ /**
89
+ * Encoding applied to the request body. If the body could be interpreted as valid
90
+ * UTF-8, this field will contain the value `utf-8`. If not, X-ray will have
91
+ * encoded the body as base64 and this field will contain the value `base64`.
92
+ */
93
+ request_body_encoding?: string;
94
+ /**
95
+ * Whether the request body was truncated because it exceeded the maximum capture
96
+ * size.
97
+ */
98
+ request_body_truncated?: boolean;
99
+ /**
100
+ * Matched route pattern for the request (e.g. `/v1/users/{id}`) as read from the
101
+ * target stack's internal HTTP framework (i.e. Go's `net/http`, Express in
102
+ * Javascript, etc.), if available.
103
+ */
104
+ request_route?: string;
105
+ /**
106
+ * Raw body of the HTTP response.
107
+ *
108
+ * This property may be large and include relatively sensitive data, so it's
109
+ * omitted from responses by default. Include it using the `include` query
110
+ * parameter like `include=response_body`.
111
+ */
112
+ response_body?: string;
113
+ /**
114
+ * Encoding applied to the response body. If the body could be interpreted as valid
115
+ * UTF-8, this field will contain the value `utf-8`. If not, X-ray will have
116
+ * encoded the body as base64 and this field will contain the value `base64`.
117
+ */
118
+ response_body_encoding?: string;
119
+ /**
120
+ * Whether the response body was truncated because it exceeded the maximum capture
121
+ * size.
122
+ */
123
+ response_body_truncated?: boolean;
124
+ /**
125
+ * Name of the service that handled the request.
126
+ */
127
+ service?: string;
128
+ /**
129
+ * HTTP status code returned by the response (e.g. 200, 404).
130
+ */
131
+ status?: number;
132
+ /**
133
+ * Arbitrary customer-defined tags associated with the request, keyed by tag name.
134
+ */
135
+ tags?: {
136
+ [key: string]: string;
137
+ };
138
+ /**
139
+ * Identifier for the tenant that made the request.
140
+ */
141
+ tenant_id?: string;
142
+ /**
143
+ * Identifier for the user who made the request, if known.
144
+ */
145
+ user_id?: string;
146
+ }
147
+ /**
148
+ * RequestLog represents a single HTTP request and response exchange from a service
149
+ * being traced by X-ray.
150
+ */
151
+ export interface RequestLogListResponse {
152
+ /**
153
+ * HTTP headers sent with the request, keyed by header name.
154
+ */
155
+ request_headers: {
156
+ [key: string]: Array<string>;
157
+ };
158
+ /**
159
+ * Unique identifier for the request, often an
160
+ * [X-ray request ID](/guides/request-id).
161
+ */
162
+ request_id: string;
163
+ /**
164
+ * HTTP method used for the request (e.g. `GET`, `POST`).
165
+ */
166
+ request_method: string;
167
+ /**
168
+ * Full path of the HTTP request (e.g. `/v1/users/123`).
169
+ */
170
+ request_path: string;
171
+ /**
172
+ * HTTP headers sent with the response, keyed by header name.
173
+ */
174
+ response_headers: {
175
+ [key: string]: Array<string>;
176
+ };
177
+ /**
178
+ * When the request was received.
179
+ */
180
+ timestamp: string;
181
+ /**
182
+ * Total time the request took in microseconds.
183
+ */
184
+ duration_us?: number;
185
+ /**
186
+ * IP address of the client that made the request.
187
+ */
188
+ ip?: string;
189
+ /**
190
+ * Raw body of the HTTP request.
191
+ *
192
+ * This property may be large and include relatively sensitive data, so it's
193
+ * omitted from responses by default. Include it using the `include` query
194
+ * parameter like `include=request_body`.
195
+ */
196
+ request_body?: string;
197
+ /**
198
+ * Encoding applied to the request body. If the body could be interpreted as valid
199
+ * UTF-8, this field will contain the value `utf-8`. If not, X-ray will have
200
+ * encoded the body as base64 and this field will contain the value `base64`.
201
+ */
202
+ request_body_encoding?: string;
203
+ /**
204
+ * Whether the request body was truncated because it exceeded the maximum capture
205
+ * size.
206
+ */
207
+ request_body_truncated?: boolean;
208
+ /**
209
+ * Matched route pattern for the request (e.g. `/v1/users/{id}`) as read from the
210
+ * target stack's internal HTTP framework (i.e. Go's `net/http`, Express in
211
+ * Javascript, etc.), if available.
212
+ */
213
+ request_route?: string;
214
+ /**
215
+ * Raw body of the HTTP response.
216
+ *
217
+ * This property may be large and include relatively sensitive data, so it's
218
+ * omitted from responses by default. Include it using the `include` query
219
+ * parameter like `include=response_body`.
220
+ */
221
+ response_body?: string;
222
+ /**
223
+ * Encoding applied to the response body. If the body could be interpreted as valid
224
+ * UTF-8, this field will contain the value `utf-8`. If not, X-ray will have
225
+ * encoded the body as base64 and this field will contain the value `base64`.
226
+ */
227
+ response_body_encoding?: string;
228
+ /**
229
+ * Whether the response body was truncated because it exceeded the maximum capture
230
+ * size.
231
+ */
232
+ response_body_truncated?: boolean;
233
+ /**
234
+ * Name of the service that handled the request.
235
+ */
236
+ service?: string;
237
+ /**
238
+ * HTTP status code returned by the response (e.g. 200, 404).
239
+ */
240
+ status?: number;
241
+ /**
242
+ * Arbitrary customer-defined tags associated with the request, keyed by tag name.
243
+ */
244
+ tags?: {
245
+ [key: string]: string;
246
+ };
247
+ /**
248
+ * Identifier for the tenant that made the request.
249
+ */
250
+ tenant_id?: string;
251
+ /**
252
+ * Identifier for the user who made the request, if known.
253
+ */
254
+ user_id?: string;
255
+ }
256
+ export interface RequestLogRetrieveParams {
257
+ /**
258
+ * Query param: Additional response properties to include, such as `request_body`
259
+ * and `response_body`. By default, these properties are omitted.
260
+ */
261
+ include?: Array<string>;
262
+ /**
263
+ * Query param: Optional user ID to filter request logs to.
264
+ */
265
+ user_id?: string;
266
+ /**
267
+ * Header param: Tenant ID to scope request-log reads to. Set to `*` to query
268
+ * across all tenants.
269
+ */
270
+ 'X-Xray-Tenant-Id'?: string;
271
+ }
272
+ export interface RequestLogListParams extends CursorIDPageParams {
273
+ /**
274
+ * Query param: Additional response properties to include, such as `request_body`
275
+ * and `response_body`. By default, these properties are omitted.
276
+ */
277
+ include?: Array<string>;
278
+ /**
279
+ * Query param: Optional IP address to filter request logs by.
280
+ */
281
+ ip?: string;
282
+ /**
283
+ * Query param: Sort order for results, either "asc" (ascending, oldest first) or
284
+ * `desc` (descending, newest first). Defaults to `asc`.
285
+ */
286
+ order?: 'asc' | 'desc';
287
+ /**
288
+ * Query param: The HTTP method to filter request logs by (e.g. `GET`, `POST`,
289
+ * etc.).
290
+ */
291
+ request_method?: string;
292
+ /**
293
+ * Query param: The request path to filter request logs by (e.g.
294
+ * `/api/v1/users/user_123`).
295
+ */
296
+ request_path?: string;
297
+ /**
298
+ * Query param: The request route to filter request logs by (e.g.
299
+ * `/api/v1/users/{user_id}`).
300
+ */
301
+ request_route?: string;
302
+ /**
303
+ * Query param: Optional service name to filter request logs by.
304
+ */
305
+ service?: string;
306
+ /**
307
+ * Query param: Optional HTTP status code to filter request logs by (e.g. 200,
308
+ * 404).
309
+ */
310
+ status?: number;
311
+ /**
312
+ * Query param: Optional user ID to filter request logs to.
313
+ */
314
+ user_id?: string;
315
+ /**
316
+ * Header param: Tenant ID to scope request-log reads to. Set to `*` to query
317
+ * across all tenants.
318
+ */
319
+ 'X-Xray-Tenant-Id'?: string;
320
+ }
321
+ export declare namespace RequestLogs {
322
+ export { type RequestLogRetrieveResponse as RequestLogRetrieveResponse, type RequestLogListResponse as RequestLogListResponse, type RequestLogListResponsesCursorIDPage as RequestLogListResponsesCursorIDPage, type RequestLogRetrieveParams as RequestLogRetrieveParams, type RequestLogListParams as RequestLogListParams, };
323
+ }
324
+ //# sourceMappingURL=request-logs.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"request-logs.d.mts","sourceRoot":"","sources":["../src/resources/request-logs.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,YAAY,EAAE,KAAK,kBAAkB,EAAE,WAAW,EAAE;OAEtD,EAAE,cAAc,EAAE;AAGzB,qBAAa,WAAY,SAAQ,WAAW;IAC1C;;;;;;;OAOG;IACH,QAAQ,CACN,SAAS,EAAE,MAAM,EACjB,MAAM,GAAE,wBAAwB,GAAG,IAAI,GAAG,SAAc,EACxD,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,0BAA0B,CAAC;IAYzC;;;;;;;;;;;;;;;;;;;OAmBG;IACH,IAAI,CACF,MAAM,GAAE,oBAAoB,GAAG,IAAI,GAAG,SAAc,EACpD,OAAO,CAAC,EAAE,cAAc,GACvB,WAAW,CAAC,mCAAmC,EAAE,sBAAsB,CAAC;CAW5E;AAED,MAAM,MAAM,mCAAmC,GAAG,YAAY,CAAC,sBAAsB,CAAC,CAAC;AAEvF;;;GAGG;AACH,MAAM,WAAW,0BAA0B;IACzC;;OAEG;IACH,eAAe,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,CAAA;KAAE,CAAC;IAElD;;;OAGG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,cAAc,EAAE,MAAM,CAAC;IAEvB;;OAEG;IACH,YAAY,EA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IACH,EAAE,CAAC,EAAE,MAAM,CAAC;IAEZ;;;OAGG;IACH,KAAK,CAAC,EAAE,KAAK,GAAG,MAAM,CAAC;IAEvB;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;;OAGG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED,MAAM,CAAC,OAAO,WAAW,WAAW,CAAC;IACnC,OAAO,EACL,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,mCAAmC,IAAI,mCAAmC,EAC/E,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,oBAAoB,IAAI,oBAAoB,GAClD,CAAC;CACH"}
@@ -0,0 +1,324 @@
1
+ import { APIResource } from "../core/resource.js";
2
+ import { APIPromise } from "../core/api-promise.js";
3
+ import { CursorIDPage, type CursorIDPageParams, PagePromise } from "../core/pagination.js";
4
+ import { RequestOptions } from "../internal/request-options.js";
5
+ export declare class RequestLogs extends APIResource {
6
+ /**
7
+ * Retrieve a specific request log by its [request ID](/guides/request-id).
8
+ *
9
+ * Results are limited in accordance with X-ray's
10
+ * [tenancy model](/guides/tenancy/). Callers may want to set `X-Xray-Tenant-Id` to
11
+ * a specific tenant ID to query logs for that tenant, or omit it to query across
12
+ * all non-tenanted logs.
13
+ */
14
+ retrieve(requestID: string, params?: RequestLogRetrieveParams | null | undefined, options?: RequestOptions): APIPromise<RequestLogRetrieveResponse>;
15
+ /**
16
+ * List request logs by time and using a variety of optional filters.
17
+ *
18
+ * This is one of X-ray's most common API endpoints, returning a collection of
19
+ * request logs and accepting a variety of optional filters to narrow down results.
20
+ * For example, an integration might query for all request logs from a specific
21
+ * endpoint by invoking it with `request_method=GET` and
22
+ * `request_route=/api/v1/users/{user_id}`, or query via a customer-defined tag
23
+ * with `tags[sensitivity]=high`.
24
+ *
25
+ * The endpoint is paginated, ordered by `timestamp` and `request_id`. Order
26
+ * defaults to ascending (oldest first) but can be set to descending with the
27
+ * `order` query parameter. Many integrations will be querying for recent request
28
+ * logs, so setting `order=desc` is the more conventional form.
29
+ *
30
+ * Results are limited in accordance with X-ray's
31
+ * [tenancy model](/guides/tenancy/). Callers may want to set `X-Xray-Tenant-Id` to
32
+ * a specific tenant ID to query logs for that tenant, or omit it to query across
33
+ * all non-tenanted logs.
34
+ */
35
+ list(params?: RequestLogListParams | null | undefined, options?: RequestOptions): PagePromise<RequestLogListResponsesCursorIDPage, RequestLogListResponse>;
36
+ }
37
+ export type RequestLogListResponsesCursorIDPage = CursorIDPage<RequestLogListResponse>;
38
+ /**
39
+ * RequestLog represents a single HTTP request and response exchange from a service
40
+ * being traced by X-ray.
41
+ */
42
+ export interface RequestLogRetrieveResponse {
43
+ /**
44
+ * HTTP headers sent with the request, keyed by header name.
45
+ */
46
+ request_headers: {
47
+ [key: string]: Array<string>;
48
+ };
49
+ /**
50
+ * Unique identifier for the request, often an
51
+ * [X-ray request ID](/guides/request-id).
52
+ */
53
+ request_id: string;
54
+ /**
55
+ * HTTP method used for the request (e.g. `GET`, `POST`).
56
+ */
57
+ request_method: string;
58
+ /**
59
+ * Full path of the HTTP request (e.g. `/v1/users/123`).
60
+ */
61
+ request_path: string;
62
+ /**
63
+ * HTTP headers sent with the response, keyed by header name.
64
+ */
65
+ response_headers: {
66
+ [key: string]: Array<string>;
67
+ };
68
+ /**
69
+ * When the request was received.
70
+ */
71
+ timestamp: string;
72
+ /**
73
+ * Total time the request took in microseconds.
74
+ */
75
+ duration_us?: number;
76
+ /**
77
+ * IP address of the client that made the request.
78
+ */
79
+ ip?: string;
80
+ /**
81
+ * Raw body of the HTTP request.
82
+ *
83
+ * This property may be large and include relatively sensitive data, so it's
84
+ * omitted from responses by default. Include it using the `include` query
85
+ * parameter like `include=request_body`.
86
+ */
87
+ request_body?: string;
88
+ /**
89
+ * Encoding applied to the request body. If the body could be interpreted as valid
90
+ * UTF-8, this field will contain the value `utf-8`. If not, X-ray will have
91
+ * encoded the body as base64 and this field will contain the value `base64`.
92
+ */
93
+ request_body_encoding?: string;
94
+ /**
95
+ * Whether the request body was truncated because it exceeded the maximum capture
96
+ * size.
97
+ */
98
+ request_body_truncated?: boolean;
99
+ /**
100
+ * Matched route pattern for the request (e.g. `/v1/users/{id}`) as read from the
101
+ * target stack's internal HTTP framework (i.e. Go's `net/http`, Express in
102
+ * Javascript, etc.), if available.
103
+ */
104
+ request_route?: string;
105
+ /**
106
+ * Raw body of the HTTP response.
107
+ *
108
+ * This property may be large and include relatively sensitive data, so it's
109
+ * omitted from responses by default. Include it using the `include` query
110
+ * parameter like `include=response_body`.
111
+ */
112
+ response_body?: string;
113
+ /**
114
+ * Encoding applied to the response body. If the body could be interpreted as valid
115
+ * UTF-8, this field will contain the value `utf-8`. If not, X-ray will have
116
+ * encoded the body as base64 and this field will contain the value `base64`.
117
+ */
118
+ response_body_encoding?: string;
119
+ /**
120
+ * Whether the response body was truncated because it exceeded the maximum capture
121
+ * size.
122
+ */
123
+ response_body_truncated?: boolean;
124
+ /**
125
+ * Name of the service that handled the request.
126
+ */
127
+ service?: string;
128
+ /**
129
+ * HTTP status code returned by the response (e.g. 200, 404).
130
+ */
131
+ status?: number;
132
+ /**
133
+ * Arbitrary customer-defined tags associated with the request, keyed by tag name.
134
+ */
135
+ tags?: {
136
+ [key: string]: string;
137
+ };
138
+ /**
139
+ * Identifier for the tenant that made the request.
140
+ */
141
+ tenant_id?: string;
142
+ /**
143
+ * Identifier for the user who made the request, if known.
144
+ */
145
+ user_id?: string;
146
+ }
147
+ /**
148
+ * RequestLog represents a single HTTP request and response exchange from a service
149
+ * being traced by X-ray.
150
+ */
151
+ export interface RequestLogListResponse {
152
+ /**
153
+ * HTTP headers sent with the request, keyed by header name.
154
+ */
155
+ request_headers: {
156
+ [key: string]: Array<string>;
157
+ };
158
+ /**
159
+ * Unique identifier for the request, often an
160
+ * [X-ray request ID](/guides/request-id).
161
+ */
162
+ request_id: string;
163
+ /**
164
+ * HTTP method used for the request (e.g. `GET`, `POST`).
165
+ */
166
+ request_method: string;
167
+ /**
168
+ * Full path of the HTTP request (e.g. `/v1/users/123`).
169
+ */
170
+ request_path: string;
171
+ /**
172
+ * HTTP headers sent with the response, keyed by header name.
173
+ */
174
+ response_headers: {
175
+ [key: string]: Array<string>;
176
+ };
177
+ /**
178
+ * When the request was received.
179
+ */
180
+ timestamp: string;
181
+ /**
182
+ * Total time the request took in microseconds.
183
+ */
184
+ duration_us?: number;
185
+ /**
186
+ * IP address of the client that made the request.
187
+ */
188
+ ip?: string;
189
+ /**
190
+ * Raw body of the HTTP request.
191
+ *
192
+ * This property may be large and include relatively sensitive data, so it's
193
+ * omitted from responses by default. Include it using the `include` query
194
+ * parameter like `include=request_body`.
195
+ */
196
+ request_body?: string;
197
+ /**
198
+ * Encoding applied to the request body. If the body could be interpreted as valid
199
+ * UTF-8, this field will contain the value `utf-8`. If not, X-ray will have
200
+ * encoded the body as base64 and this field will contain the value `base64`.
201
+ */
202
+ request_body_encoding?: string;
203
+ /**
204
+ * Whether the request body was truncated because it exceeded the maximum capture
205
+ * size.
206
+ */
207
+ request_body_truncated?: boolean;
208
+ /**
209
+ * Matched route pattern for the request (e.g. `/v1/users/{id}`) as read from the
210
+ * target stack's internal HTTP framework (i.e. Go's `net/http`, Express in
211
+ * Javascript, etc.), if available.
212
+ */
213
+ request_route?: string;
214
+ /**
215
+ * Raw body of the HTTP response.
216
+ *
217
+ * This property may be large and include relatively sensitive data, so it's
218
+ * omitted from responses by default. Include it using the `include` query
219
+ * parameter like `include=response_body`.
220
+ */
221
+ response_body?: string;
222
+ /**
223
+ * Encoding applied to the response body. If the body could be interpreted as valid
224
+ * UTF-8, this field will contain the value `utf-8`. If not, X-ray will have
225
+ * encoded the body as base64 and this field will contain the value `base64`.
226
+ */
227
+ response_body_encoding?: string;
228
+ /**
229
+ * Whether the response body was truncated because it exceeded the maximum capture
230
+ * size.
231
+ */
232
+ response_body_truncated?: boolean;
233
+ /**
234
+ * Name of the service that handled the request.
235
+ */
236
+ service?: string;
237
+ /**
238
+ * HTTP status code returned by the response (e.g. 200, 404).
239
+ */
240
+ status?: number;
241
+ /**
242
+ * Arbitrary customer-defined tags associated with the request, keyed by tag name.
243
+ */
244
+ tags?: {
245
+ [key: string]: string;
246
+ };
247
+ /**
248
+ * Identifier for the tenant that made the request.
249
+ */
250
+ tenant_id?: string;
251
+ /**
252
+ * Identifier for the user who made the request, if known.
253
+ */
254
+ user_id?: string;
255
+ }
256
+ export interface RequestLogRetrieveParams {
257
+ /**
258
+ * Query param: Additional response properties to include, such as `request_body`
259
+ * and `response_body`. By default, these properties are omitted.
260
+ */
261
+ include?: Array<string>;
262
+ /**
263
+ * Query param: Optional user ID to filter request logs to.
264
+ */
265
+ user_id?: string;
266
+ /**
267
+ * Header param: Tenant ID to scope request-log reads to. Set to `*` to query
268
+ * across all tenants.
269
+ */
270
+ 'X-Xray-Tenant-Id'?: string;
271
+ }
272
+ export interface RequestLogListParams extends CursorIDPageParams {
273
+ /**
274
+ * Query param: Additional response properties to include, such as `request_body`
275
+ * and `response_body`. By default, these properties are omitted.
276
+ */
277
+ include?: Array<string>;
278
+ /**
279
+ * Query param: Optional IP address to filter request logs by.
280
+ */
281
+ ip?: string;
282
+ /**
283
+ * Query param: Sort order for results, either "asc" (ascending, oldest first) or
284
+ * `desc` (descending, newest first). Defaults to `asc`.
285
+ */
286
+ order?: 'asc' | 'desc';
287
+ /**
288
+ * Query param: The HTTP method to filter request logs by (e.g. `GET`, `POST`,
289
+ * etc.).
290
+ */
291
+ request_method?: string;
292
+ /**
293
+ * Query param: The request path to filter request logs by (e.g.
294
+ * `/api/v1/users/user_123`).
295
+ */
296
+ request_path?: string;
297
+ /**
298
+ * Query param: The request route to filter request logs by (e.g.
299
+ * `/api/v1/users/{user_id}`).
300
+ */
301
+ request_route?: string;
302
+ /**
303
+ * Query param: Optional service name to filter request logs by.
304
+ */
305
+ service?: string;
306
+ /**
307
+ * Query param: Optional HTTP status code to filter request logs by (e.g. 200,
308
+ * 404).
309
+ */
310
+ status?: number;
311
+ /**
312
+ * Query param: Optional user ID to filter request logs to.
313
+ */
314
+ user_id?: string;
315
+ /**
316
+ * Header param: Tenant ID to scope request-log reads to. Set to `*` to query
317
+ * across all tenants.
318
+ */
319
+ 'X-Xray-Tenant-Id'?: string;
320
+ }
321
+ export declare namespace RequestLogs {
322
+ export { type RequestLogRetrieveResponse as RequestLogRetrieveResponse, type RequestLogListResponse as RequestLogListResponse, type RequestLogListResponsesCursorIDPage as RequestLogListResponsesCursorIDPage, type RequestLogRetrieveParams as RequestLogRetrieveParams, type RequestLogListParams as RequestLogListParams, };
323
+ }
324
+ //# sourceMappingURL=request-logs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"request-logs.d.ts","sourceRoot":"","sources":["../src/resources/request-logs.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,YAAY,EAAE,KAAK,kBAAkB,EAAE,WAAW,EAAE;OAEtD,EAAE,cAAc,EAAE;AAGzB,qBAAa,WAAY,SAAQ,WAAW;IAC1C;;;;;;;OAOG;IACH,QAAQ,CACN,SAAS,EAAE,MAAM,EACjB,MAAM,GAAE,wBAAwB,GAAG,IAAI,GAAG,SAAc,EACxD,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,0BAA0B,CAAC;IAYzC;;;;;;;;;;;;;;;;;;;OAmBG;IACH,IAAI,CACF,MAAM,GAAE,oBAAoB,GAAG,IAAI,GAAG,SAAc,EACpD,OAAO,CAAC,EAAE,cAAc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