bem-ai-sdk 0.0.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 (489) hide show
  1. package/CHANGELOG.md +28 -0
  2. package/LICENSE +201 -0
  3. package/README.md +399 -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 +260 -0
  13. package/client.d.mts.map +1 -0
  14. package/client.d.ts +260 -0
  15. package/client.d.ts.map +1 -0
  16. package/client.js +538 -0
  17. package/client.js.map +1 -0
  18. package/client.mjs +534 -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 +135 -0
  37. package/core/pagination.d.mts.map +1 -0
  38. package/core/pagination.d.ts +135 -0
  39. package/core/pagination.d.ts.map +1 -0
  40. package/core/pagination.js +305 -0
  41. package/core/pagination.js.map +1 -0
  42. package/core/pagination.mjs +294 -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 +86 -0
  235. package/internal/utils/log.js.map +1 -0
  236. package/internal/utils/log.mjs +80 -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 +153 -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/calls.d.mts +216 -0
  304. package/resources/calls.d.mts.map +1 -0
  305. package/resources/calls.d.ts +216 -0
  306. package/resources/calls.d.ts.map +1 -0
  307. package/resources/calls.js +64 -0
  308. package/resources/calls.js.map +1 -0
  309. package/resources/calls.mjs +60 -0
  310. package/resources/calls.mjs.map +1 -0
  311. package/resources/errors.d.mts +150 -0
  312. package/resources/errors.d.mts.map +1 -0
  313. package/resources/errors.d.ts +150 -0
  314. package/resources/errors.d.ts.map +1 -0
  315. package/resources/errors.js +47 -0
  316. package/resources/errors.js.map +1 -0
  317. package/resources/errors.mjs +43 -0
  318. package/resources/errors.mjs.map +1 -0
  319. package/resources/functions/copy.d.mts +81 -0
  320. package/resources/functions/copy.d.mts.map +1 -0
  321. package/resources/functions/copy.d.ts +81 -0
  322. package/resources/functions/copy.d.ts.map +1 -0
  323. package/resources/functions/copy.js +28 -0
  324. package/resources/functions/copy.js.map +1 -0
  325. package/resources/functions/copy.mjs +24 -0
  326. package/resources/functions/copy.mjs.map +1 -0
  327. package/resources/functions/functions.d.mts +1469 -0
  328. package/resources/functions/functions.d.mts.map +1 -0
  329. package/resources/functions/functions.d.ts +1469 -0
  330. package/resources/functions/functions.d.ts.map +1 -0
  331. package/resources/functions/functions.js +70 -0
  332. package/resources/functions/functions.js.map +1 -0
  333. package/resources/functions/functions.mjs +65 -0
  334. package/resources/functions/functions.mjs.map +1 -0
  335. package/resources/functions/index.d.mts +4 -0
  336. package/resources/functions/index.d.mts.map +1 -0
  337. package/resources/functions/index.d.ts +4 -0
  338. package/resources/functions/index.d.ts.map +1 -0
  339. package/resources/functions/index.js +11 -0
  340. package/resources/functions/index.js.map +1 -0
  341. package/resources/functions/index.mjs +5 -0
  342. package/resources/functions/index.mjs.map +1 -0
  343. package/resources/functions/versions.d.mts +419 -0
  344. package/resources/functions/versions.d.mts.map +1 -0
  345. package/resources/functions/versions.d.ts +419 -0
  346. package/resources/functions/versions.d.ts.map +1 -0
  347. package/resources/functions/versions.js +36 -0
  348. package/resources/functions/versions.js.map +1 -0
  349. package/resources/functions/versions.mjs +32 -0
  350. package/resources/functions/versions.mjs.map +1 -0
  351. package/resources/functions.d.mts +2 -0
  352. package/resources/functions.d.mts.map +1 -0
  353. package/resources/functions.d.ts +2 -0
  354. package/resources/functions.d.ts.map +1 -0
  355. package/resources/functions.js +6 -0
  356. package/resources/functions.js.map +1 -0
  357. package/resources/functions.mjs +3 -0
  358. package/resources/functions.mjs.map +1 -0
  359. package/resources/index.d.mts +6 -0
  360. package/resources/index.d.mts.map +1 -0
  361. package/resources/index.d.ts +6 -0
  362. package/resources/index.d.ts.map +1 -0
  363. package/resources/index.js +15 -0
  364. package/resources/index.js.map +1 -0
  365. package/resources/index.mjs +7 -0
  366. package/resources/index.mjs.map +1 -0
  367. package/resources/outputs.d.mts +737 -0
  368. package/resources/outputs.d.mts.map +1 -0
  369. package/resources/outputs.d.ts +737 -0
  370. package/resources/outputs.d.ts.map +1 -0
  371. package/resources/outputs.js +54 -0
  372. package/resources/outputs.js.map +1 -0
  373. package/resources/outputs.mjs +50 -0
  374. package/resources/outputs.mjs.map +1 -0
  375. package/resources/workflows/index.d.mts +3 -0
  376. package/resources/workflows/index.d.mts.map +1 -0
  377. package/resources/workflows/index.d.ts +3 -0
  378. package/resources/workflows/index.d.ts.map +1 -0
  379. package/resources/workflows/index.js +9 -0
  380. package/resources/workflows/index.js.map +1 -0
  381. package/resources/workflows/index.mjs +4 -0
  382. package/resources/workflows/index.mjs.map +1 -0
  383. package/resources/workflows/versions.d.mts +37 -0
  384. package/resources/workflows/versions.d.mts.map +1 -0
  385. package/resources/workflows/versions.d.ts +37 -0
  386. package/resources/workflows/versions.d.ts.map +1 -0
  387. package/resources/workflows/versions.js +27 -0
  388. package/resources/workflows/versions.js.map +1 -0
  389. package/resources/workflows/versions.mjs +23 -0
  390. package/resources/workflows/versions.mjs.map +1 -0
  391. package/resources/workflows/workflows.d.mts +366 -0
  392. package/resources/workflows/workflows.d.mts.map +1 -0
  393. package/resources/workflows/workflows.d.ts +366 -0
  394. package/resources/workflows/workflows.d.ts.map +1 -0
  395. package/resources/workflows/workflows.js +88 -0
  396. package/resources/workflows/workflows.js.map +1 -0
  397. package/resources/workflows/workflows.mjs +83 -0
  398. package/resources/workflows/workflows.mjs.map +1 -0
  399. package/resources/workflows.d.mts +2 -0
  400. package/resources/workflows.d.mts.map +1 -0
  401. package/resources/workflows.d.ts +2 -0
  402. package/resources/workflows.d.ts.map +1 -0
  403. package/resources/workflows.js +6 -0
  404. package/resources/workflows.js.map +1 -0
  405. package/resources/workflows.mjs +3 -0
  406. package/resources/workflows.mjs.map +1 -0
  407. package/resources.d.mts +2 -0
  408. package/resources.d.mts.map +1 -0
  409. package/resources.d.ts +2 -0
  410. package/resources.d.ts.map +1 -0
  411. package/resources.js +5 -0
  412. package/resources.js.map +1 -0
  413. package/resources.mjs +2 -0
  414. package/resources.mjs.map +1 -0
  415. package/src/api-promise.ts +2 -0
  416. package/src/client.ts +970 -0
  417. package/src/core/README.md +3 -0
  418. package/src/core/api-promise.ts +89 -0
  419. package/src/core/error.ts +130 -0
  420. package/src/core/pagination.ts +512 -0
  421. package/src/core/resource.ts +11 -0
  422. package/src/core/uploads.ts +2 -0
  423. package/src/error.ts +2 -0
  424. package/src/index.ts +23 -0
  425. package/src/internal/README.md +3 -0
  426. package/src/internal/builtin-types.ts +93 -0
  427. package/src/internal/detect-platform.ts +196 -0
  428. package/src/internal/errors.ts +33 -0
  429. package/src/internal/headers.ts +97 -0
  430. package/src/internal/parse.ts +56 -0
  431. package/src/internal/qs/LICENSE.md +13 -0
  432. package/src/internal/qs/README.md +3 -0
  433. package/src/internal/qs/formats.ts +10 -0
  434. package/src/internal/qs/index.ts +13 -0
  435. package/src/internal/qs/stringify.ts +385 -0
  436. package/src/internal/qs/types.ts +71 -0
  437. package/src/internal/qs/utils.ts +265 -0
  438. package/src/internal/request-options.ts +91 -0
  439. package/src/internal/shim-types.ts +26 -0
  440. package/src/internal/shims.ts +107 -0
  441. package/src/internal/to-file.ts +154 -0
  442. package/src/internal/types.ts +95 -0
  443. package/src/internal/uploads.ts +187 -0
  444. package/src/internal/utils/base64.ts +40 -0
  445. package/src/internal/utils/bytes.ts +32 -0
  446. package/src/internal/utils/env.ts +18 -0
  447. package/src/internal/utils/log.ts +127 -0
  448. package/src/internal/utils/path.ts +88 -0
  449. package/src/internal/utils/query.ts +7 -0
  450. package/src/internal/utils/sleep.ts +3 -0
  451. package/src/internal/utils/uuid.ts +17 -0
  452. package/src/internal/utils/values.ts +105 -0
  453. package/src/internal/utils.ts +9 -0
  454. package/src/lib/.keep +4 -0
  455. package/src/pagination.ts +2 -0
  456. package/src/resource.ts +2 -0
  457. package/src/resources/calls.ts +264 -0
  458. package/src/resources/errors.ts +199 -0
  459. package/src/resources/functions/copy.ts +96 -0
  460. package/src/resources/functions/functions.ts +1892 -0
  461. package/src/resources/functions/index.ts +30 -0
  462. package/src/resources/functions/versions.ts +533 -0
  463. package/src/resources/functions.ts +3 -0
  464. package/src/resources/index.ts +56 -0
  465. package/src/resources/outputs.ts +987 -0
  466. package/src/resources/workflows/index.ts +25 -0
  467. package/src/resources/workflows/versions.ts +68 -0
  468. package/src/resources/workflows/workflows.ts +505 -0
  469. package/src/resources/workflows.ts +3 -0
  470. package/src/resources.ts +1 -0
  471. package/src/tsconfig.json +11 -0
  472. package/src/uploads.ts +2 -0
  473. package/src/version.ts +1 -0
  474. package/uploads.d.mts +2 -0
  475. package/uploads.d.mts.map +1 -0
  476. package/uploads.d.ts +2 -0
  477. package/uploads.d.ts.map +1 -0
  478. package/uploads.js +6 -0
  479. package/uploads.js.map +1 -0
  480. package/uploads.mjs +2 -0
  481. package/uploads.mjs.map +1 -0
  482. package/version.d.mts +2 -0
  483. package/version.d.mts.map +1 -0
  484. package/version.d.ts +2 -0
  485. package/version.d.ts.map +1 -0
  486. package/version.js +5 -0
  487. package/version.js.map +1 -0
  488. package/version.mjs +2 -0
  489. package/version.mjs.map +1 -0
