@distilled.cloud/cloudflare 0.6.1 → 0.7.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (261) hide show
  1. package/lib/services/accounts.d.ts +901 -36
  2. package/lib/services/accounts.d.ts.map +1 -1
  3. package/lib/services/accounts.js +1386 -32
  4. package/lib/services/accounts.js.map +1 -1
  5. package/lib/services/addressing.d.ts +8 -2
  6. package/lib/services/addressing.d.ts.map +1 -1
  7. package/lib/services/addressing.js +14 -2
  8. package/lib/services/addressing.js.map +1 -1
  9. package/lib/services/ai-gateway.d.ts.map +1 -1
  10. package/lib/services/ai-gateway.js +7 -7
  11. package/lib/services/ai-gateway.js.map +1 -1
  12. package/lib/services/aisearch.d.ts.map +1 -1
  13. package/lib/services/aisearch.js +24 -9
  14. package/lib/services/aisearch.js.map +1 -1
  15. package/lib/services/alerting.js +2 -2
  16. package/lib/services/alerting.js.map +1 -1
  17. package/lib/services/api-gateway.d.ts +114 -16
  18. package/lib/services/api-gateway.d.ts.map +1 -1
  19. package/lib/services/api-gateway.js +187 -15
  20. package/lib/services/api-gateway.js.map +1 -1
  21. package/lib/services/audit-logs.d.ts +63 -3
  22. package/lib/services/audit-logs.d.ts.map +1 -1
  23. package/lib/services/audit-logs.js +62 -3
  24. package/lib/services/audit-logs.js.map +1 -1
  25. package/lib/services/bot-management.d.ts +54 -8
  26. package/lib/services/bot-management.d.ts.map +1 -1
  27. package/lib/services/bot-management.js +128 -16
  28. package/lib/services/bot-management.js.map +1 -1
  29. package/lib/services/brand-protection.d.ts.map +1 -1
  30. package/lib/services/brand-protection.js +26 -8
  31. package/lib/services/brand-protection.js.map +1 -1
  32. package/lib/services/browser-rendering.d.ts.map +1 -1
  33. package/lib/services/browser-rendering.js +13 -10
  34. package/lib/services/browser-rendering.js.map +1 -1
  35. package/lib/services/cloudforce-one.d.ts +61 -6
  36. package/lib/services/cloudforce-one.d.ts.map +1 -1
  37. package/lib/services/cloudforce-one.js +107 -6
  38. package/lib/services/cloudforce-one.js.map +1 -1
  39. package/lib/services/custom-certificates.d.ts +145 -8
  40. package/lib/services/custom-certificates.d.ts.map +1 -1
  41. package/lib/services/custom-certificates.js +226 -7
  42. package/lib/services/custom-certificates.js.map +1 -1
  43. package/lib/services/custom-hostnames.d.ts +8 -8
  44. package/lib/services/custom-hostnames.d.ts.map +1 -1
  45. package/lib/services/custom-hostnames.js +17 -14
  46. package/lib/services/custom-hostnames.js.map +1 -1
  47. package/lib/services/d1.d.ts +68 -8
  48. package/lib/services/d1.d.ts.map +1 -1
  49. package/lib/services/d1.js +96 -8
  50. package/lib/services/d1.js.map +1 -1
  51. package/lib/services/dns-firewall.d.ts +57 -4
  52. package/lib/services/dns-firewall.d.ts.map +1 -1
  53. package/lib/services/dns-firewall.js +86 -5
  54. package/lib/services/dns-firewall.js.map +1 -1
  55. package/lib/services/dns.d.ts +85 -745
  56. package/lib/services/dns.d.ts.map +1 -1
  57. package/lib/services/dns.js +118 -1424
  58. package/lib/services/dns.js.map +1 -1
  59. package/lib/services/email-routing.d.ts +59 -7
  60. package/lib/services/email-routing.d.ts.map +1 -1
  61. package/lib/services/email-routing.js +165 -7
  62. package/lib/services/email-routing.js.map +1 -1
  63. package/lib/services/firewall.d.ts +228 -39
  64. package/lib/services/firewall.d.ts.map +1 -1
  65. package/lib/services/firewall.js +220 -33
  66. package/lib/services/firewall.js.map +1 -1
  67. package/lib/services/healthchecks.d.ts +112 -6
  68. package/lib/services/healthchecks.d.ts.map +1 -1
  69. package/lib/services/healthchecks.js +248 -14
  70. package/lib/services/healthchecks.js.map +1 -1
  71. package/lib/services/hostnames.d.ts +5 -5
  72. package/lib/services/hostnames.d.ts.map +1 -1
  73. package/lib/services/hostnames.js +16 -4
  74. package/lib/services/hostnames.js.map +1 -1
  75. package/lib/services/hyperdrive.d.ts +223 -11
  76. package/lib/services/hyperdrive.d.ts.map +1 -1
  77. package/lib/services/hyperdrive.js +351 -11
  78. package/lib/services/hyperdrive.js.map +1 -1
  79. package/lib/services/iam.d.ts +62 -2
  80. package/lib/services/iam.d.ts.map +1 -1
  81. package/lib/services/iam.js +82 -11
  82. package/lib/services/iam.js.map +1 -1
  83. package/lib/services/images.d.ts +9 -1
  84. package/lib/services/images.d.ts.map +1 -1
  85. package/lib/services/images.js +12 -1
  86. package/lib/services/images.js.map +1 -1
  87. package/lib/services/intel.d.ts +4 -4
  88. package/lib/services/intel.d.ts.map +1 -1
  89. package/lib/services/intel.js +2 -3
  90. package/lib/services/intel.js.map +1 -1
  91. package/lib/services/kv.d.ts.map +1 -1
  92. package/lib/services/kv.js +2 -2
  93. package/lib/services/kv.js.map +1 -1
  94. package/lib/services/load-balancers.d.ts +537 -108
  95. package/lib/services/load-balancers.d.ts.map +1 -1
  96. package/lib/services/load-balancers.js +1266 -161
  97. package/lib/services/load-balancers.js.map +1 -1
  98. package/lib/services/logpush.d.ts +153 -9
  99. package/lib/services/logpush.d.ts.map +1 -1
  100. package/lib/services/logpush.js +246 -9
  101. package/lib/services/logpush.js.map +1 -1
  102. package/lib/services/magic-cloud-networking.d.ts.map +1 -1
  103. package/lib/services/magic-cloud-networking.js +54 -30
  104. package/lib/services/magic-cloud-networking.js.map +1 -1
  105. package/lib/services/magic-network-monitoring.d.ts +46 -5
  106. package/lib/services/magic-network-monitoring.d.ts.map +1 -1
  107. package/lib/services/magic-network-monitoring.js +79 -5
  108. package/lib/services/magic-network-monitoring.js.map +1 -1
  109. package/lib/services/magic-transit.d.ts +127 -21
  110. package/lib/services/magic-transit.d.ts.map +1 -1
  111. package/lib/services/magic-transit.js +291 -29
  112. package/lib/services/magic-transit.js.map +1 -1
  113. package/lib/services/memberships.d.ts +248 -52
  114. package/lib/services/memberships.d.ts.map +1 -1
  115. package/lib/services/memberships.js +360 -39
  116. package/lib/services/memberships.js.map +1 -1
  117. package/lib/services/page-rules.d.ts +432 -8
  118. package/lib/services/page-rules.d.ts.map +1 -1
  119. package/lib/services/page-rules.js +877 -33
  120. package/lib/services/page-rules.js.map +1 -1
  121. package/lib/services/pages.d.ts +457 -297
  122. package/lib/services/pages.d.ts.map +1 -1
  123. package/lib/services/pages.js +1366 -491
  124. package/lib/services/pages.js.map +1 -1
  125. package/lib/services/pipelines.d.ts +96 -76
  126. package/lib/services/pipelines.d.ts.map +1 -1
  127. package/lib/services/pipelines.js +145 -197
  128. package/lib/services/pipelines.js.map +1 -1
  129. package/lib/services/queues.d.ts +228 -12
  130. package/lib/services/queues.d.ts.map +1 -1
  131. package/lib/services/queues.js +487 -11
  132. package/lib/services/queues.js.map +1 -1
  133. package/lib/services/radar.d.ts +82 -18
  134. package/lib/services/radar.d.ts.map +1 -1
  135. package/lib/services/radar.js +111 -47
  136. package/lib/services/radar.js.map +1 -1
  137. package/lib/services/realtime-kit.d.ts +650 -334
  138. package/lib/services/realtime-kit.d.ts.map +1 -1
  139. package/lib/services/realtime-kit.js +1472 -693
  140. package/lib/services/realtime-kit.js.map +1 -1
  141. package/lib/services/request-tracers.d.ts +12 -1
  142. package/lib/services/request-tracers.d.ts.map +1 -1
  143. package/lib/services/request-tracers.js +28 -3
  144. package/lib/services/request-tracers.js.map +1 -1
  145. package/lib/services/rules.d.ts +65 -10
  146. package/lib/services/rules.d.ts.map +1 -1
  147. package/lib/services/rules.js +102 -8
  148. package/lib/services/rules.js.map +1 -1
  149. package/lib/services/rulesets.d.ts +7892 -1806
  150. package/lib/services/rulesets.d.ts.map +1 -1
  151. package/lib/services/rulesets.js +18720 -4149
  152. package/lib/services/rulesets.js.map +1 -1
  153. package/lib/services/rum.d.ts +45 -5
  154. package/lib/services/rum.d.ts.map +1 -1
  155. package/lib/services/rum.js +80 -4
  156. package/lib/services/rum.js.map +1 -1
  157. package/lib/services/schema-validation.js +2 -2
  158. package/lib/services/schema-validation.js.map +1 -1
  159. package/lib/services/spectrum.d.ts +139 -33
  160. package/lib/services/spectrum.d.ts.map +1 -1
  161. package/lib/services/spectrum.js +190 -34
  162. package/lib/services/spectrum.js.map +1 -1
  163. package/lib/services/speed.d.ts +345 -24
  164. package/lib/services/speed.d.ts.map +1 -1
  165. package/lib/services/speed.js +785 -19
  166. package/lib/services/speed.js.map +1 -1
  167. package/lib/services/ssl.d.ts +6 -6
  168. package/lib/services/ssl.d.ts.map +1 -1
  169. package/lib/services/ssl.js +5 -5
  170. package/lib/services/ssl.js.map +1 -1
  171. package/lib/services/stream.d.ts +171 -17
  172. package/lib/services/stream.d.ts.map +1 -1
  173. package/lib/services/stream.js +164 -11
  174. package/lib/services/stream.js.map +1 -1
  175. package/lib/services/token-validation.d.ts +16 -2
  176. package/lib/services/token-validation.d.ts.map +1 -1
  177. package/lib/services/token-validation.js +32 -2
  178. package/lib/services/token-validation.js.map +1 -1
  179. package/lib/services/url-scanner.d.ts +43 -11
  180. package/lib/services/url-scanner.d.ts.map +1 -1
  181. package/lib/services/url-scanner.js +46 -11
  182. package/lib/services/url-scanner.js.map +1 -1
  183. package/lib/services/user.d.ts +312 -21
  184. package/lib/services/user.d.ts.map +1 -1
  185. package/lib/services/user.js +442 -19
  186. package/lib/services/user.js.map +1 -1
  187. package/lib/services/workers-for-platforms.d.ts +223 -13
  188. package/lib/services/workers-for-platforms.d.ts.map +1 -1
  189. package/lib/services/workers-for-platforms.js +481 -13
  190. package/lib/services/workers-for-platforms.js.map +1 -1
  191. package/lib/services/workers.d.ts +345 -31
  192. package/lib/services/workers.d.ts.map +1 -1
  193. package/lib/services/workers.js +649 -34
  194. package/lib/services/workers.js.map +1 -1
  195. package/lib/services/zaraz.d.ts +212 -11
  196. package/lib/services/zaraz.d.ts.map +1 -1
  197. package/lib/services/zaraz.js +311 -30
  198. package/lib/services/zaraz.js.map +1 -1
  199. package/lib/services/zero-trust.d.ts +19333 -1905
  200. package/lib/services/zero-trust.d.ts.map +1 -1
  201. package/lib/services/zero-trust.js +30269 -5710
  202. package/lib/services/zero-trust.js.map +1 -1
  203. package/lib/services/zones.d.ts +61 -7
  204. package/lib/services/zones.d.ts.map +1 -1
  205. package/lib/services/zones.js +188 -7
  206. package/lib/services/zones.js.map +1 -1
  207. package/package.json +2 -2
  208. package/src/services/accounts.ts +2897 -63
  209. package/src/services/addressing.ts +28 -4
  210. package/src/services/ai-gateway.ts +9 -7
  211. package/src/services/aisearch.ts +28 -9
  212. package/src/services/alerting.ts +2 -2
  213. package/src/services/api-gateway.ts +410 -27
  214. package/src/services/audit-logs.ts +135 -5
  215. package/src/services/bot-management.ts +282 -24
  216. package/src/services/brand-protection.ts +28 -8
  217. package/src/services/browser-rendering.ts +31 -11
  218. package/src/services/cloudforce-one.ts +201 -9
  219. package/src/services/custom-certificates.ts +405 -14
  220. package/src/services/custom-hostnames.ts +29 -22
  221. package/src/services/d1.ts +180 -12
  222. package/src/services/dns-firewall.ts +163 -7
  223. package/src/services/dns.ts +213 -2389
  224. package/src/services/email-routing.ts +346 -12
  225. package/src/services/firewall.ts +556 -72
  226. package/src/services/healthchecks.ts +463 -18
  227. package/src/services/hostnames.ts +21 -9
  228. package/src/services/hyperdrive.ts +730 -17
  229. package/src/services/iam.ts +228 -24
  230. package/src/services/images.ts +29 -2
  231. package/src/services/intel.ts +6 -5
  232. package/src/services/kv.ts +6 -2
  233. package/src/services/load-balancers.ts +2387 -294
  234. package/src/services/logpush.ts +659 -15
  235. package/src/services/magic-cloud-networking.ts +74 -30
  236. package/src/services/magic-network-monitoring.ts +170 -8
  237. package/src/services/magic-transit.ts +631 -62
  238. package/src/services/memberships.ts +710 -91
  239. package/src/services/page-rules.ts +1592 -88
  240. package/src/services/pages.ts +2011 -1098
  241. package/src/services/pipelines.ts +285 -331
  242. package/src/services/queues.ts +1110 -22
  243. package/src/services/radar.ts +128 -64
  244. package/src/services/realtime-kit.ts +2829 -1603
  245. package/src/services/request-tracers.ts +54 -4
  246. package/src/services/rules.ts +214 -18
  247. package/src/services/rulesets.ts +34524 -6913
  248. package/src/services/rum.ts +187 -9
  249. package/src/services/schema-validation.ts +2 -2
  250. package/src/services/spectrum.ts +357 -67
  251. package/src/services/speed.ts +1845 -42
  252. package/src/services/ssl.ts +11 -11
  253. package/src/services/stream.ts +397 -22
  254. package/src/services/token-validation.ts +64 -4
  255. package/src/services/url-scanner.ts +92 -20
  256. package/src/services/user.ts +973 -34
  257. package/src/services/workers-for-platforms.ts +1012 -39
  258. package/src/services/workers.ts +1472 -120
  259. package/src/services/zaraz.ts +640 -37
  260. package/src/services/zero-trust.ts +55498 -12667
  261. package/src/services/zones.ts +360 -14
