@distilled.cloud/cloudflare 0.6.1 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (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
@@ -1145,10 +1145,316 @@ export const GetMemberRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1145
1145
  T.Http({ method: "GET", path: "/accounts/{account_id}/members/{memberId}" }),
1146
1146
  ) as unknown as Schema.Schema<GetMemberRequest>;
1147
1147
 
1148
- export type GetMemberResponse = unknown;
1148
+ export interface GetMemberResponse {
1149
+ /** Membership identifier tag. */
1150
+ id?: string | null;
1151
+ /** The contact email address of the user. */
1152
+ email?: string | null;
1153
+ /** Access policy for the membership */
1154
+ policies?:
1155
+ | {
1156
+ id?: string | null;
1157
+ access?: "allow" | "deny" | null;
1158
+ permissionGroups?: { id: string }[] | null;
1159
+ resourceGroups?: { id: string }[] | null;
1160
+ }[]
1161
+ | null;
1162
+ /** Roles assigned to this Member. */
1163
+ roles?:
1164
+ | {
1165
+ id: string;
1166
+ description: string;
1167
+ name: string;
1168
+ permissions: {
1169
+ analytics?: { read?: boolean | null; write?: boolean | null } | null;
1170
+ billing?: { read?: boolean | null; write?: boolean | null } | null;
1171
+ cachePurge?: { read?: boolean | null; write?: boolean | null } | null;
1172
+ dns?: { read?: boolean | null; write?: boolean | null } | null;
1173
+ dnsRecords?: { read?: boolean | null; write?: boolean | null } | null;
1174
+ lb?: { read?: boolean | null; write?: boolean | null } | null;
1175
+ logs?: { read?: boolean | null; write?: boolean | null } | null;
1176
+ organization?: {
1177
+ read?: boolean | null;
1178
+ write?: boolean | null;
1179
+ } | null;
1180
+ ssl?: { read?: boolean | null; write?: boolean | null } | null;
1181
+ waf?: { read?: boolean | null; write?: boolean | null } | null;
1182
+ zoneSettings?: {
1183
+ read?: boolean | null;
1184
+ write?: boolean | null;
1185
+ } | null;
1186
+ zones?: { read?: boolean | null; write?: boolean | null } | null;
1187
+ };
1188
+ }[]
1189
+ | null;
1190
+ /** A member's status in the account. */
1191
+ status?: "accepted" | "pending" | null;
1192
+ /** Details of the user associated to the membership. */
1193
+ user?: {
1194
+ email: string;
1195
+ id?: string | null;
1196
+ firstName?: string | null;
1197
+ lastName?: string | null;
1198
+ twoFactorAuthenticationEnabled?: boolean | null;
1199
+ } | null;
1200
+ }
1149
1201
 
1150
- export const GetMemberResponse =
1151
- /*@__PURE__*/ /*#__PURE__*/ Schema.Unknown as unknown as Schema.Schema<GetMemberResponse>;
1202
+ export const GetMemberResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1203
+ id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1204
+ email: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1205
+ policies: Schema.optional(
1206
+ Schema.Union([
1207
+ Schema.Array(
1208
+ Schema.Struct({
1209
+ id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1210
+ access: Schema.optional(
1211
+ Schema.Union([Schema.Literals(["allow", "deny"]), Schema.Null]),
1212
+ ),
1213
+ permissionGroups: Schema.optional(
1214
+ Schema.Union([
1215
+ Schema.Array(
1216
+ Schema.Struct({
1217
+ id: Schema.String,
1218
+ }),
1219
+ ),
1220
+ Schema.Null,
1221
+ ]),
1222
+ ),
1223
+ resourceGroups: Schema.optional(
1224
+ Schema.Union([
1225
+ Schema.Array(
1226
+ Schema.Struct({
1227
+ id: Schema.String,
1228
+ }),
1229
+ ),
1230
+ Schema.Null,
1231
+ ]),
1232
+ ),
1233
+ }).pipe(
1234
+ Schema.encodeKeys({
1235
+ id: "id",
1236
+ access: "access",
1237
+ permissionGroups: "permission_groups",
1238
+ resourceGroups: "resource_groups",
1239
+ }),
1240
+ ),
1241
+ ),
1242
+ Schema.Null,
1243
+ ]),
1244
+ ),
1245
+ roles: Schema.optional(
1246
+ Schema.Union([
1247
+ Schema.Array(
1248
+ Schema.Struct({
1249
+ id: Schema.String,
1250
+ description: Schema.String,
1251
+ name: Schema.String,
1252
+ permissions: Schema.Struct({
1253
+ analytics: Schema.optional(
1254
+ Schema.Union([
1255
+ Schema.Struct({
1256
+ read: Schema.optional(
1257
+ Schema.Union([Schema.Boolean, Schema.Null]),
1258
+ ),
1259
+ write: Schema.optional(
1260
+ Schema.Union([Schema.Boolean, Schema.Null]),
1261
+ ),
1262
+ }),
1263
+ Schema.Null,
1264
+ ]),
1265
+ ),
1266
+ billing: Schema.optional(
1267
+ Schema.Union([
1268
+ Schema.Struct({
1269
+ read: Schema.optional(
1270
+ Schema.Union([Schema.Boolean, Schema.Null]),
1271
+ ),
1272
+ write: Schema.optional(
1273
+ Schema.Union([Schema.Boolean, Schema.Null]),
1274
+ ),
1275
+ }),
1276
+ Schema.Null,
1277
+ ]),
1278
+ ),
1279
+ cachePurge: Schema.optional(
1280
+ Schema.Union([
1281
+ Schema.Struct({
1282
+ read: Schema.optional(
1283
+ Schema.Union([Schema.Boolean, Schema.Null]),
1284
+ ),
1285
+ write: Schema.optional(
1286
+ Schema.Union([Schema.Boolean, Schema.Null]),
1287
+ ),
1288
+ }),
1289
+ Schema.Null,
1290
+ ]),
1291
+ ),
1292
+ dns: Schema.optional(
1293
+ Schema.Union([
1294
+ Schema.Struct({
1295
+ read: Schema.optional(
1296
+ Schema.Union([Schema.Boolean, Schema.Null]),
1297
+ ),
1298
+ write: Schema.optional(
1299
+ Schema.Union([Schema.Boolean, Schema.Null]),
1300
+ ),
1301
+ }),
1302
+ Schema.Null,
1303
+ ]),
1304
+ ),
1305
+ dnsRecords: Schema.optional(
1306
+ Schema.Union([
1307
+ Schema.Struct({
1308
+ read: Schema.optional(
1309
+ Schema.Union([Schema.Boolean, Schema.Null]),
1310
+ ),
1311
+ write: Schema.optional(
1312
+ Schema.Union([Schema.Boolean, Schema.Null]),
1313
+ ),
1314
+ }),
1315
+ Schema.Null,
1316
+ ]),
1317
+ ),
1318
+ lb: Schema.optional(
1319
+ Schema.Union([
1320
+ Schema.Struct({
1321
+ read: Schema.optional(
1322
+ Schema.Union([Schema.Boolean, Schema.Null]),
1323
+ ),
1324
+ write: Schema.optional(
1325
+ Schema.Union([Schema.Boolean, Schema.Null]),
1326
+ ),
1327
+ }),
1328
+ Schema.Null,
1329
+ ]),
1330
+ ),
1331
+ logs: Schema.optional(
1332
+ Schema.Union([
1333
+ Schema.Struct({
1334
+ read: Schema.optional(
1335
+ Schema.Union([Schema.Boolean, Schema.Null]),
1336
+ ),
1337
+ write: Schema.optional(
1338
+ Schema.Union([Schema.Boolean, Schema.Null]),
1339
+ ),
1340
+ }),
1341
+ Schema.Null,
1342
+ ]),
1343
+ ),
1344
+ organization: Schema.optional(
1345
+ Schema.Union([
1346
+ Schema.Struct({
1347
+ read: Schema.optional(
1348
+ Schema.Union([Schema.Boolean, Schema.Null]),
1349
+ ),
1350
+ write: Schema.optional(
1351
+ Schema.Union([Schema.Boolean, Schema.Null]),
1352
+ ),
1353
+ }),
1354
+ Schema.Null,
1355
+ ]),
1356
+ ),
1357
+ ssl: Schema.optional(
1358
+ Schema.Union([
1359
+ Schema.Struct({
1360
+ read: Schema.optional(
1361
+ Schema.Union([Schema.Boolean, Schema.Null]),
1362
+ ),
1363
+ write: Schema.optional(
1364
+ Schema.Union([Schema.Boolean, Schema.Null]),
1365
+ ),
1366
+ }),
1367
+ Schema.Null,
1368
+ ]),
1369
+ ),
1370
+ waf: Schema.optional(
1371
+ Schema.Union([
1372
+ Schema.Struct({
1373
+ read: Schema.optional(
1374
+ Schema.Union([Schema.Boolean, Schema.Null]),
1375
+ ),
1376
+ write: Schema.optional(
1377
+ Schema.Union([Schema.Boolean, Schema.Null]),
1378
+ ),
1379
+ }),
1380
+ Schema.Null,
1381
+ ]),
1382
+ ),
1383
+ zoneSettings: Schema.optional(
1384
+ Schema.Union([
1385
+ Schema.Struct({
1386
+ read: Schema.optional(
1387
+ Schema.Union([Schema.Boolean, Schema.Null]),
1388
+ ),
1389
+ write: Schema.optional(
1390
+ Schema.Union([Schema.Boolean, Schema.Null]),
1391
+ ),
1392
+ }),
1393
+ Schema.Null,
1394
+ ]),
1395
+ ),
1396
+ zones: Schema.optional(
1397
+ Schema.Union([
1398
+ Schema.Struct({
1399
+ read: Schema.optional(
1400
+ Schema.Union([Schema.Boolean, Schema.Null]),
1401
+ ),
1402
+ write: Schema.optional(
1403
+ Schema.Union([Schema.Boolean, Schema.Null]),
1404
+ ),
1405
+ }),
1406
+ Schema.Null,
1407
+ ]),
1408
+ ),
1409
+ }).pipe(
1410
+ Schema.encodeKeys({
1411
+ analytics: "analytics",
1412
+ billing: "billing",
1413
+ cachePurge: "cache_purge",
1414
+ dns: "dns",
1415
+ dnsRecords: "dns_records",
1416
+ lb: "lb",
1417
+ logs: "logs",
1418
+ organization: "organization",
1419
+ ssl: "ssl",
1420
+ waf: "waf",
1421
+ zoneSettings: "zone_settings",
1422
+ zones: "zones",
1423
+ }),
1424
+ ),
1425
+ }),
1426
+ ),
1427
+ Schema.Null,
1428
+ ]),
1429
+ ),
1430
+ status: Schema.optional(
1431
+ Schema.Union([Schema.Literals(["accepted", "pending"]), Schema.Null]),
1432
+ ),
1433
+ user: Schema.optional(
1434
+ Schema.Union([
1435
+ Schema.Struct({
1436
+ email: Schema.String,
1437
+ id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1438
+ firstName: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1439
+ lastName: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1440
+ twoFactorAuthenticationEnabled: Schema.optional(
1441
+ Schema.Union([Schema.Boolean, Schema.Null]),
1442
+ ),
1443
+ }).pipe(
1444
+ Schema.encodeKeys({
1445
+ email: "email",
1446
+ id: "id",
1447
+ firstName: "first_name",
1448
+ lastName: "last_name",
1449
+ twoFactorAuthenticationEnabled: "two_factor_authentication_enabled",
1450
+ }),
1451
+ ),
1452
+ Schema.Null,
1453
+ ]),
1454
+ ),
1455
+ }).pipe(
1456
+ T.ResponsePath("result"),
1457
+ ) as unknown as Schema.Schema<GetMemberResponse>;
1152
1458
 
1153
1459
  export type GetMemberError = DefaultErrors | MemberNotFound | InvalidRoute;
1154
1460
 
@@ -1194,22 +1500,439 @@ export const ListMembersRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1194
1500
  T.Http({ method: "GET", path: "/accounts/{account_id}/members" }),
1195
1501
  ) as unknown as Schema.Schema<ListMembersRequest>;
1196
1502
 
1197
- export type ListMembersResponse = unknown;
1503
+ export interface ListMembersResponse {
1504
+ result: {
1505
+ id?: string | null;
1506
+ email?: string | null;
1507
+ policies?:
1508
+ | {
1509
+ id?: string | null;
1510
+ access?: "allow" | "deny" | null;
1511
+ permissionGroups?: { id: string }[] | null;
1512
+ resourceGroups?: { id: string }[] | null;
1513
+ }[]
1514
+ | null;
1515
+ roles?:
1516
+ | {
1517
+ id: string;
1518
+ description: string;
1519
+ name: string;
1520
+ permissions: {
1521
+ analytics?: {
1522
+ read?: boolean | null;
1523
+ write?: boolean | null;
1524
+ } | null;
1525
+ billing?: { read?: boolean | null; write?: boolean | null } | null;
1526
+ cachePurge?: {
1527
+ read?: boolean | null;
1528
+ write?: boolean | null;
1529
+ } | null;
1530
+ dns?: { read?: boolean | null; write?: boolean | null } | null;
1531
+ dnsRecords?: {
1532
+ read?: boolean | null;
1533
+ write?: boolean | null;
1534
+ } | null;
1535
+ lb?: { read?: boolean | null; write?: boolean | null } | null;
1536
+ logs?: { read?: boolean | null; write?: boolean | null } | null;
1537
+ organization?: {
1538
+ read?: boolean | null;
1539
+ write?: boolean | null;
1540
+ } | null;
1541
+ ssl?: { read?: boolean | null; write?: boolean | null } | null;
1542
+ waf?: { read?: boolean | null; write?: boolean | null } | null;
1543
+ zoneSettings?: {
1544
+ read?: boolean | null;
1545
+ write?: boolean | null;
1546
+ } | null;
1547
+ zones?: { read?: boolean | null; write?: boolean | null } | null;
1548
+ };
1549
+ }[]
1550
+ | null;
1551
+ status?: "accepted" | "pending" | null;
1552
+ user?: {
1553
+ email: string;
1554
+ id?: string | null;
1555
+ firstName?: string | null;
1556
+ lastName?: string | null;
1557
+ twoFactorAuthenticationEnabled?: boolean | null;
1558
+ } | null;
1559
+ }[];
1560
+ resultInfo: {
1561
+ count?: number | null;
1562
+ page?: number | null;
1563
+ perPage?: number | null;
1564
+ totalCount?: number | null;
1565
+ };
1566
+ }
1198
1567
 
