@paygentic/sdk 0.6.29 → 0.6.34

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 (391) hide show
  1. package/FUNCTIONS.md +13 -9
  2. package/README.md +125 -55
  3. package/dist/commonjs/funcs/billableMetricsListEvents.d.ts +19 -0
  4. package/dist/commonjs/funcs/billableMetricsListEvents.d.ts.map +1 -0
  5. package/dist/commonjs/funcs/billableMetricsListEvents.js +132 -0
  6. package/dist/commonjs/funcs/billableMetricsListEvents.js.map +1 -0
  7. package/dist/commonjs/funcs/costsCreateCost.d.ts +19 -0
  8. package/dist/commonjs/funcs/costsCreateCost.d.ts.map +1 -0
  9. package/dist/commonjs/funcs/costsCreateCost.js +119 -0
  10. package/dist/commonjs/funcs/costsCreateCost.js.map +1 -0
  11. package/dist/commonjs/funcs/costsDeleteCost.d.ts +15 -0
  12. package/dist/commonjs/funcs/costsDeleteCost.d.ts.map +1 -0
  13. package/dist/commonjs/funcs/costsDeleteCost.js +121 -0
  14. package/dist/commonjs/funcs/costsDeleteCost.js.map +1 -0
  15. package/dist/commonjs/funcs/costsGetCost.d.ts +16 -0
  16. package/dist/commonjs/funcs/costsGetCost.d.ts.map +1 -0
  17. package/dist/commonjs/funcs/costsGetCost.js +121 -0
  18. package/dist/commonjs/funcs/costsGetCost.js.map +1 -0
  19. package/dist/commonjs/funcs/costsGetCostSummary.d.ts +19 -0
  20. package/dist/commonjs/funcs/costsGetCostSummary.d.ts.map +1 -0
  21. package/dist/commonjs/funcs/costsGetCostSummary.js +133 -0
  22. package/dist/commonjs/funcs/costsGetCostSummary.js.map +1 -0
  23. package/dist/commonjs/funcs/costsListCosts.d.ts +15 -0
  24. package/dist/commonjs/funcs/costsListCosts.d.ts.map +1 -0
  25. package/dist/commonjs/funcs/costsListCosts.js +121 -0
  26. package/dist/commonjs/funcs/costsListCosts.js.map +1 -0
  27. package/dist/commonjs/funcs/costsUpdateCost.d.ts +16 -0
  28. package/dist/commonjs/funcs/costsUpdateCost.d.ts.map +1 -0
  29. package/dist/commonjs/funcs/costsUpdateCost.js +122 -0
  30. package/dist/commonjs/funcs/costsUpdateCost.js.map +1 -0
  31. package/dist/commonjs/funcs/entitlementsGet.js +4 -0
  32. package/dist/commonjs/funcs/entitlementsGet.js.map +1 -1
  33. package/dist/commonjs/funcs/entitlementsList.js +1 -0
  34. package/dist/commonjs/funcs/entitlementsList.js.map +1 -1
  35. package/dist/commonjs/lib/config.d.ts +3 -3
  36. package/dist/commonjs/lib/config.js +3 -3
  37. package/dist/commonjs/lib/config.js.map +1 -1
  38. package/dist/commonjs/lib/encodings.d.ts +1 -0
  39. package/dist/commonjs/lib/encodings.d.ts.map +1 -1
  40. package/dist/commonjs/lib/encodings.js +7 -0
  41. package/dist/commonjs/lib/encodings.js.map +1 -1
  42. package/dist/commonjs/models/billablemetric.d.ts +4 -4
  43. package/dist/commonjs/models/billablemetric.d.ts.map +1 -1
  44. package/dist/commonjs/models/billablemetric.js +4 -5
  45. package/dist/commonjs/models/billablemetric.js.map +1 -1
  46. package/dist/commonjs/models/cost.d.ts +67 -0
  47. package/dist/commonjs/models/cost.d.ts.map +1 -0
  48. package/dist/commonjs/models/cost.js +89 -0
  49. package/dist/commonjs/models/cost.js.map +1 -0
  50. package/dist/commonjs/models/costusageresponse.d.ts +69 -0
  51. package/dist/commonjs/models/costusageresponse.d.ts.map +1 -0
  52. package/dist/commonjs/models/costusageresponse.js +91 -0
  53. package/dist/commonjs/models/costusageresponse.js.map +1 -0
  54. package/dist/commonjs/models/entitlementaccessresult.d.ts +20 -0
  55. package/dist/commonjs/models/entitlementaccessresult.d.ts.map +1 -1
  56. package/dist/commonjs/models/entitlementaccessresult.js +5 -0
  57. package/dist/commonjs/models/entitlementaccessresult.js.map +1 -1
  58. package/dist/commonjs/models/grant.d.ts +8 -0
  59. package/dist/commonjs/models/grant.d.ts.map +1 -1
  60. package/dist/commonjs/models/grant.js +2 -0
  61. package/dist/commonjs/models/grant.js.map +1 -1
  62. package/dist/commonjs/models/index.d.ts +4 -0
  63. package/dist/commonjs/models/index.d.ts.map +1 -1
  64. package/dist/commonjs/models/index.js +4 -0
  65. package/dist/commonjs/models/index.js.map +1 -1
  66. package/dist/commonjs/models/invoicelineitem.d.ts +4 -3
  67. package/dist/commonjs/models/invoicelineitem.d.ts.map +1 -1
  68. package/dist/commonjs/models/invoicelineitem.js +2 -1
  69. package/dist/commonjs/models/invoicelineitem.js.map +1 -1
  70. package/dist/commonjs/models/lineitem.d.ts +4 -3
  71. package/dist/commonjs/models/lineitem.d.ts.map +1 -1
  72. package/dist/commonjs/models/lineitem.js +2 -1
  73. package/dist/commonjs/models/lineitem.js.map +1 -1
  74. package/dist/commonjs/models/meterevent.d.ts +47 -0
  75. package/dist/commonjs/models/meterevent.d.ts.map +1 -0
  76. package/dist/commonjs/models/meterevent.js +62 -0
  77. package/dist/commonjs/models/meterevent.js.map +1 -0
  78. package/dist/commonjs/models/metereventlist.d.ts +28 -0
  79. package/dist/commonjs/models/metereventlist.d.ts.map +1 -0
  80. package/dist/commonjs/models/metereventlist.js +60 -0
  81. package/dist/commonjs/models/metereventlist.js.map +1 -0
  82. package/dist/commonjs/models/operations/createbillablemetric.d.ts +4 -4
  83. package/dist/commonjs/models/operations/createbillablemetric.d.ts.map +1 -1
  84. package/dist/commonjs/models/operations/createbillablemetric.js +4 -5
  85. package/dist/commonjs/models/operations/createbillablemetric.js.map +1 -1
  86. package/dist/commonjs/models/operations/createcost.d.ts +100 -0
  87. package/dist/commonjs/models/operations/createcost.d.ts.map +1 -0
  88. package/dist/commonjs/models/operations/createcost.js +81 -0
  89. package/dist/commonjs/models/operations/createcost.js.map +1 -0
  90. package/dist/commonjs/models/operations/createplan.d.ts +36 -2
  91. package/dist/commonjs/models/operations/createplan.d.ts.map +1 -1
  92. package/dist/commonjs/models/operations/createplan.js +24 -2
  93. package/dist/commonjs/models/operations/createplan.js.map +1 -1
  94. package/dist/commonjs/models/operations/createprice.d.ts +5 -0
  95. package/dist/commonjs/models/operations/createprice.d.ts.map +1 -1
  96. package/dist/commonjs/models/operations/createprice.js +1 -0
  97. package/dist/commonjs/models/operations/createprice.js.map +1 -1
  98. package/dist/commonjs/models/operations/deletecost.d.ts +15 -0
  99. package/dist/commonjs/models/operations/deletecost.d.ts.map +1 -0
  100. package/dist/commonjs/models/operations/deletecost.js +49 -0
  101. package/dist/commonjs/models/operations/deletecost.js.map +1 -0
  102. package/dist/commonjs/models/operations/getbillablemetricmeter.d.ts +1 -0
  103. package/dist/commonjs/models/operations/getbillablemetricmeter.d.ts.map +1 -1
  104. package/dist/commonjs/models/operations/getbillablemetricmeter.js +1 -0
  105. package/dist/commonjs/models/operations/getbillablemetricmeter.js.map +1 -1
  106. package/dist/commonjs/models/operations/getcost.d.ts +15 -0
  107. package/dist/commonjs/models/operations/getcost.d.ts.map +1 -0
  108. package/dist/commonjs/models/operations/getcost.js +49 -0
  109. package/dist/commonjs/models/operations/getcost.js.map +1 -0
  110. package/dist/commonjs/models/operations/getcostsummary.d.ts +60 -0
  111. package/dist/commonjs/models/operations/getcostsummary.d.ts.map +1 -0
  112. package/dist/commonjs/models/operations/getcostsummary.js +66 -0
  113. package/dist/commonjs/models/operations/getcostsummary.js.map +1 -0
  114. package/dist/commonjs/models/operations/getentitlement.d.ts +5 -0
  115. package/dist/commonjs/models/operations/getentitlement.d.ts.map +1 -1
  116. package/dist/commonjs/models/operations/getentitlement.js +1 -0
  117. package/dist/commonjs/models/operations/getentitlement.js.map +1 -1
  118. package/dist/commonjs/models/operations/index.d.ts +7 -0
  119. package/dist/commonjs/models/operations/index.d.ts.map +1 -1
  120. package/dist/commonjs/models/operations/index.js +7 -0
  121. package/dist/commonjs/models/operations/index.js.map +1 -1
  122. package/dist/commonjs/models/operations/listbillablemetricevents.d.ts +37 -0
  123. package/dist/commonjs/models/operations/listbillablemetricevents.d.ts.map +1 -0
  124. package/dist/commonjs/models/operations/listbillablemetricevents.js +54 -0
  125. package/dist/commonjs/models/operations/listbillablemetricevents.js.map +1 -0
  126. package/dist/commonjs/models/operations/listcosts.d.ts +59 -0
  127. package/dist/commonjs/models/operations/listcosts.d.ts.map +1 -0
  128. package/dist/commonjs/models/operations/listcosts.js +79 -0
  129. package/dist/commonjs/models/operations/listcosts.js.map +1 -0
  130. package/dist/commonjs/models/operations/listentitlements.d.ts +5 -0
  131. package/dist/commonjs/models/operations/listentitlements.d.ts.map +1 -1
  132. package/dist/commonjs/models/operations/listentitlements.js +1 -0
  133. package/dist/commonjs/models/operations/listentitlements.js.map +1 -1
  134. package/dist/commonjs/models/operations/updatecost.d.ts +88 -0
  135. package/dist/commonjs/models/operations/updatecost.d.ts.map +1 -0
  136. package/dist/commonjs/models/operations/updatecost.js +84 -0
  137. package/dist/commonjs/models/operations/updatecost.js.map +1 -0
  138. package/dist/commonjs/models/operations/updateplan.d.ts +36 -2
  139. package/dist/commonjs/models/operations/updateplan.d.ts.map +1 -1
  140. package/dist/commonjs/models/operations/updateplan.js +24 -2
  141. package/dist/commonjs/models/operations/updateplan.js.map +1 -1
  142. package/dist/commonjs/models/operations/updateprice.d.ts +5 -0
  143. package/dist/commonjs/models/operations/updateprice.d.ts.map +1 -1
  144. package/dist/commonjs/models/operations/updateprice.js +1 -0
  145. package/dist/commonjs/models/operations/updateprice.js.map +1 -1
  146. package/dist/commonjs/models/plan.d.ts +23 -0
  147. package/dist/commonjs/models/plan.d.ts.map +1 -1
  148. package/dist/commonjs/models/plan.js +12 -1
  149. package/dist/commonjs/models/plan.js.map +1 -1
  150. package/dist/commonjs/models/price.d.ts +4 -0
  151. package/dist/commonjs/models/price.d.ts.map +1 -1
  152. package/dist/commonjs/models/price.js +1 -0
  153. package/dist/commonjs/models/price.js.map +1 -1
  154. package/dist/commonjs/models/schemasprice.d.ts +4 -0
  155. package/dist/commonjs/models/schemasprice.d.ts.map +1 -1
  156. package/dist/commonjs/models/schemasprice.js +1 -0
  157. package/dist/commonjs/models/schemasprice.js.map +1 -1
  158. package/dist/commonjs/models/subscription.d.ts +22 -2
  159. package/dist/commonjs/models/subscription.d.ts.map +1 -1
  160. package/dist/commonjs/models/subscription.js +13 -1
  161. package/dist/commonjs/models/subscription.js.map +1 -1
  162. package/dist/commonjs/sdk/billablemetrics.d.ts +7 -0
  163. package/dist/commonjs/sdk/billablemetrics.d.ts.map +1 -1
  164. package/dist/commonjs/sdk/billablemetrics.js +10 -0
  165. package/dist/commonjs/sdk/billablemetrics.js.map +1 -1
  166. package/dist/commonjs/sdk/costs.d.ts +36 -0
  167. package/dist/commonjs/sdk/costs.d.ts.map +1 -0
  168. package/dist/commonjs/sdk/costs.js +60 -0
  169. package/dist/commonjs/sdk/costs.js.map +1 -0
  170. package/dist/commonjs/sdk/sdk.d.ts +3 -0
  171. package/dist/commonjs/sdk/sdk.d.ts.map +1 -1
  172. package/dist/commonjs/sdk/sdk.js +4 -0
  173. package/dist/commonjs/sdk/sdk.js.map +1 -1
  174. package/dist/esm/funcs/billableMetricsListEvents.d.ts +19 -0
  175. package/dist/esm/funcs/billableMetricsListEvents.d.ts.map +1 -0
  176. package/dist/esm/funcs/billableMetricsListEvents.js +96 -0
  177. package/dist/esm/funcs/billableMetricsListEvents.js.map +1 -0
  178. package/dist/esm/funcs/costsCreateCost.d.ts +19 -0
  179. package/dist/esm/funcs/costsCreateCost.d.ts.map +1 -0
  180. package/dist/esm/funcs/costsCreateCost.js +83 -0
  181. package/dist/esm/funcs/costsCreateCost.js.map +1 -0
  182. package/dist/esm/funcs/costsDeleteCost.d.ts +15 -0
  183. package/dist/esm/funcs/costsDeleteCost.d.ts.map +1 -0
  184. package/dist/esm/funcs/costsDeleteCost.js +85 -0
  185. package/dist/esm/funcs/costsDeleteCost.js.map +1 -0
  186. package/dist/esm/funcs/costsGetCost.d.ts +16 -0
  187. package/dist/esm/funcs/costsGetCost.d.ts.map +1 -0
  188. package/dist/esm/funcs/costsGetCost.js +85 -0
  189. package/dist/esm/funcs/costsGetCost.js.map +1 -0
  190. package/dist/esm/funcs/costsGetCostSummary.d.ts +19 -0
  191. package/dist/esm/funcs/costsGetCostSummary.d.ts.map +1 -0
  192. package/dist/esm/funcs/costsGetCostSummary.js +97 -0
  193. package/dist/esm/funcs/costsGetCostSummary.js.map +1 -0
  194. package/dist/esm/funcs/costsListCosts.d.ts +15 -0
  195. package/dist/esm/funcs/costsListCosts.d.ts.map +1 -0
  196. package/dist/esm/funcs/costsListCosts.js +85 -0
  197. package/dist/esm/funcs/costsListCosts.js.map +1 -0
  198. package/dist/esm/funcs/costsUpdateCost.d.ts +16 -0
  199. package/dist/esm/funcs/costsUpdateCost.d.ts.map +1 -0
  200. package/dist/esm/funcs/costsUpdateCost.js +86 -0
  201. package/dist/esm/funcs/costsUpdateCost.js.map +1 -0
  202. package/dist/esm/funcs/entitlementsGet.js +5 -1
  203. package/dist/esm/funcs/entitlementsGet.js.map +1 -1
  204. package/dist/esm/funcs/entitlementsList.js +1 -0
  205. package/dist/esm/funcs/entitlementsList.js.map +1 -1
  206. package/dist/esm/lib/config.d.ts +3 -3
  207. package/dist/esm/lib/config.js +3 -3
  208. package/dist/esm/lib/config.js.map +1 -1
  209. package/dist/esm/lib/encodings.d.ts +1 -0
  210. package/dist/esm/lib/encodings.d.ts.map +1 -1
  211. package/dist/esm/lib/encodings.js +6 -0
  212. package/dist/esm/lib/encodings.js.map +1 -1
  213. package/dist/esm/models/billablemetric.d.ts +4 -4
  214. package/dist/esm/models/billablemetric.d.ts.map +1 -1
  215. package/dist/esm/models/billablemetric.js +3 -4
  216. package/dist/esm/models/billablemetric.js.map +1 -1
  217. package/dist/esm/models/cost.d.ts +67 -0
  218. package/dist/esm/models/cost.d.ts.map +1 -0
  219. package/dist/esm/models/cost.js +52 -0
  220. package/dist/esm/models/cost.js.map +1 -0
  221. package/dist/esm/models/costusageresponse.d.ts +69 -0
  222. package/dist/esm/models/costusageresponse.d.ts.map +1 -0
  223. package/dist/esm/models/costusageresponse.js +52 -0
  224. package/dist/esm/models/costusageresponse.js.map +1 -0
  225. package/dist/esm/models/entitlementaccessresult.d.ts +20 -0
  226. package/dist/esm/models/entitlementaccessresult.d.ts.map +1 -1
  227. package/dist/esm/models/entitlementaccessresult.js +5 -0
  228. package/dist/esm/models/entitlementaccessresult.js.map +1 -1
  229. package/dist/esm/models/grant.d.ts +8 -0
  230. package/dist/esm/models/grant.d.ts.map +1 -1
  231. package/dist/esm/models/grant.js +2 -0
  232. package/dist/esm/models/grant.js.map +1 -1
  233. package/dist/esm/models/index.d.ts +4 -0
  234. package/dist/esm/models/index.d.ts.map +1 -1
  235. package/dist/esm/models/index.js +4 -0
  236. package/dist/esm/models/index.js.map +1 -1
  237. package/dist/esm/models/invoicelineitem.d.ts +4 -3
  238. package/dist/esm/models/invoicelineitem.d.ts.map +1 -1
  239. package/dist/esm/models/invoicelineitem.js +2 -1
  240. package/dist/esm/models/invoicelineitem.js.map +1 -1
  241. package/dist/esm/models/lineitem.d.ts +4 -3
  242. package/dist/esm/models/lineitem.d.ts.map +1 -1
  243. package/dist/esm/models/lineitem.js +2 -1
  244. package/dist/esm/models/lineitem.js.map +1 -1
  245. package/dist/esm/models/meterevent.d.ts +47 -0
  246. package/dist/esm/models/meterevent.d.ts.map +1 -0
  247. package/dist/esm/models/meterevent.js +25 -0
  248. package/dist/esm/models/meterevent.js.map +1 -0
  249. package/dist/esm/models/metereventlist.d.ts +28 -0
  250. package/dist/esm/models/metereventlist.d.ts.map +1 -0
  251. package/dist/esm/models/metereventlist.js +23 -0
  252. package/dist/esm/models/metereventlist.js.map +1 -0
  253. package/dist/esm/models/operations/createbillablemetric.d.ts +4 -4
  254. package/dist/esm/models/operations/createbillablemetric.d.ts.map +1 -1
  255. package/dist/esm/models/operations/createbillablemetric.js +3 -4
  256. package/dist/esm/models/operations/createbillablemetric.js.map +1 -1
  257. package/dist/esm/models/operations/createcost.d.ts +100 -0
  258. package/dist/esm/models/operations/createcost.d.ts.map +1 -0
  259. package/dist/esm/models/operations/createcost.js +44 -0
  260. package/dist/esm/models/operations/createcost.js.map +1 -0
  261. package/dist/esm/models/operations/createplan.d.ts +36 -2
  262. package/dist/esm/models/operations/createplan.d.ts.map +1 -1
  263. package/dist/esm/models/operations/createplan.js +23 -1
  264. package/dist/esm/models/operations/createplan.js.map +1 -1
  265. package/dist/esm/models/operations/createprice.d.ts +5 -0
  266. package/dist/esm/models/operations/createprice.d.ts.map +1 -1
  267. package/dist/esm/models/operations/createprice.js +1 -0
  268. package/dist/esm/models/operations/createprice.js.map +1 -1
  269. package/dist/esm/models/operations/deletecost.d.ts +15 -0
  270. package/dist/esm/models/operations/deletecost.d.ts.map +1 -0
  271. package/dist/esm/models/operations/deletecost.js +12 -0
  272. package/dist/esm/models/operations/deletecost.js.map +1 -0
  273. package/dist/esm/models/operations/getbillablemetricmeter.d.ts +1 -0
  274. package/dist/esm/models/operations/getbillablemetricmeter.d.ts.map +1 -1
  275. package/dist/esm/models/operations/getbillablemetricmeter.js +1 -0
  276. package/dist/esm/models/operations/getbillablemetricmeter.js.map +1 -1
  277. package/dist/esm/models/operations/getcost.d.ts +15 -0
  278. package/dist/esm/models/operations/getcost.d.ts.map +1 -0
  279. package/dist/esm/models/operations/getcost.js +12 -0
  280. package/dist/esm/models/operations/getcost.js.map +1 -0
  281. package/dist/esm/models/operations/getcostsummary.d.ts +60 -0
  282. package/dist/esm/models/operations/getcostsummary.d.ts.map +1 -0
  283. package/dist/esm/models/operations/getcostsummary.js +29 -0
  284. package/dist/esm/models/operations/getcostsummary.js.map +1 -0
  285. package/dist/esm/models/operations/getentitlement.d.ts +5 -0
  286. package/dist/esm/models/operations/getentitlement.d.ts.map +1 -1
  287. package/dist/esm/models/operations/getentitlement.js +1 -0
  288. package/dist/esm/models/operations/getentitlement.js.map +1 -1
  289. package/dist/esm/models/operations/index.d.ts +7 -0
  290. package/dist/esm/models/operations/index.d.ts.map +1 -1
  291. package/dist/esm/models/operations/index.js +7 -0
  292. package/dist/esm/models/operations/index.js.map +1 -1
  293. package/dist/esm/models/operations/listbillablemetricevents.d.ts +37 -0
  294. package/dist/esm/models/operations/listbillablemetricevents.d.ts.map +1 -0
  295. package/dist/esm/models/operations/listbillablemetricevents.js +17 -0
  296. package/dist/esm/models/operations/listbillablemetricevents.js.map +1 -0
  297. package/dist/esm/models/operations/listcosts.d.ts +59 -0
  298. package/dist/esm/models/operations/listcosts.d.ts.map +1 -0
  299. package/dist/esm/models/operations/listcosts.js +40 -0
  300. package/dist/esm/models/operations/listcosts.js.map +1 -0
  301. package/dist/esm/models/operations/listentitlements.d.ts +5 -0
  302. package/dist/esm/models/operations/listentitlements.d.ts.map +1 -1
  303. package/dist/esm/models/operations/listentitlements.js +1 -0
  304. package/dist/esm/models/operations/listentitlements.js.map +1 -1
  305. package/dist/esm/models/operations/updatecost.d.ts +88 -0
  306. package/dist/esm/models/operations/updatecost.d.ts.map +1 -0
  307. package/dist/esm/models/operations/updatecost.js +46 -0
  308. package/dist/esm/models/operations/updatecost.js.map +1 -0
  309. package/dist/esm/models/operations/updateplan.d.ts +36 -2
  310. package/dist/esm/models/operations/updateplan.d.ts.map +1 -1
  311. package/dist/esm/models/operations/updateplan.js +23 -1
  312. package/dist/esm/models/operations/updateplan.js.map +1 -1
  313. package/dist/esm/models/operations/updateprice.d.ts +5 -0
  314. package/dist/esm/models/operations/updateprice.d.ts.map +1 -1
  315. package/dist/esm/models/operations/updateprice.js +1 -0
  316. package/dist/esm/models/operations/updateprice.js.map +1 -1
  317. package/dist/esm/models/plan.d.ts +23 -0
  318. package/dist/esm/models/plan.d.ts.map +1 -1
  319. package/dist/esm/models/plan.js +11 -0
  320. package/dist/esm/models/plan.js.map +1 -1
  321. package/dist/esm/models/price.d.ts +4 -0
  322. package/dist/esm/models/price.d.ts.map +1 -1
  323. package/dist/esm/models/price.js +1 -0
  324. package/dist/esm/models/price.js.map +1 -1
  325. package/dist/esm/models/schemasprice.d.ts +4 -0
  326. package/dist/esm/models/schemasprice.d.ts.map +1 -1
  327. package/dist/esm/models/schemasprice.js +1 -0
  328. package/dist/esm/models/schemasprice.js.map +1 -1
  329. package/dist/esm/models/subscription.d.ts +22 -2
  330. package/dist/esm/models/subscription.d.ts.map +1 -1
  331. package/dist/esm/models/subscription.js +11 -0
  332. package/dist/esm/models/subscription.js.map +1 -1
  333. package/dist/esm/sdk/billablemetrics.d.ts +7 -0
  334. package/dist/esm/sdk/billablemetrics.d.ts.map +1 -1
  335. package/dist/esm/sdk/billablemetrics.js +10 -0
  336. package/dist/esm/sdk/billablemetrics.js.map +1 -1
  337. package/dist/esm/sdk/costs.d.ts +36 -0
  338. package/dist/esm/sdk/costs.d.ts.map +1 -0
  339. package/dist/esm/sdk/costs.js +56 -0
  340. package/dist/esm/sdk/costs.js.map +1 -0
  341. package/dist/esm/sdk/sdk.d.ts +3 -0
  342. package/dist/esm/sdk/sdk.d.ts.map +1 -1
  343. package/dist/esm/sdk/sdk.js +4 -0
  344. package/dist/esm/sdk/sdk.js.map +1 -1
  345. package/examples/customersCreate.example.ts +37 -0
  346. package/jsr.json +6 -4
  347. package/package.json +1 -1
  348. package/src/funcs/billableMetricsListEvents.ts +190 -0
  349. package/src/funcs/costsCreateCost.ts +175 -0
  350. package/src/funcs/costsDeleteCost.ts +173 -0
  351. package/src/funcs/costsGetCost.ts +173 -0
  352. package/src/funcs/costsGetCostSummary.ts +190 -0
  353. package/src/funcs/costsListCosts.ts +175 -0
  354. package/src/funcs/costsUpdateCost.ts +178 -0
  355. package/src/funcs/entitlementsGet.ts +6 -1
  356. package/src/funcs/entitlementsList.ts +1 -0
  357. package/src/lib/config.ts +3 -3
  358. package/src/lib/encodings.ts +9 -0
  359. package/src/models/billablemetric.ts +9 -6
  360. package/src/models/cost.ts +114 -0
  361. package/src/models/costusageresponse.ts +145 -0
  362. package/src/models/entitlementaccessresult.ts +29 -0
  363. package/src/models/grant.ts +10 -0
  364. package/src/models/index.ts +4 -0
  365. package/src/models/invoicelineitem.ts +4 -3
  366. package/src/models/lineitem.ts +4 -3
  367. package/src/models/meterevent.ts +77 -0
  368. package/src/models/metereventlist.ts +59 -0
  369. package/src/models/operations/createbillablemetric.ts +9 -6
  370. package/src/models/operations/createcost.ts +133 -0
  371. package/src/models/operations/createplan.ts +50 -3
  372. package/src/models/operations/createprice.ts +6 -0
  373. package/src/models/operations/deletecost.ts +34 -0
  374. package/src/models/operations/getbillablemetricmeter.ts +1 -0
  375. package/src/models/operations/getcost.ts +30 -0
  376. package/src/models/operations/getcostsummary.ts +88 -0
  377. package/src/models/operations/getentitlement.ts +6 -0
  378. package/src/models/operations/index.ts +7 -0
  379. package/src/models/operations/listbillablemetricevents.ts +63 -0
  380. package/src/models/operations/listcosts.ts +124 -0
  381. package/src/models/operations/listentitlements.ts +6 -0
  382. package/src/models/operations/updatecost.ts +136 -0
  383. package/src/models/operations/updateplan.ts +50 -3
  384. package/src/models/operations/updateprice.ts +6 -0
  385. package/src/models/plan.ts +28 -0
  386. package/src/models/price.ts +5 -0
  387. package/src/models/schemasprice.ts +5 -0
  388. package/src/models/subscription.ts +46 -2
  389. package/src/sdk/billablemetrics.ts +18 -0
  390. package/src/sdk/costs.ts +106 -0
  391. package/src/sdk/sdk.ts +6 -0
