@hatchet-dev/typescript-sdk 0.1.30 → 0.2.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.
@@ -26,7 +26,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
26
26
  exports.WorkflowServiceDefinition = exports.TriggerWorkflowResponse = exports.TriggerWorkflowRequest = exports.WorkflowTriggerCronRef = exports.WorkflowTriggerEventRef = exports.WorkflowVersion = exports.ScheduleWorkflowRequest = exports.ListWorkflowsRequest = exports.CreateWorkflowStepOpts = exports.CreateWorkflowJobOpts = exports.WorkflowConcurrencyOpts = exports.CreateWorkflowVersionOpts = exports.PutWorkflowRequest = exports.concurrencyLimitStrategyToJSON = exports.concurrencyLimitStrategyFromJSON = exports.ConcurrencyLimitStrategy = exports.protobufPackage = void 0;
27
27
  const _m0 = __importStar(require("protobufjs/minimal"));
28
28
  const timestamp_1 = require("../google/protobuf/timestamp");
29
- exports.protobufPackage = "";
29
+ exports.protobufPackage = '';
30
30
  var ConcurrencyLimitStrategy;
31
31
  (function (ConcurrencyLimitStrategy) {
32
32
  ConcurrencyLimitStrategy[ConcurrencyLimitStrategy["CANCEL_IN_PROGRESS"] = 0] = "CANCEL_IN_PROGRESS";
@@ -38,19 +38,19 @@ var ConcurrencyLimitStrategy;
38
38
  function concurrencyLimitStrategyFromJSON(object) {
39
39
  switch (object) {
40
40
  case 0:
41
- case "CANCEL_IN_PROGRESS":
41
+ case 'CANCEL_IN_PROGRESS':
42
42
  return ConcurrencyLimitStrategy.CANCEL_IN_PROGRESS;
43
43
  case 1:
44
- case "DROP_NEWEST":
44
+ case 'DROP_NEWEST':
45
45
  return ConcurrencyLimitStrategy.DROP_NEWEST;
46
46
  case 2:
47
- case "QUEUE_NEWEST":
47
+ case 'QUEUE_NEWEST':
48
48
  return ConcurrencyLimitStrategy.QUEUE_NEWEST;
49
49
  case 3:
50
- case "GROUP_ROUND_ROBIN":
50
+ case 'GROUP_ROUND_ROBIN':
51
51
  return ConcurrencyLimitStrategy.GROUP_ROUND_ROBIN;
52
52
  case -1:
53
- case "UNRECOGNIZED":
53
+ case 'UNRECOGNIZED':
54
54
  default:
55
55
  return ConcurrencyLimitStrategy.UNRECOGNIZED;
56
56
  }
@@ -59,16 +59,16 @@ exports.concurrencyLimitStrategyFromJSON = concurrencyLimitStrategyFromJSON;
59
59
  function concurrencyLimitStrategyToJSON(object) {
60
60
  switch (object) {
61
61
  case ConcurrencyLimitStrategy.CANCEL_IN_PROGRESS:
62
- return "CANCEL_IN_PROGRESS";
62
+ return 'CANCEL_IN_PROGRESS';
63
63
  case ConcurrencyLimitStrategy.DROP_NEWEST:
64
- return "DROP_NEWEST";
64
+ return 'DROP_NEWEST';
65
65
  case ConcurrencyLimitStrategy.QUEUE_NEWEST:
66
- return "QUEUE_NEWEST";
66
+ return 'QUEUE_NEWEST';
67
67
  case ConcurrencyLimitStrategy.GROUP_ROUND_ROBIN:
68
- return "GROUP_ROUND_ROBIN";
68
+ return 'GROUP_ROUND_ROBIN';
69
69
  case ConcurrencyLimitStrategy.UNRECOGNIZED:
70
70
  default:
71
- return "UNRECOGNIZED";
71
+ return 'UNRECOGNIZED';
72
72
  }
73
73
  }
74
74
  exports.concurrencyLimitStrategyToJSON = concurrencyLimitStrategyToJSON;
@@ -104,7 +104,9 @@ exports.PutWorkflowRequest = {
104
104
  return message;
105
105
  },
106
106
  fromJSON(object) {
107
- return { opts: isSet(object.opts) ? exports.CreateWorkflowVersionOpts.fromJSON(object.opts) : undefined };
107
+ return {
108
+ opts: isSet(object.opts) ? exports.CreateWorkflowVersionOpts.fromJSON(object.opts) : undefined,
109
+ };
108
110
  },
109
111
  toJSON(message) {
110
112
  const obj = {};
@@ -118,17 +120,18 @@ exports.PutWorkflowRequest = {
118
120
  },
119
121
  fromPartial(object) {
120
122
  const message = createBasePutWorkflowRequest();
121
- message.opts = (object.opts !== undefined && object.opts !== null)
122
- ? exports.CreateWorkflowVersionOpts.fromPartial(object.opts)
123
- : undefined;
123
+ message.opts =
124
+ object.opts !== undefined && object.opts !== null
125
+ ? exports.CreateWorkflowVersionOpts.fromPartial(object.opts)
126
+ : undefined;
124
127
  return message;
125
128
  },
126
129
  };
127
130
  function createBaseCreateWorkflowVersionOpts() {
128
131
  return {
129
- name: "",
130
- description: "",
131
- version: "",
132
+ name: '',
133
+ description: '',
134
+ version: '',
132
135
  eventTriggers: [],
133
136
  cronTriggers: [],
134
137
  scheduledTriggers: [],
@@ -139,13 +142,13 @@ function createBaseCreateWorkflowVersionOpts() {
139
142
  }
140
143
  exports.CreateWorkflowVersionOpts = {
141
144
  encode(message, writer = _m0.Writer.create()) {
142
- if (message.name !== "") {
145
+ if (message.name !== '') {
143
146
  writer.uint32(10).string(message.name);
144
147
  }
145
- if (message.description !== "") {
148
+ if (message.description !== '') {
146
149
  writer.uint32(18).string(message.description);
147
150
  }
148
- if (message.version !== "") {
151
+ if (message.version !== '') {
149
152
  writer.uint32(26).string(message.version);
150
153
  }
151
154
  for (const v of message.eventTriggers) {
@@ -239,9 +242,9 @@ exports.CreateWorkflowVersionOpts = {
239
242
  },
240
243
  fromJSON(object) {
241
244
  return {
242
- name: isSet(object.name) ? globalThis.String(object.name) : "",
243
- description: isSet(object.description) ? globalThis.String(object.description) : "",
244
- version: isSet(object.version) ? globalThis.String(object.version) : "",
245
+ name: isSet(object.name) ? globalThis.String(object.name) : '',
246
+ description: isSet(object.description) ? globalThis.String(object.description) : '',
247
+ version: isSet(object.version) ? globalThis.String(object.version) : '',
245
248
  eventTriggers: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.eventTriggers)
246
249
  ? object.eventTriggers.map((e) => globalThis.String(e))
247
250
  : [],
@@ -254,20 +257,24 @@ exports.CreateWorkflowVersionOpts = {
254
257
  jobs: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.jobs)
255
258
  ? object.jobs.map((e) => exports.CreateWorkflowJobOpts.fromJSON(e))
256
259
  : [],
257
- concurrency: isSet(object.concurrency) ? exports.WorkflowConcurrencyOpts.fromJSON(object.concurrency) : undefined,
258
- scheduleTimeout: isSet(object.scheduleTimeout) ? globalThis.String(object.scheduleTimeout) : undefined,
260
+ concurrency: isSet(object.concurrency)
261
+ ? exports.WorkflowConcurrencyOpts.fromJSON(object.concurrency)
262
+ : undefined,
263
+ scheduleTimeout: isSet(object.scheduleTimeout)
264
+ ? globalThis.String(object.scheduleTimeout)
265
+ : undefined,
259
266
  };
260
267
  },
261
268
  toJSON(message) {
262
269
  var _a, _b, _c, _d;
263
270
  const obj = {};
264
- if (message.name !== "") {
271
+ if (message.name !== '') {
265
272
  obj.name = message.name;
266
273
  }
267
- if (message.description !== "") {
274
+ if (message.description !== '') {
268
275
  obj.description = message.description;
269
276
  }
270
- if (message.version !== "") {
277
+ if (message.version !== '') {
271
278
  obj.version = message.version;
272
279
  }
273
280
  if ((_a = message.eventTriggers) === null || _a === void 0 ? void 0 : _a.length) {
@@ -296,26 +303,27 @@ exports.CreateWorkflowVersionOpts = {
296
303
  fromPartial(object) {
297
304
  var _a, _b, _c, _d, _e, _f, _g, _h;
298
305
  const message = createBaseCreateWorkflowVersionOpts();
299
- message.name = (_a = object.name) !== null && _a !== void 0 ? _a : "";
300
- message.description = (_b = object.description) !== null && _b !== void 0 ? _b : "";
301
- message.version = (_c = object.version) !== null && _c !== void 0 ? _c : "";
306
+ message.name = (_a = object.name) !== null && _a !== void 0 ? _a : '';
307
+ message.description = (_b = object.description) !== null && _b !== void 0 ? _b : '';
308
+ message.version = (_c = object.version) !== null && _c !== void 0 ? _c : '';
302
309
  message.eventTriggers = ((_d = object.eventTriggers) === null || _d === void 0 ? void 0 : _d.map((e) => e)) || [];
303
310
  message.cronTriggers = ((_e = object.cronTriggers) === null || _e === void 0 ? void 0 : _e.map((e) => e)) || [];
304
311
  message.scheduledTriggers = ((_f = object.scheduledTriggers) === null || _f === void 0 ? void 0 : _f.map((e) => e)) || [];
305
312
  message.jobs = ((_g = object.jobs) === null || _g === void 0 ? void 0 : _g.map((e) => exports.CreateWorkflowJobOpts.fromPartial(e))) || [];
306
- message.concurrency = (object.concurrency !== undefined && object.concurrency !== null)
307
- ? exports.WorkflowConcurrencyOpts.fromPartial(object.concurrency)
308
- : undefined;
313
+ message.concurrency =
314
+ object.concurrency !== undefined && object.concurrency !== null
315
+ ? exports.WorkflowConcurrencyOpts.fromPartial(object.concurrency)
316
+ : undefined;
309
317
  message.scheduleTimeout = (_h = object.scheduleTimeout) !== null && _h !== void 0 ? _h : undefined;
310
318
  return message;
311
319
  },
312
320
  };
313
321
  function createBaseWorkflowConcurrencyOpts() {
314
- return { action: "", maxRuns: 0, limitStrategy: 0 };
322
+ return { action: '', maxRuns: 0, limitStrategy: 0 };
315
323
  }
316
324
  exports.WorkflowConcurrencyOpts = {
317
325
  encode(message, writer = _m0.Writer.create()) {
318
- if (message.action !== "") {
326
+ if (message.action !== '') {
319
327
  writer.uint32(10).string(message.action);
320
328
  }
321
329
  if (message.maxRuns !== 0) {
@@ -361,14 +369,16 @@ exports.WorkflowConcurrencyOpts = {
361
369
  },
362
370
  fromJSON(object) {
363
371
  return {
364
- action: isSet(object.action) ? globalThis.String(object.action) : "",
372
+ action: isSet(object.action) ? globalThis.String(object.action) : '',
365
373
  maxRuns: isSet(object.maxRuns) ? globalThis.Number(object.maxRuns) : 0,
366
- limitStrategy: isSet(object.limitStrategy) ? concurrencyLimitStrategyFromJSON(object.limitStrategy) : 0,
374
+ limitStrategy: isSet(object.limitStrategy)
375
+ ? concurrencyLimitStrategyFromJSON(object.limitStrategy)
376
+ : 0,
367
377
  };
368
378
  },
369
379
  toJSON(message) {
370
380
  const obj = {};
371
- if (message.action !== "") {
381
+ if (message.action !== '') {
372
382
  obj.action = message.action;
373
383
  }
374
384
  if (message.maxRuns !== 0) {
@@ -385,24 +395,24 @@ exports.WorkflowConcurrencyOpts = {
385
395
  fromPartial(object) {
386
396
  var _a, _b, _c;
387
397
  const message = createBaseWorkflowConcurrencyOpts();
388
- message.action = (_a = object.action) !== null && _a !== void 0 ? _a : "";
398
+ message.action = (_a = object.action) !== null && _a !== void 0 ? _a : '';
389
399
  message.maxRuns = (_b = object.maxRuns) !== null && _b !== void 0 ? _b : 0;
390
400
  message.limitStrategy = (_c = object.limitStrategy) !== null && _c !== void 0 ? _c : 0;
391
401
  return message;
392
402
  },
393
403
  };
394
404
  function createBaseCreateWorkflowJobOpts() {
395
- return { name: "", description: "", timeout: "", steps: [] };
405
+ return { name: '', description: '', timeout: '', steps: [] };
396
406
  }
397
407
  exports.CreateWorkflowJobOpts = {
398
408
  encode(message, writer = _m0.Writer.create()) {
399
- if (message.name !== "") {
409
+ if (message.name !== '') {
400
410
  writer.uint32(10).string(message.name);
401
411
  }
402
- if (message.description !== "") {
412
+ if (message.description !== '') {
403
413
  writer.uint32(18).string(message.description);
404
414
  }
405
- if (message.timeout !== "") {
415
+ if (message.timeout !== '') {
406
416
  writer.uint32(26).string(message.timeout);
407
417
  }
408
418
  for (const v of message.steps) {
@@ -451,9 +461,9 @@ exports.CreateWorkflowJobOpts = {
451
461
  },
452
462
  fromJSON(object) {
453
463
  return {
454
- name: isSet(object.name) ? globalThis.String(object.name) : "",
455
- description: isSet(object.description) ? globalThis.String(object.description) : "",
456
- timeout: isSet(object.timeout) ? globalThis.String(object.timeout) : "",
464
+ name: isSet(object.name) ? globalThis.String(object.name) : '',
465
+ description: isSet(object.description) ? globalThis.String(object.description) : '',
466
+ timeout: isSet(object.timeout) ? globalThis.String(object.timeout) : '',
457
467
  steps: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.steps)
458
468
  ? object.steps.map((e) => exports.CreateWorkflowStepOpts.fromJSON(e))
459
469
  : [],
@@ -462,13 +472,13 @@ exports.CreateWorkflowJobOpts = {
462
472
  toJSON(message) {
463
473
  var _a;
464
474
  const obj = {};
465
- if (message.name !== "") {
475
+ if (message.name !== '') {
466
476
  obj.name = message.name;
467
477
  }
468
- if (message.description !== "") {
478
+ if (message.description !== '') {
469
479
  obj.description = message.description;
470
480
  }
471
- if (message.timeout !== "") {
481
+ if (message.timeout !== '') {
472
482
  obj.timeout = message.timeout;
473
483
  }
474
484
  if ((_a = message.steps) === null || _a === void 0 ? void 0 : _a.length) {
@@ -482,34 +492,42 @@ exports.CreateWorkflowJobOpts = {
482
492
  fromPartial(object) {
483
493
  var _a, _b, _c, _d;
484
494
  const message = createBaseCreateWorkflowJobOpts();
485
- message.name = (_a = object.name) !== null && _a !== void 0 ? _a : "";
486
- message.description = (_b = object.description) !== null && _b !== void 0 ? _b : "";
487
- message.timeout = (_c = object.timeout) !== null && _c !== void 0 ? _c : "";
495
+ message.name = (_a = object.name) !== null && _a !== void 0 ? _a : '';
496
+ message.description = (_b = object.description) !== null && _b !== void 0 ? _b : '';
497
+ message.timeout = (_c = object.timeout) !== null && _c !== void 0 ? _c : '';
488
498
  message.steps = ((_d = object.steps) === null || _d === void 0 ? void 0 : _d.map((e) => exports.CreateWorkflowStepOpts.fromPartial(e))) || [];
489
499
  return message;
490
500
  },
491
501
  };
492
502
  function createBaseCreateWorkflowStepOpts() {
493
- return { readableId: "", action: "", timeout: "", inputs: "", parents: [], userData: "", retries: 0 };
503
+ return {
504
+ readableId: '',
505
+ action: '',
506
+ timeout: '',
507
+ inputs: '',
508
+ parents: [],
509
+ userData: '',
510
+ retries: 0,
511
+ };
494
512
  }
495
513
  exports.CreateWorkflowStepOpts = {
496
514
  encode(message, writer = _m0.Writer.create()) {
497
- if (message.readableId !== "") {
515
+ if (message.readableId !== '') {
498
516
  writer.uint32(10).string(message.readableId);
499
517
  }
500
- if (message.action !== "") {
518
+ if (message.action !== '') {
501
519
  writer.uint32(18).string(message.action);
502
520
  }
503
- if (message.timeout !== "") {
521
+ if (message.timeout !== '') {
504
522
  writer.uint32(26).string(message.timeout);
505
523
  }
506
- if (message.inputs !== "") {
524
+ if (message.inputs !== '') {
507
525
  writer.uint32(34).string(message.inputs);
508
526
  }
509
527
  for (const v of message.parents) {
510
528
  writer.uint32(42).string(v);
511
529
  }
512
- if (message.userData !== "") {
530
+ if (message.userData !== '') {
513
531
  writer.uint32(50).string(message.userData);
514
532
  }
515
533
  if (message.retries !== 0) {
@@ -576,34 +594,36 @@ exports.CreateWorkflowStepOpts = {
576
594
  },
577
595
  fromJSON(object) {
578
596
  return {
579
- readableId: isSet(object.readableId) ? globalThis.String(object.readableId) : "",
580
- action: isSet(object.action) ? globalThis.String(object.action) : "",
581
- timeout: isSet(object.timeout) ? globalThis.String(object.timeout) : "",
582
- inputs: isSet(object.inputs) ? globalThis.String(object.inputs) : "",
583
- parents: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.parents) ? object.parents.map((e) => globalThis.String(e)) : [],
584
- userData: isSet(object.userData) ? globalThis.String(object.userData) : "",
597
+ readableId: isSet(object.readableId) ? globalThis.String(object.readableId) : '',
598
+ action: isSet(object.action) ? globalThis.String(object.action) : '',
599
+ timeout: isSet(object.timeout) ? globalThis.String(object.timeout) : '',
600
+ inputs: isSet(object.inputs) ? globalThis.String(object.inputs) : '',
601
+ parents: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.parents)
602
+ ? object.parents.map((e) => globalThis.String(e))
603
+ : [],
604
+ userData: isSet(object.userData) ? globalThis.String(object.userData) : '',
585
605
  retries: isSet(object.retries) ? globalThis.Number(object.retries) : 0,
586
606
  };
587
607
  },
588
608
  toJSON(message) {
589
609
  var _a;
590
610
  const obj = {};
591
- if (message.readableId !== "") {
611
+ if (message.readableId !== '') {
592
612
  obj.readableId = message.readableId;
593
613
  }
594
- if (message.action !== "") {
614
+ if (message.action !== '') {
595
615
  obj.action = message.action;
596
616
  }
597
- if (message.timeout !== "") {
617
+ if (message.timeout !== '') {
598
618
  obj.timeout = message.timeout;
599
619
  }
600
- if (message.inputs !== "") {
620
+ if (message.inputs !== '') {
601
621
  obj.inputs = message.inputs;
602
622
  }
603
623
  if ((_a = message.parents) === null || _a === void 0 ? void 0 : _a.length) {
604
624
  obj.parents = message.parents;
605
625
  }
606
- if (message.userData !== "") {
626
+ if (message.userData !== '') {
607
627
  obj.userData = message.userData;
608
628
  }
609
629
  if (message.retries !== 0) {
@@ -617,12 +637,12 @@ exports.CreateWorkflowStepOpts = {
617
637
  fromPartial(object) {
618
638
  var _a, _b, _c, _d, _e, _f, _g;
619
639
  const message = createBaseCreateWorkflowStepOpts();
620
- message.readableId = (_a = object.readableId) !== null && _a !== void 0 ? _a : "";
621
- message.action = (_b = object.action) !== null && _b !== void 0 ? _b : "";
622
- message.timeout = (_c = object.timeout) !== null && _c !== void 0 ? _c : "";
623
- message.inputs = (_d = object.inputs) !== null && _d !== void 0 ? _d : "";
640
+ message.readableId = (_a = object.readableId) !== null && _a !== void 0 ? _a : '';
641
+ message.action = (_b = object.action) !== null && _b !== void 0 ? _b : '';
642
+ message.timeout = (_c = object.timeout) !== null && _c !== void 0 ? _c : '';
643
+ message.inputs = (_d = object.inputs) !== null && _d !== void 0 ? _d : '';
624
644
  message.parents = ((_e = object.parents) === null || _e === void 0 ? void 0 : _e.map((e) => e)) || [];
625
- message.userData = (_f = object.userData) !== null && _f !== void 0 ? _f : "";
645
+ message.userData = (_f = object.userData) !== null && _f !== void 0 ? _f : '';
626
646
  message.retries = (_g = object.retries) !== null && _g !== void 0 ? _g : 0;
627
647
  return message;
628
648
  },
@@ -665,19 +685,39 @@ exports.ListWorkflowsRequest = {
665
685
  },
666
686
  };
667
687
  function createBaseScheduleWorkflowRequest() {
668
- return { name: "", schedules: [], input: "" };
688
+ return {
689
+ name: '',
690
+ schedules: [],
691
+ input: '',
692
+ parentId: undefined,
693
+ parentStepRunId: undefined,
694
+ childIndex: undefined,
695
+ childKey: undefined,
696
+ };
669
697
  }
670
698
  exports.ScheduleWorkflowRequest = {
671
699
  encode(message, writer = _m0.Writer.create()) {
672
- if (message.name !== "") {
700
+ if (message.name !== '') {
673
701
  writer.uint32(10).string(message.name);
674
702
  }
675
703
  for (const v of message.schedules) {
676
704
  timestamp_1.Timestamp.encode(toTimestamp(v), writer.uint32(18).fork()).ldelim();
677
705
  }
678
- if (message.input !== "") {
706
+ if (message.input !== '') {
679
707
  writer.uint32(26).string(message.input);
680
708
  }
709
+ if (message.parentId !== undefined) {
710
+ writer.uint32(34).string(message.parentId);
711
+ }
712
+ if (message.parentStepRunId !== undefined) {
713
+ writer.uint32(42).string(message.parentStepRunId);
714
+ }
715
+ if (message.childIndex !== undefined) {
716
+ writer.uint32(48).int32(message.childIndex);
717
+ }
718
+ if (message.childKey !== undefined) {
719
+ writer.uint32(58).string(message.childKey);
720
+ }
681
721
  return writer;
682
722
  },
683
723
  decode(input, length) {
@@ -705,6 +745,30 @@ exports.ScheduleWorkflowRequest = {
705
745
  }
706
746
  message.input = reader.string();
707
747
  continue;
748
+ case 4:
749
+ if (tag !== 34) {
750
+ break;
751
+ }
752
+ message.parentId = reader.string();
753
+ continue;
754
+ case 5:
755
+ if (tag !== 42) {
756
+ break;
757
+ }
758
+ message.parentStepRunId = reader.string();
759
+ continue;
760
+ case 6:
761
+ if (tag !== 48) {
762
+ break;
763
+ }
764
+ message.childIndex = reader.int32();
765
+ continue;
766
+ case 7:
767
+ if (tag !== 58) {
768
+ break;
769
+ }
770
+ message.childKey = reader.string();
771
+ continue;
708
772
  }
709
773
  if ((tag & 7) === 4 || tag === 0) {
710
774
  break;
@@ -715,45 +779,74 @@ exports.ScheduleWorkflowRequest = {
715
779
  },
716
780
  fromJSON(object) {
717
781
  return {
718
- name: isSet(object.name) ? globalThis.String(object.name) : "",
782
+ name: isSet(object.name) ? globalThis.String(object.name) : '',
719
783
  schedules: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.schedules)
720
784
  ? object.schedules.map((e) => fromJsonTimestamp(e))
721
785
  : [],
722
- input: isSet(object.input) ? globalThis.String(object.input) : "",
786
+ input: isSet(object.input) ? globalThis.String(object.input) : '',
787
+ parentId: isSet(object.parentId) ? globalThis.String(object.parentId) : undefined,
788
+ parentStepRunId: isSet(object.parentStepRunId)
789
+ ? globalThis.String(object.parentStepRunId)
790
+ : undefined,
791
+ childIndex: isSet(object.childIndex) ? globalThis.Number(object.childIndex) : undefined,
792
+ childKey: isSet(object.childKey) ? globalThis.String(object.childKey) : undefined,
723
793
  };
724
794
  },
725
795
  toJSON(message) {
726
796
  var _a;
727
797
  const obj = {};
728
- if (message.name !== "") {
798
+ if (message.name !== '') {
729
799
  obj.name = message.name;
730
800
  }
731
801
  if ((_a = message.schedules) === null || _a === void 0 ? void 0 : _a.length) {
732
802
  obj.schedules = message.schedules.map((e) => e.toISOString());
733
803
  }
734
- if (message.input !== "") {
804
+ if (message.input !== '') {
735
805
  obj.input = message.input;
736
806
  }
807
+ if (message.parentId !== undefined) {
808
+ obj.parentId = message.parentId;
809
+ }
810
+ if (message.parentStepRunId !== undefined) {
811
+ obj.parentStepRunId = message.parentStepRunId;
812
+ }
813
+ if (message.childIndex !== undefined) {
814
+ obj.childIndex = Math.round(message.childIndex);
815
+ }
816
+ if (message.childKey !== undefined) {
817
+ obj.childKey = message.childKey;
818
+ }
737
819
  return obj;
738
820
  },
739
821
  create(base) {
740
822
  return exports.ScheduleWorkflowRequest.fromPartial(base !== null && base !== void 0 ? base : {});
741
823
  },
742
824
  fromPartial(object) {
743
- var _a, _b, _c;
825
+ var _a, _b, _c, _d, _e, _f, _g;
744
826
  const message = createBaseScheduleWorkflowRequest();
745
- message.name = (_a = object.name) !== null && _a !== void 0 ? _a : "";
827
+ message.name = (_a = object.name) !== null && _a !== void 0 ? _a : '';
746
828
  message.schedules = ((_b = object.schedules) === null || _b === void 0 ? void 0 : _b.map((e) => e)) || [];
747
- message.input = (_c = object.input) !== null && _c !== void 0 ? _c : "";
829
+ message.input = (_c = object.input) !== null && _c !== void 0 ? _c : '';
830
+ message.parentId = (_d = object.parentId) !== null && _d !== void 0 ? _d : undefined;
831
+ message.parentStepRunId = (_e = object.parentStepRunId) !== null && _e !== void 0 ? _e : undefined;
832
+ message.childIndex = (_f = object.childIndex) !== null && _f !== void 0 ? _f : undefined;
833
+ message.childKey = (_g = object.childKey) !== null && _g !== void 0 ? _g : undefined;
748
834
  return message;
749
835
  },
750
836
  };
751
837
  function createBaseWorkflowVersion() {
752
- return { id: "", createdAt: undefined, updatedAt: undefined, version: "", order: 0, workflowId: "" };
838
+ return {
839
+ id: '',
840
+ createdAt: undefined,
841
+ updatedAt: undefined,
842
+ version: '',
843
+ order: 0,
844
+ workflowId: '',
845
+ };
753
846
  }
754
847
  exports.WorkflowVersion = {
755
848
  encode(message, writer = _m0.Writer.create()) {
756
- if (message.id !== "") {
849
+ if (message.id !== '') {
757
850
  writer.uint32(10).string(message.id);
758
851
  }
759
852
  if (message.createdAt !== undefined) {
@@ -762,13 +855,13 @@ exports.WorkflowVersion = {
762
855
  if (message.updatedAt !== undefined) {
763
856
  timestamp_1.Timestamp.encode(toTimestamp(message.updatedAt), writer.uint32(26).fork()).ldelim();
764
857
  }
765
- if (message.version !== "") {
858
+ if (message.version !== '') {
766
859
  writer.uint32(42).string(message.version);
767
860
  }
768
861
  if (message.order !== 0) {
769
862
  writer.uint32(48).int32(message.order);
770
863
  }
771
- if (message.workflowId !== "") {
864
+ if (message.workflowId !== '') {
772
865
  writer.uint32(58).string(message.workflowId);
773
866
  }
774
867
  return writer;
@@ -826,17 +919,17 @@ exports.WorkflowVersion = {
826
919
  },
827
920
  fromJSON(object) {
828
921
  return {
829
- id: isSet(object.id) ? globalThis.String(object.id) : "",
922
+ id: isSet(object.id) ? globalThis.String(object.id) : '',
830
923
  createdAt: isSet(object.createdAt) ? fromJsonTimestamp(object.createdAt) : undefined,
831
924
  updatedAt: isSet(object.updatedAt) ? fromJsonTimestamp(object.updatedAt) : undefined,
832
- version: isSet(object.version) ? globalThis.String(object.version) : "",
925
+ version: isSet(object.version) ? globalThis.String(object.version) : '',
833
926
  order: isSet(object.order) ? globalThis.Number(object.order) : 0,
834
- workflowId: isSet(object.workflowId) ? globalThis.String(object.workflowId) : "",
927
+ workflowId: isSet(object.workflowId) ? globalThis.String(object.workflowId) : '',
835
928
  };
836
929
  },
837
930
  toJSON(message) {
838
931
  const obj = {};
839
- if (message.id !== "") {
932
+ if (message.id !== '') {
840
933
  obj.id = message.id;
841
934
  }
842
935
  if (message.createdAt !== undefined) {
@@ -845,13 +938,13 @@ exports.WorkflowVersion = {
845
938
  if (message.updatedAt !== undefined) {
846
939
  obj.updatedAt = message.updatedAt.toISOString();
847
940
  }
848
- if (message.version !== "") {
941
+ if (message.version !== '') {
849
942
  obj.version = message.version;
850
943
  }
851
944
  if (message.order !== 0) {
852
945
  obj.order = Math.round(message.order);
853
946
  }
854
- if (message.workflowId !== "") {
947
+ if (message.workflowId !== '') {
855
948
  obj.workflowId = message.workflowId;
856
949
  }
857
950
  return obj;
@@ -862,24 +955,24 @@ exports.WorkflowVersion = {
862
955
  fromPartial(object) {
863
956
  var _a, _b, _c, _d, _e, _f;
864
957
  const message = createBaseWorkflowVersion();
865
- message.id = (_a = object.id) !== null && _a !== void 0 ? _a : "";
958
+ message.id = (_a = object.id) !== null && _a !== void 0 ? _a : '';
866
959
  message.createdAt = (_b = object.createdAt) !== null && _b !== void 0 ? _b : undefined;
867
960
  message.updatedAt = (_c = object.updatedAt) !== null && _c !== void 0 ? _c : undefined;
868
- message.version = (_d = object.version) !== null && _d !== void 0 ? _d : "";
961
+ message.version = (_d = object.version) !== null && _d !== void 0 ? _d : '';
869
962
  message.order = (_e = object.order) !== null && _e !== void 0 ? _e : 0;
870
- message.workflowId = (_f = object.workflowId) !== null && _f !== void 0 ? _f : "";
963
+ message.workflowId = (_f = object.workflowId) !== null && _f !== void 0 ? _f : '';
871
964
  return message;
872
965
  },
873
966
  };
874
967
  function createBaseWorkflowTriggerEventRef() {
875
- return { parentId: "", eventKey: "" };
968
+ return { parentId: '', eventKey: '' };
876
969
  }
877
970
  exports.WorkflowTriggerEventRef = {
878
971
  encode(message, writer = _m0.Writer.create()) {
879
- if (message.parentId !== "") {
972
+ if (message.parentId !== '') {
880
973
  writer.uint32(10).string(message.parentId);
881
974
  }
882
- if (message.eventKey !== "") {
975
+ if (message.eventKey !== '') {
883
976
  writer.uint32(18).string(message.eventKey);
884
977
  }
885
978
  return writer;
@@ -913,16 +1006,16 @@ exports.WorkflowTriggerEventRef = {
913
1006
  },
914
1007
  fromJSON(object) {
915
1008
  return {
916
- parentId: isSet(object.parentId) ? globalThis.String(object.parentId) : "",
917
- eventKey: isSet(object.eventKey) ? globalThis.String(object.eventKey) : "",
1009
+ parentId: isSet(object.parentId) ? globalThis.String(object.parentId) : '',
1010
+ eventKey: isSet(object.eventKey) ? globalThis.String(object.eventKey) : '',
918
1011
  };
919
1012
  },
920
1013
  toJSON(message) {
921
1014
  const obj = {};
922
- if (message.parentId !== "") {
1015
+ if (message.parentId !== '') {
923
1016
  obj.parentId = message.parentId;
924
1017
  }
925
- if (message.eventKey !== "") {
1018
+ if (message.eventKey !== '') {
926
1019
  obj.eventKey = message.eventKey;
927
1020
  }
928
1021
  return obj;
@@ -933,20 +1026,20 @@ exports.WorkflowTriggerEventRef = {
933
1026
  fromPartial(object) {
934
1027
  var _a, _b;
935
1028
  const message = createBaseWorkflowTriggerEventRef();
936
- message.parentId = (_a = object.parentId) !== null && _a !== void 0 ? _a : "";
937
- message.eventKey = (_b = object.eventKey) !== null && _b !== void 0 ? _b : "";
1029
+ message.parentId = (_a = object.parentId) !== null && _a !== void 0 ? _a : '';
1030
+ message.eventKey = (_b = object.eventKey) !== null && _b !== void 0 ? _b : '';
938
1031
  return message;
939
1032
  },
940
1033
  };
941
1034
  function createBaseWorkflowTriggerCronRef() {
942
- return { parentId: "", cron: "" };
1035
+ return { parentId: '', cron: '' };
943
1036
  }
944
1037
  exports.WorkflowTriggerCronRef = {
945
1038
  encode(message, writer = _m0.Writer.create()) {
946
- if (message.parentId !== "") {
1039
+ if (message.parentId !== '') {
947
1040
  writer.uint32(10).string(message.parentId);
948
1041
  }
949
- if (message.cron !== "") {
1042
+ if (message.cron !== '') {
950
1043
  writer.uint32(18).string(message.cron);
951
1044
  }
952
1045
  return writer;
@@ -980,16 +1073,16 @@ exports.WorkflowTriggerCronRef = {
980
1073
  },
981
1074
  fromJSON(object) {
982
1075
  return {
983
- parentId: isSet(object.parentId) ? globalThis.String(object.parentId) : "",
984
- cron: isSet(object.cron) ? globalThis.String(object.cron) : "",
1076
+ parentId: isSet(object.parentId) ? globalThis.String(object.parentId) : '',
1077
+ cron: isSet(object.cron) ? globalThis.String(object.cron) : '',
985
1078
  };
986
1079
  },
987
1080
  toJSON(message) {
988
1081
  const obj = {};
989
- if (message.parentId !== "") {
1082
+ if (message.parentId !== '') {
990
1083
  obj.parentId = message.parentId;
991
1084
  }
992
- if (message.cron !== "") {
1085
+ if (message.cron !== '') {
993
1086
  obj.cron = message.cron;
994
1087
  }
995
1088
  return obj;
@@ -1000,22 +1093,41 @@ exports.WorkflowTriggerCronRef = {
1000
1093
  fromPartial(object) {
1001
1094
  var _a, _b;
1002
1095
  const message = createBaseWorkflowTriggerCronRef();
1003
- message.parentId = (_a = object.parentId) !== null && _a !== void 0 ? _a : "";
1004
- message.cron = (_b = object.cron) !== null && _b !== void 0 ? _b : "";
1096
+ message.parentId = (_a = object.parentId) !== null && _a !== void 0 ? _a : '';
1097
+ message.cron = (_b = object.cron) !== null && _b !== void 0 ? _b : '';
1005
1098
  return message;
1006
1099
  },
1007
1100
  };
1008
1101
  function createBaseTriggerWorkflowRequest() {
1009
- return { name: "", input: "" };
1102
+ return {
1103
+ name: '',
1104
+ input: '',
1105
+ parentId: undefined,
1106
+ parentStepRunId: undefined,
1107
+ childIndex: undefined,
1108
+ childKey: undefined,
1109
+ };
1010
1110
  }
1011
1111
  exports.TriggerWorkflowRequest = {
1012
1112
  encode(message, writer = _m0.Writer.create()) {
1013
- if (message.name !== "") {
1113
+ if (message.name !== '') {
1014
1114
  writer.uint32(10).string(message.name);
1015
1115
  }
1016
- if (message.input !== "") {
1116
+ if (message.input !== '') {
1017
1117
  writer.uint32(18).string(message.input);
1018
1118
  }
1119
+ if (message.parentId !== undefined) {
1120
+ writer.uint32(26).string(message.parentId);
1121
+ }
1122
+ if (message.parentStepRunId !== undefined) {
1123
+ writer.uint32(34).string(message.parentStepRunId);
1124
+ }
1125
+ if (message.childIndex !== undefined) {
1126
+ writer.uint32(40).int32(message.childIndex);
1127
+ }
1128
+ if (message.childKey !== undefined) {
1129
+ writer.uint32(50).string(message.childKey);
1130
+ }
1019
1131
  return writer;
1020
1132
  },
1021
1133
  decode(input, length) {
@@ -1037,6 +1149,30 @@ exports.TriggerWorkflowRequest = {
1037
1149
  }
1038
1150
  message.input = reader.string();
1039
1151
  continue;
1152
+ case 3:
1153
+ if (tag !== 26) {
1154
+ break;
1155
+ }
1156
+ message.parentId = reader.string();
1157
+ continue;
1158
+ case 4:
1159
+ if (tag !== 34) {
1160
+ break;
1161
+ }
1162
+ message.parentStepRunId = reader.string();
1163
+ continue;
1164
+ case 5:
1165
+ if (tag !== 40) {
1166
+ break;
1167
+ }
1168
+ message.childIndex = reader.int32();
1169
+ continue;
1170
+ case 6:
1171
+ if (tag !== 50) {
1172
+ break;
1173
+ }
1174
+ message.childKey = reader.string();
1175
+ continue;
1040
1176
  }
1041
1177
  if ((tag & 7) === 4 || tag === 0) {
1042
1178
  break;
@@ -1047,37 +1183,59 @@ exports.TriggerWorkflowRequest = {
1047
1183
  },
1048
1184
  fromJSON(object) {
1049
1185
  return {
1050
- name: isSet(object.name) ? globalThis.String(object.name) : "",
1051
- input: isSet(object.input) ? globalThis.String(object.input) : "",
1186
+ name: isSet(object.name) ? globalThis.String(object.name) : '',
1187
+ input: isSet(object.input) ? globalThis.String(object.input) : '',
1188
+ parentId: isSet(object.parentId) ? globalThis.String(object.parentId) : undefined,
1189
+ parentStepRunId: isSet(object.parentStepRunId)
1190
+ ? globalThis.String(object.parentStepRunId)
1191
+ : undefined,
1192
+ childIndex: isSet(object.childIndex) ? globalThis.Number(object.childIndex) : undefined,
1193
+ childKey: isSet(object.childKey) ? globalThis.String(object.childKey) : undefined,
1052
1194
  };
1053
1195
  },
1054
1196
  toJSON(message) {
1055
1197
  const obj = {};
1056
- if (message.name !== "") {
1198
+ if (message.name !== '') {
1057
1199
  obj.name = message.name;
1058
1200
  }
1059
- if (message.input !== "") {
1201
+ if (message.input !== '') {
1060
1202
  obj.input = message.input;
1061
1203
  }
1204
+ if (message.parentId !== undefined) {
1205
+ obj.parentId = message.parentId;
1206
+ }
1207
+ if (message.parentStepRunId !== undefined) {
1208
+ obj.parentStepRunId = message.parentStepRunId;
1209
+ }
1210
+ if (message.childIndex !== undefined) {
1211
+ obj.childIndex = Math.round(message.childIndex);
1212
+ }
1213
+ if (message.childKey !== undefined) {
1214
+ obj.childKey = message.childKey;
1215
+ }
1062
1216
  return obj;
1063
1217
  },
1064
1218
  create(base) {
1065
1219
  return exports.TriggerWorkflowRequest.fromPartial(base !== null && base !== void 0 ? base : {});
1066
1220
  },
1067
1221
  fromPartial(object) {
1068
- var _a, _b;
1222
+ var _a, _b, _c, _d, _e, _f;
1069
1223
  const message = createBaseTriggerWorkflowRequest();
1070
- message.name = (_a = object.name) !== null && _a !== void 0 ? _a : "";
1071
- message.input = (_b = object.input) !== null && _b !== void 0 ? _b : "";
1224
+ message.name = (_a = object.name) !== null && _a !== void 0 ? _a : '';
1225
+ message.input = (_b = object.input) !== null && _b !== void 0 ? _b : '';
1226
+ message.parentId = (_c = object.parentId) !== null && _c !== void 0 ? _c : undefined;
1227
+ message.parentStepRunId = (_d = object.parentStepRunId) !== null && _d !== void 0 ? _d : undefined;
1228
+ message.childIndex = (_e = object.childIndex) !== null && _e !== void 0 ? _e : undefined;
1229
+ message.childKey = (_f = object.childKey) !== null && _f !== void 0 ? _f : undefined;
1072
1230
  return message;
1073
1231
  },
1074
1232
  };
1075
1233
  function createBaseTriggerWorkflowResponse() {
1076
- return { workflowRunId: "" };
1234
+ return { workflowRunId: '' };
1077
1235
  }
1078
1236
  exports.TriggerWorkflowResponse = {
1079
1237
  encode(message, writer = _m0.Writer.create()) {
1080
- if (message.workflowRunId !== "") {
1238
+ if (message.workflowRunId !== '') {
1081
1239
  writer.uint32(10).string(message.workflowRunId);
1082
1240
  }
1083
1241
  return writer;
@@ -1104,11 +1262,13 @@ exports.TriggerWorkflowResponse = {
1104
1262
  return message;
1105
1263
  },
1106
1264
  fromJSON(object) {
1107
- return { workflowRunId: isSet(object.workflowRunId) ? globalThis.String(object.workflowRunId) : "" };
1265
+ return {
1266
+ workflowRunId: isSet(object.workflowRunId) ? globalThis.String(object.workflowRunId) : '',
1267
+ };
1108
1268
  },
1109
1269
  toJSON(message) {
1110
1270
  const obj = {};
1111
- if (message.workflowRunId !== "") {
1271
+ if (message.workflowRunId !== '') {
1112
1272
  obj.workflowRunId = message.workflowRunId;
1113
1273
  }
1114
1274
  return obj;
@@ -1119,16 +1279,16 @@ exports.TriggerWorkflowResponse = {
1119
1279
  fromPartial(object) {
1120
1280
  var _a;
1121
1281
  const message = createBaseTriggerWorkflowResponse();
1122
- message.workflowRunId = (_a = object.workflowRunId) !== null && _a !== void 0 ? _a : "";
1282
+ message.workflowRunId = (_a = object.workflowRunId) !== null && _a !== void 0 ? _a : '';
1123
1283
  return message;
1124
1284
  },
1125
1285
  };
1126
1286
  exports.WorkflowServiceDefinition = {
1127
- name: "WorkflowService",
1128
- fullName: "WorkflowService",
1287
+ name: 'WorkflowService',
1288
+ fullName: 'WorkflowService',
1129
1289
  methods: {
1130
1290
  putWorkflow: {
1131
- name: "PutWorkflow",
1291
+ name: 'PutWorkflow',
1132
1292
  requestType: exports.PutWorkflowRequest,
1133
1293
  requestStream: false,
1134
1294
  responseType: exports.WorkflowVersion,
@@ -1136,7 +1296,7 @@ exports.WorkflowServiceDefinition = {
1136
1296
  options: {},
1137
1297
  },
1138
1298
  scheduleWorkflow: {
1139
- name: "ScheduleWorkflow",
1299
+ name: 'ScheduleWorkflow',
1140
1300
  requestType: exports.ScheduleWorkflowRequest,
1141
1301
  requestStream: false,
1142
1302
  responseType: exports.WorkflowVersion,
@@ -1144,7 +1304,7 @@ exports.WorkflowServiceDefinition = {
1144
1304
  options: {},
1145
1305
  },
1146
1306
  triggerWorkflow: {
1147
- name: "TriggerWorkflow",
1307
+ name: 'TriggerWorkflow',
1148
1308
  requestType: exports.TriggerWorkflowRequest,
1149
1309
  requestStream: false,
1150
1310
  responseType: exports.TriggerWorkflowResponse,
@@ -1167,7 +1327,7 @@ function fromJsonTimestamp(o) {
1167
1327
  if (o instanceof globalThis.Date) {
1168
1328
  return o;
1169
1329
  }
1170
- else if (typeof o === "string") {
1330
+ else if (typeof o === 'string') {
1171
1331
  return new globalThis.Date(o);
1172
1332
  }
1173
1333
  else {