@hatchet-dev/typescript-sdk 0.0.1

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 (120) hide show
  1. package/.eslintrc.json +36 -0
  2. package/.prettierrc.json +6 -0
  3. package/README.md +4 -0
  4. package/dist/hatchet/clients/admin/admin-client.d.ts +14 -0
  5. package/dist/hatchet/clients/admin/admin-client.js +50 -0
  6. package/dist/hatchet/clients/admin/admin-client.test.d.ts +1 -0
  7. package/dist/hatchet/clients/admin/admin-client.test.js +101 -0
  8. package/dist/hatchet/clients/dispatcher/action-listener.d.ts +24 -0
  9. package/dist/hatchet/clients/dispatcher/action-listener.js +113 -0
  10. package/dist/hatchet/clients/dispatcher/action-listener.test.d.ts +4 -0
  11. package/dist/hatchet/clients/dispatcher/action-listener.test.js +277 -0
  12. package/dist/hatchet/clients/dispatcher/dispatcher-client.d.ts +17 -0
  13. package/dist/hatchet/clients/dispatcher/dispatcher-client.js +46 -0
  14. package/dist/hatchet/clients/dispatcher/dispatcher-client.test.d.ts +1 -0
  15. package/dist/hatchet/clients/dispatcher/dispatcher-client.test.js +99 -0
  16. package/dist/hatchet/clients/event/event-client.d.ts +9 -0
  17. package/dist/hatchet/clients/event/event-client.js +28 -0
  18. package/dist/hatchet/clients/event/event-client.test.d.ts +1 -0
  19. package/dist/hatchet/clients/event/event-client.test.js +60 -0
  20. package/dist/hatchet/clients/hatchet-client/client-config.d.ts +72 -0
  21. package/dist/hatchet/clients/hatchet-client/client-config.js +17 -0
  22. package/dist/hatchet/clients/hatchet-client/hatchet-client.d.ts +26 -0
  23. package/dist/hatchet/clients/hatchet-client/hatchet-client.js +133 -0
  24. package/dist/hatchet/clients/hatchet-client/hatchet-client.test.d.ts +2 -0
  25. package/dist/hatchet/clients/hatchet-client/hatchet-client.test.js +135 -0
  26. package/dist/hatchet/clients/hatchet-client/index.d.ts +2 -0
  27. package/dist/hatchet/clients/hatchet-client/index.js +18 -0
  28. package/dist/hatchet/clients/worker/index.d.ts +1 -0
  29. package/dist/hatchet/clients/worker/index.js +17 -0
  30. package/dist/hatchet/clients/worker/worker.d.ts +31 -0
  31. package/dist/hatchet/clients/worker/worker.js +228 -0
  32. package/dist/hatchet/clients/worker/worker.test.d.ts +1 -0
  33. package/dist/hatchet/clients/worker/worker.test.js +256 -0
  34. package/dist/hatchet/index.d.ts +2 -0
  35. package/dist/hatchet/index.js +4 -0
  36. package/dist/hatchet/sdk.d.ts +2 -0
  37. package/dist/hatchet/sdk.js +4 -0
  38. package/dist/hatchet/step.d.ts +30 -0
  39. package/dist/hatchet/step.js +63 -0
  40. package/dist/hatchet/util/config-loader/config-loader.d.ts +13 -0
  41. package/dist/hatchet/util/config-loader/config-loader.js +85 -0
  42. package/dist/hatchet/util/config-loader/config-loader.test.d.ts +1 -0
  43. package/dist/hatchet/util/config-loader/config-loader.test.js +72 -0
  44. package/dist/hatchet/util/config-loader/index.d.ts +1 -0
  45. package/dist/hatchet/util/config-loader/index.js +17 -0
  46. package/dist/hatchet/util/errors/hatchet-error.d.ts +4 -0
  47. package/dist/hatchet/util/errors/hatchet-error.js +9 -0
  48. package/dist/hatchet/util/hatchet-promise/hatchet-promise.d.ts +6 -0
  49. package/dist/hatchet/util/hatchet-promise/hatchet-promise.js +12 -0
  50. package/dist/hatchet/util/hatchet-promise/hatchet-promise.test.d.ts +1 -0
  51. package/dist/hatchet/util/hatchet-promise/hatchet-promise.test.js +40 -0
  52. package/dist/hatchet/util/logger/index.d.ts +1 -0
  53. package/dist/hatchet/util/logger/index.js +17 -0
  54. package/dist/hatchet/util/logger/logger.d.ts +12 -0
  55. package/dist/hatchet/util/logger/logger.js +37 -0
  56. package/dist/hatchet/util/sleep.d.ts +2 -0
  57. package/dist/hatchet/util/sleep.js +6 -0
  58. package/dist/hatchet/workflow.d.ts +78 -0
  59. package/dist/hatchet/workflow.js +44 -0
  60. package/dist/protoc/dispatcher/dispatcher.d.ts +273 -0
  61. package/dist/protoc/dispatcher/dispatcher.js +918 -0
  62. package/dist/protoc/dispatcher/index.d.ts +1 -0
  63. package/dist/protoc/dispatcher/index.js +17 -0
  64. package/dist/protoc/events/events.d.ts +165 -0
  65. package/dist/protoc/events/events.js +443 -0
  66. package/dist/protoc/google/protobuf/timestamp.d.ts +121 -0
  67. package/dist/protoc/google/protobuf/timestamp.js +110 -0
  68. package/dist/protoc/google/protobuf/wrappers.d.ts +160 -0
  69. package/dist/protoc/google/protobuf/wrappers.js +527 -0
  70. package/dist/protoc/workflows/index.d.ts +1 -0
  71. package/dist/protoc/workflows/index.js +17 -0
  72. package/dist/protoc/workflows/workflows.d.ts +438 -0
  73. package/dist/protoc/workflows/workflows.js +1814 -0
  74. package/examples/dag-worker.ts +55 -0
  75. package/examples/example-event.ts +7 -0
  76. package/examples/simple-worker.ts +39 -0
  77. package/generate-protoc.sh +10 -0
  78. package/hatchet/clients/admin/admin-client.test.ts +116 -0
  79. package/hatchet/clients/admin/admin-client.ts +43 -0
  80. package/hatchet/clients/dispatcher/action-listener.test.ts +270 -0
  81. package/hatchet/clients/dispatcher/action-listener.ts +91 -0
  82. package/hatchet/clients/dispatcher/dispatcher-client.test.ts +111 -0
  83. package/hatchet/clients/dispatcher/dispatcher-client.ts +47 -0
  84. package/hatchet/clients/event/event-client.test.ts +72 -0
  85. package/hatchet/clients/event/event-client.ts +32 -0
  86. package/hatchet/clients/hatchet-client/client-config.ts +22 -0
  87. package/hatchet/clients/hatchet-client/fixtures/.hatchet-invalid.yaml +6 -0
  88. package/hatchet/clients/hatchet-client/fixtures/.hatchet.yaml +8 -0
  89. package/hatchet/clients/hatchet-client/hatchet-client.test.ts +162 -0
  90. package/hatchet/clients/hatchet-client/hatchet-client.ts +136 -0
  91. package/hatchet/clients/hatchet-client/index.ts +2 -0
  92. package/hatchet/clients/worker/index.ts +1 -0
  93. package/hatchet/clients/worker/worker.test.ts +347 -0
  94. package/hatchet/clients/worker/worker.ts +229 -0
  95. package/hatchet/index.ts +3 -0
  96. package/hatchet/sdk.ts +3 -0
  97. package/hatchet/step.ts +48 -0
  98. package/hatchet/util/config-loader/config-loader.test.ts +79 -0
  99. package/hatchet/util/config-loader/config-loader.ts +91 -0
  100. package/hatchet/util/config-loader/fixtures/.hatchet-invalid.yaml +6 -0
  101. package/hatchet/util/config-loader/fixtures/.hatchet.yaml +8 -0
  102. package/hatchet/util/config-loader/index.ts +1 -0
  103. package/hatchet/util/errors/hatchet-error.ts +8 -0
  104. package/hatchet/util/hatchet-promise/hatchet-promise.test.ts +32 -0
  105. package/hatchet/util/hatchet-promise/hatchet-promise.ts +13 -0
  106. package/hatchet/util/logger/index.ts +1 -0
  107. package/hatchet/util/logger/logger.ts +44 -0
  108. package/hatchet/util/sleep.ts +6 -0
  109. package/hatchet/workflow.ts +30 -0
  110. package/jest.config.ts +205 -0
  111. package/package.json +65 -0
  112. package/protoc/dispatcher/dispatcher.ts +1101 -0
  113. package/protoc/dispatcher/index.ts +1 -0
  114. package/protoc/events/events.ts +519 -0
  115. package/protoc/events/index.ts +1 -0
  116. package/protoc/google/protobuf/timestamp.ts +210 -0
  117. package/protoc/google/protobuf/wrappers.ts +657 -0
  118. package/protoc/workflows/index.ts +1 -0
  119. package/protoc/workflows/workflows.ts +2158 -0
  120. package/tsconfig.json +120 -0
