@distilled.cloud/cloudflare 0.12.3 → 0.12.5

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 (41) hide show
  1. package/lib/services/accounts.d.ts +52 -52
  2. package/lib/services/accounts.d.ts.map +1 -1
  3. package/lib/services/accounts.js +1533 -569
  4. package/lib/services/accounts.js.map +1 -1
  5. package/lib/services/d1.d.ts +7 -1
  6. package/lib/services/d1.d.ts.map +1 -1
  7. package/lib/services/d1.js +4 -1
  8. package/lib/services/d1.js.map +1 -1
  9. package/lib/services/pipelines.d.ts +35 -5
  10. package/lib/services/pipelines.d.ts.map +1 -1
  11. package/lib/services/pipelines.js +25 -6
  12. package/lib/services/pipelines.js.map +1 -1
  13. package/lib/services/queues.d.ts +14 -14
  14. package/lib/services/queues.d.ts.map +1 -1
  15. package/lib/services/queues.js +1192 -413
  16. package/lib/services/queues.js.map +1 -1
  17. package/lib/services/r2.d.ts +32 -32
  18. package/lib/services/r2.d.ts.map +1 -1
  19. package/lib/services/r2.js +873 -391
  20. package/lib/services/r2.js.map +1 -1
  21. package/lib/services/user.d.ts +36 -5
  22. package/lib/services/user.d.ts.map +1 -1
  23. package/lib/services/user.js +32 -5
  24. package/lib/services/user.js.map +1 -1
  25. package/lib/services/workers.d.ts +51 -1
  26. package/lib/services/workers.d.ts.map +1 -1
  27. package/lib/services/workers.js +59 -1
  28. package/lib/services/workers.js.map +1 -1
  29. package/lib/services/workflows.d.ts +8 -2
  30. package/lib/services/workflows.d.ts.map +1 -1
  31. package/lib/services/workflows.js +5 -2
  32. package/lib/services/workflows.js.map +1 -1
  33. package/package.json +2 -2
  34. package/src/services/accounts.ts +3546 -1036
  35. package/src/services/d1.ts +9 -2
  36. package/src/services/pipelines.ts +56 -11
  37. package/src/services/queues.ts +2978 -829
  38. package/src/services/r2.ts +2232 -848
  39. package/src/services/user.ts +66 -10
  40. package/src/services/workers.ts +77 -2
  41. package/src/services/workflows.ts +10 -2
@@ -13,68 +13,108 @@ import {} from "../errors.js";
13
13
  // =============================================================================
14
14
  export class ConsumerAlreadyExists extends Schema.TaggedErrorClass()("ConsumerAlreadyExists", { code: Schema.Number, message: Schema.String }) {
15
15
  }
16
- T.applyErrorMatchers(ConsumerAlreadyExists, [{ "code": 11004 }]);
16
+ T.applyErrorMatchers(ConsumerAlreadyExists, [{ code: 11004 }]);
17
17
  export class ConsumerNotFound extends Schema.TaggedErrorClass()("ConsumerNotFound", { code: Schema.Number, message: Schema.String }) {
18
18
  }
19
- T.applyErrorMatchers(ConsumerNotFound, [{ "code": 10105 }, { "code": 11006 }]);
19
+ T.applyErrorMatchers(ConsumerNotFound, [{ code: 10105 }, { code: 11006 }]);
20
20
  export class InvalidMessageBody extends Schema.TaggedErrorClass()("InvalidMessageBody", { code: Schema.Number, message: Schema.String }) {
21
21
  }
22
- T.applyErrorMatchers(InvalidMessageBody, [{ "code": 10207 }, { "code": 10013 }]);
22
+ T.applyErrorMatchers(InvalidMessageBody, [{ code: 10207 }, { code: 10013 }]);
23
23
  export class InvalidQueueId extends Schema.TaggedErrorClass()("InvalidQueueId", { code: Schema.Number, message: Schema.String }) {
24
24
  }
25
- T.applyErrorMatchers(InvalidQueueId, [{ "code": 10107 }]);
25
+ T.applyErrorMatchers(InvalidQueueId, [{ code: 10107 }]);
26
26
  export class InvalidQueueName extends Schema.TaggedErrorClass()("InvalidQueueName", { code: Schema.Number, message: Schema.String }) {
27
27
  }
28
- T.applyErrorMatchers(InvalidQueueName, [{ "code": 11003 }]);
28
+ T.applyErrorMatchers(InvalidQueueName, [{ code: 11003 }]);
29
29
  export class InvalidRequestBody extends Schema.TaggedErrorClass()("InvalidRequestBody", { code: Schema.Number, message: Schema.String }) {
30
30
  }
31
- T.applyErrorMatchers(InvalidRequestBody, [{ "code": 10026 }]);
31
+ T.applyErrorMatchers(InvalidRequestBody, [{ code: 10026 }]);
32
32
  export class InvalidRoute extends Schema.TaggedErrorClass()("InvalidRoute", { code: Schema.Number, message: Schema.String }) {
33
33
  }
34
- T.applyErrorMatchers(InvalidRoute, [{ "code": 7003 }]);
34
+ T.applyErrorMatchers(InvalidRoute, [{ code: 7003 }]);
35
35
  export class QueueAlreadyExists extends Schema.TaggedErrorClass()("QueueAlreadyExists", { code: Schema.Number, message: Schema.String }) {
36
36
  }
37
- T.applyErrorMatchers(QueueAlreadyExists, [{ "code": 11009 }]);
37
+ T.applyErrorMatchers(QueueAlreadyExists, [{ code: 11009 }]);
38
38
  export class QueueNotFound extends Schema.TaggedErrorClass()("QueueNotFound", { code: Schema.Number, message: Schema.String }) {
39
39
  }
40
- T.applyErrorMatchers(QueueNotFound, [{ "code": 11000 }, { "code": 0, "message": { "includes": "Queue does not exist" } }]);
40
+ T.applyErrorMatchers(QueueNotFound, [
41
+ { code: 11000 },
42
+ { code: 0, message: { includes: "Queue does not exist" } },
43
+ ]);
41
44
  export class UnrecognizedEventType extends Schema.TaggedErrorClass()("UnrecognizedEventType", { code: Schema.Number, message: Schema.String }) {
42
45
  }
43
- T.applyErrorMatchers(UnrecognizedEventType, [{ "code": 0, "message": { "includes": "Unrecognized event types" } }]);
46
+ T.applyErrorMatchers(UnrecognizedEventType, [
47
+ { code: 0, message: { includes: "Unrecognized event types" } },
48
+ ]);
44
49
  export class WorkerNotFound extends Schema.TaggedErrorClass()("WorkerNotFound", { code: Schema.Number, message: Schema.String }) {
45
50
  }
46
- T.applyErrorMatchers(WorkerNotFound, [{ "code": 10007 }]);
51
+ T.applyErrorMatchers(WorkerNotFound, [{ code: 10007 }]);
47
52
  export const GetConsumerRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
48
53
  queueId: Schema.String.pipe(T.HttpPath("queueId")),
49
54
  consumerId: Schema.String.pipe(T.HttpPath("consumerId")),
50
- accountId: Schema.String.pipe(T.HttpPath("account_id"))
51
- })
52
- .pipe(T.Http({ method: "GET", path: "/accounts/{account_id}/queues/{queueId}/consumers/{consumerId}" }));
53
- export const GetConsumerResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Union([Schema.Struct({
55
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
56
+ }).pipe(T.Http({
57
+ method: "GET",
58
+ path: "/accounts/{account_id}/queues/{queueId}/consumers/{consumerId}",
59
+ }));
60
+ export const GetConsumerResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Union([
61
+ Schema.Struct({
54
62
  consumerId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
55
63
  createdOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
56
64
  queueId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
57
65
  script: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
58
- settings: Schema.optional(Schema.Union([Schema.Struct({
66
+ settings: Schema.optional(Schema.Union([
67
+ Schema.Struct({
59
68
  batchSize: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
60
69
  maxConcurrency: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
61
70
  maxRetries: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
62
71
  maxWaitTimeMs: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
63
- retryDelay: Schema.optional(Schema.Union([Schema.Number, Schema.Null]))
64
- }).pipe(Schema.encodeKeys({ batchSize: "batch_size", maxConcurrency: "max_concurrency", maxRetries: "max_retries", maxWaitTimeMs: "max_wait_time_ms", retryDelay: "retry_delay" })), Schema.Null])),
65
- type: Schema.optional(Schema.Union([Schema.Literal("worker"), Schema.Null]))
66
- }).pipe(Schema.encodeKeys({ consumerId: "consumer_id", createdOn: "created_on", queueId: "queue_id", script: "script", settings: "settings", type: "type" })), Schema.Struct({
72
+ retryDelay: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
73
+ }).pipe(Schema.encodeKeys({
74
+ batchSize: "batch_size",
75
+ maxConcurrency: "max_concurrency",
76
+ maxRetries: "max_retries",
77
+ maxWaitTimeMs: "max_wait_time_ms",
78
+ retryDelay: "retry_delay",
79
+ })),
80
+ Schema.Null,
81
+ ])),
82
+ type: Schema.optional(Schema.Union([Schema.Literal("worker"), Schema.Null])),
83
+ }).pipe(Schema.encodeKeys({
84
+ consumerId: "consumer_id",
85
+ createdOn: "created_on",
86
+ queueId: "queue_id",
87
+ script: "script",
88
+ settings: "settings",
89
+ type: "type",
90
+ })),
91
+ Schema.Struct({
67
92
  consumerId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
68
93
  createdOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
69
94
  queueId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
70
- settings: Schema.optional(Schema.Union([Schema.Struct({
95
+ settings: Schema.optional(Schema.Union([
96
+ Schema.Struct({
71
97
  batchSize: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
72
98
  maxRetries: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
73
99
  retryDelay: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
74
- visibilityTimeoutMs: Schema.optional(Schema.Union([Schema.Number, Schema.Null]))
75
- }).pipe(Schema.encodeKeys({ batchSize: "batch_size", maxRetries: "max_retries", retryDelay: "retry_delay", visibilityTimeoutMs: "visibility_timeout_ms" })), Schema.Null])),
76
- type: Schema.optional(Schema.Union([Schema.Literal("http_pull"), Schema.Null]))
77
- }).pipe(Schema.encodeKeys({ consumerId: "consumer_id", createdOn: "created_on", queueId: "queue_id", settings: "settings", type: "type" }))]).pipe(T.ResponsePath("result"));
100
+ visibilityTimeoutMs: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
101
+ }).pipe(Schema.encodeKeys({
102
+ batchSize: "batch_size",
103
+ maxRetries: "max_retries",
104
+ retryDelay: "retry_delay",
105
+ visibilityTimeoutMs: "visibility_timeout_ms",
106
+ })),
107
+ Schema.Null,
108
+ ])),
109
+ type: Schema.optional(Schema.Union([Schema.Literal("http_pull"), Schema.Null])),
110
+ }).pipe(Schema.encodeKeys({
111
+ consumerId: "consumer_id",
112
+ createdOn: "created_on",
113
+ queueId: "queue_id",
114
+ settings: "settings",
115
+ type: "type",
116
+ })),
117
+ ]).pipe(T.ResponsePath("result"));
78
118
  export const getConsumer = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
79
119
  input: GetConsumerRequest,
80
120
  output: GetConsumerResponse,
@@ -82,35 +122,70 @@ export const getConsumer = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
82
122
  }));
83
123
  export const ListConsumersRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
84
124
  queueId: Schema.String.pipe(T.HttpPath("queueId")),
85
- accountId: Schema.String.pipe(T.HttpPath("account_id"))
86
- })
87
- .pipe(T.Http({ method: "GET", path: "/accounts/{account_id}/queues/{queueId}/consumers" }));
125
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
126
+ }).pipe(T.Http({
127
+ method: "GET",
128
+ path: "/accounts/{account_id}/queues/{queueId}/consumers",
129
+ }));
88
130
  export const ListConsumersResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
89
- result: Schema.Array(Schema.Union([Schema.Struct({
131
+ result: Schema.Array(Schema.Union([
132
+ Schema.Struct({
90
133
  consumerId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
91
134
  createdOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
92
135
  queueId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
93
136
  script: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
94
- settings: Schema.optional(Schema.Union([Schema.Struct({
137
+ settings: Schema.optional(Schema.Union([
138
+ Schema.Struct({
95
139
  batchSize: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
96
140
  maxConcurrency: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
97
141
  maxRetries: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
98
142
  maxWaitTimeMs: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
99
- retryDelay: Schema.optional(Schema.Union([Schema.Number, Schema.Null]))
100
- }).pipe(Schema.encodeKeys({ batchSize: "batch_size", maxConcurrency: "max_concurrency", maxRetries: "max_retries", maxWaitTimeMs: "max_wait_time_ms", retryDelay: "retry_delay" })), Schema.Null])),
101
- type: Schema.optional(Schema.Union([Schema.Literal("worker"), Schema.Null]))
102
- }).pipe(Schema.encodeKeys({ consumerId: "consumer_id", createdOn: "created_on", queueId: "queue_id", script: "script", settings: "settings", type: "type" })), Schema.Struct({
143
+ retryDelay: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
144
+ }).pipe(Schema.encodeKeys({
145
+ batchSize: "batch_size",
146
+ maxConcurrency: "max_concurrency",
147
+ maxRetries: "max_retries",
148
+ maxWaitTimeMs: "max_wait_time_ms",
149
+ retryDelay: "retry_delay",
150
+ })),
151
+ Schema.Null,
152
+ ])),
153
+ type: Schema.optional(Schema.Union([Schema.Literal("worker"), Schema.Null])),
154
+ }).pipe(Schema.encodeKeys({
155
+ consumerId: "consumer_id",
156
+ createdOn: "created_on",
157
+ queueId: "queue_id",
158
+ script: "script",
159
+ settings: "settings",
160
+ type: "type",
161
+ })),
162
+ Schema.Struct({
103
163
  consumerId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
104
164
  createdOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
105
165
  queueId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
106
- settings: Schema.optional(Schema.Union([Schema.Struct({
166
+ settings: Schema.optional(Schema.Union([
167
+ Schema.Struct({
107
168
  batchSize: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
108
169
  maxRetries: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
109
170
  retryDelay: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
110
- visibilityTimeoutMs: Schema.optional(Schema.Union([Schema.Number, Schema.Null]))
111
- }).pipe(Schema.encodeKeys({ batchSize: "batch_size", maxRetries: "max_retries", retryDelay: "retry_delay", visibilityTimeoutMs: "visibility_timeout_ms" })), Schema.Null])),
112
- type: Schema.optional(Schema.Union([Schema.Literal("http_pull"), Schema.Null]))
113
- }).pipe(Schema.encodeKeys({ consumerId: "consumer_id", createdOn: "created_on", queueId: "queue_id", settings: "settings", type: "type" }))]))
171
+ visibilityTimeoutMs: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
172
+ }).pipe(Schema.encodeKeys({
173
+ batchSize: "batch_size",
174
+ maxRetries: "max_retries",
175
+ retryDelay: "retry_delay",
176
+ visibilityTimeoutMs: "visibility_timeout_ms",
177
+ })),
178
+ Schema.Null,
179
+ ])),
180
+ type: Schema.optional(Schema.Union([Schema.Literal("http_pull"), Schema.Null])),
181
+ }).pipe(Schema.encodeKeys({
182
+ consumerId: "consumer_id",
183
+ createdOn: "created_on",
184
+ queueId: "queue_id",
185
+ settings: "settings",
186
+ type: "type",
187
+ })),
188
+ ])),
114
189
  });