@@ -0,0 +1,190 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import { PaygenticCore } from "../core.js";
6
+ import { encodeFormQuery, encodeSimple } from "../lib/encodings.js";
7
+ import * as M from "../lib/matchers.js";
8
+ import { compactMap } from "../lib/primitives.js";
9
+ import { safeParse } from "../lib/schemas.js";
10
+ import { RequestOptions } from "../lib/sdks.js";
11
+ import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
12
+ import { pathToFunc } from "../lib/url.js";
13
+ import {
14
+ ConnectionError,
15
+ InvalidRequestError,
16
+ RequestAbortedError,
17
+ RequestTimeoutError,
18
+ UnexpectedClientError,
19
+ } from "../models/errors/httpclienterrors.js";
20
+ import * as errors from "../models/errors/index.js";
21
+ import { PaygenticError } from "../models/errors/paygenticerror.js";
22
+ import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
23
+ import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
24
+ import * as models from "../models/index.js";
25
+ import * as operations from "../models/operations/index.js";
26
+ import { APICall, APIPromise } from "../types/async.js";
27
+ import { Result } from "../types/fp.js";
28
+
29
+ /**
30
+ * Query Summary
31
+ *
32
+ * @remarks
33
+ * Query usage data and compute cost for a specific cost configuration. To retrieve summaries for all costs belonging to a merchant, first call listCosts to obtain cost IDs, then call this endpoint in parallel for each ID.
34
+ */
35
+ export function costsGetCostSummary(
36
+ client: PaygenticCore,
37
+ request: operations.GetCostSummaryRequest,
38
+ options?: RequestOptions,
39
+ ): APIPromise<
40
+ Result<
41
+ models.CostUsageResponse,
42
+ | errors.BadRequest
43
+ | errors.ErrorT
44
+ | PaygenticError
45
+ | ResponseValidationError
46
+ | ConnectionError
47
+ | RequestAbortedError
48
+ | RequestTimeoutError
49
+ | InvalidRequestError
50
+ | UnexpectedClientError
51
+ | SDKValidationError
52
+ >
53
+ > {
54
+ return new APIPromise($do(
55
+ client,
56
+ request,
57
+ options,
58
+ ));
59
+ }
60
+
61
+ async function $do(
62
+ client: PaygenticCore,
63
+ request: operations.GetCostSummaryRequest,
64
+ options?: RequestOptions,
65
+ ): Promise<
66
+ [
67
+ Result<
68
+ models.CostUsageResponse,
69
+ | errors.BadRequest
70
+ | errors.ErrorT
71
+ | PaygenticError
72
+ | ResponseValidationError
73
+ | ConnectionError
74
+ | RequestAbortedError
75
+ | RequestTimeoutError
76
+ | InvalidRequestError
77
+ | UnexpectedClientError
78
+ | SDKValidationError
79
+ >,
80
+ APICall,
81
+ ]
82
+ > {
83
+ const parsed = safeParse(
84
+ request,
85
+ (value) => operations.GetCostSummaryRequest$outboundSchema.parse(value),
86
+ "Input validation failed",
87
+ );
88
+ if (!parsed.ok) {
89
+ return [parsed, { status: "invalid" }];
90
+ }
91
+ const payload = parsed.value;
92
+ const body = null;
93
+
94
+ const pathParams = {
95
+ id: encodeSimple("id", payload.id, {
96
+ explode: false,
97
+ charEncoding: "percent",
98
+ }),
99
+ };
100
+ const path = pathToFunc("/v0/costs/{id}/summary")(pathParams);
101
+
102
+ const query = encodeFormQuery({
103
+ "filterGroupBy": payload.filterGroupBy,
104
+ "from": payload.from,
105
+ "groupBy": payload.groupBy,
106
+ "subject": payload.subject,
107
+ "to": payload.to,
108
+ "window": payload.window,
109
+ });
110
+
111
+ const headers = new Headers(compactMap({
112
+ Accept: "application/json",
113
+ }));
114
+
115
+ const secConfig = await extractSecurity(client._options.bearerAuth);
116
+ const securityInput = secConfig == null ? {} : { bearerAuth: secConfig };
117
+ const requestSecurity = resolveGlobalSecurity(securityInput);
118
+
119
+ const context = {
120
+ options: client._options,
121
+ baseURL: options?.serverURL ?? client._baseURL ?? "",
122
+ operationID: "getCostSummary",
123
+ oAuth2Scopes: null,
124
+
125
+ resolvedSecurity: requestSecurity,
126
+
127
+ securitySource: client._options.bearerAuth,
128
+ retryConfig: options?.retries
129
+ || client._options.retryConfig
130
+ || { strategy: "none" },
131
+ retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
132
+ };
133
+
134
+ const requestRes = client._createRequest(context, {
135
+ security: requestSecurity,
136
+ method: "GET",
137
+ baseURL: options?.serverURL,
138
+ path: path,
139
+ headers: headers,
140
+ query: query,
141
+ body: body,
142
+ userAgent: client._options.userAgent,
143
+ timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
144
+ }, options);
145
+ if (!requestRes.ok) {
146
+ return [requestRes, { status: "invalid" }];
147
+ }
148
+ const req = requestRes.value;
149
+
150
+ const doResult = await client._do(req, {
151
+ context,
152
+ errorCodes: ["400", "403", "404", "4XX", "500", "5XX"],
153
+ retryConfig: context.retryConfig,
154
+ retryCodes: context.retryCodes,
155
+ });
156
+ if (!doResult.ok) {
157
+ return [doResult, { status: "request-error", request: req }];
158
+ }
159
+ const response = doResult.value;
160
+
161
+ const responseFields = {
162
+ HttpMeta: { Response: response, Request: req },
163
+ };
164
+
165
+ const [result] = await M.match<
166
+ models.CostUsageResponse,
167
+ | errors.BadRequest
168
+ | errors.ErrorT
169
+ | PaygenticError
170
+ | ResponseValidationError
171
+ | ConnectionError
172
+ | RequestAbortedError
173
+ | RequestTimeoutError
174
+ | InvalidRequestError
175
+ | UnexpectedClientError
176
+ | SDKValidationError
177
+ >(
178
+ M.json(200, models.CostUsageResponse$inboundSchema),
179
+ M.jsonErr(400, errors.BadRequest$inboundSchema),
180
+ M.jsonErr([403, 404], errors.ErrorT$inboundSchema),
181
+ M.jsonErr(500, errors.ErrorT$inboundSchema),
182
+ M.fail("4XX"),
183
+ M.fail("5XX"),
184
+ )(response, req, { extraFields: responseFields });
185
+ if (!result.ok) {
186
+ return [result, { status: "complete", request: req, response }];
187
+ }
188
+
189
+ return [result, { status: "complete", request: req, response }];
190
+ }
@@ -0,0 +1,175 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import { PaygenticCore } from "../core.js";
6
+ import { encodeFormQuery } from "../lib/encodings.js";
7
+ import * as M from "../lib/matchers.js";
8
+ import { compactMap } from "../lib/primitives.js";
9
+ import { safeParse } from "../lib/schemas.js";
10
+ import { RequestOptions } from "../lib/sdks.js";
11
+ import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
12
+ import { pathToFunc } from "../lib/url.js";
13
+ import {
14
+ ConnectionError,
15
+ InvalidRequestError,
16
+ RequestAbortedError,
17
+ RequestTimeoutError,
18
+ UnexpectedClientError,
19
+ } from "../models/errors/httpclienterrors.js";
20
+ import * as errors from "../models/errors/index.js";
21
+ import { PaygenticError } from "../models/errors/paygenticerror.js";
22
+ import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
23
+ import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
24
+ import * as operations from "../models/operations/index.js";
25
+ import { APICall, APIPromise } from "../types/async.js";
26
+ import { Result } from "../types/fp.js";
27
+
28
+ /**
29
+ * List
30
+ */
31
+ export function costsListCosts(
32
+ client: PaygenticCore,
33
+ request?: operations.ListCostsRequest | undefined,
34
+ options?: RequestOptions,
35
+ ): APIPromise<
36
+ Result<
37
+ operations.ListCostsResponse,
38
+ | errors.ErrorT
39
+ | PaygenticError
40
+ | ResponseValidationError
41
+ | ConnectionError
42
+ | RequestAbortedError
43
+ | RequestTimeoutError
44
+ | InvalidRequestError
45
+ | UnexpectedClientError
46
+ | SDKValidationError
47
+ >
48
+ > {
49
+ return new APIPromise($do(
50
+ client,
51
+ request,
52
+ options,
53
+ ));
54
+ }
55
+
56
+ async function $do(
57
+ client: PaygenticCore,
58
+ request?: operations.ListCostsRequest | undefined,
59
+ options?: RequestOptions,
60
+ ): Promise<
61
+ [
62
+ Result<
63
+ operations.ListCostsResponse,
64
+ | errors.ErrorT
65
+ | PaygenticError
66
+ | ResponseValidationError
67
+ | ConnectionError
68
+ | RequestAbortedError
69
+ | RequestTimeoutError
70
+ | InvalidRequestError
71
+ | UnexpectedClientError
72
+ | SDKValidationError
73
+ >,
74
+ APICall,
75
+ ]
76
+ > {
77
+ const parsed = safeParse(
78
+ request,
79
+ (value) =>
80
+ operations.ListCostsRequest$outboundSchema.optional().parse(value),
81
+ "Input validation failed",
82
+ );
83
+ if (!parsed.ok) {
84
+ return [parsed, { status: "invalid" }];
85
+ }
86
+ const payload = parsed.value;
87
+ const body = null;
88
+
89
+ const path = pathToFunc("/v0/costs")();
90
+
91
+ const query = encodeFormQuery({
92
+ "limit": payload?.limit,
93
+ "merchantId": payload?.merchantId,
94
+ "offset": payload?.offset,
95
+ "productId": payload?.productId,
96
+ });
97
+
98
+ const headers = new Headers(compactMap({
99
+ Accept: "application/json",
100
+ }));
101
+
102
+ const secConfig = await extractSecurity(client._options.bearerAuth);
103
+ const securityInput = secConfig == null ? {} : { bearerAuth: secConfig };
104
+ const requestSecurity = resolveGlobalSecurity(securityInput);
105
+
106
+ const context = {
107
+ options: client._options,
108
+ baseURL: options?.serverURL ?? client._baseURL ?? "",
109
+ operationID: "listCosts",
110
+ oAuth2Scopes: null,
111
+
112
+ resolvedSecurity: requestSecurity,
113
+
114
+ securitySource: client._options.bearerAuth,
115
+ retryConfig: options?.retries
116
+ || client._options.retryConfig
117
+ || { strategy: "none" },
118
+ retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
119
+ };
120
+
121
+ const requestRes = client._createRequest(context, {
122
+ security: requestSecurity,
123
+ method: "GET",
124
+ baseURL: options?.serverURL,
125
+ path: path,
126
+ headers: headers,
127
+ query: query,
128
+ body: body,
129
+ userAgent: client._options.userAgent,
130
+ timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
131
+ }, options);
132
+ if (!requestRes.ok) {
133
+ return [requestRes, { status: "invalid" }];
134
+ }
135
+ const req = requestRes.value;
136
+
137
+ const doResult = await client._do(req, {
138
+ context,
139
+ errorCodes: ["401", "403", "4XX", "500", "5XX"],
140
+ retryConfig: context.retryConfig,
141
+ retryCodes: context.retryCodes,
142
+ });
143
+ if (!doResult.ok) {
144
+ return [doResult, { status: "request-error", request: req }];
145
+ }
146
+ const response = doResult.value;
147
+
148
+ const responseFields = {
149
+ HttpMeta: { Response: response, Request: req },
150
+ };
151
+
152
+ const [result] = await M.match<
153
+ operations.ListCostsResponse,
154
+ | errors.ErrorT
155
+ | PaygenticError
156
+ | ResponseValidationError
157
+ | ConnectionError
158
+ | RequestAbortedError
159
+ | RequestTimeoutError
160
+ | InvalidRequestError
161
+ | UnexpectedClientError
162
+ | SDKValidationError
163
+ >(
164
+ M.json(200, operations.ListCostsResponse$inboundSchema),
165
+ M.jsonErr([401, 403], errors.ErrorT$inboundSchema),
166
+ M.jsonErr(500, errors.ErrorT$inboundSchema),
167
+ M.fail("4XX"),
168
+ M.fail("5XX"),
169
+ )(response, req, { extraFields: responseFields });
170
+ if (!result.ok) {
171
+ return [result, { status: "complete", request: req, response }];
172
+ }
173
+
174
+ return [result, { status: "complete", request: req, response }];
175
+ }
@@ -0,0 +1,178 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import { PaygenticCore } from "../core.js";
6
+ import { encodeJSON, encodeSimple } from "../lib/encodings.js";
7
+ import * as M from "../lib/matchers.js";
8
+ import { compactMap } from "../lib/primitives.js";
9
+ import { safeParse } from "../lib/schemas.js";
10
+ import { RequestOptions } from "../lib/sdks.js";
11
+ import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
12
+ import { pathToFunc } from "../lib/url.js";
13
+ import {
14
+ ConnectionError,
15
+ InvalidRequestError,
16
+ RequestAbortedError,
17
+ RequestTimeoutError,
18
+ UnexpectedClientError,
19
+ } from "../models/errors/httpclienterrors.js";
20
+ import * as errors from "../models/errors/index.js";
21
+ import { PaygenticError } from "../models/errors/paygenticerror.js";
22
+ import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
23
+ import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
24
+ import * as models from "../models/index.js";
25
+ import * as operations from "../models/operations/index.js";
26
+ import { APICall, APIPromise } from "../types/async.js";
27
+ import { Result } from "../types/fp.js";
28
+
29
+ /**
30
+ * Update
31
+ */
32
+ export function costsUpdateCost(
33
+ client: PaygenticCore,
34
+ request: operations.UpdateCostRequest,
35
+ options?: RequestOptions,
36
+ ): APIPromise<
37
+ Result<
38
+ models.Cost,
39
+ | errors.BadRequest
40
+ | errors.ErrorT
41
+ | PaygenticError
42
+ | ResponseValidationError
43
+ | ConnectionError
44
+ | RequestAbortedError
45
+ | RequestTimeoutError
46
+ | InvalidRequestError
47
+ | UnexpectedClientError
48
+ | SDKValidationError
49
+ >
50
+ > {
51
+ return new APIPromise($do(
52
+ client,
53
+ request,
54
+ options,
55
+ ));
56
+ }
57
+
58
+ async function $do(
59
+ client: PaygenticCore,
60
+ request: operations.UpdateCostRequest,
61
+ options?: RequestOptions,
62
+ ): Promise<
63
+ [
64
+ Result<
65
+ models.Cost,
66
+ | errors.BadRequest
67
+ | errors.ErrorT
68
+ | PaygenticError
69
+ | ResponseValidationError
70
+ | ConnectionError
71
+ | RequestAbortedError
72
+ | RequestTimeoutError
73
+ | InvalidRequestError
74
+ | UnexpectedClientError
75
+ | SDKValidationError
76
+ >,
77
+ APICall,
78
+ ]
79
+ > {
80
+ const parsed = safeParse(
81
+ request,
82
+ (value) => operations.UpdateCostRequest$outboundSchema.parse(value),
83
+ "Input validation failed",
84
+ );
85
+ if (!parsed.ok) {
86
+ return [parsed, { status: "invalid" }];
87
+ }
88
+ const payload = parsed.value;
89
+ const body = encodeJSON("body", payload.RequestBody, { explode: true });
90
+
91
+ const pathParams = {
92
+ id: encodeSimple("id", payload.id, {
93
+ explode: false,
94
+ charEncoding: "percent",
95
+ }),
96
+ };
97
+ const path = pathToFunc("/v0/costs/{id}")(pathParams);
98
+
99
+ const headers = new Headers(compactMap({
100
+ "Content-Type": "application/json",
101
+ Accept: "application/json",
102
+ }));
103
+
104
+ const secConfig = await extractSecurity(client._options.bearerAuth);
105
+ const securityInput = secConfig == null ? {} : { bearerAuth: secConfig };
106
+ const requestSecurity = resolveGlobalSecurity(securityInput);
107
+
108
+ const context = {
109
+ options: client._options,
110
+ baseURL: options?.serverURL ?? client._baseURL ?? "",
111
+ operationID: "updateCost",
112
+ oAuth2Scopes: null,
113
+
114
+ resolvedSecurity: requestSecurity,
115
+
116
+ securitySource: client._options.bearerAuth,
117
+ retryConfig: options?.retries
118
+ || client._options.retryConfig
119
+ || { strategy: "none" },
120
+ retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
121
+ };
122
+
123
+ const requestRes = client._createRequest(context, {
124
+ security: requestSecurity,
125
+ method: "PATCH",
126
+ baseURL: options?.serverURL,
127
+ path: path,
128
+ headers: headers,
129
+ body: body,
130
+ userAgent: client._options.userAgent,
131
+ timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
132
+ }, options);
133
+ if (!requestRes.ok) {
134
+ return [requestRes, { status: "invalid" }];
135
+ }
136
+ const req = requestRes.value;
137
+
138
+ const doResult = await client._do(req, {
139
+ context,
140
+ errorCodes: ["400", "403", "404", "4XX", "500", "5XX"],
141
+ retryConfig: context.retryConfig,
142
+ retryCodes: context.retryCodes,
143
+ });
144
+ if (!doResult.ok) {
145
+ return [doResult, { status: "request-error", request: req }];
146
+ }
147
+ const response = doResult.value;
148
+
149
+ const responseFields = {
150
+ HttpMeta: { Response: response, Request: req },
151
+ };
152
+
153
+ const [result] = await M.match<
154
+ models.Cost,
155
+ | errors.BadRequest
156
+ | errors.ErrorT
157
+ | PaygenticError
158
+ | ResponseValidationError
159
+ | ConnectionError
160
+ | RequestAbortedError
161
+ | RequestTimeoutError
162
+ | InvalidRequestError
163
+ | UnexpectedClientError
164
+ | SDKValidationError
165
+ >(
166
+ M.json(200, models.Cost$inboundSchema),
167
+ M.jsonErr(400, errors.BadRequest$inboundSchema),
168
+ M.jsonErr([403, 404], errors.ErrorT$inboundSchema),
169
+ M.jsonErr(500, errors.ErrorT$inboundSchema),
170
+ M.fail("4XX"),
171
+ M.fail("5XX"),
172
+ )(response, req, { extraFields: responseFields });
173
+ if (!result.ok) {
174
+ return [result, { status: "complete", request: req, response }];
175
+ }
176
+
177
+ return [result, { status: "complete", request: req, response }];
178
+ }
@@ -3,7 +3,7 @@
3
3
  */
