@distilled.cloud/cloudflare 0.2.5-alpha2 → 0.3.0-alpha

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 (493) hide show
  1. package/README.md +12 -2
  2. package/lib/auth.d.ts +3 -2
  3. package/lib/auth.d.ts.map +1 -1
  4. package/lib/auth.js +4 -3
  5. package/lib/auth.js.map +1 -1
  6. package/lib/client/api.d.ts +7 -9
  7. package/lib/client/api.d.ts.map +1 -1
  8. package/lib/client/api.js +60 -13
  9. package/lib/client/api.js.map +1 -1
  10. package/lib/credentials.d.ts +58 -4
  11. package/lib/credentials.d.ts.map +1 -1
  12. package/lib/credentials.js +126 -7
  13. package/lib/credentials.js.map +1 -1
  14. package/lib/errors.d.ts +12 -1
  15. package/lib/errors.d.ts.map +1 -1
  16. package/lib/sensitive.d.ts +5 -0
  17. package/lib/sensitive.d.ts.map +1 -0
  18. package/lib/sensitive.js +5 -0
  19. package/lib/sensitive.js.map +1 -0
  20. package/lib/services/abuse-reports.d.ts +116 -44
  21. package/lib/services/abuse-reports.d.ts.map +1 -1
  22. package/lib/services/abuse-reports.js +171 -110
  23. package/lib/services/abuse-reports.js.map +1 -1
  24. package/lib/services/accounts.d.ts +146 -62
  25. package/lib/services/accounts.d.ts.map +1 -1
  26. package/lib/services/accounts.js +208 -153
  27. package/lib/services/accounts.js.map +1 -1
  28. package/lib/services/acm.d.ts.map +1 -1
  29. package/lib/services/acm.js +8 -4
  30. package/lib/services/acm.js.map +1 -1
  31. package/lib/services/addressing.d.ts +200 -87
  32. package/lib/services/addressing.d.ts.map +1 -1
  33. package/lib/services/addressing.js +288 -201
  34. package/lib/services/addressing.js.map +1 -1
  35. package/lib/services/ai-gateway.d.ts +302 -121
  36. package/lib/services/ai-gateway.d.ts.map +1 -1
  37. package/lib/services/ai-gateway.js +407 -283
  38. package/lib/services/ai-gateway.js.map +1 -1
  39. package/lib/services/ai.d.ts +83 -29
  40. package/lib/services/ai.d.ts.map +1 -1
  41. package/lib/services/ai.js +95 -42
  42. package/lib/services/ai.js.map +1 -1
  43. package/lib/services/aisearch.d.ts +266 -112
  44. package/lib/services/aisearch.d.ts.map +1 -1
  45. package/lib/services/aisearch.js +510 -393
  46. package/lib/services/aisearch.js.map +1 -1
  47. package/lib/services/alerting.d.ts +249 -112
  48. package/lib/services/alerting.d.ts.map +1 -1
  49. package/lib/services/alerting.js +382 -325
  50. package/lib/services/alerting.js.map +1 -1
  51. package/lib/services/api-gateway.d.ts +458 -200
  52. package/lib/services/api-gateway.d.ts.map +1 -1
  53. package/lib/services/api-gateway.js +725 -618
  54. package/lib/services/api-gateway.js.map +1 -1
  55. package/lib/services/argo.d.ts.map +1 -1
  56. package/lib/services/argo.js +16 -8
  57. package/lib/services/argo.js.map +1 -1
  58. package/lib/services/billing.d.ts.map +1 -1
  59. package/lib/services/billing.js +4 -2
  60. package/lib/services/billing.js.map +1 -1
  61. package/lib/services/bot-management.d.ts.map +1 -1
  62. package/lib/services/bot-management.js +2 -2
  63. package/lib/services/bot-management.js.map +1 -1
  64. package/lib/services/botnet-feed.d.ts.map +1 -1
  65. package/lib/services/botnet-feed.js +10 -6
  66. package/lib/services/botnet-feed.js.map +1 -1
  67. package/lib/services/brand-protection.d.ts +8 -2
  68. package/lib/services/brand-protection.d.ts.map +1 -1
  69. package/lib/services/brand-protection.js +9 -2
  70. package/lib/services/brand-protection.js.map +1 -1
  71. package/lib/services/browser-rendering.d.ts.map +1 -1
  72. package/lib/services/browser-rendering.js +15 -14
  73. package/lib/services/browser-rendering.js.map +1 -1
  74. package/lib/services/cache.d.ts.map +1 -1
  75. package/lib/services/cache.js +49 -25
  76. package/lib/services/cache.js.map +1 -1
  77. package/lib/services/calls.d.ts +35 -14
  78. package/lib/services/calls.d.ts.map +1 -1
  79. package/lib/services/calls.js +35 -22
  80. package/lib/services/calls.js.map +1 -1
  81. package/lib/services/certificate-authorities.d.ts.map +1 -1
  82. package/lib/services/certificate-authorities.js +2 -2
  83. package/lib/services/certificate-authorities.js.map +1 -1
  84. package/lib/services/client-certificates.d.ts +57 -23
  85. package/lib/services/client-certificates.d.ts.map +1 -1
  86. package/lib/services/client-certificates.js +91 -62
  87. package/lib/services/client-certificates.js.map +1 -1
  88. package/lib/services/cloud-connector.d.ts +51 -22
  89. package/lib/services/cloud-connector.d.ts.map +1 -1
  90. package/lib/services/cloud-connector.js +57 -44
  91. package/lib/services/cloud-connector.js.map +1 -1
  92. package/lib/services/cloudforce-one.d.ts +119 -50
  93. package/lib/services/cloudforce-one.d.ts.map +1 -1
  94. package/lib/services/cloudforce-one.js +181 -124
  95. package/lib/services/cloudforce-one.js.map +1 -1
  96. package/lib/services/connectivity.d.ts +74 -31
  97. package/lib/services/connectivity.d.ts.map +1 -1
  98. package/lib/services/connectivity.js +84 -57
  99. package/lib/services/connectivity.js.map +1 -1
  100. package/lib/services/content-scanning.d.ts +40 -15
  101. package/lib/services/content-scanning.d.ts.map +1 -1
  102. package/lib/services/content-scanning.js +40 -21
  103. package/lib/services/content-scanning.js.map +1 -1
  104. package/lib/services/custom-certificates.d.ts +48 -19
  105. package/lib/services/custom-certificates.d.ts.map +1 -1
  106. package/lib/services/custom-certificates.js +80 -53
  107. package/lib/services/custom-certificates.js.map +1 -1
  108. package/lib/services/custom-hostnames.d.ts +116 -51
  109. package/lib/services/custom-hostnames.d.ts.map +1 -1
  110. package/lib/services/custom-hostnames.js +210 -170
  111. package/lib/services/custom-hostnames.js.map +1 -1
  112. package/lib/services/custom-nameservers.d.ts +32 -12
  113. package/lib/services/custom-nameservers.d.ts.map +1 -1
  114. package/lib/services/custom-nameservers.js +36 -21
  115. package/lib/services/custom-nameservers.js.map +1 -1
  116. package/lib/services/custom-pages.d.ts +26 -11
  117. package/lib/services/custom-pages.d.ts.map +1 -1
  118. package/lib/services/custom-pages.js +39 -24
  119. package/lib/services/custom-pages.js.map +1 -1
  120. package/lib/services/d1.d.ts +114 -48
  121. package/lib/services/d1.d.ts.map +1 -1
  122. package/lib/services/d1.js +150 -111
  123. package/lib/services/d1.js.map +1 -1
  124. package/lib/services/dcv-delegation.d.ts.map +1 -1
  125. package/lib/services/dcv-delegation.js +1 -1
  126. package/lib/services/dcv-delegation.js.map +1 -1
  127. package/lib/services/diagnostics.d.ts +59 -26
  128. package/lib/services/diagnostics.d.ts.map +1 -1
  129. package/lib/services/diagnostics.js +97 -82
  130. package/lib/services/diagnostics.js.map +1 -1
  131. package/lib/services/dns-firewall.d.ts +48 -19
  132. package/lib/services/dns-firewall.d.ts.map +1 -1
  133. package/lib/services/dns-firewall.js +75 -48
  134. package/lib/services/dns-firewall.js.map +1 -1
  135. package/lib/services/dns.d.ts +206 -87
  136. package/lib/services/dns.d.ts.map +1 -1
  137. package/lib/services/dns.js +335 -219
  138. package/lib/services/dns.js.map +1 -1
  139. package/lib/services/durable-objects.d.ts +44 -13
  140. package/lib/services/durable-objects.d.ts.map +1 -1
  141. package/lib/services/durable-objects.js +56 -19
  142. package/lib/services/durable-objects.js.map +1 -1
  143. package/lib/services/email-routing.d.ts +90 -34
  144. package/lib/services/email-routing.d.ts.map +1 -1
  145. package/lib/services/email-routing.js +133 -80
  146. package/lib/services/email-routing.js.map +1 -1
  147. package/lib/services/email-security.d.ts +439 -181
  148. package/lib/services/email-security.d.ts.map +1 -1
  149. package/lib/services/email-security.js +753 -557
  150. package/lib/services/email-security.js.map +1 -1
  151. package/lib/services/filters.d.ts +64 -24
  152. package/lib/services/filters.d.ts.map +1 -1
  153. package/lib/services/filters.js +61 -28
  154. package/lib/services/filters.js.map +1 -1
  155. package/lib/services/firewall.d.ts +455 -183
  156. package/lib/services/firewall.d.ts.map +1 -1
  157. package/lib/services/firewall.js +777 -574
  158. package/lib/services/firewall.js.map +1 -1
  159. package/lib/services/healthchecks.d.ts +76 -33
  160. package/lib/services/healthchecks.d.ts.map +1 -1
  161. package/lib/services/healthchecks.js +129 -100
  162. package/lib/services/healthchecks.js.map +1 -1
  163. package/lib/services/hostnames.d.ts +20 -8
  164. package/lib/services/hostnames.d.ts.map +1 -1
  165. package/lib/services/hostnames.js +32 -21
  166. package/lib/services/hostnames.js.map +1 -1
  167. package/lib/services/hyperdrive.d.ts.map +1 -1
  168. package/lib/services/hyperdrive.js +10 -9
  169. package/lib/services/hyperdrive.js.map +1 -1
  170. package/lib/services/iam.d.ts +162 -59
  171. package/lib/services/iam.d.ts.map +1 -1
  172. package/lib/services/iam.js +219 -119
  173. package/lib/services/iam.js.map +1 -1
  174. package/lib/services/images.d.ts +36 -12
  175. package/lib/services/images.d.ts.map +1 -1
  176. package/lib/services/images.js +59 -32
  177. package/lib/services/images.js.map +1 -1
  178. package/lib/services/intel.d.ts +159 -62
  179. package/lib/services/intel.d.ts.map +1 -1
  180. package/lib/services/intel.js +238 -151
  181. package/lib/services/intel.js.map +1 -1
  182. package/lib/services/ips.d.ts.map +1 -1
  183. package/lib/services/ips.js +1 -1
  184. package/lib/services/ips.js.map +1 -1
  185. package/lib/services/keyless-certificates.d.ts +36 -16
  186. package/lib/services/keyless-certificates.d.ts.map +1 -1
  187. package/lib/services/keyless-certificates.js +50 -37
  188. package/lib/services/keyless-certificates.js.map +1 -1
  189. package/lib/services/kv.d.ts +42 -12
  190. package/lib/services/kv.d.ts.map +1 -1
  191. package/lib/services/kv.js +87 -36
  192. package/lib/services/kv.js.map +1 -1
  193. package/lib/services/leaked-credential-checks.d.ts +16 -6
  194. package/lib/services/leaked-credential-checks.d.ts.map +1 -1
  195. package/lib/services/leaked-credential-checks.js +20 -12
  196. package/lib/services/leaked-credential-checks.js.map +1 -1
  197. package/lib/services/load-balancers.d.ts +373 -167
  198. package/lib/services/load-balancers.d.ts.map +1 -1
  199. package/lib/services/load-balancers.js +603 -490
  200. package/lib/services/load-balancers.js.map +1 -1
  201. package/lib/services/logpush.d.ts.map +1 -1
  202. package/lib/services/logpush.js +23 -15
  203. package/lib/services/logpush.js.map +1 -1
  204. package/lib/services/logs.d.ts.map +1 -1
  205. package/lib/services/logs.js +11 -7
  206. package/lib/services/logs.js.map +1 -1
  207. package/lib/services/magic-cloud-networking.d.ts +542 -249
  208. package/lib/services/magic-cloud-networking.d.ts.map +1 -1
  209. package/lib/services/magic-cloud-networking.js +890 -804
  210. package/lib/services/magic-cloud-networking.js.map +1 -1
  211. package/lib/services/magic-network-monitoring.d.ts.map +1 -1
  212. package/lib/services/magic-network-monitoring.js +44 -22
  213. package/lib/services/magic-network-monitoring.js.map +1 -1
  214. package/lib/services/magic-transit.d.ts +432 -196
  215. package/lib/services/magic-transit.d.ts.map +1 -1
  216. package/lib/services/magic-transit.js +730 -566
  217. package/lib/services/magic-transit.js.map +1 -1
  218. package/lib/services/managed-transforms.d.ts.map +1 -1
  219. package/lib/services/managed-transforms.js +8 -4
  220. package/lib/services/managed-transforms.js.map +1 -1
  221. package/lib/services/memberships.d.ts +54 -22
  222. package/lib/services/memberships.d.ts.map +1 -1
  223. package/lib/services/memberships.js +79 -53
  224. package/lib/services/memberships.js.map +1 -1
  225. package/lib/services/mtls-certificates.d.ts +41 -17
  226. package/lib/services/mtls-certificates.d.ts.map +1 -1
  227. package/lib/services/mtls-certificates.js +52 -33
  228. package/lib/services/mtls-certificates.js.map +1 -1
  229. package/lib/services/organizations.d.ts +56 -25
  230. package/lib/services/organizations.d.ts.map +1 -1
  231. package/lib/services/organizations.js +74 -59
  232. package/lib/services/organizations.js.map +1 -1
  233. package/lib/services/origin-ca-certificates.d.ts +30 -10
  234. package/lib/services/origin-ca-certificates.d.ts.map +1 -1
  235. package/lib/services/origin-ca-certificates.js +62 -35
  236. package/lib/services/origin-ca-certificates.js.map +1 -1
  237. package/lib/services/origin-post-quantum-encryption.d.ts.map +1 -1
  238. package/lib/services/origin-post-quantum-encryption.js +8 -4
  239. package/lib/services/origin-post-quantum-encryption.js.map +1 -1
  240. package/lib/services/origin-tls-client-auth.d.ts +60 -25
  241. package/lib/services/origin-tls-client-auth.d.ts.map +1 -1
  242. package/lib/services/origin-tls-client-auth.js +94 -60
  243. package/lib/services/origin-tls-client-auth.js.map +1 -1
  244. package/lib/services/page-rules.d.ts.map +1 -1
  245. package/lib/services/page-rules.js +18 -10
  246. package/lib/services/page-rules.js.map +1 -1
  247. package/lib/services/page-shield.d.ts +145 -66
  248. package/lib/services/page-shield.d.ts.map +1 -1
  249. package/lib/services/page-shield.js +166 -130
  250. package/lib/services/page-shield.js.map +1 -1
  251. package/lib/services/pages.d.ts +520 -225
  252. package/lib/services/pages.d.ts.map +1 -1
  253. package/lib/services/pages.js +643 -567
  254. package/lib/services/pages.js.map +1 -1
  255. package/lib/services/pipelines.d.ts +461 -206
  256. package/lib/services/pipelines.d.ts.map +1 -1
  257. package/lib/services/pipelines.js +859 -780
  258. package/lib/services/pipelines.js.map +1 -1
  259. package/lib/services/queues.d.ts +177 -80
  260. package/lib/services/queues.d.ts.map +1 -1
  261. package/lib/services/queues.js +233 -177
  262. package/lib/services/queues.js.map +1 -1
  263. package/lib/services/r2-data-catalog.d.ts.map +1 -1
  264. package/lib/services/r2-data-catalog.js +30 -16
  265. package/lib/services/r2-data-catalog.js.map +1 -1
  266. package/lib/services/r2.d.ts +85 -39
  267. package/lib/services/r2.d.ts.map +1 -1
  268. package/lib/services/r2.js +146 -126
  269. package/lib/services/r2.js.map +1 -1
  270. package/lib/services/radar.d.ts +152 -63
  271. package/lib/services/radar.d.ts.map +1 -1
  272. package/lib/services/radar.js +421 -360
  273. package/lib/services/radar.js.map +1 -1
  274. package/lib/services/rate-limits.d.ts +76 -31
  275. package/lib/services/rate-limits.d.ts.map +1 -1
  276. package/lib/services/rate-limits.js +106 -82
  277. package/lib/services/rate-limits.js.map +1 -1
  278. package/lib/services/realtime-kit.d.ts.map +1 -1
  279. package/lib/services/realtime-kit.js +34 -33
  280. package/lib/services/realtime-kit.js.map +1 -1
  281. package/lib/services/registrar.d.ts +75 -35
  282. package/lib/services/registrar.d.ts.map +1 -1
  283. package/lib/services/registrar.js +116 -103
  284. package/lib/services/registrar.js.map +1 -1
  285. package/lib/services/request-tracers.d.ts.map +1 -1
  286. package/lib/services/request-tracers.js +5 -2
  287. package/lib/services/request-tracers.js.map +1 -1
  288. package/lib/services/resource-sharing.d.ts +132 -50
  289. package/lib/services/resource-sharing.d.ts.map +1 -1
  290. package/lib/services/resource-sharing.js +232 -149
  291. package/lib/services/resource-sharing.js.map +1 -1
  292. package/lib/services/rules.d.ts +86 -37
  293. package/lib/services/rules.d.ts.map +1 -1
  294. package/lib/services/rules.js +122 -87
  295. package/lib/services/rules.js.map +1 -1
  296. package/lib/services/rulesets.d.ts +75 -30
  297. package/lib/services/rulesets.d.ts.map +1 -1
  298. package/lib/services/rulesets.js +274 -222
  299. package/lib/services/rulesets.js.map +1 -1
  300. package/lib/services/rum.d.ts +40 -15
  301. package/lib/services/rum.d.ts.map +1 -1
  302. package/lib/services/rum.js +78 -45
  303. package/lib/services/rum.js.map +1 -1
  304. package/lib/services/schema-validation.d.ts +47 -14
  305. package/lib/services/schema-validation.d.ts.map +1 -1
  306. package/lib/services/schema-validation.js +102 -43
  307. package/lib/services/schema-validation.js.map +1 -1
  308. package/lib/services/secrets-store.d.ts +116 -44
  309. package/lib/services/secrets-store.d.ts.map +1 -1
  310. package/lib/services/secrets-store.js +145 -78
  311. package/lib/services/secrets-store.js.map +1 -1
  312. package/lib/services/security-center.d.ts +56 -22
  313. package/lib/services/security-center.d.ts.map +1 -1
  314. package/lib/services/security-center.js +90 -64
  315. package/lib/services/security-center.js.map +1 -1
  316. package/lib/services/security-txt.d.ts.map +1 -1
  317. package/lib/services/security-txt.js +1 -1
  318. package/lib/services/security-txt.js.map +1 -1
  319. package/lib/services/snippets.d.ts +85 -33
  320. package/lib/services/snippets.d.ts.map +1 -1
  321. package/lib/services/snippets.js +106 -63
  322. package/lib/services/snippets.js.map +1 -1
  323. package/lib/services/spectrum.d.ts +58 -24
  324. package/lib/services/spectrum.d.ts.map +1 -1
  325. package/lib/services/spectrum.js +90 -65
  326. package/lib/services/spectrum.js.map +1 -1
  327. package/lib/services/speed.d.ts +47 -17
  328. package/lib/services/speed.d.ts.map +1 -1
  329. package/lib/services/speed.js +51 -24
  330. package/lib/services/speed.js.map +1 -1
  331. package/lib/services/ssl.d.ts +77 -35
  332. package/lib/services/ssl.d.ts.map +1 -1
  333. package/lib/services/ssl.js +146 -123
  334. package/lib/services/ssl.js.map +1 -1
  335. package/lib/services/stream.d.ts +173 -77
  336. package/lib/services/stream.d.ts.map +1 -1
  337. package/lib/services/stream.js +167 -131
  338. package/lib/services/stream.js.map +1 -1
  339. package/lib/services/token-validation.d.ts +203 -88
  340. package/lib/services/token-validation.d.ts.map +1 -1
  341. package/lib/services/token-validation.js +238 -172
  342. package/lib/services/token-validation.js.map +1 -1
  343. package/lib/services/turnstile.d.ts +38 -14
  344. package/lib/services/turnstile.d.ts.map +1 -1
  345. package/lib/services/turnstile.js +72 -41
  346. package/lib/services/turnstile.js.map +1 -1
  347. package/lib/services/url-normalization.d.ts.map +1 -1
  348. package/lib/services/url-normalization.js +2 -2
  349. package/lib/services/url-normalization.js.map +1 -1
  350. package/lib/services/user.d.ts +106 -40
  351. package/lib/services/user.d.ts.map +1 -1
  352. package/lib/services/user.js +156 -89
  353. package/lib/services/user.js.map +1 -1
  354. package/lib/services/vectorize.d.ts +26 -11
  355. package/lib/services/vectorize.d.ts.map +1 -1
  356. package/lib/services/vectorize.js +46 -35
  357. package/lib/services/vectorize.js.map +1 -1
  358. package/lib/services/waiting-rooms.d.ts +244 -104
  359. package/lib/services/waiting-rooms.d.ts.map +1 -1
  360. package/lib/services/waiting-rooms.js +398 -296
  361. package/lib/services/waiting-rooms.js.map +1 -1
  362. package/lib/services/web3.d.ts +26 -11
  363. package/lib/services/web3.d.ts.map +1 -1
  364. package/lib/services/web3.js +62 -43
  365. package/lib/services/web3.js.map +1 -1
  366. package/lib/services/workers-for-platforms.d.ts +323 -153
  367. package/lib/services/workers-for-platforms.d.ts.map +1 -1
  368. package/lib/services/workers-for-platforms.js +331 -288
  369. package/lib/services/workers-for-platforms.js.map +1 -1
  370. package/lib/services/workers.d.ts +601 -272
  371. package/lib/services/workers.d.ts.map +1 -1
  372. package/lib/services/workers.js +771 -633
  373. package/lib/services/workers.js.map +1 -1
  374. package/lib/services/workflows.d.ts +130 -47
  375. package/lib/services/workflows.d.ts.map +1 -1
  376. package/lib/services/workflows.js +190 -107
  377. package/lib/services/workflows.js.map +1 -1
  378. package/lib/services/zaraz.d.ts +20 -8
  379. package/lib/services/zaraz.d.ts.map +1 -1
  380. package/lib/services/zaraz.js +20 -13
  381. package/lib/services/zaraz.js.map +1 -1
  382. package/lib/services/zero-trust.d.ts +5436 -2650
  383. package/lib/services/zero-trust.d.ts.map +1 -1
  384. package/lib/services/zero-trust.js +9008 -7934
  385. package/lib/services/zero-trust.js.map +1 -1
  386. package/lib/services/zones.d.ts +188 -84
  387. package/lib/services/zones.d.ts.map +1 -1
  388. package/lib/services/zones.js +257 -196
  389. package/lib/services/zones.js.map +1 -1
  390. package/package.json +3 -2
  391. package/src/auth.ts +4 -3
  392. package/src/client/api.ts +105 -13
  393. package/src/credentials.ts +253 -12
  394. package/src/errors.ts +17 -1
  395. package/src/sensitive.ts +4 -0
  396. package/src/services/abuse-reports.ts +416 -208
  397. package/src/services/accounts.ts +511 -306
  398. package/src/services/acm.ts +22 -14
  399. package/src/services/addressing.ts +865 -550
  400. package/src/services/ai-gateway.ts +1148 -710
  401. package/src/services/ai.ts +265 -91
  402. package/src/services/aisearch.ts +1460 -995
  403. package/src/services/alerting.ts +1027 -671
  404. package/src/services/api-gateway.ts +1628 -1129
  405. package/src/services/argo.ts +48 -32
  406. package/src/services/billing.ts +47 -43
  407. package/src/services/bot-management.ts +6 -2
  408. package/src/services/botnet-feed.ts +28 -16
  409. package/src/services/brand-protection.ts +28 -6
  410. package/src/services/browser-rendering.ts +23 -10
  411. package/src/services/cache.ts +147 -97
  412. package/src/services/calls.ts +107 -42
  413. package/src/services/certificate-authorities.ts +6 -2
  414. package/src/services/client-certificates.ts +270 -173
  415. package/src/services/cloud-connector.ts +149 -82
  416. package/src/services/cloudforce-one.ts +515 -287
  417. package/src/services/connectivity.ts +184 -107
  418. package/src/services/content-scanning.ts +115 -42
  419. package/src/services/custom-certificates.ts +200 -121
  420. package/src/services/custom-hostnames.ts +583 -395
  421. package/src/services/custom-nameservers.ts +98 -45
  422. package/src/services/custom-pages.ts +109 -62
  423. package/src/services/d1.ts +409 -235
  424. package/src/services/dcv-delegation.ts +3 -1
  425. package/src/services/diagnostics.ts +267 -193
  426. package/src/services/dns-firewall.ts +197 -116
  427. package/src/services/dns.ts +916 -536
  428. package/src/services/durable-objects.ts +126 -37
  429. package/src/services/email-routing.ts +375 -181
  430. package/src/services/email-security.ts +1881 -1112
  431. package/src/services/filters.ts +176 -58
  432. package/src/services/firewall.ts +1843 -1011
  433. package/src/services/healthchecks.ts +374 -258
  434. package/src/services/hostnames.ts +83 -47
  435. package/src/services/hyperdrive.ts +12 -9
  436. package/src/services/iam.ts +560 -259
  437. package/src/services/images.ts +148 -54
  438. package/src/services/intel.ts +677 -373
  439. package/src/services/ips.ts +1 -1
  440. package/src/services/keyless-certificates.ts +139 -92
  441. package/src/services/kv.ts +204 -86
  442. package/src/services/leaked-credential-checks.ts +58 -19
  443. package/src/services/load-balancers.ts +1755 -1200
  444. package/src/services/logpush.ts +100 -72
  445. package/src/services/logs.ts +29 -15
  446. package/src/services/magic-cloud-networking.ts +2453 -1726
  447. package/src/services/magic-network-monitoring.ts +163 -119
  448. package/src/services/magic-transit.ts +2153 -1530
  449. package/src/services/managed-transforms.ts +20 -12
  450. package/src/services/memberships.ts +196 -113
  451. package/src/services/mtls-certificates.ts +158 -88
  452. package/src/services/organizations.ts +185 -121
  453. package/src/services/origin-ca-certificates.ts +130 -64
  454. package/src/services/origin-post-quantum-encryption.ts +24 -16
  455. package/src/services/origin-tls-client-auth.ts +282 -158
  456. package/src/services/page-rules.ts +64 -44
  457. package/src/services/page-shield.ts +492 -316
  458. package/src/services/pages.ts +1612 -1154
  459. package/src/services/pipelines.ts +1735 -1280
  460. package/src/services/queues.ts +617 -419
  461. package/src/services/r2-data-catalog.ts +82 -50
  462. package/src/services/r2.ts +420 -239
  463. package/src/services/radar.ts +1107 -423
  464. package/src/services/rate-limits.ts +254 -152
  465. package/src/services/realtime-kit.ts +34 -33
  466. package/src/services/registrar.ts +262 -167
  467. package/src/services/request-tracers.ts +7 -4
  468. package/src/services/resource-sharing.ts +628 -378
  469. package/src/services/rules.ts +292 -176
  470. package/src/services/rulesets.ts +643 -426
  471. package/src/services/rum.ts +204 -111
  472. package/src/services/schema-validation.ts +240 -104
  473. package/src/services/secrets-store.ts +356 -166
  474. package/src/services/security-center.ts +196 -98
  475. package/src/services/security-txt.ts +2 -0
  476. package/src/services/snippets.ts +259 -117
  477. package/src/services/spectrum.ts +215 -128
  478. package/src/services/speed.ts +144 -46
  479. package/src/services/ssl.ts +420 -293
  480. package/src/services/stream.ts +496 -244
  481. package/src/services/token-validation.ts +583 -343
  482. package/src/services/turnstile.ts +206 -124
  483. package/src/services/url-normalization.ts +6 -2
  484. package/src/services/user.ts +480 -277
  485. package/src/services/vectorize.ts +123 -64
  486. package/src/services/waiting-rooms.ts +1156 -747
  487. package/src/services/web3.ts +178 -113
  488. package/src/services/workers-for-platforms.ts +814 -539
  489. package/src/services/workers.ts +1888 -1227
  490. package/src/services/workflows.ts +453 -205
  491. package/src/services/zaraz.ts +61 -25
  492. package/src/services/zero-trust.ts +17859 -12103
  493. package/src/services/zones.ts +690 -459
