starpc 0.31.13 → 0.31.14

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.
@@ -1,5 +1,5 @@
1
- import type { MessageType } from "@aptre/protobuf-es-lite";
2
- import { Message } from "@aptre/protobuf-es-lite";
1
+ import type { MessageType } from '@aptre/protobuf-es-lite';
2
+ import { Message } from '@aptre/protobuf-es-lite';
3
3
  export declare const protobufPackage = "e2e.mock";
4
4
  /**
5
5
  * MockMsg is the mock message body.
@@ -1,12 +1,13 @@
1
1
  // @generated by protoc-gen-es-lite unknown with parameter "target=ts,ts_nocheck=false"
2
2
  // @generated from file github.com/aperturerobotics/starpc/e2e/mock/mock.proto (package e2e.mock, syntax proto3)
3
3
  /* eslint-disable */
4
- import { createMessageType } from "@aptre/protobuf-es-lite";
5
- export const protobufPackage = "e2e.mock";
4
+ import { createMessageType, ScalarType } from '@aptre/protobuf-es-lite';
5
+ export const protobufPackage = 'e2e.mock';
6
+ // MockMsg contains the message type declaration for MockMsg.
6
7
  export const MockMsg = createMessageType({
7
- typeName: "e2e.mock.MockMsg",
8
+ typeName: 'e2e.mock.MockMsg',
8
9
  fields: [
9
- { no: 1, name: "body", kind: "scalar", T: 9 /* ScalarType.STRING */ },
10
+ { no: 1, name: 'body', kind: 'scalar', T: ScalarType.STRING },
10
11
  ],
11
12
  packedByDefault: true,
12
13
  });
@@ -1,5 +1,5 @@
1
- import type { MessageType } from "@aptre/protobuf-es-lite";
2
- import { Message } from "@aptre/protobuf-es-lite";
1
+ import type { MessageType } from '@aptre/protobuf-es-lite';
2
+ import { Message } from '@aptre/protobuf-es-lite';
3
3
  export declare const protobufPackage = "echo";
4
4
  /**
5
5
  * EchoMsg is the message body for Echo.
@@ -1,12 +1,13 @@
1
1
  // @generated by protoc-gen-es-lite unknown with parameter "target=ts,ts_nocheck=false"
2
2
  // @generated from file github.com/aperturerobotics/starpc/echo/echo.proto (package echo, syntax proto3)
3
3
  /* eslint-disable */
4
- import { createMessageType } from "@aptre/protobuf-es-lite";
5
- export const protobufPackage = "echo";
4
+ import { createMessageType, ScalarType } from '@aptre/protobuf-es-lite';
5
+ export const protobufPackage = 'echo';
6
+ // EchoMsg contains the message type declaration for EchoMsg.
6
7
  export const EchoMsg = createMessageType({
7
- typeName: "echo.EchoMsg",
8
+ typeName: 'echo.EchoMsg',
8
9
  fields: [
9
- { no: 1, name: "body", kind: "scalar", T: 9 /* ScalarType.STRING */ },
10
+ { no: 1, name: 'body', kind: 'scalar', T: ScalarType.STRING },
10
11
  ],
11
12
  packedByDefault: true,
12
13
  });
@@ -1,5 +1,5 @@
1
- import type { MessageType } from "@aptre/protobuf-es-lite";
2
- import { Message } from "@aptre/protobuf-es-lite";
1
+ import type { MessageType } from '@aptre/protobuf-es-lite';
2
+ import { Message } from '@aptre/protobuf-es-lite';
3
3
  export declare const protobufPackage = "rpcstream";
4
4
  /**
5
5
  * RpcStreamInit is the first message in a RPC stream.
@@ -49,7 +49,7 @@ export type RpcStreamPacket = Message<{
49
49
  * @generated from field: rpcstream.RpcStreamInit init = 1;
50
50
  */
51
51
  value: RpcStreamInit;
