@hatchet-dev/typescript-sdk 0.0.3 → 0.0.7
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/package.json +24 -18
- package/README.md +0 -3
- package/dist/clients/admin/admin-client.d.ts +0 -14
- package/dist/clients/admin/admin-client.js +0 -50
- package/dist/clients/dispatcher/action-listener.d.ts +0 -24
- package/dist/clients/dispatcher/action-listener.js +0 -113
- package/dist/clients/dispatcher/dispatcher-client.d.ts +0 -17
- package/dist/clients/dispatcher/dispatcher-client.js +0 -46
- package/dist/clients/event/event-client.d.ts +0 -9
- package/dist/clients/event/event-client.js +0 -28
- package/dist/clients/hatchet-client/client-config.d.ts +0 -72
- package/dist/clients/hatchet-client/client-config.js +0 -17
- package/dist/clients/hatchet-client/hatchet-client.d.ts +0 -26
- package/dist/clients/hatchet-client/hatchet-client.js +0 -133
- package/dist/clients/hatchet-client/index.d.ts +0 -2
- package/dist/clients/hatchet-client/index.js +0 -18
- package/dist/clients/worker/index.d.ts +0 -1
- package/dist/clients/worker/index.js +0 -17
- package/dist/clients/worker/worker.d.ts +0 -31
- package/dist/clients/worker/worker.js +0 -228
- package/dist/index.d.ts +0 -2
- package/dist/index.js +0 -4
- package/dist/protoc/dispatcher/dispatcher.d.ts +0 -273
- package/dist/protoc/dispatcher/dispatcher.js +0 -918
- package/dist/protoc/dispatcher/index.d.ts +0 -1
- package/dist/protoc/dispatcher/index.js +0 -17
- package/dist/protoc/events/events.d.ts +0 -165
- package/dist/protoc/events/events.js +0 -443
- package/dist/protoc/events/index.d.ts +0 -1
- package/dist/protoc/events/index.js +0 -17
- package/dist/protoc/google/protobuf/timestamp.d.ts +0 -121
- package/dist/protoc/google/protobuf/timestamp.js +0 -110
- package/dist/protoc/google/protobuf/wrappers.d.ts +0 -160
- package/dist/protoc/google/protobuf/wrappers.js +0 -527
- package/dist/protoc/workflows/index.d.ts +0 -1
- package/dist/protoc/workflows/index.js +0 -17
- package/dist/protoc/workflows/workflows.d.ts +0 -438
- package/dist/protoc/workflows/workflows.js +0 -1814
- package/dist/sdk.d.ts +0 -2
- package/dist/sdk.js +0 -4
- package/dist/step.d.ts +0 -30
- package/dist/step.js +0 -63
- package/dist/util/config-loader/config-loader.d.ts +0 -13
- package/dist/util/config-loader/config-loader.js +0 -85
- package/dist/util/config-loader/index.d.ts +0 -1
- package/dist/util/config-loader/index.js +0 -17
- package/dist/util/errors/hatchet-error.d.ts +0 -4
- package/dist/util/errors/hatchet-error.js +0 -9
- package/dist/util/hatchet-promise/hatchet-promise.d.ts +0 -6
- package/dist/util/hatchet-promise/hatchet-promise.js +0 -12
- package/dist/util/logger/index.d.ts +0 -1
- package/dist/util/logger/index.js +0 -17
- package/dist/util/logger/logger.d.ts +0 -12
- package/dist/util/logger/logger.js +0 -37
- package/dist/util/sleep.d.ts +0 -2
- package/dist/util/sleep.js +0 -6
- package/dist/workflow.d.ts +0 -78
- package/dist/workflow.js +0 -44
|
@@ -1,918 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.DispatcherDefinition = exports.ActionEventResponse = exports.ActionEvent = exports.WorkerUnsubscribeResponse = exports.WorkerUnsubscribeRequest = exports.WorkerListenRequest = exports.AssignedAction = exports.WorkerRegisterResponse = exports.WorkerRegisterRequest = exports.actionEventTypeToJSON = exports.actionEventTypeFromJSON = exports.ActionEventType = exports.actionTypeToJSON = exports.actionTypeFromJSON = exports.ActionType = exports.protobufPackage = void 0;
|
|
27
|
-
const _m0 = __importStar(require("protobufjs/minimal"));
|
|
28
|
-
const timestamp_1 = require("../google/protobuf/timestamp");
|
|
29
|
-
exports.protobufPackage = "";
|
|
30
|
-
var ActionType;
|
|
31
|
-
(function (ActionType) {
|
|
32
|
-
ActionType[ActionType["START_STEP_RUN"] = 0] = "START_STEP_RUN";
|
|
33
|
-
ActionType[ActionType["CANCEL_STEP_RUN"] = 1] = "CANCEL_STEP_RUN";
|
|
34
|
-
ActionType[ActionType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
35
|
-
})(ActionType || (exports.ActionType = ActionType = {}));
|
|
36
|
-
function actionTypeFromJSON(object) {
|
|
37
|
-
switch (object) {
|
|
38
|
-
case 0:
|
|
39
|
-
case "START_STEP_RUN":
|
|
40
|
-
return ActionType.START_STEP_RUN;
|
|
41
|
-
case 1:
|
|
42
|
-
case "CANCEL_STEP_RUN":
|
|
43
|
-
return ActionType.CANCEL_STEP_RUN;
|
|
44
|
-
case -1:
|
|
45
|
-
case "UNRECOGNIZED":
|
|
46
|
-
default:
|
|
47
|
-
return ActionType.UNRECOGNIZED;
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
exports.actionTypeFromJSON = actionTypeFromJSON;
|
|
51
|
-
function actionTypeToJSON(object) {
|
|
52
|
-
switch (object) {
|
|
53
|
-
case ActionType.START_STEP_RUN:
|
|
54
|
-
return "START_STEP_RUN";
|
|
55
|
-
case ActionType.CANCEL_STEP_RUN:
|
|
56
|
-
return "CANCEL_STEP_RUN";
|
|
57
|
-
case ActionType.UNRECOGNIZED:
|
|
58
|
-
default:
|
|
59
|
-
return "UNRECOGNIZED";
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
exports.actionTypeToJSON = actionTypeToJSON;
|
|
63
|
-
var ActionEventType;
|
|
64
|
-
(function (ActionEventType) {
|
|
65
|
-
ActionEventType[ActionEventType["STEP_EVENT_TYPE_UNKNOWN"] = 0] = "STEP_EVENT_TYPE_UNKNOWN";
|
|
66
|
-
ActionEventType[ActionEventType["STEP_EVENT_TYPE_STARTED"] = 1] = "STEP_EVENT_TYPE_STARTED";
|
|
67
|
-
ActionEventType[ActionEventType["STEP_EVENT_TYPE_COMPLETED"] = 2] = "STEP_EVENT_TYPE_COMPLETED";
|
|
68
|
-
ActionEventType[ActionEventType["STEP_EVENT_TYPE_FAILED"] = 3] = "STEP_EVENT_TYPE_FAILED";
|
|
69
|
-
ActionEventType[ActionEventType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
70
|
-
})(ActionEventType || (exports.ActionEventType = ActionEventType = {}));
|
|
71
|
-
function actionEventTypeFromJSON(object) {
|
|
72
|
-
switch (object) {
|
|
73
|
-
case 0:
|
|
74
|
-
case "STEP_EVENT_TYPE_UNKNOWN":
|
|
75
|
-
return ActionEventType.STEP_EVENT_TYPE_UNKNOWN;
|
|
76
|
-
case 1:
|
|
77
|
-
case "STEP_EVENT_TYPE_STARTED":
|
|
78
|
-
return ActionEventType.STEP_EVENT_TYPE_STARTED;
|
|
79
|
-
case 2:
|
|
80
|
-
case "STEP_EVENT_TYPE_COMPLETED":
|
|
81
|
-
return ActionEventType.STEP_EVENT_TYPE_COMPLETED;
|
|
82
|
-
case 3:
|
|
83
|
-
case "STEP_EVENT_TYPE_FAILED":
|
|
84
|
-
return ActionEventType.STEP_EVENT_TYPE_FAILED;
|
|
85
|
-
case -1:
|
|
86
|
-
case "UNRECOGNIZED":
|
|
87
|
-
default:
|
|
88
|
-
return ActionEventType.UNRECOGNIZED;
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
exports.actionEventTypeFromJSON = actionEventTypeFromJSON;
|
|
92
|
-
function actionEventTypeToJSON(object) {
|
|
93
|
-
switch (object) {
|
|
94
|
-
case ActionEventType.STEP_EVENT_TYPE_UNKNOWN:
|
|
95
|
-
return "STEP_EVENT_TYPE_UNKNOWN";
|
|
96
|
-
case ActionEventType.STEP_EVENT_TYPE_STARTED:
|
|
97
|
-
return "STEP_EVENT_TYPE_STARTED";
|
|
98
|
-
case ActionEventType.STEP_EVENT_TYPE_COMPLETED:
|
|
99
|
-
return "STEP_EVENT_TYPE_COMPLETED";
|
|
100
|
-
case ActionEventType.STEP_EVENT_TYPE_FAILED:
|
|
101
|
-
return "STEP_EVENT_TYPE_FAILED";
|
|
102
|
-
case ActionEventType.UNRECOGNIZED:
|
|
103
|
-
default:
|
|
104
|
-
return "UNRECOGNIZED";
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
exports.actionEventTypeToJSON = actionEventTypeToJSON;
|
|
108
|
-
function createBaseWorkerRegisterRequest() {
|
|
109
|
-
return { workerName: "", actions: [], services: [] };
|
|
110
|
-
}
|
|
111
|
-
exports.WorkerRegisterRequest = {
|
|
112
|
-
encode(message, writer = _m0.Writer.create()) {
|
|
113
|
-
if (message.workerName !== "") {
|
|
114
|
-
writer.uint32(10).string(message.workerName);
|
|
115
|
-
}
|
|
116
|
-
for (const v of message.actions) {
|
|
117
|
-
writer.uint32(18).string(v);
|
|
118
|
-
}
|
|
119
|
-
for (const v of message.services) {
|
|
120
|
-
writer.uint32(26).string(v);
|
|
121
|
-
}
|
|
122
|
-
return writer;
|
|
123
|
-
},
|
|
124
|
-
decode(input, length) {
|
|
125
|
-
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
126
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
127
|
-
const message = createBaseWorkerRegisterRequest();
|
|
128
|
-
while (reader.pos < end) {
|
|
129
|
-
const tag = reader.uint32();
|
|
130
|
-
switch (tag >>> 3) {
|
|
131
|
-
case 1:
|
|
132
|
-
if (tag !== 10) {
|
|
133
|
-
break;
|
|
134
|
-
}
|
|
135
|
-
message.workerName = reader.string();
|
|
136
|
-
continue;
|
|
137
|
-
case 2:
|
|
138
|
-
if (tag !== 18) {
|
|
139
|
-
break;
|
|
140
|
-
}
|
|
141
|
-
message.actions.push(reader.string());
|
|
142
|
-
continue;
|
|
143
|
-
case 3:
|
|
144
|
-
if (tag !== 26) {
|
|
145
|
-
break;
|
|
146
|
-
}
|
|
147
|
-
message.services.push(reader.string());
|
|
148
|
-
continue;
|
|
149
|
-
}
|
|
150
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
151
|
-
break;
|
|
152
|
-
}
|
|
153
|
-
reader.skipType(tag & 7);
|
|
154
|
-
}
|
|
155
|
-
return message;
|
|
156
|
-
},
|
|
157
|
-
fromJSON(object) {
|
|
158
|
-
return {
|
|
159
|
-
workerName: isSet(object.workerName) ? globalThis.String(object.workerName) : "",
|
|
160
|
-
actions: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.actions) ? object.actions.map((e) => globalThis.String(e)) : [],
|
|
161
|
-
services: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.services) ? object.services.map((e) => globalThis.String(e)) : [],
|
|
162
|
-
};
|
|
163
|
-
},
|
|
164
|
-
toJSON(message) {
|
|
165
|
-
var _a, _b;
|
|
166
|
-
const obj = {};
|
|
167
|
-
if (message.workerName !== "") {
|
|
168
|
-
obj.workerName = message.workerName;
|
|
169
|
-
}
|
|
170
|
-
if ((_a = message.actions) === null || _a === void 0 ? void 0 : _a.length) {
|
|
171
|
-
obj.actions = message.actions;
|
|
172
|
-
}
|
|
173
|
-
if ((_b = message.services) === null || _b === void 0 ? void 0 : _b.length) {
|
|
174
|
-
obj.services = message.services;
|
|
175
|
-
}
|
|
176
|
-
return obj;
|
|
177
|
-
},
|
|
178
|
-
create(base) {
|
|
179
|
-
return exports.WorkerRegisterRequest.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
180
|
-
},
|
|
181
|
-
fromPartial(object) {
|
|
182
|
-
var _a, _b, _c;
|
|
183
|
-
const message = createBaseWorkerRegisterRequest();
|
|
184
|
-
message.workerName = (_a = object.workerName) !== null && _a !== void 0 ? _a : "";
|
|
185
|
-
message.actions = ((_b = object.actions) === null || _b === void 0 ? void 0 : _b.map((e) => e)) || [];
|
|
186
|
-
message.services = ((_c = object.services) === null || _c === void 0 ? void 0 : _c.map((e) => e)) || [];
|
|
187
|
-
return message;
|
|
188
|
-
},
|
|
189
|
-
};
|
|
190
|
-
function createBaseWorkerRegisterResponse() {
|
|
191
|
-
return { tenantId: "", workerId: "", workerName: "" };
|
|
192
|
-
}
|
|
193
|
-
exports.WorkerRegisterResponse = {
|
|
194
|
-
encode(message, writer = _m0.Writer.create()) {
|
|
195
|
-
if (message.tenantId !== "") {
|
|
196
|
-
writer.uint32(10).string(message.tenantId);
|
|
197
|
-
}
|
|
198
|
-
if (message.workerId !== "") {
|
|
199
|
-
writer.uint32(18).string(message.workerId);
|
|
200
|
-
}
|
|
201
|
-
if (message.workerName !== "") {
|
|
202
|
-
writer.uint32(26).string(message.workerName);
|
|
203
|
-
}
|
|
204
|
-
return writer;
|
|
205
|
-
},
|
|
206
|
-
decode(input, length) {
|
|
207
|
-
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
208
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
209
|
-
const message = createBaseWorkerRegisterResponse();
|
|
210
|
-
while (reader.pos < end) {
|
|
211
|
-
const tag = reader.uint32();
|
|
212
|
-
switch (tag >>> 3) {
|
|
213
|
-
case 1:
|
|
214
|
-
if (tag !== 10) {
|
|
215
|
-
break;
|
|
216
|
-
}
|
|
217
|
-
message.tenantId = reader.string();
|
|
218
|
-
continue;
|
|
219
|
-
case 2:
|
|
220
|
-
if (tag !== 18) {
|
|
221
|
-
break;
|
|
222
|
-
}
|
|
223
|
-
message.workerId = reader.string();
|
|
224
|
-
continue;
|
|
225
|
-
case 3:
|
|
226
|
-
if (tag !== 26) {
|
|
227
|
-
break;
|
|
228
|
-
}
|
|
229
|
-
message.workerName = reader.string();
|
|
230
|
-
continue;
|
|
231
|
-
}
|
|
232
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
233
|
-
break;
|
|
234
|
-
}
|
|
235
|
-
reader.skipType(tag & 7);
|
|
236
|
-
}
|
|
237
|
-
return message;
|
|
238
|
-
},
|
|
239
|
-
fromJSON(object) {
|
|
240
|
-
return {
|
|
241
|
-
tenantId: isSet(object.tenantId) ? globalThis.String(object.tenantId) : "",
|
|
242
|
-
workerId: isSet(object.workerId) ? globalThis.String(object.workerId) : "",
|
|
243
|
-
workerName: isSet(object.workerName) ? globalThis.String(object.workerName) : "",
|
|
244
|
-
};
|
|
245
|
-
},
|
|
246
|
-
toJSON(message) {
|
|
247
|
-
const obj = {};
|
|
248
|
-
if (message.tenantId !== "") {
|
|
249
|
-
obj.tenantId = message.tenantId;
|
|
250
|
-
}
|
|
251
|
-
if (message.workerId !== "") {
|
|
252
|
-
obj.workerId = message.workerId;
|
|
253
|
-
}
|
|
254
|
-
if (message.workerName !== "") {
|
|
255
|
-
obj.workerName = message.workerName;
|
|
256
|
-
}
|
|
257
|
-
return obj;
|
|
258
|
-
},
|
|
259
|
-
create(base) {
|
|
260
|
-
return exports.WorkerRegisterResponse.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
261
|
-
},
|
|
262
|
-
fromPartial(object) {
|
|
263
|
-
var _a, _b, _c;
|
|
264
|
-
const message = createBaseWorkerRegisterResponse();
|
|
265
|
-
message.tenantId = (_a = object.tenantId) !== null && _a !== void 0 ? _a : "";
|
|
266
|
-
message.workerId = (_b = object.workerId) !== null && _b !== void 0 ? _b : "";
|
|
267
|
-
message.workerName = (_c = object.workerName) !== null && _c !== void 0 ? _c : "";
|
|
268
|
-
return message;
|
|
269
|
-
},
|
|
270
|
-
};
|
|
271
|
-
function createBaseAssignedAction() {
|
|
272
|
-
return {
|
|
273
|
-
tenantId: "",
|
|
274
|
-
jobId: "",
|
|
275
|
-
jobName: "",
|
|
276
|
-
jobRunId: "",
|
|
277
|
-
stepId: "",
|
|
278
|
-
stepRunId: "",
|
|
279
|
-
actionId: "",
|
|
280
|
-
actionType: 0,
|
|
281
|
-
actionPayload: "",
|
|
282
|
-
};
|
|
283
|
-
}
|
|
284
|
-
exports.AssignedAction = {
|
|
285
|
-
encode(message, writer = _m0.Writer.create()) {
|
|
286
|
-
if (message.tenantId !== "") {
|
|
287
|
-
writer.uint32(10).string(message.tenantId);
|
|
288
|
-
}
|
|
289
|
-
if (message.jobId !== "") {
|
|
290
|
-
writer.uint32(18).string(message.jobId);
|
|
291
|
-
}
|
|
292
|
-
if (message.jobName !== "") {
|
|
293
|
-
writer.uint32(26).string(message.jobName);
|
|
294
|
-
}
|
|
295
|
-
if (message.jobRunId !== "") {
|
|
296
|
-
writer.uint32(34).string(message.jobRunId);
|
|
297
|
-
}
|
|
298
|
-
if (message.stepId !== "") {
|
|
299
|
-
writer.uint32(42).string(message.stepId);
|
|
300
|
-
}
|
|
301
|
-
if (message.stepRunId !== "") {
|
|
302
|
-
writer.uint32(50).string(message.stepRunId);
|
|
303
|
-
}
|
|
304
|
-
if (message.actionId !== "") {
|
|
305
|
-
writer.uint32(58).string(message.actionId);
|
|
306
|
-
}
|
|
307
|
-
if (message.actionType !== 0) {
|
|
308
|
-
writer.uint32(64).int32(message.actionType);
|
|
309
|
-
}
|
|
310
|
-
if (message.actionPayload !== "") {
|
|
311
|
-
writer.uint32(74).string(message.actionPayload);
|
|
312
|
-
}
|
|
313
|
-
return writer;
|
|
314
|
-
},
|
|
315
|
-
decode(input, length) {
|
|
316
|
-
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
317
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
318
|
-
const message = createBaseAssignedAction();
|
|
319
|
-
while (reader.pos < end) {
|
|
320
|
-
const tag = reader.uint32();
|
|
321
|
-
switch (tag >>> 3) {
|
|
322
|
-
case 1:
|
|
323
|
-
if (tag !== 10) {
|
|
324
|
-
break;
|
|
325
|
-
}
|
|
326
|
-
message.tenantId = reader.string();
|
|
327
|
-
continue;
|
|
328
|
-
case 2:
|
|
329
|
-
if (tag !== 18) {
|
|
330
|
-
break;
|
|
331
|
-
}
|
|
332
|
-
message.jobId = reader.string();
|
|
333
|
-
continue;
|
|
334
|
-
case 3:
|
|
335
|
-
if (tag !== 26) {
|
|
336
|
-
break;
|
|
337
|
-
}
|
|
338
|
-
message.jobName = reader.string();
|
|
339
|
-
continue;
|
|
340
|
-
case 4:
|
|
341
|
-
if (tag !== 34) {
|
|
342
|
-
break;
|
|
343
|
-
}
|
|
344
|
-
message.jobRunId = reader.string();
|
|
345
|
-
continue;
|
|
346
|
-
case 5:
|
|
347
|
-
if (tag !== 42) {
|
|
348
|
-
break;
|
|
349
|
-
}
|
|
350
|
-
message.stepId = reader.string();
|
|
351
|
-
continue;
|
|
352
|
-
case 6:
|
|
353
|
-
if (tag !== 50) {
|
|
354
|
-
break;
|
|
355
|
-
}
|
|
356
|
-
message.stepRunId = reader.string();
|
|
357
|
-
continue;
|
|
358
|
-
case 7:
|
|
359
|
-
if (tag !== 58) {
|
|
360
|
-
break;
|
|
361
|
-
}
|
|
362
|
-
message.actionId = reader.string();
|
|
363
|
-
continue;
|
|
364
|
-
case 8:
|
|
365
|
-
if (tag !== 64) {
|
|
366
|
-
break;
|
|
367
|
-
}
|
|
368
|
-
message.actionType = reader.int32();
|
|
369
|
-
continue;
|
|
370
|
-
case 9:
|
|
371
|
-
if (tag !== 74) {
|
|
372
|
-
break;
|
|
373
|
-
}
|
|
374
|
-
message.actionPayload = reader.string();
|
|
375
|
-
continue;
|
|
376
|
-
}
|
|
377
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
378
|
-
break;
|
|
379
|
-
}
|
|
380
|
-
reader.skipType(tag & 7);
|
|
381
|
-
}
|
|
382
|
-
return message;
|
|
383
|
-
},
|
|
384
|
-
fromJSON(object) {
|
|
385
|
-
return {
|
|
386
|
-
tenantId: isSet(object.tenantId) ? globalThis.String(object.tenantId) : "",
|
|
387
|
-
jobId: isSet(object.jobId) ? globalThis.String(object.jobId) : "",
|
|
388
|
-
jobName: isSet(object.jobName) ? globalThis.String(object.jobName) : "",
|
|
389
|
-
jobRunId: isSet(object.jobRunId) ? globalThis.String(object.jobRunId) : "",
|
|
390
|
-
stepId: isSet(object.stepId) ? globalThis.String(object.stepId) : "",
|
|
391
|
-
stepRunId: isSet(object.stepRunId) ? globalThis.String(object.stepRunId) : "",
|
|
392
|
-
actionId: isSet(object.actionId) ? globalThis.String(object.actionId) : "",
|
|
393
|
-
actionType: isSet(object.actionType) ? actionTypeFromJSON(object.actionType) : 0,
|
|
394
|
-
actionPayload: isSet(object.actionPayload) ? globalThis.String(object.actionPayload) : "",
|
|
395
|
-
};
|
|
396
|
-
},
|
|
397
|
-
toJSON(message) {
|
|
398
|
-
const obj = {};
|
|
399
|
-
if (message.tenantId !== "") {
|
|
400
|
-
obj.tenantId = message.tenantId;
|
|
401
|
-
}
|
|
402
|
-
if (message.jobId !== "") {
|
|
403
|
-
obj.jobId = message.jobId;
|
|
404
|
-
}
|
|
405
|
-
if (message.jobName !== "") {
|
|
406
|
-
obj.jobName = message.jobName;
|
|
407
|
-
}
|
|
408
|
-
if (message.jobRunId !== "") {
|
|
409
|
-
obj.jobRunId = message.jobRunId;
|
|
410
|
-
}
|
|
411
|
-
if (message.stepId !== "") {
|
|
412
|
-
obj.stepId = message.stepId;
|
|
413
|
-
}
|
|
414
|
-
if (message.stepRunId !== "") {
|
|
415
|
-
obj.stepRunId = message.stepRunId;
|
|
416
|
-
}
|
|
417
|
-
if (message.actionId !== "") {
|
|
418
|
-
obj.actionId = message.actionId;
|
|
419
|
-
}
|
|
420
|
-
if (message.actionType !== 0) {
|
|
421
|
-
obj.actionType = actionTypeToJSON(message.actionType);
|
|
422
|
-
}
|
|
423
|
-
if (message.actionPayload !== "") {
|
|
424
|
-
obj.actionPayload = message.actionPayload;
|
|
425
|
-
}
|
|
426
|
-
return obj;
|
|
427
|
-
},
|
|
428
|
-
create(base) {
|
|
429
|
-
return exports.AssignedAction.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
430
|
-
},
|
|
431
|
-
fromPartial(object) {
|
|
432
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
433
|
-
const message = createBaseAssignedAction();
|
|
434
|
-
message.tenantId = (_a = object.tenantId) !== null && _a !== void 0 ? _a : "";
|
|
435
|
-
message.jobId = (_b = object.jobId) !== null && _b !== void 0 ? _b : "";
|
|
436
|
-
message.jobName = (_c = object.jobName) !== null && _c !== void 0 ? _c : "";
|
|
437
|
-
message.jobRunId = (_d = object.jobRunId) !== null && _d !== void 0 ? _d : "";
|
|
438
|
-
message.stepId = (_e = object.stepId) !== null && _e !== void 0 ? _e : "";
|
|
439
|
-
message.stepRunId = (_f = object.stepRunId) !== null && _f !== void 0 ? _f : "";
|
|
440
|
-
message.actionId = (_g = object.actionId) !== null && _g !== void 0 ? _g : "";
|
|
441
|
-
message.actionType = (_h = object.actionType) !== null && _h !== void 0 ? _h : 0;
|
|
442
|
-
message.actionPayload = (_j = object.actionPayload) !== null && _j !== void 0 ? _j : "";
|
|
443
|
-
return message;
|
|
444
|
-
},
|
|
445
|
-
};
|
|
446
|
-
function createBaseWorkerListenRequest() {
|
|
447
|
-
return { workerId: "" };
|
|
448
|
-
}
|
|
449
|
-
exports.WorkerListenRequest = {
|
|
450
|
-
encode(message, writer = _m0.Writer.create()) {
|
|
451
|
-
if (message.workerId !== "") {
|
|
452
|
-
writer.uint32(10).string(message.workerId);
|
|
453
|
-
}
|
|
454
|
-
return writer;
|
|
455
|
-
},
|
|
456
|
-
decode(input, length) {
|
|
457
|
-
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
458
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
459
|
-
const message = createBaseWorkerListenRequest();
|
|
460
|
-
while (reader.pos < end) {
|
|
461
|
-
const tag = reader.uint32();
|
|
462
|
-
switch (tag >>> 3) {
|
|
463
|
-
case 1:
|
|
464
|
-
if (tag !== 10) {
|
|
465
|
-
break;
|
|
466
|
-
}
|
|
467
|
-
message.workerId = reader.string();
|
|
468
|
-
continue;
|
|
469
|
-
}
|
|
470
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
471
|
-
break;
|
|
472
|
-
}
|
|
473
|
-
reader.skipType(tag & 7);
|
|
474
|
-
}
|
|
475
|
-
return message;
|
|
476
|
-
},
|
|
477
|
-
fromJSON(object) {
|
|
478
|
-
return { workerId: isSet(object.workerId) ? globalThis.String(object.workerId) : "" };
|
|
479
|
-
},
|
|
480
|
-
toJSON(message) {
|
|
481
|
-
const obj = {};
|
|
482
|
-
if (message.workerId !== "") {
|
|
483
|
-
obj.workerId = message.workerId;
|
|
484
|
-
}
|
|
485
|
-
return obj;
|
|
486
|
-
},
|
|
487
|
-
create(base) {
|
|
488
|
-
return exports.WorkerListenRequest.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
489
|
-
},
|
|
490
|
-
fromPartial(object) {
|
|
491
|
-
var _a;
|
|
492
|
-
const message = createBaseWorkerListenRequest();
|
|
493
|
-
message.workerId = (_a = object.workerId) !== null && _a !== void 0 ? _a : "";
|
|
494
|
-
return message;
|
|
495
|
-
},
|
|
496
|
-
};
|
|
497
|
-
function createBaseWorkerUnsubscribeRequest() {
|
|
498
|
-
return { workerId: "" };
|
|
499
|
-
}
|
|
500
|
-
exports.WorkerUnsubscribeRequest = {
|
|
501
|
-
encode(message, writer = _m0.Writer.create()) {
|
|
502
|
-
if (message.workerId !== "") {
|
|
503
|
-
writer.uint32(10).string(message.workerId);
|
|
504
|
-
}
|
|
505
|
-
return writer;
|
|
506
|
-
},
|
|
507
|
-
decode(input, length) {
|
|
508
|
-
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
509
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
510
|
-
const message = createBaseWorkerUnsubscribeRequest();
|
|
511
|
-
while (reader.pos < end) {
|
|
512
|
-
const tag = reader.uint32();
|
|
513
|
-
switch (tag >>> 3) {
|
|
514
|
-
case 1:
|
|
515
|
-
if (tag !== 10) {
|
|
516
|
-
break;
|
|
517
|
-
}
|
|
518
|
-
message.workerId = reader.string();
|
|
519
|
-
continue;
|
|
520
|
-
}
|
|
521
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
522
|
-
break;
|
|
523
|
-
}
|
|
524
|
-
reader.skipType(tag & 7);
|
|
525
|
-
}
|
|
526
|
-
return message;
|
|
527
|
-
},
|
|
528
|
-
fromJSON(object) {
|
|
529
|
-
return { workerId: isSet(object.workerId) ? globalThis.String(object.workerId) : "" };
|
|
530
|
-
},
|
|
531
|
-
toJSON(message) {
|
|
532
|
-
const obj = {};
|
|
533
|
-
if (message.workerId !== "") {
|
|
534
|
-
obj.workerId = message.workerId;
|
|
535
|
-
}
|
|
536
|
-
return obj;
|
|
537
|
-
},
|
|
538
|
-
create(base) {
|
|
539
|
-
return exports.WorkerUnsubscribeRequest.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
540
|
-
},
|
|
541
|
-
fromPartial(object) {
|
|
542
|
-
var _a;
|
|
543
|
-
const message = createBaseWorkerUnsubscribeRequest();
|
|
544
|
-
message.workerId = (_a = object.workerId) !== null && _a !== void 0 ? _a : "";
|
|
545
|
-
return message;
|
|
546
|
-
},
|
|
547
|
-
};
|
|
548
|
-
function createBaseWorkerUnsubscribeResponse() {
|
|
549
|
-
return { tenantId: "", workerId: "" };
|
|
550
|
-
}
|
|
551
|
-
exports.WorkerUnsubscribeResponse = {
|
|
552
|
-
encode(message, writer = _m0.Writer.create()) {
|
|
553
|
-
if (message.tenantId !== "") {
|
|
554
|
-
writer.uint32(10).string(message.tenantId);
|
|
555
|
-
}
|
|
556
|
-
if (message.workerId !== "") {
|
|
557
|
-
writer.uint32(18).string(message.workerId);
|
|
558
|
-
}
|
|
559
|
-
return writer;
|
|
560
|
-
},
|
|
561
|
-
decode(input, length) {
|
|
562
|
-
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
563
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
564
|
-
const message = createBaseWorkerUnsubscribeResponse();
|
|
565
|
-
while (reader.pos < end) {
|
|
566
|
-
const tag = reader.uint32();
|
|
567
|
-
switch (tag >>> 3) {
|
|
568
|
-
case 1:
|
|
569
|
-
if (tag !== 10) {
|
|
570
|
-
break;
|
|
571
|
-
}
|
|
572
|
-
message.tenantId = reader.string();
|
|
573
|
-
continue;
|
|
574
|
-
case 2:
|
|
575
|
-
if (tag !== 18) {
|
|
576
|
-
break;
|
|
577
|
-
}
|
|
578
|
-
message.workerId = reader.string();
|
|
579
|
-
continue;
|
|
580
|
-
}
|
|
581
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
582
|
-
break;
|
|
583
|
-
}
|
|
584
|
-
reader.skipType(tag & 7);
|
|
585
|
-
}
|
|
586
|
-
return message;
|
|
587
|
-
},
|
|
588
|
-
fromJSON(object) {
|
|
589
|
-
return {
|
|
590
|
-
tenantId: isSet(object.tenantId) ? globalThis.String(object.tenantId) : "",
|
|
591
|
-
workerId: isSet(object.workerId) ? globalThis.String(object.workerId) : "",
|
|
592
|
-
};
|
|
593
|
-
},
|
|
594
|
-
toJSON(message) {
|
|
595
|
-
const obj = {};
|
|
596
|
-
if (message.tenantId !== "") {
|
|
597
|
-
obj.tenantId = message.tenantId;
|
|
598
|
-
}
|
|
599
|
-
if (message.workerId !== "") {
|
|
600
|
-
obj.workerId = message.workerId;
|
|
601
|
-
}
|
|
602
|
-
return obj;
|
|
603
|
-
},
|
|
604
|
-
create(base) {
|
|
605
|
-
return exports.WorkerUnsubscribeResponse.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
606
|
-
},
|
|
607
|
-
fromPartial(object) {
|
|
608
|
-
var _a, _b;
|
|
609
|
-
const message = createBaseWorkerUnsubscribeResponse();
|
|
610
|
-
message.tenantId = (_a = object.tenantId) !== null && _a !== void 0 ? _a : "";
|
|
611
|
-
message.workerId = (_b = object.workerId) !== null && _b !== void 0 ? _b : "";
|
|
612
|
-
return message;
|
|
613
|
-
},
|
|
614
|
-
};
|
|
615
|
-
function createBaseActionEvent() {
|
|
616
|
-
return {
|
|
617
|
-
workerId: "",
|
|
618
|
-
jobId: "",
|
|
619
|
-
jobRunId: "",
|
|
620
|
-
stepId: "",
|
|
621
|
-
stepRunId: "",
|
|
622
|
-
actionId: "",
|
|
623
|
-
eventTimestamp: undefined,
|
|
624
|
-
eventType: 0,
|
|
625
|
-
eventPayload: "",
|
|
626
|
-
};
|
|
627
|
-
}
|
|
628
|
-
exports.ActionEvent = {
|
|
629
|
-
encode(message, writer = _m0.Writer.create()) {
|
|
630
|
-
if (message.workerId !== "") {
|
|
631
|
-
writer.uint32(10).string(message.workerId);
|
|
632
|
-
}
|
|
633
|
-
if (message.jobId !== "") {
|
|
634
|
-
writer.uint32(18).string(message.jobId);
|
|
635
|
-
}
|
|
636
|
-
if (message.jobRunId !== "") {
|
|
637
|
-
writer.uint32(26).string(message.jobRunId);
|
|
638
|
-
}
|
|
639
|
-
if (message.stepId !== "") {
|
|
640
|
-
writer.uint32(34).string(message.stepId);
|
|
641
|
-
}
|
|
642
|
-
if (message.stepRunId !== "") {
|
|
643
|
-
writer.uint32(42).string(message.stepRunId);
|
|
644
|
-
}
|
|
645
|
-
if (message.actionId !== "") {
|
|
646
|
-
writer.uint32(50).string(message.actionId);
|
|
647
|
-
}
|
|
648
|
-
if (message.eventTimestamp !== undefined) {
|
|
649
|
-
timestamp_1.Timestamp.encode(toTimestamp(message.eventTimestamp), writer.uint32(58).fork()).ldelim();
|
|
650
|
-
}
|
|
651
|
-
if (message.eventType !== 0) {
|
|
652
|
-
writer.uint32(64).int32(message.eventType);
|
|
653
|
-
}
|
|
654
|
-
if (message.eventPayload !== "") {
|
|
655
|
-
writer.uint32(74).string(message.eventPayload);
|
|
656
|
-
}
|
|
657
|
-
return writer;
|
|
658
|
-
},
|
|
659
|
-
decode(input, length) {
|
|
660
|
-
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
661
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
662
|
-
const message = createBaseActionEvent();
|
|
663
|
-
while (reader.pos < end) {
|
|
664
|
-
const tag = reader.uint32();
|
|
665
|
-
switch (tag >>> 3) {
|
|
666
|
-
case 1:
|
|
667
|
-
if (tag !== 10) {
|
|
668
|
-
break;
|
|
669
|
-
}
|
|
670
|
-
message.workerId = reader.string();
|
|
671
|
-
continue;
|
|
672
|
-
case 2:
|
|
673
|
-
if (tag !== 18) {
|
|
674
|
-
break;
|
|
675
|
-
}
|
|
676
|
-
message.jobId = reader.string();
|
|
677
|
-
continue;
|
|
678
|
-
case 3:
|
|
679
|
-
if (tag !== 26) {
|
|
680
|
-
break;
|
|
681
|
-
}
|
|
682
|
-
message.jobRunId = reader.string();
|
|
683
|
-
continue;
|
|
684
|
-
case 4:
|
|
685
|
-
if (tag !== 34) {
|
|
686
|
-
break;
|
|
687
|
-
}
|
|
688
|
-
message.stepId = reader.string();
|
|
689
|
-
continue;
|
|
690
|
-
case 5:
|
|
691
|
-
if (tag !== 42) {
|
|
692
|
-
break;
|
|
693
|
-
}
|
|
694
|
-
message.stepRunId = reader.string();
|
|
695
|
-
continue;
|
|
696
|
-
case 6:
|
|
697
|
-
if (tag !== 50) {
|
|
698
|
-
break;
|
|
699
|
-
}
|
|
700
|
-
message.actionId = reader.string();
|
|
701
|
-
continue;
|
|
702
|
-
case 7:
|
|
703
|
-
if (tag !== 58) {
|
|
704
|
-
break;
|
|
705
|
-
}
|
|
706
|
-
message.eventTimestamp = fromTimestamp(timestamp_1.Timestamp.decode(reader, reader.uint32()));
|
|
707
|
-
continue;
|
|
708
|
-
case 8:
|
|
709
|
-
if (tag !== 64) {
|
|
710
|
-
break;
|
|
711
|
-
}
|
|
712
|
-
message.eventType = reader.int32();
|
|
713
|
-
continue;
|
|
714
|
-
case 9:
|
|
715
|
-
if (tag !== 74) {
|
|
716
|
-
break;
|
|
717
|
-
}
|
|
718
|
-
message.eventPayload = reader.string();
|
|
719
|
-
continue;
|
|
720
|
-
}
|
|
721
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
722
|
-
break;
|
|
723
|
-
}
|
|
724
|
-
reader.skipType(tag & 7);
|
|
725
|
-
}
|
|
726
|
-
return message;
|
|
727
|
-
},
|
|
728
|
-
fromJSON(object) {
|
|
729
|
-
return {
|
|
730
|
-
workerId: isSet(object.workerId) ? globalThis.String(object.workerId) : "",
|
|
731
|
-
jobId: isSet(object.jobId) ? globalThis.String(object.jobId) : "",
|
|
732
|
-
jobRunId: isSet(object.jobRunId) ? globalThis.String(object.jobRunId) : "",
|
|
733
|
-
stepId: isSet(object.stepId) ? globalThis.String(object.stepId) : "",
|
|
734
|
-
stepRunId: isSet(object.stepRunId) ? globalThis.String(object.stepRunId) : "",
|
|
735
|
-
actionId: isSet(object.actionId) ? globalThis.String(object.actionId) : "",
|
|
736
|
-
eventTimestamp: isSet(object.eventTimestamp) ? fromJsonTimestamp(object.eventTimestamp) : undefined,
|
|
737
|
-
eventType: isSet(object.eventType) ? actionEventTypeFromJSON(object.eventType) : 0,
|
|
738
|
-
eventPayload: isSet(object.eventPayload) ? globalThis.String(object.eventPayload) : "",
|
|
739
|
-
};
|
|
740
|
-
},
|
|
741
|
-
toJSON(message) {
|
|
742
|
-
const obj = {};
|
|
743
|
-
if (message.workerId !== "") {
|
|
744
|
-
obj.workerId = message.workerId;
|
|
745
|
-
}
|
|
746
|
-
if (message.jobId !== "") {
|
|
747
|
-
obj.jobId = message.jobId;
|
|
748
|
-
}
|
|
749
|
-
if (message.jobRunId !== "") {
|
|
750
|
-
obj.jobRunId = message.jobRunId;
|
|
751
|
-
}
|
|
752
|
-
if (message.stepId !== "") {
|
|
753
|
-
obj.stepId = message.stepId;
|
|
754
|
-
}
|
|
755
|
-
if (message.stepRunId !== "") {
|
|
756
|
-
obj.stepRunId = message.stepRunId;
|
|
757
|
-
}
|
|
758
|
-
if (message.actionId !== "") {
|
|
759
|
-
obj.actionId = message.actionId;
|
|
760
|
-
}
|
|
761
|
-
if (message.eventTimestamp !== undefined) {
|
|
762
|
-
obj.eventTimestamp = message.eventTimestamp.toISOString();
|
|
763
|
-
}
|
|
764
|
-
if (message.eventType !== 0) {
|
|
765
|
-
obj.eventType = actionEventTypeToJSON(message.eventType);
|
|
766
|
-
}
|
|
767
|
-
if (message.eventPayload !== "") {
|
|
768
|
-
obj.eventPayload = message.eventPayload;
|
|
769
|
-
}
|
|
770
|
-
return obj;
|
|
771
|
-
},
|
|
772
|
-
create(base) {
|
|
773
|
-
return exports.ActionEvent.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
774
|
-
},
|
|
775
|
-
fromPartial(object) {
|
|
776
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
777
|
-
const message = createBaseActionEvent();
|
|
778
|
-
message.workerId = (_a = object.workerId) !== null && _a !== void 0 ? _a : "";
|
|
779
|
-
message.jobId = (_b = object.jobId) !== null && _b !== void 0 ? _b : "";
|
|
780
|
-
message.jobRunId = (_c = object.jobRunId) !== null && _c !== void 0 ? _c : "";
|
|
781
|
-
message.stepId = (_d = object.stepId) !== null && _d !== void 0 ? _d : "";
|
|
782
|
-
message.stepRunId = (_e = object.stepRunId) !== null && _e !== void 0 ? _e : "";
|
|
783
|
-
message.actionId = (_f = object.actionId) !== null && _f !== void 0 ? _f : "";
|
|
784
|
-
message.eventTimestamp = (_g = object.eventTimestamp) !== null && _g !== void 0 ? _g : undefined;
|
|
785
|
-
message.eventType = (_h = object.eventType) !== null && _h !== void 0 ? _h : 0;
|
|
786
|
-
message.eventPayload = (_j = object.eventPayload) !== null && _j !== void 0 ? _j : "";
|
|
787
|
-
return message;
|
|
788
|
-
},
|
|
789
|
-
};
|
|
790
|
-
function createBaseActionEventResponse() {
|
|
791
|
-
return { tenantId: "", workerId: "" };
|
|
792
|
-
}
|
|
793
|
-
exports.ActionEventResponse = {
|
|
794
|
-
encode(message, writer = _m0.Writer.create()) {
|
|
795
|
-
if (message.tenantId !== "") {
|
|
796
|
-
writer.uint32(10).string(message.tenantId);
|
|
797
|
-
}
|
|
798
|
-
if (message.workerId !== "") {
|
|
799
|
-
writer.uint32(18).string(message.workerId);
|
|
800
|
-
}
|
|
801
|
-
return writer;
|
|
802
|
-
},
|
|
803
|
-
decode(input, length) {
|
|
804
|
-
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
805
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
806
|
-
const message = createBaseActionEventResponse();
|
|
807
|
-
while (reader.pos < end) {
|
|
808
|
-
const tag = reader.uint32();
|
|
809
|
-
switch (tag >>> 3) {
|
|
810
|
-
case 1:
|
|
811
|
-
if (tag !== 10) {
|
|
812
|
-
break;
|
|
813
|
-
}
|
|
814
|
-
message.tenantId = reader.string();
|
|
815
|
-
continue;
|
|
816
|
-
case 2:
|
|
817
|
-
if (tag !== 18) {
|
|
818
|
-
break;
|
|
819
|
-
}
|
|
820
|
-
message.workerId = reader.string();
|
|
821
|
-
continue;
|
|
822
|
-
}
|
|
823
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
824
|
-
break;
|
|
825
|
-
}
|
|
826
|
-
reader.skipType(tag & 7);
|
|
827
|
-
}
|
|
828
|
-
return message;
|
|
829
|
-
},
|
|
830
|
-
fromJSON(object) {
|
|
831
|
-
return {
|
|
832
|
-
tenantId: isSet(object.tenantId) ? globalThis.String(object.tenantId) : "",
|
|
833
|
-
workerId: isSet(object.workerId) ? globalThis.String(object.workerId) : "",
|
|
834
|
-
};
|
|
835
|
-
},
|
|
836
|
-
toJSON(message) {
|
|
837
|
-
const obj = {};
|
|
838
|
-
if (message.tenantId !== "") {
|
|
839
|
-
obj.tenantId = message.tenantId;
|
|
840
|
-
}
|
|
841
|
-
if (message.workerId !== "") {
|
|
842
|
-
obj.workerId = message.workerId;
|
|
843
|
-
}
|
|
844
|
-
return obj;
|
|
845
|
-
},
|
|
846
|
-
create(base) {
|
|
847
|
-
return exports.ActionEventResponse.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
848
|
-
},
|
|
849
|
-
fromPartial(object) {
|
|
850
|
-
var _a, _b;
|
|
851
|
-
const message = createBaseActionEventResponse();
|
|
852
|
-
message.tenantId = (_a = object.tenantId) !== null && _a !== void 0 ? _a : "";
|
|
853
|
-
message.workerId = (_b = object.workerId) !== null && _b !== void 0 ? _b : "";
|
|
854
|
-
return message;
|
|
855
|
-
},
|
|
856
|
-
};
|
|
857
|
-
exports.DispatcherDefinition = {
|
|
858
|
-
name: "Dispatcher",
|
|
859
|
-
fullName: "Dispatcher",
|
|
860
|
-
methods: {
|
|
861
|
-
register: {
|
|
862
|
-
name: "Register",
|
|
863
|
-
requestType: exports.WorkerRegisterRequest,
|
|
864
|
-
requestStream: false,
|
|
865
|
-
responseType: exports.WorkerRegisterResponse,
|
|
866
|
-
responseStream: false,
|
|
867
|
-
options: {},
|
|
868
|
-
},
|
|
869
|
-
listen: {
|
|
870
|
-
name: "Listen",
|
|
871
|
-
requestType: exports.WorkerListenRequest,
|
|
872
|
-
requestStream: false,
|
|
873
|
-
responseType: exports.AssignedAction,
|
|
874
|
-
responseStream: true,
|
|
875
|
-
options: {},
|
|
876
|
-
},
|
|
877
|
-
sendActionEvent: {
|
|
878
|
-
name: "SendActionEvent",
|
|
879
|
-
requestType: exports.ActionEvent,
|
|
880
|
-
requestStream: false,
|
|
881
|
-
responseType: exports.ActionEventResponse,
|
|
882
|
-
responseStream: false,
|
|
883
|
-
options: {},
|
|
884
|
-
},
|
|
885
|
-
unsubscribe: {
|
|
886
|
-
name: "Unsubscribe",
|
|
887
|
-
requestType: exports.WorkerUnsubscribeRequest,
|
|
888
|
-
requestStream: false,
|
|
889
|
-
responseType: exports.WorkerUnsubscribeResponse,
|
|
890
|
-
responseStream: false,
|
|
891
|
-
options: {},
|
|
892
|
-
},
|
|
893
|
-
},
|
|
894
|
-
};
|
|
895
|
-
function toTimestamp(date) {
|
|
896
|
-
const seconds = Math.trunc(date.getTime() / 1000);
|
|
897
|
-
const nanos = (date.getTime() % 1000) * 1000000;
|
|
898
|
-
return { seconds, nanos };
|
|
899
|
-
}
|
|
900
|
-
function fromTimestamp(t) {
|
|
901
|
-
let millis = (t.seconds || 0) * 1000;
|
|
902
|
-
millis += (t.nanos || 0) / 1000000;
|
|
903
|
-
return new globalThis.Date(millis);
|
|
904
|
-
}
|
|
905
|
-
function fromJsonTimestamp(o) {
|
|
906
|
-
if (o instanceof globalThis.Date) {
|
|
907
|
-
return o;
|
|
908
|
-
}
|
|
909
|
-
else if (typeof o === "string") {
|
|
910
|
-
return new globalThis.Date(o);
|
|
911
|
-
}
|
|
912
|
-
else {
|
|
913
|
-
return fromTimestamp(timestamp_1.Timestamp.fromJSON(o));
|
|
914
|
-
}
|
|
915
|
-
}
|
|
916
|
-
function isSet(value) {
|
|
917
|
-
return value !== null && value !== undefined;
|
|
918
|
-
}
|