@@ -5,6 +5,7 @@
5
5
  * DO NOT EDIT - regenerate with: bun scripts/generate.ts --service firewall
6
6
  */
7
7
 
8
+ import * as stream from "effect/Stream";
8
9
  import * as Schema from "effect/Schema";
9
10
  import type * as HttpClient from "effect/unstable/http/HttpClient";
10
11
  import * as API from "../client/api.ts";
@@ -136,18 +137,22 @@ export const GetAccessRuleResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
136
137
  Schema.Null,
137
138
  ]),
138
139
  ),
139
- }).pipe(
140
- Schema.encodeKeys({
141
- id: "id",
142
- allowedModes: "allowed_modes",
143
- configuration: "configuration",
144
- mode: "mode",
145
- createdOn: "created_on",
146
- modifiedOn: "modified_on",
147
- notes: "notes",
148
- scope: "scope",
149
- }),
150
- ) as unknown as Schema.Schema<GetAccessRuleResponse>;
140
+ })
141
+ .pipe(
142
+ Schema.encodeKeys({
143
+ id: "id",
144
+ allowedModes: "allowed_modes",
145
+ configuration: "configuration",
146
+ mode: "mode",
147
+ createdOn: "created_on",
148
+ modifiedOn: "modified_on",
149
+ notes: "notes",
150
+ scope: "scope",
151
+ }),
152
+ )
153
+ .pipe(
154
+ T.ResponsePath("result"),
155
+ ) as unknown as Schema.Schema<GetAccessRuleResponse>;
151
156
 
152
157
  export type GetAccessRuleError = DefaultErrors;
153
158
 
@@ -173,131 +178,208 @@ export const ListAccessRulesRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct(
173
178
  }),
174
179
  ) as unknown as Schema.Schema<ListAccessRulesRequest>;
175
180
 
176
- export type ListAccessRulesResponse = {
177
- id: string;
178
- allowedModes: (
179
- | "block"
180
- | "challenge"
181
- | "whitelist"
182
- | "js_challenge"
183
- | "managed_challenge"
184
- )[];
185
- configuration:
186
- | { target?: "ip" | null; value?: string | null }
187
- | { target?: "ip6" | null; value?: string | null }
188
- | { target?: "ip_range" | null; value?: string | null }
189
- | { target?: "asn" | null; value?: string | null }
190
- | { target?: "country" | null; value?: string | null };
191
- mode:
192
- | "block"
193
- | "challenge"
194
- | "whitelist"
195
- | "js_challenge"
196
- | "managed_challenge";
197
- createdOn?: string | null;
198
- modifiedOn?: string | null;
199
- notes?: string | null;
200
- scope?: {
201
- id?: string | null;
202
- email?: string | null;
203
- type?: "user" | "organization" | null;
204
- } | null;
205
- }[];
181
+ export interface ListAccessRulesResponse {
182
+ result: {
183
+ id: string;
184
+ allowedModes: (
185
+ | "block"
186
+ | "challenge"
187
+ | "whitelist"
188
+ | "js_challenge"
189
+ | "managed_challenge"
190
+ )[];
191
+ configuration:
192
+ | { target?: "ip" | null; value?: string | null }
193
+ | { target?: "ip6" | null; value?: string | null }
194
+ | { target?: "ip_range" | null; value?: string | null }
195
+ | { target?: "asn" | null; value?: string | null }
196
+ | { target?: "country" | null; value?: string | null };
197
+ mode:
198
+ | "block"
199
+ | "challenge"
200
+ | "whitelist"
201
+ | "js_challenge"
202
+ | "managed_challenge";
203
+ createdOn?: string | null;
204
+ modifiedOn?: string | null;
205
+ notes?: string | null;
206
+ scope?: {
207
+ id?: string | null;
208
+ email?: string | null;
209
+ type?: "user" | "organization" | null;
210
+ } | null;
211
+ }[];
212
+ resultInfo: {
213
+ count?: number | null;
214
+ page?: number | null;
215
+ perPage?: number | null;
216
+ totalCount?: number | null;
217
+ };
218
+ }
206
219
 
