@gitpod/supervisor-api-grpc 0.1.5-minor-updates.3 → 0.1.5-mp-wsi-status-version.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/info_pb.js CHANGED
@@ -13,11 +13,18 @@
13
13
 
14
14
  var jspb = require('google-protobuf');
15
15
  var goog = jspb;
16
- var global = Function('return this')();
16
+ var global = (function() {
17
+ if (this) { return this; }
18
+ if (typeof window !== 'undefined') { return window; }
19
+ if (typeof global !== 'undefined') { return global; }
20
+ if (typeof self !== 'undefined') { return self; }
21
+ return Function('return this')();
22
+ }.call(null));
17
23
 
18
24
  goog.exportSymbol('proto.supervisor.WorkspaceInfoRequest', null, global);
19
25
  goog.exportSymbol('proto.supervisor.WorkspaceInfoResponse', null, global);
20
26
  goog.exportSymbol('proto.supervisor.WorkspaceInfoResponse.GitpodAPI', null, global);
27
+ goog.exportSymbol('proto.supervisor.WorkspaceInfoResponse.Repository', null, global);
21
28
  goog.exportSymbol('proto.supervisor.WorkspaceInfoResponse.WorkspaceLocationCase', null, global);
22
29
  /**
23
30
  * Generated by JsPbCodeGenerator.
@@ -82,6 +89,27 @@ if (goog.DEBUG && !COMPILED) {
82
89
  */
83
90
  proto.supervisor.WorkspaceInfoResponse.GitpodAPI.displayName = 'proto.supervisor.WorkspaceInfoResponse.GitpodAPI';
84
91
  }
92
+ /**
93
+ * Generated by JsPbCodeGenerator.
94
+ * @param {Array=} opt_data Optional initial data array, typically from a
95
+ * server response, or constructed directly in Javascript. The array is used
96
+ * in place and becomes part of the constructed object. It is not cloned.
97
+ * If no data is provided, the constructed object will be empty, but still
98
+ * valid.
99
+ * @extends {jspb.Message}
100
+ * @constructor
101
+ */
102
+ proto.supervisor.WorkspaceInfoResponse.Repository = function(opt_data) {
103
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
104
+ };
105
+ goog.inherits(proto.supervisor.WorkspaceInfoResponse.Repository, jspb.Message);
106
+ if (goog.DEBUG && !COMPILED) {
107
+ /**
108
+ * @public
109
+ * @override
110
+ */
111
+ proto.supervisor.WorkspaceInfoResponse.Repository.displayName = 'proto.supervisor.WorkspaceInfoResponse.Repository';
112
+ }
85
113
 
86
114
 
87
115
 
@@ -249,7 +277,12 @@ proto.supervisor.WorkspaceInfoResponse.toObject = function(includeInstance, msg)
249
277
  userHome: jspb.Message.getFieldWithDefault(msg, 6, ""),
250
278
  gitpodApi: (f = msg.getGitpodApi()) && proto.supervisor.WorkspaceInfoResponse.GitpodAPI.toObject(includeInstance, f),
251
279
  gitpodHost: jspb.Message.getFieldWithDefault(msg, 8, ""),
252
- workspaceContextUrl: jspb.Message.getFieldWithDefault(msg, 9, "")
280
+ workspaceContextUrl: jspb.Message.getFieldWithDefault(msg, 9, ""),
281
+ repository: (f = msg.getRepository()) && proto.supervisor.WorkspaceInfoResponse.Repository.toObject(includeInstance, f),
282
+ workspaceClusterHost: jspb.Message.getFieldWithDefault(msg, 11, ""),
283
+ workspaceUrl: jspb.Message.getFieldWithDefault(msg, 12, ""),
284
+ ideAlias: jspb.Message.getFieldWithDefault(msg, 13, ""),
285
+ idePort: jspb.Message.getFieldWithDefault(msg, 14, 0)
253
286
  };
254
287
 
