@distilled.cloud/cloudflare 0.0.0 → 0.2.3

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 (560) hide show
  1. package/README.md +41 -7
  2. package/lib/auth.d.ts +13 -0
  3. package/lib/auth.d.ts.map +1 -0
  4. package/lib/auth.js +12 -0
  5. package/lib/auth.js.map +1 -0
  6. package/lib/category.d.ts +2 -0
  7. package/lib/category.d.ts.map +1 -0
  8. package/lib/category.js +2 -0
  9. package/lib/category.js.map +1 -0
  10. package/lib/client/api.d.ts +14 -0
  11. package/lib/client/api.d.ts.map +1 -0
  12. package/lib/client/api.js +245 -0
  13. package/lib/client/api.js.map +1 -0
  14. package/lib/client/index.d.ts +8 -0
  15. package/lib/client/index.d.ts.map +1 -0
  16. package/lib/client/index.js +8 -0
  17. package/lib/client/index.js.map +1 -0
  18. package/lib/credentials.d.ts +14 -0
  19. package/lib/credentials.d.ts.map +1 -0
  20. package/lib/credentials.js +17 -0
  21. package/lib/credentials.js.map +1 -0
  22. package/lib/errors.d.ts +37 -0
  23. package/lib/errors.d.ts.map +1 -0
  24. package/lib/errors.js +31 -0
  25. package/lib/errors.js.map +1 -0
  26. package/lib/index.d.ts +10 -0
  27. package/lib/index.d.ts.map +1 -0
  28. package/lib/index.js +10 -0
  29. package/lib/index.js.map +1 -0
  30. package/lib/retry.d.ts +14 -0
  31. package/lib/retry.d.ts.map +1 -0
  32. package/lib/retry.js +14 -0
  33. package/lib/retry.js.map +1 -0
  34. package/lib/schemas.d.ts +29 -0
  35. package/lib/schemas.d.ts.map +1 -0
  36. package/lib/schemas.js +34 -0
  37. package/lib/schemas.js.map +1 -0
  38. package/lib/services/abuse-reports.d.ts +224 -0
  39. package/lib/services/abuse-reports.d.ts.map +1 -0
  40. package/lib/services/abuse-reports.js +353 -0
  41. package/lib/services/abuse-reports.js.map +1 -0
  42. package/lib/services/accounts.d.ts +682 -0
  43. package/lib/services/accounts.d.ts.map +1 -0
  44. package/lib/services/accounts.js +805 -0
  45. package/lib/services/accounts.js.map +1 -0
  46. package/lib/services/acm.d.ts +73 -0
  47. package/lib/services/acm.d.ts.map +1 -0
  48. package/lib/services/acm.js +76 -0
  49. package/lib/services/acm.js.map +1 -0
  50. package/lib/services/addressing.d.ts +1208 -0
  51. package/lib/services/addressing.d.ts.map +1 -0
  52. package/lib/services/addressing.js +1776 -0
  53. package/lib/services/addressing.js.map +1 -0
  54. package/lib/services/ai-gateway.d.ts +956 -0
  55. package/lib/services/ai-gateway.d.ts.map +1 -0
  56. package/lib/services/ai-gateway.js +1706 -0
  57. package/lib/services/ai-gateway.js.map +1 -0
  58. package/lib/services/ai.d.ts +243 -0
  59. package/lib/services/ai.d.ts.map +1 -0
  60. package/lib/services/ai.js +299 -0
  61. package/lib/services/ai.js.map +1 -0
  62. package/lib/services/aisearch.d.ts +915 -0
  63. package/lib/services/aisearch.d.ts.map +1 -0
  64. package/lib/services/aisearch.js +2425 -0
  65. package/lib/services/aisearch.js.map +1 -0
  66. package/lib/services/alerting.d.ts +718 -0
  67. package/lib/services/alerting.d.ts.map +1 -0
  68. package/lib/services/alerting.js +1388 -0
  69. package/lib/services/alerting.js.map +1 -0
  70. package/lib/services/api-gateway.d.ts +830 -0
  71. package/lib/services/api-gateway.d.ts.map +1 -0
  72. package/lib/services/api-gateway.js +1548 -0
  73. package/lib/services/api-gateway.js.map +1 -0
  74. package/lib/services/argo.d.ts +101 -0
  75. package/lib/services/argo.d.ts.map +1 -0
  76. package/lib/services/argo.js +105 -0
  77. package/lib/services/argo.js.map +1 -0
  78. package/lib/services/audit-logs.d.ts +46 -0
  79. package/lib/services/audit-logs.d.ts.map +1 -0
  80. package/lib/services/audit-logs.js +37 -0
  81. package/lib/services/audit-logs.js.map +1 -0
  82. package/lib/services/billing.d.ts +62 -0
  83. package/lib/services/billing.d.ts.map +1 -0
  84. package/lib/services/billing.js +100 -0
  85. package/lib/services/billing.js.map +1 -0
  86. package/lib/services/bot-management.d.ts +124 -0
  87. package/lib/services/bot-management.d.ts.map +1 -0
  88. package/lib/services/bot-management.js +262 -0
  89. package/lib/services/bot-management.js.map +1 -0
  90. package/lib/services/botnet-feed.d.ts +65 -0
  91. package/lib/services/botnet-feed.d.ts.map +1 -0
  92. package/lib/services/botnet-feed.js +84 -0
  93. package/lib/services/botnet-feed.js.map +1 -0
  94. package/lib/services/brand-protection.d.ts +188 -0
  95. package/lib/services/brand-protection.d.ts.map +1 -0
  96. package/lib/services/brand-protection.js +214 -0
  97. package/lib/services/brand-protection.js.map +1 -0
  98. package/lib/services/browser-rendering.d.ts +857 -0
  99. package/lib/services/browser-rendering.d.ts.map +1 -0
  100. package/lib/services/browser-rendering.js +1141 -0
  101. package/lib/services/browser-rendering.js.map +1 -0
  102. package/lib/services/cache.d.ts +287 -0
  103. package/lib/services/cache.d.ts.map +1 -0
  104. package/lib/services/cache.js +330 -0
  105. package/lib/services/cache.js.map +1 -0
  106. package/lib/services/calls.d.ts +202 -0
  107. package/lib/services/calls.d.ts.map +1 -0
  108. package/lib/services/calls.js +175 -0
  109. package/lib/services/calls.js.map +1 -0
  110. package/lib/services/certificate-authorities.d.ts +40 -0
  111. package/lib/services/certificate-authorities.d.ts.map +1 -0
  112. package/lib/services/certificate-authorities.js +49 -0
  113. package/lib/services/certificate-authorities.js.map +1 -0
  114. package/lib/services/client-certificates.d.ts +254 -0
  115. package/lib/services/client-certificates.d.ts.map +1 -0
  116. package/lib/services/client-certificates.js +350 -0
  117. package/lib/services/client-certificates.js.map +1 -0
  118. package/lib/services/cloud-connector.d.ts +59 -0
  119. package/lib/services/cloud-connector.d.ts.map +1 -0
  120. package/lib/services/cloud-connector.js +84 -0
  121. package/lib/services/cloud-connector.js.map +1 -0
  122. package/lib/services/cloudforce-one.d.ts +1318 -0
  123. package/lib/services/cloudforce-one.d.ts.map +1 -0
  124. package/lib/services/cloudforce-one.js +1684 -0
  125. package/lib/services/cloudforce-one.js.map +1 -0
  126. package/lib/services/connectivity.d.ts +248 -0
  127. package/lib/services/connectivity.d.ts.map +1 -0
  128. package/lib/services/connectivity.js +377 -0
  129. package/lib/services/connectivity.js.map +1 -0
  130. package/lib/services/content-scanning.d.ts +131 -0
  131. package/lib/services/content-scanning.d.ts.map +1 -0
  132. package/lib/services/content-scanning.js +156 -0
  133. package/lib/services/content-scanning.js.map +1 -0
  134. package/lib/services/custom-certificates.d.ts +211 -0
  135. package/lib/services/custom-certificates.d.ts.map +1 -0
  136. package/lib/services/custom-certificates.js +309 -0
  137. package/lib/services/custom-certificates.js.map +1 -0
  138. package/lib/services/custom-hostnames.d.ts +525 -0
  139. package/lib/services/custom-hostnames.d.ts.map +1 -0
  140. package/lib/services/custom-hostnames.js +1164 -0
  141. package/lib/services/custom-hostnames.js.map +1 -0
  142. package/lib/services/custom-nameservers.d.ts +67 -0
  143. package/lib/services/custom-nameservers.d.ts.map +1 -0
  144. package/lib/services/custom-nameservers.js +80 -0
  145. package/lib/services/custom-nameservers.js.map +1 -0
  146. package/lib/services/custom-pages.d.ts +74 -0
  147. package/lib/services/custom-pages.d.ts.map +1 -0
  148. package/lib/services/custom-pages.js +125 -0
  149. package/lib/services/custom-pages.js.map +1 -0
  150. package/lib/services/d1.d.ts +326 -0
  151. package/lib/services/d1.d.ts.map +1 -0
  152. package/lib/services/d1.js +448 -0
  153. package/lib/services/d1.js.map +1 -0
  154. package/lib/services/dcv-delegation.d.ts +24 -0
  155. package/lib/services/dcv-delegation.d.ts.map +1 -0
  156. package/lib/services/dcv-delegation.js +24 -0
  157. package/lib/services/dcv-delegation.js.map +1 -0
  158. package/lib/services/diagnostics.d.ts +175 -0
  159. package/lib/services/diagnostics.d.ts.map +1 -0
  160. package/lib/services/diagnostics.js +273 -0
  161. package/lib/services/diagnostics.js.map +1 -0
  162. package/lib/services/dns-firewall.d.ts +288 -0
  163. package/lib/services/dns-firewall.d.ts.map +1 -0
  164. package/lib/services/dns-firewall.js +373 -0
  165. package/lib/services/dns-firewall.js.map +1 -0
  166. package/lib/services/dns.d.ts +2946 -0
  167. package/lib/services/dns.d.ts.map +1 -0
  168. package/lib/services/dns.js +4511 -0
  169. package/lib/services/dns.js.map +1 -0
  170. package/lib/services/durable-objects.d.ts +61 -0
  171. package/lib/services/durable-objects.d.ts.map +1 -0
  172. package/lib/services/durable-objects.js +66 -0
  173. package/lib/services/durable-objects.js.map +1 -0
  174. package/lib/services/email-routing.d.ts +542 -0
  175. package/lib/services/email-routing.d.ts.map +1 -0
  176. package/lib/services/email-routing.js +662 -0
  177. package/lib/services/email-routing.js.map +1 -0
  178. package/lib/services/email-security.d.ts +1131 -0
  179. package/lib/services/email-security.d.ts.map +1 -0
  180. package/lib/services/email-security.js +2065 -0
  181. package/lib/services/email-security.js.map +1 -0
  182. package/lib/services/filters.d.ts +157 -0
  183. package/lib/services/filters.d.ts.map +1 -0
  184. package/lib/services/filters.js +135 -0
  185. package/lib/services/filters.js.map +1 -0
  186. package/lib/services/firewall.d.ts +1080 -0
  187. package/lib/services/firewall.d.ts.map +1 -0
  188. package/lib/services/firewall.js +1881 -0
  189. package/lib/services/firewall.js.map +1 -0
  190. package/lib/services/healthchecks.d.ts +464 -0
  191. package/lib/services/healthchecks.d.ts.map +1 -0
  192. package/lib/services/healthchecks.js +838 -0
  193. package/lib/services/healthchecks.js.map +1 -0
  194. package/lib/services/hostnames.d.ts +74 -0
  195. package/lib/services/hostnames.d.ts.map +1 -0
  196. package/lib/services/hostnames.js +100 -0
  197. package/lib/services/hostnames.js.map +1 -0
  198. package/lib/services/hyperdrive.d.ts +203 -0
  199. package/lib/services/hyperdrive.d.ts.map +1 -0
  200. package/lib/services/hyperdrive.js +299 -0
  201. package/lib/services/hyperdrive.js.map +1 -0
  202. package/lib/services/iam.d.ts +554 -0
  203. package/lib/services/iam.d.ts.map +1 -0
  204. package/lib/services/iam.js +743 -0
  205. package/lib/services/iam.js.map +1 -0
  206. package/lib/services/images.d.ts +403 -0
  207. package/lib/services/images.d.ts.map +1 -0
  208. package/lib/services/images.js +417 -0
  209. package/lib/services/images.js.map +1 -0
  210. package/lib/services/intel.d.ts +768 -0
  211. package/lib/services/intel.d.ts.map +1 -0
  212. package/lib/services/intel.js +1179 -0
  213. package/lib/services/intel.js.map +1 -0
  214. package/lib/services/ips.d.ts +28 -0
  215. package/lib/services/ips.d.ts.map +1 -0
  216. package/lib/services/ips.js +39 -0
  217. package/lib/services/ips.js.map +1 -0
  218. package/lib/services/keyless-certificates.d.ts +177 -0
  219. package/lib/services/keyless-certificates.d.ts.map +1 -0
  220. package/lib/services/keyless-certificates.js +216 -0
  221. package/lib/services/keyless-certificates.js.map +1 -0
  222. package/lib/services/kv.d.ts +339 -0
  223. package/lib/services/kv.d.ts.map +1 -0
  224. package/lib/services/kv.js +402 -0
  225. package/lib/services/kv.js.map +1 -0
  226. package/lib/services/leaked-credential-checks.d.ts +119 -0
  227. package/lib/services/leaked-credential-checks.d.ts.map +1 -0
  228. package/lib/services/leaked-credential-checks.js +130 -0
  229. package/lib/services/leaked-credential-checks.js.map +1 -0
  230. package/lib/services/load-balancers.d.ts +1767 -0
  231. package/lib/services/load-balancers.d.ts.map +1 -0
  232. package/lib/services/load-balancers.js +3068 -0
  233. package/lib/services/load-balancers.js.map +1 -0
  234. package/lib/services/logpush.d.ts +401 -0
  235. package/lib/services/logpush.d.ts.map +1 -0
  236. package/lib/services/logpush.js +724 -0
  237. package/lib/services/logpush.js.map +1 -0
  238. package/lib/services/logs.d.ts +125 -0
  239. package/lib/services/logs.d.ts.map +1 -0
  240. package/lib/services/logs.js +145 -0
  241. package/lib/services/logs.js.map +1 -0
  242. package/lib/services/magic-cloud-networking.d.ts +1599 -0
  243. package/lib/services/magic-cloud-networking.d.ts.map +1 -0
  244. package/lib/services/magic-cloud-networking.js +5205 -0
  245. package/lib/services/magic-cloud-networking.js.map +1 -0
  246. package/lib/services/magic-network-monitoring.d.ts +379 -0
  247. package/lib/services/magic-network-monitoring.d.ts.map +1 -0
  248. package/lib/services/magic-network-monitoring.js +535 -0
  249. package/lib/services/magic-network-monitoring.js.map +1 -0
  250. package/lib/services/magic-transit.d.ts +3650 -0
  251. package/lib/services/magic-transit.d.ts.map +1 -0
  252. package/lib/services/magic-transit.js +6120 -0
  253. package/lib/services/magic-transit.js.map +1 -0
  254. package/lib/services/managed-transforms.d.ts +79 -0
  255. package/lib/services/managed-transforms.d.ts.map +1 -0
  256. package/lib/services/managed-transforms.js +107 -0
  257. package/lib/services/managed-transforms.js.map +1 -0
  258. package/lib/services/memberships.d.ts +172 -0
  259. package/lib/services/memberships.d.ts.map +1 -0
  260. package/lib/services/memberships.js +282 -0
  261. package/lib/services/memberships.js.map +1 -0
  262. package/lib/services/mtls-certificates.d.ts +140 -0
  263. package/lib/services/mtls-certificates.d.ts.map +1 -0
  264. package/lib/services/mtls-certificates.js +173 -0
  265. package/lib/services/mtls-certificates.js.map +1 -0
  266. package/lib/services/network-interconnects.d.ts +410 -0
  267. package/lib/services/network-interconnects.d.ts.map +1 -0
  268. package/lib/services/network-interconnects.js +583 -0
  269. package/lib/services/network-interconnects.js.map +1 -0
  270. package/lib/services/organizations.d.ts +201 -0
  271. package/lib/services/organizations.d.ts.map +1 -0
  272. package/lib/services/organizations.js +355 -0
  273. package/lib/services/organizations.js.map +1 -0
  274. package/lib/services/origin-ca-certificates.d.ts +99 -0
  275. package/lib/services/origin-ca-certificates.d.ts.map +1 -0
  276. package/lib/services/origin-ca-certificates.js +156 -0
  277. package/lib/services/origin-ca-certificates.js.map +1 -0
  278. package/lib/services/origin-post-quantum-encryption.d.ts +50 -0
  279. package/lib/services/origin-post-quantum-encryption.d.ts.map +1 -0
  280. package/lib/services/origin-post-quantum-encryption.js +60 -0
  281. package/lib/services/origin-post-quantum-encryption.js.map +1 -0
  282. package/lib/services/origin-tls-client-auth.d.ts +273 -0
  283. package/lib/services/origin-tls-client-auth.d.ts.map +1 -0
  284. package/lib/services/origin-tls-client-auth.js +401 -0
  285. package/lib/services/origin-tls-client-auth.js.map +1 -0
  286. package/lib/services/page-rules.d.ts +773 -0
  287. package/lib/services/page-rules.d.ts.map +1 -0
  288. package/lib/services/page-rules.js +1365 -0
  289. package/lib/services/page-rules.js.map +1 -0
  290. package/lib/services/page-shield.d.ts +426 -0
  291. package/lib/services/page-shield.d.ts.map +1 -0
  292. package/lib/services/page-shield.js +484 -0
  293. package/lib/services/page-shield.js.map +1 -0
  294. package/lib/services/pages.d.ts +1654 -0
  295. package/lib/services/pages.d.ts.map +1 -0
  296. package/lib/services/pages.js +2954 -0
  297. package/lib/services/pages.js.map +1 -0
  298. package/lib/services/pipelines.d.ts +1461 -0
  299. package/lib/services/pipelines.d.ts.map +1 -0
  300. package/lib/services/pipelines.js +2912 -0
  301. package/lib/services/pipelines.js.map +1 -0
  302. package/lib/services/queues.d.ts +807 -0
  303. package/lib/services/queues.d.ts.map +1 -0
  304. package/lib/services/queues.js +1194 -0
  305. package/lib/services/queues.js.map +1 -0
  306. package/lib/services/r2-data-catalog.d.ts +341 -0
  307. package/lib/services/r2-data-catalog.d.ts.map +1 -0
  308. package/lib/services/r2-data-catalog.js +499 -0
  309. package/lib/services/r2-data-catalog.js.map +1 -0
  310. package/lib/services/r2.d.ts +1041 -0
  311. package/lib/services/r2.d.ts.map +1 -0
  312. package/lib/services/r2.js +1384 -0
  313. package/lib/services/r2.js.map +1 -0
  314. package/lib/services/radar.d.ts +9276 -0
  315. package/lib/services/radar.d.ts.map +1 -0
  316. package/lib/services/radar.js +20491 -0
  317. package/lib/services/radar.js.map +1 -0
  318. package/lib/services/rate-limits.d.ts +315 -0
  319. package/lib/services/rate-limits.d.ts.map +1 -0
  320. package/lib/services/rate-limits.js +521 -0
  321. package/lib/services/rate-limits.js.map +1 -0
  322. package/lib/services/realtime-kit.d.ts +2728 -0
  323. package/lib/services/realtime-kit.d.ts.map +1 -0
  324. package/lib/services/realtime-kit.js +5401 -0
  325. package/lib/services/realtime-kit.js.map +1 -0
  326. package/lib/services/registrar.d.ts +81 -0
  327. package/lib/services/registrar.d.ts.map +1 -0
  328. package/lib/services/registrar.js +154 -0
  329. package/lib/services/registrar.js.map +1 -0
  330. package/lib/services/request-tracers.d.ts +61 -0
  331. package/lib/services/request-tracers.d.ts.map +1 -0
  332. package/lib/services/request-tracers.js +82 -0
  333. package/lib/services/request-tracers.js.map +1 -0
  334. package/lib/services/resource-sharing.d.ts +540 -0
  335. package/lib/services/resource-sharing.d.ts.map +1 -0
  336. package/lib/services/resource-sharing.js +846 -0
  337. package/lib/services/resource-sharing.js.map +1 -0
  338. package/lib/services/rules.d.ts +297 -0
  339. package/lib/services/rules.d.ts.map +1 -0
  340. package/lib/services/rules.js +396 -0
  341. package/lib/services/rules.js.map +1 -0
  342. package/lib/services/rulesets.d.ts +3300 -0
  343. package/lib/services/rulesets.d.ts.map +1 -0
  344. package/lib/services/rulesets.js +7852 -0
  345. package/lib/services/rulesets.js.map +1 -0
  346. package/lib/services/rum.d.ts +289 -0
  347. package/lib/services/rum.d.ts.map +1 -0
  348. package/lib/services/rum.js +409 -0
  349. package/lib/services/rum.js.map +1 -0
  350. package/lib/services/schema-validation.d.ts +240 -0
  351. package/lib/services/schema-validation.d.ts.map +1 -0
  352. package/lib/services/schema-validation.js +306 -0
  353. package/lib/services/schema-validation.js.map +1 -0
  354. package/lib/services/secrets-store.d.ts +321 -0
  355. package/lib/services/secrets-store.d.ts.map +1 -0
  356. package/lib/services/secrets-store.js +385 -0
  357. package/lib/services/secrets-store.js.map +1 -0
  358. package/lib/services/security-center.d.ts +102 -0
  359. package/lib/services/security-center.d.ts.map +1 -0
  360. package/lib/services/security-center.js +170 -0
  361. package/lib/services/security-center.js.map +1 -0
  362. package/lib/services/security-txt.d.ts +105 -0
  363. package/lib/services/security-txt.d.ts.map +1 -0
  364. package/lib/services/security-txt.js +136 -0
  365. package/lib/services/security-txt.js.map +1 -0
  366. package/lib/services/snippets.d.ts +138 -0
  367. package/lib/services/snippets.d.ts.map +1 -0
  368. package/lib/services/snippets.js +178 -0
  369. package/lib/services/snippets.js.map +1 -0
  370. package/lib/services/spectrum.d.ts +316 -0
  371. package/lib/services/spectrum.d.ts.map +1 -0
  372. package/lib/services/spectrum.js +510 -0
  373. package/lib/services/spectrum.js.map +1 -0
  374. package/lib/services/speed.d.ts +227 -0
  375. package/lib/services/speed.d.ts.map +1 -0
  376. package/lib/services/speed.js +444 -0
  377. package/lib/services/speed.js.map +1 -0
  378. package/lib/services/ssl.d.ts +370 -0
  379. package/lib/services/ssl.d.ts.map +1 -0
  380. package/lib/services/ssl.js +732 -0
  381. package/lib/services/ssl.js.map +1 -0
  382. package/lib/services/stream.d.ts +1014 -0
  383. package/lib/services/stream.d.ts.map +1 -0
  384. package/lib/services/stream.js +1049 -0
  385. package/lib/services/stream.js.map +1 -0
  386. package/lib/services/token-validation.d.ts +547 -0
  387. package/lib/services/token-validation.d.ts.map +1 -0
  388. package/lib/services/token-validation.js +768 -0
  389. package/lib/services/token-validation.js.map +1 -0
  390. package/lib/services/turnstile.d.ts +248 -0
  391. package/lib/services/turnstile.d.ts.map +1 -0
  392. package/lib/services/turnstile.js +308 -0
  393. package/lib/services/turnstile.js.map +1 -0
  394. package/lib/services/url-normalization.d.ts +53 -0
  395. package/lib/services/url-normalization.d.ts.map +1 -0
  396. package/lib/services/url-normalization.js +52 -0
  397. package/lib/services/url-normalization.js.map +1 -0
  398. package/lib/services/url-scanner.d.ts +612 -0
  399. package/lib/services/url-scanner.d.ts.map +1 -0
  400. package/lib/services/url-scanner.js +915 -0
  401. package/lib/services/url-scanner.js.map +1 -0
  402. package/lib/services/user.d.ts +441 -0
  403. package/lib/services/user.d.ts.map +1 -0
  404. package/lib/services/user.js +567 -0
  405. package/lib/services/user.js.map +1 -0
  406. package/lib/services/vectorize.d.ts +282 -0
  407. package/lib/services/vectorize.d.ts.map +1 -0
  408. package/lib/services/vectorize.js +340 -0
  409. package/lib/services/vectorize.js.map +1 -0
  410. package/lib/services/waiting-rooms.d.ts +1009 -0
  411. package/lib/services/waiting-rooms.d.ts.map +1 -0
  412. package/lib/services/waiting-rooms.js +1757 -0
  413. package/lib/services/waiting-rooms.js.map +1 -0
  414. package/lib/services/web3.d.ts +274 -0
  415. package/lib/services/web3.d.ts.map +1 -0
  416. package/lib/services/web3.js +362 -0
  417. package/lib/services/web3.js.map +1 -0
  418. package/lib/services/workers-for-platforms.d.ts +1224 -0
  419. package/lib/services/workers-for-platforms.d.ts.map +1 -0
  420. package/lib/services/workers-for-platforms.js +2078 -0
  421. package/lib/services/workers-for-platforms.js.map +1 -0
  422. package/lib/services/workers.d.ts +3498 -0
  423. package/lib/services/workers.d.ts.map +1 -0
  424. package/lib/services/workers.js +5967 -0
  425. package/lib/services/workers.js.map +1 -0
  426. package/lib/services/workflows.d.ts +359 -0
  427. package/lib/services/workflows.d.ts.map +1 -0
  428. package/lib/services/workflows.js +516 -0
  429. package/lib/services/workflows.js.map +1 -0
  430. package/lib/services/zaraz.d.ts +300 -0
  431. package/lib/services/zaraz.d.ts.map +1 -0
  432. package/lib/services/zaraz.js +298 -0
  433. package/lib/services/zaraz.js.map +1 -0
  434. package/lib/services/zero-trust.d.ts +15449 -0
  435. package/lib/services/zero-trust.d.ts.map +1 -0
  436. package/lib/services/zero-trust.js +29194 -0
  437. package/lib/services/zero-trust.js.map +1 -0
  438. package/lib/services/zones.d.ts +1278 -0
  439. package/lib/services/zones.d.ts.map +1 -0
  440. package/lib/services/zones.js +2416 -0
  441. package/lib/services/zones.js.map +1 -0
  442. package/lib/traits.d.ts +28 -0
  443. package/lib/traits.d.ts.map +1 -0
  444. package/lib/traits.js +26 -0
  445. package/lib/traits.js.map +1 -0
  446. package/package.json +68 -5
  447. package/src/auth.ts +14 -0
  448. package/src/category.ts +1 -0
  449. package/src/client/api.ts +329 -0
  450. package/src/client/index.ts +7 -0
  451. package/src/credentials.ts +30 -0
  452. package/src/errors.ts +57 -0
  453. package/src/index.ts +9 -0
  454. package/src/retry.ts +35 -0
  455. package/src/schemas.ts +51 -0
  456. package/src/services/abuse-reports.ts +747 -0
  457. package/src/services/accounts.ts +1947 -0
  458. package/src/services/acm.ts +170 -0
  459. package/src/services/addressing.ts +3947 -0
  460. package/src/services/ai-gateway.ts +3335 -0
  461. package/src/services/ai.ts +727 -0
  462. package/src/services/aisearch.ts +4750 -0
  463. package/src/services/alerting.ts +2947 -0
  464. package/src/services/api-gateway.ts +3391 -0
  465. package/src/services/argo.ts +254 -0
  466. package/src/services/audit-logs.ts +90 -0
  467. package/src/services/billing.ts +172 -0
  468. package/src/services/bot-management.ts +541 -0
  469. package/src/services/botnet-feed.ts +193 -0
  470. package/src/services/brand-protection.ts +553 -0
  471. package/src/services/browser-rendering.ts +2707 -0
  472. package/src/services/cache.ts +827 -0
  473. package/src/services/calls.ts +483 -0
  474. package/src/services/certificate-authorities.ts +110 -0
  475. package/src/services/client-certificates.ts +718 -0
  476. package/src/services/cloud-connector.ts +181 -0
  477. package/src/services/cloudforce-one.ts +3876 -0
  478. package/src/services/connectivity.ts +629 -0
  479. package/src/services/content-scanning.ts +385 -0
  480. package/src/services/custom-certificates.ts +611 -0
  481. package/src/services/custom-hostnames.ts +2453 -0
  482. package/src/services/custom-nameservers.ts +182 -0
  483. package/src/services/custom-pages.ts +264 -0
  484. package/src/services/d1.ts +1034 -0
  485. package/src/services/dcv-delegation.ts +52 -0
  486. package/src/services/diagnostics.ts +603 -0
  487. package/src/services/dns-firewall.ts +823 -0
  488. package/src/services/dns.ts +8897 -0
  489. package/src/services/durable-objects.ts +148 -0
  490. package/src/services/email-routing.ts +1602 -0
  491. package/src/services/email-security.ts +4283 -0
  492. package/src/services/filters.ts +370 -0
  493. package/src/services/firewall.ts +3896 -0
  494. package/src/services/healthchecks.ts +1750 -0
  495. package/src/services/hostnames.ts +218 -0
  496. package/src/services/hyperdrive.ts +592 -0
  497. package/src/services/iam.ts +1668 -0
  498. package/src/services/images.ts +1086 -0
  499. package/src/services/intel.ts +2768 -0
  500. package/src/services/ips.ts +88 -0
  501. package/src/services/keyless-certificates.ts +462 -0
  502. package/src/services/kv.ts +1011 -0
  503. package/src/services/leaked-credential-checks.ts +325 -0
  504. package/src/services/load-balancers.ts +6438 -0
  505. package/src/services/logpush.ts +1667 -0
  506. package/src/services/logs.ts +375 -0
  507. package/src/services/magic-cloud-networking.ts +10020 -0
  508. package/src/services/magic-network-monitoring.ts +1156 -0
  509. package/src/services/magic-transit.ts +13050 -0
  510. package/src/services/managed-transforms.ts +237 -0
  511. package/src/services/memberships.ts +615 -0
  512. package/src/services/mtls-certificates.ts +374 -0
  513. package/src/services/network-interconnects.ts +1253 -0
  514. package/src/services/organizations.ts +674 -0
  515. package/src/services/origin-ca-certificates.ts +303 -0
  516. package/src/services/origin-post-quantum-encryption.ts +128 -0
  517. package/src/services/origin-tls-client-auth.ts +878 -0
  518. package/src/services/page-rules.ts +2612 -0
  519. package/src/services/page-shield.ts +1195 -0
  520. package/src/services/pages.ts +5709 -0
  521. package/src/services/pipelines.ts +6000 -0
  522. package/src/services/queues.ts +2629 -0
  523. package/src/services/r2-data-catalog.ts +1119 -0
  524. package/src/services/r2.ts +3348 -0
  525. package/src/services/radar.ts +42152 -0
  526. package/src/services/rate-limits.ts +1150 -0
  527. package/src/services/realtime-kit.ts +11079 -0
  528. package/src/services/registrar.ts +295 -0
  529. package/src/services/request-tracers.ts +158 -0
  530. package/src/services/resource-sharing.ts +1832 -0
  531. package/src/services/rules.ts +837 -0
  532. package/src/services/rulesets.ts +15144 -0
  533. package/src/services/rum.ts +901 -0
  534. package/src/services/schema-validation.ts +733 -0
  535. package/src/services/secrets-store.ts +860 -0
  536. package/src/services/security-center.ts +397 -0
  537. package/src/services/security-txt.ts +315 -0
  538. package/src/services/snippets.ts +420 -0
  539. package/src/services/spectrum.ts +1103 -0
  540. package/src/services/speed.ts +1056 -0
  541. package/src/services/ssl.ts +1587 -0
  542. package/src/services/stream.ts +2756 -0
  543. package/src/services/token-validation.ts +1585 -0
  544. package/src/services/turnstile.ts +643 -0
  545. package/src/services/url-normalization.ts +129 -0
  546. package/src/services/url-scanner.ts +1851 -0
  547. package/src/services/user.ts +1384 -0
  548. package/src/services/vectorize.ts +816 -0
  549. package/src/services/waiting-rooms.ts +3807 -0
  550. package/src/services/web3.ts +834 -0
  551. package/src/services/workers-for-platforms.ts +3859 -0
  552. package/src/services/workers.ts +11637 -0
  553. package/src/services/workflows.ts +1124 -0
  554. package/src/services/zaraz.ts +797 -0
  555. package/src/services/zero-trust.ts +58929 -0
  556. package/src/services/zones.ts +4875 -0
  557. package/src/traits.ts +47 -0
  558. package/bun.lock +0 -26
  559. package/index.ts +0 -1
  560. package/tsconfig.json +0 -29