207
- export const ListAccessRulesResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Array(
208
- Schema.Struct({
209
- id: Schema.String,
210
- allowedModes: Schema.Array(
211
- Schema.Literals([
212
- "block",
213
- "challenge",
214
- "whitelist",
215
- "js_challenge",
216
- "managed_challenge",
217
- ]),
218
- ),
219
- configuration: Schema.Union([
220
- Schema.Struct({
221
- target: Schema.optional(
222
- Schema.Union([Schema.Literal("ip"), Schema.Null]),
223
- ),
224
- value: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
225
- }),
226
- Schema.Struct({
227
- target: Schema.optional(
228
- Schema.Union([Schema.Literal("ip6"), Schema.Null]),
229
- ),
230
- value: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
231
- }),
232
- Schema.Struct({
233
- target: Schema.optional(
234
- Schema.Union([Schema.Literal("ip_range"), Schema.Null]),
235
- ),
236
- value: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
237
- }),
220
+ export const ListAccessRulesResponse =
221
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
222
+ result: Schema.Array(
238
223
  Schema.Struct({
239
- target: Schema.optional(
240
- Schema.Union([Schema.Literal("asn"), Schema.Null]),
224
+ id: Schema.String,
225
+ allowedModes: Schema.Array(
226
+ Schema.Literals([
227
+ "block",
228
+ "challenge",
229
+ "whitelist",
230
+ "js_challenge",
231
+ "managed_challenge",
232
+ ]),
241
233
  ),
242
- value: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
243
- }),
244
- Schema.Struct({
245
- target: Schema.optional(
246
- Schema.Union([Schema.Literal("country"), Schema.Null]),
234
+ configuration: Schema.Union([
235
+ Schema.Struct({
236
+ target: Schema.optional(
237
+ Schema.Union([Schema.Literal("ip"), Schema.Null]),
238
+ ),
239
+ value: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
240
+ }),
241
+ Schema.Struct({
242
+ target: Schema.optional(
243
+ Schema.Union([Schema.Literal("ip6"), Schema.Null]),
244
+ ),
245
+ value: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
246
+ }),
247
+ Schema.Struct({
248
+ target: Schema.optional(
249
+ Schema.Union([Schema.Literal("ip_range"), Schema.Null]),
250
+ ),
251
+ value: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
252
+ }),
253
+ Schema.Struct({
254
+ target: Schema.optional(
255
+ Schema.Union([Schema.Literal("asn"), Schema.Null]),
256
+ ),
257
+ value: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
258
+ }),
259
+ Schema.Struct({
260
+ target: Schema.optional(
261
+ Schema.Union([Schema.Literal("country"), Schema.Null]),
262
+ ),
263
+ value: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
264
+ }),
265
+ ]),
266
+ mode: Schema.Literals([
267
+ "block",
268
+ "challenge",
269
+ "whitelist",
270
+ "js_challenge",
271
+ "managed_challenge",
272
+ ]),
273
+ createdOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
274
+ modifiedOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
275
+ notes: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
276
+ scope: Schema.optional(
277
+ Schema.Union([
278
+ Schema.Struct({
279
+ id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
280
+ email: Schema.optional(
281
+ Schema.Union([Schema.String, Schema.Null]),
282
+ ),
283
+ type: Schema.optional(
284
+ Schema.Union([
285
+ Schema.Literals(["user", "organization"]),
286
+ Schema.Null,
287
+ ]),
288
+ ),
289
+ }),
290
+ Schema.Null,
291
+ ]),
247
292
  ),
248
- value: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
249
- }),
250
- ]),
251
- mode: Schema.Literals([
252
- "block",
253
- "challenge",
254
- "whitelist",
255
- "js_challenge",
256
- "managed_challenge",
257
- ]),
258
- createdOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
259
- modifiedOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
260
- notes: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
261
- scope: Schema.optional(
262
- Schema.Union([
263
- Schema.Struct({
264
- id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
265
- email: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
266
- type: Schema.optional(
267
- Schema.Union([
268
- Schema.Literals(["user", "organization"]),
269
- Schema.Null,
270
- ]),
271
- ),
293
+ }).pipe(
294
+ Schema.encodeKeys({
295
+ id: "id",
296
+ allowedModes: "allowed_modes",
297
+ configuration: "configuration",
298
+ mode: "mode",
299
+ createdOn: "created_on",
300
+ modifiedOn: "modified_on",
301
+ notes: "notes",
302
+ scope: "scope",
272
303
  }),
273
- Schema.Null,
274
- ]),
304
+ ),
305
+ ),
306
+ resultInfo: Schema.Struct({
307
+ count: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
308
+ page: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
309
+ perPage: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
310
+ totalCount: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
311
+ }).pipe(
312
+ Schema.encodeKeys({
313
+ count: "count",
314
+ page: "page",
315
+ perPage: "per_page",
316
+ totalCount: "total_count",
317
+ }),
275
318
  ),
276
319
  }).pipe(
277
- Schema.encodeKeys({
278
- id: "id",
279
- allowedModes: "allowed_modes",
280
- configuration: "configuration",
281
- mode: "mode",
282
- createdOn: "created_on",
283
- modifiedOn: "modified_on",
284
- notes: "notes",
285
- scope: "scope",
286
- }),
287
- ),
288
- ) as unknown as Schema.Schema<ListAccessRulesResponse>;
320
+ Schema.encodeKeys({ result: "result", resultInfo: "result_info" }),
321
+ ) as unknown as Schema.Schema<ListAccessRulesResponse>;
289
322
 
290
323
  export type ListAccessRulesError = DefaultErrors;
291
324
 
292
- export const listAccessRules: API.OperationMethod<
325
+ export const listAccessRules: API.PaginatedOperationMethod<
293
326
  ListAccessRulesRequest,
294
327
  ListAccessRulesResponse,
295
328
  ListAccessRulesError,
296
329
  Credentials | HttpClient.HttpClient
297
- > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
330
+ > & {
331
+ pages: (
332
+ input: ListAccessRulesRequest,
333
+ ) => stream.Stream<
334
+ ListAccessRulesResponse,
335
+ ListAccessRulesError,
336
+ Credentials | HttpClient.HttpClient
337
+ >;
338
+ items: (input: ListAccessRulesRequest) => stream.Stream<
339
+ {
340
+ id: string;
341
+ allowedModes: (
342
+ | "block"
343
+ | "challenge"
344
+ | "whitelist"
345
+ | "js_challenge"
346
+ | "managed_challenge"
347
+ )[];
348
+ configuration:
349
+ | { target?: "ip" | null; value?: string | null }
350
+ | { target?: "ip6" | null; value?: string | null }
351
+ | { target?: "ip_range" | null; value?: string | null }
352
+ | { target?: "asn" | null; value?: string | null }
353
+ | { target?: "country" | null; value?: string | null };
354
+ mode:
355
+ | "block"
356
+ | "challenge"
357
+ | "whitelist"
358
+ | "js_challenge"
359
+ | "managed_challenge";
360
+ createdOn?: string | null;
361
+ modifiedOn?: string | null;
362
+ notes?: string | null;
363
+ scope?: {
364
+ id?: string | null;
365
+ email?: string | null;
366
+ type?: "user" | "organization" | null;
367
+ } | null;
368
+ },
369
+ ListAccessRulesError,
370
+ Credentials | HttpClient.HttpClient
371
+ >;
372
+ } = /*@__PURE__*/ /*#__PURE__*/ API.makePaginated(() => ({
298
373
  input: ListAccessRulesRequest,
299
374
  output: ListAccessRulesResponse,
300
375
  errors: [],
376
+ pagination: {
377
+ mode: "page",
378
+ inputToken: "page",
379
+ outputToken: "resultInfo.page",
380
+ items: "result",
381
+ pageSize: "perPage",
382
+ } as const,
301
383
  }));
302
384
 
303
385
  export interface CreateAccessRuleRequest {
@@ -472,18 +554,22 @@ export const CreateAccessRuleResponse =
472
554
  Schema.Null,
473
555
  ]),
474
556
  ),
475
- }).pipe(
476
- Schema.encodeKeys({
477
- id: "id",
478
- allowedModes: "allowed_modes",
479
- configuration: "configuration",
480
- mode: "mode",
481
- createdOn: "created_on",
482
- modifiedOn: "modified_on",
483
- notes: "notes",
484
- scope: "scope",
485
- }),
486
- ) as unknown as Schema.Schema<CreateAccessRuleResponse>;
557
+ })
558
+ .pipe(
559
+ Schema.encodeKeys({
560
+ id: "id",
561
+ allowedModes: "allowed_modes",
562
+ configuration: "configuration",
563
+ mode: "mode",
564
+ createdOn: "created_on",
565
+ modifiedOn: "modified_on",
566
+ notes: "notes",
567
+ scope: "scope",
568
+ }),
569
+ )
570
+ .pipe(
571
+ T.ResponsePath("result"),
572
+ ) as unknown as Schema.Schema<CreateAccessRuleResponse>;
487
573
 
488
574
  export type CreateAccessRuleError = DefaultErrors;
489
575
 
@@ -673,18 +759,22 @@ export const PatchAccessRuleResponse =
673
759
  Schema.Null,
674
760
  ]),
675
761
  ),
676
- }).pipe(
677
- Schema.encodeKeys({
678
- id: "id",
679
- allowedModes: "allowed_modes",
680
- configuration: "configuration",
681
- mode: "mode",
682
- createdOn: "created_on",
683
- modifiedOn: "modified_on",
684
- notes: "notes",
685
- scope: "scope",
686
- }),
687
- ) as unknown as Schema.Schema<PatchAccessRuleResponse>;
762
+ })
763
+ .pipe(
764
+ Schema.encodeKeys({
765
+ id: "id",
766
+ allowedModes: "allowed_modes",
767
+ configuration: "configuration",
768
+ mode: "mode",
769
+ createdOn: "created_on",
770
+ modifiedOn: "modified_on",
771
+ notes: "notes",
772
+ scope: "scope",
773
+ }),
774
+ )
775
+ .pipe(
776
+ T.ResponsePath("result"),
777
+ ) as unknown as Schema.Schema<PatchAccessRuleResponse>;
688
778
 
689
779
  export type PatchAccessRuleError = DefaultErrors;
690
780
 
@@ -721,7 +811,9 @@ export interface DeleteAccessRuleResponse {
721
811
  export const DeleteAccessRuleResponse =
722
812
  /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
723
813
  id: Schema.String,
724
- }) as unknown as Schema.Schema<DeleteAccessRuleResponse>;
814
+ }).pipe(
815
+ T.ResponsePath("result"),
816
+ ) as unknown as Schema.Schema<DeleteAccessRuleResponse>;
725
817
 
726
818
  export type DeleteAccessRuleError = DefaultErrors;
727
819
 
@@ -781,17 +873,21 @@ export const GetLockdownResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
781
873
  modifiedOn: Schema.String,
782
874
  paused: Schema.Boolean,
783
875
  urls: Schema.Array(Schema.String),
784
- }).pipe(
785
- Schema.encodeKeys({
786
- id: "id",
787
- configurations: "configurations",
788
- createdOn: "created_on",
789
- description: "description",
790
- modifiedOn: "modified_on",
791
- paused: "paused",
792
- urls: "urls",
793
- }),
794
- ) as unknown as Schema.Schema<GetLockdownResponse>;
876
+ })
877
+ .pipe(
878
+ Schema.encodeKeys({
879
+ id: "id",
880
+ configurations: "configurations",
881
+ createdOn: "created_on",
882
+ description: "description",
883
+ modifiedOn: "modified_on",
884
+ paused: "paused",
885
+ urls: "urls",
886
+ }),
887
+ )
888
+ .pipe(
889
+ T.ResponsePath("result"),
890
+ ) as unknown as Schema.Schema<GetLockdownResponse>;
795
891
 
796
892
  export type GetLockdownError = DefaultErrors;
797
893
 
@@ -848,49 +944,102 @@ export const ListLockdownsRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
848
944
  T.Http({ method: "GET", path: "/zones/{zone_id}/firewall/lockdowns" }),
849
945
  ) as unknown as Schema.Schema<ListLockdownsRequest>;
850
946
 
851
- export type ListLockdownsResponse = {
852
- id: string;
853
- configurations: unknown;
854
- createdOn: string;
855
- description: string;
856
- modifiedOn: string;
857
- paused: boolean;
858
- urls: string[];
859
- }[];
947
+ export interface ListLockdownsResponse {
948
+ result: {
949
+ id: string;
950
+ configurations: unknown;
951
+ createdOn: string;
952
+ description: string;
953
+ modifiedOn: string;
954
+ paused: boolean;
955
+ urls: string[];
956
+ }[];
957
+ resultInfo: {
958
+ count?: number | null;
959
+ page?: number | null;
960
+ perPage?: number | null;
961
+ totalCount?: number | null;
962
+ };
963
+ }
860
964
 
861
- export const ListLockdownsResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Array(
862
- Schema.Struct({
863
- id: Schema.String,
864
- configurations: Schema.Unknown,
865
- createdOn: Schema.String,
866
- description: Schema.String,
867
- modifiedOn: Schema.String,
868
- paused: Schema.Boolean,
869
- urls: Schema.Array(Schema.String),
965
+ export const ListLockdownsResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
966
+ result: Schema.Array(
967
+ Schema.Struct({
968
+ id: Schema.String,
969
+ configurations: Schema.Unknown,
970
+ createdOn: Schema.String,
971
+ description: Schema.String,
972
+ modifiedOn: Schema.String,
973
+ paused: Schema.Boolean,
974
+ urls: Schema.Array(Schema.String),
975
+ }).pipe(
976
+ Schema.encodeKeys({
977
+ id: "id",
978
+ configurations: "configurations",
979
+ createdOn: "created_on",
980
+ description: "description",
981
+ modifiedOn: "modified_on",
982
+ paused: "paused",
983
+ urls: "urls",
984
+ }),
985
+ ),
986
+ ),
987
+ resultInfo: Schema.Struct({
988
+ count: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
989
+ page: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
990
+ perPage: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
991
+ totalCount: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
870
992
  }).pipe(
871
993
  Schema.encodeKeys({
872
- id: "id",
873
- configurations: "configurations",
874
- createdOn: "created_on",
875
- description: "description",
876
- modifiedOn: "modified_on",
877
- paused: "paused",
878
- urls: "urls",
994
+ count: "count",
995
+ page: "page",
996
+ perPage: "per_page",
997
+ totalCount: "total_count",
879
998
  }),
880
999
  ),
1000
+ }).pipe(
1001
+ Schema.encodeKeys({ result: "result", resultInfo: "result_info" }),
881
1002
  ) as unknown as Schema.Schema<ListLockdownsResponse>;
882
1003
 
883
1004
  export type ListLockdownsError = DefaultErrors;
884
1005
 
885
- export const listLockdowns: API.OperationMethod<
1006
+ export const listLockdowns: API.PaginatedOperationMethod<
886
1007
  ListLockdownsRequest,
887
1008
  ListLockdownsResponse,
888
1009
  ListLockdownsError,
889
1010
  Credentials | HttpClient.HttpClient
890
- > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
1011
+ > & {
1012
+ pages: (
1013
+ input: ListLockdownsRequest,
1014
+ ) => stream.Stream<
1015
+ ListLockdownsResponse,
1016
+ ListLockdownsError,
1017
+ Credentials | HttpClient.HttpClient
1018
+ >;
1019
+ items: (input: ListLockdownsRequest) => stream.Stream<
1020
+ {
1021
+ id: string;
1022
+ configurations: unknown;
1023
+ createdOn: string;
1024
+ description: string;
1025
+ modifiedOn: string;
1026
+ paused: boolean;
1027
+ urls: string[];
1028
+ },
1029
+ ListLockdownsError,
1030
+ Credentials | HttpClient.HttpClient
1031
+ >;
1032
+ } = /*@__PURE__*/ /*#__PURE__*/ API.makePaginated(() => ({
891
1033
  input: ListLockdownsRequest,
892
1034
  output: ListLockdownsResponse,
893
1035
  errors: [],
1036
+ pagination: {
1037
+ mode: "page",
1038
+ inputToken: "page",
1039
+ outputToken: "resultInfo.page",
1040
+ items: "result",
1041
+ pageSize: "perPage",
1042
+ } as const,
894
1043
  }));
895
1044
 
896
1045
  export interface CreateLockdownRequest {
@@ -946,17 +1095,21 @@ export const CreateLockdownResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct(
946
1095
  paused: Schema.Boolean,
947
1096
  urls: Schema.Array(Schema.String),
948
1097
  },
949
- ).pipe(
950
- Schema.encodeKeys({
951
- id: "id",
952
- configurations: "configurations",
953
- createdOn: "created_on",
954
- description: "description",
955
- modifiedOn: "modified_on",
956
- paused: "paused",
957
- urls: "urls",
958
- }),
959
- ) as unknown as Schema.Schema<CreateLockdownResponse>;
1098
+ )
1099
+ .pipe(
1100
+ Schema.encodeKeys({
1101
+ id: "id",
1102
+ configurations: "configurations",
1103
+ createdOn: "created_on",
1104
+ description: "description",
1105
+ modifiedOn: "modified_on",
1106
+ paused: "paused",
1107
+ urls: "urls",
1108
+ }),
1109
+ )
1110
+ .pipe(
1111
+ T.ResponsePath("result"),
1112
+ ) as unknown as Schema.Schema<CreateLockdownResponse>;
960
1113
 
961
1114
  export type CreateLockdownError = DefaultErrors;
962
1115
 
@@ -1020,17 +1173,21 @@ export const UpdateLockdownResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct(
1020
1173
  paused: Schema.Boolean,
1021
1174
  urls: Schema.Array(Schema.String),
1022
1175
  },
1023
- ).pipe(
1024
- Schema.encodeKeys({
1025
- id: "id",
1026
- configurations: "configurations",
1027
- createdOn: "created_on",
1028
- description: "description",
1029
- modifiedOn: "modified_on",
1030
- paused: "paused",
1031
- urls: "urls",
1032
- }),
1033
- ) as unknown as Schema.Schema<UpdateLockdownResponse>;
1176
+ )
1177
+ .pipe(
1178
+ Schema.encodeKeys({
1179
+ id: "id",
1180
+ configurations: "configurations",
1181
+ createdOn: "created_on",
1182
+ description: "description",
1183
+ modifiedOn: "modified_on",
1184
+ paused: "paused",
1185
+ urls: "urls",
1186
+ }),
1187
+ )
1188
+ .pipe(
1189
+ T.ResponsePath("result"),
1190
+ ) as unknown as Schema.Schema<UpdateLockdownResponse>;
1034
1191
 
1035
1192
  export type UpdateLockdownError = DefaultErrors;
1036
1193
 
@@ -1070,6 +1227,8 @@ export const DeleteLockdownResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct(
1070
1227
  {
1071
1228
  id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1072
1229
  },
1230
+ ).pipe(
1231
+ T.ResponsePath("result"),
1073
1232
  ) as unknown as Schema.Schema<DeleteLockdownResponse>;
1074
1233
 
1075
1234
  export type DeleteLockdownError = DefaultErrors;
@@ -1103,98 +1262,146 @@ export const BulkPutRulesRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1103
1262
  T.Http({ method: "PUT", path: "/zones/{zone_id}/firewall/rules" }),
1104
1263
  ) as unknown as Schema.Schema<BulkPutRulesRequest>;
1105
1264
 
