@temporalio/proto 0.13.0 → 0.17.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/coresdk.d.ts CHANGED
@@ -193,6 +193,9 @@ export namespace coresdk {
193
193
 
194
194
  /** ActivityResult cancelled */
195
195
  cancelled?: (coresdk.activity_result.ICancellation|null);
196
+
197
+ /** ActivityResult willCompleteAsync */
198
+ willCompleteAsync?: (coresdk.activity_result.IWillCompleteAsync|null);
196
199
  }
197
200
 
198
201
  /** Used to report activity completion to core and to resolve the activity in a workflow activation */
@@ -213,8 +216,11 @@ export namespace coresdk {
213
216
  /** ActivityResult cancelled. */
214
217
  public cancelled?: (coresdk.activity_result.ICancellation|null);
215
218
 
219
+ /** ActivityResult willCompleteAsync. */
220
+ public willCompleteAsync?: (coresdk.activity_result.IWillCompleteAsync|null);
221
+
216
222
  /** ActivityResult status. */
217
- public status?: ("completed"|"failed"|"cancelled");
223
+ public status?: ("completed"|"failed"|"cancelled"|"willCompleteAsync");
218
224
 
219
225
  /**
220
226
  * Encodes the specified ActivityResult message. Does not implicitly {@link coresdk.activity_result.ActivityResult.verify|verify} messages.
@@ -505,6 +511,79 @@ export namespace coresdk {
505
511
  */
506
512
  public toJSON(): { [k: string]: any };
507
513
  }
514
+
515
+ /** Properties of a WillCompleteAsync. */
516
+ interface IWillCompleteAsync {
517
+ }
518
+
519
+ /**
520
+ * Used in ActivityResult to notify Core that this Activity will complete asynchronously.
521
+ * Core will forget about this Activity and free up resources used to track this Activity.
522
+ */
523
+ class WillCompleteAsync implements IWillCompleteAsync {
524
+
525
+ /**
526
+ * Constructs a new WillCompleteAsync.
527
+ * @param [properties] Properties to set
528
+ */
529
+ constructor(properties?: coresdk.activity_result.IWillCompleteAsync);
530
+
531
+ /**
532
+ * Encodes the specified WillCompleteAsync message. Does not implicitly {@link coresdk.activity_result.WillCompleteAsync.verify|verify} messages.
533
+ * @param message WillCompleteAsync message or plain object to encode
534
+ * @param [writer] Writer to encode to
535
+ * @returns Writer
536
+ */
537
+ public static encode(message: coresdk.activity_result.IWillCompleteAsync, writer?: $protobuf.Writer): $protobuf.Writer;
538
+
539
+ /**
540
+ * Encodes the specified WillCompleteAsync message, length delimited. Does not implicitly {@link coresdk.activity_result.WillCompleteAsync.verify|verify} messages.
541
+ * @param message WillCompleteAsync message or plain object to encode
542
+ * @param [writer] Writer to encode to
543
+ * @returns Writer
544
+ */
545
+ public static encodeDelimited(message: coresdk.activity_result.IWillCompleteAsync, writer?: $protobuf.Writer): $protobuf.Writer;
546
+
547
+ /**
548
+ * Decodes a WillCompleteAsync message from the specified reader or buffer.
549
+ * @param reader Reader or buffer to decode from
550
+ * @param [length] Message length if known beforehand
551
+ * @returns WillCompleteAsync
552
+ * @throws {Error} If the payload is not a reader or valid buffer
553
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
554
+ */
555
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): coresdk.activity_result.WillCompleteAsync;
556
+
557
+ /**
558
+ * Decodes a WillCompleteAsync message from the specified reader or buffer, length delimited.
559
+ * @param reader Reader or buffer to decode from
560
+ * @returns WillCompleteAsync
561
+ * @throws {Error} If the payload is not a reader or valid buffer
562
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
563
+ */
564
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): coresdk.activity_result.WillCompleteAsync;
565
+
566
+ /**
567
+ * Creates a WillCompleteAsync message from a plain object. Also converts values to their respective internal types.
568
+ * @param object Plain object
569
+ * @returns WillCompleteAsync
570
+ */
571
+ public static fromObject(object: { [k: string]: any }): coresdk.activity_result.WillCompleteAsync;
572
+
573
+ /**
574
+ * Creates a plain object from a WillCompleteAsync message. Also converts values to other types if specified.
575
+ * @param message WillCompleteAsync
576
+ * @param [options] Conversion options
577
+ * @returns Plain object
578
+ */
579
+ public static toObject(message: coresdk.activity_result.WillCompleteAsync, options?: $protobuf.IConversionOptions): { [k: string]: any };
580
+
581
+ /**
582
+ * Converts this WillCompleteAsync to JSON.
583
+ * @returns JSON object
584
+ */
585
+ public toJSON(): { [k: string]: any };
586
+ }
508
587
  }