@@ -25,22 +25,151 @@ export const ListAuditLogsRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct(
25
25
  T.Http({ method: "GET", path: "/user/audit_logs" }),
26
26
  ) as unknown as Schema.Schema<ListAuditLogsRequest>;
27
27
 
28
- export type ListAuditLogsResponse = unknown;
28
+ export interface ListAuditLogsResponse {
29
+ result: {
30
+ id?: string | null;
31
+ action?: { result?: boolean | null; type?: string | null } | null;
32
+ actor?: {
33
+ id?: string | null;
34
+ email?: string | null;
35
+ ip?: string | null;
36
+ type?: "user" | "admin" | "Cloudflare" | null;
37
+ } | null;
38
+ interface?: string | null;
39
+ metadata?: unknown | null;
40
+ newValue?: string | null;
41
+ oldValue?: string | null;
42
+ owner?: { id?: string | null } | null;
43
+ resource?: { id?: string | null; type?: string | null } | null;
44
+ when?: string | null;
45
+ }[];
46
+ resultInfo: {
47
+ count?: number | null;
48
+ page?: number | null;
49
+ perPage?: number | null;
50
+ totalCount?: number | null;
51
+ };
52
+ }
29
53
 
30
- export const ListAuditLogsResponse =
31
- /*@__PURE__*/ /*#__PURE__*/ Schema.Unknown as unknown as Schema.Schema<ListAuditLogsResponse>;
54
+ export const ListAuditLogsResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
55
+ result: Schema.Array(
56
+ Schema.Struct({
57
+ id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
58
+ action: Schema.optional(
59
+ Schema.Union([
60
+ Schema.Struct({
61
+ result: Schema.optional(
62
+ Schema.Union([Schema.Boolean, Schema.Null]),
63
+ ),
64
+ type: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
65
+ }),
66
+ Schema.Null,
67
+ ]),
68
+ ),
69
+ actor: Schema.optional(
70
+ Schema.Union([
71
+ Schema.Struct({
72
+ id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
73
+ email: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
74
+ ip: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
75
+ type: Schema.optional(
76
+ Schema.Union([
77
+ Schema.Literals(["user", "admin", "Cloudflare"]),
78
+ Schema.Null,
79
+ ]),
80
+ ),
81
+ }),
82
+ Schema.Null,
83
+ ]),
84
+ ),
85
+ interface: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
86
+ metadata: Schema.optional(Schema.Union([Schema.Unknown, Schema.Null])),
87
+ newValue: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
88
+ oldValue: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
89
+ owner: Schema.optional(
90
+ Schema.Union([
91
+ Schema.Struct({
92
+ id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
93
+ }),
94
+ Schema.Null,
95
+ ]),
96
+ ),
97
+ resource: Schema.optional(
98
+ Schema.Union([
99
+ Schema.Struct({
100
+ id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
101
+ type: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
102
+ }),
103
+ Schema.Null,
104
+ ]),
105
+ ),
106
+ when: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
107
+ }),
108
+ ),
109
+ resultInfo: Schema.Struct({
110
+ count: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
111
+ page: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
112
+ perPage: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
113
+ totalCount: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
114
+ }).pipe(
115
+ Schema.encodeKeys({
116
+ count: "count",
117
+ page: "page",
118
+ perPage: "per_page",
119
+ totalCount: "total_count",
120
+ }),
121
+ ),
122
+ }).pipe(
123
+ Schema.encodeKeys({ result: "result", resultInfo: "result_info" }),
124
+ ) as unknown as Schema.Schema<ListAuditLogsResponse>;
32
125
 
