@distilled.cloud/axiom 0.30.3 → 1.0.0-rc.2

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 (492) hide show
  1. package/lib/credentials.d.ts +7 -1
  2. package/lib/credentials.d.ts.map +1 -1
  3. package/lib/credentials.js +17 -1
  4. package/lib/credentials.js.map +1 -1
  5. package/lib/edge-ingest.d.ts +6 -1
  6. package/lib/edge-ingest.d.ts.map +1 -1
  7. package/lib/edge-ingest.js +6 -1
  8. package/lib/edge-ingest.js.map +1 -1
  9. package/lib/edge-query.d.ts +6 -1
  10. package/lib/edge-query.d.ts.map +1 -1
  11. package/lib/edge-query.js +6 -1
  12. package/lib/edge-query.js.map +1 -1
  13. package/lib/errors.d.ts +7 -2
  14. package/lib/errors.d.ts.map +1 -1
  15. package/lib/errors.js +7 -4
  16. package/lib/errors.js.map +1 -1
  17. package/lib/index.d.ts +18 -11
  18. package/lib/index.d.ts.map +1 -1
  19. package/lib/index.js +22 -11
  20. package/lib/index.js.map +1 -1
  21. package/lib/protocol.d.ts +28 -0
  22. package/lib/protocol.d.ts.map +1 -0
  23. package/lib/protocol.js +86 -0
  24. package/lib/protocol.js.map +1 -0
  25. package/lib/retry.d.ts +3 -4
  26. package/lib/retry.d.ts.map +1 -1
  27. package/lib/retry.js +3 -4
  28. package/lib/retry.js.map +1 -1
  29. package/lib/services/edge_ingest.d.ts +52 -0
  30. package/lib/services/edge_ingest.d.ts.map +1 -0
  31. package/lib/services/edge_ingest.js +59 -0
  32. package/lib/services/edge_ingest.js.map +1 -0
  33. package/lib/services/edge_query.d.ts +93 -0
  34. package/lib/services/edge_query.d.ts.map +1 -0
  35. package/lib/services/edge_query.js +81 -0
  36. package/lib/services/edge_query.js.map +1 -0
  37. package/lib/services/index.d.ts +4 -0
  38. package/lib/services/index.d.ts.map +1 -0
  39. package/lib/services/index.js +5 -0
  40. package/lib/services/index.js.map +1 -0
  41. package/lib/services/v2.d.ts +2772 -0
  42. package/lib/services/v2.d.ts.map +1 -0
  43. package/lib/services/v2.js +2494 -0
  44. package/lib/services/v2.js.map +1 -0
  45. package/lib/traits.d.ts +8 -2
  46. package/lib/traits.d.ts.map +1 -1
  47. package/lib/traits.js +8 -2
  48. package/lib/traits.js.map +1 -1
  49. package/package.json +37 -42
  50. package/src/credentials.ts +27 -2
  51. package/src/edge-ingest.ts +6 -1
  52. package/src/edge-query.ts +6 -1
  53. package/src/errors.ts +7 -4
  54. package/src/index.ts +33 -11
  55. package/src/protocol.ts +111 -0
  56. package/src/retry.ts +3 -4
  57. package/src/services/edge_ingest.ts +124 -0
  58. package/src/services/edge_query.ts +197 -0
  59. package/src/services/index.ts +4 -0
  60. package/src/services/v2.ts +6647 -0
  61. package/src/traits.ts +42 -2
  62. package/README.md +0 -70
  63. package/lib/category.d.ts +0 -5
  64. package/lib/category.d.ts.map +0 -1
  65. package/lib/category.js +0 -5
  66. package/lib/category.js.map +0 -1
  67. package/lib/client.d.ts +0 -11
  68. package/lib/client.d.ts.map +0 -1
  69. package/lib/client.js +0 -108
  70. package/lib/client.js.map +0 -1
  71. package/lib/operations/index.d.ts +0 -2
  72. package/lib/operations/index.d.ts.map +0 -1
  73. package/lib/operations/index.js +0 -2
  74. package/lib/operations/index.js.map +0 -1
  75. package/lib/operations/v1-edge-ingest/index.d.ts +0 -2
  76. package/lib/operations/v1-edge-ingest/index.d.ts.map +0 -1
  77. package/lib/operations/v1-edge-ingest/index.js +0 -2
  78. package/lib/operations/v1-edge-ingest/index.js.map +0 -1
  79. package/lib/operations/v1-edge-ingest/ingestToDataset.d.ts +0 -31
  80. package/lib/operations/v1-edge-ingest/ingestToDataset.d.ts.map +0 -1
  81. package/lib/operations/v1-edge-ingest/ingestToDataset.js +0 -36
  82. package/lib/operations/v1-edge-ingest/ingestToDataset.js.map +0 -1
  83. package/lib/operations/v1-edge-query/index.d.ts +0 -2
  84. package/lib/operations/v1-edge-query/index.d.ts.map +0 -1
  85. package/lib/operations/v1-edge-query/index.js +0 -2
  86. package/lib/operations/v1-edge-query/index.js.map +0 -1
  87. package/lib/operations/v1-edge-query/queryApl.d.ts +0 -66
  88. package/lib/operations/v1-edge-query/queryApl.d.ts.map +0 -1
  89. package/lib/operations/v1-edge-query/queryApl.js +0 -71
  90. package/lib/operations/v1-edge-query/queryApl.js.map +0 -1
  91. package/lib/operations/v2/createAPIToken.d.ts +0 -84
  92. package/lib/operations/v2/createAPIToken.d.ts.map +0 -1
  93. package/lib/operations/v2/createAPIToken.js +0 -89
  94. package/lib/operations/v2/createAPIToken.js.map +0 -1
  95. package/lib/operations/v2/createAnnotation.d.ts +0 -28
  96. package/lib/operations/v2/createAnnotation.d.ts.map +0 -1
  97. package/lib/operations/v2/createAnnotation.js +0 -33
  98. package/lib/operations/v2/createAnnotation.js.map +0 -1
  99. package/lib/operations/v2/createDashboard.d.ts +0 -332
  100. package/lib/operations/v2/createDashboard.d.ts.map +0 -1
  101. package/lib/operations/v2/createDashboard.js +0 -113
  102. package/lib/operations/v2/createDashboard.js.map +0 -1
  103. package/lib/operations/v2/createDataset.d.ts +0 -36
  104. package/lib/operations/v2/createDataset.d.ts.map +0 -1
  105. package/lib/operations/v2/createDataset.js +0 -51
  106. package/lib/operations/v2/createDataset.js.map +0 -1
  107. package/lib/operations/v2/createGroup.d.ts +0 -26
  108. package/lib/operations/v2/createGroup.d.ts.map +0 -1
  109. package/lib/operations/v2/createGroup.js +0 -31
  110. package/lib/operations/v2/createGroup.js.map +0 -1
  111. package/lib/operations/v2/createMapField.d.ts +0 -13
  112. package/lib/operations/v2/createMapField.d.ts.map +0 -1
  113. package/lib/operations/v2/createMapField.js +0 -18
  114. package/lib/operations/v2/createMapField.js.map +0 -1
  115. package/lib/operations/v2/createMonitor.d.ts +0 -66
  116. package/lib/operations/v2/createMonitor.d.ts.map +0 -1
  117. package/lib/operations/v2/createMonitor.js +0 -83
  118. package/lib/operations/v2/createMonitor.js.map +0 -1
  119. package/lib/operations/v2/createNotifier.d.ts +0 -95
  120. package/lib/operations/v2/createNotifier.d.ts.map +0 -1
  121. package/lib/operations/v2/createNotifier.js +0 -101
  122. package/lib/operations/v2/createNotifier.js.map +0 -1
  123. package/lib/operations/v2/createOrg.d.ts +0 -50
  124. package/lib/operations/v2/createOrg.d.ts.map +0 -1
  125. package/lib/operations/v2/createOrg.js +0 -70
  126. package/lib/operations/v2/createOrg.js.map +0 -1
  127. package/lib/operations/v2/createRole.d.ts +0 -84
  128. package/lib/operations/v2/createRole.d.ts.map +0 -1
  129. package/lib/operations/v2/createRole.js +0 -89
  130. package/lib/operations/v2/createRole.js.map +0 -1
  131. package/lib/operations/v2/createStarred.d.ts +0 -85
  132. package/lib/operations/v2/createStarred.d.ts.map +0 -1
  133. package/lib/operations/v2/createStarred.js +0 -100
  134. package/lib/operations/v2/createStarred.js.map +0 -1
  135. package/lib/operations/v2/createUser.d.ts +0 -23
  136. package/lib/operations/v2/createUser.d.ts.map +0 -1
  137. package/lib/operations/v2/createUser.js +0 -28
  138. package/lib/operations/v2/createUser.js.map +0 -1
  139. package/lib/operations/v2/createView.d.ts +0 -22
  140. package/lib/operations/v2/createView.d.ts.map +0 -1
  141. package/lib/operations/v2/createView.js +0 -27
  142. package/lib/operations/v2/createView.js.map +0 -1
  143. package/lib/operations/v2/createVirtualField.d.ts +0 -23
  144. package/lib/operations/v2/createVirtualField.d.ts.map +0 -1
  145. package/lib/operations/v2/createVirtualField.js +0 -30
  146. package/lib/operations/v2/createVirtualField.js.map +0 -1
  147. package/lib/operations/v2/deleteAPIToken.d.ts +0 -13
  148. package/lib/operations/v2/deleteAPIToken.d.ts.map +0 -1
  149. package/lib/operations/v2/deleteAPIToken.js +0 -19
  150. package/lib/operations/v2/deleteAPIToken.js.map +0 -1
  151. package/lib/operations/v2/deleteAnnotation.d.ts +0 -15
  152. package/lib/operations/v2/deleteAnnotation.d.ts.map +0 -1
  153. package/lib/operations/v2/deleteAnnotation.js +0 -21
  154. package/lib/operations/v2/deleteAnnotation.js.map +0 -1
  155. package/lib/operations/v2/deleteDashboard.d.ts +0 -15
  156. package/lib/operations/v2/deleteDashboard.d.ts.map +0 -1
  157. package/lib/operations/v2/deleteDashboard.js +0 -21
  158. package/lib/operations/v2/deleteDashboard.js.map +0 -1
  159. package/lib/operations/v2/deleteDataset.d.ts +0 -13
  160. package/lib/operations/v2/deleteDataset.d.ts.map +0 -1
  161. package/lib/operations/v2/deleteDataset.js +0 -19
  162. package/lib/operations/v2/deleteDataset.js.map +0 -1
  163. package/lib/operations/v2/deleteGroup.d.ts +0 -17
  164. package/lib/operations/v2/deleteGroup.d.ts.map +0 -1
  165. package/lib/operations/v2/deleteGroup.js +0 -23
  166. package/lib/operations/v2/deleteGroup.js.map +0 -1
  167. package/lib/operations/v2/deleteMapField.d.ts +0 -11
  168. package/lib/operations/v2/deleteMapField.d.ts.map +0 -1
  169. package/lib/operations/v2/deleteMapField.js +0 -20
  170. package/lib/operations/v2/deleteMapField.js.map +0 -1
  171. package/lib/operations/v2/deleteMonitor.d.ts +0 -13
  172. package/lib/operations/v2/deleteMonitor.d.ts.map +0 -1
  173. package/lib/operations/v2/deleteMonitor.js +0 -19
  174. package/lib/operations/v2/deleteMonitor.js.map +0 -1
  175. package/lib/operations/v2/deleteNotifier.d.ts +0 -13
  176. package/lib/operations/v2/deleteNotifier.d.ts.map +0 -1
  177. package/lib/operations/v2/deleteNotifier.js +0 -19
  178. package/lib/operations/v2/deleteNotifier.js.map +0 -1
  179. package/lib/operations/v2/deleteRole.d.ts +0 -17
  180. package/lib/operations/v2/deleteRole.d.ts.map +0 -1
  181. package/lib/operations/v2/deleteRole.js +0 -23
  182. package/lib/operations/v2/deleteRole.js.map +0 -1
  183. package/lib/operations/v2/deleteStarred.d.ts +0 -10
  184. package/lib/operations/v2/deleteStarred.d.ts.map +0 -1
  185. package/lib/operations/v2/deleteStarred.js +0 -16
  186. package/lib/operations/v2/deleteStarred.js.map +0 -1
  187. package/lib/operations/v2/deleteView.d.ts +0 -10
  188. package/lib/operations/v2/deleteView.d.ts.map +0 -1
  189. package/lib/operations/v2/deleteView.js +0 -16
  190. package/lib/operations/v2/deleteView.js.map +0 -1
  191. package/lib/operations/v2/deleteVirtualField.d.ts +0 -10
  192. package/lib/operations/v2/deleteVirtualField.d.ts.map +0 -1
  193. package/lib/operations/v2/deleteVirtualField.js +0 -17
  194. package/lib/operations/v2/deleteVirtualField.js.map +0 -1
  195. package/lib/operations/v2/getAPIToken.d.ts +0 -50
  196. package/lib/operations/v2/getAPIToken.d.ts.map +0 -1
  197. package/lib/operations/v2/getAPIToken.js +0 -55
  198. package/lib/operations/v2/getAPIToken.js.map +0 -1
  199. package/lib/operations/v2/getAPITokens.d.ts +0 -48
  200. package/lib/operations/v2/getAPITokens.d.ts.map +0 -1
  201. package/lib/operations/v2/getAPITokens.js +0 -51
  202. package/lib/operations/v2/getAPITokens.js.map +0 -1
  203. package/lib/operations/v2/getAnnotation.d.ts +0 -24
  204. package/lib/operations/v2/getAnnotation.d.ts.map +0 -1
  205. package/lib/operations/v2/getAnnotation.js +0 -29
  206. package/lib/operations/v2/getAnnotation.js.map +0 -1
  207. package/lib/operations/v2/getAnnotations.d.ts +0 -27
  208. package/lib/operations/v2/getAnnotations.d.ts.map +0 -1
  209. package/lib/operations/v2/getAnnotations.js +0 -31
  210. package/lib/operations/v2/getAnnotations.js.map +0 -1
  211. package/lib/operations/v2/getCurrentUser.d.ts +0 -19
  212. package/lib/operations/v2/getCurrentUser.d.ts.map +0 -1
  213. package/lib/operations/v2/getCurrentUser.js +0 -22
  214. package/lib/operations/v2/getCurrentUser.js.map +0 -1
  215. package/lib/operations/v2/getDashboard.d.ts +0 -174
  216. package/lib/operations/v2/getDashboard.d.ts.map +0 -1
  217. package/lib/operations/v2/getDashboard.js +0 -67
  218. package/lib/operations/v2/getDashboard.js.map +0 -1
  219. package/lib/operations/v2/getDataset.d.ts +0 -28
  220. package/lib/operations/v2/getDataset.d.ts.map +0 -1
  221. package/lib/operations/v2/getDataset.js +0 -38
  222. package/lib/operations/v2/getDataset.js.map +0 -1
  223. package/lib/operations/v2/getDatasets.d.ts +0 -27
  224. package/lib/operations/v2/getDatasets.d.ts.map +0 -1
  225. package/lib/operations/v2/getDatasets.js +0 -36
  226. package/lib/operations/v2/getDatasets.js.map +0 -1
  227. package/lib/operations/v2/getFieldForDataset.d.ts +0 -17
  228. package/lib/operations/v2/getFieldForDataset.d.ts.map +0 -1
  229. package/lib/operations/v2/getFieldForDataset.js +0 -27
  230. package/lib/operations/v2/getFieldForDataset.js.map +0 -1
  231. package/lib/operations/v2/getFieldsForDataset.d.ts +0 -16
  232. package/lib/operations/v2/getFieldsForDataset.d.ts.map +0 -1
  233. package/lib/operations/v2/getFieldsForDataset.js +0 -23
  234. package/lib/operations/v2/getFieldsForDataset.js.map +0 -1
  235. package/lib/operations/v2/getGroupById.d.ts +0 -24
  236. package/lib/operations/v2/getGroupById.d.ts.map +0 -1
  237. package/lib/operations/v2/getGroupById.js +0 -29
  238. package/lib/operations/v2/getGroupById.js.map +0 -1
  239. package/lib/operations/v2/getMapFields.d.ts +0 -10
  240. package/lib/operations/v2/getMapFields.d.ts.map +0 -1
  241. package/lib/operations/v2/getMapFields.js +0 -15
  242. package/lib/operations/v2/getMapFields.js.map +0 -1
  243. package/lib/operations/v2/getMonitor.d.ts +0 -43
  244. package/lib/operations/v2/getMonitor.d.ts.map +0 -1
  245. package/lib/operations/v2/getMonitor.js +0 -54
  246. package/lib/operations/v2/getMonitor.js.map +0 -1
  247. package/lib/operations/v2/getMonitorHistory.d.ts +0 -23
  248. package/lib/operations/v2/getMonitorHistory.d.ts.map +0 -1
  249. package/lib/operations/v2/getMonitorHistory.js +0 -28
  250. package/lib/operations/v2/getMonitorHistory.js.map +0 -1
  251. package/lib/operations/v2/getMonitors.d.ts +0 -39
  252. package/lib/operations/v2/getMonitors.d.ts.map +0 -1
  253. package/lib/operations/v2/getMonitors.js +0 -48
  254. package/lib/operations/v2/getMonitors.js.map +0 -1
  255. package/lib/operations/v2/getNotifier.d.ts +0 -58
  256. package/lib/operations/v2/getNotifier.d.ts.map +0 -1
  257. package/lib/operations/v2/getNotifier.js +0 -64
  258. package/lib/operations/v2/getNotifier.js.map +0 -1
  259. package/lib/operations/v2/getNotifiers.d.ts +0 -54
  260. package/lib/operations/v2/getNotifiers.d.ts.map +0 -1
  261. package/lib/operations/v2/getNotifiers.js +0 -58
  262. package/lib/operations/v2/getNotifiers.js.map +0 -1
  263. package/lib/operations/v2/getOrg.d.ts +0 -50
  264. package/lib/operations/v2/getOrg.d.ts.map +0 -1
  265. package/lib/operations/v2/getOrg.js +0 -71
  266. package/lib/operations/v2/getOrg.js.map +0 -1
  267. package/lib/operations/v2/getOrgs.d.ts +0 -48
  268. package/lib/operations/v2/getOrgs.d.ts.map +0 -1
  269. package/lib/operations/v2/getOrgs.js +0 -67
  270. package/lib/operations/v2/getOrgs.js.map +0 -1
  271. package/lib/operations/v2/getRoleById.d.ts +0 -53
  272. package/lib/operations/v2/getRoleById.d.ts.map +0 -1
  273. package/lib/operations/v2/getRoleById.js +0 -58
  274. package/lib/operations/v2/getRoleById.js.map +0 -1
  275. package/lib/operations/v2/getStarred.d.ts +0 -49
  276. package/lib/operations/v2/getStarred.d.ts.map +0 -1
  277. package/lib/operations/v2/getStarred.js +0 -59
  278. package/lib/operations/v2/getStarred.js.map +0 -1
  279. package/lib/operations/v2/getStarredQueries.d.ts +0 -59
  280. package/lib/operations/v2/getStarredQueries.d.ts.map +0 -1
  281. package/lib/operations/v2/getStarredQueries.js +0 -68
  282. package/lib/operations/v2/getStarredQueries.js.map +0 -1
  283. package/lib/operations/v2/getUser.d.ts +0 -21
  284. package/lib/operations/v2/getUser.d.ts.map +0 -1
  285. package/lib/operations/v2/getUser.js +0 -26
  286. package/lib/operations/v2/getUser.js.map +0 -1
  287. package/lib/operations/v2/getUsers.d.ts +0 -19
  288. package/lib/operations/v2/getUsers.d.ts.map +0 -1
  289. package/lib/operations/v2/getUsers.js +0 -22
  290. package/lib/operations/v2/getUsers.js.map +0 -1
  291. package/lib/operations/v2/getView.d.ts +0 -17
  292. package/lib/operations/v2/getView.d.ts.map +0 -1
  293. package/lib/operations/v2/getView.js +0 -22
  294. package/lib/operations/v2/getView.js.map +0 -1
  295. package/lib/operations/v2/getViews.d.ts +0 -15
  296. package/lib/operations/v2/getViews.d.ts.map +0 -1
  297. package/lib/operations/v2/getViews.js +0 -18
  298. package/lib/operations/v2/getViews.js.map +0 -1
  299. package/lib/operations/v2/getVirtualField.d.ts +0 -18
  300. package/lib/operations/v2/getVirtualField.d.ts.map +0 -1
  301. package/lib/operations/v2/getVirtualField.js +0 -23
  302. package/lib/operations/v2/getVirtualField.js.map +0 -1
  303. package/lib/operations/v2/getVirtualFields.d.ts +0 -17
  304. package/lib/operations/v2/getVirtualFields.d.ts.map +0 -1
  305. package/lib/operations/v2/getVirtualFields.js +0 -21
  306. package/lib/operations/v2/getVirtualFields.js.map +0 -1
  307. package/lib/operations/v2/index.d.ts +0 -78
  308. package/lib/operations/v2/index.d.ts.map +0 -1
  309. package/lib/operations/v2/index.js +0 -78
  310. package/lib/operations/v2/index.js.map +0 -1
  311. package/lib/operations/v2/listDashboards.d.ts +0 -174
  312. package/lib/operations/v2/listDashboards.d.ts.map +0 -1
  313. package/lib/operations/v2/listDashboards.js +0 -66
  314. package/lib/operations/v2/listDashboards.js.map +0 -1
  315. package/lib/operations/v2/listGroups.d.ts +0 -20
  316. package/lib/operations/v2/listGroups.d.ts.map +0 -1
  317. package/lib/operations/v2/listGroups.js +0 -23
  318. package/lib/operations/v2/listGroups.js.map +0 -1
  319. package/lib/operations/v2/listRoles.d.ts +0 -49
  320. package/lib/operations/v2/listRoles.d.ts.map +0 -1
  321. package/lib/operations/v2/listRoles.js +0 -52
  322. package/lib/operations/v2/listRoles.js.map +0 -1
  323. package/lib/operations/v2/patchDashboardChart.d.ts +0 -183
  324. package/lib/operations/v2/patchDashboardChart.d.ts.map +0 -1
  325. package/lib/operations/v2/patchDashboardChart.js +0 -81
  326. package/lib/operations/v2/patchDashboardChart.js.map +0 -1
  327. package/lib/operations/v2/regenerateAPIToken.d.ts +0 -89
  328. package/lib/operations/v2/regenerateAPIToken.d.ts.map +0 -1
  329. package/lib/operations/v2/regenerateAPIToken.js +0 -96
  330. package/lib/operations/v2/regenerateAPIToken.js.map +0 -1
  331. package/lib/operations/v2/removeUserFromOrg.d.ts +0 -13
  332. package/lib/operations/v2/removeUserFromOrg.d.ts.map +0 -1
  333. package/lib/operations/v2/removeUserFromOrg.js +0 -19
  334. package/lib/operations/v2/removeUserFromOrg.js.map +0 -1
  335. package/lib/operations/v2/trimDataset.d.ts +0 -16
  336. package/lib/operations/v2/trimDataset.d.ts.map +0 -1
  337. package/lib/operations/v2/trimDataset.js +0 -22
  338. package/lib/operations/v2/trimDataset.js.map +0 -1
  339. package/lib/operations/v2/updateAnnotation.d.ts +0 -31
  340. package/lib/operations/v2/updateAnnotation.d.ts.map +0 -1
  341. package/lib/operations/v2/updateAnnotation.js +0 -36
  342. package/lib/operations/v2/updateAnnotation.js.map +0 -1
  343. package/lib/operations/v2/updateCurrentUser.d.ts +0 -20
  344. package/lib/operations/v2/updateCurrentUser.d.ts.map +0 -1
  345. package/lib/operations/v2/updateCurrentUser.js +0 -25
  346. package/lib/operations/v2/updateCurrentUser.js.map +0 -1
  347. package/lib/operations/v2/updateDashboard.d.ts +0 -332
  348. package/lib/operations/v2/updateDashboard.d.ts.map +0 -1
  349. package/lib/operations/v2/updateDashboard.js +0 -113
  350. package/lib/operations/v2/updateDashboard.js.map +0 -1
  351. package/lib/operations/v2/updateDataset.d.ts +0 -31
  352. package/lib/operations/v2/updateDataset.d.ts.map +0 -1
  353. package/lib/operations/v2/updateDataset.js +0 -41
  354. package/lib/operations/v2/updateDataset.js.map +0 -1
  355. package/lib/operations/v2/updateFieldForDataset.d.ts +0 -22
  356. package/lib/operations/v2/updateFieldForDataset.d.ts.map +0 -1
  357. package/lib/operations/v2/updateFieldForDataset.js +0 -32
  358. package/lib/operations/v2/updateFieldForDataset.js.map +0 -1
  359. package/lib/operations/v2/updateGroup.d.ts +0 -29
  360. package/lib/operations/v2/updateGroup.d.ts.map +0 -1
  361. package/lib/operations/v2/updateGroup.js +0 -34
  362. package/lib/operations/v2/updateGroup.js.map +0 -1
  363. package/lib/operations/v2/updateMapFields.d.ts +0 -10
  364. package/lib/operations/v2/updateMapFields.d.ts.map +0 -1
  365. package/lib/operations/v2/updateMapFields.js +0 -15
  366. package/lib/operations/v2/updateMapFields.js.map +0 -1
  367. package/lib/operations/v2/updateMonitor.d.ts +0 -67
  368. package/lib/operations/v2/updateMonitor.d.ts.map +0 -1
  369. package/lib/operations/v2/updateMonitor.js +0 -84
  370. package/lib/operations/v2/updateMonitor.js.map +0 -1
  371. package/lib/operations/v2/updateNotifier.d.ts +0 -96
  372. package/lib/operations/v2/updateNotifier.d.ts.map +0 -1
  373. package/lib/operations/v2/updateNotifier.js +0 -102
  374. package/lib/operations/v2/updateNotifier.js.map +0 -1
  375. package/lib/operations/v2/updateOrg.d.ts +0 -51
  376. package/lib/operations/v2/updateOrg.d.ts.map +0 -1
  377. package/lib/operations/v2/updateOrg.js +0 -72
  378. package/lib/operations/v2/updateOrg.js.map +0 -1
  379. package/lib/operations/v2/updateRole.d.ts +0 -87
  380. package/lib/operations/v2/updateRole.d.ts.map +0 -1
  381. package/lib/operations/v2/updateRole.js +0 -92
  382. package/lib/operations/v2/updateRole.js.map +0 -1
  383. package/lib/operations/v2/updateStarred.d.ts +0 -86
  384. package/lib/operations/v2/updateStarred.d.ts.map +0 -1
  385. package/lib/operations/v2/updateStarred.js +0 -101
  386. package/lib/operations/v2/updateStarred.js.map +0 -1
  387. package/lib/operations/v2/updateUserRole.d.ts +0 -22
  388. package/lib/operations/v2/updateUserRole.d.ts.map +0 -1
  389. package/lib/operations/v2/updateUserRole.js +0 -27
  390. package/lib/operations/v2/updateUserRole.js.map +0 -1
  391. package/lib/operations/v2/updateView.d.ts +0 -23
  392. package/lib/operations/v2/updateView.d.ts.map +0 -1
  393. package/lib/operations/v2/updateView.js +0 -28
  394. package/lib/operations/v2/updateView.js.map +0 -1
  395. package/lib/operations/v2/updateVirtualField.d.ts +0 -24
  396. package/lib/operations/v2/updateVirtualField.d.ts.map +0 -1
  397. package/lib/operations/v2/updateVirtualField.js +0 -31
  398. package/lib/operations/v2/updateVirtualField.js.map +0 -1
  399. package/lib/operations/v2/vacuumDataset.d.ts +0 -9
  400. package/lib/operations/v2/vacuumDataset.d.ts.map +0 -1
  401. package/lib/operations/v2/vacuumDataset.js +0 -14
  402. package/lib/operations/v2/vacuumDataset.js.map +0 -1
  403. package/lib/sensitive.d.ts +0 -5
  404. package/lib/sensitive.d.ts.map +0 -1
  405. package/lib/sensitive.js +0 -5
  406. package/lib/sensitive.js.map +0 -1
  407. package/src/category.ts +0 -4
  408. package/src/client.ts +0 -122
  409. package/src/operations/index.ts +0 -1
  410. package/src/operations/v1-edge-ingest/index.ts +0 -1
  411. package/src/operations/v1-edge-ingest/ingestToDataset.ts +0 -60
  412. package/src/operations/v1-edge-query/index.ts +0 -1
  413. package/src/operations/v1-edge-query/queryApl.ts +0 -134
  414. package/src/operations/v2/createAPIToken.ts +0 -272
  415. package/src/operations/v2/createAnnotation.ts +0 -58
  416. package/src/operations/v2/createDashboard.ts +0 -472
  417. package/src/operations/v2/createDataset.ts +0 -92
  418. package/src/operations/v2/createGroup.ts +0 -52
  419. package/src/operations/v2/createMapField.ts +0 -31
  420. package/src/operations/v2/createMonitor.ts +0 -160
  421. package/src/operations/v2/createNotifier.ts +0 -194
  422. package/src/operations/v2/createOrg.ts +0 -135
  423. package/src/operations/v2/createRole.ts +0 -276
  424. package/src/operations/v2/createStarred.ts +0 -203
  425. package/src/operations/v2/createUser.ts +0 -47
  426. package/src/operations/v2/createView.ts +0 -49
  427. package/src/operations/v2/createVirtualField.ts +0 -53
  428. package/src/operations/v2/deleteAPIToken.ts +0 -29
  429. package/src/operations/v2/deleteAnnotation.ts +0 -31
  430. package/src/operations/v2/deleteDashboard.ts +0 -31
  431. package/src/operations/v2/deleteDataset.ts +0 -29
  432. package/src/operations/v2/deleteGroup.ts +0 -33
  433. package/src/operations/v2/deleteMapField.ts +0 -31
  434. package/src/operations/v2/deleteMonitor.ts +0 -29
  435. package/src/operations/v2/deleteNotifier.ts +0 -29
  436. package/src/operations/v2/deleteRole.ts +0 -33
  437. package/src/operations/v2/deleteStarred.ts +0 -26
  438. package/src/operations/v2/deleteView.ts +0 -26
  439. package/src/operations/v2/deleteVirtualField.ts +0 -27
  440. package/src/operations/v2/getAPIToken.ts +0 -150
  441. package/src/operations/v2/getAPITokens.ts +0 -148
  442. package/src/operations/v2/getAnnotation.ts +0 -48
  443. package/src/operations/v2/getAnnotations.ts +0 -54
  444. package/src/operations/v2/getCurrentUser.ts +0 -37
  445. package/src/operations/v2/getDashboard.ts +0 -252
  446. package/src/operations/v2/getDataset.ts +0 -67
  447. package/src/operations/v2/getDatasets.ts +0 -65
  448. package/src/operations/v2/getFieldForDataset.ts +0 -44
  449. package/src/operations/v2/getFieldsForDataset.ts +0 -41
  450. package/src/operations/v2/getGroupById.ts +0 -46
  451. package/src/operations/v2/getMapFields.ts +0 -27
  452. package/src/operations/v2/getMonitor.ts +0 -99
  453. package/src/operations/v2/getMonitorHistory.ts +0 -47
  454. package/src/operations/v2/getMonitors.ts +0 -93
  455. package/src/operations/v2/getNotifier.ts +0 -117
  456. package/src/operations/v2/getNotifiers.ts +0 -111
  457. package/src/operations/v2/getOrg.ts +0 -135
  458. package/src/operations/v2/getOrgs.ts +0 -131
  459. package/src/operations/v2/getRoleById.ts +0 -158
  460. package/src/operations/v2/getStarred.ts +0 -117
  461. package/src/operations/v2/getStarredQueries.ts +0 -134
  462. package/src/operations/v2/getUser.ts +0 -43
  463. package/src/operations/v2/getUsers.ts +0 -39
  464. package/src/operations/v2/getView.ts +0 -39
  465. package/src/operations/v2/getViews.ts +0 -35
  466. package/src/operations/v2/getVirtualField.ts +0 -41
  467. package/src/operations/v2/getVirtualFields.ts +0 -41
  468. package/src/operations/v2/index.ts +0 -77
  469. package/src/operations/v2/listDashboards.ts +0 -254
  470. package/src/operations/v2/listGroups.ts +0 -40
  471. package/src/operations/v2/listRoles.ts +0 -156
  472. package/src/operations/v2/patchDashboardChart.ts +0 -275
  473. package/src/operations/v2/regenerateAPIToken.ts +0 -320
  474. package/src/operations/v2/removeUserFromOrg.ts +0 -29
  475. package/src/operations/v2/trimDataset.ts +0 -33
  476. package/src/operations/v2/updateAnnotation.ts +0 -62
  477. package/src/operations/v2/updateCurrentUser.ts +0 -42
  478. package/src/operations/v2/updateDashboard.ts +0 -472
  479. package/src/operations/v2/updateDataset.ts +0 -73
  480. package/src/operations/v2/updateFieldForDataset.ts +0 -54
  481. package/src/operations/v2/updateGroup.ts +0 -56
  482. package/src/operations/v2/updateMapFields.ts +0 -27
  483. package/src/operations/v2/updateMonitor.ts +0 -162
  484. package/src/operations/v2/updateNotifier.ts +0 -196
  485. package/src/operations/v2/updateOrg.ts +0 -137
  486. package/src/operations/v2/updateRole.ts +0 -280
  487. package/src/operations/v2/updateStarred.ts +0 -205
  488. package/src/operations/v2/updateUserRole.ts +0 -45
  489. package/src/operations/v2/updateView.ts +0 -51
  490. package/src/operations/v2/updateVirtualField.ts +0 -55
  491. package/src/operations/v2/vacuumDataset.ts +0 -24
  492. package/src/sensitive.ts +0 -4