@@ -0,0 +1,987 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { APIResource } from '../core/resource';
4
+ import * as OutputsAPI from './outputs';
5
+ import * as ErrorsAPI from './errors';
6
+ import { APIPromise } from '../core/api-promise';
7
+ import { OutputsPage, type OutputsPageParams, PagePromise } from '../core/pagination';
8
+ import { RequestOptions } from '../internal/request-options';
9
+ import { path } from '../internal/utils/path';
10
+
11
+ /**
12
+ * Retrieve terminal non-error output events from workflow calls.
13
+ *
14
+ * Outputs are events produced by successful terminal function steps — steps that completed
15
+ * without errors and did not spawn further downstream function calls. A single workflow call
16
+ * may produce multiple outputs (e.g. from a split-then-transform pipeline).
17
+ *
18
+ * Outputs and errors from the same call are not mutually exclusive: a partially-completed
19
+ * workflow may have both.
20
+ *
21
+ * Use `GET /v3/outputs` to list outputs across calls, or `GET /v3/outputs/{eventID}` to
22
+ * retrieve a specific output. To get outputs scoped to a single call, filter by `callIDs`.
23
+ */
24
+ export class Outputs extends APIResource {
25
+ /**
26
+ * **Retrieve a single output event by ID.**
27
+ *
28
+ * Fetches any non-error event by its `eventID`. Returns `404` if the event does
29
+ * not exist or if it is an error event (use `GET /v3/errors/{eventID}` for those).
30
+ */
31
+ retrieve(eventID: string, options?: RequestOptions): APIPromise<OutputRetrieveResponse> {
32
+ return this._client.get(path`/v3/outputs/${eventID}`, options);
33
+ }
34
+
35
+ /**
36
+ * **List terminal non-error output events.**
37
+ *
38
+ * Returns events that represent successful terminal outputs — primary events
39
+ * (non-split-collection) that did not trigger any downstream function calls. Error
40
+ * events are excluded; use `GET /v3/errors` to retrieve those.
41
+ *
42
+ * ## Intermediate Events
43
+ *
44
+ * By default, intermediate events (those that spawned a downstream function call
45
+ * in a multi-step workflow) are excluded. Pass `includeIntermediate=true` to
46
+ * include them.
47
+ *
48
+ * ## Filtering
49
+ *
50
+ * Filter by call, workflow, function, or reference ID. Multiple filters are ANDed
51
+ * together.
52
+ */
53
+ list(
54
+ query: OutputListParams | null | undefined = {},
55
+ options?: RequestOptions,
56
+ ): PagePromise<EventsOutputsPage, Event> {
57
+ return this._client.getAPIList('/v3/outputs', OutputsPage<Event>, { query, ...options });
58
+ }
59
+ }
60
+
61
+ export type EventsOutputsPage = OutputsPage<Event>;
62
+
63
+ export type AnyType = unknown | Array<unknown> | string | number | boolean;
64
+
65
+ export type Event =
66
+ | Event.TransformEvent
67
+ | Event.RouteEvent
68
+ | Event.SplitCollectionEvent
69
+ | Event.SplitItemEvent
70
+ | ErrorsAPI.ErrorEvent
71
+ | Event.JoinEvent
72
+ | Event.EnrichEvent
73
+ | Event.CollectionProcessingEvent;
74
+
75
+ export namespace Event {
76
+ export interface TransformEvent {
77
+ /**
78
+ * Unique ID generated by bem to identify the event.
79
+ */
80
+ eventID: string;
81
+
82
+ /**
83
+ * Unique identifier of function that this event is associated with.
84
+ */
85
+ functionID: string;
86
+
87
+ /**
88
+ * Unique name of function that this event is associated with.
89
+ */
90
+ functionName: string;
91
+
92
+ /**
93
+ * The number of items that were transformed. Used for batch transformations to
94
+ * indicate how many items were transformed.
95
+ */
96
+ itemCount: number;
97
+
98
+ /**
99
+ * The offset of the first item that was transformed. Used for batch
100
+ * transformations to indicate which item in the batch this event corresponds to.
101
+ */
102
+ itemOffset: number;
103
+
104
+ /**
105
+ * The unique ID you use internally to refer to this data point, propagated from
106
+ * the original function input.
107
+ */
108
+ referenceID: string;
109
+
110
+ /**
111
+ * The transformed content of the input. The structure of this object is defined by
112
+ * the function configuration.
113
+ */
114
+ transformedContent: unknown;
115
+
116
+ /**
117
+ * Average confidence score across all extracted fields, in the range [0, 1].
118
+ */
119
+ avgConfidence?: number | null;
120
+
121
+ /**
122
+ * Unique identifier of workflow call that this event is associated with.
123
+ */
124
+ callID?: string;
125
+
126
+ /**
127
+ * Corrected feedback provided for fine-tuning purposes.
128
+ */
129
+ correctedContent?: TransformEvent.Output | unknown | Array<unknown> | string | number | boolean | null;
130
+
131
+ /**
132
+ * Timestamp indicating when the event was created.
133
+ */
134
+ createdAt?: string;
135
+
136
+ eventType?: 'transform';
137
+
138
+ /**
139
+ * Per-field confidence scores. A JSON object mapping RFC 6901 JSON Pointer paths
140
+ * (e.g. `"/invoiceNumber"`) to float values in the range [0, 1] indicating the
141
+ * model's confidence in each extracted field value.
142
+ */
143
+ fieldConfidences?: unknown;
144
+
145
+ /**
146
+ * Unique identifier of function call that this event is associated with.
147
+ */
148
+ functionCallID?: string;
149
+
150
+ /**
151
+ * The attempt number of the function call that created this event. 1 indexed.
152
+ */
153
+ functionCallTryNumber?: number;
154
+
155
+ /**
156
+ * Version number of function that this event is associated with.
157
+ */
158
+ functionVersionNum?: number;
159
+
160
+ /**
161
+ * The inbound email that triggered this event.
162
+ */
163
+ inboundEmail?: ErrorsAPI.InboundEmailEvent;
164
+
165
+ /**
166
+ * Array of transformation inputs with their types and S3 URLs.
167
+ */
168
+ inputs?: Array<TransformEvent.Input> | null;
169
+
170
+ /**
171
+ * The input type of the content you're sending for transformation.
172
+ */
173
+ inputType?:
174
+ | 'csv'
175
+ | 'docx'
176
+ | 'email'
177
+ | 'heic'
178
+ | 'html'
179
+ | 'jpeg'
180
+ | 'json'
181
+ | 'heif'
182
+ | 'm4a'
183
+ | 'mp3'
184
+ | 'pdf'
185
+ | 'png'
186
+ | 'text'
187
+ | 'wav'
188
+ | 'webp'
189
+ | 'xls'
190
+ | 'xlsx'
191
+ | 'xml';
192
+
193
+ /**
194
+ * List of properties that were invalid in the input.
195
+ */
196
+ invalidProperties?: Array<string>;
197
+
198
+ /**
199
+ * Indicates whether this transformation was created as part of a regression test.
200
+ */
201
+ isRegression?: boolean;
202
+
203
+ /**
204
+ * Last timestamp indicating when the transform was published via webhook and
205
+ * received a non-200 response. Set to `null` on a subsequent retry if the webhook
206
+ * service receives a 200 response.
207
+ */
208
+ lastPublishErrorAt?: string | null;
209
+
210
+ metadata?: TransformEvent.Metadata;
211
+
212
+ /**
213
+ * Accuracy, precision, recall, and F1 score when corrected JSON is provided.
214
+ */
215
+ metrics?: TransformEvent.Metrics | null;
216
+
217
+ /**
218
+ * Indicates whether array order matters when comparing corrected JSON with
219
+ * extracted JSON.
220
+ */
221
+ orderMatching?: boolean;
222
+
223
+ /**
224
+ * ID of pipeline that transformed the original input data.
225
+ */
226
+ pipelineID?: string;
227
+
228
+ /**
229
+ * Timestamp indicating when the transform was published via webhook and received a
230
+ * successful 200 response. Value is `null` if the transformation hasn't been sent.
231
+ */
232
+ publishedAt?: string;
233
+
234
+ /**
235
+ * Presigned S3 URL for the input content uploaded to S3.
236
+ */
237
+ s3URL?: string | null;
238
+
239
+ /**
240
+ * Unique ID for each transformation output generated by bem following Segment's
241
+ * KSUID conventions.
242
+ */
243
+ transformationID?: string;
244
+
245
+ /**
246
+ * Unique identifier of workflow that this event is associated with.
247
+ */
248
+ workflowID?: string;
249
+
250
+ /**
251
+ * Name of workflow that this event is associated with.
252
+ */
253
+ workflowName?: string;
254
+
255
+ /**
256
+ * Version number of workflow that this event is associated with.
257
+ */
258
+ workflowVersionNum?: number;
259
+ }
260
+
261
+ export namespace TransformEvent {
262
+ export interface Output {
263
+ output?: Array<OutputsAPI.AnyType | null>;
264
+ }
265
+
266
+ export interface Input {
267
+ inputContent?: string | null;
268
+
269
+ inputType?: string | null;
270
+
271
+ jsonInputContent?: unknown | null;
272
+
273
+ s3URL?: string | null;
274
+ }
275
+
276
+ export interface Metadata {
277
+ durationFunctionToEventSeconds?: number;
278
+ }
279
+
280
+ /**
281
+ * Accuracy, precision, recall, and F1 score when corrected JSON is provided.
282
+ */
283
+ export interface Metrics {
284
+ differences?: Array<Metrics.Difference>;
285
+
286
+ metrics?: Metrics.Metrics;
287
+ }
288
+
289
+ export namespace Metrics {
290
+ export interface Difference {
291
+ category?: string;
292
+
293
+ correctedVal?: unknown;
294
+
295
+ extractedVal?: unknown;
296
+
297
+ jsonPointer?: string;
298
+ }
299
+
300
+ export interface Metrics {
301
+ accuracy?: number;
302
+
303
+ f1Score?: number;
304
+
305
+ precision?: number;
306
+
307
+ recall?: number;
308
+ }
309
+ }
310
+ }
311
+
312
+ export interface RouteEvent {
313
+ /**
314
+ * The choice made by the router function.
315
+ */
316
+ choice: string;
317
+
318
+ /**
319
+ * Unique ID generated by bem to identify the event.
320
+ */
321
+ eventID: string;
322
+
323
+ /**
324
+ * Unique identifier of function that this event is associated with.
325
+ */
326
+ functionID: string;
327
+
328
+ /**
329
+ * Unique name of function that this event is associated with.
330
+ */
331
+ functionName: string;
332
+
333
+ /**
334
+ * The unique ID you use internally to refer to this data point, propagated from
335
+ * the original function input.
336
+ */
337
+ referenceID: string;
338
+
339
+ /**
340
+ * Unique identifier of workflow call that this event is associated with.
341
+ */
342
+ callID?: string;
343
+
344
+ /**
345
+ * Timestamp indicating when the event was created.
346
+ */
347
+ createdAt?: string;
348
+
349
+ eventType?: 'route';
350
+
351
+ /**
352
+ * Unique identifier of function call that this event is associated with.
353
+ */
354
+ functionCallID?: string;
355
+
356
+ /**
357
+ * The attempt number of the function call that created this event. 1 indexed.
358
+ */
359
+ functionCallTryNumber?: number;
360
+
361
+ /**
362
+ * Version number of function that this event is associated with.
363
+ */
364
+ functionVersionNum?: number;
365
+
366
+ /**
367
+ * The inbound email that triggered this event.
368
+ */
369
+ inboundEmail?: ErrorsAPI.InboundEmailEvent;
370
+
371
+ metadata?: RouteEvent.Metadata;
372
+
373
+ /**
374
+ * The presigned S3 URL of the file that was routed.
375
+ */
376
+ s3URL?: string;
377
+
378
+ /**
379
+ * Unique identifier of workflow that this event is associated with.
380
+ */
381
+ workflowID?: string;
382
+
383
+ /**
384
+ * Name of workflow that this event is associated with.
385
+ */
386
+ workflowName?: string;
387
+
388
+ /**
389
+ * Version number of workflow that this event is associated with.
390
+ */
391
+ workflowVersionNum?: number;
392
+ }
393
+
394
+ export namespace RouteEvent {
395
+ export interface Metadata {
396
+ durationFunctionToEventSeconds?: number;
397
+ }
398
+ }
399
+
400
+ export interface SplitCollectionEvent {
401
+ /**
402
+ * Unique ID generated by bem to identify the event.
403
+ */
404
+ eventID: string;
405
+
406
+ /**
407
+ * Unique identifier of function that this event is associated with.
408
+ */
409
+ functionID: string;
410
+
411
+ /**
412
+ * Unique name of function that this event is associated with.
413
+ */
414
+ functionName: string;
415
+
416
+ outputType: 'print_page' | 'semantic_page';
417
+
418
+ printPageOutput: SplitCollectionEvent.PrintPageOutput;
419
+
420
+ /**
421
+ * The unique ID you use internally to refer to this data point, propagated from
422
+ * the original function input.
423
+ */
424
+ referenceID: string;
425
+
426
+ semanticPageOutput: SplitCollectionEvent.SemanticPageOutput;
427
+
428
+ /**
429
+ * Unique identifier of workflow call that this event is associated with.
430
+ */
431
+ callID?: string;
432
+
433
+ /**
434
+ * Timestamp indicating when the event was created.
435
+ */
436
+ createdAt?: string;
437
+
438
+ eventType?: 'split_collection';
439
+
440
+ /**
441
+ * Unique identifier of function call that this event is associated with.
442
+ */
443
+ functionCallID?: string;
444
+
445
+ /**
446
+ * The attempt number of the function call that created this event. 1 indexed.
447
+ */
448
+ functionCallTryNumber?: number;
449
+
450
+ /**
451
+ * Version number of function that this event is associated with.
452
+ */
453
+ functionVersionNum?: number;
454
+
455
+ /**
456
+ * The inbound email that triggered this event.
457
+ */
458
+ inboundEmail?: ErrorsAPI.InboundEmailEvent;
459
+
460
+ metadata?: SplitCollectionEvent.Metadata;
461
+
462
+ /**
463
+ * Unique identifier of workflow that this event is associated with.
464
+ */
465
+ workflowID?: string;
466
+
467
+ /**
468
+ * Name of workflow that this event is associated with.
469
+ */
470
+ workflowName?: string;
471
+
472
+ /**
473
+ * Version number of workflow that this event is associated with.
474
+ */
475
+ workflowVersionNum?: number;
476
+ }
477
+
478
+ export namespace SplitCollectionEvent {
479
+ export interface PrintPageOutput {
480
+ itemCount?: number;
481
+
482
+ items?: Array<PrintPageOutput.Item>;
483
+ }
484
+
485
+ export namespace PrintPageOutput {
486
+ export interface Item {
487
+ itemOffset?: number;
488
+
489
+ itemReferenceID?: string;
490
+
491
+ s3URL?: string;
492
+ }
493
+ }
494
+
495
+ export interface SemanticPageOutput {
496
+ itemCount?: number;
497
+
498
+ items?: Array<SemanticPageOutput.Item>;
499
+
500
+ pageCount?: number;
501
+ }
502
+
503
+ export namespace SemanticPageOutput {
504
+ export interface Item {
505
+ itemClass?: string;
506
+
507
+ itemClassCount?: number;
508
+
509
+ itemClassOffset?: number;
510
+
511
+ itemOffset?: number;
512
+
513
+ itemReferenceID?: string;
514
+
515
+ pageEnd?: number;
516
+
517
+ pageStart?: number;
518
+
519
+ s3URL?: string;
520
+ }
521
+ }
522
+
523
+ export interface Metadata {
524
+ durationFunctionToEventSeconds?: number;
525
+ }
526
+ }
527
+
528
+ export interface SplitItemEvent {
529
+ /**
530
+ * Unique ID generated by bem to identify the event.
531
+ */
532
+ eventID: string;
533
+
534
+ /**
535
+ * Unique identifier of function that this event is associated with.
536
+ */
537
+ functionID: string;
538
+
539
+ /**
540
+ * Unique name of function that this event is associated with.
541
+ */
542
+ functionName: string;
543
+
544
+ outputType: 'print_page' | 'semantic_page';
545
+
546
+ /**
547
+ * The unique ID you use internally to refer to this data point, propagated from
548
+ * the original function input.
549
+ */
550
+ referenceID: string;
551
+
552
+ /**
553
+ * Unique identifier of workflow call that this event is associated with.
554
+ */
555
+ callID?: string;
556
+
557
+ /**
558
+ * Timestamp indicating when the event was created.
559
+ */
560
+ createdAt?: string;
561
+
562
+ eventType?: 'split_item';
563
+
564
+ /**
565
+ * Unique identifier of function call that this event is associated with.
566
+ */
567
+ functionCallID?: string;
568
+
569
+ /**
570
+ * The attempt number of the function call that created this event. 1 indexed.
571
+ */
572
+ functionCallTryNumber?: number;
573
+
574
+ /**
575
+ * Version number of function that this event is associated with.
576
+ */
577
+ functionVersionNum?: number;
578
+
579
+ /**
580
+ * The inbound email that triggered this event.
581
+ */
582
+ inboundEmail?: ErrorsAPI.InboundEmailEvent;
583
+
584
+ metadata?: SplitItemEvent.Metadata;
585
+
586
+ printPageOutput?: SplitItemEvent.PrintPageOutput;
587
+
588
+ semanticPageOutput?: SplitItemEvent.SemanticPageOutput;
589
+
590
+ /**
591
+ * Unique identifier of workflow that this event is associated with.
592
+ */
593
+ workflowID?: string;
594
+
595
+ /**
596
+ * Name of workflow that this event is associated with.
597
+ */
598
+ workflowName?: string;
599
+
600
+ /**
601
+ * Version number of workflow that this event is associated with.
602
+ */
603
+ workflowVersionNum?: number;
604
+ }
605
+
606
+ export namespace SplitItemEvent {
607
+ export interface Metadata {
608
+ durationFunctionToEventSeconds?: number;
609
+ }
610
+
611
+ export interface PrintPageOutput {
612
+ collectionReferenceID?: string;
613
+
614
+ itemCount?: number;
615
+
616
+ itemOffset?: number;
617
+
618
+ s3URL?: string;
619
+ }
620
+
621
+ export interface SemanticPageOutput {
622
+ collectionReferenceID?: string;
623
+
624
+ itemClass?: string;
625
+
626
+ itemClassCount?: number;
627
+
628
+ itemClassOffset?: number;
629
+
630
+ itemCount?: number;
631
+
632
+ itemOffset?: number;
633
+
634
+ pageCount?: number;
635
+
636
+ pageEnd?: number;
637
+
638
+ pageStart?: number;
639
+
640
+ s3URL?: string;
641
+ }
642
+ }
643
+
644
+ export interface JoinEvent {
645
+ /**
646
+ * Unique ID generated by bem to identify the event.
647
+ */
648
+ eventID: string;
649
+
650
+ /**
651
+ * Unique identifier of function that this event is associated with.
652
+ */
653
+ functionID: string;
654
+
655
+ /**
656
+ * Unique name of function that this event is associated with.
657
+ */
658
+ functionName: string;
659
+
660
+ /**
661
+ * List of properties that were invalid in the input.
662
+ */
663
+ invalidProperties: Array<string>;
664
+
665
+ /**
666
+ * The items that were joined.
667
+ */
668
+ items: Array<JoinEvent.Item>;
669
+
670
+ /**
671
+ * The type of join that was performed.
672
+ */
673
+ joinType: 'standard';
674
+
675
+ /**
676
+ * The unique ID you use internally to refer to this data point, propagated from
677
+ * the original function input.
678
+ */
679
+ referenceID: string;
680
+
681
+ /**
682
+ * The transformed content of the input. The structure of this object is defined by
683
+ * the function configuration.
684
+ */
685
+ transformedContent: unknown;
686
+
687
+ /**
688
+ * Average confidence score across all extracted fields, in the range [0, 1].
689
+ */
690
+ avgConfidence?: number | null;
691
+
692
+ /**
693
+ * Unique identifier of workflow call that this event is associated with.
694
+ */
695
+ callID?: string;
696
+
697
+ /**
698
+ * Timestamp indicating when the event was created.
699
+ */
700
+ createdAt?: string;
701
+
702
+ eventType?: 'join';
703
+
704
+ /**
705
+ * Per-field confidence scores. A JSON object mapping RFC 6901 JSON Pointer paths
706
+ * (e.g. `"/invoiceNumber"`) to float values in the range [0, 1] indicating the
707
+ * model's confidence in each extracted field value.
708
+ */
709
+ fieldConfidences?: unknown;
710
+
711
+ /**
712
+ * Unique identifier of function call that this event is associated with.
713
+ */
714
+ functionCallID?: string;
715
+
716
+ /**
717
+ * The attempt number of the function call that created this event. 1 indexed.
718
+ */
719
+ functionCallTryNumber?: number;
720
+
721
+ /**
722
+ * Version number of function that this event is associated with.
723
+ */
724
+ functionVersionNum?: number;
725
+
726
+ /**
727
+ * The inbound email that triggered this event.
728
+ */
729
+ inboundEmail?: ErrorsAPI.InboundEmailEvent;
730
+
731
+ metadata?: JoinEvent.Metadata;
732
+
733
+ /**
734
+ * Unique ID for each transformation output generated by bem following Segment's
735
+ * KSUID conventions.
736
+ */
737
+ transformationID?: string;
738
+
739
+ /**
740
+ * Unique identifier of workflow that this event is associated with.
741
+ */
742
+ workflowID?: string;
743
+
744
+ /**
745
+ * Name of workflow that this event is associated with.
746
+ */
747
+ workflowName?: string;
748
+
749
+ /**
750
+ * Version number of workflow that this event is associated with.
751
+ */
752
+ workflowVersionNum?: number;
753
+ }
754
+
755
+ export namespace JoinEvent {
756
+ export interface Item {
757
+ /**
758
+ * The number of items that were transformed.
759
+ */
760
+ itemCount: number;
761
+
762
+ /**
763
+ * The offset of the first item that was transformed. Used for batch
764
+ * transformations to indicate which item in the batch this event corresponds to.
765
+ */
766
+ itemOffset: number;
767
+
768
+ /**
769
+ * The unique ID you use internally to refer to this data point.
770
+ */
771
+ itemReferenceID: string;
772
+
773
+ /**
774
+ * The presigned S3 URL of the file that was joined.
775
+ */
776
+ s3URL?: string;
777
+ }
778
+
779
+ export interface Metadata {
780
+ durationFunctionToEventSeconds?: number;
781
+ }
782
+ }
783
+
784
+ export interface EnrichEvent {
785
+ /**
786
+ * The enriched content produced by the enrich function. Contains the input data
787
+ * augmented with results from semantic search against collections.
788
+ */
789
+ enrichedContent: unknown;
790
+
791
+ /**
792
+ * Unique ID generated by bem to identify the event.
793
+ */
794
+ eventID: string;
795
+
796
+ /**
797
+ * Unique identifier of function that this event is associated with.
798
+ */
799
+ functionID: string;
800
+
801
+ /**
802
+ * Unique name of function that this event is associated with.
803
+ */
804
+ functionName: string;
805
+
806
+ /**
807
+ * The unique ID you use internally to refer to this data point, propagated from
808
+ * the original function input.
809
+ */
810
+ referenceID: string;
811
+
812
+ /**
813
+ * Unique identifier of workflow call that this event is associated with.
814
+ */
815
+ callID?: string;
816
+
817
+ /**
818
+ * Timestamp indicating when the event was created.
819
+ */
820
+ createdAt?: string;
821
+
822
+ eventType?: 'enrich';
823
+
824
+ /**
825
+ * Unique identifier of function call that this event is associated with.
826
+ */
827
+ functionCallID?: string;
828
+
829
+ /**
830
+ * The attempt number of the function call that created this event. 1 indexed.
831
+ */
832
+ functionCallTryNumber?: number;
833
+
834
+ /**
835
+ * Version number of function that this event is associated with.
836
+ */
837
+ functionVersionNum?: number;
838
+
839
+ /**
840
+ * The inbound email that triggered this event.
841
+ */
842
+ inboundEmail?: ErrorsAPI.InboundEmailEvent;
843
+
844
+ metadata?: EnrichEvent.Metadata;
845
+
846
+ /**
847
+ * Unique identifier of workflow that this event is associated with.
848
+ */
849
+ workflowID?: string;
850
+
851
+ /**
852
+ * Name of workflow that this event is associated with.
853
+ */
854
+ workflowName?: string;
855
+
856
+ /**
857
+ * Version number of workflow that this event is associated with.
858
+ */
859
+ workflowVersionNum?: number;
860
+ }
861
+
862
+ export namespace EnrichEvent {
863
+ export interface Metadata {
864
+ durationFunctionToEventSeconds?: number;
865
+ }
866
+ }
867
+
868
+ export interface CollectionProcessingEvent {
869
+ /**
870
+ * Unique identifier of the collection.
871
+ */
872
+ collectionID: string;
873
+
874
+ /**
875
+ * Name/path of the collection.
876
+ */
877
+ collectionName: string;
878
+
879
+ /**
880
+ * Unique ID generated by bem to identify the event.
881
+ */
882
+ eventID: string;
883
+
884
+ /**
885
+ * The operation performed (add or update).
886
+ */
887
+ operation: 'add' | 'update';
888
+
889
+ /**
890
+ * Number of items successfully processed.
891
+ */
892
+ processedCount: number;
893
+
894
+ /**
895
+ * The unique ID you use internally to refer to this data point, propagated from
896
+ * the original function input.
897
+ */
898
+ referenceID: string;
899
+
900
+ /**
901
+ * Processing status (success or failed).
902
+ */
903
+ status: 'success' | 'failed';
904
+
905
+ /**
906
+ * Array of collection item KSUIDs that were added or updated.
907
+ */
908
+ collectionItemIDs?: Array<string>;
909
+
910
+ /**
911
+ * Timestamp indicating when the event was created.
912
+ */
913
+ createdAt?: string;
914
+
915
+ /**
916
+ * Error message if processing failed.
917
+ */
918
+ errorMessage?: string;
919
+
920
+ eventType?: 'collection_processing';
921
+
922
+ /**
923
+ * The attempt number of the function call that created this event. 1 indexed.
924
+ */
925
+ functionCallTryNumber?: number;
926
+
927
+ /**
928
+ * The inbound email that triggered this event.
929
+ */
930
+ inboundEmail?: ErrorsAPI.InboundEmailEvent;
931
+
932
+ metadata?: CollectionProcessingEvent.Metadata;
933
+ }
934
+
935
+ export namespace CollectionProcessingEvent {
936
+ export interface Metadata {
937
+ durationFunctionToEventSeconds?: number;
938
+ }
939
+ }
940
+ }
941
+
942
+ export interface OutputRetrieveResponse {
943
+ /**
944
+ * The output event. Polymorphic by `eventType`.
945
+ */
946
+ output: Event;
947
+ }
948
+
949
+ export interface OutputListParams extends OutputsPageParams {
950
+ /**
951
+ * Filter to outputs from specific calls.
952
+ */
953
+ callIDs?: Array<string>;
954
+
955
+ functionIDs?: Array<string>;
956
+
957
+ functionNames?: Array<string>;
958
+
959
+ /**
960
+ * When `true`, includes intermediate events (those that spawned a downstream
961
+ * function call). Default: `false`.
962
+ */
963
+ includeIntermediate?: boolean;
964
+
965
+ referenceIDs?: Array<string>;
966
+
967
+ /**
968
+ * Case-insensitive substring match against `referenceID`.
969
+ */
970
+ referenceIDSubstring?: string;
971
+
972
+ sortOrder?: 'asc' | 'desc';
973
+
974
+ workflowIDs?: Array<string>;
975
+
976
+ workflowNames?: Array<string>;
977
+ }
978
+
979
+ export declare namespace Outputs {
980
+ export {
981
+ type AnyType as AnyType,
982
+ type Event as Event,
983
+ type OutputRetrieveResponse as OutputRetrieveResponse,
984
+ type EventsOutputsPage as EventsOutputsPage,
985
+ type OutputListParams as OutputListParams,
986
+ };
987
+ }