33
126
  export type ListAuditLogsError = DefaultErrors;
34
127
 
35
- export const listAuditLogs: API.OperationMethod<
128
+ export const listAuditLogs: API.PaginatedOperationMethod<
36
129
  ListAuditLogsRequest,
37
130
  ListAuditLogsResponse,
38
131
  ListAuditLogsError,
39
132
  Credentials | HttpClient.HttpClient
40
- > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
133
+ > & {
134
+ pages: (
135
+ input: ListAuditLogsRequest,
136
+ ) => stream.Stream<
137
+ ListAuditLogsResponse,
138
+ ListAuditLogsError,
139
+ Credentials | HttpClient.HttpClient
140
+ >;
141
+ items: (input: ListAuditLogsRequest) => stream.Stream<
142
+ {
143
+ id?: string | null;
144
+ action?: { result?: boolean | null; type?: string | null } | null;
145
+ actor?: {
146
+ id?: string | null;
147
+ email?: string | null;
148
+ ip?: string | null;
149
+ type?: "user" | "admin" | "Cloudflare" | null;
150
+ } | null;
151
+ interface?: string | null;
152
+ metadata?: unknown | null;
153
+ newValue?: string | null;
154
+ oldValue?: string | null;
155
+ owner?: { id?: string | null } | null;
156
+ resource?: { id?: string | null; type?: string | null } | null;
157
+ when?: string | null;
158
+ },
159
+ ListAuditLogsError,
160
+ Credentials | HttpClient.HttpClient
161
+ >;
162
+ } = /*@__PURE__*/ /*#__PURE__*/ API.makePaginated(() => ({
41
163
  input: ListAuditLogsRequest,
42
164
  output: ListAuditLogsResponse,
43
165
  errors: [],
166
+ pagination: {
167
+ mode: "page",
168
+ inputToken: "page",
169
+ outputToken: "resultInfo.page",
170
+ items: "result",
171
+ pageSize: "perPage",
172
+ } as const,
44
173
  }));
45
174
 
46
175
  // =============================================================================
@@ -803,22 +932,210 @@ export const GetSubscriptionRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct(
803
932
  T.Http({ method: "GET", path: "/user/subscriptions" }),
804
933
  ) as unknown as Schema.Schema<GetSubscriptionRequest>;
805
934
 
806
- export type GetSubscriptionResponse = unknown;
935
+ export interface GetSubscriptionResponse {
936
+ result: {
937
+ id?: string | null;
938
+ currency?: string | null;
939
+ currentPeriodEnd?: string | null;
940
+ currentPeriodStart?: string | null;
941
+ frequency?: "weekly" | "monthly" | "quarterly" | "yearly" | null;
942
+ price?: number | null;
943
+ ratePlan?: {
944
+ id?:
945
+ | "free"
946
+ | "lite"
947
+ | "pro"
948
+ | "pro_plus"
949
+ | "business"
950
+ | "enterprise"
951
+ | "partners_free"
952
+ | "partners_pro"
953
+ | "partners_business"
954
+ | "partners_enterprise"
955
+ | null;
956
+ currency?: string | null;
957
+ externallyManaged?: boolean | null;
958
+ isContract?: boolean | null;
959
+ publicName?: string | null;
960
+ scope?: string | null;
961
+ sets?: string[] | null;
962
+ } | null;
963
+ state?:
964
+ | "Trial"
965
+ | "Provisioned"
966
+ | "Paid"
967
+ | "AwaitingPayment"
968
+ | "Cancelled"
969
+ | "Failed"
970
+ | "Expired"
971
+ | null;
972
+ }[];
973
+ }
807
974
 
