@distilled.cloud/cloudflare 0.6.1 → 0.7.1

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 (261) hide show
  1. package/lib/services/accounts.d.ts +901 -36
  2. package/lib/services/accounts.d.ts.map +1 -1
  3. package/lib/services/accounts.js +1386 -32
  4. package/lib/services/accounts.js.map +1 -1
  5. package/lib/services/addressing.d.ts +8 -2
  6. package/lib/services/addressing.d.ts.map +1 -1
  7. package/lib/services/addressing.js +14 -2
  8. package/lib/services/addressing.js.map +1 -1
  9. package/lib/services/ai-gateway.d.ts.map +1 -1
  10. package/lib/services/ai-gateway.js +7 -7
  11. package/lib/services/ai-gateway.js.map +1 -1
  12. package/lib/services/aisearch.d.ts.map +1 -1
  13. package/lib/services/aisearch.js +24 -9
  14. package/lib/services/aisearch.js.map +1 -1
  15. package/lib/services/alerting.js +2 -2
  16. package/lib/services/alerting.js.map +1 -1
  17. package/lib/services/api-gateway.d.ts +114 -16
  18. package/lib/services/api-gateway.d.ts.map +1 -1
  19. package/lib/services/api-gateway.js +187 -15
  20. package/lib/services/api-gateway.js.map +1 -1
  21. package/lib/services/audit-logs.d.ts +63 -3
  22. package/lib/services/audit-logs.d.ts.map +1 -1
  23. package/lib/services/audit-logs.js +62 -3
  24. package/lib/services/audit-logs.js.map +1 -1
  25. package/lib/services/bot-management.d.ts +54 -8
  26. package/lib/services/bot-management.d.ts.map +1 -1
  27. package/lib/services/bot-management.js +128 -16
  28. package/lib/services/bot-management.js.map +1 -1
  29. package/lib/services/brand-protection.d.ts.map +1 -1
  30. package/lib/services/brand-protection.js +26 -8
  31. package/lib/services/brand-protection.js.map +1 -1
  32. package/lib/services/browser-rendering.d.ts.map +1 -1
  33. package/lib/services/browser-rendering.js +13 -10
  34. package/lib/services/browser-rendering.js.map +1 -1
  35. package/lib/services/cloudforce-one.d.ts +61 -6
  36. package/lib/services/cloudforce-one.d.ts.map +1 -1
  37. package/lib/services/cloudforce-one.js +107 -6
  38. package/lib/services/cloudforce-one.js.map +1 -1
  39. package/lib/services/custom-certificates.d.ts +145 -8
  40. package/lib/services/custom-certificates.d.ts.map +1 -1
  41. package/lib/services/custom-certificates.js +226 -7
  42. package/lib/services/custom-certificates.js.map +1 -1
  43. package/lib/services/custom-hostnames.d.ts +8 -8
  44. package/lib/services/custom-hostnames.d.ts.map +1 -1
  45. package/lib/services/custom-hostnames.js +17 -14
  46. package/lib/services/custom-hostnames.js.map +1 -1
  47. package/lib/services/d1.d.ts +68 -8
  48. package/lib/services/d1.d.ts.map +1 -1
  49. package/lib/services/d1.js +96 -8
  50. package/lib/services/d1.js.map +1 -1
  51. package/lib/services/dns-firewall.d.ts +57 -4
  52. package/lib/services/dns-firewall.d.ts.map +1 -1
  53. package/lib/services/dns-firewall.js +86 -5
  54. package/lib/services/dns-firewall.js.map +1 -1
  55. package/lib/services/dns.d.ts +85 -745
  56. package/lib/services/dns.d.ts.map +1 -1
  57. package/lib/services/dns.js +118 -1424
  58. package/lib/services/dns.js.map +1 -1
  59. package/lib/services/email-routing.d.ts +59 -7
  60. package/lib/services/email-routing.d.ts.map +1 -1
  61. package/lib/services/email-routing.js +165 -7
  62. package/lib/services/email-routing.js.map +1 -1
  63. package/lib/services/firewall.d.ts +228 -39
  64. package/lib/services/firewall.d.ts.map +1 -1
  65. package/lib/services/firewall.js +220 -33
  66. package/lib/services/firewall.js.map +1 -1
  67. package/lib/services/healthchecks.d.ts +112 -6
  68. package/lib/services/healthchecks.d.ts.map +1 -1
  69. package/lib/services/healthchecks.js +248 -14
  70. package/lib/services/healthchecks.js.map +1 -1
  71. package/lib/services/hostnames.d.ts +5 -5
  72. package/lib/services/hostnames.d.ts.map +1 -1
  73. package/lib/services/hostnames.js +16 -4
  74. package/lib/services/hostnames.js.map +1 -1
  75. package/lib/services/hyperdrive.d.ts +223 -11
  76. package/lib/services/hyperdrive.d.ts.map +1 -1
  77. package/lib/services/hyperdrive.js +351 -11
  78. package/lib/services/hyperdrive.js.map +1 -1
  79. package/lib/services/iam.d.ts +62 -2
  80. package/lib/services/iam.d.ts.map +1 -1
  81. package/lib/services/iam.js +82 -11
  82. package/lib/services/iam.js.map +1 -1
  83. package/lib/services/images.d.ts +9 -1
  84. package/lib/services/images.d.ts.map +1 -1
  85. package/lib/services/images.js +12 -1
  86. package/lib/services/images.js.map +1 -1
  87. package/lib/services/intel.d.ts +4 -4
  88. package/lib/services/intel.d.ts.map +1 -1
  89. package/lib/services/intel.js +2 -3
  90. package/lib/services/intel.js.map +1 -1
  91. package/lib/services/kv.d.ts.map +1 -1
  92. package/lib/services/kv.js +2 -2
  93. package/lib/services/kv.js.map +1 -1
  94. package/lib/services/load-balancers.d.ts +537 -108
  95. package/lib/services/load-balancers.d.ts.map +1 -1
  96. package/lib/services/load-balancers.js +1266 -161
  97. package/lib/services/load-balancers.js.map +1 -1
  98. package/lib/services/logpush.d.ts +153 -9
  99. package/lib/services/logpush.d.ts.map +1 -1
  100. package/lib/services/logpush.js +246 -9
  101. package/lib/services/logpush.js.map +1 -1
  102. package/lib/services/magic-cloud-networking.d.ts.map +1 -1
  103. package/lib/services/magic-cloud-networking.js +54 -30
  104. package/lib/services/magic-cloud-networking.js.map +1 -1
  105. package/lib/services/magic-network-monitoring.d.ts +46 -5
  106. package/lib/services/magic-network-monitoring.d.ts.map +1 -1
  107. package/lib/services/magic-network-monitoring.js +79 -5
  108. package/lib/services/magic-network-monitoring.js.map +1 -1
  109. package/lib/services/magic-transit.d.ts +127 -21
  110. package/lib/services/magic-transit.d.ts.map +1 -1
  111. package/lib/services/magic-transit.js +291 -29
  112. package/lib/services/magic-transit.js.map +1 -1
  113. package/lib/services/memberships.d.ts +248 -52
  114. package/lib/services/memberships.d.ts.map +1 -1
  115. package/lib/services/memberships.js +360 -39
  116. package/lib/services/memberships.js.map +1 -1
  117. package/lib/services/page-rules.d.ts +432 -8
  118. package/lib/services/page-rules.d.ts.map +1 -1
  119. package/lib/services/page-rules.js +877 -33
  120. package/lib/services/page-rules.js.map +1 -1
  121. package/lib/services/pages.d.ts +457 -297
  122. package/lib/services/pages.d.ts.map +1 -1
  123. package/lib/services/pages.js +1366 -491
  124. package/lib/services/pages.js.map +1 -1
  125. package/lib/services/pipelines.d.ts +96 -76
  126. package/lib/services/pipelines.d.ts.map +1 -1
  127. package/lib/services/pipelines.js +145 -197
  128. package/lib/services/pipelines.js.map +1 -1
  129. package/lib/services/queues.d.ts +228 -12
  130. package/lib/services/queues.d.ts.map +1 -1
  131. package/lib/services/queues.js +487 -11
  132. package/lib/services/queues.js.map +1 -1
  133. package/lib/services/radar.d.ts +82 -18
  134. package/lib/services/radar.d.ts.map +1 -1
  135. package/lib/services/radar.js +111 -47
  136. package/lib/services/radar.js.map +1 -1
  137. package/lib/services/realtime-kit.d.ts +650 -334
  138. package/lib/services/realtime-kit.d.ts.map +1 -1
  139. package/lib/services/realtime-kit.js +1472 -693
  140. package/lib/services/realtime-kit.js.map +1 -1
  141. package/lib/services/request-tracers.d.ts +12 -1
  142. package/lib/services/request-tracers.d.ts.map +1 -1
  143. package/lib/services/request-tracers.js +28 -3
  144. package/lib/services/request-tracers.js.map +1 -1
  145. package/lib/services/rules.d.ts +65 -10
  146. package/lib/services/rules.d.ts.map +1 -1
  147. package/lib/services/rules.js +102 -8
  148. package/lib/services/rules.js.map +1 -1
  149. package/lib/services/rulesets.d.ts +7892 -1806
  150. package/lib/services/rulesets.d.ts.map +1 -1
  151. package/lib/services/rulesets.js +18720 -4149
  152. package/lib/services/rulesets.js.map +1 -1
  153. package/lib/services/rum.d.ts +45 -5
  154. package/lib/services/rum.d.ts.map +1 -1
  155. package/lib/services/rum.js +80 -4
  156. package/lib/services/rum.js.map +1 -1
  157. package/lib/services/schema-validation.js +2 -2
  158. package/lib/services/schema-validation.js.map +1 -1
  159. package/lib/services/spectrum.d.ts +139 -33
  160. package/lib/services/spectrum.d.ts.map +1 -1
  161. package/lib/services/spectrum.js +190 -34
  162. package/lib/services/spectrum.js.map +1 -1
  163. package/lib/services/speed.d.ts +345 -24
  164. package/lib/services/speed.d.ts.map +1 -1
  165. package/lib/services/speed.js +785 -19
  166. package/lib/services/speed.js.map +1 -1
  167. package/lib/services/ssl.d.ts +6 -6
  168. package/lib/services/ssl.d.ts.map +1 -1
  169. package/lib/services/ssl.js +5 -5
  170. package/lib/services/ssl.js.map +1 -1
  171. package/lib/services/stream.d.ts +171 -17
  172. package/lib/services/stream.d.ts.map +1 -1
  173. package/lib/services/stream.js +164 -11
  174. package/lib/services/stream.js.map +1 -1
  175. package/lib/services/token-validation.d.ts +16 -2
  176. package/lib/services/token-validation.d.ts.map +1 -1
  177. package/lib/services/token-validation.js +32 -2
  178. package/lib/services/token-validation.js.map +1 -1
  179. package/lib/services/url-scanner.d.ts +43 -11
  180. package/lib/services/url-scanner.d.ts.map +1 -1
  181. package/lib/services/url-scanner.js +46 -11
  182. package/lib/services/url-scanner.js.map +1 -1
  183. package/lib/services/user.d.ts +312 -21
  184. package/lib/services/user.d.ts.map +1 -1
  185. package/lib/services/user.js +442 -19
  186. package/lib/services/user.js.map +1 -1
  187. package/lib/services/workers-for-platforms.d.ts +223 -13
  188. package/lib/services/workers-for-platforms.d.ts.map +1 -1
  189. package/lib/services/workers-for-platforms.js +481 -13
  190. package/lib/services/workers-for-platforms.js.map +1 -1
  191. package/lib/services/workers.d.ts +345 -31
  192. package/lib/services/workers.d.ts.map +1 -1
  193. package/lib/services/workers.js +649 -34
  194. package/lib/services/workers.js.map +1 -1
  195. package/lib/services/zaraz.d.ts +212 -11
  196. package/lib/services/zaraz.d.ts.map +1 -1
  197. package/lib/services/zaraz.js +311 -30
  198. package/lib/services/zaraz.js.map +1 -1
  199. package/lib/services/zero-trust.d.ts +19333 -1905
  200. package/lib/services/zero-trust.d.ts.map +1 -1
  201. package/lib/services/zero-trust.js +30269 -5710
  202. package/lib/services/zero-trust.js.map +1 -1
  203. package/lib/services/zones.d.ts +61 -7
  204. package/lib/services/zones.d.ts.map +1 -1
  205. package/lib/services/zones.js +188 -7
  206. package/lib/services/zones.js.map +1 -1
  207. package/package.json +2 -2
  208. package/src/services/accounts.ts +2897 -63
  209. package/src/services/addressing.ts +28 -4
  210. package/src/services/ai-gateway.ts +9 -7
  211. package/src/services/aisearch.ts +28 -9
  212. package/src/services/alerting.ts +2 -2
  213. package/src/services/api-gateway.ts +410 -27
  214. package/src/services/audit-logs.ts +135 -5
  215. package/src/services/bot-management.ts +282 -24
  216. package/src/services/brand-protection.ts +28 -8
  217. package/src/services/browser-rendering.ts +31 -11
  218. package/src/services/cloudforce-one.ts +201 -9
  219. package/src/services/custom-certificates.ts +405 -14
  220. package/src/services/custom-hostnames.ts +29 -22
  221. package/src/services/d1.ts +180 -12
  222. package/src/services/dns-firewall.ts +163 -7
  223. package/src/services/dns.ts +213 -2389
  224. package/src/services/email-routing.ts +346 -12
  225. package/src/services/firewall.ts +556 -72
  226. package/src/services/healthchecks.ts +463 -18
  227. package/src/services/hostnames.ts +21 -9
  228. package/src/services/hyperdrive.ts +730 -17
  229. package/src/services/iam.ts +228 -24
  230. package/src/services/images.ts +29 -2
  231. package/src/services/intel.ts +6 -5
  232. package/src/services/kv.ts +6 -2
  233. package/src/services/load-balancers.ts +2387 -294
  234. package/src/services/logpush.ts +659 -15
  235. package/src/services/magic-cloud-networking.ts +74 -30
  236. package/src/services/magic-network-monitoring.ts +170 -8
  237. package/src/services/magic-transit.ts +631 -62
  238. package/src/services/memberships.ts +710 -91
  239. package/src/services/page-rules.ts +1592 -88
  240. package/src/services/pages.ts +2011 -1098
  241. package/src/services/pipelines.ts +285 -331
  242. package/src/services/queues.ts +1110 -22
  243. package/src/services/radar.ts +128 -64
  244. package/src/services/realtime-kit.ts +2829 -1603
  245. package/src/services/request-tracers.ts +54 -4
  246. package/src/services/rules.ts +214 -18
  247. package/src/services/rulesets.ts +34524 -6913
  248. package/src/services/rum.ts +187 -9
  249. package/src/services/schema-validation.ts +2 -2
  250. package/src/services/spectrum.ts +357 -67
  251. package/src/services/speed.ts +1845 -42
  252. package/src/services/ssl.ts +11 -11
  253. package/src/services/stream.ts +397 -22
  254. package/src/services/token-validation.ts +64 -4
  255. package/src/services/url-scanner.ts +92 -20
  256. package/src/services/user.ts +973 -34
  257. package/src/services/workers-for-platforms.ts +1012 -39
  258. package/src/services/workers.ts +1472 -120
  259. package/src/services/zaraz.ts +640 -37
  260. package/src/services/zero-trust.ts +55498 -12667
  261. package/src/services/zones.ts +360 -14