1199
- export const ListMembersResponse =
1200
- /*@__PURE__*/ /*#__PURE__*/ Schema.Unknown as unknown as Schema.Schema<ListMembersResponse>;
1568
+ export const ListMembersResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1569
+ result: Schema.Array(
1570
+ Schema.Struct({
1571
+ id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1572
+ email: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1573
+ policies: Schema.optional(
1574
+ Schema.Union([
1575
+ Schema.Array(
1576
+ Schema.Struct({
1577
+ id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1578
+ access: Schema.optional(
1579
+ Schema.Union([Schema.Literals(["allow", "deny"]), Schema.Null]),
1580
+ ),
1581
+ permissionGroups: Schema.optional(
1582
+ Schema.Union([
1583
+ Schema.Array(
1584
+ Schema.Struct({
1585
+ id: Schema.String,
1586
+ }),
1587
+ ),
1588
+ Schema.Null,
1589
+ ]),
1590
+ ),
1591
+ resourceGroups: Schema.optional(
1592
+ Schema.Union([
1593
+ Schema.Array(
1594
+ Schema.Struct({
1595
+ id: Schema.String,
1596
+ }),
1597
+ ),
1598
+ Schema.Null,
1599
+ ]),
1600
+ ),
1601
+ }).pipe(
1602
+ Schema.encodeKeys({
1603
+ id: "id",
1604
+ access: "access",
1605
+ permissionGroups: "permission_groups",
1606
+ resourceGroups: "resource_groups",
1607
+ }),
1608
+ ),
1609
+ ),
1610
+ Schema.Null,
1611
+ ]),
1612
+ ),
1613
+ roles: Schema.optional(
1614
+ Schema.Union([
1615
+ Schema.Array(
1616
+ Schema.Struct({
1617
+ id: Schema.String,
1618
+ description: Schema.String,
1619
+ name: Schema.String,
1620
+ permissions: Schema.Struct({
1621
+ analytics: Schema.optional(
1622
+ Schema.Union([
1623
+ Schema.Struct({
1624
+ read: Schema.optional(
1625
+ Schema.Union([Schema.Boolean, Schema.Null]),
1626
+ ),
1627
+ write: Schema.optional(
1628
+ Schema.Union([Schema.Boolean, Schema.Null]),
1629
+ ),
1630
+ }),
1631
+ Schema.Null,
1632
+ ]),
1633
+ ),
1634
+ billing: Schema.optional(
1635
+ Schema.Union([
1636
+ Schema.Struct({
1637
+ read: Schema.optional(
1638
+ Schema.Union([Schema.Boolean, Schema.Null]),
1639
+ ),
1640
+ write: Schema.optional(
1641
+ Schema.Union([Schema.Boolean, Schema.Null]),
1642
+ ),
1643
+ }),
1644
+ Schema.Null,
1645
+ ]),
1646
+ ),
1647
+ cachePurge: Schema.optional(
1648
+ Schema.Union([
1649
+ Schema.Struct({
1650
+ read: Schema.optional(
1651
+ Schema.Union([Schema.Boolean, Schema.Null]),
1652
+ ),
1653
+ write: Schema.optional(
1654
+ Schema.Union([Schema.Boolean, Schema.Null]),
1655
+ ),
1656
+ }),
1657
+ Schema.Null,
1658
+ ]),
1659
+ ),
1660
+ dns: Schema.optional(
1661
+ Schema.Union([
1662
+ Schema.Struct({
1663
+ read: Schema.optional(
1664
+ Schema.Union([Schema.Boolean, Schema.Null]),
1665
+ ),
1666
+ write: Schema.optional(
1667
+ Schema.Union([Schema.Boolean, Schema.Null]),
1668
+ ),
1669
+ }),
1670
+ Schema.Null,
1671
+ ]),
1672
+ ),
1673
+ dnsRecords: Schema.optional(
1674
+ Schema.Union([
1675
+ Schema.Struct({
1676
+ read: Schema.optional(
1677
+ Schema.Union([Schema.Boolean, Schema.Null]),
1678
+ ),
1679
+ write: Schema.optional(
1680
+ Schema.Union([Schema.Boolean, Schema.Null]),
1681
+ ),
1682
+ }),
1683
+ Schema.Null,
1684
+ ]),
1685
+ ),
1686
+ lb: Schema.optional(
1687
+ Schema.Union([
1688
+ Schema.Struct({
1689
+ read: Schema.optional(
1690
+ Schema.Union([Schema.Boolean, Schema.Null]),
1691
+ ),
1692
+ write: Schema.optional(
1693
+ Schema.Union([Schema.Boolean, Schema.Null]),
1694
+ ),
1695
+ }),
1696
+ Schema.Null,
1697
+ ]),
1698
+ ),
1699
+ logs: Schema.optional(
1700
+ Schema.Union([
1701
+ Schema.Struct({
1702
+ read: Schema.optional(
1703
+ Schema.Union([Schema.Boolean, Schema.Null]),
1704
+ ),
1705
+ write: Schema.optional(
1706
+ Schema.Union([Schema.Boolean, Schema.Null]),
1707
+ ),
1708
+ }),
1709
+ Schema.Null,
1710
+ ]),
1711
+ ),
1712
+ organization: Schema.optional(
1713
+ Schema.Union([
1714
+ Schema.Struct({
1715
+ read: Schema.optional(
1716
+ Schema.Union([Schema.Boolean, Schema.Null]),
1717
+ ),
1718
+ write: Schema.optional(
1719
+ Schema.Union([Schema.Boolean, Schema.Null]),
1720
+ ),
1721
+ }),
1722
+ Schema.Null,
1723
+ ]),
1724
+ ),
1725
+ ssl: Schema.optional(
1726
+ Schema.Union([
1727
+ Schema.Struct({
1728
+ read: Schema.optional(
1729
+ Schema.Union([Schema.Boolean, Schema.Null]),
1730
+ ),
1731
+ write: Schema.optional(
1732
+ Schema.Union([Schema.Boolean, Schema.Null]),
1733
+ ),
1734
+ }),
1735
+ Schema.Null,
1736
+ ]),
1737
+ ),
1738
+ waf: Schema.optional(
1739
+ Schema.Union([
1740
+ Schema.Struct({
1741
+ read: Schema.optional(
1742
+ Schema.Union([Schema.Boolean, Schema.Null]),
1743
+ ),
1744
+ write: Schema.optional(
1745
+ Schema.Union([Schema.Boolean, Schema.Null]),
1746
+ ),
1747
+ }),
1748
+ Schema.Null,
1749
+ ]),
1750
+ ),
1751
+ zoneSettings: Schema.optional(
1752
+ Schema.Union([
1753
+ Schema.Struct({
1754
+ read: Schema.optional(
1755
+ Schema.Union([Schema.Boolean, Schema.Null]),
1756
+ ),
1757
+ write: Schema.optional(
1758
+ Schema.Union([Schema.Boolean, Schema.Null]),
1759
+ ),
1760
+ }),
1761
+ Schema.Null,
1762
+ ]),
1763
+ ),
1764
+ zones: Schema.optional(
1765
+ Schema.Union([
1766
+ Schema.Struct({
1767
+ read: Schema.optional(
1768
+ Schema.Union([Schema.Boolean, Schema.Null]),
1769
+ ),
1770
+ write: Schema.optional(
1771
+ Schema.Union([Schema.Boolean, Schema.Null]),
1772
+ ),
1773
+ }),
1774
+ Schema.Null,
1775
+ ]),
1776
+ ),
1777
+ }).pipe(
1778
+ Schema.encodeKeys({
1779
+ analytics: "analytics",
1780
+ billing: "billing",
1781
+ cachePurge: "cache_purge",
1782
+ dns: "dns",
1783
+ dnsRecords: "dns_records",
1784
+ lb: "lb",
1785
+ logs: "logs",
1786
+ organization: "organization",
1787
+ ssl: "ssl",
1788
+ waf: "waf",
1789
+ zoneSettings: "zone_settings",
1790
+ zones: "zones",
1791
+ }),
1792
+ ),
1793
+ }),
1794
+ ),
1795
+ Schema.Null,
1796
+ ]),
1797
+ ),
1798
+ status: Schema.optional(
1799
+ Schema.Union([Schema.Literals(["accepted", "pending"]), Schema.Null]),
1800
+ ),
1801
+ user: Schema.optional(
1802
+ Schema.Union([
1803
+ Schema.Struct({
1804
+ email: Schema.String,
1805
+ id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1806
+ firstName: Schema.optional(
1807
+ Schema.Union([Schema.String, Schema.Null]),
1808
+ ),
1809
+ lastName: Schema.optional(
1810
+ Schema.Union([Schema.String, Schema.Null]),
1811
+ ),
1812
+ twoFactorAuthenticationEnabled: Schema.optional(
1813
+ Schema.Union([Schema.Boolean, Schema.Null]),
1814
+ ),
1815
+ }).pipe(
1816
+ Schema.encodeKeys({
1817
+ email: "email",
1818
+ id: "id",
1819
+ firstName: "first_name",
1820
+ lastName: "last_name",
1821
+ twoFactorAuthenticationEnabled:
1822
+ "two_factor_authentication_enabled",
1823
+ }),
1824
+ ),
1825
+ Schema.Null,
1826
+ ]),
1827
+ ),
1828
+ }),
1829
+ ),
1830
+ resultInfo: Schema.Struct({
1831
+ count: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
1832
+ page: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
1833
+ perPage: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
1834
+ totalCount: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
1835
+ }).pipe(
1836
+ Schema.encodeKeys({
1837
+ count: "count",
1838
+ page: "page",
1839
+ perPage: "per_page",
1840
+ totalCount: "total_count",
1841
+ }),
1842
+ ),
1843
+ }).pipe(
1844
+ Schema.encodeKeys({ result: "result", resultInfo: "result_info" }),
1845
+ ) as unknown as Schema.Schema<ListMembersResponse>;
1201
1846
 
1202
1847
  export type ListMembersError = DefaultErrors;
1203
1848
 
1204
- export const listMembers: API.OperationMethod<
1849
+ export const listMembers: API.PaginatedOperationMethod<
1205
1850
  ListMembersRequest,
1206
1851
  ListMembersResponse,
1207
1852
  ListMembersError,
1208
1853
  Credentials | HttpClient.HttpClient
1209
- > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
1854
+ > & {
1855
+ pages: (
1856
+ input: ListMembersRequest,
1857
+ ) => stream.Stream<
1858
+ ListMembersResponse,
1859
+ ListMembersError,
1860
+ Credentials | HttpClient.HttpClient
1861
+ >;
1862
+ items: (input: ListMembersRequest) => stream.Stream<
1863
+ {
1864
+ id?: string | null;
1865
+ email?: string | null;
1866
+ policies?:
1867
+ | {
1868
+ id?: string | null;
1869
+ access?: "allow" | "deny" | null;
1870
+ permissionGroups?: { id: string }[] | null;
1871
+ resourceGroups?: { id: string }[] | null;
1872
+ }[]
1873
+ | null;
1874
+ roles?:
1875
+ | {
1876
+ id: string;
1877
+ description: string;
1878
+ name: string;
1879
+ permissions: {
1880
+ analytics?: {
1881
+ read?: boolean | null;
1882
+ write?: boolean | null;
1883
+ } | null;
1884
+ billing?: {
1885
+ read?: boolean | null;
1886
+ write?: boolean | null;
1887
+ } | null;
1888
+ cachePurge?: {
1889
+ read?: boolean | null;
1890
+ write?: boolean | null;
1891
+ } | null;
1892
+ dns?: { read?: boolean | null; write?: boolean | null } | null;
1893
+ dnsRecords?: {
1894
+ read?: boolean | null;
1895
+ write?: boolean | null;
1896
+ } | null;
1897
+ lb?: { read?: boolean | null; write?: boolean | null } | null;
1898
+ logs?: { read?: boolean | null; write?: boolean | null } | null;
1899
+ organization?: {
1900
+ read?: boolean | null;
1901
+ write?: boolean | null;
1902
+ } | null;
1903
+ ssl?: { read?: boolean | null; write?: boolean | null } | null;
1904
+ waf?: { read?: boolean | null; write?: boolean | null } | null;
1905
+ zoneSettings?: {
1906
+ read?: boolean | null;
1907
+ write?: boolean | null;
1908
+ } | null;
1909
+ zones?: { read?: boolean | null; write?: boolean | null } | null;
1910
+ };
1911
+ }[]
1912
+ | null;
1913
+ status?: "accepted" | "pending" | null;
1914
+ user?: {
1915
+ email: string;
1916
+ id?: string | null;
1917
+ firstName?: string | null;
1918
+ lastName?: string | null;
1919
+ twoFactorAuthenticationEnabled?: boolean | null;
1920
+ } | null;
1921
+ },
1922
+ ListMembersError,
1923
+ Credentials | HttpClient.HttpClient
1924
+ >;
1925
+ } = /*@__PURE__*/ /*#__PURE__*/ API.makePaginated(() => ({
1210
1926
  input: ListMembersRequest,
1211
1927
  output: ListMembersResponse,
1212
1928
  errors: [],
1929
+ pagination: {
1930
+ mode: "page",
1931
+ inputToken: "page",
1932
+ outputToken: "resultInfo.page",
1933
+ items: "result",
1934
+ pageSize: "perPage",
1935
+ } as const,
1213
1936
  }));
1214
1937
 
1215
1938
  export interface CreateMemberRequest {
@@ -1232,10 +1955,316 @@ export const CreateMemberRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1232
1955
  T.Http({ method: "POST", path: "/accounts/{account_id}/members" }),
1233
1956
  ) as unknown as Schema.Schema<CreateMemberRequest>;
1234
1957
 
1235
- export type CreateMemberResponse = unknown;
1958
+ export interface CreateMemberResponse {
1959
+ /** Membership identifier tag. */
1960
+ id?: string | null;
1961
+ /** The contact email address of the user. */
1962
+ email?: string | null;
1963
+ /** Access policy for the membership */
1964
+ policies?:
1965
+ | {
1966
+ id?: string | null;
1967
+ access?: "allow" | "deny" | null;
1968
+ permissionGroups?: { id: string }[] | null;
1969
+ resourceGroups?: { id: string }[] | null;
1970
+ }[]
1971
+ | null;
1972
+ /** Roles assigned to this Member. */
1973
+ roles?:
1974
+ | {
1975
+ id: string;
1976
+ description: string;
1977
+ name: string;
1978
+ permissions: {
1979
+ analytics?: { read?: boolean | null; write?: boolean | null } | null;
1980
+ billing?: { read?: boolean | null; write?: boolean | null } | null;
1981
+ cachePurge?: { read?: boolean | null; write?: boolean | null } | null;
1982
+ dns?: { read?: boolean | null; write?: boolean | null } | null;
1983
+ dnsRecords?: { read?: boolean | null; write?: boolean | null } | null;
1984
+ lb?: { read?: boolean | null; write?: boolean | null } | null;
1985
+ logs?: { read?: boolean | null; write?: boolean | null } | null;
1986
+ organization?: {
1987
+ read?: boolean | null;
1988
+ write?: boolean | null;
1989
+ } | null;
1990
+ ssl?: { read?: boolean | null; write?: boolean | null } | null;
1991
+ waf?: { read?: boolean | null; write?: boolean | null } | null;
1992
+ zoneSettings?: {
1993
+ read?: boolean | null;
1994
+ write?: boolean | null;
1995
+ } | null;
1996
+ zones?: { read?: boolean | null; write?: boolean | null } | null;
1997
+ };
1998
+ }[]
1999
+ | null;
2000
+ /** A member's status in the account. */
2001
+ status?: "accepted" | "pending" | null;
2002
+ /** Details of the user associated to the membership. */
2003
+ user?: {
2004
+ email: string;
2005
+ id?: string | null;
2006
+ firstName?: string | null;
2007
+ lastName?: string | null;
2008
+ twoFactorAuthenticationEnabled?: boolean | null;
2009
+ } | null;
2010
+ }
1236
2011
 
