tapimo 0.2.0 → 0.4.0

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 (362) hide show
  1. package/README.md +36 -8
  2. package/dist/ApiKey.d.ts +1 -0
  3. package/dist/ApiKey.d.ts.map +1 -1
  4. package/dist/ApiKey.js +5 -2
  5. package/dist/ApiKey.js.map +1 -1
  6. package/dist/ApiKeys.d.ts +28 -1
  7. package/dist/ApiKeys.d.ts.map +1 -1
  8. package/dist/ApiKeys.js +34 -1
  9. package/dist/ApiKeys.js.map +1 -1
  10. package/dist/App.d.ts +7532 -4850
  11. package/dist/App.d.ts.map +1 -1
  12. package/dist/App.js +11 -3
  13. package/dist/App.js.map +1 -1
  14. package/dist/Scope.d.ts +11 -2
  15. package/dist/Scope.d.ts.map +1 -1
  16. package/dist/Scope.js +14 -3
  17. package/dist/Scope.js.map +1 -1
  18. package/dist/admin/App.d.ts +63 -53
  19. package/dist/admin/App.d.ts.map +1 -1
  20. package/dist/admin/apps/api-keys.d.ts +7 -0
  21. package/dist/admin/apps/api-keys.d.ts.map +1 -1
  22. package/dist/admin/apps/scopes.d.ts +8 -0
  23. package/dist/admin/apps/scopes.d.ts.map +1 -1
  24. package/dist/admin/apps/scopes.js +3 -0
  25. package/dist/admin/apps/scopes.js.map +1 -1
  26. package/dist/admin/apps/verified-tokens.d.ts +57 -57
  27. package/dist/admin/ui.generated.d.ts +1 -1
  28. package/dist/admin/ui.generated.js +13 -13
  29. package/dist/admin/ui.generated.js.map +1 -1
  30. package/dist/analytics/Analytics.d.ts +151 -0
  31. package/dist/analytics/Analytics.d.ts.map +1 -0
  32. package/dist/analytics/Analytics.js +212 -0
  33. package/dist/analytics/Analytics.js.map +1 -0
  34. package/dist/analytics/tables/requestEvents.d.ts +215 -0
  35. package/dist/analytics/tables/requestEvents.d.ts.map +1 -0
  36. package/dist/analytics/tables/requestEvents.js +264 -0
  37. package/dist/analytics/tables/requestEvents.js.map +1 -0
  38. package/dist/apps/data/App.d.ts +1049 -624
  39. package/dist/apps/data/App.d.ts.map +1 -1
  40. package/dist/apps/data/App.js +36 -0
  41. package/dist/apps/data/App.js.map +1 -1
  42. package/dist/apps/data/FundingRouteProviders.d.ts +54 -0
  43. package/dist/apps/data/FundingRouteProviders.d.ts.map +1 -0
  44. package/dist/apps/data/FundingRouteProviders.js +355 -0
  45. package/dist/apps/data/FundingRouteProviders.js.map +1 -0
  46. package/dist/apps/data/index.d.ts +1 -0
  47. package/dist/apps/data/index.d.ts.map +1 -1
  48. package/dist/apps/data/index.js +1 -0
  49. package/dist/apps/data/index.js.map +1 -1
  50. package/dist/apps/data/routes/balances.d.ts +45 -45
  51. package/dist/apps/data/routes/coingecko.d.ts +176 -176
  52. package/dist/apps/data/routes/exchanges.d.ts +455 -455
  53. package/dist/apps/data/routes/fee-amm.d.ts +101 -101
  54. package/dist/apps/data/routes/funding.d.ts +843 -0
  55. package/dist/apps/data/routes/funding.d.ts.map +1 -0
  56. package/dist/apps/data/routes/funding.js +443 -0
  57. package/dist/apps/data/routes/funding.js.map +1 -0
  58. package/dist/apps/data/routes/indexer.d.ts +5 -5
  59. package/dist/apps/data/routes/receipts.d.ts.map +1 -1
  60. package/dist/apps/data/routes/receipts.js +2 -8
  61. package/dist/apps/data/routes/receipts.js.map +1 -1
  62. package/dist/apps/data/routes/rpc.d.ts +29 -36
  63. package/dist/apps/data/routes/rpc.d.ts.map +1 -1
  64. package/dist/apps/data/routes/rpc.js +29 -1
  65. package/dist/apps/data/routes/rpc.js.map +1 -1
  66. package/dist/apps/data/routes/tokenlist.d.ts +36 -36
  67. package/dist/apps/data/routes/transfers.d.ts +56 -56
  68. package/dist/apps/data/routes/verified-tokens.d.ts +36 -36
  69. package/dist/apps/data/routes/webhooks.d.ts +45 -45
  70. package/dist/apps/data/routes/webhooks.d.ts.map +1 -1
  71. package/dist/apps/data/routes/webhooks.js +8 -8
  72. package/dist/apps/data/routes/webhooks.js.map +1 -1
  73. package/dist/apps/docs/App.d.ts +5 -3
  74. package/dist/apps/docs/App.d.ts.map +1 -1
  75. package/dist/apps/docs/App.js +28 -96
  76. package/dist/apps/docs/App.js.map +1 -1
  77. package/dist/apps/docs/reference.d.ts +21 -0
  78. package/dist/apps/docs/reference.d.ts.map +1 -0
  79. package/dist/apps/docs/reference.js +112 -0
  80. package/dist/apps/docs/reference.js.map +1 -0
  81. package/dist/apps/index.d.ts +3 -2
  82. package/dist/apps/index.d.ts.map +1 -1
  83. package/dist/apps/index.js +3 -2
  84. package/dist/apps/index.js.map +1 -1
  85. package/dist/apps/{platform → management}/App.d.ts +3015 -738
  86. package/dist/apps/management/App.d.ts.map +1 -0
  87. package/dist/apps/{platform → management}/App.js +20 -10
  88. package/dist/apps/management/App.js.map +1 -0
  89. package/dist/apps/management/Billing.d.ts +279 -0
  90. package/dist/apps/management/Billing.d.ts.map +1 -0
  91. package/dist/apps/management/Billing.js +477 -0
  92. package/dist/apps/management/Billing.js.map +1 -0
  93. package/dist/apps/management/index.d.ts +3 -0
  94. package/dist/apps/management/index.d.ts.map +1 -0
  95. package/dist/apps/management/index.js +3 -0
  96. package/dist/apps/management/index.js.map +1 -0
  97. package/dist/apps/{platform → management}/routes/api-keys.d.ts +341 -49
  98. package/dist/apps/management/routes/api-keys.d.ts.map +1 -0
  99. package/dist/apps/{platform → management}/routes/api-keys.js +116 -14
  100. package/dist/apps/management/routes/api-keys.js.map +1 -0
  101. package/dist/apps/management/routes/billing.d.ts +1520 -0
  102. package/dist/apps/management/routes/billing.d.ts.map +1 -0
  103. package/dist/apps/management/routes/billing.js +795 -0
  104. package/dist/apps/management/routes/billing.js.map +1 -0
  105. package/dist/apps/{platform → management}/routes/invitations.d.ts +202 -84
  106. package/dist/apps/management/routes/invitations.d.ts.map +1 -0
  107. package/dist/apps/{platform → management}/routes/invitations.js +59 -1
  108. package/dist/apps/management/routes/invitations.js.map +1 -0
  109. package/dist/apps/{platform → management}/routes/me.d.ts +17 -17
  110. package/dist/apps/management/routes/me.d.ts.map +1 -0
  111. package/dist/apps/management/routes/me.js.map +1 -0
  112. package/dist/apps/management/routes/members.d.ts.map +1 -0
  113. package/dist/apps/management/routes/members.js.map +1 -0
  114. package/dist/apps/{platform → management}/routes/orgs.d.ts +50 -36
  115. package/dist/apps/management/routes/orgs.d.ts.map +1 -0
  116. package/dist/apps/{platform → management}/routes/orgs.js +14 -3
  117. package/dist/apps/management/routes/orgs.js.map +1 -0
  118. package/dist/apps/{platform → management}/routes/projects.d.ts +97 -97
  119. package/dist/apps/{platform → management}/routes/projects.d.ts.map +1 -1
  120. package/dist/apps/management/routes/projects.js.map +1 -0
  121. package/dist/apps/management/routes/scopes.d.ts +107 -0
  122. package/dist/apps/management/routes/scopes.d.ts.map +1 -0
  123. package/dist/apps/management/routes/scopes.js +66 -0
  124. package/dist/apps/management/routes/scopes.js.map +1 -0
  125. package/dist/apps/management/routes/usage.d.ts +588 -0
  126. package/dist/apps/management/routes/usage.d.ts.map +1 -0
  127. package/dist/apps/management/routes/usage.js +391 -0
  128. package/dist/apps/management/routes/usage.js.map +1 -0
  129. package/dist/apps/mcp.d.ts +76 -0
  130. package/dist/apps/mcp.d.ts.map +1 -0
  131. package/dist/apps/mcp.js +188 -0
  132. package/dist/apps/mcp.js.map +1 -0
  133. package/dist/apps/relay/App.d.ts +4 -1
  134. package/dist/apps/relay/App.d.ts.map +1 -1
  135. package/dist/apps/relay/App.js +118 -10
  136. package/dist/apps/relay/App.js.map +1 -1
  137. package/dist/apps/relay/Sponsorships.d.ts.map +1 -1
  138. package/dist/apps/relay/Sponsorships.js +2 -1
  139. package/dist/apps/relay/Sponsorships.js.map +1 -1
  140. package/dist/cli/Cli.d.ts +8 -1
  141. package/dist/cli/Cli.d.ts.map +1 -1
  142. package/dist/cli/Cli.js +11 -3
  143. package/dist/cli/Cli.js.map +1 -1
  144. package/dist/cli/commands/admin.d.ts +4 -0
  145. package/dist/cli/commands/admin.d.ts.map +1 -1
  146. package/dist/cli/commands/admin.js +80 -1
  147. package/dist/cli/commands/admin.js.map +1 -1
  148. package/dist/db/Db.d.ts +7 -0
  149. package/dist/db/Db.d.ts.map +1 -1
  150. package/dist/db/Db.js +126 -0
  151. package/dist/db/Db.js.map +1 -1
  152. package/dist/db/Schema.d.ts +79 -0
  153. package/dist/db/Schema.d.ts.map +1 -1
  154. package/dist/db/Schema.js +88 -2
  155. package/dist/db/Schema.js.map +1 -1
  156. package/dist/db/tables/billingSettings.d.ts +55 -0
  157. package/dist/db/tables/billingSettings.d.ts.map +1 -0
  158. package/dist/db/tables/billingSettings.js +70 -0
  159. package/dist/db/tables/billingSettings.js.map +1 -0
  160. package/dist/db/tables/invitations.js +2 -2
  161. package/dist/db/tables/invitations.js.map +1 -1
  162. package/dist/db/tables/organizations.d.ts +6 -2
  163. package/dist/db/tables/organizations.d.ts.map +1 -1
  164. package/dist/db/tables/organizations.js +10 -4
  165. package/dist/db/tables/organizations.js.map +1 -1
  166. package/dist/db/tables/projects.js +2 -2
  167. package/dist/db/tables/projects.js.map +1 -1
  168. package/dist/db/tables/requestUsage.d.ts +121 -0
  169. package/dist/db/tables/requestUsage.d.ts.map +1 -0
  170. package/dist/db/tables/requestUsage.js +150 -0
  171. package/dist/db/tables/requestUsage.js.map +1 -0
  172. package/dist/db/tables/sponsoredTransactions.d.ts +119 -0
  173. package/dist/db/tables/sponsoredTransactions.d.ts.map +1 -1
  174. package/dist/db/tables/sponsoredTransactions.js +155 -2
  175. package/dist/db/tables/sponsoredTransactions.js.map +1 -1
  176. package/dist/db/tables/stripeCustomers.d.ts +81 -0
  177. package/dist/db/tables/stripeCustomers.d.ts.map +1 -0
  178. package/dist/db/tables/stripeCustomers.js +120 -0
  179. package/dist/db/tables/stripeCustomers.js.map +1 -0
  180. package/dist/db/tables/users.js +2 -2
  181. package/dist/db/tables/users.js.map +1 -1
  182. package/dist/handlers/internal/sponsorship.d.ts +5 -2
  183. package/dist/handlers/internal/sponsorship.d.ts.map +1 -1
  184. package/dist/handlers/internal/sponsorship.js +19 -5
  185. package/dist/handlers/internal/sponsorship.js.map +1 -1
  186. package/dist/handlers/internal/utils.d.ts +10 -3
  187. package/dist/handlers/internal/utils.d.ts.map +1 -1
  188. package/dist/handlers/internal/utils.js +14 -6
  189. package/dist/handlers/internal/utils.js.map +1 -1
  190. package/dist/index.d.ts +1 -0
  191. package/dist/index.d.ts.map +1 -1
  192. package/dist/index.js +1 -0
  193. package/dist/index.js.map +1 -1
  194. package/dist/internal/Auth.d.ts +18 -4
  195. package/dist/internal/Auth.d.ts.map +1 -1
  196. package/dist/internal/Auth.js +149 -77
  197. package/dist/internal/Auth.js.map +1 -1
  198. package/dist/internal/Cache.d.ts.map +1 -1
  199. package/dist/internal/Cache.js +4 -1
  200. package/dist/internal/Cache.js.map +1 -1
  201. package/dist/internal/EdgeCache.d.ts +10 -0
  202. package/dist/internal/EdgeCache.d.ts.map +1 -1
  203. package/dist/internal/EdgeCache.js +39 -8
  204. package/dist/internal/EdgeCache.js.map +1 -1
  205. package/dist/internal/Fees.d.ts +27 -0
  206. package/dist/internal/Fees.d.ts.map +1 -0
  207. package/dist/internal/Fees.js +48 -0
  208. package/dist/internal/Fees.js.map +1 -0
  209. package/dist/internal/FundingRoutes.d.ts +915 -0
  210. package/dist/internal/FundingRoutes.d.ts.map +1 -0
  211. package/dist/internal/FundingRoutes.js +625 -0
  212. package/dist/internal/FundingRoutes.js.map +1 -0
  213. package/dist/internal/Id.d.ts +15 -0
  214. package/dist/internal/Id.d.ts.map +1 -0
  215. package/dist/internal/Id.js +22 -0
  216. package/dist/internal/Id.js.map +1 -0
  217. package/dist/internal/Log.d.ts +2 -0
  218. package/dist/internal/Log.d.ts.map +1 -1
  219. package/dist/internal/Log.js +3 -0
  220. package/dist/internal/Log.js.map +1 -1
  221. package/dist/internal/OpenApi.d.ts +10 -1
  222. package/dist/internal/OpenApi.d.ts.map +1 -1
  223. package/dist/internal/OpenApi.js +8 -1
  224. package/dist/internal/OpenApi.js.map +1 -1
  225. package/dist/internal/RateLimit.d.ts +25 -0
  226. package/dist/internal/RateLimit.d.ts.map +1 -1
  227. package/dist/internal/RateLimit.js +51 -0
  228. package/dist/internal/RateLimit.js.map +1 -1
  229. package/dist/internal/Response.d.ts +1 -1
  230. package/dist/internal/Response.d.ts.map +1 -1
  231. package/dist/internal/Schema.d.ts +8 -0
  232. package/dist/internal/Schema.d.ts.map +1 -1
  233. package/dist/internal/Schema.js +7 -0
  234. package/dist/internal/Schema.js.map +1 -1
  235. package/dist/internal/Webhooks.d.ts.map +1 -1
  236. package/dist/internal/Webhooks.js +3 -3
  237. package/dist/internal/Webhooks.js.map +1 -1
  238. package/package.json +8 -7
  239. package/src/ApiKey.ts +9 -2
  240. package/src/ApiKeys.test.ts +51 -0
  241. package/src/ApiKeys.ts +50 -1
  242. package/src/App.test.ts +33 -86718
  243. package/src/App.ts +26 -8
  244. package/src/Client.test-d.ts +353 -2
  245. package/src/Scope.ts +16 -3
  246. package/src/admin/apps/scopes.test.ts +6 -0
  247. package/src/admin/apps/scopes.ts +3 -0
  248. package/src/admin/ui/src/components/Page.tsx +2 -3
  249. package/src/admin/ui/src/routes/__root.tsx +2 -2
  250. package/src/admin/ui/src/routes/api-keys.tsx +2 -2
  251. package/src/admin/ui.generated.ts +13 -13
  252. package/src/analytics/Analytics.test.ts +527 -0
  253. package/src/analytics/Analytics.ts +318 -0
  254. package/src/analytics/tables/requestEvents.ts +523 -0
  255. package/src/apps/composition.test.ts +26 -13
  256. package/src/apps/data/App.test.ts +72 -0
  257. package/src/apps/data/App.ts +37 -0
  258. package/src/apps/data/FundingRouteProviders.test.ts +281 -0
  259. package/src/apps/data/FundingRouteProviders.ts +459 -0
  260. package/src/apps/data/index.ts +1 -0
  261. package/src/apps/data/routes/funding.test.ts +314 -0
  262. package/src/apps/data/routes/funding.ts +698 -0
  263. package/src/apps/data/routes/receipts.ts +2 -9
  264. package/src/apps/data/routes/rpc.test.ts +78 -2
  265. package/src/apps/data/routes/rpc.ts +31 -1
  266. package/src/apps/data/routes/webhooks.test.ts +1 -1
  267. package/src/apps/data/routes/webhooks.ts +11 -8
  268. package/src/apps/docs/App.ts +30 -101
  269. package/src/apps/docs/reference.ts +132 -0
  270. package/src/apps/index.ts +3 -2
  271. package/src/apps/{platform → management}/App.ts +56 -17
  272. package/src/apps/management/Billing.test.ts +530 -0
  273. package/src/apps/management/Billing.ts +682 -0
  274. package/src/apps/management/index.ts +2 -0
  275. package/src/apps/{platform → management}/routes/api-keys.test.ts +172 -9
  276. package/src/apps/{platform → management}/routes/api-keys.ts +137 -21
  277. package/src/apps/management/routes/billing.test.ts +1100 -0
  278. package/src/apps/management/routes/billing.ts +966 -0
  279. package/src/apps/{platform → management}/routes/invitations.test.ts +55 -7
  280. package/src/apps/{platform → management}/routes/invitations.ts +69 -1
  281. package/src/apps/management/routes/me.test.ts +351 -0
  282. package/src/apps/{platform → management}/routes/orgs.ts +26 -4
  283. package/src/apps/management/routes/scopes.test.ts +29 -0
  284. package/src/apps/management/routes/scopes.ts +85 -0
  285. package/src/apps/management/routes/usage.test.ts +422 -0
  286. package/src/apps/management/routes/usage.ts +527 -0
  287. package/src/apps/mcp.test.ts +206 -0
  288. package/src/apps/mcp.ts +250 -0
  289. package/src/apps/relay/App.test.ts +457 -8
  290. package/src/apps/relay/App.ts +120 -12
  291. package/src/apps/relay/Sponsorships.test.ts +1 -1
  292. package/src/apps/relay/Sponsorships.ts +2 -1
  293. package/src/cli/Cli.test.ts +25 -2
  294. package/src/cli/Cli.ts +17 -2
  295. package/src/cli/commands/admin.test.ts +83 -0
  296. package/src/cli/commands/admin.ts +89 -1
  297. package/src/db/Db.ts +137 -0
  298. package/src/db/Schema.ts +104 -2
  299. package/src/db/tables/billingSettings.test.ts +87 -0
  300. package/src/db/tables/billingSettings.ts +108 -0
  301. package/src/db/tables/invitations.ts +2 -2
  302. package/src/db/tables/organizations.test.ts +1 -1
  303. package/src/db/tables/organizations.ts +15 -5
  304. package/src/db/tables/projects.ts +2 -2
  305. package/src/db/tables/requestUsage.ts +231 -0
  306. package/src/db/tables/sponsoredTransactions.test.ts +108 -1
  307. package/src/db/tables/sponsoredTransactions.ts +230 -2
  308. package/src/db/tables/stripeCustomers.test.ts +109 -0
  309. package/src/db/tables/stripeCustomers.ts +162 -0
  310. package/src/db/tables/users.ts +2 -2
  311. package/src/handlers/internal/sponsorship.ts +34 -7
  312. package/src/handlers/internal/utils.ts +19 -7
  313. package/src/index.ts +1 -0
  314. package/src/internal/Auth.test.ts +175 -25
  315. package/src/internal/Auth.ts +176 -87
  316. package/src/internal/Cache.ts +5 -1
  317. package/src/internal/EdgeCache.test.ts +27 -4
  318. package/src/internal/EdgeCache.ts +47 -9
  319. package/src/internal/Fees.test.ts +32 -0
  320. package/src/internal/Fees.ts +51 -0
  321. package/src/internal/FundingRoutes.test.ts +213 -0
  322. package/src/internal/FundingRoutes.ts +898 -0
  323. package/src/internal/Id.test.ts +17 -0
  324. package/src/internal/Id.ts +24 -0
  325. package/src/internal/Log.test.ts +1 -0
  326. package/src/internal/Log.ts +5 -0
  327. package/src/internal/OpenApi.ts +12 -1
  328. package/src/internal/RateLimit.test.ts +84 -0
  329. package/src/internal/RateLimit.ts +70 -0
  330. package/src/internal/Response.ts +1 -1
  331. package/src/internal/Schema.ts +8 -0
  332. package/src/internal/Webhooks.test.ts +3 -3
  333. package/src/internal/Webhooks.ts +3 -3
  334. package/dist/apps/platform/App.d.ts.map +0 -1
  335. package/dist/apps/platform/App.js.map +0 -1
  336. package/dist/apps/platform/index.d.ts +0 -2
  337. package/dist/apps/platform/index.d.ts.map +0 -1
  338. package/dist/apps/platform/index.js +0 -2
  339. package/dist/apps/platform/index.js.map +0 -1
  340. package/dist/apps/platform/routes/api-keys.d.ts.map +0 -1
  341. package/dist/apps/platform/routes/api-keys.js.map +0 -1
  342. package/dist/apps/platform/routes/invitations.d.ts.map +0 -1
  343. package/dist/apps/platform/routes/invitations.js.map +0 -1
  344. package/dist/apps/platform/routes/me.d.ts.map +0 -1
  345. package/dist/apps/platform/routes/me.js.map +0 -1
  346. package/dist/apps/platform/routes/members.d.ts.map +0 -1
  347. package/dist/apps/platform/routes/members.js.map +0 -1
  348. package/dist/apps/platform/routes/orgs.d.ts.map +0 -1
  349. package/dist/apps/platform/routes/orgs.js.map +0 -1
  350. package/dist/apps/platform/routes/projects.js.map +0 -1
  351. package/src/apps/platform/index.ts +0 -1
  352. package/src/apps/platform/routes/me.test.ts +0 -121
  353. /package/dist/apps/{platform → management}/routes/me.js +0 -0
  354. /package/dist/apps/{platform → management}/routes/members.d.ts +0 -0
  355. /package/dist/apps/{platform → management}/routes/members.js +0 -0
  356. /package/dist/apps/{platform → management}/routes/projects.js +0 -0
  357. /package/src/apps/{platform → management}/routes/me.ts +0 -0
  358. /package/src/apps/{platform → management}/routes/members.test.ts +0 -0
  359. /package/src/apps/{platform → management}/routes/members.ts +0 -0
  360. /package/src/apps/{platform → management}/routes/orgs.test.ts +0 -0
  361. /package/src/apps/{platform → management}/routes/projects.test.ts +0 -0
  362. /package/src/apps/{platform → management}/routes/projects.ts +0 -0