1106
- export type BulkPutRulesResponse = {
1107
- id?: string | null;
1108
- action?:
1109
- | "block"
1110
- | "challenge"
1111
- | "js_challenge"
1112
- | "managed_challenge"
1113
- | "allow"
1114
- | "log"
1115
- | "bypass"
1116
- | null;
1117
- description?: string | null;
1118
- filter?: unknown | { id: string; deleted: boolean } | null;
1119
- paused?: boolean | null;
1120
- priority?: number | null;
1121
- products?:
1122
- | (
1123
- | "zoneLockdown"
1124
- | "uaBlock"
1125
- | "bic"
1126
- | "hot"
1127
- | "securityLevel"
1128
- | "rateLimit"
1129
- | "waf"
1130
- )[]
1131
- | null;
1132
- ref?: string | null;
1133
- }[];
1265
+ export interface BulkPutRulesResponse {
1266
+ result: {
1267
+ id?: string | null;
1268
+ action?:
1269
+ | "block"
1270
+ | "challenge"
1271
+ | "js_challenge"
1272
+ | "managed_challenge"
1273
+ | "allow"
1274
+ | "log"
1275
+ | "bypass"
1276
+ | null;
1277
+ description?: string | null;
1278
+ filter?: unknown | { id: string; deleted: boolean } | null;
1279
+ paused?: boolean | null;
1280
+ priority?: number | null;
1281
+ products?:
1282
+ | (
1283
+ | "zoneLockdown"
1284
+ | "uaBlock"
1285
+ | "bic"
1286
+ | "hot"
1287
+ | "securityLevel"
1288
+ | "rateLimit"
1289
+ | "waf"
1290
+ )[]
1291
+ | null;
1292
+ ref?: string | null;
1293
+ }[];
1294
+ }
1134
1295
 
1135
- export const BulkPutRulesResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Array(
1136
- Schema.Struct({
1137
- id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1138
- action: Schema.optional(
1139
- Schema.Union([
1140
- Schema.Literals([
1141
- "block",
1142
- "challenge",
1143
- "js_challenge",
1144
- "managed_challenge",
1145
- "allow",
1146
- "log",
1147
- "bypass",
1148
- ]),
1149
- Schema.Null,
1150
- ]),
1151
- ),
1152
- description: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1153
- filter: Schema.optional(
1154
- Schema.Union([
1296
+ export const BulkPutRulesResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1297
+ result: Schema.Array(
1298
+ Schema.Struct({
1299
+ id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1300
+ action: Schema.optional(
1155
1301
  Schema.Union([
1156
- Schema.Unknown,
1157
- Schema.Struct({
1158
- id: Schema.String,
1159
- deleted: Schema.Boolean,
1160
- }),
1161
- ]),
1162
- Schema.Null,
1163
- ]),
1164
- ),
1165
- paused: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
1166
- priority: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
1167
- products: Schema.optional(
1168
- Schema.Union([
1169
- Schema.Array(
1170
1302
  Schema.Literals([
1171
- "zoneLockdown",
1172
- "uaBlock",
1173
- "bic",
1174
- "hot",
1175
- "securityLevel",
1176
- "rateLimit",
1177
- "waf",
1303
+ "block",
1304
+ "challenge",
1305
+ "js_challenge",
1306
+ "managed_challenge",
1307
+ "allow",
1308
+ "log",
1309
+ "bypass",
1178
1310
  ]),
1179
- ),
1180
- Schema.Null,
1181
- ]),
1182
- ),
1183
- ref: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1184
- }),
1185
- ) as unknown as Schema.Schema<BulkPutRulesResponse>;
1311
+ Schema.Null,
1312
+ ]),
1313
+ ),
1314
+ description: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1315
+ filter: Schema.optional(
1316
+ Schema.Union([
1317
+ Schema.Union([
1318
+ Schema.Unknown,
1319
+ Schema.Struct({
1320
+ id: Schema.String,
1321
+ deleted: Schema.Boolean,
1322
+ }),
1323
+ ]),
1324
+ Schema.Null,
1325
+ ]),
1326
+ ),
1327
+ paused: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
1328
+ priority: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
1329
+ products: Schema.optional(
1330
+ Schema.Union([
1331
+ Schema.Array(
1332
+ Schema.Literals([
1333
+ "zoneLockdown",
1334
+ "uaBlock",
1335
+ "bic",
1336
+ "hot",
1337
+ "securityLevel",
1338
+ "rateLimit",
1339
+ "waf",
1340
+ ]),
1341
+ ),
1342
+ Schema.Null,
1343
+ ]),
1344
+ ),
1345
+ ref: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1346
+ }),
1347
+ ),
1348
+ }) as unknown as Schema.Schema<BulkPutRulesResponse>;
1186
1349
 
1187
1350
  export type BulkPutRulesError = DefaultErrors;
1188
1351
 
1189
- export const bulkPutRules: API.OperationMethod<
1352
+ export const bulkPutRules: API.PaginatedOperationMethod<
1190
1353
  BulkPutRulesRequest,
1191
1354
  BulkPutRulesResponse,
1192
1355
  BulkPutRulesError,
1193
1356
  Credentials | HttpClient.HttpClient
1194
- > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
1357
+ > & {
1358
+ pages: (
1359
+ input: BulkPutRulesRequest,
1360
+ ) => stream.Stream<
1361
+ BulkPutRulesResponse,
1362
+ BulkPutRulesError,
1363
+ Credentials | HttpClient.HttpClient
1364
+ >;
1365
+ items: (input: BulkPutRulesRequest) => stream.Stream<
1366
+ {
1367
+ id?: string | null;
1368
+ action?:
1369
+ | "block"
1370
+ | "challenge"
1371
+ | "js_challenge"
1372
+ | "managed_challenge"
1373
+ | "allow"
1374
+ | "log"
1375
+ | "bypass"
1376
+ | null;
1377
+ description?: string | null;
1378
+ filter?: unknown | { id: string; deleted: boolean } | null;
1379
+ paused?: boolean | null;
1380
+ priority?: number | null;
1381
+ products?:
1382
+ | (
1383
+ | "zoneLockdown"
1384
+ | "uaBlock"
1385
+ | "bic"
1386
+ | "hot"
1387
+ | "securityLevel"
1388
+ | "rateLimit"
1389
+ | "waf"
1390
+ )[]
1391
+ | null;
1392
+ ref?: string | null;
1393
+ },
1394
+ BulkPutRulesError,
1395
+ Credentials | HttpClient.HttpClient
1396
+ >;
1397
+ } = /*@__PURE__*/ /*#__PURE__*/ API.makePaginated(() => ({
1195
1398
  input: BulkPutRulesRequest,
1196
1399
  output: BulkPutRulesResponse,
1197
1400
  errors: [],
1401
+ pagination: {
1402
+ mode: "single",
1403
+ items: "result",
1404
+ } as const,
1198
1405
  }));
1199
1406
 
1200
1407
  // =============================================================================
@@ -1297,7 +1504,7 @@ export const GetRuleResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1297
1504
  ]),
1298
1505
  ),
1299
1506
  ref: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1300
- }) as unknown as Schema.Schema<GetRuleResponse>;
1507
+ }).pipe(T.ResponsePath("result")) as unknown as Schema.Schema<GetRuleResponse>;
1301
1508
 
1302
1509
  export type GetRuleError = DefaultErrors;
1303
1510
 
@@ -1335,98 +1542,170 @@ export const ListRulesRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1335
1542
  T.Http({ method: "GET", path: "/zones/{zone_id}/firewall/rules" }),
1336
1543
  ) as unknown as Schema.Schema<ListRulesRequest>;
1337
1544
 
1338
- export type ListRulesResponse = {
1339
- id?: string | null;
1340
- action?:
1341
- | "block"
1342
- | "challenge"
1343
- | "js_challenge"
1344
- | "managed_challenge"
1345
- | "allow"
1346
- | "log"
1347
- | "bypass"
1348
- | null;
1349
- description?: string | null;
1350
- filter?: unknown | { id: string; deleted: boolean } | null;
1351
- paused?: boolean | null;
1352
- priority?: number | null;
1353
- products?:
1354
- | (
1355
- | "zoneLockdown"
1356
- | "uaBlock"
1357
- | "bic"
1358
- | "hot"
1359
- | "securityLevel"
1360
- | "rateLimit"
1361
- | "waf"
1362
- )[]
1363
- | null;
1364
- ref?: string | null;
1365
- }[];
1545
+ export interface ListRulesResponse {
1546
+ result: {
1547
+ id?: string | null;
1548
+ action?:
1549
+ | "block"
1550
+ | "challenge"
1551
+ | "js_challenge"
1552
+ | "managed_challenge"
1553
+ | "allow"
1554
+ | "log"
1555
+ | "bypass"
1556
+ | null;
1557
+ description?: string | null;
1558
+ filter?: unknown | { id: string; deleted: boolean } | null;
1559
+ paused?: boolean | null;
1560
+ priority?: number | null;
1561
+ products?:
1562
+ | (
1563
+ | "zoneLockdown"
1564
+ | "uaBlock"
1565
+ | "bic"
1566
+ | "hot"
1567
+ | "securityLevel"
1568
+ | "rateLimit"
1569
+ | "waf"
1570
+ )[]
1571
+ | null;
1572
+ ref?: string | null;
1573
+ }[];
1574
+ resultInfo: {
1575
+ count?: number | null;
1576
+ page?: number | null;
1577
+ perPage?: number | null;
1578
+ totalCount?: number | null;
1579
+ };
1580
+ }
1366
1581
 
1367
- export const ListRulesResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Array(
1368
- Schema.Struct({
1369
- id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1370
- action: Schema.optional(
1371
- Schema.Union([
1372
- Schema.Literals([
1373
- "block",
1374
- "challenge",
1375
- "js_challenge",
1376
- "managed_challenge",
1377
- "allow",
1378
- "log",
1379
- "bypass",
1380
- ]),
1381
- Schema.Null,
1382
- ]),
1383
- ),
1384
- description: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1385
- filter: Schema.optional(
1386
- Schema.Union([
1582
+ export const ListRulesResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1583
+ result: Schema.Array(
1584
+ Schema.Struct({
1585
+ id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1586
+ action: Schema.optional(
1387
1587
  Schema.Union([
1388
- Schema.Unknown,
1389
- Schema.Struct({
1390
- id: Schema.String,
1391
- deleted: Schema.Boolean,
1392
- }),
1393
- ]),
1394
- Schema.Null,
1395
- ]),
1396
- ),
1397
- paused: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
1398
- priority: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
1399
- products: Schema.optional(
1400
- Schema.Union([
1401
- Schema.Array(
1402
1588
  Schema.Literals([
1403
- "zoneLockdown",
1404
- "uaBlock",
1405
- "bic",
1406
- "hot",
1407
- "securityLevel",
1408
- "rateLimit",
1409
- "waf",
1589
+ "block",
1590
+ "challenge",
1591
+ "js_challenge",
1592
+ "managed_challenge",
1593
+ "allow",
1594
+ "log",
1595
+ "bypass",
1410
1596
  ]),
1411
- ),
1412
- Schema.Null,
1413
- ]),
1414
- ),
1415
- ref: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1416
- }),
1597
+ Schema.Null,
1598
+ ]),
1599
+ ),
1600
+ description: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1601
+ filter: Schema.optional(
1602
+ Schema.Union([
1603
+ Schema.Union([
1604
+ Schema.Unknown,
1605
+ Schema.Struct({
1606
+ id: Schema.String,
1607
+ deleted: Schema.Boolean,
1608
+ }),
1609
+ ]),
1610
+ Schema.Null,
1611
+ ]),
1612
+ ),
1613
+ paused: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
1614
+ priority: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
1615
+ products: Schema.optional(
1616
+ Schema.Union([
1617
+ Schema.Array(
1618
+ Schema.Literals([
1619
+ "zoneLockdown",
1620
+ "uaBlock",
1621
+ "bic",
1622
+ "hot",
1623
+ "securityLevel",
1624
+ "rateLimit",
1625
+ "waf",
1626
+ ]),
1627
+ ),
1628
+ Schema.Null,
1629
+ ]),
1630
+ ),
1631
+ ref: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1632
+ }),
1633
+ ),
1634
+ resultInfo: Schema.Struct({
1635
+ count: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
1636
+ page: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
1637
+ perPage: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
1638
+ totalCount: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
1639
+ }).pipe(
1640
+ Schema.encodeKeys({
1641
+ count: "count",
1642
+ page: "page",
1643
+ perPage: "per_page",
1644
+ totalCount: "total_count",
1645
+ }),
1646
+ ),
1647
+ }).pipe(
1648
+ Schema.encodeKeys({ result: "result", resultInfo: "result_info" }),
1417
1649
  ) as unknown as Schema.Schema<ListRulesResponse>;
1418
1650
 
1419
1651
  export type ListRulesError = DefaultErrors;
1420
1652
 
1421
- export const listRules: API.OperationMethod<
1653
+ export const listRules: API.PaginatedOperationMethod<
1422
1654
  ListRulesRequest,
1423
1655
  ListRulesResponse,
1424
1656
  ListRulesError,
1425
1657
  Credentials | HttpClient.HttpClient
1426
- > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
1658
+ > & {
1659
+ pages: (
1660
+ input: ListRulesRequest,
1661
+ ) => stream.Stream<
1662
+ ListRulesResponse,
1663
+ ListRulesError,
1664
+ Credentials | HttpClient.HttpClient
1665
+ >;
1666
+ items: (input: ListRulesRequest) => stream.Stream<
1667
+ {
1668
+ id?: string | null;
1669
+ action?:
1670
+ | "block"
1671
+ | "challenge"
1672
+ | "js_challenge"
1673
+ | "managed_challenge"
1674
+ | "allow"
1675
+ | "log"
1676
+ | "bypass"
1677
+ | null;
1678
+ description?: string | null;
1679
+ filter?: unknown | { id: string; deleted: boolean } | null;
1680
+ paused?: boolean | null;
1681
+ priority?: number | null;
1682
+ products?:
1683
+ | (
1684
+ | "zoneLockdown"
1685
+ | "uaBlock"
1686
+ | "bic"
1687
+ | "hot"
1688
+ | "securityLevel"
1689
+ | "rateLimit"
1690
+ | "waf"
1691
+ )[]
1692
+ | null;
1693
+ ref?: string | null;
1694
+ },
1695
+ ListRulesError,
1696
+ Credentials | HttpClient.HttpClient
1697
+ >;
1698
+ } = /*@__PURE__*/ /*#__PURE__*/ API.makePaginated(() => ({
1427
1699
  input: ListRulesRequest,
1428
1700
  output: ListRulesResponse,
1429
1701
  errors: [],
1702
+ pagination: {
1703
+ mode: "page",
1704
+ inputToken: "page",
1705
+ outputToken: "resultInfo.page",
1706
+ items: "result",
1707
+ pageSize: "perPage",
1708
+ } as const,
1430
1709
  }));
1431
1710
 
1432
1711
  export interface CreateRuleRequest {
@@ -1472,98 +1751,146 @@ export const CreateRuleRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1472
1751
  T.Http({ method: "POST", path: "/zones/{zone_id}/firewall/rules" }),
1473
1752
  ) as unknown as Schema.Schema<CreateRuleRequest>;
1474
1753
 
1475
- export type CreateRuleResponse = {
1476
- id?: string | null;
1477
- action?:
1478
- | "block"
1479
- | "challenge"
1480
- | "js_challenge"
1481
- | "managed_challenge"
1482
- | "allow"
1483
- | "log"
1484
- | "bypass"
1485
- | null;
1486
- description?: string | null;
1487
- filter?: unknown | { id: string; deleted: boolean } | null;
1488
- paused?: boolean | null;
1489
- priority?: number | null;
1490
- products?:
1491
- | (
1492
- | "zoneLockdown"
1493
- | "uaBlock"
1494
- | "bic"
1495
- | "hot"
1496
- | "securityLevel"
1497
- | "rateLimit"
1498
- | "waf"
1499
- )[]
1500
- | null;
1501
- ref?: string | null;
1502
- }[];
1754
+ export interface CreateRuleResponse {
1755
+ result: {
1756
+ id?: string | null;
1757
+ action?:
1758
+ | "block"
1759
+ | "challenge"
1760
+ | "js_challenge"
1761
+ | "managed_challenge"
1762
+ | "allow"
1763
+ | "log"
1764
+ | "bypass"
1765
+ | null;
1766
+ description?: string | null;
1767
+ filter?: unknown | { id: string; deleted: boolean } | null;
1768
+ paused?: boolean | null;
1769
+ priority?: number | null;
1770
+ products?:
1771
+ | (
1772
+ | "zoneLockdown"
1773
+ | "uaBlock"
1774
+ | "bic"
1775
+ | "hot"
1776
+ | "securityLevel"
1777
+ | "rateLimit"
1778
+ | "waf"
1779
+ )[]
1780
+ | null;
1781
+ ref?: string | null;
1782
+ }[];
1783
+ }
1503
1784
 