52
- case: "init";
52
+ case: 'init';
53
53
  } | {
54
54
  /**
55
55
  * Ack is sent in response to Init.
@@ -58,7 +58,7 @@ export type RpcStreamPacket = Message<{
58
58
  * @generated from field: rpcstream.RpcAck ack = 2;
59
59
  */
60
60
  value: RpcAck;
61
- case: "ack";
61
+ case: 'ack';
62
62
  } | {
63
63
  /**
64
64
  * Data is the encapsulated data packet.
@@ -66,7 +66,7 @@ export type RpcStreamPacket = Message<{
66
66
  * @generated from field: bytes data = 3;
67
67
  */
68
68
  value: Uint8Array;
69
- case: "data";
69
+ case: 'data';
70
70
  };
71
71
  }>;
72
72
  export declare const RpcStreamPacket: MessageType<RpcStreamPacket>;
@@ -1,28 +1,37 @@
1
1
  // @generated by protoc-gen-es-lite unknown with parameter "target=ts,ts_nocheck=false"
2
2
  // @generated from file github.com/aperturerobotics/starpc/rpcstream/rpcstream.proto (package rpcstream, syntax proto3)
3
3
  /* eslint-disable */
4
- import { createMessageType } from "@aptre/protobuf-es-lite";
5
- export const protobufPackage = "rpcstream";
4
+ import { createMessageType, ScalarType } from '@aptre/protobuf-es-lite';
5
+ export const protobufPackage = 'rpcstream';
6
+ // RpcStreamInit contains the message type declaration for RpcStreamInit.
6
7
  export const RpcStreamInit = createMessageType({
7
- typeName: "rpcstream.RpcStreamInit",
8
+ typeName: 'rpcstream.RpcStreamInit',
8
9
  fields: [
9
- { no: 1, name: "component_id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
10
+ { no: 1, name: 'component_id', kind: 'scalar', T: ScalarType.STRING },
10
11
  ],
11
12
  packedByDefault: true,
12
13
  });
14
+ // RpcAck contains the message type declaration for RpcAck.
13
15
  export const RpcAck = createMessageType({
14
- typeName: "rpcstream.RpcAck",
16
+ typeName: 'rpcstream.RpcAck',
15
17
  fields: [
16
- { no: 1, name: "error", kind: "scalar", T: 9 /* ScalarType.STRING */ },
18
+ { no: 1, name: 'error', kind: 'scalar', T: ScalarType.STRING },
17
19
  ],
18
20
  packedByDefault: true,
19
21
  });
22
+ // RpcStreamPacket contains the message type declaration for RpcStreamPacket.
20
23
  export const RpcStreamPacket = createMessageType({
21
- typeName: "rpcstream.RpcStreamPacket",
24
+ typeName: 'rpcstream.RpcStreamPacket',
22
25
  fields: [
23
- { no: 1, name: "init", kind: "message", T: () => RpcStreamInit, oneof: "body" },
24
- { no: 2, name: "ack", kind: "message", T: () => RpcAck, oneof: "body" },
25
- { no: 3, name: "data", kind: "scalar", T: 12 /* ScalarType.BYTES */, oneof: "body" },
26
+ {
27
+ no: 1,
28
+ name: 'init',
29
+ kind: 'message',
30
+ T: () => RpcStreamInit,
31
+ oneof: 'body',
32
+ },
33
+ { no: 2, name: 'ack', kind: 'message', T: () => RpcAck, oneof: 'body' },
34
+ { no: 3, name: 'data', kind: 'scalar', T: ScalarType.BYTES, oneof: 'body' },
26
35
  ],
27
36
  packedByDefault: true,
28
37
  });
@@ -1,5 +1,5 @@
1
- import type { MessageType } from "@aptre/protobuf-es-lite";
2
- import { Message } from "@aptre/protobuf-es-lite";
1
+ import type { MessageType } from '@aptre/protobuf-es-lite';
2
+ import { Message } from '@aptre/protobuf-es-lite';
3
3
  export declare const protobufPackage = "srpc";
4
4
  /**
5
5
  * CallStart requests starting a new RPC call.
@@ -90,7 +90,7 @@ export type Packet = Message<{
90
90
  * @generated from field: srpc.CallStart call_start = 1;
91
91
  */
92
92
  value: CallStart;
93
- case: "callStart";
93
+ case: 'callStart';
94
94
  } | {
95
95
  /**
96
96
  * CallData is a message in a streaming RPC sequence.
@@ -98,7 +98,7 @@ export type Packet = Message<{
98
98
  * @generated from field: srpc.CallData call_data = 2;
99
99
  */
100
100
  value: CallData;
101
- case: "callData";
101
+ case: 'callData';
102
102
  } | {
103
103
  /**
104
104
  * CallCancel cancels the call.
@@ -106,7 +106,7 @@ export type Packet = Message<{
106
106
  * @generated from field: bool call_cancel = 3;
107
107
  */
108
108
  value: boolean;
109
- case: "callCancel";
109
+ case: 'callCancel';
110
110
  };