808
975
  export const GetSubscriptionResponse =
809
- /*@__PURE__*/ /*#__PURE__*/ Schema.Unknown as unknown as Schema.Schema<GetSubscriptionResponse>;
976
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
977
+ result: Schema.Array(
978
+ Schema.Struct({
979
+ id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
980
+ currency: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
981
+ currentPeriodEnd: Schema.optional(
982
+ Schema.Union([Schema.String, Schema.Null]),
983
+ ),
984
+ currentPeriodStart: Schema.optional(
985
+ Schema.Union([Schema.String, Schema.Null]),
986
+ ),
987
+ frequency: Schema.optional(
988
+ Schema.Union([
989
+ Schema.Literals(["weekly", "monthly", "quarterly", "yearly"]),
990
+ Schema.Null,
991
+ ]),
992
+ ),
993
+ price: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
994
+ ratePlan: Schema.optional(
995
+ Schema.Union([
996
+ Schema.Struct({
997
+ id: Schema.optional(
998
+ Schema.Union([
999
+ Schema.Literals([
1000
+ "free",
1001
+ "lite",
1002
+ "pro",
1003
+ "pro_plus",
1004
+ "business",
1005
+ "enterprise",
1006
+ "partners_free",
1007
+ "partners_pro",
1008
+ "partners_business",
1009
+ "partners_enterprise",
1010
+ ]),
1011
+ Schema.Null,
1012
+ ]),
1013
+ ),
1014
+ currency: Schema.optional(
1015
+ Schema.Union([Schema.String, Schema.Null]),
1016
+ ),
1017
+ externallyManaged: Schema.optional(
1018
+ Schema.Union([Schema.Boolean, Schema.Null]),
1019
+ ),
1020
+ isContract: Schema.optional(
1021
+ Schema.Union([Schema.Boolean, Schema.Null]),
1022
+ ),
1023
+ publicName: Schema.optional(
1024
+ Schema.Union([Schema.String, Schema.Null]),
1025
+ ),
1026
+ scope: Schema.optional(
1027
+ Schema.Union([Schema.String, Schema.Null]),
1028
+ ),
1029
+ sets: Schema.optional(
1030
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
1031
+ ),
1032
+ }).pipe(
1033
+ Schema.encodeKeys({
1034
+ id: "id",
1035
+ currency: "currency",
1036
+ externallyManaged: "externally_managed",
1037
+ isContract: "is_contract",
1038
+ publicName: "public_name",
1039
+ scope: "scope",
1040
+ sets: "sets",
1041
+ }),
1042
+ ),
1043
+ Schema.Null,
1044
+ ]),
1045
+ ),
1046
+ state: Schema.optional(
1047
+ Schema.Union([
1048
+ Schema.Literals([
1049
+ "Trial",
1050
+ "Provisioned",
1051
+ "Paid",
1052
+ "AwaitingPayment",
1053
+ "Cancelled",
1054
+ "Failed",
1055
+ "Expired",
1056
+ ]),
1057
+ Schema.Null,
1058
+ ]),
1059
+ ),
1060
+ }).pipe(
1061
+ Schema.encodeKeys({
1062
+ id: "id",
1063
+ currency: "currency",
1064
+ currentPeriodEnd: "current_period_end",
1065
+ currentPeriodStart: "current_period_start",
1066
+ frequency: "frequency",
1067
+ price: "price",
1068
+ ratePlan: "rate_plan",
1069
+ state: "state",
1070
+ }),
1071
+ ),
1072
+ ),
1073
+ }) as unknown as Schema.Schema<GetSubscriptionResponse>;
810
1074
 
811
1075
  export type GetSubscriptionError = DefaultErrors;
812
1076
 
813
- export const getSubscription: API.OperationMethod<
1077
+ export const getSubscription: API.PaginatedOperationMethod<
814
1078
  GetSubscriptionRequest,
815
1079
  GetSubscriptionResponse,
816
1080
  GetSubscriptionError,
817
1081
  Credentials | HttpClient.HttpClient
818
- > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
1082
+ > & {
1083
+ pages: (
1084
+ input: GetSubscriptionRequest,
1085
+ ) => stream.Stream<
1086
+ GetSubscriptionResponse,
1087
+ GetSubscriptionError,
1088
+ Credentials | HttpClient.HttpClient
1089
+ >;
1090
+ items: (input: GetSubscriptionRequest) => stream.Stream<
1091
+ {
1092
+ id?: string | null;
1093
+ currency?: string | null;
1094
+ currentPeriodEnd?: string | null;
1095
+ currentPeriodStart?: string | null;
1096
+ frequency?: "weekly" | "monthly" | "quarterly" | "yearly" | null;
1097
+ price?: number | null;
1098
+ ratePlan?: {
1099
+ id?:
1100
+ | "free"
1101
+ | "lite"
1102
+ | "pro"
1103
+ | "pro_plus"
1104
+ | "business"
1105
+ | "enterprise"
1106
+ | "partners_free"
1107
+ | "partners_pro"
1108
+ | "partners_business"
1109
+ | "partners_enterprise"
1110
+ | null;
1111
+ currency?: string | null;
1112
+ externallyManaged?: boolean | null;
1113
+ isContract?: boolean | null;
1114
+ publicName?: string | null;
1115
+ scope?: string | null;
1116
+ sets?: string[] | null;
1117
+ } | null;
1118
+ state?:
1119
+ | "Trial"
1120
+ | "Provisioned"
1121
+ | "Paid"
1122
+ | "AwaitingPayment"
1123
+ | "Cancelled"
1124
+ | "Failed"
1125
+ | "Expired"
1126
+ | null;
1127
+ },
1128
+ GetSubscriptionError,
1129
+ Credentials | HttpClient.HttpClient
1130
+ >;
1131
+ } = /*@__PURE__*/ /*#__PURE__*/ API.makePaginated(() => ({
819
1132
  input: GetSubscriptionRequest,
820
1133
  output: GetSubscriptionResponse,
821
1134
  errors: [],
1135
+ pagination: {
1136
+ mode: "single",
1137
+ items: "result",
1138
+ } as const,
822
1139
  }));
823
1140
 
