@injectivelabs/sdk-ts 1.17.2 → 1.17.3-alpha.0

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 (95) hide show
  1. package/dist/cjs/{AbacusGrpcApi-DXSuhb6R.cjs → AbacusGrpcApi-ieWvx9Pk.cjs} +6 -5
  2. package/dist/cjs/BaseGrpcConsumer-TjcGQpif.d.cts +89 -0
  3. package/dist/cjs/{BaseGrpcConsumer-EtEQfhmo.cjs → BaseGrpcConsumer-hNH10qOJ.cjs} +22 -3
  4. package/dist/cjs/{BaseIndexerGrpcConsumer-CW1kTn-_.cjs → BaseIndexerGrpcConsumer-E9xi3hs8.cjs} +1 -1
  5. package/dist/cjs/{ChainGrpcExchangeApi-CF9ATYqN.cjs → ChainGrpcExchangeApi-C1v-xxCh.cjs} +7 -6
  6. package/dist/cjs/{ChainRestTendermintApi-vL0g-BF-.cjs → ChainRestTendermintApi-BtxXFstT.cjs} +11 -9
  7. package/dist/cjs/{IndexerGrpcWeb3GwApi-C7kkr4Il.cjs → IndexerGrpcWeb3GwApi-C5AlN6KV.cjs} +8 -7
  8. package/dist/cjs/{MsgSetDenomMetadata-CKvxIq_t.cjs → MsgSetDenomMetadata-BHkIa3K_.cjs} +1 -1
  9. package/dist/cjs/{OLPGrpcApi-BCCb6fBZ.cjs → OLPGrpcApi-D_o2P-SZ.cjs} +6 -5
  10. package/dist/cjs/{QueryTradingStrategyContractTotalStrategies-Ayot_18R.cjs → QueryTradingStrategyContractTotalStrategies-DY_tydyG.cjs} +3 -3
  11. package/dist/cjs/{StreamManagerV2-igv0mn2I.cjs → StreamManagerV2-BxM7w64U.cjs} +78 -63
  12. package/dist/cjs/{chain-CGHrf7gg.cjs → chain-C_8R5bBd.cjs} +92 -74
  13. package/dist/cjs/client/abacus.cjs +2 -2
  14. package/dist/cjs/client/abacus.d.cts +4 -2
  15. package/dist/cjs/client/chain.cjs +4 -4
  16. package/dist/cjs/client/chain.d.cts +8 -9
  17. package/dist/cjs/client/indexer.cjs +4 -4
  18. package/dist/cjs/client/indexer.d.cts +8 -9
  19. package/dist/cjs/client/olp.cjs +3 -3
  20. package/dist/cjs/client/olp.d.cts +4 -2
  21. package/dist/cjs/client/wasm.cjs +5 -5
  22. package/dist/cjs/client/wasm.d.cts +3 -2
  23. package/dist/cjs/core/accounts.d.cts +8 -9
  24. package/dist/cjs/core/modules.cjs +7 -7
  25. package/dist/cjs/core/modules.d.cts +8 -9
  26. package/dist/cjs/core/tx.cjs +5 -5
  27. package/dist/cjs/core/tx.d.cts +8 -9
  28. package/dist/cjs/cosmjs.cjs +5 -5
  29. package/dist/cjs/cosmjs.d.cts +2 -3
  30. package/dist/cjs/exports.cjs +5 -5
  31. package/dist/cjs/exports.d.cts +2 -3
  32. package/dist/{esm/index-DOyiZiUK.d.ts → cjs/index-1xa-4b0j.d.cts} +2 -3
  33. package/dist/cjs/{index-D6ubyMlR.d.cts → index-B-ODtCMF.d.cts} +7 -7
  34. package/dist/{esm/index-Dn4OxoMy.d.ts → cjs/index-Btix6ZFg.d.cts} +4 -3
  35. package/dist/{esm/index-BJQt8IpY.d.ts → cjs/index-ByWM_5hr.d.cts} +2 -3
  36. package/dist/cjs/{index-DemZnO3c.d.cts → index-D9jzqFzT.d.cts} +81 -175
  37. package/dist/cjs/{index-DjRtDAy5.d.cts → index-Dems0piS.d.cts} +2924 -1125
  38. package/dist/{esm/index-C_3bL-y4.d.ts → cjs/index-nMOqRjvi.d.cts} +1 -1
  39. package/dist/cjs/index.cjs +12 -12
  40. package/dist/cjs/index.d.cts +9 -10
  41. package/dist/cjs/service.d.cts +3 -4
  42. package/dist/cjs/{tx-VwbP3UdI.cjs → tx-D3CYce5M.cjs} +8 -7
  43. package/dist/{esm/tx_pb-zz4o4hHG.d.ts → cjs/tx_pb-Wr-aZfKH.d.cts} +186 -6
  44. package/dist/cjs/types.d.cts +3 -4
  45. package/dist/cjs/utils.d.cts +8 -9
  46. package/dist/esm/{AbacusGrpcApi-Ce1hRKuD.js → AbacusGrpcApi-4J7beM6Y.js} +6 -5
  47. package/dist/esm/{BaseGrpcConsumer-BTWyD665.js → BaseGrpcConsumer-ByL34muR.js} +22 -3
  48. package/dist/esm/BaseGrpcConsumer-CQEK92MB.d.ts +89 -0
  49. package/dist/esm/{BaseIndexerGrpcConsumer-BTZzA_Eg.js → BaseIndexerGrpcConsumer-CUx8BFq4.js} +1 -1
  50. package/dist/esm/{ChainGrpcExchangeApi-DqdCst2Z.js → ChainGrpcExchangeApi-BxTTr_-W.js} +7 -6
  51. package/dist/esm/{ChainRestTendermintApi-BT_yOkAV.js → ChainRestTendermintApi-DpVPQNSn.js} +11 -9
  52. package/dist/esm/{IndexerGrpcWeb3GwApi-B2mgt9tE.js → IndexerGrpcWeb3GwApi-BHz_bM42.js} +8 -7
  53. package/dist/esm/{MsgSetDenomMetadata-CXgkQ3LF.js → MsgSetDenomMetadata-hxd0v-JN.js} +1 -1
  54. package/dist/esm/{OLPGrpcApi-DUCfcca_.js → OLPGrpcApi-BNGEcbpR.js} +6 -5
  55. package/dist/esm/{QueryTradingStrategyContractTotalStrategies-CZWdw3BE.js → QueryTradingStrategyContractTotalStrategies-DqCEu1NJ.js} +3 -3
  56. package/dist/esm/{StreamManagerV2-B9xiJYLj.js → StreamManagerV2-Dp2D7FL4.js} +78 -63
  57. package/dist/esm/{chain-CHX5uSpc.js → chain-BGq_0n_H.js} +92 -74
  58. package/dist/esm/client/abacus.d.ts +4 -2
  59. package/dist/esm/client/abacus.js +2 -2
  60. package/dist/esm/client/chain.d.ts +8 -9
  61. package/dist/esm/client/chain.js +4 -4
  62. package/dist/esm/client/indexer.d.ts +8 -9
  63. package/dist/esm/client/indexer.js +4 -4
  64. package/dist/esm/client/olp.d.ts +4 -2
  65. package/dist/esm/client/olp.js +3 -3
  66. package/dist/esm/client/wasm.d.ts +3 -2
  67. package/dist/esm/client/wasm.js +5 -5
  68. package/dist/esm/core/accounts.d.ts +8 -9
  69. package/dist/esm/core/modules.d.ts +8 -9
  70. package/dist/esm/core/modules.js +7 -7
  71. package/dist/esm/core/tx.d.ts +8 -9
  72. package/dist/esm/core/tx.js +5 -5
  73. package/dist/esm/cosmjs.d.ts +2 -3
  74. package/dist/esm/cosmjs.js +5 -5
  75. package/dist/esm/exports.d.ts +2 -3
  76. package/dist/esm/exports.js +5 -5
  77. package/dist/{cjs/index-DWbxb1AB.d.cts → esm/index-BJg6-o6s.d.ts} +4 -3
  78. package/dist/esm/{index--sg5xbEP.d.ts → index-BqYLsIZe.d.ts} +1 -1
  79. package/dist/esm/{index-Ch477yfL.d.ts → index-BzG_rDxK.d.ts} +80 -174
  80. package/dist/{cjs/index-lRWP4rKg.d.cts → esm/index-DXl4Xl74.d.ts} +2 -3
  81. package/dist/{cjs/index-CO3Y9drx.d.cts → esm/index-DbxF8Vb3.d.ts} +2 -3
  82. package/dist/esm/{index-B-SD0p02.d.ts → index-ICIQoqaU.d.ts} +2924 -1125
  83. package/dist/{cjs/index-CGvISJoE.d.cts → esm/index-T3rAmwhz.d.ts} +1 -1
  84. package/dist/esm/index.d.ts +9 -10
  85. package/dist/esm/index.js +12 -12
  86. package/dist/esm/service.d.ts +3 -4
  87. package/dist/esm/{tx-DsGG15fH.js → tx-Bgy5FhAu.js} +8 -7
  88. package/dist/{cjs/tx_pb-D-cNmrlO.d.cts → esm/tx_pb-DiV92WM9.d.ts} +186 -6
  89. package/dist/esm/types.d.ts +3 -4
  90. package/dist/esm/utils.d.ts +8 -9
  91. package/package.json +5 -5
  92. package/dist/cjs/BaseGrpcConsumer-Vvj4lzyS.d.cts +0 -1841
  93. package/dist/cjs/any_pb-CutLnOUR.d.cts +0 -187
  94. package/dist/esm/BaseGrpcConsumer-6x4RlZ16.d.ts +0 -1841
  95. package/dist/esm/any_pb-DBt7qvTr.d.ts +0 -187