255
288
  if (includeInstance) {
@@ -323,6 +356,27 @@ proto.supervisor.WorkspaceInfoResponse.deserializeBinaryFromReader = function(ms
323
356
  var value = /** @type {string} */ (reader.readString());
324
357
  msg.setWorkspaceContextUrl(value);
325
358
  break;
359
+ case 10:
360
+ var value = new proto.supervisor.WorkspaceInfoResponse.Repository;
361
+ reader.readMessage(value,proto.supervisor.WorkspaceInfoResponse.Repository.deserializeBinaryFromReader);
362
+ msg.setRepository(value);
363
+ break;
364
+ case 11:
365
+ var value = /** @type {string} */ (reader.readString());
366
+ msg.setWorkspaceClusterHost(value);
367
+ break;
368
+ case 12:
369
+ var value = /** @type {string} */ (reader.readString());
370
+ msg.setWorkspaceUrl(value);
371
+ break;
372
+ case 13:
373
+ var value = /** @type {string} */ (reader.readString());
374
+ msg.setIdeAlias(value);
375
+ break;
376
+ case 14:
377
+ var value = /** @type {number} */ (reader.readUint32());
378
+ msg.setIdePort(value);
379
+ break;
326
380
  default:
327
381
  reader.skipField();
328
382
  break;
@@ -416,6 +470,42 @@ proto.supervisor.WorkspaceInfoResponse.serializeBinaryToWriter = function(messag
416
470
  f
417
471
  );
418
472
  }
473
+ f = message.getRepository();
474
+ if (f != null) {
475
+ writer.writeMessage(
476
+ 10,
477
+ f,
478
+ proto.supervisor.WorkspaceInfoResponse.Repository.serializeBinaryToWriter
479
+ );
480
+ }
481
+ f = message.getWorkspaceClusterHost();
482
+ if (f.length > 0) {
483
+ writer.writeString(
484
+ 11,
485
+ f
486
+ );
487
+ }
488
+ f = message.getWorkspaceUrl();
489
+ if (f.length > 0) {
490
+ writer.writeString(
491
+ 12,
492
+ f
493
+ );
494
+ }
495
+ f = message.getIdeAlias();
496
+ if (f.length > 0) {
497
+ writer.writeString(
498
+ 13,
499
+ f
500
+ );
501
+ }
502
+ f = message.getIdePort();
503
+ if (f !== 0) {
504
+ writer.writeUint32(
505
+ 14,
506
+ f
507
+ );
508
+ }
419
509
  };
420
510
 
421
511
 
@@ -579,6 +669,166 @@ proto.supervisor.WorkspaceInfoResponse.GitpodAPI.prototype.setHost = function(va
579
669
  };
580
670
 
581
671
 