1237
- export const CreateMemberResponse =
1238
- /*@__PURE__*/ /*#__PURE__*/ Schema.Unknown as unknown as Schema.Schema<CreateMemberResponse>;
2012
+ export const CreateMemberResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
2013
+ id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
2014
+ email: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
2015
+ policies: Schema.optional(
2016
+ Schema.Union([
2017
+ Schema.Array(
2018
+ Schema.Struct({
2019
+ id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
2020
+ access: Schema.optional(
2021
+ Schema.Union([Schema.Literals(["allow", "deny"]), Schema.Null]),
2022
+ ),
2023
+ permissionGroups: Schema.optional(
2024
+ Schema.Union([
2025
+ Schema.Array(
2026
+ Schema.Struct({
2027
+ id: Schema.String,
2028
+ }),
2029
+ ),
2030
+ Schema.Null,
2031
+ ]),
2032
+ ),
2033
+ resourceGroups: Schema.optional(
2034
+ Schema.Union([
2035
+ Schema.Array(
2036
+ Schema.Struct({
2037
+ id: Schema.String,
2038
+ }),
2039
+ ),
2040
+ Schema.Null,
2041
+ ]),
2042
+ ),
2043
+ }).pipe(
2044
+ Schema.encodeKeys({
2045
+ id: "id",
2046
+ access: "access",
2047
+ permissionGroups: "permission_groups",
2048
+ resourceGroups: "resource_groups",
2049
+ }),
2050
+ ),
2051
+ ),
2052
+ Schema.Null,
2053
+ ]),
2054
+ ),
2055
+ roles: Schema.optional(
2056
+ Schema.Union([
2057
+ Schema.Array(
2058
+ Schema.Struct({
2059
+ id: Schema.String,
2060
+ description: Schema.String,
2061
+ name: Schema.String,
2062
+ permissions: Schema.Struct({
2063
+ analytics: Schema.optional(
2064
+ Schema.Union([
2065
+ Schema.Struct({
2066
+ read: Schema.optional(
2067
+ Schema.Union([Schema.Boolean, Schema.Null]),
2068
+ ),
2069
+ write: Schema.optional(
2070
+ Schema.Union([Schema.Boolean, Schema.Null]),
2071
+ ),
2072
+ }),
2073
+ Schema.Null,
2074
+ ]),
2075
+ ),
2076
+ billing: Schema.optional(
2077
+ Schema.Union([
2078
+ Schema.Struct({
2079
+ read: Schema.optional(
2080
+ Schema.Union([Schema.Boolean, Schema.Null]),
2081
+ ),
2082
+ write: Schema.optional(
2083
+ Schema.Union([Schema.Boolean, Schema.Null]),
2084
+ ),
2085
+ }),
2086
+ Schema.Null,
2087
+ ]),
2088
+ ),
2089
+ cachePurge: Schema.optional(
2090
+ Schema.Union([
2091
+ Schema.Struct({
2092
+ read: Schema.optional(
2093
+ Schema.Union([Schema.Boolean, Schema.Null]),
2094
+ ),
2095
+ write: Schema.optional(
2096
+ Schema.Union([Schema.Boolean, Schema.Null]),
2097
+ ),
2098
+ }),
2099
+ Schema.Null,
2100
+ ]),
2101
+ ),
2102
+ dns: Schema.optional(
2103
+ Schema.Union([
2104
+ Schema.Struct({
2105
+ read: Schema.optional(
2106
+ Schema.Union([Schema.Boolean, Schema.Null]),
2107
+ ),
2108
+ write: Schema.optional(
2109
+ Schema.Union([Schema.Boolean, Schema.Null]),
2110
+ ),
2111
+ }),
2112
+ Schema.Null,
2113
+ ]),
2114
+ ),
2115
+ dnsRecords: Schema.optional(
2116
+ Schema.Union([
2117
+ Schema.Struct({
2118
+ read: Schema.optional(
2119
+ Schema.Union([Schema.Boolean, Schema.Null]),
2120
+ ),
2121
+ write: Schema.optional(
2122
+ Schema.Union([Schema.Boolean, Schema.Null]),
2123
+ ),
2124
+ }),
2125
+ Schema.Null,
2126
+ ]),
2127
+ ),
2128
+ lb: Schema.optional(
2129
+ Schema.Union([
2130
+ Schema.Struct({
2131
+ read: Schema.optional(
2132
+ Schema.Union([Schema.Boolean, Schema.Null]),
2133
+ ),
2134
+ write: Schema.optional(
2135
+ Schema.Union([Schema.Boolean, Schema.Null]),
2136
+ ),
2137
+ }),
2138
+ Schema.Null,
2139
+ ]),
2140
+ ),
2141
+ logs: Schema.optional(
2142
+ Schema.Union([
2143
+ Schema.Struct({
2144
+ read: Schema.optional(
2145
+ Schema.Union([Schema.Boolean, Schema.Null]),
2146
+ ),
2147
+ write: Schema.optional(
2148
+ Schema.Union([Schema.Boolean, Schema.Null]),
2149
+ ),
2150
+ }),
2151
+ Schema.Null,
2152
+ ]),
2153
+ ),
2154
+ organization: Schema.optional(
2155
+ Schema.Union([
2156
+ Schema.Struct({
2157
+ read: Schema.optional(
2158
+ Schema.Union([Schema.Boolean, Schema.Null]),
2159
+ ),
2160
+ write: Schema.optional(
2161
+ Schema.Union([Schema.Boolean, Schema.Null]),
2162
+ ),
2163
+ }),
2164
+ Schema.Null,
2165
+ ]),
2166
+ ),
2167
+ ssl: Schema.optional(
2168
+ Schema.Union([
2169
+ Schema.Struct({
2170
+ read: Schema.optional(
2171
+ Schema.Union([Schema.Boolean, Schema.Null]),
2172
+ ),
2173
+ write: Schema.optional(
2174
+ Schema.Union([Schema.Boolean, Schema.Null]),
2175
+ ),
2176
+ }),
2177
+ Schema.Null,
2178
+ ]),
2179
+ ),
2180
+ waf: Schema.optional(
2181
+ Schema.Union([
2182
+ Schema.Struct({
2183
+ read: Schema.optional(
2184
+ Schema.Union([Schema.Boolean, Schema.Null]),
2185
+ ),
2186
+ write: Schema.optional(
2187
+ Schema.Union([Schema.Boolean, Schema.Null]),
2188
+ ),
2189
+ }),
2190
+ Schema.Null,
2191
+ ]),
2192
+ ),
2193
+ zoneSettings: Schema.optional(
2194
+ Schema.Union([
2195
+ Schema.Struct({
2196
+ read: Schema.optional(
2197
+ Schema.Union([Schema.Boolean, Schema.Null]),
2198
+ ),
2199
+ write: Schema.optional(
2200
+ Schema.Union([Schema.Boolean, Schema.Null]),
2201
+ ),
2202
+ }),
2203
+ Schema.Null,
2204
+ ]),
2205
+ ),
2206
+ zones: Schema.optional(
2207
+ Schema.Union([
2208
+ Schema.Struct({
2209
+ read: Schema.optional(
2210
+ Schema.Union([Schema.Boolean, Schema.Null]),
2211
+ ),
2212
+ write: Schema.optional(
2213
+ Schema.Union([Schema.Boolean, Schema.Null]),
2214
+ ),
2215
+ }),
2216
+ Schema.Null,
2217
+ ]),
2218
+ ),
2219
+ }).pipe(
2220
+ Schema.encodeKeys({
2221
+ analytics: "analytics",
2222
+ billing: "billing",
2223
+ cachePurge: "cache_purge",
2224
+ dns: "dns",
2225
+ dnsRecords: "dns_records",
2226
+ lb: "lb",
2227
+ logs: "logs",
2228
+ organization: "organization",
2229
+ ssl: "ssl",
2230
+ waf: "waf",
2231
+ zoneSettings: "zone_settings",
2232
+ zones: "zones",
2233
+ }),
2234
+ ),
2235
+ }),
2236
+ ),
2237
+ Schema.Null,
2238
+ ]),
2239
+ ),
2240
+ status: Schema.optional(
2241
+ Schema.Union([Schema.Literals(["accepted", "pending"]), Schema.Null]),
2242
+ ),
2243
+ user: Schema.optional(
2244
+ Schema.Union([
2245
+ Schema.Struct({
2246
+ email: Schema.String,
2247
+ id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
2248
+ firstName: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
2249
+ lastName: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
2250
+ twoFactorAuthenticationEnabled: Schema.optional(
2251
+ Schema.Union([Schema.Boolean, Schema.Null]),
2252
+ ),
2253
+ }).pipe(
2254
+ Schema.encodeKeys({
2255
+ email: "email",
2256
+ id: "id",
2257
+ firstName: "first_name",
2258
+ lastName: "last_name",
2259
+ twoFactorAuthenticationEnabled: "two_factor_authentication_enabled",
2260
+ }),
2261
+ ),
2262
+ Schema.Null,
2263
+ ]),
2264
+ ),
2265
+ }).pipe(
2266
+ T.ResponsePath("result"),
2267
+ ) as unknown as Schema.Schema<CreateMemberResponse>;
1239
2268
 
1240
2269
  export type CreateMemberError = DefaultErrors | InvalidRoute | ValidationError;
1241
2270
 
@@ -1255,21 +2284,333 @@ export interface UpdateMemberRequest {
1255
2284
  /** Path param: Account identifier tag. */
1256
2285
  accountId: string;
1257
2286
  /** Body param: Roles assigned to this member. */
1258
- roles?: unknown[];
2287
+ roles?: { id: string }[];
1259
2288
  }
1260
2289
 
1261
2290
  export const UpdateMemberRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1262
2291
  memberId: Schema.String.pipe(T.HttpPath("memberId")),
1263
2292
  accountId: Schema.String.pipe(T.HttpPath("account_id")),
