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