1504
- export const CreateRuleResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Array(
1505
- Schema.Struct({
1506
- id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1507
- action: Schema.optional(
1508
- Schema.Union([
1509
- Schema.Literals([
1510
- "block",
1511
- "challenge",
1512
- "js_challenge",
1513
- "managed_challenge",
1514
- "allow",
1515
- "log",
1516
- "bypass",
1517
- ]),
1518
- Schema.Null,
1519
- ]),
1520
- ),
1521
- description: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1522
- filter: Schema.optional(
1523
- Schema.Union([
1785
+ export const CreateRuleResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1786
+ result: Schema.Array(
1787
+ Schema.Struct({
1788
+ id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1789
+ action: Schema.optional(
1524
1790
  Schema.Union([
1525
- Schema.Unknown,
1526
- Schema.Struct({
1527
- id: Schema.String,
1528
- deleted: Schema.Boolean,
1529
- }),
1530
- ]),
1531
- Schema.Null,
1532
- ]),
1533
- ),
1534
- paused: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
1535
- priority: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
1536
- products: Schema.optional(
1537
- Schema.Union([
1538
- Schema.Array(
1539
1791
  Schema.Literals([
1540
- "zoneLockdown",
1541
- "uaBlock",
1542
- "bic",
1543
- "hot",
1544
- "securityLevel",
1545
- "rateLimit",
1546
- "waf",
1792
+ "block",
1793
+ "challenge",
1794
+ "js_challenge",
1795
+ "managed_challenge",
1796
+ "allow",
1797
+ "log",
1798
+ "bypass",
1547
1799
  ]),
1548
- ),
1549
- Schema.Null,
1550
- ]),
1551
- ),
1552
- ref: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1553
- }),
1554
- ) as unknown as Schema.Schema<CreateRuleResponse>;
1800
+ Schema.Null,
1801
+ ]),
1802
+ ),
1803
+ description: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1804
+ filter: Schema.optional(
1805
+ Schema.Union([
1806
+ Schema.Union([
1807
+ Schema.Unknown,
1808
+ Schema.Struct({
1809
+ id: Schema.String,
1810
+ deleted: Schema.Boolean,
1811
+ }),
1812
+ ]),
1813
+ Schema.Null,
1814
+ ]),
1815
+ ),
1816
+ paused: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
1817
+ priority: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
1818
+ products: Schema.optional(
1819
+ Schema.Union([
1820
+ Schema.Array(
1821
+ Schema.Literals([
1822
+ "zoneLockdown",
1823
+ "uaBlock",
1824
+ "bic",
1825
+ "hot",
1826
+ "securityLevel",
1827
+ "rateLimit",
1828
+ "waf",
1829
+ ]),
1830
+ ),
1831
+ Schema.Null,
1832
+ ]),
1833
+ ),
1834
+ ref: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1835
+ }),
1836
+ ),
1837
+ }) as unknown as Schema.Schema<CreateRuleResponse>;
1555
1838
 
1556
1839
  export type CreateRuleError = DefaultErrors;
1557
1840
 
1558
- export const createRule: API.OperationMethod<
1841
+ export const createRule: API.PaginatedOperationMethod<
1559
1842
  CreateRuleRequest,
1560
1843
  CreateRuleResponse,
1561
1844
  CreateRuleError,
1562
1845
  Credentials | HttpClient.HttpClient
1563
- > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
1846
+ > & {
1847
+ pages: (
1848
+ input: CreateRuleRequest,
1849
+ ) => stream.Stream<
1850
+ CreateRuleResponse,
1851
+ CreateRuleError,
1852
+ Credentials | HttpClient.HttpClient
1853
+ >;
1854
+ items: (input: CreateRuleRequest) => stream.Stream<
1855
+ {
1856
+ id?: string | null;
1857
+ action?:
1858
+ | "block"
1859
+ | "challenge"
1860
+ | "js_challenge"
1861
+ | "managed_challenge"
1862
+ | "allow"
1863
+ | "log"
1864
+ | "bypass"
1865
+ | null;
1866
+ description?: string | null;
1867
+ filter?: unknown | { id: string; deleted: boolean } | null;
1868
+ paused?: boolean | null;
1869
+ priority?: number | null;
1870
+ products?:
1871
+ | (
1872
+ | "zoneLockdown"
1873
+ | "uaBlock"
1874
+ | "bic"
1875
+ | "hot"
1876
+ | "securityLevel"
1877
+ | "rateLimit"
1878
+ | "waf"
1879
+ )[]
1880
+ | null;
1881
+ ref?: string | null;
1882
+ },
1883
+ CreateRuleError,
1884
+ Credentials | HttpClient.HttpClient
1885
+ >;
1886
+ } = /*@__PURE__*/ /*#__PURE__*/ API.makePaginated(() => ({
1564
1887
  input: CreateRuleRequest,
1565
1888
  output: CreateRuleResponse,
1566
1889
  errors: [],
1890
+ pagination: {
1891
+ mode: "single",
1892
+ items: "result",
1893
+ } as const,
1567
1894
  }));
1568
1895
 
1569
1896
  export interface UpdateRuleRequest {
@@ -1694,7 +2021,9 @@ export const UpdateRuleResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1694
2021
  ]),
1695
2022
  ),
1696
2023
  ref: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1697
- }) as unknown as Schema.Schema<UpdateRuleResponse>;
2024
+ }).pipe(
2025
+ T.ResponsePath("result"),
2026
+ ) as unknown as Schema.Schema<UpdateRuleResponse>;
1698
2027
 
1699
2028
  export type UpdateRuleError = DefaultErrors;
1700
2029
 
@@ -1722,98 +2051,146 @@ export const PatchRuleRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1722
2051
  T.Http({ method: "PATCH", path: "/zones/{zone_id}/firewall/rules/{ruleId}" }),
1723
2052
  ) as unknown as Schema.Schema<PatchRuleRequest>;
1724
2053
 
1725
- export type PatchRuleResponse = {
1726
- id?: string | null;
1727
- action?:
1728
- | "block"
1729
- | "challenge"
1730
- | "js_challenge"
1731
- | "managed_challenge"
1732
- | "allow"
1733
- | "log"
1734
- | "bypass"
1735
- | null;
1736
- description?: string | null;
1737
- filter?: unknown | { id: string; deleted: boolean } | null;
1738
- paused?: boolean | null;
1739
- priority?: number | null;
1740
- products?:
1741
- | (
1742
- | "zoneLockdown"
1743
- | "uaBlock"
1744
- | "bic"
1745
- | "hot"
1746
- | "securityLevel"
1747
- | "rateLimit"
1748
- | "waf"
1749
- )[]
1750
- | null;
1751
- ref?: string | null;
1752
- }[];
2054
+ export interface PatchRuleResponse {
2055
+ result: {
2056
+ id?: string | null;
2057
+ action?:
2058
+ | "block"
2059
+ | "challenge"
2060
+ | "js_challenge"
2061
+ | "managed_challenge"
2062
+ | "allow"
2063
+ | "log"
2064
+ | "bypass"
2065
+ | null;
2066
+ description?: string | null;
2067
+ filter?: unknown | { id: string; deleted: boolean } | null;
2068
+ paused?: boolean | null;
2069
+ priority?: number | null;
2070
+ products?:
2071
+ | (
2072
+ | "zoneLockdown"
2073
+ | "uaBlock"
2074
+ | "bic"
2075
+ | "hot"
2076
+ | "securityLevel"
2077
+ | "rateLimit"
2078
+ | "waf"
2079
+ )[]
2080
+ | null;
2081
+ ref?: string | null;
2082
+ }[];
2083
+ }
1753
2084
 
1754
- export const PatchRuleResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Array(
1755
- Schema.Struct({
1756
- id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1757
- action: Schema.optional(
1758
- Schema.Union([
1759
- Schema.Literals([
1760
- "block",
1761
- "challenge",
1762
- "js_challenge",
1763
- "managed_challenge",
1764
- "allow",
1765
- "log",
1766
- "bypass",
1767
- ]),
1768
- Schema.Null,
1769
- ]),
1770
- ),
1771
- description: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1772
- filter: Schema.optional(
1773
- Schema.Union([
2085
+ export const PatchRuleResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
2086
+ result: Schema.Array(
2087
+ Schema.Struct({
2088
+ id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
2089
+ action: Schema.optional(
1774
2090
  Schema.Union([
1775
- Schema.Unknown,
1776
- Schema.Struct({
1777
- id: Schema.String,
1778
- deleted: Schema.Boolean,
1779
- }),
1780
- ]),
1781
- Schema.Null,
1782
- ]),
1783
- ),
1784
- paused: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
1785
- priority: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
1786
- products: Schema.optional(
1787
- Schema.Union([
1788
- Schema.Array(
1789
2091
  Schema.Literals([
1790
- "zoneLockdown",
1791
- "uaBlock",
1792
- "bic",
1793
- "hot",
1794
- "securityLevel",
1795
- "rateLimit",
1796
- "waf",
2092
+ "block",
2093
+ "challenge",
2094
+ "js_challenge",
2095
+ "managed_challenge",
2096
+ "allow",
2097
+ "log",
2098
+ "bypass",
1797
2099
  ]),
1798
- ),
1799
- Schema.Null,
1800
- ]),
1801
- ),
1802
- ref: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1803
- }),
1804
- ) as unknown as Schema.Schema<PatchRuleResponse>;
2100
+ Schema.Null,
2101
+ ]),
2102
+ ),
2103
+ description: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
2104
+ filter: Schema.optional(
2105
+ Schema.Union([
2106
+ Schema.Union([
2107
+ Schema.Unknown,
2108
+ Schema.Struct({
2109
+ id: Schema.String,
2110
+ deleted: Schema.Boolean,
2111
+ }),
2112
+ ]),
2113
+ Schema.Null,
2114
+ ]),
2115
+ ),
2116
+ paused: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
2117
+ priority: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
2118
+ products: Schema.optional(
2119
+ Schema.Union([
2120
+ Schema.Array(
2121
+ Schema.Literals([
2122
+ "zoneLockdown",
2123
+ "uaBlock",
2124
+ "bic",
2125
+ "hot",
2126
+ "securityLevel",
2127
+ "rateLimit",
2128
+ "waf",
2129
+ ]),
2130
+ ),
2131
+ Schema.Null,
2132
+ ]),
2133
+ ),
2134
+ ref: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
2135
+ }),
2136
+ ),
2137
+ }) as unknown as Schema.Schema<PatchRuleResponse>;
1805
2138
 
1806
2139
  export type PatchRuleError = DefaultErrors;
1807
2140
 
1808
- export const patchRule: API.OperationMethod<
2141
+ export const patchRule: API.PaginatedOperationMethod<
1809
2142
  PatchRuleRequest,
1810
2143
  PatchRuleResponse,
1811
2144
  PatchRuleError,
1812
2145
  Credentials | HttpClient.HttpClient
1813
- > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
2146
+ > & {
2147
+ pages: (
2148
+ input: PatchRuleRequest,
2149
+ ) => stream.Stream<
2150
+ PatchRuleResponse,
2151
+ PatchRuleError,
2152
+ Credentials | HttpClient.HttpClient
2153
+ >;
2154
+ items: (input: PatchRuleRequest) => stream.Stream<
2155
+ {
2156
+ id?: string | null;
2157
+ action?:
2158
+ | "block"
2159
+ | "challenge"
2160
+ | "js_challenge"
2161
+ | "managed_challenge"
2162
+ | "allow"
2163
+ | "log"
2164
+ | "bypass"
2165
+ | null;
2166
+ description?: string | null;
2167
+ filter?: unknown | { id: string; deleted: boolean } | null;
2168
+ paused?: boolean | null;
2169
+ priority?: number | null;
2170
+ products?:
2171
+ | (
2172
+ | "zoneLockdown"
2173
+ | "uaBlock"
2174
+ | "bic"
2175
+ | "hot"
2176
+ | "securityLevel"
2177
+ | "rateLimit"
2178
+ | "waf"
2179
+ )[]
2180
+ | null;
2181
+ ref?: string | null;
2182
+ },
2183
+ PatchRuleError,
2184
+ Credentials | HttpClient.HttpClient
2185
+ >;
2186
+ } = /*@__PURE__*/ /*#__PURE__*/ API.makePaginated(() => ({
1814
2187
  input: PatchRuleRequest,
1815
2188
  output: PatchRuleResponse,
1816
2189
  errors: [],
2190
+ pagination: {
2191
+ mode: "single",
2192
+ items: "result",
2193
+ } as const,
1817
2194
  }));
1818
2195
 
1819
2196
  export interface DeleteRuleRequest {
@@ -1915,7 +2292,9 @@ export const DeleteRuleResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1915
2292
  ]),
1916
2293
  ),
1917
2294
  ref: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1918
- }) as unknown as Schema.Schema<DeleteRuleResponse>;
2295
+ }).pipe(
2296
+ T.ResponsePath("result"),
2297
+ ) as unknown as Schema.Schema<DeleteRuleResponse>;
1919
2298
 
1920
2299
  export type DeleteRuleError = DefaultErrors;
1921
2300
 
@@ -1932,110 +2311,162 @@ export const deleteRule: API.OperationMethod<
1932
2311
 
1933
2312
  export interface BulkPatchRulesRequest {
1934
2313
  /** Path param: Defines an identifier. */
1935
- zoneId: string;
1936
- /** Body param: */
1937
- body: unknown;
1938
- }
1939
-
1940
- export const BulkPatchRulesRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1941
- zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
1942
- body: Schema.Unknown.pipe(T.HttpBody()),
1943
- }).pipe(
1944
- T.Http({ method: "PATCH", path: "/zones/{zone_id}/firewall/rules" }),
1945
- ) as unknown as Schema.Schema<BulkPatchRulesRequest>;
1946
-
1947
- export type BulkPatchRulesResponse = {
1948
- id?: string | null;
1949
- action?:
1950
- | "block"
1951
- | "challenge"
1952
- | "js_challenge"
1953
- | "managed_challenge"
1954
- | "allow"
1955
- | "log"
1956
- | "bypass"
1957
- | null;
1958
- description?: string | null;
1959
- filter?: unknown | { id: string; deleted: boolean } | null;
1960
- paused?: boolean | null;
1961
- priority?: number | null;
1962
- products?:
1963
- | (
1964
- | "zoneLockdown"
1965
- | "uaBlock"
1966
- | "bic"
1967
- | "hot"
1968
- | "securityLevel"
1969
- | "rateLimit"
1970
- | "waf"
1971
- )[]
1972
- | null;
1973
- ref?: string | null;
1974
- }[];
2314
+ zoneId: string;
2315
+ /** Body param: */
2316
+ body: unknown;
2317
+ }
1975
2318
 