@@ -0,0 +1,1101 @@
1
+ /* eslint-disable */
2
+ import type { CallContext, CallOptions } from "nice-grpc-common";
3
+ import * as _m0 from "protobufjs/minimal";
4
+ import { Timestamp } from "../google/protobuf/timestamp";
5
+
6
+ export const protobufPackage = "";
7
+
8
+ export enum ActionType {
9
+ START_STEP_RUN = 0,
10
+ CANCEL_STEP_RUN = 1,
11
+ UNRECOGNIZED = -1,
12
+ }
13
+
14
+ export function actionTypeFromJSON(object: any): ActionType {
15
+ switch (object) {
16
+ case 0:
17
+ case "START_STEP_RUN":
18
+ return ActionType.START_STEP_RUN;
19
+ case 1:
20
+ case "CANCEL_STEP_RUN":
21
+ return ActionType.CANCEL_STEP_RUN;
22
+ case -1:
23
+ case "UNRECOGNIZED":
24
+ default:
25
+ return ActionType.UNRECOGNIZED;
26
+ }
27
+ }
28
+
29
+ export function actionTypeToJSON(object: ActionType): string {
30
+ switch (object) {
31
+ case ActionType.START_STEP_RUN:
32
+ return "START_STEP_RUN";
33
+ case ActionType.CANCEL_STEP_RUN:
34
+ return "CANCEL_STEP_RUN";
35
+ case ActionType.UNRECOGNIZED:
36
+ default:
37
+ return "UNRECOGNIZED";
38
+ }
39
+ }
40
+
41
+ export enum ActionEventType {
42
+ STEP_EVENT_TYPE_UNKNOWN = 0,
43
+ STEP_EVENT_TYPE_STARTED = 1,
44
+ STEP_EVENT_TYPE_COMPLETED = 2,
45
+ STEP_EVENT_TYPE_FAILED = 3,
46
+ UNRECOGNIZED = -1,
47
+ }
48
+
49
+ export function actionEventTypeFromJSON(object: any): ActionEventType {
50
+ switch (object) {
51
+ case 0:
52
+ case "STEP_EVENT_TYPE_UNKNOWN":
53
+ return ActionEventType.STEP_EVENT_TYPE_UNKNOWN;
54
+ case 1:
55
+ case "STEP_EVENT_TYPE_STARTED":
56
+ return ActionEventType.STEP_EVENT_TYPE_STARTED;
57
+ case 2:
58
+ case "STEP_EVENT_TYPE_COMPLETED":
59
+ return ActionEventType.STEP_EVENT_TYPE_COMPLETED;
60
+ case 3:
61
+ case "STEP_EVENT_TYPE_FAILED":
62
+ return ActionEventType.STEP_EVENT_TYPE_FAILED;
63
+ case -1:
64
+ case "UNRECOGNIZED":
65
+ default:
66
+ return ActionEventType.UNRECOGNIZED;
67
+ }
68
+ }
69
+
70
+ export function actionEventTypeToJSON(object: ActionEventType): string {
71
+ switch (object) {
72
+ case ActionEventType.STEP_EVENT_TYPE_UNKNOWN:
73
+ return "STEP_EVENT_TYPE_UNKNOWN";
74
+ case ActionEventType.STEP_EVENT_TYPE_STARTED:
75
+ return "STEP_EVENT_TYPE_STARTED";
76
+ case ActionEventType.STEP_EVENT_TYPE_COMPLETED:
77
+ return "STEP_EVENT_TYPE_COMPLETED";
78
+ case ActionEventType.STEP_EVENT_TYPE_FAILED:
79
+ return "STEP_EVENT_TYPE_FAILED";
80
+ case ActionEventType.UNRECOGNIZED:
81
+ default:
82
+ return "UNRECOGNIZED";
83
+ }
84
+ }
85
+
86
+ export interface WorkerRegisterRequest {
87
+ /** the name of the worker */
88
+ workerName: string;
89
+ /** a list of actions that this worker can run */
90
+ actions: string[];
91
+ /** (optional) the services for this worker */
92
+ services: string[];
93
+ }
94
+
95
+ export interface WorkerRegisterResponse {
96
+ /** the tenant id */
97
+ tenantId: string;
98
+ /** the id of the worker */
99
+ workerId: string;
100
+ /** the name of the worker */
101
+ workerName: string;
102
+ }
103
+
104
+ export interface AssignedAction {
105
+ /** the tenant id */
106
+ tenantId: string;
107
+ /** the job id */
108
+ jobId: string;
109
+ /** the job name */
110
+ jobName: string;
111
+ /** the job run id */
112
+ jobRunId: string;
113
+ /** the step id */
114
+ stepId: string;
115
+ /** the step run id */
116
+ stepRunId: string;
117
+ /** the action id */
118
+ actionId: string;
119
+ /** the action type */
120
+ actionType: ActionType;
121
+ /** the action payload */
122
+ actionPayload: string;
123
+ }
124
+
125
+ export interface WorkerListenRequest {
126
+ /** the id of the worker */
127
+ workerId: string;
128
+ }
129
+
130
+ export interface WorkerUnsubscribeRequest {
131
+ /** the id of the worker */
132
+ workerId: string;
133
+ }
134
+
135
+ export interface WorkerUnsubscribeResponse {
136
+ /** the tenant id to unsubscribe from */
137
+ tenantId: string;
138
+ /** the id of the worker */
139
+ workerId: string;
140
+ }
141
+
142
+ export interface ActionEvent {
143
+ /** the id of the worker */
144
+ workerId: string;
145
+ /** the id of the job */
146
+ jobId: string;
147
+ /** the job run id */
148
+ jobRunId: string;
149
+ /** the id of the step */
150
+ stepId: string;
151
+ /** the step run id */
152
+ stepRunId: string;
153
+ /** the action id */
154
+ actionId: string;
155
+ eventTimestamp:
156
+ | Date
157
+ | undefined;
158
+ /** the step event type */
159
+ eventType: ActionEventType;
160
+ /** the event payload */
161
+ eventPayload: string;
162
+ }
163
+
164
+ export interface ActionEventResponse {
165
+ /** the tenant id */
166
+ tenantId: string;
167
+ /** the id of the worker */
168
+ workerId: string;
169
+ }
170
+
171
+ function createBaseWorkerRegisterRequest(): WorkerRegisterRequest {
172
+ return { workerName: "", actions: [], services: [] };
173
+ }
174
+
175
+ export const WorkerRegisterRequest = {
176
+ encode(message: WorkerRegisterRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
177
+ if (message.workerName !== "") {
178
+ writer.uint32(10).string(message.workerName);
179
+ }
180
+ for (const v of message.actions) {
181
+ writer.uint32(18).string(v!);
182
+ }
183
+ for (const v of message.services) {
184
+ writer.uint32(26).string(v!);
185
+ }
186
+ return writer;
187
+ },
188
+
189
+ decode(input: _m0.Reader | Uint8Array, length?: number): WorkerRegisterRequest {
190
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
191
+ let end = length === undefined ? reader.len : reader.pos + length;
192
+ const message = createBaseWorkerRegisterRequest();
193
+ while (reader.pos < end) {
194
+ const tag = reader.uint32();
195
+ switch (tag >>> 3) {
196
+ case 1:
197
+ if (tag !== 10) {
198
+ break;
199
+ }
200
+
201
+ message.workerName = reader.string();
202
+ continue;
203
+ case 2:
204
+ if (tag !== 18) {
205
+ break;
206
+ }
207
+
208
+ message.actions.push(reader.string());
209
+ continue;
210
+ case 3:
211
+ if (tag !== 26) {
212
+ break;
213
+ }
214
+
215
+ message.services.push(reader.string());
216
+ continue;
217
+ }
218
+ if ((tag & 7) === 4 || tag === 0) {
219
+ break;
220
+ }
221
+ reader.skipType(tag & 7);
222
+ }
223
+ return message;
224
+ },
225
+
226
+ fromJSON(object: any): WorkerRegisterRequest {
227
+ return {
228
+ workerName: isSet(object.workerName) ? globalThis.String(object.workerName) : "",
229
+ actions: globalThis.Array.isArray(object?.actions) ? object.actions.map((e: any) => globalThis.String(e)) : [],
230
+ services: globalThis.Array.isArray(object?.services) ? object.services.map((e: any) => globalThis.String(e)) : [],
231
+ };
232
+ },
233
+
234
+ toJSON(message: WorkerRegisterRequest): unknown {
235
+ const obj: any = {};
236
+ if (message.workerName !== "") {
237
+ obj.workerName = message.workerName;
238
+ }
239
+ if (message.actions?.length) {
240
+ obj.actions = message.actions;
241
+ }
242
+ if (message.services?.length) {
243
+ obj.services = message.services;
244
+ }
245
+ return obj;
246
+ },
247
+
248
+ create(base?: DeepPartial<WorkerRegisterRequest>): WorkerRegisterRequest {
249
+ return WorkerRegisterRequest.fromPartial(base ?? {});
250
+ },
251
+ fromPartial(object: DeepPartial<WorkerRegisterRequest>): WorkerRegisterRequest {
252
+ const message = createBaseWorkerRegisterRequest();
253
+ message.workerName = object.workerName ?? "";
254
+ message.actions = object.actions?.map((e) => e) || [];
255
+ message.services = object.services?.map((e) => e) || [];
256
+ return message;
257
+ },
258
+ };
259
+
260
+ function createBaseWorkerRegisterResponse(): WorkerRegisterResponse {
261
+ return { tenantId: "", workerId: "", workerName: "" };
262
+ }
263
+
264
+ export const WorkerRegisterResponse = {
265
+ encode(message: WorkerRegisterResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
266
+ if (message.tenantId !== "") {
267
+ writer.uint32(10).string(message.tenantId);
268
+ }
269
+ if (message.workerId !== "") {
270
+ writer.uint32(18).string(message.workerId);
271
+ }
272
+ if (message.workerName !== "") {
273
+ writer.uint32(26).string(message.workerName);
274
+ }
275
+ return writer;
276
+ },
277
+
278
+ decode(input: _m0.Reader | Uint8Array, length?: number): WorkerRegisterResponse {
279
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
280
+ let end = length === undefined ? reader.len : reader.pos + length;
281
+ const message = createBaseWorkerRegisterResponse();
282
+ while (reader.pos < end) {
283
+ const tag = reader.uint32();
284
+ switch (tag >>> 3) {
285
+ case 1:
286
+ if (tag !== 10) {
287
+ break;
288
+ }
289
+
290
+ message.tenantId = reader.string();
291
+ continue;
292
+ case 2:
293
+ if (tag !== 18) {
294
+ break;
295
+ }
296
+
297
+ message.workerId = reader.string();
298
+ continue;
299
+ case 3:
300
+ if (tag !== 26) {
301
+ break;
302
+ }
303
+
304
+ message.workerName = reader.string();
305
+ continue;
306
+ }
307
+ if ((tag & 7) === 4 || tag === 0) {
308
+ break;
309
+ }
310
+ reader.skipType(tag & 7);
311
+ }
312
+ return message;
313
+ },
314
+
315
+ fromJSON(object: any): WorkerRegisterResponse {
316
+ return {
317
+ tenantId: isSet(object.tenantId) ? globalThis.String(object.tenantId) : "",
318
+ workerId: isSet(object.workerId) ? globalThis.String(object.workerId) : "",
319
+ workerName: isSet(object.workerName) ? globalThis.String(object.workerName) : "",
320
+ };
321
+ },
322
+
323
+ toJSON(message: WorkerRegisterResponse): unknown {
324
+ const obj: any = {};
325
+ if (message.tenantId !== "") {
326
+ obj.tenantId = message.tenantId;
327
+ }
328
+ if (message.workerId !== "") {
329
+ obj.workerId = message.workerId;
330
+ }
331
+ if (message.workerName !== "") {
332
+ obj.workerName = message.workerName;
333
+ }
334
+ return obj;
335
+ },
336
+
337
+ create(base?: DeepPartial<WorkerRegisterResponse>): WorkerRegisterResponse {
338
+ return WorkerRegisterResponse.fromPartial(base ?? {});
339
+ },
340
+ fromPartial(object: DeepPartial<WorkerRegisterResponse>): WorkerRegisterResponse {
341
+ const message = createBaseWorkerRegisterResponse();
342
+ message.tenantId = object.tenantId ?? "";
343
+ message.workerId = object.workerId ?? "";
344
+ message.workerName = object.workerName ?? "";
345
+ return message;
346
+ },
347
+ };
348
+
349
+ function createBaseAssignedAction(): AssignedAction {
350
+ return {
351
+ tenantId: "",
352
+ jobId: "",
353
+ jobName: "",
354
+ jobRunId: "",
355
+ stepId: "",
356
+ stepRunId: "",
357
+ actionId: "",
358
+ actionType: 0,
359
+ actionPayload: "",
360
+ };
361
+ }
362
+
363
+ export const AssignedAction = {
364
+ encode(message: AssignedAction, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
365
+ if (message.tenantId !== "") {
366
+ writer.uint32(10).string(message.tenantId);
367
+ }
368
+ if (message.jobId !== "") {
369
+ writer.uint32(18).string(message.jobId);
370
+ }
371
+ if (message.jobName !== "") {
372
+ writer.uint32(26).string(message.jobName);
373
+ }
374
+ if (message.jobRunId !== "") {
375
+ writer.uint32(34).string(message.jobRunId);
376
+ }
377
+ if (message.stepId !== "") {
378
+ writer.uint32(42).string(message.stepId);
379
+ }
380
+ if (message.stepRunId !== "") {
381
+ writer.uint32(50).string(message.stepRunId);
382
+ }
383
+ if (message.actionId !== "") {
384
+ writer.uint32(58).string(message.actionId);
385
+ }
386
+ if (message.actionType !== 0) {
387
+ writer.uint32(64).int32(message.actionType);
388
+ }
389
+ if (message.actionPayload !== "") {
390
+ writer.uint32(74).string(message.actionPayload);
391
+ }
392
+ return writer;
393
+ },
394
+
395
+ decode(input: _m0.Reader | Uint8Array, length?: number): AssignedAction {
396
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
397
+ let end = length === undefined ? reader.len : reader.pos + length;
398
+ const message = createBaseAssignedAction();
399
+ while (reader.pos < end) {
400
+ const tag = reader.uint32();
401
+ switch (tag >>> 3) {
402
+ case 1:
403
+ if (tag !== 10) {
404
+ break;
405
+ }
406
+
407
+ message.tenantId = reader.string();
408
+ continue;
409
+ case 2:
410
+ if (tag !== 18) {
411
+ break;
412
+ }
413
+
414
+ message.jobId = reader.string();
415
+ continue;
416
+ case 3:
417
+ if (tag !== 26) {
418
+ break;
419
+ }
420
+
421
+ message.jobName = reader.string();
422
+ continue;
423
+ case 4:
424
+ if (tag !== 34) {
425
+ break;
426
+ }
427
+
428
+ message.jobRunId = reader.string();
429
+ continue;
430
+ case 5:
431
+ if (tag !== 42) {
432
+ break;
433
+ }
434
+
435
+ message.stepId = reader.string();
436
+ continue;
437
+ case 6:
438
+ if (tag !== 50) {
439
+ break;
440
+ }
441
+
442
+ message.stepRunId = reader.string();
443
+ continue;
444
+ case 7:
445
+ if (tag !== 58) {
446
+ break;
447
+ }
448
+
449
+ message.actionId = reader.string();
450
+ continue;
451
+ case 8:
452
+ if (tag !== 64) {
453
+ break;
454
+ }
455
+
456
+ message.actionType = reader.int32() as any;
457
+ continue;
458
+ case 9:
459
+ if (tag !== 74) {
460
+ break;
461
+ }
462
+
463
+ message.actionPayload = reader.string();
464
+ continue;
465
+ }
466
+ if ((tag & 7) === 4 || tag === 0) {
467
+ break;
468
+ }
469
+ reader.skipType(tag & 7);
470
+ }
471
+ return message;
472
+ },
473
+
474
+ fromJSON(object: any): AssignedAction {
475
+ return {
476
+ tenantId: isSet(object.tenantId) ? globalThis.String(object.tenantId) : "",
477
+ jobId: isSet(object.jobId) ? globalThis.String(object.jobId) : "",
478
+ jobName: isSet(object.jobName) ? globalThis.String(object.jobName) : "",
479
+ jobRunId: isSet(object.jobRunId) ? globalThis.String(object.jobRunId) : "",
480
+ stepId: isSet(object.stepId) ? globalThis.String(object.stepId) : "",
481
+ stepRunId: isSet(object.stepRunId) ? globalThis.String(object.stepRunId) : "",
482
+ actionId: isSet(object.actionId) ? globalThis.String(object.actionId) : "",
483
+ actionType: isSet(object.actionType) ? actionTypeFromJSON(object.actionType) : 0,
484
+ actionPayload: isSet(object.actionPayload) ? globalThis.String(object.actionPayload) : "",
485
+ };
486
+ },
487
+
488
+ toJSON(message: AssignedAction): unknown {
489
+ const obj: any = {};
490
+ if (message.tenantId !== "") {
491
+ obj.tenantId = message.tenantId;
492
+ }
493
+ if (message.jobId !== "") {
494
+ obj.jobId = message.jobId;
495
+ }
496
+ if (message.jobName !== "") {
497
+ obj.jobName = message.jobName;
498
+ }
499
+ if (message.jobRunId !== "") {
500
+ obj.jobRunId = message.jobRunId;
501
+ }
502
+ if (message.stepId !== "") {
503
+ obj.stepId = message.stepId;
504
+ }
505
+ if (message.stepRunId !== "") {
506
+ obj.stepRunId = message.stepRunId;
507
+ }
508
+ if (message.actionId !== "") {
509
+ obj.actionId = message.actionId;
510
+ }
511
+ if (message.actionType !== 0) {
512
+ obj.actionType = actionTypeToJSON(message.actionType);
513
+ }
514
+ if (message.actionPayload !== "") {
515
+ obj.actionPayload = message.actionPayload;
516
+ }
517
+ return obj;
518
+ },
519
+
520
+ create(base?: DeepPartial<AssignedAction>): AssignedAction {
521
+ return AssignedAction.fromPartial(base ?? {});
522
+ },
523
+ fromPartial(object: DeepPartial<AssignedAction>): AssignedAction {
524
+ const message = createBaseAssignedAction();
525
+ message.tenantId = object.tenantId ?? "";
526
+ message.jobId = object.jobId ?? "";
527
+ message.jobName = object.jobName ?? "";
528
+ message.jobRunId = object.jobRunId ?? "";
529
+ message.stepId = object.stepId ?? "";
530
+ message.stepRunId = object.stepRunId ?? "";
531
+ message.actionId = object.actionId ?? "";
532
+ message.actionType = object.actionType ?? 0;
533
+ message.actionPayload = object.actionPayload ?? "";
534
+ return message;
535
+ },
536
+ };
537
+
538
+ function createBaseWorkerListenRequest(): WorkerListenRequest {
539
+ return { workerId: "" };
540
+ }
541
+
542
+ export const WorkerListenRequest = {
543
+ encode(message: WorkerListenRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
544
+ if (message.workerId !== "") {
545
+ writer.uint32(10).string(message.workerId);
546
+ }
547
+ return writer;
548
+ },
549
+
550
+ decode(input: _m0.Reader | Uint8Array, length?: number): WorkerListenRequest {
551
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
552
+ let end = length === undefined ? reader.len : reader.pos + length;
553
+ const message = createBaseWorkerListenRequest();
554
+ while (reader.pos < end) {
555
+ const tag = reader.uint32();
556
+ switch (tag >>> 3) {
557
+ case 1:
558
+ if (tag !== 10) {
559
+ break;
560
+ }
561
+
562
+ message.workerId = reader.string();
563
+ continue;
564
+ }
565
+ if ((tag & 7) === 4 || tag === 0) {
566
+ break;
567
+ }
568
+ reader.skipType(tag & 7);
569
+ }
570
+ return message;
571
+ },
572
+
573
+ fromJSON(object: any): WorkerListenRequest {
574
+ return { workerId: isSet(object.workerId) ? globalThis.String(object.workerId) : "" };
575
+ },
576
+
577
+ toJSON(message: WorkerListenRequest): unknown {
578
+ const obj: any = {};
579
+ if (message.workerId !== "") {
580
+ obj.workerId = message.workerId;
581
+ }
582
+ return obj;
583
+ },
584
+
585
+ create(base?: DeepPartial<WorkerListenRequest>): WorkerListenRequest {
586
+ return WorkerListenRequest.fromPartial(base ?? {});
587
+ },
588
+ fromPartial(object: DeepPartial<WorkerListenRequest>): WorkerListenRequest {
589
+ const message = createBaseWorkerListenRequest();
590
+ message.workerId = object.workerId ?? "";
591
+ return message;
592
+ },
593
+ };
594
+
595
+ function createBaseWorkerUnsubscribeRequest(): WorkerUnsubscribeRequest {
596
+ return { workerId: "" };
597
+ }
598
+
599
+ export const WorkerUnsubscribeRequest = {
600
+ encode(message: WorkerUnsubscribeRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
601
+ if (message.workerId !== "") {
602
+ writer.uint32(10).string(message.workerId);
603
+ }
604
+ return writer;
605
+ },
606
+
607
+ decode(input: _m0.Reader | Uint8Array, length?: number): WorkerUnsubscribeRequest {
608
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
609
+ let end = length === undefined ? reader.len : reader.pos + length;
610
+ const message = createBaseWorkerUnsubscribeRequest();
611
+ while (reader.pos < end) {
612
+ const tag = reader.uint32();
613
+ switch (tag >>> 3) {
614
+ case 1:
615
+ if (tag !== 10) {
616
+ break;
617
+ }
618
+
619
+ message.workerId = reader.string();
620
+ continue;
621
+ }
622
+ if ((tag & 7) === 4 || tag === 0) {
623
+ break;
624
+ }
625
+ reader.skipType(tag & 7);
626
+ }
627
+ return message;
628
+ },
629
+
630
+ fromJSON(object: any): WorkerUnsubscribeRequest {
631
+ return { workerId: isSet(object.workerId) ? globalThis.String(object.workerId) : "" };
632
+ },
633
+
634
+ toJSON(message: WorkerUnsubscribeRequest): unknown {
635
+ const obj: any = {};
636
+ if (message.workerId !== "") {
637
+ obj.workerId = message.workerId;
638
+ }
639
+ return obj;
640
+ },
641
+
642
+ create(base?: DeepPartial<WorkerUnsubscribeRequest>): WorkerUnsubscribeRequest {
643
+ return WorkerUnsubscribeRequest.fromPartial(base ?? {});
644
+ },
645
+ fromPartial(object: DeepPartial<WorkerUnsubscribeRequest>): WorkerUnsubscribeRequest {
646
+ const message = createBaseWorkerUnsubscribeRequest();
647
+ message.workerId = object.workerId ?? "";
648
+ return message;
649
+ },
650
+ };
651
+
652
+ function createBaseWorkerUnsubscribeResponse(): WorkerUnsubscribeResponse {
653
+ return { tenantId: "", workerId: "" };
654
+ }
655
+
656
+ export const WorkerUnsubscribeResponse = {
657
+ encode(message: WorkerUnsubscribeResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
658
+ if (message.tenantId !== "") {
659
+ writer.uint32(10).string(message.tenantId);
660
+ }
661
+ if (message.workerId !== "") {
662
+ writer.uint32(18).string(message.workerId);
663
+ }
664
+ return writer;
665
+ },
666
+
667
+ decode(input: _m0.Reader | Uint8Array, length?: number): WorkerUnsubscribeResponse {
668
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
669
+ let end = length === undefined ? reader.len : reader.pos + length;
670
+ const message = createBaseWorkerUnsubscribeResponse();
671
+ while (reader.pos < end) {
672
+ const tag = reader.uint32();
673
+ switch (tag >>> 3) {
674
+ case 1:
675
+ if (tag !== 10) {
676
+ break;
677
+ }
678
+
679
+ message.tenantId = reader.string();
680
+ continue;
681
+ case 2:
682
+ if (tag !== 18) {
683
+ break;
684
+ }
685
+
686
+ message.workerId = reader.string();
687
+ continue;
688
+ }
689
+ if ((tag & 7) === 4 || tag === 0) {
690
+ break;
691
+ }
692
+ reader.skipType(tag & 7);
693
+ }
694
+ return message;
695
+ },
696
+
697
+ fromJSON(object: any): WorkerUnsubscribeResponse {
698
+ return {
699
+ tenantId: isSet(object.tenantId) ? globalThis.String(object.tenantId) : "",
700
+ workerId: isSet(object.workerId) ? globalThis.String(object.workerId) : "",
701
+ };
702
+ },
703
+
704
+ toJSON(message: WorkerUnsubscribeResponse): unknown {
705
+ const obj: any = {};
706
+ if (message.tenantId !== "") {
707
+ obj.tenantId = message.tenantId;
708
+ }
709
+ if (message.workerId !== "") {
710
+ obj.workerId = message.workerId;
711
+ }
712
+ return obj;
713
+ },
714
+
715
+ create(base?: DeepPartial<WorkerUnsubscribeResponse>): WorkerUnsubscribeResponse {
716
+ return WorkerUnsubscribeResponse.fromPartial(base ?? {});
717
+ },
718
+ fromPartial(object: DeepPartial<WorkerUnsubscribeResponse>): WorkerUnsubscribeResponse {
719
+ const message = createBaseWorkerUnsubscribeResponse();
720
+ message.tenantId = object.tenantId ?? "";
721
+ message.workerId = object.workerId ?? "";
722
+ return message;
723
+ },
724
+ };
725
+
726
+ function createBaseActionEvent(): ActionEvent {
727
+ return {
728
+ workerId: "",
729
+ jobId: "",
730
+ jobRunId: "",
731
+ stepId: "",
732
+ stepRunId: "",
733
+ actionId: "",
734
+ eventTimestamp: undefined,
735
+ eventType: 0,
736
+ eventPayload: "",
737
+ };
738
+ }
739
+
740
+ export const ActionEvent = {
741
+ encode(message: ActionEvent, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
742
+ if (message.workerId !== "") {
743
+ writer.uint32(10).string(message.workerId);
744
+ }
745
+ if (message.jobId !== "") {
746
+ writer.uint32(18).string(message.jobId);
747
+ }
748
+ if (message.jobRunId !== "") {
749
+ writer.uint32(26).string(message.jobRunId);
750
+ }
751
+ if (message.stepId !== "") {
752
+ writer.uint32(34).string(message.stepId);
753
+ }
754
+ if (message.stepRunId !== "") {
755
+ writer.uint32(42).string(message.stepRunId);
756
+ }
757
+ if (message.actionId !== "") {
758
+ writer.uint32(50).string(message.actionId);
759
+ }
760
+ if (message.eventTimestamp !== undefined) {
761
+ Timestamp.encode(toTimestamp(message.eventTimestamp), writer.uint32(58).fork()).ldelim();
762
+ }
763
+ if (message.eventType !== 0) {
764
+ writer.uint32(64).int32(message.eventType);
765
+ }
766
+ if (message.eventPayload !== "") {
767
+ writer.uint32(74).string(message.eventPayload);
768
+ }
769
+ return writer;
770
+ },
771
+
772
+ decode(input: _m0.Reader | Uint8Array, length?: number): ActionEvent {
773
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
774
+ let end = length === undefined ? reader.len : reader.pos + length;
775
+ const message = createBaseActionEvent();
776
+ while (reader.pos < end) {
777
+ const tag = reader.uint32();
778
+ switch (tag >>> 3) {
779
+ case 1:
780
+ if (tag !== 10) {
781
+ break;
782
+ }
783
+
784
+ message.workerId = reader.string();
785
+ continue;
786
+ case 2:
787
+ if (tag !== 18) {
788
+ break;
789
+ }
790
+
791
+ message.jobId = reader.string();
792
+ continue;
793
+ case 3:
794
+ if (tag !== 26) {
795
+ break;
796
+ }
797
+
798
+ message.jobRunId = reader.string();
799
+ continue;
800
+ case 4:
801
+ if (tag !== 34) {
802
+ break;
803
+ }
804
+
805
+ message.stepId = reader.string();
806
+ continue;
807
+ case 5:
808
+ if (tag !== 42) {
809
+ break;
810
+ }
811
+
812
+ message.stepRunId = reader.string();
813
+ continue;
814
+ case 6:
815
+ if (tag !== 50) {
816
+ break;
817
+ }
818
+
819
+ message.actionId = reader.string();
820
+ continue;
821
+ case 7:
822
+ if (tag !== 58) {
823
+ break;
824
+ }
825
+
826
+ message.eventTimestamp = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
827
+ continue;
828
+ case 8:
829
+ if (tag !== 64) {
830
+ break;
831
+ }
832
+
833
+ message.eventType = reader.int32() as any;
834
+ continue;
835
+ case 9:
836
+ if (tag !== 74) {
837
+ break;
838
+ }
839
+
840
+ message.eventPayload = reader.string();
841
+ continue;
842
+ }
843
+ if ((tag & 7) === 4 || tag === 0) {
844
+ break;
845
+ }
846
+ reader.skipType(tag & 7);
847
+ }
848
+ return message;
849
+ },
850
+
851
+ fromJSON(object: any): ActionEvent {
852
+ return {
853
+ workerId: isSet(object.workerId) ? globalThis.String(object.workerId) : "",
854
+ jobId: isSet(object.jobId) ? globalThis.String(object.jobId) : "",
855
+ jobRunId: isSet(object.jobRunId) ? globalThis.String(object.jobRunId) : "",
856
+ stepId: isSet(object.stepId) ? globalThis.String(object.stepId) : "",
857
+ stepRunId: isSet(object.stepRunId) ? globalThis.String(object.stepRunId) : "",
858
+ actionId: isSet(object.actionId) ? globalThis.String(object.actionId) : "",
859
+ eventTimestamp: isSet(object.eventTimestamp) ? fromJsonTimestamp(object.eventTimestamp) : undefined,
860
+ eventType: isSet(object.eventType) ? actionEventTypeFromJSON(object.eventType) : 0,
861
+ eventPayload: isSet(object.eventPayload) ? globalThis.String(object.eventPayload) : "",
862
+ };
863
+ },
864
+
865
+ toJSON(message: ActionEvent): unknown {
866
+ const obj: any = {};
867
+ if (message.workerId !== "") {
868
+ obj.workerId = message.workerId;
869
+ }
870
+ if (message.jobId !== "") {
871
+ obj.jobId = message.jobId;
872
+ }
873
+ if (message.jobRunId !== "") {
874
+ obj.jobRunId = message.jobRunId;
875
+ }
876
+ if (message.stepId !== "") {
877
+ obj.stepId = message.stepId;
878
+ }
879
+ if (message.stepRunId !== "") {
880
+ obj.stepRunId = message.stepRunId;
881
+ }
882
+ if (message.actionId !== "") {
883
+ obj.actionId = message.actionId;
884
+ }
885
+ if (message.eventTimestamp !== undefined) {
886
+ obj.eventTimestamp = message.eventTimestamp.toISOString();
887
+ }
888
+ if (message.eventType !== 0) {
889
+ obj.eventType = actionEventTypeToJSON(message.eventType);
890
+ }
891
+ if (message.eventPayload !== "") {
892
+ obj.eventPayload = message.eventPayload;
893
+ }
894
+ return obj;
895
+ },
896
+
897
+ create(base?: DeepPartial<ActionEvent>): ActionEvent {
898
+ return ActionEvent.fromPartial(base ?? {});
899
+ },
900
+ fromPartial(object: DeepPartial<ActionEvent>): ActionEvent {
901
+ const message = createBaseActionEvent();
902
+ message.workerId = object.workerId ?? "";
903
+ message.jobId = object.jobId ?? "";
904
+ message.jobRunId = object.jobRunId ?? "";
905
+ message.stepId = object.stepId ?? "";
906
+ message.stepRunId = object.stepRunId ?? "";
907
+ message.actionId = object.actionId ?? "";
908
+ message.eventTimestamp = object.eventTimestamp ?? undefined;
909
+ message.eventType = object.eventType ?? 0;
910
+ message.eventPayload = object.eventPayload ?? "";
911
+ return message;
912
+ },
913
+ };
914
+
915
+ function createBaseActionEventResponse(): ActionEventResponse {
916
+ return { tenantId: "", workerId: "" };
917
+ }
918
+
919
+ export const ActionEventResponse = {
920
+ encode(message: ActionEventResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
921
+ if (message.tenantId !== "") {
922
+ writer.uint32(10).string(message.tenantId);
923
+ }
924
+ if (message.workerId !== "") {
925
+ writer.uint32(18).string(message.workerId);
926
+ }
927
+ return writer;
928
+ },
929
+
930
+ decode(input: _m0.Reader | Uint8Array, length?: number): ActionEventResponse {
931
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
932
+ let end = length === undefined ? reader.len : reader.pos + length;
933
+ const message = createBaseActionEventResponse();
934
+ while (reader.pos < end) {
935
+ const tag = reader.uint32();
936
+ switch (tag >>> 3) {
937
+ case 1:
938
+ if (tag !== 10) {
939
+ break;
940
+ }
941
+
942
+ message.tenantId = reader.string();
943
+ continue;
944
+ case 2:
945
+ if (tag !== 18) {
946
+ break;
947
+ }
948
+
949
+ message.workerId = reader.string();
950
+ continue;
951
+ }
952
+ if ((tag & 7) === 4 || tag === 0) {
953
+ break;
954
+ }
955
+ reader.skipType(tag & 7);
956
+ }
957
+ return message;
958
+ },
959
+
960
+ fromJSON(object: any): ActionEventResponse {
961
+ return {
962
+ tenantId: isSet(object.tenantId) ? globalThis.String(object.tenantId) : "",
963
+ workerId: isSet(object.workerId) ? globalThis.String(object.workerId) : "",
964
+ };
965
+ },
966
+
967
+ toJSON(message: ActionEventResponse): unknown {
968
+ const obj: any = {};
969
+ if (message.tenantId !== "") {
970
+ obj.tenantId = message.tenantId;
971
+ }
972
+ if (message.workerId !== "") {
973
+ obj.workerId = message.workerId;
974
+ }
975
+ return obj;
976
+ },
977
+
978
+ create(base?: DeepPartial<ActionEventResponse>): ActionEventResponse {
979
+ return ActionEventResponse.fromPartial(base ?? {});
980
+ },
981
+ fromPartial(object: DeepPartial<ActionEventResponse>): ActionEventResponse {
982
+ const message = createBaseActionEventResponse();
983
+ message.tenantId = object.tenantId ?? "";
984
+ message.workerId = object.workerId ?? "";
985
+ return message;
986
+ },
987
+ };
988
+
989
+ export type DispatcherDefinition = typeof DispatcherDefinition;
990
+ export const DispatcherDefinition = {
991
+ name: "Dispatcher",
992
+ fullName: "Dispatcher",
993
+ methods: {
994
+ register: {
995
+ name: "Register",
996
+ requestType: WorkerRegisterRequest,
997
+ requestStream: false,
998
+ responseType: WorkerRegisterResponse,
999
+ responseStream: false,
1000
+ options: {},
1001
+ },
1002
+ listen: {
1003
+ name: "Listen",
1004
+ requestType: WorkerListenRequest,
1005
+ requestStream: false,
1006
+ responseType: AssignedAction,
1007
+ responseStream: true,
1008
+ options: {},
1009
+ },
1010
+ sendActionEvent: {
1011
+ name: "SendActionEvent",
1012
+ requestType: ActionEvent,
1013
+ requestStream: false,
1014
+ responseType: ActionEventResponse,
1015
+ responseStream: false,
1016
+ options: {},
1017
+ },
1018
+ unsubscribe: {
1019
+ name: "Unsubscribe",
1020
+ requestType: WorkerUnsubscribeRequest,
1021
+ requestStream: false,
1022
+ responseType: WorkerUnsubscribeResponse,
1023
+ responseStream: false,
1024
+ options: {},
1025
+ },
1026
+ },
1027
+ } as const;
1028
+
1029
+ export interface DispatcherServiceImplementation<CallContextExt = {}> {
1030
+ register(
1031
+ request: WorkerRegisterRequest,
1032
+ context: CallContext & CallContextExt,
1033
+ ): Promise<DeepPartial<WorkerRegisterResponse>>;
1034
+ listen(
1035
+ request: WorkerListenRequest,
1036
+ context: CallContext & CallContextExt,
1037
+ ): ServerStreamingMethodResult<DeepPartial<AssignedAction>>;
1038
+ sendActionEvent(
1039
+ request: ActionEvent,
1040
+ context: CallContext & CallContextExt,
1041
+ ): Promise<DeepPartial<ActionEventResponse>>;
1042
+ unsubscribe(
1043
+ request: WorkerUnsubscribeRequest,
1044
+ context: CallContext & CallContextExt,
1045
+ ): Promise<DeepPartial<WorkerUnsubscribeResponse>>;
1046
+ }
1047
+
1048
+ export interface DispatcherClient<CallOptionsExt = {}> {
1049
+ register(
1050
+ request: DeepPartial<WorkerRegisterRequest>,
1051
+ options?: CallOptions & CallOptionsExt,
1052
+ ): Promise<WorkerRegisterResponse>;
1053
+ listen(
1054
+ request: DeepPartial<WorkerListenRequest>,
1055
+ options?: CallOptions & CallOptionsExt,
1056
+ ): AsyncIterable<AssignedAction>;
1057
+ sendActionEvent(
1058
+ request: DeepPartial<ActionEvent>,
1059
+ options?: CallOptions & CallOptionsExt,
1060
+ ): Promise<ActionEventResponse>;
1061
+ unsubscribe(
1062
+ request: DeepPartial<WorkerUnsubscribeRequest>,
1063
+ options?: CallOptions & CallOptionsExt,
1064
+ ): Promise<WorkerUnsubscribeResponse>;
1065
+ }
1066
+
1067
+ type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
1068
+
1069
+ export type DeepPartial<T> = T extends Builtin ? T
1070
+ : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>>
1071
+ : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
1072
+ : T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
1073
+ : Partial<T>;
1074
+
1075
+ function toTimestamp(date: Date): Timestamp {
1076
+ const seconds = Math.trunc(date.getTime() / 1_000);
1077
+ const nanos = (date.getTime() % 1_000) * 1_000_000;
1078
+ return { seconds, nanos };
1079
+ }
1080
+
1081
+ function fromTimestamp(t: Timestamp): Date {
1082
+ let millis = (t.seconds || 0) * 1_000;
1083
+ millis += (t.nanos || 0) / 1_000_000;
1084
+ return new globalThis.Date(millis);
1085
+ }
1086
+
1087
+ function fromJsonTimestamp(o: any): Date {
1088
+ if (o instanceof globalThis.Date) {
1089
+ return o;
1090
+ } else if (typeof o === "string") {
1091
+ return new globalThis.Date(o);
1092
+ } else {
1093
+ return fromTimestamp(Timestamp.fromJSON(o));
1094
+ }
1095
+ }
1096
+
1097
+ function isSet(value: any): boolean {
1098
+ return value !== null && value !== undefined;
1099
+ }
1100
+
1101
+ export type ServerStreamingMethodResult<Response> = { [Symbol.asyncIterator](): AsyncIterator<Response, void> };