@@ -1,1841 +0,0 @@
1
- //#region ../../node_modules/.pnpm/@protobuf-ts+runtime@2.11.1/node_modules/@protobuf-ts/runtime/build/types/json-typings.d.ts
2
- /**
3
- * Represents any possible JSON value:
4
- * - number
5
- * - string
6
- * - boolean
7
- * - null
8
- * - object (with any JSON value as property)
9
- * - array (with any JSON value as element)
10
- */
11
- declare type JsonValue = number | string | boolean | null | JsonObject | JsonArray;
12
- /**
13
- * Represents a JSON object.
14
- */
15
- declare type JsonObject = {
16
- [k: string]: JsonValue;
17
- };
18
- interface JsonArray extends Array<JsonValue> {}
19
- /**
20
- * Get the type of a JSON value.
21
- * Distinguishes between array, null and object.
22
- */
23
- //#endregion
24
- //#region ../../node_modules/.pnpm/@protobuf-ts+runtime@2.11.1/node_modules/@protobuf-ts/runtime/build/types/pb-long.d.ts
25
- declare abstract class SharedPbLong {
26
- /**
27
- * Low 32 bits.
28
- */
29
- readonly lo: number;
30
- /**
31
- * High 32 bits.
32
- */
33
- readonly hi: number;
34
- /**
35
- * Create a new instance with the given bits.
36
- */
37
- constructor(lo: number, hi: number);
38
- /**
39
- * Is this instance equal to 0?
40
- */
41
- isZero(): boolean;
42
- /**
43
- * Convert to a native number.
44
- */
45
- toNumber(): number;
46
- /**
47
- * Convert to decimal string.
48
- */
49
- abstract toString(): string;
50
- /**
51
- * Convert to native bigint.
52
- */
53
- abstract toBigInt(): bigint;
54
- }
55
- /**
56
- * 64-bit unsigned integer as two 32-bit values.
57
- * Converts between `string`, `number` and `bigint` representations.
58
- */
59
- declare class PbULong extends SharedPbLong {
60
- /**
61
- * ulong 0 singleton.
62
- */
63
- static ZERO: PbULong;
64
- /**
65
- * Create instance from a `string`, `number` or `bigint`.
66
- */
67
- static from(value: string | number | bigint): PbULong;
68
- /**
69
- * Convert to decimal string.
70
- */
71
- toString(): string;
72
- /**
73
- * Convert to native bigint.
74
- */
75
- toBigInt(): bigint;
76
- }
77
- /**
78
- * 64-bit signed integer as two 32-bit values.
79
- * Converts between `string`, `number` and `bigint` representations.
80
- */
81
- declare class PbLong extends SharedPbLong {
82
- /**
83
- * long 0 singleton.
84
- */
85
- static ZERO: PbLong;
86
- /**
87
- * Create instance from a `string`, `number` or `bigint`.
88
- */
89
- static from(value: string | number | bigint): PbLong;
90
- /**
91
- * Do we have a minus sign?
92
- */
93
- isNegative(): boolean;
94
- /**
95
- * Negate two's complement.
96
- * Invert all the bits and add one to the result.
97
- */
98
- negate(): PbLong;
99
- /**
100
- * Convert to decimal string.
101
- */
102
- toString(): string;
103
- /**
104
- * Convert to native bigint.
105
- */
106
- toBigInt(): bigint;
107
- }
108
- //#endregion
109
- //#region ../../node_modules/.pnpm/@protobuf-ts+runtime@2.11.1/node_modules/@protobuf-ts/runtime/build/types/binary-format-contract.d.ts
110
- /**
111
- * Options for writing binary data.
112
- */
113
- interface BinaryWriteOptions {
114
- /**
115
- * Shall unknown fields be written back on wire?
116
- *
117
- * `true`: unknown fields stored in a symbol property of the message
118
- * are written back. This is the default behaviour.
119
- *
120
- * `false`: unknown fields are not written.
121
- *
122
- * `UnknownFieldWriter`: Your own behaviour for unknown fields.
123
- */
124
- writeUnknownFields: boolean | UnknownFieldWriter;
125
- /**
126
- * Allows to use a custom implementation to encode binary data.
127
- */
128
- writerFactory: () => IBinaryWriter;
129
- }
130
- /**
131
- * Options for reading binary data.
132
- */
133
- interface BinaryReadOptions {
134
- /**
135
- * Shall unknown fields be read, ignored or raise an error?
136
- *
137
- * `true`: stores the unknown field on a symbol property of the
138
- * message. This is the default behaviour.
139
- *
140
- * `false`: ignores the unknown field.
141
- *
142
- * `"throw"`: throws an error.
143
- *
144
- * `UnknownFieldReader`: Your own behaviour for unknown fields.
145
- */
146
- readUnknownField: boolean | 'throw' | UnknownFieldReader;
147
- /**
148
- * Allows to use a custom implementation to parse binary data.
149
- */
150
- readerFactory: (bytes: Uint8Array) => IBinaryReader;
151
- }
152
- /**
153
- * Store an unknown field for a message somewhere.
154
- */
155
- declare type UnknownFieldReader = (typeName: string, message: any, fieldNo: number, wireType: WireType, data: Uint8Array) => void;
156
- /**
157
- * Write unknown fields stored for the message to the writer.
158
- */
159
- declare type UnknownFieldWriter = (typeName: string, message: any, writer: IBinaryWriter) => void;
160
- /**
161
- * This handler implements the default behaviour for unknown fields.
162
- * When reading data, unknown fields are stored on the message, in a
163
- * symbol property.
164
- * When writing data, the symbol property is queried and unknown fields
165
- * are serialized into the output again.
166
- */
167
-
168
- /**
169
- * This interface is used throughout @protobuf-ts to read
170
- * protobuf binary format.
171
- *
172
- * While not completely compatible, this interface is closely aligned
173
- * with the `Reader` class of `protobufjs` to make it easier to swap
174
- * the implementation.
175
- */
176
- interface IBinaryReader {
177
- /**
178
- * Current position.
179
- */
180
- readonly pos: number;
181
- /**
182
- * Number of bytes available in this reader.
183
- */
184
- readonly len: number;
185
- /**
186
- * Reads a tag - field number and wire type.
187
- */
188
- tag(): [number, WireType];
189
- /**
190
- * Skip one element on the wire and return the skipped data.
191
- */
192
- skip(wireType: WireType): Uint8Array;
193
- /**
194
- * Read a `int32` field, a signed 32 bit varint.
195
- */
196
- uint32(): number;
197
- /**
198
- * Read a `sint32` field, a signed, zigzag-encoded 32-bit varint.
199
- */
200
- int32(): number;
201
- /**
202
- * Read a `sint32` field, a signed, zigzag-encoded 32-bit varint.
203
- */
204
- sint32(): number;
205
- /**
206
- * Read a `int64` field, a signed 64-bit varint.
207
- */
208
- int64(): PbLong;
209
- /**
210
- * Read a `sint64` field, a signed, zig-zag-encoded 64-bit varint.
211
- */
212
- sint64(): PbLong;
213
- /**
214
- * Read a `fixed64` field, a signed, fixed-length 64-bit integer.
215
- */
216
- sfixed64(): PbLong;
217
- /**
218
- * Read a `uint64` field, an unsigned 64-bit varint.
219
- */
220
- uint64(): PbULong;
221
- /**
222
- * Read a `fixed64` field, an unsigned, fixed-length 64 bit integer.
223
- */
224
- fixed64(): PbULong;
225
- /**
226
- * Read a `bool` field, a variant.
227
- */
228
- bool(): boolean;
229
- /**
230
- * Read a `fixed32` field, an unsigned, fixed-length 32-bit integer.
231
- */
232
- fixed32(): number;
233
- /**
234
- * Read a `sfixed32` field, a signed, fixed-length 32-bit integer.
235
- */
236
- sfixed32(): number;
237
- /**
238
- * Read a `float` field, 32-bit floating point number.
239
- */
240
- float(): number;
241
- /**
242
- * Read a `double` field, a 64-bit floating point number.
243
- */
244
- double(): number;
245
- /**
246
- * Read a `bytes` field, length-delimited arbitrary data.
247
- */
248
- bytes(): Uint8Array;
249
- /**
250
- * Read a `string` field, length-delimited data converted to UTF-8 text.
251
- */
252
- string(): string;
253
- }
254
- /**
255
- * This interface is used throughout @protobuf-ts to write
256
- * protobuf binary format.
257
- *
258
- * While not completely compatible, this interface is closely aligned
259
- * with the `Writer` class of `protobufjs` to make it easier to swap
260
- * the implementation.
261
- */
262
- interface IBinaryWriter {
263
- /**
264
- * Return all bytes written and reset this writer.
265
- */
266
- finish(): Uint8Array;
267
- /**
268
- * Start a new fork for length-delimited data like a message
269
- * or a packed repeated field.
270
- *
271
- * Must be joined later with `join()`.
272
- */
273
- fork(): IBinaryWriter;
274
- /**
275
- * Join the last fork. Write its length and bytes, then
276
- * return to the previous state.
277
- */
278
- join(): IBinaryWriter;
279
- /**
280
- * Writes a tag (field number and wire type).
281
- *
282
- * Equivalent to `uint32( (fieldNo << 3 | type) >>> 0 )`
283
- *
284
- * Generated code should compute the tag ahead of time and call `uint32()`.
285
- */
286
- tag(fieldNo: number, type: WireType): IBinaryWriter;
287
- /**
288
- * Write a chunk of raw bytes.
289
- */
290
- raw(chunk: Uint8Array): IBinaryWriter;
291
- /**
292
- * Write a `uint32` value, an unsigned 32 bit varint.
293
- */
294
- uint32(value: number): IBinaryWriter;
295
- /**
296
- * Write a `int32` value, a signed 32 bit varint.
297
- */
298
- int32(value: number): IBinaryWriter;
299
- /**
300
- * Write a `sint32` value, a signed, zigzag-encoded 32-bit varint.
301
- */
302
- sint32(value: number): IBinaryWriter;
303
- /**
304
- * Write a `int64` value, a signed 64-bit varint.
305
- */
306
- int64(value: string | number | bigint): IBinaryWriter;
307
- /**
308
- * Write a `uint64` value, an unsigned 64-bit varint.
309
- */
310
- uint64(value: string | number | bigint): IBinaryWriter;
311
- /**
312
- * Write a `sint64` value, a signed, zig-zag-encoded 64-bit varint.
313
- */
314
- sint64(value: string | number | bigint): IBinaryWriter;
315
- /**
316
- * Write a `fixed64` value, an unsigned, fixed-length 64 bit integer.
317
- */
318
- fixed64(value: string | number | bigint): IBinaryWriter;
319
- /**
320
- * Write a `fixed64` value, a signed, fixed-length 64-bit integer.
321
- */
322
- sfixed64(value: string | number | bigint): IBinaryWriter;
323
- /**
324
- * Write a `bool` value, a variant.
325
- */
326
- bool(value: boolean): IBinaryWriter;
327
- /**
328
- * Write a `fixed32` value, an unsigned, fixed-length 32-bit integer.
329
- */
330
- fixed32(value: number): IBinaryWriter;
331
- /**
332
- * Write a `sfixed32` value, a signed, fixed-length 32-bit integer.
333
- */
334
- sfixed32(value: number): IBinaryWriter;
335
- /**
336
- * Write a `float` value, 32-bit floating point number.
337
- */
338
- float(value: number): IBinaryWriter;
339
- /**
340
- * Write a `double` value, a 64-bit floating point number.
341
- */
342
- double(value: number): IBinaryWriter;
343
- /**
344
- * Write a `bytes` value, length-delimited arbitrary data.
345
- */
346
- bytes(value: Uint8Array): IBinaryWriter;
347
- /**
348
- * Write a `string` value, length-delimited data converted to UTF-8 text.
349
- */
350
- string(value: string): IBinaryWriter;
351
- }
352
- /**
353
- * Protobuf binary format wire types.
354
- *
355
- * A wire type provides just enough information to find the length of the
356
- * following value.
357
- *
358
- * See https://developers.google.com/protocol-buffers/docs/encoding#structure
359
- */
360
- declare enum WireType {
361
- /**
362
- * Used for int32, int64, uint32, uint64, sint32, sint64, bool, enum
363
- */
364
- Varint = 0,
365
- /**
366
- * Used for fixed64, sfixed64, double.
367
- * Always 8 bytes with little-endian byte order.
368
- */
369
- Bit64 = 1,
370
- /**
371
- * Used for string, bytes, embedded messages, packed repeated fields
372
- *
373
- * Only repeated numeric types (types which use the varint, 32-bit,
374
- * or 64-bit wire types) can be packed. In proto3, such fields are
375
- * packed by default.
376
- */
377
- LengthDelimited = 2,
378
- /**
379
- * Used for groups
380
- * @deprecated
381
- */
382
- StartGroup = 3,
383
- /**
384
- * Used for groups
385
- * @deprecated
386
- */
387
- EndGroup = 4,
388
- /**
389
- * Used for fixed32, sfixed32, float.
390
- * Always 4 bytes with little-endian byte order.
391
- */
392
- Bit32 = 5,
393
- }
394
- //#endregion
395
- //#region ../../node_modules/.pnpm/@protobuf-ts+runtime@2.11.1/node_modules/@protobuf-ts/runtime/build/types/reflection-info.d.ts
396
- /**
397
- * Describes a protobuf enum for runtime reflection.
398
- *
399
- * The tuple consists of:
400
- *
401
- *
402
- * [0] the protobuf type name
403
- *
404
- * The type name follows the same rules as message type names.
405
- * See `MessageInfo` for details.
406
- *
407
- *
408
- * [1] the enum object generated by Typescript
409
- *
410
- * We generate standard Typescript enums for protobuf enums. They are compiled
411
- * to lookup objects that map from numerical value to name strings and vice
412
- * versa and can also contain alias names.
413
- *
414
- * See https://www.typescriptlang.org/docs/handbook/enums.html#reverse-mappings
415
- *
416
- * We use this lookup feature to when encoding / decoding JSON format. The
417
- * enum is guaranteed to have a value for 0. We generate an entry for 0 if
418
- * none was declared in .proto because we would need to support custom default
419
- * values if we didn't.
420
- *
421
- *
422
- * [2] the prefix shared by all original enum values (optional)
423
- *
424
- * If all values of a protobuf enum share a prefix, it is dropped in the
425
- * generated enum. For example, the protobuf enum `enum My { MY_FOO, MY_BAR }`
426
- * becomes the typescript enum `enum My { FOO, BAR }`.
427
- *
428
- * Because the JSON format requires the original value name, we store the
429
- * dropped prefix here, so that the JSON format implementation can restore
430
- * the original value names.
431
- */
432
- declare type EnumInfo = readonly [
433
- /**
434
- * The protobuf type name of the enum
435
- */
436
- string,
437
- /**
438
- * The enum object generated by Typescript
439
- */
440
- {
441
- [key: number]: string;
442
- [k: string]: number | string;
443
- },
444
- /**
445
- * The prefix shared by all original enum values
446
- */
447
- string?];
448
- /**
449
- * Describes a protobuf message for runtime reflection.
450
- */
451
- interface MessageInfo {
452
- /**
453
- * The protobuf type name of the message, including package and
454
- * parent types if present.
455
- *
456
- * If the .proto file included a `package` statement, the type name
457
- * starts with '.'.
458
- *
459
- * Examples:
460
- * 'MyNamespaceLessMessage'
461
- * '.my_package.MyMessage'
462
- * '.my_package.ParentMessage.ChildMessage'
463
- */
464
- readonly typeName: string;
465
- /**
466
- * Simple information for each message field, in the order
467
- * of declaration in the source .proto.
468
- */
469
- readonly fields: readonly FieldInfo[];
470
- /**
471
- * Contains custom message options from the .proto source in JSON format.
472
- */
473
- readonly options: {
474
- [extensionName: string]: JsonValue;
475
- };
476
- }
477
- /**
478
- * Describes a field of a protobuf message for runtime
479
- * reflection. We distinguish between the following
480
- * kinds of fields:
481
- *
482
- * "scalar": string, bool, float, int32, etc.
483
- * See https://developers.google.com/protocol-buffers/docs/proto3#scalar
484
- *
485
- * "enum": field was declared with an enum type.
486
- *
487
- * "message": field was declared with a message type.
488
- *
489
- * "map": field was declared with map<K,V>.
490
- *
491
- *
492
- * Every field, regardless of it's kind, always has the following properties:
493
- *
494
- * "no": The field number of the .proto field.
495
- * "name": The original name of the .proto field.
496
- * "localName": The name of the field as used in generated code.
497
- * "jsonName": The name for JSON serialization / deserialization.
498
- * "options": Custom field options from the .proto source in JSON format.
499
- *
500
- *
501
- * Other properties:
502
- *
503
- * - Fields of kind "scalar", "enum" and "message" can have a "repeat" type.
504
- * - Fields of kind "scalar" and "enum" can have a "repeat" type.
505
- * - Fields of kind "scalar", "enum" and "message" can be member of a "oneof".
506
- *
507
- * A field can be only have one of the above properties set.
508
- *
509
- * Options for "scalar" fields:
510
- *
511
- * - 64 bit integral types can provide "L" - the JavaScript representation
512
- * type.
513
- *
514
- */
515
- declare type FieldInfo = fiRules<fiScalar> | fiRules<fiEnum> | fiRules<fiMessage> | fiRules<fiMap>;
516
- interface fiShared {
517
- /**
518
- * The field number of the .proto field.
519
- */
520
- no: number;
521
- /**
522
- * The original name of the .proto field.
523
- */
524
- name: string;
525
- /**
526
- * The name of the field as used in generated code.
527
- */
528
- localName: string;
529
- /**
530
- * The name for JSON serialization / deserialization.
531
- */
532
- jsonName: string;
533
- /**
534
- * The name of the `oneof` group, if this field belongs to one.
535
- */
536
- oneof: string | undefined;
537
- /**
538
- * Contains custom field options from the .proto source in JSON format.
539
- */
540
- options?: {
541
- [extensionName: string]: JsonValue;
542
- };
543
- }
544
- interface fiScalar extends fiShared {
545
- kind: 'scalar';
546
- /**
547
- * Scalar type of the field.
548
- */
549
- T: ScalarType;
550
- /**
551
- * Representation of 64 bit integral types (int64, uint64, sint64,
552
- * fixed64, sfixed64).
553
- *
554
- * If this option is set for other scalar types, it is ignored.
555
- * Omitting this option is equivalent to `STRING`.
556
- */
557
- L?: LongType;
558
- /**
559
- * Is the field repeated?
560
- */
561
- repeat: RepeatType;
562
- /**
563
- * Is the field optional?
564
- */
565
- opt: boolean;
566
- }
567
- interface fiMessage extends fiShared {
568
- kind: 'message';
569
- /**
570
- * Message handler for the field.
571
- */
572
- T: () => IMessageType<any>;
573
- /**
574
- * Is the field repeated?
575
- */
576
- repeat: RepeatType;
577
- }
578
- interface fiEnum extends fiShared {
579
- kind: 'enum';
580
- /**
581
- * Enum type information for the field.
582
- */
583
- T: () => EnumInfo;
584
- /**
585
- * Is the field repeated?
586
- */
587
- repeat: RepeatType;
588
- /**
589
- * Is the field optional?
590
- */
591
- opt: boolean;
592
- }
593
- interface fiMap extends fiShared {
594
- kind: 'map';
595
- /**
596
- * Map key type.
597
- *
598
- * The key_type can be any integral or string type
599
- * (so, any scalar type except for floating point
600
- * types and bytes)
601
- */
602
- K: Exclude<ScalarType, ScalarType.FLOAT | ScalarType.DOUBLE | ScalarType.BYTES>;
603
- /**
604
- * Map value type. Can be a `ScalarType`, enum type information,
605
- * or type handler for a message.
606
- */
607
- V: {
608
- kind: 'scalar';
609
- T: ScalarType;
610
- L?: LongType;
611
- } | {
612
- kind: 'enum';
613
- T: () => EnumInfo;
614
- } | {
615
- kind: 'message';
616
- T: () => IMessageType<any>;
617
- };
618
- }
619
- declare type fiRules<T> = Omit<T, 'oneof' | 'repeat' | 'opt'> & ({
620
- repeat: RepeatType.NO;
621
- opt: false;
622
- oneof: undefined;
623
- } | {
624
- repeat: RepeatType.NO;
625
- opt: true;
626
- oneof: undefined;
627
- } | {
628
- repeat: RepeatType.PACKED | RepeatType.UNPACKED;
629
- opt: false;
630
- oneof: undefined;
631
- } | {
632
- repeat: RepeatType.NO;
633
- opt: false;
634
- oneof: string;
635
- });
636
- /**
637
- * Scalar value types. This is a subset of field types declared by protobuf
638
- * enum google.protobuf.FieldDescriptorProto.Type The types GROUP and MESSAGE
639
- * are omitted, but the numerical values are identical.
640
- */
641
- declare enum ScalarType {
642
- DOUBLE = 1,
643
- FLOAT = 2,
644
- INT64 = 3,
645
- UINT64 = 4,
646
- INT32 = 5,
647
- FIXED64 = 6,
648
- FIXED32 = 7,
649
- BOOL = 8,
650
- STRING = 9,
651
- BYTES = 12,
652
- UINT32 = 13,
653
- SFIXED32 = 15,
654
- SFIXED64 = 16,
655
- SINT32 = 17,
656
- SINT64 = 18,
657
- }
658
- /**
659
- * JavaScript representation of 64 bit integral types. Equivalent to the
660
- * field option "jstype".
661
- *
662
- * By default, protobuf-ts represents 64 bit types as `bigint`.
663
- *
664
- * You can change the default behaviour by enabling the plugin parameter
665
- * `long_type_string`, which will represent 64 bit types as `string`.
666
- *
667
- * Alternatively, you can change the behaviour for individual fields
668
- * with the field option "jstype":
669
- *
670
- * ```protobuf
671
- * uint64 my_field = 1 [jstype = JS_STRING];
672
- * uint64 other_field = 2 [jstype = JS_NUMBER];
673
- * ```
674
- */
675
- declare enum LongType {
676
- /**
677
- * Use JavaScript `bigint`.
678
- *
679
- * Field option `[jstype = JS_NORMAL]`.
680
- */
681
- BIGINT = 0,
682
- /**
683
- * Use JavaScript `string`.
684
- *
685
- * Field option `[jstype = JS_STRING]`.
686
- */
687
- STRING = 1,
688
- /**
689
- * Use JavaScript `number`.
690
- *
691
- * Large values will loose precision.
692
- *
693
- * Field option `[jstype = JS_NUMBER]`.
694
- */
695
- NUMBER = 2,
696
- }
697
- /**
698
- * Protobuf 2.1.0 introduced packed repeated fields.
699
- * Setting the field option `[packed = true]` enables packing.
700
- *
701
- * In proto3, all repeated fields are packed by default.
702
- * Setting the field option `[packed = false]` disables packing.
703
- *
704
- * Packed repeated fields are encoded with a single tag,
705
- * then a length-delimiter, then the element values.
706
- *
707
- * Unpacked repeated fields are encoded with a tag and
708
- * value for each element.
709
- *
710
- * `bytes` and `string` cannot be packed.
711
- */
712
- declare enum RepeatType {
713
- /**
714
- * The field is not repeated.
715
- */
716
- NO = 0,
717
- /**
718
- * The field is repeated and should be packed.
719
- * Invalid for `bytes` and `string`, they cannot be packed.
720
- */
721
- PACKED = 1,
722
- /**
723
- * The field is repeated but should not be packed.
724
- * The only valid repeat type for repeated `bytes` and `string`.
725
- */
726
- UNPACKED = 2,
727
- }
728
- //#endregion
729
- //#region ../../node_modules/.pnpm/@protobuf-ts+runtime@2.11.1/node_modules/@protobuf-ts/runtime/build/types/message-type-contract.d.ts
730
- /**
731
- * Similar to `Partial<T>`, but recursive, and keeps `oneof` groups
732
- * intact.
733
- */
734
- declare type PartialMessage<T extends object> = { [K in keyof T]?: PartialField<T[K]> };
735
- declare type PartialField<T> = T extends (Date | Uint8Array | bigint | boolean | string | number) ? T : T extends Array<infer U> ? Array<PartialField<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<PartialField<U>> : T extends {
736
- oneofKind: string;
737
- } ? T : T extends {
738
- oneofKind: undefined;
739
- } ? T : T extends object ? PartialMessage<T> : T;
740
- /**
741
- * A message type provides an API to work with messages of a specific type.
742
- * It also exposes reflection information that can be used to work with a
743
- * message of unknown type.
744
- */
745
- interface IMessageType<T extends object> extends MessageInfo {
746
- /**
747
- * The protobuf type name of the message, including package and
748
- * parent types if present.
749
- *
750
- * Examples:
751
- * 'MyNamespaceLessMessage'
752
- * 'my_package.MyMessage'
753
- * 'my_package.ParentMessage.ChildMessage'
754
- */
755
- readonly typeName: string;
756
- /**
757
- * Simple information for each message field, in the order
758
- * of declaration in the .proto.
759
- */
760
- readonly fields: readonly FieldInfo[];
761
- /**
762
- * Contains custom message options from the .proto source in JSON format.
763
- */
764
- readonly options: {
765
- [extensionName: string]: JsonValue;
766
- };
767
- /**
768
- * Contains the prototype for messages returned by create() which
769
- * includes the `MESSAGE_TYPE` symbol pointing back to `this`.
770
- */
771
- readonly messagePrototype?: Readonly<{}> | undefined;
772
- /**
773
- * Create a new message with default values.
774
- *
775
- * For example, a protobuf `string name = 1;` has the default value `""`.
776
- */
777
- create(): T;
778
- /**
779
- * Create a new message from partial data.
780
- *
781
- * Unknown fields are discarded.
782
- *
783
- * `PartialMessage<T>` is similar to `Partial<T>`,
784
- * but it is recursive, and it keeps `oneof` groups
785
- * intact.
786
- */
787
- create(value: PartialMessage<T>): T;
788
- /**
789
- * Create a new message from binary format.
790
- */
791
- fromBinary(data: Uint8Array, options?: Partial<BinaryReadOptions>): T;
792
- /**
793
- * Write the message to binary format.
794
- */
795
- toBinary(message: T, options?: Partial<BinaryWriteOptions>): Uint8Array;
796
- /**
797
- * Read a new message from a JSON value.
798
- */
799
- fromJson(json: JsonValue, options?: Partial<JsonReadOptions>): T;
800
- /**
801
- * Read a new message from a JSON string.
802
- * This is equivalent to `T.fromJson(JSON.parse(json))`.
803
- */
804
- fromJsonString(json: string, options?: Partial<JsonReadOptions>): T;
805
- /**
806
- * Convert the message to canonical JSON value.
807
- */
808
- toJson(message: T, options?: Partial<JsonWriteOptions>): JsonValue;
809
- /**
810
- * Convert the message to canonical JSON string.
811
- * This is equivalent to `JSON.stringify(T.toJson(t))`
812
- */
813
- toJsonString(message: T, options?: Partial<JsonWriteStringOptions>): string;
814
- /**
815
- * Clone the message.
816
- *
817
- * Unknown fields are discarded.
818
- */
819
- clone(message: T): T;
820
- /**
821
- * Copy partial data into the target message.
822
- *
823
- * If a singular scalar or enum field is present in the source, it
824
- * replaces the field in the target.
825
- *
826
- * If a singular message field is present in the source, it is merged
827
- * with the target field by calling mergePartial() of the responsible
828
- * message type.
829
- *
830
- * If a repeated field is present in the source, its values replace
831
- * all values in the target array, removing extraneous values.
832
- * Repeated message fields are copied, not merged.
833
- *
834
- * If a map field is present in the source, entries are added to the
835
- * target map, replacing entries with the same key. Entries that only
836
- * exist in the target remain. Entries with message values are copied,
837
- * not merged.
838
- *
839
- * Note that this function differs from protobuf merge semantics,
840
- * which appends repeated fields.
841
- */
842
- mergePartial(target: T, source: PartialMessage<T>): void;
843
- /**
844
- * Determines whether two message of the same type have the same field values.
845
- * Checks for deep equality, traversing repeated fields, oneof groups, maps
846
- * and messages recursively.
847
- * Will also return true if both messages are `undefined`.
848
- */
849
- equals(a: T | undefined, b: T | undefined): boolean;
850
- /**
851
- * Is the given value assignable to our message type
852
- * and contains no [excess properties](https://www.typescriptlang.org/docs/handbook/interfaces.html#excess-property-checks)?
853
- */
854
- is(arg: any, depth?: number): arg is T;
855
- /**
856
- * Is the given value assignable to our message type,
857
- * regardless of [excess properties](https://www.typescriptlang.org/docs/handbook/interfaces.html#excess-property-checks)?
858
- */
859
- isAssignable(arg: any, depth?: number): arg is T;
860
- /**
861
- * This is an internal method. If you just want to read a message from
862
- * JSON, use `fromJson()` or `fromJsonString()`.
863
- *
864
- * Reads JSON value and merges the fields into the target
865
- * according to protobuf rules. If the target is omitted,
866
- * a new instance is created first.
867
- */
868
- internalJsonRead(json: JsonValue, options: JsonReadOptions, target?: T): T;
869
- /**
870
- * This is an internal method. If you just want to write a message
871
- * to JSON, use `toJson()` or `toJsonString().
872
- *
873
- * Writes JSON value and returns it.
874
- */
875
- internalJsonWrite(message: T, options: JsonWriteOptions): JsonValue;
876
- /**
877
- * This is an internal method. If you just want to write a message
878
- * in binary format, use `toBinary()`.
879
- *
880
- * Serializes the message in binary format and appends it to the given
881
- * writer. Returns passed writer.
882
- */
883
- internalBinaryWrite(message: T, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
884
- /**
885
- * This is an internal method. If you just want to read a message from
886
- * binary data, use `fromBinary()`.
887
- *
888
- * Reads data from binary format and merges the fields into
889
- * the target according to protobuf rules. If the target is
890
- * omitted, a new instance is created first.
891
- */
892
- internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: T): T;
893
- }
894
- //#endregion
895
- //#region ../../node_modules/.pnpm/@protobuf-ts+runtime@2.11.1/node_modules/@protobuf-ts/runtime/build/types/json-format-contract.d.ts
896
- /**
897
- * Options for parsing JSON data.
898
- * All boolean options default to `false`.
899
- */
900
- interface JsonReadOptions {
901
- /**
902
- * Ignore unknown fields: Proto3 JSON parser should reject unknown fields
903
- * by default. This option ignores unknown fields in parsing, as well as
904
- * unrecognized enum string representations.
905
- */
906
- ignoreUnknownFields: boolean;
907
- /**
908
- * This option is required to read `google.protobuf.Any`
909
- * from JSON format.
910
- */
911
- typeRegistry?: readonly IMessageType<any>[];
912
- }
913
- /**
914
- * Options for serializing to JSON object.
915
- * All boolean options default to `false`.
916
- */
917
- interface JsonWriteOptions {
918
- /**
919
- * Emit fields with default values: Fields with default values are omitted
920
- * by default in proto3 JSON output. This option overrides this behavior
921
- * and outputs fields with their default values.
922
- */
923
- emitDefaultValues: boolean;
924
- /**
925
- * Emit enum values as integers instead of strings: The name of an enum
926
- * value is used by default in JSON output. An option may be provided to
927
- * use the numeric value of the enum value instead.
928
- */
929
- enumAsInteger: boolean;
930
- /**
931
- * Use proto field name instead of lowerCamelCase name: By default proto3
932
- * JSON printer should convert the field name to lowerCamelCase and use
933
- * that as the JSON name. An implementation may provide an option to use
934
- * proto field name as the JSON name instead. Proto3 JSON parsers are
935
- * required to accept both the converted lowerCamelCase name and the proto
936
- * field name.
937
- */
938
- useProtoFieldName: boolean;
939
- /**
940
- * This option is required to write `google.protobuf.Any`
941
- * to JSON format.
942
- */
943
- typeRegistry?: readonly IMessageType<any>[];
944
- }
945
- /**
946
- * Options for serializing to JSON string.
947
- * All options default to `false` or `0`.
948
- */
949
- interface JsonWriteStringOptions extends JsonWriteOptions {
950
- prettySpaces: number;
951
- }
952
- //#endregion
953
- //#region ../../node_modules/.pnpm/@protobuf-ts+runtime-rpc@2.11.1/node_modules/@protobuf-ts/runtime-rpc/build/types/reflection-info.d.ts
954
- /**
955
- * Describes a protobuf service for runtime reflection.
956
- */
957
- interface ServiceInfo {
958
- /**
959
- * The protobuf type name of the service, including package name if
960
- * present.
961
- */
962
- readonly typeName: string;
963
- /**
964
- * Information for each rpc method of the service, in the order of
965
- * declaration in the source .proto.
966
- */
967
- readonly methods: MethodInfo[];
968
- /**
969
- * Contains custom service options from the .proto source in JSON format.
970
- */
971
- readonly options: {
972
- [extensionName: string]: JsonValue;
973
- };
974
- }
975
- /**
976
- * Describes a protobuf service method for runtime reflection.
977
- */
978
- interface MethodInfo<I extends object = any, O extends object = any> {
979
- /**
980
- * The service this method belongs to.
981
- */
982
- readonly service: ServiceInfo;
983
- /**
984
- * The name of the method as declared in .proto
985
- */
986
- readonly name: string;
987
- /**
988
- * The name of the method in the runtime.
989
- */
990
- readonly localName: string;
991
- /**
992
- * The idempotency level as specified in .proto.
993
- *
994
- * For example, the following method declaration will set
995
- * `idempotency` to 'NO_SIDE_EFFECTS'.
996
- *
997
- * ```proto
998
- * rpc Foo (FooRequest) returns (FooResponse) {
999
- * option idempotency_level = NO_SIDE_EFFECTS
1000
- * }
1001
- * ```
1002
- *
1003
- * See `google/protobuf/descriptor.proto`, `MethodOptions`.
1004
- */
1005
- readonly idempotency: undefined | 'NO_SIDE_EFFECTS' | 'IDEMPOTENT';
1006
- /**
1007
- * Was the rpc declared with server streaming?
1008
- *
1009
- * Example declaration:
1010
- *
1011
- * ```proto
1012
- * rpc Foo (FooRequest) returns (stream FooResponse);
1013
- * ```
1014
- */
1015
- readonly serverStreaming: boolean;
1016
- /**
1017
- * Was the rpc declared with client streaming?
1018
- *
1019
- * Example declaration:
1020
- *
1021
- * ```proto
1022
- * rpc Foo (stream FooRequest) returns (FooResponse);
1023
- * ```
1024
- */
1025
- readonly clientStreaming: boolean;
1026
- /**
1027
- * The generated type handler for the input message.
1028
- * Provides methods to encode / decode binary or JSON format.
1029
- */
1030
- readonly I: IMessageType<I>;
1031
- /**
1032
- * The generated type handler for the output message.
1033
- * Provides methods to encode / decode binary or JSON format.
1034
- */
1035
- readonly O: IMessageType<O>;
1036
- /**
1037
- * Contains custom method options from the .proto source in JSON format.
1038
- */
1039
- readonly options: {
1040
- [extensionName: string]: JsonValue;
1041
- };
1042
- }
1043
- //#endregion
1044
- //#region ../../node_modules/.pnpm/@protobuf-ts+runtime-rpc@2.11.1/node_modules/@protobuf-ts/runtime-rpc/build/types/rpc-metadata.d.ts
1045
- /**
1046
- * RPC metadata provide optional additional information about a request or
1047
- * response.
1048
- *
1049
- * They can be transmitted at:
1050
- * - the start of a request (a.k.a. request headers)
1051
- * - the start of a response (a.k.a. response headers)
1052
- * - the end of a response (a.k.a. response trailers)
1053
- *
1054
- * Keys should only contain the characters a-z 0-9 _ . -
1055
- *
1056
- * Values can be US ASCII or binary. If a key ends with `-bin`, it contains
1057
- * binary data in base64 encoding.
1058
- *
1059
- * You can encode protobuf messages as binary metadata values, including
1060
- * `google.protobuf.Any`.
1061
- */
1062
- interface RpcMetadata {
1063
- [key: string]: string | string[];
1064
- }
1065
- //#endregion
1066
- //#region ../../node_modules/.pnpm/@protobuf-ts+runtime-rpc@2.11.1/node_modules/@protobuf-ts/runtime-rpc/build/types/rpc-status.d.ts
1067
- /**
1068
- * A RPC status consists of a code and a text message.
1069
- *
1070
- * The status is usually returned from the server as a response trailer,
1071
- * but a `RpcTransport` may also read the status from response headers.
1072
- */
1073
- interface RpcStatus {
1074
- /**
1075
- * A status code as a string. The value depends on the `RpcTransport` being
1076
- * used.
1077
- *
1078
- * For gRPC, it will be the string value of a StatusCode enum value
1079
- * https://github.com/grpc/grpc/blob/a19d8dcfb50caa81cddc25bc1a6afdd7a2f497b7/include/grpcpp/impl/codegen/status_code_enum.h#L24
1080
- *
1081
- * For Twirp, it will be one of the Twirp error codes as string:
1082
- * https://twitchtv.github.io/twirp/docs/spec_v5.html#error-codes
1083
- *
1084
- */
1085
- code: string;
1086
- /**
1087
- * A text message that may describe the condition.
1088
- */
1089
- detail: string;
1090
- }
1091
- //#endregion
1092
- //#region ../../node_modules/.pnpm/@protobuf-ts+runtime-rpc@2.11.1/node_modules/@protobuf-ts/runtime-rpc/build/types/rpc-call-shared.d.ts
1093
- interface RpcCallShared<I extends object, O extends object> {
1094
- /**
1095
- * Reflection information about this call.
1096
- */
1097
- readonly method: MethodInfo<I, O>;
1098
- /**
1099
- * Request headers being sent with the request.
1100
- *
1101
- * Request headers are provided in the `meta` property of the
1102
- * `RpcOptions` passed to a call.
1103
- */
1104
- readonly requestHeaders: Readonly<RpcMetadata>;
1105
- /**
1106
- * The response headers that the server sent.
1107
- *
1108
- * This promise will reject with a `RpcError` when the server sends an
1109
- * error status code.
1110
- */
1111
- readonly headers: Promise<RpcMetadata>;
1112
- /**
1113
- * The response status the server replied with.
1114
- *
1115
- * This promise will resolve when the server has finished the request
1116
- * successfully.
1117
- *
1118
- * If the server replies with an error status, this promise will
1119
- * reject with a `RpcError`.
1120
- */
1121
- readonly status: Promise<RpcStatus>;
1122
- /**
1123
- * The trailers the server attached to the response.
1124
- *
1125
- * This promise will resolve when the server has finished the request
1126
- * successfully.
1127
- *
1128
- * If the server replies with an error status, this promise will
1129
- * reject with a `RpcError`.
1130
- */
1131
- readonly trailers: Promise<RpcMetadata>;
1132
- }
1133
- //#endregion
1134
- //#region ../../node_modules/.pnpm/@protobuf-ts+runtime-rpc@2.11.1/node_modules/@protobuf-ts/runtime-rpc/build/types/rpc-output-stream.d.ts
1135
- /**
1136
- * A stream of response messages. Messages can be read from the stream via
1137
- * the AsyncIterable interface:
1138
- *
1139
- * ```typescript
1140
- * for await (let message of response) {...
1141
- * ```
1142
- *
1143
- * Some things to note:
1144
- * - If an error occurs, the `for await` will throw it.
1145
- * - If an error occurred before the `for await` was started, `for await`
1146
- * will re-throw it.
1147
- * - If the stream is already complete, the `for await` will be empty.
1148
- * - If your `for await` consumes slower than the stream produces,
1149
- * for example because you are relaying messages in a slow operation,
1150
- * messages are queued.
1151
- */
1152
- interface RpcOutputStream<T extends object = object> extends AsyncIterable<T> {
1153
- /**
1154
- * Add a callback for every new datum.
1155
- * If a new message arrived, the "message" argument is set.
1156
- * If an error occurred, the "error" argument is set.
1157
- * If the stream is complete, the "complete" argument is `true`.
1158
- * Only one of the arguments is used at a time.
1159
- */
1160
- onNext(callback: NextCallback<T>): RemoveListenerFn;
1161
- /**
1162
- * Add a callback for every new message.
1163
- */
1164
- onMessage(callback: MessageCallback<T>): RemoveListenerFn;
1165
- /**
1166
- * Add a callback for stream completion.
1167
- * Called only when all messages have been read without error.
1168
- * The stream is closed when this callback is called.
1169
- */
1170
- onComplete(callback: CompleteCallback): RemoveListenerFn;
1171
- /**
1172
- * Add a callback for errors.
1173
- * The stream is closed when this callback is called.
1174
- */
1175
- onError(callback: ErrorCallback): RemoveListenerFn;
1176
- }
1177
- declare type NextCallback<T extends object> = (message: T | undefined, error: Error | undefined, complete: boolean) => void;
1178
- declare type MessageCallback<T extends object> = (message: T) => void;
1179
- declare type CompleteCallback = () => void;
1180
- declare type ErrorCallback = (reason: Error) => void;
1181
- declare type RemoveListenerFn = () => void;
1182
- /**
1183
- * A `RpcOutputStream` that you control.
1184
- */
1185
- //#endregion
1186
- //#region ../../node_modules/.pnpm/@protobuf-ts+runtime-rpc@2.11.1/node_modules/@protobuf-ts/runtime-rpc/build/types/server-streaming-call.d.ts
1187
- /**
1188
- * A server streaming RPC call. The client provides exactly one input message
1189
- * but the server may respond with 0, 1, or more messages.
1190
- */
1191
- declare class ServerStreamingCall<I extends object = object, O extends object = object> implements RpcCallShared<I, O>, PromiseLike<FinishedServerStreamingCall<I, O>> {
1192
- /**
1193
- * Reflection information about this call.
1194
- */
1195
- readonly method: MethodInfo<I, O>;
1196
- /**
1197
- * Request headers being sent with the request.
1198
- *
1199
- * Request headers are provided in the `meta` property of the
1200
- * `RpcOptions` passed to a call.
1201
- */
1202
- readonly requestHeaders: Readonly<RpcMetadata>;
1203
- /**
1204
- * The request message being sent.
1205
- */
1206
- readonly request: Readonly<I>;
1207
- /**
1208
- * The response headers that the server sent.
1209
- *
1210
- * This promise will reject with a `RpcError` when the server sends a
1211
- * error status code.
1212
- */
1213
- readonly headers: Promise<RpcMetadata>;
1214
- /**
1215
- * Response messages from the server.
1216
- * This is an AsyncIterable that can be iterated with `await for .. of`.
1217
- */
1218
- readonly responses: RpcOutputStream<O>;
1219
- /**
1220
- * The response status the server replied with.
1221
- *
1222
- * This promise will resolve when the server has finished the request
1223
- * successfully.
1224
- *
1225
- * If the server replies with an error status, this promise will
1226
- * reject with a `RpcError`.
1227
- */
1228
- readonly status: Promise<RpcStatus>;
1229
- /**
1230
- * The trailers the server attached to the response.
1231
- *
1232
- * This promise will resolve when the server has finished the request
1233
- * successfully.
1234
- *
1235
- * If the server replies with an error status, this promise will
1236
- * reject with a `RpcError`.
1237
- */
1238
- readonly trailers: Promise<RpcMetadata>;
1239
- constructor(method: MethodInfo<I, O>, requestHeaders: Readonly<RpcMetadata>, request: Readonly<I>, headers: Promise<RpcMetadata>, response: RpcOutputStream<O>, status: Promise<RpcStatus>, trailers: Promise<RpcMetadata>);
1240
- /**
1241
- * Instead of awaiting the response status and trailers, you can
1242
- * just as well await this call itself to receive the server outcome.
1243
- * You should first setup some listeners to the `request` to
1244
- * see the actual messages the server replied with.
1245
- */
1246
- then<TResult1 = FinishedServerStreamingCall<I, O>, TResult2 = never>(onfulfilled?: ((value: FinishedServerStreamingCall<I, O>) => (PromiseLike<TResult1> | TResult1)) | undefined | null, onrejected?: ((reason: any) => (PromiseLike<TResult2> | TResult2)) | undefined | null): Promise<TResult1 | TResult2>;
1247
- private promiseFinished;
1248
- }
1249
- /**
1250
- * A completed server streaming RPC call. The server will not send any more
1251
- * messages.
1252
- */
1253
- interface FinishedServerStreamingCall<I extends object, O extends object> {
1254
- /**
1255
- * Reflection information about this call.
1256
- */
1257
- readonly method: MethodInfo<I, O>;
1258
- /**
1259
- * Request headers being sent with the request.
1260
- */
1261
- readonly requestHeaders: Readonly<RpcMetadata>;
1262
- /**
1263
- * The request message being sent.
1264
- */
1265
- readonly request: Readonly<I>;
1266
- /**
1267
- * The response headers that the server sent.
1268
- */
1269
- readonly headers: RpcMetadata;
1270
- /**
1271
- * The response status the server replied with.
1272
- * The status code will always be OK.
1273
- */
1274
- readonly status: RpcStatus;
1275
- /**
1276
- * The trailers the server attached to the response.
1277
- */
1278
- readonly trailers: RpcMetadata;
1279
- }
1280
- //#endregion
1281
- //#region ../../node_modules/.pnpm/@protobuf-ts+runtime-rpc@2.11.1/node_modules/@protobuf-ts/runtime-rpc/build/types/rpc-input-stream.d.ts
1282
- /**
1283
- * A stream of input messages.
1284
- */
1285
- interface RpcInputStream<T> {
1286
- /**
1287
- * Send a message down the stream.
1288
- * Only one message can be send at a time.
1289
- */
1290
- send(message: T): Promise<void>;
1291
- /**
1292
- * Complete / close the stream.
1293
- * Can only be called if there is no pending send().
1294
- * No send() should follow this call.
1295
- */
1296
- complete(): Promise<void>;
1297
- }
1298
- //#endregion
1299
- //#region ../../node_modules/.pnpm/@protobuf-ts+runtime-rpc@2.11.1/node_modules/@protobuf-ts/runtime-rpc/build/types/client-streaming-call.d.ts
1300
- /**
1301
- * A client streaming RPC call. This means that the clients sends 0, 1, or
1302
- * more messages to the server, and the server replies with exactly one
1303
- * message.
1304
- */
1305
- declare class ClientStreamingCall<I extends object = object, O extends object = object> implements RpcCallShared<I, O> {
1306
- /**
1307
- * Reflection information about this call.
1308
- */
1309
- readonly method: MethodInfo<I, O>;
1310
- /**
1311
- * Request headers being sent with the request.
1312
- *
1313
- * Request headers are provided in the `meta` property of the
1314
- * `RpcOptions` passed to a call.
1315
- */
1316
- readonly requestHeaders: Readonly<RpcMetadata>;
1317
- /**
1318
- * Request messages from the client.
1319
- */
1320
- readonly requests: RpcInputStream<I>;
1321
- /**
1322
- * The response headers that the server sent.
1323
- *
1324
- * This promise will reject with a `RpcError` when the server sends a
1325
- * error status code.
1326
- */
1327
- readonly headers: Promise<RpcMetadata>;
1328
- /**
1329
- * The message the server replied with.
1330
- */
1331
- readonly response: Promise<O>;
1332
- /**
1333
- * The response status the server replied with.
1334
- *
1335
- * This promise will resolve when the server has finished the request
1336
- * successfully.
1337
- *
1338
- * If the server replies with an error status, this promise will
1339
- * reject with a `RpcError`.
1340
- */
1341
- readonly status: Promise<RpcStatus>;
1342
- /**
1343
- * The trailers the server attached to the response.
1344
- *
1345
- * This promise will resolve when the server has finished the request
1346
- * successfully.
1347
- *
1348
- * If the server replies with an error status, this promise will
1349
- * reject with a `RpcError`.
1350
- */
1351
- readonly trailers: Promise<RpcMetadata>;
1352
- constructor(method: MethodInfo<I, O>, requestHeaders: Readonly<RpcMetadata>, request: RpcInputStream<I>, headers: Promise<RpcMetadata>, response: Promise<O>, status: Promise<RpcStatus>, trailers: Promise<RpcMetadata>);
1353
- /**
1354
- * Instead of awaiting the response status and trailers, you can
1355
- * just as well await this call itself to receive the server outcome.
1356
- * Note that it may still be valid to send more request messages.
1357
- */
1358
- then<TResult1 = FinishedClientStreamingCall<I, O>, TResult2 = never>(onfulfilled?: ((value: FinishedClientStreamingCall<I, O>) => (PromiseLike<TResult1> | TResult1)) | undefined | null, onrejected?: ((reason: any) => (PromiseLike<TResult2> | TResult2)) | undefined | null): Promise<TResult1 | TResult2>;
1359
- private promiseFinished;
1360
- }
1361
- /**
1362
- * A completed client streaming RPC call. The server will not send any more
1363
- * messages, but it may still be valid to send request messages.
1364
- */
1365
- interface FinishedClientStreamingCall<I extends object, O extends object> {
1366
- /**
1367
- * Reflection information about this call.
1368
- */
1369
- readonly method: MethodInfo<I, O>;
1370
- /**
1371
- * Request headers being sent with the request.
1372
- */
1373
- readonly requestHeaders: Readonly<RpcMetadata>;
1374
- /**
1375
- * The response headers that the server sent.
1376
- */
1377
- readonly headers: RpcMetadata;
1378
- /**
1379
- * The message the server replied with.
1380
- */
1381
- readonly response: O;
1382
- /**
1383
- * The response status the server replied with.
1384
- * The status code will always be OK.
1385
- */
1386
- readonly status: RpcStatus;
1387
- /**
1388
- * The trailers the server attached to the response.
1389
- */
1390
- readonly trailers: RpcMetadata;
1391
- }
1392
- //#endregion
1393
- //#region ../../node_modules/.pnpm/@protobuf-ts+runtime-rpc@2.11.1/node_modules/@protobuf-ts/runtime-rpc/build/types/duplex-streaming-call.d.ts
1394
- /**
1395
- * A duplex streaming RPC call. This means that the clients sends an
1396
- * arbitrary amount of messages to the server, while at the same time,
1397
- * the server sends an arbitrary amount of messages to the client.
1398
- */
1399
- declare class DuplexStreamingCall<I extends object = object, O extends object = object> implements RpcCallShared<I, O> {
1400
- /**
1401
- * Reflection information about this call.
1402
- */
1403
- readonly method: MethodInfo<I, O>;
1404
- /**
1405
- * Request headers being sent with the request.
1406
- *
1407
- * Request headers are provided in the `meta` property of the
1408
- * `RpcOptions` passed to a call.
1409
- */
1410
- readonly requestHeaders: Readonly<RpcMetadata>;
1411
- /**
1412
- * Request messages from the client.
1413
- */
1414
- readonly requests: RpcInputStream<I>;
1415
- /**
1416
- * The response headers that the server sent.
1417
- *
1418
- * This promise will reject with a `RpcError` when the server sends a
1419
- * error status code.
1420
- */
1421
- readonly headers: Promise<RpcMetadata>;
1422
- /**
1423
- * Response messages from the server.
1424
- */
1425
- readonly responses: RpcOutputStream<O>;
1426
- /**
1427
- * The response status the server replied with.
1428
- *
1429
- * This promise will resolve when the server has finished the request
1430
- * successfully.
1431
- *
1432
- * If the server replies with an error status, this promise will
1433
- * reject with a `RpcError`.
1434
- */
1435
- readonly status: Promise<RpcStatus>;
1436
- /**
1437
- * The trailers the server attached to the response.
1438
- *
1439
- * This promise will resolve when the server has finished the request
1440
- * successfully.
1441
- *
1442
- * If the server replies with an error status, this promise will
1443
- * reject with a `RpcError`.
1444
- */
1445
- readonly trailers: Promise<RpcMetadata>;
1446
- constructor(method: MethodInfo<I, O>, requestHeaders: Readonly<RpcMetadata>, request: RpcInputStream<I>, headers: Promise<RpcMetadata>, response: RpcOutputStream<O>, status: Promise<RpcStatus>, trailers: Promise<RpcMetadata>);
1447
- /**
1448
- * Instead of awaiting the response status and trailers, you can
1449
- * just as well await this call itself to receive the server outcome.
1450
- * Note that it may still be valid to send more request messages.
1451
- */
1452
- then<TResult1 = FinishedDuplexStreamingCall<I, O>, TResult2 = never>(onfulfilled?: ((value: FinishedDuplexStreamingCall<I, O>) => (PromiseLike<TResult1> | TResult1)) | undefined | null, onrejected?: ((reason: any) => (PromiseLike<TResult2> | TResult2)) | undefined | null): Promise<TResult1 | TResult2>;
1453
- private promiseFinished;
1454
- }
1455
- /**
1456
- * A completed duplex streaming RPC call. The server will not send any more
1457
- * messages, but it may still be valid to send request messages.
1458
- */
1459
- interface FinishedDuplexStreamingCall<I extends object, O extends object> {
1460
- /**
1461
- * Reflection information about this call.
1462
- */
1463
- readonly method: MethodInfo<I, O>;
1464
- /**
1465
- * Request headers being sent with the request.
1466
- */
1467
- readonly requestHeaders: Readonly<RpcMetadata>;
1468
- /**
1469
- * The response headers that the server sent.
1470
- */
1471
- readonly headers: RpcMetadata;
1472
- /**
1473
- * The response status the server replied with.
1474
- * The status code will always be OK.
1475
- */
1476
- readonly status: RpcStatus;
1477
- /**
1478
- * The trailers the server attached to the response.
1479
- */
1480
- readonly trailers: RpcMetadata;
1481
- }
1482
- //#endregion
1483
- //#region ../../node_modules/.pnpm/@protobuf-ts+runtime-rpc@2.11.1/node_modules/@protobuf-ts/runtime-rpc/build/types/unary-call.d.ts
1484
- /**
1485
- * A unary RPC call. Unary means there is exactly one input message and
1486
- * exactly one output message unless an error occurred.
1487
- */
1488
- declare class UnaryCall<I extends object = object, O extends object = object> implements RpcCallShared<I, O>, PromiseLike<FinishedUnaryCall<I, O>> {
1489
- /**
1490
- * Reflection information about this call.
1491
- */
1492
- readonly method: MethodInfo<I, O>;
1493
- /**
1494
- * Request headers being sent with the request.
1495
- *
1496
- * Request headers are provided in the `meta` property of the
1497
- * `RpcOptions` passed to a call.
1498
- */
1499
- readonly requestHeaders: Readonly<RpcMetadata>;
1500
- /**
1501
- * The request message being sent.
1502
- */
1503
- readonly request: Readonly<I>;
1504
- /**
1505
- * The response headers that the server sent.
1506
- *
1507
- * This promise will reject with a `RpcError` when the server sends an
1508
- * error status code.
1509
- */
1510
- readonly headers: Promise<RpcMetadata>;
1511
- /**
1512
- * The message the server replied with.
1513
- *
1514
- * If the server does not send a message, this promise will reject with a
1515
- * `RpcError`.
1516
- */
1517
- readonly response: Promise<O>;
1518
- /**
1519
- * The response status the server replied with.
1520
- *
1521
- * This promise will resolve when the server has finished the request
1522
- * successfully.
1523
- *
1524
- * If the server replies with an error status, this promise will
1525
- * reject with a `RpcError`.
1526
- */
1527
- readonly status: Promise<RpcStatus>;
1528
- /**
1529
- * The trailers the server attached to the response.
1530
- *
1531
- * This promise will resolve when the server has finished the request
1532
- * successfully.
1533
- *
1534
- * If the server replies with an error status, this promise will
1535
- * reject with a `RpcError`.
1536
- */
1537
- readonly trailers: Promise<RpcMetadata>;
1538
- constructor(method: MethodInfo<I, O>, requestHeaders: RpcMetadata, request: I, headers: Promise<RpcMetadata>, response: Promise<O>, status: Promise<RpcStatus>, trailers: Promise<RpcMetadata>);
1539
- /**
1540
- * If you are only interested in the final outcome of this call,
1541
- * you can await it to receive a `FinishedUnaryCall`.
1542
- */
1543
- then<TResult1 = FinishedUnaryCall<I, O>, TResult2 = never>(onfulfilled?: ((value: FinishedUnaryCall<I, O>) => (PromiseLike<TResult1> | TResult1)) | undefined | null, onrejected?: ((reason: any) => (PromiseLike<TResult2> | TResult2)) | undefined | null): Promise<TResult1 | TResult2>;
1544
- private promiseFinished;
1545
- }
1546
- /**
1547
- * A completed unary RPC call. This will only exists if the RPC was
1548
- * successful.
1549
- */
1550
- interface FinishedUnaryCall<I extends object, O extends object> {
1551
- /**
1552
- * Reflection information about this call.
1553
- */
1554
- readonly method: MethodInfo<I, O>;
1555
- /**
1556
- * Request headers being sent with the request.
1557
- */
1558
- readonly requestHeaders: Readonly<RpcMetadata>;
1559
- /**
1560
- * The request message that has been sent.
1561
- */
1562
- readonly request: Readonly<I>;
1563
- /**
1564
- * The response headers that the server sent.
1565
- */
1566
- readonly headers: RpcMetadata;
1567
- /**
1568
- * The message the server replied with.
1569
- */
1570
- readonly response: O;
1571
- /**
1572
- * The response status the server replied with.
1573
- * The status code will always be OK.
1574
- */
1575
- readonly status: RpcStatus;
1576
- /**
1577
- * The trailers the server attached to the response.
1578
- */
1579
- readonly trailers: RpcMetadata;
1580
- }
1581
- //#endregion
1582
- //#region ../../node_modules/.pnpm/@protobuf-ts+runtime-rpc@2.11.1/node_modules/@protobuf-ts/runtime-rpc/build/types/rpc-transport.d.ts
1583
- /**
1584
- * A `RpcTransport` executes Remote Procedure Calls defined by a protobuf
1585
- * service.
1586
- *
1587
- * This interface is the contract between a generated service client and
1588
- * some wire protocol like grpc, grpc-web, Twirp or other.
1589
- *
1590
- * The transport receives reflection information about the service and
1591
- * method being called.
1592
- *
1593
- * Some rules:
1594
- *
1595
- * a) An implementation **should** accept default `RpcOptions` (or an
1596
- * interface that extends `RpcOptions`) in the constructor.
1597
- *
1598
- * b) An implementation **must** merge the options given to `mergeOptions()`
1599
- * with its default options. If no extra options are implemented, or only
1600
- * primitive option values are used, using `mergeRpcOptions()` will
1601
- * produce the required behaviour.
1602
- *
1603
- * c) An implementation **must** pass `RpcOptions.jsonOptions` and
1604
- * `RpcOptions.binaryOptions` to the `fromBinary`, `toBinary`, `fromJson`
1605
- * and `toJson` methods when preparing a request or parsing a response.
1606
- *
1607
- * d) An implementation may support arbitrary other options, but they **must
1608
- * not** interfere with options keys of the binary or JSON options.
1609
- */
1610
- interface RpcTransport {
1611
- /**
1612
- * Merge call options with default options.
1613
- * Generated service clients will call this method with the users'
1614
- * call options and pass the result to the execute-method below.
1615
- */
1616
- mergeOptions(options?: Partial<RpcOptions>): RpcOptions;
1617
- /**
1618
- * Execute an unary RPC.
1619
- */
1620
- unary<I extends object, O extends object>(method: MethodInfo<I, O>, input: I, options: RpcOptions): UnaryCall<I, O>;
1621
- /**
1622
- * Execute a server streaming RPC.
1623
- */
1624
- serverStreaming<I extends object, O extends object>(method: MethodInfo<I, O>, input: I, options: RpcOptions): ServerStreamingCall<I, O>;
1625
- /**
1626
- * Execute a client streaming RPC.
1627
- */
1628
- clientStreaming<I extends object, O extends object>(method: MethodInfo<I, O>, options: RpcOptions): ClientStreamingCall<I, O>;
1629
- /**
1630
- * Execute a duplex streaming RPC.
1631
- */
1632
- duplex<I extends object, O extends object>(method: MethodInfo<I, O>, options: RpcOptions): DuplexStreamingCall<I, O>;
1633
- }
1634
- //#endregion
1635
- //#region ../../node_modules/.pnpm/@protobuf-ts+runtime-rpc@2.11.1/node_modules/@protobuf-ts/runtime-rpc/build/types/rpc-interceptor.d.ts
1636
- /**
1637
- * Interceptors can be used to manipulate request and response data.
1638
- *
1639
- * They are commonly used to add authentication metadata, log requests
1640
- * or implement client side caching.
1641
- *
1642
- * Interceptors are stacked. Call next() to invoke the next interceptor
1643
- * on the stack. To manipulate the request, change the data passed to
1644
- * next(). To manipulate a response, change the data returned by next().
1645
- *
1646
- * The following example adds an 'Authorization' header to unary calls:
1647
- *
1648
- * ```typescript
1649
- * interceptUnary(next, method, input, options): UnaryCall {
1650
- * if (!options.meta) {
1651
- * options.meta = {};
1652
- * }
1653
- * options.meta['Authorization'] = 'xxx';
1654
- * return next(method, input, options);
1655
- * }
1656
- * ```
1657
- *
1658
- * The following example intercepts server streaming calls. Every
1659
- * message that the server sends is emitted twice to the client:
1660
- *
1661
- * ```typescript
1662
- * interceptServerStreaming(next, method, input, options) {
1663
- * let original = next(method, input, options);
1664
- * let response = new RpcOutputStreamController();
1665
- * original.response.onNext((message, error, done) => {
1666
- * if (message) {
1667
- * response.notifyMessage(message);
1668
- * response.notifyMessage(message);
1669
- * }
1670
- * if (error)
1671
- * response.notifyError(error);
1672
- * if (done)
1673
- * response.notifyComplete();
1674
- * });
1675
- * return new ServerStreamingCall(
1676
- * original.method,
1677
- * original.requestHeaders,
1678
- * original.request,
1679
- * original.headers,
1680
- * response,
1681
- * original.status,
1682
- * original.trailers
1683
- * );
1684
- * }
1685
- * ```
1686
- *
1687
- */
1688
- interface RpcInterceptor {
1689
- interceptUnary?(next: NextUnaryFn, method: MethodInfo, input: object, options: RpcOptions): UnaryCall;
1690
- interceptServerStreaming?(next: NextServerStreamingFn, method: MethodInfo, input: object, options: RpcOptions): ServerStreamingCall;
1691
- interceptClientStreaming?(next: NextClientStreamingFn, method: MethodInfo, options: RpcOptions): ClientStreamingCall;
1692
- interceptDuplex?(next: NextDuplexStreamingFn, method: MethodInfo, options: RpcOptions): DuplexStreamingCall;
1693
- }
1694
- /**
1695
- * Invokes the next interceptor on the stack and returns its result.
1696
- */
1697
- declare type NextUnaryFn = (method: MethodInfo, input: object, options: RpcOptions) => UnaryCall;
1698
- /**
1699
- * Invokes the next interceptor on the stack and returns its result.
1700
- */
1701
- declare type NextServerStreamingFn = (method: MethodInfo, input: object, options: RpcOptions) => ServerStreamingCall;
1702
- /**
1703
- * Invokes the next interceptor on the stack and returns its result.
1704
- */
1705
- declare type NextClientStreamingFn = (method: MethodInfo, options: RpcOptions) => ClientStreamingCall;
1706
- /**
1707
- * Invokes the next interceptor on the stack and returns its result.
1708
- */
1709
- declare type NextDuplexStreamingFn = (method: MethodInfo, options: RpcOptions) => DuplexStreamingCall;
1710
- //#endregion
1711
- //#region ../../node_modules/.pnpm/@protobuf-ts+runtime-rpc@2.11.1/node_modules/@protobuf-ts/runtime-rpc/build/types/rpc-options.d.ts
1712
- /**
1713
- * User-provided options for Remote Procedure Calls.
1714
- *
1715
- * Every generated service method accepts these options.
1716
- * They are passed on to the `RpcTransport` and can be evaluated there.
1717
- */
1718
- interface RpcOptions {
1719
- /**
1720
- * Meta data for the call.
1721
- *
1722
- * RPC meta data are simple key-value pairs that usually translate
1723
- * directly to HTTP request headers.
1724
- *
1725
- * If a key ends with `-bin`, it should contain binary data in base64
1726
- * encoding, allowing you to send serialized messages.
1727
- */
1728
- meta?: RpcMetadata;
1729
- /**
1730
- * Timeout for the call in milliseconds.
1731
- * If a Date object is given, it is used as a deadline.
1732
- */
1733
- timeout?: number | Date;
1734
- /**
1735
- * Interceptors can be used to manipulate request and response data.
1736
- * The most common use case is adding a "Authorization" header.
1737
- */
1738
- interceptors?: RpcInterceptor[];
1739
- /**
1740
- * Options for the JSON wire format.
1741
- *
1742
- * To send or receive `google.protobuf.Any` in JSON format, you must
1743
- * provide `jsonOptions.typeRegistry` so that the runtime can discriminate
1744
- * the packed type.
1745
- */
1746
- jsonOptions?: Partial<JsonReadOptions & JsonWriteOptions>;
1747
- /**
1748
- * Options for the binary wire format.
1749
- */
1750
- binaryOptions?: Partial<BinaryReadOptions & BinaryWriteOptions>;
1751
- /**
1752
- * A signal to cancel a call. Can be created with an [AbortController](https://developer.mozilla.org/en-US/docs/Web/API/AbortController).
1753
- * The npm package `abort-controller` provides a polyfill for Node.js.
1754
- */
1755
- abort?: AbortSignal;
1756
- /**
1757
- * A `RpcTransport` implementation may allow arbitrary
1758
- * other options.
1759
- */
1760
- [extra: string]: unknown;
1761
- }
1762
- //#endregion
1763
- //#region src/client/base/GrpcWebRpcTransport.d.ts
1764
- /**
1765
- * GrpcWebRpcTransport provides a simple wrapper around GrpcWebFetchTransport
1766
- * from @protobuf-ts/grpcweb-transport for use with protobuf-ts generated clients.
1767
- *
1768
- * This transport works in browser, Node.js, and React Native environments.
1769
- */
1770
- declare class GrpcWebRpcTransport implements RpcTransport {
1771
- private transport;
1772
- constructor(baseUrl: string, options?: {
1773
- fetch?: typeof fetch;
1774
- headers?: Record<string, string>;
1775
- timeout?: number;
1776
- credentials?: RequestCredentials;
1777
- });
1778
- mergeOptions(options?: Partial<RpcOptions>): RpcOptions;
1779
- unary<I extends object, O extends object>(method: MethodInfo<I, O>, input: I, options: RpcOptions): UnaryCall<I, O>;
1780
- serverStreaming<I extends object, O extends object>(method: MethodInfo<I, O>, input: I, options: RpcOptions): ServerStreamingCall<I, O>;
1781
- clientStreaming<I extends object, O extends object>(method: MethodInfo<I, O>, options: RpcOptions): ClientStreamingCall<I, O>;
1782
- duplex<I extends object, O extends object>(method: MethodInfo<I, O>, options: RpcOptions): DuplexStreamingCall<I, O>;
1783
- }
1784
- //#endregion
1785
- //#region src/client/base/BaseGrpcConsumer.d.ts
1786
- /**
1787
- * BaseGrpcConsumer provides base functionality for all gRPC consumers.
1788
- * It uses the GrpcWebRpcTransport with GrpcWebFetchTransport from @protobuf-ts/grpcweb-transport.
1789
- */
1790
- declare class BaseGrpcConsumer {
1791
- protected transport: GrpcWebRpcTransport;
1792
- protected module: string;
1793
- protected metadata?: Record<string, string>;
1794
- protected endpoint: string;
1795
- constructor(endpoint: string);
1796
- setMetadata(map: Record<string, string>): this;
1797
- clearMetadata(): void;
1798
- getTransport(): GrpcWebRpcTransport;
1799
- /**
1800
- * Builds RpcOptions with metadata
1801
- */
1802
- protected getRpcOptions(): RpcOptions;
1803
- /**
1804
- * Retry a gRPC call with exponential backoff
1805
- */
1806
- protected retry<TResponse>(grpcCall: () => Promise<TResponse>, retries?: number, delay?: number): Promise<TResponse>;
1807
- /**
1808
- * Extracts the ABCI error code from a gRPC error message.
1809
- * Chain errors contain patterns like: {key:"ABCICode" value:"100"}
1810
- */
1811
- private getABCICodeFromMessage;
1812
- /**
1813
- * Extracts the codespace/module from a gRPC error message.
1814
- * Chain errors contain patterns like: {key:"Codespace" value:"exchange"}
1815
- */
1816
- private getCodespaceFromMessage;
1817
- /**
1818
- * Centralized error handler for gRPC calls.
1819
- * When the error contains chain error details (ABCI code and codespace),
1820
- * throws a TransactionException which will map the error to a user-friendly message.
1821
- * Otherwise throws a GrpcUnaryRequestException for generic gRPC errors.
1822
- */
1823
- protected handleGrpcError(e: unknown, context: string): never;
1824
- /**
1825
- * Generic wrapper for gRPC calls with retry and error handling
1826
- * Simplifies the common pattern of: retry -> await response -> handle errors
1827
- *
1828
- * Usage with explicit type parameter:
1829
- * ```typescript
1830
- * const response = await this.executeGrpcCall<QueryParamsRequest, QueryParamsResponse>(
1831
- * request,
1832
- * this.client.params.bind(this.client),
1833
- * )
1834
- * ```
1835
- * @template TRequest - The request message type
1836
- * @template TResponse - The response message type
1837
- */
1838
- protected executeGrpcCall<TRequest extends object = object, TResponse extends object = object>(request: TRequest, clientMethod: (req: TRequest, options?: RpcOptions) => UnaryCall<TRequest, TResponse>): Promise<TResponse>;
1839
- }
1840
- //#endregion
1841
- export { DuplexStreamingCall as a, MethodInfo as c, UnaryCall as i, RpcOptions as n, ClientStreamingCall as o, RpcTransport as r, ServerStreamingCall as s, BaseGrpcConsumer as t };