824
1141
  export interface PutSubscriptionRequest {
@@ -826,7 +1143,25 @@ export interface PutSubscriptionRequest {
826
1143
  /** How often the subscription is renewed automatically. */
827
1144
  frequency?: "weekly" | "monthly" | "quarterly" | "yearly";
828
1145
  /** The rate plan applied to the subscription. */
829
- ratePlan?: unknown;
1146
+ ratePlan?: {
1147
+ id?:
1148
+ | "free"
1149
+ | "lite"
1150
+ | "pro"
1151
+ | "pro_plus"
1152
+ | "business"
1153
+ | "enterprise"
1154
+ | "partners_free"
1155
+ | "partners_pro"
1156
+ | "partners_business"
1157
+ | "partners_enterprise";
1158
+ currency?: string;
1159
+ externallyManaged?: boolean;
1160
+ isContract?: boolean;
1161
+ publicName?: string;
1162
+ scope?: string;
1163
+ sets?: string[];
1164
+ };
830
1165
  }
831
1166
 
832
1167
  export const PutSubscriptionRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct(
@@ -835,7 +1170,40 @@ export const PutSubscriptionRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct(
835
1170
  frequency: Schema.optional(
836
1171
  Schema.Literals(["weekly", "monthly", "quarterly", "yearly"]),
837
1172
  ),
838
- ratePlan: Schema.optional(Schema.Unknown),
1173
+ ratePlan: Schema.optional(
1174
+ Schema.Struct({
1175
+ id: Schema.optional(
1176
+ Schema.Literals([
1177
+ "free",
1178
+ "lite",
1179
+ "pro",
1180
+ "pro_plus",
1181
+ "business",
1182
+ "enterprise",
1183
+ "partners_free",
1184
+ "partners_pro",
1185
+ "partners_business",
1186
+ "partners_enterprise",
1187
+ ]),
1188
+ ),
1189
+ currency: Schema.optional(Schema.String),
1190
+ externallyManaged: Schema.optional(Schema.Boolean),
1191
+ isContract: Schema.optional(Schema.Boolean),
1192
+ publicName: Schema.optional(Schema.String),
1193
+ scope: Schema.optional(Schema.String),
1194
+ sets: Schema.optional(Schema.Array(Schema.String)),
1195
+ }).pipe(
1196
+ Schema.encodeKeys({
1197
+ id: "id",
1198
+ currency: "currency",
1199
+ externallyManaged: "externally_managed",
1200
+ isContract: "is_contract",
1201
+ publicName: "public_name",
1202
+ scope: "scope",
1203
+ sets: "sets",
1204
+ }),
1205
+ ),
1206
+ ),
839
1207
  },
840
1208
  ).pipe(
841
1209
  Schema.encodeKeys({ frequency: "frequency", ratePlan: "rate_plan" }),
@@ -913,10 +1281,129 @@ export const GetTokenRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
913
1281
  T.Http({ method: "GET", path: "/user/tokens/{tokenId}" }),
914
1282
  ) as unknown as Schema.Schema<GetTokenRequest>;
915
1283
 
916
- export type GetTokenResponse = unknown;
1284
+ export interface GetTokenResponse {
1285
+ /** Token identifier tag. */
1286
+ id?: string | null;
1287
+ condition?: {
1288
+ requestIp?: { in?: string[] | null; notIn?: string[] | null } | null;
1289
+ } | null;
1290
+ /** The expiration time on or after which the JWT MUST NOT be accepted for processing. */
1291
+ expiresOn?: string | null;
1292
+ /** The time on which the token was created. */
1293
+ issuedOn?: string | null;
1294
+ /** Last time the token was used. */
1295
+ lastUsedOn?: string | null;
1296
+ /** Last time the token was modified. */
1297
+ modifiedOn?: string | null;
1298
+ /** Token name. */
1299
+ name?: string | null;
1300
+ /** The time before which the token MUST NOT be accepted for processing. */
1301
+ notBefore?: string | null;
1302
+ /** List of access policies assigned to the token. */
1303
+ policies?:
1304
+ | {
1305
+ id: string;
1306
+ effect: "allow" | "deny";
1307
+ permissionGroups: {
1308
+ id: string;
1309
+ meta?: { key?: string | null; value?: string | null } | null;
1310
+ name?: string | null;
1311
+ }[];
1312
+ resources: Record<string, unknown>;
1313
+ }[]
1314
+ | null;
1315
+ /** Status of the token. */
1316
+ status?: "active" | "disabled" | "expired" | null;
1317
+ }
917
1318
 
918
- export const GetTokenResponse =
919
- /*@__PURE__*/ /*#__PURE__*/ Schema.Unknown as unknown as Schema.Schema<GetTokenResponse>;
1319
+ export const GetTokenResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1320
+ id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1321
+ condition: Schema.optional(
1322
+ Schema.Union([
1323
+ Schema.Struct({
1324
+ requestIp: Schema.optional(
1325
+ Schema.Union([
1326
+ Schema.Struct({
1327
+ in: Schema.optional(
1328
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
1329
+ ),
1330
+ notIn: Schema.optional(
1331
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
1332
+ ),
1333
+ }).pipe(Schema.encodeKeys({ in: "in", notIn: "not_in" })),
1334
+ Schema.Null,
1335
+ ]),
1336
+ ),
1337
+ }).pipe(Schema.encodeKeys({ requestIp: "request_ip" })),
1338
+ Schema.Null,
1339
+ ]),
1340
+ ),
1341
+ expiresOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1342
+ issuedOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1343
+ lastUsedOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1344
+ modifiedOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1345
+ name: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1346
+ notBefore: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1347
+ policies: Schema.optional(
1348
+ Schema.Union([
1349
+ Schema.Array(
1350
+ Schema.Struct({
1351
+ id: Schema.String,
1352
+ effect: Schema.Literals(["allow", "deny"]),
1353
+ permissionGroups: Schema.Array(
1354
+ Schema.Struct({
1355
+ id: Schema.String,
1356
+ meta: Schema.optional(
1357
+ Schema.Union([
1358
+ Schema.Struct({
1359
+ key: Schema.optional(
1360
+ Schema.Union([Schema.String, Schema.Null]),
1361
+ ),
1362
+ value: Schema.optional(
1363
+ Schema.Union([Schema.String, Schema.Null]),
1364
+ ),
1365
+ }),
1366
+ Schema.Null,
1367
+ ]),
1368
+ ),
1369
+ name: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1370
+ }),
1371
+ ),
1372
+ resources: Schema.Record(Schema.String, Schema.Unknown),
1373
+ }).pipe(
1374
+ Schema.encodeKeys({
1375
+ id: "id",
1376
+ effect: "effect",
1377
+ permissionGroups: "permission_groups",
1378
+ resources: "resources",
1379
+ }),
1380
+ ),
1381
+ ),
1382
+ Schema.Null,
1383
+ ]),
1384
+ ),
1385
+ status: Schema.optional(
1386
+ Schema.Union([
1387
+ Schema.Literals(["active", "disabled", "expired"]),
1388
+ Schema.Null,
1389
+ ]),
1390
+ ),
1391
+ })
1392
+ .pipe(
1393
+ Schema.encodeKeys({
1394
+ id: "id",
1395
+ condition: "condition",
1396
+ expiresOn: "expires_on",
1397
+ issuedOn: "issued_on",
1398
+ lastUsedOn: "last_used_on",
1399
+ modifiedOn: "modified_on",
1400
+ name: "name",
1401
+ notBefore: "not_before",
1402
+ policies: "policies",
1403
+ status: "status",
1404
+ }),
1405
+ )
1406
+ .pipe(T.ResponsePath("result")) as unknown as Schema.Schema<GetTokenResponse>;
920
1407
 
921
1408
  export type GetTokenError = DefaultErrors;
922
1409
 
@@ -939,29 +1426,214 @@ export const ListTokensRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct(
939
1426
  T.Http({ method: "GET", path: "/user/tokens" }),
940
1427
  ) as unknown as Schema.Schema<ListTokensRequest>;
941
1428
 
