@distilled.cloud/celld 0.0.0-placeholder → 1.0.0-rc.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +116 -0
  3. package/lib/endpoint.d.ts +11 -0
  4. package/lib/endpoint.d.ts.map +1 -0
  5. package/lib/endpoint.js +11 -0
  6. package/lib/endpoint.js.map +1 -0
  7. package/lib/errors.d.ts +24 -0
  8. package/lib/errors.d.ts.map +1 -0
  9. package/lib/errors.js +19 -0
  10. package/lib/errors.js.map +1 -0
  11. package/lib/index.d.ts +5 -0
  12. package/lib/index.d.ts.map +1 -0
  13. package/lib/index.js +5 -0
  14. package/lib/index.js.map +1 -0
  15. package/lib/protocol.d.ts +12 -0
  16. package/lib/protocol.d.ts.map +1 -0
  17. package/lib/protocol.js +33 -0
  18. package/lib/protocol.js.map +1 -0
  19. package/lib/response-validation.test.d.ts +4 -0
  20. package/lib/response-validation.test.d.ts.map +1 -0
  21. package/lib/response-validation.test.js +30 -0
  22. package/lib/response-validation.test.js.map +1 -0
  23. package/lib/services/index.d.ts +3 -0
  24. package/lib/services/index.d.ts.map +1 -0
  25. package/lib/services/index.js +4 -0
  26. package/lib/services/index.js.map +1 -0
  27. package/lib/services/node.d.ts +334 -0
  28. package/lib/services/node.d.ts.map +1 -0
  29. package/lib/services/node.js +340 -0
  30. package/lib/services/node.js.map +1 -0
  31. package/lib/services/runtime.d.ts +686 -0
  32. package/lib/services/runtime.d.ts.map +1 -0
  33. package/lib/services/runtime.js +553 -0
  34. package/lib/services/runtime.js.map +1 -0
  35. package/lib/traits.d.ts +3 -0
  36. package/lib/traits.d.ts.map +1 -0
  37. package/lib/traits.js +3 -0
  38. package/lib/traits.js.map +1 -0
  39. package/package.json +66 -7
  40. package/src/endpoint.ts +13 -0
  41. package/src/errors.ts +25 -0
  42. package/src/index.ts +8 -0
  43. package/src/protocol.ts +49 -0
  44. package/src/response-validation.test.ts +43 -0
  45. package/src/services/index.ts +3 -0
  46. package/src/services/node.ts +767 -0
  47. package/src/services/runtime.ts +1455 -0
  48. package/src/traits.ts +6 -0