111
111
  }>;
112
112
  export declare const Packet: MessageType<Packet>;
@@ -1,34 +1,55 @@
1
1
  // @generated by protoc-gen-es-lite unknown with parameter "target=ts,ts_nocheck=false"
2
2
  // @generated from file github.com/aperturerobotics/starpc/srpc/rpcproto.proto (package srpc, syntax proto3)
3
3
  /* eslint-disable */
4
- import { createMessageType } from "@aptre/protobuf-es-lite";
5
- export const protobufPackage = "srpc";
4
+ import { createMessageType, ScalarType } from '@aptre/protobuf-es-lite';
5
+ export const protobufPackage = 'srpc';
6
+ // CallStart contains the message type declaration for CallStart.
6
7
  export const CallStart = createMessageType({
7
- typeName: "srpc.CallStart",
8
+ typeName: 'srpc.CallStart',
8
9
  fields: [
9
- { no: 1, name: "rpc_service", kind: "scalar", T: 9 /* ScalarType.STRING */ },
10
- { no: 2, name: "rpc_method", kind: "scalar", T: 9 /* ScalarType.STRING */ },
11
- { no: 3, name: "data", kind: "scalar", T: 12 /* ScalarType.BYTES */ },
12
- { no: 4, name: "data_is_zero", kind: "scalar", T: 8 /* ScalarType.BOOL */ },
10
+ { no: 1, name: 'rpc_service', kind: 'scalar', T: ScalarType.STRING },
11
+ { no: 2, name: 'rpc_method', kind: 'scalar', T: ScalarType.STRING },
12
+ { no: 3, name: 'data', kind: 'scalar', T: ScalarType.BYTES },
13
+ { no: 4, name: 'data_is_zero', kind: 'scalar', T: ScalarType.BOOL },
13
14
  ],
14
15
  packedByDefault: true,
15
16
  });
17
+ // CallData contains the message type declaration for CallData.
16
18
  export const CallData = createMessageType({
17
- typeName: "srpc.CallData",
19
+ typeName: 'srpc.CallData',
18
20
  fields: [
19
- { no: 1, name: "data", kind: "scalar", T: 12 /* ScalarType.BYTES */ },
20
- { no: 2, name: "data_is_zero", kind: "scalar", T: 8 /* ScalarType.BOOL */ },
21
- { no: 3, name: "complete", kind: "scalar", T: 8 /* ScalarType.BOOL */ },
22
- { no: 4, name: "error", kind: "scalar", T: 9 /* ScalarType.STRING */ },
21
+ { no: 1, name: 'data', kind: 'scalar', T: ScalarType.BYTES },
22
+ { no: 2, name: 'data_is_zero', kind: 'scalar', T: ScalarType.BOOL },
23
+ { no: 3, name: 'complete', kind: 'scalar', T: ScalarType.BOOL },
24
+ { no: 4, name: 'error', kind: 'scalar', T: ScalarType.STRING },
23
25
  ],
24
26
  packedByDefault: true,
25
27
  });