@@ -486,8 +486,158 @@ export const GetMemberRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
486
486
  memberId: Schema.String.pipe(T.HttpPath("memberId")),
487
487
  accountId: Schema.String.pipe(T.HttpPath("account_id")),
488
488
  }).pipe(T.Http({ method: "GET", path: "/accounts/{account_id}/members/{memberId}" }));
489
- export const GetMemberResponse =
490
- /*@__PURE__*/ /*#__PURE__*/ Schema.Unknown;
489
+ export const GetMemberResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
490
+ id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
491
+ email: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
492
+ policies: Schema.optional(Schema.Union([
493
+ Schema.Array(Schema.Struct({
494
+ id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
495
+ access: Schema.optional(Schema.Union([Schema.Literals(["allow", "deny"]), Schema.Null])),
496
+ permissionGroups: Schema.optional(Schema.Union([
497
+ Schema.Array(Schema.Struct({
498
+ id: Schema.String,
499
+ })),
500
+ Schema.Null,
501
+ ])),
502
+ resourceGroups: Schema.optional(Schema.Union([
503
+ Schema.Array(Schema.Struct({
504
+ id: Schema.String,
505
+ })),
506
+ Schema.Null,
507
+ ])),
508
+ }).pipe(Schema.encodeKeys({
509
+ id: "id",
510
+ access: "access",
511
+ permissionGroups: "permission_groups",
512
+ resourceGroups: "resource_groups",
513
+ }))),
514
+ Schema.Null,
515
+ ])),
516
+ roles: Schema.optional(Schema.Union([
517
+ Schema.Array(Schema.Struct({
518
+ id: Schema.String,
519
+ description: Schema.String,
520
+ name: Schema.String,
521
+ permissions: Schema.Struct({
522
+ analytics: Schema.optional(Schema.Union([
523
+ Schema.Struct({
524
+ read: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
525
+ write: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
526
+ }),
527
+ Schema.Null,
528
+ ])),
529
+ billing: Schema.optional(Schema.Union([
530
+ Schema.Struct({
531
+ read: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
532
+ write: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
533
+ }),
534
+ Schema.Null,
535
+ ])),
536
+ cachePurge: Schema.optional(Schema.Union([
537
+ Schema.Struct({
538
+ read: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
539
+ write: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
540
+ }),
541
+ Schema.Null,
542
+ ])),
543
+ dns: Schema.optional(Schema.Union([
544
+ Schema.Struct({
545
+ read: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
546
+ write: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
547
+ }),
548
+ Schema.Null,
549
+ ])),
550
+ dnsRecords: Schema.optional(Schema.Union([
551
+ Schema.Struct({
552
+ read: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
553
+ write: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
554
+ }),
555
+ Schema.Null,
556
+ ])),
557
+ lb: Schema.optional(Schema.Union([
558
+ Schema.Struct({
559
+ read: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
560
+ write: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
561
+ }),
562
+ Schema.Null,
563
+ ])),
564
+ logs: Schema.optional(Schema.Union([
565
+ Schema.Struct({
566
+ read: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
567
+ write: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
568
+ }),
569
+ Schema.Null,
570
+ ])),
571
+ organization: Schema.optional(Schema.Union([
572
+ Schema.Struct({
573
+ read: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
574
+ write: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
575
+ }),
576
+ Schema.Null,
577
+ ])),
578
+ ssl: Schema.optional(Schema.Union([
579
+ Schema.Struct({
580
+ read: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
581
+ write: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
582
+ }),
583
+ Schema.Null,
584
+ ])),
585
+ waf: Schema.optional(Schema.Union([
586
+ Schema.Struct({
587
+ read: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
588
+ write: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
589
+ }),
590
+ Schema.Null,
591
+ ])),
592
+ zoneSettings: Schema.optional(Schema.Union([
593
+ Schema.Struct({
594
+ read: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
595
+ write: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
596
+ }),
597
+ Schema.Null,
598
+ ])),
599
+ zones: Schema.optional(Schema.Union([
600
+ Schema.Struct({
601
+ read: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
602
+ write: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
603
+ }),
604
+ Schema.Null,
605
+ ])),
606
+ }).pipe(Schema.encodeKeys({
607
+ analytics: "analytics",
608
+ billing: "billing",
609
+ cachePurge: "cache_purge",
610
+ dns: "dns",
611
+ dnsRecords: "dns_records",
612
+ lb: "lb",
613
+ logs: "logs",
614
+ organization: "organization",
615
+ ssl: "ssl",
616
+ waf: "waf",
617
+ zoneSettings: "zone_settings",
618
+ zones: "zones",
619
+ })),
620
+ })),
621
+ Schema.Null,
622
+ ])),
623
+ status: Schema.optional(Schema.Union([Schema.Literals(["accepted", "pending"]), Schema.Null])),
624
+ user: Schema.optional(Schema.Union([
625
+ Schema.Struct({
626
+ email: Schema.String,
627
+ id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
628
+ firstName: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
629
+ lastName: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
630
+ twoFactorAuthenticationEnabled: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
631
+ }).pipe(Schema.encodeKeys({
632
+ email: "email",
633
+ id: "id",
634
+ firstName: "first_name",
635
+ lastName: "last_name",
636
+ twoFactorAuthenticationEnabled: "two_factor_authentication_enabled",
637
+ })),
638
+ Schema.Null,
639
+ ])),
640
+ }).pipe(T.ResponsePath("result"));
491
641
  export const getMember = API.make(() => ({
492
642
  input: GetMemberRequest,
493
643
  output: GetMemberResponse,
@@ -504,12 +654,182 @@ export const ListMembersRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
504
654
  ])).pipe(T.HttpQuery("order")),