672
+
673
+
674
+
675
+ if (jspb.Message.GENERATE_TO_OBJECT) {
676
+ /**
677
+ * Creates an object representation of this proto.
678
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
679
+ * Optional fields that are not set will be set to undefined.
680
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
681
+ * For the list of reserved names please see:
682
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
683
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
684
+ * JSPB instance for transitional soy proto support:
685
+ * http://goto/soy-param-migration
686
+ * @return {!Object}
687
+ */
688
+ proto.supervisor.WorkspaceInfoResponse.Repository.prototype.toObject = function(opt_includeInstance) {
689
+ return proto.supervisor.WorkspaceInfoResponse.Repository.toObject(opt_includeInstance, this);
690
+ };
691
+
692
+
693
+ /**
694
+ * Static version of the {@see toObject} method.
695
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
696
+ * the JSPB instance for transitional soy proto support:
697
+ * http://goto/soy-param-migration
698
+ * @param {!proto.supervisor.WorkspaceInfoResponse.Repository} msg The msg instance to transform.
699
+ * @return {!Object}
700
+ * @suppress {unusedLocalVariables} f is only used for nested messages
701
+ */
702
+ proto.supervisor.WorkspaceInfoResponse.Repository.toObject = function(includeInstance, msg) {
703
+ var f, obj = {
704
+ owner: jspb.Message.getFieldWithDefault(msg, 1, ""),
705
+ name: jspb.Message.getFieldWithDefault(msg, 2, "")
706
+ };
707
+
708
+ if (includeInstance) {
709
+ obj.$jspbMessageInstance = msg;
710
+ }
711
+ return obj;
712
+ };
713
+ }
714
+
715
+
716
+ /**
717
+ * Deserializes binary data (in protobuf wire format).
718
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
719
+ * @return {!proto.supervisor.WorkspaceInfoResponse.Repository}
720
+ */
721
+ proto.supervisor.WorkspaceInfoResponse.Repository.deserializeBinary = function(bytes) {
722
+ var reader = new jspb.BinaryReader(bytes);
723
+ var msg = new proto.supervisor.WorkspaceInfoResponse.Repository;
724
+ return proto.supervisor.WorkspaceInfoResponse.Repository.deserializeBinaryFromReader(msg, reader);
725
+ };
726
+
727
+
728
+ /**
729
+ * Deserializes binary data (in protobuf wire format) from the
730
+ * given reader into the given message object.
731
+ * @param {!proto.supervisor.WorkspaceInfoResponse.Repository} msg The message object to deserialize into.
732
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
733
+ * @return {!proto.supervisor.WorkspaceInfoResponse.Repository}
734
+ */
735
+ proto.supervisor.WorkspaceInfoResponse.Repository.deserializeBinaryFromReader = function(msg, reader) {
736
+ while (reader.nextField()) {
737
+ if (reader.isEndGroup()) {
738
+ break;
739
+ }
740
+ var field = reader.getFieldNumber();
741
+ switch (field) {
742
+ case 1:
743
+ var value = /** @type {string} */ (reader.readString());
744
+ msg.setOwner(value);
745
+ break;
746
+ case 2:
747
+ var value = /** @type {string} */ (reader.readString());
748
+ msg.setName(value);
749
+ break;
750
+ default:
751
+ reader.skipField();
752
+ break;
753
+ }
754
+ }
755
+ return msg;
756
+ };
757
+
758
+
759
+ /**
760
+ * Serializes the message to binary data (in protobuf wire format).
761
+ * @return {!Uint8Array}
762
+ */
763
+ proto.supervisor.WorkspaceInfoResponse.Repository.prototype.serializeBinary = function() {
764
+ var writer = new jspb.BinaryWriter();
765
+ proto.supervisor.WorkspaceInfoResponse.Repository.serializeBinaryToWriter(this, writer);
766
+ return writer.getResultBuffer();
767
+ };
768
+
769
+
770
+ /**
771
+ * Serializes the given message to binary data (in protobuf wire
772
+ * format), writing to the given BinaryWriter.
773
+ * @param {!proto.supervisor.WorkspaceInfoResponse.Repository} message
774
+ * @param {!jspb.BinaryWriter} writer
775
+ * @suppress {unusedLocalVariables} f is only used for nested messages
776
+ */
777
+ proto.supervisor.WorkspaceInfoResponse.Repository.serializeBinaryToWriter = function(message, writer) {
778
+ var f = undefined;
779
+ f = message.getOwner();
780
+ if (f.length > 0) {
781
+ writer.writeString(
782
+ 1,
783
+ f
784
+ );
785
+ }
786
+ f = message.getName();
787
+ if (f.length > 0) {
788
+ writer.writeString(
789
+ 2,
790
+ f
791
+ );
792
+ }
793
+ };
794
+
795
+
796
+ /**
797
+ * optional string owner = 1;
798
+ * @return {string}
799
+ */
800
+ proto.supervisor.WorkspaceInfoResponse.Repository.prototype.getOwner = function() {
801
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
802
+ };
803
+
804
+
805
+ /**
806
+ * @param {string} value
807
+ * @return {!proto.supervisor.WorkspaceInfoResponse.Repository} returns this
808
+ */
809
+ proto.supervisor.WorkspaceInfoResponse.Repository.prototype.setOwner = function(value) {
810
+ return jspb.Message.setProto3StringField(this, 1, value);
811
+ };
812
+
813
+
814
+ /**
815
+ * optional string name = 2;
816
+ * @return {string}
817
+ */
818
+ proto.supervisor.WorkspaceInfoResponse.Repository.prototype.getName = function() {
819
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
820
+ };
821
+
822
+
823
+ /**
824
+ * @param {string} value
825
+ * @return {!proto.supervisor.WorkspaceInfoResponse.Repository} returns this
826
+ */
827
+ proto.supervisor.WorkspaceInfoResponse.Repository.prototype.setName = function(value) {
828
+ return jspb.Message.setProto3StringField(this, 2, value);
829
+ };
830
+
831
+
582
832
  /**
583
833
  * optional string workspace_id = 1;
584
834
  * @return {string}
@@ -796,4 +1046,113 @@ proto.supervisor.WorkspaceInfoResponse.prototype.setWorkspaceContextUrl = functi
796
1046
  };
797
1047
 
798
1048
 
1049
+ /**
1050
+ * optional Repository repository = 10;
1051
+ * @return {?proto.supervisor.WorkspaceInfoResponse.Repository}
1052
+ */
1053
+ proto.supervisor.WorkspaceInfoResponse.prototype.getRepository = function() {
1054
+ return /** @type{?proto.supervisor.WorkspaceInfoResponse.Repository} */ (
1055
+ jspb.Message.getWrapperField(this, proto.supervisor.WorkspaceInfoResponse.Repository, 10));
1056
+ };
1057
+
1058
+
1059
+ /**
1060
+ * @param {?proto.supervisor.WorkspaceInfoResponse.Repository|undefined} value
1061
+ * @return {!proto.supervisor.WorkspaceInfoResponse} returns this
1062
+ */
1063
+ proto.supervisor.WorkspaceInfoResponse.prototype.setRepository = function(value) {
1064
+ return jspb.Message.setWrapperField(this, 10, value);
1065
+ };
1066
+
1067
+
1068
+ /**
1069
+ * Clears the message field making it undefined.
1070
+ * @return {!proto.supervisor.WorkspaceInfoResponse} returns this
1071
+ */
1072
+ proto.supervisor.WorkspaceInfoResponse.prototype.clearRepository = function() {
1073
+ return this.setRepository(undefined);
1074
+ };
1075
+
1076
+
1077
+ /**
1078
+ * Returns whether this field is set.
1079
+ * @return {boolean}
1080
+ */
1081
+ proto.supervisor.WorkspaceInfoResponse.prototype.hasRepository = function() {
1082
+ return jspb.Message.getField(this, 10) != null;
1083
+ };
1084
+
1085
+
1086
+ /**
1087
+ * optional string workspace_cluster_host = 11;
1088
+ * @return {string}
1089
+ */
1090
+ proto.supervisor.WorkspaceInfoResponse.prototype.getWorkspaceClusterHost = function() {
1091
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 11, ""));
1092
+ };
1093
+
1094
+
1095
+ /**
1096
+ * @param {string} value
1097
+ * @return {!proto.supervisor.WorkspaceInfoResponse} returns this
1098
+ */
1099
+ proto.supervisor.WorkspaceInfoResponse.prototype.setWorkspaceClusterHost = function(value) {
1100
+ return jspb.Message.setProto3StringField(this, 11, value);
1101
+ };
1102
+
1103
+
1104
+ /**
1105
+ * optional string workspace_url = 12;
1106
+ * @return {string}
1107
+ */
1108
+ proto.supervisor.WorkspaceInfoResponse.prototype.getWorkspaceUrl = function() {
1109
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 12, ""));
1110
+ };
1111
+
1112
+
1113
+ /**
1114
+ * @param {string} value
1115
+ * @return {!proto.supervisor.WorkspaceInfoResponse} returns this
1116
+ */
1117
+ proto.supervisor.WorkspaceInfoResponse.prototype.setWorkspaceUrl = function(value) {
1118
+ return jspb.Message.setProto3StringField(this, 12, value);
1119
+ };
1120
+
1121
+
1122
+ /**
1123
+ * optional string ide_alias = 13;
1124
+ * @return {string}
1125
+ */
1126
+ proto.supervisor.WorkspaceInfoResponse.prototype.getIdeAlias = function() {
1127
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 13, ""));
1128
+ };
1129
+
1130
+
1131
+ /**
1132
+ * @param {string} value
1133
+ * @return {!proto.supervisor.WorkspaceInfoResponse} returns this
1134
+ */
1135
+ proto.supervisor.WorkspaceInfoResponse.prototype.setIdeAlias = function(value) {
1136
+ return jspb.Message.setProto3StringField(this, 13, value);
1137
+ };
1138
+
1139
+
1140
+ /**
1141
+ * optional uint32 ide_port = 14;
1142
+ * @return {number}
1143
+ */
1144
+ proto.supervisor.WorkspaceInfoResponse.prototype.getIdePort = function() {
1145
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 14, 0));
1146
+ };
1147
+
1148
+
1149
+ /**
1150
+ * @param {number} value
1151
+ * @return {!proto.supervisor.WorkspaceInfoResponse} returns this
1152
+ */
1153
+ proto.supervisor.WorkspaceInfoResponse.prototype.setIdePort = function(value) {
1154
+ return jspb.Message.setProto3IntField(this, 14, value);
1155
+ };
1156
+
1157
+
799
1158
  goog.object.extend(exports, proto.supervisor);