1976
- export const BulkPatchRulesResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Array(
1977
- Schema.Struct({
1978
- id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1979
- action: Schema.optional(
1980
- Schema.Union([
1981
- Schema.Literals([
1982
- "block",
1983
- "challenge",
1984
- "js_challenge",
1985
- "managed_challenge",
1986
- "allow",
1987
- "log",
1988
- "bypass",
1989
- ]),
1990
- Schema.Null,
1991
- ]),
1992
- ),
1993
- description: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1994
- filter: Schema.optional(
1995
- Schema.Union([
1996
- Schema.Union([
1997
- Schema.Unknown,
1998
- Schema.Struct({
1999
- id: Schema.String,
2000
- deleted: Schema.Boolean,
2001
- }),
2002
- ]),
2003
- Schema.Null,
2004
- ]),
2005
- ),
2006
- paused: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
2007
- priority: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
2008
- products: Schema.optional(
2009
- Schema.Union([
2010
- Schema.Array(
2011
- Schema.Literals([
2012
- "zoneLockdown",
2013
- "uaBlock",
2014
- "bic",
2015
- "hot",
2016
- "securityLevel",
2017
- "rateLimit",
2018
- "waf",
2319
+ export const BulkPatchRulesRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
2320
+ zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
2321
+ body: Schema.Unknown.pipe(T.HttpBody()),
2322
+ }).pipe(
2323
+ T.Http({ method: "PATCH", path: "/zones/{zone_id}/firewall/rules" }),
2324
+ ) as unknown as Schema.Schema<BulkPatchRulesRequest>;
2325
+
2326
+ export interface BulkPatchRulesResponse {
2327
+ result: {
2328
+ id?: string | null;
2329
+ action?:
2330
+ | "block"
2331
+ | "challenge"
2332
+ | "js_challenge"
2333
+ | "managed_challenge"
2334
+ | "allow"
2335
+ | "log"
2336
+ | "bypass"
2337
+ | null;
2338
+ description?: string | null;
2339
+ filter?: unknown | { id: string; deleted: boolean } | null;
2340
+ paused?: boolean | null;
2341
+ priority?: number | null;
2342
+ products?:
2343
+ | (
2344
+ | "zoneLockdown"
2345
+ | "uaBlock"
2346
+ | "bic"
2347
+ | "hot"
2348
+ | "securityLevel"
2349
+ | "rateLimit"
2350
+ | "waf"
2351
+ )[]
2352
+ | null;
2353
+ ref?: string | null;
2354
+ }[];
2355
+ }
2356
+
2357
+ export const BulkPatchRulesResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct(
2358
+ {
2359
+ result: Schema.Array(
2360
+ Schema.Struct({
2361
+ id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
2362
+ action: Schema.optional(
2363
+ Schema.Union([
2364
+ Schema.Literals([
2365
+ "block",
2366
+ "challenge",
2367
+ "js_challenge",
2368
+ "managed_challenge",
2369
+ "allow",
2370
+ "log",
2371
+ "bypass",
2372
+ ]),
2373
+ Schema.Null,
2019
2374
  ]),
2020
2375
  ),
2021
- Schema.Null,
2022
- ]),
2376
+ description: Schema.optional(
2377
+ Schema.Union([Schema.String, Schema.Null]),
2378
+ ),
2379
+ filter: Schema.optional(
2380
+ Schema.Union([
2381
+ Schema.Union([
2382
+ Schema.Unknown,
2383
+ Schema.Struct({
2384
+ id: Schema.String,
2385
+ deleted: Schema.Boolean,
2386
+ }),
2387
+ ]),
2388
+ Schema.Null,
2389
+ ]),
2390
+ ),
2391
+ paused: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
2392
+ priority: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
2393
+ products: Schema.optional(
2394
+ Schema.Union([
2395
+ Schema.Array(
2396
+ Schema.Literals([
2397
+ "zoneLockdown",
2398
+ "uaBlock",
2399
+ "bic",
2400
+ "hot",
2401
+ "securityLevel",
2402
+ "rateLimit",
2403
+ "waf",
2404
+ ]),
2405
+ ),
2406
+ Schema.Null,
2407
+ ]),
2408
+ ),
2409
+ ref: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
2410
+ }),
2023
2411
  ),
2024
- ref: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
2025
- }),
2412
+ },
2026
2413
  ) as unknown as Schema.Schema<BulkPatchRulesResponse>;
2027
2414
 
2028
2415
  export type BulkPatchRulesError = DefaultErrors;
2029
2416
 
2030
- export const bulkPatchRules: API.OperationMethod<
2417
+ export const bulkPatchRules: API.PaginatedOperationMethod<
2031
2418
  BulkPatchRulesRequest,
2032
2419
  BulkPatchRulesResponse,
2033
2420
  BulkPatchRulesError,
2034
2421
  Credentials | HttpClient.HttpClient
2035
- > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
2422
+ > & {
2423
+ pages: (
2424
+ input: BulkPatchRulesRequest,
2425
+ ) => stream.Stream<
2426
+ BulkPatchRulesResponse,
2427
+ BulkPatchRulesError,
2428
+ Credentials | HttpClient.HttpClient
2429
+ >;
2430
+ items: (input: BulkPatchRulesRequest) => stream.Stream<
2431
+ {
2432
+ id?: string | null;
2433
+ action?:
2434
+ | "block"
2435
+ | "challenge"
2436
+ | "js_challenge"
2437
+ | "managed_challenge"
2438
+ | "allow"
2439
+ | "log"
2440
+ | "bypass"
2441
+ | null;
2442
+ description?: string | null;
2443
+ filter?: unknown | { id: string; deleted: boolean } | null;
2444
+ paused?: boolean | null;
2445
+ priority?: number | null;
2446
+ products?:
2447
+ | (
2448
+ | "zoneLockdown"
2449
+ | "uaBlock"
2450
+ | "bic"
2451
+ | "hot"
2452
+ | "securityLevel"
2453
+ | "rateLimit"
2454
+ | "waf"
2455
+ )[]
2456
+ | null;
2457
+ ref?: string | null;
2458
+ },
2459
+ BulkPatchRulesError,
2460
+ Credentials | HttpClient.HttpClient
2461
+ >;
2462
+ } = /*@__PURE__*/ /*#__PURE__*/ API.makePaginated(() => ({
2036
2463
  input: BulkPatchRulesRequest,
2037
2464
  output: BulkPatchRulesResponse,
2038
2465
  errors: [],
2466
+ pagination: {
2467
+ mode: "single",
2468
+ items: "result",
2469
+ } as const,
2039
2470
  }));
2040
2471
 
2041
2472
  export interface BulkDeleteRulesRequest {
@@ -2051,98 +2482,149 @@ export const BulkDeleteRulesRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct(
2051
2482
  T.Http({ method: "DELETE", path: "/zones/{zone_id}/firewall/rules" }),
2052
2483
  ) as unknown as Schema.Schema<BulkDeleteRulesRequest>;
2053
2484
 
2054
- export type BulkDeleteRulesResponse = {
2055
- id?: string | null;
2056
- action?:
2057
- | "block"
2058
- | "challenge"
2059
- | "js_challenge"
2060
- | "managed_challenge"
2061
- | "allow"
2062
- | "log"
2063
- | "bypass"
2064
- | null;
2065
- description?: string | null;
2066
- filter?: unknown | { id: string; deleted: boolean } | null;
2067
- paused?: boolean | null;
2068
- priority?: number | null;
2069
- products?:
2070
- | (
2071
- | "zoneLockdown"
2072
- | "uaBlock"
2073
- | "bic"
2074
- | "hot"
2075
- | "securityLevel"
2076
- | "rateLimit"
2077
- | "waf"
2078
- )[]
2079
- | null;
2080
- ref?: string | null;
2081
- }[];
2485
+ export interface BulkDeleteRulesResponse {
2486
+ result: {
2487
+ id?: string | null;
2488
+ action?:
2489
+ | "block"
2490
+ | "challenge"
2491
+ | "js_challenge"
2492
+ | "managed_challenge"
2493
+ | "allow"
2494
+ | "log"
2495
+ | "bypass"
2496
+ | null;
2497
+ description?: string | null;
2498
+ filter?: unknown | { id: string; deleted: boolean } | null;
2499
+ paused?: boolean | null;
2500
+ priority?: number | null;
2501
+ products?:
2502
+ | (
2503
+ | "zoneLockdown"
2504
+ | "uaBlock"
2505
+ | "bic"
2506
+ | "hot"
2507
+ | "securityLevel"
2508
+ | "rateLimit"
2509
+ | "waf"
2510
+ )[]
2511
+ | null;
2512
+ ref?: string | null;
2513
+ }[];
2514
+ }
2082
2515
 
2083
- export const BulkDeleteRulesResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Array(
2084
- Schema.Struct({
2085
- id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
2086
- action: Schema.optional(
2087
- Schema.Union([
2088
- Schema.Literals([
2089
- "block",
2090
- "challenge",
2091
- "js_challenge",
2092
- "managed_challenge",
2093
- "allow",
2094
- "log",
2095
- "bypass",
2096
- ]),
2097
- Schema.Null,
2098
- ]),
2099
- ),
2100
- description: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
2101
- filter: Schema.optional(
2102
- Schema.Union([
2103
- Schema.Union([
2104
- Schema.Unknown,
2105
- Schema.Struct({
2106
- id: Schema.String,
2107
- deleted: Schema.Boolean,
2108
- }),
2109
- ]),
2110
- Schema.Null,
2111
- ]),
2112
- ),
2113
- paused: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
2114
- priority: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
2115
- products: Schema.optional(
2116
- Schema.Union([
2117
- Schema.Array(
2118
- Schema.Literals([
2119
- "zoneLockdown",
2120
- "uaBlock",
2121
- "bic",
2122
- "hot",
2123
- "securityLevel",
2124
- "rateLimit",
2125
- "waf",
2516
+ export const BulkDeleteRulesResponse =
2517
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
2518
+ result: Schema.Array(
2519
+ Schema.Struct({
2520
+ id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
2521
+ action: Schema.optional(
2522
+ Schema.Union([
2523
+ Schema.Literals([
2524
+ "block",
2525
+ "challenge",
2526
+ "js_challenge",
2527
+ "managed_challenge",
2528
+ "allow",
2529
+ "log",
2530
+ "bypass",
2531
+ ]),
2532
+ Schema.Null,
2126
2533
  ]),
2127
2534
  ),
2128
- Schema.Null,
2129
- ]),
2535
+ description: Schema.optional(
2536
+ Schema.Union([Schema.String, Schema.Null]),
2537
+ ),
2538
+ filter: Schema.optional(
2539
+ Schema.Union([
2540
+ Schema.Union([
2541
+ Schema.Unknown,
2542
+ Schema.Struct({
2543
+ id: Schema.String,
2544
+ deleted: Schema.Boolean,
2545
+ }),
2546
+ ]),
2547
+ Schema.Null,
2548
+ ]),
2549
+ ),
2550
+ paused: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
2551
+ priority: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
2552
+ products: Schema.optional(
2553
+ Schema.Union([
2554
+ Schema.Array(
2555
+ Schema.Literals([
2556
+ "zoneLockdown",
2557
+ "uaBlock",
2558
+ "bic",
2559
+ "hot",
2560
+ "securityLevel",
2561
+ "rateLimit",
2562
+ "waf",
2563
+ ]),
2564
+ ),
2565
+ Schema.Null,
2566
+ ]),
2567
+ ),
2568
+ ref: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
2569
+ }),
2130
2570
  ),
2131
- ref: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
2132
- }),
2133
- ) as unknown as Schema.Schema<BulkDeleteRulesResponse>;
2571
+ }) as unknown as Schema.Schema<BulkDeleteRulesResponse>;
2134
2572
 
2135
2573
  export type BulkDeleteRulesError = DefaultErrors;
2136
2574
 
2137
- export const bulkDeleteRules: API.OperationMethod<
2575
+ export const bulkDeleteRules: API.PaginatedOperationMethod<
2138
2576
  BulkDeleteRulesRequest,
2139
2577
  BulkDeleteRulesResponse,
2140
2578
  BulkDeleteRulesError,
2141
2579
  Credentials | HttpClient.HttpClient
2142
- > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
2580
+ > & {
2581
+ pages: (
2582
+ input: BulkDeleteRulesRequest,
2583
+ ) => stream.Stream<
2584
+ BulkDeleteRulesResponse,
2585
+ BulkDeleteRulesError,
2586
+ Credentials | HttpClient.HttpClient
2587
+ >;
2588
+ items: (input: BulkDeleteRulesRequest) => stream.Stream<
2589
+ {
2590
+ id?: string | null;
2591
+ action?:
2592
+ | "block"
2593
+ | "challenge"
2594
+ | "js_challenge"
2595
+ | "managed_challenge"
2596
+ | "allow"
2597
+ | "log"
2598
+ | "bypass"
2599
+ | null;
2600
+ description?: string | null;
2601
+ filter?: unknown | { id: string; deleted: boolean } | null;
2602
+ paused?: boolean | null;
2603
+ priority?: number | null;
2604
+ products?:
2605
+ | (
2606
+ | "zoneLockdown"
2607
+ | "uaBlock"
2608
+ | "bic"
2609
+ | "hot"
2610
+ | "securityLevel"
2611
+ | "rateLimit"
2612
+ | "waf"
2613
+ )[]
2614
+ | null;
2615
+ ref?: string | null;
2616
+ },
2617
+ BulkDeleteRulesError,
2618
+ Credentials | HttpClient.HttpClient
2619
+ >;
2620
+ } = /*@__PURE__*/ /*#__PURE__*/ API.makePaginated(() => ({
2143
2621
  input: BulkDeleteRulesRequest,
2144
2622
  output: BulkDeleteRulesResponse,
2145
2623
  errors: [],
2624
+ pagination: {
2625
+ mode: "single",
2626
+ items: "result",
2627
+ } as const,
2146
2628
  }));
2147
2629
 
2148
2630
  // =============================================================================
@@ -2202,7 +2684,9 @@ export const GetUaRuleResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
2202
2684
  ]),
2203
2685
  ),
2204
2686
  paused: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
2205
- }) as unknown as Schema.Schema<GetUaRuleResponse>;
2687
+ }).pipe(
2688
+ T.ResponsePath("result"),
2689
+ ) as unknown as Schema.Schema<GetUaRuleResponse>;
2206
2690
 
2207
2691
  export type GetUaRuleError = DefaultErrors;
2208
2692
 
@@ -2237,53 +2721,109 @@ export const ListUaRulesRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
2237
2721
  T.Http({ method: "GET", path: "/zones/{zone_id}/firewall/ua_rules" }),
2238
2722
  ) as unknown as Schema.Schema<ListUaRulesRequest>;
2239
2723
 
2240
- export type ListUaRulesResponse = {
2241
- id?: string | null;
2242
- configuration?: { target?: string | null; value?: string | null } | null;
2243
- description?: string | null;
2244
- mode?: "block" | "challenge" | "js_challenge" | "managed_challenge" | null;
2245
- paused?: boolean | null;
2246
- }[];
2724
+ export interface ListUaRulesResponse {
2725
+ result: {
2726
+ id?: string | null;
2727
+ configuration?: { target?: string | null; value?: string | null } | null;
2728
+ description?: string | null;
2729
+ mode?: "block" | "challenge" | "js_challenge" | "managed_challenge" | null;
2730
+ paused?: boolean | null;
2731
+ }[];
2732
+ resultInfo: {
2733
+ count?: number | null;
2734
+ page?: number | null;
2735
+ perPage?: number | null;
2736
+ totalCount?: number | null;
2737
+ };
2738
+ }
2247
2739
 
2248
- export const ListUaRulesResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Array(
2249
- Schema.Struct({
2250
- id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
2251
- configuration: Schema.optional(
2252
- Schema.Union([
2253
- Schema.Struct({
2254
- target: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
2255
- value: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
2256
- }),
2257
- Schema.Null,
2258
- ]),
2259
- ),
2260
- description: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
2261
- mode: Schema.optional(
2262
- Schema.Union([
2263
- Schema.Literals([
2264
- "block",
2265
- "challenge",
2266
- "js_challenge",
2267
- "managed_challenge",
2740
+ export const ListUaRulesResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
2741
+ result: Schema.Array(
2742
+ Schema.Struct({
2743
+ id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
2744
+ configuration: Schema.optional(
2745
+ Schema.Union([
2746
+ Schema.Struct({
2747
+ target: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
2748
+ value: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
2749
+ }),
2750
+ Schema.Null,
2268
2751
  ]),
2269
- Schema.Null,
2270
- ]),
2271
- ),
2272
- paused: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
2273
- }),
2752
+ ),
2753
+ description: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
2754
+ mode: Schema.optional(
2755
+ Schema.Union([
2756
+ Schema.Literals([
2757
+ "block",
2758
+ "challenge",
2759
+ "js_challenge",
2760
+ "managed_challenge",
2761
+ ]),
2762
+ Schema.Null,
2763
+ ]),
2764
+ ),
2765
+ paused: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
2766
+ }),
2767
+ ),
2768
+ resultInfo: Schema.Struct({
2769
+ count: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
2770
+ page: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
2771
+ perPage: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
2772
+ totalCount: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
2773
+ }).pipe(
2774
+ Schema.encodeKeys({
2775
+ count: "count",
2776
+ page: "page",
2777
+ perPage: "per_page",
2778
+ totalCount: "total_count",
2779
+ }),
2780
+ ),
2781
+ }).pipe(
2782
+ Schema.encodeKeys({ result: "result", resultInfo: "result_info" }),
2274
2783
  ) as unknown as Schema.Schema<ListUaRulesResponse>;
2275
2784
 
2276
2785
  export type ListUaRulesError = DefaultErrors;
2277
2786
 
2278
- export const listUaRules: API.OperationMethod<
2787
+ export const listUaRules: API.PaginatedOperationMethod<
2279
2788
  ListUaRulesRequest,
2280
2789
  ListUaRulesResponse,
2281
2790
  ListUaRulesError,
2282
2791
  Credentials | HttpClient.HttpClient
2283
- > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
2792
+ > & {
2793
+ pages: (
2794
+ input: ListUaRulesRequest,
2795
+ ) => stream.Stream<
2796
+ ListUaRulesResponse,
2797
+ ListUaRulesError,
2798
+ Credentials | HttpClient.HttpClient
2799
+ >;
2800
+ items: (input: ListUaRulesRequest) => stream.Stream<
2801
+ {
2802
+ id?: string | null;
2803
+ configuration?: { target?: string | null; value?: string | null } | null;
2804
+ description?: string | null;
2805
+ mode?:
2806
+ | "block"
2807
+ | "challenge"
2808
+ | "js_challenge"
2809
+ | "managed_challenge"
2810
+ | null;
2811
+ paused?: boolean | null;
2812
+ },
2813
+ ListUaRulesError,
2814
+ Credentials | HttpClient.HttpClient
2815
+ >;
2816
+ } = /*@__PURE__*/ /*#__PURE__*/ API.makePaginated(() => ({
2284
2817
  input: ListUaRulesRequest,
2285
2818
  output: ListUaRulesResponse,
2286
2819
  errors: [],
2820
+ pagination: {
2821
+ mode: "page",
2822
+ inputToken: "page",
2823
+ outputToken: "resultInfo.page",
2824
+ items: "result",
2825
+ pageSize: "perPage",
2826
+ } as const,
2287
2827
  }));
2288
2828
 
2289
2829
  export interface CreateUaRuleRequest {
@@ -2360,7 +2900,9 @@ export const CreateUaRuleResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
2360
2900
  ]),
2361
2901
  ),
2362
2902
  paused: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
2363
- }) as unknown as Schema.Schema<CreateUaRuleResponse>;
2903
+ }).pipe(
2904
+ T.ResponsePath("result"),
2905
+ ) as unknown as Schema.Schema<CreateUaRuleResponse>;
2364
2906
 
2365
2907
  export type CreateUaRuleError = DefaultErrors;
2366
2908
 
@@ -2451,7 +2993,9 @@ export const UpdateUaRuleResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
2451
2993
  ]),
2452
2994
  ),
2453
2995
  paused: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
2454
- }) as unknown as Schema.Schema<UpdateUaRuleResponse>;
2996
+ }).pipe(
2997
+ T.ResponsePath("result"),
2998
+ ) as unknown as Schema.Schema<UpdateUaRuleResponse>;
2455
2999
 
2456
3000
  export type UpdateUaRuleError = DefaultErrors;
2457
3001
 
@@ -2519,7 +3063,9 @@ export const DeleteUaRuleResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
2519
3063
  ]),
2520
3064
  ),
2521
3065
  paused: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
2522
- }) as unknown as Schema.Schema<DeleteUaRuleResponse>;
3066
+ }).pipe(
3067
+ T.ResponsePath("result"),
3068
+ ) as unknown as Schema.Schema<DeleteUaRuleResponse>;
2523
3069
 
2524
3070
  export type DeleteUaRuleError = DefaultErrors;
2525
3071
 
@@ -2670,18 +3216,22 @@ export const GetWafOverrideResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct(
2670
3216
  Schema.Union([Schema.Array(Schema.String), Schema.Null]),
2671
3217
  ),
2672
3218
  },
2673
- ).pipe(
2674
- Schema.encodeKeys({
2675
- id: "id",
2676
- description: "description",
2677
- groups: "groups",
2678
- paused: "paused",
2679
- priority: "priority",
2680
- rewriteAction: "rewrite_action",
2681
- rules: "rules",
2682
- urls: "urls",
2683
- }),
2684
- ) as unknown as Schema.Schema<GetWafOverrideResponse>;
3219
+ )
3220
+ .pipe(
3221
+ Schema.encodeKeys({
3222
+ id: "id",
3223
+ description: "description",
3224
+ groups: "groups",
3225
+ paused: "paused",
3226
+ priority: "priority",
3227
+ rewriteAction: "rewrite_action",
3228
+ rules: "rules",
3229
+ urls: "urls",
3230
+ }),
3231
+ )
3232
+ .pipe(
3233
+ T.ResponsePath("result"),
3234
+ ) as unknown as Schema.Schema<GetWafOverrideResponse>;
2685
3235
 