28
+ // Packet contains the message type declaration for Packet.
26
29
  export const Packet = createMessageType({
27
- typeName: "srpc.Packet",
30
+ typeName: 'srpc.Packet',
28
31
  fields: [
29
- { no: 1, name: "call_start", kind: "message", T: () => CallStart, oneof: "body" },
30
- { no: 2, name: "call_data", kind: "message", T: () => CallData, oneof: "body" },
31
- { no: 3, name: "call_cancel", kind: "scalar", T: 8 /* ScalarType.BOOL */, oneof: "body" },
32
+ {
33
+ no: 1,
34
+ name: 'call_start',
35
+ kind: 'message',
36
+ T: () => CallStart,
37
+ oneof: 'body',
38
+ },
39
+ {
40
+ no: 2,
41
+ name: 'call_data',
42
+ kind: 'message',
43
+ T: () => CallData,
44
+ oneof: 'body',
45
+ },
46
+ {
47
+ no: 3,
48
+ name: 'call_cancel',
49
+ kind: 'scalar',
50
+ T: ScalarType.BOOL,
51
+ oneof: 'body',
52
+ },
32
53
  ],
33
54
  packedByDefault: true,
34
55
  });
@@ -2,10 +2,10 @@
2
2
  // @generated from file github.com/aperturerobotics/starpc/e2e/mock/mock.proto (package e2e.mock, syntax proto3)
3
3
  /* eslint-disable */
4
4
 
5
- import type { MessageType, PartialFieldInfo } from "@aptre/protobuf-es-lite";
6
- import { createMessageType, Message } from "@aptre/protobuf-es-lite";
5
+ import type { MessageType, PartialFieldInfo } from '@aptre/protobuf-es-lite'
6
+ import { createMessageType, Message, ScalarType } from '@aptre/protobuf-es-lite'
7
7
 
8
- export const protobufPackage = "e2e.mock";
8
+ export const protobufPackage = 'e2e.mock'
9
9
 
10
10
  /**
11
11
  * MockMsg is the mock message body.
@@ -16,17 +16,14 @@ export type MockMsg = Message<{
16
16
  /**
17
17
  * @generated from field: string body = 1;
18
18
  */
19
- body?: string;
20
-
21
- }>;
22
-
23
- export const MockMsg: MessageType<MockMsg> = createMessageType(
24
- {
25
- typeName: "e2e.mock.MockMsg",
26
- fields: [
27
- { no: 1, name: "body", kind: "scalar", T: 9 /* ScalarType.STRING */ },
28
- ] as readonly PartialFieldInfo[],
29
- packedByDefault: true,
30
- },
31
- );
19
+ body?: string
20
+ }>
32
21
 
22
+ // MockMsg contains the message type declaration for MockMsg.
23
+ export const MockMsg: MessageType<MockMsg> = createMessageType({
24
+ typeName: 'e2e.mock.MockMsg',
25
+ fields: [
26
+ { no: 1, name: 'body', kind: 'scalar', T: ScalarType.STRING },
27
+ ] as readonly PartialFieldInfo[],
28
+ packedByDefault: true,
29
+ })
package/echo/echo.pb.ts CHANGED
@@ -2,10 +2,10 @@
2
2
  // @generated from file github.com/aperturerobotics/starpc/echo/echo.proto (package echo, syntax proto3)
3
3
  /* eslint-disable */
4
4
 
5
- import type { MessageType, PartialFieldInfo } from "@aptre/protobuf-es-lite";
6
- import { createMessageType, Message } from "@aptre/protobuf-es-lite";
5
+ import type { MessageType, PartialFieldInfo } from '@aptre/protobuf-es-lite'
6
+ import { createMessageType, Message, ScalarType } from '@aptre/protobuf-es-lite'
7
7
 
8
- export const protobufPackage = "echo";
8
+ export const protobufPackage = 'echo'
9
9
 