@@ -4,13 +4,16 @@
4
4
  /* tslint:disable */
5
5
  /* eslint-disable */
6
6
 
7
- import * as grpc from "grpc";
7
+ import * as grpc from "@grpc/grpc-js";
8
8
  import * as notification_pb from "./notification_pb";
9
9
 
10
10
  interface INotificationServiceService extends grpc.ServiceDefinition<grpc.UntypedServiceImplementation> {
11
11
  notify: INotificationServiceService_INotify;
12
12
  subscribe: INotificationServiceService_ISubscribe;
13
13
  respond: INotificationServiceService_IRespond;
14
+ subscribeActive: INotificationServiceService_ISubscribeActive;
15
+ notifyActive: INotificationServiceService_INotifyActive;
16
+ notifyActiveRespond: INotificationServiceService_INotifyActiveRespond;
14
17
  }
15
18
 
16
19
  interface INotificationServiceService_INotify extends grpc.MethodDefinition<notification_pb.NotifyRequest, notification_pb.NotifyResponse> {
@@ -40,13 +43,43 @@ interface INotificationServiceService_IRespond extends grpc.MethodDefinition<not
40
43
  responseSerialize: grpc.serialize<notification_pb.RespondResponse>;
41
44
  responseDeserialize: grpc.deserialize<notification_pb.RespondResponse>;
42
45
  }
