@trpc-proto/runtime 0.1.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.
- package/LICENSE +21 -0
- package/README.md +19 -0
- package/dist/batch/grpcweb/direct_dispatcher.d.ts +10 -0
- package/dist/batch/grpcweb/direct_dispatcher.d.ts.map +1 -0
- package/dist/batch/grpcweb/direct_dispatcher.js +71 -0
- package/dist/batch/grpcweb/direct_dispatcher.js.map +1 -0
- package/dist/batch/grpcweb/forwarding_dispatcher.d.ts +5 -0
- package/dist/batch/grpcweb/forwarding_dispatcher.d.ts.map +1 -0
- package/dist/batch/grpcweb/forwarding_dispatcher.js +62 -0
- package/dist/batch/grpcweb/forwarding_dispatcher.js.map +1 -0
- package/dist/batch/index.d.ts +5 -0
- package/dist/batch/index.d.ts.map +1 -0
- package/dist/batch/index.js +4 -0
- package/dist/batch/index.js.map +1 -0
- package/dist/batch/link/web_link.d.ts +18 -0
- package/dist/batch/link/web_link.d.ts.map +1 -0
- package/dist/batch/link/web_link.js +216 -0
- package/dist/batch/link/web_link.js.map +1 -0
- package/dist/batch/proto/batch_router.d.ts +41 -0
- package/dist/batch/proto/batch_router.d.ts.map +1 -0
- package/dist/batch/proto/batch_router.js +59 -0
- package/dist/batch/proto/batch_router.js.map +1 -0
- package/dist/batch/proto/generated/schema.d.ts +262 -0
- package/dist/batch/proto/generated/schema.d.ts.map +1 -0
- package/dist/batch/proto/generated/schema.js +327 -0
- package/dist/batch/proto/generated/schema.js.map +1 -0
- package/dist/batch/proto/wire.d.ts +42 -0
- package/dist/batch/proto/wire.d.ts.map +1 -0
- package/dist/batch/proto/wire.js +52 -0
- package/dist/batch/proto/wire.js.map +1 -0
- package/dist/grpc/client.d.ts +10 -0
- package/dist/grpc/client.d.ts.map +1 -0
- package/dist/grpc/client.js +62 -0
- package/dist/grpc/client.js.map +1 -0
- package/dist/grpc/link.d.ts +11 -0
- package/dist/grpc/link.d.ts.map +1 -0
- package/dist/grpc/link.js +10 -0
- package/dist/grpc/link.js.map +1 -0
- package/dist/grpc/proto_link.d.ts +56 -0
- package/dist/grpc/proto_link.d.ts.map +1 -0
- package/dist/grpc/proto_link.js +112 -0
- package/dist/grpc/proto_link.js.map +1 -0
- package/dist/grpc/server.d.ts +28 -0
- package/dist/grpc/server.d.ts.map +1 -0
- package/dist/grpc/server.js +113 -0
- package/dist/grpc/server.js.map +1 -0
- package/dist/grpc/status.d.ts +5 -0
- package/dist/grpc/status.d.ts.map +1 -0
- package/dist/grpc/status.js +42 -0
- package/dist/grpc/status.js.map +1 -0
- package/dist/index.d.ts +15 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +8 -0
- package/dist/index.js.map +1 -0
- package/dist/noop.d.ts +10 -0
- package/dist/noop.d.ts.map +1 -0
- package/dist/noop.js +12 -0
- package/dist/noop.js.map +1 -0
- package/dist/proto_codec/index.d.ts +3 -0
- package/dist/proto_codec/index.d.ts.map +1 -0
- package/dist/proto_codec/index.js +2 -0
- package/dist/proto_codec/index.js.map +1 -0
- package/dist/proto_codec/proto_codec.d.ts +24 -0
- package/dist/proto_codec/proto_codec.d.ts.map +1 -0
- package/dist/proto_codec/proto_codec.js +327 -0
- package/dist/proto_codec/proto_codec.js.map +1 -0
- package/dist/router_invoker.d.ts +12 -0
- package/dist/router_invoker.d.ts.map +1 -0
- package/dist/router_invoker.js +79 -0
- package/dist/router_invoker.js.map +1 -0
- package/dist/types.d.ts +3 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +2 -0
- package/dist/types.js.map +1 -0
- package/dist/web/codec/base64_codec.d.ts +7 -0
- package/dist/web/codec/base64_codec.d.ts.map +1 -0
- package/dist/web/codec/base64_codec.js +57 -0
- package/dist/web/codec/base64_codec.js.map +1 -0
- package/dist/web/codec/codec.d.ts +33 -0
- package/dist/web/codec/codec.d.ts.map +1 -0
- package/dist/web/codec/codec.js +11 -0
- package/dist/web/codec/codec.js.map +1 -0
- package/dist/web/codec/compression.d.ts +15 -0
- package/dist/web/codec/compression.d.ts.map +1 -0
- package/dist/web/codec/compression.js +32 -0
- package/dist/web/codec/compression.js.map +1 -0
- package/dist/web/codec/frame_codec.d.ts +20 -0
- package/dist/web/codec/frame_codec.d.ts.map +1 -0
- package/dist/web/codec/frame_codec.js +109 -0
- package/dist/web/codec/frame_codec.js.map +1 -0
- package/dist/web/codec/protocol_codec.d.ts +40 -0
- package/dist/web/codec/protocol_codec.d.ts.map +1 -0
- package/dist/web/codec/protocol_codec.js +162 -0
- package/dist/web/codec/protocol_codec.js.map +1 -0
- package/dist/web/content_type.d.ts +19 -0
- package/dist/web/content_type.d.ts.map +1 -0
- package/dist/web/content_type.js +42 -0
- package/dist/web/content_type.js.map +1 -0
- package/dist/web/dispatchers/direct.d.ts +10 -0
- package/dist/web/dispatchers/direct.d.ts.map +1 -0
- package/dist/web/dispatchers/direct.js +72 -0
- package/dist/web/dispatchers/direct.js.map +1 -0
- package/dist/web/dispatchers/forward.d.ts +5 -0
- package/dist/web/dispatchers/forward.d.ts.map +1 -0
- package/dist/web/dispatchers/forward.js +99 -0
- package/dist/web/dispatchers/forward.js.map +1 -0
- package/dist/web/dispatchers/types.d.ts +21 -0
- package/dist/web/dispatchers/types.d.ts.map +1 -0
- package/dist/web/dispatchers/types.js +2 -0
- package/dist/web/dispatchers/types.js.map +1 -0
- package/dist/web/fetch_call.d.ts +13 -0
- package/dist/web/fetch_call.d.ts.map +1 -0
- package/dist/web/fetch_call.js +126 -0
- package/dist/web/fetch_call.js.map +1 -0
- package/dist/web/http_handler.d.ts +65 -0
- package/dist/web/http_handler.d.ts.map +1 -0
- package/dist/web/http_handler.js +295 -0
- package/dist/web/http_handler.js.map +1 -0
- package/dist/web/index.d.ts +8 -0
- package/dist/web/index.d.ts.map +1 -0
- package/dist/web/index.js +4 -0
- package/dist/web/index.js.map +1 -0
- package/dist/web/link.d.ts +26 -0
- package/dist/web/link.d.ts.map +1 -0
- package/dist/web/link.js +24 -0
- package/dist/web/link.js.map +1 -0
- package/dist/web/server.d.ts +33 -0
- package/dist/web/server.d.ts.map +1 -0
- package/dist/web/server.js +77 -0
- package/dist/web/server.js.map +1 -0
- package/package.json +90 -0
- package/src/batch/proto/generated/trpc_batch_v1.proto +40 -0
|
@@ -0,0 +1,262 @@
|
|
|
1
|
+
export declare const protoSchema: {
|
|
2
|
+
syntax: "proto3";
|
|
3
|
+
package: string;
|
|
4
|
+
services: {
|
|
5
|
+
name: string;
|
|
6
|
+
methods: {
|
|
7
|
+
name: string;
|
|
8
|
+
path: string;
|
|
9
|
+
type: "mutation";
|
|
10
|
+
requestType: string;
|
|
11
|
+
responseType: string;
|
|
12
|
+
isResponseStreaming: false;
|
|
13
|
+
}[];
|
|
14
|
+
}[];
|
|
15
|
+
messages: ({
|
|
16
|
+
name: string;
|
|
17
|
+
fields: ({
|
|
18
|
+
name: string;
|
|
19
|
+
number: number;
|
|
20
|
+
type: {
|
|
21
|
+
kind: "scalar";
|
|
22
|
+
type: "int32";
|
|
23
|
+
};
|
|
24
|
+
repeated: false;
|
|
25
|
+
optional: true;
|
|
26
|
+
comment: string;
|
|
27
|
+
} | {
|
|
28
|
+
name: string;
|
|
29
|
+
number: number;
|
|
30
|
+
type: {
|
|
31
|
+
kind: "scalar";
|
|
32
|
+
type: "string";
|
|
33
|
+
};
|
|
34
|
+
repeated: false;
|
|
35
|
+
optional: true;
|
|
36
|
+
comment: string;
|
|
37
|
+
} | {
|
|
38
|
+
name: string;
|
|
39
|
+
number: number;
|
|
40
|
+
type: {
|
|
41
|
+
kind: "scalar";
|
|
42
|
+
type: "bytes";
|
|
43
|
+
};
|
|
44
|
+
repeated: false;
|
|
45
|
+
optional: true;
|
|
46
|
+
comment: string;
|
|
47
|
+
})[];
|
|
48
|
+
subMessages: never[];
|
|
49
|
+
comment: string;
|
|
50
|
+
discriminator?: undefined;
|
|
51
|
+
} | {
|
|
52
|
+
name: string;
|
|
53
|
+
fields: {
|
|
54
|
+
name: string;
|
|
55
|
+
number: number;
|
|
56
|
+
type: {
|
|
57
|
+
kind: "message";
|
|
58
|
+
name: string;
|
|
59
|
+
};
|
|
60
|
+
repeated: true;
|
|
61
|
+
optional: true;
|
|
62
|
+
comment: string;
|
|
63
|
+
}[];
|
|
64
|
+
subMessages: never[];
|
|
65
|
+
comment: string;
|
|
66
|
+
discriminator?: undefined;
|
|
67
|
+
} | {
|
|
68
|
+
name: string;
|
|
69
|
+
fields: {
|
|
70
|
+
name: string;
|
|
71
|
+
number: number;
|
|
72
|
+
type: {
|
|
73
|
+
kind: "message";
|
|
74
|
+
name: string;
|
|
75
|
+
};
|
|
76
|
+
repeated: false;
|
|
77
|
+
optional: false;
|
|
78
|
+
comment: string;
|
|
79
|
+
oneof: string;
|
|
80
|
+
discriminatorValue: string;
|
|
81
|
+
}[];
|
|
82
|
+
subMessages: ({
|
|
83
|
+
name: string;
|
|
84
|
+
fields: ({
|
|
85
|
+
name: string;
|
|
86
|
+
number: number;
|
|
87
|
+
type: {
|
|
88
|
+
kind: "scalar";
|
|
89
|
+
type: "int32";
|
|
90
|
+
};
|
|
91
|
+
repeated: false;
|
|
92
|
+
optional: true;
|
|
93
|
+
comment: string;
|
|
94
|
+
} | {
|
|
95
|
+
name: string;
|
|
96
|
+
number: number;
|
|
97
|
+
type: {
|
|
98
|
+
kind: "scalar";
|
|
99
|
+
type: "bytes";
|
|
100
|
+
};
|
|
101
|
+
repeated: false;
|
|
102
|
+
optional: true;
|
|
103
|
+
comment: string;
|
|
104
|
+
})[];
|
|
105
|
+
subMessages: never[];
|
|
106
|
+
comment: string;
|
|
107
|
+
} | {
|
|
108
|
+
name: string;
|
|
109
|
+
fields: ({
|
|
110
|
+
name: string;
|
|
111
|
+
number: number;
|
|
112
|
+
type: {
|
|
113
|
+
kind: "scalar";
|
|
114
|
+
type: "int32";
|
|
115
|
+
};
|
|
116
|
+
repeated: false;
|
|
117
|
+
optional: true;
|
|
118
|
+
comment: string;
|
|
119
|
+
} | {
|
|
120
|
+
name: string;
|
|
121
|
+
number: number;
|
|
122
|
+
type: {
|
|
123
|
+
kind: "scalar";
|
|
124
|
+
type: "string";
|
|
125
|
+
};
|
|
126
|
+
repeated: false;
|
|
127
|
+
optional: true;
|
|
128
|
+
comment: string;
|
|
129
|
+
})[];
|
|
130
|
+
subMessages: never[];
|
|
131
|
+
comment: string;
|
|
132
|
+
})[];
|
|
133
|
+
comment: string;
|
|
134
|
+
discriminator: string;
|
|
135
|
+
})[];
|
|
136
|
+
enums: never[];
|
|
137
|
+
generateCache: {
|
|
138
|
+
propertyGenCache: {
|
|
139
|
+
BatchRequest: {
|
|
140
|
+
propertyGenCache: {
|
|
141
|
+
calls: {
|
|
142
|
+
tag: number;
|
|
143
|
+
type: string;
|
|
144
|
+
propertyGenCache: {};
|
|
145
|
+
usedIds: {};
|
|
146
|
+
};
|
|
147
|
+
};
|
|
148
|
+
usedIds: {
|
|
149
|
+
"1": string;
|
|
150
|
+
};
|
|
151
|
+
};
|
|
152
|
+
BatchCall: {
|
|
153
|
+
propertyGenCache: {
|
|
154
|
+
id: {
|
|
155
|
+
tag: number;
|
|
156
|
+
type: string;
|
|
157
|
+
propertyGenCache: {};
|
|
158
|
+
usedIds: {};
|
|
159
|
+
};
|
|
160
|
+
path: {
|
|
161
|
+
tag: number;
|
|
162
|
+
type: string;
|
|
163
|
+
propertyGenCache: {};
|
|
164
|
+
usedIds: {};
|
|
165
|
+
};
|
|
166
|
+
input: {
|
|
167
|
+
tag: number;
|
|
168
|
+
type: string;
|
|
169
|
+
propertyGenCache: {};
|
|
170
|
+
usedIds: {};
|
|
171
|
+
};
|
|
172
|
+
};
|
|
173
|
+
usedIds: {
|
|
174
|
+
"1": string;
|
|
175
|
+
"2": string;
|
|
176
|
+
"3": string;
|
|
177
|
+
};
|
|
178
|
+
};
|
|
179
|
+
BatchResponse: {
|
|
180
|
+
propertyGenCache: {
|
|
181
|
+
results: {
|
|
182
|
+
tag: number;
|
|
183
|
+
type: string;
|
|
184
|
+
propertyGenCache: {};
|
|
185
|
+
usedIds: {};
|
|
186
|
+
};
|
|
187
|
+
};
|
|
188
|
+
usedIds: {
|
|
189
|
+
"1": string;
|
|
190
|
+
};
|
|
191
|
+
};
|
|
192
|
+
BatchResult: {
|
|
193
|
+
propertyGenCache: {
|
|
194
|
+
success: {
|
|
195
|
+
tag: number;
|
|
196
|
+
type: string;
|
|
197
|
+
propertyGenCache: {};
|
|
198
|
+
usedIds: {};
|
|
199
|
+
};
|
|
200
|
+
error: {
|
|
201
|
+
tag: number;
|
|
202
|
+
type: string;
|
|
203
|
+
propertyGenCache: {};
|
|
204
|
+
usedIds: {};
|
|
205
|
+
};
|
|
206
|
+
};
|
|
207
|
+
usedIds: {
|
|
208
|
+
"1": string;
|
|
209
|
+
"2": string;
|
|
210
|
+
};
|
|
211
|
+
};
|
|
212
|
+
"BatchResult.Success": {
|
|
213
|
+
propertyGenCache: {
|
|
214
|
+
id: {
|
|
215
|
+
tag: number;
|
|
216
|
+
type: string;
|
|
217
|
+
propertyGenCache: {};
|
|
218
|
+
usedIds: {};
|
|
219
|
+
};
|
|
220
|
+
output: {
|
|
221
|
+
tag: number;
|
|
222
|
+
type: string;
|
|
223
|
+
propertyGenCache: {};
|
|
224
|
+
usedIds: {};
|
|
225
|
+
};
|
|
226
|
+
};
|
|
227
|
+
usedIds: {
|
|
228
|
+
"1": string;
|
|
229
|
+
"2": string;
|
|
230
|
+
};
|
|
231
|
+
};
|
|
232
|
+
"BatchResult.Error": {
|
|
233
|
+
propertyGenCache: {
|
|
234
|
+
id: {
|
|
235
|
+
tag: number;
|
|
236
|
+
type: string;
|
|
237
|
+
propertyGenCache: {};
|
|
238
|
+
usedIds: {};
|
|
239
|
+
};
|
|
240
|
+
code: {
|
|
241
|
+
tag: number;
|
|
242
|
+
type: string;
|
|
243
|
+
propertyGenCache: {};
|
|
244
|
+
usedIds: {};
|
|
245
|
+
};
|
|
246
|
+
message: {
|
|
247
|
+
tag: number;
|
|
248
|
+
type: string;
|
|
249
|
+
propertyGenCache: {};
|
|
250
|
+
usedIds: {};
|
|
251
|
+
};
|
|
252
|
+
};
|
|
253
|
+
usedIds: {
|
|
254
|
+
"1": string;
|
|
255
|
+
"2": string;
|
|
256
|
+
"3": string;
|
|
257
|
+
};
|
|
258
|
+
};
|
|
259
|
+
};
|
|
260
|
+
};
|
|
261
|
+
};
|
|
262
|
+
//# sourceMappingURL=schema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../src/batch/proto/generated/schema.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqUD,CAAC"}
|
|
@@ -0,0 +1,327 @@
|
|
|
1
|
+
export const protoSchema = {
|
|
2
|
+
"syntax": "proto3",
|
|
3
|
+
"package": "trpc.batch.v1",
|
|
4
|
+
"services": [
|
|
5
|
+
{
|
|
6
|
+
"name": "BatchService",
|
|
7
|
+
"methods": [
|
|
8
|
+
{
|
|
9
|
+
"name": "Execute",
|
|
10
|
+
"path": "batch.execute",
|
|
11
|
+
"type": "mutation",
|
|
12
|
+
"requestType": "BatchRequest",
|
|
13
|
+
"responseType": "BatchResponse",
|
|
14
|
+
"isResponseStreaming": false
|
|
15
|
+
}
|
|
16
|
+
]
|
|
17
|
+
}
|
|
18
|
+
],
|
|
19
|
+
"messages": [
|
|
20
|
+
{
|
|
21
|
+
"name": "BatchCall",
|
|
22
|
+
"fields": [
|
|
23
|
+
{
|
|
24
|
+
"name": "id",
|
|
25
|
+
"number": 1,
|
|
26
|
+
"type": {
|
|
27
|
+
"kind": "scalar",
|
|
28
|
+
"type": "int32"
|
|
29
|
+
},
|
|
30
|
+
"repeated": false,
|
|
31
|
+
"optional": true,
|
|
32
|
+
"comment": ""
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"name": "path",
|
|
36
|
+
"number": 2,
|
|
37
|
+
"type": {
|
|
38
|
+
"kind": "scalar",
|
|
39
|
+
"type": "string"
|
|
40
|
+
},
|
|
41
|
+
"repeated": false,
|
|
42
|
+
"optional": true,
|
|
43
|
+
"comment": ""
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"name": "input",
|
|
47
|
+
"number": 3,
|
|
48
|
+
"type": {
|
|
49
|
+
"kind": "scalar",
|
|
50
|
+
"type": "bytes"
|
|
51
|
+
},
|
|
52
|
+
"repeated": false,
|
|
53
|
+
"optional": true,
|
|
54
|
+
"comment": ""
|
|
55
|
+
}
|
|
56
|
+
],
|
|
57
|
+
"subMessages": [],
|
|
58
|
+
"comment": ""
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
"name": "BatchRequest",
|
|
62
|
+
"fields": [
|
|
63
|
+
{
|
|
64
|
+
"name": "calls",
|
|
65
|
+
"number": 1,
|
|
66
|
+
"type": {
|
|
67
|
+
"kind": "message",
|
|
68
|
+
"name": "BatchCall"
|
|
69
|
+
},
|
|
70
|
+
"repeated": true,
|
|
71
|
+
"optional": true,
|
|
72
|
+
"comment": ""
|
|
73
|
+
}
|
|
74
|
+
],
|
|
75
|
+
"subMessages": [],
|
|
76
|
+
"comment": ""
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
"name": "BatchResult",
|
|
80
|
+
"fields": [
|
|
81
|
+
{
|
|
82
|
+
"name": "success",
|
|
83
|
+
"number": 1,
|
|
84
|
+
"type": {
|
|
85
|
+
"kind": "message",
|
|
86
|
+
"name": "Success"
|
|
87
|
+
},
|
|
88
|
+
"repeated": false,
|
|
89
|
+
"optional": false,
|
|
90
|
+
"comment": "",
|
|
91
|
+
"oneof": "result",
|
|
92
|
+
"discriminatorValue": "success"
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
"name": "error",
|
|
96
|
+
"number": 2,
|
|
97
|
+
"type": {
|
|
98
|
+
"kind": "message",
|
|
99
|
+
"name": "Error"
|
|
100
|
+
},
|
|
101
|
+
"repeated": false,
|
|
102
|
+
"optional": false,
|
|
103
|
+
"comment": "",
|
|
104
|
+
"oneof": "result",
|
|
105
|
+
"discriminatorValue": "error"
|
|
106
|
+
}
|
|
107
|
+
],
|
|
108
|
+
"subMessages": [
|
|
109
|
+
{
|
|
110
|
+
"name": "Success",
|
|
111
|
+
"fields": [
|
|
112
|
+
{
|
|
113
|
+
"name": "id",
|
|
114
|
+
"number": 1,
|
|
115
|
+
"type": {
|
|
116
|
+
"kind": "scalar",
|
|
117
|
+
"type": "int32"
|
|
118
|
+
},
|
|
119
|
+
"repeated": false,
|
|
120
|
+
"optional": true,
|
|
121
|
+
"comment": ""
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
"name": "output",
|
|
125
|
+
"number": 2,
|
|
126
|
+
"type": {
|
|
127
|
+
"kind": "scalar",
|
|
128
|
+
"type": "bytes"
|
|
129
|
+
},
|
|
130
|
+
"repeated": false,
|
|
131
|
+
"optional": true,
|
|
132
|
+
"comment": ""
|
|
133
|
+
}
|
|
134
|
+
],
|
|
135
|
+
"subMessages": [],
|
|
136
|
+
"comment": ""
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
"name": "Error",
|
|
140
|
+
"fields": [
|
|
141
|
+
{
|
|
142
|
+
"name": "id",
|
|
143
|
+
"number": 1,
|
|
144
|
+
"type": {
|
|
145
|
+
"kind": "scalar",
|
|
146
|
+
"type": "int32"
|
|
147
|
+
},
|
|
148
|
+
"repeated": false,
|
|
149
|
+
"optional": true,
|
|
150
|
+
"comment": ""
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
"name": "code",
|
|
154
|
+
"number": 2,
|
|
155
|
+
"type": {
|
|
156
|
+
"kind": "scalar",
|
|
157
|
+
"type": "int32"
|
|
158
|
+
},
|
|
159
|
+
"repeated": false,
|
|
160
|
+
"optional": true,
|
|
161
|
+
"comment": ""
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
"name": "message",
|
|
165
|
+
"number": 3,
|
|
166
|
+
"type": {
|
|
167
|
+
"kind": "scalar",
|
|
168
|
+
"type": "string"
|
|
169
|
+
},
|
|
170
|
+
"repeated": false,
|
|
171
|
+
"optional": true,
|
|
172
|
+
"comment": ""
|
|
173
|
+
}
|
|
174
|
+
],
|
|
175
|
+
"subMessages": [],
|
|
176
|
+
"comment": ""
|
|
177
|
+
}
|
|
178
|
+
],
|
|
179
|
+
"comment": "",
|
|
180
|
+
"discriminator": "result"
|
|
181
|
+
},
|
|
182
|
+
{
|
|
183
|
+
"name": "BatchResponse",
|
|
184
|
+
"fields": [
|
|
185
|
+
{
|
|
186
|
+
"name": "results",
|
|
187
|
+
"number": 1,
|
|
188
|
+
"type": {
|
|
189
|
+
"kind": "message",
|
|
190
|
+
"name": "BatchResult"
|
|
191
|
+
},
|
|
192
|
+
"repeated": true,
|
|
193
|
+
"optional": true,
|
|
194
|
+
"comment": ""
|
|
195
|
+
}
|
|
196
|
+
],
|
|
197
|
+
"subMessages": [],
|
|
198
|
+
"comment": ""
|
|
199
|
+
}
|
|
200
|
+
],
|
|
201
|
+
"enums": [],
|
|
202
|
+
"generateCache": {
|
|
203
|
+
"propertyGenCache": {
|
|
204
|
+
"BatchRequest": {
|
|
205
|
+
"propertyGenCache": {
|
|
206
|
+
"calls": {
|
|
207
|
+
"tag": 1,
|
|
208
|
+
"type": "BatchCall",
|
|
209
|
+
"propertyGenCache": {},
|
|
210
|
+
"usedIds": {}
|
|
211
|
+
}
|
|
212
|
+
},
|
|
213
|
+
"usedIds": {
|
|
214
|
+
"1": "calls"
|
|
215
|
+
}
|
|
216
|
+
},
|
|
217
|
+
"BatchCall": {
|
|
218
|
+
"propertyGenCache": {
|
|
219
|
+
"id": {
|
|
220
|
+
"tag": 1,
|
|
221
|
+
"type": "int32",
|
|
222
|
+
"propertyGenCache": {},
|
|
223
|
+
"usedIds": {}
|
|
224
|
+
},
|
|
225
|
+
"path": {
|
|
226
|
+
"tag": 2,
|
|
227
|
+
"type": "string",
|
|
228
|
+
"propertyGenCache": {},
|
|
229
|
+
"usedIds": {}
|
|
230
|
+
},
|
|
231
|
+
"input": {
|
|
232
|
+
"tag": 3,
|
|
233
|
+
"type": "bytes",
|
|
234
|
+
"propertyGenCache": {},
|
|
235
|
+
"usedIds": {}
|
|
236
|
+
}
|
|
237
|
+
},
|
|
238
|
+
"usedIds": {
|
|
239
|
+
"1": "id",
|
|
240
|
+
"2": "path",
|
|
241
|
+
"3": "input"
|
|
242
|
+
}
|
|
243
|
+
},
|
|
244
|
+
"BatchResponse": {
|
|
245
|
+
"propertyGenCache": {
|
|
246
|
+
"results": {
|
|
247
|
+
"tag": 1,
|
|
248
|
+
"type": "BatchResult",
|
|
249
|
+
"propertyGenCache": {},
|
|
250
|
+
"usedIds": {}
|
|
251
|
+
}
|
|
252
|
+
},
|
|
253
|
+
"usedIds": {
|
|
254
|
+
"1": "results"
|
|
255
|
+
}
|
|
256
|
+
},
|
|
257
|
+
"BatchResult": {
|
|
258
|
+
"propertyGenCache": {
|
|
259
|
+
"success": {
|
|
260
|
+
"tag": 1,
|
|
261
|
+
"type": "Success",
|
|
262
|
+
"propertyGenCache": {},
|
|
263
|
+
"usedIds": {}
|
|
264
|
+
},
|
|
265
|
+
"error": {
|
|
266
|
+
"tag": 2,
|
|
267
|
+
"type": "Error",
|
|
268
|
+
"propertyGenCache": {},
|
|
269
|
+
"usedIds": {}
|
|
270
|
+
}
|
|
271
|
+
},
|
|
272
|
+
"usedIds": {
|
|
273
|
+
"1": "success",
|
|
274
|
+
"2": "error"
|
|
275
|
+
}
|
|
276
|
+
},
|
|
277
|
+
"BatchResult.Success": {
|
|
278
|
+
"propertyGenCache": {
|
|
279
|
+
"id": {
|
|
280
|
+
"tag": 1,
|
|
281
|
+
"type": "int32",
|
|
282
|
+
"propertyGenCache": {},
|
|
283
|
+
"usedIds": {}
|
|
284
|
+
},
|
|
285
|
+
"output": {
|
|
286
|
+
"tag": 2,
|
|
287
|
+
"type": "bytes",
|
|
288
|
+
"propertyGenCache": {},
|
|
289
|
+
"usedIds": {}
|
|
290
|
+
}
|
|
291
|
+
},
|
|
292
|
+
"usedIds": {
|
|
293
|
+
"1": "id",
|
|
294
|
+
"2": "output"
|
|
295
|
+
}
|
|
296
|
+
},
|
|
297
|
+
"BatchResult.Error": {
|
|
298
|
+
"propertyGenCache": {
|
|
299
|
+
"id": {
|
|
300
|
+
"tag": 1,
|
|
301
|
+
"type": "int32",
|
|
302
|
+
"propertyGenCache": {},
|
|
303
|
+
"usedIds": {}
|
|
304
|
+
},
|
|
305
|
+
"code": {
|
|
306
|
+
"tag": 2,
|
|
307
|
+
"type": "int32",
|
|
308
|
+
"propertyGenCache": {},
|
|
309
|
+
"usedIds": {}
|
|
310
|
+
},
|
|
311
|
+
"message": {
|
|
312
|
+
"tag": 3,
|
|
313
|
+
"type": "string",
|
|
314
|
+
"propertyGenCache": {},
|
|
315
|
+
"usedIds": {}
|
|
316
|
+
}
|
|
317
|
+
},
|
|
318
|
+
"usedIds": {
|
|
319
|
+
"1": "id",
|
|
320
|
+
"2": "code",
|
|
321
|
+
"3": "message"
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
};
|
|
327
|
+
//# sourceMappingURL=schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../../src/batch/proto/generated/schema.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,WAAW,GAAG;IACzB,QAAQ,EAAE,QAAQ;IAClB,SAAS,EAAE,eAAe;IAC1B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AAG,EAAE,SAAS;oBACd,GAAG,EAAE,OAAO;iBACb;aACF;YACD,qBAAqB,EAAE;gBACrB,kBAAkB,EAAE;oBAClB,IAAI,EAAE;wBACJ,KAAK,EAAE,CAAC;wBACR,MAAM,EAAE,OAAO;wBACf,kBAAkB,EAAE,EAAE;wBACtB,SAAS,EAAE,EAAE;qBACd;oBACD,QAAQ,EAAE;wBACR,KAAK,EAAE,CAAC;wBACR,MAAM,EAAE,OAAO;wBACf,kBAAkB,EAAE,EAAE;wBACtB,SAAS,EAAE,EAAE;qBACd;iBACF;gBACD,SAAS,EAAE;oBACT,GAAG,EAAE,IAAI;oBACT,GAAG,EAAE,QAAQ;iBACd;aACF;YACD,mBAAmB,EAAE;gBACnB,kBAAkB,EAAE;oBAClB,IAAI,EAAE;wBACJ,KAAK,EAAE,CAAC;wBACR,MAAM,EAAE,OAAO;wBACf,kBAAkB,EAAE,EAAE;wBACtB,SAAS,EAAE,EAAE;qBACd;oBACD,MAAM,EAAE;wBACN,KAAK,EAAE,CAAC;wBACR,MAAM,EAAE,OAAO;wBACf,kBAAkB,EAAE,EAAE;wBACtB,SAAS,EAAE,EAAE;qBACd;oBACD,SAAS,EAAE;wBACT,KAAK,EAAE,CAAC;wBACR,MAAM,EAAE,QAAQ;wBAChB,kBAAkB,EAAE,EAAE;wBACtB,SAAS,EAAE,EAAE;qBACd;iBACF;gBACD,SAAS,EAAE;oBACT,GAAG,EAAE,IAAI;oBACT,GAAG,EAAE,MAAM;oBACX,GAAG,EAAE,SAAS;iBACf;aACF;SACF;KACF;CACoB,CAAC"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { ProtoCodec, type RuntimeProtoRpc } from '../../proto_codec/index.js';
|
|
2
|
+
export declare const BATCH_PROCEDURE_PATH = "batch.execute";
|
|
3
|
+
export declare const DEFAULT_MAX_BATCH_ITEMS = 100;
|
|
4
|
+
/** The fixed gRPC path for the batch procedure. */
|
|
5
|
+
export declare const BATCH_GRPC_PATH: string;
|
|
6
|
+
/** The gRPC content type for the batch procedure. */
|
|
7
|
+
export interface BatchWireCall {
|
|
8
|
+
id: number;
|
|
9
|
+
path: string;
|
|
10
|
+
input?: Uint8Array;
|
|
11
|
+
}
|
|
12
|
+
/** The gRPC content type for the batch procedure. */
|
|
13
|
+
export interface BatchWireRequest {
|
|
14
|
+
calls: BatchWireCall[];
|
|
15
|
+
}
|
|
16
|
+
/** The gRPC content type for the batch procedure. */
|
|
17
|
+
export type BatchWireResult = {
|
|
18
|
+
result: 'success';
|
|
19
|
+
id: number;
|
|
20
|
+
output?: Uint8Array;
|
|
21
|
+
} | {
|
|
22
|
+
result: 'error';
|
|
23
|
+
id: number;
|
|
24
|
+
code: number;
|
|
25
|
+
message: string;
|
|
26
|
+
};
|
|
27
|
+
/** The gRPC content type for the batch procedure. */
|
|
28
|
+
export interface BatchWireResponse {
|
|
29
|
+
results: BatchWireResult[];
|
|
30
|
+
}
|
|
31
|
+
export type BatchValidation = {
|
|
32
|
+
calls: BatchWireCall[];
|
|
33
|
+
} | {
|
|
34
|
+
error: string;
|
|
35
|
+
};
|
|
36
|
+
export declare function decodeBatchCalls(message: Uint8Array): BatchValidation;
|
|
37
|
+
export declare function encodeBatchResponse(response: BatchWireResponse): Uint8Array;
|
|
38
|
+
export declare function batchProtocol(): {
|
|
39
|
+
codec: ProtoCodec;
|
|
40
|
+
rpc: RuntimeProtoRpc;
|
|
41
|
+
};
|
|
42
|
+
//# sourceMappingURL=wire.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wire.d.ts","sourceRoot":"","sources":["../../../src/batch/proto/wire.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,KAAK,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAG9E,eAAO,MAAM,oBAAoB,kBAAkB,CAAC;AACpD,eAAO,MAAM,uBAAuB,MAAM,CAAC;AAS3C,mDAAmD;AACnD,eAAO,MAAM,eAAe,QAA6E,CAAC;AAE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