1264
- roles: Schema.optional(Schema.Array(Schema.Unknown)),
2293
+ roles: Schema.optional(
2294
+ Schema.Array(
2295
+ Schema.Struct({
2296
+ id: Schema.String,
2297
+ }),
2298
+ ),
2299
+ ),
2300
+ }).pipe(
2301
+ T.Http({ method: "PUT", path: "/accounts/{account_id}/members/{memberId}" }),
2302
+ ) as unknown as Schema.Schema<UpdateMemberRequest>;
2303
+
2304
+ export interface UpdateMemberResponse {
2305
+ /** Membership identifier tag. */
2306
+ id?: string | null;
2307
+ /** The contact email address of the user. */
2308
+ email?: string | null;
2309
+ /** Access policy for the membership */
2310
+ policies?:
2311
+ | {
2312
+ id?: string | null;
2313
+ access?: "allow" | "deny" | null;
2314
+ permissionGroups?: { id: string }[] | null;
2315
+ resourceGroups?: { id: string }[] | null;
2316
+ }[]
2317
+ | null;
2318
+ /** Roles assigned to this Member. */
2319
+ roles?:
2320
+ | {
2321
+ id: string;
2322
+ description: string;
2323
+ name: string;
2324
+ permissions: {
2325
+ analytics?: { read?: boolean | null; write?: boolean | null } | null;
2326
+ billing?: { read?: boolean | null; write?: boolean | null } | null;
2327
+ cachePurge?: { read?: boolean | null; write?: boolean | null } | null;
2328
+ dns?: { read?: boolean | null; write?: boolean | null } | null;
2329
+ dnsRecords?: { read?: boolean | null; write?: boolean | null } | null;
2330
+ lb?: { read?: boolean | null; write?: boolean | null } | null;
2331
+ logs?: { read?: boolean | null; write?: boolean | null } | null;
2332
+ organization?: {
2333
+ read?: boolean | null;
2334
+ write?: boolean | null;
2335
+ } | null;
2336
+ ssl?: { read?: boolean | null; write?: boolean | null } | null;
2337
+ waf?: { read?: boolean | null; write?: boolean | null } | null;
2338
+ zoneSettings?: {
2339
+ read?: boolean | null;
2340
+ write?: boolean | null;
2341
+ } | null;
2342
+ zones?: { read?: boolean | null; write?: boolean | null } | null;
2343
+ };
2344
+ }[]
2345
+ | null;
2346
+ /** A member's status in the account. */
2347
+ status?: "accepted" | "pending" | null;
2348
+ /** Details of the user associated to the membership. */
2349
+ user?: {
2350
+ email: string;
2351
+ id?: string | null;
2352
+ firstName?: string | null;
2353
+ lastName?: string | null;
2354
+ twoFactorAuthenticationEnabled?: boolean | null;
2355
+ } | null;
2356
+ }
2357
+
2358
+ export const UpdateMemberResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
2359
+ id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
2360
+ email: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
2361
+ policies: Schema.optional(
2362
+ Schema.Union([
2363
+ Schema.Array(
2364
+ Schema.Struct({
2365
+ id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
2366
+ access: Schema.optional(
2367
+ Schema.Union([Schema.Literals(["allow", "deny"]), Schema.Null]),
2368
+ ),
2369
+ permissionGroups: Schema.optional(
2370
+ Schema.Union([
2371
+ Schema.Array(
2372
+ Schema.Struct({
2373
+ id: Schema.String,
2374
+ }),
2375
+ ),
2376
+ Schema.Null,
2377
+ ]),
2378
+ ),
2379
+ resourceGroups: Schema.optional(
2380
+ Schema.Union([
2381
+ Schema.Array(
2382
+ Schema.Struct({
2383
+ id: Schema.String,
2384
+ }),
2385
+ ),
2386
+ Schema.Null,
2387
+ ]),
2388
+ ),
2389
+ }).pipe(
2390
+ Schema.encodeKeys({
2391
+ id: "id",
2392
+ access: "access",
2393
+ permissionGroups: "permission_groups",
2394
+ resourceGroups: "resource_groups",
2395
+ }),
2396
+ ),
2397
+ ),
2398
+ Schema.Null,
2399
+ ]),
2400
+ ),
2401
+ roles: Schema.optional(
2402
+ Schema.Union([
2403
+ Schema.Array(
2404
+ Schema.Struct({
2405
+ id: Schema.String,
2406
+ description: Schema.String,
2407
+ name: Schema.String,
2408
+ permissions: Schema.Struct({
2409
+ analytics: Schema.optional(
2410
+ Schema.Union([
2411
+ Schema.Struct({
2412
+ read: Schema.optional(
2413
+ Schema.Union([Schema.Boolean, Schema.Null]),
2414
+ ),
2415
+ write: Schema.optional(
2416
+ Schema.Union([Schema.Boolean, Schema.Null]),
2417
+ ),
2418
+ }),
2419
+ Schema.Null,
2420
+ ]),
2421
+ ),
2422
+ billing: Schema.optional(
2423
+ Schema.Union([
2424
+ Schema.Struct({
2425
+ read: Schema.optional(
2426
+ Schema.Union([Schema.Boolean, Schema.Null]),
2427
+ ),
2428
+ write: Schema.optional(
2429
+ Schema.Union([Schema.Boolean, Schema.Null]),
2430
+ ),
2431
+ }),
2432
+ Schema.Null,
2433
+ ]),
2434
+ ),
2435
+ cachePurge: Schema.optional(
2436
+ Schema.Union([
2437
+ Schema.Struct({
2438
+ read: Schema.optional(
2439
+ Schema.Union([Schema.Boolean, Schema.Null]),
2440
+ ),
2441
+ write: Schema.optional(
2442
+ Schema.Union([Schema.Boolean, Schema.Null]),
2443
+ ),
2444
+ }),
2445
+ Schema.Null,
2446
+ ]),
2447
+ ),
2448
+ dns: Schema.optional(
2449
+ Schema.Union([
2450
+ Schema.Struct({
2451
+ read: Schema.optional(
2452
+ Schema.Union([Schema.Boolean, Schema.Null]),
2453
+ ),
2454
+ write: Schema.optional(
2455
+ Schema.Union([Schema.Boolean, Schema.Null]),
2456
+ ),
2457
+ }),
2458
+ Schema.Null,
2459
+ ]),
2460
+ ),
2461
+ dnsRecords: Schema.optional(
2462
+ Schema.Union([
2463
+ Schema.Struct({
2464
+ read: Schema.optional(
2465
+ Schema.Union([Schema.Boolean, Schema.Null]),
2466
+ ),
2467
+ write: Schema.optional(
2468
+ Schema.Union([Schema.Boolean, Schema.Null]),
2469
+ ),
2470
+ }),
2471
+ Schema.Null,
2472
+ ]),
2473
+ ),
2474
+ lb: Schema.optional(
2475
+ Schema.Union([
2476
+ Schema.Struct({
2477
+ read: Schema.optional(
2478
+ Schema.Union([Schema.Boolean, Schema.Null]),
2479
+ ),
2480
+ write: Schema.optional(
2481
+ Schema.Union([Schema.Boolean, Schema.Null]),
2482
+ ),
2483
+ }),
2484
+ Schema.Null,
2485
+ ]),
2486
+ ),
2487
+ logs: Schema.optional(
2488
+ Schema.Union([
2489
+ Schema.Struct({
2490
+ read: Schema.optional(
2491
+ Schema.Union([Schema.Boolean, Schema.Null]),
2492
+ ),
2493
+ write: Schema.optional(
2494
+ Schema.Union([Schema.Boolean, Schema.Null]),
2495
+ ),
2496
+ }),
2497
+ Schema.Null,
2498
+ ]),
2499
+ ),
2500
+ organization: Schema.optional(
2501
+ Schema.Union([
2502
+ Schema.Struct({
2503
+ read: Schema.optional(
2504
+ Schema.Union([Schema.Boolean, Schema.Null]),
2505
+ ),
2506
+ write: Schema.optional(
2507
+ Schema.Union([Schema.Boolean, Schema.Null]),
2508
+ ),
2509
+ }),
2510
+ Schema.Null,
2511
+ ]),
2512
+ ),
2513
+ ssl: Schema.optional(
2514
+ Schema.Union([
2515
+ Schema.Struct({
2516
+ read: Schema.optional(
2517
+ Schema.Union([Schema.Boolean, Schema.Null]),
2518
+ ),
2519
+ write: Schema.optional(
2520
+ Schema.Union([Schema.Boolean, Schema.Null]),
2521
+ ),
2522
+ }),
2523
+ Schema.Null,
2524
+ ]),
2525
+ ),
2526
+ waf: Schema.optional(
2527
+ Schema.Union([
2528
+ Schema.Struct({
2529
+ read: Schema.optional(
2530
+ Schema.Union([Schema.Boolean, Schema.Null]),
2531
+ ),
2532
+ write: Schema.optional(
2533
+ Schema.Union([Schema.Boolean, Schema.Null]),
2534
+ ),
2535
+ }),
2536
+ Schema.Null,
2537
+ ]),
2538
+ ),
2539
+ zoneSettings: Schema.optional(
2540
+ Schema.Union([
2541
+ Schema.Struct({
2542
+ read: Schema.optional(
2543
+ Schema.Union([Schema.Boolean, Schema.Null]),
2544
+ ),
2545
+ write: Schema.optional(
2546
+ Schema.Union([Schema.Boolean, Schema.Null]),
2547
+ ),
2548
+ }),
2549
+ Schema.Null,
2550
+ ]),
2551
+ ),
2552
+ zones: Schema.optional(
2553
+ Schema.Union([
2554
+ Schema.Struct({
2555
+ read: Schema.optional(
2556
+ Schema.Union([Schema.Boolean, Schema.Null]),
2557
+ ),
2558
+ write: Schema.optional(
2559
+ Schema.Union([Schema.Boolean, Schema.Null]),
2560
+ ),
2561
+ }),
2562
+ Schema.Null,
2563
+ ]),
2564
+ ),
2565
+ }).pipe(
2566
+ Schema.encodeKeys({
2567
+ analytics: "analytics",
2568
+ billing: "billing",
2569
+ cachePurge: "cache_purge",
2570
+ dns: "dns",
2571
+ dnsRecords: "dns_records",
2572
+ lb: "lb",
2573
+ logs: "logs",
2574
+ organization: "organization",
2575
+ ssl: "ssl",
2576
+ waf: "waf",
2577
+ zoneSettings: "zone_settings",
2578
+ zones: "zones",
2579
+ }),
2580
+ ),
2581
+ }),
2582
+ ),
2583
+ Schema.Null,
2584
+ ]),
2585
+ ),
2586
+ status: Schema.optional(
2587
+ Schema.Union([Schema.Literals(["accepted", "pending"]), Schema.Null]),
2588
+ ),
2589
+ user: Schema.optional(
2590
+ Schema.Union([
2591
+ Schema.Struct({
2592
+ email: Schema.String,
2593
+ id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
2594
+ firstName: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
2595
+ lastName: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
2596
+ twoFactorAuthenticationEnabled: Schema.optional(
2597
+ Schema.Union([Schema.Boolean, Schema.Null]),
2598
+ ),
2599
+ }).pipe(
2600
+ Schema.encodeKeys({
2601
+ email: "email",
2602
+ id: "id",
2603
+ firstName: "first_name",
2604
+ lastName: "last_name",
2605
+ twoFactorAuthenticationEnabled: "two_factor_authentication_enabled",
2606
+ }),
2607
+ ),
2608
+ Schema.Null,
2609
+ ]),
2610
+ ),
1265
2611
  }).pipe(
1266
- T.Http({ method: "PUT", path: "/accounts/{account_id}/members/{memberId}" }),
1267
- ) as unknown as Schema.Schema<UpdateMemberRequest>;
1268
-
1269
- export type UpdateMemberResponse = unknown;
1270
-
1271
- export const UpdateMemberResponse =
1272
- /*@__PURE__*/ /*#__PURE__*/ Schema.Unknown as unknown as Schema.Schema<UpdateMemberResponse>;
2612
+ T.ResponsePath("result"),
2613
+ ) as unknown as Schema.Schema<UpdateMemberResponse>;
1273
2614
 
1274
2615
  export type UpdateMemberError =
1275
2616
  | DefaultErrors
@@ -1346,10 +2687,159 @@ export const GetRoleRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1346
2687
  T.Http({ method: "GET", path: "/accounts/{account_id}/roles/{roleId}" }),
1347
2688
  ) as unknown as Schema.Schema<GetRoleRequest>;
1348
2689
 
1349
- export type GetRoleResponse = unknown;
2690
+ export interface GetRoleResponse {
2691
+ /** Role identifier tag. */
2692
+ id: string;
2693
+ /** Description of role's permissions. */
2694
+ description: string;
2695
+ /** Role name. */
2696
+ name: string;
2697
+ permissions: {
2698
+ analytics?: { read?: boolean | null; write?: boolean | null } | null;
2699
+ billing?: { read?: boolean | null; write?: boolean | null } | null;
2700
+ cachePurge?: { read?: boolean | null; write?: boolean | null } | null;
2701
+ dns?: { read?: boolean | null; write?: boolean | null } | null;
2702
+ dnsRecords?: { read?: boolean | null; write?: boolean | null } | null;
2703
+ lb?: { read?: boolean | null; write?: boolean | null } | null;
2704
+ logs?: { read?: boolean | null; write?: boolean | null } | null;
2705
+ organization?: { read?: boolean | null; write?: boolean | null } | null;
2706
+ ssl?: { read?: boolean | null; write?: boolean | null } | null;
2707
+ waf?: { read?: boolean | null; write?: boolean | null } | null;
2708
+ zoneSettings?: { read?: boolean | null; write?: boolean | null } | null;
2709
+ zones?: { read?: boolean | null; write?: boolean | null } | null;
2710
+ };
2711
+ }
1350
2712
 
1351
- export const GetRoleResponse =
1352
- /*@__PURE__*/ /*#__PURE__*/ Schema.Unknown as unknown as Schema.Schema<GetRoleResponse>;
2713
+ export const GetRoleResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
2714
+ id: Schema.String,
2715
+ description: Schema.String,
2716
+ name: Schema.String,
2717
+ permissions: Schema.Struct({
2718
+ analytics: Schema.optional(
2719
+ Schema.Union([
2720
+ Schema.Struct({
2721
+ read: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
2722
+ write: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
2723
+ }),
2724
+ Schema.Null,
2725
+ ]),
2726
+ ),
2727
+ billing: Schema.optional(
2728
+ Schema.Union([
2729
+ Schema.Struct({
2730
+ read: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
2731
+ write: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
2732
+ }),
2733
+ Schema.Null,
2734
+ ]),
2735
+ ),
2736
+ cachePurge: Schema.optional(
2737
+ Schema.Union([
2738
+ Schema.Struct({
2739
+ read: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
2740
+ write: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
2741
+ }),
2742
+ Schema.Null,
2743
+ ]),
2744
+ ),
2745
+ dns: Schema.optional(
2746
+ Schema.Union([
2747
+ Schema.Struct({
2748
+ read: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
2749
+ write: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
2750
+ }),
2751
+ Schema.Null,
2752
+ ]),
2753
+ ),
2754
+ dnsRecords: Schema.optional(
2755
+ Schema.Union([
2756
+ Schema.Struct({
2757
+ read: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
2758
+ write: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
2759
+ }),
2760
+ Schema.Null,
2761
+ ]),
2762
+ ),
2763
+ lb: Schema.optional(
2764
+ Schema.Union([
2765
+ Schema.Struct({
2766
+ read: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
2767
+ write: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
2768
+ }),
2769
+ Schema.Null,
2770
+ ]),
2771
+ ),
2772
+ logs: Schema.optional(
2773
+ Schema.Union([
2774
+ Schema.Struct({
2775
+ read: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
2776
+ write: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
2777
+ }),
2778
+ Schema.Null,
2779
+ ]),
2780
+ ),
2781
+ organization: Schema.optional(
2782
+ Schema.Union([
2783
+ Schema.Struct({
2784
+ read: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
2785
+ write: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
2786
+ }),
2787
+ Schema.Null,
2788
+ ]),
2789
+ ),
2790
+ ssl: Schema.optional(
2791
+ Schema.Union([
2792
+ Schema.Struct({
2793
+ read: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
2794
+ write: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
2795
+ }),
2796
+ Schema.Null,
2797
+ ]),
2798
+ ),
2799
+ waf: Schema.optional(
2800
+ Schema.Union([
2801
+ Schema.Struct({
2802
+ read: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
2803
+ write: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
2804
+ }),
2805
+ Schema.Null,
2806
+ ]),
2807
+ ),
2808
+ zoneSettings: Schema.optional(
2809
+ Schema.Union([
2810
+ Schema.Struct({
2811
+ read: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
2812
+ write: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
2813
+ }),
2814
+ Schema.Null,
2815
+ ]),
2816
+ ),
2817
+ zones: Schema.optional(
2818
+ Schema.Union([
2819
+ Schema.Struct({
2820
+ read: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
2821
+ write: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
2822
+ }),
2823
+ Schema.Null,
2824
+ ]),
2825
+ ),
2826
+ }).pipe(
2827
+ Schema.encodeKeys({
2828
+ analytics: "analytics",
2829
+ billing: "billing",
2830
+ cachePurge: "cache_purge",
2831
+ dns: "dns",
2832
+ dnsRecords: "dns_records",
2833
+ lb: "lb",
2834
+ logs: "logs",
2835
+ organization: "organization",
2836
+ ssl: "ssl",
2837
+ waf: "waf",
2838
+ zoneSettings: "zone_settings",
2839
+ zones: "zones",
2840
+ }),
2841
+ ),
2842
+ }).pipe(T.ResponsePath("result")) as unknown as Schema.Schema<GetRoleResponse>;
1353
2843
 
1354
2844
  export type GetRoleError = DefaultErrors | InvalidRoute;
1355
2845
 