2686
3236
  export type GetWafOverrideError = DefaultErrors;
2687
3237
 
@@ -2708,139 +3258,243 @@ export const ListWafOverridesRequest =
2708
3258
  T.Http({ method: "GET", path: "/zones/{zone_id}/firewall/waf/overrides" }),
2709
3259
  ) as unknown as Schema.Schema<ListWafOverridesRequest>;
2710
3260
 
2711
- export type ListWafOverridesResponse = {
2712
- id?: string | null;
2713
- description?: string | null;
2714
- groups?: Record<string, unknown> | null;
2715
- paused?: boolean | null;
2716
- priority?: number | null;
2717
- rewriteAction?: {
2718
- block?: "challenge" | "block" | "simulate" | "disable" | "default" | null;
2719
- challenge?:
2720
- | "challenge"
2721
- | "block"
2722
- | "simulate"
2723
- | "disable"
2724
- | "default"
2725
- | null;
2726
- default?: "challenge" | "block" | "simulate" | "disable" | "default" | null;
2727
- disable?: "challenge" | "block" | "simulate" | "disable" | "default" | null;
2728
- simulate?:
2729
- | "challenge"
2730
- | "block"
2731
- | "simulate"
2732
- | "disable"
2733
- | "default"
2734
- | null;
2735
- } | null;
2736
- rules?: unknown | null;
2737
- urls?: string[] | null;
2738
- }[];
2739
-
3261
+ export interface ListWafOverridesResponse {
3262
+ result: {
3263
+ id?: string | null;
3264
+ description?: string | null;
3265
+ groups?: Record<string, unknown> | null;
3266
+ paused?: boolean | null;
3267
+ priority?: number | null;
3268
+ rewriteAction?: {
3269
+ block?: "challenge" | "block" | "simulate" | "disable" | "default" | null;
3270
+ challenge?:
3271
+ | "challenge"
3272
+ | "block"
3273
+ | "simulate"
3274
+ | "disable"
3275
+ | "default"
3276
+ | null;
3277
+ default?:
3278
+ | "challenge"
3279
+ | "block"
3280
+ | "simulate"
3281
+ | "disable"
3282
+ | "default"
3283
+ | null;
3284
+ disable?:
3285
+ | "challenge"
3286
+ | "block"
3287
+ | "simulate"
3288
+ | "disable"
3289
+ | "default"
3290
+ | null;
3291
+ simulate?:
3292
+ | "challenge"
3293
+ | "block"
3294
+ | "simulate"
3295
+ | "disable"
3296
+ | "default"
3297
+ | null;
3298
+ } | null;
3299
+ rules?: unknown | null;
3300
+ urls?: string[] | null;
3301
+ }[];
3302
+ resultInfo: {
3303
+ count?: number | null;
3304
+ page?: number | null;
3305
+ perPage?: number | null;
3306
+ totalCount?: number | null;
3307
+ };
3308
+ }
3309
+
2740
3310
  export const ListWafOverridesResponse =
2741
- /*@__PURE__*/ /*#__PURE__*/ Schema.Array(
2742
- Schema.Struct({
2743
- id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
2744
- description: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
2745
- groups: Schema.optional(Schema.Union([Schema.Struct({}), Schema.Null])),
2746
- paused: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
2747
- priority: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
2748
- rewriteAction: Schema.optional(
2749
- Schema.Union([
2750
- Schema.Struct({
2751
- block: Schema.optional(
2752
- Schema.Union([
2753
- Schema.Literals([
2754
- "challenge",
2755
- "block",
2756
- "simulate",
2757
- "disable",
2758
- "default",
3311
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
3312
+ result: Schema.Array(
3313
+ Schema.Struct({
3314
+ id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
3315
+ description: Schema.optional(
3316
+ Schema.Union([Schema.String, Schema.Null]),
3317
+ ),
3318
+ groups: Schema.optional(Schema.Union([Schema.Struct({}), Schema.Null])),
3319
+ paused: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
3320
+ priority: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
3321
+ rewriteAction: Schema.optional(
3322
+ Schema.Union([
3323
+ Schema.Struct({
3324
+ block: Schema.optional(
3325
+ Schema.Union([
3326
+ Schema.Literals([
3327
+ "challenge",
3328
+ "block",
3329
+ "simulate",
3330
+ "disable",
3331
+ "default",
3332
+ ]),
3333
+ Schema.Null,
2759
3334
  ]),
2760
- Schema.Null,
2761
- ]),
2762
- ),
2763
- challenge: Schema.optional(
2764
- Schema.Union([
2765
- Schema.Literals([
2766
- "challenge",
2767
- "block",
2768
- "simulate",
2769
- "disable",
2770
- "default",
3335
+ ),
3336
+ challenge: Schema.optional(
3337
+ Schema.Union([
3338
+ Schema.Literals([
3339
+ "challenge",
3340
+ "block",
3341
+ "simulate",
3342
+ "disable",
3343
+ "default",
3344
+ ]),
3345
+ Schema.Null,
2771
3346
  ]),
2772
- Schema.Null,
2773
- ]),
2774
- ),
2775
- default: Schema.optional(
2776
- Schema.Union([
2777
- Schema.Literals([
2778
- "challenge",
2779
- "block",
2780
- "simulate",
2781
- "disable",
2782
- "default",
3347
+ ),
3348
+ default: Schema.optional(
3349
+ Schema.Union([
3350
+ Schema.Literals([
3351
+ "challenge",
3352
+ "block",
3353
+ "simulate",
3354
+ "disable",
3355
+ "default",
3356
+ ]),
3357
+ Schema.Null,
2783
3358
  ]),
2784
- Schema.Null,
2785
- ]),
2786
- ),
2787
- disable: Schema.optional(
2788
- Schema.Union([
2789
- Schema.Literals([
2790
- "challenge",
2791
- "block",
2792
- "simulate",
2793
- "disable",
2794
- "default",
3359
+ ),
3360
+ disable: Schema.optional(
3361
+ Schema.Union([
3362
+ Schema.Literals([
3363
+ "challenge",
3364
+ "block",
3365
+ "simulate",
3366
+ "disable",
3367
+ "default",
3368
+ ]),
3369
+ Schema.Null,
2795
3370
  ]),
2796
- Schema.Null,
2797
- ]),
2798
- ),
2799
- simulate: Schema.optional(
2800
- Schema.Union([
2801
- Schema.Literals([
2802
- "challenge",
2803
- "block",
2804
- "simulate",
2805
- "disable",
2806
- "default",
3371
+ ),
3372
+ simulate: Schema.optional(
3373
+ Schema.Union([
3374
+ Schema.Literals([
3375
+ "challenge",
3376
+ "block",
3377
+ "simulate",
3378
+ "disable",
3379
+ "default",
3380
+ ]),
3381
+ Schema.Null,
2807
3382
  ]),
2808
- Schema.Null,
2809
- ]),
2810
- ),
2811
- }),
2812
- Schema.Null,
2813
- ]),
2814
- ),
2815
- rules: Schema.optional(Schema.Union([Schema.Unknown, Schema.Null])),
2816
- urls: Schema.optional(
2817
- Schema.Union([Schema.Array(Schema.String), Schema.Null]),
3383
+ ),
3384
+ }),
3385
+ Schema.Null,
3386
+ ]),
3387
+ ),
3388
+ rules: Schema.optional(Schema.Union([Schema.Unknown, Schema.Null])),
3389
+ urls: Schema.optional(
3390
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
3391
+ ),
3392
+ }).pipe(
3393
+ Schema.encodeKeys({
3394
+ id: "id",
3395
+ description: "description",
3396
+ groups: "groups",
3397
+ paused: "paused",
3398
+ priority: "priority",
3399
+ rewriteAction: "rewrite_action",
3400
+ rules: "rules",
3401
+ urls: "urls",
3402
+ }),
2818
3403
  ),
3404
+ ),
3405
+ resultInfo: Schema.Struct({
3406
+ count: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
3407
+ page: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
3408
+ perPage: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
3409
+ totalCount: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
2819
3410
  }).pipe(
2820
3411
  Schema.encodeKeys({
2821
- id: "id",
2822
- description: "description",
2823
- groups: "groups",
2824
- paused: "paused",
2825
- priority: "priority",
2826
- rewriteAction: "rewrite_action",
2827
- rules: "rules",
2828
- urls: "urls",
3412
+ count: "count",
3413
+ page: "page",
3414
+ perPage: "per_page",
3415
+ totalCount: "total_count",
2829
3416
  }),
2830
3417
  ),
3418
+ }).pipe(
3419
+ Schema.encodeKeys({ result: "result", resultInfo: "result_info" }),
2831
3420
  ) as unknown as Schema.Schema<ListWafOverridesResponse>;
2832
3421
 
2833
3422
  export type ListWafOverridesError = DefaultErrors;
2834
3423
 
2835
- export const listWafOverrides: API.OperationMethod<
3424
+ export const listWafOverrides: API.PaginatedOperationMethod<
2836
3425
  ListWafOverridesRequest,
2837
3426
  ListWafOverridesResponse,
2838
3427
  ListWafOverridesError,
2839
3428
  Credentials | HttpClient.HttpClient
2840
- > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
3429
+ > & {
3430
+ pages: (
3431
+ input: ListWafOverridesRequest,
3432
+ ) => stream.Stream<
3433
+ ListWafOverridesResponse,
3434
+ ListWafOverridesError,
3435
+ Credentials | HttpClient.HttpClient
3436
+ >;
3437
+ items: (input: ListWafOverridesRequest) => stream.Stream<
3438
+ {
3439
+ id?: string | null;
3440
+ description?: string | null;
3441
+ groups?: Record<string, unknown> | null;
3442
+ paused?: boolean | null;
3443
+ priority?: number | null;
3444
+ rewriteAction?: {
3445
+ block?:
3446
+ | "challenge"
3447
+ | "block"
3448
+ | "simulate"
3449
+ | "disable"
3450
+ | "default"
3451
+ | null;
3452
+ challenge?:
3453
+ | "challenge"
3454
+ | "block"
3455
+ | "simulate"
3456
+ | "disable"
3457
+ | "default"
3458
+ | null;
3459
+ default?:
3460
+ | "challenge"
3461
+ | "block"
3462
+ | "simulate"
3463
+ | "disable"
3464
+ | "default"
3465
+ | null;
3466
+ disable?:
3467
+ | "challenge"
3468
+ | "block"
3469
+ | "simulate"
3470
+ | "disable"
3471
+ | "default"
3472
+ | null;
3473
+ simulate?:
3474
+ | "challenge"
3475
+ | "block"
3476
+ | "simulate"
3477
+ | "disable"
3478
+ | "default"
3479
+ | null;
3480
+ } | null;
3481
+ rules?: unknown | null;
3482
+ urls?: string[] | null;
3483
+ },
3484
+ ListWafOverridesError,
3485
+ Credentials | HttpClient.HttpClient
3486
+ >;
3487
+ } = /*@__PURE__*/ /*#__PURE__*/ API.makePaginated(() => ({
2841
3488
  input: ListWafOverridesRequest,
2842
3489
  output: ListWafOverridesResponse,
2843
3490
  errors: [],
3491
+ pagination: {
3492
+ mode: "page",
3493
+ inputToken: "page",
3494
+ outputToken: "resultInfo.page",
3495
+ items: "result",
3496
+ pageSize: "perPage",
3497
+ } as const,
2844
3498
  }));
2845
3499
 
2846
3500
  export interface CreateWafOverrideRequest {
@@ -2973,18 +3627,22 @@ export const CreateWafOverrideResponse =
2973
3627
  urls: Schema.optional(
2974
3628
  Schema.Union([Schema.Array(Schema.String), Schema.Null]),
2975
3629
  ),
2976
- }).pipe(
2977
- Schema.encodeKeys({
2978
- id: "id",
2979
- description: "description",
2980
- groups: "groups",
2981
- paused: "paused",
2982
- priority: "priority",
2983
- rewriteAction: "rewrite_action",
2984
- rules: "rules",
2985
- urls: "urls",
2986
- }),
2987
- ) as unknown as Schema.Schema<CreateWafOverrideResponse>;
3630
+ })
3631
+ .pipe(
3632
+ Schema.encodeKeys({
3633
+ id: "id",
3634
+ description: "description",
3635
+ groups: "groups",
3636
+ paused: "paused",
3637
+ priority: "priority",
3638
+ rewriteAction: "rewrite_action",
3639
+ rules: "rules",
3640
+ urls: "urls",
3641
+ }),
3642
+ )
3643
+ .pipe(
3644
+ T.ResponsePath("result"),
3645
+ ) as unknown as Schema.Schema<CreateWafOverrideResponse>;
2988
3646
 
2989
3647
  export type CreateWafOverrideError = DefaultErrors;
2990
3648
 
@@ -3201,18 +3859,22 @@ export const UpdateWafOverrideResponse =
3201
3859
  urls: Schema.optional(
3202
3860
  Schema.Union([Schema.Array(Schema.String), Schema.Null]),
3203
3861
  ),
3204
- }).pipe(
3205
- Schema.encodeKeys({
3206
- id: "id",
3207
- description: "description",
3208
- groups: "groups",
3209
- paused: "paused",
3210
- priority: "priority",
3211
- rewriteAction: "rewrite_action",
3212
- rules: "rules",
3213
- urls: "urls",
3214
- }),
3215
- ) as unknown as Schema.Schema<UpdateWafOverrideResponse>;
3862
+ })
3863
+ .pipe(
3864
+ Schema.encodeKeys({
3865
+ id: "id",
3866
+ description: "description",
3867
+ groups: "groups",
3868
+ paused: "paused",
3869
+ priority: "priority",
3870
+ rewriteAction: "rewrite_action",
3871
+ rules: "rules",
3872
+ urls: "urls",
3873
+ }),
3874
+ )
3875
+ .pipe(
3876
+ T.ResponsePath("result"),
3877
+ ) as unknown as Schema.Schema<UpdateWafOverrideResponse>;
3216
3878
 
3217
3879
  export type UpdateWafOverrideError = DefaultErrors;
3218
3880
 
@@ -3252,7 +3914,9 @@ export interface DeleteWafOverrideResponse {
3252
3914
  export const DeleteWafOverrideResponse =
3253
3915
  /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
3254
3916
  id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
3255
- }) as unknown as Schema.Schema<DeleteWafOverrideResponse>;
3917
+ }).pipe(
3918
+ T.ResponsePath("result"),
3919
+ ) as unknown as Schema.Schema<DeleteWafOverrideResponse>;
3256
3920
 
3257
3921
  export type DeleteWafOverrideError = DefaultErrors;
3258
3922
 
@@ -3350,23 +4014,69 @@ export const ListWafPackagesRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct(
3350
4014
  T.Http({ method: "GET", path: "/zones/{zone_id}/firewall/waf/packages" }),
3351
4015
  ) as unknown as Schema.Schema<ListWafPackagesRequest>;
3352
4016
 
3353
- export type ListWafPackagesResponse = unknown[];
4017
+ export interface ListWafPackagesResponse {
4018
+ result: unknown[];
4019
+ resultInfo: {
4020
+ count?: number | null;
4021
+ page?: number | null;
4022
+ perPage?: number | null;
4023
+ totalCount?: number | null;
4024
+ };
4025
+ }
3354
4026
 
3355
- export const ListWafPackagesResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Array(
3356
- Schema.Unknown,
3357
- ) as unknown as Schema.Schema<ListWafPackagesResponse>;
4027
+ export const ListWafPackagesResponse =
4028
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
4029
+ result: Schema.Array(Schema.Unknown),
4030
+ resultInfo: Schema.Struct({
4031
+ count: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
4032
+ page: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
4033
+ perPage: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
4034
+ totalCount: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
4035
+ }).pipe(
4036
+ Schema.encodeKeys({
4037
+ count: "count",
4038
+ page: "page",
4039
+ perPage: "per_page",
4040
+ totalCount: "total_count",
4041
+ }),
4042
+ ),
4043
+ }).pipe(
4044
+ Schema.encodeKeys({ result: "result", resultInfo: "result_info" }),
4045
+ ) as unknown as Schema.Schema<ListWafPackagesResponse>;
3358
4046
 
3359
4047
  export type ListWafPackagesError = DefaultErrors;
3360
4048
 
3361
- export const listWafPackages: API.OperationMethod<
4049
+ export const listWafPackages: API.PaginatedOperationMethod<
3362
4050
  ListWafPackagesRequest,
3363
4051
  ListWafPackagesResponse,
3364
4052
  ListWafPackagesError,
3365
4053
  Credentials | HttpClient.HttpClient
3366
- > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
4054
+ > & {
4055
+ pages: (
4056
+ input: ListWafPackagesRequest,
4057
+ ) => stream.Stream<
4058
+ ListWafPackagesResponse,
4059
+ ListWafPackagesError,
4060
+ Credentials | HttpClient.HttpClient
4061
+ >;
4062
+ items: (
4063
+ input: ListWafPackagesRequest,
4064
+ ) => stream.Stream<
4065
+ unknown,
4066
+ ListWafPackagesError,
4067
+ Credentials | HttpClient.HttpClient
4068
+ >;
4069
+ } = /*@__PURE__*/ /*#__PURE__*/ API.makePaginated(() => ({
3367
4070
  input: ListWafPackagesRequest,
3368
4071
  output: ListWafPackagesResponse,
3369
4072
  errors: [],
4073
+ pagination: {
4074
+ mode: "page",
4075
+ inputToken: "page",
4076
+ outputToken: "resultInfo.page",
4077
+ items: "result",
4078
+ pageSize: "perPage",
4079
+ } as const,
3370
4080
  }));
3371
4081
 
3372
4082
  // =============================================================================