115
190
  export const listConsumers = /*@__PURE__*/ /*#__PURE__*/ API.makePaginated(() => ({
116
191
  input: ListConsumersRequest,
@@ -131,40 +206,92 @@ export const CreateConsumerRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
131
206
  maxConcurrency: Schema.optional(Schema.Number),
132
207
  maxRetries: Schema.optional(Schema.Number),
133
208
  maxWaitTimeMs: Schema.optional(Schema.Number),
134
- retryDelay: Schema.optional(Schema.Number)
135
- }).pipe(Schema.encodeKeys({ batchSize: "batch_size", maxConcurrency: "max_concurrency", maxRetries: "max_retries", maxWaitTimeMs: "max_wait_time_ms", retryDelay: "retry_delay" }))),
136
- type: Schema.Literals(["worker", "http_pull"])
137
- })
138
- .pipe(Schema.encodeKeys({ deadLetterQueue: "dead_letter_queue", scriptName: "script_name", settings: "settings", type: "type" }), T.Http({ method: "POST", path: "/accounts/{account_id}/queues/{queueId}/consumers" }));
139
- export const CreateConsumerResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Union([Schema.Struct({
209
+ retryDelay: Schema.optional(Schema.Number),
210
+ }).pipe(Schema.encodeKeys({
211
+ batchSize: "batch_size",
212
+ maxConcurrency: "max_concurrency",
213
+ maxRetries: "max_retries",
214
+ maxWaitTimeMs: "max_wait_time_ms",
215
+ retryDelay: "retry_delay",
216
+ }))),
217
+ type: Schema.Literals(["worker", "http_pull"]),
218
+ }).pipe(Schema.encodeKeys({
219
+ deadLetterQueue: "dead_letter_queue",
220
+ scriptName: "script_name",
221
+ settings: "settings",
222
+ type: "type",
223
+ }), T.Http({
224
+ method: "POST",
225
+ path: "/accounts/{account_id}/queues/{queueId}/consumers",
226
+ }));
227
+ export const CreateConsumerResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Union([
228
+ Schema.Struct({
140
229
  consumerId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
141
230
  createdOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
142
231
  queueId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
143
232
  script: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
144
- settings: Schema.optional(Schema.Union([Schema.Struct({
233
+ settings: Schema.optional(Schema.Union([
234
+ Schema.Struct({
145
235
  batchSize: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
146
236
  maxConcurrency: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
147
237
  maxRetries: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
148
238
  maxWaitTimeMs: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
149
- retryDelay: Schema.optional(Schema.Union([Schema.Number, Schema.Null]))
150
- }).pipe(Schema.encodeKeys({ batchSize: "batch_size", maxConcurrency: "max_concurrency", maxRetries: "max_retries", maxWaitTimeMs: "max_wait_time_ms", retryDelay: "retry_delay" })), Schema.Null])),
151
- type: Schema.optional(Schema.Union([Schema.Literal("worker"), Schema.Null]))
152
- }).pipe(Schema.encodeKeys({ consumerId: "consumer_id", createdOn: "created_on", queueId: "queue_id", script: "script", settings: "settings", type: "type" })), Schema.Struct({
239
+ retryDelay: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
240
+ }).pipe(Schema.encodeKeys({
241
+ batchSize: "batch_size",
242
+ maxConcurrency: "max_concurrency",
243
+ maxRetries: "max_retries",
244
+ maxWaitTimeMs: "max_wait_time_ms",
245
+ retryDelay: "retry_delay",
246
+ })),
247
+ Schema.Null,
248
+ ])),
249
+ type: Schema.optional(Schema.Union([Schema.Literal("worker"), Schema.Null])),
250
+ }).pipe(Schema.encodeKeys({
251
+ consumerId: "consumer_id",
252
+ createdOn: "created_on",
253
+ queueId: "queue_id",
254
+ script: "script",
255
+ settings: "settings",
256
+ type: "type",
257
+ })),
258
+ Schema.Struct({
153
259
  consumerId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
154
260
  createdOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
155
261
  queueId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
156
- settings: Schema.optional(Schema.Union([Schema.Struct({
262
+ settings: Schema.optional(Schema.Union([
263
+ Schema.Struct({
157
264
  batchSize: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
158
265
  maxRetries: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
159
266
  retryDelay: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
160
- visibilityTimeoutMs: Schema.optional(Schema.Union([Schema.Number, Schema.Null]))
161
- }).pipe(Schema.encodeKeys({ batchSize: "batch_size", maxRetries: "max_retries", retryDelay: "retry_delay", visibilityTimeoutMs: "visibility_timeout_ms" })), Schema.Null])),
162
- type: Schema.optional(Schema.Union([Schema.Literal("http_pull"), Schema.Null]))
163
- }).pipe(Schema.encodeKeys({ consumerId: "consumer_id", createdOn: "created_on", queueId: "queue_id", settings: "settings", type: "type" }))]).pipe(T.ResponsePath("result"));
267
+ visibilityTimeoutMs: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
268
+ }).pipe(Schema.encodeKeys({
269
+ batchSize: "batch_size",
270
+ maxRetries: "max_retries",
271
+ retryDelay: "retry_delay",
272
+ visibilityTimeoutMs: "visibility_timeout_ms",
273
+ })),
274
+ Schema.Null,
275
+ ])),
276
+ type: Schema.optional(Schema.Union([Schema.Literal("http_pull"), Schema.Null])),
277
+ }).pipe(Schema.encodeKeys({
278
+ consumerId: "consumer_id",
279
+ createdOn: "created_on",
280
+ queueId: "queue_id",
281
+ settings: "settings",
282
+ type: "type",
283
+ })),
284
+ ]).pipe(T.ResponsePath("result"));
164
285
  export const createConsumer = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
165
286
  input: CreateConsumerRequest,
166
287
  output: CreateConsumerResponse,
167
- errors: [InvalidRequestBody, QueueNotFound, ConsumerAlreadyExists, WorkerNotFound, InvalidRoute],
288
+ errors: [
289
+ InvalidRequestBody,
290
+ QueueNotFound,
291
+ ConsumerAlreadyExists,
292
+ WorkerNotFound,
293
+ InvalidRoute,
294
+ ],
168
295
  }));
169
296
  export const UpdateConsumerRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
170
297
  queueId: Schema.String.pipe(T.HttpPath("queueId")),
@@ -177,90 +304,181 @@ export const UpdateConsumerRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
177
304
  maxConcurrency: Schema.optional(Schema.Number),
178
305
  maxRetries: Schema.optional(Schema.Number),
179
306
  maxWaitTimeMs: Schema.optional(Schema.Number),
180
- retryDelay: Schema.optional(Schema.Number)
181
- }).pipe(Schema.encodeKeys({ batchSize: "batch_size", maxConcurrency: "max_concurrency", maxRetries: "max_retries", maxWaitTimeMs: "max_wait_time_ms", retryDelay: "retry_delay" }))),
182
- type: Schema.optional(Schema.Literal("worker"))
183
- })
184
- .pipe(Schema.encodeKeys({ deadLetterQueue: "dead_letter_queue", scriptName: "script_name", settings: "settings", type: "type" }), T.Http({ method: "PUT", path: "/accounts/{account_id}/queues/{queueId}/consumers/{consumerId}" }));
185
- export const UpdateConsumerResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Union([Schema.Struct({
307
+ retryDelay: Schema.optional(Schema.Number),
308
+ }).pipe(Schema.encodeKeys({
309
+ batchSize: "batch_size",
310
+ maxConcurrency: "max_concurrency",
311
+ maxRetries: "max_retries",
312
+ maxWaitTimeMs: "max_wait_time_ms",
313
+ retryDelay: "retry_delay",
314
+ }))),
315
+ type: Schema.optional(Schema.Literal("worker")),
316
+ }).pipe(Schema.encodeKeys({
317
+ deadLetterQueue: "dead_letter_queue",
318
+ scriptName: "script_name",
319
+ settings: "settings",
320
+ type: "type",
321
+ }), T.Http({
322
+ method: "PUT",
323
+ path: "/accounts/{account_id}/queues/{queueId}/consumers/{consumerId}",
324
+ }));
325
+ export const UpdateConsumerResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Union([
326
+ Schema.Struct({
186
327
  consumerId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
187
328
  createdOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
188
329
  queueId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
189
330
  script: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
190
- settings: Schema.optional(Schema.Union([Schema.Struct({
331
+ settings: Schema.optional(Schema.Union([
332
+ Schema.Struct({
191
333
  batchSize: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
192
334
  maxConcurrency: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
193
335
  maxRetries: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
194
336
  maxWaitTimeMs: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
195
- retryDelay: Schema.optional(Schema.Union([Schema.Number, Schema.Null]))
196
- }).pipe(Schema.encodeKeys({ batchSize: "batch_size", maxConcurrency: "max_concurrency", maxRetries: "max_retries", maxWaitTimeMs: "max_wait_time_ms", retryDelay: "retry_delay" })), Schema.Null])),
197
- type: Schema.optional(Schema.Union([Schema.Literal("worker"), Schema.Null]))
198
- }).pipe(Schema.encodeKeys({ consumerId: "consumer_id", createdOn: "created_on", queueId: "queue_id", script: "script", settings: "settings", type: "type" })), Schema.Struct({
337
+ retryDelay: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
338
+ }).pipe(Schema.encodeKeys({
339
+ batchSize: "batch_size",
340
+ maxConcurrency: "max_concurrency",
341
+ maxRetries: "max_retries",
342
+ maxWaitTimeMs: "max_wait_time_ms",
343
+ retryDelay: "retry_delay",
344
+ })),
345
+ Schema.Null,
346
+ ])),
347
+ type: Schema.optional(Schema.Union([Schema.Literal("worker"), Schema.Null])),
348
+ }).pipe(Schema.encodeKeys({
349
+ consumerId: "consumer_id",
350
+ createdOn: "created_on",
351
+ queueId: "queue_id",
352
+ script: "script",
353
+ settings: "settings",
354
+ type: "type",
355
+ })),
356
+ Schema.Struct({
199
357
  consumerId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
200
358
  createdOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
201
359
  queueId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
202
- settings: Schema.optional(Schema.Union([Schema.Struct({
360
+ settings: Schema.optional(Schema.Union([
361
+ Schema.Struct({
203
362
  batchSize: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
204
363
  maxRetries: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
205
364
  retryDelay: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
206
- visibilityTimeoutMs: Schema.optional(Schema.Union([Schema.Number, Schema.Null]))
207
- }).pipe(Schema.encodeKeys({ batchSize: "batch_size", maxRetries: "max_retries", retryDelay: "retry_delay", visibilityTimeoutMs: "visibility_timeout_ms" })), Schema.Null])),
208
- type: Schema.optional(Schema.Union([Schema.Literal("http_pull"), Schema.Null]))
209
- }).pipe(Schema.encodeKeys({ consumerId: "consumer_id", createdOn: "created_on", queueId: "queue_id", settings: "settings", type: "type" }))]).pipe(T.ResponsePath("result"));
365
+ visibilityTimeoutMs: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
366
+ }).pipe(Schema.encodeKeys({
367
+ batchSize: "batch_size",
368
+ maxRetries: "max_retries",
369
+ retryDelay: "retry_delay",
370
+ visibilityTimeoutMs: "visibility_timeout_ms",
371
+ })),
372
+ Schema.Null,
373
+ ])),
374
+ type: Schema.optional(Schema.Union([Schema.Literal("http_pull"), Schema.Null])),
375
+ }).pipe(Schema.encodeKeys({
376
+ consumerId: "consumer_id",
377
+ createdOn: "created_on",
378
+ queueId: "queue_id",
379
+ settings: "settings",
380
+ type: "type",
381
+ })),
382
+ ]).pipe(T.ResponsePath("result"));
210
383
  export const updateConsumer = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
211
384
  input: UpdateConsumerRequest,
212
385
  output: UpdateConsumerResponse,
213
- errors: [InvalidRequestBody, QueueNotFound, ConsumerNotFound, WorkerNotFound, InvalidRoute],
386
+ errors: [
387
+ InvalidRequestBody,
388
+ QueueNotFound,
389
+ ConsumerNotFound,
390
+ WorkerNotFound,
391
+ InvalidRoute,
392
+ ],
214
393
  }));
215
394
  export const DeleteConsumerRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
216
395
  queueId: Schema.String.pipe(T.HttpPath("queueId")),
217
396
  consumerId: Schema.String.pipe(T.HttpPath("consumerId")),
218
- accountId: Schema.String.pipe(T.HttpPath("account_id"))
219
- })
220
- .pipe(T.Http({ method: "DELETE", path: "/accounts/{account_id}/queues/{queueId}/consumers/{consumerId}" }));
397
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
398
+ }).pipe(T.Http({
399
+ method: "DELETE",
400
+ path: "/accounts/{account_id}/queues/{queueId}/consumers/{consumerId}",
401
+ }));
221
402
  export const DeleteConsumerResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
222
- errors: Schema.optional(Schema.Union([Schema.Array(Schema.Struct({
403
+ errors: Schema.optional(Schema.Union([
404
+ Schema.Array(Schema.Struct({
223
405
  code: Schema.Number,
224
406
  message: Schema.String,
225
407
  documentationUrl: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
226
- source: Schema.optional(Schema.Union([Schema.Struct({
227
- pointer: Schema.optional(Schema.Union([Schema.String, Schema.Null]))
228
- }), Schema.Null]))
229
- }).pipe(Schema.encodeKeys({ code: "code", message: "message", documentationUrl: "documentation_url", source: "source" }))), Schema.Null])),
408
+ source: Schema.optional(Schema.Union([
409
+ Schema.Struct({
410
+ pointer: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
411
+ }),
412
+ Schema.Null,
413
+ ])),
414
+ }).pipe(Schema.encodeKeys({
415
+ code: "code",
416
+ message: "message",
417
+ documentationUrl: "documentation_url",
418
+ source: "source",
419
+ }))),
420
+ Schema.Null,
421
+ ])),
230
422
  messages: Schema.optional(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
231
- success: Schema.optional(Schema.Union([Schema.Literal(true), Schema.Null]))
423
+ success: Schema.optional(Schema.Union([Schema.Literal(true), Schema.Null])),
232
424
  });
233
425
  export const deleteConsumer = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
234
426
  input: DeleteConsumerRequest,
235
427
  output: DeleteConsumerResponse,
236
428
  errors: [InvalidRequestBody, QueueNotFound, ConsumerNotFound, InvalidRoute],
237
429
  }));
238
- export const BulkPushMessagesRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
430
+ export const BulkPushMessagesRequest =
431
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
239
432
  queueId: Schema.String.pipe(T.HttpPath("queueId")),
240
433
  accountId: Schema.String.pipe(T.HttpPath("account_id")),
241
434
  delaySeconds: Schema.optional(Schema.Number),