@@ -1372,25 +2862,284 @@ export interface ListRolesRequest {
1372
2862
  export const ListRolesRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1373
2863
  accountId: Schema.String.pipe(T.HttpPath("account_id")),
1374
2864
  }).pipe(
1375
- T.Http({ method: "GET", path: "/accounts/{account_id}/roles" }),
1376
- ) as unknown as Schema.Schema<ListRolesRequest>;
1377
-
1378
- export type ListRolesResponse = unknown;
1379
-
1380
- export const ListRolesResponse =
1381
- /*@__PURE__*/ /*#__PURE__*/ Schema.Unknown as unknown as Schema.Schema<ListRolesResponse>;
2865
+ T.Http({ method: "GET", path: "/accounts/{account_id}/roles" }),
2866
+ ) as unknown as Schema.Schema<ListRolesRequest>;
2867
+
2868
+ export interface ListRolesResponse {
2869
+ result: {
2870
+ id: string;
2871
+ description: string;
2872
+ name: string;
2873
+ permissions: {
2874
+ analytics?: { read?: boolean | null; write?: boolean | null } | null;
2875
+ billing?: { read?: boolean | null; write?: boolean | null } | null;
2876
+ cachePurge?: { read?: boolean | null; write?: boolean | null } | null;
2877
+ dns?: { read?: boolean | null; write?: boolean | null } | null;
2878
+ dnsRecords?: { read?: boolean | null; write?: boolean | null } | null;
2879
+ lb?: { read?: boolean | null; write?: boolean | null } | null;
2880
+ logs?: { read?: boolean | null; write?: boolean | null } | null;
2881
+ organization?: { read?: boolean | null; write?: boolean | null } | null;
2882
+ ssl?: { read?: boolean | null; write?: boolean | null } | null;
2883
+ waf?: { read?: boolean | null; write?: boolean | null } | null;
2884
+ zoneSettings?: { read?: boolean | null; write?: boolean | null } | null;
2885
+ zones?: { read?: boolean | null; write?: boolean | null } | null;
2886
+ };
2887
+ }[];
2888
+ resultInfo: {
2889
+ count?: number | null;
2890
+ page?: number | null;
2891
+ perPage?: number | null;
2892
+ totalCount?: number | null;
2893
+ };
2894
+ }
2895
+
2896
+ export const ListRolesResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
2897
+ result: Schema.Array(
2898
+ Schema.Struct({
2899
+ id: Schema.String,
2900
+ description: Schema.String,
2901
+ name: Schema.String,
2902
+ permissions: Schema.Struct({
2903
+ analytics: Schema.optional(
2904
+ Schema.Union([
2905
+ Schema.Struct({
2906
+ read: Schema.optional(
2907
+ Schema.Union([Schema.Boolean, Schema.Null]),
2908
+ ),
2909
+ write: Schema.optional(
2910
+ Schema.Union([Schema.Boolean, Schema.Null]),
2911
+ ),
2912
+ }),
2913
+ Schema.Null,
2914
+ ]),
2915
+ ),
2916
+ billing: Schema.optional(
2917
+ Schema.Union([
2918
+ Schema.Struct({
2919
+ read: Schema.optional(
2920
+ Schema.Union([Schema.Boolean, Schema.Null]),
2921
+ ),
2922
+ write: Schema.optional(
2923
+ Schema.Union([Schema.Boolean, Schema.Null]),
2924
+ ),
2925
+ }),
2926
+ Schema.Null,
2927
+ ]),
2928
+ ),
2929
+ cachePurge: Schema.optional(
2930
+ Schema.Union([
2931
+ Schema.Struct({
2932
+ read: Schema.optional(
2933
+ Schema.Union([Schema.Boolean, Schema.Null]),
2934
+ ),
2935
+ write: Schema.optional(
2936
+ Schema.Union([Schema.Boolean, Schema.Null]),
2937
+ ),
2938
+ }),
2939
+ Schema.Null,
2940
+ ]),
2941
+ ),
2942
+ dns: Schema.optional(
2943
+ Schema.Union([
2944
+ Schema.Struct({
2945
+ read: Schema.optional(
2946
+ Schema.Union([Schema.Boolean, Schema.Null]),
2947
+ ),
2948
+ write: Schema.optional(
2949
+ Schema.Union([Schema.Boolean, Schema.Null]),
2950
+ ),
2951
+ }),
2952
+ Schema.Null,
2953
+ ]),
2954
+ ),
2955
+ dnsRecords: Schema.optional(
2956
+ Schema.Union([
2957
+ Schema.Struct({
2958
+ read: Schema.optional(
2959
+ Schema.Union([Schema.Boolean, Schema.Null]),
2960
+ ),
2961
+ write: Schema.optional(
2962
+ Schema.Union([Schema.Boolean, Schema.Null]),
2963
+ ),
2964
+ }),
2965
+ Schema.Null,
2966
+ ]),
2967
+ ),
2968
+ lb: Schema.optional(
2969
+ Schema.Union([
2970
+ Schema.Struct({
2971
+ read: Schema.optional(
2972
+ Schema.Union([Schema.Boolean, Schema.Null]),
2973
+ ),
2974
+ write: Schema.optional(
2975
+ Schema.Union([Schema.Boolean, Schema.Null]),
2976
+ ),
2977
+ }),
2978
+ Schema.Null,
2979
+ ]),
2980
+ ),
2981
+ logs: Schema.optional(
2982
+ Schema.Union([
2983
+ Schema.Struct({
2984
+ read: Schema.optional(
2985
+ Schema.Union([Schema.Boolean, Schema.Null]),
2986
+ ),
2987
+ write: Schema.optional(
2988
+ Schema.Union([Schema.Boolean, Schema.Null]),
2989
+ ),
2990
+ }),
2991
+ Schema.Null,
2992
+ ]),
2993
+ ),
2994
+ organization: Schema.optional(
2995
+ Schema.Union([
2996
+ Schema.Struct({
2997
+ read: Schema.optional(
2998
+ Schema.Union([Schema.Boolean, Schema.Null]),
2999
+ ),
3000
+ write: Schema.optional(
3001
+ Schema.Union([Schema.Boolean, Schema.Null]),
3002
+ ),
3003
+ }),
3004
+ Schema.Null,
3005
+ ]),
3006
+ ),
3007
+ ssl: Schema.optional(
3008
+ Schema.Union([
3009
+ Schema.Struct({
3010
+ read: Schema.optional(
3011
+ Schema.Union([Schema.Boolean, Schema.Null]),
3012
+ ),
3013
+ write: Schema.optional(
3014
+ Schema.Union([Schema.Boolean, Schema.Null]),
3015
+ ),
3016
+ }),
3017
+ Schema.Null,
3018
+ ]),
3019
+ ),
3020
+ waf: Schema.optional(
3021
+ Schema.Union([
3022
+ Schema.Struct({
3023
+ read: Schema.optional(
3024
+ Schema.Union([Schema.Boolean, Schema.Null]),
3025
+ ),
3026
+ write: Schema.optional(
3027
+ Schema.Union([Schema.Boolean, Schema.Null]),
3028
+ ),
3029
+ }),
3030
+ Schema.Null,
3031
+ ]),
3032
+ ),
3033
+ zoneSettings: Schema.optional(
3034
+ Schema.Union([
3035
+ Schema.Struct({
3036
+ read: Schema.optional(
3037
+ Schema.Union([Schema.Boolean, Schema.Null]),
3038
+ ),
3039
+ write: Schema.optional(
3040
+ Schema.Union([Schema.Boolean, Schema.Null]),
3041
+ ),
3042
+ }),
3043
+ Schema.Null,
3044
+ ]),
3045
+ ),
3046
+ zones: Schema.optional(
3047
+ Schema.Union([
3048
+ Schema.Struct({
3049
+ read: Schema.optional(
3050
+ Schema.Union([Schema.Boolean, Schema.Null]),
3051
+ ),
3052
+ write: Schema.optional(
3053
+ Schema.Union([Schema.Boolean, Schema.Null]),
3054
+ ),
3055
+ }),
3056
+ Schema.Null,
3057
+ ]),
3058
+ ),
3059
+ }).pipe(
3060
+ Schema.encodeKeys({
3061
+ analytics: "analytics",
3062
+ billing: "billing",
3063
+ cachePurge: "cache_purge",
3064
+ dns: "dns",
3065
+ dnsRecords: "dns_records",
3066
+ lb: "lb",
3067
+ logs: "logs",
3068
+ organization: "organization",
3069
+ ssl: "ssl",
3070
+ waf: "waf",
3071
+ zoneSettings: "zone_settings",
3072
+ zones: "zones",
3073
+ }),
3074
+ ),
3075
+ }),
3076
+ ),
3077
+ resultInfo: Schema.Struct({
3078
+ count: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
3079
+ page: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
3080
+ perPage: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
3081
+ totalCount: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
3082
+ }).pipe(
3083
+ Schema.encodeKeys({
3084
+ count: "count",
3085
+ page: "page",
3086
+ perPage: "per_page",
3087
+ totalCount: "total_count",
3088
+ }),
3089
+ ),
3090
+ }).pipe(
3091
+ Schema.encodeKeys({ result: "result", resultInfo: "result_info" }),
3092
+ ) as unknown as Schema.Schema<ListRolesResponse>;
1382
3093
 
1383
3094
  export type ListRolesError = DefaultErrors;
1384
3095
 
1385
- export const listRoles: API.OperationMethod<
3096
+ export const listRoles: API.PaginatedOperationMethod<
1386
3097
  ListRolesRequest,
1387
3098
  ListRolesResponse,
1388
3099
  ListRolesError,
1389
3100
  Credentials | HttpClient.HttpClient
1390
- > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
3101
+ > & {
3102
+ pages: (
3103
+ input: ListRolesRequest,
3104
+ ) => stream.Stream<
3105
+ ListRolesResponse,
3106
+ ListRolesError,
3107
+ Credentials | HttpClient.HttpClient
3108
+ >;
3109
+ items: (input: ListRolesRequest) => stream.Stream<
3110
+ {
3111
+ id: string;
3112
+ description: string;
3113
+ name: string;
3114
+ permissions: {
3115
+ analytics?: { read?: boolean | null; write?: boolean | null } | null;
3116
+ billing?: { read?: boolean | null; write?: boolean | null } | null;
3117
+ cachePurge?: { read?: boolean | null; write?: boolean | null } | null;
3118
+ dns?: { read?: boolean | null; write?: boolean | null } | null;
3119
+ dnsRecords?: { read?: boolean | null; write?: boolean | null } | null;
3120
+ lb?: { read?: boolean | null; write?: boolean | null } | null;
3121
+ logs?: { read?: boolean | null; write?: boolean | null } | null;
3122
+ organization?: { read?: boolean | null; write?: boolean | null } | null;
3123
+ ssl?: { read?: boolean | null; write?: boolean | null } | null;
3124
+ waf?: { read?: boolean | null; write?: boolean | null } | null;
3125
+ zoneSettings?: { read?: boolean | null; write?: boolean | null } | null;
3126
+ zones?: { read?: boolean | null; write?: boolean | null } | null;
3127
+ };
3128
+ },
3129
+ ListRolesError,
3130
+ Credentials | HttpClient.HttpClient
3131
+ >;
3132
+ } = /*@__PURE__*/ /*#__PURE__*/ API.makePaginated(() => ({
1391
3133
  input: ListRolesRequest,
1392
3134
  output: ListRolesResponse,
1393
3135
  errors: [],
3136
+ pagination: {
3137
+ mode: "page",
3138
+ inputToken: "page",
3139
+ outputToken: "resultInfo.page",
3140
+ items: "result",
3141
+ pageSize: "perPage",
3142
+ } as const,
1394
3143
  }));
1395
3144
 
1396
3145
  // =============================================================================
@@ -1410,22 +3159,210 @@ export const GetSubscriptionRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct(
1410
3159
  T.Http({ method: "GET", path: "/accounts/{account_id}/subscriptions" }),
1411
3160
  ) as unknown as Schema.Schema<GetSubscriptionRequest>;
1412
3161
 
1413
- export type GetSubscriptionResponse = unknown;
3162
+ export interface GetSubscriptionResponse {
3163
+ result: {
3164
+ id?: string | null;
3165
+ currency?: string | null;
3166
+ currentPeriodEnd?: string | null;
3167
+ currentPeriodStart?: string | null;
3168
+ frequency?: "weekly" | "monthly" | "quarterly" | "yearly" | null;
3169
+ price?: number | null;
3170
+ ratePlan?: {
3171
+ id?:
3172
+ | "free"
3173
+ | "lite"
3174
+ | "pro"
3175
+ | "pro_plus"
3176
+ | "business"
3177
+ | "enterprise"
3178
+ | "partners_free"
3179
+ | "partners_pro"
3180
+ | "partners_business"
3181
+ | "partners_enterprise"
3182
+ | null;
3183
+ currency?: string | null;
3184
+ externallyManaged?: boolean | null;
3185
+ isContract?: boolean | null;
3186
+ publicName?: string | null;
3187
+ scope?: string | null;
3188
+ sets?: string[] | null;
3189
+ } | null;
3190
+ state?:
3191
+ | "Trial"
3192
+ | "Provisioned"
3193
+ | "Paid"
3194
+ | "AwaitingPayment"
3195
+ | "Cancelled"
3196
+ | "Failed"
3197
+ | "Expired"
3198
+ | null;
3199
+ }[];
3200
+ }
1414
3201
 
1415
3202
  export const GetSubscriptionResponse =
1416
- /*@__PURE__*/ /*#__PURE__*/ Schema.Unknown as unknown as Schema.Schema<GetSubscriptionResponse>;
3203
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
3204
+ result: Schema.Array(
3205
+ Schema.Struct({
3206
+ id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
3207
+ currency: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
3208
+ currentPeriodEnd: Schema.optional(
3209
+ Schema.Union([Schema.String, Schema.Null]),
3210
+ ),
3211
+ currentPeriodStart: Schema.optional(
3212
+ Schema.Union([Schema.String, Schema.Null]),
3213
+ ),
3214
+ frequency: Schema.optional(
3215
+ Schema.Union([
3216
+ Schema.Literals(["weekly", "monthly", "quarterly", "yearly"]),
3217
+ Schema.Null,
3218
+ ]),
3219
+ ),
3220
+ price: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
3221
+ ratePlan: Schema.optional(
3222
+ Schema.Union([
3223
+ Schema.Struct({
3224
+ id: Schema.optional(
3225
+ Schema.Union([
3226
+ Schema.Literals([
3227
+ "free",
3228
+ "lite",
3229
+ "pro",
3230
+ "pro_plus",
3231
+ "business",
3232
+ "enterprise",
3233
+ "partners_free",
3234
+ "partners_pro",
3235
+ "partners_business",
3236
+ "partners_enterprise",
3237
+ ]),
3238
+ Schema.Null,
3239
+ ]),
3240
+ ),
3241
+ currency: Schema.optional(
3242
+ Schema.Union([Schema.String, Schema.Null]),
3243
+ ),
3244
+ externallyManaged: Schema.optional(
3245
+ Schema.Union([Schema.Boolean, Schema.Null]),
3246
+ ),
3247
+ isContract: Schema.optional(
3248
+ Schema.Union([Schema.Boolean, Schema.Null]),
3249
+ ),
3250
+ publicName: Schema.optional(
3251
+ Schema.Union([Schema.String, Schema.Null]),
3252
+ ),
3253
+ scope: Schema.optional(
3254
+ Schema.Union([Schema.String, Schema.Null]),
3255
+ ),
3256
+ sets: Schema.optional(
3257
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
3258
+ ),
3259
+ }).pipe(
3260
+ Schema.encodeKeys({
3261
+ id: "id",
3262
+ currency: "currency",
3263
+ externallyManaged: "externally_managed",
3264
+ isContract: "is_contract",
3265
+ publicName: "public_name",
3266
+ scope: "scope",
3267
+ sets: "sets",
3268
+ }),
3269
+ ),
3270
+ Schema.Null,
3271
+ ]),
3272
+ ),
3273
+ state: Schema.optional(
3274
+ Schema.Union([
3275
+ Schema.Literals([
3276
+ "Trial",
3277
+ "Provisioned",
3278
+ "Paid",
3279
+ "AwaitingPayment",
3280
+ "Cancelled",
3281
+ "Failed",
3282
+ "Expired",
3283
+ ]),
3284
+ Schema.Null,
3285
+ ]),
3286
+ ),
3287
+ }).pipe(
3288
+ Schema.encodeKeys({
3289
+ id: "id",
3290
+ currency: "currency",
3291
+ currentPeriodEnd: "current_period_end",
3292
+ currentPeriodStart: "current_period_start",
3293
+ frequency: "frequency",
3294
+ price: "price",
3295
+ ratePlan: "rate_plan",
3296
+ state: "state",
3297
+ }),
3298
+ ),
3299
+ ),
3300
+ }) as unknown as Schema.Schema<GetSubscriptionResponse>;
1417
3301
 