505
655
  status: Schema.optional(Schema.Literals(["accepted", "pending", "rejected"])).pipe(T.HttpQuery("status")),
506
656
  }).pipe(T.Http({ method: "GET", path: "/accounts/{account_id}/members" }));
507
- export const ListMembersResponse =
508
- /*@__PURE__*/ /*#__PURE__*/ Schema.Unknown;
509
- export const listMembers = API.make(() => ({
657
+ export const ListMembersResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
658
+ result: Schema.Array(Schema.Struct({
659
+ id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
660
+ email: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
661
+ policies: Schema.optional(Schema.Union([
662
+ Schema.Array(Schema.Struct({
663
+ id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
664
+ access: Schema.optional(Schema.Union([Schema.Literals(["allow", "deny"]), Schema.Null])),
665
+ permissionGroups: Schema.optional(Schema.Union([
666
+ Schema.Array(Schema.Struct({
667
+ id: Schema.String,
668
+ })),
669
+ Schema.Null,
670
+ ])),
671
+ resourceGroups: Schema.optional(Schema.Union([
672
+ Schema.Array(Schema.Struct({
673
+ id: Schema.String,
674
+ })),
675
+ Schema.Null,
676
+ ])),
677
+ }).pipe(Schema.encodeKeys({
678
+ id: "id",
679
+ access: "access",
680
+ permissionGroups: "permission_groups",
681
+ resourceGroups: "resource_groups",
682
+ }))),
683
+ Schema.Null,
684
+ ])),
685
+ roles: Schema.optional(Schema.Union([
686
+ Schema.Array(Schema.Struct({
687
+ id: Schema.String,
688
+ description: Schema.String,
689
+ name: Schema.String,
690
+ permissions: Schema.Struct({
691
+ analytics: Schema.optional(Schema.Union([
692
+ Schema.Struct({
693
+ read: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
694
+ write: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
695
+ }),
696
+ Schema.Null,
697
+ ])),
698
+ billing: Schema.optional(Schema.Union([
699
+ Schema.Struct({
700
+ read: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
701
+ write: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
702
+ }),
703
+ Schema.Null,
704
+ ])),
705
+ cachePurge: Schema.optional(Schema.Union([
706
+ Schema.Struct({
707
+ read: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
708
+ write: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
709
+ }),
710
+ Schema.Null,
711
+ ])),
712
+ dns: Schema.optional(Schema.Union([
713
+ Schema.Struct({
714
+ read: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
715
+ write: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
716
+ }),
717
+ Schema.Null,
718
+ ])),
719
+ dnsRecords: Schema.optional(Schema.Union([
720
+ Schema.Struct({
721
+ read: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
722
+ write: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
723
+ }),
724
+ Schema.Null,
725
+ ])),
726
+ lb: Schema.optional(Schema.Union([
727
+ Schema.Struct({
728
+ read: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
729
+ write: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
730
+ }),
731
+ Schema.Null,
732
+ ])),
733
+ logs: Schema.optional(Schema.Union([
734
+ Schema.Struct({
735
+ read: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
736
+ write: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
737
+ }),
738
+ Schema.Null,
739
+ ])),
740
+ organization: Schema.optional(Schema.Union([
741
+ Schema.Struct({
742
+ read: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
743
+ write: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
744
+ }),
745
+ Schema.Null,
746
+ ])),
747
+ ssl: Schema.optional(Schema.Union([
748
+ Schema.Struct({
749
+ read: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
750
+ write: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
751
+ }),
752
+ Schema.Null,
753
+ ])),
754
+ waf: Schema.optional(Schema.Union([
755
+ Schema.Struct({
756
+ read: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
757
+ write: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
758
+ }),
759
+ Schema.Null,
760
+ ])),
761
+ zoneSettings: Schema.optional(Schema.Union([
762
+ Schema.Struct({
763
+ read: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
764
+ write: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
765
+ }),
766
+ Schema.Null,
767
+ ])),
768
+ zones: Schema.optional(Schema.Union([
769
+ Schema.Struct({
770
+ read: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
771
+ write: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
772
+ }),
773
+ Schema.Null,
774
+ ])),
775
+ }).pipe(Schema.encodeKeys({
776
+ analytics: "analytics",
777
+ billing: "billing",
778
+ cachePurge: "cache_purge",
779
+ dns: "dns",
780
+ dnsRecords: "dns_records",
781
+ lb: "lb",
782
+ logs: "logs",
783
+ organization: "organization",
784
+ ssl: "ssl",
785
+ waf: "waf",
786
+ zoneSettings: "zone_settings",
787
+ zones: "zones",
788
+ })),
789
+ })),
790
+ Schema.Null,
791
+ ])),
792
+ status: Schema.optional(Schema.Union([Schema.Literals(["accepted", "pending"]), Schema.Null])),
793
+ user: Schema.optional(Schema.Union([
794
+ Schema.Struct({
795
+ email: Schema.String,
796
+ id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
797
+ firstName: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
798
+ lastName: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
799
+ twoFactorAuthenticationEnabled: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
800
+ }).pipe(Schema.encodeKeys({
801
+ email: "email",
802
+ id: "id",
803
+ firstName: "first_name",
804
+ lastName: "last_name",
805
+ twoFactorAuthenticationEnabled: "two_factor_authentication_enabled",
806
+ })),
807
+ Schema.Null,
808
+ ])),
809
+ })),
810
+ resultInfo: Schema.Struct({
811
+ count: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
812
+ page: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
813
+ perPage: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
814
+ totalCount: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
815
+ }).pipe(Schema.encodeKeys({
816
+ count: "count",
817
+ page: "page",
818
+ perPage: "per_page",
819
+ totalCount: "total_count",
820
+ })),
821
+ }).pipe(Schema.encodeKeys({ result: "result", resultInfo: "result_info" }));
822
+ export const listMembers = API.makePaginated(() => ({
510
823
  input: ListMembersRequest,
511
824
  output: ListMembersResponse,
512
825
  errors: [],
826
+ pagination: {
827
+ mode: "page",
828
+ inputToken: "page",
829
+ outputToken: "resultInfo.page",
830
+ items: "result",
831
+ pageSize: "perPage",
832
+ },
513
833
  }));
514
834
  export const CreateMemberRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
515
835
  accountId: Schema.String.pipe(T.HttpPath("account_id")),
@@ -517,8 +837,158 @@ export const CreateMemberRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
517
837
  roles: Schema.Array(Schema.String),
518
838
  status: Schema.optional(Schema.Literals(["accepted", "pending"])),
519
839
  }).pipe(T.Http({ method: "POST", path: "/accounts/{account_id}/members" }));