942
- export type ListTokensResponse = unknown;
1429
+ export interface ListTokensResponse {
1430
+ result: {
1431
+ id?: string | null;
1432
+ condition?: {
1433
+ requestIp?: { in?: string[] | null; notIn?: string[] | null } | null;
1434
+ } | null;
1435
+ expiresOn?: string | null;
1436
+ issuedOn?: string | null;
1437
+ lastUsedOn?: string | null;
1438
+ modifiedOn?: string | null;
1439
+ name?: string | null;
1440
+ notBefore?: string | null;
1441
+ policies?:
1442
+ | {
1443
+ id: string;
1444
+ effect: "allow" | "deny";
1445
+ permissionGroups: {
1446
+ id: string;
1447
+ meta?: { key?: string | null; value?: string | null } | null;
1448
+ name?: string | null;
1449
+ }[];
1450
+ resources: Record<string, unknown>;
1451
+ }[]
1452
+ | null;
1453
+ status?: "active" | "disabled" | "expired" | null;
1454
+ }[];
1455
+ resultInfo: {
1456
+ count?: number | null;
1457
+ page?: number | null;
1458
+ perPage?: number | null;
1459
+ totalCount?: number | null;
1460
+ };
1461
+ }
943
1462
 
944
- export const ListTokensResponse =
945
- /*@__PURE__*/ /*#__PURE__*/ Schema.Unknown as unknown as Schema.Schema<ListTokensResponse>;
1463
+ export const ListTokensResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1464
+ result: Schema.Array(
1465
+ Schema.Struct({
1466
+ id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1467
+ condition: Schema.optional(
1468
+ Schema.Union([
1469
+ Schema.Struct({
1470
+ requestIp: Schema.optional(
1471
+ Schema.Union([
1472
+ Schema.Struct({
1473
+ in: Schema.optional(
1474
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
1475
+ ),
1476
+ notIn: Schema.optional(
1477
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
1478
+ ),
1479
+ }).pipe(Schema.encodeKeys({ in: "in", notIn: "not_in" })),
1480
+ Schema.Null,
1481
+ ]),
1482
+ ),
1483
+ }).pipe(Schema.encodeKeys({ requestIp: "request_ip" })),
1484
+ Schema.Null,
1485
+ ]),
1486
+ ),
1487
+ expiresOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1488
+ issuedOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1489
+ lastUsedOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1490
+ modifiedOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1491
+ name: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1492
+ notBefore: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1493
+ policies: Schema.optional(
1494
+ Schema.Union([
1495
+ Schema.Array(
1496
+ Schema.Struct({
1497
+ id: Schema.String,
1498
+ effect: Schema.Literals(["allow", "deny"]),
1499
+ permissionGroups: Schema.Array(
1500
+ Schema.Struct({
1501
+ id: Schema.String,
1502
+ meta: Schema.optional(
1503
+ Schema.Union([
1504
+ Schema.Struct({
1505
+ key: Schema.optional(
1506
+ Schema.Union([Schema.String, Schema.Null]),
1507
+ ),
1508
+ value: Schema.optional(
1509
+ Schema.Union([Schema.String, Schema.Null]),
1510
+ ),
1511
+ }),
1512
+ Schema.Null,
1513
+ ]),
1514
+ ),
1515
+ name: Schema.optional(
1516
+ Schema.Union([Schema.String, Schema.Null]),
1517
+ ),
1518
+ }),
1519
+ ),
1520
+ resources: Schema.Record(Schema.String, Schema.Unknown),
1521
+ }).pipe(
1522
+ Schema.encodeKeys({
1523
+ id: "id",
1524
+ effect: "effect",
1525
+ permissionGroups: "permission_groups",
1526
+ resources: "resources",
1527
+ }),
1528
+ ),
1529
+ ),
1530
+ Schema.Null,
1531
+ ]),
1532
+ ),
1533
+ status: Schema.optional(
1534
+ Schema.Union([
1535
+ Schema.Literals(["active", "disabled", "expired"]),
1536
+ Schema.Null,
1537
+ ]),
1538
+ ),
1539
+ }).pipe(
1540
+ Schema.encodeKeys({
1541
+ id: "id",
1542
+ condition: "condition",
1543
+ expiresOn: "expires_on",
1544
+ issuedOn: "issued_on",
1545
+ lastUsedOn: "last_used_on",
1546
+ modifiedOn: "modified_on",
1547
+ name: "name",
1548
+ notBefore: "not_before",
1549
+ policies: "policies",
1550
+ status: "status",
1551
+ }),
1552
+ ),
1553
+ ),
1554
+ resultInfo: Schema.Struct({
1555
+ count: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
1556
+ page: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
1557
+ perPage: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
1558
+ totalCount: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
1559
+ }).pipe(
1560
+ Schema.encodeKeys({
1561
+ count: "count",
1562
+ page: "page",
1563
+ perPage: "per_page",
1564
+ totalCount: "total_count",
1565
+ }),
1566
+ ),
1567
+ }).pipe(
1568
+ Schema.encodeKeys({ result: "result", resultInfo: "result_info" }),
1569
+ ) as unknown as Schema.Schema<ListTokensResponse>;
946
1570
 
947
1571
  export type ListTokensError = DefaultErrors;
948
1572
 
949
- export const listTokens: API.OperationMethod<
1573
+ export const listTokens: API.PaginatedOperationMethod<
950
1574
  ListTokensRequest,
951
1575
  ListTokensResponse,
952
1576
  ListTokensError,
953
1577
  Credentials | HttpClient.HttpClient
954
- > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
1578
+ > & {
1579
+ pages: (
1580
+ input: ListTokensRequest,
1581
+ ) => stream.Stream<
1582
+ ListTokensResponse,
1583
+ ListTokensError,
1584
+ Credentials | HttpClient.HttpClient
1585
+ >;
1586
+ items: (input: ListTokensRequest) => stream.Stream<
1587
+ {
1588
+ id?: string | null;
1589
+ condition?: {
1590
+ requestIp?: { in?: string[] | null; notIn?: string[] | null } | null;
1591
+ } | null;
1592
+ expiresOn?: string | null;
1593
+ issuedOn?: string | null;
1594
+ lastUsedOn?: string | null;
1595
+ modifiedOn?: string | null;
1596
+ name?: string | null;
1597
+ notBefore?: string | null;
1598
+ policies?:
1599
+ | {
1600
+ id: string;
1601
+ effect: "allow" | "deny";
1602
+ permissionGroups: {
1603
+ id: string;
1604
+ meta?: { key?: string | null; value?: string | null } | null;
1605
+ name?: string | null;
1606
+ }[];
1607
+ resources: Record<string, unknown>;
1608
+ }[]
1609
+ | null;
1610
+ status?: "active" | "disabled" | "expired" | null;
1611
+ },
1612
+ ListTokensError,
1613
+ Credentials | HttpClient.HttpClient
1614
+ >;
1615
+ } = /*@__PURE__*/ /*#__PURE__*/ API.makePaginated(() => ({
955
1616
  input: ListTokensRequest,
956
1617
  output: ListTokensResponse,
957
1618
  errors: [],
1619
+ pagination: {
1620
+ mode: "page",
1621
+ inputToken: "page",
1622
+ outputToken: "resultInfo.page",
1623
+ items: "result",
1624
+ pageSize: "perPage",
1625
+ } as const,
958
1626
  }));
959
1627
 