1418
3302
  export type GetSubscriptionError = DefaultErrors;
1419
3303
 
1420
- export const getSubscription: API.OperationMethod<
3304
+ export const getSubscription: API.PaginatedOperationMethod<
1421
3305
  GetSubscriptionRequest,
1422
3306
  GetSubscriptionResponse,
1423
3307
  GetSubscriptionError,
1424
3308
  Credentials | HttpClient.HttpClient
1425
- > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
3309
+ > & {
3310
+ pages: (
3311
+ input: GetSubscriptionRequest,
3312
+ ) => stream.Stream<
3313
+ GetSubscriptionResponse,
3314
+ GetSubscriptionError,
3315
+ Credentials | HttpClient.HttpClient
3316
+ >;
3317
+ items: (input: GetSubscriptionRequest) => stream.Stream<
3318
+ {
3319
+ id?: string | null;
3320
+ currency?: string | null;
3321
+ currentPeriodEnd?: string | null;
3322
+ currentPeriodStart?: string | null;
3323
+ frequency?: "weekly" | "monthly" | "quarterly" | "yearly" | null;
3324
+ price?: number | null;
3325
+ ratePlan?: {
3326
+ id?:
3327
+ | "free"
3328
+ | "lite"
3329
+ | "pro"
3330
+ | "pro_plus"
3331
+ | "business"
3332
+ | "enterprise"
3333
+ | "partners_free"
3334
+ | "partners_pro"
3335
+ | "partners_business"
3336
+ | "partners_enterprise"
3337
+ | null;
3338
+ currency?: string | null;
3339
+ externallyManaged?: boolean | null;
3340
+ isContract?: boolean | null;
3341
+ publicName?: string | null;
3342
+ scope?: string | null;
3343
+ sets?: string[] | null;
3344
+ } | null;
3345
+ state?:
3346
+ | "Trial"
3347
+ | "Provisioned"
3348
+ | "Paid"
3349
+ | "AwaitingPayment"
3350
+ | "Cancelled"
3351
+ | "Failed"
3352
+ | "Expired"
3353
+ | null;
3354
+ },
3355
+ GetSubscriptionError,
3356
+ Credentials | HttpClient.HttpClient
3357
+ >;
3358
+ } = /*@__PURE__*/ /*#__PURE__*/ API.makePaginated(() => ({
1426
3359
  input: GetSubscriptionRequest,
1427
3360
  output: GetSubscriptionResponse,
1428
3361
  errors: [],
3362
+ pagination: {
3363
+ mode: "single",
3364
+ items: "result",
3365
+ } as const,
1429
3366
  }));
1430
3367
 
1431
3368
  export interface CreateSubscriptionRequest {
@@ -1434,7 +3371,25 @@ export interface CreateSubscriptionRequest {
1434
3371
  /** Body param: How often the subscription is renewed automatically. */
1435
3372
  frequency?: "weekly" | "monthly" | "quarterly" | "yearly";
1436
3373
  /** Body param: The rate plan applied to the subscription. */
1437
- ratePlan?: unknown;
3374
+ ratePlan?: {
3375
+ id?:
3376
+ | "free"
3377
+ | "lite"
3378
+ | "pro"
3379
+ | "pro_plus"
3380
+ | "business"
3381
+ | "enterprise"
3382
+ | "partners_free"
3383
+ | "partners_pro"
3384
+ | "partners_business"
3385
+ | "partners_enterprise";
3386
+ currency?: string;
3387
+ externallyManaged?: boolean;
3388
+ isContract?: boolean;
3389
+ publicName?: string;
3390
+ scope?: string;
3391
+ sets?: string[];
3392
+ };
1438
3393
  }
1439
3394
 
1440
3395
  export const CreateSubscriptionRequest =
@@ -1443,16 +3398,186 @@ export const CreateSubscriptionRequest =
1443
3398
  frequency: Schema.optional(
1444
3399
  Schema.Literals(["weekly", "monthly", "quarterly", "yearly"]),
1445
3400
  ),
1446
- ratePlan: Schema.optional(Schema.Unknown),
3401
+ ratePlan: Schema.optional(
3402
+ Schema.Struct({
3403
+ id: Schema.optional(
3404
+ Schema.Literals([
3405
+ "free",
3406
+ "lite",
3407
+ "pro",
3408
+ "pro_plus",
3409
+ "business",
3410
+ "enterprise",
3411
+ "partners_free",
3412
+ "partners_pro",
3413
+ "partners_business",
3414
+ "partners_enterprise",
3415
+ ]),
3416
+ ),
3417
+ currency: Schema.optional(Schema.String),
3418
+ externallyManaged: Schema.optional(Schema.Boolean),
3419
+ isContract: Schema.optional(Schema.Boolean),
3420
+ publicName: Schema.optional(Schema.String),
3421
+ scope: Schema.optional(Schema.String),
3422
+ sets: Schema.optional(Schema.Array(Schema.String)),
3423
+ }).pipe(
3424
+ Schema.encodeKeys({
3425
+ id: "id",
3426
+ currency: "currency",
3427
+ externallyManaged: "externally_managed",
3428
+ isContract: "is_contract",
3429
+ publicName: "public_name",
3430
+ scope: "scope",
3431
+ sets: "sets",
3432
+ }),
3433
+ ),
3434
+ ),
1447
3435
  }).pipe(
1448
3436
  Schema.encodeKeys({ frequency: "frequency", ratePlan: "rate_plan" }),
1449
3437
  T.Http({ method: "POST", path: "/accounts/{account_id}/subscriptions" }),
1450
3438
  ) as unknown as Schema.Schema<CreateSubscriptionRequest>;
1451
3439
 
1452
- export type CreateSubscriptionResponse = unknown;
3440
+ export interface CreateSubscriptionResponse {
3441
+ /** Subscription identifier tag. */
3442
+ id?: string | null;
3443
+ /** The monetary unit in which pricing information is displayed. */
3444
+ currency?: string | null;
3445
+ /** The end of the current period and also when the next billing is due. */
3446
+ currentPeriodEnd?: string | null;
3447
+ /** When the current billing period started. May match initial_period_start if this is the first period. */
3448
+ currentPeriodStart?: string | null;
3449
+ /** How often the subscription is renewed automatically. */
3450
+ frequency?: "weekly" | "monthly" | "quarterly" | "yearly" | null;
3451
+ /** The price of the subscription that will be billed, in US dollars. */
3452
+ price?: number | null;
3453
+ /** The rate plan applied to the subscription. */
3454
+ ratePlan?: {
3455
+ id?:
3456
+ | "free"
3457
+ | "lite"
3458
+ | "pro"
3459
+ | "pro_plus"
3460
+ | "business"
3461
+ | "enterprise"
3462
+ | "partners_free"
3463
+ | "partners_pro"
3464
+ | "partners_business"
3465
+ | "partners_enterprise"
3466
+ | null;
3467
+ currency?: string | null;
3468
+ externallyManaged?: boolean | null;
3469
+ isContract?: boolean | null;
3470
+ publicName?: string | null;
3471
+ scope?: string | null;
3472
+ sets?: string[] | null;
3473
+ } | null;
3474
+ /** The state that the subscription is in. */
3475
+ state?:
3476
+ | "Trial"
3477
+ | "Provisioned"
3478
+ | "Paid"
3479
+ | "AwaitingPayment"
3480
+ | "Cancelled"
3481
+ | "Failed"
3482
+ | "Expired"
3483
+ | null;
3484
+ }
1453
3485
 
1454
3486
  export const CreateSubscriptionResponse =
1455
- /*@__PURE__*/ /*#__PURE__*/ Schema.Unknown as unknown as Schema.Schema<CreateSubscriptionResponse>;
3487
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
3488
+ id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
3489
+ currency: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
3490
+ currentPeriodEnd: Schema.optional(
3491
+ Schema.Union([Schema.String, Schema.Null]),
3492
+ ),
3493
+ currentPeriodStart: Schema.optional(
3494
+ Schema.Union([Schema.String, Schema.Null]),
3495
+ ),
3496
+ frequency: Schema.optional(
3497
+ Schema.Union([
3498
+ Schema.Literals(["weekly", "monthly", "quarterly", "yearly"]),
3499
+ Schema.Null,
3500
+ ]),
3501
+ ),
3502
+ price: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
3503
+ ratePlan: Schema.optional(
3504
+ Schema.Union([
3505
+ Schema.Struct({
3506
+ id: Schema.optional(
3507
+ Schema.Union([
3508
+ Schema.Literals([
3509
+ "free",
3510
+ "lite",
3511
+ "pro",
3512
+ "pro_plus",
3513
+ "business",
3514
+ "enterprise",
3515
+ "partners_free",
3516
+ "partners_pro",
3517
+ "partners_business",
3518
+ "partners_enterprise",
3519
+ ]),
3520
+ Schema.Null,
3521
+ ]),
3522
+ ),
3523
+ currency: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
3524
+ externallyManaged: Schema.optional(
3525
+ Schema.Union([Schema.Boolean, Schema.Null]),
3526
+ ),
3527
+ isContract: Schema.optional(
3528
+ Schema.Union([Schema.Boolean, Schema.Null]),
3529
+ ),
3530
+ publicName: Schema.optional(
3531
+ Schema.Union([Schema.String, Schema.Null]),
3532
+ ),
3533
+ scope: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
3534
+ sets: Schema.optional(
3535
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
3536
+ ),
3537
+ }).pipe(
3538
+ Schema.encodeKeys({
3539
+ id: "id",
3540
+ currency: "currency",
3541
+ externallyManaged: "externally_managed",
3542
+ isContract: "is_contract",
3543
+ publicName: "public_name",
3544
+ scope: "scope",
3545
+ sets: "sets",
3546
+ }),
3547
+ ),
3548
+ Schema.Null,
3549
+ ]),
3550
+ ),
3551
+ state: Schema.optional(
3552
+ Schema.Union([
3553
+ Schema.Literals([
3554
+ "Trial",
3555
+ "Provisioned",
3556
+ "Paid",
3557
+ "AwaitingPayment",
3558
+ "Cancelled",
3559
+ "Failed",
3560
+ "Expired",
3561
+ ]),
3562
+ Schema.Null,
3563
+ ]),
3564
+ ),
3565
+ })
3566
+ .pipe(
3567
+ Schema.encodeKeys({
3568
+ id: "id",
3569
+ currency: "currency",
3570
+ currentPeriodEnd: "current_period_end",
3571
+ currentPeriodStart: "current_period_start",
3572
+ frequency: "frequency",
3573
+ price: "price",
3574
+ ratePlan: "rate_plan",
3575
+ state: "state",
3576
+ }),
3577
+ )
3578
+ .pipe(
3579
+ T.ResponsePath("result"),
3580
+ ) as unknown as Schema.Schema<CreateSubscriptionResponse>;
1456
3581
 
1457
3582
  export type CreateSubscriptionError =
1458
3583
  | DefaultErrors
@@ -1477,7 +3602,25 @@ export interface UpdateSubscriptionRequest {
1477
3602
  /** Body param: How often the subscription is renewed automatically. */
1478
3603
  frequency?: "weekly" | "monthly" | "quarterly" | "yearly";
1479
3604
  /** Body param: The rate plan applied to the subscription. */
1480
- ratePlan?: unknown;
3605
+ ratePlan?: {
3606
+ id?:
3607
+ | "free"
3608
+ | "lite"
3609
+ | "pro"
3610
+ | "pro_plus"
3611
+ | "business"
3612
+ | "enterprise"
3613
+ | "partners_free"
3614
+ | "partners_pro"
3615
+ | "partners_business"
3616
+ | "partners_enterprise";
3617
+ currency?: string;
3618
+ externallyManaged?: boolean;
3619
+ isContract?: boolean;
3620
+ publicName?: string;
3621
+ scope?: string;
3622
+ sets?: string[];
3623
+ };
1481
3624
  }
1482
3625
 
1483
3626
  export const UpdateSubscriptionRequest =
@@ -1489,7 +3632,40 @@ export const UpdateSubscriptionRequest =
1489
3632
  frequency: Schema.optional(
1490
3633
  Schema.Literals(["weekly", "monthly", "quarterly", "yearly"]),
1491
3634
  ),
1492
- ratePlan: Schema.optional(Schema.Unknown),
3635
+ ratePlan: Schema.optional(
3636
+ Schema.Struct({
3637
+ id: Schema.optional(
3638
+ Schema.Literals([
3639
+ "free",
3640
+ "lite",
3641
+ "pro",
3642
+ "pro_plus",
3643
+ "business",
3644
+ "enterprise",
3645
+ "partners_free",
3646
+ "partners_pro",
3647
+ "partners_business",
3648
+ "partners_enterprise",
3649
+ ]),
3650
+ ),
3651
+ currency: Schema.optional(Schema.String),
3652
+ externallyManaged: Schema.optional(Schema.Boolean),
3653
+ isContract: Schema.optional(Schema.Boolean),
3654
+ publicName: Schema.optional(Schema.String),
3655
+ scope: Schema.optional(Schema.String),
3656
+ sets: Schema.optional(Schema.Array(Schema.String)),
3657
+ }).pipe(
3658
+ Schema.encodeKeys({
3659
+ id: "id",
3660
+ currency: "currency",
3661
+ externallyManaged: "externally_managed",
3662
+ isContract: "is_contract",
3663
+ publicName: "public_name",
3664
+ scope: "scope",
3665
+ sets: "sets",
3666
+ }),
3667
+ ),
3668
+ ),
1493
3669
  }).pipe(
1494
3670
  Schema.encodeKeys({ frequency: "frequency", ratePlan: "rate_plan" }),
1495
3671
  T.Http({
@@ -1498,10 +3674,147 @@ export const UpdateSubscriptionRequest =
1498
3674
  }),
1499
3675
  ) as unknown as Schema.Schema<UpdateSubscriptionRequest>;
1500
3676
 