@@ -3395,10 +4105,9 @@ export const GetWafPackageGroupRequest =
3395
4105
  export type GetWafPackageGroupResponse = string | null;
3396
4106
 
3397
4107
  export const GetWafPackageGroupResponse =
3398
- /*@__PURE__*/ /*#__PURE__*/ Schema.Union([
3399
- Schema.String,
3400
- Schema.Null,
3401
- ]) as unknown as Schema.Schema<GetWafPackageGroupResponse>;
4108
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Union([Schema.String, Schema.Null]).pipe(
4109
+ T.ResponsePath("result"),
4110
+ ) as unknown as Schema.Schema<GetWafPackageGroupResponse>;
3402
4111
 
3403
4112
  export type GetWafPackageGroupError = DefaultErrors;
3404
4113
 
@@ -3456,60 +4165,114 @@ export const ListWafPackageGroupsRequest =
3456
4165
  }),
3457
4166
  ) as unknown as Schema.Schema<ListWafPackageGroupsRequest>;
3458
4167
 
3459
- export type ListWafPackageGroupsResponse = {
3460
- id: string;
3461
- description: string | null;
3462
- mode: "on" | "off";
3463
- name: string;
3464
- rulesCount: number;
3465
- allowedModes?: ("on" | "off")[] | null;
3466
- modifiedRulesCount?: number | null;
3467
- packageId?: string | null;
3468
- }[];
4168
+ export interface ListWafPackageGroupsResponse {
4169
+ result: {
4170
+ id: string;
4171
+ description: string | null;
4172
+ mode: "on" | "off";
4173
+ name: string;
4174
+ rulesCount: number;
4175
+ allowedModes?: ("on" | "off")[] | null;
4176
+ modifiedRulesCount?: number | null;
4177
+ packageId?: string | null;
4178
+ }[];
4179
+ resultInfo: {
4180
+ count?: number | null;
4181
+ page?: number | null;
4182
+ perPage?: number | null;
4183
+ totalCount?: number | null;
4184
+ };
4185
+ }
3469
4186
 
3470
4187
  export const ListWafPackageGroupsResponse =
3471
- /*@__PURE__*/ /*#__PURE__*/ Schema.Array(
3472
- Schema.Struct({
3473
- id: Schema.String,
3474
- description: Schema.Union([Schema.String, Schema.Null]),
3475
- mode: Schema.Literals(["on", "off"]),
3476
- name: Schema.String,
3477
- rulesCount: Schema.Number,
3478
- allowedModes: Schema.optional(
3479
- Schema.Union([
3480
- Schema.Array(Schema.Literals(["on", "off"])),
3481
- Schema.Null,
3482
- ]),
3483
- ),
3484
- modifiedRulesCount: Schema.optional(
3485
- Schema.Union([Schema.Number, Schema.Null]),
4188
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
4189
+ result: Schema.Array(
4190
+ Schema.Struct({
4191
+ id: Schema.String,
4192
+ description: Schema.Union([Schema.String, Schema.Null]),
4193
+ mode: Schema.Literals(["on", "off"]),
4194
+ name: Schema.String,
4195
+ rulesCount: Schema.Number,
4196
+ allowedModes: Schema.optional(
4197
+ Schema.Union([
4198
+ Schema.Array(Schema.Literals(["on", "off"])),
4199
+ Schema.Null,
4200
+ ]),
4201
+ ),
4202
+ modifiedRulesCount: Schema.optional(
4203
+ Schema.Union([Schema.Number, Schema.Null]),
4204
+ ),
4205
+ packageId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
4206
+ }).pipe(
4207
+ Schema.encodeKeys({
4208
+ id: "id",
4209
+ description: "description",
4210
+ mode: "mode",
4211
+ name: "name",
4212
+ rulesCount: "rules_count",
4213
+ allowedModes: "allowed_modes",
4214
+ modifiedRulesCount: "modified_rules_count",
4215
+ packageId: "package_id",
4216
+ }),
3486
4217
  ),
3487
- packageId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
4218
+ ),
4219
+ resultInfo: Schema.Struct({
4220
+ count: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
4221
+ page: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
4222
+ perPage: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
4223
+ totalCount: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
3488
4224
  }).pipe(
3489
4225
  Schema.encodeKeys({
3490
- id: "id",
3491
- description: "description",
3492
- mode: "mode",
3493
- name: "name",
3494
- rulesCount: "rules_count",
3495
- allowedModes: "allowed_modes",
3496
- modifiedRulesCount: "modified_rules_count",
3497
- packageId: "package_id",
4226
+ count: "count",
4227
+ page: "page",
4228
+ perPage: "per_page",
4229
+ totalCount: "total_count",
3498
4230
  }),
3499
4231
  ),
4232
+ }).pipe(
4233
+ Schema.encodeKeys({ result: "result", resultInfo: "result_info" }),
3500
4234
  ) as unknown as Schema.Schema<ListWafPackageGroupsResponse>;
3501
4235
 
3502
4236
  export type ListWafPackageGroupsError = DefaultErrors;
3503
4237
 
3504
- export const listWafPackageGroups: API.OperationMethod<
4238
+ export const listWafPackageGroups: API.PaginatedOperationMethod<
3505
4239
  ListWafPackageGroupsRequest,
3506
4240
  ListWafPackageGroupsResponse,
3507
4241
  ListWafPackageGroupsError,
3508
4242
  Credentials | HttpClient.HttpClient
3509
- > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
4243
+ > & {
4244
+ pages: (
4245
+ input: ListWafPackageGroupsRequest,
4246
+ ) => stream.Stream<
4247
+ ListWafPackageGroupsResponse,
4248
+ ListWafPackageGroupsError,
4249
+ Credentials | HttpClient.HttpClient
4250
+ >;
4251
+ items: (input: ListWafPackageGroupsRequest) => stream.Stream<
4252
+ {
4253
+ id: string;
4254
+ description: string | null;
4255
+ mode: "on" | "off";
4256
+ name: string;
4257
+ rulesCount: number;
4258
+ allowedModes?: ("on" | "off")[] | null;
4259
+ modifiedRulesCount?: number | null;
4260
+ packageId?: string | null;
4261
+ },
4262
+ ListWafPackageGroupsError,
4263
+ Credentials | HttpClient.HttpClient
4264
+ >;
4265
+ } = /*@__PURE__*/ /*#__PURE__*/ API.makePaginated(() => ({
3510
4266
  input: ListWafPackageGroupsRequest,
3511
4267
  output: ListWafPackageGroupsResponse,
3512
4268
  errors: [],
4269
+ pagination: {
4270
+ mode: "page",
4271
+ inputToken: "page",
4272
+ outputToken: "resultInfo.page",
4273
+ items: "result",
4274
+ pageSize: "perPage",
4275
+ } as const,
3513
4276
  }));
3514
4277
 
3515
4278
  export interface PatchWafPackageGroupRequest {
@@ -3537,10 +4300,9 @@ export const PatchWafPackageGroupRequest =
3537
4300
  export type PatchWafPackageGroupResponse = string | null;
3538
4301
 
3539
4302
  export const PatchWafPackageGroupResponse =
3540
- /*@__PURE__*/ /*#__PURE__*/ Schema.Union([
3541
- Schema.String,
3542
- Schema.Null,
3543
- ]) as unknown as Schema.Schema<PatchWafPackageGroupResponse>;
4303
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Union([Schema.String, Schema.Null]).pipe(
4304
+ T.ResponsePath("result"),
4305
+ ) as unknown as Schema.Schema<PatchWafPackageGroupResponse>;
3544
4306
 
3545
4307
  export type PatchWafPackageGroupError = DefaultErrors;
3546
4308
 
@@ -3581,10 +4343,9 @@ export const GetWafPackageRuleRequest =
3581
4343
  export type GetWafPackageRuleResponse = string | null;
3582
4344
 
3583
4345
  export const GetWafPackageRuleResponse =
3584
- /*@__PURE__*/ /*#__PURE__*/ Schema.Union([
3585
- Schema.String,
3586
- Schema.Null,
3587
- ]) as unknown as Schema.Schema<GetWafPackageRuleResponse>;
4346
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Union([Schema.String, Schema.Null]).pipe(
4347
+ T.ResponsePath("result"),
4348
+ ) as unknown as Schema.Schema<GetWafPackageRuleResponse>;
3588
4349
 
3589
4350
  export type GetWafPackageRuleError = DefaultErrors;
3590
4351
 
@@ -3647,110 +4408,179 @@ export const ListWafPackageRulesRequest =
3647
4408
  }),
3648
4409
  ) as unknown as Schema.Schema<ListWafPackageRulesRequest>;
3649
4410
 
3650
- export type ListWafPackageRulesResponse = (
3651
- | {
3652
- id: string;
3653
- allowedModes: ("on" | "off")[];
3654
- description: string;
3655
- group: unknown;
3656
- mode: "on" | "off";
3657
- packageId: string;
3658
- priority: string;
3659
- }
3660
- | {
3661
- id: string;
3662
- allowedModes: (
3663
- | "default"
3664
- | "disable"
3665
- | "simulate"
3666
- | "block"
3667
- | "challenge"
3668
- )[];
3669
- defaultMode: "disable" | "simulate" | "block" | "challenge";
3670
- description: string;
3671
- group: unknown;
3672
- mode: "default" | "disable" | "simulate" | "block" | "challenge";
3673
- packageId: string;
3674
- priority: string;
3675
- }
3676
- )[];
4411
+ export interface ListWafPackageRulesResponse {
4412
+ result: (
4413
+ | {
4414
+ id: string;
4415
+ allowedModes: ("on" | "off")[];
4416
+ description: string;
4417
+ group: unknown;
4418
+ mode: "on" | "off";
4419
+ packageId: string;
4420
+ priority: string;
4421
+ }
4422
+ | {
4423
+ id: string;
4424
+ allowedModes: (
4425
+ | "default"
4426
+ | "disable"
4427
+ | "simulate"
4428
+ | "block"
4429
+ | "challenge"
4430
+ )[];
4431
+ defaultMode: "disable" | "simulate" | "block" | "challenge";
4432
+ description: string;
4433
+ group: unknown;
4434
+ mode: "default" | "disable" | "simulate" | "block" | "challenge";
4435
+ packageId: string;
4436
+ priority: string;
4437
+ }
4438
+ )[];
4439
+ resultInfo: {
4440
+ count?: number | null;
4441
+ page?: number | null;
4442
+ perPage?: number | null;
4443
+ totalCount?: number | null;
4444
+ };
4445
+ }
3677
4446
 
3678
4447
  export const ListWafPackageRulesResponse =
3679
- /*@__PURE__*/ /*#__PURE__*/ Schema.Array(
3680
- Schema.Union([
3681
- Schema.Struct({
3682
- id: Schema.String,
3683
- allowedModes: Schema.Array(Schema.Literals(["on", "off"])),
3684
- description: Schema.String,
3685
- group: Schema.Unknown,
3686
- mode: Schema.Literals(["on", "off"]),
3687
- packageId: Schema.String,
3688
- priority: Schema.String,
3689
- }).pipe(
3690
- Schema.encodeKeys({
3691
- id: "id",
3692
- allowedModes: "allowed_modes",
3693
- description: "description",
3694
- group: "group",
3695
- mode: "mode",
3696
- packageId: "package_id",
3697
- priority: "priority",
3698
- }),
3699
- ),
3700
- Schema.Struct({
3701
- id: Schema.String,
3702
- allowedModes: Schema.Array(
3703
- Schema.Literals([
4448
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
4449
+ result: Schema.Array(
4450
+ Schema.Union([
4451
+ Schema.Struct({
4452
+ id: Schema.String,
4453
+ allowedModes: Schema.Array(Schema.Literals(["on", "off"])),
4454
+ description: Schema.String,
4455
+ group: Schema.Unknown,
4456
+ mode: Schema.Literals(["on", "off"]),
4457
+ packageId: Schema.String,
4458
+ priority: Schema.String,
4459
+ }).pipe(
4460
+ Schema.encodeKeys({
4461
+ id: "id",
4462
+ allowedModes: "allowed_modes",
4463
+ description: "description",
4464
+ group: "group",
4465
+ mode: "mode",
4466
+ packageId: "package_id",
4467
+ priority: "priority",
4468
+ }),
4469
+ ),
4470
+ Schema.Struct({
4471
+ id: Schema.String,
4472
+ allowedModes: Schema.Array(
4473
+ Schema.Literals([
4474
+ "default",
4475
+ "disable",
4476
+ "simulate",
4477
+ "block",
4478
+ "challenge",
4479
+ ]),
4480
+ ),
4481
+ defaultMode: Schema.Literals([
4482
+ "disable",
4483
+ "simulate",
4484
+ "block",
4485
+ "challenge",
4486
+ ]),
4487
+ description: Schema.String,
4488
+ group: Schema.Unknown,
4489
+ mode: Schema.Literals([
3704
4490
  "default",
3705
4491
  "disable",
3706
4492
  "simulate",
3707
4493
  "block",
3708
4494
  "challenge",
3709
4495
  ]),
4496
+ packageId: Schema.String,
4497
+ priority: Schema.String,
4498
+ }).pipe(
4499
+ Schema.encodeKeys({
4500
+ id: "id",
4501
+ allowedModes: "allowed_modes",
4502
+ defaultMode: "default_mode",
4503
+ description: "description",
4504
+ group: "group",
4505
+ mode: "mode",
4506
+ packageId: "package_id",
4507
+ priority: "priority",
4508
+ }),
3710
4509
  ),
3711
- defaultMode: Schema.Literals([
3712
- "disable",
3713
- "simulate",
3714
- "block",
3715
- "challenge",
3716
- ]),
3717
- description: Schema.String,
3718
- group: Schema.Unknown,
3719
- mode: Schema.Literals([
3720
- "default",
3721
- "disable",
3722
- "simulate",
3723
- "block",
3724
- "challenge",
3725
- ]),
3726
- packageId: Schema.String,
3727
- priority: Schema.String,
3728
- }).pipe(
3729
- Schema.encodeKeys({
3730
- id: "id",
3731
- allowedModes: "allowed_modes",
3732
- defaultMode: "default_mode",
3733
- description: "description",
3734
- group: "group",
3735
- mode: "mode",
3736
- packageId: "package_id",
3737
- priority: "priority",
3738
- }),
3739
- ),
3740
- ]),
4510
+ ]),
4511
+ ),
4512
+ resultInfo: Schema.Struct({
4513
+ count: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
4514
+ page: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
4515
+ perPage: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
4516
+ totalCount: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
4517
+ }).pipe(
4518
+ Schema.encodeKeys({
4519
+ count: "count",
4520
+ page: "page",
4521
+ perPage: "per_page",
4522
+ totalCount: "total_count",
4523
+ }),
4524
+ ),
4525
+ }).pipe(
4526
+ Schema.encodeKeys({ result: "result", resultInfo: "result_info" }),
3741
4527
  ) as unknown as Schema.Schema<ListWafPackageRulesResponse>;
3742
4528
 
3743
4529
  export type ListWafPackageRulesError = DefaultErrors;
3744
4530
 
3745
- export const listWafPackageRules: API.OperationMethod<
4531
+ export const listWafPackageRules: API.PaginatedOperationMethod<
3746
4532
  ListWafPackageRulesRequest,
3747
4533
  ListWafPackageRulesResponse,
3748
4534
  ListWafPackageRulesError,
3749
4535
  Credentials | HttpClient.HttpClient
3750
- > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
4536
+ > & {
4537
+ pages: (
4538
+ input: ListWafPackageRulesRequest,
4539
+ ) => stream.Stream<
4540
+ ListWafPackageRulesResponse,
4541
+ ListWafPackageRulesError,
4542
+ Credentials | HttpClient.HttpClient
4543
+ >;
4544
+ items: (input: ListWafPackageRulesRequest) => stream.Stream<
4545
+ | {
4546
+ id: string;
4547
+ allowedModes: ("on" | "off")[];
4548
+ description: string;
4549
+ group: unknown;
4550
+ mode: "on" | "off";
4551
+ packageId: string;
4552
+ priority: string;
4553
+ }
4554
+ | {
4555
+ id: string;
4556
+ allowedModes: (
4557
+ | "default"
4558
+ | "disable"
4559
+ | "simulate"
4560
+ | "block"
4561
+ | "challenge"
4562
+ )[];
4563
+ defaultMode: "disable" | "simulate" | "block" | "challenge";
4564
+ description: string;
4565
+ group: unknown;
4566
+ mode: "default" | "disable" | "simulate" | "block" | "challenge";
4567
+ packageId: string;
4568
+ priority: string;
4569
+ },
4570
+ ListWafPackageRulesError,
4571
+ Credentials | HttpClient.HttpClient
4572
+ >;
4573
+ } = /*@__PURE__*/ /*#__PURE__*/ API.makePaginated(() => ({
3751
4574
  input: ListWafPackageRulesRequest,
3752
4575
  output: ListWafPackageRulesResponse,
3753
4576
  errors: [],
4577
+ pagination: {
4578
+ mode: "page",
4579
+ inputToken: "page",
4580
+ outputToken: "resultInfo.page",
4581
+ items: "result",
4582
+ pageSize: "perPage",
4583
+ } as const,
3754
4584
  }));
3755
4585
 
3756
4586
  export interface PatchWafPackageRuleRequest {
@@ -3880,7 +4710,9 @@ export const PatchWafPackageRuleResponse =
3880
4710
  priority: "priority",
3881
4711
  }),
3882
4712
  ),
3883
- ]) as unknown as Schema.Schema<PatchWafPackageRuleResponse>;
4713
+ ]).pipe(
4714
+ T.ResponsePath("result"),
4715
+ ) as unknown as Schema.Schema<PatchWafPackageRuleResponse>;
3884
4716
 
3885
4717
  export type PatchWafPackageRuleError = DefaultErrors;
3886
4718