242
- messages: Schema.optional(Schema.Array(Schema.Union([Schema.Struct({
435
+ messages: Schema.optional(Schema.Array(Schema.Union([
436
+ Schema.Struct({
243
437
  body: Schema.optional(Schema.String),
244
438
  contentType: Schema.optional(Schema.Literal("text")),
245
- delaySeconds: Schema.optional(Schema.Number)
246
- }).pipe(Schema.encodeKeys({ body: "body", contentType: "content_type", delaySeconds: "delay_seconds" })), Schema.Struct({
439
+ delaySeconds: Schema.optional(Schema.Number),
440
+ }).pipe(Schema.encodeKeys({
441
+ body: "body",
442
+ contentType: "content_type",
443
+ delaySeconds: "delay_seconds",
444
+ })),
445
+ Schema.Struct({
247
446
  body: Schema.optional(Schema.Unknown),
248
447
  contentType: Schema.optional(Schema.Literal("json")),
249
- delaySeconds: Schema.optional(Schema.Number)
250
- }).pipe(Schema.encodeKeys({ body: "body", contentType: "content_type", delaySeconds: "delay_seconds" }))])))
251
- })
252
- .pipe(Schema.encodeKeys({ delaySeconds: "delay_seconds", messages: "messages" }), T.Http({ method: "POST", path: "/accounts/{account_id}/queues/{queueId}/messages/batch" }));
253
- export const BulkPushMessagesResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
254
- errors: Schema.optional(Schema.Union([Schema.Array(Schema.Struct({
448
+ delaySeconds: Schema.optional(Schema.Number),
449
+ }).pipe(Schema.encodeKeys({
450
+ body: "body",
451
+ contentType: "content_type",
452
+ delaySeconds: "delay_seconds",
453
+ })),
454
+ ]))),
455
+ }).pipe(Schema.encodeKeys({ delaySeconds: "delay_seconds", messages: "messages" }), T.Http({
456
+ method: "POST",
457
+ path: "/accounts/{account_id}/queues/{queueId}/messages/batch",
458
+ }));
459
+ export const BulkPushMessagesResponse =
460
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
461
+ errors: Schema.optional(Schema.Union([
462
+ Schema.Array(Schema.Struct({
255
463
  code: Schema.Number,
256
464
  message: Schema.String,
257
465
  documentationUrl: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
258
- source: Schema.optional(Schema.Union([Schema.Struct({
259
- pointer: Schema.optional(Schema.Union([Schema.String, Schema.Null]))
260
- }), Schema.Null]))
261
- }).pipe(Schema.encodeKeys({ code: "code", message: "message", documentationUrl: "documentation_url", source: "source" }))), Schema.Null])),
466
+ source: Schema.optional(Schema.Union([
467
+ Schema.Struct({
468
+ pointer: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
469
+ }),
470
+ Schema.Null,
471
+ ])),
472
+ }).pipe(Schema.encodeKeys({
473
+ code: "code",
474
+ message: "message",
475
+ documentationUrl: "documentation_url",
476
+ source: "source",
477
+ }))),
478
+ Schema.Null,
479
+ ])),
262
480
  messages: Schema.optional(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
263
- success: Schema.optional(Schema.Union([Schema.Literal(true), Schema.Null]))
481
+ success: Schema.optional(Schema.Union([Schema.Literal(true), Schema.Null])),
264
482
  });
265
483
  export const bulkPushMessages = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
266
484
  input: BulkPushMessagesRequest,
@@ -271,20 +489,40 @@ export const PullMessageRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
271
489
  queueId: Schema.String.pipe(T.HttpPath("queueId")),
272
490
  accountId: Schema.String.pipe(T.HttpPath("account_id")),
273
491
  batchSize: Schema.optional(Schema.Number),
274
- visibilityTimeoutMs: Schema.optional(Schema.Number)
275
- })
276
- .pipe(Schema.encodeKeys({ batchSize: "batch_size", visibilityTimeoutMs: "visibility_timeout_ms" }), T.Http({ method: "POST", path: "/accounts/{account_id}/queues/{queueId}/messages/pull" }));
492
+ visibilityTimeoutMs: Schema.optional(Schema.Number),
493
+ }).pipe(Schema.encodeKeys({
494
+ batchSize: "batch_size",
495
+ visibilityTimeoutMs: "visibility_timeout_ms",
496
+ }), T.Http({
497
+ method: "POST",
498
+ path: "/accounts/{account_id}/queues/{queueId}/messages/pull",
499
+ }));
277
500
  export const PullMessageResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
278
501
  messageBacklogCount: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
279
- messages: Schema.optional(Schema.Union([Schema.Array(Schema.Struct({
502
+ messages: Schema.optional(Schema.Union([
503
+ Schema.Array(Schema.Struct({
280
504
  id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
281
505
  attempts: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
282
506
  body: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
283
507
  leaseId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
284
508
  metadata: Schema.optional(Schema.Union([Schema.Unknown, Schema.Null])),
285
- timestampMs: Schema.optional(Schema.Union([Schema.Number, Schema.Null]))
286
- }).pipe(Schema.encodeKeys({ id: "id", attempts: "attempts", body: "body", leaseId: "lease_id", metadata: "metadata", timestampMs: "timestamp_ms" }))), Schema.Null]))
287
- }).pipe(Schema.encodeKeys({ messageBacklogCount: "message_backlog_count", messages: "messages" })).pipe(T.ResponsePath("result"));
509
+ timestampMs: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
510
+ }).pipe(Schema.encodeKeys({
511
+ id: "id",
512
+ attempts: "attempts",
513
+ body: "body",
514
+ leaseId: "lease_id",
515
+ metadata: "metadata",
516
+ timestampMs: "timestamp_ms",
517
+ }))),
518
+ Schema.Null,
519
+ ])),
520
+ })
521
+ .pipe(Schema.encodeKeys({
522
+ messageBacklogCount: "message_backlog_count",
523
+ messages: "messages",
524
+ }))
525
+ .pipe(T.ResponsePath("result"));
288
526
  export const pullMessage = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
289
527
  input: PullMessageRequest,
290
528
  output: PullMessageResponse,
@@ -295,20 +533,37 @@ export const PushMessageRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
295
533
  accountId: Schema.String.pipe(T.HttpPath("account_id")),
296
534
  body: Schema.optional(Schema.String),
297
535
  contentType: Schema.optional(Schema.Literal("text")),
298
- delaySeconds: Schema.optional(Schema.Number)
299
- })
300
- .pipe(Schema.encodeKeys({ body: "body", contentType: "content_type", delaySeconds: "delay_seconds" }), T.Http({ method: "POST", path: "/accounts/{account_id}/queues/{queueId}/messages" }));
536
+ delaySeconds: Schema.optional(Schema.Number),
537
+ }).pipe(Schema.encodeKeys({
538
+ body: "body",
539
+ contentType: "content_type",
540
+ delaySeconds: "delay_seconds",
541
+ }), T.Http({
542
+ method: "POST",
543
+ path: "/accounts/{account_id}/queues/{queueId}/messages",
544
+ }));
301
545
  export const PushMessageResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
302
- errors: Schema.optional(Schema.Union([Schema.Array(Schema.Struct({
546
+ errors: Schema.optional(Schema.Union([
547
+ Schema.Array(Schema.Struct({
303
548
  code: Schema.Number,
304
549
  message: Schema.String,
305
550
  documentationUrl: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
306
- source: Schema.optional(Schema.Union([Schema.Struct({
307
- pointer: Schema.optional(Schema.Union([Schema.String, Schema.Null]))
308
- }), Schema.Null]))
309
- }).pipe(Schema.encodeKeys({ code: "code", message: "message", documentationUrl: "documentation_url", source: "source" }))), Schema.Null])),
551
+ source: Schema.optional(Schema.Union([
552
+ Schema.Struct({
553
+ pointer: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
554
+ }),
555
+ Schema.Null,
556
+ ])),
557
+ }).pipe(Schema.encodeKeys({
558
+ code: "code",
559
+ message: "message",
560
+ documentationUrl: "documentation_url",
561
+ source: "source",
562
+ }))),
563
+ Schema.Null,
564
+ ])),
310
565
  messages: Schema.optional(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
311
- success: Schema.optional(Schema.Union([Schema.Literal(true), Schema.Null]))
566
+ success: Schema.optional(Schema.Union([Schema.Literal(true), Schema.Null])),
312
567
  });
313
568
  export const pushMessage = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
314
569
  input: PushMessageRequest,
@@ -319,18 +574,23 @@ export const AckMessageRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
319
574
  queueId: Schema.String.pipe(T.HttpPath("queueId")),
320
575
  accountId: Schema.String.pipe(T.HttpPath("account_id")),
321
576
  acks: Schema.optional(Schema.Array(Schema.Struct({
322
- leaseId: Schema.optional(Schema.String)
577
+ leaseId: Schema.optional(Schema.String),
323
578
  }).pipe(Schema.encodeKeys({ leaseId: "lease_id" })))),
324
579
  retries: Schema.optional(Schema.Array(Schema.Struct({
325
580
  delaySeconds: Schema.optional(Schema.Number),
326
- leaseId: Schema.optional(Schema.String)
327
- }).pipe(Schema.encodeKeys({ delaySeconds: "delay_seconds", leaseId: "lease_id" }))))
328
- })
329
- .pipe(T.Http({ method: "POST", path: "/accounts/{account_id}/queues/{queueId}/messages/ack" }));
581
+ leaseId: Schema.optional(Schema.String),
582
+ }).pipe(Schema.encodeKeys({
583
+ delaySeconds: "delay_seconds",
584
+ leaseId: "lease_id",
585
+ })))),
586
+ }).pipe(T.Http({
587
+ method: "POST",
588
+ path: "/accounts/{account_id}/queues/{queueId}/messages/ack",
589
+ }));
330
590
  export const AckMessageResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
331
591
  ackCount: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
332
592
  retryCount: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
333
- warnings: Schema.optional(Schema.Union([Schema.Array(Schema.String), Schema.Null]))
593
+ warnings: Schema.optional(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
334
594
  }).pipe(T.ResponsePath("result"));
335
595
  export const ackMessage = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
336
596
  input: AckMessageRequest,
@@ -340,54 +600,119 @@ export const ackMessage = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
340
600
  export const StartPurgeRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
341
601
  queueId: Schema.String.pipe(T.HttpPath("queueId")),
342
602
  accountId: Schema.String.pipe(T.HttpPath("account_id")),
343
- deleteMessagesPermanently: Schema.optional(Schema.Boolean)
344
- })
345
- .pipe(Schema.encodeKeys({ deleteMessagesPermanently: "delete_messages_permanently" }), T.Http({ method: "POST", path: "/accounts/{account_id}/queues/{queueId}/purge" }));
603
+ deleteMessagesPermanently: Schema.optional(Schema.Boolean),
604
+ }).pipe(Schema.encodeKeys({
605
+ deleteMessagesPermanently: "delete_messages_permanently",
606
+ }), T.Http({
607
+ method: "POST",
608
+ path: "/accounts/{account_id}/queues/{queueId}/purge",
609
+ }));
346
610
  export const StartPurgeResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
347
- consumers: Schema.optional(Schema.Union([Schema.Array(Schema.Union([Schema.Struct({
611
+ consumers: Schema.optional(Schema.Union([
612
+ Schema.Array(Schema.Union([
613
+ Schema.Struct({
348
614
  consumerId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
349
615
  createdOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
350
616
  queueId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
351
617
  script: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
352
- settings: Schema.optional(Schema.Union([Schema.Struct({
618
+ settings: Schema.optional(Schema.Union([
619
+ Schema.Struct({
353
620
  batchSize: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
354
621
  maxConcurrency: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
355
622
  maxRetries: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
356
623
  maxWaitTimeMs: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
357
- retryDelay: Schema.optional(Schema.Union([Schema.Number, Schema.Null]))
358
- }).pipe(Schema.encodeKeys({ batchSize: "batch_size", maxConcurrency: "max_concurrency", maxRetries: "max_retries", maxWaitTimeMs: "max_wait_time_ms", retryDelay: "retry_delay" })), Schema.Null])),
359
- type: Schema.optional(Schema.Union([Schema.Literal("worker"), Schema.Null]))
360
- }).pipe(Schema.encodeKeys({ consumerId: "consumer_id", createdOn: "created_on", queueId: "queue_id", script: "script", settings: "settings", type: "type" })), Schema.Struct({
624
+ retryDelay: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
625
+ }).pipe(Schema.encodeKeys({
626
+ batchSize: "batch_size",
627
+ maxConcurrency: "max_concurrency",
628
+ maxRetries: "max_retries",
629
+ maxWaitTimeMs: "max_wait_time_ms",
630
+ retryDelay: "retry_delay",
631
+ })),
632
+ Schema.Null,
633
+ ])),
634
+ type: Schema.optional(Schema.Union([Schema.Literal("worker"), Schema.Null])),
635
+ }).pipe(Schema.encodeKeys({
636
+ consumerId: "consumer_id",
637
+ createdOn: "created_on",
638
+ queueId: "queue_id",
639
+ script: "script",
640
+ settings: "settings",
641
+ type: "type",
642
+ })),
643
+ Schema.Struct({
361
644
  consumerId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
362
645
  createdOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
363
646
  queueId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
364
- settings: Schema.optional(Schema.Union([Schema.Struct({
647
+ settings: Schema.optional(Schema.Union([
648
+ Schema.Struct({
365
649
  batchSize: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
366
650
  maxRetries: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
367
651
  retryDelay: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
368
- visibilityTimeoutMs: Schema.optional(Schema.Union([Schema.Number, Schema.Null]))
369
- }).pipe(Schema.encodeKeys({ batchSize: "batch_size", maxRetries: "max_retries", retryDelay: "retry_delay", visibilityTimeoutMs: "visibility_timeout_ms" })), Schema.Null])),
370
- type: Schema.optional(Schema.Union([Schema.Literal("http_pull"), Schema.Null]))
371
- }).pipe(Schema.encodeKeys({ consumerId: "consumer_id", createdOn: "created_on", queueId: "queue_id", settings: "settings", type: "type" }))])), Schema.Null])),
652
+ visibilityTimeoutMs: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
653
+ }).pipe(Schema.encodeKeys({
654
+ batchSize: "batch_size",
655
+ maxRetries: "max_retries",
656
+ retryDelay: "retry_delay",
657
+ visibilityTimeoutMs: "visibility_timeout_ms",
658
+ })),
659
+ Schema.Null,
660
+ ])),
661
+ type: Schema.optional(Schema.Union([Schema.Literal("http_pull"), Schema.Null])),
662
+ }).pipe(Schema.encodeKeys({
663
+ consumerId: "consumer_id",
664
+ createdOn: "created_on",
665
+ queueId: "queue_id",
666
+ settings: "settings",
667
+ type: "type",
668
+ })),
669
+ ])),
670
+ Schema.Null,
671
+ ])),
372
672
  consumersTotalCount: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
373
673
  createdOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
374
674
  modifiedOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