1501
- export type UpdateSubscriptionResponse = unknown;
3677
+ export interface UpdateSubscriptionResponse {
3678
+ /** Subscription identifier tag. */
3679
+ id?: string | null;
3680
+ /** The monetary unit in which pricing information is displayed. */
3681
+ currency?: string | null;
3682
+ /** The end of the current period and also when the next billing is due. */
3683
+ currentPeriodEnd?: string | null;
3684
+ /** When the current billing period started. May match initial_period_start if this is the first period. */
3685
+ currentPeriodStart?: string | null;
3686
+ /** How often the subscription is renewed automatically. */
3687
+ frequency?: "weekly" | "monthly" | "quarterly" | "yearly" | null;
3688
+ /** The price of the subscription that will be billed, in US dollars. */
3689
+ price?: number | null;
3690
+ /** The rate plan applied to the subscription. */
3691
+ ratePlan?: {
3692
+ id?:
3693
+ | "free"
3694
+ | "lite"
3695
+ | "pro"
3696
+ | "pro_plus"
3697
+ | "business"
3698
+ | "enterprise"
3699
+ | "partners_free"
3700
+ | "partners_pro"
3701
+ | "partners_business"
3702
+ | "partners_enterprise"
3703
+ | null;
3704
+ currency?: string | null;
3705
+ externallyManaged?: boolean | null;
3706
+ isContract?: boolean | null;
3707
+ publicName?: string | null;
3708
+ scope?: string | null;
3709
+ sets?: string[] | null;
3710
+ } | null;
3711
+ /** The state that the subscription is in. */
3712
+ state?:
3713
+ | "Trial"
3714
+ | "Provisioned"
3715
+ | "Paid"
3716
+ | "AwaitingPayment"
3717
+ | "Cancelled"
3718
+ | "Failed"
3719
+ | "Expired"
3720
+ | null;
3721
+ }
1502
3722
 
1503
3723
  export const UpdateSubscriptionResponse =
1504
- /*@__PURE__*/ /*#__PURE__*/ Schema.Unknown as unknown as Schema.Schema<UpdateSubscriptionResponse>;
3724
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
3725
+ id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
3726
+ currency: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
3727
+ currentPeriodEnd: Schema.optional(
3728
+ Schema.Union([Schema.String, Schema.Null]),
3729
+ ),
3730
+ currentPeriodStart: Schema.optional(
3731
+ Schema.Union([Schema.String, Schema.Null]),
3732
+ ),
3733
+ frequency: Schema.optional(
3734
+ Schema.Union([
3735
+ Schema.Literals(["weekly", "monthly", "quarterly", "yearly"]),
3736
+ Schema.Null,
3737
+ ]),
3738
+ ),
3739
+ price: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
3740
+ ratePlan: Schema.optional(
3741
+ Schema.Union([
3742
+ Schema.Struct({
3743
+ id: Schema.optional(
3744
+ Schema.Union([
3745
+ Schema.Literals([
3746
+ "free",
3747
+ "lite",
3748
+ "pro",
3749
+ "pro_plus",
3750
+ "business",
3751
+ "enterprise",
3752
+ "partners_free",
3753
+ "partners_pro",
3754
+ "partners_business",
3755
+ "partners_enterprise",
3756
+ ]),
3757
+ Schema.Null,
3758
+ ]),
3759
+ ),
3760
+ currency: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
3761
+ externallyManaged: Schema.optional(
3762
+ Schema.Union([Schema.Boolean, Schema.Null]),
3763
+ ),
3764
+ isContract: Schema.optional(
3765
+ Schema.Union([Schema.Boolean, Schema.Null]),
3766
+ ),
3767
+ publicName: Schema.optional(
3768
+ Schema.Union([Schema.String, Schema.Null]),
3769
+ ),
3770
+ scope: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
3771
+ sets: Schema.optional(
3772
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
3773
+ ),
3774
+ }).pipe(
3775
+ Schema.encodeKeys({
3776
+ id: "id",
3777
+ currency: "currency",
3778
+ externallyManaged: "externally_managed",
3779
+ isContract: "is_contract",
3780
+ publicName: "public_name",
3781
+ scope: "scope",
3782
+ sets: "sets",
3783
+ }),
3784
+ ),
3785
+ Schema.Null,
3786
+ ]),
3787
+ ),
3788
+ state: Schema.optional(
3789
+ Schema.Union([
3790
+ Schema.Literals([
3791
+ "Trial",
3792
+ "Provisioned",
3793
+ "Paid",
3794
+ "AwaitingPayment",
3795
+ "Cancelled",
3796
+ "Failed",
3797
+ "Expired",
3798
+ ]),
3799
+ Schema.Null,
3800
+ ]),
3801
+ ),
3802
+ })
3803
+ .pipe(
3804
+ Schema.encodeKeys({
3805
+ id: "id",
3806
+ currency: "currency",
3807
+ currentPeriodEnd: "current_period_end",
3808
+ currentPeriodStart: "current_period_start",
3809
+ frequency: "frequency",
3810
+ price: "price",
3811
+ ratePlan: "rate_plan",
3812
+ state: "state",
3813
+ }),
3814
+ )
3815
+ .pipe(
3816
+ T.ResponsePath("result"),
3817
+ ) as unknown as Schema.Schema<UpdateSubscriptionResponse>;
1505
3818
 
1506
3819
  export type UpdateSubscriptionError =
1507
3820
  | DefaultErrors
@@ -1586,10 +3899,129 @@ export const GetTokenRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1586
3899
  T.Http({ method: "GET", path: "/accounts/{account_id}/tokens/{tokenId}" }),
1587
3900
  ) as unknown as Schema.Schema<GetTokenRequest>;
1588
3901
 
1589
- export type GetTokenResponse = unknown;
3902
+ export interface GetTokenResponse {
3903
+ /** Token identifier tag. */
3904
+ id?: string | null;
3905
+ condition?: {
3906
+ requestIp?: { in?: string[] | null; notIn?: string[] | null } | null;
3907
+ } | null;
3908
+ /** The expiration time on or after which the JWT MUST NOT be accepted for processing. */
3909
+ expiresOn?: string | null;
3910
+ /** The time on which the token was created. */
3911
+ issuedOn?: string | null;
3912
+ /** Last time the token was used. */
3913
+ lastUsedOn?: string | null;
3914
+ /** Last time the token was modified. */
3915
+ modifiedOn?: string | null;
3916
+ /** Token name. */
3917
+ name?: string | null;
3918
+ /** The time before which the token MUST NOT be accepted for processing. */
3919
+ notBefore?: string | null;
3920
+ /** List of access policies assigned to the token. */
3921
+ policies?:
3922
+ | {
3923
+ id: string;
3924
+ effect: "allow" | "deny";
3925
+ permissionGroups: {
3926
+ id: string;
3927
+ meta?: { key?: string | null; value?: string | null } | null;
3928
+ name?: string | null;
3929
+ }[];
3930
+ resources: Record<string, unknown>;
3931
+ }[]
3932
+ | null;
3933
+ /** Status of the token. */
3934
+ status?: "active" | "disabled" | "expired" | null;
3935
+ }
1590
3936
 
1591
- export const GetTokenResponse =
1592
- /*@__PURE__*/ /*#__PURE__*/ Schema.Unknown as unknown as Schema.Schema<GetTokenResponse>;
3937
+ export const GetTokenResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
3938
+ id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
3939
+ condition: Schema.optional(
3940
+ Schema.Union([
3941
+ Schema.Struct({
3942
+ requestIp: Schema.optional(
3943
+ Schema.Union([
3944
+ Schema.Struct({
3945
+ in: Schema.optional(
3946
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
3947
+ ),
3948
+ notIn: Schema.optional(
3949
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
3950
+ ),
3951
+ }).pipe(Schema.encodeKeys({ in: "in", notIn: "not_in" })),
3952
+ Schema.Null,
3953
+ ]),
3954
+ ),
3955
+ }).pipe(Schema.encodeKeys({ requestIp: "request_ip" })),
3956
+ Schema.Null,
3957
+ ]),
3958
+ ),
3959
+ expiresOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
3960
+ issuedOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
3961
+ lastUsedOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
3962
+ modifiedOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
3963
+ name: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
3964
+ notBefore: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
3965
+ policies: Schema.optional(
3966
+ Schema.Union([
3967
+ Schema.Array(
3968
+ Schema.Struct({
3969
+ id: Schema.String,
3970
+ effect: Schema.Literals(["allow", "deny"]),
3971
+ permissionGroups: Schema.Array(
3972
+ Schema.Struct({
3973
+ id: Schema.String,
3974
+ meta: Schema.optional(
3975
+ Schema.Union([
3976
+ Schema.Struct({
3977
+ key: Schema.optional(
3978
+ Schema.Union([Schema.String, Schema.Null]),
3979
+ ),
3980
+ value: Schema.optional(
3981
+ Schema.Union([Schema.String, Schema.Null]),
3982
+ ),
3983
+ }),
3984
+ Schema.Null,
3985
+ ]),
3986
+ ),
3987
+ name: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
3988
+ }),
3989
+ ),
3990
+ resources: Schema.Record(Schema.String, Schema.Unknown),
3991
+ }).pipe(
3992
+ Schema.encodeKeys({
3993
+ id: "id",
3994
+ effect: "effect",
3995
+ permissionGroups: "permission_groups",
3996
+ resources: "resources",
3997
+ }),
3998
+ ),
3999
+ ),
4000
+ Schema.Null,
4001
+ ]),
4002
+ ),
4003
+ status: Schema.optional(
4004
+ Schema.Union([
4005
+ Schema.Literals(["active", "disabled", "expired"]),
4006
+ Schema.Null,
4007
+ ]),
4008
+ ),
4009
+ })
4010
+ .pipe(
4011
+ Schema.encodeKeys({
4012
+ id: "id",
4013
+ condition: "condition",
4014
+ expiresOn: "expires_on",
4015
+ issuedOn: "issued_on",
4016
+ lastUsedOn: "last_used_on",
4017
+ modifiedOn: "modified_on",
4018
+ name: "name",
4019
+ notBefore: "not_before",
4020
+ policies: "policies",
4021
+ status: "status",
4022
+ }),
4023
+ )
4024
+ .pipe(T.ResponsePath("result")) as unknown as Schema.Schema<GetTokenResponse>;
1593
4025
 
1594
4026
  export type GetTokenError = DefaultErrors | InvalidRoute;
1595
4027
 
@@ -1620,22 +4052,203 @@ export const ListTokensRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1620
4052
  T.Http({ method: "GET", path: "/accounts/{account_id}/tokens" }),
1621
4053
  ) as unknown as Schema.Schema<ListTokensRequest>;
1622
4054
 
1623
- export type ListTokensResponse = unknown;
4055
+ export interface ListTokensResponse {
4056
+ result: {
4057
+ id?: string | null;
4058
+ condition?: {
4059
+ requestIp?: { in?: string[] | null; notIn?: string[] | null } | null;
4060
+ } | null;
4061
+ expiresOn?: string | null;
4062
+ issuedOn?: string | null;
4063
+ lastUsedOn?: string | null;
4064
+ modifiedOn?: string | null;
4065
+ name?: string | null;
4066
+ notBefore?: string | null;
4067
+ policies?:
4068
+ | {
4069
+ id: string;
4070
+ effect: "allow" | "deny";
4071
+ permissionGroups: {
4072
+ id: string;
4073
+ meta?: { key?: string | null; value?: string | null } | null;
4074
+ name?: string | null;
4075
+ }[];
4076
+ resources: Record<string, unknown>;
4077
+ }[]
4078
+ | null;
4079
+ status?: "active" | "disabled" | "expired" | null;
4080
+ }[];
4081
+ resultInfo: {
4082
+ count?: number | null;
4083
+ page?: number | null;
4084
+ perPage?: number | null;
4085
+ totalCount?: number | null;
4086
+ };
4087
+ }
1624
4088
 
1625
- export const ListTokensResponse =
1626
- /*@__PURE__*/ /*#__PURE__*/ Schema.Unknown as unknown as Schema.Schema<ListTokensResponse>;
4089
+ export const ListTokensResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
4090
+ result: Schema.Array(
4091
+ Schema.Struct({
4092
+ id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
4093
+ condition: Schema.optional(
4094
+ Schema.Union([
4095
+ Schema.Struct({
4096
+ requestIp: Schema.optional(
4097
+ Schema.Union([
4098
+ Schema.Struct({
4099
+ in: Schema.optional(
4100
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
4101
+ ),
4102
+ notIn: Schema.optional(
4103
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
4104
+ ),
4105
+ }).pipe(Schema.encodeKeys({ in: "in", notIn: "not_in" })),
4106
+ Schema.Null,
4107
+ ]),
4108
+ ),
4109
+ }).pipe(Schema.encodeKeys({ requestIp: "request_ip" })),
4110
+ Schema.Null,
4111
+ ]),
4112
+ ),
4113
+ expiresOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
4114
+ issuedOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
4115
+ lastUsedOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
4116
+ modifiedOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
4117
+ name: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
4118
+ notBefore: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
4119
+ policies: Schema.optional(
4120
+ Schema.Union([
4121
+ Schema.Array(
4122
+ Schema.Struct({
4123
+ id: Schema.String,
4124
+ effect: Schema.Literals(["allow", "deny"]),
4125
+ permissionGroups: Schema.Array(
4126
+ Schema.Struct({
4127
+ id: Schema.String,
4128
+ meta: Schema.optional(
4129
+ Schema.Union([
4130
+ Schema.Struct({
4131
+ key: Schema.optional(
4132
+ Schema.Union([Schema.String, Schema.Null]),
4133
+ ),
4134
+ value: Schema.optional(
4135
+ Schema.Union([Schema.String, Schema.Null]),
4136
+ ),
4137
+ }),
4138
+ Schema.Null,
4139
+ ]),
4140
+ ),
4141
+ name: Schema.optional(
4142
+ Schema.Union([Schema.String, Schema.Null]),
4143
+ ),
4144
+ }),
4145
+ ),
4146
+ resources: Schema.Record(Schema.String, Schema.Unknown),
4147
+ }).pipe(
4148
+ Schema.encodeKeys({
4149
+ id: "id",
4150
+ effect: "effect",
4151
+ permissionGroups: "permission_groups",
4152
+ resources: "resources",
4153
+ }),
4154
+ ),
4155
+ ),
4156
+ Schema.Null,
4157
+ ]),
4158
+ ),
4159
+ status: Schema.optional(
4160
+ Schema.Union([
4161
+ Schema.Literals(["active", "disabled", "expired"]),
4162
+ Schema.Null,
4163
+ ]),
4164
+ ),
4165
+ }).pipe(
4166
+ Schema.encodeKeys({
4167
+ id: "id",
4168
+ condition: "condition",
4169
+ expiresOn: "expires_on",
4170
+ issuedOn: "issued_on",
4171
+ lastUsedOn: "last_used_on",
4172
+ modifiedOn: "modified_on",
4173
+ name: "name",
4174
+ notBefore: "not_before",
4175
+ policies: "policies",
4176
+ status: "status",
4177
+ }),
4178
+ ),
4179
+ ),
4180
+ resultInfo: Schema.Struct({
4181
+ count: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
4182
+ page: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
4183
+ perPage: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
4184
+ totalCount: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
4185
+ }).pipe(
4186
+ Schema.encodeKeys({
4187
+ count: "count",
4188
+ page: "page",
4189
+ perPage: "per_page",
4190
+ totalCount: "total_count",
4191
+ }),
4192
+ ),
4193
+ }).pipe(
4194
+ Schema.encodeKeys({ result: "result", resultInfo: "result_info" }),
4195
+ ) as unknown as Schema.Schema<ListTokensResponse>;
1627
4196
 