509
588
 
510
589
  /** Namespace common. */
@@ -1362,8 +1441,8 @@ export namespace coresdk {
1362
1441
  /** An attempt to cancel an external workflow resolved */
1363
1442
  resolveRequestCancelExternalWorkflow?: (coresdk.workflow_activation.IResolveRequestCancelExternalWorkflow|null);
1364
1443
 
1365
- /** will be set to true if this is the variant. */
1366
- removeFromCache?: (boolean|null);
1444
+ /** job list. The string value is a reason for eviction. */
1445
+ removeFromCache?: (coresdk.workflow_activation.IRemoveFromCache|null);
1367
1446
  }
1368
1447
 
1369
1448
  /** Represents a WFActivationJob. */
@@ -1411,8 +1490,8 @@ export namespace coresdk {
1411
1490
  /** An attempt to cancel an external workflow resolved */
1412
1491
  public resolveRequestCancelExternalWorkflow?: (coresdk.workflow_activation.IResolveRequestCancelExternalWorkflow|null);
1413
1492
 
1414
- /** will be set to true if this is the variant. */
1415
- public removeFromCache?: (boolean|null);
1493
+ /** job list. The string value is a reason for eviction. */
1494
+ public removeFromCache?: (coresdk.workflow_activation.IRemoveFromCache|null);
1416
1495
 
1417
1496
  /** WFActivationJob variant. */
1418
1497
  public variant?: ("startWorkflow"|"fireTimer"|"updateRandomSeed"|"queryWorkflow"|"cancelWorkflow"|"signalWorkflow"|"resolveActivity"|"notifyHasPatch"|"resolveChildWorkflowExecutionStart"|"resolveChildWorkflowExecution"|"resolveSignalExternalWorkflow"|"resolveRequestCancelExternalWorkflow"|"removeFromCache");
@@ -2718,6 +2797,82 @@ export namespace coresdk {
2718
2797
  */
2719
2798
  public toJSON(): { [k: string]: any };
2720
2799
  }
2800
+
2801
+ /** Properties of a RemoveFromCache. */
2802
+ interface IRemoveFromCache {
2803
+
2804
+ /** RemoveFromCache reason */
2805
+ reason?: (string|null);
2806
+ }
2807
+
2808
+ /** Represents a RemoveFromCache. */
2809
+ class RemoveFromCache implements IRemoveFromCache {
2810
+
2811
+ /**
2812
+ * Constructs a new RemoveFromCache.
2813
+ * @param [properties] Properties to set
2814
+ */
2815
+ constructor(properties?: coresdk.workflow_activation.IRemoveFromCache);
2816
+
2817
+ /** RemoveFromCache reason. */
2818
+ public reason: string;
2819
+
2820
+ /**
2821
+ * Encodes the specified RemoveFromCache message. Does not implicitly {@link coresdk.workflow_activation.RemoveFromCache.verify|verify} messages.
2822
+ * @param message RemoveFromCache message or plain object to encode
2823
+ * @param [writer] Writer to encode to
2824
+ * @returns Writer
2825
+ */
2826
+ public static encode(message: coresdk.workflow_activation.IRemoveFromCache, writer?: $protobuf.Writer): $protobuf.Writer;
2827
+
2828
+ /**
2829
+ * Encodes the specified RemoveFromCache message, length delimited. Does not implicitly {@link coresdk.workflow_activation.RemoveFromCache.verify|verify} messages.
2830
+ * @param message RemoveFromCache message or plain object to encode
2831
+ * @param [writer] Writer to encode to
2832
+ * @returns Writer
2833
+ */
2834
+ public static encodeDelimited(message: coresdk.workflow_activation.IRemoveFromCache, writer?: $protobuf.Writer): $protobuf.Writer;
2835
+
2836
+ /**
2837
+ * Decodes a RemoveFromCache message from the specified reader or buffer.
2838
+ * @param reader Reader or buffer to decode from
2839
+ * @param [length] Message length if known beforehand
2840
+ * @returns RemoveFromCache
2841
+ * @throws {Error} If the payload is not a reader or valid buffer
2842
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
2843
+ */
2844
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): coresdk.workflow_activation.RemoveFromCache;
2845
+
2846
+ /**
2847
+ * Decodes a RemoveFromCache message from the specified reader or buffer, length delimited.
2848
+ * @param reader Reader or buffer to decode from
2849
+ * @returns RemoveFromCache
2850
+ * @throws {Error} If the payload is not a reader or valid buffer
2851
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
2852
+ */
2853
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): coresdk.workflow_activation.RemoveFromCache;
2854
+
2855
+ /**
2856
+ * Creates a RemoveFromCache message from a plain object. Also converts values to their respective internal types.
2857
+ * @param object Plain object
2858
+ * @returns RemoveFromCache
2859
+ */
2860
+ public static fromObject(object: { [k: string]: any }): coresdk.workflow_activation.RemoveFromCache;
2861
+
2862
+ /**
2863
+ * Creates a plain object from a RemoveFromCache message. Also converts values to other types if specified.
2864
+ * @param message RemoveFromCache
2865
+ * @param [options] Conversion options
2866
+ * @returns Plain object
2867
+ */
2868
+ public static toObject(message: coresdk.workflow_activation.RemoveFromCache, options?: $protobuf.IConversionOptions): { [k: string]: any };
2869
+
2870
+ /**
2871
+ * Converts this RemoveFromCache to JSON.
2872
+ * @returns JSON object
2873
+ */
2874
+ public toJSON(): { [k: string]: any };
2875
+ }
2721
2876
  }