375
- producers: Schema.optional(Schema.Union([Schema.Array(Schema.Union([Schema.Struct({
675
+ producers: Schema.optional(Schema.Union([
676
+ Schema.Array(Schema.Union([
677
+ Schema.Struct({
376
678
  script: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
377
- type: Schema.optional(Schema.Union([Schema.Literal("worker"), Schema.Null]))
378
- }), Schema.Struct({
679
+ type: Schema.optional(Schema.Union([Schema.Literal("worker"), Schema.Null])),
680
+ }),
681
+ Schema.Struct({
379
682
  bucketName: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
380
- type: Schema.optional(Schema.Union([Schema.Literal("r2_bucket"), Schema.Null]))
381
- }).pipe(Schema.encodeKeys({ bucketName: "bucket_name", type: "type" }))])), Schema.Null])),
683
+ type: Schema.optional(Schema.Union([Schema.Literal("r2_bucket"), Schema.Null])),
684
+ }).pipe(Schema.encodeKeys({ bucketName: "bucket_name", type: "type" })),
685
+ ])),
686
+ Schema.Null,
687
+ ])),
382
688
  producersTotalCount: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
383
689
  queueId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
384
690
  queueName: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
385
- settings: Schema.optional(Schema.Union([Schema.Struct({
691
+ settings: Schema.optional(Schema.Union([
692
+ Schema.Struct({
386
693
  deliveryDelay: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
387
694
  deliveryPaused: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
388
- messageRetentionPeriod: Schema.optional(Schema.Union([Schema.Number, Schema.Null]))
389
- }).pipe(Schema.encodeKeys({ deliveryDelay: "delivery_delay", deliveryPaused: "delivery_paused", messageRetentionPeriod: "message_retention_period" })), Schema.Null]))
390
- }).pipe(Schema.encodeKeys({ consumers: "consumers", consumersTotalCount: "consumers_total_count", createdOn: "created_on", modifiedOn: "modified_on", producers: "producers", producersTotalCount: "producers_total_count", queueId: "queue_id", queueName: "queue_name", settings: "settings" })).pipe(T.ResponsePath("result"));
695
+ messageRetentionPeriod: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
696
+ }).pipe(Schema.encodeKeys({
697
+ deliveryDelay: "delivery_delay",
698
+ deliveryPaused: "delivery_paused",
699
+ messageRetentionPeriod: "message_retention_period",
700
+ })),
701
+ Schema.Null,
702
+ ])),
703
+ })
704
+ .pipe(Schema.encodeKeys({
705
+ consumers: "consumers",
706
+ consumersTotalCount: "consumers_total_count",
707
+ createdOn: "created_on",
708
+ modifiedOn: "modified_on",
709
+ producers: "producers",
710
+ producersTotalCount: "producers_total_count",
711
+ queueId: "queue_id",
712
+ queueName: "queue_name",
713
+ settings: "settings",
714
+ }))
715
+ .pipe(T.ResponsePath("result"));
391
716
  export const startPurge = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
392
717
  input: StartPurgeRequest,
393
718
  output: StartPurgeResponse,
@@ -395,13 +720,17 @@ export const startPurge = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
395
720
  }));
396
721
  export const StatusPurgeRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
397
722
  queueId: Schema.String.pipe(T.HttpPath("queueId")),
398
- accountId: Schema.String.pipe(T.HttpPath("account_id"))
399
- })
400
- .pipe(T.Http({ method: "GET", path: "/accounts/{account_id}/queues/{queueId}/purge" }));
723
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
724
+ }).pipe(T.Http({
725
+ method: "GET",
726
+ path: "/accounts/{account_id}/queues/{queueId}/purge",
727
+ }));
401
728
  export const StatusPurgeResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
402
729
  completed: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
403
- startedAt: Schema.optional(Schema.Union([Schema.String, Schema.Null]))
404
- }).pipe(Schema.encodeKeys({ completed: "completed", startedAt: "started_at" })).pipe(T.ResponsePath("result"));
730
+ startedAt: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
731
+ })
732
+ .pipe(Schema.encodeKeys({ completed: "completed", startedAt: "started_at" }))
733
+ .pipe(T.ResponsePath("result"));
405
734
  export const statusPurge = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
406
735
  input: StatusPurgeRequest,
407
736
  output: StatusPurgeResponse,
@@ -409,109 +738,227 @@ export const statusPurge = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
409
738
  }));
410
739
  export const GetQueueRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
411
740
  queueId: Schema.String.pipe(T.HttpPath("queueId")),
412
- accountId: Schema.String.pipe(T.HttpPath("account_id"))
413
- })
414
- .pipe(T.Http({ method: "GET", path: "/accounts/{account_id}/queues/{queueId}" }));
741
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
742
+ }).pipe(T.Http({ method: "GET", path: "/accounts/{account_id}/queues/{queueId}" }));
415
743
  export const GetQueueResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
416
- consumers: Schema.optional(Schema.Union([Schema.Array(Schema.Union([Schema.Struct({
744
+ consumers: Schema.optional(Schema.Union([
745
+ Schema.Array(Schema.Union([
746
+ Schema.Struct({
417
747
  consumerId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
418
748
  createdOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
419
749
  queueId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
420
750
  script: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
421
- settings: Schema.optional(Schema.Union([Schema.Struct({
751
+ settings: Schema.optional(Schema.Union([
752
+ Schema.Struct({
422
753
  batchSize: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
423
754
  maxConcurrency: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
424
755
  maxRetries: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
425
756
  maxWaitTimeMs: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
426
- retryDelay: Schema.optional(Schema.Union([Schema.Number, Schema.Null]))
427
- }).pipe(Schema.encodeKeys({ batchSize: "batch_size", maxConcurrency: "max_concurrency", maxRetries: "max_retries", maxWaitTimeMs: "max_wait_time_ms", retryDelay: "retry_delay" })), Schema.Null])),
428
- type: Schema.optional(Schema.Union([Schema.Literal("worker"), Schema.Null]))
429
- }).pipe(Schema.encodeKeys({ consumerId: "consumer_id", createdOn: "created_on", queueId: "queue_id", script: "script", settings: "settings", type: "type" })), Schema.Struct({
757
+ retryDelay: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
758
+ }).pipe(Schema.encodeKeys({
759
+ batchSize: "batch_size",
760
+ maxConcurrency: "max_concurrency",
761
+ maxRetries: "max_retries",
762
+ maxWaitTimeMs: "max_wait_time_ms",
763
+ retryDelay: "retry_delay",
764
+ })),
765
+ Schema.Null,
766
+ ])),
767
+ type: Schema.optional(Schema.Union([Schema.Literal("worker"), Schema.Null])),
768
+ }).pipe(Schema.encodeKeys({
769
+ consumerId: "consumer_id",
770
+ createdOn: "created_on",
771
+ queueId: "queue_id",
772
+ script: "script",
773
+ settings: "settings",
774
+ type: "type",
775
+ })),
776
+ Schema.Struct({
430
777
  consumerId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
431
778
  createdOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
432
779
  queueId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
433
- settings: Schema.optional(Schema.Union([Schema.Struct({
780
+ settings: Schema.optional(Schema.Union([
781
+ Schema.Struct({
434
782
  batchSize: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
435
783
  maxRetries: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
436
784
  retryDelay: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
437
- visibilityTimeoutMs: Schema.optional(Schema.Union([Schema.Number, Schema.Null]))
438
- }).pipe(Schema.encodeKeys({ batchSize: "batch_size", maxRetries: "max_retries", retryDelay: "retry_delay", visibilityTimeoutMs: "visibility_timeout_ms" })), Schema.Null])),
439
- type: Schema.optional(Schema.Union([Schema.Literal("http_pull"), Schema.Null]))
440
- }).pipe(Schema.encodeKeys({ consumerId: "consumer_id", createdOn: "created_on", queueId: "queue_id", settings: "settings", type: "type" }))])), Schema.Null])),
785
+ visibilityTimeoutMs: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
786
+ }).pipe(Schema.encodeKeys({
787
+ batchSize: "batch_size",
788
+ maxRetries: "max_retries",
789
+ retryDelay: "retry_delay",
790
+ visibilityTimeoutMs: "visibility_timeout_ms",
791
+ })),
792
+ Schema.Null,
793
+ ])),
794
+ type: Schema.optional(Schema.Union([Schema.Literal("http_pull"), Schema.Null])),
795
+ }).pipe(Schema.encodeKeys({
796
+ consumerId: "consumer_id",
797
+ createdOn: "created_on",
798
+ queueId: "queue_id",
799
+ settings: "settings",
800
+ type: "type",
801
+ })),
802
+ ])),
803
+ Schema.Null,
804
+ ])),
441
805
  consumersTotalCount: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
442
806
  createdOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
443
807
  modifiedOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
444
- producers: Schema.optional(Schema.Union([Schema.Array(Schema.Union([Schema.Struct({
808
+ producers: Schema.optional(Schema.Union([
809
+ Schema.Array(Schema.Union([
810
+ Schema.Struct({
445
811
  script: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
446
- type: Schema.optional(Schema.Union([Schema.Literal("worker"), Schema.Null]))
447
- }), Schema.Struct({
812
+ type: Schema.optional(Schema.Union([Schema.Literal("worker"), Schema.Null])),
813
+ }),
814
+ Schema.Struct({
448
815
  bucketName: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
449
- type: Schema.optional(Schema.Union([Schema.Literal("r2_bucket"), Schema.Null]))
450
- }).pipe(Schema.encodeKeys({ bucketName: "bucket_name", type: "type" }))])), Schema.Null])),
816
+ type: Schema.optional(Schema.Union([Schema.Literal("r2_bucket"), Schema.Null])),
817
+ }).pipe(Schema.encodeKeys({ bucketName: "bucket_name", type: "type" })),
818
+ ])),
819
+ Schema.Null,
820
+ ])),
451
821
  producersTotalCount: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
452
822
  queueId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
453
823
  queueName: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
454
- settings: Schema.optional(Schema.Union([Schema.Struct({
824
+ settings: Schema.optional(Schema.Union([
825
+ Schema.Struct({
455
826
  deliveryDelay: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
456
827
  deliveryPaused: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
457
- messageRetentionPeriod: Schema.optional(Schema.Union([Schema.Number, Schema.Null]))
458
- }).pipe(Schema.encodeKeys({ deliveryDelay: "delivery_delay", deliveryPaused: "delivery_paused", messageRetentionPeriod: "message_retention_period" })), Schema.Null]))
459
- }).pipe(Schema.encodeKeys({ consumers: "consumers", consumersTotalCount: "consumers_total_count", createdOn: "created_on", modifiedOn: "modified_on", producers: "producers", producersTotalCount: "producers_total_count", queueId: "queue_id", queueName: "queue_name", settings: "settings" })).pipe(T.ResponsePath("result"));
828
+ messageRetentionPeriod: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
829
+ }).pipe(Schema.encodeKeys({
830
+ deliveryDelay: "delivery_delay",
831
+ deliveryPaused: "delivery_paused",
832
+ messageRetentionPeriod: "message_retention_period",
833
+ })),
834
+ Schema.Null,
835
+ ])),
836
+ })
837
+ .pipe(Schema.encodeKeys({
838
+ consumers: "consumers",
839
+ consumersTotalCount: "consumers_total_count",
840
+ createdOn: "created_on",
841
+ modifiedOn: "modified_on",
842
+ producers: "producers",
843
+ producersTotalCount: "producers_total_count",
844
+ queueId: "queue_id",
845
+ queueName: "queue_name",
846
+ settings: "settings",
847
+ }))
848
+ .pipe(T.ResponsePath("result"));
460
849
  export const getQueue = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
461
850
  input: GetQueueRequest,
462
851
  output: GetQueueResponse,
463
852
  errors: [QueueNotFound, InvalidRoute],
464
853
  }));
465
854
  export const ListQueuesRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
466
- accountId: Schema.String.pipe(T.HttpPath("account_id"))
467
- })
468
- .pipe(T.Http({ method: "GET", path: "/accounts/{account_id}/queues" }));
855
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
856
+ }).pipe(T.Http({ method: "GET", path: "/accounts/{account_id}/queues" }));
469
857
  export const ListQueuesResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
470
858
  result: Schema.Array(Schema.Struct({
471
- consumers: Schema.optional(Schema.Union([Schema.Array(Schema.Union([Schema.Struct({
859
+ consumers: Schema.optional(Schema.Union([
860
+ Schema.Array(Schema.Union([
861
+ Schema.Struct({
472
862
  consumerId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
473
863
  createdOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
474
864
  queueId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
475
865
  script: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
476
- settings: Schema.optional(Schema.Union([Schema.Struct({
866
+ settings: Schema.optional(Schema.Union([
867
+ Schema.Struct({
477
868
  batchSize: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
478
869
  maxConcurrency: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
479
870
  maxRetries: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
480
871
  maxWaitTimeMs: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
481
- retryDelay: Schema.optional(Schema.Union([Schema.Number, Schema.Null]))
482
- }).pipe(Schema.encodeKeys({ batchSize: "batch_size", maxConcurrency: "max_concurrency", maxRetries: "max_retries", maxWaitTimeMs: "max_wait_time_ms", retryDelay: "retry_delay" })), Schema.Null])),
483
- type: Schema.optional(Schema.Union([Schema.Literal("worker"), Schema.Null]))
484
- }).pipe(Schema.encodeKeys({ consumerId: "consumer_id", createdOn: "created_on", queueId: "queue_id", script: "script", settings: "settings", type: "type" })), Schema.Struct({
872
+ retryDelay: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
873
+ }).pipe(Schema.encodeKeys({
874
+ batchSize: "batch_size",
875
+ maxConcurrency: "max_concurrency",
876
+ maxRetries: "max_retries",
877
+ maxWaitTimeMs: "max_wait_time_ms",
878
+ retryDelay: "retry_delay",
879
+ })),
880
+ Schema.Null,
881
+ ])),
882
+ type: Schema.optional(Schema.Union([Schema.Literal("worker"), Schema.Null])),
883
+ }).pipe(Schema.encodeKeys({
884
+ consumerId: "consumer_id",
885
+ createdOn: "created_on",
886
+ queueId: "queue_id",
887
+ script: "script",
888
+ settings: "settings",
889
+ type: "type",
890
+ })),
891
+ Schema.Struct({
485
892
  consumerId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
486
893
  createdOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
487
894
  queueId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
488
- settings: Schema.optional(Schema.Union([Schema.Struct({
895
+ settings: Schema.optional(Schema.Union([
896
+ Schema.Struct({
489
897
  batchSize: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
490
898
  maxRetries: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
491
899
  retryDelay: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
492
- visibilityTimeoutMs: Schema.optional(Schema.Union([Schema.Number, Schema.Null]))
493
- }).pipe(Schema.encodeKeys({ batchSize: "batch_size", maxRetries: "max_retries", retryDelay: "retry_delay", visibilityTimeoutMs: "visibility_timeout_ms" })), Schema.Null])),
494
- type: Schema.optional(Schema.Union([Schema.Literal("http_pull"), Schema.Null]))
495
- }).pipe(Schema.encodeKeys({ consumerId: "consumer_id", createdOn: "created_on", queueId: "queue_id", settings: "settings", type: "type" }))])), Schema.Null])),
900
+ visibilityTimeoutMs: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
901
+ }).pipe(Schema.encodeKeys({
902
+ batchSize: "batch_size",
903
+ maxRetries: "max_retries",
904
+ retryDelay: "retry_delay",
905
+ visibilityTimeoutMs: "visibility_timeout_ms",
906
+ })),
907
+ Schema.Null,
908
+ ])),
909
+ type: Schema.optional(Schema.Union([Schema.Literal("http_pull"), Schema.Null])),
910
+ }).pipe(Schema.encodeKeys({
911
+ consumerId: "consumer_id",
912
+ createdOn: "created_on",
913
+ queueId: "queue_id",
914
+ settings: "settings",
915
+ type: "type",
916
+ })),
917
+ ])),
918
+ Schema.Null,
919
+ ])),
496
920
  consumersTotalCount: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
497
921
  createdOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
498
922
  modifiedOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
499
- producers: Schema.optional(Schema.Union([Schema.Array(Schema.Union([Schema.Struct({
923
+ producers: Schema.optional(Schema.Union([
924
+ Schema.Array(Schema.Union([
925
+ Schema.Struct({
500
926
  script: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
501
- type: Schema.optional(Schema.Union([Schema.Literal("worker"), Schema.Null]))
502
- }), Schema.Struct({
927
+ type: Schema.optional(Schema.Union([Schema.Literal("worker"), Schema.Null])),
928
+ }),
929
+ Schema.Struct({
503
930
  bucketName: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
504
- type: Schema.optional(Schema.Union([Schema.Literal("r2_bucket"), Schema.Null]))
505
- }).pipe(Schema.encodeKeys({ bucketName: "bucket_name", type: "type" }))])), Schema.Null])),
931
+ type: Schema.optional(Schema.Union([Schema.Literal("r2_bucket"), Schema.Null])),
932
+ }).pipe(Schema.encodeKeys({ bucketName: "bucket_name", type: "type" })),
933
+ ])),
934
+ Schema.Null,
935
+ ])),
506
936
  producersTotalCount: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
507
937
  queueId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
508
938
  queueName: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
509
- settings: Schema.optional(Schema.Union([Schema.Struct({
939
+ settings: Schema.optional(Schema.Union([
940
+ Schema.Struct({
510
941
  deliveryDelay: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
511
942
  deliveryPaused: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
512
- messageRetentionPeriod: Schema.optional(Schema.Union([Schema.Number, Schema.Null]))
513
- }).pipe(Schema.encodeKeys({ deliveryDelay: "delivery_delay", deliveryPaused: "delivery_paused", messageRetentionPeriod: "message_retention_period" })), Schema.Null]))
514
- }).pipe(Schema.encodeKeys({ consumers: "consumers", consumersTotalCount: "consumers_total_count", createdOn: "created_on", modifiedOn: "modified_on", producers: "producers", producersTotalCount: "producers_total_count", queueId: "queue_id", queueName: "queue_name", settings: "settings" })))
943
+ messageRetentionPeriod: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
944
+ }).pipe(Schema.encodeKeys({
945
+ deliveryDelay: "delivery_delay",
946
+ deliveryPaused: "delivery_paused",
947
+ messageRetentionPeriod: "message_retention_period",
948
+ })),
949
+ Schema.Null,
950
+ ])),
951
+ }).pipe(Schema.encodeKeys({
952
+ consumers: "consumers",
953
+ consumersTotalCount: "consumers_total_count",
954
+ createdOn: "created_on",
955
+ modifiedOn: "modified_on",
956
+ producers: "producers",
957
+ producersTotalCount: "producers_total_count",
958
+ queueId: "queue_id",
959
+ queueName: "queue_name",
960
+ settings: "settings",
961
+ }))),
515
962
  });