10
10
  /**
11
11
  * EchoMsg is the message body for Echo.
@@ -16,17 +16,14 @@ export type EchoMsg = Message<{
16
16
  /**
17
17
  * @generated from field: string body = 1;
18
18
  */
19
- body?: string;
20
-
21
- }>;
22
-
23
- export const EchoMsg: MessageType<EchoMsg> = createMessageType(
24
- {
25
- typeName: "echo.EchoMsg",
26
- fields: [
27
- { no: 1, name: "body", kind: "scalar", T: 9 /* ScalarType.STRING */ },
28
- ] as readonly PartialFieldInfo[],
29
- packedByDefault: true,
30
- },
31
- );
19
+ body?: string
20
+ }>
32
21
 
22
+ // EchoMsg contains the message type declaration for EchoMsg.
23
+ export const EchoMsg: MessageType<EchoMsg> = createMessageType({
24
+ typeName: 'echo.EchoMsg',
25
+ fields: [
26
+ { no: 1, name: 'body', kind: 'scalar', T: ScalarType.STRING },
27
+ ] as readonly PartialFieldInfo[],
28
+ packedByDefault: true,
29
+ })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "starpc",
3
- "version": "0.31.13",
3
+ "version": "0.31.14",
4
4
  "description": "Streaming protobuf RPC service protocol over any two-way channel.",
5
5
  "license": "MIT",
6
6
  "author": {
@@ -94,15 +94,15 @@
94
94
  "pre-commit": "^1.2.2",
95
95
  "prettier": "^3.2.4",
96
96
  "rimraf": "^5.0.1",
97
- "tsx": "^4.7.3",
97
+ "tsx": "^4.8.2",
98
98
  "typescript": "^5.3.2"
99
99
  },
100
100
  "dependencies": {
101
101
  "@aptre/it-ws": "^1.0.0",
102
- "@aptre/protobuf-es-lite": "^0.2.15",
102
+ "@aptre/protobuf-es-lite": "^0.4.0",
103
103
  "@chainsafe/libp2p-yamux": "^6.0.2",
104
- "@libp2p/interface": "^1.3.0",
105
- "@libp2p/logger": "^4.0.11",
104
+ "@libp2p/interface": "^1.3.1",
105
+ "@libp2p/logger": "^4.0.12",
106
106
  "event-iterator": "^2.0.0",
107
107
  "isomorphic-ws": "^5.0.0",
108
108
  "it-first": "^3.0.6",
@@ -2,10 +2,10 @@
2
2
  // @generated from file github.com/aperturerobotics/starpc/srpc/rpcproto.proto (package srpc, syntax proto3)
3
3
  /* eslint-disable */
4
4
 
5
- import type { MessageType, PartialFieldInfo } from "@aptre/protobuf-es-lite";
6
- import { createMessageType, Message } from "@aptre/protobuf-es-lite";
5
+ import type { MessageType, PartialFieldInfo } from '@aptre/protobuf-es-lite'
6
+ import { createMessageType, Message, ScalarType } from '@aptre/protobuf-es-lite'
7
7
 
8
- export const protobufPackage = "srpc";
8
+ export const protobufPackage = 'srpc'
9
9
 
10
10
  /**
11
11
  * CallStart requests starting a new RPC call.
@@ -19,42 +19,40 @@ export type CallStart = Message<{
19
19
  *
20
20
  * @generated from field: string rpc_service = 1;
21
21
  */
22
- rpcService?: string;
22
+ rpcService?: string
23
23
  /**
24
24
  * RpcMethod is the RPC method to call.
25
25
  * Must be set.
26
26
  *
27
27
  * @generated from field: string rpc_method = 2;
28
28
  */
29
- rpcMethod?: string;
29
+ rpcMethod?: string
30
30
  /**
31
31
  * Data contains the request or the first message in the stream.
32
32
  * Optional if streaming.
33
33
  *
34
34
  * @generated from field: bytes data = 3;
35
35
  */
36
- data?: Uint8Array;
36
+ data?: Uint8Array
37
37
  /**
38
38
  * DataIsZero indicates Data is set with an empty message.
39
39
  *
40
40
  * @generated from field: bool data_is_zero = 4;
41
41
  */
42
- dataIsZero?: boolean;
42
+ dataIsZero?: boolean
43
+ }>
43
44
 