@@ -0,0 +1,3335 @@
1
+ /**
2
+ * Cloudflare AI-GATEWAY API
3
+ *
4
+ * Generated from Cloudflare TypeScript SDK.
5
+ * DO NOT EDIT - regenerate with: bun scripts/generate.ts --service ai-gateway
6
+ */
7
+
8
+ import * as Schema from "effect/Schema";
9
+ import type * as HttpClient from "effect/unstable/http/HttpClient";
10
+ import * as API from "../client/api.ts";
11
+ import * as T from "../traits";
12
+ import type { Credentials } from "../credentials";
13
+ import { type DefaultErrors } from "../errors";
14
+
15
+ // =============================================================================
16
+ // Errors
17
+ // =============================================================================
18
+
19
+ export class GatewayAlreadyExists extends Schema.TaggedErrorClass<GatewayAlreadyExists>()(
20
+ "GatewayAlreadyExists",
21
+ { code: Schema.Number, message: Schema.String },
22
+ ) {}
23
+ T.applyErrorMatchers(GatewayAlreadyExists, [{ code: 7001 }, { status: 504 }]);
24
+
25
+ export class GatewayNotFound extends Schema.TaggedErrorClass<GatewayNotFound>()(
26
+ "GatewayNotFound",
27
+ { code: Schema.Number, message: Schema.String },
28
+ ) {}
29
+ T.applyErrorMatchers(GatewayNotFound, [{ code: 7002 }]);
30
+
31
+ // =============================================================================
32
+ // AiGateway
33
+ // =============================================================================
34
+
35
+ export interface GetAiGatewayRequest {
36
+ id: string;
37
+ accountId: string;
38
+ }
39
+
40
+ export const GetAiGatewayRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
41
+ id: Schema.String.pipe(T.HttpPath("id")),
42
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
43
+ }).pipe(
44
+ T.Http({
45
+ method: "GET",
46
+ path: "/accounts/{account_id}/ai-gateway/gateways/{id}",
47
+ }),
48
+ ) as unknown as Schema.Schema<GetAiGatewayRequest>;
49
+
50
+ export interface GetAiGatewayResponse {
51
+ /** gateway id */
52
+ id: string;
53
+ accountId?: string | null;
54
+ accountTag?: string | null;
55
+ cacheInvalidateOnUpdate: boolean;
56
+ cacheTtl: number | null;
57
+ collectLogs: boolean;
58
+ createdAt: string;
59
+ internalId?: string | null;
60
+ modifiedAt: string;
61
+ rateLimitingInterval: number | null;
62
+ rateLimitingLimit: number | null;
63
+ rateLimitingTechnique: "fixed" | "sliding";
64
+ authentication?: boolean | null;
65
+ dlp?:
66
+ | { action: "BLOCK" | "FLAG"; enabled: boolean; profiles: string[] }
67
+ | {
68
+ enabled: boolean;
69
+ policies: {
70
+ id: string;
71
+ action: "FLAG" | "BLOCK";
72
+ check: ("REQUEST" | "RESPONSE")[];
73
+ enabled: boolean;
74
+ profiles: string[];
75
+ }[];
76
+ }
77
+ | null;
78
+ isDefault?: boolean | null;
79
+ logManagement?: number | null;
80
+ logManagementStrategy?: "STOP_INSERTING" | "DELETE_OLDEST" | null;
81
+ logpush?: boolean | null;
82
+ logpushPublicKey?: string | null;
83
+ otel?:
84
+ | { authorization: string; headers: Record<string, unknown>; url: string }[]
85
+ | null;
86
+ storeId?: string | null;
87
+ stripe?: { authorization: string; usageEvents: { payload: string }[] } | null;
88
+ zdr?: boolean | null;
89
+ }
90
+
91
+ export const GetAiGatewayResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
92
+ id: Schema.String,
93
+ accountId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
94
+ accountTag: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
95
+ cacheInvalidateOnUpdate: Schema.Boolean,
96
+ cacheTtl: Schema.Union([Schema.Number, Schema.Null]),
97
+ collectLogs: Schema.Boolean,
98
+ createdAt: Schema.String,
99
+ internalId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
100
+ modifiedAt: Schema.String,
101
+ rateLimitingInterval: Schema.Union([Schema.Number, Schema.Null]),
102
+ rateLimitingLimit: Schema.Union([Schema.Number, Schema.Null]),
103
+ rateLimitingTechnique: Schema.Literals(["fixed", "sliding"]),
104
+ authentication: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
105
+ dlp: Schema.optional(
106
+ Schema.Union([
107
+ Schema.Union([
108
+ Schema.Struct({
109
+ action: Schema.Literals(["BLOCK", "FLAG"]),
110
+ enabled: Schema.Boolean,
111
+ profiles: Schema.Array(Schema.String),
112
+ }),
113
+ Schema.Struct({
114
+ enabled: Schema.Boolean,
115
+ policies: Schema.Array(
116
+ Schema.Struct({
117
+ id: Schema.String,
118
+ action: Schema.Literals(["FLAG", "BLOCK"]),
119
+ check: Schema.Array(Schema.Literals(["REQUEST", "RESPONSE"])),
120
+ enabled: Schema.Boolean,
121
+ profiles: Schema.Array(Schema.String),
122
+ }),
123
+ ),
124
+ }),
125
+ ]),
126
+ Schema.Null,
127
+ ]),
128
+ ),
129
+ isDefault: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
130
+ logManagement: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
131
+ logManagementStrategy: Schema.optional(
132
+ Schema.Union([
133
+ Schema.Literal("STOP_INSERTING"),
134
+ Schema.Literal("DELETE_OLDEST"),
135
+ Schema.Null,
136
+ ]),
137
+ ),
138
+ logpush: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
139
+ logpushPublicKey: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
140
+ otel: Schema.optional(
141
+ Schema.Union([
142
+ Schema.Array(
143
+ Schema.Struct({
144
+ authorization: Schema.String,
145
+ headers: Schema.Struct({}),
146
+ url: Schema.String,
147
+ }),
148
+ ),
149
+ Schema.Null,
150
+ ]),
151
+ ),
152
+ storeId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
153
+ stripe: Schema.optional(
154
+ Schema.Union([
155
+ Schema.Struct({
156
+ authorization: Schema.String,
157
+ usageEvents: Schema.Array(
158
+ Schema.Struct({
159
+ payload: Schema.String,
160
+ }),
161
+ ),
162
+ }).pipe(
163
+ Schema.encodeKeys({
164
+ authorization: "authorization",
165
+ usageEvents: "usage_events",
166
+ }),
167
+ ),
168
+ Schema.Null,
169
+ ]),
170
+ ),
171
+ zdr: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
172
+ }).pipe(
173
+ Schema.encodeKeys({
174
+ id: "id",
175
+ accountId: "account_id",
176
+ accountTag: "account_tag",
177
+ cacheInvalidateOnUpdate: "cache_invalidate_on_update",
178
+ cacheTtl: "cache_ttl",
179
+ collectLogs: "collect_logs",
180
+ createdAt: "created_at",
181
+ internalId: "internal_id",
182
+ modifiedAt: "modified_at",
183
+ rateLimitingInterval: "rate_limiting_interval",
184
+ rateLimitingLimit: "rate_limiting_limit",
185
+ rateLimitingTechnique: "rate_limiting_technique",
186
+ authentication: "authentication",
187
+ dlp: "dlp",
188
+ isDefault: "is_default",
189
+ logManagement: "log_management",
190
+ logManagementStrategy: "log_management_strategy",
191
+ logpush: "logpush",
192
+ logpushPublicKey: "logpush_public_key",
193
+ otel: "otel",
194
+ storeId: "store_id",
195
+ stripe: "stripe",
196
+ zdr: "zdr",
197
+ }),
198
+ ) as unknown as Schema.Schema<GetAiGatewayResponse>;
199
+
200
+ export type GetAiGatewayError = DefaultErrors | GatewayNotFound;
201
+
202
+ export const getAiGateway: API.OperationMethod<
203
+ GetAiGatewayRequest,
204
+ GetAiGatewayResponse,
205
+ GetAiGatewayError,
206
+ Credentials | HttpClient.HttpClient
207
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
208
+ input: GetAiGatewayRequest,
209
+ output: GetAiGatewayResponse,
210
+ errors: [GatewayNotFound],
211
+ }));
212
+
213
+ export interface ListAiGatewaysRequest {
214
+ /** Path param: */
215
+ accountId: string;
216
+ /** Query param: Search by id */
217
+ search?: string;
218
+ }
219
+
220
+ export const ListAiGatewaysRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
221
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
222
+ search: Schema.optional(Schema.String).pipe(T.HttpQuery("search")),
223
+ }).pipe(
224
+ T.Http({ method: "GET", path: "/accounts/{account_id}/ai-gateway/gateways" }),
225
+ ) as unknown as Schema.Schema<ListAiGatewaysRequest>;
226
+
227
+ export type ListAiGatewaysResponse = {
228
+ id: string;
229
+ accountId: string;
230
+ accountTag: string;
231
+ cacheInvalidateOnUpdate: boolean;
232
+ cacheTtl: number | null;
233
+ collectLogs: boolean;
234
+ createdAt: string;
235
+ internalId: string;
236
+ modifiedAt: string;
237
+ rateLimitingInterval: number | null;
238
+ rateLimitingLimit: number | null;
239
+ rateLimitingTechnique: "fixed" | "sliding";
240
+ authentication?: boolean | null;
241
+ dlp?:
242
+ | { action: "BLOCK" | "FLAG"; enabled: boolean; profiles: string[] }
243
+ | {
244
+ enabled: boolean;
245
+ policies: {
246
+ id: string;
247
+ action: "FLAG" | "BLOCK";
248
+ check: ("REQUEST" | "RESPONSE")[];
249
+ enabled: boolean;
250
+ profiles: string[];
251
+ }[];
252
+ }
253
+ | null;
254
+ isDefault?: boolean | null;
255
+ logManagement?: number | null;
256
+ logManagementStrategy?: "STOP_INSERTING" | "DELETE_OLDEST" | null;
257
+ logpush?: boolean | null;
258
+ logpushPublicKey?: string | null;
259
+ otel?:
260
+ | { authorization: string; headers: Record<string, unknown>; url: string }[]
261
+ | null;
262
+ storeId?: string | null;
263
+ stripe?: { authorization: string; usageEvents: { payload: string }[] } | null;
264
+ zdr?: boolean | null;
265
+ }[];
266
+
267
+ export const ListAiGatewaysResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Array(
268
+ Schema.Struct({
269
+ id: Schema.String,
270
+ accountId: Schema.String,
271
+ accountTag: Schema.String,
272
+ cacheInvalidateOnUpdate: Schema.Boolean,
273
+ cacheTtl: Schema.Union([Schema.Number, Schema.Null]),
274
+ collectLogs: Schema.Boolean,
275
+ createdAt: Schema.String,
276
+ internalId: Schema.String,
277
+ modifiedAt: Schema.String,
278
+ rateLimitingInterval: Schema.Union([Schema.Number, Schema.Null]),
279
+ rateLimitingLimit: Schema.Union([Schema.Number, Schema.Null]),
280
+ rateLimitingTechnique: Schema.Literals(["fixed", "sliding"]),
281
+ authentication: Schema.optional(
282
+ Schema.Union([Schema.Boolean, Schema.Null]),
283
+ ),
284
+ dlp: Schema.optional(
285
+ Schema.Union([
286
+ Schema.Union([
287
+ Schema.Struct({
288
+ action: Schema.Literals(["BLOCK", "FLAG"]),
289
+ enabled: Schema.Boolean,
290
+ profiles: Schema.Array(Schema.String),
291
+ }),
292
+ Schema.Struct({
293
+ enabled: Schema.Boolean,
294
+ policies: Schema.Array(
295
+ Schema.Struct({
296
+ id: Schema.String,
297
+ action: Schema.Literals(["FLAG", "BLOCK"]),
298
+ check: Schema.Array(Schema.Literals(["REQUEST", "RESPONSE"])),
299
+ enabled: Schema.Boolean,
300
+ profiles: Schema.Array(Schema.String),
301
+ }),
302
+ ),
303
+ }),
304
+ ]),
305
+ Schema.Null,
306
+ ]),
307
+ ),
308
+ isDefault: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
309
+ logManagement: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
310
+ logManagementStrategy: Schema.optional(
311
+ Schema.Union([
312
+ Schema.Literal("STOP_INSERTING"),
313
+ Schema.Literal("DELETE_OLDEST"),
314
+ Schema.Null,
315
+ ]),
316
+ ),
317
+ logpush: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
318
+ logpushPublicKey: Schema.optional(
319
+ Schema.Union([Schema.String, Schema.Null]),
320
+ ),
321
+ otel: Schema.optional(
322
+ Schema.Union([
323
+ Schema.Array(
324
+ Schema.Struct({
325
+ authorization: Schema.String,
326
+ headers: Schema.Struct({}),
327
+ url: Schema.String,
328
+ }),
329
+ ),
330
+ Schema.Null,
331
+ ]),
332
+ ),
333
+ storeId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
334
+ stripe: Schema.optional(
335
+ Schema.Union([
336
+ Schema.Struct({
337
+ authorization: Schema.String,
338
+ usageEvents: Schema.Array(
339
+ Schema.Struct({
340
+ payload: Schema.String,
341
+ }),
342
+ ),
343
+ }).pipe(
344
+ Schema.encodeKeys({
345
+ authorization: "authorization",
346
+ usageEvents: "usage_events",
347
+ }),
348
+ ),
349
+ Schema.Null,
350
+ ]),
351
+ ),
352
+ zdr: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
353
+ }).pipe(
354
+ Schema.encodeKeys({
355
+ id: "id",
356
+ accountId: "account_id",
357
+ accountTag: "account_tag",
358
+ cacheInvalidateOnUpdate: "cache_invalidate_on_update",
359
+ cacheTtl: "cache_ttl",
360
+ collectLogs: "collect_logs",
361
+ createdAt: "created_at",
362
+ internalId: "internal_id",
363
+ modifiedAt: "modified_at",
364
+ rateLimitingInterval: "rate_limiting_interval",
365
+ rateLimitingLimit: "rate_limiting_limit",
366
+ rateLimitingTechnique: "rate_limiting_technique",
367
+ authentication: "authentication",
368
+ dlp: "dlp",
369
+ isDefault: "is_default",
370
+ logManagement: "log_management",
371
+ logManagementStrategy: "log_management_strategy",
372
+ logpush: "logpush",
373
+ logpushPublicKey: "logpush_public_key",
374
+ otel: "otel",
375
+ storeId: "store_id",
376
+ stripe: "stripe",
377
+ zdr: "zdr",
378
+ }),
379
+ ),
380
+ ) as unknown as Schema.Schema<ListAiGatewaysResponse>;
381
+
382
+ export type ListAiGatewaysError = DefaultErrors;
383
+
384
+ export const listAiGateways: API.OperationMethod<
385
+ ListAiGatewaysRequest,
386
+ ListAiGatewaysResponse,
387
+ ListAiGatewaysError,
388
+ Credentials | HttpClient.HttpClient
389
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
390
+ input: ListAiGatewaysRequest,
391
+ output: ListAiGatewaysResponse,
392
+ errors: [],
393
+ }));
394
+
395
+ export interface CreateAiGatewayRequest {
396
+ /** Path param: */
397
+ accountId: string;
398
+ /** Body param: gateway id */
399
+ id: string;
400
+ /** Body param: */
401
+ cacheInvalidateOnUpdate: boolean;
402
+ /** Body param: */
403
+ cacheTtl: number | null;
404
+ /** Body param: */
405
+ collectLogs: boolean;
406
+ /** Body param: */
407
+ rateLimitingInterval: number | null;
408
+ /** Body param: */
409
+ rateLimitingLimit: number | null;
410
+ /** Body param: */
411
+ rateLimitingTechnique: "fixed" | "sliding";
412
+ /** Body param: */
413
+ authentication?: boolean;
414
+ /** Body param: */
415
+ isDefault?: boolean;
416
+ /** Body param: */
417
+ logManagement?: number | null;
418
+ /** Body param: */
419
+ logManagementStrategy?: "STOP_INSERTING" | "DELETE_OLDEST" | null;
420
+ /** Body param: */
421
+ logpush?: boolean;
422
+ /** Body param: */
423
+ logpushPublicKey?: string | null;
424
+ /** Body param: */
425
+ zdr?: boolean;
426
+ }
427
+
428
+ export const CreateAiGatewayRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct(
429
+ {
430
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
431
+ id: Schema.String,
432
+ cacheInvalidateOnUpdate: Schema.Boolean,
433
+ cacheTtl: Schema.Union([Schema.Number, Schema.Null]),
434
+ collectLogs: Schema.Boolean,
435
+ rateLimitingInterval: Schema.Union([Schema.Number, Schema.Null]),
436
+ rateLimitingLimit: Schema.Union([Schema.Number, Schema.Null]),
437
+ rateLimitingTechnique: Schema.Literals(["fixed", "sliding"]),
438
+ authentication: Schema.optional(Schema.Boolean),
439
+ isDefault: Schema.optional(Schema.Boolean),
440
+ logManagement: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
441
+ logManagementStrategy: Schema.optional(
442
+ Schema.Union([
443
+ Schema.Literal("STOP_INSERTING"),
444
+ Schema.Literal("DELETE_OLDEST"),
445
+ Schema.Null,
446
+ ]),
447
+ ),
448
+ logpush: Schema.optional(Schema.Boolean),
449
+ logpushPublicKey: Schema.optional(
450
+ Schema.Union([Schema.String, Schema.Null]),
451
+ ),
452
+ zdr: Schema.optional(Schema.Boolean),
453
+ },
454
+ ).pipe(
455
+ Schema.encodeKeys({
456
+ id: "id",
457
+ cacheInvalidateOnUpdate: "cache_invalidate_on_update",
458
+ cacheTtl: "cache_ttl",
459
+ collectLogs: "collect_logs",
460
+ rateLimitingInterval: "rate_limiting_interval",
461
+ rateLimitingLimit: "rate_limiting_limit",
462
+ rateLimitingTechnique: "rate_limiting_technique",
463
+ authentication: "authentication",
464
+ isDefault: "is_default",
465
+ logManagement: "log_management",
466
+ logManagementStrategy: "log_management_strategy",
467
+ logpush: "logpush",
468
+ logpushPublicKey: "logpush_public_key",
469
+ zdr: "zdr",
470
+ }),
471
+ T.Http({
472
+ method: "POST",
473
+ path: "/accounts/{account_id}/ai-gateway/gateways",
474
+ }),
475
+ ) as unknown as Schema.Schema<CreateAiGatewayRequest>;
476
+
477
+ export interface CreateAiGatewayResponse {
478
+ /** gateway id */
479
+ id: string;
480
+ accountId?: string | null;
481
+ accountTag?: string | null;
482
+ cacheInvalidateOnUpdate: boolean;
483
+ cacheTtl: number | null;
484
+ collectLogs: boolean;
485
+ createdAt: string;
486
+ internalId?: string | null;
487
+ modifiedAt: string;
488
+ rateLimitingInterval: number | null;
489
+ rateLimitingLimit: number | null;
490
+ rateLimitingTechnique: "fixed" | "sliding";
491
+ authentication?: boolean | null;
492
+ dlp?:
493
+ | { action: "BLOCK" | "FLAG"; enabled: boolean; profiles: string[] }
494
+ | {
495
+ enabled: boolean;
496
+ policies: {
497
+ id: string;
498
+ action: "FLAG" | "BLOCK";
499
+ check: ("REQUEST" | "RESPONSE")[];
500
+ enabled: boolean;
501
+ profiles: string[];
502
+ }[];
503
+ }
504
+ | null;
505
+ isDefault?: boolean | null;
506
+ logManagement?: number | null;
507
+ logManagementStrategy?: "STOP_INSERTING" | "DELETE_OLDEST" | null;
508
+ logpush?: boolean | null;
509
+ logpushPublicKey?: string | null;
510
+ otel?:
511
+ | { authorization: string; headers: Record<string, unknown>; url: string }[]
512
+ | null;
513
+ storeId?: string | null;
514
+ stripe?: { authorization: string; usageEvents: { payload: string }[] } | null;
515
+ zdr?: boolean | null;
516
+ }
517
+
518
+ export const CreateAiGatewayResponse =
519
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
520
+ id: Schema.String,
521
+ accountId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
522
+ accountTag: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
523
+ cacheInvalidateOnUpdate: Schema.Boolean,
524
+ cacheTtl: Schema.Union([Schema.Number, Schema.Null]),
525
+ collectLogs: Schema.Boolean,
526
+ createdAt: Schema.String,
527
+ internalId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
528
+ modifiedAt: Schema.String,
529
+ rateLimitingInterval: Schema.Union([Schema.Number, Schema.Null]),
530
+ rateLimitingLimit: Schema.Union([Schema.Number, Schema.Null]),
531
+ rateLimitingTechnique: Schema.Literals(["fixed", "sliding"]),
532
+ authentication: Schema.optional(
533
+ Schema.Union([Schema.Boolean, Schema.Null]),
534
+ ),
535
+ dlp: Schema.optional(
536
+ Schema.Union([
537
+ Schema.Union([
538
+ Schema.Struct({
539
+ action: Schema.Literals(["BLOCK", "FLAG"]),
540
+ enabled: Schema.Boolean,
541
+ profiles: Schema.Array(Schema.String),
542
+ }),
543
+ Schema.Struct({
544
+ enabled: Schema.Boolean,
545
+ policies: Schema.Array(
546
+ Schema.Struct({
547
+ id: Schema.String,
548
+ action: Schema.Literals(["FLAG", "BLOCK"]),
549
+ check: Schema.Array(Schema.Literals(["REQUEST", "RESPONSE"])),
550
+ enabled: Schema.Boolean,
551
+ profiles: Schema.Array(Schema.String),
552
+ }),
553
+ ),
554
+ }),
555
+ ]),
556
+ Schema.Null,
557
+ ]),
558
+ ),
559
+ isDefault: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
560
+ logManagement: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
561
+ logManagementStrategy: Schema.optional(
562
+ Schema.Union([
563
+ Schema.Literal("STOP_INSERTING"),
564
+ Schema.Literal("DELETE_OLDEST"),
565
+ Schema.Null,
566
+ ]),
567
+ ),
568
+ logpush: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
569
+ logpushPublicKey: Schema.optional(
570
+ Schema.Union([Schema.String, Schema.Null]),
571
+ ),
572
+ otel: Schema.optional(
573
+ Schema.Union([
574
+ Schema.Array(
575
+ Schema.Struct({
576
+ authorization: Schema.String,
577
+ headers: Schema.Struct({}),
578
+ url: Schema.String,
579
+ }),
580
+ ),
581
+ Schema.Null,
582
+ ]),
583
+ ),
584
+ storeId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
585
+ stripe: Schema.optional(
586
+ Schema.Union([
587
+ Schema.Struct({
588
+ authorization: Schema.String,
589
+ usageEvents: Schema.Array(
590
+ Schema.Struct({
591
+ payload: Schema.String,
592
+ }),
593
+ ),
594
+ }).pipe(
595
+ Schema.encodeKeys({
596
+ authorization: "authorization",
597
+ usageEvents: "usage_events",
598
+ }),
599
+ ),
600
+ Schema.Null,
601
+ ]),
602
+ ),
603
+ zdr: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
604
+ }).pipe(
605
+ Schema.encodeKeys({
606
+ id: "id",
607
+ accountId: "account_id",
608
+ accountTag: "account_tag",
609
+ cacheInvalidateOnUpdate: "cache_invalidate_on_update",
610
+ cacheTtl: "cache_ttl",
611
+ collectLogs: "collect_logs",
612
+ createdAt: "created_at",
613
+ internalId: "internal_id",
614
+ modifiedAt: "modified_at",
615
+ rateLimitingInterval: "rate_limiting_interval",
616
+ rateLimitingLimit: "rate_limiting_limit",
617
+ rateLimitingTechnique: "rate_limiting_technique",
618
+ authentication: "authentication",
619
+ dlp: "dlp",
620
+ isDefault: "is_default",
621
+ logManagement: "log_management",
622
+ logManagementStrategy: "log_management_strategy",
623
+ logpush: "logpush",
624
+ logpushPublicKey: "logpush_public_key",
625
+ otel: "otel",
626
+ storeId: "store_id",
627
+ stripe: "stripe",
628
+ zdr: "zdr",
629
+ }),
630
+ ) as unknown as Schema.Schema<CreateAiGatewayResponse>;
631
+
632
+ export type CreateAiGatewayError = DefaultErrors | GatewayAlreadyExists;
633
+
634
+ export const createAiGateway: API.OperationMethod<
635
+ CreateAiGatewayRequest,
636
+ CreateAiGatewayResponse,
637
+ CreateAiGatewayError,
638
+ Credentials | HttpClient.HttpClient
639
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
640
+ input: CreateAiGatewayRequest,
641
+ output: CreateAiGatewayResponse,
642
+ errors: [GatewayAlreadyExists],
643
+ }));
644
+
645
+ export interface UpdateAiGatewayRequest {
646
+ id: string;
647
+ /** Path param: */
648
+ accountId: string;
649
+ /** Body param: */
650
+ cacheInvalidateOnUpdate: boolean;
651
+ /** Body param: */
652
+ cacheTtl: number | null;
653
+ /** Body param: */
654
+ collectLogs: boolean;
655
+ /** Body param: */
656
+ rateLimitingInterval: number | null;
657
+ /** Body param: */
658
+ rateLimitingLimit: number | null;
659
+ /** Body param: */
660
+ rateLimitingTechnique: "fixed" | "sliding";
661
+ /** Body param: */
662
+ authentication?: boolean;
663
+ /** Body param: */
664
+ dlp?:
665
+ | { action: "BLOCK" | "FLAG"; enabled: boolean; profiles: string[] }
666
+ | {
667
+ enabled: boolean;
668
+ policies: {
669
+ id: string;
670
+ action: "FLAG" | "BLOCK";
671
+ check: ("REQUEST" | "RESPONSE")[];
672
+ enabled: boolean;
673
+ profiles: string[];
674
+ }[];
675
+ };
676
+ /** Body param: */
677
+ isDefault?: boolean;
678
+ /** Body param: */
679
+ logManagement?: number | null;
680
+ /** Body param: */
681
+ logManagementStrategy?: "STOP_INSERTING" | "DELETE_OLDEST" | null;
682
+ /** Body param: */
683
+ logpush?: boolean;
684
+ /** Body param: */
685
+ logpushPublicKey?: string | null;
686
+ /** Body param: */
687
+ otel?:
688
+ | { authorization: string; headers: Record<string, unknown>; url: string }[]
689
+ | null;
690
+ /** Body param: */
691
+ storeId?: string | null;
692
+ /** Body param: */
693
+ stripe?: { authorization: string; usageEvents: { payload: string }[] } | null;
694
+ /** Body param: */
695
+ zdr?: boolean;
696
+ }
697
+
698
+ export const UpdateAiGatewayRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct(
699
+ {
700
+ id: Schema.String.pipe(T.HttpPath("id")),
701
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
702
+ cacheInvalidateOnUpdate: Schema.Boolean,
703
+ cacheTtl: Schema.Union([Schema.Number, Schema.Null]),
704
+ collectLogs: Schema.Boolean,
705
+ rateLimitingInterval: Schema.Union([Schema.Number, Schema.Null]),
706
+ rateLimitingLimit: Schema.Union([Schema.Number, Schema.Null]),
707
+ rateLimitingTechnique: Schema.Literals(["fixed", "sliding"]),
708
+ authentication: Schema.optional(Schema.Boolean),
709
+ dlp: Schema.optional(
710
+ Schema.Union([
711
+ Schema.Struct({
712
+ action: Schema.Literals(["BLOCK", "FLAG"]),
713
+ enabled: Schema.Boolean,
714
+ profiles: Schema.Array(Schema.String),
715
+ }),
716
+ Schema.Struct({
717
+ enabled: Schema.Boolean,
718
+ policies: Schema.Array(
719
+ Schema.Struct({
720
+ id: Schema.String,
721
+ action: Schema.Literals(["FLAG", "BLOCK"]),
722
+ check: Schema.Array(Schema.Literals(["REQUEST", "RESPONSE"])),
723
+ enabled: Schema.Boolean,
724
+ profiles: Schema.Array(Schema.String),
725
+ }),
726
+ ),
727
+ }),
728
+ ]),
729
+ ),
730
+ isDefault: Schema.optional(Schema.Boolean),
731
+ logManagement: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
732
+ logManagementStrategy: Schema.optional(
733
+ Schema.Union([
734
+ Schema.Literal("STOP_INSERTING"),
735
+ Schema.Literal("DELETE_OLDEST"),
736
+ Schema.Null,
737
+ ]),
738
+ ),
739
+ logpush: Schema.optional(Schema.Boolean),
740
+ logpushPublicKey: Schema.optional(
741
+ Schema.Union([Schema.String, Schema.Null]),
742
+ ),
743
+ otel: Schema.optional(
744
+ Schema.Union([
745
+ Schema.Array(
746
+ Schema.Struct({
747
+ authorization: Schema.String,
748
+ headers: Schema.Struct({}),
749
+ url: Schema.String,
750
+ }),
751
+ ),
752
+ Schema.Null,
753
+ ]),
754
+ ),
755
+ storeId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
756
+ stripe: Schema.optional(
757
+ Schema.Union([
758
+ Schema.Struct({
759
+ authorization: Schema.String,
760
+ usageEvents: Schema.Array(
761
+ Schema.Struct({
762
+ payload: Schema.String,
763
+ }),
764
+ ),
765
+ }).pipe(
766
+ Schema.encodeKeys({
767
+ authorization: "authorization",
768
+ usageEvents: "usage_events",
769
+ }),
770
+ ),
771
+ Schema.Null,
772
+ ]),
773
+ ),
774
+ zdr: Schema.optional(Schema.Boolean),
775
+ },
776
+ ).pipe(
777
+ Schema.encodeKeys({
778
+ cacheInvalidateOnUpdate: "cache_invalidate_on_update",
779
+ cacheTtl: "cache_ttl",
780
+ collectLogs: "collect_logs",
781
+ rateLimitingInterval: "rate_limiting_interval",
782
+ rateLimitingLimit: "rate_limiting_limit",
783
+ rateLimitingTechnique: "rate_limiting_technique",
784
+ authentication: "authentication",
785
+ dlp: "dlp",
786
+ isDefault: "is_default",
787
+ logManagement: "log_management",
788
+ logManagementStrategy: "log_management_strategy",
789
+ logpush: "logpush",
790
+ logpushPublicKey: "logpush_public_key",
791
+ otel: "otel",
792
+ storeId: "store_id",
793
+ stripe: "stripe",
794
+ zdr: "zdr",
795
+ }),
796
+ T.Http({
797
+ method: "PUT",
798
+ path: "/accounts/{account_id}/ai-gateway/gateways/{id}",
799
+ }),
800
+ ) as unknown as Schema.Schema<UpdateAiGatewayRequest>;
801
+
802
+ export interface UpdateAiGatewayResponse {
803
+ /** gateway id */
804
+ id: string;
805
+ accountId?: string | null;
806
+ accountTag?: string | null;
807
+ cacheInvalidateOnUpdate: boolean;
808
+ cacheTtl: number | null;
809
+ collectLogs: boolean;
810
+ createdAt: string;
811
+ internalId?: string | null;
812
+ modifiedAt: string;
813
+ rateLimitingInterval: number | null;
814
+ rateLimitingLimit: number | null;
815
+ rateLimitingTechnique: "fixed" | "sliding";
816
+ authentication?: boolean | null;
817
+ dlp?:
818
+ | { action: "BLOCK" | "FLAG"; enabled: boolean; profiles: string[] }
819
+ | {
820
+ enabled: boolean;
821
+ policies: {
822
+ id: string;
823
+ action: "FLAG" | "BLOCK";
824
+ check: ("REQUEST" | "RESPONSE")[];
825
+ enabled: boolean;
826
+ profiles: string[];
827
+ }[];
828
+ }
829
+ | null;
830
+ isDefault?: boolean | null;
831
+ logManagement?: number | null;
832
+ logManagementStrategy?: "STOP_INSERTING" | "DELETE_OLDEST" | null;
833
+ logpush?: boolean | null;
834
+ logpushPublicKey?: string | null;
835
+ otel?:
836
+ | { authorization: string; headers: Record<string, unknown>; url: string }[]
837
+ | null;
838
+ storeId?: string | null;
839
+ stripe?: { authorization: string; usageEvents: { payload: string }[] } | null;
840
+ zdr?: boolean | null;
841
+ }
842
+
843
+ export const UpdateAiGatewayResponse =
844
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
845
+ id: Schema.String,
846
+ accountId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
847
+ accountTag: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
848
+ cacheInvalidateOnUpdate: Schema.Boolean,
849
+ cacheTtl: Schema.Union([Schema.Number, Schema.Null]),
850
+ collectLogs: Schema.Boolean,
851
+ createdAt: Schema.String,
852
+ internalId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
853
+ modifiedAt: Schema.String,
854
+ rateLimitingInterval: Schema.Union([Schema.Number, Schema.Null]),
855
+ rateLimitingLimit: Schema.Union([Schema.Number, Schema.Null]),
856
+ rateLimitingTechnique: Schema.Literals(["fixed", "sliding"]),
857
+ authentication: Schema.optional(
858
+ Schema.Union([Schema.Boolean, Schema.Null]),
859
+ ),
860
+ dlp: Schema.optional(
861
+ Schema.Union([
862
+ Schema.Union([
863
+ Schema.Struct({
864
+ action: Schema.Literals(["BLOCK", "FLAG"]),
865
+ enabled: Schema.Boolean,
866
+ profiles: Schema.Array(Schema.String),
867
+ }),
868
+ Schema.Struct({
869
+ enabled: Schema.Boolean,
870
+ policies: Schema.Array(
871
+ Schema.Struct({
872
+ id: Schema.String,
873
+ action: Schema.Literals(["FLAG", "BLOCK"]),
874
+ check: Schema.Array(Schema.Literals(["REQUEST", "RESPONSE"])),
875
+ enabled: Schema.Boolean,
876
+ profiles: Schema.Array(Schema.String),
877
+ }),
878
+ ),
879
+ }),
880
+ ]),
881
+ Schema.Null,
882
+ ]),
883
+ ),
884
+ isDefault: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
885
+ logManagement: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
886
+ logManagementStrategy: Schema.optional(
887
+ Schema.Union([
888
+ Schema.Literal("STOP_INSERTING"),
889
+ Schema.Literal("DELETE_OLDEST"),
890
+ Schema.Null,
891
+ ]),
892
+ ),
893
+ logpush: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
894
+ logpushPublicKey: Schema.optional(
895
+ Schema.Union([Schema.String, Schema.Null]),
896
+ ),
897
+ otel: Schema.optional(
898
+ Schema.Union([
899
+ Schema.Array(
900
+ Schema.Struct({
901
+ authorization: Schema.String,
902
+ headers: Schema.Struct({}),
903
+ url: Schema.String,
904
+ }),
905
+ ),
906
+ Schema.Null,
907
+ ]),
908
+ ),
909
+ storeId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
910
+ stripe: Schema.optional(
911
+ Schema.Union([
912
+ Schema.Struct({
913
+ authorization: Schema.String,
914
+ usageEvents: Schema.Array(
915
+ Schema.Struct({
916
+ payload: Schema.String,
917
+ }),
918
+ ),
919
+ }).pipe(
920
+ Schema.encodeKeys({
921
+ authorization: "authorization",
922
+ usageEvents: "usage_events",
923
+ }),
924
+ ),
925
+ Schema.Null,
926
+ ]),
927
+ ),
928
+ zdr: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
929
+ }).pipe(
930
+ Schema.encodeKeys({
931
+ id: "id",
932
+ accountId: "account_id",
933
+ accountTag: "account_tag",
934
+ cacheInvalidateOnUpdate: "cache_invalidate_on_update",
935
+ cacheTtl: "cache_ttl",
936
+ collectLogs: "collect_logs",
937
+ createdAt: "created_at",
938
+ internalId: "internal_id",
939
+ modifiedAt: "modified_at",
940
+ rateLimitingInterval: "rate_limiting_interval",
941
+ rateLimitingLimit: "rate_limiting_limit",
942
+ rateLimitingTechnique: "rate_limiting_technique",
943
+ authentication: "authentication",
944
+ dlp: "dlp",
945
+ isDefault: "is_default",
946
+ logManagement: "log_management",
947
+ logManagementStrategy: "log_management_strategy",
948
+ logpush: "logpush",
949
+ logpushPublicKey: "logpush_public_key",
950
+ otel: "otel",
951
+ storeId: "store_id",
952
+ stripe: "stripe",
953
+ zdr: "zdr",
954
+ }),
955
+ ) as unknown as Schema.Schema<UpdateAiGatewayResponse>;
956
+
957
+ export type UpdateAiGatewayError = DefaultErrors | GatewayNotFound;
958
+
959
+ export const updateAiGateway: API.OperationMethod<
960
+ UpdateAiGatewayRequest,
961
+ UpdateAiGatewayResponse,
962
+ UpdateAiGatewayError,
963
+ Credentials | HttpClient.HttpClient
964
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
965
+ input: UpdateAiGatewayRequest,
966
+ output: UpdateAiGatewayResponse,
967
+ errors: [GatewayNotFound],
968
+ }));
969
+
970
+ export interface DeleteAiGatewayRequest {
971
+ id: string;
972
+ accountId: string;
973
+ }
974
+
975
+ export const DeleteAiGatewayRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct(
976
+ {
977
+ id: Schema.String.pipe(T.HttpPath("id")),
978
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
979
+ },
980
+ ).pipe(
981
+ T.Http({
982
+ method: "DELETE",
983
+ path: "/accounts/{account_id}/ai-gateway/gateways/{id}",
984
+ }),
985
+ ) as unknown as Schema.Schema<DeleteAiGatewayRequest>;
986
+
987
+ export interface DeleteAiGatewayResponse {
988
+ /** gateway id */
989
+ id: string;
990
+ accountId?: string | null;
991
+ accountTag?: string | null;
992
+ cacheInvalidateOnUpdate: boolean;
993
+ cacheTtl: number | null;
994
+ collectLogs: boolean;
995
+ createdAt: string;
996
+ internalId?: string | null;
997
+ modifiedAt: string;
998
+ rateLimitingInterval: number | null;
999
+ rateLimitingLimit: number | null;
1000
+ rateLimitingTechnique: "fixed" | "sliding";
1001
+ authentication?: boolean | null;
1002
+ dlp?:
1003
+ | { action: "BLOCK" | "FLAG"; enabled: boolean; profiles: string[] }
1004
+ | {
1005
+ enabled: boolean;
1006
+ policies: {
1007
+ id: string;
1008
+ action: "FLAG" | "BLOCK";
1009
+ check: ("REQUEST" | "RESPONSE")[];
1010
+ enabled: boolean;
1011
+ profiles: string[];
1012
+ }[];
1013
+ }
1014
+ | null;
1015
+ isDefault?: boolean | null;
1016
+ logManagement?: number | null;
1017
+ logManagementStrategy?: "STOP_INSERTING" | "DELETE_OLDEST" | null;
1018
+ logpush?: boolean | null;
1019
+ logpushPublicKey?: string | null;
1020
+ otel?:
1021
+ | { authorization: string; headers: Record<string, unknown>; url: string }[]
1022
+ | null;
1023
+ storeId?: string | null;
1024
+ stripe?: { authorization: string; usageEvents: { payload: string }[] } | null;
1025
+ zdr?: boolean | null;
1026
+ }
1027
+
1028
+ export const DeleteAiGatewayResponse =
1029
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1030
+ id: Schema.String,
1031
+ accountId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1032
+ accountTag: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1033
+ cacheInvalidateOnUpdate: Schema.Boolean,
1034
+ cacheTtl: Schema.Union([Schema.Number, Schema.Null]),
1035
+ collectLogs: Schema.Boolean,
1036
+ createdAt: Schema.String,
1037
+ internalId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1038
+ modifiedAt: Schema.String,
1039
+ rateLimitingInterval: Schema.Union([Schema.Number, Schema.Null]),
1040
+ rateLimitingLimit: Schema.Union([Schema.Number, Schema.Null]),
1041
+ rateLimitingTechnique: Schema.Literals(["fixed", "sliding"]),
1042
+ authentication: Schema.optional(
1043
+ Schema.Union([Schema.Boolean, Schema.Null]),
1044
+ ),
1045
+ dlp: Schema.optional(
1046
+ Schema.Union([
1047
+ Schema.Union([
1048
+ Schema.Struct({
1049
+ action: Schema.Literals(["BLOCK", "FLAG"]),
1050
+ enabled: Schema.Boolean,
1051
+ profiles: Schema.Array(Schema.String),
1052
+ }),
1053
+ Schema.Struct({
1054
+ enabled: Schema.Boolean,
1055
+ policies: Schema.Array(
1056
+ Schema.Struct({
1057
+ id: Schema.String,
1058
+ action: Schema.Literals(["FLAG", "BLOCK"]),
1059
+ check: Schema.Array(Schema.Literals(["REQUEST", "RESPONSE"])),
1060
+ enabled: Schema.Boolean,
1061
+ profiles: Schema.Array(Schema.String),
1062
+ }),
1063
+ ),
1064
+ }),
1065
+ ]),
1066
+ Schema.Null,
1067
+ ]),
1068
+ ),
1069
+ isDefault: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
1070
+ logManagement: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
1071
+ logManagementStrategy: Schema.optional(
1072
+ Schema.Union([
1073
+ Schema.Literal("STOP_INSERTING"),
1074
+ Schema.Literal("DELETE_OLDEST"),
1075
+ Schema.Null,
1076
+ ]),
1077
+ ),
1078
+ logpush: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
1079
+ logpushPublicKey: Schema.optional(
1080
+ Schema.Union([Schema.String, Schema.Null]),
1081
+ ),
1082
+ otel: Schema.optional(
1083
+ Schema.Union([
1084
+ Schema.Array(
1085
+ Schema.Struct({
1086
+ authorization: Schema.String,
1087
+ headers: Schema.Struct({}),
1088
+ url: Schema.String,
1089
+ }),
1090
+ ),
1091
+ Schema.Null,
1092
+ ]),
1093
+ ),
1094
+ storeId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1095
+ stripe: Schema.optional(
1096
+ Schema.Union([
1097
+ Schema.Struct({
1098
+ authorization: Schema.String,
1099
+ usageEvents: Schema.Array(
1100
+ Schema.Struct({
1101
+ payload: Schema.String,
1102
+ }),
1103
+ ),
1104
+ }).pipe(
1105
+ Schema.encodeKeys({
1106
+ authorization: "authorization",
1107
+ usageEvents: "usage_events",
1108
+ }),
1109
+ ),
1110
+ Schema.Null,
1111
+ ]),
1112
+ ),
1113
+ zdr: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
1114
+ }).pipe(
1115
+ Schema.encodeKeys({
1116
+ id: "id",
1117
+ accountId: "account_id",
1118
+ accountTag: "account_tag",
1119
+ cacheInvalidateOnUpdate: "cache_invalidate_on_update",
1120
+ cacheTtl: "cache_ttl",
1121
+ collectLogs: "collect_logs",
1122
+ createdAt: "created_at",
1123
+ internalId: "internal_id",
1124
+ modifiedAt: "modified_at",
1125
+ rateLimitingInterval: "rate_limiting_interval",
1126
+ rateLimitingLimit: "rate_limiting_limit",
1127
+ rateLimitingTechnique: "rate_limiting_technique",
1128
+ authentication: "authentication",
1129
+ dlp: "dlp",
1130
+ isDefault: "is_default",
1131
+ logManagement: "log_management",
1132
+ logManagementStrategy: "log_management_strategy",
1133
+ logpush: "logpush",
1134
+ logpushPublicKey: "logpush_public_key",
1135
+ otel: "otel",
1136
+ storeId: "store_id",
1137
+ stripe: "stripe",
1138
+ zdr: "zdr",
1139
+ }),
1140
+ ) as unknown as Schema.Schema<DeleteAiGatewayResponse>;
1141
+
1142
+ export type DeleteAiGatewayError = DefaultErrors | GatewayNotFound;
1143
+
1144
+ export const deleteAiGateway: API.OperationMethod<
1145
+ DeleteAiGatewayRequest,
1146
+ DeleteAiGatewayResponse,
1147
+ DeleteAiGatewayError,
1148
+ Credentials | HttpClient.HttpClient
1149
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
1150
+ input: DeleteAiGatewayRequest,
1151
+ output: DeleteAiGatewayResponse,
1152
+ errors: [GatewayNotFound],
1153
+ }));
1154
+
1155
+ // =============================================================================
1156
+ // Dataset
1157
+ // =============================================================================
1158
+
1159
+ export interface GetDatasetRequest {
1160
+ gatewayId: string;
1161
+ id: string;
1162
+ accountId: string;
1163
+ }
1164
+
1165
+ export const GetDatasetRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1166
+ gatewayId: Schema.String.pipe(T.HttpPath("gatewayId")),
1167
+ id: Schema.String.pipe(T.HttpPath("id")),
1168
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
1169
+ }).pipe(
1170
+ T.Http({
1171
+ method: "GET",
1172
+ path: "/accounts/{account_id}/ai-gateway/gateways/{gatewayId}/datasets/{id}",
1173
+ }),
1174
+ ) as unknown as Schema.Schema<GetDatasetRequest>;
1175
+
1176
+ export interface GetDatasetResponse {
1177
+ id: string;
1178
+ accountId: string;
1179
+ accountTag: string;
1180
+ createdAt: string;
1181
+ enable: boolean;
1182
+ filters: {
1183
+ key:
1184
+ | "created_at"
1185
+ | "request_content_type"
1186
+ | "response_content_type"
1187
+ | "success"
1188
+ | "cached"
1189
+ | "provider"
1190
+ | "model"
1191
+ | "cost"
1192
+ | "tokens"
1193
+ | "tokens_in"
1194
+ | "tokens_out"
1195
+ | "duration"
1196
+ | "feedback";
1197
+ operator: "eq" | "contains" | "lt" | "gt";
1198
+ value: (string | number | boolean)[];
1199
+ }[];
1200
+ /** gateway id */
1201
+ gatewayId: string;
1202
+ modifiedAt: string;
1203
+ name: string;
1204
+ }
1205
+
1206
+ export const GetDatasetResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1207
+ id: Schema.String,
1208
+ accountId: Schema.String,
1209
+ accountTag: Schema.String,
1210
+ createdAt: Schema.String,
1211
+ enable: Schema.Boolean,
1212
+ filters: Schema.Array(
1213
+ Schema.Struct({
1214
+ key: Schema.Literals([
1215
+ "created_at",
1216
+ "request_content_type",
1217
+ "response_content_type",
1218
+ "success",
1219
+ "cached",
1220
+ "provider",
1221
+ "model",
1222
+ "cost",
1223
+ "tokens",
1224
+ "tokens_in",
1225
+ "tokens_out",
1226
+ "duration",
1227
+ "feedback",
1228
+ ]),
1229
+ operator: Schema.Literals(["eq", "contains", "lt", "gt"]),
1230
+ value: Schema.Array(
1231
+ Schema.Union([Schema.String, Schema.Number, Schema.Boolean]),
1232
+ ),
1233
+ }),
1234
+ ),
1235
+ gatewayId: Schema.String,
1236
+ modifiedAt: Schema.String,
1237
+ name: Schema.String,
1238
+ }).pipe(
1239
+ Schema.encodeKeys({
1240
+ id: "id",
1241
+ accountId: "account_id",
1242
+ accountTag: "account_tag",
1243
+ createdAt: "created_at",
1244
+ enable: "enable",
1245
+ filters: "filters",
1246
+ gatewayId: "gateway_id",
1247
+ modifiedAt: "modified_at",
1248
+ name: "name",
1249
+ }),
1250
+ ) as unknown as Schema.Schema<GetDatasetResponse>;
1251
+
1252
+ export type GetDatasetError = DefaultErrors;
1253
+
1254
+ export const getDataset: API.OperationMethod<
1255
+ GetDatasetRequest,
1256
+ GetDatasetResponse,
1257
+ GetDatasetError,
1258
+ Credentials | HttpClient.HttpClient
1259
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
1260
+ input: GetDatasetRequest,
1261
+ output: GetDatasetResponse,
1262
+ errors: [],
1263
+ }));
1264
+
1265
+ export interface ListDatasetsRequest {
1266
+ gatewayId: string;
1267
+ /** Path param: */
1268
+ accountId: string;
1269
+ /** Query param: */
1270
+ enable?: boolean;
1271
+ /** Query param: */
1272
+ name?: string;
1273
+ /** Query param: Search by id, name, filters */
1274
+ search?: string;
1275
+ }
1276
+
1277
+ export const ListDatasetsRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1278
+ gatewayId: Schema.String.pipe(T.HttpPath("gatewayId")),
1279
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
1280
+ enable: Schema.optional(Schema.Boolean).pipe(T.HttpQuery("enable")),
1281
+ name: Schema.optional(Schema.String).pipe(T.HttpQuery("name")),
1282
+ search: Schema.optional(Schema.String).pipe(T.HttpQuery("search")),
1283
+ }).pipe(
1284
+ T.Http({
1285
+ method: "GET",
1286
+ path: "/accounts/{account_id}/ai-gateway/gateways/{gatewayId}/datasets",
1287
+ }),
1288
+ ) as unknown as Schema.Schema<ListDatasetsRequest>;
1289
+
1290
+ export type ListDatasetsResponse = {
1291
+ id: string;
1292
+ accountId: string;
1293
+ accountTag: string;
1294
+ createdAt: string;
1295
+ enable: boolean;
1296
+ filters: {
1297
+ key:
1298
+ | "created_at"
1299
+ | "request_content_type"
1300
+ | "response_content_type"
1301
+ | "success"
1302
+ | "cached"
1303
+ | "provider"
1304
+ | "model"
1305
+ | "cost"
1306
+ | "tokens"
1307
+ | "tokens_in"
1308
+ | "tokens_out"
1309
+ | "duration"
1310
+ | "feedback";
1311
+ operator: "eq" | "contains" | "lt" | "gt";
1312
+ value: (string | number | boolean)[];
1313
+ }[];
1314
+ gatewayId: string;
1315
+ modifiedAt: string;
1316
+ name: string;
1317
+ }[];
1318
+
1319
+ export const ListDatasetsResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Array(
1320
+ Schema.Struct({
1321
+ id: Schema.String,
1322
+ accountId: Schema.String,
1323
+ accountTag: Schema.String,
1324
+ createdAt: Schema.String,
1325
+ enable: Schema.Boolean,
1326
+ filters: Schema.Array(
1327
+ Schema.Struct({
1328
+ key: Schema.Literals([
1329
+ "created_at",
1330
+ "request_content_type",
1331
+ "response_content_type",
1332
+ "success",
1333
+ "cached",
1334
+ "provider",
1335
+ "model",
1336
+ "cost",
1337
+ "tokens",
1338
+ "tokens_in",
1339
+ "tokens_out",
1340
+ "duration",
1341
+ "feedback",
1342
+ ]),
1343
+ operator: Schema.Literals(["eq", "contains", "lt", "gt"]),
1344
+ value: Schema.Array(
1345
+ Schema.Union([Schema.String, Schema.Number, Schema.Boolean]),
1346
+ ),
1347
+ }),
1348
+ ),
1349
+ gatewayId: Schema.String,
1350
+ modifiedAt: Schema.String,
1351
+ name: Schema.String,
1352
+ }).pipe(
1353
+ Schema.encodeKeys({
1354
+ id: "id",
1355
+ accountId: "account_id",
1356
+ accountTag: "account_tag",
1357
+ createdAt: "created_at",
1358
+ enable: "enable",
1359
+ filters: "filters",
1360
+ gatewayId: "gateway_id",
1361
+ modifiedAt: "modified_at",
1362
+ name: "name",
1363
+ }),
1364
+ ),
1365
+ ) as unknown as Schema.Schema<ListDatasetsResponse>;
1366
+
1367
+ export type ListDatasetsError = DefaultErrors;
1368
+
1369
+ export const listDatasets: API.OperationMethod<
1370
+ ListDatasetsRequest,
1371
+ ListDatasetsResponse,
1372
+ ListDatasetsError,
1373
+ Credentials | HttpClient.HttpClient
1374
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
1375
+ input: ListDatasetsRequest,
1376
+ output: ListDatasetsResponse,
1377
+ errors: [],
1378
+ }));
1379
+
1380
+ export interface CreateDatasetRequest {
1381
+ gatewayId: string;
1382
+ /** Path param: */
1383
+ accountId: string;
1384
+ /** Body param: */
1385
+ enable: boolean;
1386
+ /** Body param: */
1387
+ filters: {
1388
+ key:
1389
+ | "created_at"
1390
+ | "request_content_type"
1391
+ | "response_content_type"
1392
+ | "success"
1393
+ | "cached"
1394
+ | "provider"
1395
+ | "model"
1396
+ | "cost"
1397
+ | "tokens"
1398
+ | "tokens_in"
1399
+ | "tokens_out"
1400
+ | "duration"
1401
+ | "feedback";
1402
+ operator: "eq" | "contains" | "lt" | "gt";
1403
+ value: (string | number | boolean)[];
1404
+ }[];
1405
+ /** Body param: */
1406
+ name: string;
1407
+ }
1408
+
1409
+ export const CreateDatasetRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1410
+ gatewayId: Schema.String.pipe(T.HttpPath("gatewayId")),
1411
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
1412
+ enable: Schema.Boolean,
1413
+ filters: Schema.Array(
1414
+ Schema.Struct({
1415
+ key: Schema.Literals([
1416
+ "created_at",
1417
+ "request_content_type",
1418
+ "response_content_type",
1419
+ "success",
1420
+ "cached",
1421
+ "provider",
1422
+ "model",
1423
+ "cost",
1424
+ "tokens",
1425
+ "tokens_in",
1426
+ "tokens_out",
1427
+ "duration",
1428
+ "feedback",
1429
+ ]),
1430
+ operator: Schema.Literals(["eq", "contains", "lt", "gt"]),
1431
+ value: Schema.Array(
1432
+ Schema.Union([Schema.String, Schema.Number, Schema.Boolean]),
1433
+ ),
1434
+ }),
1435
+ ),
1436
+ name: Schema.String,
1437
+ }).pipe(
1438
+ T.Http({
1439
+ method: "POST",
1440
+ path: "/accounts/{account_id}/ai-gateway/gateways/{gatewayId}/datasets",
1441
+ }),
1442
+ ) as unknown as Schema.Schema<CreateDatasetRequest>;
1443
+
1444
+ export interface CreateDatasetResponse {
1445
+ id: string;
1446
+ accountId: string;
1447
+ accountTag: string;
1448
+ createdAt: string;
1449
+ enable: boolean;
1450
+ filters: {
1451
+ key:
1452
+ | "created_at"
1453
+ | "request_content_type"
1454
+ | "response_content_type"
1455
+ | "success"
1456
+ | "cached"
1457
+ | "provider"
1458
+ | "model"
1459
+ | "cost"
1460
+ | "tokens"
1461
+ | "tokens_in"
1462
+ | "tokens_out"
1463
+ | "duration"
1464
+ | "feedback";
1465
+ operator: "eq" | "contains" | "lt" | "gt";
1466
+ value: (string | number | boolean)[];
1467
+ }[];
1468
+ /** gateway id */
1469
+ gatewayId: string;
1470
+ modifiedAt: string;
1471
+ name: string;
1472
+ }
1473
+
1474
+ export const CreateDatasetResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1475
+ id: Schema.String,
1476
+ accountId: Schema.String,
1477
+ accountTag: Schema.String,
1478
+ createdAt: Schema.String,
1479
+ enable: Schema.Boolean,
1480
+ filters: Schema.Array(
1481
+ Schema.Struct({
1482
+ key: Schema.Literals([
1483
+ "created_at",
1484
+ "request_content_type",
1485
+ "response_content_type",
1486
+ "success",
1487
+ "cached",
1488
+ "provider",
1489
+ "model",
1490
+ "cost",
1491
+ "tokens",
1492
+ "tokens_in",
1493
+ "tokens_out",
1494
+ "duration",
1495
+ "feedback",
1496
+ ]),
1497
+ operator: Schema.Literals(["eq", "contains", "lt", "gt"]),
1498
+ value: Schema.Array(
1499
+ Schema.Union([Schema.String, Schema.Number, Schema.Boolean]),
1500
+ ),
1501
+ }),
1502
+ ),
1503
+ gatewayId: Schema.String,
1504
+ modifiedAt: Schema.String,
1505
+ name: Schema.String,
1506
+ }).pipe(
1507
+ Schema.encodeKeys({
1508
+ id: "id",
1509
+ accountId: "account_id",
1510
+ accountTag: "account_tag",
1511
+ createdAt: "created_at",
1512
+ enable: "enable",
1513
+ filters: "filters",
1514
+ gatewayId: "gateway_id",
1515
+ modifiedAt: "modified_at",
1516
+ name: "name",
1517
+ }),
1518
+ ) as unknown as Schema.Schema<CreateDatasetResponse>;
1519
+
1520
+ export type CreateDatasetError = DefaultErrors;
1521
+
1522
+ export const createDataset: API.OperationMethod<
1523
+ CreateDatasetRequest,
1524
+ CreateDatasetResponse,
1525
+ CreateDatasetError,
1526
+ Credentials | HttpClient.HttpClient
1527
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
1528
+ input: CreateDatasetRequest,
1529
+ output: CreateDatasetResponse,
1530
+ errors: [],
1531
+ }));
1532
+
1533
+ export interface UpdateDatasetRequest {
1534
+ gatewayId: string;
1535
+ id: string;
1536
+ /** Path param: */
1537
+ accountId: string;
1538
+ /** Body param: */
1539
+ enable: boolean;
1540
+ /** Body param: */
1541
+ filters: {
1542
+ key:
1543
+ | "created_at"
1544
+ | "request_content_type"
1545
+ | "response_content_type"
1546
+ | "success"
1547
+ | "cached"
1548
+ | "provider"
1549
+ | "model"
1550
+ | "cost"
1551
+ | "tokens"
1552
+ | "tokens_in"
1553
+ | "tokens_out"
1554
+ | "duration"
1555
+ | "feedback";
1556
+ operator: "eq" | "contains" | "lt" | "gt";
1557
+ value: (string | number | boolean)[];
1558
+ }[];
1559
+ /** Body param: */
1560
+ name: string;
1561
+ }
1562
+
1563
+ export const UpdateDatasetRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1564
+ gatewayId: Schema.String.pipe(T.HttpPath("gatewayId")),
1565
+ id: Schema.String.pipe(T.HttpPath("id")),
1566
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
1567
+ enable: Schema.Boolean,
1568
+ filters: Schema.Array(
1569
+ Schema.Struct({
1570
+ key: Schema.Literals([
1571
+ "created_at",
1572
+ "request_content_type",
1573
+ "response_content_type",
1574
+ "success",
1575
+ "cached",
1576
+ "provider",
1577
+ "model",
1578
+ "cost",
1579
+ "tokens",
1580
+ "tokens_in",
1581
+ "tokens_out",
1582
+ "duration",
1583
+ "feedback",
1584
+ ]),
1585
+ operator: Schema.Literals(["eq", "contains", "lt", "gt"]),
1586
+ value: Schema.Array(
1587
+ Schema.Union([Schema.String, Schema.Number, Schema.Boolean]),
1588
+ ),
1589
+ }),
1590
+ ),
1591
+ name: Schema.String,
1592
+ }).pipe(
1593
+ T.Http({
1594
+ method: "PUT",
1595
+ path: "/accounts/{account_id}/ai-gateway/gateways/{gatewayId}/datasets/{id}",
1596
+ }),
1597
+ ) as unknown as Schema.Schema<UpdateDatasetRequest>;
1598
+
1599
+ export interface UpdateDatasetResponse {
1600
+ id: string;
1601
+ accountId: string;
1602
+ accountTag: string;
1603
+ createdAt: string;
1604
+ enable: boolean;
1605
+ filters: {
1606
+ key:
1607
+ | "created_at"
1608
+ | "request_content_type"
1609
+ | "response_content_type"
1610
+ | "success"
1611
+ | "cached"
1612
+ | "provider"
1613
+ | "model"
1614
+ | "cost"
1615
+ | "tokens"
1616
+ | "tokens_in"
1617
+ | "tokens_out"
1618
+ | "duration"
1619
+ | "feedback";
1620
+ operator: "eq" | "contains" | "lt" | "gt";
1621
+ value: (string | number | boolean)[];
1622
+ }[];
1623
+ /** gateway id */
1624
+ gatewayId: string;
1625
+ modifiedAt: string;
1626
+ name: string;
1627
+ }
1628
+
1629
+ export const UpdateDatasetResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1630
+ id: Schema.String,
1631
+ accountId: Schema.String,
1632
+ accountTag: Schema.String,
1633
+ createdAt: Schema.String,
1634
+ enable: Schema.Boolean,
1635
+ filters: Schema.Array(
1636
+ Schema.Struct({
1637
+ key: Schema.Literals([
1638
+ "created_at",
1639
+ "request_content_type",
1640
+ "response_content_type",
1641
+ "success",
1642
+ "cached",
1643
+ "provider",
1644
+ "model",
1645
+ "cost",
1646
+ "tokens",
1647
+ "tokens_in",
1648
+ "tokens_out",
1649
+ "duration",
1650
+ "feedback",
1651
+ ]),
1652
+ operator: Schema.Literals(["eq", "contains", "lt", "gt"]),
1653
+ value: Schema.Array(
1654
+ Schema.Union([Schema.String, Schema.Number, Schema.Boolean]),
1655
+ ),
1656
+ }),
1657
+ ),
1658
+ gatewayId: Schema.String,
1659
+ modifiedAt: Schema.String,
1660
+ name: Schema.String,
1661
+ }).pipe(
1662
+ Schema.encodeKeys({
1663
+ id: "id",
1664
+ accountId: "account_id",
1665
+ accountTag: "account_tag",
1666
+ createdAt: "created_at",
1667
+ enable: "enable",
1668
+ filters: "filters",
1669
+ gatewayId: "gateway_id",
1670
+ modifiedAt: "modified_at",
1671
+ name: "name",
1672
+ }),
1673
+ ) as unknown as Schema.Schema<UpdateDatasetResponse>;
1674
+
1675
+ export type UpdateDatasetError = DefaultErrors;
1676
+
1677
+ export const updateDataset: API.OperationMethod<
1678
+ UpdateDatasetRequest,
1679
+ UpdateDatasetResponse,
1680
+ UpdateDatasetError,
1681
+ Credentials | HttpClient.HttpClient
1682
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
1683
+ input: UpdateDatasetRequest,
1684
+ output: UpdateDatasetResponse,
1685
+ errors: [],
1686
+ }));
1687
+
1688
+ export interface DeleteDatasetRequest {
1689
+ gatewayId: string;
1690
+ id: string;
1691
+ accountId: string;
1692
+ }
1693
+
1694
+ export const DeleteDatasetRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1695
+ gatewayId: Schema.String.pipe(T.HttpPath("gatewayId")),
1696
+ id: Schema.String.pipe(T.HttpPath("id")),
1697
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
1698
+ }).pipe(
1699
+ T.Http({
1700
+ method: "DELETE",
1701
+ path: "/accounts/{account_id}/ai-gateway/gateways/{gatewayId}/datasets/{id}",
1702
+ }),
1703
+ ) as unknown as Schema.Schema<DeleteDatasetRequest>;
1704
+
1705
+ export interface DeleteDatasetResponse {
1706
+ id: string;
1707
+ accountId: string;
1708
+ accountTag: string;
1709
+ createdAt: string;
1710
+ enable: boolean;
1711
+ filters: {
1712
+ key:
1713
+ | "created_at"
1714
+ | "request_content_type"
1715
+ | "response_content_type"
1716
+ | "success"
1717
+ | "cached"
1718
+ | "provider"
1719
+ | "model"
1720
+ | "cost"
1721
+ | "tokens"
1722
+ | "tokens_in"
1723
+ | "tokens_out"
1724
+ | "duration"
1725
+ | "feedback";
1726
+ operator: "eq" | "contains" | "lt" | "gt";
1727
+ value: (string | number | boolean)[];
1728
+ }[];
1729
+ /** gateway id */
1730
+ gatewayId: string;
1731
+ modifiedAt: string;
1732
+ name: string;
1733
+ }
1734
+
1735
+ export const DeleteDatasetResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1736
+ id: Schema.String,
1737
+ accountId: Schema.String,
1738
+ accountTag: Schema.String,
1739
+ createdAt: Schema.String,
1740
+ enable: Schema.Boolean,
1741
+ filters: Schema.Array(
1742
+ Schema.Struct({
1743
+ key: Schema.Literals([
1744
+ "created_at",
1745
+ "request_content_type",
1746
+ "response_content_type",
1747
+ "success",
1748
+ "cached",
1749
+ "provider",
1750
+ "model",
1751
+ "cost",
1752
+ "tokens",
1753
+ "tokens_in",
1754
+ "tokens_out",
1755
+ "duration",
1756
+ "feedback",
1757
+ ]),
1758
+ operator: Schema.Literals(["eq", "contains", "lt", "gt"]),
1759
+ value: Schema.Array(
1760
+ Schema.Union([Schema.String, Schema.Number, Schema.Boolean]),
1761
+ ),
1762
+ }),
1763
+ ),
1764
+ gatewayId: Schema.String,
1765
+ modifiedAt: Schema.String,
1766
+ name: Schema.String,
1767
+ }).pipe(
1768
+ Schema.encodeKeys({
1769
+ id: "id",
1770
+ accountId: "account_id",
1771
+ accountTag: "account_tag",
1772
+ createdAt: "created_at",
1773
+ enable: "enable",
1774
+ filters: "filters",
1775
+ gatewayId: "gateway_id",
1776
+ modifiedAt: "modified_at",
1777
+ name: "name",
1778
+ }),
1779
+ ) as unknown as Schema.Schema<DeleteDatasetResponse>;
1780
+
1781
+ export type DeleteDatasetError = DefaultErrors;
1782
+
1783
+ export const deleteDataset: API.OperationMethod<
1784
+ DeleteDatasetRequest,
1785
+ DeleteDatasetResponse,
1786
+ DeleteDatasetError,
1787
+ Credentials | HttpClient.HttpClient
1788
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
1789
+ input: DeleteDatasetRequest,
1790
+ output: DeleteDatasetResponse,
1791
+ errors: [],
1792
+ }));
1793
+
1794
+ // =============================================================================
1795
+ // Evaluation
1796
+ // =============================================================================
1797
+
1798
+ export interface GetEvaluationRequest {
1799
+ gatewayId: string;
1800
+ id: string;
1801
+ accountId: string;
1802
+ }
1803
+
1804
+ export const GetEvaluationRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1805
+ gatewayId: Schema.String.pipe(T.HttpPath("gatewayId")),
1806
+ id: Schema.String.pipe(T.HttpPath("id")),
1807
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
1808
+ }).pipe(
1809
+ T.Http({
1810
+ method: "GET",
1811
+ path: "/accounts/{account_id}/ai-gateway/gateways/{gatewayId}/evaluations/{id}",
1812
+ }),
1813
+ ) as unknown as Schema.Schema<GetEvaluationRequest>;
1814
+
1815
+ export interface GetEvaluationResponse {
1816
+ id: string;
1817
+ accountId: string;
1818
+ accountTag: string;
1819
+ createdAt: string;
1820
+ datasets: {
1821
+ id: string;
1822
+ accountId: string;
1823
+ accountTag: string;
1824
+ createdAt: string;
1825
+ enable: boolean;
1826
+ filters: {
1827
+ key:
1828
+ | "created_at"
1829
+ | "request_content_type"
1830
+ | "response_content_type"
1831
+ | "success"
1832
+ | "cached"
1833
+ | "provider"
1834
+ | "model"
1835
+ | "cost"
1836
+ | "tokens"
1837
+ | "tokens_in"
1838
+ | "tokens_out"
1839
+ | "duration"
1840
+ | "feedback";
1841
+ operator: "eq" | "contains" | "lt" | "gt";
1842
+ value: (string | number | boolean)[];
1843
+ }[];
1844
+ gatewayId: string;
1845
+ modifiedAt: string;
1846
+ name: string;
1847
+ }[];
1848
+ /** gateway id */
1849
+ gatewayId: string;
1850
+ modifiedAt: string;
1851
+ name: string;
1852
+ processed: boolean;
1853
+ results: {
1854
+ id: string;
1855
+ createdAt: string;
1856
+ evaluationId: string;
1857
+ evaluationTypeId: string;
1858
+ modifiedAt: string;
1859
+ result: string;
1860
+ status: number;
1861
+ statusDescription: string;
1862
+ totalLogs: number;
1863
+ }[];
1864
+ totalLogs: number;
1865
+ }
1866
+
1867
+ export const GetEvaluationResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1868
+ id: Schema.String,
1869
+ accountId: Schema.String,
1870
+ accountTag: Schema.String,
1871
+ createdAt: Schema.String,
1872
+ datasets: Schema.Array(
1873
+ Schema.Struct({
1874
+ id: Schema.String,
1875
+ accountId: Schema.String,
1876
+ accountTag: Schema.String,
1877
+ createdAt: Schema.String,
1878
+ enable: Schema.Boolean,
1879
+ filters: Schema.Array(
1880
+ Schema.Struct({
1881
+ key: Schema.Literals([
1882
+ "created_at",
1883
+ "request_content_type",
1884
+ "response_content_type",
1885
+ "success",
1886
+ "cached",
1887
+ "provider",
1888
+ "model",
1889
+ "cost",
1890
+ "tokens",
1891
+ "tokens_in",
1892
+ "tokens_out",
1893
+ "duration",
1894
+ "feedback",
1895
+ ]),
1896
+ operator: Schema.Literals(["eq", "contains", "lt", "gt"]),
1897
+ value: Schema.Array(
1898
+ Schema.Union([Schema.String, Schema.Number, Schema.Boolean]),
1899
+ ),
1900
+ }),
1901
+ ),
1902
+ gatewayId: Schema.String,
1903
+ modifiedAt: Schema.String,
1904
+ name: Schema.String,
1905
+ }).pipe(
1906
+ Schema.encodeKeys({
1907
+ id: "id",
1908
+ accountId: "account_id",
1909
+ accountTag: "account_tag",
1910
+ createdAt: "created_at",
1911
+ enable: "enable",
1912
+ filters: "filters",
1913
+ gatewayId: "gateway_id",
1914
+ modifiedAt: "modified_at",
1915
+ name: "name",
1916
+ }),
1917
+ ),
1918
+ ),
1919
+ gatewayId: Schema.String,
1920
+ modifiedAt: Schema.String,
1921
+ name: Schema.String,
1922
+ processed: Schema.Boolean,
1923
+ results: Schema.Array(
1924
+ Schema.Struct({
1925
+ id: Schema.String,
1926
+ createdAt: Schema.String,
1927
+ evaluationId: Schema.String,
1928
+ evaluationTypeId: Schema.String,
1929
+ modifiedAt: Schema.String,
1930
+ result: Schema.String,
1931
+ status: Schema.Number,
1932
+ statusDescription: Schema.String,
1933
+ totalLogs: Schema.Number,
1934
+ }).pipe(
1935
+ Schema.encodeKeys({
1936
+ id: "id",
1937
+ createdAt: "created_at",
1938
+ evaluationId: "evaluation_id",
1939
+ evaluationTypeId: "evaluation_type_id",
1940
+ modifiedAt: "modified_at",
1941
+ result: "result",
1942
+ status: "status",
1943
+ statusDescription: "status_description",
1944
+ totalLogs: "total_logs",
1945
+ }),
1946
+ ),
1947
+ ),
1948
+ totalLogs: Schema.Number,
1949
+ }).pipe(
1950
+ Schema.encodeKeys({
1951
+ id: "id",
1952
+ accountId: "account_id",
1953
+ accountTag: "account_tag",
1954
+ createdAt: "created_at",
1955
+ datasets: "datasets",
1956
+ gatewayId: "gateway_id",
1957
+ modifiedAt: "modified_at",
1958
+ name: "name",
1959
+ processed: "processed",
1960
+ results: "results",
1961
+ totalLogs: "total_logs",
1962
+ }),
1963
+ ) as unknown as Schema.Schema<GetEvaluationResponse>;
1964
+
1965
+ export type GetEvaluationError = DefaultErrors;
1966
+
1967
+ export const getEvaluation: API.OperationMethod<
1968
+ GetEvaluationRequest,
1969
+ GetEvaluationResponse,
1970
+ GetEvaluationError,
1971
+ Credentials | HttpClient.HttpClient
1972
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
1973
+ input: GetEvaluationRequest,
1974
+ output: GetEvaluationResponse,
1975
+ errors: [],
1976
+ }));
1977
+
1978
+ export interface ListEvaluationsRequest {
1979
+ gatewayId: string;
1980
+ /** Path param: */
1981
+ accountId: string;
1982
+ /** Query param: */
1983
+ name?: string;
1984
+ /** Query param: */
1985
+ processed?: boolean;
1986
+ /** Query param: Search by id, name */
1987
+ search?: string;
1988
+ }
1989
+
1990
+ export const ListEvaluationsRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct(
1991
+ {
1992
+ gatewayId: Schema.String.pipe(T.HttpPath("gatewayId")),
1993
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
1994
+ name: Schema.optional(Schema.String).pipe(T.HttpQuery("name")),
1995
+ processed: Schema.optional(Schema.Boolean).pipe(T.HttpQuery("processed")),
1996
+ search: Schema.optional(Schema.String).pipe(T.HttpQuery("search")),
1997
+ },
1998
+ ).pipe(
1999
+ T.Http({
2000
+ method: "GET",
2001
+ path: "/accounts/{account_id}/ai-gateway/gateways/{gatewayId}/evaluations",
2002
+ }),
2003
+ ) as unknown as Schema.Schema<ListEvaluationsRequest>;
2004
+
2005
+ export type ListEvaluationsResponse = {
2006
+ id: string;
2007
+ accountId: string;
2008
+ accountTag: string;
2009
+ createdAt: string;
2010
+ datasets: {
2011
+ id: string;
2012
+ accountId: string;
2013
+ accountTag: string;
2014
+ createdAt: string;
2015
+ enable: boolean;
2016
+ filters: {
2017
+ key:
2018
+ | "created_at"
2019
+ | "request_content_type"
2020
+ | "response_content_type"
2021
+ | "success"
2022
+ | "cached"
2023
+ | "provider"
2024
+ | "model"
2025
+ | "cost"
2026
+ | "tokens"
2027
+ | "tokens_in"
2028
+ | "tokens_out"
2029
+ | "duration"
2030
+ | "feedback";
2031
+ operator: "eq" | "contains" | "lt" | "gt";
2032
+ value: (string | number | boolean)[];
2033
+ }[];
2034
+ gatewayId: string;
2035
+ modifiedAt: string;
2036
+ name: string;
2037
+ }[];
2038
+ gatewayId: string;
2039
+ modifiedAt: string;
2040
+ name: string;
2041
+ processed: boolean;
2042
+ results: {
2043
+ id: string;
2044
+ createdAt: string;
2045
+ evaluationId: string;
2046
+ evaluationTypeId: string;
2047
+ modifiedAt: string;
2048
+ result: string;
2049
+ status: number;
2050
+ statusDescription: string;
2051
+ totalLogs: number;
2052
+ }[];
2053
+ totalLogs: number;
2054
+ }[];
2055
+
2056
+ export const ListEvaluationsResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Array(
2057
+ Schema.Struct({
2058
+ id: Schema.String,
2059
+ accountId: Schema.String,
2060
+ accountTag: Schema.String,
2061
+ createdAt: Schema.String,
2062
+ datasets: Schema.Array(
2063
+ Schema.Struct({
2064
+ id: Schema.String,
2065
+ accountId: Schema.String,
2066
+ accountTag: Schema.String,
2067
+ createdAt: Schema.String,
2068
+ enable: Schema.Boolean,
2069
+ filters: Schema.Array(
2070
+ Schema.Struct({
2071
+ key: Schema.Literals([
2072
+ "created_at",
2073
+ "request_content_type",
2074
+ "response_content_type",
2075
+ "success",
2076
+ "cached",
2077
+ "provider",
2078
+ "model",
2079
+ "cost",
2080
+ "tokens",
2081
+ "tokens_in",
2082
+ "tokens_out",
2083
+ "duration",
2084
+ "feedback",
2085
+ ]),
2086
+ operator: Schema.Literals(["eq", "contains", "lt", "gt"]),
2087
+ value: Schema.Array(
2088
+ Schema.Union([Schema.String, Schema.Number, Schema.Boolean]),
2089
+ ),
2090
+ }),
2091
+ ),
2092
+ gatewayId: Schema.String,
2093
+ modifiedAt: Schema.String,
2094
+ name: Schema.String,
2095
+ }).pipe(
2096
+ Schema.encodeKeys({
2097
+ id: "id",
2098
+ accountId: "account_id",
2099
+ accountTag: "account_tag",
2100
+ createdAt: "created_at",
2101
+ enable: "enable",
2102
+ filters: "filters",
2103
+ gatewayId: "gateway_id",
2104
+ modifiedAt: "modified_at",
2105
+ name: "name",
2106
+ }),
2107
+ ),
2108
+ ),
2109
+ gatewayId: Schema.String,
2110
+ modifiedAt: Schema.String,
2111
+ name: Schema.String,
2112
+ processed: Schema.Boolean,
2113
+ results: Schema.Array(
2114
+ Schema.Struct({
2115
+ id: Schema.String,
2116
+ createdAt: Schema.String,
2117
+ evaluationId: Schema.String,
2118
+ evaluationTypeId: Schema.String,
2119
+ modifiedAt: Schema.String,
2120
+ result: Schema.String,
2121
+ status: Schema.Number,
2122
+ statusDescription: Schema.String,
2123
+ totalLogs: Schema.Number,
2124
+ }).pipe(
2125
+ Schema.encodeKeys({
2126
+ id: "id",
2127
+ createdAt: "created_at",
2128
+ evaluationId: "evaluation_id",
2129
+ evaluationTypeId: "evaluation_type_id",
2130
+ modifiedAt: "modified_at",
2131
+ result: "result",
2132
+ status: "status",
2133
+ statusDescription: "status_description",
2134
+ totalLogs: "total_logs",
2135
+ }),
2136
+ ),
2137
+ ),
2138
+ totalLogs: Schema.Number,
2139
+ }).pipe(
2140
+ Schema.encodeKeys({
2141
+ id: "id",
2142
+ accountId: "account_id",
2143
+ accountTag: "account_tag",
2144
+ createdAt: "created_at",
2145
+ datasets: "datasets",
2146
+ gatewayId: "gateway_id",
2147
+ modifiedAt: "modified_at",
2148
+ name: "name",
2149
+ processed: "processed",
2150
+ results: "results",
2151
+ totalLogs: "total_logs",
2152
+ }),
2153
+ ),
2154
+ ) as unknown as Schema.Schema<ListEvaluationsResponse>;
2155
+
2156
+ export type ListEvaluationsError = DefaultErrors;
2157
+
2158
+ export const listEvaluations: API.OperationMethod<
2159
+ ListEvaluationsRequest,
2160
+ ListEvaluationsResponse,
2161
+ ListEvaluationsError,
2162
+ Credentials | HttpClient.HttpClient
2163
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
2164
+ input: ListEvaluationsRequest,
2165
+ output: ListEvaluationsResponse,
2166
+ errors: [],
2167
+ }));
2168
+
2169
+ export interface CreateEvaluationRequest {
2170
+ gatewayId: string;
2171
+ /** Path param: */
2172
+ accountId: string;
2173
+ /** Body param: */
2174
+ datasetIds: string[];
2175
+ /** Body param: */
2176
+ evaluationTypeIds: string[];
2177
+ /** Body param: */
2178
+ name: string;
2179
+ }
2180
+
2181
+ export const CreateEvaluationRequest =
2182
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
2183
+ gatewayId: Schema.String.pipe(T.HttpPath("gatewayId")),
2184
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
2185
+ datasetIds: Schema.Array(Schema.String),
2186
+ evaluationTypeIds: Schema.Array(Schema.String),
2187
+ name: Schema.String,
2188
+ }).pipe(
2189
+ Schema.encodeKeys({
2190
+ datasetIds: "dataset_ids",
2191
+ evaluationTypeIds: "evaluation_type_ids",
2192
+ name: "name",
2193
+ }),
2194
+ T.Http({
2195
+ method: "POST",
2196
+ path: "/accounts/{account_id}/ai-gateway/gateways/{gatewayId}/evaluations",
2197
+ }),
2198
+ ) as unknown as Schema.Schema<CreateEvaluationRequest>;
2199
+
2200
+ export interface CreateEvaluationResponse {
2201
+ id: string;
2202
+ accountId: string;
2203
+ accountTag: string;
2204
+ createdAt: string;
2205
+ datasets: {
2206
+ id: string;
2207
+ accountId: string;
2208
+ accountTag: string;
2209
+ createdAt: string;
2210
+ enable: boolean;
2211
+ filters: {
2212
+ key:
2213
+ | "created_at"
2214
+ | "request_content_type"
2215
+ | "response_content_type"
2216
+ | "success"
2217
+ | "cached"
2218
+ | "provider"
2219
+ | "model"
2220
+ | "cost"
2221
+ | "tokens"
2222
+ | "tokens_in"
2223
+ | "tokens_out"
2224
+ | "duration"
2225
+ | "feedback";
2226
+ operator: "eq" | "contains" | "lt" | "gt";
2227
+ value: (string | number | boolean)[];
2228
+ }[];
2229
+ gatewayId: string;
2230
+ modifiedAt: string;
2231
+ name: string;
2232
+ }[];
2233
+ /** gateway id */
2234
+ gatewayId: string;
2235
+ modifiedAt: string;
2236
+ name: string;
2237
+ processed: boolean;
2238
+ results: {
2239
+ id: string;
2240
+ createdAt: string;
2241
+ evaluationId: string;
2242
+ evaluationTypeId: string;
2243
+ modifiedAt: string;
2244
+ result: string;
2245
+ status: number;
2246
+ statusDescription: string;
2247
+ totalLogs: number;
2248
+ }[];
2249
+ totalLogs: number;
2250
+ }
2251
+
2252
+ export const CreateEvaluationResponse =
2253
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
2254
+ id: Schema.String,
2255
+ accountId: Schema.String,
2256
+ accountTag: Schema.String,
2257
+ createdAt: Schema.String,
2258
+ datasets: Schema.Array(
2259
+ Schema.Struct({
2260
+ id: Schema.String,
2261
+ accountId: Schema.String,
2262
+ accountTag: Schema.String,
2263
+ createdAt: Schema.String,
2264
+ enable: Schema.Boolean,
2265
+ filters: Schema.Array(
2266
+ Schema.Struct({
2267
+ key: Schema.Literals([
2268
+ "created_at",
2269
+ "request_content_type",
2270
+ "response_content_type",
2271
+ "success",
2272
+ "cached",
2273
+ "provider",
2274
+ "model",
2275
+ "cost",
2276
+ "tokens",
2277
+ "tokens_in",
2278
+ "tokens_out",
2279
+ "duration",
2280
+ "feedback",
2281
+ ]),
2282
+ operator: Schema.Literals(["eq", "contains", "lt", "gt"]),
2283
+ value: Schema.Array(
2284
+ Schema.Union([Schema.String, Schema.Number, Schema.Boolean]),
2285
+ ),
2286
+ }),
2287
+ ),
2288
+ gatewayId: Schema.String,
2289
+ modifiedAt: Schema.String,
2290
+ name: Schema.String,
2291
+ }).pipe(
2292
+ Schema.encodeKeys({
2293
+ id: "id",
2294
+ accountId: "account_id",
2295
+ accountTag: "account_tag",
2296
+ createdAt: "created_at",
2297
+ enable: "enable",
2298
+ filters: "filters",
2299
+ gatewayId: "gateway_id",
2300
+ modifiedAt: "modified_at",
2301
+ name: "name",
2302
+ }),
2303
+ ),
2304
+ ),
2305
+ gatewayId: Schema.String,
2306
+ modifiedAt: Schema.String,
2307
+ name: Schema.String,
2308
+ processed: Schema.Boolean,
2309
+ results: Schema.Array(
2310
+ Schema.Struct({
2311
+ id: Schema.String,
2312
+ createdAt: Schema.String,
2313
+ evaluationId: Schema.String,
2314
+ evaluationTypeId: Schema.String,
2315
+ modifiedAt: Schema.String,
2316
+ result: Schema.String,
2317
+ status: Schema.Number,
2318
+ statusDescription: Schema.String,
2319
+ totalLogs: Schema.Number,
2320
+ }).pipe(
2321
+ Schema.encodeKeys({
2322
+ id: "id",
2323
+ createdAt: "created_at",
2324
+ evaluationId: "evaluation_id",
2325
+ evaluationTypeId: "evaluation_type_id",
2326
+ modifiedAt: "modified_at",
2327
+ result: "result",
2328
+ status: "status",
2329
+ statusDescription: "status_description",
2330
+ totalLogs: "total_logs",
2331
+ }),
2332
+ ),
2333
+ ),
2334
+ totalLogs: Schema.Number,
2335
+ }).pipe(
2336
+ Schema.encodeKeys({
2337
+ id: "id",
2338
+ accountId: "account_id",
2339
+ accountTag: "account_tag",
2340
+ createdAt: "created_at",
2341
+ datasets: "datasets",
2342
+ gatewayId: "gateway_id",
2343
+ modifiedAt: "modified_at",
2344
+ name: "name",
2345
+ processed: "processed",
2346
+ results: "results",
2347
+ totalLogs: "total_logs",
2348
+ }),
2349
+ ) as unknown as Schema.Schema<CreateEvaluationResponse>;
2350
+
2351
+ export type CreateEvaluationError = DefaultErrors;
2352
+
2353
+ export const createEvaluation: API.OperationMethod<
2354
+ CreateEvaluationRequest,
2355
+ CreateEvaluationResponse,
2356
+ CreateEvaluationError,
2357
+ Credentials | HttpClient.HttpClient
2358
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
2359
+ input: CreateEvaluationRequest,
2360
+ output: CreateEvaluationResponse,
2361
+ errors: [],
2362
+ }));
2363
+
2364
+ export interface DeleteEvaluationRequest {
2365
+ gatewayId: string;
2366
+ id: string;
2367
+ accountId: string;
2368
+ }
2369
+
2370
+ export const DeleteEvaluationRequest =
2371
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
2372
+ gatewayId: Schema.String.pipe(T.HttpPath("gatewayId")),
2373
+ id: Schema.String.pipe(T.HttpPath("id")),
2374
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
2375
+ }).pipe(
2376
+ T.Http({
2377
+ method: "DELETE",
2378
+ path: "/accounts/{account_id}/ai-gateway/gateways/{gatewayId}/evaluations/{id}",
2379
+ }),
2380
+ ) as unknown as Schema.Schema<DeleteEvaluationRequest>;
2381
+
2382
+ export interface DeleteEvaluationResponse {
2383
+ id: string;
2384
+ accountId: string;
2385
+ accountTag: string;
2386
+ createdAt: string;
2387
+ datasets: {
2388
+ id: string;
2389
+ accountId: string;
2390
+ accountTag: string;
2391
+ createdAt: string;
2392
+ enable: boolean;
2393
+ filters: {
2394
+ key:
2395
+ | "created_at"
2396
+ | "request_content_type"
2397
+ | "response_content_type"
2398
+ | "success"
2399
+ | "cached"
2400
+ | "provider"
2401
+ | "model"
2402
+ | "cost"
2403
+ | "tokens"
2404
+ | "tokens_in"
2405
+ | "tokens_out"
2406
+ | "duration"
2407
+ | "feedback";
2408
+ operator: "eq" | "contains" | "lt" | "gt";
2409
+ value: (string | number | boolean)[];
2410
+ }[];
2411
+ gatewayId: string;
2412
+ modifiedAt: string;
2413
+ name: string;
2414
+ }[];
2415
+ /** gateway id */
2416
+ gatewayId: string;
2417
+ modifiedAt: string;
2418
+ name: string;
2419
+ processed: boolean;
2420
+ results: {
2421
+ id: string;
2422
+ createdAt: string;
2423
+ evaluationId: string;
2424
+ evaluationTypeId: string;
2425
+ modifiedAt: string;
2426
+ result: string;
2427
+ status: number;
2428
+ statusDescription: string;
2429
+ totalLogs: number;
2430
+ }[];
2431
+ totalLogs: number;
2432
+ }
2433
+
2434
+ export const DeleteEvaluationResponse =
2435
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
2436
+ id: Schema.String,
2437
+ accountId: Schema.String,
2438
+ accountTag: Schema.String,
2439
+ createdAt: Schema.String,
2440
+ datasets: Schema.Array(
2441
+ Schema.Struct({
2442
+ id: Schema.String,
2443
+ accountId: Schema.String,
2444
+ accountTag: Schema.String,
2445
+ createdAt: Schema.String,
2446
+ enable: Schema.Boolean,
2447
+ filters: Schema.Array(
2448
+ Schema.Struct({
2449
+ key: Schema.Literals([
2450
+ "created_at",
2451
+ "request_content_type",
2452
+ "response_content_type",
2453
+ "success",
2454
+ "cached",
2455
+ "provider",
2456
+ "model",
2457
+ "cost",
2458
+ "tokens",
2459
+ "tokens_in",
2460
+ "tokens_out",
2461
+ "duration",
2462
+ "feedback",
2463
+ ]),
2464
+ operator: Schema.Literals(["eq", "contains", "lt", "gt"]),
2465
+ value: Schema.Array(
2466
+ Schema.Union([Schema.String, Schema.Number, Schema.Boolean]),
2467
+ ),
2468
+ }),
2469
+ ),
2470
+ gatewayId: Schema.String,
2471
+ modifiedAt: Schema.String,
2472
+ name: Schema.String,
2473
+ }).pipe(
2474
+ Schema.encodeKeys({
2475
+ id: "id",
2476
+ accountId: "account_id",
2477
+ accountTag: "account_tag",
2478
+ createdAt: "created_at",
2479
+ enable: "enable",
2480
+ filters: "filters",
2481
+ gatewayId: "gateway_id",
2482
+ modifiedAt: "modified_at",
2483
+ name: "name",
2484
+ }),
2485
+ ),
2486
+ ),
2487
+ gatewayId: Schema.String,
2488
+ modifiedAt: Schema.String,
2489
+ name: Schema.String,
2490
+ processed: Schema.Boolean,
2491
+ results: Schema.Array(
2492
+ Schema.Struct({
2493
+ id: Schema.String,
2494
+ createdAt: Schema.String,
2495
+ evaluationId: Schema.String,
2496
+ evaluationTypeId: Schema.String,
2497
+ modifiedAt: Schema.String,
2498
+ result: Schema.String,
2499
+ status: Schema.Number,
2500
+ statusDescription: Schema.String,
2501
+ totalLogs: Schema.Number,
2502
+ }).pipe(
2503
+ Schema.encodeKeys({
2504
+ id: "id",
2505
+ createdAt: "created_at",
2506
+ evaluationId: "evaluation_id",
2507
+ evaluationTypeId: "evaluation_type_id",
2508
+ modifiedAt: "modified_at",
2509
+ result: "result",
2510
+ status: "status",
2511
+ statusDescription: "status_description",
2512
+ totalLogs: "total_logs",
2513
+ }),
2514
+ ),
2515
+ ),
2516
+ totalLogs: Schema.Number,
2517
+ }).pipe(
2518
+ Schema.encodeKeys({
2519
+ id: "id",
2520
+ accountId: "account_id",
2521
+ accountTag: "account_tag",
2522
+ createdAt: "created_at",
2523
+ datasets: "datasets",
2524
+ gatewayId: "gateway_id",
2525
+ modifiedAt: "modified_at",
2526
+ name: "name",
2527
+ processed: "processed",
2528
+ results: "results",
2529
+ totalLogs: "total_logs",
2530
+ }),
2531
+ ) as unknown as Schema.Schema<DeleteEvaluationResponse>;
2532
+
2533
+ export type DeleteEvaluationError = DefaultErrors;
2534
+
2535
+ export const deleteEvaluation: API.OperationMethod<
2536
+ DeleteEvaluationRequest,
2537
+ DeleteEvaluationResponse,
2538
+ DeleteEvaluationError,
2539
+ Credentials | HttpClient.HttpClient
2540
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
2541
+ input: DeleteEvaluationRequest,
2542
+ output: DeleteEvaluationResponse,
2543
+ errors: [],
2544
+ }));
2545
+
2546
+ // =============================================================================
2547
+ // EvaluationType
2548
+ // =============================================================================
2549
+
2550
+ export interface ListEvaluationTypesRequest {
2551
+ /** Path param: */
2552
+ accountId: string;
2553
+ /** Query param: */
2554
+ orderBy?: string;
2555
+ /** Query param: */
2556
+ orderByDirection?: "asc" | "desc";
2557
+ }
2558
+
2559
+ export const ListEvaluationTypesRequest =
2560
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
2561
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
2562
+ orderBy: Schema.optional(Schema.String).pipe(T.HttpQuery("order_by")),
2563
+ orderByDirection: Schema.optional(Schema.Literals(["asc", "desc"])).pipe(
2564
+ T.HttpQuery("order_by_direction"),
2565
+ ),
2566
+ }).pipe(
2567
+ T.Http({
2568
+ method: "GET",
2569
+ path: "/accounts/{account_id}/ai-gateway/evaluation-types",
2570
+ }),
2571
+ ) as unknown as Schema.Schema<ListEvaluationTypesRequest>;
2572
+
2573
+ export type ListEvaluationTypesResponse = {
2574
+ id: string;
2575
+ createdAt: string;
2576
+ description: string;
2577
+ enable: boolean;
2578
+ mandatory: boolean;
2579
+ modifiedAt: string;
2580
+ name: string;
2581
+ type: string;
2582
+ }[];
2583
+
2584
+ export const ListEvaluationTypesResponse =
2585
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Array(
2586
+ Schema.Struct({
2587
+ id: Schema.String,
2588
+ createdAt: Schema.String,
2589
+ description: Schema.String,
2590
+ enable: Schema.Boolean,
2591
+ mandatory: Schema.Boolean,
2592
+ modifiedAt: Schema.String,
2593
+ name: Schema.String,
2594
+ type: Schema.String,
2595
+ }).pipe(
2596
+ Schema.encodeKeys({
2597
+ id: "id",
2598
+ createdAt: "created_at",
2599
+ description: "description",
2600
+ enable: "enable",
2601
+ mandatory: "mandatory",
2602
+ modifiedAt: "modified_at",
2603
+ name: "name",
2604
+ type: "type",
2605
+ }),
2606
+ ),
2607
+ ) as unknown as Schema.Schema<ListEvaluationTypesResponse>;
2608
+
2609
+ export type ListEvaluationTypesError = DefaultErrors;
2610
+
2611
+ export const listEvaluationTypes: API.OperationMethod<
2612
+ ListEvaluationTypesRequest,
2613
+ ListEvaluationTypesResponse,
2614
+ ListEvaluationTypesError,
2615
+ Credentials | HttpClient.HttpClient
2616
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
2617
+ input: ListEvaluationTypesRequest,
2618
+ output: ListEvaluationTypesResponse,
2619
+ errors: [],
2620
+ }));
2621
+
2622
+ // =============================================================================
2623
+ // Log
2624
+ // =============================================================================
2625
+
2626
+ export interface GetLogRequest {
2627
+ gatewayId: string;
2628
+ id: string;
2629
+ accountId: string;
2630
+ }
2631
+
2632
+ export const GetLogRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
2633
+ gatewayId: Schema.String.pipe(T.HttpPath("gatewayId")),
2634
+ id: Schema.String.pipe(T.HttpPath("id")),
2635
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
2636
+ }).pipe(
2637
+ T.Http({
2638
+ method: "GET",
2639
+ path: "/accounts/{account_id}/ai-gateway/gateways/{gatewayId}/logs/{id}",
2640
+ }),
2641
+ ) as unknown as Schema.Schema<GetLogRequest>;
2642
+
2643
+ export interface GetLogResponse {
2644
+ id: string;
2645
+ cached: boolean;
2646
+ createdAt: string;
2647
+ duration: number;
2648
+ model: string;
2649
+ path: string;
2650
+ provider: string;
2651
+ success: boolean;
2652
+ tokensIn: number | null;
2653
+ tokensOut: number | null;
2654
+ cost?: number | null;
2655
+ customCost?: boolean | null;
2656
+ metadata?: string | null;
2657
+ modelType?: string | null;
2658
+ requestContentType?: string | null;
2659
+ requestHead?: string | null;
2660
+ requestHeadComplete?: boolean | null;
2661
+ requestSize?: number | null;
2662
+ requestType?: string | null;
2663
+ responseContentType?: string | null;
2664
+ responseHead?: string | null;
2665
+ responseHeadComplete?: boolean | null;
2666
+ responseSize?: number | null;
2667
+ statusCode?: number | null;
2668
+ step?: number | null;
2669
+ }
2670
+
2671
+ export const GetLogResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
2672
+ id: Schema.String,
2673
+ cached: Schema.Boolean,
2674
+ createdAt: Schema.String,
2675
+ duration: Schema.Number,
2676
+ model: Schema.String,
2677
+ path: Schema.String,
2678
+ provider: Schema.String,
2679
+ success: Schema.Boolean,
2680
+ tokensIn: Schema.Union([Schema.Number, Schema.Null]),
2681
+ tokensOut: Schema.Union([Schema.Number, Schema.Null]),
2682
+ cost: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
2683
+ customCost: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
2684
+ metadata: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
2685
+ modelType: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
2686
+ requestContentType: Schema.optional(
2687
+ Schema.Union([Schema.String, Schema.Null]),
2688
+ ),
2689
+ requestHead: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
2690
+ requestHeadComplete: Schema.optional(
2691
+ Schema.Union([Schema.Boolean, Schema.Null]),
2692
+ ),
2693
+ requestSize: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
2694
+ requestType: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
2695
+ responseContentType: Schema.optional(
2696
+ Schema.Union([Schema.String, Schema.Null]),
2697
+ ),
2698
+ responseHead: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
2699
+ responseHeadComplete: Schema.optional(
2700
+ Schema.Union([Schema.Boolean, Schema.Null]),
2701
+ ),
2702
+ responseSize: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
2703
+ statusCode: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
2704
+ step: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
2705
+ }).pipe(
2706
+ Schema.encodeKeys({
2707
+ id: "id",
2708
+ cached: "cached",
2709
+ createdAt: "created_at",
2710
+ duration: "duration",
2711
+ model: "model",
2712
+ path: "path",
2713
+ provider: "provider",
2714
+ success: "success",
2715
+ tokensIn: "tokens_in",
2716
+ tokensOut: "tokens_out",
2717
+ cost: "cost",
2718
+ customCost: "custom_cost",
2719
+ metadata: "metadata",
2720
+ modelType: "model_type",
2721
+ requestContentType: "request_content_type",
2722
+ requestHead: "request_head",
2723
+ requestHeadComplete: "request_head_complete",
2724
+ requestSize: "request_size",
2725
+ requestType: "request_type",
2726
+ responseContentType: "response_content_type",
2727
+ responseHead: "response_head",
2728
+ responseHeadComplete: "response_head_complete",
2729
+ responseSize: "response_size",
2730
+ statusCode: "status_code",
2731
+ step: "step",
2732
+ }),
2733
+ ) as unknown as Schema.Schema<GetLogResponse>;
2734
+
2735
+ export type GetLogError = DefaultErrors;
2736
+
2737
+ export const getLog: API.OperationMethod<
2738
+ GetLogRequest,
2739
+ GetLogResponse,
2740
+ GetLogError,
2741
+ Credentials | HttpClient.HttpClient
2742
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
2743
+ input: GetLogRequest,
2744
+ output: GetLogResponse,
2745
+ errors: [],
2746
+ }));
2747
+
2748
+ export interface ListLogsRequest {
2749
+ gatewayId: string;
2750
+ /** Path param: */
2751
+ accountId: string;
2752
+ /** Query param: */
2753
+ filters?: {
2754
+ key:
2755
+ | "id"
2756
+ | "created_at"
2757
+ | "request_content_type"
2758
+ | "response_content_type"
2759
+ | "request_type"
2760
+ | "success"
2761
+ | "cached"
2762
+ | "provider"
2763
+ | "model"
2764
+ | "model_type"
2765
+ | "cost"
2766
+ | "tokens"
2767
+ | "tokens_in"
2768
+ | "tokens_out"
2769
+ | "duration"
2770
+ | "feedback"
2771
+ | "event_id"
2772
+ | "metadata.key"
2773
+ | "metadata.value"
2774
+ | "prompts.prompt_id"
2775
+ | "prompts.version_id"
2776
+ | "authentication"
2777
+ | "wholesale"
2778
+ | "compatibilityMode"
2779
+ | "dlp_action";
2780
+ operator: "eq" | "neq" | "contains" | "lt" | "gt";
2781
+ value: (string | null | number | boolean)[];
2782
+ }[];
2783
+ /** Query param: */
2784
+ metaInfo?: boolean;
2785
+ /** Query param: */
2786
+ orderBy?:
2787
+ | "created_at"
2788
+ | "provider"
2789
+ | "model"
2790
+ | "model_type"
2791
+ | "success"
2792
+ | "cached";
2793
+ /** Query param: */
2794
+ orderByDirection?: "asc" | "desc";
2795
+ /** Query param: */
2796
+ search?: string;
2797
+ /** @deprecated Query param: */
2798
+ cached?: boolean;
2799
+ /** @deprecated Query param: */
2800
+ direction?: "asc" | "desc";
2801
+ /** @deprecated Query param: */
2802
+ endDate?: string;
2803
+ /** @deprecated Query param: */
2804
+ feedback?: "0" | "1";
2805
+ /** @deprecated Query param: */
2806
+ maxCost?: number;
2807
+ /** @deprecated Query param: */
2808
+ maxDuration?: number;
2809
+ /** @deprecated Query param: */
2810
+ maxTokensIn?: number;
2811
+ /** @deprecated Query param: */
2812
+ maxTokensOut?: number;
2813
+ /** @deprecated Query param: */
2814
+ maxTotalTokens?: number;
2815
+ /** @deprecated Query param: */
2816
+ minCost?: number;
2817
+ /** @deprecated Query param: */
2818
+ minDuration?: number;
2819
+ /** @deprecated Query param: */
2820
+ minTokensIn?: number;
2821
+ /** @deprecated Query param: */
2822
+ minTokensOut?: number;
2823
+ /** @deprecated Query param: */
2824
+ minTotalTokens?: number;
2825
+ /** @deprecated Query param: */
2826
+ model?: string;
2827
+ /** @deprecated Query param: */
2828
+ modelType?: string;
2829
+ /** @deprecated Query param: */
2830
+ provider?: string;
2831
+ /** @deprecated Query param: */
2832
+ requestContentType?: string;
2833
+ /** @deprecated Query param: */
2834
+ responseContentType?: string;
2835
+ /** @deprecated Query param: */
2836
+ startDate?: string;
2837
+ /** @deprecated Query param: */
2838
+ success?: boolean;
2839
+ }
2840
+
2841
+ export const ListLogsRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
2842
+ gatewayId: Schema.String.pipe(T.HttpPath("gatewayId")),
2843
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
2844
+ filters: Schema.optional(
2845
+ Schema.Array(
2846
+ Schema.Struct({
2847
+ key: Schema.Literals([
2848
+ "id",
2849
+ "created_at",
2850
+ "request_content_type",
2851
+ "response_content_type",
2852
+ "request_type",
2853
+ "success",
2854
+ "cached",
2855
+ "provider",
2856
+ "model",
2857
+ "model_type",
2858
+ "cost",
2859
+ "tokens",
2860
+ "tokens_in",
2861
+ "tokens_out",
2862
+ "duration",
2863
+ "feedback",
2864
+ "event_id",
2865
+ "metadata.key",
2866
+ "metadata.value",
2867
+ "prompts.prompt_id",
2868
+ "prompts.version_id",
2869
+ "authentication",
2870
+ "wholesale",
2871
+ "compatibilityMode",
2872
+ "dlp_action",
2873
+ ]),
2874
+ operator: Schema.Literals(["eq", "neq", "contains", "lt", "gt"]),
2875
+ value: Schema.Array(
2876
+ Schema.Union([
2877
+ Schema.String,
2878
+ Schema.Null,
2879
+ Schema.Number,
2880
+ Schema.Boolean,
2881
+ ]),
2882
+ ),
2883
+ }),
2884
+ ),
2885
+ ).pipe(T.HttpQuery("filters")),
2886
+ metaInfo: Schema.optional(Schema.Boolean).pipe(T.HttpQuery("meta_info")),
2887
+ orderBy: Schema.optional(
2888
+ Schema.Literals([
2889
+ "created_at",
2890
+ "provider",
2891
+ "model",
2892
+ "model_type",
2893
+ "success",
2894
+ "cached",
2895
+ ]),
2896
+ ).pipe(T.HttpQuery("order_by")),
2897
+ orderByDirection: Schema.optional(Schema.Literals(["asc", "desc"])).pipe(
2898
+ T.HttpQuery("order_by_direction"),
2899
+ ),
2900
+ search: Schema.optional(Schema.String).pipe(T.HttpQuery("search")),
2901
+ cached: Schema.optional(Schema.Boolean),
2902
+ direction: Schema.optional(Schema.Literals(["asc", "desc"])),
2903
+ endDate: Schema.optional(Schema.String),
2904
+ feedback: Schema.optional(Schema.Literals(["0", "1"])),
2905
+ maxCost: Schema.optional(Schema.Number),
2906
+ maxDuration: Schema.optional(Schema.Number),
2907
+ maxTokensIn: Schema.optional(Schema.Number),
2908
+ maxTokensOut: Schema.optional(Schema.Number),
2909
+ maxTotalTokens: Schema.optional(Schema.Number),
2910
+ minCost: Schema.optional(Schema.Number),
2911
+ minDuration: Schema.optional(Schema.Number),
2912
+ minTokensIn: Schema.optional(Schema.Number),
2913
+ minTokensOut: Schema.optional(Schema.Number),
2914
+ minTotalTokens: Schema.optional(Schema.Number),
2915
+ model: Schema.optional(Schema.String),
2916
+ modelType: Schema.optional(Schema.String),
2917
+ provider: Schema.optional(Schema.String),
2918
+ requestContentType: Schema.optional(Schema.String),
2919
+ responseContentType: Schema.optional(Schema.String),
2920
+ startDate: Schema.optional(Schema.String),
2921
+ success: Schema.optional(Schema.Boolean),
2922
+ }).pipe(
2923
+ Schema.encodeKeys({
2924
+ cached: "cached",
2925
+ direction: "direction",
2926
+ endDate: "end_date",
2927
+ feedback: "feedback",
2928
+ maxCost: "max_cost",
2929
+ maxDuration: "max_duration",
2930
+ maxTokensIn: "max_tokens_in",
2931
+ maxTokensOut: "max_tokens_out",
2932
+ maxTotalTokens: "max_total_tokens",
2933
+ minCost: "min_cost",
2934
+ minDuration: "min_duration",
2935
+ minTokensIn: "min_tokens_in",
2936
+ minTokensOut: "min_tokens_out",
2937
+ minTotalTokens: "min_total_tokens",
2938
+ model: "model",
2939
+ modelType: "model_type",
2940
+ provider: "provider",
2941
+ requestContentType: "request_content_type",
2942
+ responseContentType: "response_content_type",
2943
+ startDate: "start_date",
2944
+ success: "success",
2945
+ }),
2946
+ T.Http({
2947
+ method: "GET",
2948
+ path: "/accounts/{account_id}/ai-gateway/gateways/{gatewayId}/logs",
2949
+ }),
2950
+ ) as unknown as Schema.Schema<ListLogsRequest>;
2951
+
2952
+ export type ListLogsResponse = {
2953
+ id: string;
2954
+ cached: boolean;
2955
+ createdAt: string;
2956
+ duration: number;
2957
+ model: string;
2958
+ path: string;
2959
+ provider: string;
2960
+ success: boolean;
2961
+ tokensIn: number | null;
2962
+ tokensOut: number | null;
2963
+ cost?: number | null;
2964
+ customCost?: boolean | null;
2965
+ metadata?: string | null;
2966
+ modelType?: string | null;
2967
+ requestContentType?: string | null;
2968
+ requestType?: string | null;
2969
+ responseContentType?: string | null;
2970
+ statusCode?: number | null;
2971
+ step?: number | null;
2972
+ }[];
2973
+
2974
+ export const ListLogsResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Array(
2975
+ Schema.Struct({
2976
+ id: Schema.String,
2977
+ cached: Schema.Boolean,
2978
+ createdAt: Schema.String,
2979
+ duration: Schema.Number,
2980
+ model: Schema.String,
2981
+ path: Schema.String,
2982
+ provider: Schema.String,
2983
+ success: Schema.Boolean,
2984
+ tokensIn: Schema.Union([Schema.Number, Schema.Null]),
2985
+ tokensOut: Schema.Union([Schema.Number, Schema.Null]),
2986
+ cost: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
2987
+ customCost: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
2988
+ metadata: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
2989
+ modelType: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
2990
+ requestContentType: Schema.optional(
2991
+ Schema.Union([Schema.String, Schema.Null]),
2992
+ ),
2993
+ requestType: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
2994
+ responseContentType: Schema.optional(
2995
+ Schema.Union([Schema.String, Schema.Null]),
2996
+ ),
2997
+ statusCode: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
2998
+ step: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
2999
+ }).pipe(
3000
+ Schema.encodeKeys({
3001
+ id: "id",
3002
+ cached: "cached",
3003
+ createdAt: "created_at",
3004
+ duration: "duration",
3005
+ model: "model",
3006
+ path: "path",
3007
+ provider: "provider",
3008
+ success: "success",
3009
+ tokensIn: "tokens_in",
3010
+ tokensOut: "tokens_out",
3011
+ cost: "cost",
3012
+ customCost: "custom_cost",
3013
+ metadata: "metadata",
3014
+ modelType: "model_type",
3015
+ requestContentType: "request_content_type",
3016
+ requestType: "request_type",
3017
+ responseContentType: "response_content_type",
3018
+ statusCode: "status_code",
3019
+ step: "step",
3020
+ }),
3021
+ ),
3022
+ ) as unknown as Schema.Schema<ListLogsResponse>;
3023
+
3024
+ export type ListLogsError = DefaultErrors;
3025
+
3026
+ export const listLogs: API.OperationMethod<
3027
+ ListLogsRequest,
3028
+ ListLogsResponse,
3029
+ ListLogsError,
3030
+ Credentials | HttpClient.HttpClient
3031
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
3032
+ input: ListLogsRequest,
3033
+ output: ListLogsResponse,
3034
+ errors: [],
3035
+ }));
3036
+
3037
+ export interface PatchLogRequest {
3038
+ gatewayId: string;
3039
+ id: string;
3040
+ /** Path param: */
3041
+ accountId: string;
3042
+ /** Body param: */
3043
+ feedback?: number | null;
3044
+ /** Body param: */
3045
+ metadata?: Record<string, unknown> | null;
3046
+ /** Body param: */
3047
+ score?: number | null;
3048
+ }
3049
+
3050
+ export const PatchLogRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
3051
+ gatewayId: Schema.String.pipe(T.HttpPath("gatewayId")),
3052
+ id: Schema.String.pipe(T.HttpPath("id")),
3053
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
3054
+ feedback: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
3055
+ metadata: Schema.optional(Schema.Union([Schema.Struct({}), Schema.Null])),
3056
+ score: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
3057
+ }).pipe(
3058
+ T.Http({
3059
+ method: "PATCH",
3060
+ path: "/accounts/{account_id}/ai-gateway/gateways/{gatewayId}/logs/{id}",
3061
+ }),
3062
+ ) as unknown as Schema.Schema<PatchLogRequest>;
3063
+
3064
+ export type PatchLogResponse = unknown;
3065
+
3066
+ export const PatchLogResponse =
3067
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Unknown as unknown as Schema.Schema<PatchLogResponse>;
3068
+
3069
+ export type PatchLogError = DefaultErrors;
3070
+
3071
+ export const patchLog: API.OperationMethod<
3072
+ PatchLogRequest,
3073
+ PatchLogResponse,
3074
+ PatchLogError,
3075
+ Credentials | HttpClient.HttpClient
3076
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
3077
+ input: PatchLogRequest,
3078
+ output: PatchLogResponse,
3079
+ errors: [],
3080
+ }));
3081
+
3082
+ export interface DeleteLogRequest {
3083
+ gatewayId: string;
3084
+ /** Path param: */
3085
+ accountId: string;
3086
+ /** Query param: */
3087
+ filters?: {
3088
+ key:
3089
+ | "id"
3090
+ | "created_at"
3091
+ | "request_content_type"
3092
+ | "response_content_type"
3093
+ | "request_type"
3094
+ | "success"
3095
+ | "cached"
3096
+ | "provider"
3097
+ | "model"
3098
+ | "model_type"
3099
+ | "cost"
3100
+ | "tokens"
3101
+ | "tokens_in"
3102
+ | "tokens_out"
3103
+ | "duration"
3104
+ | "feedback"
3105
+ | "event_id"
3106
+ | "metadata.key"
3107
+ | "metadata.value"
3108
+ | "prompts.prompt_id"
3109
+ | "prompts.version_id"
3110
+ | "authentication"
3111
+ | "wholesale"
3112
+ | "compatibilityMode"
3113
+ | "dlp_action";
3114
+ operator: "eq" | "neq" | "contains" | "lt" | "gt";
3115
+ value: (string | null | number | boolean)[];
3116
+ }[];
3117
+ /** Query param: */
3118
+ limit?: number;
3119
+ /** Query param: */
3120
+ orderBy?:
3121
+ | "created_at"
3122
+ | "provider"
3123
+ | "model"
3124
+ | "model_type"
3125
+ | "success"
3126
+ | "cached"
3127
+ | "cost"
3128
+ | "tokens_in"
3129
+ | "tokens_out"
3130
+ | "duration"
3131
+ | "feedback";
3132
+ /** Query param: */
3133
+ orderByDirection?: "asc" | "desc";
3134
+ }
3135
+
3136
+ export const DeleteLogRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
3137
+ gatewayId: Schema.String.pipe(T.HttpPath("gatewayId")),
3138
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
3139
+ filters: Schema.optional(
3140
+ Schema.Array(
3141
+ Schema.Struct({
3142
+ key: Schema.Literals([
3143
+ "id",
3144
+ "created_at",
3145
+ "request_content_type",
3146
+ "response_content_type",
3147
+ "request_type",
3148
+ "success",
3149
+ "cached",
3150
+ "provider",
3151
+ "model",
3152
+ "model_type",
3153
+ "cost",
3154
+ "tokens",
3155
+ "tokens_in",
3156
+ "tokens_out",
3157
+ "duration",
3158
+ "feedback",
3159
+ "event_id",
3160
+ "metadata.key",
3161
+ "metadata.value",
3162
+ "prompts.prompt_id",
3163
+ "prompts.version_id",
3164
+ "authentication",
3165
+ "wholesale",
3166
+ "compatibilityMode",
3167
+ "dlp_action",
3168
+ ]),
3169
+ operator: Schema.Literals(["eq", "neq", "contains", "lt", "gt"]),
3170
+ value: Schema.Array(
3171
+ Schema.Union([
3172
+ Schema.String,
3173
+ Schema.Null,
3174
+ Schema.Number,
3175
+ Schema.Boolean,
3176
+ ]),
3177
+ ),
3178
+ }),
3179
+ ),
3180
+ ).pipe(T.HttpQuery("filters")),
3181
+ limit: Schema.optional(Schema.Number).pipe(T.HttpQuery("limit")),
3182
+ orderBy: Schema.optional(
3183
+ Schema.Literals([
3184
+ "created_at",
3185
+ "provider",
3186
+ "model",
3187
+ "model_type",
3188
+ "success",
3189
+ "cached",
3190
+ "cost",
3191
+ "tokens_in",
3192
+ "tokens_out",
3193
+ "duration",
3194
+ "feedback",
3195
+ ]),
3196
+ ).pipe(T.HttpQuery("order_by")),
3197
+ orderByDirection: Schema.optional(Schema.Literals(["asc", "desc"])).pipe(
3198
+ T.HttpQuery("order_by_direction"),
3199
+ ),
3200
+ }).pipe(
3201
+ T.Http({
3202
+ method: "DELETE",
3203
+ path: "/accounts/{account_id}/ai-gateway/gateways/{gatewayId}/logs",
3204
+ }),
3205
+ ) as unknown as Schema.Schema<DeleteLogRequest>;
3206
+
3207
+ export interface DeleteLogResponse {
3208
+ success: boolean;
3209
+ }
3210
+
3211
+ export const DeleteLogResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
3212
+ success: Schema.Boolean,
3213
+ }) as unknown as Schema.Schema<DeleteLogResponse>;
3214
+
3215
+ export type DeleteLogError = DefaultErrors;
3216
+
3217
+ export const deleteLog: API.OperationMethod<
3218
+ DeleteLogRequest,
3219
+ DeleteLogResponse,
3220
+ DeleteLogError,
3221
+ Credentials | HttpClient.HttpClient
3222
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
3223
+ input: DeleteLogRequest,
3224
+ output: DeleteLogResponse,
3225
+ errors: [],
3226
+ }));
3227
+
3228
+ export interface RequestLogRequest {
3229
+ gatewayId: string;
3230
+ id: string;
3231
+ accountId: string;
3232
+ }
3233
+
3234
+ export const RequestLogRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
3235
+ gatewayId: Schema.String.pipe(T.HttpPath("gatewayId")),
3236
+ id: Schema.String.pipe(T.HttpPath("id")),
3237
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
3238
+ }).pipe(
3239
+ T.Http({
3240
+ method: "GET",
3241
+ path: "/accounts/{account_id}/ai-gateway/gateways/{gatewayId}/logs/{id}/request",
3242
+ }),
3243
+ ) as unknown as Schema.Schema<RequestLogRequest>;
3244
+
3245
+ export type RequestLogResponse = unknown;
3246
+
3247
+ export const RequestLogResponse =
3248
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Unknown as unknown as Schema.Schema<RequestLogResponse>;
3249
+
3250
+ export type RequestLogError = DefaultErrors;
3251
+
3252
+ export const requestLog: API.OperationMethod<
3253
+ RequestLogRequest,
3254
+ RequestLogResponse,
3255
+ RequestLogError,
3256
+ Credentials | HttpClient.HttpClient
3257
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
3258
+ input: RequestLogRequest,
3259
+ output: RequestLogResponse,
3260
+ errors: [],
3261
+ }));
3262
+
3263
+ export interface ResponseLogRequest {
3264
+ gatewayId: string;
3265
+ id: string;
3266
+ accountId: string;
3267
+ }
3268
+
3269
+ export const ResponseLogRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
3270
+ gatewayId: Schema.String.pipe(T.HttpPath("gatewayId")),
3271
+ id: Schema.String.pipe(T.HttpPath("id")),
3272
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
3273
+ }).pipe(
3274
+ T.Http({
3275
+ method: "GET",
3276
+ path: "/accounts/{account_id}/ai-gateway/gateways/{gatewayId}/logs/{id}/response",
3277
+ }),
3278
+ ) as unknown as Schema.Schema<ResponseLogRequest>;
3279
+
3280
+ export type ResponseLogResponse = unknown;
3281
+
3282
+ export const ResponseLogResponse =
3283
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Unknown as unknown as Schema.Schema<ResponseLogResponse>;
3284
+
3285
+ export type ResponseLogError = DefaultErrors;
3286
+
3287
+ export const responseLog: API.OperationMethod<
3288
+ ResponseLogRequest,
3289
+ ResponseLogResponse,
3290
+ ResponseLogError,
3291
+ Credentials | HttpClient.HttpClient
3292
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
3293
+ input: ResponseLogRequest,
3294
+ output: ResponseLogResponse,
3295
+ errors: [],
3296
+ }));
3297
+
3298
+ // =============================================================================
3299
+ // Url
3300
+ // =============================================================================
3301
+
3302
+ export interface GetUrlRequest {
3303
+ gatewayId: string;
3304
+ provider: string;
3305
+ accountId: string;
3306
+ }
3307
+
3308
+ export const GetUrlRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
3309
+ gatewayId: Schema.String.pipe(T.HttpPath("gatewayId")),
3310
+ provider: Schema.String.pipe(T.HttpPath("provider")),
3311
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
3312
+ }).pipe(
3313
+ T.Http({
3314
+ method: "GET",
3315
+ path: "/accounts/{account_id}/ai-gateway/gateways/{gatewayId}/url/{provider}",
3316
+ }),
3317
+ ) as unknown as Schema.Schema<GetUrlRequest>;
3318
+
3319
+ export type GetUrlResponse = string;
3320
+
3321
+ export const GetUrlResponse =
3322
+ /*@__PURE__*/ /*#__PURE__*/ Schema.String as unknown as Schema.Schema<GetUrlResponse>;
3323
+
3324
+ export type GetUrlError = DefaultErrors;
3325
+
3326
+ export const getUrl: API.OperationMethod<
3327
+ GetUrlRequest,
3328
+ GetUrlResponse,
3329
+ GetUrlError,
3330
+ Credentials | HttpClient.HttpClient
3331
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
3332
+ input: GetUrlRequest,
3333
+ output: GetUrlResponse,
3334
+ errors: [],
3335
+ }));