46
+ interface INotificationServiceService_ISubscribeActive extends grpc.MethodDefinition<notification_pb.SubscribeActiveRequest, notification_pb.SubscribeActiveResponse> {
47
+ path: "/supervisor.NotificationService/SubscribeActive";
48
+ requestStream: false;
49
+ responseStream: true;
50
+ requestSerialize: grpc.serialize<notification_pb.SubscribeActiveRequest>;
51
+ requestDeserialize: grpc.deserialize<notification_pb.SubscribeActiveRequest>;
52
+ responseSerialize: grpc.serialize<notification_pb.SubscribeActiveResponse>;
53
+ responseDeserialize: grpc.deserialize<notification_pb.SubscribeActiveResponse>;
54
+ }
55
+ interface INotificationServiceService_INotifyActive extends grpc.MethodDefinition<notification_pb.NotifyActiveRequest, notification_pb.NotifyActiveResponse> {
56
+ path: "/supervisor.NotificationService/NotifyActive";
57
+ requestStream: false;
58
+ responseStream: false;
59
+ requestSerialize: grpc.serialize<notification_pb.NotifyActiveRequest>;
60
+ requestDeserialize: grpc.deserialize<notification_pb.NotifyActiveRequest>;
61
+ responseSerialize: grpc.serialize<notification_pb.NotifyActiveResponse>;
62
+ responseDeserialize: grpc.deserialize<notification_pb.NotifyActiveResponse>;
63
+ }
64
+ interface INotificationServiceService_INotifyActiveRespond extends grpc.MethodDefinition<notification_pb.NotifyActiveRespondRequest, notification_pb.NotifyActiveRespondResponse> {
65
+ path: "/supervisor.NotificationService/NotifyActiveRespond";
66
+ requestStream: false;
67
+ responseStream: false;
68
+ requestSerialize: grpc.serialize<notification_pb.NotifyActiveRespondRequest>;
69
+ requestDeserialize: grpc.deserialize<notification_pb.NotifyActiveRespondRequest>;
70
+ responseSerialize: grpc.serialize<notification_pb.NotifyActiveRespondResponse>;
71
+ responseDeserialize: grpc.deserialize<notification_pb.NotifyActiveRespondResponse>;
72
+ }
43
73
 
44
74
  export const NotificationServiceService: INotificationServiceService;
45
75
 