@@ -0,0 +1,1455 @@
1
+ // AUTO-GENERATED by scripts/generate.ts from the Celld v0.6.0 source-derived Smithy specifications in specs/. Do not edit.
2
+ import * as S from "@distilled.cloud/core/schema";
3
+ import * as API from "@distilled.cloud/core/api";
4
+ import * as C from "@distilled.cloud/core/category";
5
+ import * as T from "../traits.ts";
6
+ import {
7
+ CelldProtocol,
8
+ type CelldOpError,
9
+ type CelldOpContext,
10
+ } from "../protocol.ts";
11
+
12
+ export type { CelldOpError, CelldOpContext };
13
+
14
+ /** The native D1 engine rejected SQL execution. Exec and prepared-statement requests may have already committed earlier statements; this error does not authorize automatic mutation replay. */
15
+ export class D1ExecutionError
16
+ extends /*@__PURE__*/ T.applyErrorMatchers(
17
+ /*@__PURE__*/ S.TaggedError<D1ExecutionError>()("D1ExecutionError", {
18
+ message: S.String,
19
+ }).pipe(C.withBadRequestError),
20
+ [{ status: 400, message: { matches: "^D1_(?:EXEC_)?ERROR:" } }],
21
+ ) {}
22
+
23
+ /** peer protocol version is incompatible */
24
+ export class PeerIncompatibleVersion
25
+ extends /*@__PURE__*/ T.applyErrorMatchers(
26
+ /*@__PURE__*/ S.TaggedError<PeerIncompatibleVersion>()(
27
+ "PeerIncompatibleVersion",
28
+ {
29
+ message: S.String,
30
+ },
31
+ ),
32
+ [{ status: 426 }],
33
+ ) {}
34
+
35
+ /** peer request replay rejected */
36
+ export class PeerReplayRejected
37
+ extends /*@__PURE__*/ T.applyErrorMatchers(
38
+ /*@__PURE__*/ S.TaggedError<PeerReplayRejected>()("PeerReplayRejected", {
39
+ message: S.String,
40
+ }).pipe(C.withConflictError),
41
+ [{ status: 409, message: "peer request replay rejected" }],
42
+ ) {}
43
+
44
+ /** peer request targets a different node session */
45
+ export class PeerWrongTarget
46
+ extends /*@__PURE__*/ T.applyErrorMatchers(
47
+ /*@__PURE__*/ S.TaggedError<PeerWrongTarget>()("PeerWrongTarget", {
48
+ message: S.String,
49
+ }).pipe(C.withConflictError),
50
+ [{ status: 409, message: "peer request targets a different node session" }],
51
+ ) {}
52
+
53
+ export type KvDeleteOperation = "delete";
54
+ export const KvDeleteOperation = S.String;
55
+
56
+ export type Strings = Array<string>;
57
+ export const Strings = /*@__PURE__*/ S.Array(
58
+ S.String,
59
+ ) as any as S.Schema<Strings>;
60
+
61
+ export interface DeleteKvInput {
62
+ /** Reserved-class cell scope derived by Celld, not a database, namespace or queue display name. */
63
+ scope: string;
64
+ /** Optional cell identity name; include the exact encoded query string in the peer signature. */
65
+ name?: string;
66
+ /** Peer protocol version; send the string 5. */
67
+ peer_version: string;
68
+ /** Source node name or operator identity, validated as a node name. */
69
+ peer_source: string;
70
+ /** Exact addressed node session identity, not the cell scope. */
71
+ peer_target: string;
72
+ /** Decimal Unix milliseconds as text; accepted within a 30000 ms clock window. */
73
+ peer_timestamp: string;
74
+ /** A fresh 16-byte nonce encoded as 32 hexadecimal characters; reuse is rejected. */
75
+ peer_nonce: string;
76
+ /** Lowercase SHA-256 hex digest of the exact serialized HTTP request body bytes. */
77
+ peer_body_sha256: string;
78
+ /** HMAC-SHA256 hex signature over newline-separated domain cells-peer-request-v1, version 5, method POST, exact path and query, body hash, source, target, timestamp and nonce, with no trailing newline. */
79
+ peer_signature: string;
80
+ op: KvDeleteOperation | (string & {});
81
+ keys: Strings;
82
+ }
83
+ export const DeleteKvInput = /*@__PURE__*/ S.suspend(() =>
84
+ S.Struct({
85
+ scope: S.String.pipe(T.Label(), T.LabelEncoding({ preserve: ":$" })),
86
+ name: S.optional(S.String.pipe(T.Query())),
87
+ peer_version: S.String.pipe(T.Header("x-cells-peer-version")),
88
+ peer_source: S.String.pipe(T.Header("x-cells-peer-source")),
89
+ peer_target: S.String.pipe(T.Header("x-cells-peer-target")),
90
+ peer_timestamp: S.String.pipe(T.Header("x-cells-peer-timestamp")),
91
+ peer_nonce: S.String.pipe(T.Header("x-cells-peer-nonce")),
92
+ peer_body_sha256: S.String.pipe(T.Header("x-cells-peer-body-sha256")),
93
+ peer_signature: S.String.pipe(T.Header("x-cells-peer-signature")),
94
+ op: KvDeleteOperation,
95
+ keys: Strings,
96
+ }).pipe(T.Http({ method: "POST", uri: "/runtime/{scope}", code: 200 })),
97
+ ).annotate({ identifier: "DeleteKvInput" }) as any as S.Schema<DeleteKvInput>;
98
+
99
+ export interface OkResult {
100
+ ok: boolean;
101
+ }
102
+ export const OkResult = /*@__PURE__*/ S.suspend(() =>
103
+ S.Struct({
104
+ ok: S.Boolean,
105
+ }),
106
+ ).annotate({ identifier: "OkResult" }) as any as S.Schema<OkResult>;
107
+
108
+ /** The actual HTTP JSON envelope is {"result": ...}; nested arrays or scalars are not top-level raw responses. */
109
+ export interface DeleteKvOutput {
110
+ result: OkResult;
111
+ }
112
+ export const DeleteKvOutput = /*@__PURE__*/ S.suspend(() =>
113
+ S.Struct({
114
+ result: OkResult,
115
+ }),
116
+ ).annotate({ identifier: "DeleteKvOutput" }) as any as S.Schema<DeleteKvOutput>;
117
+
118
+ export interface D1ExecPayload {
119
+ sql: string;
120
+ rows?: boolean;
121
+ }
122
+ export const D1ExecPayload = /*@__PURE__*/ S.suspend(() =>
123
+ S.Struct({
124
+ sql: S.String,
125
+ rows: S.optional(S.Boolean),
126
+ }),
127
+ ).annotate({ identifier: "D1ExecPayload" }) as any as S.Schema<D1ExecPayload>;
128
+
129
+ export interface ExecD1Input {
130
+ /** Reserved-class cell scope derived by Celld, not a database, namespace or queue display name. */
131
+ scope: string;
132
+ /** Optional cell identity name; include the exact encoded query string in the peer signature. */
133
+ name?: string;
134
+ /** Peer protocol version; send the string 5. */
135
+ peer_version: string;
136
+ /** Source node name or operator identity, validated as a node name. */
137
+ peer_source: string;
138
+ /** Exact addressed node session identity, not the cell scope. */
139
+ peer_target: string;
140
+ /** Decimal Unix milliseconds as text; accepted within a 30000 ms clock window. */
141
+ peer_timestamp: string;
142
+ /** A fresh 16-byte nonce encoded as 32 hexadecimal characters; reuse is rejected. */
143
+ peer_nonce: string;
144
+ /** Lowercase SHA-256 hex digest of the exact serialized HTTP request body bytes. */
145
+ peer_body_sha256: string;
146
+ /** HMAC-SHA256 hex signature over newline-separated domain cells-peer-request-v1, version 5, method POST, exact path and query, body hash, source, target, timestamp and nonce, with no trailing newline. */
147
+ peer_signature: string;
148
+ exec: D1ExecPayload;
149
+ }
150
+ export const ExecD1Input = /*@__PURE__*/ S.suspend(() =>
151
+ S.Struct({
152
+ scope: S.String.pipe(T.Label(), T.LabelEncoding({ preserve: ":$" })),
153
+ name: S.optional(S.String.pipe(T.Query())),
154
+ peer_version: S.String.pipe(T.Header("x-cells-peer-version")),
155
+ peer_source: S.String.pipe(T.Header("x-cells-peer-source")),
156
+ peer_target: S.String.pipe(T.Header("x-cells-peer-target")),
157
+ peer_timestamp: S.String.pipe(T.Header("x-cells-peer-timestamp")),
158
+ peer_nonce: S.String.pipe(T.Header("x-cells-peer-nonce")),
159
+ peer_body_sha256: S.String.pipe(T.Header("x-cells-peer-body-sha256")),
160
+ peer_signature: S.String.pipe(T.Header("x-cells-peer-signature")),
161
+ exec: D1ExecPayload,
162
+ }).pipe(T.Http({ method: "POST", uri: "/runtime/{scope}", code: 200 })),
163
+ ).annotate({ identifier: "ExecD1Input" }) as any as S.Schema<ExecD1Input>;
164
+
165
+ export type JsonValues = Array<unknown>;
166
+ export const JsonValues = /*@__PURE__*/ S.Array(
167
+ S.Unknown,
168
+ ) as any as S.Schema<JsonValues>;
169
+
170
+ export type Rows = Array<JsonValues>;
171
+ export const Rows = /*@__PURE__*/ S.Array(JsonValues) as any as S.Schema<Rows>;
172
+
173
+ /** Native SQL engine result; row values and engine metadata retain their JSON types. */
174
+ export interface D1ResultSet {
175
+ columns?: Strings;
176
+ rows?: Rows;
177
+ meta?: unknown;
178
+ }
179
+ export const D1ResultSet = /*@__PURE__*/ S.suspend(() =>
180
+ S.Struct({
181
+ columns: S.optional(Strings),
182
+ rows: S.optional(Rows),
183
+ meta: S.optional(S.Unknown),
184
+ }),
185
+ ).annotate({ identifier: "D1ResultSet" }) as any as S.Schema<D1ResultSet>;
186
+
187
+ export type D1ResultSets = Array<D1ResultSet>;
188
+ export const D1ResultSets = /*@__PURE__*/ S.Array(
189
+ D1ResultSet,
190
+ ) as any as S.Schema<D1ResultSets>;
191
+
192
+ /** Duration is in milliseconds. Result sets are present only when exec.rows is true. */
193
+ export interface ExecD1Result {
194
+ count: number;
195
+ duration: number;
196
+ results?: D1ResultSets;
197
+ }
198
+ export const ExecD1Result = /*@__PURE__*/ S.suspend(() =>
199
+ S.Struct({
200
+ count: S.Number,
201
+ duration: S.Number,
202
+ results: S.optional(D1ResultSets),
203
+ }),
204
+ ).annotate({ identifier: "ExecD1Result" }) as any as S.Schema<ExecD1Result>;
205
+
206
+ /** The actual HTTP JSON envelope is {"result": ...}; nested arrays or scalars are not top-level raw responses. */
207
+ export interface ExecD1Output {
208
+ result: ExecD1Result;
209
+ }
210
+ export const ExecD1Output = /*@__PURE__*/ S.suspend(() =>
211
+ S.Struct({
212
+ result: ExecD1Result,
213
+ }),
214
+ ).annotate({ identifier: "ExecD1Output" }) as any as S.Schema<ExecD1Output>;
215
+
216
+ export interface D1Statement {
217
+ sql: string;
218
+ params?: JsonValues;
219
+ first?: boolean;
220
+ }
221
+ export const D1Statement = /*@__PURE__*/ S.suspend(() =>
222
+ S.Struct({
223
+ sql: S.String,
224
+ params: S.optional(JsonValues),
225
+ first: S.optional(S.Boolean),
226
+ }),
227
+ ).annotate({ identifier: "D1Statement" }) as any as S.Schema<D1Statement>;
228
+
229
+ export type D1StatementList = Array<D1Statement>;
230
+ export const D1StatementList = /*@__PURE__*/ S.Array(
231
+ D1Statement,
232
+ ) as any as S.Schema<D1StatementList>;
233
+
234
+ export interface ExecuteD1StatementsInput {
235
+ /** Reserved-class cell scope derived by Celld, not a database, namespace or queue display name. */
236
+ scope: string;
237
+ /** Optional cell identity name; include the exact encoded query string in the peer signature. */
238
+ name?: string;
239
+ /** Peer protocol version; send the string 5. */
240
+ peer_version: string;
241
+ /** Source node name or operator identity, validated as a node name. */
242
+ peer_source: string;
243
+ /** Exact addressed node session identity, not the cell scope. */
244
+ peer_target: string;
245
+ /** Decimal Unix milliseconds as text; accepted within a 30000 ms clock window. */
246
+ peer_timestamp: string;
247
+ /** A fresh 16-byte nonce encoded as 32 hexadecimal characters; reuse is rejected. */
248
+ peer_nonce: string;
249
+ /** Lowercase SHA-256 hex digest of the exact serialized HTTP request body bytes. */
250
+ peer_body_sha256: string;
251
+ /** HMAC-SHA256 hex signature over newline-separated domain cells-peer-request-v1, version 5, method POST, exact path and query, body hash, source, target, timestamp and nonce, with no trailing newline. */
252
+ peer_signature: string;
253
+ statements: D1StatementList;
254
+ }
255
+ export const ExecuteD1StatementsInput = /*@__PURE__*/ S.suspend(() =>
256
+ S.Struct({
257
+ scope: S.String.pipe(T.Label(), T.LabelEncoding({ preserve: ":$" })),
258
+ name: S.optional(S.String.pipe(T.Query())),
259
+ peer_version: S.String.pipe(T.Header("x-cells-peer-version")),
260
+ peer_source: S.String.pipe(T.Header("x-cells-peer-source")),
261
+ peer_target: S.String.pipe(T.Header("x-cells-peer-target")),
262
+ peer_timestamp: S.String.pipe(T.Header("x-cells-peer-timestamp")),
263
+ peer_nonce: S.String.pipe(T.Header("x-cells-peer-nonce")),
264
+ peer_body_sha256: S.String.pipe(T.Header("x-cells-peer-body-sha256")),
265
+ peer_signature: S.String.pipe(T.Header("x-cells-peer-signature")),
266
+ statements: D1StatementList,
267
+ }).pipe(T.Http({ method: "POST", uri: "/runtime/{scope}", code: 200 })),
268
+ ).annotate({
269
+ identifier: "ExecuteD1StatementsInput",
270
+ }) as any as S.Schema<ExecuteD1StatementsInput>;
271
+
272
+ /** The actual HTTP JSON envelope is {"result": ...}; nested arrays or scalars are not top-level raw responses. */
273
+ export interface ExecuteD1StatementsOutput {
274
+ result: D1ResultSets;
275
+ }
276
+ export const ExecuteD1StatementsOutput = /*@__PURE__*/ S.suspend(() =>
277
+ S.Struct({
278
+ result: D1ResultSets,
279
+ }),
280
+ ).annotate({
281
+ identifier: "ExecuteD1StatementsOutput",
282
+ }) as any as S.Schema<ExecuteD1StatementsOutput>;
283
+
284
+ export type KvGetOperation = "get";
285
+ export const KvGetOperation = S.String;
286
+
287
+ export interface GetKvInput {
288
+ /** Reserved-class cell scope derived by Celld, not a database, namespace or queue display name. */
289
+ scope: string;
290
+ /** Optional cell identity name; include the exact encoded query string in the peer signature. */
291
+ name?: string;
292
+ /** Peer protocol version; send the string 5. */
293
+ peer_version: string;
294
+ /** Source node name or operator identity, validated as a node name. */
295
+ peer_source: string;
296
+ /** Exact addressed node session identity, not the cell scope. */
297
+ peer_target: string;
298
+ /** Decimal Unix milliseconds as text; accepted within a 30000 ms clock window. */
299
+ peer_timestamp: string;
300
+ /** A fresh 16-byte nonce encoded as 32 hexadecimal characters; reuse is rejected. */
301
+ peer_nonce: string;
302
+ /** Lowercase SHA-256 hex digest of the exact serialized HTTP request body bytes. */
303
+ peer_body_sha256: string;
304
+ /** HMAC-SHA256 hex signature over newline-separated domain cells-peer-request-v1, version 5, method POST, exact path and query, body hash, source, target, timestamp and nonce, with no trailing newline. */
305
+ peer_signature: string;
306
+ op: KvGetOperation | (string & {});
307
+ key: string;
308
+ }
309
+ export const GetKvInput = /*@__PURE__*/ S.suspend(() =>
310
+ S.Struct({
311
+ scope: S.String.pipe(T.Label(), T.LabelEncoding({ preserve: ":$" })),
312
+ name: S.optional(S.String.pipe(T.Query())),
313
+ peer_version: S.String.pipe(T.Header("x-cells-peer-version")),
314
+ peer_source: S.String.pipe(T.Header("x-cells-peer-source")),
315
+ peer_target: S.String.pipe(T.Header("x-cells-peer-target")),
316
+ peer_timestamp: S.String.pipe(T.Header("x-cells-peer-timestamp")),
317
+ peer_nonce: S.String.pipe(T.Header("x-cells-peer-nonce")),
318
+ peer_body_sha256: S.String.pipe(T.Header("x-cells-peer-body-sha256")),
319
+ peer_signature: S.String.pipe(T.Header("x-cells-peer-signature")),
320
+ op: KvGetOperation,
321
+ key: S.String,
322
+ }).pipe(T.Http({ method: "POST", uri: "/runtime/{scope}", code: 200 })),
323
+ ).annotate({ identifier: "GetKvInput" }) as any as S.Schema<GetKvInput>;
324
+
325
+ export interface GetKvResult {
326
+ found: boolean;
327
+ /** A JSON array of byte integers for inline values, or a base64 string for large values. Absent when found is false. */
328
+ value?: unknown;
329
+ /** base64 for large values; absent for inline byte arrays. */
330
+ value_encoding?: string;
331
+ tag?: string;
332
+ /** Stored JSON text, not a decoded metadata object. May be null. */
333
+ metadata?: string | null;
334
+ /** Expiration in Unix milliseconds; may be null. */
335
+ expiration?: number | null;
336
+ }
337
+ export const GetKvResult = /*@__PURE__*/ S.suspend(() =>
338
+ S.Struct({
339
+ found: S.Boolean,
340
+ value: S.optional(S.Unknown),
341
+ value_encoding: S.optional(S.String.pipe(T.Body("valueEncoding"))),
342
+ tag: S.optional(S.String),
343
+ metadata: S.optional(S.NullOr(S.String)),
344
+ expiration: S.optional(S.NullOr(S.Number)),
345
+ }),
346
+ ).annotate({ identifier: "GetKvResult" }) as any as S.Schema<GetKvResult>;
347
+
348
+ /** The actual HTTP JSON envelope is {"result": ...}; nested arrays or scalars are not top-level raw responses. */
349
+ export interface GetKvOutput {
350
+ result: GetKvResult;
351
+ }
352
+ export const GetKvOutput = /*@__PURE__*/ S.suspend(() =>
353
+ S.Struct({
354
+ result: GetKvResult,
355
+ }),
356
+ ).annotate({ identifier: "GetKvOutput" }) as any as S.Schema<GetKvOutput>;
357
+
358
+ export type GetKvInfoOperation = "info";
359
+ export const GetKvInfoOperation = S.String;
360
+
361
+ export interface GetKvInfoInput {
362
+ /** Reserved-class cell scope derived by Celld, not a database, namespace or queue display name. */
363
+ scope: string;
364
+ /** Optional cell identity name; include the exact encoded query string in the peer signature. */
365
+ name?: string;
366
+ /** Peer protocol version; send the string 5. */
367
+ peer_version: string;
368
+ /** Source node name or operator identity, validated as a node name. */
369
+ peer_source: string;
370
+ /** Exact addressed node session identity, not the cell scope. */
371
+ peer_target: string;
372
+ /** Decimal Unix milliseconds as text; accepted within a 30000 ms clock window. */
373
+ peer_timestamp: string;
374
+ /** A fresh 16-byte nonce encoded as 32 hexadecimal characters; reuse is rejected. */
375
+ peer_nonce: string;
376
+ /** Lowercase SHA-256 hex digest of the exact serialized HTTP request body bytes. */
377
+ peer_body_sha256: string;
378
+ /** HMAC-SHA256 hex signature over newline-separated domain cells-peer-request-v1, version 5, method POST, exact path and query, body hash, source, target, timestamp and nonce, with no trailing newline. */
379
+ peer_signature: string;
380
+ op: GetKvInfoOperation | (string & {});
381
+ }
382
+ export const GetKvInfoInput = /*@__PURE__*/ S.suspend(() =>
383
+ S.Struct({
384
+ scope: S.String.pipe(T.Label(), T.LabelEncoding({ preserve: ":$" })),
385
+ name: S.optional(S.String.pipe(T.Query())),
386
+ peer_version: S.String.pipe(T.Header("x-cells-peer-version")),
387
+ peer_source: S.String.pipe(T.Header("x-cells-peer-source")),
388
+ peer_target: S.String.pipe(T.Header("x-cells-peer-target")),
389
+ peer_timestamp: S.String.pipe(T.Header("x-cells-peer-timestamp")),
390
+ peer_nonce: S.String.pipe(T.Header("x-cells-peer-nonce")),
391
+ peer_body_sha256: S.String.pipe(T.Header("x-cells-peer-body-sha256")),
392
+ peer_signature: S.String.pipe(T.Header("x-cells-peer-signature")),
393
+ op: GetKvInfoOperation,
394
+ }).pipe(T.Http({ method: "POST", uri: "/runtime/{scope}", code: 200 })),
395
+ ).annotate({ identifier: "GetKvInfoInput" }) as any as S.Schema<GetKvInfoInput>;
396
+
397
+ export interface GetKvInfoResult {
398
+ live: number;
399
+ bytes: number;
400
+ stored: number;
401
+ }
402
+ export const GetKvInfoResult = /*@__PURE__*/ S.suspend(() =>
403
+ S.Struct({
404
+ live: S.Number,
405
+ bytes: S.Number,
406
+ stored: S.Number,
407
+ }),
408
+ ).annotate({
409
+ identifier: "GetKvInfoResult",
410
+ }) as any as S.Schema<GetKvInfoResult>;
411
+
412
+ /** The actual HTTP JSON envelope is {"result": ...}; nested arrays or scalars are not top-level raw responses. */
413
+ export interface GetKvInfoOutput {
414
+ result: GetKvInfoResult;
415
+ }
416
+ export const GetKvInfoOutput = /*@__PURE__*/ S.suspend(() =>
417
+ S.Struct({
418
+ result: GetKvInfoResult,
419
+ }),
420
+ ).annotate({
421
+ identifier: "GetKvInfoOutput",
422
+ }) as any as S.Schema<GetKvInfoOutput>;
423
+
424
+ export type GetQueueInfoOperation = "info";
425
+ export const GetQueueInfoOperation = S.String;
426
+
427
+ export interface GetQueueInfoInput {
428
+ /** Reserved-class cell scope derived by Celld, not a database, namespace or queue display name. */
429
+ scope: string;
430
+ /** Optional cell identity name; include the exact encoded query string in the peer signature. */
431
+ name?: string;
432
+ /** Peer protocol version; send the string 5. */
433
+ peer_version: string;
434
+ /** Source node name or operator identity, validated as a node name. */
435
+ peer_source: string;
436
+ /** Exact addressed node session identity, not the cell scope. */
437
+ peer_target: string;
438
+ /** Decimal Unix milliseconds as text; accepted within a 30000 ms clock window. */
439
+ peer_timestamp: string;
440
+ /** A fresh 16-byte nonce encoded as 32 hexadecimal characters; reuse is rejected. */
441
+ peer_nonce: string;
442
+ /** Lowercase SHA-256 hex digest of the exact serialized HTTP request body bytes. */
443
+ peer_body_sha256: string;
444
+ /** HMAC-SHA256 hex signature over newline-separated domain cells-peer-request-v1, version 5, method POST, exact path and query, body hash, source, target, timestamp and nonce, with no trailing newline. */
445
+ peer_signature: string;
446
+ op: GetQueueInfoOperation | (string & {});
447
+ }
448
+ export const GetQueueInfoInput = /*@__PURE__*/ S.suspend(() =>
449
+ S.Struct({
450
+ scope: S.String.pipe(T.Label(), T.LabelEncoding({ preserve: ":$" })),
451
+ name: S.optional(S.String.pipe(T.Query())),
452
+ peer_version: S.String.pipe(T.Header("x-cells-peer-version")),
453
+ peer_source: S.String.pipe(T.Header("x-cells-peer-source")),
454
+ peer_target: S.String.pipe(T.Header("x-cells-peer-target")),
455
+ peer_timestamp: S.String.pipe(T.Header("x-cells-peer-timestamp")),
456
+ peer_nonce: S.String.pipe(T.Header("x-cells-peer-nonce")),
457
+ peer_body_sha256: S.String.pipe(T.Header("x-cells-peer-body-sha256")),
458
+ peer_signature: S.String.pipe(T.Header("x-cells-peer-signature")),
459
+ op: GetQueueInfoOperation,
460
+ }).pipe(T.Http({ method: "POST", uri: "/runtime/{scope}", code: 200 })),
461
+ ).annotate({
462
+ identifier: "GetQueueInfoInput",
463
+ }) as any as S.Schema<GetQueueInfoInput>;
464
+
465
+ export interface GetQueueInfoResult {
466
+ backlog_count: number;
467
+ backlog_bytes: number;
468
+ /** Unix milliseconds; null when no message exists. */
469
+ oldest_message_timestamp?: number | null;
470
+ stored: number;
471
+ paused: boolean;
472
+ }
473
+ export const GetQueueInfoResult = /*@__PURE__*/ S.suspend(() =>
474
+ S.Struct({
475
+ backlog_count: S.Number.pipe(T.Body("backlogCount")),
476
+ backlog_bytes: S.Number.pipe(T.Body("backlogBytes")),
477
+ oldest_message_timestamp: S.optional(
478
+ S.NullOr(S.Number).pipe(T.Body("oldestMessageTimestamp")),
479
+ ),
480
+ stored: S.Number,
481
+ paused: S.Boolean,
482
+ }),
483
+ ).annotate({
484
+ identifier: "GetQueueInfoResult",
485
+ }) as any as S.Schema<GetQueueInfoResult>;
486
+
487
+ /** The actual HTTP JSON envelope is {"result": ...}; nested arrays or scalars are not top-level raw responses. */
488
+ export interface GetQueueInfoOutput {
489
+ result: GetQueueInfoResult;
490
+ }
491
+ export const GetQueueInfoOutput = /*@__PURE__*/ S.suspend(() =>
492
+ S.Struct({
493
+ result: GetQueueInfoResult,
494
+ }),
495
+ ).annotate({
496
+ identifier: "GetQueueInfoOutput",
497
+ }) as any as S.Schema<GetQueueInfoOutput>;
498
+
499
+ export type KvListOperation = "list";
500
+ export const KvListOperation = S.String;
501
+
502
+ export interface ListKvInput {
503
+ /** Reserved-class cell scope derived by Celld, not a database, namespace or queue display name. */
504
+ scope: string;
505
+ /** Optional cell identity name; include the exact encoded query string in the peer signature. */
506
+ name?: string;
507
+ /** Peer protocol version; send the string 5. */
508
+ peer_version: string;
509
+ /** Source node name or operator identity, validated as a node name. */
510
+ peer_source: string;
511
+ /** Exact addressed node session identity, not the cell scope. */
512
+ peer_target: string;
513
+ /** Decimal Unix milliseconds as text; accepted within a 30000 ms clock window. */
514
+ peer_timestamp: string;
515
+ /** A fresh 16-byte nonce encoded as 32 hexadecimal characters; reuse is rejected. */
516
+ peer_nonce: string;
517
+ /** Lowercase SHA-256 hex digest of the exact serialized HTTP request body bytes. */
518
+ peer_body_sha256: string;
519
+ /** HMAC-SHA256 hex signature over newline-separated domain cells-peer-request-v1, version 5, method POST, exact path and query, body hash, source, target, timestamp and nonce, with no trailing newline. */
520
+ peer_signature: string;
521
+ op: KvListOperation | (string & {});
522
+ prefix?: string;
523
+ limit: number;
524
+ /** Exclusive last key name from the previous page, not a binding cursor. */
525
+ after?: string;
526
+ }
527
+ export const ListKvInput = /*@__PURE__*/ S.suspend(() =>
528
+ S.Struct({
529
+ scope: S.String.pipe(T.Label(), T.LabelEncoding({ preserve: ":$" })),
530
+ name: S.optional(S.String.pipe(T.Query())),
531
+ peer_version: S.String.pipe(T.Header("x-cells-peer-version")),
532
+ peer_source: S.String.pipe(T.Header("x-cells-peer-source")),
533
+ peer_target: S.String.pipe(T.Header("x-cells-peer-target")),
534
+ peer_timestamp: S.String.pipe(T.Header("x-cells-peer-timestamp")),
535
+ peer_nonce: S.String.pipe(T.Header("x-cells-peer-nonce")),
536
+ peer_body_sha256: S.String.pipe(T.Header("x-cells-peer-body-sha256")),
537
+ peer_signature: S.String.pipe(T.Header("x-cells-peer-signature")),
538
+ op: KvListOperation,
539
+ prefix: S.optional(S.String),
540
+ limit: S.Number,
541
+ after: S.optional(S.String),
542
+ }).pipe(T.Http({ method: "POST", uri: "/runtime/{scope}", code: 200 })),
543
+ ).annotate({ identifier: "ListKvInput" }) as any as S.Schema<ListKvInput>;
544
+
545
+ export interface KvKey {
546
+ name: string;
547
+ /** Stored JSON text; may be null. */
548
+ metadata?: string | null;
549
+ /** Unix milliseconds; may be null. */
550
+ expiration?: number | null;
551
+ }
552
+ export const KvKey = /*@__PURE__*/ S.suspend(() =>
553
+ S.Struct({
554
+ name: S.String,
555
+ metadata: S.optional(S.NullOr(S.String)),
556
+ expiration: S.optional(S.NullOr(S.Number)),
557
+ }),
558
+ ).annotate({ identifier: "KvKey" }) as any as S.Schema<KvKey>;
559
+
560
+ export type KvKeys = Array<KvKey>;
561
+ export const KvKeys = /*@__PURE__*/ S.Array(KvKey) as any as S.Schema<KvKeys>;
562
+
563
+ export interface ListKvResult {
564
+ keys: KvKeys;
565
+ complete: boolean;
566
+ }
567
+ export const ListKvResult = /*@__PURE__*/ S.suspend(() =>
568
+ S.Struct({
569
+ keys: KvKeys,
570
+ complete: S.Boolean,
571
+ }),
572
+ ).annotate({ identifier: "ListKvResult" }) as any as S.Schema<ListKvResult>;
573
+
574
+ /** The actual HTTP JSON envelope is {"result": ...}; nested arrays or scalars are not top-level raw responses. */
575
+ export interface ListKvOutput {
576
+ result: ListKvResult;
577
+ }
578
+ export const ListKvOutput = /*@__PURE__*/ S.suspend(() =>
579
+ S.Struct({
580
+ result: ListKvResult,
581
+ }),
582
+ ).annotate({ identifier: "ListKvOutput" }) as any as S.Schema<ListKvOutput>;
583
+
584
+ export interface D1Migration {
585
+ name: string;
586
+ sql: string;
587
+ /** Defaults to d1_migrations when omitted or empty. */
588
+ table?: string;
589
+ }
590
+ export const D1Migration = /*@__PURE__*/ S.suspend(() =>
591
+ S.Struct({
592
+ name: S.String,
593
+ sql: S.String,
594
+ table: S.optional(S.String),
595
+ }),
596
+ ).annotate({ identifier: "D1Migration" }) as any as S.Schema<D1Migration>;
597
+
598
+ export interface MigrateD1Input {
599
+ /** Reserved-class cell scope derived by Celld, not a database, namespace or queue display name. */
600
+ scope: string;
601
+ /** Optional cell identity name; include the exact encoded query string in the peer signature. */
602
+ name?: string;
603
+ /** Peer protocol version; send the string 5. */
604
+ peer_version: string;
605
+ /** Source node name or operator identity, validated as a node name. */
606
+ peer_source: string;
607
+ /** Exact addressed node session identity, not the cell scope. */
608
+ peer_target: string;
609
+ /** Decimal Unix milliseconds as text; accepted within a 30000 ms clock window. */
610
+ peer_timestamp: string;
611
+ /** A fresh 16-byte nonce encoded as 32 hexadecimal characters; reuse is rejected. */
612
+ peer_nonce: string;
613
+ /** Lowercase SHA-256 hex digest of the exact serialized HTTP request body bytes. */
614
+ peer_body_sha256: string;
615
+ /** HMAC-SHA256 hex signature over newline-separated domain cells-peer-request-v1, version 5, method POST, exact path and query, body hash, source, target, timestamp and nonce, with no trailing newline. */
616
+ peer_signature: string;
617
+ migrate: D1Migration;
618
+ }
619
+ export const MigrateD1Input = /*@__PURE__*/ S.suspend(() =>
620
+ S.Struct({
621
+ scope: S.String.pipe(T.Label(), T.LabelEncoding({ preserve: ":$" })),
622
+ name: S.optional(S.String.pipe(T.Query())),
623
+ peer_version: S.String.pipe(T.Header("x-cells-peer-version")),
624
+ peer_source: S.String.pipe(T.Header("x-cells-peer-source")),
625
+ peer_target: S.String.pipe(T.Header("x-cells-peer-target")),
626
+ peer_timestamp: S.String.pipe(T.Header("x-cells-peer-timestamp")),
627
+ peer_nonce: S.String.pipe(T.Header("x-cells-peer-nonce")),
628
+ peer_body_sha256: S.String.pipe(T.Header("x-cells-peer-body-sha256")),
629
+ peer_signature: S.String.pipe(T.Header("x-cells-peer-signature")),
630
+ migrate: D1Migration,
631
+ }).pipe(T.Http({ method: "POST", uri: "/runtime/{scope}", code: 200 })),
632
+ ).annotate({ identifier: "MigrateD1Input" }) as any as S.Schema<MigrateD1Input>;
633
+
634
+ /** The actual HTTP JSON envelope is {"result": ...}; nested arrays or scalars are not top-level raw responses. */
635
+ export interface MigrateD1Output {
636
+ result: unknown;
637
+ }
638
+ export const MigrateD1Output = /*@__PURE__*/ S.suspend(() =>
639
+ S.Struct({
640
+ result: S.Unknown,
641
+ }),
642
+ ).annotate({
643
+ identifier: "MigrateD1Output",
644
+ }) as any as S.Schema<MigrateD1Output>;
645
+
646
+ export type QueuePauseOperation = "pause";
647
+ export const QueuePauseOperation = S.String;
648
+
649
+ export interface PauseQueueInput {
650
+ /** Reserved-class cell scope derived by Celld, not a database, namespace or queue display name. */
651
+ scope: string;
652
+ /** Optional cell identity name; include the exact encoded query string in the peer signature. */
653
+ name?: string;
654
+ /** Peer protocol version; send the string 5. */
655
+ peer_version: string;
656
+ /** Source node name or operator identity, validated as a node name. */
657
+ peer_source: string;
658
+ /** Exact addressed node session identity, not the cell scope. */
659
+ peer_target: string;
660
+ /** Decimal Unix milliseconds as text; accepted within a 30000 ms clock window. */
661
+ peer_timestamp: string;
662
+ /** A fresh 16-byte nonce encoded as 32 hexadecimal characters; reuse is rejected. */
663
+ peer_nonce: string;
664
+ /** Lowercase SHA-256 hex digest of the exact serialized HTTP request body bytes. */
665
+ peer_body_sha256: string;
666
+ /** HMAC-SHA256 hex signature over newline-separated domain cells-peer-request-v1, version 5, method POST, exact path and query, body hash, source, target, timestamp and nonce, with no trailing newline. */
667
+ peer_signature: string;
668
+ op: QueuePauseOperation | (string & {});
669
+ }
670
+ export const PauseQueueInput = /*@__PURE__*/ S.suspend(() =>
671
+ S.Struct({
672
+ scope: S.String.pipe(T.Label(), T.LabelEncoding({ preserve: ":$" })),
673
+ name: S.optional(S.String.pipe(T.Query())),
674
+ peer_version: S.String.pipe(T.Header("x-cells-peer-version")),
675
+ peer_source: S.String.pipe(T.Header("x-cells-peer-source")),
676
+ peer_target: S.String.pipe(T.Header("x-cells-peer-target")),
677
+ peer_timestamp: S.String.pipe(T.Header("x-cells-peer-timestamp")),
678
+ peer_nonce: S.String.pipe(T.Header("x-cells-peer-nonce")),
679
+ peer_body_sha256: S.String.pipe(T.Header("x-cells-peer-body-sha256")),
680
+ peer_signature: S.String.pipe(T.Header("x-cells-peer-signature")),
681
+ op: QueuePauseOperation,
682
+ }).pipe(T.Http({ method: "POST", uri: "/runtime/{scope}", code: 200 })),
683
+ ).annotate({
684
+ identifier: "PauseQueueInput",
685
+ }) as any as S.Schema<PauseQueueInput>;
686
+
687
+ export interface QueuePausedResult {
688
+ backlog_count: number;
689
+ backlog_bytes: number;
690
+ /** Unix milliseconds; null when no message exists. */
691
+ oldest_message_timestamp?: number | null;
692
+ paused: boolean;
693
+ }
694
+ export const QueuePausedResult = /*@__PURE__*/ S.suspend(() =>
695
+ S.Struct({
696
+ backlog_count: S.Number.pipe(T.Body("backlogCount")),
697
+ backlog_bytes: S.Number.pipe(T.Body("backlogBytes")),
698
+ oldest_message_timestamp: S.optional(
699
+ S.NullOr(S.Number).pipe(T.Body("oldestMessageTimestamp")),
700
+ ),
701
+ paused: S.Boolean,
702
+ }),
703
+ ).annotate({
704
+ identifier: "QueuePausedResult",
705
+ }) as any as S.Schema<QueuePausedResult>;
706
+
707
+ /** The actual HTTP JSON envelope is {"result": ...}; nested arrays or scalars are not top-level raw responses. */
708
+ export interface PauseQueueOutput {
709
+ result: QueuePausedResult;
710
+ }
711
+ export const PauseQueueOutput = /*@__PURE__*/ S.suspend(() =>
712
+ S.Struct({
713
+ result: QueuePausedResult,
714
+ }),
715
+ ).annotate({
716
+ identifier: "PauseQueueOutput",
717
+ }) as any as S.Schema<PauseQueueOutput>;
718
+
719
+ export type PeekQueueOperation = "peek";
720
+ export const PeekQueueOperation = S.String;
721
+
722
+ export interface PeekQueueInput {
723
+ /** Reserved-class cell scope derived by Celld, not a database, namespace or queue display name. */
724
+ scope: string;
725
+ /** Optional cell identity name; include the exact encoded query string in the peer signature. */
726
+ name?: string;
727
+ /** Peer protocol version; send the string 5. */
728
+ peer_version: string;
729
+ /** Source node name or operator identity, validated as a node name. */
730
+ peer_source: string;
731
+ /** Exact addressed node session identity, not the cell scope. */
732
+ peer_target: string;
733
+ /** Decimal Unix milliseconds as text; accepted within a 30000 ms clock window. */
734
+ peer_timestamp: string;
735
+ /** A fresh 16-byte nonce encoded as 32 hexadecimal characters; reuse is rejected. */
736
+ peer_nonce: string;
737
+ /** Lowercase SHA-256 hex digest of the exact serialized HTTP request body bytes. */
738
+ peer_body_sha256: string;
739
+ /** HMAC-SHA256 hex signature over newline-separated domain cells-peer-request-v1, version 5, method POST, exact path and query, body hash, source, target, timestamp and nonce, with no trailing newline. */
740
+ peer_signature: string;
741
+ op: PeekQueueOperation | (string & {});
742
+ /** Defaults to 10; valid values are 1 through 100. */
743
+ limit?: number;
744
+ }
745
+ export const PeekQueueInput = /*@__PURE__*/ S.suspend(() =>
746
+ S.Struct({
747
+ scope: S.String.pipe(T.Label(), T.LabelEncoding({ preserve: ":$" })),
748
+ name: S.optional(S.String.pipe(T.Query())),
749
+ peer_version: S.String.pipe(T.Header("x-cells-peer-version")),
750
+ peer_source: S.String.pipe(T.Header("x-cells-peer-source")),
751
+ peer_target: S.String.pipe(T.Header("x-cells-peer-target")),
752
+ peer_timestamp: S.String.pipe(T.Header("x-cells-peer-timestamp")),
753
+ peer_nonce: S.String.pipe(T.Header("x-cells-peer-nonce")),
754
+ peer_body_sha256: S.String.pipe(T.Header("x-cells-peer-body-sha256")),
755
+ peer_signature: S.String.pipe(T.Header("x-cells-peer-signature")),
756
+ op: PeekQueueOperation,
757
+ limit: S.optional(S.Number),
758
+ }).pipe(T.Http({ method: "POST", uri: "/runtime/{scope}", code: 200 })),
759
+ ).annotate({ identifier: "PeekQueueInput" }) as any as S.Schema<PeekQueueInput>;
760
+
761
+ export interface QueueMessage {
762
+ id: string;
763
+ body_base64: string;
764
+ content_type: string;
765
+ size: number;
766
+ enqueued_at: number;
767
+ visible_at: number;
768
+ attempts: number;
769
+ /** moving, purging, leased, visible or delayed. */
770
+ state: string;
771
+ /** Unix milliseconds; null unless actively leased. */
772
+ leased_until?: number | null;
773
+ /** May be null. */
774
+ transfer_target?: string | null;
775
+ /** May be null. */
776
+ dead_letter_source?: string | null;
777
+ }
778
+ export const QueueMessage = /*@__PURE__*/ S.suspend(() =>
779
+ S.Struct({
780
+ id: S.String,
781
+ body_base64: S.String.pipe(T.Body("bodyBase64")),
782
+ content_type: S.String.pipe(T.Body("contentType")),
783
+ size: S.Number,
784
+ enqueued_at: S.Number.pipe(T.Body("enqueuedAt")),
785
+ visible_at: S.Number.pipe(T.Body("visibleAt")),
786
+ attempts: S.Number,
787
+ state: S.String,
788
+ leased_until: S.optional(S.NullOr(S.Number).pipe(T.Body("leasedUntil"))),
789
+ transfer_target: S.optional(
790
+ S.NullOr(S.String).pipe(T.Body("transferTarget")),
791
+ ),
792
+ dead_letter_source: S.optional(
793
+ S.NullOr(S.String).pipe(T.Body("deadLetterSource")),
794
+ ),
795
+ }),
796
+ ).annotate({ identifier: "QueueMessage" }) as any as S.Schema<QueueMessage>;
797
+
798
+ export type QueueMessages = Array<QueueMessage>;
799
+ export const QueueMessages = /*@__PURE__*/ S.Array(
800
+ QueueMessage,
801
+ ) as any as S.Schema<QueueMessages>;
802
+
803
+ export interface PeekQueueResult {
804
+ messages: QueueMessages;
805
+ }
806
+ export const PeekQueueResult = /*@__PURE__*/ S.suspend(() =>
807
+ S.Struct({
808
+ messages: QueueMessages,
809
+ }),
810
+ ).annotate({
811
+ identifier: "PeekQueueResult",
812
+ }) as any as S.Schema<PeekQueueResult>;
813
+
814
+ /** The actual HTTP JSON envelope is {"result": ...}; nested arrays or scalars are not top-level raw responses. */
815
+ export interface PeekQueueOutput {
816
+ result: PeekQueueResult;
817
+ }
818
+ export const PeekQueueOutput = /*@__PURE__*/ S.suspend(() =>
819
+ S.Struct({
820
+ result: PeekQueueResult,
821
+ }),
822
+ ).annotate({
823
+ identifier: "PeekQueueOutput",
824
+ }) as any as S.Schema<PeekQueueOutput>;
825
+
826
+ export type QueuePurgeOperation = "purge";
827
+ export const QueuePurgeOperation = S.String;
828
+
829
+ export interface PurgeQueueInput {
830
+ /** Reserved-class cell scope derived by Celld, not a database, namespace or queue display name. */
831
+ scope: string;
832
+ /** Optional cell identity name; include the exact encoded query string in the peer signature. */
833
+ name?: string;
834
+ /** Peer protocol version; send the string 5. */
835
+ peer_version: string;
836
+ /** Source node name or operator identity, validated as a node name. */
837
+ peer_source: string;
838
+ /** Exact addressed node session identity, not the cell scope. */
839
+ peer_target: string;
840
+ /** Decimal Unix milliseconds as text; accepted within a 30000 ms clock window. */
841
+ peer_timestamp: string;
842
+ /** A fresh 16-byte nonce encoded as 32 hexadecimal characters; reuse is rejected. */
843
+ peer_nonce: string;
844
+ /** Lowercase SHA-256 hex digest of the exact serialized HTTP request body bytes. */
845
+ peer_body_sha256: string;
846
+ /** HMAC-SHA256 hex signature over newline-separated domain cells-peer-request-v1, version 5, method POST, exact path and query, body hash, source, target, timestamp and nonce, with no trailing newline. */
847
+ peer_signature: string;
848
+ op: QueuePurgeOperation | (string & {});
849
+ }
850
+ export const PurgeQueueInput = /*@__PURE__*/ S.suspend(() =>
851
+ S.Struct({
852
+ scope: S.String.pipe(T.Label(), T.LabelEncoding({ preserve: ":$" })),
853
+ name: S.optional(S.String.pipe(T.Query())),
854
+ peer_version: S.String.pipe(T.Header("x-cells-peer-version")),
855
+ peer_source: S.String.pipe(T.Header("x-cells-peer-source")),
856
+ peer_target: S.String.pipe(T.Header("x-cells-peer-target")),
857
+ peer_timestamp: S.String.pipe(T.Header("x-cells-peer-timestamp")),
858
+ peer_nonce: S.String.pipe(T.Header("x-cells-peer-nonce")),
859
+ peer_body_sha256: S.String.pipe(T.Header("x-cells-peer-body-sha256")),
860
+ peer_signature: S.String.pipe(T.Header("x-cells-peer-signature")),
861
+ op: QueuePurgeOperation,
862
+ }).pipe(T.Http({ method: "POST", uri: "/runtime/{scope}", code: 200 })),
863
+ ).annotate({
864
+ identifier: "PurgeQueueInput",
865
+ }) as any as S.Schema<PurgeQueueInput>;
866
+
867
+ export interface QueueMetrics {
868
+ backlog_count: number;
869
+ backlog_bytes: number;
870
+ /** Unix milliseconds; null when no message exists. */
871
+ oldest_message_timestamp?: number | null;
872
+ }
873
+ export const QueueMetrics = /*@__PURE__*/ S.suspend(() =>
874
+ S.Struct({
875
+ backlog_count: S.Number.pipe(T.Body("backlogCount")),
876
+ backlog_bytes: S.Number.pipe(T.Body("backlogBytes")),
877
+ oldest_message_timestamp: S.optional(
878
+ S.NullOr(S.Number).pipe(T.Body("oldestMessageTimestamp")),
879
+ ),
880
+ }),
881
+ ).annotate({ identifier: "QueueMetrics" }) as any as S.Schema<QueueMetrics>;
882
+
883
+ export interface PurgeQueueResult {
884
+ deleted: number;
885
+ leased: number;
886
+ metrics: QueueMetrics;
887
+ }
888
+ export const PurgeQueueResult = /*@__PURE__*/ S.suspend(() =>
889
+ S.Struct({
890
+ deleted: S.Number,
891
+ leased: S.Number,
892
+ metrics: QueueMetrics,
893
+ }),
894
+ ).annotate({
895
+ identifier: "PurgeQueueResult",
896
+ }) as any as S.Schema<PurgeQueueResult>;
897
+
898
+ /** The actual HTTP JSON envelope is {"result": ...}; nested arrays or scalars are not top-level raw responses. */
899
+ export interface PurgeQueueOutput {
900
+ result: PurgeQueueResult;
901
+ }
902
+ export const PurgeQueueOutput = /*@__PURE__*/ S.suspend(() =>
903
+ S.Struct({
904
+ result: PurgeQueueResult,
905
+ }),
906
+ ).annotate({
907
+ identifier: "PurgeQueueOutput",
908
+ }) as any as S.Schema<PurgeQueueOutput>;
909
+
910
+ export type KvPutOperation = "put";
911
+ export const KvPutOperation = S.String;
912
+
913
+ export type Bytes = Array<number>;
914
+ export const Bytes = /*@__PURE__*/ S.Array(S.Number) as any as S.Schema<Bytes>;
915
+
916
+ export interface PutKvInput {
917
+ /** Reserved-class cell scope derived by Celld, not a database, namespace or queue display name. */
918
+ scope: string;
919
+ /** Optional cell identity name; include the exact encoded query string in the peer signature. */
920
+ name?: string;
921
+ /** Peer protocol version; send the string 5. */
922
+ peer_version: string;
923
+ /** Source node name or operator identity, validated as a node name. */
924
+ peer_source: string;
925
+ /** Exact addressed node session identity, not the cell scope. */
926
+ peer_target: string;
927
+ /** Decimal Unix milliseconds as text; accepted within a 30000 ms clock window. */
928
+ peer_timestamp: string;
929
+ /** A fresh 16-byte nonce encoded as 32 hexadecimal characters; reuse is rejected. */
930
+ peer_nonce: string;
931
+ /** Lowercase SHA-256 hex digest of the exact serialized HTTP request body bytes. */
932
+ peer_body_sha256: string;
933
+ /** HMAC-SHA256 hex signature over newline-separated domain cells-peer-request-v1, version 5, method POST, exact path and query, body hash, source, target, timestamp and nonce, with no trailing newline. */
934
+ peer_signature: string;
935
+ op: KvPutOperation | (string & {});
936
+ key: string;
937
+ /** Defaults to bytes. */
938
+ tag?: string;
939
+ /** JSON-encoded metadata text, not an object. */
940
+ metadata?: string;
941
+ /** Absolute Unix expiration in seconds. */
942
+ expiration?: number;
943
+ /** Relative expiry in seconds. The wire key is expirationTtl, as used by the source handler. */
944
+ expiration_ttl?: number;
945
+ value: Bytes;
946
+ }
947
+ export const PutKvInput = /*@__PURE__*/ S.suspend(() =>
948
+ S.Struct({
949
+ scope: S.String.pipe(T.Label(), T.LabelEncoding({ preserve: ":$" })),
950
+ name: S.optional(S.String.pipe(T.Query())),
951
+ peer_version: S.String.pipe(T.Header("x-cells-peer-version")),
952
+ peer_source: S.String.pipe(T.Header("x-cells-peer-source")),
953
+ peer_target: S.String.pipe(T.Header("x-cells-peer-target")),
954
+ peer_timestamp: S.String.pipe(T.Header("x-cells-peer-timestamp")),
955
+ peer_nonce: S.String.pipe(T.Header("x-cells-peer-nonce")),
956
+ peer_body_sha256: S.String.pipe(T.Header("x-cells-peer-body-sha256")),
957
+ peer_signature: S.String.pipe(T.Header("x-cells-peer-signature")),
958
+ op: KvPutOperation,
959
+ key: S.String,
960
+ tag: S.optional(S.String),
961
+ metadata: S.optional(S.String),
962
+ expiration: S.optional(S.Number),
963
+ expiration_ttl: S.optional(S.Number.pipe(T.Body("expirationTtl"))),
964
+ value: Bytes,
965
+ }).pipe(T.Http({ method: "POST", uri: "/runtime/{scope}", code: 200 })),
966
+ ).annotate({ identifier: "PutKvInput" }) as any as S.Schema<PutKvInput>;
967
+
968
+ /** The actual HTTP JSON envelope is {"result": ...}; nested arrays or scalars are not top-level raw responses. */
969
+ export interface PutKvOutput {
970
+ result: OkResult;
971
+ }
972
+ export const PutKvOutput = /*@__PURE__*/ S.suspend(() =>
973
+ S.Struct({
974
+ result: OkResult,
975
+ }),
976
+ ).annotate({ identifier: "PutKvOutput" }) as any as S.Schema<PutKvOutput>;
977
+
978
+ export type PutKvBase64Operation = "put-base64";
979
+ export const PutKvBase64Operation = S.String;
980
+
981
+ export interface PutKvBase64Input {
982
+ /** Reserved-class cell scope derived by Celld, not a database, namespace or queue display name. */
983
+ scope: string;
984
+ /** Optional cell identity name; include the exact encoded query string in the peer signature. */
985
+ name?: string;
986
+ /** Peer protocol version; send the string 5. */
987
+ peer_version: string;
988
+ /** Source node name or operator identity, validated as a node name. */
989
+ peer_source: string;
990
+ /** Exact addressed node session identity, not the cell scope. */
991
+ peer_target: string;
992
+ /** Decimal Unix milliseconds as text; accepted within a 30000 ms clock window. */
993
+ peer_timestamp: string;
994
+ /** A fresh 16-byte nonce encoded as 32 hexadecimal characters; reuse is rejected. */
995
+ peer_nonce: string;
996
+ /** Lowercase SHA-256 hex digest of the exact serialized HTTP request body bytes. */
997
+ peer_body_sha256: string;
998
+ /** HMAC-SHA256 hex signature over newline-separated domain cells-peer-request-v1, version 5, method POST, exact path and query, body hash, source, target, timestamp and nonce, with no trailing newline. */
999
+ peer_signature: string;
1000
+ op: PutKvBase64Operation | (string & {});
1001
+ key: string;
1002
+ /** Defaults to bytes. */
1003
+ tag?: string;
1004
+ /** JSON-encoded metadata text, not an object. */
1005
+ metadata?: string;
1006
+ /** Absolute Unix expiration in seconds. */
1007
+ expiration?: number;
1008
+ /** Relative expiry in seconds. The wire key is expirationTtl, as used by the source handler. */
1009
+ expiration_ttl?: number;
1010
+ value: string;
1011
+ }
1012
+ export const PutKvBase64Input = /*@__PURE__*/ S.suspend(() =>
1013
+ S.Struct({
1014
+ scope: S.String.pipe(T.Label(), T.LabelEncoding({ preserve: ":$" })),
1015
+ name: S.optional(S.String.pipe(T.Query())),
1016
+ peer_version: S.String.pipe(T.Header("x-cells-peer-version")),
1017
+ peer_source: S.String.pipe(T.Header("x-cells-peer-source")),
1018
+ peer_target: S.String.pipe(T.Header("x-cells-peer-target")),
1019
+ peer_timestamp: S.String.pipe(T.Header("x-cells-peer-timestamp")),
1020
+ peer_nonce: S.String.pipe(T.Header("x-cells-peer-nonce")),
1021
+ peer_body_sha256: S.String.pipe(T.Header("x-cells-peer-body-sha256")),
1022
+ peer_signature: S.String.pipe(T.Header("x-cells-peer-signature")),
1023
+ op: PutKvBase64Operation,
1024
+ key: S.String,
1025
+ tag: S.optional(S.String),
1026
+ metadata: S.optional(S.String),
1027
+ expiration: S.optional(S.Number),
1028
+ expiration_ttl: S.optional(S.Number.pipe(T.Body("expirationTtl"))),
1029
+ value: S.String,
1030
+ }).pipe(T.Http({ method: "POST", uri: "/runtime/{scope}", code: 200 })),
1031
+ ).annotate({
1032
+ identifier: "PutKvBase64Input",
1033
+ }) as any as S.Schema<PutKvBase64Input>;
1034
+
1035
+ /** The actual HTTP JSON envelope is {"result": ...}; nested arrays or scalars are not top-level raw responses. */
1036
+ export interface PutKvBase64Output {
1037
+ result: OkResult;
1038
+ }
1039
+ export const PutKvBase64Output = /*@__PURE__*/ S.suspend(() =>
1040
+ S.Struct({
1041
+ result: OkResult,
1042
+ }),
1043
+ ).annotate({
1044
+ identifier: "PutKvBase64Output",
1045
+ }) as any as S.Schema<PutKvBase64Output>;
1046
+
1047
+ export type RedriveQueueOperation = "redrive";
1048
+ export const RedriveQueueOperation = S.String;
1049
+
1050
+ export interface RedriveQueueInput {
1051
+ /** Reserved-class cell scope derived by Celld, not a database, namespace or queue display name. */
1052
+ scope: string;
1053
+ /** Optional cell identity name; include the exact encoded query string in the peer signature. */
1054
+ name?: string;
1055
+ /** Peer protocol version; send the string 5. */
1056
+ peer_version: string;
1057
+ /** Source node name or operator identity, validated as a node name. */
1058
+ peer_source: string;
1059
+ /** Exact addressed node session identity, not the cell scope. */
1060
+ peer_target: string;
1061
+ /** Decimal Unix milliseconds as text; accepted within a 30000 ms clock window. */
1062
+ peer_timestamp: string;
1063
+ /** A fresh 16-byte nonce encoded as 32 hexadecimal characters; reuse is rejected. */
1064
+ peer_nonce: string;
1065
+ /** Lowercase SHA-256 hex digest of the exact serialized HTTP request body bytes. */
1066
+ peer_body_sha256: string;
1067
+ /** HMAC-SHA256 hex signature over newline-separated domain cells-peer-request-v1, version 5, method POST, exact path and query, body hash, source, target, timestamp and nonce, with no trailing newline. */
1068
+ peer_signature: string;
1069
+ op: RedriveQueueOperation | (string & {});
1070
+ /** Defaults to 100; valid values are 1 through 100. */
1071
+ limit?: number;
1072
+ }
1073
+ export const RedriveQueueInput = /*@__PURE__*/ S.suspend(() =>
1074
+ S.Struct({
1075
+ scope: S.String.pipe(T.Label(), T.LabelEncoding({ preserve: ":$" })),
1076
+ name: S.optional(S.String.pipe(T.Query())),
1077
+ peer_version: S.String.pipe(T.Header("x-cells-peer-version")),
1078
+ peer_source: S.String.pipe(T.Header("x-cells-peer-source")),
1079
+ peer_target: S.String.pipe(T.Header("x-cells-peer-target")),
1080
+ peer_timestamp: S.String.pipe(T.Header("x-cells-peer-timestamp")),
1081
+ peer_nonce: S.String.pipe(T.Header("x-cells-peer-nonce")),
1082
+ peer_body_sha256: S.String.pipe(T.Header("x-cells-peer-body-sha256")),
1083
+ peer_signature: S.String.pipe(T.Header("x-cells-peer-signature")),
1084
+ op: RedriveQueueOperation,
1085
+ limit: S.optional(S.Number),
1086
+ }).pipe(T.Http({ method: "POST", uri: "/runtime/{scope}", code: 200 })),
1087
+ ).annotate({
1088
+ identifier: "RedriveQueueInput",
1089
+ }) as any as S.Schema<RedriveQueueInput>;
1090
+
1091
+ export interface RedriveQueueResult {
1092
+ redriven: number;
1093
+ metrics: QueueMetrics;
1094
+ }
1095
+ export const RedriveQueueResult = /*@__PURE__*/ S.suspend(() =>
1096
+ S.Struct({
1097
+ redriven: S.Number,
1098
+ metrics: QueueMetrics,
1099
+ }),
1100
+ ).annotate({
1101
+ identifier: "RedriveQueueResult",
1102
+ }) as any as S.Schema<RedriveQueueResult>;
1103
+
1104
+ /** The actual HTTP JSON envelope is {"result": ...}; nested arrays or scalars are not top-level raw responses. */
1105
+ export interface RedriveQueueOutput {
1106
+ result: RedriveQueueResult;
1107
+ }
1108
+ export const RedriveQueueOutput = /*@__PURE__*/ S.suspend(() =>
1109
+ S.Struct({
1110
+ result: RedriveQueueResult,
1111
+ }),
1112
+ ).annotate({
1113
+ identifier: "RedriveQueueOutput",
1114
+ }) as any as S.Schema<RedriveQueueOutput>;
1115
+
1116
+ export type QueueResumeOperation = "resume";
1117
+ export const QueueResumeOperation = S.String;
1118
+
1119
+ export interface ResumeQueueInput {
1120
+ /** Reserved-class cell scope derived by Celld, not a database, namespace or queue display name. */
1121
+ scope: string;
1122
+ /** Optional cell identity name; include the exact encoded query string in the peer signature. */
1123
+ name?: string;
1124
+ /** Peer protocol version; send the string 5. */
1125
+ peer_version: string;
1126
+ /** Source node name or operator identity, validated as a node name. */
1127
+ peer_source: string;
1128
+ /** Exact addressed node session identity, not the cell scope. */
1129
+ peer_target: string;
1130
+ /** Decimal Unix milliseconds as text; accepted within a 30000 ms clock window. */
1131
+ peer_timestamp: string;
1132
+ /** A fresh 16-byte nonce encoded as 32 hexadecimal characters; reuse is rejected. */
1133
+ peer_nonce: string;
1134
+ /** Lowercase SHA-256 hex digest of the exact serialized HTTP request body bytes. */
1135
+ peer_body_sha256: string;
1136
+ /** HMAC-SHA256 hex signature over newline-separated domain cells-peer-request-v1, version 5, method POST, exact path and query, body hash, source, target, timestamp and nonce, with no trailing newline. */
1137
+ peer_signature: string;
1138
+ op: QueueResumeOperation | (string & {});
1139
+ }
1140
+ export const ResumeQueueInput = /*@__PURE__*/ S.suspend(() =>
1141
+ S.Struct({
1142
+ scope: S.String.pipe(T.Label(), T.LabelEncoding({ preserve: ":$" })),
1143
+ name: S.optional(S.String.pipe(T.Query())),
1144
+ peer_version: S.String.pipe(T.Header("x-cells-peer-version")),
1145
+ peer_source: S.String.pipe(T.Header("x-cells-peer-source")),
1146
+ peer_target: S.String.pipe(T.Header("x-cells-peer-target")),
1147
+ peer_timestamp: S.String.pipe(T.Header("x-cells-peer-timestamp")),
1148
+ peer_nonce: S.String.pipe(T.Header("x-cells-peer-nonce")),
1149
+ peer_body_sha256: S.String.pipe(T.Header("x-cells-peer-body-sha256")),
1150
+ peer_signature: S.String.pipe(T.Header("x-cells-peer-signature")),
1151
+ op: QueueResumeOperation,
1152
+ }).pipe(T.Http({ method: "POST", uri: "/runtime/{scope}", code: 200 })),
1153
+ ).annotate({
1154
+ identifier: "ResumeQueueInput",
1155
+ }) as any as S.Schema<ResumeQueueInput>;
1156
+
1157
+ /** The actual HTTP JSON envelope is {"result": ...}; nested arrays or scalars are not top-level raw responses. */
1158
+ export interface ResumeQueueOutput {
1159
+ result: QueuePausedResult;
1160
+ }
1161
+ export const ResumeQueueOutput = /*@__PURE__*/ S.suspend(() =>
1162
+ S.Struct({
1163
+ result: QueuePausedResult,
1164
+ }),
1165
+ ).annotate({
1166
+ identifier: "ResumeQueueOutput",
1167
+ }) as any as S.Schema<ResumeQueueOutput>;
1168
+
1169
+ export type DeleteKvError =
1170
+ | PeerIncompatibleVersion
1171
+ | PeerWrongTarget
1172
+ | PeerReplayRejected
1173
+ | CelldOpError;
1174
+ /** Delete a list of keys from a reserved KV namespace. */
1175
+ export const deleteKv: API.OperationMethod<
1176
+ DeleteKvInput,
1177
+ DeleteKvOutput,
1178
+ DeleteKvError,
1179
+ CelldOpContext
1180
+ > = /*@__PURE__*/ API.make(() => ({
1181
+ input: DeleteKvInput,
1182
+ output: DeleteKvOutput,
1183
+ errors: [PeerIncompatibleVersion, PeerWrongTarget, PeerReplayRejected],
1184
+ protocol: CelldProtocol,
1185
+ }));
1186
+
1187
+ export type ExecD1Error =
1188
+ | D1ExecutionError
1189
+ | PeerIncompatibleVersion
1190
+ | PeerWrongTarget
1191
+ | PeerReplayRejected
1192
+ | CelldOpError;
1193
+ /** Execute SQL against a reserved D1 cell with the JSON body {"exec":{"sql":...,"rows":...}}. */
1194
+ export const execD1: API.OperationMethod<
1195
+ ExecD1Input,
1196
+ ExecD1Output,
1197
+ ExecD1Error,
1198
+ CelldOpContext
1199
+ > = /*@__PURE__*/ API.make(() => ({
1200
+ input: ExecD1Input,
1201
+ output: ExecD1Output,
1202
+ errors: [
1203
+ D1ExecutionError,
1204
+ PeerIncompatibleVersion,
1205
+ PeerWrongTarget,
1206
+ PeerReplayRejected,
1207
+ ],
1208
+ protocol: CelldProtocol,
1209
+ }));
1210
+
1211
+ export type ExecuteD1StatementsError =
1212
+ | D1ExecutionError
1213
+ | PeerIncompatibleVersion
1214
+ | PeerWrongTarget
1215
+ | PeerReplayRejected
1216
+ | CelldOpError;
1217
+ /** Run prepared statements sequentially, not as an atomic batch. The body key is statements; each params entry retains its native JSON type. */
1218
+ export const executeD1Statements: API.OperationMethod<
1219
+ ExecuteD1StatementsInput,
1220
+ ExecuteD1StatementsOutput,
1221
+ ExecuteD1StatementsError,
1222
+ CelldOpContext
1223
+ > = /*@__PURE__*/ API.make(() => ({
1224
+ input: ExecuteD1StatementsInput,
1225
+ output: ExecuteD1StatementsOutput,
1226
+ errors: [
1227
+ D1ExecutionError,
1228
+ PeerIncompatibleVersion,
1229
+ PeerWrongTarget,
1230
+ PeerReplayRejected,
1231
+ ],
1232
+ protocol: CelldProtocol,
1233
+ }));
1234
+
1235
+ export type GetKvError =
1236
+ | PeerIncompatibleVersion
1237
+ | PeerWrongTarget
1238
+ | PeerReplayRejected
1239
+ | CelldOpError;
1240
+ /** Read one key from a reserved KV namespace. A missing key returns result.found=false. */
1241
+ export const getKv: API.OperationMethod<
1242
+ GetKvInput,
1243
+ GetKvOutput,
1244
+ GetKvError,
1245
+ CelldOpContext
1246
+ > = /*@__PURE__*/ API.make(() => ({
1247
+ input: GetKvInput,
1248
+ output: GetKvOutput,
1249
+ errors: [PeerIncompatibleVersion, PeerWrongTarget, PeerReplayRejected],
1250
+ protocol: CelldProtocol,
1251
+ }));
1252
+
1253
+ export type GetKvInfoError =
1254
+ | PeerIncompatibleVersion
1255
+ | PeerWrongTarget
1256
+ | PeerReplayRejected
1257
+ | CelldOpError;
1258
+ /** Return live key count, live bytes and total stored key count. */
1259
+ export const getKvInfo: API.OperationMethod<
1260
+ GetKvInfoInput,
1261
+ GetKvInfoOutput,
1262
+ GetKvInfoError,
1263
+ CelldOpContext
1264
+ > = /*@__PURE__*/ API.make(() => ({
1265
+ input: GetKvInfoInput,
1266
+ output: GetKvInfoOutput,
1267
+ errors: [PeerIncompatibleVersion, PeerWrongTarget, PeerReplayRejected],
1268
+ protocol: CelldProtocol,
1269
+ }));
1270
+
1271
+ export type GetQueueInfoError =
1272
+ | PeerIncompatibleVersion
1273
+ | PeerWrongTarget
1274
+ | PeerReplayRejected
1275
+ | CelldOpError;
1276
+ /** Reserved Queue operator request with JSON op=info. This is not the private Queue RPC or settlement endpoint. */
1277
+ export const getQueueInfo: API.OperationMethod<
1278
+ GetQueueInfoInput,
1279
+ GetQueueInfoOutput,
1280
+ GetQueueInfoError,
1281
+ CelldOpContext
1282
+ > = /*@__PURE__*/ API.make(() => ({
1283
+ input: GetQueueInfoInput,
1284
+ output: GetQueueInfoOutput,
1285
+ errors: [PeerIncompatibleVersion, PeerWrongTarget, PeerReplayRejected],
1286
+ protocol: CelldProtocol,
1287
+ }));
1288
+
1289
+ export type ListKvError =
1290
+ | PeerIncompatibleVersion
1291
+ | PeerWrongTarget
1292
+ | PeerReplayRejected
1293
+ | CelldOpError;
1294
+ /** List keys in a reserved KV namespace. Metadata remains JSON text and expiration is in milliseconds. */
1295
+ export const listKv: API.OperationMethod<
1296
+ ListKvInput,
1297
+ ListKvOutput,
1298
+ ListKvError,
1299
+ CelldOpContext
1300
+ > = /*@__PURE__*/ API.make(() => ({
1301
+ input: ListKvInput,
1302
+ output: ListKvOutput,
1303
+ errors: [PeerIncompatibleVersion, PeerWrongTarget, PeerReplayRejected],
1304
+ protocol: CelldProtocol,
1305
+ }));
1306
+
1307
+ export type MigrateD1Error =
1308
+ | D1ExecutionError
1309
+ | PeerIncompatibleVersion
1310
+ | PeerWrongTarget
1311
+ | PeerReplayRejected
1312
+ | CelldOpError;
1313
+ /** Apply a migration atomically with its bookkeeping insert. The result is the SQL engine native JSON value; no RPC action wrapper is sent. */
1314
+ export const migrateD1: API.OperationMethod<
1315
+ MigrateD1Input,
1316
+ MigrateD1Output,
1317
+ MigrateD1Error,
1318
+ CelldOpContext
1319
+ > = /*@__PURE__*/ API.make(() => ({
1320
+ input: MigrateD1Input,
1321
+ output: MigrateD1Output,
1322
+ errors: [
1323
+ D1ExecutionError,
1324
+ PeerIncompatibleVersion,
1325
+ PeerWrongTarget,
1326
+ PeerReplayRejected,
1327
+ ],
1328
+ protocol: CelldProtocol,
1329
+ }));
1330
+
1331
+ export type PauseQueueError =
1332
+ | PeerIncompatibleVersion
1333
+ | PeerWrongTarget
1334
+ | PeerReplayRejected
1335
+ | CelldOpError;
1336
+ /** Reserved Queue operator request with JSON op=pause. This is not the private Queue RPC or settlement endpoint. */
1337
+ export const pauseQueue: API.OperationMethod<
1338
+ PauseQueueInput,
1339
+ PauseQueueOutput,
1340
+ PauseQueueError,
1341
+ CelldOpContext
1342
+ > = /*@__PURE__*/ API.make(() => ({
1343
+ input: PauseQueueInput,
1344
+ output: PauseQueueOutput,
1345
+ errors: [PeerIncompatibleVersion, PeerWrongTarget, PeerReplayRejected],
1346
+ protocol: CelldProtocol,
1347
+ }));
1348
+
1349
+ export type PeekQueueError =
1350
+ | PeerIncompatibleVersion
1351
+ | PeerWrongTarget
1352
+ | PeerReplayRejected
1353
+ | CelldOpError;
1354
+ /** Reserved Queue operator request with JSON op=peek. This is not the private Queue RPC or settlement endpoint. */
1355
+ export const peekQueue: API.OperationMethod<
1356
+ PeekQueueInput,
1357
+ PeekQueueOutput,
1358
+ PeekQueueError,
1359
+ CelldOpContext
1360
+ > = /*@__PURE__*/ API.make(() => ({
1361
+ input: PeekQueueInput,
1362
+ output: PeekQueueOutput,
1363
+ errors: [PeerIncompatibleVersion, PeerWrongTarget, PeerReplayRejected],
1364
+ protocol: CelldProtocol,
1365
+ }));
1366
+
1367
+ export type PurgeQueueError =
1368
+ | PeerIncompatibleVersion
1369
+ | PeerWrongTarget
1370
+ | PeerReplayRejected
1371
+ | CelldOpError;
1372
+ /** Reserved Queue operator request with JSON op=purge. This is not the private Queue RPC or settlement endpoint. */
1373
+ export const purgeQueue: API.OperationMethod<
1374
+ PurgeQueueInput,
1375
+ PurgeQueueOutput,
1376
+ PurgeQueueError,
1377
+ CelldOpContext
1378
+ > = /*@__PURE__*/ API.make(() => ({
1379
+ input: PurgeQueueInput,
1380
+ output: PurgeQueueOutput,
1381
+ errors: [PeerIncompatibleVersion, PeerWrongTarget, PeerReplayRejected],
1382
+ protocol: CelldProtocol,
1383
+ }));
1384
+
1385
+ export type PutKvError =
1386
+ | PeerIncompatibleVersion
1387
+ | PeerWrongTarget
1388
+ | PeerReplayRejected
1389
+ | CelldOpError;
1390
+ /** Write an inline JSON byte array. Expiration is resolved by the cell clock. */
1391
+ export const putKv: API.OperationMethod<
1392
+ PutKvInput,
1393
+ PutKvOutput,
1394
+ PutKvError,
1395
+ CelldOpContext
1396
+ > = /*@__PURE__*/ API.make(() => ({
1397
+ input: PutKvInput,
1398
+ output: PutKvOutput,
1399
+ errors: [PeerIncompatibleVersion, PeerWrongTarget, PeerReplayRejected],
1400
+ protocol: CelldProtocol,
1401
+ }));
1402
+
1403
+ export type PutKvBase64Error =
1404
+ | PeerIncompatibleVersion
1405
+ | PeerWrongTarget
1406
+ | PeerReplayRejected
1407
+ | CelldOpError;
1408
+ /** Write base64-encoded bytes using the distinct put-base64 wire operation. */
1409
+ export const putKvBase64: API.OperationMethod<
1410
+ PutKvBase64Input,
1411
+ PutKvBase64Output,
1412
+ PutKvBase64Error,
1413
+ CelldOpContext
1414
+ > = /*@__PURE__*/ API.make(() => ({
1415
+ input: PutKvBase64Input,
1416
+ output: PutKvBase64Output,
1417
+ errors: [PeerIncompatibleVersion, PeerWrongTarget, PeerReplayRejected],
1418
+ protocol: CelldProtocol,
1419
+ }));
1420
+
1421
+ export type RedriveQueueError =
1422
+ | PeerIncompatibleVersion
1423
+ | PeerWrongTarget
1424
+ | PeerReplayRejected
1425
+ | CelldOpError;
1426
+ /** Reserved Queue operator request with JSON op=redrive. This is not the private Queue RPC or settlement endpoint. */
1427
+ export const redriveQueue: API.OperationMethod<
1428
+ RedriveQueueInput,
1429
+ RedriveQueueOutput,
1430
+ RedriveQueueError,
1431
+ CelldOpContext
1432
+ > = /*@__PURE__*/ API.make(() => ({
1433
+ input: RedriveQueueInput,
1434
+ output: RedriveQueueOutput,
1435
+ errors: [PeerIncompatibleVersion, PeerWrongTarget, PeerReplayRejected],
1436
+ protocol: CelldProtocol,
1437
+ }));
1438
+
1439
+ export type ResumeQueueError =
1440
+ | PeerIncompatibleVersion
1441
+ | PeerWrongTarget
1442
+ | PeerReplayRejected
1443
+ | CelldOpError;
1444
+ /** Reserved Queue operator request with JSON op=resume. This is not the private Queue RPC or settlement endpoint. */
1445
+ export const resumeQueue: API.OperationMethod<
1446
+ ResumeQueueInput,
1447
+ ResumeQueueOutput,
1448
+ ResumeQueueError,
1449
+ CelldOpContext
1450
+ > = /*@__PURE__*/ API.make(() => ({
1451
+ input: ResumeQueueInput,
1452
+ output: ResumeQueueOutput,
1453
+ errors: [PeerIncompatibleVersion, PeerWrongTarget, PeerReplayRejected],
1454
+ protocol: CelldProtocol,
1455
+ }));