44
- }>;
45
-
46
- export const CallStart: MessageType<CallStart> = createMessageType(
47
- {
48
- typeName: "srpc.CallStart",
49
- fields: [
50
- { no: 1, name: "rpc_service", kind: "scalar", T: 9 /* ScalarType.STRING */ },
51
- { no: 2, name: "rpc_method", kind: "scalar", T: 9 /* ScalarType.STRING */ },
52
- { no: 3, name: "data", kind: "scalar", T: 12 /* ScalarType.BYTES */ },
53
- { no: 4, name: "data_is_zero", kind: "scalar", T: 8 /* ScalarType.BOOL */ },
54
- ] as readonly PartialFieldInfo[],
55
- packedByDefault: true,
56
- },
57
- );
45
+ // CallStart contains the message type declaration for CallStart.
46
+ export const CallStart: MessageType<CallStart> = createMessageType({
47
+ typeName: 'srpc.CallStart',
48
+ fields: [
49
+ { no: 1, name: 'rpc_service', kind: 'scalar', T: ScalarType.STRING },
50
+ { no: 2, name: 'rpc_method', kind: 'scalar', T: ScalarType.STRING },
51
+ { no: 3, name: 'data', kind: 'scalar', T: ScalarType.BYTES },
52
+ { no: 4, name: 'data_is_zero', kind: 'scalar', T: ScalarType.BOOL },
53
+ ] as readonly PartialFieldInfo[],
54
+ packedByDefault: true,
55
+ })
58
56
 
59
57
  /**
60
58
  * CallData contains a message in a streaming RPC sequence.
@@ -67,41 +65,39 @@ export type CallData = Message<{
67
65
  *
68
66
  * @generated from field: bytes data = 1;
69
67
  */
70
- data?: Uint8Array;
68
+ data?: Uint8Array
71
69
  /**
72
70
  * DataIsZero indicates Data is set with an empty message.
73
71
  *
74
72
  * @generated from field: bool data_is_zero = 2;
75
73
  */
76
- dataIsZero?: boolean;
74
+ dataIsZero?: boolean
77
75
  /**
78
76
  * Complete indicates the RPC call is completed.
79
77
  *
80
78
  * @generated from field: bool complete = 3;
81
79
  */
82
- complete?: boolean;
80
+ complete?: boolean
83
81
  /**
84
82
  * Error contains any error that caused the RPC to fail.
85
83
  * If set, implies complete=true.
86
84
  *
87
85
  * @generated from field: string error = 4;
88
86
  */
89
- error?: string;
90
-
91
- }>;
87
+ error?: string
88
+ }>
92
89
 
93
- export const CallData: MessageType<CallData> = createMessageType(
94
- {
95
- typeName: "srpc.CallData",
96
- fields: [
97
- { no: 1, name: "data", kind: "scalar", T: 12 /* ScalarType.BYTES */ },
98
- { no: 2, name: "data_is_zero", kind: "scalar", T: 8 /* ScalarType.BOOL */ },
99
- { no: 3, name: "complete", kind: "scalar", T: 8 /* ScalarType.BOOL */ },
100
- { no: 4, name: "error", kind: "scalar", T: 9 /* ScalarType.STRING */ },
101
- ] as readonly PartialFieldInfo[],
102
- packedByDefault: true,
103
- },
104
- );
90
+ // CallData contains the message type declaration for CallData.
91
+ export const CallData: MessageType<CallData> = createMessageType({
92
+ typeName: 'srpc.CallData',
93
+ fields: [
94
+ { no: 1, name: 'data', kind: 'scalar', T: ScalarType.BYTES },
95
+ { no: 2, name: 'data_is_zero', kind: 'scalar', T: ScalarType.BOOL },
96
+ { no: 3, name: 'complete', kind: 'scalar', T: ScalarType.BOOL },
97
+ { no: 4, name: 'error', kind: 'scalar', T: ScalarType.STRING },
98
+ ] as readonly PartialFieldInfo[],
99
+ packedByDefault: true,
100
+ })
105
101
 