520
- export const CreateMemberResponse =
521
- /*@__PURE__*/ /*#__PURE__*/ Schema.Unknown;
840
+ export const CreateMemberResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
841
+ id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
842
+ email: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
843
+ policies: Schema.optional(Schema.Union([
844
+ Schema.Array(Schema.Struct({
845
+ id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
846
+ access: Schema.optional(Schema.Union([Schema.Literals(["allow", "deny"]), Schema.Null])),
847
+ permissionGroups: Schema.optional(Schema.Union([
848
+ Schema.Array(Schema.Struct({
849
+ id: Schema.String,
850
+ })),
851
+ Schema.Null,
852
+ ])),
853
+ resourceGroups: Schema.optional(Schema.Union([
854
+ Schema.Array(Schema.Struct({
855
+ id: Schema.String,
856
+ })),
857
+ Schema.Null,
858
+ ])),
859
+ }).pipe(Schema.encodeKeys({
860
+ id: "id",
861
+ access: "access",
862
+ permissionGroups: "permission_groups",
863
+ resourceGroups: "resource_groups",
864
+ }))),
865
+ Schema.Null,
866
+ ])),
867
+ roles: Schema.optional(Schema.Union([
868
+ Schema.Array(Schema.Struct({
869
+ id: Schema.String,
870
+ description: Schema.String,
871
+ name: Schema.String,
872
+ permissions: Schema.Struct({
873
+ analytics: Schema.optional(Schema.Union([
874
+ Schema.Struct({
875
+ read: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
876
+ write: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
877
+ }),
878
+ Schema.Null,
879
+ ])),
880
+ billing: Schema.optional(Schema.Union([
881
+ Schema.Struct({
882
+ read: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
883
+ write: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
884
+ }),
885
+ Schema.Null,
886
+ ])),
887
+ cachePurge: Schema.optional(Schema.Union([
888
+ Schema.Struct({
889
+ read: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
890
+ write: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
891
+ }),
892
+ Schema.Null,
893
+ ])),
894
+ dns: Schema.optional(Schema.Union([
895
+ Schema.Struct({
896
+ read: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
897
+ write: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
898
+ }),
899
+ Schema.Null,
900
+ ])),
901
+ dnsRecords: Schema.optional(Schema.Union([
902
+ Schema.Struct({
903
+ read: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
904
+ write: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
905
+ }),
906
+ Schema.Null,
907
+ ])),
908
+ lb: Schema.optional(Schema.Union([
909
+ Schema.Struct({
910
+ read: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
911
+ write: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
912
+ }),
913
+ Schema.Null,
914
+ ])),
915
+ logs: Schema.optional(Schema.Union([
916
+ Schema.Struct({
917
+ read: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
918
+ write: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
919
+ }),
920
+ Schema.Null,
921
+ ])),
922
+ organization: Schema.optional(Schema.Union([
923
+ Schema.Struct({
924
+ read: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
925
+ write: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
926
+ }),
927
+ Schema.Null,
928
+ ])),
929
+ ssl: Schema.optional(Schema.Union([
930
+ Schema.Struct({
931
+ read: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
932
+ write: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
933
+ }),
934
+ Schema.Null,
935
+ ])),
936
+ waf: Schema.optional(Schema.Union([
937
+ Schema.Struct({
938
+ read: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
939
+ write: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
940
+ }),
941
+ Schema.Null,
942
+ ])),
943
+ zoneSettings: Schema.optional(Schema.Union([
944
+ Schema.Struct({
945
+ read: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
946
+ write: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
947
+ }),
948
+ Schema.Null,
949
+ ])),
950
+ zones: Schema.optional(Schema.Union([
951
+ Schema.Struct({
952
+ read: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
953
+ write: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
954
+ }),
955
+ Schema.Null,
956
+ ])),
957
+ }).pipe(Schema.encodeKeys({
958
+ analytics: "analytics",
959
+ billing: "billing",
960
+ cachePurge: "cache_purge",
961
+ dns: "dns",
962
+ dnsRecords: "dns_records",
963
+ lb: "lb",
964
+ logs: "logs",
965
+ organization: "organization",
966
+ ssl: "ssl",
967
+ waf: "waf",
968
+ zoneSettings: "zone_settings",
969
+ zones: "zones",
970
+ })),
971
+ })),
972
+ Schema.Null,
973
+ ])),
974
+ status: Schema.optional(Schema.Union([Schema.Literals(["accepted", "pending"]), Schema.Null])),
975
+ user: Schema.optional(Schema.Union([
976
+ Schema.Struct({
977
+ email: Schema.String,
978
+ id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
979
+ firstName: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
980
+ lastName: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
981
+ twoFactorAuthenticationEnabled: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
982
+ }).pipe(Schema.encodeKeys({
983
+ email: "email",
984
+ id: "id",
985
+ firstName: "first_name",
986
+ lastName: "last_name",
987
+ twoFactorAuthenticationEnabled: "two_factor_authentication_enabled",
988
+ })),
989
+ Schema.Null,
990
+ ])),
991
+ }).pipe(T.ResponsePath("result"));
522
992
  export const createMember = API.make(() => ({
523
993
  input: CreateMemberRequest,
524
994
  output: CreateMemberResponse,
@@ -527,10 +997,162 @@ export const createMember = API.make(() => ({
527
997
  export const UpdateMemberRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
528
998
  memberId: Schema.String.pipe(T.HttpPath("memberId")),
529
999
  accountId: Schema.String.pipe(T.HttpPath("account_id")),
530
- roles: Schema.optional(Schema.Array(Schema.Unknown)),
1000
+ roles: Schema.optional(Schema.Array(Schema.Struct({
1001
+ id: Schema.String,
1002
+ }))),
531
1003
  }).pipe(T.Http({ method: "PUT", path: "/accounts/{account_id}/members/{memberId}" }));
532
- export const UpdateMemberResponse =
533
- /*@__PURE__*/ /*#__PURE__*/ Schema.Unknown;
1004
+ export const UpdateMemberResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1005
+ id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1006
+ email: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1007
+ policies: Schema.optional(Schema.Union([
1008
+ Schema.Array(Schema.Struct({
1009
+ id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1010
+ access: Schema.optional(Schema.Union([Schema.Literals(["allow", "deny"]), Schema.Null])),
1011
+ permissionGroups: Schema.optional(Schema.Union([
1012
+ Schema.Array(Schema.Struct({
1013
+ id: Schema.String,
1014
+ })),
1015
+ Schema.Null,
1016
+ ])),
1017
+ resourceGroups: Schema.optional(Schema.Union([
1018
+ Schema.Array(Schema.Struct({
1019
+ id: Schema.String,
1020
+ })),
1021
+ Schema.Null,
1022
+ ])),
1023
+ }).pipe(Schema.encodeKeys({
1024
+ id: "id",
1025
+ access: "access",
1026
+ permissionGroups: "permission_groups",
1027
+ resourceGroups: "resource_groups",
1028
+ }))),
1029
+ Schema.Null,
1030
+ ])),
1031
+ roles: Schema.optional(Schema.Union([
1032
+ Schema.Array(Schema.Struct({
1033
+ id: Schema.String,
1034
+ description: Schema.String,
1035
+ name: Schema.String,
1036
+ permissions: Schema.Struct({
1037
+ analytics: Schema.optional(Schema.Union([
1038
+ Schema.Struct({
1039
+ read: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
1040
+ write: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
1041
+ }),
1042
+ Schema.Null,
1043
+ ])),
1044
+ billing: Schema.optional(Schema.Union([
1045
+ Schema.Struct({
1046
+ read: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
1047
+ write: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
1048
+ }),
1049
+ Schema.Null,
1050
+ ])),
1051
+ cachePurge: Schema.optional(Schema.Union([
1052
+ Schema.Struct({
1053
+ read: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
1054
+ write: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
1055
+ }),
1056
+ Schema.Null,
1057
+ ])),
1058
+ dns: Schema.optional(Schema.Union([
1059
+ Schema.Struct({
1060
+ read: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
1061
+ write: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
1062
+ }),
1063
+ Schema.Null,
1064
+ ])),
1065
+ dnsRecords: Schema.optional(Schema.Union([
1066
+ Schema.Struct({
1067
+ read: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
1068
+ write: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
1069
+ }),
1070
+ Schema.Null,
1071
+ ])),
1072
+ lb: Schema.optional(Schema.Union([
1073
+ Schema.Struct({
1074
+ read: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
1075
+ write: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
1076
+ }),
1077
+ Schema.Null,
1078
+ ])),
1079
+ logs: Schema.optional(Schema.Union([
1080
+ Schema.Struct({
1081
+ read: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
1082
+ write: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
1083
+ }),
1084
+ Schema.Null,
1085
+ ])),
1086
+ organization: Schema.optional(Schema.Union([
1087
+ Schema.Struct({
1088
+ read: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
1089
+ write: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
1090
+ }),
1091
+ Schema.Null,
1092
+ ])),
1093
+ ssl: Schema.optional(Schema.Union([
1094
+ Schema.Struct({
1095
+ read: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
1096
+ write: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
1097
+ }),
1098
+ Schema.Null,
1099
+ ])),
1100
+ waf: Schema.optional(Schema.Union([
1101
+ Schema.Struct({
1102
+ read: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
1103
+ write: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
1104
+ }),
1105
+ Schema.Null,
1106
+ ])),
1107
+ zoneSettings: Schema.optional(Schema.Union([
1108
+ Schema.Struct({
1109
+ read: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
1110
+ write: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
1111
+ }),
1112
+ Schema.Null,
1113
+ ])),
1114
+ zones: Schema.optional(Schema.Union([
1115
+ Schema.Struct({
1116
+ read: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
1117
+ write: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
1118
+ }),
1119
+ Schema.Null,
1120
+ ])),
1121
+ }).pipe(Schema.encodeKeys({
1122
+ analytics: "analytics",
1123
+ billing: "billing",
1124
+ cachePurge: "cache_purge",
1125
+ dns: "dns",
1126
+ dnsRecords: "dns_records",
1127
+ lb: "lb",
1128
+ logs: "logs",
1129
+ organization: "organization",
1130
+ ssl: "ssl",
1131
+ waf: "waf",
1132
+ zoneSettings: "zone_settings",
1133
+ zones: "zones",
1134
+ })),
1135
+ })),
1136
+ Schema.Null,
1137
+ ])),
1138
+ status: Schema.optional(Schema.Union([Schema.Literals(["accepted", "pending"]), Schema.Null])),
1139
+ user: Schema.optional(Schema.Union([
1140
+ Schema.Struct({
1141
+ email: Schema.String,
1142
+ id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1143
+ firstName: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1144
+ lastName: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1145
+ twoFactorAuthenticationEnabled: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
1146
+ }).pipe(Schema.encodeKeys({
1147
+ email: "email",
1148
+ id: "id",
1149
+ firstName: "first_name",
1150
+ lastName: "last_name",
1151
+ twoFactorAuthenticationEnabled: "two_factor_authentication_enabled",
1152
+ })),
1153
+ Schema.Null,
1154
+ ])),
1155
+ }).pipe(T.ResponsePath("result"));
534
1156
  export const updateMember = API.make(() => ({
535
1157
  input: UpdateMemberRequest,
536
1158
  output: UpdateMemberResponse,
@@ -555,8 +1177,110 @@ export const GetRoleRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
555
1177
  roleId: Schema.String.pipe(T.HttpPath("roleId")),
556
1178
  accountId: Schema.String.pipe(T.HttpPath("account_id")),
557
1179
  }).pipe(T.Http({ method: "GET", path: "/accounts/{account_id}/roles/{roleId}" }));
558
- export const GetRoleResponse =
559
- /*@__PURE__*/ /*#__PURE__*/ Schema.Unknown;
1180
+ export const GetRoleResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1181
+ id: Schema.String,
1182
+ description: Schema.String,
1183
+ name: Schema.String,
1184
+ permissions: Schema.Struct({
1185
+ analytics: Schema.optional(Schema.Union([
1186
+ Schema.Struct({
1187
+ read: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
1188
+ write: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
1189
+ }),
1190
+ Schema.Null,
1191
+ ])),
1192
+ billing: Schema.optional(Schema.Union([
1193
+ Schema.Struct({
1194
+ read: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
1195
+ write: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
1196
+ }),
1197
+ Schema.Null,
1198
+ ])),
1199
+ cachePurge: Schema.optional(Schema.Union([
1200
+ Schema.Struct({
1201
+ read: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
1202
+ write: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
1203
+ }),
1204
+ Schema.Null,
1205
+ ])),
1206
+ dns: Schema.optional(Schema.Union([
1207
+ Schema.Struct({
1208
+ read: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
1209
+ write: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
1210
+ }),
1211
+ Schema.Null,
1212
+ ])),
1213
+ dnsRecords: Schema.optional(Schema.Union([
1214
+ Schema.Struct({
1215
+ read: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
1216
+ write: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
1217
+ }),
1218
+ Schema.Null,
1219
+ ])),
1220
+ lb: Schema.optional(Schema.Union([
1221
+ Schema.Struct({
1222
+ read: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
1223
+ write: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
1224
+ }),
1225
+ Schema.Null,
1226
+ ])),
1227
+ logs: Schema.optional(Schema.Union([
1228
+ Schema.Struct({
1229
+ read: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
1230
+ write: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
1231
+ }),
1232
+ Schema.Null,
1233
+ ])),
1234
+ organization: Schema.optional(Schema.Union([
1235
+ Schema.Struct({
1236
+ read: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
1237
+ write: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
1238
+ }),
1239
+ Schema.Null,
1240
+ ])),
1241
+ ssl: Schema.optional(Schema.Union([
1242
+ Schema.Struct({
1243
+ read: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
1244
+ write: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
1245
+ }),
1246
+ Schema.Null,
1247
+ ])),
1248
+ waf: Schema.optional(Schema.Union([
1249
+ Schema.Struct({
1250
+ read: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
1251
+ write: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
1252
+ }),
1253
+ Schema.Null,
1254
+ ])),
1255
+ zoneSettings: Schema.optional(Schema.Union([
1256
+ Schema.Struct({
1257
+ read: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
1258
+ write: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
1259
+ }),
1260
+ Schema.Null,
1261
+ ])),
1262
+ zones: Schema.optional(Schema.Union([
1263
+ Schema.Struct({
1264
+ read: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
1265
+ write: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
1266
+ }),
1267
+ Schema.Null,
1268
+ ])),
1269
+ }).pipe(Schema.encodeKeys({
1270
+ analytics: "analytics",
1271
+ billing: "billing",
1272
+ cachePurge: "cache_purge",
1273
+ dns: "dns",
1274
+ dnsRecords: "dns_records",
1275
+ lb: "lb",
1276
+ logs: "logs",
1277
+ organization: "organization",
1278
+ ssl: "ssl",
1279
+ waf: "waf",
1280
+ zoneSettings: "zone_settings",
1281
+ zones: "zones",
1282
+ })),
1283
+ }).pipe(T.ResponsePath("result"));
560
1284
  export const getRole = API.make(() => ({
561
1285
  input: GetRoleRequest,
562
1286
  output: GetRoleResponse,
@@ -565,31 +1289,318 @@ export const getRole = API.make(() => ({
565
1289
  export const ListRolesRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
566
1290
  accountId: Schema.String.pipe(T.HttpPath("account_id")),
567
1291
  }).pipe(T.Http({ method: "GET", path: "/accounts/{account_id}/roles" }));
568
- export const ListRolesResponse =
569
- /*@__PURE__*/ /*#__PURE__*/ Schema.Unknown;
570
- export const listRoles = API.make(() => ({
1292
+ export const ListRolesResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1293
+ result: Schema.Array(Schema.Struct({
1294
+ id: Schema.String,
1295
+ description: Schema.String,
1296
+ name: Schema.String,
1297
+ permissions: Schema.Struct({
1298
+ analytics: Schema.optional(Schema.Union([
1299
+ Schema.Struct({
1300
+ read: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
1301
+ write: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
1302
+ }),
1303
+ Schema.Null,
1304
+ ])),
1305
+ billing: Schema.optional(Schema.Union([
1306
+ Schema.Struct({
1307
+ read: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
1308
+ write: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
1309
+ }),
1310
+ Schema.Null,
1311
+ ])),
1312
+ cachePurge: Schema.optional(Schema.Union([
1313
+ Schema.Struct({
1314
+ read: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
1315
+ write: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
1316
+ }),
1317
+ Schema.Null,
1318
+ ])),
1319
+ dns: Schema.optional(Schema.Union([
1320
+ Schema.Struct({
1321
+ read: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
1322
+ write: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
1323
+ }),
1324
+ Schema.Null,
1325
+ ])),
1326
+ dnsRecords: Schema.optional(Schema.Union([
1327
+ Schema.Struct({
1328
+ read: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
1329
+ write: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
1330
+ }),
1331
+ Schema.Null,
1332
+ ])),
1333
+ lb: Schema.optional(Schema.Union([
1334
+ Schema.Struct({
1335
+ read: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
1336
+ write: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
1337
+ }),
1338
+ Schema.Null,
1339
+ ])),
1340
+ logs: Schema.optional(Schema.Union([
1341
+ Schema.Struct({
1342
+ read: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
1343
+ write: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
1344
+ }),
1345
+ Schema.Null,
1346
+ ])),
1347
+ organization: Schema.optional(Schema.Union([
1348
+ Schema.Struct({
1349
+ read: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
1350
+ write: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
1351
+ }),
1352
+ Schema.Null,
1353
+ ])),
1354
+ ssl: Schema.optional(Schema.Union([
1355
+ Schema.Struct({
1356
+ read: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
1357
+ write: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
1358
+ }),
1359
+ Schema.Null,
1360
+ ])),
1361
+ waf: Schema.optional(Schema.Union([
1362
+ Schema.Struct({
1363
+ read: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
1364
+ write: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
1365
+ }),
1366
+ Schema.Null,
1367
+ ])),
1368
+ zoneSettings: Schema.optional(Schema.Union([
1369
+ Schema.Struct({
1370
+ read: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
1371
+ write: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
1372
+ }),
1373
+ Schema.Null,
1374
+ ])),
1375
+ zones: Schema.optional(Schema.Union([
1376
+ Schema.Struct({
1377
+ read: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
1378
+ write: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
1379
+ }),
1380
+ Schema.Null,
1381
+ ])),
1382
+ }).pipe(Schema.encodeKeys({
1383
+ analytics: "analytics",
1384
+ billing: "billing",
1385
+ cachePurge: "cache_purge",
1386
+ dns: "dns",
1387
+ dnsRecords: "dns_records",
1388
+ lb: "lb",
1389
+ logs: "logs",
1390
+ organization: "organization",
1391
+ ssl: "ssl",
1392
+ waf: "waf",
1393
+ zoneSettings: "zone_settings",
1394
+ zones: "zones",
1395
+ })),
1396
+ })),
1397
+ resultInfo: Schema.Struct({
1398
+ count: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
1399
+ page: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
1400
+ perPage: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
1401
+ totalCount: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
1402
+ }).pipe(Schema.encodeKeys({
1403
+ count: "count",
1404
+ page: "page",
1405
+ perPage: "per_page",
1406
+ totalCount: "total_count",
1407
+ })),
1408
+ }).pipe(Schema.encodeKeys({ result: "result", resultInfo: "result_info" }));
1409
+ export const listRoles = API.makePaginated(() => ({
571
1410
  input: ListRolesRequest,
572
1411
  output: ListRolesResponse,
573
1412
  errors: [],
1413
+ pagination: {
1414
+ mode: "page",
1415
+ inputToken: "page",
1416
+ outputToken: "resultInfo.page",
1417
+ items: "result",
1418
+ pageSize: "perPage",
1419
+ },
574
1420
  }));
575
1421
  export const GetSubscriptionRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
576
1422
  accountId: Schema.String.pipe(T.HttpPath("account_id")),
577
1423
  }).pipe(T.Http({ method: "GET", path: "/accounts/{account_id}/subscriptions" }));
578
1424
  export const GetSubscriptionResponse =
579
- /*@__PURE__*/ /*#__PURE__*/ Schema.Unknown;
580
- export const getSubscription = API.make(() => ({
1425
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1426
+ result: Schema.Array(Schema.Struct({
1427
+ id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1428
+ currency: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1429
+ currentPeriodEnd: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1430
+ currentPeriodStart: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1431
+ frequency: Schema.optional(Schema.Union([
1432
+ Schema.Literals(["weekly", "monthly", "quarterly", "yearly"]),
1433
+ Schema.Null,
1434
+ ])),
1435
+ price: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
1436
+ ratePlan: Schema.optional(Schema.Union([
1437
+ Schema.Struct({
1438
+ id: Schema.optional(Schema.Union([
1439
+ Schema.Literals([
1440
+ "free",
1441
+ "lite",
1442
+ "pro",
1443
+ "pro_plus",
1444
+ "business",
1445
+ "enterprise",
1446
+ "partners_free",
1447
+ "partners_pro",
1448
+ "partners_business",
1449
+ "partners_enterprise",
1450
+ ]),
1451
+ Schema.Null,
1452
+ ])),
1453
+ currency: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1454
+ externallyManaged: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
1455
+ isContract: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
1456
+ publicName: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1457
+ scope: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1458
+ sets: Schema.optional(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
1459
+ }).pipe(Schema.encodeKeys({
1460
+ id: "id",
1461
+ currency: "currency",
1462
+ externallyManaged: "externally_managed",
1463
+ isContract: "is_contract",
1464
+ publicName: "public_name",
1465
+ scope: "scope",
1466
+ sets: "sets",
1467
+ })),
1468
+ Schema.Null,
1469
+ ])),
1470
+ state: Schema.optional(Schema.Union([
1471
+ Schema.Literals([
1472
+ "Trial",
1473
+ "Provisioned",
1474
+ "Paid",
1475
+ "AwaitingPayment",
1476
+ "Cancelled",
1477
+ "Failed",
1478
+ "Expired",
1479
+ ]),
1480
+ Schema.Null,
1481
+ ])),
1482
+ }).pipe(Schema.encodeKeys({
1483
+ id: "id",
1484
+ currency: "currency",
1485
+ currentPeriodEnd: "current_period_end",
1486
+ currentPeriodStart: "current_period_start",
1487
+ frequency: "frequency",
1488
+ price: "price",
1489
+ ratePlan: "rate_plan",
1490
+ state: "state",
1491
+ }))),
1492
+ });
1493
+ export const getSubscription = API.makePaginated(() => ({
581
1494
  input: GetSubscriptionRequest,
582
1495
  output: GetSubscriptionResponse,
583
1496
  errors: [],
1497
+ pagination: {
1498
+ mode: "single",
1499
+ items: "result",
1500
+ },
584
1501
  }));
585
1502
  export const CreateSubscriptionRequest =
586
1503
  /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
587
1504
  accountId: Schema.String.pipe(T.HttpPath("account_id")),
588
1505
  frequency: Schema.optional(Schema.Literals(["weekly", "monthly", "quarterly", "yearly"])),
589
- ratePlan: Schema.optional(Schema.Unknown),
1506
+ ratePlan: Schema.optional(Schema.Struct({
1507
+ id: Schema.optional(Schema.Literals([
1508
+ "free",
1509
+ "lite",
1510
+ "pro",
1511
+ "pro_plus",
1512
+ "business",
1513
+ "enterprise",
1514
+ "partners_free",
1515
+ "partners_pro",
1516
+ "partners_business",
1517
+ "partners_enterprise",
1518
+ ])),
1519
+ currency: Schema.optional(Schema.String),
1520
+ externallyManaged: Schema.optional(Schema.Boolean),
1521
+ isContract: Schema.optional(Schema.Boolean),
1522
+ publicName: Schema.optional(Schema.String),
1523
+ scope: Schema.optional(Schema.String),
1524
+ sets: Schema.optional(Schema.Array(Schema.String)),
1525
+ }).pipe(Schema.encodeKeys({
1526
+ id: "id",
1527
+ currency: "currency",
1528
+ externallyManaged: "externally_managed",
1529
+ isContract: "is_contract",
1530
+ publicName: "public_name",
1531
+ scope: "scope",
1532
+ sets: "sets",
1533
+ }))),
590
1534
  }).pipe(Schema.encodeKeys({ frequency: "frequency", ratePlan: "rate_plan" }), T.Http({ method: "POST", path: "/accounts/{account_id}/subscriptions" }));
591
1535
  export const CreateSubscriptionResponse =
592
- /*@__PURE__*/ /*#__PURE__*/ Schema.Unknown;
1536
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1537
+ id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1538
+ currency: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1539
+ currentPeriodEnd: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1540
+ currentPeriodStart: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1541
+ frequency: Schema.optional(Schema.Union([
1542
+ Schema.Literals(["weekly", "monthly", "quarterly", "yearly"]),
1543
+ Schema.Null,
1544
+ ])),
1545
+ price: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
1546
+ ratePlan: Schema.optional(Schema.Union([
1547
+ Schema.Struct({
1548
+ id: Schema.optional(Schema.Union([
1549
+ Schema.Literals([
1550
+ "free",
1551
+ "lite",
1552
+ "pro",
1553
+ "pro_plus",
1554
+ "business",
1555
+ "enterprise",
1556
+ "partners_free",
1557
+ "partners_pro",
1558
+ "partners_business",
1559
+ "partners_enterprise",
1560
+ ]),
1561
+ Schema.Null,
1562
+ ])),
1563
+ currency: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1564
+ externallyManaged: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
1565
+ isContract: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
1566
+ publicName: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1567
+ scope: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1568
+ sets: Schema.optional(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
1569
+ }).pipe(Schema.encodeKeys({
1570
+ id: "id",
1571
+ currency: "currency",
1572
+ externallyManaged: "externally_managed",
1573
+ isContract: "is_contract",
1574
+ publicName: "public_name",
1575
+ scope: "scope",
1576
+ sets: "sets",
1577
+ })),
1578
+ Schema.Null,
1579
+ ])),
1580
+ state: Schema.optional(Schema.Union([
1581
+ Schema.Literals([
1582
+ "Trial",
1583
+ "Provisioned",
1584
+ "Paid",
1585
+ "AwaitingPayment",
1586
+ "Cancelled",
1587
+ "Failed",
1588
+ "Expired",
1589
+ ]),
1590
+ Schema.Null,
1591
+ ])),
1592
+ })
1593
+ .pipe(Schema.encodeKeys({
1594
+ id: "id",
1595
+ currency: "currency",
1596
+ currentPeriodEnd: "current_period_end",
1597
+ currentPeriodStart: "current_period_start",
1598
+ frequency: "frequency",
1599
+ price: "price",
1600
+ ratePlan: "rate_plan",
1601
+ state: "state",
1602
+ }))
1603
+ .pipe(T.ResponsePath("result"));
593
1604
  export const createSubscription = API.make(() => ({
594
1605
  input: CreateSubscriptionRequest,
595
1606
  output: CreateSubscriptionResponse,
@@ -600,13 +1611,107 @@ export const UpdateSubscriptionRequest =
600
1611
  subscriptionIdentifier: Schema.String.pipe(T.HttpPath("subscriptionIdentifier")),
601
1612
  accountId: Schema.String.pipe(T.HttpPath("account_id")),
602
1613
  frequency: Schema.optional(Schema.Literals(["weekly", "monthly", "quarterly", "yearly"])),
603
- ratePlan: Schema.optional(Schema.Unknown),
1614
+ ratePlan: Schema.optional(Schema.Struct({
1615
+ id: Schema.optional(Schema.Literals([
1616
+ "free",
1617
+ "lite",
1618
+ "pro",
1619
+ "pro_plus",
1620
+ "business",
1621
+ "enterprise",
1622
+ "partners_free",
1623
+ "partners_pro",
1624
+ "partners_business",
1625
+ "partners_enterprise",
1626
+ ])),
1627
+ currency: Schema.optional(Schema.String),
1628
+ externallyManaged: Schema.optional(Schema.Boolean),
1629
+ isContract: Schema.optional(Schema.Boolean),
1630
+ publicName: Schema.optional(Schema.String),
1631
+ scope: Schema.optional(Schema.String),
1632
+ sets: Schema.optional(Schema.Array(Schema.String)),
1633
+ }).pipe(Schema.encodeKeys({
1634
+ id: "id",
1635
+ currency: "currency",
1636
+ externallyManaged: "externally_managed",
1637
+ isContract: "is_contract",
1638
+ publicName: "public_name",
1639
+ scope: "scope",
1640
+ sets: "sets",
1641
+ }))),
604
1642
  }).pipe(Schema.encodeKeys({ frequency: "frequency", ratePlan: "rate_plan" }), T.Http({
605
1643
  method: "PUT",
606
1644
  path: "/accounts/{account_id}/subscriptions/{subscriptionIdentifier}",
607
1645
  }));
608
1646
  export const UpdateSubscriptionResponse =
609
- /*@__PURE__*/ /*#__PURE__*/ Schema.Unknown;
1647
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1648
+ id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1649
+ currency: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1650
+ currentPeriodEnd: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1651
+ currentPeriodStart: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1652
+ frequency: Schema.optional(Schema.Union([
1653
+ Schema.Literals(["weekly", "monthly", "quarterly", "yearly"]),
1654
+ Schema.Null,
1655
+ ])),
1656
+ price: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
1657
+ ratePlan: Schema.optional(Schema.Union([
1658
+ Schema.Struct({
1659
+ id: Schema.optional(Schema.Union([
1660
+ Schema.Literals([
1661
+ "free",
1662
+ "lite",
1663
+ "pro",
1664
+ "pro_plus",
1665
+ "business",
1666
+ "enterprise",
1667
+ "partners_free",
1668
+ "partners_pro",
1669
+ "partners_business",
1670
+ "partners_enterprise",
1671
+ ]),
1672
+ Schema.Null,
1673
+ ])),
1674
+ currency: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1675
+ externallyManaged: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
1676
+ isContract: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
1677
+ publicName: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1678
+ scope: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1679
+ sets: Schema.optional(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
1680
+ }).pipe(Schema.encodeKeys({
1681
+ id: "id",
1682
+ currency: "currency",
1683
+ externallyManaged: "externally_managed",
1684
+ isContract: "is_contract",
1685
+ publicName: "public_name",
1686
+ scope: "scope",
1687
+ sets: "sets",
1688
+ })),
1689
+ Schema.Null,
1690
+ ])),
1691
+ state: Schema.optional(Schema.Union([
1692
+ Schema.Literals([
1693
+ "Trial",
1694
+ "Provisioned",
1695
+ "Paid",
1696
+ "AwaitingPayment",
1697
+ "Cancelled",
1698
+ "Failed",
1699
+ "Expired",
1700
+ ]),
1701
+ Schema.Null,
1702
+ ])),
1703
+ })
1704
+ .pipe(Schema.encodeKeys({
1705
+ id: "id",
1706
+ currency: "currency",
1707
+ currentPeriodEnd: "current_period_end",
1708
+ currentPeriodStart: "current_period_start",
1709
+ frequency: "frequency",
1710
+ price: "price",
1711
+ ratePlan: "rate_plan",
1712
+ state: "state",
1713
+ }))
1714
+ .pipe(T.ResponsePath("result"));
610
1715
  export const updateSubscription = API.make(() => ({
611
1716
  input: UpdateSubscriptionRequest,
612
1717
  output: UpdateSubscriptionResponse,
@@ -635,8 +1740,68 @@ export const GetTokenRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
635
1740
  tokenId: Schema.String.pipe(T.HttpPath("tokenId")),
636
1741
  accountId: Schema.String.pipe(T.HttpPath("account_id")),
637
1742
  }).pipe(T.Http({ method: "GET", path: "/accounts/{account_id}/tokens/{tokenId}" }));
638
- export const GetTokenResponse =
639
- /*@__PURE__*/ /*#__PURE__*/ Schema.Unknown;
1743
+ export const GetTokenResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1744
+ id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1745
+ condition: Schema.optional(Schema.Union([
1746
+ Schema.Struct({
1747
+ requestIp: Schema.optional(Schema.Union([
1748
+ Schema.Struct({
1749
+ in: Schema.optional(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
1750
+ notIn: Schema.optional(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
1751
+ }).pipe(Schema.encodeKeys({ in: "in", notIn: "not_in" })),
1752
+ Schema.Null,
1753
+ ])),
1754
+ }).pipe(Schema.encodeKeys({ requestIp: "request_ip" })),
1755
+ Schema.Null,
1756
+ ])),
1757
+ expiresOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1758
+ issuedOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1759
+ lastUsedOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1760
+ modifiedOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1761
+ name: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1762
+ notBefore: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1763
+ policies: Schema.optional(Schema.Union([
1764
+ Schema.Array(Schema.Struct({
1765
+ id: Schema.String,
1766
+ effect: Schema.Literals(["allow", "deny"]),
1767
+ permissionGroups: Schema.Array(Schema.Struct({
1768
+ id: Schema.String,
1769
+ meta: Schema.optional(Schema.Union([
1770
+ Schema.Struct({
1771
+ key: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1772
+ value: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1773
+ }),
1774
+ Schema.Null,
1775
+ ])),
1776
+ name: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1777
+ })),
1778
+ resources: Schema.Record(Schema.String, Schema.Unknown),
1779
+ }).pipe(Schema.encodeKeys({
1780
+ id: "id",
1781
+ effect: "effect",
1782
+ permissionGroups: "permission_groups",
1783
+ resources: "resources",
1784
+ }))),
1785
+ Schema.Null,
1786
+ ])),
1787
+ status: Schema.optional(Schema.Union([
1788
+ Schema.Literals(["active", "disabled", "expired"]),
1789
+ Schema.Null,
1790
+ ])),
1791
+ })
1792
+ .pipe(Schema.encodeKeys({
1793
+ id: "id",
1794
+ condition: "condition",
1795
+ expiresOn: "expires_on",
1796
+ issuedOn: "issued_on",
1797
+ lastUsedOn: "last_used_on",
1798
+ modifiedOn: "modified_on",
1799
+ name: "name",
1800
+ notBefore: "not_before",
1801
+ policies: "policies",
1802
+ status: "status",
1803
+ }))
1804
+ .pipe(T.ResponsePath("result"));
640
1805
  export const getToken = API.make(() => ({
641
1806
  input: GetTokenRequest,
642
1807
  output: GetTokenResponse,
@@ -646,17 +1811,109 @@ export const ListTokensRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
646
1811
  accountId: Schema.String.pipe(T.HttpPath("account_id")),
647
1812
  direction: Schema.optional(Schema.Literals(["asc", "desc"])).pipe(T.HttpQuery("direction")),
648
1813
  }).pipe(T.Http({ method: "GET", path: "/accounts/{account_id}/tokens" }));
649
- export const ListTokensResponse =
650
- /*@__PURE__*/ /*#__PURE__*/ Schema.Unknown;
651
- export const listTokens = API.make(() => ({
1814
+ export const ListTokensResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1815
+ result: Schema.Array(Schema.Struct({
1816
+ id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1817
+ condition: Schema.optional(Schema.Union([
1818
+ Schema.Struct({
1819
+ requestIp: Schema.optional(Schema.Union([
1820
+ Schema.Struct({
1821
+ in: Schema.optional(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
1822
+ notIn: Schema.optional(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
1823
+ }).pipe(Schema.encodeKeys({ in: "in", notIn: "not_in" })),
1824
+ Schema.Null,
1825
+ ])),
1826
+ }).pipe(Schema.encodeKeys({ requestIp: "request_ip" })),
1827
+ Schema.Null,
1828
+ ])),
1829
+ expiresOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1830
+ issuedOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1831
+ lastUsedOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1832
+ modifiedOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1833
+ name: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1834
+ notBefore: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1835
+ policies: Schema.optional(Schema.Union([
1836
+ Schema.Array(Schema.Struct({
1837
+ id: Schema.String,
1838
+ effect: Schema.Literals(["allow", "deny"]),
1839
+ permissionGroups: Schema.Array(Schema.Struct({
1840
+ id: Schema.String,
1841
+ meta: Schema.optional(Schema.Union([
1842
+ Schema.Struct({
1843
+ key: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1844
+ value: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1845
+ }),
1846
+ Schema.Null,
1847
+ ])),
1848
+ name: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1849
+ })),
1850
+ resources: Schema.Record(Schema.String, Schema.Unknown),
1851
+ }).pipe(Schema.encodeKeys({
1852
+ id: "id",
1853
+ effect: "effect",
1854
+ permissionGroups: "permission_groups",
1855
+ resources: "resources",
1856
+ }))),
1857
+ Schema.Null,
1858
+ ])),
1859
+ status: Schema.optional(Schema.Union([
1860
+ Schema.Literals(["active", "disabled", "expired"]),
1861
+ Schema.Null,
1862
+ ])),
1863
+ }).pipe(Schema.encodeKeys({
1864
+ id: "id",
1865
+ condition: "condition",
1866
+ expiresOn: "expires_on",
1867
+ issuedOn: "issued_on",
1868
+ lastUsedOn: "last_used_on",
1869
+ modifiedOn: "modified_on",
1870
+ name: "name",
1871
+ notBefore: "not_before",
1872
+ policies: "policies",
1873
+ status: "status",
1874
+ }))),
1875
+ resultInfo: Schema.Struct({
1876
+ count: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
1877
+ page: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
1878
+ perPage: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
1879
+ totalCount: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
1880
+ }).pipe(Schema.encodeKeys({
1881
+ count: "count",
1882
+ page: "page",
1883
+ perPage: "per_page",
1884
+ totalCount: "total_count",
1885
+ })),
1886
+ }).pipe(Schema.encodeKeys({ result: "result", resultInfo: "result_info" }));
1887
+ export const listTokens = API.makePaginated(() => ({
652
1888
  input: ListTokensRequest,
653
1889
  output: ListTokensResponse,
654
1890
  errors: [],
1891
+ pagination: {
1892
+ mode: "page",
1893
+ inputToken: "page",
1894
+ outputToken: "resultInfo.page",
1895
+ items: "result",
1896
+ pageSize: "perPage",
1897
+ },
655
1898
  }));
656
1899
  export const CreateTokenRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
657
1900
  accountId: Schema.String.pipe(T.HttpPath("account_id")),
658
1901
  name: Schema.String,
659
- policies: Schema.Array(Schema.Unknown),
1902
+ policies: Schema.Array(Schema.Struct({
1903
+ effect: Schema.Literals(["allow", "deny"]),
1904
+ permissionGroups: Schema.Array(Schema.Struct({
1905
+ id: Schema.String,
1906
+ meta: Schema.optional(Schema.Struct({
1907
+ key: Schema.optional(Schema.String),
1908
+ value: Schema.optional(Schema.String),
1909
+ })),
1910
+ })),
1911
+ resources: Schema.Record(Schema.String, Schema.Unknown),
1912
+ }).pipe(Schema.encodeKeys({
1913
+ effect: "effect",
1914
+ permissionGroups: "permission_groups",
1915
+ resources: "resources",
1916
+ }))),
660
1917
  condition: Schema.optional(Schema.Struct({
661
1918
  requestIp: Schema.optional(Schema.Struct({
662
1919
  in: Schema.optional(Schema.Array(Schema.String)),
@@ -692,7 +1949,30 @@ export const CreateTokenResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
692
1949
  modifiedOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
693
1950
  name: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
694
1951
  notBefore: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
695
- policies: Schema.optional(Schema.Union([Schema.Array(Schema.Unknown), Schema.Null])),
1952
+ policies: Schema.optional(Schema.Union([
1953
+ Schema.Array(Schema.Struct({
1954
+ id: Schema.String,
1955
+ effect: Schema.Literals(["allow", "deny"]),
1956
+ permissionGroups: Schema.Array(Schema.Struct({
1957
+ id: Schema.String,
1958
+ meta: Schema.optional(Schema.Union([
1959
+ Schema.Struct({
1960
+ key: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1961
+ value: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1962
+ }),
1963
+ Schema.Null,
1964
+ ])),
1965
+ name: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1966
+ })),
1967
+ resources: Schema.Record(Schema.String, Schema.Unknown),
1968
+ }).pipe(Schema.encodeKeys({
1969
+ id: "id",
1970
+ effect: "effect",
1971
+ permissionGroups: "permission_groups",
1972
+ resources: "resources",
1973
+ }))),
1974
+ Schema.Null,
1975
+ ])),
696
1976
  status: Schema.optional(Schema.Union([
697
1977
  Schema.Literals(["active", "disabled", "expired"]),
698
1978
  Schema.Null,
@@ -722,7 +2002,21 @@ export const UpdateTokenRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
722
2002
  tokenId: Schema.String.pipe(T.HttpPath("tokenId")),
723
2003
  accountId: Schema.String.pipe(T.HttpPath("account_id")),
724
2004
  name: Schema.String,
725
- policies: Schema.Array(Schema.Unknown),
2005
+ policies: Schema.Array(Schema.Struct({
2006
+ effect: Schema.Literals(["allow", "deny"]),
2007
+ permissionGroups: Schema.Array(Schema.Struct({
2008
+ id: Schema.String,
2009
+ meta: Schema.optional(Schema.Struct({
2010
+ key: Schema.optional(Schema.String),
2011
+ value: Schema.optional(Schema.String),
2012
+ })),
2013
+ })),
2014
+ resources: Schema.Record(Schema.String, Schema.Unknown),
2015
+ }).pipe(Schema.encodeKeys({
2016
+ effect: "effect",
2017
+ permissionGroups: "permission_groups",
2018
+ resources: "resources",
2019
+ }))),
726
2020
  condition: Schema.optional(Schema.Struct({
727
2021
  requestIp: Schema.optional(Schema.Struct({
728
2022
  in: Schema.optional(Schema.Array(Schema.String)),
@@ -740,8 +2034,68 @@ export const UpdateTokenRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
740
2034
  notBefore: "not_before",
741
2035
  status: "status",
742
2036
  }), T.Http({ method: "PUT", path: "/accounts/{account_id}/tokens/{tokenId}" }));
743
- export const UpdateTokenResponse =
744
- /*@__PURE__*/ /*#__PURE__*/ Schema.Unknown;
2037
+ export const UpdateTokenResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
2038
+ id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
2039
+ condition: Schema.optional(Schema.Union([
2040
+ Schema.Struct({
2041
+ requestIp: Schema.optional(Schema.Union([
2042
+ Schema.Struct({
2043
+ in: Schema.optional(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
2044
+ notIn: Schema.optional(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
2045
+ }).pipe(Schema.encodeKeys({ in: "in", notIn: "not_in" })),
2046
+ Schema.Null,
2047
+ ])),
2048
+ }).pipe(Schema.encodeKeys({ requestIp: "request_ip" })),
2049
+ Schema.Null,
2050
+ ])),
2051
+ expiresOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
2052
+ issuedOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
2053
+ lastUsedOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
2054
+ modifiedOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
2055
+ name: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
2056
+ notBefore: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
2057
+ policies: Schema.optional(Schema.Union([
2058
+ Schema.Array(Schema.Struct({
2059
+ id: Schema.String,
2060
+ effect: Schema.Literals(["allow", "deny"]),
2061
+ permissionGroups: Schema.Array(Schema.Struct({
2062
+ id: Schema.String,
2063
+ meta: Schema.optional(Schema.Union([
2064
+ Schema.Struct({
2065
+ key: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
2066
+ value: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
2067
+ }),
2068
+ Schema.Null,
2069
+ ])),
2070
+ name: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
2071
+ })),
2072
+ resources: Schema.Record(Schema.String, Schema.Unknown),
2073
+ }).pipe(Schema.encodeKeys({
2074
+ id: "id",
2075
+ effect: "effect",
2076
+ permissionGroups: "permission_groups",
2077
+ resources: "resources",
2078
+ }))),
2079
+ Schema.Null,
2080
+ ])),
2081
+ status: Schema.optional(Schema.Union([
2082
+ Schema.Literals(["active", "disabled", "expired"]),
2083
+ Schema.Null,
2084
+ ])),
2085
+ })
2086
+ .pipe(Schema.encodeKeys({
2087
+ id: "id",
2088
+ condition: "condition",
2089
+ expiresOn: "expires_on",
2090
+ issuedOn: "issued_on",
2091
+ lastUsedOn: "last_used_on",
2092
+ modifiedOn: "modified_on",
2093
+ name: "name",
2094
+ notBefore: "not_before",
2095
+ policies: "policies",
2096
+ status: "status",
2097
+ }))
2098
+ .pipe(T.ResponsePath("result"));
745
2099
  export const updateToken = API.make(() => ({
746
2100
  input: UpdateTokenRequest,
747
2101
  output: UpdateTokenResponse,
@@ -851,7 +2205,7 @@ export const PutTokenValueRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
851
2205
  path: "/accounts/{account_id}/tokens/{tokenId}/value",
852
2206
  }));
853
2207
  export const PutTokenValueResponse =
854
- /*@__PURE__*/ /*#__PURE__*/ Schema.Unknown;
2208
+ /*@__PURE__*/ /*#__PURE__*/ Schema.String.pipe(T.ResponsePath("result"));
855
2209
  export const putTokenValue = API.make(() => ({
856
2210
  input: PutTokenValueRequest,
857
2211
  output: PutTokenValueResponse,