1628
4197
  export type ListTokensError = DefaultErrors;
1629
4198
 
1630
- export const listTokens: API.OperationMethod<
4199
+ export const listTokens: API.PaginatedOperationMethod<
1631
4200
  ListTokensRequest,
1632
4201
  ListTokensResponse,
1633
4202
  ListTokensError,
1634
4203
  Credentials | HttpClient.HttpClient
1635
- > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
4204
+ > & {
4205
+ pages: (
4206
+ input: ListTokensRequest,
4207
+ ) => stream.Stream<
4208
+ ListTokensResponse,
4209
+ ListTokensError,
4210
+ Credentials | HttpClient.HttpClient
4211
+ >;
4212
+ items: (input: ListTokensRequest) => stream.Stream<
4213
+ {
4214
+ id?: string | null;
4215
+ condition?: {
4216
+ requestIp?: { in?: string[] | null; notIn?: string[] | null } | null;
4217
+ } | null;
4218
+ expiresOn?: string | null;
4219
+ issuedOn?: string | null;
4220
+ lastUsedOn?: string | null;
4221
+ modifiedOn?: string | null;
4222
+ name?: string | null;
4223
+ notBefore?: string | null;
4224
+ policies?:
4225
+ | {
4226
+ id: string;
4227
+ effect: "allow" | "deny";
4228
+ permissionGroups: {
4229
+ id: string;
4230
+ meta?: { key?: string | null; value?: string | null } | null;
4231
+ name?: string | null;
4232
+ }[];
4233
+ resources: Record<string, unknown>;
4234
+ }[]
4235
+ | null;
4236
+ status?: "active" | "disabled" | "expired" | null;
4237
+ },
4238
+ ListTokensError,
4239
+ Credentials | HttpClient.HttpClient
4240
+ >;
4241
+ } = /*@__PURE__*/ /*#__PURE__*/ API.makePaginated(() => ({
1636
4242
  input: ListTokensRequest,
1637
4243
  output: ListTokensResponse,
1638
4244
  errors: [],
4245
+ pagination: {
4246
+ mode: "page",
4247
+ inputToken: "page",
4248
+ outputToken: "resultInfo.page",
4249
+ items: "result",
4250
+ pageSize: "perPage",
4251
+ } as const,
1639
4252
  }));
1640
4253
 
1641
4254
  export interface CreateTokenRequest {
@@ -1644,7 +4257,11 @@ export interface CreateTokenRequest {
1644
4257
  /** Body param: Token name. */
1645
4258
  name: string;
1646
4259
  /** Body param: List of access policies assigned to the token. */
1647
- policies: unknown[];
4260
+ policies: {
4261
+ effect: "allow" | "deny";
4262
+ permissionGroups: { id: string; meta?: { key?: string; value?: string } }[];
4263
+ resources: Record<string, unknown>;
4264
+ }[];
1648
4265
  /** Body param: */
1649
4266
  condition?: { requestIp?: { in?: string[]; notIn?: string[] } };
1650
4267
  /** Body param: The expiration time on or after which the JWT MUST NOT be accepted for processing. */
@@ -1656,7 +4273,29 @@ export interface CreateTokenRequest {
1656
4273
  export const CreateTokenRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1657
4274
  accountId: Schema.String.pipe(T.HttpPath("account_id")),
1658
4275
  name: Schema.String,
1659
- policies: Schema.Array(Schema.Unknown),
4276
+ policies: Schema.Array(
4277
+ Schema.Struct({
4278
+ effect: Schema.Literals(["allow", "deny"]),
4279
+ permissionGroups: Schema.Array(
4280
+ Schema.Struct({
4281
+ id: Schema.String,
4282
+ meta: Schema.optional(
4283
+ Schema.Struct({
4284
+ key: Schema.optional(Schema.String),
4285
+ value: Schema.optional(Schema.String),
4286
+ }),
4287
+ ),
4288
+ }),
4289
+ ),
4290
+ resources: Schema.Record(Schema.String, Schema.Unknown),
4291
+ }).pipe(
4292
+ Schema.encodeKeys({
4293
+ effect: "effect",
4294
+ permissionGroups: "permission_groups",
4295
+ resources: "resources",
4296
+ }),
4297
+ ),
4298
+ ),
1660
4299
  condition: Schema.optional(
1661
4300
  Schema.Struct({
1662
4301
  requestIp: Schema.optional(
@@ -1699,7 +4338,18 @@ export interface CreateTokenResponse {
1699
4338
  /** The time before which the token MUST NOT be accepted for processing. */
1700
4339
  notBefore?: string | null;
1701
4340
  /** List of access policies assigned to the token. */
1702
- policies?: unknown[] | null;
4341
+ policies?:
4342
+ | {
4343
+ id: string;
4344
+ effect: "allow" | "deny";
4345
+ permissionGroups: {
4346
+ id: string;
4347
+ meta?: { key?: string | null; value?: string | null } | null;
4348
+ name?: string | null;
4349
+ }[];
4350
+ resources: Record<string, unknown>;
4351
+ }[]
4352
+ | null;
1703
4353
  /** Status of the token. */
1704
4354
  status?: "active" | "disabled" | "expired" | null;
1705
4355
  /** The token value. */
@@ -1735,7 +4385,42 @@ export const CreateTokenResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1735
4385
  name: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1736
4386
  notBefore: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1737
4387
  policies: Schema.optional(
1738
- Schema.Union([Schema.Array(Schema.Unknown), Schema.Null]),
4388
+ Schema.Union([
4389
+ Schema.Array(
4390
+ Schema.Struct({
4391
+ id: Schema.String,
4392
+ effect: Schema.Literals(["allow", "deny"]),
4393
+ permissionGroups: Schema.Array(
4394
+ Schema.Struct({
4395
+ id: Schema.String,
4396
+ meta: Schema.optional(
4397
+ Schema.Union([
4398
+ Schema.Struct({
4399
+ key: Schema.optional(
4400
+ Schema.Union([Schema.String, Schema.Null]),
4401
+ ),
4402
+ value: Schema.optional(
4403
+ Schema.Union([Schema.String, Schema.Null]),
4404
+ ),
4405
+ }),
4406
+ Schema.Null,
4407
+ ]),
4408
+ ),
4409
+ name: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
4410
+ }),
4411
+ ),
4412
+ resources: Schema.Record(Schema.String, Schema.Unknown),
4413
+ }).pipe(
4414
+ Schema.encodeKeys({
4415
+ id: "id",
4416
+ effect: "effect",
4417
+ permissionGroups: "permission_groups",
4418
+ resources: "resources",
4419
+ }),
4420
+ ),
4421
+ ),
4422
+ Schema.Null,
4423
+ ]),
1739
4424
  ),
1740
4425
  status: Schema.optional(
1741
4426
  Schema.Union([
@@ -1784,7 +4469,11 @@ export interface UpdateTokenRequest {
1784
4469
  /** Body param: Token name. */
1785
4470
  name: string;
1786
4471
  /** Body param: List of access policies assigned to the token. */
1787
- policies: unknown[];
4472
+ policies: {
4473
+ effect: "allow" | "deny";
4474
+ permissionGroups: { id: string; meta?: { key?: string; value?: string } }[];
4475
+ resources: Record<string, unknown>;
4476
+ }[];
1788
4477
  /** Body param: */
1789
4478
  condition?: { requestIp?: { in?: string[]; notIn?: string[] } };
1790
4479
  /** Body param: The expiration time on or after which the JWT MUST NOT be accepted for processing. */
@@ -1799,7 +4488,29 @@ export const UpdateTokenRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1799
4488
  tokenId: Schema.String.pipe(T.HttpPath("tokenId")),
1800
4489
  accountId: Schema.String.pipe(T.HttpPath("account_id")),
1801
4490
  name: Schema.String,
1802
- policies: Schema.Array(Schema.Unknown),
4491
+ policies: Schema.Array(
4492
+ Schema.Struct({
4493
+ effect: Schema.Literals(["allow", "deny"]),
4494
+ permissionGroups: Schema.Array(
4495
+ Schema.Struct({
4496
+ id: Schema.String,
4497
+ meta: Schema.optional(
4498
+ Schema.Struct({
4499
+ key: Schema.optional(Schema.String),
4500
+ value: Schema.optional(Schema.String),
4501
+ }),
4502
+ ),
4503
+ }),
4504
+ ),
4505
+ resources: Schema.Record(Schema.String, Schema.Unknown),
4506
+ }).pipe(
4507
+ Schema.encodeKeys({
4508
+ effect: "effect",
4509
+ permissionGroups: "permission_groups",
4510
+ resources: "resources",
4511
+ }),
4512
+ ),
4513
+ ),
1803
4514
  condition: Schema.optional(
1804
4515
  Schema.Struct({
1805
4516
  requestIp: Schema.optional(
@@ -1825,10 +4536,131 @@ export const UpdateTokenRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1825
4536
  T.Http({ method: "PUT", path: "/accounts/{account_id}/tokens/{tokenId}" }),
1826
4537
  ) as unknown as Schema.Schema<UpdateTokenRequest>;
1827
4538
 
1828
- export type UpdateTokenResponse = unknown;
4539
+ export interface UpdateTokenResponse {
4540
+ /** Token identifier tag. */
4541
+ id?: string | null;
4542
+ condition?: {
4543
+ requestIp?: { in?: string[] | null; notIn?: string[] | null } | null;
4544
+ } | null;
4545
+ /** The expiration time on or after which the JWT MUST NOT be accepted for processing. */
4546
+ expiresOn?: string | null;
4547
+ /** The time on which the token was created. */
4548
+ issuedOn?: string | null;
4549
+ /** Last time the token was used. */
4550
+ lastUsedOn?: string | null;
4551
+ /** Last time the token was modified. */
4552
+ modifiedOn?: string | null;
4553
+ /** Token name. */
4554
+ name?: string | null;
4555
+ /** The time before which the token MUST NOT be accepted for processing. */
4556
+ notBefore?: string | null;
4557
+ /** List of access policies assigned to the token. */
4558
+ policies?:
4559
+ | {
4560
+ id: string;
4561
+ effect: "allow" | "deny";
4562
+ permissionGroups: {
4563
+ id: string;
4564
+ meta?: { key?: string | null; value?: string | null } | null;
4565
+ name?: string | null;
4566
+ }[];
4567
+ resources: Record<string, unknown>;
4568
+ }[]
4569
+ | null;
4570
+ /** Status of the token. */
4571
+ status?: "active" | "disabled" | "expired" | null;
4572
+ }
1829
4573
 
1830
- export const UpdateTokenResponse =
1831
- /*@__PURE__*/ /*#__PURE__*/ Schema.Unknown as unknown as Schema.Schema<UpdateTokenResponse>;
4574
+ export const UpdateTokenResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
4575
+ id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
4576
+ condition: Schema.optional(
4577
+ Schema.Union([
4578
+ Schema.Struct({
4579
+ requestIp: Schema.optional(
4580
+ Schema.Union([
4581
+ Schema.Struct({
4582
+ in: Schema.optional(
4583
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
4584
+ ),
4585
+ notIn: Schema.optional(
4586
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
4587
+ ),
4588
+ }).pipe(Schema.encodeKeys({ in: "in", notIn: "not_in" })),
4589
+ Schema.Null,
4590
+ ]),
4591
+ ),
4592
+ }).pipe(Schema.encodeKeys({ requestIp: "request_ip" })),
4593
+ Schema.Null,
4594
+ ]),
4595
+ ),
4596
+ expiresOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
4597
+ issuedOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
4598
+ lastUsedOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
4599
+ modifiedOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
4600
+ name: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
4601
+ notBefore: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
4602
+ policies: Schema.optional(
4603
+ Schema.Union([
4604
+ Schema.Array(
4605
+ Schema.Struct({
4606
+ id: Schema.String,
4607
+ effect: Schema.Literals(["allow", "deny"]),
4608
+ permissionGroups: Schema.Array(
4609
+ Schema.Struct({
4610
+ id: Schema.String,
4611
+ meta: Schema.optional(
4612
+ Schema.Union([
4613
+ Schema.Struct({
4614
+ key: Schema.optional(
4615
+ Schema.Union([Schema.String, Schema.Null]),
4616
+ ),
4617
+ value: Schema.optional(
4618
+ Schema.Union([Schema.String, Schema.Null]),
4619
+ ),
4620
+ }),
4621
+ Schema.Null,
4622
+ ]),
4623
+ ),
4624
+ name: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
4625
+ }),
4626
+ ),
4627
+ resources: Schema.Record(Schema.String, Schema.Unknown),
4628
+ }).pipe(
4629
+ Schema.encodeKeys({
4630
+ id: "id",
4631
+ effect: "effect",
4632
+ permissionGroups: "permission_groups",
4633
+ resources: "resources",
4634
+ }),
4635
+ ),
4636
+ ),
4637
+ Schema.Null,
4638
+ ]),
4639
+ ),
4640
+ status: Schema.optional(
4641
+ Schema.Union([
4642
+ Schema.Literals(["active", "disabled", "expired"]),
4643
+ Schema.Null,
4644
+ ]),
4645
+ ),
4646
+ })
4647
+ .pipe(
4648
+ Schema.encodeKeys({
4649
+ id: "id",
4650
+ condition: "condition",
4651
+ expiresOn: "expires_on",
4652
+ issuedOn: "issued_on",
4653
+ lastUsedOn: "last_used_on",
4654
+ modifiedOn: "modified_on",
4655
+ name: "name",
4656
+ notBefore: "not_before",
4657
+ policies: "policies",
4658
+ status: "status",
4659
+ }),
4660
+ )
4661
+ .pipe(
4662
+ T.ResponsePath("result"),
4663
+ ) as unknown as Schema.Schema<UpdateTokenResponse>;
1832
4664
 
1833
4665
  export type UpdateTokenError = DefaultErrors | InvalidRoute | MethodNotAllowed;
1834
4666
 
@@ -2133,10 +4965,12 @@ export const PutTokenValueRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
2133
4965
  }),
2134
4966
  ) as unknown as Schema.Schema<PutTokenValueRequest>;
2135
4967
 
2136
- export type PutTokenValueResponse = unknown;
4968
+ export type PutTokenValueResponse = string;
2137
4969
 
2138
4970
  export const PutTokenValueResponse =
2139
- /*@__PURE__*/ /*#__PURE__*/ Schema.Unknown as unknown as Schema.Schema<PutTokenValueResponse>;
4971
+ /*@__PURE__*/ /*#__PURE__*/ Schema.String.pipe(
4972
+ T.ResponsePath("result"),
4973
+ ) as unknown as Schema.Schema<PutTokenValueResponse>;
2140
4974
 
2141
4975
  export type PutTokenValueError = DefaultErrors | InvalidRoute;
2142
4976