2722
2877
 
2723
2878
  /** Namespace child_workflow. */
package/lib/coresdk.js CHANGED
@@ -270,11 +270,13 @@ $root.coresdk = (function() {
270
270
 
271
271
  ActivityResult.prototype.cancelled = null;
272
272
 
273
+ ActivityResult.prototype.willCompleteAsync = null;
274
+
273
275
  // OneOf field names bound to virtual getters and setters
274
276
  var $oneOfFields;
275
277
 
276
278
  Object.defineProperty(ActivityResult.prototype, "status", {
277
- get: $util.oneOfGetter($oneOfFields = ["completed", "failed", "cancelled"]),
279
+ get: $util.oneOfGetter($oneOfFields = ["completed", "failed", "cancelled", "willCompleteAsync"]),
278
280
  set: $util.oneOfSetter($oneOfFields)
279
281
  });
280
282
 
@@ -287,6 +289,8 @@ $root.coresdk = (function() {
287
289
  $root.coresdk.activity_result.Failure.encode(message.failed, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
288
290
  if (message.cancelled != null && Object.hasOwnProperty.call(message, "cancelled"))
289
291
  $root.coresdk.activity_result.Cancellation.encode(message.cancelled, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
292
+ if (message.willCompleteAsync != null && Object.hasOwnProperty.call(message, "willCompleteAsync"))
293
+ $root.coresdk.activity_result.WillCompleteAsync.encode(message.willCompleteAsync, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
290
294
  return writer;
291
295
  };
292
296
 
@@ -310,6 +314,9 @@ $root.coresdk = (function() {
310
314
  case 3:
311
315
  message.cancelled = $root.coresdk.activity_result.Cancellation.decode(reader, reader.uint32());
312
316
  break;
317
+ case 4:
318
+ message.willCompleteAsync = $root.coresdk.activity_result.WillCompleteAsync.decode(reader, reader.uint32());
319
+ break;
313
320
  default:
314
321
  reader.skipType(tag & 7);
315
322
  break;
@@ -343,6 +350,11 @@ $root.coresdk = (function() {
343
350
  throw TypeError(".coresdk.activity_result.ActivityResult.cancelled: object expected");
344
351
  message.cancelled = $root.coresdk.activity_result.Cancellation.fromObject(object.cancelled);
345
352
  }
353
+ if (object.willCompleteAsync != null) {
354
+ if (typeof object.willCompleteAsync !== "object")
355
+ throw TypeError(".coresdk.activity_result.ActivityResult.willCompleteAsync: object expected");
356
+ message.willCompleteAsync = $root.coresdk.activity_result.WillCompleteAsync.fromObject(object.willCompleteAsync);
357
+ }
346
358
  return message;
347
359
  };
348
360
 
@@ -365,6 +377,11 @@ $root.coresdk = (function() {
365
377
  if (options.oneofs)
366
378
  object.status = "cancelled";
367
379
  }
380
+ if (message.willCompleteAsync != null && message.hasOwnProperty("willCompleteAsync")) {
381
+ object.willCompleteAsync = $root.coresdk.activity_result.WillCompleteAsync.toObject(message.willCompleteAsync, options);
382
+ if (options.oneofs)
383
+ object.status = "willCompleteAsync";
384
+ }
368
385
  return object;
369
386
  };
370
387
 
@@ -609,6 +626,64 @@ $root.coresdk = (function() {
609
626
  return Cancellation;
610
627
  })();
611
628
 
629
+ activity_result.WillCompleteAsync = (function() {
630
+
631
+
632
+ function WillCompleteAsync(properties) {
633
+ if (properties)
634
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
635
+ if (properties[keys[i]] != null)
636
+ this[keys[i]] = properties[keys[i]];
637
+ }
638
+
639
+ WillCompleteAsync.encode = function encode(message, writer) {
640
+ if (!writer)
641
+ writer = $Writer.create();
642
+ return writer;
643
+ };
644
+
645
+ WillCompleteAsync.encodeDelimited = function encodeDelimited(message, writer) {
646
+ return this.encode(message, writer).ldelim();
647
+ };
648
+
649
+ WillCompleteAsync.decode = function decode(reader, length) {
650
+ if (!(reader instanceof $Reader))
651
+ reader = $Reader.create(reader);
652
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.coresdk.activity_result.WillCompleteAsync();
653
+ while (reader.pos < end) {
654
+ var tag = reader.uint32();
655
+ switch (tag >>> 3) {
656
+ default:
657
+ reader.skipType(tag & 7);
658
+ break;
659
+ }
660
+ }
661
+ return message;
662
+ };
663
+
664
+ WillCompleteAsync.decodeDelimited = function decodeDelimited(reader) {
665
+ if (!(reader instanceof $Reader))
666
+ reader = new $Reader(reader);
667
+ return this.decode(reader, reader.uint32());
668
+ };
669
+
670
+ WillCompleteAsync.fromObject = function fromObject(object) {
671
+ if (object instanceof $root.coresdk.activity_result.WillCompleteAsync)
672
+ return object;
673
+ return new $root.coresdk.activity_result.WillCompleteAsync();
674
+ };
675
+
676
+ WillCompleteAsync.toObject = function toObject() {
677
+ return {};
678
+ };
679
+
680
+ WillCompleteAsync.prototype.toJSON = function toJSON() {
681
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
682
+ };
683
+
684
+ return WillCompleteAsync;
685
+ })();
686
+
612
687
  return activity_result;
613
688
  })();
614
689
 
@@ -1882,7 +1957,7 @@ $root.coresdk = (function() {
1882
1957
  if (message.resolveRequestCancelExternalWorkflow != null && Object.hasOwnProperty.call(message, "resolveRequestCancelExternalWorkflow"))
1883
1958
  $root.coresdk.workflow_activation.ResolveRequestCancelExternalWorkflow.encode(message.resolveRequestCancelExternalWorkflow, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim();
1884
1959
  if (message.removeFromCache != null && Object.hasOwnProperty.call(message, "removeFromCache"))
1885
- writer.uint32(/* id 50, wireType 0 =*/400).bool(message.removeFromCache);
1960
+ $root.coresdk.workflow_activation.RemoveFromCache.encode(message.removeFromCache, writer.uint32(/* id 50, wireType 2 =*/402).fork()).ldelim();
1886
1961
  return writer;
1887
1962
  };
1888
1963
 
@@ -1934,7 +2009,7 @@ $root.coresdk = (function() {
1934
2009
  message.resolveRequestCancelExternalWorkflow = $root.coresdk.workflow_activation.ResolveRequestCancelExternalWorkflow.decode(reader, reader.uint32());
1935
2010
  break;
1936
2011
  case 50:
1937
- message.removeFromCache = reader.bool();
2012
+ message.removeFromCache = $root.coresdk.workflow_activation.RemoveFromCache.decode(reader, reader.uint32());
1938
2013
  break;
1939
2014
  default:
1940
2015
  reader.skipType(tag & 7);
@@ -2014,8 +2089,11 @@ $root.coresdk = (function() {
2014
2089
  throw TypeError(".coresdk.workflow_activation.WFActivationJob.resolveRequestCancelExternalWorkflow: object expected");
2015
2090
  message.resolveRequestCancelExternalWorkflow = $root.coresdk.workflow_activation.ResolveRequestCancelExternalWorkflow.fromObject(object.resolveRequestCancelExternalWorkflow);
2016
2091
  }
2017
- if (object.removeFromCache != null)
2018
- message.removeFromCache = Boolean(object.removeFromCache);
2092
+ if (object.removeFromCache != null) {
2093
+ if (typeof object.removeFromCache !== "object")
2094
+ throw TypeError(".coresdk.workflow_activation.WFActivationJob.removeFromCache: object expected");
2095
+ message.removeFromCache = $root.coresdk.workflow_activation.RemoveFromCache.fromObject(object.removeFromCache);
2096
+ }
2019
2097
  return message;
2020
2098
  };
2021
2099
 
@@ -2084,7 +2162,7 @@ $root.coresdk = (function() {
2084
2162
  object.variant = "resolveRequestCancelExternalWorkflow";
2085
2163
  }
2086
2164
  if (message.removeFromCache != null && message.hasOwnProperty("removeFromCache")) {
2087
- object.removeFromCache = message.removeFromCache;
2165
+ object.removeFromCache = $root.coresdk.workflow_activation.RemoveFromCache.toObject(message.removeFromCache, options);
2088
2166
  if (options.oneofs)
2089
2167
  object.variant = "removeFromCache";
2090
2168
  }
@@ -3608,6 +3686,81 @@ $root.coresdk = (function() {
3608
3686
  return ResolveRequestCancelExternalWorkflow;
3609
3687
  })();
3610
3688
 
3689
+ workflow_activation.RemoveFromCache = (function() {
3690
+
3691
+
3692
+ function RemoveFromCache(properties) {
3693
+ if (properties)
3694
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
3695
+ if (properties[keys[i]] != null)
3696
+ this[keys[i]] = properties[keys[i]];
3697
+ }
3698
+
3699
+ RemoveFromCache.prototype.reason = "";
3700
+
3701
+ RemoveFromCache.encode = function encode(message, writer) {
3702
+ if (!writer)
3703
+ writer = $Writer.create();
3704
+ if (message.reason != null && Object.hasOwnProperty.call(message, "reason"))
3705
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.reason);
3706
+ return writer;
3707
+ };
3708
+
3709
+ RemoveFromCache.encodeDelimited = function encodeDelimited(message, writer) {
3710
+ return this.encode(message, writer).ldelim();
3711
+ };
3712
+
3713
+ RemoveFromCache.decode = function decode(reader, length) {
3714
+ if (!(reader instanceof $Reader))
3715
+ reader = $Reader.create(reader);
3716
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.coresdk.workflow_activation.RemoveFromCache();
3717
+ while (reader.pos < end) {
3718
+ var tag = reader.uint32();
3719
+ switch (tag >>> 3) {
3720
+ case 1:
3721
+ message.reason = reader.string();
3722
+ break;
3723
+ default:
3724
+ reader.skipType(tag & 7);
3725
+ break;
3726
+ }
3727
+ }
3728
+ return message;
3729
+ };
3730
+
3731
+ RemoveFromCache.decodeDelimited = function decodeDelimited(reader) {
3732
+ if (!(reader instanceof $Reader))
3733
+ reader = new $Reader(reader);
3734
+ return this.decode(reader, reader.uint32());
3735
+ };
3736
+
3737
+ RemoveFromCache.fromObject = function fromObject(object) {
3738
+ if (object instanceof $root.coresdk.workflow_activation.RemoveFromCache)
3739
+ return object;
3740
+ var message = new $root.coresdk.workflow_activation.RemoveFromCache();
3741
+ if (object.reason != null)
3742
+ message.reason = String(object.reason);
3743
+ return message;
3744
+ };
3745
+
3746
+ RemoveFromCache.toObject = function toObject(message, options) {
3747
+ if (!options)
3748
+ options = {};
3749
+ var object = {};
3750
+ if (options.defaults)
3751
+ object.reason = "";
3752
+ if (message.reason != null && message.hasOwnProperty("reason"))
3753
+ object.reason = message.reason;
3754
+ return object;
3755
+ };
3756
+
3757
+ RemoveFromCache.prototype.toJSON = function toJSON() {
3758
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
3759
+ };
3760
+
3761
+ return RemoveFromCache;
3762
+ })();
3763
+
3611
3764
  return workflow_activation;
3612
3765
  })();
3613
3766
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@temporalio/proto",
3
- "version": "0.13.0",
3
+ "version": "0.17.0",
4
4
  "description": "Temporal.io SDK compiled protobuf definitions",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",
@@ -29,5 +29,5 @@
29
29
  "publishConfig": {
30
30
  "access": "public"
31
31
  },
32
- "gitHead": "bbb8d36ad9d310eb44bd19f3f8bb9356e1dd9dfb"
32
+ "gitHead": "7706410cb67a1c92b9ae9eea1cac48e0dad4a8d1"
33
33
  }