@@ -17,6 +17,12 @@ export interface Config {
17
17
  declare const Credentials_base: Context.ServiceClass<Credentials, "AxiomCredentials", Effect.Effect<Config, never, never>>;
18
18
  export declare class Credentials extends Credentials_base {
19
19
  }
20
+ /** Layer from a plain API token + optional base URL / org ID. */
21
+ export declare const fromApiKey: (config: {
22
+ readonly apiKey: string | Redacted.Redacted<string>;
23
+ readonly apiBaseUrl?: string;
24
+ readonly orgId?: string;
25
+ }) => Layer.Layer<Credentials>;
20
26
  /**
21
27
  * Build {@link Credentials} from environment variables.
22
28
  *
@@ -25,6 +31,6 @@ export declare class Credentials extends Credentials_base {
25
31
  * regional edge deployments). Defaults to `https://api.axiom.co`.
26
32
  * - `AXIOM_ORG_ID` (optional) — organization ID, required for PATs.
27
33
  */
28
- export declare const CredentialsFromEnv: Layer.Layer<Credentials, never, never>;
34
+ export declare const CredentialsFromEnv: Layer.Layer<Credentials>;
29
35
  export {};
30
36
  //# sourceMappingURL=credentials.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"credentials.d.ts","sourceRoot":"","sources":["../src/credentials.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,OAAO,MAAM,gBAAgB,CAAC;AAC1C,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AAEtC,OAAO,KAAK,QAAQ,MAAM,iBAAiB,CAAC;AAE5C,sFAAsF;AACtF,eAAO,MAAM,oBAAoB,yBAAyB,CAAC;AAE3D,MAAM,WAAW,MAAM;IACrB,QAAQ,CAAC,MAAM,EAAE,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;IAC3C,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B;;;;OAIG;IACH,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;CACzB;;AAED,qBAAa,WAAY,SAAQ,gBAGV;CAAG;AAW1B;;;;;;;GAOG;AACH,eAAO,MAAM,kBAAkB,wCA6B9B,CAAC"}
1
+ {"version":3,"file":"credentials.d.ts","sourceRoot":"","sources":["../src/credentials.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,OAAO,MAAM,gBAAgB,CAAC;AAC1C,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AAEtC,OAAO,KAAK,QAAQ,MAAM,iBAAiB,CAAC;AAG5C,sFAAsF;AACtF,eAAO,MAAM,oBAAoB,yBAAyB,CAAC;AAE3D,MAAM,WAAW,MAAM;IACrB,QAAQ,CAAC,MAAM,EAAE,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;IAC3C,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B;;;;OAIG;IACH,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;CACzB;;AAED,qBAAa,WAAY,SAAQ,gBAGV;CAAG;AAE1B,iEAAiE;AACjE,eAAO,MAAM,UAAU,WAAY;IACjC,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;IACpD,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;CACzB,KAAG,KAAK,CAAC,KAAK,CAAC,WAAW,CAUxB,CAAC;AAWJ;;;;;;;GAOG;AACH,eAAO,MAAM,kBAAkB,EAAE,KAAK,CAAC,KAAK,CAAC,WAAW,CA6BvD,CAAC"}
@@ -1,14 +1,30 @@
1
- import { ConfigError } from "@distilled.cloud/core/errors";
1
+ /**
2
+ * Axiom credentials — hand-written.
3
+ *
4
+ * API-compatible port of the distilled v0 axiom credentials module: the
5
+ * `Credentials` service holds an *effect* that resolves the current
6
+ * credentials on every request (the protocol layer resolves it per request
7
+ * on the calling fiber).
8
+ */
2
9
  import * as EffectConfig from "effect/Config";
3
10
  import * as Context from "effect/Context";
4
11
  import * as Effect from "effect/Effect";
5
12
  import * as Layer from "effect/Layer";
6
13
  import * as Option from "effect/Option";
7
14
  import * as Redacted from "effect/Redacted";
15
+ import { ConfigError } from "@distilled.cloud/core/errors";
8
16
  /** Default base URL for Axiom Cloud. Self-hosted users can override via AXIOM_URL. */
9
17
  export const DEFAULT_API_BASE_URL = "https://api.axiom.co";
10
18
  export class Credentials extends Context.Service()("AxiomCredentials") {
11
19
  }
20
+ /** Layer from a plain API token + optional base URL / org ID. */
21
+ export const fromApiKey = (config) => Layer.succeed(Credentials, Effect.succeed({
22
+ apiKey: Redacted.isRedacted(config.apiKey)
23
+ ? config.apiKey
24
+ : Redacted.make(config.apiKey),
25
+ apiBaseUrl: config.apiBaseUrl ?? DEFAULT_API_BASE_URL,
26
+ orgId: config.orgId,
27
+ }));
12
28
  const envConfig = EffectConfig.all({
13
29
  apiToken: EffectConfig.option(EffectConfig.string("AXIOM_TOKEN")),
14
30
  apiKey: EffectConfig.option(EffectConfig.string("AXIOM_API_KEY")),
@@ -1 +1 @@
1
- {"version":3,"file":"credentials.js","sourceRoot":"","sources":["../src/credentials.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAC3D,OAAO,KAAK,YAAY,MAAM,eAAe,CAAC;AAC9C,OAAO,KAAK,OAAO,MAAM,gBAAgB,CAAC;AAC1C,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AACtC,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,QAAQ,MAAM,iBAAiB,CAAC;AAE5C,sFAAsF;AACtF,MAAM,CAAC,MAAM,oBAAoB,GAAG,sBAAsB,CAAC;AAa3D,MAAM,OAAO,WAAY,SAAQ,OAAO,CAAC,OAAO,EAG7C,CAAC,kBAAkB,CAAC;CAAG;AAE1B,MAAM,SAAS,GAAG,YAAY,CAAC,GAAG,CAAC;IACjC,QAAQ,EAAE,YAAY,CAAC,MAAM,CAAC,YAAY,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC;IACjE,MAAM,EAAE,YAAY,CAAC,MAAM,CAAC,YAAY,CAAC,MAAM,CAAC,eAAe,CAAC,CAAC;IACjE,UAAU,EAAE,YAAY,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC,IAAI,CAC/C,YAAY,CAAC,WAAW,CAAC,oBAAoB,CAAC,CAC/C;IACD,KAAK,EAAE,YAAY,CAAC,MAAM,CAAC,YAAY,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC;CAChE,CAAC,CAAC;AA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GAAG,EAAE,CACH,IAAI,WAAW,CAAC;QACd,OAAO,EACL,iEAAiE;KACpE,CAAC,CACL,CACF,CAAC;IACF,MAAM,MAAM,GACV,MAAM,CAAC,cAAc,CAAC,MAAM,CAAC,QAAQ,CAAC;QACtC,MAAM,CAAC,cAAc,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IAEvC,IAAI,CAAC,MAAM,EAAE,CAAC;QACZ,OAAO,KAAK,CAAC,CAAC,IAAI,WAAW,CAAC;YAC5B,OAAO,EACL,iEAAiE;SACpE,CAAC,CAAC;IACL,CAAC;IAED,OAAO;QACL,MAAM,EAAE,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC;QAC7B,UAAU,EAAE,MAAM,CAAC,UAAU;QAC7B,KAAK,EAAE,MAAM,CAAC,cAAc,CAAC,MAAM,CAAC,KAAK,CAAC;KAC3C,CAAC;AACJ,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CACtB,CAAC"}
@@ -1,2 +1,7 @@
1
- export * from "./operations/v1-edge-ingest/index.ts";
1
+ /**
2
+ * `@distilled.cloud/axiom/edge-ingest` — the v1 edge ingest API
3
+ * (`ingestToDataset`), served from the same canonical host
4
+ * (https://api.axiom.co) under the `/v1` prefix.
5
+ */
6
+ export * from "./services/edge_ingest.ts";
2
7
  //# sourceMappingURL=edge-ingest.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"edge-ingest.d.ts","sourceRoot":"","sources":["../src/edge-ingest.ts"],"names":[],"mappings":"AAAA,cAAc,sCAAsC,CAAC"}
1
+ {"version":3,"file":"edge-ingest.d.ts","sourceRoot":"","sources":["../src/edge-ingest.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,cAAc,2BAA2B,CAAC"}
@@ -1,2 +1,7 @@
1
- export * from "./operations/v1-edge-ingest/index.js";
1
+ /**
2
+ * `@distilled.cloud/axiom/edge-ingest` — the v1 edge ingest API
3
+ * (`ingestToDataset`), served from the same canonical host
4
+ * (https://api.axiom.co) under the `/v1` prefix.
5
+ */
6
+ export * from "./services/edge_ingest.js";
2
7
  //# sourceMappingURL=edge-ingest.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"edge-ingest.js","sourceRoot":"","sources":["../src/edge-ingest.ts"],"names":[],"mappings":"AAAA,cAAc,sCAAsC,CAAC"}
1
+ {"version":3,"file":"edge-ingest.js","sourceRoot":"","sources":["../src/edge-ingest.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,cAAc,2BAA2B,CAAC"}
@@ -1,2 +1,7 @@
1
- export * from "./operations/v1-edge-query/index.ts";
1
+ /**
2
+ * `@distilled.cloud/axiom/edge-query` — the v1 edge query API (`queryApl`),
3
+ * served from the same canonical host (https://api.axiom.co) under the `/v1`
4
+ * prefix.
5
+ */
6
+ export * from "./services/edge_query.ts";
2
7
  //# sourceMappingURL=edge-query.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"edge-query.d.ts","sourceRoot":"","sources":["../src/edge-query.ts"],"names":[],"mappings":"AAAA,cAAc,qCAAqC,CAAC"}
1
+ {"version":3,"file":"edge-query.d.ts","sourceRoot":"","sources":["../src/edge-query.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,cAAc,0BAA0B,CAAC"}
package/lib/edge-query.js CHANGED
@@ -1,2 +1,7 @@
1
- export * from "./operations/v1-edge-query/index.js";
1
+ /**
2
+ * `@distilled.cloud/axiom/edge-query` — the v1 edge query API (`queryApl`),
3
+ * served from the same canonical host (https://api.axiom.co) under the `/v1`
4
+ * prefix.
5
+ */
6
+ export * from "./services/edge_query.js";
2
7
  //# sourceMappingURL=edge-query.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"edge-query.js","sourceRoot":"","sources":["../src/edge-query.ts"],"names":[],"mappings":"AAAA,cAAc,qCAAqC,CAAC"}
1
+ {"version":3,"file":"edge-query.js","sourceRoot":"","sources":["../src/edge-query.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,cAAc,0BAA0B,CAAC"}
package/lib/errors.d.ts CHANGED
@@ -1,8 +1,11 @@
1
1
  /**
2
2
  * Axiom-specific error types.
3
3
  *
4
- * Re-exports common HTTP errors from sdk-core and adds Axiom-specific
5
- * error matching and API error types.
4
+ * Re-exports the common HTTP errors from core and adds the Axiom fallback
5
+ * errors. Note the generated service modules additionally define their own
6
+ * per-status matcher classes (BadRequest/NotFound/…) for the statuses each
7
+ * operation declares — those share `_tag`s with the core classes here, so
8
+ * `catchTag` works against either.
6
9
  */
7
10
  export { BadGateway, BadRequest, Conflict, ConfigError, Forbidden, GatewayTimeout, InternalServerError, Locked, NotFound, ServiceUnavailable, TooManyRequests, Unauthorized, UnprocessableEntity, HTTP_STATUS_MAP, DEFAULT_ERRORS, API_ERRORS, } from "@distilled.cloud/core/errors";
8
11
  export type { DefaultErrors } from "@distilled.cloud/core/errors";
@@ -16,6 +19,7 @@ declare const UnknownAxiomError_base: Schema.Class<UnknownAxiomError, Schema.Tag
16
19
  ServerError: true;
17
20
  };
18
21
  });
22
+ /** Unknown Axiom error — returned when nothing else matches the failure. */
19
23
  export declare class UnknownAxiomError extends UnknownAxiomError_base {
20
24
  }
21
25
  declare const AxiomParseError_base: Schema.Class<AxiomParseError, Schema.TaggedStruct<"AxiomParseError", {
@@ -26,6 +30,7 @@ declare const AxiomParseError_base: Schema.Class<AxiomParseError, Schema.TaggedS
26
30
  ParseError: true;
27
31
  };
28
32
  });
33
+ /** Schema parse error wrapper (kept for v0 surface parity). */
29
34
  export declare class AxiomParseError extends AxiomParseError_base {
30
35
  }
31
36
  //# sourceMappingURL=errors.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EACL,UAAU,EACV,UAAU,EACV,QAAQ,EACR,WAAW,EACX,SAAS,EACT,cAAc,EACd,mBAAmB,EACnB,MAAM,EACN,QAAQ,EACR,kBAAkB,EAClB,eAAe,EACf,YAAY,EACZ,mBAAmB,EACnB,eAAe,EACf,cAAc,EACd,UAAU,GACX,MAAM,8BAA8B,CAAC;AACtC,YAAY,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAElE,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;;;;;;;;;;AAIxC,qBAAa,iBAAkB,SAAQ,sBAOP;CAAG;;;;;;;;;AAGnC,qBAAa,eAAgB,SAAQ,oBAMN;CAAG"}
1
+ {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,EACL,UAAU,EACV,UAAU,EACV,QAAQ,EACR,WAAW,EACX,SAAS,EACT,cAAc,EACd,mBAAmB,EACnB,MAAM,EACN,QAAQ,EACR,kBAAkB,EAClB,eAAe,EACf,YAAY,EACZ,mBAAmB,EACnB,eAAe,EACf,cAAc,EACd,UAAU,GACX,MAAM,8BAA8B,CAAC;AACtC,YAAY,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAElE,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;;;;;;;;;;AAGxC,4EAA4E;AAC5E,qBAAa,iBAAkB,SAAQ,sBAOP;CAAG;;;;;;;;;AAEnC,+DAA+D;AAC/D,qBAAa,eAAgB,SAAQ,oBAMN;CAAG"}
package/lib/errors.js CHANGED
@@ -1,20 +1,23 @@
1
1
  /**
2
2
  * Axiom-specific error types.
3
3
  *
4
- * Re-exports common HTTP errors from sdk-core and adds Axiom-specific
5
- * error matching and API error types.
4
+ * Re-exports the common HTTP errors from core and adds the Axiom fallback
5
+ * errors. Note the generated service modules additionally define their own
6
+ * per-status matcher classes (BadRequest/NotFound/…) for the statuses each
7
+ * operation declares — those share `_tag`s with the core classes here, so
8
+ * `catchTag` works against either.
6
9
  */
7
10
  export { BadGateway, BadRequest, Conflict, ConfigError, Forbidden, GatewayTimeout, InternalServerError, Locked, NotFound, ServiceUnavailable, TooManyRequests, Unauthorized, UnprocessableEntity, HTTP_STATUS_MAP, DEFAULT_ERRORS, API_ERRORS, } from "@distilled.cloud/core/errors";
8
11
  import * as Schema from "effect/Schema";
9
12
  import * as Category from "@distilled.cloud/core/category";
10
- // Unknown Axiom error - returned when an error code is not recognized
13
+ /** Unknown Axiom error — returned when nothing else matches the failure. */
11
14
  export class UnknownAxiomError extends Schema.TaggedErrorClass()("UnknownAxiomError", {
12
15
  code: Schema.optional(Schema.String),
13
16
  message: Schema.optional(Schema.String),
14
17
  body: Schema.Unknown,
15
18
  }).pipe(Category.withServerError) {
16
19
  }
17
- // Schema parse error wrapper
20
+ /** Schema parse error wrapper (kept for v0 surface parity). */
18
21
  export class AxiomParseError extends Schema.TaggedErrorClass()("AxiomParseError", {
19
22
  body: Schema.Unknown,
20
23
  cause: Schema.Unknown,
package/lib/errors.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"errors.js","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EACL,UAAU,EACV,UAAU,EACV,QAAQ,EACR,WAAW,EACX,SAAS,EACT,cAAc,EACd,mBAAmB,EACnB,MAAM,EACN,QAAQ,EACR,kBAAkB,EAClB,eAAe,EACf,YAAY,EACZ,mBAAmB,EACnB,eAAe,EACf,cAAc,EACd,UAAU,GACX,MAAM,8BAA8B,CAAC;AAGtC,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,QAAQ,MAAM,gCAAgC,CAAC;AAE3D,sEAAsE;AACtE,MAAM,OAAO,iBAAkB,SAAQ,MAAM,CAAC,gBAAgB,EAAqB,CACjF,mBAAmB,EACnB;IACE,IAAI,EAAE,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC;IACpC,OAAO,EAAE,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC;IACvC,IAAI,EAAE,MAAM,CAAC,OAAO;CACrB,CACF,CAAC,IAAI,CAAC,QAAQ,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ED
@@ -1,22 +1,29 @@
1
1
  /**
2
- * Axiom SDK for Effect
2
+ * @distilled.cloud/axiom — Axiom SDK for Effect.
3
3
  *
4
- * The package root re-exports the v2 (control-plane) operations. The v1 edge
5
- * APIs are available under their own subpath imports:
4
+ * `./services` is generated by `scripts/generate.ts` from the Smithy models
5
+ * in `.generated-specs` (written by `scripts/convert.ts` from the three
6
+ * OpenAPI specs in specs/docs/restapi/versions). Everything else in this
7
+ * folder is hand-written.
8
+ *
9
+ * The v2 control-plane API lives under `Services.v2`; the v1 edge APIs are
10
+ * also available under their own subpath imports:
6
11
  *
7
12
  * @example
8
- * \`\`\`ts
9
- * import * as Operations from "@distilled.cloud/axiom";
13
+ * ```ts
14
+ * import * as Axiom from "@distilled.cloud/axiom";
10
15
  * import * as EdgeIngest from "@distilled.cloud/axiom/edge-ingest";
11
16
  * import * as EdgeQuery from "@distilled.cloud/axiom/edge-query";
12
- * \`\`\`
17
+ *
18
+ * const datasets = yield* Axiom.Services.v2.getDatasets({});
19
+ * ```
13
20
  */
14
21
  export * from "./credentials.ts";
15
- export * as Category from "./category.ts";
22
+ export * from "./errors.ts";
16
23
  export * as T from "./traits.ts";
24
+ export { AxiomProtocol, stripNulls, type AxiomOpError, type AxiomOpContext, } from "./protocol.ts";
17
25
  export * as Retry from "./retry.ts";
18
- export { API } from "./client.ts";
19
- export * from "./errors.ts";
20
- export { SensitiveString, SensitiveNullableString } from "./sensitive.ts";
21
- export * from "./operations/index.ts";
26
+ export * as Services from "./services/index.ts";
27
+ export * from "./services/v2.ts";
28
+ export { BadRequest, Conflict, Forbidden, NotFound, UnprocessableEntity, } from "./services/v2.ts";
22
29
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,cAAc,kBAAkB,CAAC;AACjC,OAAO,KAAK,QAAQ,MAAM,eAAe,CAAC;AAC1C,OAAO,KAAK,CAAC,MAAM,aAAa,CAAC;AACjC,OAAO,KAAK,KAAK,MAAM,YAAY,CAAC;AACpC,OAAO,EAAE,GAAG,EAAE,MAAM,aAAa,CAAC;AAClC,cAAc,aAAa,CAAC;AAC5B,OAAO,EAAE,eAAe,EAAE,uBAAuB,EAAE,MAAM,gBAAgB,CAAC;AAC1E,cAAc,uBAAuB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,cAAc,kBAAkB,CAAC;AACjC,cAAc,aAAa,CAAC;AAC5B,OAAO,KAAK,CAAC,MAAM,aAAa,CAAC;AACjC,OAAO,EACL,aAAa,EACb,UAAU,EACV,KAAK,YAAY,EACjB,KAAK,cAAc,GACpB,MAAM,eAAe,CAAC;AACvB,OAAO,KAAK,KAAK,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,QAAQ,MAAM,qBAAqB,CAAC;AAKhD,cAAc,kBAAkB,CAAC;AACjC,OAAO,EACL,UAAU,EACV,QAAQ,EACR,SAAS,EACT,QAAQ,EACR,mBAAmB,GACpB,MAAM,kBAAkB,CAAC"}
package/lib/index.js CHANGED
@@ -1,22 +1,33 @@
1
1
  /**
2
- * Axiom SDK for Effect
2
+ * @distilled.cloud/axiom — Axiom SDK for Effect.
3
3
  *
4
- * The package root re-exports the v2 (control-plane) operations. The v1 edge
5
- * APIs are available under their own subpath imports:
4
+ * `./services` is generated by `scripts/generate.ts` from the Smithy models
5
+ * in `.generated-specs` (written by `scripts/convert.ts` from the three
6
+ * OpenAPI specs in specs/docs/restapi/versions). Everything else in this
7
+ * folder is hand-written.
8
+ *
9
+ * The v2 control-plane API lives under `Services.v2`; the v1 edge APIs are
10
+ * also available under their own subpath imports:
6
11
  *
7
12
  * @example
8
- * \`\`\`ts
9
- * import * as Operations from "@distilled.cloud/axiom";
13
+ * ```ts
14
+ * import * as Axiom from "@distilled.cloud/axiom";
10
15
  * import * as EdgeIngest from "@distilled.cloud/axiom/edge-ingest";
11
16
  * import * as EdgeQuery from "@distilled.cloud/axiom/edge-query";
12
- * \`\`\`
17
+ *
18
+ * const datasets = yield* Axiom.Services.v2.getDatasets({});
19
+ * ```
13
20
  */
14
21
  export * from "./credentials.js";
15
- export * as Category from "./category.js";
22
+ export * from "./errors.js";
16
23
  export * as T from "./traits.js";
24
+ export { AxiomProtocol, stripNulls, } from "./protocol.js";
17
25
  export * as Retry from "./retry.js";
18
- export { API } from "./client.js";
19
- export * from "./errors.js";
20
- export { SensitiveString, SensitiveNullableString } from "./sensitive.js";
21
- export * from "./operations/index.js";
26
+ export * as Services from "./services/index.js";
27
+ // v0-parity surface: the v2 control-plane operations live on the package
28
+ // root (edge-ingest / edge-query stay behind their subpath exports).
29
+ // The service-local typed error classes shadow the same-named shared ones
30
+ // from ./errors.ts — the ops actually raise the service-local classes.
31
+ export * from "./services/v2.js";
32
+ export { BadRequest, Conflict, Forbidden, NotFound, UnprocessableEntity, } from "./services/v2.js";
22
33
  //# sourceMappingURL=index.js.map
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,cAAc,kBAAkB,CAAC;AACjC,OAAO,KAAK,QAAQ,MAAM,eAAe,CAAC;AAC1C,OAAO,KAAK,CAAC,MAAM,aAAa,CAAC;AACjC,OAAO,KAAK,KAAK,MAAM,YAAY,CAAC;AACpC,OAAO,EAAE,GAAG,EAAE,MAAM,aAAa,CAAC;AAClC,cAAc,aAAa,CAAC;AAC5B,OAAO,EAAE,eAAe,EAAE,uBAAuB,EAAE,MAAM,gBAAgB,CAAC;AAC1E,cAAc,uBAAuB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,cAAc,kBAAkB,CAAC;AACjC,cAAc,aAAa,CAAC;AAC5B,OAAO,KAAK,CAAC,MAAM,aAAa,CAAC;AACjC,OAAO,EACL,aAAa,EACb,UAAU,GAGX,MAAM,eAAe,CAAC;AACvB,OAAO,KAAK,KAAK,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,QAAQ,MAAM,qBAAqB,CAAC;AAChD,yEAAyE;AACzE,qEAAqE;AACrE,0EAA0E;AAC1E,uEAAuE;AACvE,cAAc,kBAAkB,CAAC;AACjC,OAAO,EACL,UAAU,EACV,QAAQ,EACR,SAAS,EACT,QAAQ,EACR,mBAAmB,GACpB,MAAM,kBAAkB,CAAC"}
@@ -0,0 +1,28 @@
1
+ import type * as Layer from "effect/Layer";
2
+ import type * as HttpClient from "effect/unstable/http/HttpClient";
3
+ import type * as HttpClientError from "effect/unstable/http/HttpClientError";
4
+ import type * as API from "@distilled.cloud/core/api";
5
+ import type { API_ERRORS, ConfigError } from "@distilled.cloud/core/errors";
6
+ import { Credentials } from "./credentials.ts";
7
+ import { UnknownAxiomError } from "./errors.ts";
8
+ /**
9
+ * Error channel shared by every generated Axiom operation. Generated service
10
+ * files annotate operations with `API.OperationMethod<I, O, AxiomOpError,
11
+ * AxiomOpContext>` explicitly so the compiler never infers these back out of
12
+ * the schema generics.
13
+ */
14
+ export type AxiomOpError = InstanceType<(typeof API_ERRORS)[number]> | UnknownAxiomError | ConfigError | HttpClientError.HttpClientError;
15
+ /** Context (requirements) shared by every generated Axiom operation. */
16
+ export type AxiomOpContext = Credentials | HttpClient.HttpClient;
17
+ /**
18
+ * Axiom's backend (Go) serializes nil slices and omitted optional fields as
19
+ * JSON `null`. The generated output schemas model these as optional members
20
+ * (value or absent), so `null` trips decoding. Recursively drop explicit
21
+ * `null` properties before decoding so optional fields are treated as
22
+ * absent. Keys that are genuinely nullable in the API are patched to
23
+ * nullable in the spec — this hook exists for the far more common "Go nil
24
+ * slice" case.
25
+ */
26
+ export declare const stripNulls: (value: unknown) => unknown;
27
+ export declare const AxiomProtocol: Layer.Layer<API.Protocol>;
28
+ //# sourceMappingURL=protocol.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"protocol.d.ts","sourceRoot":"","sources":["../src/protocol.ts"],"names":[],"mappings":"AAuBA,OAAO,KAAK,KAAK,KAAK,MAAM,cAAc,CAAC;AAE3C,OAAO,KAAK,KAAK,UAAU,MAAM,iCAAiC,CAAC;AACnE,OAAO,KAAK,KAAK,eAAe,MAAM,sCAAsC,CAAC;AAC7E,OAAO,KAAK,KAAK,GAAG,MAAM,2BAA2B,CAAC;AAKtD,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAC5E,OAAO,EAAE,WAAW,EAAe,MAAM,kBAAkB,CAAC;AAC5D,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAEhD;;;;;GAKG;AACH,MAAM,MAAM,YAAY,GACpB,YAAY,CAAC,CAAC,OAAO,UAAU,CAAC,CAAC,MAAM,CAAC,CAAC,GACzC,iBAAiB,GACjB,WAAW,GACX,eAAe,CAAC,eAAe,CAAC;AAEpC,wEAAwE;AACxE,MAAM,MAAM,cAAc,GAAG,WAAW,GAAG,UAAU,CAAC,UAAU,CAAC;AAEjE;;;;;;;;GAQG;AACH,eAAO,MAAM,UAAU,UAAW,OAAO,KAAG,OAW3C,CAAC;AAkBF,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,QAAQ,CAqBhD,CAAC"}
@@ -0,0 +1,86 @@
1
+ /**
2
+ * AxiomProtocol — hand-written.
3
+ *
4
+ * Axiom speaks plain bearer-authenticated JSON REST (no response envelope),
5
+ * so the whole protocol is one `makeRestProtocol` call from
6
+ * `core/protocol-rest`:
7
+ *
8
+ * request: credentials → `Authorization: Bearer <apiKey>` (+ optional
9
+ * `X-Axiom-Org-ID` for Personal Access Tokens) + base URL
10
+ * (default https://api.axiom.co), resolved from the calling
11
+ * fiber on every request
12
+ *
13
+ * response: 2xx JSON is the payload, with explicit JSON `null` properties
14
+ * recursively dropped first ({@link stripNulls} — Axiom's Go
15
+ * backend serializes nil slices/omitted optionals as `null`);
16
+ * non-2xx bodies map to the operation's typed error classes by
17
+ * status, then the shared HTTP-status classes, then
18
+ * {@link UnknownAxiomError}. Axiom returns two error envelope
19
+ * shapes — `{ code, message }` (control-plane / edge-ingest) and
20
+ * `{ error, message }` (edge-query) — unified by a lenient
21
+ * extractor; the HTTP status stays the authoritative signal.
22
+ */
23
+ import * as Effect from "effect/Effect";
24
+ import * as Redacted from "effect/Redacted";
25
+ import { makeRestProtocol, } from "@distilled.cloud/core/protocol-rest";
26
+ import { Credentials } from "./credentials.js";
27
+ import { UnknownAxiomError } from "./errors.js";
28
+ /**
29
+ * Axiom's backend (Go) serializes nil slices and omitted optional fields as
30
+ * JSON `null`. The generated output schemas model these as optional members
31
+ * (value or absent), so `null` trips decoding. Recursively drop explicit
32
+ * `null` properties before decoding so optional fields are treated as
33
+ * absent. Keys that are genuinely nullable in the API are patched to
34
+ * nullable in the spec — this hook exists for the far more common "Go nil
35
+ * slice" case.
36
+ */
37
+ export const stripNulls = (value) => {
38
+ if (Array.isArray(value))
39
+ return value.map(stripNulls);
40
+ if (value && typeof value === "object") {
41
+ const out = {};
42
+ for (const [k, v] of Object.entries(value)) {
43
+ if (v === null)
44
+ continue;
45
+ out[k] = stripNulls(v);
46
+ }
47
+ return out;
48
+ }
49
+ return value;
50
+ };
51
+ /**
52
+ * Unify Axiom's two error envelope shapes (`{ code, message }` and
53
+ * `{ error, message }`, some endpoints plain `{ message }`) into one
54
+ * `{ code?, message? }` pair — v0 semantics: `message ?? error`,
55
+ * `code ?? error`.
56
+ */
57
+ const errorEnvelope = (body) => {
58
+ if (body === null || typeof body !== "object")
59
+ return undefined;
60
+ const b = body;
61
+ const error = typeof b.error === "string" ? b.error : undefined;
62
+ const code = typeof b.code === "string" || typeof b.code === "number" ? b.code : error;
63
+ const message = typeof b.message === "string" ? b.message : error;
64
+ return { code, message };
65
+ };
66
+ export const AxiomProtocol = makeRestProtocol({
67
+ // The Credentials service holds an effect — resolving it here (per
68
+ // request, on the calling fiber) picks up context-provided credentials.
69
+ credentials: Effect.gen(function* () {
70
+ const resolve = yield* Credentials;
71
+ return yield* resolve;
72
+ }),
73
+ baseUrl: (creds) => creds.apiBaseUrl,
74
+ headers: (creds) => ({
75
+ Authorization: `Bearer ${Redacted.value(creds.apiKey)}`,
76
+ ...(creds.orgId ? { "X-Axiom-Org-ID": creds.orgId } : {}),
77
+ }),
78
+ errorEnvelope,
79
+ transformResponse: stripNulls,
80
+ unknownError: ({ code, message, body }) => new UnknownAxiomError({
81
+ code: typeof code === "number" ? String(code) : code,
82
+ message,
83
+ body,
84
+ }),
85
+ });
86
+ //# sourceMappingURL=protocol.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"protocol.js","sourceRoot":"","sources":["../src/protocol.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAExC,OAAO,KAAK,QAAQ,MAAM,iBAAiB,CAAC;AAI5C,OAAO,EACL,gBAAgB,GAEjB,MAAM,qCAAqC,CAAC;AAE7C,OAAO,EAAE,WAAW,EAAe,MAAM,kBAAkB,CAAC;AAC5D,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAiBhD;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,KAAc,EAAW,EAAE;IACpD,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC;QAAE,OAAO,KAAK,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;IACvD,IAAI,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QACvC,MAAM,GAAG,GAA4B,EAAE,CAAC;QACxC,KAAK,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,KA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,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;QACnB,aAAa,EAAE,UAAU,QAAQ,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE;QACvD,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,gBAAgB,EAAE,KAAK,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;KAC1D,CAAC;IACF,aAAa;IACb,iBAAiB,EAAE,UAAU;IAC7B,YAAY,EAAE,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE,EAAE,CACxC,IAAI,iBAAiB,CAAC;QACpB,IAAI,EAAE,OAAO,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI;QACpD,OAAO;QACP,IAAI;KACL,CAAC;CACL,CAAC,CAAC"}
package/lib/retry.d.ts CHANGED
@@ -1,10 +1,9 @@
1
1
  /**
2
2
  * Axiom retry configuration.
3
3
  *
4
- * Defines the per-SDK `Retry` Context.Service tag that
5
- * `packages/axiom/src/client.ts` wires into `makeAPI`. Callers can
6
- * install a blanket retry policy at the layer level and have every
7
- * Axiom API call below it pick it up:
4
+ * Defines the per-SDK `Retry` Context.Service tag that generated operations
5
+ * wire into `API.make`. Callers can install a blanket retry policy at the
6
+ * layer level and have every Axiom API call below it pick it up:
8
7
  *
9
8
  * @example
10
9
  * ```ts
@@ -1 +1 @@
1
- {"version":3,"file":"retry.d.ts","sourceRoot":"","sources":["../src/retry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,KAAK,OAAO,MAAM,gBAAgB,CAAC;AAC1C,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAExC,OAAO,EACL,KAAK,MAAM,EAGZ,MAAM,6BAA6B,CAAC;AAErC,OAAO,EACL,KAAK,OAAO,EACZ,KAAK,OAAO,EACZ,KAAK,MAAM,EACX,WAAW,EACX,QAAQ,EACR,MAAM,EACN,iBAAiB,EACjB,gBAAgB,EAChB,iBAAiB,EACjB,gBAAgB,GACjB,MAAM,6BAA6B,CAAC;;AAErC,qEAAqE;AACrE,qBAAa,KAAM,SAAQ,UAA8C;CAAG;AAE5E,uEAAuE;AACvE,eAAO,MAAM,MAAM,qBAAsB,MAAM,sFACS,CAAC;AAEzD,sCAAsC;AACtC,eAAO,MAAM,IAAI,mFAEhB,CAAC;AAEF,kFAAkF;AAClF,eAAO,MAAM,UAAU,mFAA4B,CAAC;AAEpD,oFAAoF;AACpF,eAAO,MAAM,SAAS,mFAA2B,CAAC"}
1
+ {"version":3,"file":"retry.d.ts","sourceRoot":"","sources":["../src/retry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,KAAK,OAAO,MAAM,gBAAgB,CAAC;AAC1C,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAExC,OAAO,EACL,KAAK,MAAM,EAGZ,MAAM,6BAA6B,CAAC;AAErC,OAAO,EACL,KAAK,OAAO,EACZ,KAAK,OAAO,EACZ,KAAK,MAAM,EACX,WAAW,EACX,QAAQ,EACR,MAAM,EACN,iBAAiB,EACjB,gBAAgB,EAChB,iBAAiB,EACjB,gBAAgB,GACjB,MAAM,6BAA6B,CAAC;;AAErC,qEAAqE;AACrE,qBAAa,KAAM,SAAQ,UAA8C;CAAG;AAE5E,uEAAuE;AACvE,eAAO,MAAM,MAAM,qBAAsB,MAAM,sFACS,CAAC;AAEzD,sCAAsC;AACtC,eAAO,MAAM,IAAI,mFAEhB,CAAC;AAEF,kFAAkF;AAClF,eAAO,MAAM,UAAU,mFAA4B,CAAC;AAEpD,oFAAoF;AACpF,eAAO,MAAM,SAAS,mFAA2B,CAAC"}
package/lib/retry.js CHANGED
@@ -1,10 +1,9 @@
1
1
  /**
2
2
  * Axiom retry configuration.
3
3
  *
4
- * Defines the per-SDK `Retry` Context.Service tag that
5
- * `packages/axiom/src/client.ts` wires into `makeAPI`. Callers can
6
- * install a blanket retry policy at the layer level and have every
7
- * Axiom API call below it pick it up:
4
+ * Defines the per-SDK `Retry` Context.Service tag that generated operations
5
+ * wire into `API.make`. Callers can install a blanket retry policy at the
6
+ * layer level and have every Axiom API call below it pick it up:
8
7
  *
9
8
  * @example
10
9
  * ```ts
package/lib/retry.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"retry.js","sourceRoot":"","sources":["../src/retry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,KAAK,OAAO,MAAM,gBAAgB,CAAC;AAC1C,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AACtC,OAAO,EAEL,iBAAiB,EACjB,gBAAgB,GACjB,MAAM,6BAA6B,CAAC;AAErC,OAAO,EAIL,WAAW,EACX,QAAQ,EACR,MAAM,EACN,iBAAiB,EACjB,gBAAgB,EAChB,iBAAiB,EACjB,gBAAgB,GACjB,MAAM,6BAA6B,CAAC;AAErC,qEAAqE;AACrE,MAAM,OAAO,KAAM,SAAQ,OAAO,CAAC,OAAO,EAAiB,CAAC,YAAY,CAAC;CAAG;AAE5E,uEAAuE;AACvE,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,gBAAwB,EAAE,EAAE,CACjD,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,EAAE,gBAAgB,CAAC,CAAC,CAAC;AAEzD,sCAAsC;AACtC,MAAM,CAAC,MAAM,IAAI,GAAG,MAAM,CAAC,OAAO,CAChC,KAAK,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,GAAG,EAAE,CAAC,KAAK,EAAE,CAAC,CAC7C,CAAC;AAEF,kFAAkF;AAClF,MAAM,CAAC,MAAM,UAAU,GAAG,MAAM,CAAC,iBAAiB,CAAC,CAAC;AAEpD,oFAAoF;AACpF,MAAM,CAAC,MAAM,SAAS,GAAG,MAAM,CAAC,gBAAgB,CAAC,CAAC"}
1
+ {"version":3,"file":"retry.js","sourceRoot":"","sources":["../src/retry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,KAAK,OAAO,MAAM,gBAAgB,CAAC;AAC1C,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AACtC,OAAO,EAEL,iBAAiB,EACjB,gBAAgB,GACjB,MAAM,6BAA6B,CAAC;AAErC,OAAO,EAIL,WAAW,EACX,QAAQ,EACR,MAAM,EACN,iBAAiB,EACjB,gBAAgB,EAChB,iBAAiB,EACjB,gBAAgB,GACjB,MAAM,6BAA6B,CAAC;AAErC,qEAAqE;AACrE,MAAM,OAAO,KAAM,SAAQ,OAAO,CAAC,OAAO,EAAiB,CAAC,YAAY,CAAC;CAAG;AAE5E,uEAAuE;AACvE,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,gBAAwB,EAAE,EAAE,CACjD,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,EAAE,gBAAgB,CAAC,CAAC,CAAC;AAEzD,sCAAsC;AACtC,MAAM,CAAC,MAAM,IAAI,GAAG,MAAM,CAAC,OAAO,CAChC,KAAK,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,GAAG,EAAE,CAAC,KAAK,EAAE,CAAC,CAC7C,CAAC;AAEF,kFAAkF;AAClF,MAAM,CAAC,MAAM,UAAU,GAAG,MAAM,CAAC,iBAAiB,CAAC,CAAC;AAEpD,oFAAoF;AACpF,MAAM,CAAC,MAAM,SAAS,GAAG,MAAM,CAAC,gBAAgB,CAAC,CAAC"}
@@ -0,0 +1,52 @@
1
+ import * as S from "@distilled.cloud/core/schema";
2
+ import * as API from "@distilled.cloud/core/api";
3
+ import { type AxiomOpError, type AxiomOpContext } from "../protocol.ts";
4
+ export type { AxiomOpError, AxiomOpContext };
5
+ declare const BadRequest_base: S.Class<BadRequest, S.TaggedStruct<"BadRequest", {
6
+ readonly code: any;
7
+ readonly message: any;
8
+ }>, import("effect/Cause").YieldableError>;
9
+ export declare class BadRequest extends /*@__PURE__*/ BadRequest_base {
10
+ }
11
+ declare const NotFound_base: S.Class<NotFound, S.TaggedStruct<"NotFound", {
12
+ readonly code: any;
13
+ readonly message: any;
14
+ }>, import("effect/Cause").YieldableError>;
15
+ export declare class NotFound extends /*@__PURE__*/ NotFound_base {
16
+ }
17
+ declare const UnprocessableEntity_base: S.Class<UnprocessableEntity, S.TaggedStruct<"UnprocessableEntity", {
18
+ readonly code: any;
19
+ readonly message: any;
20
+ }>, import("effect/Cause").YieldableError>;
21
+ export declare class UnprocessableEntity extends /*@__PURE__*/ UnprocessableEntity_base {
22
+ }
23
+ export interface IngestToDatasetRequest {
24
+ dataset_id: string;
25
+ /** The name of the field to use as the timestamp. If not specified, the timestamp will be the time the event was received by Axiom. */
26
+ timestamp_field?: string;
27
+ /** The date-time format of the timestamp field. The reference time is `Mon Jan 2 15:04:05 -0700 MST 2006`, as specified in https://pkg.go.dev/time/?tab=doc#Parse */
28
+ timestamp_format?: string;
29
+ /** The delimiter to use when parsing CSV data. If not specified, the default delimiter is `,`. */
30
+ csv_delimiter?: string;
31
+ body: string;
32
+ }
33
+ export declare const IngestToDatasetRequest: S.Schema<IngestToDatasetRequest>;
34
+ export interface IngestFailure {
35
+ error: string;
36
+ timestamp: string;
37
+ }
38
+ export declare const IngestFailure: S.Schema<IngestFailure>;
39
+ export type IngestStatusFailuresList = Array<IngestFailure>;
40
+ export declare const IngestStatusFailuresList: S.Schema<IngestStatusFailuresList>;
41
+ export interface IngestStatus {
42
+ blocksCreated: number;
43
+ failed: number;
44
+ failures?: IngestStatusFailuresList;
45
+ ingested: number;
46
+ processedBytes: number;
47
+ walLength: number;
48
+ }
49
+ export declare const IngestStatus: S.Schema<IngestStatus>;
50
+ export type IngestToDatasetError = BadRequest | NotFound | UnprocessableEntity | AxiomOpError;
51
+ export declare const ingestToDataset: API.OperationMethod<IngestToDatasetRequest, IngestStatus, IngestToDatasetError, AxiomOpContext>;
52
+ //# sourceMappingURL=edge_ingest.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"edge_ingest.d.ts","sourceRoot":"","sources":["../../src/services/edge_ingest.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,CAAC,MAAM,8BAA8B,CAAC;AAClD,OAAO,KAAK,GAAG,MAAM,2BAA2B,CAAC;AAEjD,OAAO,EAEL,KAAK,YAAY,EACjB,KAAK,cAAc,EACpB,MAAM,gBAAgB,CAAC;AAIxB,YAAY,EAAE,YAAY,EAAE,cAAc,EAAE,CAAC;;;;;AAE7C,qBAAa,UACX,SAAQ,aAAa,CAAC,eAMrB;CAAG;;;;;AAEN,qBAAa,QACX,SAAQ,aAAa,CAAC,aAMrB;CAAG;;;;;AAEN,qBAAa,mBACX,SAAQ,aAAa,CAAC,wBASrB;CAAG;AAEN,MAAM,WAAW,sBAAsB;IACrC,UAAU,EAAE,MAAM,CAAC;IACnB,uIAAuI;IACvI,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,qKAAqK;IACrK,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,kGAAkG;IAClG,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,IAAI,EAAE,MAAM,CAAC;CACd;AACD,eAAO,MAAM,sBAAsB,EAgBtB,CAAC,CAAC,MAAM,CAAC,sBAAsB,CAAC,CAAC;AAE9C,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;CACnB;AACD,eAAO,MAAM,aAAa,EAK4B,CAAC,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC;AAE9E,MAAM,MAAM,wBAAwB,GAAG,KAAK,CAAC,aAAa,CAAC,CAAC;AAC5D,eAAO,MAAM,wBAAwB,EAEzB,CAAC,CAAC,MAAM,CAAC,wBAAwB,CAAC,CAAC;AAE/C,MAAM,WAAW,YAAY;IAC3B,aAAa,EAAE,MAAM,CAAC;IACtB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,wBAAwB,CAAC;IACpC,QAAQ,EAAE,MAAM,CAAC;IACjB,cAAc,EAAE,MAAM,CAAC;IACvB,SAAS,EAAE,MAAM,CAAC;CACnB;AACD,eAAO,MAAM,YAAY,EAS4B,CAAC,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC;AAE5E,MAAM,MAAM,oBAAoB,GAC5B,UAAU,GACV,QAAQ,GACR,mBAAmB,GACnB,YAAY,CAAC;AACjB,eAAO,MAAM,eAAe,EAAE,GAAG,CAAC,eAAe,CAC/C,sBAAsB,EACtB,YAAY,EACZ,oBAAoB,EACpB,cAAc,CAOb,CAAC"}
@@ -0,0 +1,59 @@
1
+ // AUTO-GENERATED by scripts/generate.ts from .generated-specs (specs/docs restapi/versions). Do not edit.
2
+ import * as S from "@distilled.cloud/core/schema";
3
+ import * as API from "@distilled.cloud/core/api";
4
+ import * as T from "../traits.js";
5
+ import { AxiomProtocol, } from "../protocol.js";
6
+ import { UnknownAxiomError } from "../errors.js";
7
+ import * as Retry from "../retry.js";
8
+ export class BadRequest extends /*@__PURE__*/ /*@__PURE__*/ T.applyErrorMatchers(
9
+ /*@__PURE__*/ S.TaggedErrorClass()("BadRequest", {
10
+ code: S.Number,
11
+ message: S.String,
12
+ }), [{ status: 400 }]) {
13
+ }
14
+ export class NotFound extends /*@__PURE__*/ /*@__PURE__*/ T.applyErrorMatchers(
15
+ /*@__PURE__*/ S.TaggedErrorClass()("NotFound", {
16
+ code: S.Number,
17
+ message: S.String,
18
+ }), [{ status: 404 }]) {
19
+ }
20
+ export class UnprocessableEntity extends /*@__PURE__*/ /*@__PURE__*/ T.applyErrorMatchers(
21
+ /*@__PURE__*/ S.TaggedErrorClass()("UnprocessableEntity", {
22
+ code: S.Number,
23
+ message: S.String,
24
+ }), [{ status: 422 }]) {
25
+ }
26
+ export const IngestToDatasetRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
27
+ dataset_id: S.String.pipe(T.Label()),
28
+ timestamp_field: S.optional(S.String.pipe(T.Query("timestamp-field"))),
29
+ timestamp_format: S.optional(S.String.pipe(T.Query("timestamp-format"))),
30
+ csv_delimiter: S.optional(S.String.pipe(T.Query("csv-delimiter"))),
31
+ body: S.String.pipe(T.HttpBody()),
32
+ }).pipe(T.Http({
33
+ method: "POST",
34
+ uri: "/v1/datasets/{dataset_id}/ingest",
35
+ code: 200,
36
+ }))).annotate({
37
+ identifier: "IngestToDatasetRequest",
38
+ });
39
+ export const IngestFailure = /*@__PURE__*/ S.suspend(() => S.Struct({
40
+ error: S.String,
41
+ timestamp: S.String,
42
+ })).annotate({ identifier: "IngestFailure" });
43
+ export const IngestStatusFailuresList = /*@__PURE__*/ S.Array(IngestFailure);
44
+ export const IngestStatus = /*@__PURE__*/ S.suspend(() => S.Struct({
45
+ blocksCreated: S.Number,
46
+ failed: S.Number,
47
+ failures: S.optional(IngestStatusFailuresList),
48
+ ingested: S.Number,
49
+ processedBytes: S.Number,
50
+ walLength: S.Number,
51
+ })).annotate({ identifier: "IngestStatus" });
52
+ export const ingestToDataset = /*@__PURE__*/ API.make(() => ({
53
+ input: IngestToDatasetRequest,
54
+ output: IngestStatus,
55
+ errors: [BadRequest, NotFound, UnprocessableEntity, UnknownAxiomError],
56
+ protocol: AxiomProtocol,
57
+ retry: Retry.Retry,
58
+ }));
59
+ //# sourceMappingURL=edge_ingest.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"edge_ingest.js","sourceRoot":"","sources":["../../src/services/edge_ingest.ts"],"names":[],"mappings":"AAAA,0GAA0G;AAC1G,OAAO,KAAK,CAAC,MAAM,8BAA8B,CAAC;AAClD,OAAO,KAAK,GAAG,MAAM,2BAA2B,CAAC;AACjD,OAAO,KAAK,CAAC,MAAM,cAAc,CAAC;AAClC,OAAO,EACL,aAAa,GAGd,MAAM,gBAAgB,CAAC;AACxB,OAAO,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