516
963
  export const listQueues = /*@__PURE__*/ /*#__PURE__*/ API.makePaginated(() => ({
517
964
  input: ListQueuesRequest,
@@ -524,54 +971,114 @@ export const listQueues = /*@__PURE__*/ /*#__PURE__*/ API.makePaginated(() => ({
524
971
  }));
525
972
  export const CreateQueueRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
526
973
  accountId: Schema.String.pipe(T.HttpPath("account_id")),
527
- queueName: Schema.String
528
- })
529
- .pipe(Schema.encodeKeys({ queueName: "queue_name" }), T.Http({ method: "POST", path: "/accounts/{account_id}/queues" }));
974
+ queueName: Schema.String,
975
+ }).pipe(Schema.encodeKeys({ queueName: "queue_name" }), T.Http({ method: "POST", path: "/accounts/{account_id}/queues" }));
530
976
  export const CreateQueueResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
531
- consumers: Schema.optional(Schema.Union([Schema.Array(Schema.Union([Schema.Struct({
977
+ consumers: Schema.optional(Schema.Union([
978
+ Schema.Array(Schema.Union([
979
+ Schema.Struct({
532
980
  consumerId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
533
981
  createdOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
534
982
  queueId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
535
983
  script: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
536
- settings: Schema.optional(Schema.Union([Schema.Struct({
984
+ settings: Schema.optional(Schema.Union([
985
+ Schema.Struct({
537
986
  batchSize: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
538
987
  maxConcurrency: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
539
988
  maxRetries: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
540
989
  maxWaitTimeMs: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
541
- retryDelay: Schema.optional(Schema.Union([Schema.Number, Schema.Null]))
542
- }).pipe(Schema.encodeKeys({ batchSize: "batch_size", maxConcurrency: "max_concurrency", maxRetries: "max_retries", maxWaitTimeMs: "max_wait_time_ms", retryDelay: "retry_delay" })), Schema.Null])),
543
- type: Schema.optional(Schema.Union([Schema.Literal("worker"), Schema.Null]))
544
- }).pipe(Schema.encodeKeys({ consumerId: "consumer_id", createdOn: "created_on", queueId: "queue_id", script: "script", settings: "settings", type: "type" })), Schema.Struct({
990
+ retryDelay: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
991
+ }).pipe(Schema.encodeKeys({
992
+ batchSize: "batch_size",
993
+ maxConcurrency: "max_concurrency",
994
+ maxRetries: "max_retries",
995
+ maxWaitTimeMs: "max_wait_time_ms",
996
+ retryDelay: "retry_delay",
997
+ })),
998
+ Schema.Null,
999
+ ])),
1000
+ type: Schema.optional(Schema.Union([Schema.Literal("worker"), Schema.Null])),
1001
+ }).pipe(Schema.encodeKeys({
1002
+ consumerId: "consumer_id",
1003
+ createdOn: "created_on",
1004
+ queueId: "queue_id",
1005
+ script: "script",
1006
+ settings: "settings",
1007
+ type: "type",
1008
+ })),
1009
+ Schema.Struct({
545
1010
  consumerId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
546
1011
  createdOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
547
1012
  queueId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
548
- settings: Schema.optional(Schema.Union([Schema.Struct({
1013
+ settings: Schema.optional(Schema.Union([
1014
+ Schema.Struct({
549
1015
  batchSize: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
550
1016
  maxRetries: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
551
1017
  retryDelay: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
552
- visibilityTimeoutMs: Schema.optional(Schema.Union([Schema.Number, Schema.Null]))
553
- }).pipe(Schema.encodeKeys({ batchSize: "batch_size", maxRetries: "max_retries", retryDelay: "retry_delay", visibilityTimeoutMs: "visibility_timeout_ms" })), Schema.Null])),
554
- type: Schema.optional(Schema.Union([Schema.Literal("http_pull"), Schema.Null]))
555
- }).pipe(Schema.encodeKeys({ consumerId: "consumer_id", createdOn: "created_on", queueId: "queue_id", settings: "settings", type: "type" }))])), Schema.Null])),
1018
+ visibilityTimeoutMs: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
1019
+ }).pipe(Schema.encodeKeys({
1020
+ batchSize: "batch_size",
1021
+ maxRetries: "max_retries",
1022
+ retryDelay: "retry_delay",
1023
+ visibilityTimeoutMs: "visibility_timeout_ms",
1024
+ })),
1025
+ Schema.Null,
1026
+ ])),
1027
+ type: Schema.optional(Schema.Union([Schema.Literal("http_pull"), Schema.Null])),
1028
+ }).pipe(Schema.encodeKeys({
1029
+ consumerId: "consumer_id",
1030
+ createdOn: "created_on",
1031
+ queueId: "queue_id",
1032
+ settings: "settings",
1033
+ type: "type",
1034
+ })),
1035
+ ])),
1036
+ Schema.Null,
1037
+ ])),
556
1038
  consumersTotalCount: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
557
1039
  createdOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
558
1040
  modifiedOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
559
- producers: Schema.optional(Schema.Union([Schema.Array(Schema.Union([Schema.Struct({
1041
+ producers: Schema.optional(Schema.Union([
1042
+ Schema.Array(Schema.Union([
1043
+ Schema.Struct({
560
1044
  script: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
561
- type: Schema.optional(Schema.Union([Schema.Literal("worker"), Schema.Null]))
562
- }), Schema.Struct({
1045
+ type: Schema.optional(Schema.Union([Schema.Literal("worker"), Schema.Null])),
1046
+ }),
1047
+ Schema.Struct({
563
1048
  bucketName: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
564
- type: Schema.optional(Schema.Union([Schema.Literal("r2_bucket"), Schema.Null]))
565
- }).pipe(Schema.encodeKeys({ bucketName: "bucket_name", type: "type" }))])), Schema.Null])),
1049
+ type: Schema.optional(Schema.Union([Schema.Literal("r2_bucket"), Schema.Null])),
1050
+ }).pipe(Schema.encodeKeys({ bucketName: "bucket_name", type: "type" })),
1051
+ ])),
1052
+ Schema.Null,
1053
+ ])),
566
1054
  producersTotalCount: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
567
1055
  queueId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
568
1056
  queueName: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
569
- settings: Schema.optional(Schema.Union([Schema.Struct({
1057
+ settings: Schema.optional(Schema.Union([
1058
+ Schema.Struct({
570
1059
  deliveryDelay: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
571
1060
  deliveryPaused: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
572
- messageRetentionPeriod: Schema.optional(Schema.Union([Schema.Number, Schema.Null]))
573
- }).pipe(Schema.encodeKeys({ deliveryDelay: "delivery_delay", deliveryPaused: "delivery_paused", messageRetentionPeriod: "message_retention_period" })), Schema.Null]))
574
- }).pipe(Schema.encodeKeys({ consumers: "consumers", consumersTotalCount: "consumers_total_count", createdOn: "created_on", modifiedOn: "modified_on", producers: "producers", producersTotalCount: "producers_total_count", queueId: "queue_id", queueName: "queue_name", settings: "settings" })).pipe(T.ResponsePath("result"));
1061
+ messageRetentionPeriod: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
1062
+ }).pipe(Schema.encodeKeys({
1063
+ deliveryDelay: "delivery_delay",
1064
+ deliveryPaused: "delivery_paused",
1065
+ messageRetentionPeriod: "message_retention_period",
1066
+ })),
1067
+ Schema.Null,
1068
+ ])),
1069
+ })
1070
+ .pipe(Schema.encodeKeys({
1071
+ consumers: "consumers",
1072
+ consumersTotalCount: "consumers_total_count",
1073
+ createdOn: "created_on",
1074
+ modifiedOn: "modified_on",
1075
+ producers: "producers",
1076
+ producersTotalCount: "producers_total_count",
1077
+ queueId: "queue_id",
1078
+ queueName: "queue_name",
1079
+ settings: "settings",
1080
+ }))
1081
+ .pipe(T.ResponsePath("result"));
575
1082
  export const createQueue = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
576
1083
  input: CreateQueueRequest,
577
1084
  output: CreateQueueResponse,
@@ -584,55 +1091,119 @@ export const UpdateQueueRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
584
1091
  settings: Schema.optional(Schema.Struct({
585
1092
  deliveryDelay: Schema.optional(Schema.Number),
586
1093
  deliveryPaused: Schema.optional(Schema.Boolean),
587
- messageRetentionPeriod: Schema.optional(Schema.Number)
588
- }).pipe(Schema.encodeKeys({ deliveryDelay: "delivery_delay", deliveryPaused: "delivery_paused", messageRetentionPeriod: "message_retention_period" })))
589
- })
590
- .pipe(Schema.encodeKeys({ queueName: "queue_name", settings: "settings" }), T.Http({ method: "PUT", path: "/accounts/{account_id}/queues/{queueId}" }));
1094
+ messageRetentionPeriod: Schema.optional(Schema.Number),
1095
+ }).pipe(Schema.encodeKeys({
1096
+ deliveryDelay: "delivery_delay",
1097
+ deliveryPaused: "delivery_paused",
1098
+ messageRetentionPeriod: "message_retention_period",
1099
+ }))),
1100
+ }).pipe(Schema.encodeKeys({ queueName: "queue_name", settings: "settings" }), T.Http({ method: "PUT", path: "/accounts/{account_id}/queues/{queueId}" }));
591
1101
  export const UpdateQueueResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
592
- consumers: Schema.optional(Schema.Union([Schema.Array(Schema.Union([Schema.Struct({
1102
+ consumers: Schema.optional(Schema.Union([
1103
+ Schema.Array(Schema.Union([
1104
+ Schema.Struct({
593
1105
  consumerId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
594
1106
  createdOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
595
1107
  queueId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
596
1108
  script: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
597
- settings: Schema.optional(Schema.Union([Schema.Struct({
1109
+ settings: Schema.optional(Schema.Union([
1110
+ Schema.Struct({
598
1111
  batchSize: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
599
1112
  maxConcurrency: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
600
1113
  maxRetries: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
601
1114
  maxWaitTimeMs: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
602
- retryDelay: Schema.optional(Schema.Union([Schema.Number, Schema.Null]))
603
- }).pipe(Schema.encodeKeys({ batchSize: "batch_size", maxConcurrency: "max_concurrency", maxRetries: "max_retries", maxWaitTimeMs: "max_wait_time_ms", retryDelay: "retry_delay" })), Schema.Null])),
604
- type: Schema.optional(Schema.Union([Schema.Literal("worker"), Schema.Null]))
605
- }).pipe(Schema.encodeKeys({ consumerId: "consumer_id", createdOn: "created_on", queueId: "queue_id", script: "script", settings: "settings", type: "type" })), Schema.Struct({
1115
+ retryDelay: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
1116
+ }).pipe(Schema.encodeKeys({
1117
+ batchSize: "batch_size",
1118
+ maxConcurrency: "max_concurrency",
1119
+ maxRetries: "max_retries",
1120
+ maxWaitTimeMs: "max_wait_time_ms",
1121
+ retryDelay: "retry_delay",
1122
+ })),
1123
+ Schema.Null,
1124
+ ])),
1125
+ type: Schema.optional(Schema.Union([Schema.Literal("worker"), Schema.Null])),
1126
+ }).pipe(Schema.encodeKeys({
1127
+ consumerId: "consumer_id",
1128
+ createdOn: "created_on",
1129
+ queueId: "queue_id",
1130
+ script: "script",
1131
+ settings: "settings",
1132
+ type: "type",
1133
+ })),
1134
+ Schema.Struct({
606
1135
  consumerId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
607
1136
  createdOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
608
1137
  queueId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
609
- settings: Schema.optional(Schema.Union([Schema.Struct({
1138
+ settings: Schema.optional(Schema.Union([
1139
+ Schema.Struct({
610
1140
  batchSize: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
611
1141
  maxRetries: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
612
1142
  retryDelay: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
613
- visibilityTimeoutMs: Schema.optional(Schema.Union([Schema.Number, Schema.Null]))
614
- }).pipe(Schema.encodeKeys({ batchSize: "batch_size", maxRetries: "max_retries", retryDelay: "retry_delay", visibilityTimeoutMs: "visibility_timeout_ms" })), Schema.Null])),
615
- type: Schema.optional(Schema.Union([Schema.Literal("http_pull"), Schema.Null]))
616
- }).pipe(Schema.encodeKeys({ consumerId: "consumer_id", createdOn: "created_on", queueId: "queue_id", settings: "settings", type: "type" }))])), Schema.Null])),
1143
+ visibilityTimeoutMs: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
1144
+ }).pipe(Schema.encodeKeys({
1145
+ batchSize: "batch_size",
1146
+ maxRetries: "max_retries",
1147
+ retryDelay: "retry_delay",
1148
+ visibilityTimeoutMs: "visibility_timeout_ms",
1149
+ })),
1150
+ Schema.Null,
1151
+ ])),
1152
+ type: Schema.optional(Schema.Union([Schema.Literal("http_pull"), Schema.Null])),
1153
+ }).pipe(Schema.encodeKeys({
1154
+ consumerId: "consumer_id",
1155
+ createdOn: "created_on",
1156
+ queueId: "queue_id",
1157
+ settings: "settings",
1158
+ type: "type",
1159
+ })),
1160
+ ])),
1161
+ Schema.Null,
1162
+ ])),
617
1163
  consumersTotalCount: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