960
1628
  export interface CreateTokenRequest {
961
1629
  /** Token name. */
962
1630
  name: string;
963
1631
  /** List of access policies assigned to the token. */
964
- policies: unknown[];
1632
+ policies: {
1633
+ effect: "allow" | "deny";
1634
+ permissionGroups: { id: string; meta?: { key?: string; value?: string } }[];
1635
+ resources: Record<string, unknown>;
1636
+ }[];
965
1637
  condition?: { requestIp?: { in?: string[]; notIn?: string[] } };
966
1638
  /** The expiration time on or after which the JWT MUST NOT be accepted for processing. */
967
1639
  expiresOn?: string;
@@ -971,7 +1643,29 @@ export interface CreateTokenRequest {
971
1643
 
972
1644
  export const CreateTokenRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
973
1645
  name: Schema.String,
974
- policies: Schema.Array(Schema.Unknown),
1646
+ policies: Schema.Array(
1647
+ Schema.Struct({
1648
+ effect: Schema.Literals(["allow", "deny"]),
1649
+ permissionGroups: Schema.Array(
1650
+ Schema.Struct({
1651
+ id: Schema.String,
1652
+ meta: Schema.optional(
1653
+ Schema.Struct({
1654
+ key: Schema.optional(Schema.String),
1655
+ value: Schema.optional(Schema.String),
1656
+ }),
1657
+ ),
1658
+ }),
1659
+ ),
1660
+ resources: Schema.Record(Schema.String, Schema.Unknown),
1661
+ }).pipe(
1662
+ Schema.encodeKeys({
1663
+ effect: "effect",
1664
+ permissionGroups: "permission_groups",
1665
+ resources: "resources",
1666
+ }),
1667
+ ),
1668
+ ),
975
1669
  condition: Schema.optional(
976
1670
  Schema.Struct({
977
1671
  requestIp: Schema.optional(
@@ -1014,7 +1708,18 @@ export interface CreateTokenResponse {
1014
1708
  /** The time before which the token MUST NOT be accepted for processing. */
1015
1709
  notBefore?: string | null;
1016
1710
  /** List of access policies assigned to the token. */
1017
- policies?: unknown[] | null;
1711
+ policies?:
1712
+ | {
1713
+ id: string;
1714
+ effect: "allow" | "deny";
1715
+ permissionGroups: {
1716
+ id: string;
1717
+ meta?: { key?: string | null; value?: string | null } | null;
1718
+ name?: string | null;
1719
+ }[];
1720
+ resources: Record<string, unknown>;
1721
+ }[]
1722
+ | null;
1018
1723
  /** Status of the token. */
1019
1724
  status?: "active" | "disabled" | "expired" | null;
1020
1725
  /** The token value. */
@@ -1050,7 +1755,42 @@ export const CreateTokenResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1050
1755
  name: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1051
1756
  notBefore: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1052
1757
  policies: Schema.optional(
1053
- Schema.Union([Schema.Array(Schema.Unknown), Schema.Null]),
1758
+ Schema.Union([
1759
+ Schema.Array(
1760
+ Schema.Struct({
1761
+ id: Schema.String,
1762
+ effect: Schema.Literals(["allow", "deny"]),
1763
+ permissionGroups: Schema.Array(
1764
+ Schema.Struct({
1765
+ id: Schema.String,
1766
+ meta: Schema.optional(
1767
+ Schema.Union([
1768
+ Schema.Struct({
1769
+ key: Schema.optional(
1770
+ Schema.Union([Schema.String, Schema.Null]),
1771
+ ),
1772
+ value: Schema.optional(
1773
+ Schema.Union([Schema.String, Schema.Null]),
1774
+ ),
1775
+ }),
1776
+ Schema.Null,
1777
+ ]),
1778
+ ),
1779
+ name: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1780
+ }),
1781
+ ),
1782
+ resources: Schema.Record(Schema.String, Schema.Unknown),
1783
+ }).pipe(
1784
+ Schema.encodeKeys({
1785
+ id: "id",
1786
+ effect: "effect",
1787
+ permissionGroups: "permission_groups",
1788
+ resources: "resources",
1789
+ }),
1790
+ ),
1791
+ ),
1792
+ Schema.Null,
1793
+ ]),
1054
1794
  ),
1055
1795
  status: Schema.optional(
1056
1796
  Schema.Union([
@@ -1097,7 +1837,11 @@ export interface UpdateTokenRequest {
1097
1837
  /** Token name. */
1098
1838
  name: string;
1099
1839
  /** List of access policies assigned to the token. */
1100
- policies: unknown[];
1840
+ policies: {
1841
+ effect: "allow" | "deny";
1842
+ permissionGroups: { id: string; meta?: { key?: string; value?: string } }[];
1843
+ resources: Record<string, unknown>;
1844
+ }[];
1101
1845
  condition?: { requestIp?: { in?: string[]; notIn?: string[] } };
1102
1846
  /** The expiration time on or after which the JWT MUST NOT be accepted for processing. */
1103
1847
  expiresOn?: string;
@@ -1110,7 +1854,29 @@ export interface UpdateTokenRequest {
1110
1854
  export const UpdateTokenRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1111
1855
  tokenId: Schema.String.pipe(T.HttpPath("tokenId")),
1112
1856
  name: Schema.String,
1113
- policies: Schema.Array(Schema.Unknown),
1857
+ policies: Schema.Array(
1858
+ Schema.Struct({
1859
+ effect: Schema.Literals(["allow", "deny"]),
1860
+ permissionGroups: Schema.Array(
1861
+ Schema.Struct({
1862
+ id: Schema.String,
1863
+ meta: Schema.optional(
1864
+ Schema.Struct({
1865
+ key: Schema.optional(Schema.String),
1866
+ value: Schema.optional(Schema.String),
1867
+ }),
1868
+ ),
1869
+ }),
1870
+ ),
1871
+ resources: Schema.Record(Schema.String, Schema.Unknown),
1872
+ }).pipe(
1873
+ Schema.encodeKeys({
1874
+ effect: "effect",
1875
+ permissionGroups: "permission_groups",
1876
+ resources: "resources",
1877
+ }),
1878
+ ),
1879
+ ),
1114
1880
  condition: Schema.optional(
1115
1881
  Schema.Struct({
1116
1882
  requestIp: Schema.optional(
@@ -1136,10 +1902,131 @@ export const UpdateTokenRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1136
1902
  T.Http({ method: "PUT", path: "/user/tokens/{tokenId}" }),
1137
1903
  ) as unknown as Schema.Schema<UpdateTokenRequest>;
1138
1904
 
1139
- export type UpdateTokenResponse = unknown;
1905
+ export interface UpdateTokenResponse {
1906
+ /** Token identifier tag. */
1907
+ id?: string | null;
1908
+ condition?: {
1909
+ requestIp?: { in?: string[] | null; notIn?: string[] | null } | null;
1910
+ } | null;
1911
+ /** The expiration time on or after which the JWT MUST NOT be accepted for processing. */
1912
+ expiresOn?: string | null;
1913
+ /** The time on which the token was created. */
1914
+ issuedOn?: string | null;
1915
+ /** Last time the token was used. */
1916
+ lastUsedOn?: string | null;
1917
+ /** Last time the token was modified. */
1918
+ modifiedOn?: string | null;
1919
+ /** Token name. */
1920
+ name?: string | null;
1921
+ /** The time before which the token MUST NOT be accepted for processing. */
1922
+ notBefore?: string | null;
1923
+ /** List of access policies assigned to the token. */
1924
+ policies?:
1925
+ | {
1926
+ id: string;
1927
+ effect: "allow" | "deny";
1928
+ permissionGroups: {
1929
+ id: string;
1930
+ meta?: { key?: string | null; value?: string | null } | null;
1931
+ name?: string | null;
1932
+ }[];
1933
+ resources: Record<string, unknown>;
1934
+ }[]
1935
+ | null;
1936
+ /** Status of the token. */
1937
+ status?: "active" | "disabled" | "expired" | null;
1938
+ }
1140
1939
 
1141
- export const UpdateTokenResponse =
1142
- /*@__PURE__*/ /*#__PURE__*/ Schema.Unknown as unknown as Schema.Schema<UpdateTokenResponse>;
1940
+ export const UpdateTokenResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1941
+ id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1942
+ condition: Schema.optional(
1943
+ Schema.Union([
1944
+ Schema.Struct({
1945
+ requestIp: Schema.optional(
1946
+ Schema.Union([
1947
+ Schema.Struct({
1948
+ in: Schema.optional(
1949
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
1950
+ ),
1951
+ notIn: Schema.optional(
1952
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
1953
+ ),
1954
+ }).pipe(Schema.encodeKeys({ in: "in", notIn: "not_in" })),
1955
+ Schema.Null,
1956
+ ]),
1957
+ ),
1958
+ }).pipe(Schema.encodeKeys({ requestIp: "request_ip" })),
1959
+ Schema.Null,
1960
+ ]),
1961
+ ),
1962
+ expiresOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1963
+ issuedOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1964
+ lastUsedOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1965
+ modifiedOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1966
+ name: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1967
+ notBefore: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1968
+ policies: Schema.optional(
1969
+ Schema.Union([
1970
+ Schema.Array(
1971
+ Schema.Struct({
1972
+ id: Schema.String,
1973
+ effect: Schema.Literals(["allow", "deny"]),
1974
+ permissionGroups: Schema.Array(
1975
+ Schema.Struct({
1976
+ id: Schema.String,
1977
+ meta: Schema.optional(
1978
+ Schema.Union([
1979
+ Schema.Struct({
1980
+ key: Schema.optional(
1981
+ Schema.Union([Schema.String, Schema.Null]),
1982
+ ),
1983
+ value: Schema.optional(
1984
+ Schema.Union([Schema.String, Schema.Null]),
1985
+ ),
1986
+ }),
1987
+ Schema.Null,
1988
+ ]),
1989
+ ),
1990
+ name: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1991
+ }),
1992
+ ),
1993
+ resources: Schema.Record(Schema.String, Schema.Unknown),
1994
+ }).pipe(
1995
+ Schema.encodeKeys({
1996
+ id: "id",
1997
+ effect: "effect",
1998
+ permissionGroups: "permission_groups",
1999
+ resources: "resources",
2000
+ }),
2001
+ ),
2002
+ ),
2003
+ Schema.Null,
2004
+ ]),
2005
+ ),
2006
+ status: Schema.optional(
2007
+ Schema.Union([
2008
+ Schema.Literals(["active", "disabled", "expired"]),
2009
+ Schema.Null,
2010
+ ]),
2011
+ ),
2012
+ })
2013
+ .pipe(
2014
+ Schema.encodeKeys({
2015
+ id: "id",
2016
+ condition: "condition",
2017
+ expiresOn: "expires_on",
2018
+ issuedOn: "issued_on",
2019
+ lastUsedOn: "last_used_on",
2020
+ modifiedOn: "modified_on",
2021
+ name: "name",
2022
+ notBefore: "not_before",
2023
+ policies: "policies",
2024
+ status: "status",
2025
+ }),
2026
+ )
2027
+ .pipe(
2028
+ T.ResponsePath("result"),
2029
+ ) as unknown as Schema.Schema<UpdateTokenResponse>;
1143
2030
 
1144
2031
  export type UpdateTokenError = DefaultErrors;
1145
2032
 
@@ -1342,10 +2229,12 @@ export const PutTokenValueRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1342
2229
  T.Http({ method: "PUT", path: "/user/tokens/{tokenId}/value" }),
1343
2230
  ) as unknown as Schema.Schema<PutTokenValueRequest>;
1344
2231
 
1345
- export type PutTokenValueResponse = unknown;
2232
+ export type PutTokenValueResponse = string;
1346
2233
 
1347
2234
  export const PutTokenValueResponse =
1348
- /*@__PURE__*/ /*#__PURE__*/ Schema.Unknown as unknown as Schema.Schema<PutTokenValueResponse>;
2235
+ /*@__PURE__*/ /*#__PURE__*/ Schema.String.pipe(
2236
+ T.ResponsePath("result"),
2237
+ ) as unknown as Schema.Schema<PutTokenValueResponse>;
1349
2238
 
1350
2239
  export type PutTokenValueError = DefaultErrors;
1351
2240
 
@@ -1389,7 +2278,15 @@ export interface GetUserResponse {
1389
2278
  hasProZones?: boolean | null;
1390
2279
  /** User's last name */
1391
2280
  lastName?: string | null;
1392
- organizations?: unknown[] | null;
2281
+ organizations?:
2282
+ | {
2283
+ id?: string | null;
2284
+ name?: string | null;
2285
+ permissions?: string[] | null;
2286
+ roles?: string[] | null;
2287
+ status?: "member" | "invited" | null;
2288
+ }[]
2289
+ | null;
1393
2290
  /** Indicates whether user has been suspended */
1394
2291
  suspended?: boolean | null;
1395
2292
  /** User's telephone number */
@@ -1418,7 +2315,24 @@ export const GetUserResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1418
2315
  hasProZones: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
1419
2316
  lastName: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1420
2317
  organizations: Schema.optional(
1421
- Schema.Union([Schema.Array(Schema.Unknown), Schema.Null]),
2318
+ Schema.Union([
2319
+ Schema.Array(
2320
+ Schema.Struct({
2321
+ id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
2322
+ name: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
2323
+ permissions: Schema.optional(
2324
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
2325
+ ),
2326
+ roles: Schema.optional(
2327
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
2328
+ ),
2329
+ status: Schema.optional(
2330
+ Schema.Union([Schema.Literals(["member", "invited"]), Schema.Null]),
2331
+ ),
2332
+ }),
2333
+ ),
2334
+ Schema.Null,
2335
+ ]),
1422
2336
  ),
1423
2337
  suspended: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
1424
2338
  telephone: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
@@ -1510,7 +2424,15 @@ export interface PatchUserResponse {
1510
2424
  hasProZones?: boolean | null;
1511
2425
  /** User's last name */
1512
2426
  lastName?: string | null;
1513
- organizations?: unknown[] | null;
2427
+ organizations?:
2428
+ | {
2429
+ id?: string | null;
2430
+ name?: string | null;
2431
+ permissions?: string[] | null;
2432
+ roles?: string[] | null;
2433
+ status?: "member" | "invited" | null;
2434
+ }[]
2435
+ | null;
1514
2436
  /** Indicates whether user has been suspended */
1515
2437
  suspended?: boolean | null;
1516
2438
  /** User's telephone number */
@@ -1539,7 +2461,24 @@ export const PatchUserResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1539
2461
  hasProZones: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
1540
2462
  lastName: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1541
2463
  organizations: Schema.optional(
1542
- Schema.Union([Schema.Array(Schema.Unknown), Schema.Null]),
2464
+ Schema.Union([
2465
+ Schema.Array(
2466
+ Schema.Struct({
2467
+ id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
2468
+ name: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
2469
+ permissions: Schema.optional(
2470
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
2471
+ ),
2472
+ roles: Schema.optional(
2473
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
2474
+ ),
2475
+ status: Schema.optional(
2476
+ Schema.Union([Schema.Literals(["member", "invited"]), Schema.Null]),
2477
+ ),
2478
+ }),
2479
+ ),
2480
+ Schema.Null,
2481
+ ]),
1543
2482
  ),
1544
2483
  suspended: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
1545
2484
  telephone: Schema.optional(Schema.Union([Schema.String, Schema.Null])),