106
102
  /**
107
103
  * Packet is a message sent over a srpc packet connection.
@@ -109,52 +105,70 @@ export const CallData: MessageType<CallData> = createMessageType(
109
105
  * @generated from message srpc.Packet
110
106
  */
111
107
  export type Packet = Message<{
112
-
113
108
  /**
114
109
  * Body is the packet body.
115
110
  *
116
111
  * @generated from oneof srpc.Packet.body
117
112
  */
118
- body?: {
119
- value?: undefined,
120
- case: undefined
121
- } | {
122
- /**
123
- * CallStart initiates a new call.
124
- *
125
- * @generated from field: srpc.CallStart call_start = 1;
126
- */
127
- value: CallStart;
128
- case: "callStart";
129
- } | {
130
- /**
131
- * CallData is a message in a streaming RPC sequence.
132
- *
133
- * @generated from field: srpc.CallData call_data = 2;
134
- */
135
- value: CallData;
136
- case: "callData";
137
- } | {
138
- /**
139
- * CallCancel cancels the call.
140
- *
141
- * @generated from field: bool call_cancel = 3;
142
- */
143
- value: boolean;
144
- case: "callCancel";
145
- };
146
-
147
- }>;
148
-
149
- export const Packet: MessageType<Packet> = createMessageType(
150
- {
151
- typeName: "srpc.Packet",
152
- fields: [
153
- { no: 1, name: "call_start", kind: "message", T: () => CallStart, oneof: "body" },
154
- { no: 2, name: "call_data", kind: "message", T: () => CallData, oneof: "body" },
155
- { no: 3, name: "call_cancel", kind: "scalar", T: 8 /* ScalarType.BOOL */, oneof: "body" },
156
- ] as readonly PartialFieldInfo[],
157
- packedByDefault: true,
158
- },
159
- );
113
+ body?:
114
+ | {
115
+ value?: undefined
116
+ case: undefined
117
+ }
118
+ | {
119
+ /**
120
+ * CallStart initiates a new call.
121
+ *
122
+ * @generated from field: srpc.CallStart call_start = 1;
123
+ */
124
+ value: CallStart
125
+ case: 'callStart'
126
+ }
127
+ | {
128
+ /**
129
+ * CallData is a message in a streaming RPC sequence.
130
+ *
131
+ * @generated from field: srpc.CallData call_data = 2;
132
+ */
133
+ value: CallData
134
+ case: 'callData'
135
+ }
136
+ | {
137
+ /**
138
+ * CallCancel cancels the call.
139
+ *
140
+ * @generated from field: bool call_cancel = 3;
141
+ */
142
+ value: boolean
143
+ case: 'callCancel'
144
+ }
145
+ }>
160
146
 
147
+ // Packet contains the message type declaration for Packet.
148
+ export const Packet: MessageType<Packet> = createMessageType({
149
+ typeName: 'srpc.Packet',
150
+ fields: [
151
+ {
152
+ no: 1,
153
+ name: 'call_start',
154
+ kind: 'message',
155
+ T: () => CallStart,
156
+ oneof: 'body',
157
+ },
158
+ {
159
+ no: 2,
160
+ name: 'call_data',
161
+ kind: 'message',
162
+ T: () => CallData,
163
+ oneof: 'body',
164
+ },
165
+ {
166
+ no: 3,
167
+ name: 'call_cancel',
168
+ kind: 'scalar',
169
+ T: ScalarType.BOOL,
170
+ oneof: 'body',
171
+ },
172
+ ] as readonly PartialFieldInfo[],
173
+ packedByDefault: true,
174
+ })