618
1164
  createdOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
619
1165
  modifiedOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
620
- producers: Schema.optional(Schema.Union([Schema.Array(Schema.Union([Schema.Struct({
1166
+ producers: Schema.optional(Schema.Union([
1167
+ Schema.Array(Schema.Union([
1168
+ Schema.Struct({
621
1169
  script: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
622
- type: Schema.optional(Schema.Union([Schema.Literal("worker"), Schema.Null]))
623
- }), Schema.Struct({
1170
+ type: Schema.optional(Schema.Union([Schema.Literal("worker"), Schema.Null])),
1171
+ }),
1172
+ Schema.Struct({
624
1173
  bucketName: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
625
- type: Schema.optional(Schema.Union([Schema.Literal("r2_bucket"), Schema.Null]))
626
- }).pipe(Schema.encodeKeys({ bucketName: "bucket_name", type: "type" }))])), Schema.Null])),
1174
+ type: Schema.optional(Schema.Union([Schema.Literal("r2_bucket"), Schema.Null])),
1175
+ }).pipe(Schema.encodeKeys({ bucketName: "bucket_name", type: "type" })),
1176
+ ])),
1177
+ Schema.Null,
1178
+ ])),
627
1179
  producersTotalCount: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
628
1180
  queueId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
629
1181
  queueName: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
630
- settings: Schema.optional(Schema.Union([Schema.Struct({
1182
+ settings: Schema.optional(Schema.Union([
1183
+ Schema.Struct({
631
1184
  deliveryDelay: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
632
1185
  deliveryPaused: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
633
- messageRetentionPeriod: Schema.optional(Schema.Union([Schema.Number, Schema.Null]))
634
- }).pipe(Schema.encodeKeys({ deliveryDelay: "delivery_delay", deliveryPaused: "delivery_paused", messageRetentionPeriod: "message_retention_period" })), Schema.Null]))
635
- }).pipe(Schema.encodeKeys({ consumers: "consumers", consumersTotalCount: "consumers_total_count", createdOn: "created_on", modifiedOn: "modified_on", producers: "producers", producersTotalCount: "producers_total_count", queueId: "queue_id", queueName: "queue_name", settings: "settings" })).pipe(T.ResponsePath("result"));
1186
+ messageRetentionPeriod: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
1187
+ }).pipe(Schema.encodeKeys({
1188
+ deliveryDelay: "delivery_delay",
1189
+ deliveryPaused: "delivery_paused",
1190
+ messageRetentionPeriod: "message_retention_period",
1191
+ })),
1192
+ Schema.Null,
1193
+ ])),
1194
+ })
1195
+ .pipe(Schema.encodeKeys({
1196
+ consumers: "consumers",
1197
+ consumersTotalCount: "consumers_total_count",
1198
+ createdOn: "created_on",
1199
+ modifiedOn: "modified_on",
1200
+ producers: "producers",
1201
+ producersTotalCount: "producers_total_count",
1202
+ queueId: "queue_id",
1203
+ queueName: "queue_name",
1204
+ settings: "settings",
1205
+ }))
1206
+ .pipe(T.ResponsePath("result"));
636
1207
  export const updateQueue = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
637
1208
  input: UpdateQueueRequest,
638
1209
  output: UpdateQueueResponse,
@@ -645,55 +1216,119 @@ export const PatchQueueRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
645
1216
  settings: Schema.optional(Schema.Struct({
646
1217
  deliveryDelay: Schema.optional(Schema.Number),
647
1218
  deliveryPaused: Schema.optional(Schema.Boolean),
648
- messageRetentionPeriod: Schema.optional(Schema.Number)
649
- }).pipe(Schema.encodeKeys({ deliveryDelay: "delivery_delay", deliveryPaused: "delivery_paused", messageRetentionPeriod: "message_retention_period" })))
650
- })
651
- .pipe(Schema.encodeKeys({ queueName: "queue_name", settings: "settings" }), T.Http({ method: "PATCH", path: "/accounts/{account_id}/queues/{queueId}" }));
1219
+ messageRetentionPeriod: Schema.optional(Schema.Number),
1220
+ }).pipe(Schema.encodeKeys({
1221
+ deliveryDelay: "delivery_delay",
1222
+ deliveryPaused: "delivery_paused",
1223
+ messageRetentionPeriod: "message_retention_period",
1224
+ }))),
1225
+ }).pipe(Schema.encodeKeys({ queueName: "queue_name", settings: "settings" }), T.Http({ method: "PATCH", path: "/accounts/{account_id}/queues/{queueId}" }));
652
1226
  export const PatchQueueResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
653
- consumers: Schema.optional(Schema.Union([Schema.Array(Schema.Union([Schema.Struct({
1227
+ consumers: Schema.optional(Schema.Union([
1228
+ Schema.Array(Schema.Union([
1229
+ Schema.Struct({
654
1230
  consumerId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
655
1231
  createdOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
656
1232
  queueId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
657
1233
  script: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
658
- settings: Schema.optional(Schema.Union([Schema.Struct({
1234
+ settings: Schema.optional(Schema.Union([
1235
+ Schema.Struct({
659
1236
  batchSize: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
660
1237
  maxConcurrency: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
661
1238
  maxRetries: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
662
1239
  maxWaitTimeMs: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
663
- retryDelay: Schema.optional(Schema.Union([Schema.Number, Schema.Null]))
664
- }).pipe(Schema.encodeKeys({ batchSize: "batch_size", maxConcurrency: "max_concurrency", maxRetries: "max_retries", maxWaitTimeMs: "max_wait_time_ms", retryDelay: "retry_delay" })), Schema.Null])),
665
- type: Schema.optional(Schema.Union([Schema.Literal("worker"), Schema.Null]))
666
- }).pipe(Schema.encodeKeys({ consumerId: "consumer_id", createdOn: "created_on", queueId: "queue_id", script: "script", settings: "settings", type: "type" })), Schema.Struct({
1240
+ retryDelay: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
1241
+ }).pipe(Schema.encodeKeys({
1242
+ batchSize: "batch_size",
1243
+ maxConcurrency: "max_concurrency",
1244
+ maxRetries: "max_retries",
1245
+ maxWaitTimeMs: "max_wait_time_ms",
1246
+ retryDelay: "retry_delay",
1247
+ })),
1248
+ Schema.Null,
1249
+ ])),
1250
+ type: Schema.optional(Schema.Union([Schema.Literal("worker"), Schema.Null])),
1251
+ }).pipe(Schema.encodeKeys({
1252
+ consumerId: "consumer_id",
1253
+ createdOn: "created_on",
1254
+ queueId: "queue_id",
1255
+ script: "script",
1256
+ settings: "settings",
1257
+ type: "type",
1258
+ })),
1259
+ Schema.Struct({
667
1260
  consumerId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
668
1261
  createdOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
669
1262
  queueId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
670
- settings: Schema.optional(Schema.Union([Schema.Struct({
1263
+ settings: Schema.optional(Schema.Union([
1264
+ Schema.Struct({
671
1265
  batchSize: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
672
1266
  maxRetries: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
673
1267
  retryDelay: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
674
- visibilityTimeoutMs: Schema.optional(Schema.Union([Schema.Number, Schema.Null]))
675
- }).pipe(Schema.encodeKeys({ batchSize: "batch_size", maxRetries: "max_retries", retryDelay: "retry_delay", visibilityTimeoutMs: "visibility_timeout_ms" })), Schema.Null])),
676
- type: Schema.optional(Schema.Union([Schema.Literal("http_pull"), Schema.Null]))
677
- }).pipe(Schema.encodeKeys({ consumerId: "consumer_id", createdOn: "created_on", queueId: "queue_id", settings: "settings", type: "type" }))])), Schema.Null])),
1268
+ visibilityTimeoutMs: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
1269
+ }).pipe(Schema.encodeKeys({
1270
+ batchSize: "batch_size",
1271
+ maxRetries: "max_retries",
1272
+ retryDelay: "retry_delay",
1273
+ visibilityTimeoutMs: "visibility_timeout_ms",
1274
+ })),
1275
+ Schema.Null,
1276
+ ])),
1277
+ type: Schema.optional(Schema.Union([Schema.Literal("http_pull"), Schema.Null])),
1278
+ }).pipe(Schema.encodeKeys({
1279
+ consumerId: "consumer_id",
1280
+ createdOn: "created_on",
1281
+ queueId: "queue_id",
1282
+ settings: "settings",
1283
+ type: "type",
1284
+ })),
1285
+ ])),
1286
+ Schema.Null,
1287
+ ])),
678
1288
  consumersTotalCount: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
679
1289
  createdOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
680
1290
  modifiedOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
681
- producers: Schema.optional(Schema.Union([Schema.Array(Schema.Union([Schema.Struct({
1291
+ producers: Schema.optional(Schema.Union([
1292
+ Schema.Array(Schema.Union([
1293
+ Schema.Struct({
682
1294
  script: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
683
- type: Schema.optional(Schema.Union([Schema.Literal("worker"), Schema.Null]))
684
- }), Schema.Struct({
1295
+ type: Schema.optional(Schema.Union([Schema.Literal("worker"), Schema.Null])),
1296
+ }),
1297
+ Schema.Struct({
685
1298
  bucketName: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
686
- type: Schema.optional(Schema.Union([Schema.Literal("r2_bucket"), Schema.Null]))
687
- }).pipe(Schema.encodeKeys({ bucketName: "bucket_name", type: "type" }))])), Schema.Null])),
1299
+ type: Schema.optional(Schema.Union([Schema.Literal("r2_bucket"), Schema.Null])),
1300
+ }).pipe(Schema.encodeKeys({ bucketName: "bucket_name", type: "type" })),
1301
+ ])),
1302
+ Schema.Null,
1303
+ ])),
688
1304
  producersTotalCount: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
689
1305
  queueId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
690
1306
  queueName: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
691
- settings: Schema.optional(Schema.Union([Schema.Struct({
1307
+ settings: Schema.optional(Schema.Union([
1308
+ Schema.Struct({
692
1309
  deliveryDelay: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
693
1310
  deliveryPaused: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
694
- messageRetentionPeriod: Schema.optional(Schema.Union([Schema.Number, Schema.Null]))
695
- }).pipe(Schema.encodeKeys({ deliveryDelay: "delivery_delay", deliveryPaused: "delivery_paused", messageRetentionPeriod: "message_retention_period" })), Schema.Null]))
696
- }).pipe(Schema.encodeKeys({ consumers: "consumers", consumersTotalCount: "consumers_total_count", createdOn: "created_on", modifiedOn: "modified_on", producers: "producers", producersTotalCount: "producers_total_count", queueId: "queue_id", queueName: "queue_name", settings: "settings" })).pipe(T.ResponsePath("result"));
1311
+ messageRetentionPeriod: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
1312
+ }).pipe(Schema.encodeKeys({
1313
+ deliveryDelay: "delivery_delay",
1314
+ deliveryPaused: "delivery_paused",
1315
+ messageRetentionPeriod: "message_retention_period",
1316
+ })),
1317
+ Schema.Null,
1318
+ ])),
1319
+ })
1320
+ .pipe(Schema.encodeKeys({
1321
+ consumers: "consumers",
1322
+ consumersTotalCount: "consumers_total_count",
1323
+ createdOn: "created_on",
1324
+ modifiedOn: "modified_on",
1325
+ producers: "producers",
1326
+ producersTotalCount: "producers_total_count",
1327
+ queueId: "queue_id",
1328
+ queueName: "queue_name",
1329
+ settings: "settings",
1330
+ }))
1331
+ .pipe(T.ResponsePath("result"));
697
1332
  export const patchQueue = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
698
1333
  input: PatchQueueRequest,
699
1334
  output: PatchQueueResponse,
@@ -701,20 +1336,30 @@ export const patchQueue = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
701
1336
  }));
702
1337
  export const DeleteQueueRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
703
1338
  queueId: Schema.String.pipe(T.HttpPath("queueId")),
704
- accountId: Schema.String.pipe(T.HttpPath("account_id"))
705
- })
706
- .pipe(T.Http({ method: "DELETE", path: "/accounts/{account_id}/queues/{queueId}" }));
1339
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
1340
+ }).pipe(T.Http({ method: "DELETE", path: "/accounts/{account_id}/queues/{queueId}" }));
707
1341
  export const DeleteQueueResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
708
- errors: Schema.optional(Schema.Union([Schema.Array(Schema.Struct({
1342
+ errors: Schema.optional(Schema.Union([
1343
+ Schema.Array(Schema.Struct({
709
1344
  code: Schema.Number,
710
1345
  message: Schema.String,
711
1346
  documentationUrl: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
712
- source: Schema.optional(Schema.Union([Schema.Struct({
713
- pointer: Schema.optional(Schema.Union([Schema.String, Schema.Null]))
714
- }), Schema.Null]))
715
- }).pipe(Schema.encodeKeys({ code: "code", message: "message", documentationUrl: "documentation_url", source: "source" }))), Schema.Null])),
1347
+ source: Schema.optional(Schema.Union([
1348
+ Schema.Struct({
1349
+ pointer: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1350
+ }),
1351
+ Schema.Null,
1352
+ ])),
1353
+ }).pipe(Schema.encodeKeys({
1354
+ code: "code",
1355
+ message: "message",
1356
+ documentationUrl: "documentation_url",
1357
+ source: "source",
1358
+ }))),
1359
+ Schema.Null,
1360
+ ])),
716
1361
  messages: Schema.optional(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
717
- success: Schema.optional(Schema.Union([Schema.Literal(true), Schema.Null]))
1362
+ success: Schema.optional(Schema.Union([Schema.Literal(true), Schema.Null])),
718
1363
  });
719
1364
  export const deleteQueue = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
720
1365
  input: DeleteQueueRequest,
@@ -723,91 +1368,144 @@ export const deleteQueue = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
723
1368
  }));
724
1369
  export const GetSubscriptionRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
725
1370
  subscriptionId: Schema.String.pipe(T.HttpPath("subscriptionId")),
