@distilled.cloud/cloudflare 0.12.2 → 0.12.3
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.
- package/lib/services/queues.d.ts +38 -20
- package/lib/services/queues.d.ts.map +1 -1
- package/lib/services/queues.js +423 -1178
- package/lib/services/queues.js.map +1 -1
- package/lib/services/r2.d.ts +47 -35
- package/lib/services/r2.d.ts.map +1 -1
- package/lib/services/r2.js +395 -861
- package/lib/services/r2.js.map +1 -1
- package/package.json +2 -2
- package/src/services/queues.ts +856 -2964
- package/src/services/r2.ts +861 -2220
package/src/services/queues.ts
CHANGED
|
@@ -10,61 +10,79 @@ import type * as HttpClient from "effect/unstable/http/HttpClient";
|
|
|
10
10
|
import * as API from "../client/api.ts";
|
|
11
11
|
import * as T from "../traits.ts";
|
|
12
12
|
import type { Credentials } from "../credentials.ts";
|
|
13
|
-
import {
|
|
13
|
+
import {
|
|
14
|
+
type DefaultErrors,
|
|
15
|
+
} from "../errors.ts";
|
|
14
16
|
|
|
15
17
|
// =============================================================================
|
|
16
18
|
// Errors
|
|
17
19
|
// =============================================================================
|
|
18
20
|
|
|
21
|
+
export class ConsumerAlreadyExists extends Schema.TaggedErrorClass<ConsumerAlreadyExists>()(
|
|
22
|
+
"ConsumerAlreadyExists",
|
|
23
|
+
{ code: Schema.Number, message: Schema.String },
|
|
24
|
+
) {}
|
|
25
|
+
T.applyErrorMatchers(ConsumerAlreadyExists, [{"code":11004}]);
|
|
26
|
+
|
|
27
|
+
export class ConsumerNotFound extends Schema.TaggedErrorClass<ConsumerNotFound>()(
|
|
28
|
+
"ConsumerNotFound",
|
|
29
|
+
{ code: Schema.Number, message: Schema.String },
|
|
30
|
+
) {}
|
|
31
|
+
T.applyErrorMatchers(ConsumerNotFound, [{"code":10105},{"code":11006}]);
|
|
32
|
+
|
|
19
33
|
export class InvalidMessageBody extends Schema.TaggedErrorClass<InvalidMessageBody>()(
|
|
20
34
|
"InvalidMessageBody",
|
|
21
35
|
{ code: Schema.Number, message: Schema.String },
|
|
22
36
|
) {}
|
|
23
|
-
T.applyErrorMatchers(InvalidMessageBody, [{
|
|
37
|
+
T.applyErrorMatchers(InvalidMessageBody, [{"code":10207},{"code":10013}]);
|
|
24
38
|
|
|
25
39
|
export class InvalidQueueId extends Schema.TaggedErrorClass<InvalidQueueId>()(
|
|
26
40
|
"InvalidQueueId",
|
|
27
41
|
{ code: Schema.Number, message: Schema.String },
|
|
28
42
|
) {}
|
|
29
|
-
T.applyErrorMatchers(InvalidQueueId, [{
|
|
43
|
+
T.applyErrorMatchers(InvalidQueueId, [{"code":10107}]);
|
|
30
44
|
|
|
31
45
|
export class InvalidQueueName extends Schema.TaggedErrorClass<InvalidQueueName>()(
|
|
32
46
|
"InvalidQueueName",
|
|
33
47
|
{ code: Schema.Number, message: Schema.String },
|
|
34
48
|
) {}
|
|
35
|
-
T.applyErrorMatchers(InvalidQueueName, [{
|
|
49
|
+
T.applyErrorMatchers(InvalidQueueName, [{"code":11003}]);
|
|
36
50
|
|
|
37
51
|
export class InvalidRequestBody extends Schema.TaggedErrorClass<InvalidRequestBody>()(
|
|
38
52
|
"InvalidRequestBody",
|
|
39
53
|
{ code: Schema.Number, message: Schema.String },
|
|
40
54
|
) {}
|
|
41
|
-
T.applyErrorMatchers(InvalidRequestBody, [{
|
|
55
|
+
T.applyErrorMatchers(InvalidRequestBody, [{"code":10026}]);
|
|
42
56
|
|
|
43
57
|
export class InvalidRoute extends Schema.TaggedErrorClass<InvalidRoute>()(
|
|
44
58
|
"InvalidRoute",
|
|
45
59
|
{ code: Schema.Number, message: Schema.String },
|
|
46
60
|
) {}
|
|
47
|
-
T.applyErrorMatchers(InvalidRoute, [{
|
|
61
|
+
T.applyErrorMatchers(InvalidRoute, [{"code":7003}]);
|
|
48
62
|
|
|
49
63
|
export class QueueAlreadyExists extends Schema.TaggedErrorClass<QueueAlreadyExists>()(
|
|
50
64
|
"QueueAlreadyExists",
|
|
51
65
|
{ code: Schema.Number, message: Schema.String },
|
|
52
66
|
) {}
|
|
53
|
-
T.applyErrorMatchers(QueueAlreadyExists, [{
|
|
67
|
+
T.applyErrorMatchers(QueueAlreadyExists, [{"code":11009}]);
|
|
54
68
|
|
|
55
69
|
export class QueueNotFound extends Schema.TaggedErrorClass<QueueNotFound>()(
|
|
56
70
|
"QueueNotFound",
|
|
57
71
|
{ code: Schema.Number, message: Schema.String },
|
|
58
72
|
) {}
|
|
59
|
-
T.applyErrorMatchers(QueueNotFound, [{
|
|
73
|
+
T.applyErrorMatchers(QueueNotFound, [{"code":11000},{"code":0,"message":{"includes":"Queue does not exist"}}]);
|
|
60
74
|
|
|
61
75
|
export class UnrecognizedEventType extends Schema.TaggedErrorClass<UnrecognizedEventType>()(
|
|
62
76
|
"UnrecognizedEventType",
|
|
63
77
|
{ code: Schema.Number, message: Schema.String },
|
|
64
78
|
) {}
|
|
65
|
-
T.applyErrorMatchers(UnrecognizedEventType, [
|
|
66
|
-
|
|
67
|
-
|
|
79
|
+
T.applyErrorMatchers(UnrecognizedEventType, [{"code":0,"message":{"includes":"Unrecognized event types"}}]);
|
|
80
|
+
|
|
81
|
+
export class WorkerNotFound extends Schema.TaggedErrorClass<WorkerNotFound>()(
|
|
82
|
+
"WorkerNotFound",
|
|
83
|
+
{ code: Schema.Number, message: Schema.String },
|
|
84
|
+
) {}
|
|
85
|
+
T.applyErrorMatchers(WorkerNotFound, [{"code":10007}]);
|
|
68
86
|
|
|
69
87
|
// =============================================================================
|
|
70
88
|
// Consumer
|
|
@@ -80,141 +98,43 @@ export interface GetConsumerRequest {
|
|
|
80
98
|
export const GetConsumerRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
81
99
|
queueId: Schema.String.pipe(T.HttpPath("queueId")),
|
|
82
100
|
consumerId: Schema.String.pipe(T.HttpPath("consumerId")),
|
|
83
|
-
accountId: Schema.String.pipe(T.HttpPath("account_id"))
|
|
84
|
-
})
|
|
85
|
-
T.Http({
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
visibilityTimeoutMs?: number | null;
|
|
115
|
-
} | null;
|
|
116
|
-
type?: "http_pull" | null;
|
|
117
|
-
};
|
|
118
|
-
|
|
119
|
-
export const GetConsumerResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Union([
|
|
120
|
-
Schema.Struct({
|
|
121
|
-
consumerId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
122
|
-
createdOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
123
|
-
queueId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
124
|
-
script: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
125
|
-
settings: Schema.optional(
|
|
126
|
-
Schema.Union([
|
|
127
|
-
Schema.Struct({
|
|
128
|
-
batchSize: Schema.optional(
|
|
129
|
-
Schema.Union([Schema.Number, Schema.Null]),
|
|
130
|
-
),
|
|
131
|
-
maxConcurrency: Schema.optional(
|
|
132
|
-
Schema.Union([Schema.Number, Schema.Null]),
|
|
133
|
-
),
|
|
134
|
-
maxRetries: Schema.optional(
|
|
135
|
-
Schema.Union([Schema.Number, Schema.Null]),
|
|
136
|
-
),
|
|
137
|
-
maxWaitTimeMs: Schema.optional(
|
|
138
|
-
Schema.Union([Schema.Number, Schema.Null]),
|
|
139
|
-
),
|
|
140
|
-
retryDelay: Schema.optional(
|
|
141
|
-
Schema.Union([Schema.Number, Schema.Null]),
|
|
142
|
-
),
|
|
143
|
-
}).pipe(
|
|
144
|
-
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
|
-
),
|
|
152
|
-
Schema.Null,
|
|
153
|
-
]),
|
|
154
|
-
),
|
|
155
|
-
type: Schema.optional(
|
|
156
|
-
Schema.Union([Schema.Literal("worker"), Schema.Null]),
|
|
157
|
-
),
|
|
158
|
-
}).pipe(
|
|
159
|
-
Schema.encodeKeys({
|
|
160
|
-
consumerId: "consumer_id",
|
|
161
|
-
createdOn: "created_on",
|
|
162
|
-
queueId: "queue_id",
|
|
163
|
-
script: "script",
|
|
164
|
-
settings: "settings",
|
|
165
|
-
type: "type",
|
|
166
|
-
}),
|
|
167
|
-
),
|
|
168
|
-
Schema.Struct({
|
|
169
|
-
consumerId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
170
|
-
createdOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
171
|
-
queueId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
172
|
-
settings: Schema.optional(
|
|
173
|
-
Schema.Union([
|
|
174
|
-
Schema.Struct({
|
|
175
|
-
batchSize: Schema.optional(
|
|
176
|
-
Schema.Union([Schema.Number, Schema.Null]),
|
|
177
|
-
),
|
|
178
|
-
maxRetries: Schema.optional(
|
|
179
|
-
Schema.Union([Schema.Number, Schema.Null]),
|
|
180
|
-
),
|
|
181
|
-
retryDelay: Schema.optional(
|
|
182
|
-
Schema.Union([Schema.Number, Schema.Null]),
|
|
183
|
-
),
|
|
184
|
-
visibilityTimeoutMs: Schema.optional(
|
|
185
|
-
Schema.Union([Schema.Number, Schema.Null]),
|
|
186
|
-
),
|
|
187
|
-
}).pipe(
|
|
188
|
-
Schema.encodeKeys({
|
|
189
|
-
batchSize: "batch_size",
|
|
190
|
-
maxRetries: "max_retries",
|
|
191
|
-
retryDelay: "retry_delay",
|
|
192
|
-
visibilityTimeoutMs: "visibility_timeout_ms",
|
|
193
|
-
}),
|
|
194
|
-
),
|
|
195
|
-
Schema.Null,
|
|
196
|
-
]),
|
|
197
|
-
),
|
|
198
|
-
type: Schema.optional(
|
|
199
|
-
Schema.Union([Schema.Literal("http_pull"), Schema.Null]),
|
|
200
|
-
),
|
|
201
|
-
}).pipe(
|
|
202
|
-
Schema.encodeKeys({
|
|
203
|
-
consumerId: "consumer_id",
|
|
204
|
-
createdOn: "created_on",
|
|
205
|
-
queueId: "queue_id",
|
|
206
|
-
settings: "settings",
|
|
207
|
-
type: "type",
|
|
208
|
-
}),
|
|
209
|
-
),
|
|
210
|
-
]).pipe(
|
|
211
|
-
T.ResponsePath("result"),
|
|
212
|
-
) as unknown as Schema.Schema<GetConsumerResponse>;
|
|
101
|
+
accountId: Schema.String.pipe(T.HttpPath("account_id"))
|
|
102
|
+
})
|
|
103
|
+
.pipe(T.Http({ method: "GET", path: "/accounts/{account_id}/queues/{queueId}/consumers/{consumerId}" })) as unknown as Schema.Schema<GetConsumerRequest>;
|
|
104
|
+
|
|
105
|
+
export type GetConsumerResponse = { consumerId?: string | null; createdOn?: string | null; queueId?: string | null; script?: string | null; settings?: { batchSize?: number | null; maxConcurrency?: number | null; maxRetries?: number | null; maxWaitTimeMs?: number | null; retryDelay?: number | null } | null; type?: "worker" | null } | { consumerId?: string | null; createdOn?: string | null; queueId?: string | null; settings?: { batchSize?: number | null; maxRetries?: number | null; retryDelay?: number | null; visibilityTimeoutMs?: number | null } | null; type?: "http_pull" | null };
|
|
106
|
+
|
|
107
|
+
export const GetConsumerResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Union([Schema.Struct({
|
|
108
|
+
consumerId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
109
|
+
createdOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
110
|
+
queueId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
111
|
+
script: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
112
|
+
settings: Schema.optional(Schema.Union([Schema.Struct({
|
|
113
|
+
batchSize: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
|
|
114
|
+
maxConcurrency: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
|
|
115
|
+
maxRetries: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
|
|
116
|
+
maxWaitTimeMs: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
|
|
117
|
+
retryDelay: Schema.optional(Schema.Union([Schema.Number, Schema.Null]))
|
|
118
|
+
}).pipe(Schema.encodeKeys({ batchSize: "batch_size", maxConcurrency: "max_concurrency", maxRetries: "max_retries", maxWaitTimeMs: "max_wait_time_ms", retryDelay: "retry_delay" })), Schema.Null])),
|
|
119
|
+
type: Schema.optional(Schema.Union([Schema.Literal("worker"), Schema.Null]))
|
|
120
|
+
}).pipe(Schema.encodeKeys({ consumerId: "consumer_id", createdOn: "created_on", queueId: "queue_id", script: "script", settings: "settings", type: "type" })), Schema.Struct({
|
|
121
|
+
consumerId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
122
|
+
createdOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
123
|
+
queueId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
124
|
+
settings: Schema.optional(Schema.Union([Schema.Struct({
|
|
125
|
+
batchSize: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
|
|
126
|
+
maxRetries: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
|
|
127
|
+
retryDelay: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
|
|
128
|
+
visibilityTimeoutMs: Schema.optional(Schema.Union([Schema.Number, Schema.Null]))
|
|
129
|
+
}).pipe(Schema.encodeKeys({ batchSize: "batch_size", maxRetries: "max_retries", retryDelay: "retry_delay", visibilityTimeoutMs: "visibility_timeout_ms" })), Schema.Null])),
|
|
130
|
+
type: Schema.optional(Schema.Union([Schema.Literal("http_pull"), Schema.Null]))
|
|
131
|
+
}).pipe(Schema.encodeKeys({ consumerId: "consumer_id", createdOn: "created_on", queueId: "queue_id", settings: "settings", type: "type" }))]).pipe(T.ResponsePath("result")) as unknown as Schema.Schema<GetConsumerResponse>;
|
|
213
132
|
|
|
214
133
|
export type GetConsumerError =
|
|
215
134
|
| DefaultErrors
|
|
216
135
|
| InvalidRequestBody
|
|
217
136
|
| QueueNotFound
|
|
137
|
+
| ConsumerNotFound
|
|
218
138
|
| InvalidRoute;
|
|
219
139
|
|
|
220
140
|
export const getConsumer: API.OperationMethod<
|
|
@@ -225,7 +145,7 @@ export const getConsumer: API.OperationMethod<
|
|
|
225
145
|
> = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
|
|
226
146
|
input: GetConsumerRequest,
|
|
227
147
|
output: GetConsumerResponse,
|
|
228
|
-
errors: [InvalidRequestBody, QueueNotFound, InvalidRoute],
|
|
148
|
+
errors: [InvalidRequestBody, QueueNotFound, ConsumerNotFound, InvalidRoute],
|
|
229
149
|
}));
|
|
230
150
|
|
|
231
151
|
export interface ListConsumersRequest {
|
|
@@ -236,140 +156,40 @@ export interface ListConsumersRequest {
|
|
|
236
156
|
|
|
237
157
|
export const ListConsumersRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
238
158
|
queueId: Schema.String.pipe(T.HttpPath("queueId")),
|
|
239
|
-
accountId: Schema.String.pipe(T.HttpPath("account_id"))
|
|
240
|
-
})
|
|
241
|
-
T.Http({
|
|
242
|
-
method: "GET",
|
|
243
|
-
path: "/accounts/{account_id}/queues/{queueId}/consumers",
|
|
244
|
-
}),
|
|
245
|
-
) as unknown as Schema.Schema<ListConsumersRequest>;
|
|
159
|
+
accountId: Schema.String.pipe(T.HttpPath("account_id"))
|
|
160
|
+
})
|
|
161
|
+
.pipe(T.Http({ method: "GET", path: "/accounts/{account_id}/queues/{queueId}/consumers" })) as unknown as Schema.Schema<ListConsumersRequest>;
|
|
246
162
|
|
|
247
163
|
export interface ListConsumersResponse {
|
|
248
|
-
result: (
|
|
249
|
-
| {
|
|
250
|
-
consumerId?: string | null;
|
|
251
|
-
createdOn?: string | null;
|
|
252
|
-
queueId?: string | null;
|
|
253
|
-
script?: string | null;
|
|
254
|
-
settings?: {
|
|
255
|
-
batchSize?: number | null;
|
|
256
|
-
maxConcurrency?: number | null;
|
|
257
|
-
maxRetries?: number | null;
|
|
258
|
-
maxWaitTimeMs?: number | null;
|
|
259
|
-
retryDelay?: number | null;
|
|
260
|
-
} | null;
|
|
261
|
-
type?: "worker" | null;
|
|
262
|
-
}
|
|
263
|
-
| {
|
|
264
|
-
consumerId?: string | null;
|
|
265
|
-
createdOn?: string | null;
|
|
266
|
-
queueId?: string | null;
|
|
267
|
-
settings?: {
|
|
268
|
-
batchSize?: number | null;
|
|
269
|
-
maxRetries?: number | null;
|
|
270
|
-
retryDelay?: number | null;
|
|
271
|
-
visibilityTimeoutMs?: number | null;
|
|
272
|
-
} | null;
|
|
273
|
-
type?: "http_pull" | null;
|
|
274
|
-
}
|
|
275
|
-
)[];
|
|
164
|
+
result: ({ consumerId?: string | null; createdOn?: string | null; queueId?: string | null; script?: string | null; settings?: { batchSize?: number | null; maxConcurrency?: number | null; maxRetries?: number | null; maxWaitTimeMs?: number | null; retryDelay?: number | null } | null; type?: "worker" | null } | { consumerId?: string | null; createdOn?: string | null; queueId?: string | null; settings?: { batchSize?: number | null; maxRetries?: number | null; retryDelay?: number | null; visibilityTimeoutMs?: number | null } | null; type?: "http_pull" | null })[];
|
|
276
165
|
}
|
|
277
166
|
|
|
278
167
|
export const ListConsumersResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
279
|
-
result: Schema.Array(
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
}).pipe(
|
|
305
|
-
Schema.encodeKeys({
|
|
306
|
-
batchSize: "batch_size",
|
|
307
|
-
maxConcurrency: "max_concurrency",
|
|
308
|
-
maxRetries: "max_retries",
|
|
309
|
-
maxWaitTimeMs: "max_wait_time_ms",
|
|
310
|
-
retryDelay: "retry_delay",
|
|
311
|
-
}),
|
|
312
|
-
),
|
|
313
|
-
Schema.Null,
|
|
314
|
-
]),
|
|
315
|
-
),
|
|
316
|
-
type: Schema.optional(
|
|
317
|
-
Schema.Union([Schema.Literal("worker"), Schema.Null]),
|
|
318
|
-
),
|
|
319
|
-
}).pipe(
|
|
320
|
-
Schema.encodeKeys({
|
|
321
|
-
consumerId: "consumer_id",
|
|
322
|
-
createdOn: "created_on",
|
|
323
|
-
queueId: "queue_id",
|
|
324
|
-
script: "script",
|
|
325
|
-
settings: "settings",
|
|
326
|
-
type: "type",
|
|
327
|
-
}),
|
|
328
|
-
),
|
|
329
|
-
Schema.Struct({
|
|
330
|
-
consumerId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
331
|
-
createdOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
332
|
-
queueId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
333
|
-
settings: Schema.optional(
|
|
334
|
-
Schema.Union([
|
|
335
|
-
Schema.Struct({
|
|
336
|
-
batchSize: Schema.optional(
|
|
337
|
-
Schema.Union([Schema.Number, Schema.Null]),
|
|
338
|
-
),
|
|
339
|
-
maxRetries: Schema.optional(
|
|
340
|
-
Schema.Union([Schema.Number, Schema.Null]),
|
|
341
|
-
),
|
|
342
|
-
retryDelay: Schema.optional(
|
|
343
|
-
Schema.Union([Schema.Number, Schema.Null]),
|
|
344
|
-
),
|
|
345
|
-
visibilityTimeoutMs: Schema.optional(
|
|
346
|
-
Schema.Union([Schema.Number, Schema.Null]),
|
|
347
|
-
),
|
|
348
|
-
}).pipe(
|
|
349
|
-
Schema.encodeKeys({
|
|
350
|
-
batchSize: "batch_size",
|
|
351
|
-
maxRetries: "max_retries",
|
|
352
|
-
retryDelay: "retry_delay",
|
|
353
|
-
visibilityTimeoutMs: "visibility_timeout_ms",
|
|
354
|
-
}),
|
|
355
|
-
),
|
|
356
|
-
Schema.Null,
|
|
357
|
-
]),
|
|
358
|
-
),
|
|
359
|
-
type: Schema.optional(
|
|
360
|
-
Schema.Union([Schema.Literal("http_pull"), Schema.Null]),
|
|
361
|
-
),
|
|
362
|
-
}).pipe(
|
|
363
|
-
Schema.encodeKeys({
|
|
364
|
-
consumerId: "consumer_id",
|
|
365
|
-
createdOn: "created_on",
|
|
366
|
-
queueId: "queue_id",
|
|
367
|
-
settings: "settings",
|
|
368
|
-
type: "type",
|
|
369
|
-
}),
|
|
370
|
-
),
|
|
371
|
-
]),
|
|
372
|
-
),
|
|
168
|
+
result: Schema.Array(Schema.Union([Schema.Struct({
|
|
169
|
+
consumerId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
170
|
+
createdOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
171
|
+
queueId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
172
|
+
script: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
173
|
+
settings: Schema.optional(Schema.Union([Schema.Struct({
|
|
174
|
+
batchSize: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
|
|
175
|
+
maxConcurrency: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
|
|
176
|
+
maxRetries: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
|
|
177
|
+
maxWaitTimeMs: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
|
|
178
|
+
retryDelay: Schema.optional(Schema.Union([Schema.Number, Schema.Null]))
|
|
179
|
+
}).pipe(Schema.encodeKeys({ batchSize: "batch_size", maxConcurrency: "max_concurrency", maxRetries: "max_retries", maxWaitTimeMs: "max_wait_time_ms", retryDelay: "retry_delay" })), Schema.Null])),
|
|
180
|
+
type: Schema.optional(Schema.Union([Schema.Literal("worker"), Schema.Null]))
|
|
181
|
+
}).pipe(Schema.encodeKeys({ consumerId: "consumer_id", createdOn: "created_on", queueId: "queue_id", script: "script", settings: "settings", type: "type" })), Schema.Struct({
|
|
182
|
+
consumerId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
183
|
+
createdOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
184
|
+
queueId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
185
|
+
settings: Schema.optional(Schema.Union([Schema.Struct({
|
|
186
|
+
batchSize: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
|
|
187
|
+
maxRetries: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
|
|
188
|
+
retryDelay: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
|
|
189
|
+
visibilityTimeoutMs: Schema.optional(Schema.Union([Schema.Number, Schema.Null]))
|
|
190
|
+
}).pipe(Schema.encodeKeys({ batchSize: "batch_size", maxRetries: "max_retries", retryDelay: "retry_delay", visibilityTimeoutMs: "visibility_timeout_ms" })), Schema.Null])),
|
|
191
|
+
type: Schema.optional(Schema.Union([Schema.Literal("http_pull"), Schema.Null]))
|
|
192
|
+
}).pipe(Schema.encodeKeys({ consumerId: "consumer_id", createdOn: "created_on", queueId: "queue_id", settings: "settings", type: "type" }))]))
|
|
373
193
|
}) as unknown as Schema.Schema<ListConsumersResponse>;
|
|
374
194
|
|
|
375
195
|
export type ListConsumersError =
|
|
@@ -402,13 +222,7 @@ export interface CreateConsumerRequest {
|
|
|
402
222
|
/** Body param: Name of a Worker */
|
|
403
223
|
scriptName?: string;
|
|
404
224
|
/** Body param: */
|
|
405
|
-
settings?: {
|
|
406
|
-
batchSize?: number;
|
|
407
|
-
maxConcurrency?: number;
|
|
408
|
-
maxRetries?: number;
|
|
409
|
-
maxWaitTimeMs?: number;
|
|
410
|
-
retryDelay?: number;
|
|
411
|
-
};
|
|
225
|
+
settings?: { batchSize?: number; maxConcurrency?: number; maxRetries?: number; maxWaitTimeMs?: number; retryDelay?: number };
|
|
412
226
|
/** Body param: */
|
|
413
227
|
type: "worker" | "http_pull";
|
|
414
228
|
}
|
|
@@ -418,164 +232,51 @@ export const CreateConsumerRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
|
418
232
|
accountId: Schema.String.pipe(T.HttpPath("account_id")),
|
|
419
233
|
deadLetterQueue: Schema.optional(Schema.String),
|
|
420
234
|
scriptName: Schema.optional(Schema.String),
|
|
421
|
-
settings: Schema.optional(
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
),
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
}),
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
batchSize?: number | null;
|
|
460
|
-
maxConcurrency?: number | null;
|
|
461
|
-
maxRetries?: number | null;
|
|
462
|
-
maxWaitTimeMs?: number | null;
|
|
463
|
-
retryDelay?: number | null;
|
|
464
|
-
} | null;
|
|
465
|
-
type?: "worker" | null;
|
|
466
|
-
}
|
|
467
|
-
| {
|
|
468
|
-
consumerId?: string | null;
|
|
469
|
-
createdOn?: string | null;
|
|
470
|
-
queueId?: string | null;
|
|
471
|
-
settings?: {
|
|
472
|
-
batchSize?: number | null;
|
|
473
|
-
maxRetries?: number | null;
|
|
474
|
-
retryDelay?: number | null;
|
|
475
|
-
visibilityTimeoutMs?: number | null;
|
|
476
|
-
} | null;
|
|
477
|
-
type?: "http_pull" | null;
|
|
478
|
-
};
|
|
479
|
-
|
|
480
|
-
export const CreateConsumerResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Union([
|
|
481
|
-
Schema.Struct({
|
|
482
|
-
consumerId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
483
|
-
createdOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
484
|
-
queueId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
485
|
-
script: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
486
|
-
settings: Schema.optional(
|
|
487
|
-
Schema.Union([
|
|
488
|
-
Schema.Struct({
|
|
489
|
-
batchSize: Schema.optional(
|
|
490
|
-
Schema.Union([Schema.Number, Schema.Null]),
|
|
491
|
-
),
|
|
492
|
-
maxConcurrency: Schema.optional(
|
|
493
|
-
Schema.Union([Schema.Number, Schema.Null]),
|
|
494
|
-
),
|
|
495
|
-
maxRetries: Schema.optional(
|
|
496
|
-
Schema.Union([Schema.Number, Schema.Null]),
|
|
497
|
-
),
|
|
498
|
-
maxWaitTimeMs: Schema.optional(
|
|
499
|
-
Schema.Union([Schema.Number, Schema.Null]),
|
|
500
|
-
),
|
|
501
|
-
retryDelay: Schema.optional(
|
|
502
|
-
Schema.Union([Schema.Number, Schema.Null]),
|
|
503
|
-
),
|
|
504
|
-
}).pipe(
|
|
505
|
-
Schema.encodeKeys({
|
|
506
|
-
batchSize: "batch_size",
|
|
507
|
-
maxConcurrency: "max_concurrency",
|
|
508
|
-
maxRetries: "max_retries",
|
|
509
|
-
maxWaitTimeMs: "max_wait_time_ms",
|
|
510
|
-
retryDelay: "retry_delay",
|
|
511
|
-
}),
|
|
512
|
-
),
|
|
513
|
-
Schema.Null,
|
|
514
|
-
]),
|
|
515
|
-
),
|
|
516
|
-
type: Schema.optional(
|
|
517
|
-
Schema.Union([Schema.Literal("worker"), Schema.Null]),
|
|
518
|
-
),
|
|
519
|
-
}).pipe(
|
|
520
|
-
Schema.encodeKeys({
|
|
521
|
-
consumerId: "consumer_id",
|
|
522
|
-
createdOn: "created_on",
|
|
523
|
-
queueId: "queue_id",
|
|
524
|
-
script: "script",
|
|
525
|
-
settings: "settings",
|
|
526
|
-
type: "type",
|
|
527
|
-
}),
|
|
528
|
-
),
|
|
529
|
-
Schema.Struct({
|
|
530
|
-
consumerId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
531
|
-
createdOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
532
|
-
queueId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
533
|
-
settings: Schema.optional(
|
|
534
|
-
Schema.Union([
|
|
535
|
-
Schema.Struct({
|
|
536
|
-
batchSize: Schema.optional(
|
|
537
|
-
Schema.Union([Schema.Number, Schema.Null]),
|
|
538
|
-
),
|
|
539
|
-
maxRetries: Schema.optional(
|
|
540
|
-
Schema.Union([Schema.Number, Schema.Null]),
|
|
541
|
-
),
|
|
542
|
-
retryDelay: Schema.optional(
|
|
543
|
-
Schema.Union([Schema.Number, Schema.Null]),
|
|
544
|
-
),
|
|
545
|
-
visibilityTimeoutMs: Schema.optional(
|
|
546
|
-
Schema.Union([Schema.Number, Schema.Null]),
|
|
547
|
-
),
|
|
548
|
-
}).pipe(
|
|
549
|
-
Schema.encodeKeys({
|
|
550
|
-
batchSize: "batch_size",
|
|
551
|
-
maxRetries: "max_retries",
|
|
552
|
-
retryDelay: "retry_delay",
|
|
553
|
-
visibilityTimeoutMs: "visibility_timeout_ms",
|
|
554
|
-
}),
|
|
555
|
-
),
|
|
556
|
-
Schema.Null,
|
|
557
|
-
]),
|
|
558
|
-
),
|
|
559
|
-
type: Schema.optional(
|
|
560
|
-
Schema.Union([Schema.Literal("http_pull"), Schema.Null]),
|
|
561
|
-
),
|
|
562
|
-
}).pipe(
|
|
563
|
-
Schema.encodeKeys({
|
|
564
|
-
consumerId: "consumer_id",
|
|
565
|
-
createdOn: "created_on",
|
|
566
|
-
queueId: "queue_id",
|
|
567
|
-
settings: "settings",
|
|
568
|
-
type: "type",
|
|
569
|
-
}),
|
|
570
|
-
),
|
|
571
|
-
]).pipe(
|
|
572
|
-
T.ResponsePath("result"),
|
|
573
|
-
) as unknown as Schema.Schema<CreateConsumerResponse>;
|
|
235
|
+
settings: Schema.optional(Schema.Struct({
|
|
236
|
+
batchSize: Schema.optional(Schema.Number),
|
|
237
|
+
maxConcurrency: Schema.optional(Schema.Number),
|
|
238
|
+
maxRetries: Schema.optional(Schema.Number),
|
|
239
|
+
maxWaitTimeMs: Schema.optional(Schema.Number),
|
|
240
|
+
retryDelay: Schema.optional(Schema.Number)
|
|
241
|
+
}).pipe(Schema.encodeKeys({ batchSize: "batch_size", maxConcurrency: "max_concurrency", maxRetries: "max_retries", maxWaitTimeMs: "max_wait_time_ms", retryDelay: "retry_delay" }))),
|
|
242
|
+
type: Schema.Literals(["worker", "http_pull"])
|
|
243
|
+
})
|
|
244
|
+
.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" })) as unknown as Schema.Schema<CreateConsumerRequest>;
|
|
245
|
+
|
|
246
|
+
export type CreateConsumerResponse = { consumerId?: string | null; createdOn?: string | null; queueId?: string | null; script?: string | null; settings?: { batchSize?: number | null; maxConcurrency?: number | null; maxRetries?: number | null; maxWaitTimeMs?: number | null; retryDelay?: number | null } | null; type?: "worker" | null } | { consumerId?: string | null; createdOn?: string | null; queueId?: string | null; settings?: { batchSize?: number | null; maxRetries?: number | null; retryDelay?: number | null; visibilityTimeoutMs?: number | null } | null; type?: "http_pull" | null };
|
|
247
|
+
|
|
248
|
+
export const CreateConsumerResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Union([Schema.Struct({
|
|
249
|
+
consumerId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
250
|
+
createdOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
251
|
+
queueId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
252
|
+
script: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
253
|
+
settings: Schema.optional(Schema.Union([Schema.Struct({
|
|
254
|
+
batchSize: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
|
|
255
|
+
maxConcurrency: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
|
|
256
|
+
maxRetries: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
|
|
257
|
+
maxWaitTimeMs: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
|
|
258
|
+
retryDelay: Schema.optional(Schema.Union([Schema.Number, Schema.Null]))
|
|
259
|
+
}).pipe(Schema.encodeKeys({ batchSize: "batch_size", maxConcurrency: "max_concurrency", maxRetries: "max_retries", maxWaitTimeMs: "max_wait_time_ms", retryDelay: "retry_delay" })), Schema.Null])),
|
|
260
|
+
type: Schema.optional(Schema.Union([Schema.Literal("worker"), Schema.Null]))
|
|
261
|
+
}).pipe(Schema.encodeKeys({ consumerId: "consumer_id", createdOn: "created_on", queueId: "queue_id", script: "script", settings: "settings", type: "type" })), Schema.Struct({
|
|
262
|
+
consumerId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
263
|
+
createdOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
264
|
+
queueId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
265
|
+
settings: Schema.optional(Schema.Union([Schema.Struct({
|
|
266
|
+
batchSize: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
|
|
267
|
+
maxRetries: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
|
|
268
|
+
retryDelay: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
|
|
269
|
+
visibilityTimeoutMs: Schema.optional(Schema.Union([Schema.Number, Schema.Null]))
|
|
270
|
+
}).pipe(Schema.encodeKeys({ batchSize: "batch_size", maxRetries: "max_retries", retryDelay: "retry_delay", visibilityTimeoutMs: "visibility_timeout_ms" })), Schema.Null])),
|
|
271
|
+
type: Schema.optional(Schema.Union([Schema.Literal("http_pull"), Schema.Null]))
|
|
272
|
+
}).pipe(Schema.encodeKeys({ consumerId: "consumer_id", createdOn: "created_on", queueId: "queue_id", settings: "settings", type: "type" }))]).pipe(T.ResponsePath("result")) as unknown as Schema.Schema<CreateConsumerResponse>;
|
|
574
273
|
|
|
575
274
|
export type CreateConsumerError =
|
|
576
275
|
| DefaultErrors
|
|
577
276
|
| InvalidRequestBody
|
|
578
277
|
| QueueNotFound
|
|
278
|
+
| ConsumerAlreadyExists
|
|
279
|
+
| WorkerNotFound
|
|
579
280
|
| InvalidRoute;
|
|
580
281
|
|
|
581
282
|
export const createConsumer: API.OperationMethod<
|
|
@@ -586,7 +287,7 @@ export const createConsumer: API.OperationMethod<
|
|
|
586
287
|
> = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
|
|
587
288
|
input: CreateConsumerRequest,
|
|
588
289
|
output: CreateConsumerResponse,
|
|
589
|
-
errors: [InvalidRequestBody, QueueNotFound, InvalidRoute],
|
|
290
|
+
errors: [InvalidRequestBody, QueueNotFound, ConsumerAlreadyExists, WorkerNotFound, InvalidRoute],
|
|
590
291
|
}));
|
|
591
292
|
|
|
592
293
|
export interface UpdateConsumerRequest {
|
|
@@ -599,13 +300,7 @@ export interface UpdateConsumerRequest {
|
|
|
599
300
|
/** Body param: Name of a Worker */
|
|
600
301
|
scriptName?: string;
|
|
601
302
|
/** Body param: */
|
|
602
|
-
settings?: {
|
|
603
|
-
batchSize?: number;
|
|
604
|
-
maxConcurrency?: number;
|
|
605
|
-
maxRetries?: number;
|
|
606
|
-
maxWaitTimeMs?: number;
|
|
607
|
-
retryDelay?: number;
|
|
608
|
-
};
|
|
303
|
+
settings?: { batchSize?: number; maxConcurrency?: number; maxRetries?: number; maxWaitTimeMs?: number; retryDelay?: number };
|
|
609
304
|
/** Body param: */
|
|
610
305
|
type?: "worker";
|
|
611
306
|
}
|
|
@@ -616,164 +311,51 @@ export const UpdateConsumerRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
|
616
311
|
accountId: Schema.String.pipe(T.HttpPath("account_id")),
|
|
617
312
|
deadLetterQueue: Schema.optional(Schema.String),
|
|
618
313
|
scriptName: Schema.optional(Schema.String),
|
|
619
|
-
settings: Schema.optional(
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
),
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
}),
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
batchSize?: number | null;
|
|
658
|
-
maxConcurrency?: number | null;
|
|
659
|
-
maxRetries?: number | null;
|
|
660
|
-
maxWaitTimeMs?: number | null;
|
|
661
|
-
retryDelay?: number | null;
|
|
662
|
-
} | null;
|
|
663
|
-
type?: "worker" | null;
|
|
664
|
-
}
|
|
665
|
-
| {
|
|
666
|
-
consumerId?: string | null;
|
|
667
|
-
createdOn?: string | null;
|
|
668
|
-
queueId?: string | null;
|
|
669
|
-
settings?: {
|
|
670
|
-
batchSize?: number | null;
|
|
671
|
-
maxRetries?: number | null;
|
|
672
|
-
retryDelay?: number | null;
|
|
673
|
-
visibilityTimeoutMs?: number | null;
|
|
674
|
-
} | null;
|
|
675
|
-
type?: "http_pull" | null;
|
|
676
|
-
};
|
|
677
|
-
|
|
678
|
-
export const UpdateConsumerResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Union([
|
|
679
|
-
Schema.Struct({
|
|
680
|
-
consumerId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
681
|
-
createdOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
682
|
-
queueId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
683
|
-
script: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
684
|
-
settings: Schema.optional(
|
|
685
|
-
Schema.Union([
|
|
686
|
-
Schema.Struct({
|
|
687
|
-
batchSize: Schema.optional(
|
|
688
|
-
Schema.Union([Schema.Number, Schema.Null]),
|
|
689
|
-
),
|
|
690
|
-
maxConcurrency: Schema.optional(
|
|
691
|
-
Schema.Union([Schema.Number, Schema.Null]),
|
|
692
|
-
),
|
|
693
|
-
maxRetries: Schema.optional(
|
|
694
|
-
Schema.Union([Schema.Number, Schema.Null]),
|
|
695
|
-
),
|
|
696
|
-
maxWaitTimeMs: Schema.optional(
|
|
697
|
-
Schema.Union([Schema.Number, Schema.Null]),
|
|
698
|
-
),
|
|
699
|
-
retryDelay: Schema.optional(
|
|
700
|
-
Schema.Union([Schema.Number, Schema.Null]),
|
|
701
|
-
),
|
|
702
|
-
}).pipe(
|
|
703
|
-
Schema.encodeKeys({
|
|
704
|
-
batchSize: "batch_size",
|
|
705
|
-
maxConcurrency: "max_concurrency",
|
|
706
|
-
maxRetries: "max_retries",
|
|
707
|
-
maxWaitTimeMs: "max_wait_time_ms",
|
|
708
|
-
retryDelay: "retry_delay",
|
|
709
|
-
}),
|
|
710
|
-
),
|
|
711
|
-
Schema.Null,
|
|
712
|
-
]),
|
|
713
|
-
),
|
|
714
|
-
type: Schema.optional(
|
|
715
|
-
Schema.Union([Schema.Literal("worker"), Schema.Null]),
|
|
716
|
-
),
|
|
717
|
-
}).pipe(
|
|
718
|
-
Schema.encodeKeys({
|
|
719
|
-
consumerId: "consumer_id",
|
|
720
|
-
createdOn: "created_on",
|
|
721
|
-
queueId: "queue_id",
|
|
722
|
-
script: "script",
|
|
723
|
-
settings: "settings",
|
|
724
|
-
type: "type",
|
|
725
|
-
}),
|
|
726
|
-
),
|
|
727
|
-
Schema.Struct({
|
|
728
|
-
consumerId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
729
|
-
createdOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
730
|
-
queueId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
731
|
-
settings: Schema.optional(
|
|
732
|
-
Schema.Union([
|
|
733
|
-
Schema.Struct({
|
|
734
|
-
batchSize: Schema.optional(
|
|
735
|
-
Schema.Union([Schema.Number, Schema.Null]),
|
|
736
|
-
),
|
|
737
|
-
maxRetries: Schema.optional(
|
|
738
|
-
Schema.Union([Schema.Number, Schema.Null]),
|
|
739
|
-
),
|
|
740
|
-
retryDelay: Schema.optional(
|
|
741
|
-
Schema.Union([Schema.Number, Schema.Null]),
|
|
742
|
-
),
|
|
743
|
-
visibilityTimeoutMs: Schema.optional(
|
|
744
|
-
Schema.Union([Schema.Number, Schema.Null]),
|
|
745
|
-
),
|
|
746
|
-
}).pipe(
|
|
747
|
-
Schema.encodeKeys({
|
|
748
|
-
batchSize: "batch_size",
|
|
749
|
-
maxRetries: "max_retries",
|
|
750
|
-
retryDelay: "retry_delay",
|
|
751
|
-
visibilityTimeoutMs: "visibility_timeout_ms",
|
|
752
|
-
}),
|
|
753
|
-
),
|
|
754
|
-
Schema.Null,
|
|
755
|
-
]),
|
|
756
|
-
),
|
|
757
|
-
type: Schema.optional(
|
|
758
|
-
Schema.Union([Schema.Literal("http_pull"), Schema.Null]),
|
|
759
|
-
),
|
|
760
|
-
}).pipe(
|
|
761
|
-
Schema.encodeKeys({
|
|
762
|
-
consumerId: "consumer_id",
|
|
763
|
-
createdOn: "created_on",
|
|
764
|
-
queueId: "queue_id",
|
|
765
|
-
settings: "settings",
|
|
766
|
-
type: "type",
|
|
767
|
-
}),
|
|
768
|
-
),
|
|
769
|
-
]).pipe(
|
|
770
|
-
T.ResponsePath("result"),
|
|
771
|
-
) as unknown as Schema.Schema<UpdateConsumerResponse>;
|
|
314
|
+
settings: Schema.optional(Schema.Struct({
|
|
315
|
+
batchSize: Schema.optional(Schema.Number),
|
|
316
|
+
maxConcurrency: Schema.optional(Schema.Number),
|
|
317
|
+
maxRetries: Schema.optional(Schema.Number),
|
|
318
|
+
maxWaitTimeMs: Schema.optional(Schema.Number),
|
|
319
|
+
retryDelay: Schema.optional(Schema.Number)
|
|
320
|
+
}).pipe(Schema.encodeKeys({ batchSize: "batch_size", maxConcurrency: "max_concurrency", maxRetries: "max_retries", maxWaitTimeMs: "max_wait_time_ms", retryDelay: "retry_delay" }))),
|
|
321
|
+
type: Schema.optional(Schema.Literal("worker"))
|
|
322
|
+
})
|
|
323
|
+
.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}" })) as unknown as Schema.Schema<UpdateConsumerRequest>;
|
|
324
|
+
|
|
325
|
+
export type UpdateConsumerResponse = { consumerId?: string | null; createdOn?: string | null; queueId?: string | null; script?: string | null; settings?: { batchSize?: number | null; maxConcurrency?: number | null; maxRetries?: number | null; maxWaitTimeMs?: number | null; retryDelay?: number | null } | null; type?: "worker" | null } | { consumerId?: string | null; createdOn?: string | null; queueId?: string | null; settings?: { batchSize?: number | null; maxRetries?: number | null; retryDelay?: number | null; visibilityTimeoutMs?: number | null } | null; type?: "http_pull" | null };
|
|
326
|
+
|
|
327
|
+
export const UpdateConsumerResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Union([Schema.Struct({
|
|
328
|
+
consumerId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
329
|
+
createdOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
330
|
+
queueId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
331
|
+
script: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
332
|
+
settings: Schema.optional(Schema.Union([Schema.Struct({
|
|
333
|
+
batchSize: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
|
|
334
|
+
maxConcurrency: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
|
|
335
|
+
maxRetries: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
|
|
336
|
+
maxWaitTimeMs: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
|
|
337
|
+
retryDelay: Schema.optional(Schema.Union([Schema.Number, Schema.Null]))
|
|
338
|
+
}).pipe(Schema.encodeKeys({ batchSize: "batch_size", maxConcurrency: "max_concurrency", maxRetries: "max_retries", maxWaitTimeMs: "max_wait_time_ms", retryDelay: "retry_delay" })), Schema.Null])),
|
|
339
|
+
type: Schema.optional(Schema.Union([Schema.Literal("worker"), Schema.Null]))
|
|
340
|
+
}).pipe(Schema.encodeKeys({ consumerId: "consumer_id", createdOn: "created_on", queueId: "queue_id", script: "script", settings: "settings", type: "type" })), Schema.Struct({
|
|
341
|
+
consumerId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
342
|
+
createdOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
343
|
+
queueId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
344
|
+
settings: Schema.optional(Schema.Union([Schema.Struct({
|
|
345
|
+
batchSize: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
|
|
346
|
+
maxRetries: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
|
|
347
|
+
retryDelay: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
|
|
348
|
+
visibilityTimeoutMs: Schema.optional(Schema.Union([Schema.Number, Schema.Null]))
|
|
349
|
+
}).pipe(Schema.encodeKeys({ batchSize: "batch_size", maxRetries: "max_retries", retryDelay: "retry_delay", visibilityTimeoutMs: "visibility_timeout_ms" })), Schema.Null])),
|
|
350
|
+
type: Schema.optional(Schema.Union([Schema.Literal("http_pull"), Schema.Null]))
|
|
351
|
+
}).pipe(Schema.encodeKeys({ consumerId: "consumer_id", createdOn: "created_on", queueId: "queue_id", settings: "settings", type: "type" }))]).pipe(T.ResponsePath("result")) as unknown as Schema.Schema<UpdateConsumerResponse>;
|
|
772
352
|
|
|
773
353
|
export type UpdateConsumerError =
|
|
774
354
|
| DefaultErrors
|
|
775
355
|
| InvalidRequestBody
|
|
776
356
|
| QueueNotFound
|
|
357
|
+
| ConsumerNotFound
|
|
358
|
+
| WorkerNotFound
|
|
777
359
|
| InvalidRoute;
|
|
778
360
|
|
|
779
361
|
export const updateConsumer: API.OperationMethod<
|
|
@@ -784,7 +366,7 @@ export const updateConsumer: API.OperationMethod<
|
|
|
784
366
|
> = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
|
|
785
367
|
input: UpdateConsumerRequest,
|
|
786
368
|
output: UpdateConsumerResponse,
|
|
787
|
-
errors: [InvalidRequestBody, QueueNotFound, InvalidRoute],
|
|
369
|
+
errors: [InvalidRequestBody, QueueNotFound, ConsumerNotFound, WorkerNotFound, InvalidRoute],
|
|
788
370
|
}));
|
|
789
371
|
|
|
790
372
|
export interface DeleteConsumerRequest {
|
|
@@ -797,72 +379,35 @@ export interface DeleteConsumerRequest {
|
|
|
797
379
|
export const DeleteConsumerRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
798
380
|
queueId: Schema.String.pipe(T.HttpPath("queueId")),
|
|
799
381
|
consumerId: Schema.String.pipe(T.HttpPath("consumerId")),
|
|
800
|
-
accountId: Schema.String.pipe(T.HttpPath("account_id"))
|
|
801
|
-
})
|
|
802
|
-
T.Http({
|
|
803
|
-
method: "DELETE",
|
|
804
|
-
path: "/accounts/{account_id}/queues/{queueId}/consumers/{consumerId}",
|
|
805
|
-
}),
|
|
806
|
-
) as unknown as Schema.Schema<DeleteConsumerRequest>;
|
|
382
|
+
accountId: Schema.String.pipe(T.HttpPath("account_id"))
|
|
383
|
+
})
|
|
384
|
+
.pipe(T.Http({ method: "DELETE", path: "/accounts/{account_id}/queues/{queueId}/consumers/{consumerId}" })) as unknown as Schema.Schema<DeleteConsumerRequest>;
|
|
807
385
|
|
|
808
386
|
export interface DeleteConsumerResponse {
|
|
809
|
-
errors?:
|
|
810
|
-
| {
|
|
811
|
-
code: number;
|
|
812
|
-
message: string;
|
|
813
|
-
documentationUrl?: string | null;
|
|
814
|
-
source?: { pointer?: string | null } | null;
|
|
815
|
-
}[]
|
|
816
|
-
| null;
|
|
387
|
+
errors?: ({ code: number; message: string; documentationUrl?: string | null; source?: { pointer?: string | null } | null })[] | null;
|
|
817
388
|
messages?: string[] | null;
|
|
818
389
|
/** Indicates if the API call was successful or not. */
|
|
819
390
|
success?: true | null;
|
|
820
391
|
}
|
|
821
392
|
|
|
822
|
-
export const DeleteConsumerResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct(
|
|
823
|
-
{
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
Schema.Union([
|
|
835
|
-
Schema.Struct({
|
|
836
|
-
pointer: Schema.optional(
|
|
837
|
-
Schema.Union([Schema.String, Schema.Null]),
|
|
838
|
-
),
|
|
839
|
-
}),
|
|
840
|
-
Schema.Null,
|
|
841
|
-
]),
|
|
842
|
-
),
|
|
843
|
-
}).pipe(
|
|
844
|
-
Schema.encodeKeys({
|
|
845
|
-
code: "code",
|
|
846
|
-
message: "message",
|
|
847
|
-
documentationUrl: "documentation_url",
|
|
848
|
-
source: "source",
|
|
849
|
-
}),
|
|
850
|
-
),
|
|
851
|
-
),
|
|
852
|
-
Schema.Null,
|
|
853
|
-
]),
|
|
854
|
-
),
|
|
855
|
-
messages: Schema.optional(
|
|
856
|
-
Schema.Union([Schema.Array(Schema.String), Schema.Null]),
|
|
857
|
-
),
|
|
858
|
-
success: Schema.optional(Schema.Union([Schema.Literal(true), Schema.Null])),
|
|
859
|
-
},
|
|
860
|
-
) as unknown as Schema.Schema<DeleteConsumerResponse>;
|
|
393
|
+
export const DeleteConsumerResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
394
|
+
errors: Schema.optional(Schema.Union([Schema.Array(Schema.Struct({
|
|
395
|
+
code: Schema.Number,
|
|
396
|
+
message: Schema.String,
|
|
397
|
+
documentationUrl: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
398
|
+
source: Schema.optional(Schema.Union([Schema.Struct({
|
|
399
|
+
pointer: Schema.optional(Schema.Union([Schema.String, Schema.Null]))
|
|
400
|
+
}), Schema.Null]))
|
|
401
|
+
}).pipe(Schema.encodeKeys({ code: "code", message: "message", documentationUrl: "documentation_url", source: "source" }))), Schema.Null])),
|
|
402
|
+
messages: Schema.optional(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
|
|
403
|
+
success: Schema.optional(Schema.Union([Schema.Literal(true), Schema.Null]))
|
|
404
|
+
}) as unknown as Schema.Schema<DeleteConsumerResponse>;
|
|
861
405
|
|
|
862
406
|
export type DeleteConsumerError =
|
|
863
407
|
| DefaultErrors
|
|
864
408
|
| InvalidRequestBody
|
|
865
409
|
| QueueNotFound
|
|
410
|
+
| ConsumerNotFound
|
|
866
411
|
| InvalidRoute;
|
|
867
412
|
|
|
868
413
|
export const deleteConsumer: API.OperationMethod<
|
|
@@ -873,9 +418,10 @@ export const deleteConsumer: API.OperationMethod<
|
|
|
873
418
|
> = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
|
|
874
419
|
input: DeleteConsumerRequest,
|
|
875
420
|
output: DeleteConsumerResponse,
|
|
876
|
-
errors: [InvalidRequestBody, QueueNotFound, InvalidRoute],
|
|
421
|
+
errors: [InvalidRequestBody, QueueNotFound, ConsumerNotFound, InvalidRoute],
|
|
877
422
|
}));
|
|
878
423
|
|
|
424
|
+
|
|
879
425
|
// =============================================================================
|
|
880
426
|
// Message
|
|
881
427
|
// =============================================================================
|
|
@@ -887,105 +433,44 @@ export interface BulkPushMessagesRequest {
|
|
|
887
433
|
/** Body param: The number of seconds to wait for attempting to deliver this batch to consumers */
|
|
888
434
|
delaySeconds?: number;
|
|
889
435
|
/** Body param: */
|
|
890
|
-
messages?: (
|
|
891
|
-
| { body?: string; contentType?: "text"; delaySeconds?: number }
|
|
892
|
-
| { body?: unknown; contentType?: "json"; delaySeconds?: number }
|
|
893
|
-
)[];
|
|
436
|
+
messages?: ({ body?: string; contentType?: "text"; delaySeconds?: number } | { body?: unknown; contentType?: "json"; delaySeconds?: number })[];
|
|
894
437
|
}
|
|
895
438
|
|
|
896
|
-
export const BulkPushMessagesRequest =
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
contentType: "content_type",
|
|
912
|
-
delaySeconds: "delay_seconds",
|
|
913
|
-
}),
|
|
914
|
-
),
|
|
915
|
-
Schema.Struct({
|
|
916
|
-
body: Schema.optional(Schema.Unknown),
|
|
917
|
-
contentType: Schema.optional(Schema.Literal("json")),
|
|
918
|
-
delaySeconds: Schema.optional(Schema.Number),
|
|
919
|
-
}).pipe(
|
|
920
|
-
Schema.encodeKeys({
|
|
921
|
-
body: "body",
|
|
922
|
-
contentType: "content_type",
|
|
923
|
-
delaySeconds: "delay_seconds",
|
|
924
|
-
}),
|
|
925
|
-
),
|
|
926
|
-
]),
|
|
927
|
-
),
|
|
928
|
-
),
|
|
929
|
-
}).pipe(
|
|
930
|
-
Schema.encodeKeys({ delaySeconds: "delay_seconds", messages: "messages" }),
|
|
931
|
-
T.Http({
|
|
932
|
-
method: "POST",
|
|
933
|
-
path: "/accounts/{account_id}/queues/{queueId}/messages/batch",
|
|
934
|
-
}),
|
|
935
|
-
) as unknown as Schema.Schema<BulkPushMessagesRequest>;
|
|
439
|
+
export const BulkPushMessagesRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
440
|
+
queueId: Schema.String.pipe(T.HttpPath("queueId")),
|
|
441
|
+
accountId: Schema.String.pipe(T.HttpPath("account_id")),
|
|
442
|
+
delaySeconds: Schema.optional(Schema.Number),
|
|
443
|
+
messages: Schema.optional(Schema.Array(Schema.Union([Schema.Struct({
|
|
444
|
+
body: Schema.optional(Schema.String),
|
|
445
|
+
contentType: Schema.optional(Schema.Literal("text")),
|
|
446
|
+
delaySeconds: Schema.optional(Schema.Number)
|
|
447
|
+
}).pipe(Schema.encodeKeys({ body: "body", contentType: "content_type", delaySeconds: "delay_seconds" })), Schema.Struct({
|
|
448
|
+
body: Schema.optional(Schema.Unknown),
|
|
449
|
+
contentType: Schema.optional(Schema.Literal("json")),
|
|
450
|
+
delaySeconds: Schema.optional(Schema.Number)
|
|
451
|
+
}).pipe(Schema.encodeKeys({ body: "body", contentType: "content_type", delaySeconds: "delay_seconds" }))])))
|
|
452
|
+
})
|
|
453
|
+
.pipe(Schema.encodeKeys({ delaySeconds: "delay_seconds", messages: "messages" }), T.Http({ method: "POST", path: "/accounts/{account_id}/queues/{queueId}/messages/batch" })) as unknown as Schema.Schema<BulkPushMessagesRequest>;
|
|
936
454
|
|
|
937
455
|
export interface BulkPushMessagesResponse {
|
|
938
|
-
errors?:
|
|
939
|
-
| {
|
|
940
|
-
code: number;
|
|
941
|
-
message: string;
|
|
942
|
-
documentationUrl?: string | null;
|
|
943
|
-
source?: { pointer?: string | null } | null;
|
|
944
|
-
}[]
|
|
945
|
-
| null;
|
|
456
|
+
errors?: ({ code: number; message: string; documentationUrl?: string | null; source?: { pointer?: string | null } | null })[] | null;
|
|
946
457
|
messages?: string[] | null;
|
|
947
458
|
/** Indicates if the API call was successful or not. */
|
|
948
459
|
success?: true | null;
|
|
949
460
|
}
|
|
950
461
|
|
|
951
|
-
export const BulkPushMessagesResponse =
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
Schema.Union([
|
|
964
|
-
Schema.Struct({
|
|
965
|
-
pointer: Schema.optional(
|
|
966
|
-
Schema.Union([Schema.String, Schema.Null]),
|
|
967
|
-
),
|
|
968
|
-
}),
|
|
969
|
-
Schema.Null,
|
|
970
|
-
]),
|
|
971
|
-
),
|
|
972
|
-
}).pipe(
|
|
973
|
-
Schema.encodeKeys({
|
|
974
|
-
code: "code",
|
|
975
|
-
message: "message",
|
|
976
|
-
documentationUrl: "documentation_url",
|
|
977
|
-
source: "source",
|
|
978
|
-
}),
|
|
979
|
-
),
|
|
980
|
-
),
|
|
981
|
-
Schema.Null,
|
|
982
|
-
]),
|
|
983
|
-
),
|
|
984
|
-
messages: Schema.optional(
|
|
985
|
-
Schema.Union([Schema.Array(Schema.String), Schema.Null]),
|
|
986
|
-
),
|
|
987
|
-
success: Schema.optional(Schema.Union([Schema.Literal(true), Schema.Null])),
|
|
988
|
-
}) as unknown as Schema.Schema<BulkPushMessagesResponse>;
|
|
462
|
+
export const BulkPushMessagesResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
463
|
+
errors: Schema.optional(Schema.Union([Schema.Array(Schema.Struct({
|
|
464
|
+
code: Schema.Number,
|
|
465
|
+
message: Schema.String,
|
|
466
|
+
documentationUrl: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
467
|
+
source: Schema.optional(Schema.Union([Schema.Struct({
|
|
468
|
+
pointer: Schema.optional(Schema.Union([Schema.String, Schema.Null]))
|
|
469
|
+
}), Schema.Null]))
|
|
470
|
+
}).pipe(Schema.encodeKeys({ code: "code", message: "message", documentationUrl: "documentation_url", source: "source" }))), Schema.Null])),
|
|
471
|
+
messages: Schema.optional(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
|
|
472
|
+
success: Schema.optional(Schema.Union([Schema.Literal(true), Schema.Null]))
|
|
473
|
+
}) as unknown as Schema.Schema<BulkPushMessagesResponse>;
|
|
989
474
|
|
|
990
475
|
export type BulkPushMessagesError =
|
|
991
476
|
| DefaultErrors
|
|
@@ -1018,80 +503,33 @@ export const PullMessageRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
|
1018
503
|
queueId: Schema.String.pipe(T.HttpPath("queueId")),
|
|
1019
504
|
accountId: Schema.String.pipe(T.HttpPath("account_id")),
|
|
1020
505
|
batchSize: Schema.optional(Schema.Number),
|
|
1021
|
-
visibilityTimeoutMs: Schema.optional(Schema.Number)
|
|
1022
|
-
})
|
|
1023
|
-
Schema.encodeKeys({
|
|
1024
|
-
batchSize: "batch_size",
|
|
1025
|
-
visibilityTimeoutMs: "visibility_timeout_ms",
|
|
1026
|
-
}),
|
|
1027
|
-
T.Http({
|
|
1028
|
-
method: "POST",
|
|
1029
|
-
path: "/accounts/{account_id}/queues/{queueId}/messages/pull",
|
|
1030
|
-
}),
|
|
1031
|
-
) as unknown as Schema.Schema<PullMessageRequest>;
|
|
506
|
+
visibilityTimeoutMs: Schema.optional(Schema.Number)
|
|
507
|
+
})
|
|
508
|
+
.pipe(Schema.encodeKeys({ batchSize: "batch_size", visibilityTimeoutMs: "visibility_timeout_ms" }), T.Http({ method: "POST", path: "/accounts/{account_id}/queues/{queueId}/messages/pull" })) as unknown as Schema.Schema<PullMessageRequest>;
|
|
1032
509
|
|
|
1033
510
|
export interface PullMessageResponse {
|
|
1034
511
|
/** The number of unacknowledged messages in the queue */
|
|
1035
512
|
messageBacklogCount?: number | null;
|
|
1036
|
-
messages?:
|
|
1037
|
-
| {
|
|
1038
|
-
id?: string | null;
|
|
1039
|
-
attempts?: number | null;
|
|
1040
|
-
body?: string | null;
|
|
1041
|
-
leaseId?: string | null;
|
|
1042
|
-
metadata?: unknown | null;
|
|
1043
|
-
timestampMs?: number | null;
|
|
1044
|
-
}[]
|
|
1045
|
-
| null;
|
|
513
|
+
messages?: ({ id?: string | null; attempts?: number | null; body?: string | null; leaseId?: string | null; metadata?: unknown | null; timestampMs?: number | null })[] | null;
|
|
1046
514
|
}
|
|
1047
515
|
|
|
1048
516
|
export const PullMessageResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
1049
|
-
messageBacklogCount: Schema.optional(
|
|
1050
|
-
|
|
1051
|
-
),
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
leaseId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
1060
|
-
metadata: Schema.optional(
|
|
1061
|
-
Schema.Union([Schema.Unknown, Schema.Null]),
|
|
1062
|
-
),
|
|
1063
|
-
timestampMs: Schema.optional(
|
|
1064
|
-
Schema.Union([Schema.Number, Schema.Null]),
|
|
1065
|
-
),
|
|
1066
|
-
}).pipe(
|
|
1067
|
-
Schema.encodeKeys({
|
|
1068
|
-
id: "id",
|
|
1069
|
-
attempts: "attempts",
|
|
1070
|
-
body: "body",
|
|
1071
|
-
leaseId: "lease_id",
|
|
1072
|
-
metadata: "metadata",
|
|
1073
|
-
timestampMs: "timestamp_ms",
|
|
1074
|
-
}),
|
|
1075
|
-
),
|
|
1076
|
-
),
|
|
1077
|
-
Schema.Null,
|
|
1078
|
-
]),
|
|
1079
|
-
),
|
|
1080
|
-
})
|
|
1081
|
-
.pipe(
|
|
1082
|
-
Schema.encodeKeys({
|
|
1083
|
-
messageBacklogCount: "message_backlog_count",
|
|
1084
|
-
messages: "messages",
|
|
1085
|
-
}),
|
|
1086
|
-
)
|
|
1087
|
-
.pipe(
|
|
1088
|
-
T.ResponsePath("result"),
|
|
1089
|
-
) as unknown as Schema.Schema<PullMessageResponse>;
|
|
517
|
+
messageBacklogCount: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
|
|
518
|
+
messages: Schema.optional(Schema.Union([Schema.Array(Schema.Struct({
|
|
519
|
+
id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
520
|
+
attempts: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
|
|
521
|
+
body: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
522
|
+
leaseId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
523
|
+
metadata: Schema.optional(Schema.Union([Schema.Unknown, Schema.Null])),
|
|
524
|
+
timestampMs: Schema.optional(Schema.Union([Schema.Number, Schema.Null]))
|
|
525
|
+
}).pipe(Schema.encodeKeys({ id: "id", attempts: "attempts", body: "body", leaseId: "lease_id", metadata: "metadata", timestampMs: "timestamp_ms" }))), Schema.Null]))
|
|
526
|
+
}).pipe(Schema.encodeKeys({ messageBacklogCount: "message_backlog_count", messages: "messages" })).pipe(T.ResponsePath("result")) as unknown as Schema.Schema<PullMessageResponse>;
|
|
1090
527
|
|
|
1091
528
|
export type PullMessageError =
|
|
1092
529
|
| DefaultErrors
|
|
1093
530
|
| InvalidRequestBody
|
|
1094
531
|
| InvalidQueueId
|
|
532
|
+
| QueueNotFound
|
|
1095
533
|
| InvalidRoute;
|
|
1096
534
|
|
|
1097
535
|
export const pullMessage: API.OperationMethod<
|
|
@@ -1102,7 +540,7 @@ export const pullMessage: API.OperationMethod<
|
|
|
1102
540
|
> = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
|
|
1103
541
|
input: PullMessageRequest,
|
|
1104
542
|
output: PullMessageResponse,
|
|
1105
|
-
errors: [InvalidRequestBody, InvalidQueueId, InvalidRoute],
|
|
543
|
+
errors: [InvalidRequestBody, InvalidQueueId, QueueNotFound, InvalidRoute],
|
|
1106
544
|
}));
|
|
1107
545
|
|
|
1108
546
|
export interface PushMessageRequest {
|
|
@@ -1122,69 +560,28 @@ export const PushMessageRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
|
1122
560
|
accountId: Schema.String.pipe(T.HttpPath("account_id")),
|
|
1123
561
|
body: Schema.optional(Schema.String),
|
|
1124
562
|
contentType: Schema.optional(Schema.Literal("text")),
|
|
1125
|
-
delaySeconds: Schema.optional(Schema.Number)
|
|
1126
|
-
})
|
|
1127
|
-
Schema.encodeKeys({
|
|
1128
|
-
body: "body",
|
|
1129
|
-
contentType: "content_type",
|
|
1130
|
-
delaySeconds: "delay_seconds",
|
|
1131
|
-
}),
|
|
1132
|
-
T.Http({
|
|
1133
|
-
method: "POST",
|
|
1134
|
-
path: "/accounts/{account_id}/queues/{queueId}/messages",
|
|
1135
|
-
}),
|
|
1136
|
-
) as unknown as Schema.Schema<PushMessageRequest>;
|
|
563
|
+
delaySeconds: Schema.optional(Schema.Number)
|
|
564
|
+
})
|
|
565
|
+
.pipe(Schema.encodeKeys({ body: "body", contentType: "content_type", delaySeconds: "delay_seconds" }), T.Http({ method: "POST", path: "/accounts/{account_id}/queues/{queueId}/messages" })) as unknown as Schema.Schema<PushMessageRequest>;
|
|
1137
566
|
|
|
1138
567
|
export interface PushMessageResponse {
|
|
1139
|
-
errors?:
|
|
1140
|
-
| {
|
|
1141
|
-
code: number;
|
|
1142
|
-
message: string;
|
|
1143
|
-
documentationUrl?: string | null;
|
|
1144
|
-
source?: { pointer?: string | null } | null;
|
|
1145
|
-
}[]
|
|
1146
|
-
| null;
|
|
568
|
+
errors?: ({ code: number; message: string; documentationUrl?: string | null; source?: { pointer?: string | null } | null })[] | null;
|
|
1147
569
|
messages?: string[] | null;
|
|
1148
570
|
/** Indicates if the API call was successful or not. */
|
|
1149
571
|
success?: true | null;
|
|
1150
572
|
}
|
|
1151
573
|
|
|
1152
574
|
export const PushMessageResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
1153
|
-
errors: Schema.optional(
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
Schema.Union([
|
|
1164
|
-
Schema.Struct({
|
|
1165
|
-
pointer: Schema.optional(
|
|
1166
|
-
Schema.Union([Schema.String, Schema.Null]),
|
|
1167
|
-
),
|
|
1168
|
-
}),
|
|
1169
|
-
Schema.Null,
|
|
1170
|
-
]),
|
|
1171
|
-
),
|
|
1172
|
-
}).pipe(
|
|
1173
|
-
Schema.encodeKeys({
|
|
1174
|
-
code: "code",
|
|
1175
|
-
message: "message",
|
|
1176
|
-
documentationUrl: "documentation_url",
|
|
1177
|
-
source: "source",
|
|
1178
|
-
}),
|
|
1179
|
-
),
|
|
1180
|
-
),
|
|
1181
|
-
Schema.Null,
|
|
1182
|
-
]),
|
|
1183
|
-
),
|
|
1184
|
-
messages: Schema.optional(
|
|
1185
|
-
Schema.Union([Schema.Array(Schema.String), Schema.Null]),
|
|
1186
|
-
),
|
|
1187
|
-
success: Schema.optional(Schema.Union([Schema.Literal(true), Schema.Null])),
|
|
575
|
+
errors: Schema.optional(Schema.Union([Schema.Array(Schema.Struct({
|
|
576
|
+
code: Schema.Number,
|
|
577
|
+
message: Schema.String,
|
|
578
|
+
documentationUrl: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
579
|
+
source: Schema.optional(Schema.Union([Schema.Struct({
|
|
580
|
+
pointer: Schema.optional(Schema.Union([Schema.String, Schema.Null]))
|
|
581
|
+
}), Schema.Null]))
|
|
582
|
+
}).pipe(Schema.encodeKeys({ code: "code", message: "message", documentationUrl: "documentation_url", source: "source" }))), Schema.Null])),
|
|
583
|
+
messages: Schema.optional(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
|
|
584
|
+
success: Schema.optional(Schema.Union([Schema.Literal(true), Schema.Null]))
|
|
1188
585
|
}) as unknown as Schema.Schema<PushMessageResponse>;
|
|
1189
586
|
|
|
1190
587
|
export type PushMessageError =
|
|
@@ -1217,32 +614,15 @@ export interface AckMessageRequest {
|
|
|
1217
614
|
export const AckMessageRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
1218
615
|
queueId: Schema.String.pipe(T.HttpPath("queueId")),
|
|
1219
616
|
accountId: Schema.String.pipe(T.HttpPath("account_id")),
|
|
1220
|
-
acks: Schema.optional(
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
Schema.Struct({
|
|
1230
|
-
delaySeconds: Schema.optional(Schema.Number),
|
|
1231
|
-
leaseId: Schema.optional(Schema.String),
|
|
1232
|
-
}).pipe(
|
|
1233
|
-
Schema.encodeKeys({
|
|
1234
|
-
delaySeconds: "delay_seconds",
|
|
1235
|
-
leaseId: "lease_id",
|
|
1236
|
-
}),
|
|
1237
|
-
),
|
|
1238
|
-
),
|
|
1239
|
-
),
|
|
1240
|
-
}).pipe(
|
|
1241
|
-
T.Http({
|
|
1242
|
-
method: "POST",
|
|
1243
|
-
path: "/accounts/{account_id}/queues/{queueId}/messages/ack",
|
|
1244
|
-
}),
|
|
1245
|
-
) as unknown as Schema.Schema<AckMessageRequest>;
|
|
617
|
+
acks: Schema.optional(Schema.Array(Schema.Struct({
|
|
618
|
+
leaseId: Schema.optional(Schema.String)
|
|
619
|
+
}).pipe(Schema.encodeKeys({ leaseId: "lease_id" })))),
|
|
620
|
+
retries: Schema.optional(Schema.Array(Schema.Struct({
|
|
621
|
+
delaySeconds: Schema.optional(Schema.Number),
|
|
622
|
+
leaseId: Schema.optional(Schema.String)
|
|
623
|
+
}).pipe(Schema.encodeKeys({ delaySeconds: "delay_seconds", leaseId: "lease_id" }))))
|
|
624
|
+
})
|
|
625
|
+
.pipe(T.Http({ method: "POST", path: "/accounts/{account_id}/queues/{queueId}/messages/ack" })) as unknown as Schema.Schema<AckMessageRequest>;
|
|
1246
626
|
|
|
1247
627
|
export interface AckMessageResponse {
|
|
1248
628
|
/** The number of messages that were succesfully acknowledged. */
|
|
@@ -1255,17 +635,14 @@ export interface AckMessageResponse {
|
|
|
1255
635
|
export const AckMessageResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
1256
636
|
ackCount: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
|
|
1257
637
|
retryCount: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
|
|
1258
|
-
warnings: Schema.optional(
|
|
1259
|
-
|
|
1260
|
-
),
|
|
1261
|
-
}).pipe(
|
|
1262
|
-
T.ResponsePath("result"),
|
|
1263
|
-
) as unknown as Schema.Schema<AckMessageResponse>;
|
|
638
|
+
warnings: Schema.optional(Schema.Union([Schema.Array(Schema.String), Schema.Null]))
|
|
639
|
+
}).pipe(T.ResponsePath("result")) as unknown as Schema.Schema<AckMessageResponse>;
|
|
1264
640
|
|
|
1265
641
|
export type AckMessageError =
|
|
1266
642
|
| DefaultErrors
|
|
1267
643
|
| InvalidRequestBody
|
|
1268
644
|
| InvalidQueueId
|
|
645
|
+
| QueueNotFound
|
|
1269
646
|
| InvalidRoute;
|
|
1270
647
|
|
|
1271
648
|
export const ackMessage: API.OperationMethod<
|
|
@@ -1276,9 +653,10 @@ export const ackMessage: API.OperationMethod<
|
|
|
1276
653
|
> = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
|
|
1277
654
|
input: AckMessageRequest,
|
|
1278
655
|
output: AckMessageResponse,
|
|
1279
|
-
errors: [InvalidRequestBody, InvalidQueueId, InvalidRoute],
|
|
656
|
+
errors: [InvalidRequestBody, InvalidQueueId, QueueNotFound, InvalidRoute],
|
|
1280
657
|
}));
|
|
1281
658
|
|
|
659
|
+
|
|
1282
660
|
// =============================================================================
|
|
1283
661
|
// Purge
|
|
1284
662
|
// =============================================================================
|
|
@@ -1294,255 +672,72 @@ export interface StartPurgeRequest {
|
|
|
1294
672
|
export const StartPurgeRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
1295
673
|
queueId: Schema.String.pipe(T.HttpPath("queueId")),
|
|
1296
674
|
accountId: Schema.String.pipe(T.HttpPath("account_id")),
|
|
1297
|
-
deleteMessagesPermanently: Schema.optional(Schema.Boolean)
|
|
1298
|
-
})
|
|
1299
|
-
Schema.encodeKeys({
|
|
1300
|
-
deleteMessagesPermanently: "delete_messages_permanently",
|
|
1301
|
-
}),
|
|
1302
|
-
T.Http({
|
|
1303
|
-
method: "POST",
|
|
1304
|
-
path: "/accounts/{account_id}/queues/{queueId}/purge",
|
|
1305
|
-
}),
|
|
1306
|
-
) as unknown as Schema.Schema<StartPurgeRequest>;
|
|
675
|
+
deleteMessagesPermanently: Schema.optional(Schema.Boolean)
|
|
676
|
+
})
|
|
677
|
+
.pipe(Schema.encodeKeys({ deleteMessagesPermanently: "delete_messages_permanently" }), T.Http({ method: "POST", path: "/accounts/{account_id}/queues/{queueId}/purge" })) as unknown as Schema.Schema<StartPurgeRequest>;
|
|
1307
678
|
|
|
1308
679
|
export interface StartPurgeResponse {
|
|
1309
|
-
consumers?:
|
|
1310
|
-
| (
|
|
1311
|
-
| {
|
|
1312
|
-
consumerId?: string | null;
|
|
1313
|
-
createdOn?: string | null;
|
|
1314
|
-
queueId?: string | null;
|
|
1315
|
-
script?: string | null;
|
|
1316
|
-
settings?: {
|
|
1317
|
-
batchSize?: number | null;
|
|
1318
|
-
maxConcurrency?: number | null;
|
|
1319
|
-
maxRetries?: number | null;
|
|
1320
|
-
maxWaitTimeMs?: number | null;
|
|
1321
|
-
retryDelay?: number | null;
|
|
1322
|
-
} | null;
|
|
1323
|
-
type?: "worker" | null;
|
|
1324
|
-
}
|
|
1325
|
-
| {
|
|
1326
|
-
consumerId?: string | null;
|
|
1327
|
-
createdOn?: string | null;
|
|
1328
|
-
queueId?: string | null;
|
|
1329
|
-
settings?: {
|
|
1330
|
-
batchSize?: number | null;
|
|
1331
|
-
maxRetries?: number | null;
|
|
1332
|
-
retryDelay?: number | null;
|
|
1333
|
-
visibilityTimeoutMs?: number | null;
|
|
1334
|
-
} | null;
|
|
1335
|
-
type?: "http_pull" | null;
|
|
1336
|
-
}
|
|
1337
|
-
)[]
|
|
1338
|
-
| null;
|
|
680
|
+
consumers?: ({ consumerId?: string | null; createdOn?: string | null; queueId?: string | null; script?: string | null; settings?: { batchSize?: number | null; maxConcurrency?: number | null; maxRetries?: number | null; maxWaitTimeMs?: number | null; retryDelay?: number | null } | null; type?: "worker" | null } | { consumerId?: string | null; createdOn?: string | null; queueId?: string | null; settings?: { batchSize?: number | null; maxRetries?: number | null; retryDelay?: number | null; visibilityTimeoutMs?: number | null } | null; type?: "http_pull" | null })[] | null;
|
|
1339
681
|
consumersTotalCount?: number | null;
|
|
1340
682
|
createdOn?: string | null;
|
|
1341
683
|
modifiedOn?: string | null;
|
|
1342
|
-
producers?:
|
|
1343
|
-
| (
|
|
1344
|
-
| { script?: string | null; type?: "worker" | null }
|
|
1345
|
-
| { bucketName?: string | null; type?: "r2_bucket" | null }
|
|
1346
|
-
)[]
|
|
1347
|
-
| null;
|
|
684
|
+
producers?: ({ script?: string | null; type?: "worker" | null } | { bucketName?: string | null; type?: "r2_bucket" | null })[] | null;
|
|
1348
685
|
producersTotalCount?: number | null;
|
|
1349
686
|
queueId?: string | null;
|
|
1350
687
|
queueName?: string | null;
|
|
1351
|
-
settings?: {
|
|
1352
|
-
deliveryDelay?: number | null;
|
|
1353
|
-
deliveryPaused?: boolean | null;
|
|
1354
|
-
messageRetentionPeriod?: number | null;
|
|
1355
|
-
} | null;
|
|
688
|
+
settings?: { deliveryDelay?: number | null; deliveryPaused?: boolean | null; messageRetentionPeriod?: number | null } | null;
|
|
1356
689
|
}
|
|
1357
690
|
|
|
1358
691
|
export const StartPurgeResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
1359
|
-
consumers: Schema.optional(
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
),
|
|
1386
|
-
maxWaitTimeMs: Schema.optional(
|
|
1387
|
-
Schema.Union([Schema.Number, Schema.Null]),
|
|
1388
|
-
),
|
|
1389
|
-
retryDelay: Schema.optional(
|
|
1390
|
-
Schema.Union([Schema.Number, Schema.Null]),
|
|
1391
|
-
),
|
|
1392
|
-
}).pipe(
|
|
1393
|
-
Schema.encodeKeys({
|
|
1394
|
-
batchSize: "batch_size",
|
|
1395
|
-
maxConcurrency: "max_concurrency",
|
|
1396
|
-
maxRetries: "max_retries",
|
|
1397
|
-
maxWaitTimeMs: "max_wait_time_ms",
|
|
1398
|
-
retryDelay: "retry_delay",
|
|
1399
|
-
}),
|
|
1400
|
-
),
|
|
1401
|
-
Schema.Null,
|
|
1402
|
-
]),
|
|
1403
|
-
),
|
|
1404
|
-
type: Schema.optional(
|
|
1405
|
-
Schema.Union([Schema.Literal("worker"), Schema.Null]),
|
|
1406
|
-
),
|
|
1407
|
-
}).pipe(
|
|
1408
|
-
Schema.encodeKeys({
|
|
1409
|
-
consumerId: "consumer_id",
|
|
1410
|
-
createdOn: "created_on",
|
|
1411
|
-
queueId: "queue_id",
|
|
1412
|
-
script: "script",
|
|
1413
|
-
settings: "settings",
|
|
1414
|
-
type: "type",
|
|
1415
|
-
}),
|
|
1416
|
-
),
|
|
1417
|
-
Schema.Struct({
|
|
1418
|
-
consumerId: Schema.optional(
|
|
1419
|
-
Schema.Union([Schema.String, Schema.Null]),
|
|
1420
|
-
),
|
|
1421
|
-
createdOn: Schema.optional(
|
|
1422
|
-
Schema.Union([Schema.String, Schema.Null]),
|
|
1423
|
-
),
|
|
1424
|
-
queueId: Schema.optional(
|
|
1425
|
-
Schema.Union([Schema.String, Schema.Null]),
|
|
1426
|
-
),
|
|
1427
|
-
settings: Schema.optional(
|
|
1428
|
-
Schema.Union([
|
|
1429
|
-
Schema.Struct({
|
|
1430
|
-
batchSize: Schema.optional(
|
|
1431
|
-
Schema.Union([Schema.Number, Schema.Null]),
|
|
1432
|
-
),
|
|
1433
|
-
maxRetries: Schema.optional(
|
|
1434
|
-
Schema.Union([Schema.Number, Schema.Null]),
|
|
1435
|
-
),
|
|
1436
|
-
retryDelay: Schema.optional(
|
|
1437
|
-
Schema.Union([Schema.Number, Schema.Null]),
|
|
1438
|
-
),
|
|
1439
|
-
visibilityTimeoutMs: Schema.optional(
|
|
1440
|
-
Schema.Union([Schema.Number, Schema.Null]),
|
|
1441
|
-
),
|
|
1442
|
-
}).pipe(
|
|
1443
|
-
Schema.encodeKeys({
|
|
1444
|
-
batchSize: "batch_size",
|
|
1445
|
-
maxRetries: "max_retries",
|
|
1446
|
-
retryDelay: "retry_delay",
|
|
1447
|
-
visibilityTimeoutMs: "visibility_timeout_ms",
|
|
1448
|
-
}),
|
|
1449
|
-
),
|
|
1450
|
-
Schema.Null,
|
|
1451
|
-
]),
|
|
1452
|
-
),
|
|
1453
|
-
type: Schema.optional(
|
|
1454
|
-
Schema.Union([Schema.Literal("http_pull"), Schema.Null]),
|
|
1455
|
-
),
|
|
1456
|
-
}).pipe(
|
|
1457
|
-
Schema.encodeKeys({
|
|
1458
|
-
consumerId: "consumer_id",
|
|
1459
|
-
createdOn: "created_on",
|
|
1460
|
-
queueId: "queue_id",
|
|
1461
|
-
settings: "settings",
|
|
1462
|
-
type: "type",
|
|
1463
|
-
}),
|
|
1464
|
-
),
|
|
1465
|
-
]),
|
|
1466
|
-
),
|
|
1467
|
-
Schema.Null,
|
|
1468
|
-
]),
|
|
1469
|
-
),
|
|
1470
|
-
consumersTotalCount: Schema.optional(
|
|
1471
|
-
Schema.Union([Schema.Number, Schema.Null]),
|
|
1472
|
-
),
|
|
692
|
+
consumers: Schema.optional(Schema.Union([Schema.Array(Schema.Union([Schema.Struct({
|
|
693
|
+
consumerId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
694
|
+
createdOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
695
|
+
queueId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
696
|
+
script: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
697
|
+
settings: Schema.optional(Schema.Union([Schema.Struct({
|
|
698
|
+
batchSize: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
|
|
699
|
+
maxConcurrency: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
|
|
700
|
+
maxRetries: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
|
|
701
|
+
maxWaitTimeMs: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
|
|
702
|
+
retryDelay: Schema.optional(Schema.Union([Schema.Number, Schema.Null]))
|
|
703
|
+
}).pipe(Schema.encodeKeys({ batchSize: "batch_size", maxConcurrency: "max_concurrency", maxRetries: "max_retries", maxWaitTimeMs: "max_wait_time_ms", retryDelay: "retry_delay" })), Schema.Null])),
|
|
704
|
+
type: Schema.optional(Schema.Union([Schema.Literal("worker"), Schema.Null]))
|
|
705
|
+
}).pipe(Schema.encodeKeys({ consumerId: "consumer_id", createdOn: "created_on", queueId: "queue_id", script: "script", settings: "settings", type: "type" })), Schema.Struct({
|
|
706
|
+
consumerId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
707
|
+
createdOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
708
|
+
queueId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
709
|
+
settings: Schema.optional(Schema.Union([Schema.Struct({
|
|
710
|
+
batchSize: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
|
|
711
|
+
maxRetries: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
|
|
712
|
+
retryDelay: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
|
|
713
|
+
visibilityTimeoutMs: Schema.optional(Schema.Union([Schema.Number, Schema.Null]))
|
|
714
|
+
}).pipe(Schema.encodeKeys({ batchSize: "batch_size", maxRetries: "max_retries", retryDelay: "retry_delay", visibilityTimeoutMs: "visibility_timeout_ms" })), Schema.Null])),
|
|
715
|
+
type: Schema.optional(Schema.Union([Schema.Literal("http_pull"), Schema.Null]))
|
|
716
|
+
}).pipe(Schema.encodeKeys({ consumerId: "consumer_id", createdOn: "created_on", queueId: "queue_id", settings: "settings", type: "type" }))])), Schema.Null])),
|
|
717
|
+
consumersTotalCount: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
|
|
1473
718
|
createdOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
1474
719
|
modifiedOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
1475
|
-
producers: Schema.optional(
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
),
|
|
1484
|
-
}),
|
|
1485
|
-
Schema.Struct({
|
|
1486
|
-
bucketName: Schema.optional(
|
|
1487
|
-
Schema.Union([Schema.String, Schema.Null]),
|
|
1488
|
-
),
|
|
1489
|
-
type: Schema.optional(
|
|
1490
|
-
Schema.Union([Schema.Literal("r2_bucket"), Schema.Null]),
|
|
1491
|
-
),
|
|
1492
|
-
}).pipe(
|
|
1493
|
-
Schema.encodeKeys({ bucketName: "bucket_name", type: "type" }),
|
|
1494
|
-
),
|
|
1495
|
-
]),
|
|
1496
|
-
),
|
|
1497
|
-
Schema.Null,
|
|
1498
|
-
]),
|
|
1499
|
-
),
|
|
1500
|
-
producersTotalCount: Schema.optional(
|
|
1501
|
-
Schema.Union([Schema.Number, Schema.Null]),
|
|
1502
|
-
),
|
|
720
|
+
producers: Schema.optional(Schema.Union([Schema.Array(Schema.Union([Schema.Struct({
|
|
721
|
+
script: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
722
|
+
type: Schema.optional(Schema.Union([Schema.Literal("worker"), Schema.Null]))
|
|
723
|
+
}), Schema.Struct({
|
|
724
|
+
bucketName: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
725
|
+
type: Schema.optional(Schema.Union([Schema.Literal("r2_bucket"), Schema.Null]))
|
|
726
|
+
}).pipe(Schema.encodeKeys({ bucketName: "bucket_name", type: "type" }))])), Schema.Null])),
|
|
727
|
+
producersTotalCount: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
|
|
1503
728
|
queueId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
1504
729
|
queueName: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
1505
|
-
settings: Schema.optional(
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
),
|
|
1517
|
-
}).pipe(
|
|
1518
|
-
Schema.encodeKeys({
|
|
1519
|
-
deliveryDelay: "delivery_delay",
|
|
1520
|
-
deliveryPaused: "delivery_paused",
|
|
1521
|
-
messageRetentionPeriod: "message_retention_period",
|
|
1522
|
-
}),
|
|
1523
|
-
),
|
|
1524
|
-
Schema.Null,
|
|
1525
|
-
]),
|
|
1526
|
-
),
|
|
1527
|
-
})
|
|
1528
|
-
.pipe(
|
|
1529
|
-
Schema.encodeKeys({
|
|
1530
|
-
consumers: "consumers",
|
|
1531
|
-
consumersTotalCount: "consumers_total_count",
|
|
1532
|
-
createdOn: "created_on",
|
|
1533
|
-
modifiedOn: "modified_on",
|
|
1534
|
-
producers: "producers",
|
|
1535
|
-
producersTotalCount: "producers_total_count",
|
|
1536
|
-
queueId: "queue_id",
|
|
1537
|
-
queueName: "queue_name",
|
|
1538
|
-
settings: "settings",
|
|
1539
|
-
}),
|
|
1540
|
-
)
|
|
1541
|
-
.pipe(
|
|
1542
|
-
T.ResponsePath("result"),
|
|
1543
|
-
) as unknown as Schema.Schema<StartPurgeResponse>;
|
|
1544
|
-
|
|
1545
|
-
export type StartPurgeError = DefaultErrors | InvalidQueueId | InvalidRoute;
|
|
730
|
+
settings: Schema.optional(Schema.Union([Schema.Struct({
|
|
731
|
+
deliveryDelay: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
|
|
732
|
+
deliveryPaused: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
|
|
733
|
+
messageRetentionPeriod: Schema.optional(Schema.Union([Schema.Number, Schema.Null]))
|
|
734
|
+
}).pipe(Schema.encodeKeys({ deliveryDelay: "delivery_delay", deliveryPaused: "delivery_paused", messageRetentionPeriod: "message_retention_period" })), Schema.Null]))
|
|
735
|
+
}).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")) as unknown as Schema.Schema<StartPurgeResponse>;
|
|
736
|
+
|
|
737
|
+
export type StartPurgeError =
|
|
738
|
+
| DefaultErrors
|
|
739
|
+
| InvalidQueueId
|
|
740
|
+
| InvalidRoute;
|
|
1546
741
|
|
|
1547
742
|
export const startPurge: API.OperationMethod<
|
|
1548
743
|
StartPurgeRequest,
|
|
@@ -1563,13 +758,9 @@ export interface StatusPurgeRequest {
|
|
|
1563
758
|
|
|
1564
759
|
export const StatusPurgeRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
1565
760
|
queueId: Schema.String.pipe(T.HttpPath("queueId")),
|
|
1566
|
-
accountId: Schema.String.pipe(T.HttpPath("account_id"))
|
|
1567
|
-
})
|
|
1568
|
-
T.Http({
|
|
1569
|
-
method: "GET",
|
|
1570
|
-
path: "/accounts/{account_id}/queues/{queueId}/purge",
|
|
1571
|
-
}),
|
|
1572
|
-
) as unknown as Schema.Schema<StatusPurgeRequest>;
|
|
761
|
+
accountId: Schema.String.pipe(T.HttpPath("account_id"))
|
|
762
|
+
})
|
|
763
|
+
.pipe(T.Http({ method: "GET", path: "/accounts/{account_id}/queues/{queueId}/purge" })) as unknown as Schema.Schema<StatusPurgeRequest>;
|
|
1573
764
|
|
|
1574
765
|
export interface StatusPurgeResponse {
|
|
1575
766
|
/** Indicates if the last purge operation completed successfully. */
|
|
@@ -1580,14 +771,13 @@ export interface StatusPurgeResponse {
|
|
|
1580
771
|
|
|
1581
772
|
export const StatusPurgeResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
1582
773
|
completed: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
1583
|
-
startedAt: Schema.optional(Schema.Union([Schema.String, Schema.Null]))
|
|
1584
|
-
})
|
|
1585
|
-
.pipe(Schema.encodeKeys({ completed: "completed", startedAt: "started_at" }))
|
|
1586
|
-
.pipe(
|
|
1587
|
-
T.ResponsePath("result"),
|
|
1588
|
-
) as unknown as Schema.Schema<StatusPurgeResponse>;
|
|
774
|
+
startedAt: Schema.optional(Schema.Union([Schema.String, Schema.Null]))
|
|
775
|
+
}).pipe(Schema.encodeKeys({ completed: "completed", startedAt: "started_at" })).pipe(T.ResponsePath("result")) as unknown as Schema.Schema<StatusPurgeResponse>;
|
|
1589
776
|
|
|
1590
|
-
export type StatusPurgeError =
|
|
777
|
+
export type StatusPurgeError =
|
|
778
|
+
| DefaultErrors
|
|
779
|
+
| InvalidQueueId
|
|
780
|
+
| InvalidRoute;
|
|
1591
781
|
|
|
1592
782
|
export const statusPurge: API.OperationMethod<
|
|
1593
783
|
StatusPurgeRequest,
|
|
@@ -1600,6 +790,7 @@ export const statusPurge: API.OperationMethod<
|
|
|
1600
790
|
errors: [InvalidQueueId, InvalidRoute],
|
|
1601
791
|
}));
|
|
1602
792
|
|
|
793
|
+
|
|
1603
794
|
// =============================================================================
|
|
1604
795
|
// Queue
|
|
1605
796
|
// =============================================================================
|
|
@@ -1612,247 +803,72 @@ export interface GetQueueRequest {
|
|
|
1612
803
|
|
|
1613
804
|
export const GetQueueRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
1614
805
|
queueId: Schema.String.pipe(T.HttpPath("queueId")),
|
|
1615
|
-
accountId: Schema.String.pipe(T.HttpPath("account_id"))
|
|
1616
|
-
})
|
|
1617
|
-
T.Http({ method: "GET", path: "/accounts/{account_id}/queues/{queueId}" })
|
|
1618
|
-
) as unknown as Schema.Schema<GetQueueRequest>;
|
|
806
|
+
accountId: Schema.String.pipe(T.HttpPath("account_id"))
|
|
807
|
+
})
|
|
808
|
+
.pipe(T.Http({ method: "GET", path: "/accounts/{account_id}/queues/{queueId}" })) as unknown as Schema.Schema<GetQueueRequest>;
|
|
1619
809
|
|
|
1620
810
|
export interface GetQueueResponse {
|
|
1621
|
-
consumers?:
|
|
1622
|
-
| (
|
|
1623
|
-
| {
|
|
1624
|
-
consumerId?: string | null;
|
|
1625
|
-
createdOn?: string | null;
|
|
1626
|
-
queueId?: string | null;
|
|
1627
|
-
script?: string | null;
|
|
1628
|
-
settings?: {
|
|
1629
|
-
batchSize?: number | null;
|
|
1630
|
-
maxConcurrency?: number | null;
|
|
1631
|
-
maxRetries?: number | null;
|
|
1632
|
-
maxWaitTimeMs?: number | null;
|
|
1633
|
-
retryDelay?: number | null;
|
|
1634
|
-
} | null;
|
|
1635
|
-
type?: "worker" | null;
|
|
1636
|
-
}
|
|
1637
|
-
| {
|
|
1638
|
-
consumerId?: string | null;
|
|
1639
|
-
createdOn?: string | null;
|
|
1640
|
-
queueId?: string | null;
|
|
1641
|
-
settings?: {
|
|
1642
|
-
batchSize?: number | null;
|
|
1643
|
-
maxRetries?: number | null;
|
|
1644
|
-
retryDelay?: number | null;
|
|
1645
|
-
visibilityTimeoutMs?: number | null;
|
|
1646
|
-
} | null;
|
|
1647
|
-
type?: "http_pull" | null;
|
|
1648
|
-
}
|
|
1649
|
-
)[]
|
|
1650
|
-
| null;
|
|
811
|
+
consumers?: ({ consumerId?: string | null; createdOn?: string | null; queueId?: string | null; script?: string | null; settings?: { batchSize?: number | null; maxConcurrency?: number | null; maxRetries?: number | null; maxWaitTimeMs?: number | null; retryDelay?: number | null } | null; type?: "worker" | null } | { consumerId?: string | null; createdOn?: string | null; queueId?: string | null; settings?: { batchSize?: number | null; maxRetries?: number | null; retryDelay?: number | null; visibilityTimeoutMs?: number | null } | null; type?: "http_pull" | null })[] | null;
|
|
1651
812
|
consumersTotalCount?: number | null;
|
|
1652
813
|
createdOn?: string | null;
|
|
1653
814
|
modifiedOn?: string | null;
|
|
1654
|
-
producers?:
|
|
1655
|
-
| (
|
|
1656
|
-
| { script?: string | null; type?: "worker" | null }
|
|
1657
|
-
| { bucketName?: string | null; type?: "r2_bucket" | null }
|
|
1658
|
-
)[]
|
|
1659
|
-
| null;
|
|
815
|
+
producers?: ({ script?: string | null; type?: "worker" | null } | { bucketName?: string | null; type?: "r2_bucket" | null })[] | null;
|
|
1660
816
|
producersTotalCount?: number | null;
|
|
1661
817
|
queueId?: string | null;
|
|
1662
818
|
queueName?: string | null;
|
|
1663
|
-
settings?: {
|
|
1664
|
-
deliveryDelay?: number | null;
|
|
1665
|
-
deliveryPaused?: boolean | null;
|
|
1666
|
-
messageRetentionPeriod?: number | null;
|
|
1667
|
-
} | null;
|
|
819
|
+
settings?: { deliveryDelay?: number | null; deliveryPaused?: boolean | null; messageRetentionPeriod?: number | null } | null;
|
|
1668
820
|
}
|
|
1669
821
|
|
|
1670
822
|
export const GetQueueResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
1671
|
-
consumers: Schema.optional(
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
),
|
|
1698
|
-
maxWaitTimeMs: Schema.optional(
|
|
1699
|
-
Schema.Union([Schema.Number, Schema.Null]),
|
|
1700
|
-
),
|
|
1701
|
-
retryDelay: Schema.optional(
|
|
1702
|
-
Schema.Union([Schema.Number, Schema.Null]),
|
|
1703
|
-
),
|
|
1704
|
-
}).pipe(
|
|
1705
|
-
Schema.encodeKeys({
|
|
1706
|
-
batchSize: "batch_size",
|
|
1707
|
-
maxConcurrency: "max_concurrency",
|
|
1708
|
-
maxRetries: "max_retries",
|
|
1709
|
-
maxWaitTimeMs: "max_wait_time_ms",
|
|
1710
|
-
retryDelay: "retry_delay",
|
|
1711
|
-
}),
|
|
1712
|
-
),
|
|
1713
|
-
Schema.Null,
|
|
1714
|
-
]),
|
|
1715
|
-
),
|
|
1716
|
-
type: Schema.optional(
|
|
1717
|
-
Schema.Union([Schema.Literal("worker"), Schema.Null]),
|
|
1718
|
-
),
|
|
1719
|
-
}).pipe(
|
|
1720
|
-
Schema.encodeKeys({
|
|
1721
|
-
consumerId: "consumer_id",
|
|
1722
|
-
createdOn: "created_on",
|
|
1723
|
-
queueId: "queue_id",
|
|
1724
|
-
script: "script",
|
|
1725
|
-
settings: "settings",
|
|
1726
|
-
type: "type",
|
|
1727
|
-
}),
|
|
1728
|
-
),
|
|
1729
|
-
Schema.Struct({
|
|
1730
|
-
consumerId: Schema.optional(
|
|
1731
|
-
Schema.Union([Schema.String, Schema.Null]),
|
|
1732
|
-
),
|
|
1733
|
-
createdOn: Schema.optional(
|
|
1734
|
-
Schema.Union([Schema.String, Schema.Null]),
|
|
1735
|
-
),
|
|
1736
|
-
queueId: Schema.optional(
|
|
1737
|
-
Schema.Union([Schema.String, Schema.Null]),
|
|
1738
|
-
),
|
|
1739
|
-
settings: Schema.optional(
|
|
1740
|
-
Schema.Union([
|
|
1741
|
-
Schema.Struct({
|
|
1742
|
-
batchSize: Schema.optional(
|
|
1743
|
-
Schema.Union([Schema.Number, Schema.Null]),
|
|
1744
|
-
),
|
|
1745
|
-
maxRetries: Schema.optional(
|
|
1746
|
-
Schema.Union([Schema.Number, Schema.Null]),
|
|
1747
|
-
),
|
|
1748
|
-
retryDelay: Schema.optional(
|
|
1749
|
-
Schema.Union([Schema.Number, Schema.Null]),
|
|
1750
|
-
),
|
|
1751
|
-
visibilityTimeoutMs: Schema.optional(
|
|
1752
|
-
Schema.Union([Schema.Number, Schema.Null]),
|
|
1753
|
-
),
|
|
1754
|
-
}).pipe(
|
|
1755
|
-
Schema.encodeKeys({
|
|
1756
|
-
batchSize: "batch_size",
|
|
1757
|
-
maxRetries: "max_retries",
|
|
1758
|
-
retryDelay: "retry_delay",
|
|
1759
|
-
visibilityTimeoutMs: "visibility_timeout_ms",
|
|
1760
|
-
}),
|
|
1761
|
-
),
|
|
1762
|
-
Schema.Null,
|
|
1763
|
-
]),
|
|
1764
|
-
),
|
|
1765
|
-
type: Schema.optional(
|
|
1766
|
-
Schema.Union([Schema.Literal("http_pull"), Schema.Null]),
|
|
1767
|
-
),
|
|
1768
|
-
}).pipe(
|
|
1769
|
-
Schema.encodeKeys({
|
|
1770
|
-
consumerId: "consumer_id",
|
|
1771
|
-
createdOn: "created_on",
|
|
1772
|
-
queueId: "queue_id",
|
|
1773
|
-
settings: "settings",
|
|
1774
|
-
type: "type",
|
|
1775
|
-
}),
|
|
1776
|
-
),
|
|
1777
|
-
]),
|
|
1778
|
-
),
|
|
1779
|
-
Schema.Null,
|
|
1780
|
-
]),
|
|
1781
|
-
),
|
|
1782
|
-
consumersTotalCount: Schema.optional(
|
|
1783
|
-
Schema.Union([Schema.Number, Schema.Null]),
|
|
1784
|
-
),
|
|
823
|
+
consumers: Schema.optional(Schema.Union([Schema.Array(Schema.Union([Schema.Struct({
|
|
824
|
+
consumerId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
825
|
+
createdOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
826
|
+
queueId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
827
|
+
script: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
828
|
+
settings: Schema.optional(Schema.Union([Schema.Struct({
|
|
829
|
+
batchSize: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
|
|
830
|
+
maxConcurrency: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
|
|
831
|
+
maxRetries: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
|
|
832
|
+
maxWaitTimeMs: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
|
|
833
|
+
retryDelay: Schema.optional(Schema.Union([Schema.Number, Schema.Null]))
|
|
834
|
+
}).pipe(Schema.encodeKeys({ batchSize: "batch_size", maxConcurrency: "max_concurrency", maxRetries: "max_retries", maxWaitTimeMs: "max_wait_time_ms", retryDelay: "retry_delay" })), Schema.Null])),
|
|
835
|
+
type: Schema.optional(Schema.Union([Schema.Literal("worker"), Schema.Null]))
|
|
836
|
+
}).pipe(Schema.encodeKeys({ consumerId: "consumer_id", createdOn: "created_on", queueId: "queue_id", script: "script", settings: "settings", type: "type" })), Schema.Struct({
|
|
837
|
+
consumerId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
838
|
+
createdOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
839
|
+
queueId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
840
|
+
settings: Schema.optional(Schema.Union([Schema.Struct({
|
|
841
|
+
batchSize: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
|
|
842
|
+
maxRetries: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
|
|
843
|
+
retryDelay: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
|
|
844
|
+
visibilityTimeoutMs: Schema.optional(Schema.Union([Schema.Number, Schema.Null]))
|
|
845
|
+
}).pipe(Schema.encodeKeys({ batchSize: "batch_size", maxRetries: "max_retries", retryDelay: "retry_delay", visibilityTimeoutMs: "visibility_timeout_ms" })), Schema.Null])),
|
|
846
|
+
type: Schema.optional(Schema.Union([Schema.Literal("http_pull"), Schema.Null]))
|
|
847
|
+
}).pipe(Schema.encodeKeys({ consumerId: "consumer_id", createdOn: "created_on", queueId: "queue_id", settings: "settings", type: "type" }))])), Schema.Null])),
|
|
848
|
+
consumersTotalCount: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
|
|
1785
849
|
createdOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
1786
850
|
modifiedOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
1787
|
-
producers: Schema.optional(
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
),
|
|
1796
|
-
}),
|
|
1797
|
-
Schema.Struct({
|
|
1798
|
-
bucketName: Schema.optional(
|
|
1799
|
-
Schema.Union([Schema.String, Schema.Null]),
|
|
1800
|
-
),
|
|
1801
|
-
type: Schema.optional(
|
|
1802
|
-
Schema.Union([Schema.Literal("r2_bucket"), Schema.Null]),
|
|
1803
|
-
),
|
|
1804
|
-
}).pipe(
|
|
1805
|
-
Schema.encodeKeys({ bucketName: "bucket_name", type: "type" }),
|
|
1806
|
-
),
|
|
1807
|
-
]),
|
|
1808
|
-
),
|
|
1809
|
-
Schema.Null,
|
|
1810
|
-
]),
|
|
1811
|
-
),
|
|
1812
|
-
producersTotalCount: Schema.optional(
|
|
1813
|
-
Schema.Union([Schema.Number, Schema.Null]),
|
|
1814
|
-
),
|
|
851
|
+
producers: Schema.optional(Schema.Union([Schema.Array(Schema.Union([Schema.Struct({
|
|
852
|
+
script: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
853
|
+
type: Schema.optional(Schema.Union([Schema.Literal("worker"), Schema.Null]))
|
|
854
|
+
}), Schema.Struct({
|
|
855
|
+
bucketName: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
856
|
+
type: Schema.optional(Schema.Union([Schema.Literal("r2_bucket"), Schema.Null]))
|
|
857
|
+
}).pipe(Schema.encodeKeys({ bucketName: "bucket_name", type: "type" }))])), Schema.Null])),
|
|
858
|
+
producersTotalCount: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
|
|
1815
859
|
queueId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
1816
860
|
queueName: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
1817
|
-
settings: Schema.optional(
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
),
|
|
1829
|
-
}).pipe(
|
|
1830
|
-
Schema.encodeKeys({
|
|
1831
|
-
deliveryDelay: "delivery_delay",
|
|
1832
|
-
deliveryPaused: "delivery_paused",
|
|
1833
|
-
messageRetentionPeriod: "message_retention_period",
|
|
1834
|
-
}),
|
|
1835
|
-
),
|
|
1836
|
-
Schema.Null,
|
|
1837
|
-
]),
|
|
1838
|
-
),
|
|
1839
|
-
})
|
|
1840
|
-
.pipe(
|
|
1841
|
-
Schema.encodeKeys({
|
|
1842
|
-
consumers: "consumers",
|
|
1843
|
-
consumersTotalCount: "consumers_total_count",
|
|
1844
|
-
createdOn: "created_on",
|
|
1845
|
-
modifiedOn: "modified_on",
|
|
1846
|
-
producers: "producers",
|
|
1847
|
-
producersTotalCount: "producers_total_count",
|
|
1848
|
-
queueId: "queue_id",
|
|
1849
|
-
queueName: "queue_name",
|
|
1850
|
-
settings: "settings",
|
|
1851
|
-
}),
|
|
1852
|
-
)
|
|
1853
|
-
.pipe(T.ResponsePath("result")) as unknown as Schema.Schema<GetQueueResponse>;
|
|
1854
|
-
|
|
1855
|
-
export type GetQueueError = DefaultErrors | QueueNotFound | InvalidRoute;
|
|
861
|
+
settings: Schema.optional(Schema.Union([Schema.Struct({
|
|
862
|
+
deliveryDelay: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
|
|
863
|
+
deliveryPaused: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
|
|
864
|
+
messageRetentionPeriod: Schema.optional(Schema.Union([Schema.Number, Schema.Null]))
|
|
865
|
+
}).pipe(Schema.encodeKeys({ deliveryDelay: "delivery_delay", deliveryPaused: "delivery_paused", messageRetentionPeriod: "message_retention_period" })), Schema.Null]))
|
|
866
|
+
}).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")) as unknown as Schema.Schema<GetQueueResponse>;
|
|
867
|
+
|
|
868
|
+
export type GetQueueError =
|
|
869
|
+
| DefaultErrors
|
|
870
|
+
| QueueNotFound
|
|
871
|
+
| InvalidRoute;
|
|
1856
872
|
|
|
1857
873
|
export const getQueue: API.OperationMethod<
|
|
1858
874
|
GetQueueRequest,
|
|
@@ -1871,255 +887,65 @@ export interface ListQueuesRequest {
|
|
|
1871
887
|
}
|
|
1872
888
|
|
|
1873
889
|
export const ListQueuesRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
1874
|
-
accountId: Schema.String.pipe(T.HttpPath("account_id"))
|
|
1875
|
-
})
|
|
1876
|
-
T.Http({ method: "GET", path: "/accounts/{account_id}/queues" })
|
|
1877
|
-
) as unknown as Schema.Schema<ListQueuesRequest>;
|
|
890
|
+
accountId: Schema.String.pipe(T.HttpPath("account_id"))
|
|
891
|
+
})
|
|
892
|
+
.pipe(T.Http({ method: "GET", path: "/accounts/{account_id}/queues" })) as unknown as Schema.Schema<ListQueuesRequest>;
|
|
1878
893
|
|
|
1879
894
|
export interface ListQueuesResponse {
|
|
1880
|
-
result: {
|
|
1881
|
-
consumers?:
|
|
1882
|
-
| (
|
|
1883
|
-
| {
|
|
1884
|
-
consumerId?: string | null;
|
|
1885
|
-
createdOn?: string | null;
|
|
1886
|
-
queueId?: string | null;
|
|
1887
|
-
script?: string | null;
|
|
1888
|
-
settings?: {
|
|
1889
|
-
batchSize?: number | null;
|
|
1890
|
-
maxConcurrency?: number | null;
|
|
1891
|
-
maxRetries?: number | null;
|
|
1892
|
-
maxWaitTimeMs?: number | null;
|
|
1893
|
-
retryDelay?: number | null;
|
|
1894
|
-
} | null;
|
|
1895
|
-
type?: "worker" | null;
|
|
1896
|
-
}
|
|
1897
|
-
| {
|
|
1898
|
-
consumerId?: string | null;
|
|
1899
|
-
createdOn?: string | null;
|
|
1900
|
-
queueId?: string | null;
|
|
1901
|
-
settings?: {
|
|
1902
|
-
batchSize?: number | null;
|
|
1903
|
-
maxRetries?: number | null;
|
|
1904
|
-
retryDelay?: number | null;
|
|
1905
|
-
visibilityTimeoutMs?: number | null;
|
|
1906
|
-
} | null;
|
|
1907
|
-
type?: "http_pull" | null;
|
|
1908
|
-
}
|
|
1909
|
-
)[]
|
|
1910
|
-
| null;
|
|
1911
|
-
consumersTotalCount?: number | null;
|
|
1912
|
-
createdOn?: string | null;
|
|
1913
|
-
modifiedOn?: string | null;
|
|
1914
|
-
producers?:
|
|
1915
|
-
| (
|
|
1916
|
-
| { script?: string | null; type?: "worker" | null }
|
|
1917
|
-
| { bucketName?: string | null; type?: "r2_bucket" | null }
|
|
1918
|
-
)[]
|
|
1919
|
-
| null;
|
|
1920
|
-
producersTotalCount?: number | null;
|
|
1921
|
-
queueId?: string | null;
|
|
1922
|
-
queueName?: string | null;
|
|
1923
|
-
settings?: {
|
|
1924
|
-
deliveryDelay?: number | null;
|
|
1925
|
-
deliveryPaused?: boolean | null;
|
|
1926
|
-
messageRetentionPeriod?: number | null;
|
|
1927
|
-
} | null;
|
|
1928
|
-
}[];
|
|
895
|
+
result: ({ consumers?: ({ consumerId?: string | null; createdOn?: string | null; queueId?: string | null; script?: string | null; settings?: { batchSize?: number | null; maxConcurrency?: number | null; maxRetries?: number | null; maxWaitTimeMs?: number | null; retryDelay?: number | null } | null; type?: "worker" | null } | { consumerId?: string | null; createdOn?: string | null; queueId?: string | null; settings?: { batchSize?: number | null; maxRetries?: number | null; retryDelay?: number | null; visibilityTimeoutMs?: number | null } | null; type?: "http_pull" | null })[] | null; consumersTotalCount?: number | null; createdOn?: string | null; modifiedOn?: string | null; producers?: ({ script?: string | null; type?: "worker" | null } | { bucketName?: string | null; type?: "r2_bucket" | null })[] | null; producersTotalCount?: number | null; queueId?: string | null; queueName?: string | null; settings?: { deliveryDelay?: number | null; deliveryPaused?: boolean | null; messageRetentionPeriod?: number | null } | null })[];
|
|
1929
896
|
}
|
|
1930
897
|
|
|
1931
898
|
export const ListQueuesResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
1932
|
-
result: Schema.Array(
|
|
1933
|
-
|
|
1934
|
-
|
|
1935
|
-
|
|
1936
|
-
|
|
1937
|
-
|
|
1938
|
-
|
|
1939
|
-
|
|
1940
|
-
|
|
1941
|
-
|
|
1942
|
-
|
|
1943
|
-
|
|
1944
|
-
|
|
1945
|
-
|
|
1946
|
-
|
|
1947
|
-
|
|
1948
|
-
|
|
1949
|
-
|
|
1950
|
-
|
|
1951
|
-
|
|
1952
|
-
|
|
1953
|
-
|
|
1954
|
-
|
|
1955
|
-
|
|
1956
|
-
|
|
1957
|
-
|
|
1958
|
-
|
|
1959
|
-
|
|
1960
|
-
|
|
1961
|
-
|
|
1962
|
-
|
|
1963
|
-
|
|
1964
|
-
|
|
1965
|
-
|
|
1966
|
-
|
|
1967
|
-
|
|
1968
|
-
|
|
1969
|
-
|
|
1970
|
-
|
|
1971
|
-
|
|
1972
|
-
|
|
1973
|
-
|
|
1974
|
-
|
|
1975
|
-
|
|
1976
|
-
|
|
1977
|
-
),
|
|
1978
|
-
Schema.Null,
|
|
1979
|
-
]),
|
|
1980
|
-
),
|
|
1981
|
-
type: Schema.optional(
|
|
1982
|
-
Schema.Union([Schema.Literal("worker"), Schema.Null]),
|
|
1983
|
-
),
|
|
1984
|
-
}).pipe(
|
|
1985
|
-
Schema.encodeKeys({
|
|
1986
|
-
consumerId: "consumer_id",
|
|
1987
|
-
createdOn: "created_on",
|
|
1988
|
-
queueId: "queue_id",
|
|
1989
|
-
script: "script",
|
|
1990
|
-
settings: "settings",
|
|
1991
|
-
type: "type",
|
|
1992
|
-
}),
|
|
1993
|
-
),
|
|
1994
|
-
Schema.Struct({
|
|
1995
|
-
consumerId: Schema.optional(
|
|
1996
|
-
Schema.Union([Schema.String, Schema.Null]),
|
|
1997
|
-
),
|
|
1998
|
-
createdOn: Schema.optional(
|
|
1999
|
-
Schema.Union([Schema.String, Schema.Null]),
|
|
2000
|
-
),
|
|
2001
|
-
queueId: Schema.optional(
|
|
2002
|
-
Schema.Union([Schema.String, Schema.Null]),
|
|
2003
|
-
),
|
|
2004
|
-
settings: Schema.optional(
|
|
2005
|
-
Schema.Union([
|
|
2006
|
-
Schema.Struct({
|
|
2007
|
-
batchSize: Schema.optional(
|
|
2008
|
-
Schema.Union([Schema.Number, Schema.Null]),
|
|
2009
|
-
),
|
|
2010
|
-
maxRetries: Schema.optional(
|
|
2011
|
-
Schema.Union([Schema.Number, Schema.Null]),
|
|
2012
|
-
),
|
|
2013
|
-
retryDelay: Schema.optional(
|
|
2014
|
-
Schema.Union([Schema.Number, Schema.Null]),
|
|
2015
|
-
),
|
|
2016
|
-
visibilityTimeoutMs: Schema.optional(
|
|
2017
|
-
Schema.Union([Schema.Number, Schema.Null]),
|
|
2018
|
-
),
|
|
2019
|
-
}).pipe(
|
|
2020
|
-
Schema.encodeKeys({
|
|
2021
|
-
batchSize: "batch_size",
|
|
2022
|
-
maxRetries: "max_retries",
|
|
2023
|
-
retryDelay: "retry_delay",
|
|
2024
|
-
visibilityTimeoutMs: "visibility_timeout_ms",
|
|
2025
|
-
}),
|
|
2026
|
-
),
|
|
2027
|
-
Schema.Null,
|
|
2028
|
-
]),
|
|
2029
|
-
),
|
|
2030
|
-
type: Schema.optional(
|
|
2031
|
-
Schema.Union([Schema.Literal("http_pull"), Schema.Null]),
|
|
2032
|
-
),
|
|
2033
|
-
}).pipe(
|
|
2034
|
-
Schema.encodeKeys({
|
|
2035
|
-
consumerId: "consumer_id",
|
|
2036
|
-
createdOn: "created_on",
|
|
2037
|
-
queueId: "queue_id",
|
|
2038
|
-
settings: "settings",
|
|
2039
|
-
type: "type",
|
|
2040
|
-
}),
|
|
2041
|
-
),
|
|
2042
|
-
]),
|
|
2043
|
-
),
|
|
2044
|
-
Schema.Null,
|
|
2045
|
-
]),
|
|
2046
|
-
),
|
|
2047
|
-
consumersTotalCount: Schema.optional(
|
|
2048
|
-
Schema.Union([Schema.Number, Schema.Null]),
|
|
2049
|
-
),
|
|
2050
|
-
createdOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
2051
|
-
modifiedOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
2052
|
-
producers: Schema.optional(
|
|
2053
|
-
Schema.Union([
|
|
2054
|
-
Schema.Array(
|
|
2055
|
-
Schema.Union([
|
|
2056
|
-
Schema.Struct({
|
|
2057
|
-
script: Schema.optional(
|
|
2058
|
-
Schema.Union([Schema.String, Schema.Null]),
|
|
2059
|
-
),
|
|
2060
|
-
type: Schema.optional(
|
|
2061
|
-
Schema.Union([Schema.Literal("worker"), Schema.Null]),
|
|
2062
|
-
),
|
|
2063
|
-
}),
|
|
2064
|
-
Schema.Struct({
|
|
2065
|
-
bucketName: Schema.optional(
|
|
2066
|
-
Schema.Union([Schema.String, Schema.Null]),
|
|
2067
|
-
),
|
|
2068
|
-
type: Schema.optional(
|
|
2069
|
-
Schema.Union([Schema.Literal("r2_bucket"), Schema.Null]),
|
|
2070
|
-
),
|
|
2071
|
-
}).pipe(
|
|
2072
|
-
Schema.encodeKeys({ bucketName: "bucket_name", type: "type" }),
|
|
2073
|
-
),
|
|
2074
|
-
]),
|
|
2075
|
-
),
|
|
2076
|
-
Schema.Null,
|
|
2077
|
-
]),
|
|
2078
|
-
),
|
|
2079
|
-
producersTotalCount: Schema.optional(
|
|
2080
|
-
Schema.Union([Schema.Number, Schema.Null]),
|
|
2081
|
-
),
|
|
2082
|
-
queueId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
2083
|
-
queueName: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
2084
|
-
settings: Schema.optional(
|
|
2085
|
-
Schema.Union([
|
|
2086
|
-
Schema.Struct({
|
|
2087
|
-
deliveryDelay: Schema.optional(
|
|
2088
|
-
Schema.Union([Schema.Number, Schema.Null]),
|
|
2089
|
-
),
|
|
2090
|
-
deliveryPaused: Schema.optional(
|
|
2091
|
-
Schema.Union([Schema.Boolean, Schema.Null]),
|
|
2092
|
-
),
|
|
2093
|
-
messageRetentionPeriod: Schema.optional(
|
|
2094
|
-
Schema.Union([Schema.Number, Schema.Null]),
|
|
2095
|
-
),
|
|
2096
|
-
}).pipe(
|
|
2097
|
-
Schema.encodeKeys({
|
|
2098
|
-
deliveryDelay: "delivery_delay",
|
|
2099
|
-
deliveryPaused: "delivery_paused",
|
|
2100
|
-
messageRetentionPeriod: "message_retention_period",
|
|
2101
|
-
}),
|
|
2102
|
-
),
|
|
2103
|
-
Schema.Null,
|
|
2104
|
-
]),
|
|
2105
|
-
),
|
|
2106
|
-
}).pipe(
|
|
2107
|
-
Schema.encodeKeys({
|
|
2108
|
-
consumers: "consumers",
|
|
2109
|
-
consumersTotalCount: "consumers_total_count",
|
|
2110
|
-
createdOn: "created_on",
|
|
2111
|
-
modifiedOn: "modified_on",
|
|
2112
|
-
producers: "producers",
|
|
2113
|
-
producersTotalCount: "producers_total_count",
|
|
2114
|
-
queueId: "queue_id",
|
|
2115
|
-
queueName: "queue_name",
|
|
2116
|
-
settings: "settings",
|
|
2117
|
-
}),
|
|
2118
|
-
),
|
|
2119
|
-
),
|
|
899
|
+
result: Schema.Array(Schema.Struct({
|
|
900
|
+
consumers: Schema.optional(Schema.Union([Schema.Array(Schema.Union([Schema.Struct({
|
|
901
|
+
consumerId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
902
|
+
createdOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
903
|
+
queueId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
904
|
+
script: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
905
|
+
settings: Schema.optional(Schema.Union([Schema.Struct({
|
|
906
|
+
batchSize: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
|
|
907
|
+
maxConcurrency: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
|
|
908
|
+
maxRetries: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
|
|
909
|
+
maxWaitTimeMs: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
|
|
910
|
+
retryDelay: Schema.optional(Schema.Union([Schema.Number, Schema.Null]))
|
|
911
|
+
}).pipe(Schema.encodeKeys({ batchSize: "batch_size", maxConcurrency: "max_concurrency", maxRetries: "max_retries", maxWaitTimeMs: "max_wait_time_ms", retryDelay: "retry_delay" })), Schema.Null])),
|
|
912
|
+
type: Schema.optional(Schema.Union([Schema.Literal("worker"), Schema.Null]))
|
|
913
|
+
}).pipe(Schema.encodeKeys({ consumerId: "consumer_id", createdOn: "created_on", queueId: "queue_id", script: "script", settings: "settings", type: "type" })), Schema.Struct({
|
|
914
|
+
consumerId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
915
|
+
createdOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
916
|
+
queueId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
917
|
+
settings: Schema.optional(Schema.Union([Schema.Struct({
|
|
918
|
+
batchSize: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
|
|
919
|
+
maxRetries: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
|
|
920
|
+
retryDelay: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
|
|
921
|
+
visibilityTimeoutMs: Schema.optional(Schema.Union([Schema.Number, Schema.Null]))
|
|
922
|
+
}).pipe(Schema.encodeKeys({ batchSize: "batch_size", maxRetries: "max_retries", retryDelay: "retry_delay", visibilityTimeoutMs: "visibility_timeout_ms" })), Schema.Null])),
|
|
923
|
+
type: Schema.optional(Schema.Union([Schema.Literal("http_pull"), Schema.Null]))
|
|
924
|
+
}).pipe(Schema.encodeKeys({ consumerId: "consumer_id", createdOn: "created_on", queueId: "queue_id", settings: "settings", type: "type" }))])), Schema.Null])),
|
|
925
|
+
consumersTotalCount: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
|
|
926
|
+
createdOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
927
|
+
modifiedOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
928
|
+
producers: Schema.optional(Schema.Union([Schema.Array(Schema.Union([Schema.Struct({
|
|
929
|
+
script: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
930
|
+
type: Schema.optional(Schema.Union([Schema.Literal("worker"), Schema.Null]))
|
|
931
|
+
}), Schema.Struct({
|
|
932
|
+
bucketName: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
933
|
+
type: Schema.optional(Schema.Union([Schema.Literal("r2_bucket"), Schema.Null]))
|
|
934
|
+
}).pipe(Schema.encodeKeys({ bucketName: "bucket_name", type: "type" }))])), Schema.Null])),
|
|
935
|
+
producersTotalCount: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
|
|
936
|
+
queueId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
937
|
+
queueName: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
938
|
+
settings: Schema.optional(Schema.Union([Schema.Struct({
|
|
939
|
+
deliveryDelay: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
|
|
940
|
+
deliveryPaused: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
|
|
941
|
+
messageRetentionPeriod: Schema.optional(Schema.Union([Schema.Number, Schema.Null]))
|
|
942
|
+
}).pipe(Schema.encodeKeys({ deliveryDelay: "delivery_delay", deliveryPaused: "delivery_paused", messageRetentionPeriod: "message_retention_period" })), Schema.Null]))
|
|
943
|
+
}).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" })))
|
|
2120
944
|
}) as unknown as Schema.Schema<ListQueuesResponse>;
|
|
2121
945
|
|
|
2122
|
-
export type ListQueuesError =
|
|
946
|
+
export type ListQueuesError =
|
|
947
|
+
| DefaultErrors
|
|
948
|
+
| InvalidRoute;
|
|
2123
949
|
|
|
2124
950
|
export const listQueues: API.PaginatedOperationMethod<
|
|
2125
951
|
ListQueuesRequest,
|
|
@@ -2145,248 +971,67 @@ export interface CreateQueueRequest {
|
|
|
2145
971
|
|
|
2146
972
|
export const CreateQueueRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
2147
973
|
accountId: Schema.String.pipe(T.HttpPath("account_id")),
|
|
2148
|
-
queueName: Schema.String
|
|
2149
|
-
})
|
|
2150
|
-
Schema.encodeKeys({ queueName: "queue_name" }),
|
|
2151
|
-
T.Http({ method: "POST", path: "/accounts/{account_id}/queues" }),
|
|
2152
|
-
) as unknown as Schema.Schema<CreateQueueRequest>;
|
|
974
|
+
queueName: Schema.String
|
|
975
|
+
})
|
|
976
|
+
.pipe(Schema.encodeKeys({ queueName: "queue_name" }), T.Http({ method: "POST", path: "/accounts/{account_id}/queues" })) as unknown as Schema.Schema<CreateQueueRequest>;
|
|
2153
977
|
|
|
2154
978
|
export interface CreateQueueResponse {
|
|
2155
|
-
consumers?:
|
|
2156
|
-
| (
|
|
2157
|
-
| {
|
|
2158
|
-
consumerId?: string | null;
|
|
2159
|
-
createdOn?: string | null;
|
|
2160
|
-
queueId?: string | null;
|
|
2161
|
-
script?: string | null;
|
|
2162
|
-
settings?: {
|
|
2163
|
-
batchSize?: number | null;
|
|
2164
|
-
maxConcurrency?: number | null;
|
|
2165
|
-
maxRetries?: number | null;
|
|
2166
|
-
maxWaitTimeMs?: number | null;
|
|
2167
|
-
retryDelay?: number | null;
|
|
2168
|
-
} | null;
|
|
2169
|
-
type?: "worker" | null;
|
|
2170
|
-
}
|
|
2171
|
-
| {
|
|
2172
|
-
consumerId?: string | null;
|
|
2173
|
-
createdOn?: string | null;
|
|
2174
|
-
queueId?: string | null;
|
|
2175
|
-
settings?: {
|
|
2176
|
-
batchSize?: number | null;
|
|
2177
|
-
maxRetries?: number | null;
|
|
2178
|
-
retryDelay?: number | null;
|
|
2179
|
-
visibilityTimeoutMs?: number | null;
|
|
2180
|
-
} | null;
|
|
2181
|
-
type?: "http_pull" | null;
|
|
2182
|
-
}
|
|
2183
|
-
)[]
|
|
2184
|
-
| null;
|
|
979
|
+
consumers?: ({ consumerId?: string | null; createdOn?: string | null; queueId?: string | null; script?: string | null; settings?: { batchSize?: number | null; maxConcurrency?: number | null; maxRetries?: number | null; maxWaitTimeMs?: number | null; retryDelay?: number | null } | null; type?: "worker" | null } | { consumerId?: string | null; createdOn?: string | null; queueId?: string | null; settings?: { batchSize?: number | null; maxRetries?: number | null; retryDelay?: number | null; visibilityTimeoutMs?: number | null } | null; type?: "http_pull" | null })[] | null;
|
|
2185
980
|
consumersTotalCount?: number | null;
|
|
2186
981
|
createdOn?: string | null;
|
|
2187
982
|
modifiedOn?: string | null;
|
|
2188
|
-
producers?:
|
|
2189
|
-
| (
|
|
2190
|
-
| { script?: string | null; type?: "worker" | null }
|
|
2191
|
-
| { bucketName?: string | null; type?: "r2_bucket" | null }
|
|
2192
|
-
)[]
|
|
2193
|
-
| null;
|
|
983
|
+
producers?: ({ script?: string | null; type?: "worker" | null } | { bucketName?: string | null; type?: "r2_bucket" | null })[] | null;
|
|
2194
984
|
producersTotalCount?: number | null;
|
|
2195
985
|
queueId?: string | null;
|
|
2196
986
|
queueName?: string | null;
|
|
2197
|
-
settings?: {
|
|
2198
|
-
deliveryDelay?: number | null;
|
|
2199
|
-
deliveryPaused?: boolean | null;
|
|
2200
|
-
messageRetentionPeriod?: number | null;
|
|
2201
|
-
} | null;
|
|
987
|
+
settings?: { deliveryDelay?: number | null; deliveryPaused?: boolean | null; messageRetentionPeriod?: number | null } | null;
|
|
2202
988
|
}
|
|
2203
989
|
|
|
2204
990
|
export const CreateQueueResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
2205
|
-
consumers: Schema.optional(
|
|
2206
|
-
|
|
2207
|
-
|
|
2208
|
-
|
|
2209
|
-
|
|
2210
|
-
|
|
2211
|
-
|
|
2212
|
-
|
|
2213
|
-
|
|
2214
|
-
|
|
2215
|
-
|
|
2216
|
-
|
|
2217
|
-
|
|
2218
|
-
|
|
2219
|
-
|
|
2220
|
-
|
|
2221
|
-
|
|
2222
|
-
|
|
2223
|
-
|
|
2224
|
-
|
|
2225
|
-
|
|
2226
|
-
|
|
2227
|
-
|
|
2228
|
-
|
|
2229
|
-
|
|
2230
|
-
|
|
2231
|
-
),
|
|
2232
|
-
maxWaitTimeMs: Schema.optional(
|
|
2233
|
-
Schema.Union([Schema.Number, Schema.Null]),
|
|
2234
|
-
),
|
|
2235
|
-
retryDelay: Schema.optional(
|
|
2236
|
-
Schema.Union([Schema.Number, Schema.Null]),
|
|
2237
|
-
),
|
|
2238
|
-
}).pipe(
|
|
2239
|
-
Schema.encodeKeys({
|
|
2240
|
-
batchSize: "batch_size",
|
|
2241
|
-
maxConcurrency: "max_concurrency",
|
|
2242
|
-
maxRetries: "max_retries",
|
|
2243
|
-
maxWaitTimeMs: "max_wait_time_ms",
|
|
2244
|
-
retryDelay: "retry_delay",
|
|
2245
|
-
}),
|
|
2246
|
-
),
|
|
2247
|
-
Schema.Null,
|
|
2248
|
-
]),
|
|
2249
|
-
),
|
|
2250
|
-
type: Schema.optional(
|
|
2251
|
-
Schema.Union([Schema.Literal("worker"), Schema.Null]),
|
|
2252
|
-
),
|
|
2253
|
-
}).pipe(
|
|
2254
|
-
Schema.encodeKeys({
|
|
2255
|
-
consumerId: "consumer_id",
|
|
2256
|
-
createdOn: "created_on",
|
|
2257
|
-
queueId: "queue_id",
|
|
2258
|
-
script: "script",
|
|
2259
|
-
settings: "settings",
|
|
2260
|
-
type: "type",
|
|
2261
|
-
}),
|
|
2262
|
-
),
|
|
2263
|
-
Schema.Struct({
|
|
2264
|
-
consumerId: Schema.optional(
|
|
2265
|
-
Schema.Union([Schema.String, Schema.Null]),
|
|
2266
|
-
),
|
|
2267
|
-
createdOn: Schema.optional(
|
|
2268
|
-
Schema.Union([Schema.String, Schema.Null]),
|
|
2269
|
-
),
|
|
2270
|
-
queueId: Schema.optional(
|
|
2271
|
-
Schema.Union([Schema.String, Schema.Null]),
|
|
2272
|
-
),
|
|
2273
|
-
settings: Schema.optional(
|
|
2274
|
-
Schema.Union([
|
|
2275
|
-
Schema.Struct({
|
|
2276
|
-
batchSize: Schema.optional(
|
|
2277
|
-
Schema.Union([Schema.Number, Schema.Null]),
|
|
2278
|
-
),
|
|
2279
|
-
maxRetries: Schema.optional(
|
|
2280
|
-
Schema.Union([Schema.Number, Schema.Null]),
|
|
2281
|
-
),
|
|
2282
|
-
retryDelay: Schema.optional(
|
|
2283
|
-
Schema.Union([Schema.Number, Schema.Null]),
|
|
2284
|
-
),
|
|
2285
|
-
visibilityTimeoutMs: Schema.optional(
|
|
2286
|
-
Schema.Union([Schema.Number, Schema.Null]),
|
|
2287
|
-
),
|
|
2288
|
-
}).pipe(
|
|
2289
|
-
Schema.encodeKeys({
|
|
2290
|
-
batchSize: "batch_size",
|
|
2291
|
-
maxRetries: "max_retries",
|
|
2292
|
-
retryDelay: "retry_delay",
|
|
2293
|
-
visibilityTimeoutMs: "visibility_timeout_ms",
|
|
2294
|
-
}),
|
|
2295
|
-
),
|
|
2296
|
-
Schema.Null,
|
|
2297
|
-
]),
|
|
2298
|
-
),
|
|
2299
|
-
type: Schema.optional(
|
|
2300
|
-
Schema.Union([Schema.Literal("http_pull"), Schema.Null]),
|
|
2301
|
-
),
|
|
2302
|
-
}).pipe(
|
|
2303
|
-
Schema.encodeKeys({
|
|
2304
|
-
consumerId: "consumer_id",
|
|
2305
|
-
createdOn: "created_on",
|
|
2306
|
-
queueId: "queue_id",
|
|
2307
|
-
settings: "settings",
|
|
2308
|
-
type: "type",
|
|
2309
|
-
}),
|
|
2310
|
-
),
|
|
2311
|
-
]),
|
|
2312
|
-
),
|
|
2313
|
-
Schema.Null,
|
|
2314
|
-
]),
|
|
2315
|
-
),
|
|
2316
|
-
consumersTotalCount: Schema.optional(
|
|
2317
|
-
Schema.Union([Schema.Number, Schema.Null]),
|
|
2318
|
-
),
|
|
991
|
+
consumers: Schema.optional(Schema.Union([Schema.Array(Schema.Union([Schema.Struct({
|
|
992
|
+
consumerId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
993
|
+
createdOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
994
|
+
queueId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
995
|
+
script: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
996
|
+
settings: Schema.optional(Schema.Union([Schema.Struct({
|
|
997
|
+
batchSize: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
|
|
998
|
+
maxConcurrency: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
|
|
999
|
+
maxRetries: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
|
|
1000
|
+
maxWaitTimeMs: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
|
|
1001
|
+
retryDelay: Schema.optional(Schema.Union([Schema.Number, Schema.Null]))
|
|
1002
|
+
}).pipe(Schema.encodeKeys({ batchSize: "batch_size", maxConcurrency: "max_concurrency", maxRetries: "max_retries", maxWaitTimeMs: "max_wait_time_ms", retryDelay: "retry_delay" })), Schema.Null])),
|
|
1003
|
+
type: Schema.optional(Schema.Union([Schema.Literal("worker"), Schema.Null]))
|
|
1004
|
+
}).pipe(Schema.encodeKeys({ consumerId: "consumer_id", createdOn: "created_on", queueId: "queue_id", script: "script", settings: "settings", type: "type" })), Schema.Struct({
|
|
1005
|
+
consumerId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
1006
|
+
createdOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
1007
|
+
queueId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
1008
|
+
settings: Schema.optional(Schema.Union([Schema.Struct({
|
|
1009
|
+
batchSize: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
|
|
1010
|
+
maxRetries: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
|
|
1011
|
+
retryDelay: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
|
|
1012
|
+
visibilityTimeoutMs: Schema.optional(Schema.Union([Schema.Number, Schema.Null]))
|
|
1013
|
+
}).pipe(Schema.encodeKeys({ batchSize: "batch_size", maxRetries: "max_retries", retryDelay: "retry_delay", visibilityTimeoutMs: "visibility_timeout_ms" })), Schema.Null])),
|
|
1014
|
+
type: Schema.optional(Schema.Union([Schema.Literal("http_pull"), Schema.Null]))
|
|
1015
|
+
}).pipe(Schema.encodeKeys({ consumerId: "consumer_id", createdOn: "created_on", queueId: "queue_id", settings: "settings", type: "type" }))])), Schema.Null])),
|
|
1016
|
+
consumersTotalCount: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
|
|
2319
1017
|
createdOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
2320
1018
|
modifiedOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
2321
|
-
producers: Schema.optional(
|
|
2322
|
-
|
|
2323
|
-
|
|
2324
|
-
|
|
2325
|
-
|
|
2326
|
-
|
|
2327
|
-
|
|
2328
|
-
|
|
2329
|
-
),
|
|
2330
|
-
}),
|
|
2331
|
-
Schema.Struct({
|
|
2332
|
-
bucketName: Schema.optional(
|
|
2333
|
-
Schema.Union([Schema.String, Schema.Null]),
|
|
2334
|
-
),
|
|
2335
|
-
type: Schema.optional(
|
|
2336
|
-
Schema.Union([Schema.Literal("r2_bucket"), Schema.Null]),
|
|
2337
|
-
),
|
|
2338
|
-
}).pipe(
|
|
2339
|
-
Schema.encodeKeys({ bucketName: "bucket_name", type: "type" }),
|
|
2340
|
-
),
|
|
2341
|
-
]),
|
|
2342
|
-
),
|
|
2343
|
-
Schema.Null,
|
|
2344
|
-
]),
|
|
2345
|
-
),
|
|
2346
|
-
producersTotalCount: Schema.optional(
|
|
2347
|
-
Schema.Union([Schema.Number, Schema.Null]),
|
|
2348
|
-
),
|
|
1019
|
+
producers: Schema.optional(Schema.Union([Schema.Array(Schema.Union([Schema.Struct({
|
|
1020
|
+
script: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
1021
|
+
type: Schema.optional(Schema.Union([Schema.Literal("worker"), Schema.Null]))
|
|
1022
|
+
}), Schema.Struct({
|
|
1023
|
+
bucketName: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
1024
|
+
type: Schema.optional(Schema.Union([Schema.Literal("r2_bucket"), Schema.Null]))
|
|
1025
|
+
}).pipe(Schema.encodeKeys({ bucketName: "bucket_name", type: "type" }))])), Schema.Null])),
|
|
1026
|
+
producersTotalCount: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
|
|
2349
1027
|
queueId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
2350
1028
|
queueName: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
2351
|
-
settings: Schema.optional(
|
|
2352
|
-
|
|
2353
|
-
|
|
2354
|
-
|
|
2355
|
-
|
|
2356
|
-
|
|
2357
|
-
deliveryPaused: Schema.optional(
|
|
2358
|
-
Schema.Union([Schema.Boolean, Schema.Null]),
|
|
2359
|
-
),
|
|
2360
|
-
messageRetentionPeriod: Schema.optional(
|
|
2361
|
-
Schema.Union([Schema.Number, Schema.Null]),
|
|
2362
|
-
),
|
|
2363
|
-
}).pipe(
|
|
2364
|
-
Schema.encodeKeys({
|
|
2365
|
-
deliveryDelay: "delivery_delay",
|
|
2366
|
-
deliveryPaused: "delivery_paused",
|
|
2367
|
-
messageRetentionPeriod: "message_retention_period",
|
|
2368
|
-
}),
|
|
2369
|
-
),
|
|
2370
|
-
Schema.Null,
|
|
2371
|
-
]),
|
|
2372
|
-
),
|
|
2373
|
-
})
|
|
2374
|
-
.pipe(
|
|
2375
|
-
Schema.encodeKeys({
|
|
2376
|
-
consumers: "consumers",
|
|
2377
|
-
consumersTotalCount: "consumers_total_count",
|
|
2378
|
-
createdOn: "created_on",
|
|
2379
|
-
modifiedOn: "modified_on",
|
|
2380
|
-
producers: "producers",
|
|
2381
|
-
producersTotalCount: "producers_total_count",
|
|
2382
|
-
queueId: "queue_id",
|
|
2383
|
-
queueName: "queue_name",
|
|
2384
|
-
settings: "settings",
|
|
2385
|
-
}),
|
|
2386
|
-
)
|
|
2387
|
-
.pipe(
|
|
2388
|
-
T.ResponsePath("result"),
|
|
2389
|
-
) as unknown as Schema.Schema<CreateQueueResponse>;
|
|
1029
|
+
settings: Schema.optional(Schema.Union([Schema.Struct({
|
|
1030
|
+
deliveryDelay: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
|
|
1031
|
+
deliveryPaused: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
|
|
1032
|
+
messageRetentionPeriod: Schema.optional(Schema.Union([Schema.Number, Schema.Null]))
|
|
1033
|
+
}).pipe(Schema.encodeKeys({ deliveryDelay: "delivery_delay", deliveryPaused: "delivery_paused", messageRetentionPeriod: "message_retention_period" })), Schema.Null]))
|
|
1034
|
+
}).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")) as unknown as Schema.Schema<CreateQueueResponse>;
|
|
2390
1035
|
|
|
2391
1036
|
export type CreateQueueError =
|
|
2392
1037
|
| DefaultErrors
|
|
@@ -2412,271 +1057,78 @@ export interface UpdateQueueRequest {
|
|
|
2412
1057
|
/** Body param: */
|
|
2413
1058
|
queueName?: string;
|
|
2414
1059
|
/** Body param: */
|
|
2415
|
-
settings?: {
|
|
2416
|
-
deliveryDelay?: number;
|
|
2417
|
-
deliveryPaused?: boolean;
|
|
2418
|
-
messageRetentionPeriod?: number;
|
|
2419
|
-
};
|
|
1060
|
+
settings?: { deliveryDelay?: number; deliveryPaused?: boolean; messageRetentionPeriod?: number };
|
|
2420
1061
|
}
|
|
2421
1062
|
|
|
2422
1063
|
export const UpdateQueueRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
2423
1064
|
queueId: Schema.String.pipe(T.HttpPath("queueId")),
|
|
2424
1065
|
accountId: Schema.String.pipe(T.HttpPath("account_id")),
|
|
2425
1066
|
queueName: Schema.optional(Schema.String),
|
|
2426
|
-
settings: Schema.optional(
|
|
2427
|
-
|
|
2428
|
-
|
|
2429
|
-
|
|
2430
|
-
|
|
2431
|
-
|
|
2432
|
-
|
|
2433
|
-
deliveryDelay: "delivery_delay",
|
|
2434
|
-
deliveryPaused: "delivery_paused",
|
|
2435
|
-
messageRetentionPeriod: "message_retention_period",
|
|
2436
|
-
}),
|
|
2437
|
-
),
|
|
2438
|
-
),
|
|
2439
|
-
}).pipe(
|
|
2440
|
-
Schema.encodeKeys({ queueName: "queue_name", settings: "settings" }),
|
|
2441
|
-
T.Http({ method: "PUT", path: "/accounts/{account_id}/queues/{queueId}" }),
|
|
2442
|
-
) as unknown as Schema.Schema<UpdateQueueRequest>;
|
|
1067
|
+
settings: Schema.optional(Schema.Struct({
|
|
1068
|
+
deliveryDelay: Schema.optional(Schema.Number),
|
|
1069
|
+
deliveryPaused: Schema.optional(Schema.Boolean),
|
|
1070
|
+
messageRetentionPeriod: Schema.optional(Schema.Number)
|
|
1071
|
+
}).pipe(Schema.encodeKeys({ deliveryDelay: "delivery_delay", deliveryPaused: "delivery_paused", messageRetentionPeriod: "message_retention_period" })))
|
|
1072
|
+
})
|
|
1073
|
+
.pipe(Schema.encodeKeys({ queueName: "queue_name", settings: "settings" }), T.Http({ method: "PUT", path: "/accounts/{account_id}/queues/{queueId}" })) as unknown as Schema.Schema<UpdateQueueRequest>;
|
|
2443
1074
|
|
|
2444
1075
|
export interface UpdateQueueResponse {
|
|
2445
|
-
consumers?:
|
|
2446
|
-
| (
|
|
2447
|
-
| {
|
|
2448
|
-
consumerId?: string | null;
|
|
2449
|
-
createdOn?: string | null;
|
|
2450
|
-
queueId?: string | null;
|
|
2451
|
-
script?: string | null;
|
|
2452
|
-
settings?: {
|
|
2453
|
-
batchSize?: number | null;
|
|
2454
|
-
maxConcurrency?: number | null;
|
|
2455
|
-
maxRetries?: number | null;
|
|
2456
|
-
maxWaitTimeMs?: number | null;
|
|
2457
|
-
retryDelay?: number | null;
|
|
2458
|
-
} | null;
|
|
2459
|
-
type?: "worker" | null;
|
|
2460
|
-
}
|
|
2461
|
-
| {
|
|
2462
|
-
consumerId?: string | null;
|
|
2463
|
-
createdOn?: string | null;
|
|
2464
|
-
queueId?: string | null;
|
|
2465
|
-
settings?: {
|
|
2466
|
-
batchSize?: number | null;
|
|
2467
|
-
maxRetries?: number | null;
|
|
2468
|
-
retryDelay?: number | null;
|
|
2469
|
-
visibilityTimeoutMs?: number | null;
|
|
2470
|
-
} | null;
|
|
2471
|
-
type?: "http_pull" | null;
|
|
2472
|
-
}
|
|
2473
|
-
)[]
|
|
2474
|
-
| null;
|
|
1076
|
+
consumers?: ({ consumerId?: string | null; createdOn?: string | null; queueId?: string | null; script?: string | null; settings?: { batchSize?: number | null; maxConcurrency?: number | null; maxRetries?: number | null; maxWaitTimeMs?: number | null; retryDelay?: number | null } | null; type?: "worker" | null } | { consumerId?: string | null; createdOn?: string | null; queueId?: string | null; settings?: { batchSize?: number | null; maxRetries?: number | null; retryDelay?: number | null; visibilityTimeoutMs?: number | null } | null; type?: "http_pull" | null })[] | null;
|
|
2475
1077
|
consumersTotalCount?: number | null;
|
|
2476
1078
|
createdOn?: string | null;
|
|
2477
1079
|
modifiedOn?: string | null;
|
|
2478
|
-
producers?:
|
|
2479
|
-
| (
|
|
2480
|
-
| { script?: string | null; type?: "worker" | null }
|
|
2481
|
-
| { bucketName?: string | null; type?: "r2_bucket" | null }
|
|
2482
|
-
)[]
|
|
2483
|
-
| null;
|
|
1080
|
+
producers?: ({ script?: string | null; type?: "worker" | null } | { bucketName?: string | null; type?: "r2_bucket" | null })[] | null;
|
|
2484
1081
|
producersTotalCount?: number | null;
|
|
2485
1082
|
queueId?: string | null;
|
|
2486
1083
|
queueName?: string | null;
|
|
2487
|
-
settings?: {
|
|
2488
|
-
deliveryDelay?: number | null;
|
|
2489
|
-
deliveryPaused?: boolean | null;
|
|
2490
|
-
messageRetentionPeriod?: number | null;
|
|
2491
|
-
} | null;
|
|
1084
|
+
settings?: { deliveryDelay?: number | null; deliveryPaused?: boolean | null; messageRetentionPeriod?: number | null } | null;
|
|
2492
1085
|
}
|
|
2493
1086
|
|
|
2494
1087
|
export const UpdateQueueResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
2495
|
-
consumers: Schema.optional(
|
|
2496
|
-
|
|
2497
|
-
|
|
2498
|
-
|
|
2499
|
-
|
|
2500
|
-
|
|
2501
|
-
|
|
2502
|
-
|
|
2503
|
-
|
|
2504
|
-
|
|
2505
|
-
|
|
2506
|
-
|
|
2507
|
-
|
|
2508
|
-
|
|
2509
|
-
|
|
2510
|
-
|
|
2511
|
-
|
|
2512
|
-
|
|
2513
|
-
|
|
2514
|
-
|
|
2515
|
-
|
|
2516
|
-
|
|
2517
|
-
|
|
2518
|
-
|
|
2519
|
-
|
|
2520
|
-
|
|
2521
|
-
),
|
|
2522
|
-
maxWaitTimeMs: Schema.optional(
|
|
2523
|
-
Schema.Union([Schema.Number, Schema.Null]),
|
|
2524
|
-
),
|
|
2525
|
-
retryDelay: Schema.optional(
|
|
2526
|
-
Schema.Union([Schema.Number, Schema.Null]),
|
|
2527
|
-
),
|
|
2528
|
-
}).pipe(
|
|
2529
|
-
Schema.encodeKeys({
|
|
2530
|
-
batchSize: "batch_size",
|
|
2531
|
-
maxConcurrency: "max_concurrency",
|
|
2532
|
-
maxRetries: "max_retries",
|
|
2533
|
-
maxWaitTimeMs: "max_wait_time_ms",
|
|
2534
|
-
retryDelay: "retry_delay",
|
|
2535
|
-
}),
|
|
2536
|
-
),
|
|
2537
|
-
Schema.Null,
|
|
2538
|
-
]),
|
|
2539
|
-
),
|
|
2540
|
-
type: Schema.optional(
|
|
2541
|
-
Schema.Union([Schema.Literal("worker"), Schema.Null]),
|
|
2542
|
-
),
|
|
2543
|
-
}).pipe(
|
|
2544
|
-
Schema.encodeKeys({
|
|
2545
|
-
consumerId: "consumer_id",
|
|
2546
|
-
createdOn: "created_on",
|
|
2547
|
-
queueId: "queue_id",
|
|
2548
|
-
script: "script",
|
|
2549
|
-
settings: "settings",
|
|
2550
|
-
type: "type",
|
|
2551
|
-
}),
|
|
2552
|
-
),
|
|
2553
|
-
Schema.Struct({
|
|
2554
|
-
consumerId: Schema.optional(
|
|
2555
|
-
Schema.Union([Schema.String, Schema.Null]),
|
|
2556
|
-
),
|
|
2557
|
-
createdOn: Schema.optional(
|
|
2558
|
-
Schema.Union([Schema.String, Schema.Null]),
|
|
2559
|
-
),
|
|
2560
|
-
queueId: Schema.optional(
|
|
2561
|
-
Schema.Union([Schema.String, Schema.Null]),
|
|
2562
|
-
),
|
|
2563
|
-
settings: Schema.optional(
|
|
2564
|
-
Schema.Union([
|
|
2565
|
-
Schema.Struct({
|
|
2566
|
-
batchSize: Schema.optional(
|
|
2567
|
-
Schema.Union([Schema.Number, Schema.Null]),
|
|
2568
|
-
),
|
|
2569
|
-
maxRetries: Schema.optional(
|
|
2570
|
-
Schema.Union([Schema.Number, Schema.Null]),
|
|
2571
|
-
),
|
|
2572
|
-
retryDelay: Schema.optional(
|
|
2573
|
-
Schema.Union([Schema.Number, Schema.Null]),
|
|
2574
|
-
),
|
|
2575
|
-
visibilityTimeoutMs: Schema.optional(
|
|
2576
|
-
Schema.Union([Schema.Number, Schema.Null]),
|
|
2577
|
-
),
|
|
2578
|
-
}).pipe(
|
|
2579
|
-
Schema.encodeKeys({
|
|
2580
|
-
batchSize: "batch_size",
|
|
2581
|
-
maxRetries: "max_retries",
|
|
2582
|
-
retryDelay: "retry_delay",
|
|
2583
|
-
visibilityTimeoutMs: "visibility_timeout_ms",
|
|
2584
|
-
}),
|
|
2585
|
-
),
|
|
2586
|
-
Schema.Null,
|
|
2587
|
-
]),
|
|
2588
|
-
),
|
|
2589
|
-
type: Schema.optional(
|
|
2590
|
-
Schema.Union([Schema.Literal("http_pull"), Schema.Null]),
|
|
2591
|
-
),
|
|
2592
|
-
}).pipe(
|
|
2593
|
-
Schema.encodeKeys({
|
|
2594
|
-
consumerId: "consumer_id",
|
|
2595
|
-
createdOn: "created_on",
|
|
2596
|
-
queueId: "queue_id",
|
|
2597
|
-
settings: "settings",
|
|
2598
|
-
type: "type",
|
|
2599
|
-
}),
|
|
2600
|
-
),
|
|
2601
|
-
]),
|
|
2602
|
-
),
|
|
2603
|
-
Schema.Null,
|
|
2604
|
-
]),
|
|
2605
|
-
),
|
|
2606
|
-
consumersTotalCount: Schema.optional(
|
|
2607
|
-
Schema.Union([Schema.Number, Schema.Null]),
|
|
2608
|
-
),
|
|
1088
|
+
consumers: Schema.optional(Schema.Union([Schema.Array(Schema.Union([Schema.Struct({
|
|
1089
|
+
consumerId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
1090
|
+
createdOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
1091
|
+
queueId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
1092
|
+
script: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
1093
|
+
settings: Schema.optional(Schema.Union([Schema.Struct({
|
|
1094
|
+
batchSize: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
|
|
1095
|
+
maxConcurrency: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
|
|
1096
|
+
maxRetries: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
|
|
1097
|
+
maxWaitTimeMs: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
|
|
1098
|
+
retryDelay: Schema.optional(Schema.Union([Schema.Number, Schema.Null]))
|
|
1099
|
+
}).pipe(Schema.encodeKeys({ batchSize: "batch_size", maxConcurrency: "max_concurrency", maxRetries: "max_retries", maxWaitTimeMs: "max_wait_time_ms", retryDelay: "retry_delay" })), Schema.Null])),
|
|
1100
|
+
type: Schema.optional(Schema.Union([Schema.Literal("worker"), Schema.Null]))
|
|
1101
|
+
}).pipe(Schema.encodeKeys({ consumerId: "consumer_id", createdOn: "created_on", queueId: "queue_id", script: "script", settings: "settings", type: "type" })), Schema.Struct({
|
|
1102
|
+
consumerId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
1103
|
+
createdOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
1104
|
+
queueId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
1105
|
+
settings: Schema.optional(Schema.Union([Schema.Struct({
|
|
1106
|
+
batchSize: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
|
|
1107
|
+
maxRetries: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
|
|
1108
|
+
retryDelay: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
|
|
1109
|
+
visibilityTimeoutMs: Schema.optional(Schema.Union([Schema.Number, Schema.Null]))
|
|
1110
|
+
}).pipe(Schema.encodeKeys({ batchSize: "batch_size", maxRetries: "max_retries", retryDelay: "retry_delay", visibilityTimeoutMs: "visibility_timeout_ms" })), Schema.Null])),
|
|
1111
|
+
type: Schema.optional(Schema.Union([Schema.Literal("http_pull"), Schema.Null]))
|
|
1112
|
+
}).pipe(Schema.encodeKeys({ consumerId: "consumer_id", createdOn: "created_on", queueId: "queue_id", settings: "settings", type: "type" }))])), Schema.Null])),
|
|
1113
|
+
consumersTotalCount: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
|
|
2609
1114
|
createdOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
2610
1115
|
modifiedOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
2611
|
-
producers: Schema.optional(
|
|
2612
|
-
|
|
2613
|
-
|
|
2614
|
-
|
|
2615
|
-
|
|
2616
|
-
|
|
2617
|
-
|
|
2618
|
-
|
|
2619
|
-
),
|
|
2620
|
-
}),
|
|
2621
|
-
Schema.Struct({
|
|
2622
|
-
bucketName: Schema.optional(
|
|
2623
|
-
Schema.Union([Schema.String, Schema.Null]),
|
|
2624
|
-
),
|
|
2625
|
-
type: Schema.optional(
|
|
2626
|
-
Schema.Union([Schema.Literal("r2_bucket"), Schema.Null]),
|
|
2627
|
-
),
|
|
2628
|
-
}).pipe(
|
|
2629
|
-
Schema.encodeKeys({ bucketName: "bucket_name", type: "type" }),
|
|
2630
|
-
),
|
|
2631
|
-
]),
|
|
2632
|
-
),
|
|
2633
|
-
Schema.Null,
|
|
2634
|
-
]),
|
|
2635
|
-
),
|
|
2636
|
-
producersTotalCount: Schema.optional(
|
|
2637
|
-
Schema.Union([Schema.Number, Schema.Null]),
|
|
2638
|
-
),
|
|
1116
|
+
producers: Schema.optional(Schema.Union([Schema.Array(Schema.Union([Schema.Struct({
|
|
1117
|
+
script: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
1118
|
+
type: Schema.optional(Schema.Union([Schema.Literal("worker"), Schema.Null]))
|
|
1119
|
+
}), Schema.Struct({
|
|
1120
|
+
bucketName: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
1121
|
+
type: Schema.optional(Schema.Union([Schema.Literal("r2_bucket"), Schema.Null]))
|
|
1122
|
+
}).pipe(Schema.encodeKeys({ bucketName: "bucket_name", type: "type" }))])), Schema.Null])),
|
|
1123
|
+
producersTotalCount: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
|
|
2639
1124
|
queueId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
2640
1125
|
queueName: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
2641
|
-
settings: Schema.optional(
|
|
2642
|
-
|
|
2643
|
-
|
|
2644
|
-
|
|
2645
|
-
|
|
2646
|
-
|
|
2647
|
-
deliveryPaused: Schema.optional(
|
|
2648
|
-
Schema.Union([Schema.Boolean, Schema.Null]),
|
|
2649
|
-
),
|
|
2650
|
-
messageRetentionPeriod: Schema.optional(
|
|
2651
|
-
Schema.Union([Schema.Number, Schema.Null]),
|
|
2652
|
-
),
|
|
2653
|
-
}).pipe(
|
|
2654
|
-
Schema.encodeKeys({
|
|
2655
|
-
deliveryDelay: "delivery_delay",
|
|
2656
|
-
deliveryPaused: "delivery_paused",
|
|
2657
|
-
messageRetentionPeriod: "message_retention_period",
|
|
2658
|
-
}),
|
|
2659
|
-
),
|
|
2660
|
-
Schema.Null,
|
|
2661
|
-
]),
|
|
2662
|
-
),
|
|
2663
|
-
})
|
|
2664
|
-
.pipe(
|
|
2665
|
-
Schema.encodeKeys({
|
|
2666
|
-
consumers: "consumers",
|
|
2667
|
-
consumersTotalCount: "consumers_total_count",
|
|
2668
|
-
createdOn: "created_on",
|
|
2669
|
-
modifiedOn: "modified_on",
|
|
2670
|
-
producers: "producers",
|
|
2671
|
-
producersTotalCount: "producers_total_count",
|
|
2672
|
-
queueId: "queue_id",
|
|
2673
|
-
queueName: "queue_name",
|
|
2674
|
-
settings: "settings",
|
|
2675
|
-
}),
|
|
2676
|
-
)
|
|
2677
|
-
.pipe(
|
|
2678
|
-
T.ResponsePath("result"),
|
|
2679
|
-
) as unknown as Schema.Schema<UpdateQueueResponse>;
|
|
1126
|
+
settings: Schema.optional(Schema.Union([Schema.Struct({
|
|
1127
|
+
deliveryDelay: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
|
|
1128
|
+
deliveryPaused: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
|
|
1129
|
+
messageRetentionPeriod: Schema.optional(Schema.Union([Schema.Number, Schema.Null]))
|
|
1130
|
+
}).pipe(Schema.encodeKeys({ deliveryDelay: "delivery_delay", deliveryPaused: "delivery_paused", messageRetentionPeriod: "message_retention_period" })), Schema.Null]))
|
|
1131
|
+
}).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")) as unknown as Schema.Schema<UpdateQueueResponse>;
|
|
2680
1132
|
|
|
2681
1133
|
export type UpdateQueueError =
|
|
2682
1134
|
| DefaultErrors
|
|
@@ -2702,273 +1154,83 @@ export interface PatchQueueRequest {
|
|
|
2702
1154
|
/** Body param: */
|
|
2703
1155
|
queueName?: string;
|
|
2704
1156
|
/** Body param: */
|
|
2705
|
-
settings?: {
|
|
2706
|
-
deliveryDelay?: number;
|
|
2707
|
-
deliveryPaused?: boolean;
|
|
2708
|
-
messageRetentionPeriod?: number;
|
|
2709
|
-
};
|
|
1157
|
+
settings?: { deliveryDelay?: number; deliveryPaused?: boolean; messageRetentionPeriod?: number };
|
|
2710
1158
|
}
|
|
2711
1159
|
|
|
2712
1160
|
export const PatchQueueRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
2713
1161
|
queueId: Schema.String.pipe(T.HttpPath("queueId")),
|
|
2714
1162
|
accountId: Schema.String.pipe(T.HttpPath("account_id")),
|
|
2715
1163
|
queueName: Schema.optional(Schema.String),
|
|
2716
|
-
settings: Schema.optional(
|
|
2717
|
-
|
|
2718
|
-
|
|
2719
|
-
|
|
2720
|
-
|
|
2721
|
-
|
|
2722
|
-
|
|
2723
|
-
deliveryDelay: "delivery_delay",
|
|
2724
|
-
deliveryPaused: "delivery_paused",
|
|
2725
|
-
messageRetentionPeriod: "message_retention_period",
|
|
2726
|
-
}),
|
|
2727
|
-
),
|
|
2728
|
-
),
|
|
2729
|
-
}).pipe(
|
|
2730
|
-
Schema.encodeKeys({ queueName: "queue_name", settings: "settings" }),
|
|
2731
|
-
T.Http({ method: "PATCH", path: "/accounts/{account_id}/queues/{queueId}" }),
|
|
2732
|
-
) as unknown as Schema.Schema<PatchQueueRequest>;
|
|
1164
|
+
settings: Schema.optional(Schema.Struct({
|
|
1165
|
+
deliveryDelay: Schema.optional(Schema.Number),
|
|
1166
|
+
deliveryPaused: Schema.optional(Schema.Boolean),
|
|
1167
|
+
messageRetentionPeriod: Schema.optional(Schema.Number)
|
|
1168
|
+
}).pipe(Schema.encodeKeys({ deliveryDelay: "delivery_delay", deliveryPaused: "delivery_paused", messageRetentionPeriod: "message_retention_period" })))
|
|
1169
|
+
})
|
|
1170
|
+
.pipe(Schema.encodeKeys({ queueName: "queue_name", settings: "settings" }), T.Http({ method: "PATCH", path: "/accounts/{account_id}/queues/{queueId}" })) as unknown as Schema.Schema<PatchQueueRequest>;
|
|
2733
1171
|
|
|
2734
1172
|
export interface PatchQueueResponse {
|
|
2735
|
-
consumers?:
|
|
2736
|
-
| (
|
|
2737
|
-
| {
|
|
2738
|
-
consumerId?: string | null;
|
|
2739
|
-
createdOn?: string | null;
|
|
2740
|
-
queueId?: string | null;
|
|
2741
|
-
script?: string | null;
|
|
2742
|
-
settings?: {
|
|
2743
|
-
batchSize?: number | null;
|
|
2744
|
-
maxConcurrency?: number | null;
|
|
2745
|
-
maxRetries?: number | null;
|
|
2746
|
-
maxWaitTimeMs?: number | null;
|
|
2747
|
-
retryDelay?: number | null;
|
|
2748
|
-
} | null;
|
|
2749
|
-
type?: "worker" | null;
|
|
2750
|
-
}
|
|
2751
|
-
| {
|
|
2752
|
-
consumerId?: string | null;
|
|
2753
|
-
createdOn?: string | null;
|
|
2754
|
-
queueId?: string | null;
|
|
2755
|
-
settings?: {
|
|
2756
|
-
batchSize?: number | null;
|
|
2757
|
-
maxRetries?: number | null;
|
|
2758
|
-
retryDelay?: number | null;
|
|
2759
|
-
visibilityTimeoutMs?: number | null;
|
|
2760
|
-
} | null;
|
|
2761
|
-
type?: "http_pull" | null;
|
|
2762
|
-
}
|
|
2763
|
-
)[]
|
|
2764
|
-
| null;
|
|
1173
|
+
consumers?: ({ consumerId?: string | null; createdOn?: string | null; queueId?: string | null; script?: string | null; settings?: { batchSize?: number | null; maxConcurrency?: number | null; maxRetries?: number | null; maxWaitTimeMs?: number | null; retryDelay?: number | null } | null; type?: "worker" | null } | { consumerId?: string | null; createdOn?: string | null; queueId?: string | null; settings?: { batchSize?: number | null; maxRetries?: number | null; retryDelay?: number | null; visibilityTimeoutMs?: number | null } | null; type?: "http_pull" | null })[] | null;
|
|
2765
1174
|
consumersTotalCount?: number | null;
|
|
2766
1175
|
createdOn?: string | null;
|
|
2767
1176
|
modifiedOn?: string | null;
|
|
2768
|
-
producers?:
|
|
2769
|
-
| (
|
|
2770
|
-
| { script?: string | null; type?: "worker" | null }
|
|
2771
|
-
| { bucketName?: string | null; type?: "r2_bucket" | null }
|
|
2772
|
-
)[]
|
|
2773
|
-
| null;
|
|
1177
|
+
producers?: ({ script?: string | null; type?: "worker" | null } | { bucketName?: string | null; type?: "r2_bucket" | null })[] | null;
|
|
2774
1178
|
producersTotalCount?: number | null;
|
|
2775
1179
|
queueId?: string | null;
|
|
2776
1180
|
queueName?: string | null;
|
|
2777
|
-
settings?: {
|
|
2778
|
-
deliveryDelay?: number | null;
|
|
2779
|
-
deliveryPaused?: boolean | null;
|
|
2780
|
-
messageRetentionPeriod?: number | null;
|
|
2781
|
-
} | null;
|
|
1181
|
+
settings?: { deliveryDelay?: number | null; deliveryPaused?: boolean | null; messageRetentionPeriod?: number | null } | null;
|
|
2782
1182
|
}
|
|
2783
1183
|
|
|
2784
1184
|
export const PatchQueueResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
2785
|
-
consumers: Schema.optional(
|
|
2786
|
-
|
|
2787
|
-
|
|
2788
|
-
|
|
2789
|
-
|
|
2790
|
-
|
|
2791
|
-
|
|
2792
|
-
|
|
2793
|
-
|
|
2794
|
-
|
|
2795
|
-
|
|
2796
|
-
|
|
2797
|
-
|
|
2798
|
-
|
|
2799
|
-
|
|
2800
|
-
|
|
2801
|
-
|
|
2802
|
-
|
|
2803
|
-
|
|
2804
|
-
|
|
2805
|
-
|
|
2806
|
-
|
|
2807
|
-
|
|
2808
|
-
|
|
2809
|
-
|
|
2810
|
-
|
|
2811
|
-
),
|
|
2812
|
-
maxWaitTimeMs: Schema.optional(
|
|
2813
|
-
Schema.Union([Schema.Number, Schema.Null]),
|
|
2814
|
-
),
|
|
2815
|
-
retryDelay: Schema.optional(
|
|
2816
|
-
Schema.Union([Schema.Number, Schema.Null]),
|
|
2817
|
-
),
|
|
2818
|
-
}).pipe(
|
|
2819
|
-
Schema.encodeKeys({
|
|
2820
|
-
batchSize: "batch_size",
|
|
2821
|
-
maxConcurrency: "max_concurrency",
|
|
2822
|
-
maxRetries: "max_retries",
|
|
2823
|
-
maxWaitTimeMs: "max_wait_time_ms",
|
|
2824
|
-
retryDelay: "retry_delay",
|
|
2825
|
-
}),
|
|
2826
|
-
),
|
|
2827
|
-
Schema.Null,
|
|
2828
|
-
]),
|
|
2829
|
-
),
|
|
2830
|
-
type: Schema.optional(
|
|
2831
|
-
Schema.Union([Schema.Literal("worker"), Schema.Null]),
|
|
2832
|
-
),
|
|
2833
|
-
}).pipe(
|
|
2834
|
-
Schema.encodeKeys({
|
|
2835
|
-
consumerId: "consumer_id",
|
|
2836
|
-
createdOn: "created_on",
|
|
2837
|
-
queueId: "queue_id",
|
|
2838
|
-
script: "script",
|
|
2839
|
-
settings: "settings",
|
|
2840
|
-
type: "type",
|
|
2841
|
-
}),
|
|
2842
|
-
),
|
|
2843
|
-
Schema.Struct({
|
|
2844
|
-
consumerId: Schema.optional(
|
|
2845
|
-
Schema.Union([Schema.String, Schema.Null]),
|
|
2846
|
-
),
|
|
2847
|
-
createdOn: Schema.optional(
|
|
2848
|
-
Schema.Union([Schema.String, Schema.Null]),
|
|
2849
|
-
),
|
|
2850
|
-
queueId: Schema.optional(
|
|
2851
|
-
Schema.Union([Schema.String, Schema.Null]),
|
|
2852
|
-
),
|
|
2853
|
-
settings: Schema.optional(
|
|
2854
|
-
Schema.Union([
|
|
2855
|
-
Schema.Struct({
|
|
2856
|
-
batchSize: Schema.optional(
|
|
2857
|
-
Schema.Union([Schema.Number, Schema.Null]),
|
|
2858
|
-
),
|
|
2859
|
-
maxRetries: Schema.optional(
|
|
2860
|
-
Schema.Union([Schema.Number, Schema.Null]),
|
|
2861
|
-
),
|
|
2862
|
-
retryDelay: Schema.optional(
|
|
2863
|
-
Schema.Union([Schema.Number, Schema.Null]),
|
|
2864
|
-
),
|
|
2865
|
-
visibilityTimeoutMs: Schema.optional(
|
|
2866
|
-
Schema.Union([Schema.Number, Schema.Null]),
|
|
2867
|
-
),
|
|
2868
|
-
}).pipe(
|
|
2869
|
-
Schema.encodeKeys({
|
|
2870
|
-
batchSize: "batch_size",
|
|
2871
|
-
maxRetries: "max_retries",
|
|
2872
|
-
retryDelay: "retry_delay",
|
|
2873
|
-
visibilityTimeoutMs: "visibility_timeout_ms",
|
|
2874
|
-
}),
|
|
2875
|
-
),
|
|
2876
|
-
Schema.Null,
|
|
2877
|
-
]),
|
|
2878
|
-
),
|
|
2879
|
-
type: Schema.optional(
|
|
2880
|
-
Schema.Union([Schema.Literal("http_pull"), Schema.Null]),
|
|
2881
|
-
),
|
|
2882
|
-
}).pipe(
|
|
2883
|
-
Schema.encodeKeys({
|
|
2884
|
-
consumerId: "consumer_id",
|
|
2885
|
-
createdOn: "created_on",
|
|
2886
|
-
queueId: "queue_id",
|
|
2887
|
-
settings: "settings",
|
|
2888
|
-
type: "type",
|
|
2889
|
-
}),
|
|
2890
|
-
),
|
|
2891
|
-
]),
|
|
2892
|
-
),
|
|
2893
|
-
Schema.Null,
|
|
2894
|
-
]),
|
|
2895
|
-
),
|
|
2896
|
-
consumersTotalCount: Schema.optional(
|
|
2897
|
-
Schema.Union([Schema.Number, Schema.Null]),
|
|
2898
|
-
),
|
|
1185
|
+
consumers: Schema.optional(Schema.Union([Schema.Array(Schema.Union([Schema.Struct({
|
|
1186
|
+
consumerId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
1187
|
+
createdOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
1188
|
+
queueId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
1189
|
+
script: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
1190
|
+
settings: Schema.optional(Schema.Union([Schema.Struct({
|
|
1191
|
+
batchSize: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
|
|
1192
|
+
maxConcurrency: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
|
|
1193
|
+
maxRetries: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
|
|
1194
|
+
maxWaitTimeMs: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
|
|
1195
|
+
retryDelay: Schema.optional(Schema.Union([Schema.Number, Schema.Null]))
|
|
1196
|
+
}).pipe(Schema.encodeKeys({ batchSize: "batch_size", maxConcurrency: "max_concurrency", maxRetries: "max_retries", maxWaitTimeMs: "max_wait_time_ms", retryDelay: "retry_delay" })), Schema.Null])),
|
|
1197
|
+
type: Schema.optional(Schema.Union([Schema.Literal("worker"), Schema.Null]))
|
|
1198
|
+
}).pipe(Schema.encodeKeys({ consumerId: "consumer_id", createdOn: "created_on", queueId: "queue_id", script: "script", settings: "settings", type: "type" })), Schema.Struct({
|
|
1199
|
+
consumerId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
1200
|
+
createdOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
1201
|
+
queueId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
1202
|
+
settings: Schema.optional(Schema.Union([Schema.Struct({
|
|
1203
|
+
batchSize: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
|
|
1204
|
+
maxRetries: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
|
|
1205
|
+
retryDelay: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
|
|
1206
|
+
visibilityTimeoutMs: Schema.optional(Schema.Union([Schema.Number, Schema.Null]))
|
|
1207
|
+
}).pipe(Schema.encodeKeys({ batchSize: "batch_size", maxRetries: "max_retries", retryDelay: "retry_delay", visibilityTimeoutMs: "visibility_timeout_ms" })), Schema.Null])),
|
|
1208
|
+
type: Schema.optional(Schema.Union([Schema.Literal("http_pull"), Schema.Null]))
|
|
1209
|
+
}).pipe(Schema.encodeKeys({ consumerId: "consumer_id", createdOn: "created_on", queueId: "queue_id", settings: "settings", type: "type" }))])), Schema.Null])),
|
|
1210
|
+
consumersTotalCount: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
|
|
2899
1211
|
createdOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
2900
1212
|
modifiedOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
2901
|
-
producers: Schema.optional(
|
|
2902
|
-
|
|
2903
|
-
|
|
2904
|
-
|
|
2905
|
-
|
|
2906
|
-
|
|
2907
|
-
|
|
2908
|
-
|
|
2909
|
-
),
|
|
2910
|
-
}),
|
|
2911
|
-
Schema.Struct({
|
|
2912
|
-
bucketName: Schema.optional(
|
|
2913
|
-
Schema.Union([Schema.String, Schema.Null]),
|
|
2914
|
-
),
|
|
2915
|
-
type: Schema.optional(
|
|
2916
|
-
Schema.Union([Schema.Literal("r2_bucket"), Schema.Null]),
|
|
2917
|
-
),
|
|
2918
|
-
}).pipe(
|
|
2919
|
-
Schema.encodeKeys({ bucketName: "bucket_name", type: "type" }),
|
|
2920
|
-
),
|
|
2921
|
-
]),
|
|
2922
|
-
),
|
|
2923
|
-
Schema.Null,
|
|
2924
|
-
]),
|
|
2925
|
-
),
|
|
2926
|
-
producersTotalCount: Schema.optional(
|
|
2927
|
-
Schema.Union([Schema.Number, Schema.Null]),
|
|
2928
|
-
),
|
|
1213
|
+
producers: Schema.optional(Schema.Union([Schema.Array(Schema.Union([Schema.Struct({
|
|
1214
|
+
script: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
1215
|
+
type: Schema.optional(Schema.Union([Schema.Literal("worker"), Schema.Null]))
|
|
1216
|
+
}), Schema.Struct({
|
|
1217
|
+
bucketName: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
1218
|
+
type: Schema.optional(Schema.Union([Schema.Literal("r2_bucket"), Schema.Null]))
|
|
1219
|
+
}).pipe(Schema.encodeKeys({ bucketName: "bucket_name", type: "type" }))])), Schema.Null])),
|
|
1220
|
+
producersTotalCount: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
|
|
2929
1221
|
queueId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
2930
1222
|
queueName: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
2931
|
-
settings: Schema.optional(
|
|
2932
|
-
|
|
2933
|
-
|
|
2934
|
-
|
|
2935
|
-
|
|
2936
|
-
|
|
2937
|
-
|
|
2938
|
-
|
|
2939
|
-
|
|
2940
|
-
|
|
2941
|
-
|
|
2942
|
-
),
|
|
2943
|
-
}).pipe(
|
|
2944
|
-
Schema.encodeKeys({
|
|
2945
|
-
deliveryDelay: "delivery_delay",
|
|
2946
|
-
deliveryPaused: "delivery_paused",
|
|
2947
|
-
messageRetentionPeriod: "message_retention_period",
|
|
2948
|
-
}),
|
|
2949
|
-
),
|
|
2950
|
-
Schema.Null,
|
|
2951
|
-
]),
|
|
2952
|
-
),
|
|
2953
|
-
})
|
|
2954
|
-
.pipe(
|
|
2955
|
-
Schema.encodeKeys({
|
|
2956
|
-
consumers: "consumers",
|
|
2957
|
-
consumersTotalCount: "consumers_total_count",
|
|
2958
|
-
createdOn: "created_on",
|
|
2959
|
-
modifiedOn: "modified_on",
|
|
2960
|
-
producers: "producers",
|
|
2961
|
-
producersTotalCount: "producers_total_count",
|
|
2962
|
-
queueId: "queue_id",
|
|
2963
|
-
queueName: "queue_name",
|
|
2964
|
-
settings: "settings",
|
|
2965
|
-
}),
|
|
2966
|
-
)
|
|
2967
|
-
.pipe(
|
|
2968
|
-
T.ResponsePath("result"),
|
|
2969
|
-
) as unknown as Schema.Schema<PatchQueueResponse>;
|
|
2970
|
-
|
|
2971
|
-
export type PatchQueueError = DefaultErrors | QueueNotFound | InvalidRoute;
|
|
1223
|
+
settings: Schema.optional(Schema.Union([Schema.Struct({
|
|
1224
|
+
deliveryDelay: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
|
|
1225
|
+
deliveryPaused: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
|
|
1226
|
+
messageRetentionPeriod: Schema.optional(Schema.Union([Schema.Number, Schema.Null]))
|
|
1227
|
+
}).pipe(Schema.encodeKeys({ deliveryDelay: "delivery_delay", deliveryPaused: "delivery_paused", messageRetentionPeriod: "message_retention_period" })), Schema.Null]))
|
|
1228
|
+
}).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")) as unknown as Schema.Schema<PatchQueueResponse>;
|
|
1229
|
+
|
|
1230
|
+
export type PatchQueueError =
|
|
1231
|
+
| DefaultErrors
|
|
1232
|
+
| QueueNotFound
|
|
1233
|
+
| InvalidRoute;
|
|
2972
1234
|
|
|
2973
1235
|
export const patchQueue: API.OperationMethod<
|
|
2974
1236
|
PatchQueueRequest,
|
|
@@ -2989,64 +1251,34 @@ export interface DeleteQueueRequest {
|
|
|
2989
1251
|
|
|
2990
1252
|
export const DeleteQueueRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
2991
1253
|
queueId: Schema.String.pipe(T.HttpPath("queueId")),
|
|
2992
|
-
accountId: Schema.String.pipe(T.HttpPath("account_id"))
|
|
2993
|
-
})
|
|
2994
|
-
T.Http({ method: "DELETE", path: "/accounts/{account_id}/queues/{queueId}" })
|
|
2995
|
-
) as unknown as Schema.Schema<DeleteQueueRequest>;
|
|
1254
|
+
accountId: Schema.String.pipe(T.HttpPath("account_id"))
|
|
1255
|
+
})
|
|
1256
|
+
.pipe(T.Http({ method: "DELETE", path: "/accounts/{account_id}/queues/{queueId}" })) as unknown as Schema.Schema<DeleteQueueRequest>;
|
|
2996
1257
|
|
|
2997
1258
|
export interface DeleteQueueResponse {
|
|
2998
|
-
errors?:
|
|
2999
|
-
| {
|
|
3000
|
-
code: number;
|
|
3001
|
-
message: string;
|
|
3002
|
-
documentationUrl?: string | null;
|
|
3003
|
-
source?: { pointer?: string | null } | null;
|
|
3004
|
-
}[]
|
|
3005
|
-
| null;
|
|
1259
|
+
errors?: ({ code: number; message: string; documentationUrl?: string | null; source?: { pointer?: string | null } | null })[] | null;
|
|
3006
1260
|
messages?: string[] | null;
|
|
3007
1261
|
/** Indicates if the API call was successful or not. */
|
|
3008
1262
|
success?: true | null;
|
|
3009
1263
|
}
|
|
3010
1264
|
|
|
3011
1265
|
export const DeleteQueueResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
3012
|
-
errors: Schema.optional(
|
|
3013
|
-
|
|
3014
|
-
|
|
3015
|
-
|
|
3016
|
-
|
|
3017
|
-
|
|
3018
|
-
|
|
3019
|
-
|
|
3020
|
-
|
|
3021
|
-
|
|
3022
|
-
Schema.Union([
|
|
3023
|
-
Schema.Struct({
|
|
3024
|
-
pointer: Schema.optional(
|
|
3025
|
-
Schema.Union([Schema.String, Schema.Null]),
|
|
3026
|
-
),
|
|
3027
|
-
}),
|
|
3028
|
-
Schema.Null,
|
|
3029
|
-
]),
|
|
3030
|
-
),
|
|
3031
|
-
}).pipe(
|
|
3032
|
-
Schema.encodeKeys({
|
|
3033
|
-
code: "code",
|
|
3034
|
-
message: "message",
|
|
3035
|
-
documentationUrl: "documentation_url",
|
|
3036
|
-
source: "source",
|
|
3037
|
-
}),
|
|
3038
|
-
),
|
|
3039
|
-
),
|
|
3040
|
-
Schema.Null,
|
|
3041
|
-
]),
|
|
3042
|
-
),
|
|
3043
|
-
messages: Schema.optional(
|
|
3044
|
-
Schema.Union([Schema.Array(Schema.String), Schema.Null]),
|
|
3045
|
-
),
|
|
3046
|
-
success: Schema.optional(Schema.Union([Schema.Literal(true), Schema.Null])),
|
|
1266
|
+
errors: Schema.optional(Schema.Union([Schema.Array(Schema.Struct({
|
|
1267
|
+
code: Schema.Number,
|
|
1268
|
+
message: Schema.String,
|
|
1269
|
+
documentationUrl: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
1270
|
+
source: Schema.optional(Schema.Union([Schema.Struct({
|
|
1271
|
+
pointer: Schema.optional(Schema.Union([Schema.String, Schema.Null]))
|
|
1272
|
+
}), Schema.Null]))
|
|
1273
|
+
}).pipe(Schema.encodeKeys({ code: "code", message: "message", documentationUrl: "documentation_url", source: "source" }))), Schema.Null])),
|
|
1274
|
+
messages: Schema.optional(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
|
|
1275
|
+
success: Schema.optional(Schema.Union([Schema.Literal(true), Schema.Null]))
|
|
3047
1276
|
}) as unknown as Schema.Schema<DeleteQueueResponse>;
|
|
3048
1277
|
|
|
3049
|
-
export type DeleteQueueError =
|
|
1278
|
+
export type DeleteQueueError =
|
|
1279
|
+
| DefaultErrors
|
|
1280
|
+
| QueueNotFound
|
|
1281
|
+
| InvalidRoute;
|
|
3050
1282
|
|
|
3051
1283
|
export const deleteQueue: API.OperationMethod<
|
|
3052
1284
|
DeleteQueueRequest,
|
|
@@ -3059,6 +1291,7 @@ export const deleteQueue: API.OperationMethod<
|
|
|
3059
1291
|
errors: [QueueNotFound, InvalidRoute],
|
|
3060
1292
|
}));
|
|
3061
1293
|
|
|
1294
|
+
|
|
3062
1295
|
// =============================================================================
|
|
3063
1296
|
// Subscription
|
|
3064
1297
|
// =============================================================================
|
|
@@ -3069,17 +1302,11 @@ export interface GetSubscriptionRequest {
|
|
|
3069
1302
|
accountId: string;
|
|
3070
1303
|
}
|
|
3071
1304
|
|
|
3072
|
-
export const GetSubscriptionRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct(
|
|
3073
|
-
|
|
3074
|
-
|
|
3075
|
-
|
|
3076
|
-
}
|
|
3077
|
-
).pipe(
|
|
3078
|
-
T.Http({
|
|
3079
|
-
method: "GET",
|
|
3080
|
-
path: "/accounts/{account_id}/event_subscriptions/subscriptions/{subscriptionId}",
|
|
3081
|
-
}),
|
|
3082
|
-
) as unknown as Schema.Schema<GetSubscriptionRequest>;
|
|
1305
|
+
export const GetSubscriptionRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
1306
|
+
subscriptionId: Schema.String.pipe(T.HttpPath("subscriptionId")),
|
|
1307
|
+
accountId: Schema.String.pipe(T.HttpPath("account_id"))
|
|
1308
|
+
})
|
|
1309
|
+
.pipe(T.Http({ method: "GET", path: "/accounts/{account_id}/event_subscriptions/subscriptions/{subscriptionId}" })) as unknown as Schema.Schema<GetSubscriptionRequest>;
|
|
3083
1310
|
|
|
3084
1311
|
export interface GetSubscriptionResponse {
|
|
3085
1312
|
/** Unique identifier for the subscription */
|
|
@@ -3097,96 +1324,45 @@ export interface GetSubscriptionResponse {
|
|
|
3097
1324
|
/** Name of the subscription */
|
|
3098
1325
|
name: string;
|
|
3099
1326
|
/** Source configuration for the subscription */
|
|
3100
|
-
source:
|
|
3101
|
-
| { type?: "images" | null }
|
|
3102
|
-
| { type?: "kv" | null }
|
|
3103
|
-
| { type?: "r2" | null }
|
|
3104
|
-
| { type?: "superSlurper" | null }
|
|
3105
|
-
| { type?: "vectorize" | null }
|
|
3106
|
-
| { modelName?: string | null; type?: "workersAi.model" | null }
|
|
3107
|
-
| { type?: "workersBuilds.worker" | null; workerName?: string | null }
|
|
3108
|
-
| { type?: "workflows.workflow" | null; workflowName?: string | null };
|
|
1327
|
+
source: { type?: "images" | null } | { type?: "kv" | null } | { type?: "r2" | null } | { type?: "superSlurper" | null } | { type?: "vectorize" | null } | { modelName?: string | null; type?: "workersAi.model" | null } | { type?: "workersBuilds.worker" | null; workerName?: string | null } | { type?: "workflows.workflow" | null; workflowName?: string | null };
|
|
3109
1328
|
}
|
|
3110
1329
|
|
|
3111
|
-
export const GetSubscriptionResponse =
|
|
3112
|
-
|
|
3113
|
-
|
|
3114
|
-
|
|
3115
|
-
|
|
3116
|
-
|
|
3117
|
-
|
|
3118
|
-
|
|
3119
|
-
|
|
3120
|
-
|
|
3121
|
-
|
|
3122
|
-
|
|
3123
|
-
|
|
3124
|
-
|
|
3125
|
-
|
|
3126
|
-
|
|
3127
|
-
|
|
3128
|
-
|
|
3129
|
-
|
|
3130
|
-
|
|
3131
|
-
|
|
3132
|
-
|
|
3133
|
-
|
|
3134
|
-
|
|
3135
|
-
|
|
3136
|
-
|
|
3137
|
-
|
|
3138
|
-
|
|
3139
|
-
|
|
3140
|
-
|
|
3141
|
-
|
|
3142
|
-
|
|
3143
|
-
|
|
3144
|
-
|
|
3145
|
-
|
|
3146
|
-
|
|
3147
|
-
),
|
|
3148
|
-
}),
|
|
3149
|
-
Schema.Struct({
|
|
3150
|
-
modelName: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
3151
|
-
type: Schema.optional(
|
|
3152
|
-
Schema.Union([Schema.Literal("workersAi.model"), Schema.Null]),
|
|
3153
|
-
),
|
|
3154
|
-
}).pipe(Schema.encodeKeys({ modelName: "model_name", type: "type" })),
|
|
3155
|
-
Schema.Struct({
|
|
3156
|
-
type: Schema.optional(
|
|
3157
|
-
Schema.Union([Schema.Literal("workersBuilds.worker"), Schema.Null]),
|
|
3158
|
-
),
|
|
3159
|
-
workerName: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
3160
|
-
}).pipe(Schema.encodeKeys({ type: "type", workerName: "worker_name" })),
|
|
3161
|
-
Schema.Struct({
|
|
3162
|
-
type: Schema.optional(
|
|
3163
|
-
Schema.Union([Schema.Literal("workflows.workflow"), Schema.Null]),
|
|
3164
|
-
),
|
|
3165
|
-
workflowName: Schema.optional(
|
|
3166
|
-
Schema.Union([Schema.String, Schema.Null]),
|
|
3167
|
-
),
|
|
3168
|
-
}).pipe(
|
|
3169
|
-
Schema.encodeKeys({ type: "type", workflowName: "workflow_name" }),
|
|
3170
|
-
),
|
|
3171
|
-
]),
|
|
3172
|
-
})
|
|
3173
|
-
.pipe(
|
|
3174
|
-
Schema.encodeKeys({
|
|
3175
|
-
id: "id",
|
|
3176
|
-
createdAt: "created_at",
|
|
3177
|
-
destination: "destination",
|
|
3178
|
-
enabled: "enabled",
|
|
3179
|
-
events: "events",
|
|
3180
|
-
modifiedAt: "modified_at",
|
|
3181
|
-
name: "name",
|
|
3182
|
-
source: "source",
|
|
3183
|
-
}),
|
|
3184
|
-
)
|
|
3185
|
-
.pipe(
|
|
3186
|
-
T.ResponsePath("result"),
|
|
3187
|
-
) as unknown as Schema.Schema<GetSubscriptionResponse>;
|
|
3188
|
-
|
|
3189
|
-
export type GetSubscriptionError = DefaultErrors | UnrecognizedEventType;
|
|
1330
|
+
export const GetSubscriptionResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
1331
|
+
id: Schema.String,
|
|
1332
|
+
createdAt: Schema.String,
|
|
1333
|
+
destination: Schema.Struct({
|
|
1334
|
+
queueId: Schema.String,
|
|
1335
|
+
type: Schema.Literal("queues.queue")
|
|
1336
|
+
}).pipe(Schema.encodeKeys({ queueId: "queue_id", type: "type" })),
|
|
1337
|
+
enabled: Schema.Boolean,
|
|
1338
|
+
events: Schema.Array(Schema.String),
|
|
1339
|
+
modifiedAt: Schema.String,
|
|
1340
|
+
name: Schema.String,
|
|
1341
|
+
source: Schema.Union([Schema.Struct({
|
|
1342
|
+
type: Schema.optional(Schema.Union([Schema.Literal("images"), Schema.Null]))
|
|
1343
|
+
}), Schema.Struct({
|
|
1344
|
+
type: Schema.optional(Schema.Union([Schema.Literal("kv"), Schema.Null]))
|
|
1345
|
+
}), Schema.Struct({
|
|
1346
|
+
type: Schema.optional(Schema.Union([Schema.Literal("r2"), Schema.Null]))
|
|
1347
|
+
}), Schema.Struct({
|
|
1348
|
+
type: Schema.optional(Schema.Union([Schema.Literal("superSlurper"), Schema.Null]))
|
|
1349
|
+
}), Schema.Struct({
|
|
1350
|
+
type: Schema.optional(Schema.Union([Schema.Literal("vectorize"), Schema.Null]))
|
|
1351
|
+
}), Schema.Struct({
|
|
1352
|
+
modelName: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
1353
|
+
type: Schema.optional(Schema.Union([Schema.Literal("workersAi.model"), Schema.Null]))
|
|
1354
|
+
}).pipe(Schema.encodeKeys({ modelName: "model_name", type: "type" })), Schema.Struct({
|
|
1355
|
+
type: Schema.optional(Schema.Union([Schema.Literal("workersBuilds.worker"), Schema.Null])),
|
|
1356
|
+
workerName: Schema.optional(Schema.Union([Schema.String, Schema.Null]))
|
|
1357
|
+
}).pipe(Schema.encodeKeys({ type: "type", workerName: "worker_name" })), Schema.Struct({
|
|
1358
|
+
type: Schema.optional(Schema.Union([Schema.Literal("workflows.workflow"), Schema.Null])),
|
|
1359
|
+
workflowName: Schema.optional(Schema.Union([Schema.String, Schema.Null]))
|
|
1360
|
+
}).pipe(Schema.encodeKeys({ type: "type", workflowName: "workflow_name" }))])
|
|
1361
|
+
}).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")) as unknown as Schema.Schema<GetSubscriptionResponse>;
|
|
1362
|
+
|
|
1363
|
+
export type GetSubscriptionError =
|
|
1364
|
+
| DefaultErrors
|
|
1365
|
+
| UnrecognizedEventType;
|
|
3190
1366
|
|
|
3191
1367
|
export const getSubscription: API.OperationMethod<
|
|
3192
1368
|
GetSubscriptionRequest,
|
|
@@ -3208,152 +1384,61 @@ export interface ListSubscriptionsRequest {
|
|
|
3208
1384
|
order?: "created_at" | "name" | "enabled" | "source";
|
|
3209
1385
|
}
|
|
3210
1386
|
|
|
3211
|
-
export const ListSubscriptionsRequest =
|
|
3212
|
-
|
|
3213
|
-
|
|
3214
|
-
|
|
3215
|
-
|
|
3216
|
-
|
|
3217
|
-
order: Schema.optional(
|
|
3218
|
-
Schema.Literals(["created_at", "name", "enabled", "source"]),
|
|
3219
|
-
).pipe(T.HttpQuery("order")),
|
|
3220
|
-
}).pipe(
|
|
3221
|
-
T.Http({
|
|
3222
|
-
method: "GET",
|
|
3223
|
-
path: "/accounts/{account_id}/event_subscriptions/subscriptions",
|
|
3224
|
-
}),
|
|
3225
|
-
) as unknown as Schema.Schema<ListSubscriptionsRequest>;
|
|
1387
|
+
export const ListSubscriptionsRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
1388
|
+
accountId: Schema.String.pipe(T.HttpPath("account_id")),
|
|
1389
|
+
direction: Schema.optional(Schema.Literals(["asc", "desc"])).pipe(T.HttpQuery("direction")),
|
|
1390
|
+
order: Schema.optional(Schema.Literals(["created_at", "name", "enabled", "source"])).pipe(T.HttpQuery("order"))
|
|
1391
|
+
})
|
|
1392
|
+
.pipe(T.Http({ method: "GET", path: "/accounts/{account_id}/event_subscriptions/subscriptions" })) as unknown as Schema.Schema<ListSubscriptionsRequest>;
|
|
3226
1393
|
|
|
3227
1394
|
export interface ListSubscriptionsResponse {
|
|
3228
|
-
result: {
|
|
3229
|
-
|
|
3230
|
-
createdAt: string;
|
|
3231
|
-
destination: { queueId: string; type: "queues.queue" };
|
|
3232
|
-
enabled: boolean;
|
|
3233
|
-
events: string[];
|
|
3234
|
-
modifiedAt: string;
|
|
3235
|
-
name: string;
|
|
3236
|
-
source:
|
|
3237
|
-
| { type?: "images" | null }
|
|
3238
|
-
| { type?: "kv" | null }
|
|
3239
|
-
| { type?: "r2" | null }
|
|
3240
|
-
| { type?: "superSlurper" | null }
|
|
3241
|
-
| { type?: "vectorize" | null }
|
|
3242
|
-
| { modelName?: string | null; type?: "workersAi.model" | null }
|
|
3243
|
-
| { type?: "workersBuilds.worker" | null; workerName?: string | null }
|
|
3244
|
-
| { type?: "workflows.workflow" | null; workflowName?: string | null };
|
|
3245
|
-
}[];
|
|
3246
|
-
resultInfo: {
|
|
3247
|
-
count?: number | null;
|
|
3248
|
-
page?: number | null;
|
|
3249
|
-
perPage?: number | null;
|
|
3250
|
-
totalCount?: number | null;
|
|
3251
|
-
};
|
|
1395
|
+
result: ({ id: string; createdAt: string; destination: { queueId: string; type: "queues.queue" }; enabled: boolean; events: string[]; modifiedAt: string; name: string; source: { type?: "images" | null } | { type?: "kv" | null } | { type?: "r2" | null } | { type?: "superSlurper" | null } | { type?: "vectorize" | null } | { modelName?: string | null; type?: "workersAi.model" | null } | { type?: "workersBuilds.worker" | null; workerName?: string | null } | { type?: "workflows.workflow" | null; workflowName?: string | null } })[];
|
|
1396
|
+
resultInfo: { count?: number | null; page?: number | null; perPage?: number | null; totalCount?: number | null };
|
|
3252
1397
|
}
|
|
3253
1398
|
|
|
3254
|
-
export const ListSubscriptionsResponse =
|
|
3255
|
-
|
|
3256
|
-
|
|
3257
|
-
|
|
3258
|
-
|
|
3259
|
-
|
|
3260
|
-
|
|
3261
|
-
|
|
3262
|
-
|
|
3263
|
-
|
|
3264
|
-
|
|
3265
|
-
|
|
3266
|
-
|
|
3267
|
-
|
|
3268
|
-
|
|
3269
|
-
|
|
3270
|
-
|
|
3271
|
-
|
|
3272
|
-
|
|
3273
|
-
|
|
3274
|
-
|
|
3275
|
-
|
|
3276
|
-
|
|
3277
|
-
|
|
3278
|
-
|
|
3279
|
-
|
|
3280
|
-
|
|
3281
|
-
|
|
3282
|
-
|
|
3283
|
-
|
|
3284
|
-
|
|
3285
|
-
|
|
3286
|
-
|
|
3287
|
-
|
|
3288
|
-
|
|
3289
|
-
|
|
3290
|
-
|
|
3291
|
-
|
|
3292
|
-
|
|
3293
|
-
|
|
3294
|
-
|
|
3295
|
-
|
|
3296
|
-
|
|
3297
|
-
),
|
|
3298
|
-
type: Schema.optional(
|
|
3299
|
-
Schema.Union([Schema.Literal("workersAi.model"), Schema.Null]),
|
|
3300
|
-
),
|
|
3301
|
-
}).pipe(Schema.encodeKeys({ modelName: "model_name", type: "type" })),
|
|
3302
|
-
Schema.Struct({
|
|
3303
|
-
type: Schema.optional(
|
|
3304
|
-
Schema.Union([
|
|
3305
|
-
Schema.Literal("workersBuilds.worker"),
|
|
3306
|
-
Schema.Null,
|
|
3307
|
-
]),
|
|
3308
|
-
),
|
|
3309
|
-
workerName: Schema.optional(
|
|
3310
|
-
Schema.Union([Schema.String, Schema.Null]),
|
|
3311
|
-
),
|
|
3312
|
-
}).pipe(
|
|
3313
|
-
Schema.encodeKeys({ type: "type", workerName: "worker_name" }),
|
|
3314
|
-
),
|
|
3315
|
-
Schema.Struct({
|
|
3316
|
-
type: Schema.optional(
|
|
3317
|
-
Schema.Union([Schema.Literal("workflows.workflow"), Schema.Null]),
|
|
3318
|
-
),
|
|
3319
|
-
workflowName: Schema.optional(
|
|
3320
|
-
Schema.Union([Schema.String, Schema.Null]),
|
|
3321
|
-
),
|
|
3322
|
-
}).pipe(
|
|
3323
|
-
Schema.encodeKeys({ type: "type", workflowName: "workflow_name" }),
|
|
3324
|
-
),
|
|
3325
|
-
]),
|
|
3326
|
-
}).pipe(
|
|
3327
|
-
Schema.encodeKeys({
|
|
3328
|
-
id: "id",
|
|
3329
|
-
createdAt: "created_at",
|
|
3330
|
-
destination: "destination",
|
|
3331
|
-
enabled: "enabled",
|
|
3332
|
-
events: "events",
|
|
3333
|
-
modifiedAt: "modified_at",
|
|
3334
|
-
name: "name",
|
|
3335
|
-
source: "source",
|
|
3336
|
-
}),
|
|
3337
|
-
),
|
|
3338
|
-
),
|
|
3339
|
-
resultInfo: Schema.Struct({
|
|
3340
|
-
count: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
|
|
3341
|
-
page: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
|
|
3342
|
-
perPage: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
|
|
3343
|
-
totalCount: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
|
|
3344
|
-
}).pipe(
|
|
3345
|
-
Schema.encodeKeys({
|
|
3346
|
-
count: "count",
|
|
3347
|
-
page: "page",
|
|
3348
|
-
perPage: "per_page",
|
|
3349
|
-
totalCount: "total_count",
|
|
3350
|
-
}),
|
|
3351
|
-
),
|
|
3352
|
-
}).pipe(
|
|
3353
|
-
Schema.encodeKeys({ result: "result", resultInfo: "result_info" }),
|
|
3354
|
-
) as unknown as Schema.Schema<ListSubscriptionsResponse>;
|
|
3355
|
-
|
|
3356
|
-
export type ListSubscriptionsError = DefaultErrors;
|
|
1399
|
+
export const ListSubscriptionsResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
1400
|
+
result: Schema.Array(Schema.Struct({
|
|
1401
|
+
id: Schema.String,
|
|
1402
|
+
createdAt: Schema.String,
|
|
1403
|
+
destination: Schema.Struct({
|
|
1404
|
+
queueId: Schema.String,
|
|
1405
|
+
type: Schema.Literal("queues.queue")
|
|
1406
|
+
}).pipe(Schema.encodeKeys({ queueId: "queue_id", type: "type" })),
|
|
1407
|
+
enabled: Schema.Boolean,
|
|
1408
|
+
events: Schema.Array(Schema.String),
|
|
1409
|
+
modifiedAt: Schema.String,
|
|
1410
|
+
name: Schema.String,
|
|
1411
|
+
source: Schema.Union([Schema.Struct({
|
|
1412
|
+
type: Schema.optional(Schema.Union([Schema.Literal("images"), Schema.Null]))
|
|
1413
|
+
}), Schema.Struct({
|
|
1414
|
+
type: Schema.optional(Schema.Union([Schema.Literal("kv"), Schema.Null]))
|
|
1415
|
+
}), Schema.Struct({
|
|
1416
|
+
type: Schema.optional(Schema.Union([Schema.Literal("r2"), Schema.Null]))
|
|
1417
|
+
}), Schema.Struct({
|
|
1418
|
+
type: Schema.optional(Schema.Union([Schema.Literal("superSlurper"), Schema.Null]))
|
|
1419
|
+
}), Schema.Struct({
|
|
1420
|
+
type: Schema.optional(Schema.Union([Schema.Literal("vectorize"), Schema.Null]))
|
|
1421
|
+
}), Schema.Struct({
|
|
1422
|
+
modelName: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
1423
|
+
type: Schema.optional(Schema.Union([Schema.Literal("workersAi.model"), Schema.Null]))
|
|
1424
|
+
}).pipe(Schema.encodeKeys({ modelName: "model_name", type: "type" })), Schema.Struct({
|
|
1425
|
+
type: Schema.optional(Schema.Union([Schema.Literal("workersBuilds.worker"), Schema.Null])),
|
|
1426
|
+
workerName: Schema.optional(Schema.Union([Schema.String, Schema.Null]))
|
|
1427
|
+
}).pipe(Schema.encodeKeys({ type: "type", workerName: "worker_name" })), Schema.Struct({
|
|
1428
|
+
type: Schema.optional(Schema.Union([Schema.Literal("workflows.workflow"), Schema.Null])),
|
|
1429
|
+
workflowName: Schema.optional(Schema.Union([Schema.String, Schema.Null]))
|
|
1430
|
+
}).pipe(Schema.encodeKeys({ type: "type", workflowName: "workflow_name" }))])
|
|
1431
|
+
}).pipe(Schema.encodeKeys({ id: "id", createdAt: "created_at", destination: "destination", enabled: "enabled", events: "events", modifiedAt: "modified_at", name: "name", source: "source" }))),
|
|
1432
|
+
resultInfo: Schema.Struct({
|
|
1433
|
+
count: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
|
|
1434
|
+
page: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
|
|
1435
|
+
perPage: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
|
|
1436
|
+
totalCount: Schema.optional(Schema.Union([Schema.Number, Schema.Null]))
|
|
1437
|
+
}).pipe(Schema.encodeKeys({ count: "count", page: "page", perPage: "per_page", totalCount: "total_count" }))
|
|
1438
|
+
}).pipe(Schema.encodeKeys({ result: "result", resultInfo: "result_info" })) as unknown as Schema.Schema<ListSubscriptionsResponse>;
|
|
1439
|
+
|
|
1440
|
+
export type ListSubscriptionsError =
|
|
1441
|
+
| DefaultErrors;
|
|
3357
1442
|
|
|
3358
1443
|
export const listSubscriptions: API.PaginatedOperationMethod<
|
|
3359
1444
|
ListSubscriptionsRequest,
|
|
@@ -3385,68 +1470,40 @@ export interface CreateSubscriptionRequest {
|
|
|
3385
1470
|
/** Body param: Name of the subscription */
|
|
3386
1471
|
name?: string;
|
|
3387
1472
|
/** Body param: Source configuration for the subscription */
|
|
3388
|
-
source?:
|
|
3389
|
-
| { type?: "images" }
|
|
3390
|
-
| { type?: "kv" }
|
|
3391
|
-
| { type?: "r2" }
|
|
3392
|
-
| { type?: "superSlurper" }
|
|
3393
|
-
| { type?: "vectorize" }
|
|
3394
|
-
| { modelName?: string; type?: "workersAi.model" }
|
|
3395
|
-
| { type?: "workersBuilds.worker"; workerName?: string }
|
|
3396
|
-
| { type?: "workflows.workflow"; workflowName?: string };
|
|
1473
|
+
source?: { type?: "images" } | { type?: "kv" } | { type?: "r2" } | { type?: "superSlurper" } | { type?: "vectorize" } | { modelName?: string; type?: "workersAi.model" } | { type?: "workersBuilds.worker"; workerName?: string } | { type?: "workflows.workflow"; workflowName?: string };
|
|
3397
1474
|
}
|
|
3398
1475
|
|
|
3399
|
-
export const CreateSubscriptionRequest =
|
|
3400
|
-
|
|
3401
|
-
|
|
3402
|
-
|
|
3403
|
-
|
|
3404
|
-
|
|
3405
|
-
|
|
3406
|
-
|
|
3407
|
-
|
|
3408
|
-
|
|
3409
|
-
|
|
3410
|
-
|
|
3411
|
-
|
|
3412
|
-
|
|
3413
|
-
|
|
3414
|
-
|
|
3415
|
-
|
|
3416
|
-
|
|
3417
|
-
|
|
3418
|
-
|
|
3419
|
-
|
|
3420
|
-
|
|
3421
|
-
|
|
3422
|
-
|
|
3423
|
-
|
|
3424
|
-
|
|
3425
|
-
|
|
3426
|
-
|
|
3427
|
-
|
|
3428
|
-
|
|
3429
|
-
|
|
3430
|
-
type: Schema.optional(Schema.Literal("workersAi.model")),
|
|
3431
|
-
}).pipe(Schema.encodeKeys({ modelName: "model_name", type: "type" })),
|
|
3432
|
-
Schema.Struct({
|
|
3433
|
-
type: Schema.optional(Schema.Literal("workersBuilds.worker")),
|
|
3434
|
-
workerName: Schema.optional(Schema.String),
|
|
3435
|
-
}).pipe(Schema.encodeKeys({ type: "type", workerName: "worker_name" })),
|
|
3436
|
-
Schema.Struct({
|
|
3437
|
-
type: Schema.optional(Schema.Literal("workflows.workflow")),
|
|
3438
|
-
workflowName: Schema.optional(Schema.String),
|
|
3439
|
-
}).pipe(
|
|
3440
|
-
Schema.encodeKeys({ type: "type", workflowName: "workflow_name" }),
|
|
3441
|
-
),
|
|
3442
|
-
]),
|
|
3443
|
-
),
|
|
3444
|
-
}).pipe(
|
|
3445
|
-
T.Http({
|
|
3446
|
-
method: "POST",
|
|
3447
|
-
path: "/accounts/{account_id}/event_subscriptions/subscriptions",
|
|
3448
|
-
}),
|
|
3449
|
-
) as unknown as Schema.Schema<CreateSubscriptionRequest>;
|
|
1476
|
+
export const CreateSubscriptionRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
1477
|
+
accountId: Schema.String.pipe(T.HttpPath("account_id")),
|
|
1478
|
+
destination: Schema.optional(Schema.Struct({
|
|
1479
|
+
queueId: Schema.String,
|
|
1480
|
+
type: Schema.Literal("queues.queue")
|
|
1481
|
+
}).pipe(Schema.encodeKeys({ queueId: "queue_id", type: "type" }))),
|
|
1482
|
+
enabled: Schema.optional(Schema.Boolean),
|
|
1483
|
+
events: Schema.optional(Schema.Array(Schema.String)),
|
|
1484
|
+
name: Schema.optional(Schema.String),
|
|
1485
|
+
source: Schema.optional(Schema.Union([Schema.Struct({
|
|
1486
|
+
type: Schema.optional(Schema.Literal("images"))
|
|
1487
|
+
}), Schema.Struct({
|
|
1488
|
+
type: Schema.optional(Schema.Literal("kv"))
|
|
1489
|
+
}), Schema.Struct({
|
|
1490
|
+
type: Schema.optional(Schema.Literal("r2"))
|
|
1491
|
+
}), Schema.Struct({
|
|
1492
|
+
type: Schema.optional(Schema.Literal("superSlurper"))
|
|
1493
|
+
}), Schema.Struct({
|
|
1494
|
+
type: Schema.optional(Schema.Literal("vectorize"))
|
|
1495
|
+
}), Schema.Struct({
|
|
1496
|
+
modelName: Schema.optional(Schema.String),
|
|
1497
|
+
type: Schema.optional(Schema.Literal("workersAi.model"))
|
|
1498
|
+
}).pipe(Schema.encodeKeys({ modelName: "model_name", type: "type" })), Schema.Struct({
|
|
1499
|
+
type: Schema.optional(Schema.Literal("workersBuilds.worker")),
|
|
1500
|
+
workerName: Schema.optional(Schema.String)
|
|
1501
|
+
}).pipe(Schema.encodeKeys({ type: "type", workerName: "worker_name" })), Schema.Struct({
|
|
1502
|
+
type: Schema.optional(Schema.Literal("workflows.workflow")),
|
|
1503
|
+
workflowName: Schema.optional(Schema.String)
|
|
1504
|
+
}).pipe(Schema.encodeKeys({ type: "type", workflowName: "workflow_name" }))]))
|
|
1505
|
+
})
|
|
1506
|
+
.pipe(T.Http({ method: "POST", path: "/accounts/{account_id}/event_subscriptions/subscriptions" })) as unknown as Schema.Schema<CreateSubscriptionRequest>;
|
|
3450
1507
|
|
|
3451
1508
|
export interface CreateSubscriptionResponse {
|
|
3452
1509
|
/** Unique identifier for the subscription */
|
|
@@ -3464,96 +1521,45 @@ export interface CreateSubscriptionResponse {
|
|
|
3464
1521
|
/** Name of the subscription */
|
|
3465
1522
|
name: string;
|
|
3466
1523
|
/** Source configuration for the subscription */
|
|
3467
|
-
source:
|
|
3468
|
-
| { type?: "images" | null }
|
|
3469
|
-
| { type?: "kv" | null }
|
|
3470
|
-
| { type?: "r2" | null }
|
|
3471
|
-
| { type?: "superSlurper" | null }
|
|
3472
|
-
| { type?: "vectorize" | null }
|
|
3473
|
-
| { modelName?: string | null; type?: "workersAi.model" | null }
|
|
3474
|
-
| { type?: "workersBuilds.worker" | null; workerName?: string | null }
|
|
3475
|
-
| { type?: "workflows.workflow" | null; workflowName?: string | null };
|
|
1524
|
+
source: { type?: "images" | null } | { type?: "kv" | null } | { type?: "r2" | null } | { type?: "superSlurper" | null } | { type?: "vectorize" | null } | { modelName?: string | null; type?: "workersAi.model" | null } | { type?: "workersBuilds.worker" | null; workerName?: string | null } | { type?: "workflows.workflow" | null; workflowName?: string | null };
|
|
3476
1525
|
}
|
|
3477
1526
|
|
|
3478
|
-
export const CreateSubscriptionResponse =
|
|
3479
|
-
|
|
3480
|
-
|
|
3481
|
-
|
|
3482
|
-
|
|
3483
|
-
|
|
3484
|
-
|
|
3485
|
-
|
|
3486
|
-
|
|
3487
|
-
|
|
3488
|
-
|
|
3489
|
-
|
|
3490
|
-
|
|
3491
|
-
|
|
3492
|
-
|
|
3493
|
-
|
|
3494
|
-
|
|
3495
|
-
|
|
3496
|
-
|
|
3497
|
-
|
|
3498
|
-
|
|
3499
|
-
|
|
3500
|
-
|
|
3501
|
-
|
|
3502
|
-
|
|
3503
|
-
|
|
3504
|
-
|
|
3505
|
-
|
|
3506
|
-
|
|
3507
|
-
|
|
3508
|
-
|
|
3509
|
-
|
|
3510
|
-
|
|
3511
|
-
|
|
3512
|
-
|
|
3513
|
-
|
|
3514
|
-
),
|
|
3515
|
-
}),
|
|
3516
|
-
Schema.Struct({
|
|
3517
|
-
modelName: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
3518
|
-
type: Schema.optional(
|
|
3519
|
-
Schema.Union([Schema.Literal("workersAi.model"), Schema.Null]),
|
|
3520
|
-
),
|
|
3521
|
-
}).pipe(Schema.encodeKeys({ modelName: "model_name", type: "type" })),
|
|
3522
|
-
Schema.Struct({
|
|
3523
|
-
type: Schema.optional(
|
|
3524
|
-
Schema.Union([Schema.Literal("workersBuilds.worker"), Schema.Null]),
|
|
3525
|
-
),
|
|
3526
|
-
workerName: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
3527
|
-
}).pipe(Schema.encodeKeys({ type: "type", workerName: "worker_name" })),
|
|
3528
|
-
Schema.Struct({
|
|
3529
|
-
type: Schema.optional(
|
|
3530
|
-
Schema.Union([Schema.Literal("workflows.workflow"), Schema.Null]),
|
|
3531
|
-
),
|
|
3532
|
-
workflowName: Schema.optional(
|
|
3533
|
-
Schema.Union([Schema.String, Schema.Null]),
|
|
3534
|
-
),
|
|
3535
|
-
}).pipe(
|
|
3536
|
-
Schema.encodeKeys({ type: "type", workflowName: "workflow_name" }),
|
|
3537
|
-
),
|
|
3538
|
-
]),
|
|
3539
|
-
})
|
|
3540
|
-
.pipe(
|
|
3541
|
-
Schema.encodeKeys({
|
|
3542
|
-
id: "id",
|
|
3543
|
-
createdAt: "created_at",
|
|
3544
|
-
destination: "destination",
|
|
3545
|
-
enabled: "enabled",
|
|
3546
|
-
events: "events",
|
|
3547
|
-
modifiedAt: "modified_at",
|
|
3548
|
-
name: "name",
|
|
3549
|
-
source: "source",
|
|
3550
|
-
}),
|
|
3551
|
-
)
|
|
3552
|
-
.pipe(
|
|
3553
|
-
T.ResponsePath("result"),
|
|
3554
|
-
) as unknown as Schema.Schema<CreateSubscriptionResponse>;
|
|
3555
|
-
|
|
3556
|
-
export type CreateSubscriptionError = DefaultErrors | UnrecognizedEventType;
|
|
1527
|
+
export const CreateSubscriptionResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
1528
|
+
id: Schema.String,
|
|
1529
|
+
createdAt: Schema.String,
|
|
1530
|
+
destination: Schema.Struct({
|
|
1531
|
+
queueId: Schema.String,
|
|
1532
|
+
type: Schema.Literal("queues.queue")
|
|
1533
|
+
}).pipe(Schema.encodeKeys({ queueId: "queue_id", type: "type" })),
|
|
1534
|
+
enabled: Schema.Boolean,
|
|
1535
|
+
events: Schema.Array(Schema.String),
|
|
1536
|
+
modifiedAt: Schema.String,
|
|
1537
|
+
name: Schema.String,
|
|
1538
|
+
source: Schema.Union([Schema.Struct({
|
|
1539
|
+
type: Schema.optional(Schema.Union([Schema.Literal("images"), Schema.Null]))
|
|
1540
|
+
}), Schema.Struct({
|
|
1541
|
+
type: Schema.optional(Schema.Union([Schema.Literal("kv"), Schema.Null]))
|
|
1542
|
+
}), Schema.Struct({
|
|
1543
|
+
type: Schema.optional(Schema.Union([Schema.Literal("r2"), Schema.Null]))
|
|
1544
|
+
}), Schema.Struct({
|
|
1545
|
+
type: Schema.optional(Schema.Union([Schema.Literal("superSlurper"), Schema.Null]))
|
|
1546
|
+
}), Schema.Struct({
|
|
1547
|
+
type: Schema.optional(Schema.Union([Schema.Literal("vectorize"), Schema.Null]))
|
|
1548
|
+
}), Schema.Struct({
|
|
1549
|
+
modelName: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
1550
|
+
type: Schema.optional(Schema.Union([Schema.Literal("workersAi.model"), Schema.Null]))
|
|
1551
|
+
}).pipe(Schema.encodeKeys({ modelName: "model_name", type: "type" })), Schema.Struct({
|
|
1552
|
+
type: Schema.optional(Schema.Union([Schema.Literal("workersBuilds.worker"), Schema.Null])),
|
|
1553
|
+
workerName: Schema.optional(Schema.Union([Schema.String, Schema.Null]))
|
|
1554
|
+
}).pipe(Schema.encodeKeys({ type: "type", workerName: "worker_name" })), Schema.Struct({
|
|
1555
|
+
type: Schema.optional(Schema.Union([Schema.Literal("workflows.workflow"), Schema.Null])),
|
|
1556
|
+
workflowName: Schema.optional(Schema.Union([Schema.String, Schema.Null]))
|
|
1557
|
+
}).pipe(Schema.encodeKeys({ type: "type", workflowName: "workflow_name" }))])
|
|
1558
|
+
}).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")) as unknown as Schema.Schema<CreateSubscriptionResponse>;
|
|
1559
|
+
|
|
1560
|
+
export type CreateSubscriptionError =
|
|
1561
|
+
| DefaultErrors
|
|
1562
|
+
| UnrecognizedEventType;
|
|
3557
1563
|
|
|
3558
1564
|
export const createSubscription: API.OperationMethod<
|
|
3559
1565
|
CreateSubscriptionRequest,
|
|
@@ -3580,25 +1586,18 @@ export interface PatchSubscriptionRequest {
|
|
|
3580
1586
|
name?: string;
|
|
3581
1587
|
}
|
|
3582
1588
|
|
|
3583
|
-
export const PatchSubscriptionRequest =
|
|
3584
|
-
|
|
3585
|
-
|
|
3586
|
-
|
|
3587
|
-
|
|
3588
|
-
|
|
3589
|
-
|
|
3590
|
-
|
|
3591
|
-
|
|
3592
|
-
|
|
3593
|
-
|
|
3594
|
-
|
|
3595
|
-
name: Schema.optional(Schema.String),
|
|
3596
|
-
}).pipe(
|
|
3597
|
-
T.Http({
|
|
3598
|
-
method: "PATCH",
|
|
3599
|
-
path: "/accounts/{account_id}/event_subscriptions/subscriptions/{subscriptionId}",
|
|
3600
|
-
}),
|
|
3601
|
-
) as unknown as Schema.Schema<PatchSubscriptionRequest>;
|
|
1589
|
+
export const PatchSubscriptionRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
1590
|
+
subscriptionId: Schema.String.pipe(T.HttpPath("subscriptionId")),
|
|
1591
|
+
accountId: Schema.String.pipe(T.HttpPath("account_id")),
|
|
1592
|
+
destination: Schema.optional(Schema.Struct({
|
|
1593
|
+
queueId: Schema.String,
|
|
1594
|
+
type: Schema.Literal("queues.queue")
|
|
1595
|
+
}).pipe(Schema.encodeKeys({ queueId: "queue_id", type: "type" }))),
|
|
1596
|
+
enabled: Schema.optional(Schema.Boolean),
|
|
1597
|
+
events: Schema.optional(Schema.Array(Schema.String)),
|
|
1598
|
+
name: Schema.optional(Schema.String)
|
|
1599
|
+
})
|
|
1600
|
+
.pipe(T.Http({ method: "PATCH", path: "/accounts/{account_id}/event_subscriptions/subscriptions/{subscriptionId}" })) as unknown as Schema.Schema<PatchSubscriptionRequest>;
|
|
3602
1601
|
|
|
3603
1602
|
export interface PatchSubscriptionResponse {
|
|
3604
1603
|
/** Unique identifier for the subscription */
|
|
@@ -3616,96 +1615,45 @@ export interface PatchSubscriptionResponse {
|
|
|
3616
1615
|
/** Name of the subscription */
|
|
3617
1616
|
name: string;
|
|
3618
1617
|
/** Source configuration for the subscription */
|
|
3619
|
-
source:
|
|
3620
|
-
| { type?: "images" | null }
|
|
3621
|
-
| { type?: "kv" | null }
|
|
3622
|
-
| { type?: "r2" | null }
|
|
3623
|
-
| { type?: "superSlurper" | null }
|
|
3624
|
-
| { type?: "vectorize" | null }
|
|
3625
|
-
| { modelName?: string | null; type?: "workersAi.model" | null }
|
|
3626
|
-
| { type?: "workersBuilds.worker" | null; workerName?: string | null }
|
|
3627
|
-
| { type?: "workflows.workflow" | null; workflowName?: string | null };
|
|
1618
|
+
source: { type?: "images" | null } | { type?: "kv" | null } | { type?: "r2" | null } | { type?: "superSlurper" | null } | { type?: "vectorize" | null } | { modelName?: string | null; type?: "workersAi.model" | null } | { type?: "workersBuilds.worker" | null; workerName?: string | null } | { type?: "workflows.workflow" | null; workflowName?: string | null };
|
|
3628
1619
|
}
|
|
3629
1620
|
|
|
3630
|
-
export const PatchSubscriptionResponse =
|
|
3631
|
-
|
|
3632
|
-
|
|
3633
|
-
|
|
3634
|
-
|
|
3635
|
-
|
|
3636
|
-
|
|
3637
|
-
|
|
3638
|
-
|
|
3639
|
-
|
|
3640
|
-
|
|
3641
|
-
|
|
3642
|
-
|
|
3643
|
-
|
|
3644
|
-
|
|
3645
|
-
|
|
3646
|
-
|
|
3647
|
-
|
|
3648
|
-
|
|
3649
|
-
|
|
3650
|
-
|
|
3651
|
-
|
|
3652
|
-
|
|
3653
|
-
|
|
3654
|
-
|
|
3655
|
-
|
|
3656
|
-
|
|
3657
|
-
|
|
3658
|
-
|
|
3659
|
-
|
|
3660
|
-
|
|
3661
|
-
|
|
3662
|
-
|
|
3663
|
-
|
|
3664
|
-
|
|
3665
|
-
|
|
3666
|
-
),
|
|
3667
|
-
}),
|
|
3668
|
-
Schema.Struct({
|
|
3669
|
-
modelName: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
3670
|
-
type: Schema.optional(
|
|
3671
|
-
Schema.Union([Schema.Literal("workersAi.model"), Schema.Null]),
|
|
3672
|
-
),
|
|
3673
|
-
}).pipe(Schema.encodeKeys({ modelName: "model_name", type: "type" })),
|
|
3674
|
-
Schema.Struct({
|
|
3675
|
-
type: Schema.optional(
|
|
3676
|
-
Schema.Union([Schema.Literal("workersBuilds.worker"), Schema.Null]),
|
|
3677
|
-
),
|
|
3678
|
-
workerName: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
3679
|
-
}).pipe(Schema.encodeKeys({ type: "type", workerName: "worker_name" })),
|
|
3680
|
-
Schema.Struct({
|
|
3681
|
-
type: Schema.optional(
|
|
3682
|
-
Schema.Union([Schema.Literal("workflows.workflow"), Schema.Null]),
|
|
3683
|
-
),
|
|
3684
|
-
workflowName: Schema.optional(
|
|
3685
|
-
Schema.Union([Schema.String, Schema.Null]),
|
|
3686
|
-
),
|
|
3687
|
-
}).pipe(
|
|
3688
|
-
Schema.encodeKeys({ type: "type", workflowName: "workflow_name" }),
|
|
3689
|
-
),
|
|
3690
|
-
]),
|
|
3691
|
-
})
|
|
3692
|
-
.pipe(
|
|
3693
|
-
Schema.encodeKeys({
|
|
3694
|
-
id: "id",
|
|
3695
|
-
createdAt: "created_at",
|
|
3696
|
-
destination: "destination",
|
|
3697
|
-
enabled: "enabled",
|
|
3698
|
-
events: "events",
|
|
3699
|
-
modifiedAt: "modified_at",
|
|
3700
|
-
name: "name",
|
|
3701
|
-
source: "source",
|
|
3702
|
-
}),
|
|
3703
|
-
)
|
|
3704
|
-
.pipe(
|
|
3705
|
-
T.ResponsePath("result"),
|
|
3706
|
-
) as unknown as Schema.Schema<PatchSubscriptionResponse>;
|
|
3707
|
-
|
|
3708
|
-
export type PatchSubscriptionError = DefaultErrors | UnrecognizedEventType;
|
|
1621
|
+
export const PatchSubscriptionResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
1622
|
+
id: Schema.String,
|
|
1623
|
+
createdAt: Schema.String,
|
|
1624
|
+
destination: Schema.Struct({
|
|
1625
|
+
queueId: Schema.String,
|
|
1626
|
+
type: Schema.Literal("queues.queue")
|
|
1627
|
+
}).pipe(Schema.encodeKeys({ queueId: "queue_id", type: "type" })),
|
|
1628
|
+
enabled: Schema.Boolean,
|
|
1629
|
+
events: Schema.Array(Schema.String),
|
|
1630
|
+
modifiedAt: Schema.String,
|
|
1631
|
+
name: Schema.String,
|
|
1632
|
+
source: Schema.Union([Schema.Struct({
|
|
1633
|
+
type: Schema.optional(Schema.Union([Schema.Literal("images"), Schema.Null]))
|
|
1634
|
+
}), Schema.Struct({
|
|
1635
|
+
type: Schema.optional(Schema.Union([Schema.Literal("kv"), Schema.Null]))
|
|
1636
|
+
}), Schema.Struct({
|
|
1637
|
+
type: Schema.optional(Schema.Union([Schema.Literal("r2"), Schema.Null]))
|
|
1638
|
+
}), Schema.Struct({
|
|
1639
|
+
type: Schema.optional(Schema.Union([Schema.Literal("superSlurper"), Schema.Null]))
|
|
1640
|
+
}), Schema.Struct({
|
|
1641
|
+
type: Schema.optional(Schema.Union([Schema.Literal("vectorize"), Schema.Null]))
|
|
1642
|
+
}), Schema.Struct({
|
|
1643
|
+
modelName: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
1644
|
+
type: Schema.optional(Schema.Union([Schema.Literal("workersAi.model"), Schema.Null]))
|
|
1645
|
+
}).pipe(Schema.encodeKeys({ modelName: "model_name", type: "type" })), Schema.Struct({
|
|
1646
|
+
type: Schema.optional(Schema.Union([Schema.Literal("workersBuilds.worker"), Schema.Null])),
|
|
1647
|
+
workerName: Schema.optional(Schema.Union([Schema.String, Schema.Null]))
|
|
1648
|
+
}).pipe(Schema.encodeKeys({ type: "type", workerName: "worker_name" })), Schema.Struct({
|
|
1649
|
+
type: Schema.optional(Schema.Union([Schema.Literal("workflows.workflow"), Schema.Null])),
|
|
1650
|
+
workflowName: Schema.optional(Schema.Union([Schema.String, Schema.Null]))
|
|
1651
|
+
}).pipe(Schema.encodeKeys({ type: "type", workflowName: "workflow_name" }))])
|
|
1652
|
+
}).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")) as unknown as Schema.Schema<PatchSubscriptionResponse>;
|
|
1653
|
+
|
|
1654
|
+
export type PatchSubscriptionError =
|
|
1655
|
+
| DefaultErrors
|
|
1656
|
+
| UnrecognizedEventType;
|
|
3709
1657
|
|
|
3710
1658
|
export const patchSubscription: API.OperationMethod<
|
|
3711
1659
|
PatchSubscriptionRequest,
|
|
@@ -3724,16 +1672,11 @@ export interface DeleteSubscriptionRequest {
|
|
|
3724
1672
|
accountId: string;
|
|
3725
1673
|
}
|
|
3726
1674
|
|
|
3727
|
-
export const DeleteSubscriptionRequest =
|
|
3728
|
-
|
|
3729
|
-
|
|
3730
|
-
|
|
3731
|
-
}).
|
|
3732
|
-
T.Http({
|
|
3733
|
-
method: "DELETE",
|
|
3734
|
-
path: "/accounts/{account_id}/event_subscriptions/subscriptions/{subscriptionId}",
|
|
3735
|
-
}),
|
|
3736
|
-
) as unknown as Schema.Schema<DeleteSubscriptionRequest>;
|
|
1675
|
+
export const DeleteSubscriptionRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
1676
|
+
subscriptionId: Schema.String.pipe(T.HttpPath("subscriptionId")),
|
|
1677
|
+
accountId: Schema.String.pipe(T.HttpPath("account_id"))
|
|
1678
|
+
})
|
|
1679
|
+
.pipe(T.Http({ method: "DELETE", path: "/accounts/{account_id}/event_subscriptions/subscriptions/{subscriptionId}" })) as unknown as Schema.Schema<DeleteSubscriptionRequest>;
|
|
3737
1680
|
|
|
3738
1681
|
export interface DeleteSubscriptionResponse {
|
|
3739
1682
|
/** Unique identifier for the subscription */
|
|
@@ -3751,96 +1694,45 @@ export interface DeleteSubscriptionResponse {
|
|
|
3751
1694
|
/** Name of the subscription */
|
|
3752
1695
|
name: string;
|
|
3753
1696
|
/** Source configuration for the subscription */
|
|
3754
|
-
source:
|
|
3755
|
-
| { type?: "images" | null }
|
|
3756
|
-
| { type?: "kv" | null }
|
|
3757
|
-
| { type?: "r2" | null }
|
|
3758
|
-
| { type?: "superSlurper" | null }
|
|
3759
|
-
| { type?: "vectorize" | null }
|
|
3760
|
-
| { modelName?: string | null; type?: "workersAi.model" | null }
|
|
3761
|
-
| { type?: "workersBuilds.worker" | null; workerName?: string | null }
|
|
3762
|
-
| { type?: "workflows.workflow" | null; workflowName?: string | null };
|
|
1697
|
+
source: { type?: "images" | null } | { type?: "kv" | null } | { type?: "r2" | null } | { type?: "superSlurper" | null } | { type?: "vectorize" | null } | { modelName?: string | null; type?: "workersAi.model" | null } | { type?: "workersBuilds.worker" | null; workerName?: string | null } | { type?: "workflows.workflow" | null; workflowName?: string | null };
|
|
3763
1698
|
}
|
|
3764
1699
|
|
|
3765
|
-
export const DeleteSubscriptionResponse =
|
|
3766
|
-
|
|
3767
|
-
|
|
3768
|
-
|
|
3769
|
-
|
|
3770
|
-
|
|
3771
|
-
|
|
3772
|
-
|
|
3773
|
-
|
|
3774
|
-
|
|
3775
|
-
|
|
3776
|
-
|
|
3777
|
-
|
|
3778
|
-
|
|
3779
|
-
|
|
3780
|
-
|
|
3781
|
-
|
|
3782
|
-
|
|
3783
|
-
|
|
3784
|
-
|
|
3785
|
-
|
|
3786
|
-
|
|
3787
|
-
|
|
3788
|
-
|
|
3789
|
-
|
|
3790
|
-
|
|
3791
|
-
|
|
3792
|
-
|
|
3793
|
-
|
|
3794
|
-
|
|
3795
|
-
|
|
3796
|
-
|
|
3797
|
-
|
|
3798
|
-
|
|
3799
|
-
|
|
3800
|
-
|
|
3801
|
-
),
|
|
3802
|
-
}),
|
|
3803
|
-
Schema.Struct({
|
|
3804
|
-
modelName: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
3805
|
-
type: Schema.optional(
|
|
3806
|
-
Schema.Union([Schema.Literal("workersAi.model"), Schema.Null]),
|
|
3807
|
-
),
|
|
3808
|
-
}).pipe(Schema.encodeKeys({ modelName: "model_name", type: "type" })),
|
|
3809
|
-
Schema.Struct({
|
|
3810
|
-
type: Schema.optional(
|
|
3811
|
-
Schema.Union([Schema.Literal("workersBuilds.worker"), Schema.Null]),
|
|
3812
|
-
),
|
|
3813
|
-
workerName: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
3814
|
-
}).pipe(Schema.encodeKeys({ type: "type", workerName: "worker_name" })),
|
|
3815
|
-
Schema.Struct({
|
|
3816
|
-
type: Schema.optional(
|
|
3817
|
-
Schema.Union([Schema.Literal("workflows.workflow"), Schema.Null]),
|
|
3818
|
-
),
|
|
3819
|
-
workflowName: Schema.optional(
|
|
3820
|
-
Schema.Union([Schema.String, Schema.Null]),
|
|
3821
|
-
),
|
|
3822
|
-
}).pipe(
|
|
3823
|
-
Schema.encodeKeys({ type: "type", workflowName: "workflow_name" }),
|
|
3824
|
-
),
|
|
3825
|
-
]),
|
|
3826
|
-
})
|
|
3827
|
-
.pipe(
|
|
3828
|
-
Schema.encodeKeys({
|
|
3829
|
-
id: "id",
|
|
3830
|
-
createdAt: "created_at",
|
|
3831
|
-
destination: "destination",
|
|
3832
|
-
enabled: "enabled",
|
|
3833
|
-
events: "events",
|
|
3834
|
-
modifiedAt: "modified_at",
|
|
3835
|
-
name: "name",
|
|
3836
|
-
source: "source",
|
|
3837
|
-
}),
|
|
3838
|
-
)
|
|
3839
|
-
.pipe(
|
|
3840
|
-
T.ResponsePath("result"),
|
|
3841
|
-
) as unknown as Schema.Schema<DeleteSubscriptionResponse>;
|
|
3842
|
-
|
|
3843
|
-
export type DeleteSubscriptionError = DefaultErrors | UnrecognizedEventType;
|
|
1700
|
+
export const DeleteSubscriptionResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
1701
|
+
id: Schema.String,
|
|
1702
|
+
createdAt: Schema.String,
|
|
1703
|
+
destination: Schema.Struct({
|
|
1704
|
+
queueId: Schema.String,
|
|
1705
|
+
type: Schema.Literal("queues.queue")
|
|
1706
|
+
}).pipe(Schema.encodeKeys({ queueId: "queue_id", type: "type" })),
|
|
1707
|
+
enabled: Schema.Boolean,
|
|
1708
|
+
events: Schema.Array(Schema.String),
|
|
1709
|
+
modifiedAt: Schema.String,
|
|
1710
|
+
name: Schema.String,
|
|
1711
|
+
source: Schema.Union([Schema.Struct({
|
|
1712
|
+
type: Schema.optional(Schema.Union([Schema.Literal("images"), Schema.Null]))
|
|
1713
|
+
}), Schema.Struct({
|
|
1714
|
+
type: Schema.optional(Schema.Union([Schema.Literal("kv"), Schema.Null]))
|
|
1715
|
+
}), Schema.Struct({
|
|
1716
|
+
type: Schema.optional(Schema.Union([Schema.Literal("r2"), Schema.Null]))
|
|
1717
|
+
}), Schema.Struct({
|
|
1718
|
+
type: Schema.optional(Schema.Union([Schema.Literal("superSlurper"), Schema.Null]))
|
|
1719
|
+
}), Schema.Struct({
|
|
1720
|
+
type: Schema.optional(Schema.Union([Schema.Literal("vectorize"), Schema.Null]))
|
|
1721
|
+
}), Schema.Struct({
|
|
1722
|
+
modelName: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
1723
|
+
type: Schema.optional(Schema.Union([Schema.Literal("workersAi.model"), Schema.Null]))
|
|
1724
|
+
}).pipe(Schema.encodeKeys({ modelName: "model_name", type: "type" })), Schema.Struct({
|
|
1725
|
+
type: Schema.optional(Schema.Union([Schema.Literal("workersBuilds.worker"), Schema.Null])),
|
|
1726
|
+
workerName: Schema.optional(Schema.Union([Schema.String, Schema.Null]))
|
|
1727
|
+
}).pipe(Schema.encodeKeys({ type: "type", workerName: "worker_name" })), Schema.Struct({
|
|
1728
|
+
type: Schema.optional(Schema.Union([Schema.Literal("workflows.workflow"), Schema.Null])),
|
|
1729
|
+
workflowName: Schema.optional(Schema.Union([Schema.String, Schema.Null]))
|
|
1730
|
+
}).pipe(Schema.encodeKeys({ type: "type", workflowName: "workflow_name" }))])
|
|
1731
|
+
}).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")) as unknown as Schema.Schema<DeleteSubscriptionResponse>;
|
|
1732
|
+
|
|
1733
|
+
export type DeleteSubscriptionError =
|
|
1734
|
+
| DefaultErrors
|
|
1735
|
+
| UnrecognizedEventType;
|
|
3844
1736
|
|
|
3845
1737
|
export const deleteSubscription: API.OperationMethod<
|
|
3846
1738
|
DeleteSubscriptionRequest,
|