46
- export interface INotificationServiceServer {
76
+ export interface INotificationServiceServer extends grpc.UntypedServiceImplementation {
47
77
  notify: grpc.handleUnaryCall<notification_pb.NotifyRequest, notification_pb.NotifyResponse>;
48
78
  subscribe: grpc.handleServerStreamingCall<notification_pb.SubscribeRequest, notification_pb.SubscribeResponse>;
49
79
  respond: grpc.handleUnaryCall<notification_pb.RespondRequest, notification_pb.RespondResponse>;
80
+ subscribeActive: grpc.handleServerStreamingCall<notification_pb.SubscribeActiveRequest, notification_pb.SubscribeActiveResponse>;
81
+ notifyActive: grpc.handleUnaryCall<notification_pb.NotifyActiveRequest, notification_pb.NotifyActiveResponse>;
82
+ notifyActiveRespond: grpc.handleUnaryCall<notification_pb.NotifyActiveRespondRequest, notification_pb.NotifyActiveRespondResponse>;
50
83
  }
51
84
 
52
85
  export interface INotificationServiceClient {
@@ -58,10 +91,18 @@ export interface INotificationServiceClient {
58
91
  respond(request: notification_pb.RespondRequest, callback: (error: grpc.ServiceError | null, response: notification_pb.RespondResponse) => void): grpc.ClientUnaryCall;
59
92
  respond(request: notification_pb.RespondRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: notification_pb.RespondResponse) => void): grpc.ClientUnaryCall;
60
93
  respond(request: notification_pb.RespondRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: notification_pb.RespondResponse) => void): grpc.ClientUnaryCall;
94
+ subscribeActive(request: notification_pb.SubscribeActiveRequest, options?: Partial<grpc.CallOptions>): grpc.ClientReadableStream<notification_pb.SubscribeActiveResponse>;
95
+ subscribeActive(request: notification_pb.SubscribeActiveRequest, metadata?: grpc.Metadata, options?: Partial<grpc.CallOptions>): grpc.ClientReadableStream<notification_pb.SubscribeActiveResponse>;
96
+ notifyActive(request: notification_pb.NotifyActiveRequest, callback: (error: grpc.ServiceError | null, response: notification_pb.NotifyActiveResponse) => void): grpc.ClientUnaryCall;
97
+ notifyActive(request: notification_pb.NotifyActiveRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: notification_pb.NotifyActiveResponse) => void): grpc.ClientUnaryCall;
98
+ notifyActive(request: notification_pb.NotifyActiveRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: notification_pb.NotifyActiveResponse) => void): grpc.ClientUnaryCall;
99
+ notifyActiveRespond(request: notification_pb.NotifyActiveRespondRequest, callback: (error: grpc.ServiceError | null, response: notification_pb.NotifyActiveRespondResponse) => void): grpc.ClientUnaryCall;
100
+ notifyActiveRespond(request: notification_pb.NotifyActiveRespondRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: notification_pb.NotifyActiveRespondResponse) => void): grpc.ClientUnaryCall;
101
+ notifyActiveRespond(request: notification_pb.NotifyActiveRespondRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: notification_pb.NotifyActiveRespondResponse) => void): grpc.ClientUnaryCall;
61
102
  }
62
103
 
63
104
  export class NotificationServiceClient extends grpc.Client implements INotificationServiceClient {
64
- constructor(address: string, credentials: grpc.ChannelCredentials, options?: object);
105
+ constructor(address: string, credentials: grpc.ChannelCredentials, options?: Partial<grpc.ClientOptions>);
65
106
  public notify(request: notification_pb.NotifyRequest, callback: (error: grpc.ServiceError | null, response: notification_pb.NotifyResponse) => void): grpc.ClientUnaryCall;
66
107
  public notify(request: notification_pb.NotifyRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: notification_pb.NotifyResponse) => void): grpc.ClientUnaryCall;
67
108
  public notify(request: notification_pb.NotifyRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: notification_pb.NotifyResponse) => void): grpc.ClientUnaryCall;
@@ -70,4 +111,12 @@ export class NotificationServiceClient extends grpc.Client implements INotificat
70
111
  public respond(request: notification_pb.RespondRequest, callback: (error: grpc.ServiceError | null, response: notification_pb.RespondResponse) => void): grpc.ClientUnaryCall;
71
112
  public respond(request: notification_pb.RespondRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: notification_pb.RespondResponse) => void): grpc.ClientUnaryCall;
72
113
  public respond(request: notification_pb.RespondRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: notification_pb.RespondResponse) => void): grpc.ClientUnaryCall;
114
+ public subscribeActive(request: notification_pb.SubscribeActiveRequest, options?: Partial<grpc.CallOptions>): grpc.ClientReadableStream<notification_pb.SubscribeActiveResponse>;
115
+ public subscribeActive(request: notification_pb.SubscribeActiveRequest, metadata?: grpc.Metadata, options?: Partial<grpc.CallOptions>): grpc.ClientReadableStream<notification_pb.SubscribeActiveResponse>;
116
+ public notifyActive(request: notification_pb.NotifyActiveRequest, callback: (error: grpc.ServiceError | null, response: notification_pb.NotifyActiveResponse) => void): grpc.ClientUnaryCall;
117
+ public notifyActive(request: notification_pb.NotifyActiveRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: notification_pb.NotifyActiveResponse) => void): grpc.ClientUnaryCall;
118
+ public notifyActive(request: notification_pb.NotifyActiveRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: notification_pb.NotifyActiveResponse) => void): grpc.ClientUnaryCall;
119
+ public notifyActiveRespond(request: notification_pb.NotifyActiveRespondRequest, callback: (error: grpc.ServiceError | null, response: notification_pb.NotifyActiveRespondResponse) => void): grpc.ClientUnaryCall;
120
+ public notifyActiveRespond(request: notification_pb.NotifyActiveRespondRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: notification_pb.NotifyActiveRespondResponse) => void): grpc.ClientUnaryCall;
121
+ public notifyActiveRespond(request: notification_pb.NotifyActiveRespondRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: notification_pb.NotifyActiveRespondResponse) => void): grpc.ClientUnaryCall;
73
122
  }