726
- accountId: Schema.String.pipe(T.HttpPath("account_id"))
727
- })
728
- .pipe(T.Http({ method: "GET", path: "/accounts/{account_id}/event_subscriptions/subscriptions/{subscriptionId}" }));
729
- export const GetSubscriptionResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1371
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
1372
+ }).pipe(T.Http({
1373
+ method: "GET",
1374
+ path: "/accounts/{account_id}/event_subscriptions/subscriptions/{subscriptionId}",
1375
+ }));
1376
+ export const GetSubscriptionResponse =
1377
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
730
1378
  id: Schema.String,
731
1379
  createdAt: Schema.String,
732
1380
  destination: Schema.Struct({
733
1381
  queueId: Schema.String,
734
- type: Schema.Literal("queues.queue")
1382
+ type: Schema.Literal("queues.queue"),
735
1383
  }).pipe(Schema.encodeKeys({ queueId: "queue_id", type: "type" })),
736
1384
  enabled: Schema.Boolean,
737
1385
  events: Schema.Array(Schema.String),
738
1386
  modifiedAt: Schema.String,
739
1387
  name: Schema.String,
740
- source: Schema.Union([Schema.Struct({
741
- type: Schema.optional(Schema.Union([Schema.Literal("images"), Schema.Null]))
742
- }), Schema.Struct({
743
- type: Schema.optional(Schema.Union([Schema.Literal("kv"), Schema.Null]))
744
- }), Schema.Struct({
745
- type: Schema.optional(Schema.Union([Schema.Literal("r2"), Schema.Null]))
746
- }), Schema.Struct({
747
- type: Schema.optional(Schema.Union([Schema.Literal("superSlurper"), Schema.Null]))
748
- }), Schema.Struct({
749
- type: Schema.optional(Schema.Union([Schema.Literal("vectorize"), Schema.Null]))
750
- }), Schema.Struct({
1388
+ source: Schema.Union([
1389
+ Schema.Struct({
1390
+ type: Schema.optional(Schema.Union([Schema.Literal("images"), Schema.Null])),
1391
+ }),
1392
+ Schema.Struct({
1393
+ type: Schema.optional(Schema.Union([Schema.Literal("kv"), Schema.Null])),
1394
+ }),
1395
+ Schema.Struct({
1396
+ type: Schema.optional(Schema.Union([Schema.Literal("r2"), Schema.Null])),
1397
+ }),
1398
+ Schema.Struct({
1399
+ type: Schema.optional(Schema.Union([Schema.Literal("superSlurper"), Schema.Null])),
1400
+ }),
1401
+ Schema.Struct({
1402
+ type: Schema.optional(Schema.Union([Schema.Literal("vectorize"), Schema.Null])),
1403
+ }),
1404
+ Schema.Struct({
751
1405
  modelName: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
752
- type: Schema.optional(Schema.Union([Schema.Literal("workersAi.model"), Schema.Null]))
753
- }).pipe(Schema.encodeKeys({ modelName: "model_name", type: "type" })), Schema.Struct({
1406
+ type: Schema.optional(Schema.Union([Schema.Literal("workersAi.model"), Schema.Null])),
1407
+ }).pipe(Schema.encodeKeys({ modelName: "model_name", type: "type" })),
1408
+ Schema.Struct({
754
1409
  type: Schema.optional(Schema.Union([Schema.Literal("workersBuilds.worker"), Schema.Null])),
755
- workerName: Schema.optional(Schema.Union([Schema.String, Schema.Null]))
756
- }).pipe(Schema.encodeKeys({ type: "type", workerName: "worker_name" })), Schema.Struct({
1410
+ workerName: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1411
+ }).pipe(Schema.encodeKeys({ type: "type", workerName: "worker_name" })),
1412
+ Schema.Struct({
757
1413
  type: Schema.optional(Schema.Union([Schema.Literal("workflows.workflow"), Schema.Null])),
758
- workflowName: Schema.optional(Schema.Union([Schema.String, Schema.Null]))
759
- }).pipe(Schema.encodeKeys({ type: "type", workflowName: "workflow_name" }))])
760
- }).pipe(Schema.encodeKeys({ id: "id", createdAt: "created_at", destination: "destination", enabled: "enabled", events: "events", modifiedAt: "modified_at", name: "name", source: "source" })).pipe(T.ResponsePath("result"));
1414
+ workflowName: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1415
+ }).pipe(Schema.encodeKeys({ type: "type", workflowName: "workflow_name" })),
1416
+ ]),
1417
+ })
1418
+ .pipe(Schema.encodeKeys({
1419
+ id: "id",
1420
+ createdAt: "created_at",
1421
+ destination: "destination",
1422
+ enabled: "enabled",
1423
+ events: "events",
1424
+ modifiedAt: "modified_at",
1425
+ name: "name",
1426
+ source: "source",
1427
+ }))
1428
+ .pipe(T.ResponsePath("result"));
761
1429
  export const getSubscription = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
762
1430
  input: GetSubscriptionRequest,
763
1431
  output: GetSubscriptionResponse,
764
1432
  errors: [UnrecognizedEventType],
765
1433
  }));
766
- export const ListSubscriptionsRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1434
+ export const ListSubscriptionsRequest =
1435
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
767
1436
  accountId: Schema.String.pipe(T.HttpPath("account_id")),
768
1437
  direction: Schema.optional(Schema.Literals(["asc", "desc"])).pipe(T.HttpQuery("direction")),
769
- order: Schema.optional(Schema.Literals(["created_at", "name", "enabled", "source"])).pipe(T.HttpQuery("order"))
770
- })
771
- .pipe(T.Http({ method: "GET", path: "/accounts/{account_id}/event_subscriptions/subscriptions" }));
772
- export const ListSubscriptionsResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1438
+ order: Schema.optional(Schema.Literals(["created_at", "name", "enabled", "source"])).pipe(T.HttpQuery("order")),
1439
+ }).pipe(T.Http({
1440
+ method: "GET",
1441
+ path: "/accounts/{account_id}/event_subscriptions/subscriptions",
1442
+ }));
1443
+ export const ListSubscriptionsResponse =
1444
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
773
1445
  result: Schema.Array(Schema.Struct({
774
1446
  id: Schema.String,
775
1447
  createdAt: Schema.String,
776
1448
  destination: Schema.Struct({
777
1449
  queueId: Schema.String,
778
- type: Schema.Literal("queues.queue")
1450
+ type: Schema.Literal("queues.queue"),
779
1451
  }).pipe(Schema.encodeKeys({ queueId: "queue_id", type: "type" })),
780
1452
  enabled: Schema.Boolean,
781
1453
  events: Schema.Array(Schema.String),
782
1454
  modifiedAt: Schema.String,
783
1455
  name: Schema.String,
784
- source: Schema.Union([Schema.Struct({
785
- type: Schema.optional(Schema.Union([Schema.Literal("images"), Schema.Null]))
786
- }), Schema.Struct({
787
- type: Schema.optional(Schema.Union([Schema.Literal("kv"), Schema.Null]))
788
- }), Schema.Struct({
789
- type: Schema.optional(Schema.Union([Schema.Literal("r2"), Schema.Null]))
790
- }), Schema.Struct({
791
- type: Schema.optional(Schema.Union([Schema.Literal("superSlurper"), Schema.Null]))
792
- }), Schema.Struct({
793
- type: Schema.optional(Schema.Union([Schema.Literal("vectorize"), Schema.Null]))
794
- }), Schema.Struct({
1456
+ source: Schema.Union([
1457
+ Schema.Struct({
1458
+ type: Schema.optional(Schema.Union([Schema.Literal("images"), Schema.Null])),
1459
+ }),
1460
+ Schema.Struct({
1461
+ type: Schema.optional(Schema.Union([Schema.Literal("kv"), Schema.Null])),
1462
+ }),
1463
+ Schema.Struct({
1464
+ type: Schema.optional(Schema.Union([Schema.Literal("r2"), Schema.Null])),
1465
+ }),
1466
+ Schema.Struct({
1467
+ type: Schema.optional(Schema.Union([Schema.Literal("superSlurper"), Schema.Null])),
1468
+ }),
1469
+ Schema.Struct({
1470
+ type: Schema.optional(Schema.Union([Schema.Literal("vectorize"), Schema.Null])),
1471
+ }),
1472
+ Schema.Struct({
795
1473
  modelName: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
796
- type: Schema.optional(Schema.Union([Schema.Literal("workersAi.model"), Schema.Null]))
797
- }).pipe(Schema.encodeKeys({ modelName: "model_name", type: "type" })), Schema.Struct({
798
- type: Schema.optional(Schema.Union([Schema.Literal("workersBuilds.worker"), Schema.Null])),
799
- workerName: Schema.optional(Schema.Union([Schema.String, Schema.Null]))
800
- }).pipe(Schema.encodeKeys({ type: "type", workerName: "worker_name" })), Schema.Struct({
1474
+ type: Schema.optional(Schema.Union([Schema.Literal("workersAi.model"), Schema.Null])),
1475
+ }).pipe(Schema.encodeKeys({ modelName: "model_name", type: "type" })),
1476
+ Schema.Struct({
1477
+ type: Schema.optional(Schema.Union([
1478
+ Schema.Literal("workersBuilds.worker"),
1479
+ Schema.Null,
1480
+ ])),
1481
+ workerName: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1482
+ }).pipe(Schema.encodeKeys({ type: "type", workerName: "worker_name" })),
1483
+ Schema.Struct({
801
1484
  type: Schema.optional(Schema.Union([Schema.Literal("workflows.workflow"), Schema.Null])),
802
- workflowName: Schema.optional(Schema.Union([Schema.String, Schema.Null]))
803
- }).pipe(Schema.encodeKeys({ type: "type", workflowName: "workflow_name" }))])
804
- }).pipe(Schema.encodeKeys({ id: "id", createdAt: "created_at", destination: "destination", enabled: "enabled", events: "events", modifiedAt: "modified_at", name: "name", source: "source" }))),
1485
+ workflowName: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1486
+ }).pipe(Schema.encodeKeys({ type: "type", workflowName: "workflow_name" })),
1487
+ ]),
1488
+ }).pipe(Schema.encodeKeys({
1489
+ id: "id",
1490
+ createdAt: "created_at",
1491
+ destination: "destination",
1492
+ enabled: "enabled",
1493
+ events: "events",
1494
+ modifiedAt: "modified_at",
1495
+ name: "name",
1496
+ source: "source",
1497
+ }))),
805
1498
  resultInfo: Schema.Struct({
806
1499
  count: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
807
1500
  page: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
808
1501
  perPage: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
809
- totalCount: Schema.optional(Schema.Union([Schema.Number, Schema.Null]))
810
- }).pipe(Schema.encodeKeys({ count: "count", page: "page", perPage: "per_page", totalCount: "total_count" }))
1502
+ totalCount: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
1503
+ }).pipe(Schema.encodeKeys({
1504
+ count: "count",
1505
+ page: "page",
1506
+ perPage: "per_page",
1507
+ totalCount: "total_count",
1508
+ })),
811
1509
  }).pipe(Schema.encodeKeys({ result: "result", resultInfo: "result_info" }));
812
1510
  export const listSubscriptions = /*@__PURE__*/ /*#__PURE__*/ API.makePaginated(() => ({
813
1511
  input: ListSubscriptionsRequest,
@@ -821,160 +1519,241 @@ export const listSubscriptions = /*@__PURE__*/ /*#__PURE__*/ API.makePaginated((
821
1519
  pageSize: "perPage",
822
1520
  },
823
1521
  }));
824
- export const CreateSubscriptionRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1522
+ export const CreateSubscriptionRequest =
1523
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
825
1524
  accountId: Schema.String.pipe(T.HttpPath("account_id")),
826
1525
  destination: Schema.optional(Schema.Struct({
827
1526
  queueId: Schema.String,
828
- type: Schema.Literal("queues.queue")
1527
+ type: Schema.Literal("queues.queue"),
829
1528
  }).pipe(Schema.encodeKeys({ queueId: "queue_id", type: "type" }))),
830
1529
  enabled: Schema.optional(Schema.Boolean),
831
1530
  events: Schema.optional(Schema.Array(Schema.String)),
832
1531
  name: Schema.optional(Schema.String),
833
- source: Schema.optional(Schema.Union([Schema.Struct({
834
- type: Schema.optional(Schema.Literal("images"))
835
- }), Schema.Struct({
836
- type: Schema.optional(Schema.Literal("kv"))
837
- }), Schema.Struct({
838
- type: Schema.optional(Schema.Literal("r2"))
839
- }), Schema.Struct({
840
- type: Schema.optional(Schema.Literal("superSlurper"))
841
- }), Schema.Struct({
842
- type: Schema.optional(Schema.Literal("vectorize"))
843
- }), Schema.Struct({
1532
+ source: Schema.optional(Schema.Union([
1533
+ Schema.Struct({
1534
+ type: Schema.optional(Schema.Literal("images")),
1535
+ }),
1536
+ Schema.Struct({
1537
+ type: Schema.optional(Schema.Literal("kv")),
1538
+ }),
1539
+ Schema.Struct({
1540
+ type: Schema.optional(Schema.Literal("r2")),
1541
+ }),
1542
+ Schema.Struct({
1543
+ type: Schema.optional(Schema.Literal("superSlurper")),
1544
+ }),
1545
+ Schema.Struct({
1546
+ type: Schema.optional(Schema.Literal("vectorize")),
1547
+ }),
1548
+ Schema.Struct({
844
1549
  modelName: Schema.optional(Schema.String),
845
- type: Schema.optional(Schema.Literal("workersAi.model"))
846
- }).pipe(Schema.encodeKeys({ modelName: "model_name", type: "type" })), Schema.Struct({
1550
+ type: Schema.optional(Schema.Literal("workersAi.model")),
1551
+ }).pipe(Schema.encodeKeys({ modelName: "model_name", type: "type" })),
1552
+ Schema.Struct({
847
1553
  type: Schema.optional(Schema.Literal("workersBuilds.worker")),
848
- workerName: Schema.optional(Schema.String)
849
- }).pipe(Schema.encodeKeys({ type: "type", workerName: "worker_name" })), Schema.Struct({
1554
+ workerName: Schema.optional(Schema.String),
1555
+ }).pipe(Schema.encodeKeys({ type: "type", workerName: "worker_name" })),
1556
+ Schema.Struct({
850
1557
  type: Schema.optional(Schema.Literal("workflows.workflow")),
851
- workflowName: Schema.optional(Schema.String)
852
- }).pipe(Schema.encodeKeys({ type: "type", workflowName: "workflow_name" }))]))
853
- })
854
- .pipe(T.Http({ method: "POST", path: "/accounts/{account_id}/event_subscriptions/subscriptions" }));
855
- export const CreateSubscriptionResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1558
+ workflowName: Schema.optional(Schema.String),
1559
+ }).pipe(Schema.encodeKeys({ type: "type", workflowName: "workflow_name" })),
1560
+ ])),
1561
+ }).pipe(T.Http({
1562
+ method: "POST",
1563
+ path: "/accounts/{account_id}/event_subscriptions/subscriptions",
1564
+ }));
1565
+ export const CreateSubscriptionResponse =
1566
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
856
1567
  id: Schema.String,
857
1568
  createdAt: Schema.String,