4
4
 
5
5
  import { PaygenticCore } from "../core.js";
6
- import { encodeSimple } from "../lib/encodings.js";
6
+ import { encodeFormQuery, encodeSimple } from "../lib/encodings.js";
7
7
  import * as M from "../lib/matchers.js";
8
8
  import { compactMap } from "../lib/primitives.js";
9
9
  import { safeParse } from "../lib/schemas.js";
@@ -99,6 +99,10 @@ async function $do(
99
99
  };
100
100
  const path = pathToFunc("/v1/entitlements/{entitlementId}")(pathParams);
101
101
 
102
+ const query = encodeFormQuery({
103
+ "at": payload.at,
104
+ });
105
+
102
106
  const headers = new Headers(compactMap({
103
107
  Accept: "application/json",
104
108
  }));
@@ -128,6 +132,7 @@ async function $do(
128
132
  baseURL: options?.serverURL,
129
133
  path: path,
130
134
  headers: headers,
135
+ query: query,
131
136
  body: body,
132
137
  userAgent: client._options.userAgent,
133
138
  timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
@@ -93,6 +93,7 @@ async function $do(
93
93
  const path = pathToFunc("/v1/entitlements")();
94
94
 
95
95
  const query = encodeFormQuery({
96
+ "at": payload.at,
96
97
  "customerId": payload.customerId,
97
98
  "featureKey": payload.featureKey,
98
99
  "limit": payload.limit,
package/src/lib/config.ts CHANGED
@@ -61,7 +61,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
61
61
  export const SDK_METADATA = {
62
62
  language: "typescript",
63
63
  openapiDocVersion: "0.1.0",
64
- sdkVersion: "0.6.28",
65
- genVersion: "2.873.1",
66
- userAgent: "speakeasy-sdk/typescript 0.6.28 2.873.1 0.1.0 @paygentic/sdk",
64
+ sdkVersion: "0.6.34",
65
+ genVersion: "2.879.13",
66
+ userAgent: "speakeasy-sdk/typescript 0.6.34 2.879.13 0.1.0 @paygentic/sdk",
67
67
  } as const;
@@ -514,3 +514,12 @@ export function appendForm(
514
514
  fd.append(key, String(value));
515
515
  }
516
516
  }
517
+
518
+ export async function normalizeBlob(
519
+ value: Pick<Blob, "arrayBuffer" | "type">,
520
+ ): Promise<Blob> {
521
+ if (value instanceof Blob) {
522
+ return value;
523
+ }
524
+ return new Blob([await value.arrayBuffer()], { type: value.type });
525
+ }
@@ -13,7 +13,7 @@ export const BillableMetricObject = {
13
13
  } as const;
14
14
  export type BillableMetricObject = ClosedEnum<typeof BillableMetricObject>;
15
15
 
16
- export const Aggregation = {
16
+ export const BillableMetricAggregation = {
17
17
  Sum: "SUM",
18
18
  Count: "COUNT",
19
19
  Avg: "AVG",
@@ -22,7 +22,9 @@ export const Aggregation = {
22
22
  UniqueCount: "UNIQUE_COUNT",
23
23
  Latest: "LATEST",
24
24
  } as const;
25
- export type Aggregation = ClosedEnum<typeof Aggregation>;
25
+ export type BillableMetricAggregation = ClosedEnum<
26
+ typeof BillableMetricAggregation
27
+ >;
26
28
 
27
29
  export type BillableMetric = {
28
30
  /**
@@ -30,7 +32,7 @@ export type BillableMetric = {
30
32
  */
31
33
  id: string;
32
34
  object: BillableMetricObject;
33
- aggregation: Aggregation;
35
+ aggregation: BillableMetricAggregation;
34
36
  createdAt: Date;
35
37
  description: string;
36
38
  /**
@@ -56,8 +58,9 @@ export const BillableMetricObject$inboundSchema: z.ZodNativeEnum<
56
58
  > = z.nativeEnum(BillableMetricObject);
57
59
 
58
60
  /** @internal */
59
- export const Aggregation$inboundSchema: z.ZodNativeEnum<typeof Aggregation> = z
60
- .nativeEnum(Aggregation);
61
+ export const BillableMetricAggregation$inboundSchema: z.ZodNativeEnum<
62
+ typeof BillableMetricAggregation
63
+ > = z.nativeEnum(BillableMetricAggregation);
61
64
 
62
65
  /** @internal */
63
66
  export const BillableMetric$inboundSchema: z.ZodType<
@@ -67,7 +70,7 @@ export const BillableMetric$inboundSchema: z.ZodType<
67
70
  > = z.object({
68
71
  id: z.string(),
69
72
  object: BillableMetricObject$inboundSchema.default("billableMetric"),
70
- aggregation: Aggregation$inboundSchema,
73
+ aggregation: BillableMetricAggregation$inboundSchema,
71
74
  createdAt: z.string().datetime({ offset: true }).transform(v => new Date(v)),
72
75
  description: z.string(),
73
76
  merchantId: z.string(),