@@ -9,6 +9,50 @@
9
9
  var grpc = require('@grpc/grpc-js');
10
10
  var notification_pb = require('./notification_pb.js');
11
11
 
12
+ function serialize_supervisor_NotifyActiveRequest(arg) {
13
+ if (!(arg instanceof notification_pb.NotifyActiveRequest)) {
14
+ throw new Error('Expected argument of type supervisor.NotifyActiveRequest');
15
+ }
16
+ return Buffer.from(arg.serializeBinary());
17
+ }
18
+
19
+ function deserialize_supervisor_NotifyActiveRequest(buffer_arg) {
20
+ return notification_pb.NotifyActiveRequest.deserializeBinary(new Uint8Array(buffer_arg));
21
+ }
22
+
23
+ function serialize_supervisor_NotifyActiveRespondRequest(arg) {
24
+ if (!(arg instanceof notification_pb.NotifyActiveRespondRequest)) {
25
+ throw new Error('Expected argument of type supervisor.NotifyActiveRespondRequest');
26
+ }
27
+ return Buffer.from(arg.serializeBinary());
28
+ }
29
+
30
+ function deserialize_supervisor_NotifyActiveRespondRequest(buffer_arg) {
31
+ return notification_pb.NotifyActiveRespondRequest.deserializeBinary(new Uint8Array(buffer_arg));
32
+ }
33
+
34
+ function serialize_supervisor_NotifyActiveRespondResponse(arg) {
35
+ if (!(arg instanceof notification_pb.NotifyActiveRespondResponse)) {
36
+ throw new Error('Expected argument of type supervisor.NotifyActiveRespondResponse');
37
+ }
38
+ return Buffer.from(arg.serializeBinary());
39
+ }
40
+
41
+ function deserialize_supervisor_NotifyActiveRespondResponse(buffer_arg) {
42
+ return notification_pb.NotifyActiveRespondResponse.deserializeBinary(new Uint8Array(buffer_arg));
43
+ }
44
+
45
+ function serialize_supervisor_NotifyActiveResponse(arg) {
46
+ if (!(arg instanceof notification_pb.NotifyActiveResponse)) {
47
+ throw new Error('Expected argument of type supervisor.NotifyActiveResponse');
48
+ }
49
+ return Buffer.from(arg.serializeBinary());
50
+ }
51
+
52
+ function deserialize_supervisor_NotifyActiveResponse(buffer_arg) {
53
+ return notification_pb.NotifyActiveResponse.deserializeBinary(new Uint8Array(buffer_arg));
54
+ }
55
+
12
56
  function serialize_supervisor_NotifyRequest(arg) {
13
57
  if (!(arg instanceof notification_pb.NotifyRequest)) {
14
58
  throw new Error('Expected argument of type supervisor.NotifyRequest');
@@ -53,6 +97,28 @@ function deserialize_supervisor_RespondResponse(buffer_arg) {
53
97
  return notification_pb.RespondResponse.deserializeBinary(new Uint8Array(buffer_arg));
54
98
  }
55
99
 
100
+ function serialize_supervisor_SubscribeActiveRequest(arg) {
101
+ if (!(arg instanceof notification_pb.SubscribeActiveRequest)) {
102
+ throw new Error('Expected argument of type supervisor.SubscribeActiveRequest');
103
+ }
104
+ return Buffer.from(arg.serializeBinary());
105
+ }
106
+
107
+ function deserialize_supervisor_SubscribeActiveRequest(buffer_arg) {
108
+ return notification_pb.SubscribeActiveRequest.deserializeBinary(new Uint8Array(buffer_arg));
109
+ }
110
+
111
+ function serialize_supervisor_SubscribeActiveResponse(arg) {
112
+ if (!(arg instanceof notification_pb.SubscribeActiveResponse)) {
113
+ throw new Error('Expected argument of type supervisor.SubscribeActiveResponse');
114
+ }
115
+ return Buffer.from(arg.serializeBinary());
116
+ }
117
+
118
+ function deserialize_supervisor_SubscribeActiveResponse(buffer_arg) {
119
+ return notification_pb.SubscribeActiveResponse.deserializeBinary(new Uint8Array(buffer_arg));
120
+ }
121
+
56
122
  function serialize_supervisor_SubscribeRequest(arg) {
57
123
  if (!(arg instanceof notification_pb.SubscribeRequest)) {
58
124
  throw new Error('Expected argument of type supervisor.SubscribeRequest');
@@ -76,10 +142,11 @@ function deserialize_supervisor_SubscribeResponse(buffer_arg) {
76
142
  }
77
143
 
78
144
 
79
- // Notification serivce allows external processes to notify the user and ask for decisions.
145
+ // Notification serivce allows external processes to notify the user and ask for
146
+ // decisions.
80
147
  var NotificationServiceService = exports.NotificationServiceService = {
81
- // Prompts the user and asks for a decision. Typically called by some external process.
82
- // If the list of actions is empty this service returns immediately,
148
+ // Prompts the user and asks for a decision. Typically called by some external
149
+ // process. If the list of actions is empty this service returns immediately,
83
150
  // otherwise it blocks until the user has made their choice.
84
151
  notify: {
85
152
  path: '/supervisor.NotificationService/Notify',
@@ -104,7 +171,8 @@ subscribe: {
104
171
  responseSerialize: serialize_supervisor_SubscribeResponse,
105
172
  responseDeserialize: deserialize_supervisor_SubscribeResponse,
106
173
  },
107
- // Report a user's choice as a response to a notification. Typically called by the IDE.
174
+ // Report a user's choice as a response to a notification. Typically called by
175
+ // the IDE.
108
176
  respond: {
109
177
  path: '/supervisor.NotificationService/Respond',
110
178
  requestStream: false,
@@ -116,6 +184,49 @@ respond: {
116
184
  responseSerialize: serialize_supervisor_RespondResponse,
117
185
  responseDeserialize: deserialize_supervisor_RespondResponse,
118
186
  },
187
+ // Called by the IDE to inform supervisor about which is the latest client
188
+ // actively used by the user. We consider active the last IDE with focus.
189
+ // Only 1 stream is kept open at any given time. A new subscription
190
+ // overrides the previous one, causing the stream to close.
191
+ // Supervisor will respond with a stream to which the IDE will listen
192
+ // waiting to receive actions to run, for example: `open` or `preview`
193
+ subscribeActive: {
194
+ path: '/supervisor.NotificationService/SubscribeActive',
195
+ requestStream: false,
196
+ responseStream: true,
197
+ requestType: notification_pb.SubscribeActiveRequest,
198
+ responseType: notification_pb.SubscribeActiveResponse,
199
+ requestSerialize: serialize_supervisor_SubscribeActiveRequest,
200
+ requestDeserialize: deserialize_supervisor_SubscribeActiveRequest,
201
+ responseSerialize: serialize_supervisor_SubscribeActiveResponse,
202
+ responseDeserialize: deserialize_supervisor_SubscribeActiveResponse,
203
+ },
204
+ // Used by gp-cli to ask supervisor to request the active client
205
+ // to run a given command (eg. open or preview)
206
+ notifyActive: {
207
+ path: '/supervisor.NotificationService/NotifyActive',
208
+ requestStream: false,
209
+ responseStream: false,
210
+ requestType: notification_pb.NotifyActiveRequest,
211
+ responseType: notification_pb.NotifyActiveResponse,
212
+ requestSerialize: serialize_supervisor_NotifyActiveRequest,
213
+ requestDeserialize: deserialize_supervisor_NotifyActiveRequest,
214
+ responseSerialize: serialize_supervisor_NotifyActiveResponse,
215
+ responseDeserialize: deserialize_supervisor_NotifyActiveResponse,
216
+ },
217
+ // Used by the IDE to inform supervisor about the result (eg. success or
218
+ // failure) of the action (eg. open or preview) requested via NotifyActive
219
+ notifyActiveRespond: {
220
+ path: '/supervisor.NotificationService/NotifyActiveRespond',
221
+ requestStream: false,
222
+ responseStream: false,
223
+ requestType: notification_pb.NotifyActiveRespondRequest,
224
+ responseType: notification_pb.NotifyActiveRespondResponse,
225
+ requestSerialize: serialize_supervisor_NotifyActiveRespondRequest,
226
+ requestDeserialize: deserialize_supervisor_NotifyActiveRespondRequest,
227
+ responseSerialize: serialize_supervisor_NotifyActiveRespondResponse,
228
+ responseDeserialize: deserialize_supervisor_NotifyActiveRespondResponse,
229
+ },
119
230
  };
120
231
 
121
232
  exports.NotificationServiceClient = grpc.makeGenericClientConstructor(NotificationServiceService);