858
1569
  destination: Schema.Struct({
859
1570
  queueId: Schema.String,
860
- type: Schema.Literal("queues.queue")
1571
+ type: Schema.Literal("queues.queue"),
861
1572
  }).pipe(Schema.encodeKeys({ queueId: "queue_id", type: "type" })),
862
1573
  enabled: Schema.Boolean,
863
1574
  events: Schema.Array(Schema.String),
864
1575
  modifiedAt: Schema.String,
865
1576
  name: Schema.String,
866
- source: Schema.Union([Schema.Struct({
867
- type: Schema.optional(Schema.Union([Schema.Literal("images"), Schema.Null]))
868
- }), Schema.Struct({
869
- type: Schema.optional(Schema.Union([Schema.Literal("kv"), Schema.Null]))
870
- }), Schema.Struct({
871
- type: Schema.optional(Schema.Union([Schema.Literal("r2"), Schema.Null]))
872
- }), Schema.Struct({
873
- type: Schema.optional(Schema.Union([Schema.Literal("superSlurper"), Schema.Null]))
874
- }), Schema.Struct({
875
- type: Schema.optional(Schema.Union([Schema.Literal("vectorize"), Schema.Null]))
876
- }), Schema.Struct({
1577
+ source: Schema.Union([
1578
+ Schema.Struct({
1579
+ type: Schema.optional(Schema.Union([Schema.Literal("images"), Schema.Null])),
1580
+ }),
1581
+ Schema.Struct({
1582
+ type: Schema.optional(Schema.Union([Schema.Literal("kv"), Schema.Null])),
1583
+ }),
1584
+ Schema.Struct({
1585
+ type: Schema.optional(Schema.Union([Schema.Literal("r2"), Schema.Null])),
1586
+ }),
1587
+ Schema.Struct({
1588
+ type: Schema.optional(Schema.Union([Schema.Literal("superSlurper"), Schema.Null])),
1589
+ }),
1590
+ Schema.Struct({
1591
+ type: Schema.optional(Schema.Union([Schema.Literal("vectorize"), Schema.Null])),
1592
+ }),
1593
+ Schema.Struct({
877
1594
  modelName: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
878
- type: Schema.optional(Schema.Union([Schema.Literal("workersAi.model"), Schema.Null]))
879
- }).pipe(Schema.encodeKeys({ modelName: "model_name", type: "type" })), Schema.Struct({
1595
+ type: Schema.optional(Schema.Union([Schema.Literal("workersAi.model"), Schema.Null])),
1596
+ }).pipe(Schema.encodeKeys({ modelName: "model_name", type: "type" })),
1597
+ Schema.Struct({
880
1598
  type: Schema.optional(Schema.Union([Schema.Literal("workersBuilds.worker"), Schema.Null])),
881
- workerName: Schema.optional(Schema.Union([Schema.String, Schema.Null]))
882
- }).pipe(Schema.encodeKeys({ type: "type", workerName: "worker_name" })), Schema.Struct({
1599
+ workerName: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1600
+ }).pipe(Schema.encodeKeys({ type: "type", workerName: "worker_name" })),
1601
+ Schema.Struct({
883
1602
  type: Schema.optional(Schema.Union([Schema.Literal("workflows.workflow"), Schema.Null])),
884
- workflowName: Schema.optional(Schema.Union([Schema.String, Schema.Null]))
885
- }).pipe(Schema.encodeKeys({ type: "type", workflowName: "workflow_name" }))])
886
- }).pipe(Schema.encodeKeys({ id: "id", createdAt: "created_at", destination: "destination", enabled: "enabled", events: "events", modifiedAt: "modified_at", name: "name", source: "source" })).pipe(T.ResponsePath("result"));
1603
+ workflowName: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1604
+ }).pipe(Schema.encodeKeys({ type: "type", workflowName: "workflow_name" })),
1605
+ ]),
1606
+ })
1607
+ .pipe(Schema.encodeKeys({
1608
+ id: "id",
1609
+ createdAt: "created_at",
1610
+ destination: "destination",
1611
+ enabled: "enabled",
1612
+ events: "events",
1613
+ modifiedAt: "modified_at",
1614
+ name: "name",
1615
+ source: "source",
1616
+ }))
1617
+ .pipe(T.ResponsePath("result"));
887
1618
  export const createSubscription = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
888
1619
  input: CreateSubscriptionRequest,
889
1620
  output: CreateSubscriptionResponse,
890
1621
  errors: [UnrecognizedEventType],
891
1622
  }));
892
- export const PatchSubscriptionRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1623
+ export const PatchSubscriptionRequest =
1624
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
893
1625
  subscriptionId: Schema.String.pipe(T.HttpPath("subscriptionId")),
894
1626
  accountId: Schema.String.pipe(T.HttpPath("account_id")),
895
1627
  destination: Schema.optional(Schema.Struct({
896
1628
  queueId: Schema.String,
897
- type: Schema.Literal("queues.queue")
1629
+ type: Schema.Literal("queues.queue"),
898
1630
  }).pipe(Schema.encodeKeys({ queueId: "queue_id", type: "type" }))),
899
1631
  enabled: Schema.optional(Schema.Boolean),
900
1632
  events: Schema.optional(Schema.Array(Schema.String)),
901
- name: Schema.optional(Schema.String)
902
- })
903
- .pipe(T.Http({ method: "PATCH", path: "/accounts/{account_id}/event_subscriptions/subscriptions/{subscriptionId}" }));
904
- export const PatchSubscriptionResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1633
+ name: Schema.optional(Schema.String),
1634
+ }).pipe(T.Http({
1635
+ method: "PATCH",
1636
+ path: "/accounts/{account_id}/event_subscriptions/subscriptions/{subscriptionId}",
1637
+ }));
1638
+ export const PatchSubscriptionResponse =
1639
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
905
1640
  id: Schema.String,
906
1641
  createdAt: Schema.String,
907
1642
  destination: Schema.Struct({
908
1643
  queueId: Schema.String,
909
- type: Schema.Literal("queues.queue")
1644
+ type: Schema.Literal("queues.queue"),
910
1645
  }).pipe(Schema.encodeKeys({ queueId: "queue_id", type: "type" })),
911
1646
  enabled: Schema.Boolean,
912
1647
  events: Schema.Array(Schema.String),
913
1648
  modifiedAt: Schema.String,
914
1649
  name: Schema.String,
915
- source: Schema.Union([Schema.Struct({
916
- type: Schema.optional(Schema.Union([Schema.Literal("images"), Schema.Null]))
917
- }), Schema.Struct({
918
- type: Schema.optional(Schema.Union([Schema.Literal("kv"), Schema.Null]))
919
- }), Schema.Struct({
920
- type: Schema.optional(Schema.Union([Schema.Literal("r2"), Schema.Null]))
921
- }), Schema.Struct({
922
- type: Schema.optional(Schema.Union([Schema.Literal("superSlurper"), Schema.Null]))
923
- }), Schema.Struct({
924
- type: Schema.optional(Schema.Union([Schema.Literal("vectorize"), Schema.Null]))
925
- }), Schema.Struct({
1650
+ source: Schema.Union([
1651
+ Schema.Struct({
1652
+ type: Schema.optional(Schema.Union([Schema.Literal("images"), Schema.Null])),
1653
+ }),
1654
+ Schema.Struct({
1655
+ type: Schema.optional(Schema.Union([Schema.Literal("kv"), Schema.Null])),
1656
+ }),
1657
+ Schema.Struct({
1658
+ type: Schema.optional(Schema.Union([Schema.Literal("r2"), Schema.Null])),
1659
+ }),
1660
+ Schema.Struct({
1661
+ type: Schema.optional(Schema.Union([Schema.Literal("superSlurper"), Schema.Null])),
1662
+ }),
1663
+ Schema.Struct({
1664
+ type: Schema.optional(Schema.Union([Schema.Literal("vectorize"), Schema.Null])),
1665
+ }),
1666
+ Schema.Struct({
926
1667
  modelName: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
927
- type: Schema.optional(Schema.Union([Schema.Literal("workersAi.model"), Schema.Null]))
928
- }).pipe(Schema.encodeKeys({ modelName: "model_name", type: "type" })), Schema.Struct({
1668
+ type: Schema.optional(Schema.Union([Schema.Literal("workersAi.model"), Schema.Null])),
1669
+ }).pipe(Schema.encodeKeys({ modelName: "model_name", type: "type" })),
1670
+ Schema.Struct({
929
1671
  type: Schema.optional(Schema.Union([Schema.Literal("workersBuilds.worker"), Schema.Null])),
930
- workerName: Schema.optional(Schema.Union([Schema.String, Schema.Null]))
931
- }).pipe(Schema.encodeKeys({ type: "type", workerName: "worker_name" })), Schema.Struct({
1672
+ workerName: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1673
+ }).pipe(Schema.encodeKeys({ type: "type", workerName: "worker_name" })),
1674
+ Schema.Struct({
932
1675
  type: Schema.optional(Schema.Union([Schema.Literal("workflows.workflow"), Schema.Null])),
933
- workflowName: Schema.optional(Schema.Union([Schema.String, Schema.Null]))
934
- }).pipe(Schema.encodeKeys({ type: "type", workflowName: "workflow_name" }))])
935
- }).pipe(Schema.encodeKeys({ id: "id", createdAt: "created_at", destination: "destination", enabled: "enabled", events: "events", modifiedAt: "modified_at", name: "name", source: "source" })).pipe(T.ResponsePath("result"));
1676
+ workflowName: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1677
+ }).pipe(Schema.encodeKeys({ type: "type", workflowName: "workflow_name" })),
1678
+ ]),
1679
+ })
1680
+ .pipe(Schema.encodeKeys({
1681
+ id: "id",
1682
+ createdAt: "created_at",
1683
+ destination: "destination",
1684
+ enabled: "enabled",
1685
+ events: "events",
1686
+ modifiedAt: "modified_at",
1687
+ name: "name",
1688
+ source: "source",
1689
+ }))
1690
+ .pipe(T.ResponsePath("result"));
936
1691
  export const patchSubscription = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
937
1692
  input: PatchSubscriptionRequest,
938
1693
  output: PatchSubscriptionResponse,
939
1694
  errors: [UnrecognizedEventType],
940
1695
  }));
941
- export const DeleteSubscriptionRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1696
+ export const DeleteSubscriptionRequest =
1697
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
942
1698
  subscriptionId: Schema.String.pipe(T.HttpPath("subscriptionId")),
943
- accountId: Schema.String.pipe(T.HttpPath("account_id"))
944
- })
945
- .pipe(T.Http({ method: "DELETE", path: "/accounts/{account_id}/event_subscriptions/subscriptions/{subscriptionId}" }));
946
- export const DeleteSubscriptionResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1699
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
1700
+ }).pipe(T.Http({
1701
+ method: "DELETE",
1702
+ path: "/accounts/{account_id}/event_subscriptions/subscriptions/{subscriptionId}",
1703
+ }));
1704
+ export const DeleteSubscriptionResponse =
1705
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
947
1706
  id: Schema.String,
948
1707
  createdAt: Schema.String,
949
1708
  destination: Schema.Struct({
950
1709
  queueId: Schema.String,
951
- type: Schema.Literal("queues.queue")
1710
+ type: Schema.Literal("queues.queue"),
952
1711
  }).pipe(Schema.encodeKeys({ queueId: "queue_id", type: "type" })),
953
1712
  enabled: Schema.Boolean,
954
1713
  events: Schema.Array(Schema.String),
955
1714
  modifiedAt: Schema.String,
956
1715
  name: Schema.String,
957
- source: Schema.Union([Schema.Struct({
958
- type: Schema.optional(Schema.Union([Schema.Literal("images"), Schema.Null]))
959
- }), Schema.Struct({
960
- type: Schema.optional(Schema.Union([Schema.Literal("kv"), Schema.Null]))
961
- }), Schema.Struct({
962
- type: Schema.optional(Schema.Union([Schema.Literal("r2"), Schema.Null]))
963
- }), Schema.Struct({
964
- type: Schema.optional(Schema.Union([Schema.Literal("superSlurper"), Schema.Null]))
965
- }), Schema.Struct({
966
- type: Schema.optional(Schema.Union([Schema.Literal("vectorize"), Schema.Null]))
967
- }), Schema.Struct({
1716
+ source: Schema.Union([
1717
+ Schema.Struct({
1718
+ type: Schema.optional(Schema.Union([Schema.Literal("images"), Schema.Null])),
1719
+ }),
1720
+ Schema.Struct({
1721
+ type: Schema.optional(Schema.Union([Schema.Literal("kv"), Schema.Null])),
1722
+ }),
1723
+ Schema.Struct({
1724
+ type: Schema.optional(Schema.Union([Schema.Literal("r2"), Schema.Null])),
1725
+ }),
1726
+ Schema.Struct({
1727
+ type: Schema.optional(Schema.Union([Schema.Literal("superSlurper"), Schema.Null])),
1728
+ }),
1729
+ Schema.Struct({
1730
+ type: Schema.optional(Schema.Union([Schema.Literal("vectorize"), Schema.Null])),
1731
+ }),
1732
+ Schema.Struct({
968
1733
  modelName: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
969
- type: Schema.optional(Schema.Union([Schema.Literal("workersAi.model"), Schema.Null]))
970
- }).pipe(Schema.encodeKeys({ modelName: "model_name", type: "type" })), Schema.Struct({
1734
+ type: Schema.optional(Schema.Union([Schema.Literal("workersAi.model"), Schema.Null])),
1735
+ }).pipe(Schema.encodeKeys({ modelName: "model_name", type: "type" })),
1736
+ Schema.Struct({
971
1737
  type: Schema.optional(Schema.Union([Schema.Literal("workersBuilds.worker"), Schema.Null])),
972
- workerName: Schema.optional(Schema.Union([Schema.String, Schema.Null]))
973
- }).pipe(Schema.encodeKeys({ type: "type", workerName: "worker_name" })), Schema.Struct({
1738
+ workerName: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1739
+ }).pipe(Schema.encodeKeys({ type: "type", workerName: "worker_name" })),
1740
+ Schema.Struct({
974
1741
  type: Schema.optional(Schema.Union([Schema.Literal("workflows.workflow"), Schema.Null])),
975
- workflowName: Schema.optional(Schema.Union([Schema.String, Schema.Null]))
976
- }).pipe(Schema.encodeKeys({ type: "type", workflowName: "workflow_name" }))])
977
- }).pipe(Schema.encodeKeys({ id: "id", createdAt: "created_at", destination: "destination", enabled: "enabled", events: "events", modifiedAt: "modified_at", name: "name", source: "source" })).pipe(T.ResponsePath("result"));
1742
+ workflowName: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1743
+ }).pipe(Schema.encodeKeys({ type: "type", workflowName: "workflow_name" })),
1744
+ ]),
1745
+ })
1746
+ .pipe(Schema.encodeKeys({
1747
+ id: "id",
1748
+ createdAt: "created_at",
1749
+ destination: "destination",
1750
+ enabled: "enabled",
1751
+ events: "events",
1752
+ modifiedAt: "modified_at",
1753
+ name: "name",
1754
+ source: "source",
1755
+ }))
1756
+ .pipe(T.ResponsePath("result"));
978
1757
  export const deleteSubscription = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
979
1758
  input: DeleteSubscriptionRequest,
980
1759
  output: DeleteSubscriptionResponse,