@@ -0,0 +1,1520 @@
1
+ import * as z from 'zod/mini';
2
+ import * as Response from '../../../internal/Response.js';
3
+ import type { Environment } from '../App.js';
4
+ /** Zod schemas owned by the billing resource. */
5
+ export declare namespace schema {
6
+ /** Path parameters addressing one organization's billing. */
7
+ const Params: z.ZodMiniObject<{
8
+ orgId: z.ZodMiniString<string>;
9
+ }, z.core.$strip>;
10
+ /** Query parameters selecting the billing environment. */
11
+ const Query: z.ZodMiniObject<{
12
+ environment: z.ZodMiniDefault<z.ZodMiniEnum<{
13
+ production: "production";
14
+ sandbox: "sandbox";
15
+ }>>;
16
+ }, z.core.$strict>;
17
+ /** Path parameters addressing one payment method. */
18
+ const MethodParams: z.ZodMiniObject<{
19
+ methodId: z.ZodMiniString<string>;
20
+ orgId: z.ZodMiniString<string>;
21
+ }, z.core.$strip>;
22
+ /** A per-period spend limit. */
23
+ const SpendLimit: z.ZodMiniObject<{
24
+ amount: z.ZodMiniString<string>;
25
+ currency: z.ZodMiniDefault<z.ZodMiniEnum<{
26
+ usd: "usd";
27
+ }>>;
28
+ period: z.ZodMiniDefault<z.ZodMiniEnum<{
29
+ month: "month";
30
+ }>>;
31
+ }, z.core.$strip>;
32
+ /** A per-transaction fee cap. */
33
+ const TxFeeLimit: z.ZodMiniObject<{
34
+ amount: z.ZodMiniString<string>;
35
+ currency: z.ZodMiniDefault<z.ZodMiniEnum<{
36
+ usd: "usd";
37
+ }>>;
38
+ }, z.core.$strip>;
39
+ /** PATCH body; absent fields stay unchanged, null clears a limit. */
40
+ const Patch: z.ZodMiniObject<{
41
+ spendLimit: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniObject<{
42
+ amount: z.ZodMiniString<string>;
43
+ currency: z.ZodMiniDefault<z.ZodMiniEnum<{
44
+ usd: "usd";
45
+ }>>;
46
+ period: z.ZodMiniDefault<z.ZodMiniEnum<{
47
+ month: "month";
48
+ }>>;
49
+ }, z.core.$strip>>>;
50
+ txFeeLimit: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniObject<{
51
+ amount: z.ZodMiniString<string>;
52
+ currency: z.ZodMiniDefault<z.ZodMiniEnum<{
53
+ usd: "usd";
54
+ }>>;
55
+ }, z.core.$strip>>>;
56
+ }, z.core.$strip>;
57
+ /** An organization's billing state. */
58
+ const Billing: z.ZodMiniObject<{
59
+ spend: z.ZodMiniOptional<z.ZodMiniObject<{
60
+ amount: z.ZodMiniString<string>;
61
+ currency: z.ZodMiniEnum<{
62
+ usd: "usd";
63
+ }>;
64
+ period: z.ZodMiniEnum<{
65
+ month: "month";
66
+ }>;
67
+ }, z.core.$strip>>;
68
+ spendLimit: z.ZodMiniOptional<z.ZodMiniObject<{
69
+ amount: z.ZodMiniString<string>;
70
+ currency: z.ZodMiniDefault<z.ZodMiniEnum<{
71
+ usd: "usd";
72
+ }>>;
73
+ period: z.ZodMiniDefault<z.ZodMiniEnum<{
74
+ month: "month";
75
+ }>>;
76
+ }, z.core.$strip>>;
77
+ status: z.ZodMiniEnum<{
78
+ active: "active";
79
+ canceled: "canceled";
80
+ none: "none";
81
+ past_due: "past_due";
82
+ }>;
83
+ txFeeLimit: z.ZodMiniOptional<z.ZodMiniObject<{
84
+ amount: z.ZodMiniString<string>;
85
+ currency: z.ZodMiniDefault<z.ZodMiniEnum<{
86
+ usd: "usd";
87
+ }>>;
88
+ }, z.core.$strip>>;
89
+ updatedAt: z.ZodMiniOptional<z.ZodMiniString<string>>;
90
+ }, z.core.$strip>;
91
+ /** A hosted Stripe session link. */
92
+ const Session: z.ZodMiniObject<{
93
+ url: z.ZodMiniURL;
94
+ }, z.core.$strip>;
95
+ /** A payment method on file. */
96
+ const PaymentMethod: z.ZodMiniObject<{
97
+ card: z.ZodMiniOptional<z.ZodMiniObject<{
98
+ brand: z.ZodMiniString<string>;
99
+ expMonth: z.ZodMiniNumber<number>;
100
+ expYear: z.ZodMiniNumber<number>;
101
+ last4: z.ZodMiniString<string>;
102
+ }, z.core.$strip>>;
103
+ createdAt: z.ZodMiniString<string>;
104
+ default: z.ZodMiniBoolean<boolean>;
105
+ id: z.ZodMiniString<string>;
106
+ provider: z.ZodMiniLiteral<"stripe">;
107
+ type: z.ZodMiniString<string>;
108
+ }, z.core.$strip>;
109
+ /** An organization's payment methods. */
110
+ const PaymentMethods: z.ZodMiniObject<{
111
+ data: z.ZodMiniArray<z.ZodMiniObject<{
112
+ card: z.ZodMiniOptional<z.ZodMiniObject<{
113
+ brand: z.ZodMiniString<string>;
114
+ expMonth: z.ZodMiniNumber<number>;
115
+ expYear: z.ZodMiniNumber<number>;
116
+ last4: z.ZodMiniString<string>;
117
+ }, z.core.$strip>>;
118
+ createdAt: z.ZodMiniString<string>;
119
+ default: z.ZodMiniBoolean<boolean>;
120
+ id: z.ZodMiniString<string>;
121
+ provider: z.ZodMiniLiteral<"stripe">;
122
+ type: z.ZodMiniString<string>;
123
+ }, z.core.$strip>>;
124
+ }, z.core.$strip>;
125
+ }
126
+ /**
127
+ * Mounts the billing surface: an organization's billing status. Orgs without
128
+ * a Stripe billing source read as `none`. Session lane; reads for members.
129
+ */
130
+ export declare function billing(): import("hono/hono-base").HonoBase<Environment, {
131
+ "/v1/orgs/:orgId{org_[A-Za-z0-9_-]+}/billing": {
132
+ $get: {
133
+ output: {
134
+ error: {
135
+ code: "upstream_error";
136
+ details?: readonly Response.error.Detail[] | undefined;
137
+ message: string;
138
+ };
139
+ requestId: string;
140
+ };
141
+ outputFormat: "json";
142
+ status: 502;
143
+ input: {
144
+ param: {
145
+ orgId: string;
146
+ };
147
+ } & {
148
+ query?: {
149
+ environment?: string | string[];
150
+ } | undefined;
151
+ };
152
+ } | {
153
+ output: {
154
+ error: {
155
+ code: "api_key_malformed";
156
+ details?: readonly Response.error.Detail[] | undefined;
157
+ message: string;
158
+ };
159
+ requestId: string;
160
+ };
161
+ outputFormat: "json";
162
+ status: 400;
163
+ input: {
164
+ param: {
165
+ orgId: string;
166
+ };
167
+ } & {
168
+ query?: {
169
+ environment?: string | string[];
170
+ } | undefined;
171
+ };
172
+ } | {
173
+ output: {
174
+ error: {
175
+ code: "api_key_invalid" | "api_key_missing";
176
+ details?: readonly Response.error.Detail[] | undefined;
177
+ message: string;
178
+ };
179
+ requestId: string;
180
+ };
181
+ outputFormat: "json";
182
+ status: 401;
183
+ input: {
184
+ param: {
185
+ orgId: string;
186
+ };
187
+ } & {
188
+ query?: {
189
+ environment?: string | string[];
190
+ } | undefined;
191
+ };
192
+ } | {
193
+ output: {
194
+ error: {
195
+ code: "query_invalid";
196
+ details?: readonly Response.error.Detail[] | undefined;
197
+ message: string;
198
+ };
199
+ requestId: string;
200
+ };
201
+ outputFormat: "json";
202
+ status: 400;
203
+ input: {
204
+ param: {
205
+ orgId: string;
206
+ };
207
+ } & {
208
+ query?: {
209
+ environment?: string | string[];
210
+ } | undefined;
211
+ };
212
+ } | {
213
+ output: {
214
+ error: {
215
+ code: "forbidden";
216
+ details?: readonly Response.error.Detail[] | undefined;
217
+ message: string;
218
+ };
219
+ requestId: string;
220
+ };
221
+ outputFormat: "json";
222
+ status: 403;
223
+ input: {
224
+ param: {
225
+ orgId: string;
226
+ };
227
+ } & {
228
+ query?: {
229
+ environment?: string | string[];
230
+ } | undefined;
231
+ };
232
+ } | {
233
+ output: {
234
+ error: {
235
+ code: "organization_not_found";
236
+ details?: readonly Response.error.Detail[] | undefined;
237
+ message: string;
238
+ };
239
+ requestId: string;
240
+ };
241
+ outputFormat: "json";
242
+ status: 404;
243
+ input: {
244
+ param: {
245
+ orgId: string;
246
+ };
247
+ } & {
248
+ query?: {
249
+ environment?: string | string[];
250
+ } | undefined;
251
+ };
252
+ } | {
253
+ output: {
254
+ error: {
255
+ code: "param_invalid";
256
+ details?: readonly Response.error.Detail[] | undefined;
257
+ message: string;
258
+ };
259
+ requestId: string;
260
+ };
261
+ outputFormat: "json";
262
+ status: 400;
263
+ input: {
264
+ param: {
265
+ orgId: string;
266
+ };
267
+ } & {
268
+ query?: {
269
+ environment?: string | string[];
270
+ } | undefined;
271
+ };
272
+ } | {
273
+ output: {
274
+ error: {
275
+ code: "billing_unconfigured";
276
+ details?: readonly Response.error.Detail[] | undefined;
277
+ message: string;
278
+ };
279
+ requestId: string;
280
+ };
281
+ outputFormat: "json";
282
+ status: 501;
283
+ input: {
284
+ param: {
285
+ orgId: string;
286
+ };
287
+ } & {
288
+ query?: {
289
+ environment?: string | string[];
290
+ } | undefined;
291
+ };
292
+ } | {
293
+ output: {
294
+ spend?: {
295
+ amount: string;
296
+ currency: "usd";
297
+ period: "month";
298
+ } | undefined;
299
+ spendLimit?: {
300
+ amount: string;
301
+ currency: "usd";
302
+ period: "month";
303
+ } | undefined;
304
+ status: "active" | "canceled" | "none" | "past_due";
305
+ txFeeLimit?: {
306
+ amount: string;
307
+ currency: "usd";
308
+ } | undefined;
309
+ updatedAt?: string | undefined;
310
+ };
311
+ outputFormat: "json";
312
+ status: 200;
313
+ input: {
314
+ param: {
315
+ orgId: string;
316
+ };
317
+ } & {
318
+ query?: {
319
+ environment?: string | string[];
320
+ } | undefined;
321
+ };
322
+ };
323
+ };
324
+ } & {
325
+ "/v1/orgs/:orgId{org_[A-Za-z0-9_-]+}/billing": {
326
+ $patch: {
327
+ output: {
328
+ error: {
329
+ code: "upstream_error";
330
+ details?: readonly Response.error.Detail[] | undefined;
331
+ message: string;
332
+ };
333
+ requestId: string;
334
+ };
335
+ outputFormat: "json";
336
+ status: 502;
337
+ input: {
338
+ param: {
339
+ orgId: string;
340
+ };
341
+ } & {
342
+ query?: {
343
+ environment?: string | string[];
344
+ } | undefined;
345
+ } & {
346
+ json: {
347
+ spendLimit?: {
348
+ amount: string;
349
+ currency?: "usd" | undefined;
350
+ period?: "month" | undefined;
351
+ } | null | undefined;
352
+ txFeeLimit?: {
353
+ amount: string;
354
+ currency?: "usd" | undefined;
355
+ } | null | undefined;
356
+ };
357
+ };
358
+ } | {
359
+ output: {
360
+ error: {
361
+ code: "api_key_malformed";
362
+ details?: readonly Response.error.Detail[] | undefined;
363
+ message: string;
364
+ };
365
+ requestId: string;
366
+ };
367
+ outputFormat: "json";
368
+ status: 400;
369
+ input: {
370
+ param: {
371
+ orgId: string;
372
+ };
373
+ } & {
374
+ query?: {
375
+ environment?: string | string[];
376
+ } | undefined;
377
+ } & {
378
+ json: {
379
+ spendLimit?: {
380
+ amount: string;
381
+ currency?: "usd" | undefined;
382
+ period?: "month" | undefined;
383
+ } | null | undefined;
384
+ txFeeLimit?: {
385
+ amount: string;
386
+ currency?: "usd" | undefined;
387
+ } | null | undefined;
388
+ };
389
+ };
390
+ } | {
391
+ output: {
392
+ error: {
393
+ code: "api_key_invalid" | "api_key_missing";
394
+ details?: readonly Response.error.Detail[] | undefined;
395
+ message: string;
396
+ };
397
+ requestId: string;
398
+ };
399
+ outputFormat: "json";
400
+ status: 401;
401
+ input: {
402
+ param: {
403
+ orgId: string;
404
+ };
405
+ } & {
406
+ query?: {
407
+ environment?: string | string[];
408
+ } | undefined;
409
+ } & {
410
+ json: {
411
+ spendLimit?: {
412
+ amount: string;
413
+ currency?: "usd" | undefined;
414
+ period?: "month" | undefined;
415
+ } | null | undefined;
416
+ txFeeLimit?: {
417
+ amount: string;
418
+ currency?: "usd" | undefined;
419
+ } | null | undefined;
420
+ };
421
+ };
422
+ } | {
423
+ output: {
424
+ error: {
425
+ code: "query_invalid";
426
+ details?: readonly Response.error.Detail[] | undefined;
427
+ message: string;
428
+ };
429
+ requestId: string;
430
+ };
431
+ outputFormat: "json";
432
+ status: 400;
433
+ input: {
434
+ param: {
435
+ orgId: string;
436
+ };
437
+ } & {
438
+ query?: {
439
+ environment?: string | string[];
440
+ } | undefined;
441
+ } & {
442
+ json: {
443
+ spendLimit?: {
444
+ amount: string;
445
+ currency?: "usd" | undefined;
446
+ period?: "month" | undefined;
447
+ } | null | undefined;
448
+ txFeeLimit?: {
449
+ amount: string;
450
+ currency?: "usd" | undefined;
451
+ } | null | undefined;
452
+ };
453
+ };
454
+ } | {
455
+ output: {
456
+ error: {
457
+ code: "forbidden";
458
+ details?: readonly Response.error.Detail[] | undefined;
459
+ message: string;
460
+ };
461
+ requestId: string;
462
+ };
463
+ outputFormat: "json";
464
+ status: 403;
465
+ input: {
466
+ param: {
467
+ orgId: string;
468
+ };
469
+ } & {
470
+ query?: {
471
+ environment?: string | string[];
472
+ } | undefined;
473
+ } & {
474
+ json: {
475
+ spendLimit?: {
476
+ amount: string;
477
+ currency?: "usd" | undefined;
478
+ period?: "month" | undefined;
479
+ } | null | undefined;
480
+ txFeeLimit?: {
481
+ amount: string;
482
+ currency?: "usd" | undefined;
483
+ } | null | undefined;
484
+ };
485
+ };
486
+ } | {
487
+ output: {
488
+ error: {
489
+ code: "organization_not_found";
490
+ details?: readonly Response.error.Detail[] | undefined;
491
+ message: string;
492
+ };
493
+ requestId: string;
494
+ };
495
+ outputFormat: "json";
496
+ status: 404;
497
+ input: {
498
+ param: {
499
+ orgId: string;
500
+ };
501
+ } & {
502
+ query?: {
503
+ environment?: string | string[];
504
+ } | undefined;
505
+ } & {
506
+ json: {
507
+ spendLimit?: {
508
+ amount: string;
509
+ currency?: "usd" | undefined;
510
+ period?: "month" | undefined;
511
+ } | null | undefined;
512
+ txFeeLimit?: {
513
+ amount: string;
514
+ currency?: "usd" | undefined;
515
+ } | null | undefined;
516
+ };
517
+ };
518
+ } | {
519
+ output: {
520
+ error: {
521
+ code: "param_invalid";
522
+ details?: readonly Response.error.Detail[] | undefined;
523
+ message: string;
524
+ };
525
+ requestId: string;
526
+ };
527
+ outputFormat: "json";
528
+ status: 400;
529
+ input: {
530
+ param: {
531
+ orgId: string;
532
+ };
533
+ } & {
534
+ query?: {
535
+ environment?: string | string[];
536
+ } | undefined;
537
+ } & {
538
+ json: {
539
+ spendLimit?: {
540
+ amount: string;
541
+ currency?: "usd" | undefined;
542
+ period?: "month" | undefined;
543
+ } | null | undefined;
544
+ txFeeLimit?: {
545
+ amount: string;
546
+ currency?: "usd" | undefined;
547
+ } | null | undefined;
548
+ };
549
+ };
550
+ } | {
551
+ output: {
552
+ error: {
553
+ code: "billing_unconfigured";
554
+ details?: readonly Response.error.Detail[] | undefined;
555
+ message: string;
556
+ };
557
+ requestId: string;
558
+ };
559
+ outputFormat: "json";
560
+ status: 501;
561
+ input: {
562
+ param: {
563
+ orgId: string;
564
+ };
565
+ } & {
566
+ query?: {
567
+ environment?: string | string[];
568
+ } | undefined;
569
+ } & {
570
+ json: {
571
+ spendLimit?: {
572
+ amount: string;
573
+ currency?: "usd" | undefined;
574
+ period?: "month" | undefined;
575
+ } | null | undefined;
576
+ txFeeLimit?: {
577
+ amount: string;
578
+ currency?: "usd" | undefined;
579
+ } | null | undefined;
580
+ };
581
+ };
582
+ } | {
583
+ output: {
584
+ spend?: {
585
+ amount: string;
586
+ currency: "usd";
587
+ period: "month";
588
+ } | undefined;
589
+ spendLimit?: {
590
+ amount: string;
591
+ currency: "usd";
592
+ period: "month";
593
+ } | undefined;
594
+ status: "active" | "canceled" | "none" | "past_due";
595
+ txFeeLimit?: {
596
+ amount: string;
597
+ currency: "usd";
598
+ } | undefined;
599
+ updatedAt?: string | undefined;
600
+ };
601
+ outputFormat: "json";
602
+ status: 200;
603
+ input: {
604
+ param: {
605
+ orgId: string;
606
+ };
607
+ } & {
608
+ query?: {
609
+ environment?: string | string[];
610
+ } | undefined;
611
+ } & {
612
+ json: {
613
+ spendLimit?: {
614
+ amount: string;
615
+ currency?: "usd" | undefined;
616
+ period?: "month" | undefined;
617
+ } | null | undefined;
618
+ txFeeLimit?: {
619
+ amount: string;
620
+ currency?: "usd" | undefined;
621
+ } | null | undefined;
622
+ };
623
+ };
624
+ } | {
625
+ output: {
626
+ error: {
627
+ code: "body_invalid";
628
+ details?: readonly Response.error.Detail[] | undefined;
629
+ message: string;
630
+ };
631
+ requestId: string;
632
+ };
633
+ outputFormat: "json";
634
+ status: 400;
635
+ input: {
636
+ param: {
637
+ orgId: string;
638
+ };
639
+ } & {
640
+ query?: {
641
+ environment?: string | string[];
642
+ } | undefined;
643
+ } & {
644
+ json: {
645
+ spendLimit?: {
646
+ amount: string;
647
+ currency?: "usd" | undefined;
648
+ period?: "month" | undefined;
649
+ } | null | undefined;
650
+ txFeeLimit?: {
651
+ amount: string;
652
+ currency?: "usd" | undefined;
653
+ } | null | undefined;
654
+ };
655
+ };
656
+ };
657
+ };
658
+ } & {
659
+ "/v1/orgs/:orgId{org_[A-Za-z0-9_-]+}/billing/stripe/checkout": {
660
+ $post: {
661
+ output: {
662
+ error: {
663
+ code: "upstream_error";
664
+ details?: readonly Response.error.Detail[] | undefined;
665
+ message: string;
666
+ };
667
+ requestId: string;
668
+ };
669
+ outputFormat: "json";
670
+ status: 502;
671
+ input: {
672
+ param: {
673
+ orgId: string;
674
+ };
675
+ } & {
676
+ query?: {
677
+ environment?: string | string[];
678
+ } | undefined;
679
+ };
680
+ } | {
681
+ output: {
682
+ error: {
683
+ code: "api_key_malformed";
684
+ details?: readonly Response.error.Detail[] | undefined;
685
+ message: string;
686
+ };
687
+ requestId: string;
688
+ };
689
+ outputFormat: "json";
690
+ status: 400;
691
+ input: {
692
+ param: {
693
+ orgId: string;
694
+ };
695
+ } & {
696
+ query?: {
697
+ environment?: string | string[];
698
+ } | undefined;
699
+ };
700
+ } | {
701
+ output: {
702
+ error: {
703
+ code: "api_key_invalid" | "api_key_missing";
704
+ details?: readonly Response.error.Detail[] | undefined;
705
+ message: string;
706
+ };
707
+ requestId: string;
708
+ };
709
+ outputFormat: "json";
710
+ status: 401;
711
+ input: {
712
+ param: {
713
+ orgId: string;
714
+ };
715
+ } & {
716
+ query?: {
717
+ environment?: string | string[];
718
+ } | undefined;
719
+ };
720
+ } | {
721
+ output: {
722
+ error: {
723
+ code: "query_invalid";
724
+ details?: readonly Response.error.Detail[] | undefined;
725
+ message: string;
726
+ };
727
+ requestId: string;
728
+ };
729
+ outputFormat: "json";
730
+ status: 400;
731
+ input: {
732
+ param: {
733
+ orgId: string;
734
+ };
735
+ } & {
736
+ query?: {
737
+ environment?: string | string[];
738
+ } | undefined;
739
+ };
740
+ } | {
741
+ output: {
742
+ error: {
743
+ code: "forbidden";
744
+ details?: readonly Response.error.Detail[] | undefined;
745
+ message: string;
746
+ };
747
+ requestId: string;
748
+ };
749
+ outputFormat: "json";
750
+ status: 403;
751
+ input: {
752
+ param: {
753
+ orgId: string;
754
+ };
755
+ } & {
756
+ query?: {
757
+ environment?: string | string[];
758
+ } | undefined;
759
+ };
760
+ } | {
761
+ output: {
762
+ error: {
763
+ code: "organization_not_found";
764
+ details?: readonly Response.error.Detail[] | undefined;
765
+ message: string;
766
+ };
767
+ requestId: string;
768
+ };
769
+ outputFormat: "json";
770
+ status: 404;
771
+ input: {
772
+ param: {
773
+ orgId: string;
774
+ };
775
+ } & {
776
+ query?: {
777
+ environment?: string | string[];
778
+ } | undefined;
779
+ };
780
+ } | {
781
+ output: {
782
+ error: {
783
+ code: "param_invalid";
784
+ details?: readonly Response.error.Detail[] | undefined;
785
+ message: string;
786
+ };
787
+ requestId: string;
788
+ };
789
+ outputFormat: "json";
790
+ status: 400;
791
+ input: {
792
+ param: {
793
+ orgId: string;
794
+ };
795
+ } & {
796
+ query?: {
797
+ environment?: string | string[];
798
+ } | undefined;
799
+ };
800
+ } | {
801
+ output: {
802
+ error: {
803
+ code: "billing_unconfigured";
804
+ details?: readonly Response.error.Detail[] | undefined;
805
+ message: string;
806
+ };
807
+ requestId: string;
808
+ };
809
+ outputFormat: "json";
810
+ status: 501;
811
+ input: {
812
+ param: {
813
+ orgId: string;
814
+ };
815
+ } & {
816
+ query?: {
817
+ environment?: string | string[];
818
+ } | undefined;
819
+ };
820
+ } | {
821
+ output: {
822
+ url: string;
823
+ };
824
+ outputFormat: "json";
825
+ status: 200;
826
+ input: {
827
+ param: {
828
+ orgId: string;
829
+ };
830
+ } & {
831
+ query?: {
832
+ environment?: string | string[];
833
+ } | undefined;
834
+ };
835
+ };
836
+ };
837
+ } & {
838
+ "/v1/orgs/:orgId{org_[A-Za-z0-9_-]+}/billing/stripe/manage": {
839
+ $post: {
840
+ output: {
841
+ error: {
842
+ code: "upstream_error";
843
+ details?: readonly Response.error.Detail[] | undefined;
844
+ message: string;
845
+ };
846
+ requestId: string;
847
+ };
848
+ outputFormat: "json";
849
+ status: 502;
850
+ input: {
851
+ param: {
852
+ orgId: string;
853
+ };
854
+ } & {
855
+ query?: {
856
+ environment?: string | string[];
857
+ } | undefined;
858
+ };
859
+ } | {
860
+ output: {
861
+ error: {
862
+ code: "api_key_malformed";
863
+ details?: readonly Response.error.Detail[] | undefined;
864
+ message: string;
865
+ };
866
+ requestId: string;
867
+ };
868
+ outputFormat: "json";
869
+ status: 400;
870
+ input: {
871
+ param: {
872
+ orgId: string;
873
+ };
874
+ } & {
875
+ query?: {
876
+ environment?: string | string[];
877
+ } | undefined;
878
+ };
879
+ } | {
880
+ output: {
881
+ error: {
882
+ code: "api_key_invalid" | "api_key_missing";
883
+ details?: readonly Response.error.Detail[] | undefined;
884
+ message: string;
885
+ };
886
+ requestId: string;
887
+ };
888
+ outputFormat: "json";
889
+ status: 401;
890
+ input: {
891
+ param: {
892
+ orgId: string;
893
+ };
894
+ } & {
895
+ query?: {
896
+ environment?: string | string[];
897
+ } | undefined;
898
+ };
899
+ } | {
900
+ output: {
901
+ error: {
902
+ code: "query_invalid";
903
+ details?: readonly Response.error.Detail[] | undefined;
904
+ message: string;
905
+ };
906
+ requestId: string;
907
+ };
908
+ outputFormat: "json";
909
+ status: 400;
910
+ input: {
911
+ param: {
912
+ orgId: string;
913
+ };
914
+ } & {
915
+ query?: {
916
+ environment?: string | string[];
917
+ } | undefined;
918
+ };
919
+ } | {
920
+ output: {
921
+ error: {
922
+ code: "forbidden";
923
+ details?: readonly Response.error.Detail[] | undefined;
924
+ message: string;
925
+ };
926
+ requestId: string;
927
+ };
928
+ outputFormat: "json";
929
+ status: 403;
930
+ input: {
931
+ param: {
932
+ orgId: string;
933
+ };
934
+ } & {
935
+ query?: {
936
+ environment?: string | string[];
937
+ } | undefined;
938
+ };
939
+ } | {
940
+ output: {
941
+ error: {
942
+ code: "organization_not_found";
943
+ details?: readonly Response.error.Detail[] | undefined;
944
+ message: string;
945
+ };
946
+ requestId: string;
947
+ };
948
+ outputFormat: "json";
949
+ status: 404;
950
+ input: {
951
+ param: {
952
+ orgId: string;
953
+ };
954
+ } & {
955
+ query?: {
956
+ environment?: string | string[];
957
+ } | undefined;
958
+ };
959
+ } | {
960
+ output: {
961
+ error: {
962
+ code: "param_invalid";
963
+ details?: readonly Response.error.Detail[] | undefined;
964
+ message: string;
965
+ };
966
+ requestId: string;
967
+ };
968
+ outputFormat: "json";
969
+ status: 400;
970
+ input: {
971
+ param: {
972
+ orgId: string;
973
+ };
974
+ } & {
975
+ query?: {
976
+ environment?: string | string[];
977
+ } | undefined;
978
+ };
979
+ } | {
980
+ output: {
981
+ error: {
982
+ code: "billing_unconfigured";
983
+ details?: readonly Response.error.Detail[] | undefined;
984
+ message: string;
985
+ };
986
+ requestId: string;
987
+ };
988
+ outputFormat: "json";
989
+ status: 501;
990
+ input: {
991
+ param: {
992
+ orgId: string;
993
+ };
994
+ } & {
995
+ query?: {
996
+ environment?: string | string[];
997
+ } | undefined;
998
+ };
999
+ } | {
1000
+ output: {
1001
+ url: string;
1002
+ };
1003
+ outputFormat: "json";
1004
+ status: 200;
1005
+ input: {
1006
+ param: {
1007
+ orgId: string;
1008
+ };
1009
+ } & {
1010
+ query?: {
1011
+ environment?: string | string[];
1012
+ } | undefined;
1013
+ };
1014
+ } | {
1015
+ output: {
1016
+ error: {
1017
+ code: "billing_not_found";
1018
+ details?: readonly Response.error.Detail[] | undefined;
1019
+ message: string;
1020
+ };
1021
+ requestId: string;
1022
+ };
1023
+ outputFormat: "json";
1024
+ status: 404;
1025
+ input: {
1026
+ param: {
1027
+ orgId: string;
1028
+ };
1029
+ } & {
1030
+ query?: {
1031
+ environment?: string | string[];
1032
+ } | undefined;
1033
+ };
1034
+ };
1035
+ };
1036
+ } & {
1037
+ "/v1/orgs/:orgId{org_[A-Za-z0-9_-]+}/billing/payment-methods": {
1038
+ $get: {
1039
+ output: {
1040
+ error: {
1041
+ code: "upstream_error";
1042
+ details?: readonly Response.error.Detail[] | undefined;
1043
+ message: string;
1044
+ };
1045
+ requestId: string;
1046
+ };
1047
+ outputFormat: "json";
1048
+ status: 502;
1049
+ input: {
1050
+ param: {
1051
+ orgId: string;
1052
+ };
1053
+ } & {
1054
+ query?: {
1055
+ environment?: string | string[];
1056
+ } | undefined;
1057
+ };
1058
+ } | {
1059
+ output: {
1060
+ error: {
1061
+ code: "api_key_malformed";
1062
+ details?: readonly Response.error.Detail[] | undefined;
1063
+ message: string;
1064
+ };
1065
+ requestId: string;
1066
+ };
1067
+ outputFormat: "json";
1068
+ status: 400;
1069
+ input: {
1070
+ param: {
1071
+ orgId: string;
1072
+ };
1073
+ } & {
1074
+ query?: {
1075
+ environment?: string | string[];
1076
+ } | undefined;
1077
+ };
1078
+ } | {
1079
+ output: {
1080
+ error: {
1081
+ code: "api_key_invalid" | "api_key_missing";
1082
+ details?: readonly Response.error.Detail[] | undefined;
1083
+ message: string;
1084
+ };
1085
+ requestId: string;
1086
+ };
1087
+ outputFormat: "json";
1088
+ status: 401;
1089
+ input: {
1090
+ param: {
1091
+ orgId: string;
1092
+ };
1093
+ } & {
1094
+ query?: {
1095
+ environment?: string | string[];
1096
+ } | undefined;
1097
+ };
1098
+ } | {
1099
+ output: {
1100
+ error: {
1101
+ code: "query_invalid";
1102
+ details?: readonly Response.error.Detail[] | undefined;
1103
+ message: string;
1104
+ };
1105
+ requestId: string;
1106
+ };
1107
+ outputFormat: "json";
1108
+ status: 400;
1109
+ input: {
1110
+ param: {
1111
+ orgId: string;
1112
+ };
1113
+ } & {
1114
+ query?: {
1115
+ environment?: string | string[];
1116
+ } | undefined;
1117
+ };
1118
+ } | {
1119
+ output: {
1120
+ error: {
1121
+ code: "forbidden";
1122
+ details?: readonly Response.error.Detail[] | undefined;
1123
+ message: string;
1124
+ };
1125
+ requestId: string;
1126
+ };
1127
+ outputFormat: "json";
1128
+ status: 403;
1129
+ input: {
1130
+ param: {
1131
+ orgId: string;
1132
+ };
1133
+ } & {
1134
+ query?: {
1135
+ environment?: string | string[];
1136
+ } | undefined;
1137
+ };
1138
+ } | {
1139
+ output: {
1140
+ error: {
1141
+ code: "organization_not_found";
1142
+ details?: readonly Response.error.Detail[] | undefined;
1143
+ message: string;
1144
+ };
1145
+ requestId: string;
1146
+ };
1147
+ outputFormat: "json";
1148
+ status: 404;
1149
+ input: {
1150
+ param: {
1151
+ orgId: string;
1152
+ };
1153
+ } & {
1154
+ query?: {
1155
+ environment?: string | string[];
1156
+ } | undefined;
1157
+ };
1158
+ } | {
1159
+ output: {
1160
+ error: {
1161
+ code: "param_invalid";
1162
+ details?: readonly Response.error.Detail[] | undefined;
1163
+ message: string;
1164
+ };
1165
+ requestId: string;
1166
+ };
1167
+ outputFormat: "json";
1168
+ status: 400;
1169
+ input: {
1170
+ param: {
1171
+ orgId: string;
1172
+ };
1173
+ } & {
1174
+ query?: {
1175
+ environment?: string | string[];
1176
+ } | undefined;
1177
+ };
1178
+ } | {
1179
+ output: {
1180
+ error: {
1181
+ code: "billing_unconfigured";
1182
+ details?: readonly Response.error.Detail[] | undefined;
1183
+ message: string;
1184
+ };
1185
+ requestId: string;
1186
+ };
1187
+ outputFormat: "json";
1188
+ status: 501;
1189
+ input: {
1190
+ param: {
1191
+ orgId: string;
1192
+ };
1193
+ } & {
1194
+ query?: {
1195
+ environment?: string | string[];
1196
+ } | undefined;
1197
+ };
1198
+ } | {
1199
+ output: {
1200
+ data: {
1201
+ card?: {
1202
+ brand: string;
1203
+ expMonth: number;
1204
+ expYear: number;
1205
+ last4: string;
1206
+ } | undefined;
1207
+ createdAt: string;
1208
+ default: boolean;
1209
+ id: string;
1210
+ provider: "stripe";
1211
+ type: string;
1212
+ }[];
1213
+ };
1214
+ outputFormat: "json";
1215
+ status: 200;
1216
+ input: {
1217
+ param: {
1218
+ orgId: string;
1219
+ };
1220
+ } & {
1221
+ query?: {
1222
+ environment?: string | string[];
1223
+ } | undefined;
1224
+ };
1225
+ };
1226
+ };
1227
+ } & {
1228
+ "/v1/orgs/:orgId{org_[A-Za-z0-9_-]+}/billing/payment-methods/:methodId{pm_[A-Za-z0-9_-]+}": {
1229
+ $delete: {
1230
+ output: {
1231
+ error: {
1232
+ code: "upstream_error";
1233
+ details?: readonly Response.error.Detail[] | undefined;
1234
+ message: string;
1235
+ };
1236
+ requestId: string;
1237
+ };
1238
+ outputFormat: "json";
1239
+ status: 502;
1240
+ input: {
1241
+ param: {
1242
+ methodId: string;
1243
+ orgId: string;
1244
+ };
1245
+ } & {
1246
+ query?: {
1247
+ environment?: string | string[];
1248
+ } | undefined;
1249
+ };
1250
+ } | {
1251
+ output: {
1252
+ error: {
1253
+ code: "api_key_malformed";
1254
+ details?: readonly Response.error.Detail[] | undefined;
1255
+ message: string;
1256
+ };
1257
+ requestId: string;
1258
+ };
1259
+ outputFormat: "json";
1260
+ status: 400;
1261
+ input: {
1262
+ param: {
1263
+ methodId: string;
1264
+ orgId: string;
1265
+ };
1266
+ } & {
1267
+ query?: {
1268
+ environment?: string | string[];
1269
+ } | undefined;
1270
+ };
1271
+ } | {
1272
+ output: {
1273
+ error: {
1274
+ code: "api_key_invalid" | "api_key_missing";
1275
+ details?: readonly Response.error.Detail[] | undefined;
1276
+ message: string;
1277
+ };
1278
+ requestId: string;
1279
+ };
1280
+ outputFormat: "json";
1281
+ status: 401;
1282
+ input: {
1283
+ param: {
1284
+ methodId: string;
1285
+ orgId: string;
1286
+ };
1287
+ } & {
1288
+ query?: {
1289
+ environment?: string | string[];
1290
+ } | undefined;
1291
+ };
1292
+ } | {
1293
+ output: {
1294
+ error: {
1295
+ code: "query_invalid";
1296
+ details?: readonly Response.error.Detail[] | undefined;
1297
+ message: string;
1298
+ };
1299
+ requestId: string;
1300
+ };
1301
+ outputFormat: "json";
1302
+ status: 400;
1303
+ input: {
1304
+ param: {
1305
+ methodId: string;
1306
+ orgId: string;
1307
+ };
1308
+ } & {
1309
+ query?: {
1310
+ environment?: string | string[];
1311
+ } | undefined;
1312
+ };
1313
+ } | {
1314
+ output: {
1315
+ error: {
1316
+ code: "forbidden";
1317
+ details?: readonly Response.error.Detail[] | undefined;
1318
+ message: string;
1319
+ };
1320
+ requestId: string;
1321
+ };
1322
+ outputFormat: "json";
1323
+ status: 403;
1324
+ input: {
1325
+ param: {
1326
+ methodId: string;
1327
+ orgId: string;
1328
+ };
1329
+ } & {
1330
+ query?: {
1331
+ environment?: string | string[];
1332
+ } | undefined;
1333
+ };
1334
+ } | {
1335
+ output: {
1336
+ error: {
1337
+ code: "organization_not_found";
1338
+ details?: readonly Response.error.Detail[] | undefined;
1339
+ message: string;
1340
+ };
1341
+ requestId: string;
1342
+ };
1343
+ outputFormat: "json";
1344
+ status: 404;
1345
+ input: {
1346
+ param: {
1347
+ methodId: string;
1348
+ orgId: string;
1349
+ };
1350
+ } & {
1351
+ query?: {
1352
+ environment?: string | string[];
1353
+ } | undefined;
1354
+ };
1355
+ } | {
1356
+ output: {
1357
+ error: {
1358
+ code: "param_invalid";
1359
+ details?: readonly Response.error.Detail[] | undefined;
1360
+ message: string;
1361
+ };
1362
+ requestId: string;
1363
+ };
1364
+ outputFormat: "json";
1365
+ status: 400;
1366
+ input: {
1367
+ param: {
1368
+ methodId: string;
1369
+ orgId: string;
1370
+ };
1371
+ } & {
1372
+ query?: {
1373
+ environment?: string | string[];
1374
+ } | undefined;
1375
+ };
1376
+ } | {
1377
+ output: {
1378
+ error: {
1379
+ code: "billing_unconfigured";
1380
+ details?: readonly Response.error.Detail[] | undefined;
1381
+ message: string;
1382
+ };
1383
+ requestId: string;
1384
+ };
1385
+ outputFormat: "json";
1386
+ status: 501;
1387
+ input: {
1388
+ param: {
1389
+ methodId: string;
1390
+ orgId: string;
1391
+ };
1392
+ } & {
1393
+ query?: {
1394
+ environment?: string | string[];
1395
+ } | undefined;
1396
+ };
1397
+ } | {
1398
+ output: {
1399
+ spend?: {
1400
+ amount: string;
1401
+ currency: "usd";
1402
+ period: "month";
1403
+ } | undefined;
1404
+ spendLimit?: {
1405
+ amount: string;
1406
+ currency: "usd";
1407
+ period: "month";
1408
+ } | undefined;
1409
+ status: "active" | "canceled" | "none" | "past_due";
1410
+ txFeeLimit?: {
1411
+ amount: string;
1412
+ currency: "usd";
1413
+ } | undefined;
1414
+ updatedAt?: string | undefined;
1415
+ };
1416
+ outputFormat: "json";
1417
+ status: 200;
1418
+ input: {
1419
+ param: {
1420
+ methodId: string;
1421
+ orgId: string;
1422
+ };
1423
+ } & {
1424
+ query?: {
1425
+ environment?: string | string[];
1426
+ } | undefined;
1427
+ };
1428
+ } | {
1429
+ output: {
1430
+ error: {
1431
+ code: "billing_not_found";
1432
+ details?: readonly Response.error.Detail[] | undefined;
1433
+ message: string;
1434
+ };
1435
+ requestId: string;
1436
+ };
1437
+ outputFormat: "json";
1438
+ status: 404;
1439
+ input: {
1440
+ param: {
1441
+ methodId: string;
1442
+ orgId: string;
1443
+ };
1444
+ } & {
1445
+ query?: {
1446
+ environment?: string | string[];
1447
+ } | undefined;
1448
+ };
1449
+ } | {
1450
+ output: {
1451
+ error: {
1452
+ code: "payment_method_not_found";
1453
+ details?: readonly Response.error.Detail[] | undefined;
1454
+ message: string;
1455
+ };
1456
+ requestId: string;
1457
+ };
1458
+ outputFormat: "json";
1459
+ status: 404;
1460
+ input: {
1461
+ param: {
1462
+ methodId: string;
1463
+ orgId: string;
1464
+ };
1465
+ } & {
1466
+ query?: {
1467
+ environment?: string | string[];
1468
+ } | undefined;
1469
+ };
1470
+ };
1471
+ };
1472
+ } & {
1473
+ "/stripe/webhook": {
1474
+ $post: {
1475
+ output: {
1476
+ error: {
1477
+ code: "upstream_error";
1478
+ details?: readonly Response.error.Detail[] | undefined;
1479
+ message: string;
1480
+ };
1481
+ requestId: string;
1482
+ };
1483
+ outputFormat: "json";
1484
+ status: 502;
1485
+ input: {};
1486
+ } | {
1487
+ output: {
1488
+ error: {
1489
+ code: "billing_unconfigured";
1490
+ details?: readonly Response.error.Detail[] | undefined;
1491
+ message: string;
1492
+ };
1493
+ requestId: string;
1494
+ };
1495
+ outputFormat: "json";
1496
+ status: 501;
1497
+ input: {};
1498
+ } | {
1499
+ output: {
1500
+ error: {
1501
+ code: "signature_invalid";
1502
+ details?: readonly Response.error.Detail[] | undefined;
1503
+ message: string;
1504
+ };
1505
+ requestId: string;
1506
+ };
1507
+ outputFormat: "json";
1508
+ status: 400;
1509
+ input: {};
1510
+ } | {
1511
+ output: {
1512
+ received: true;
1513
+ };
1514
+ outputFormat: "json";
1515
+ status: 200;
1516
+ input: {};
1517
+ };
1518
+ };
1519
+ }, "/", "/stripe/webhook">;
1520
+ //# sourceMappingURL=billing.d.ts.map