@gitpod/supervisor-api-grpc 0.1.5-prs-dev-image-dogfood.1 → 0.1.5-release-2022.9.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/control_pb.js CHANGED
@@ -13,13 +13,7 @@
13
13
 
14
14
  var jspb = require('google-protobuf');
15
15
  var goog = jspb;
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));
16
+ var global = (function() { return this || window || global || self || Function('return this')(); }).call(null);
23
17
 
24
18
  goog.exportSymbol('proto.supervisor.CreateSSHKeyPairRequest', null, global);
25
19
  goog.exportSymbol('proto.supervisor.CreateSSHKeyPairResponse', null, global);
package/lib/info_pb.d.ts CHANGED
@@ -65,6 +65,11 @@ export class WorkspaceInfoResponse extends jspb.Message {
65
65
  getIdePort(): number;
66
66
  setIdePort(value: number): WorkspaceInfoResponse;
67
67
 
68
+ hasWorkspaceClass(): boolean;
69
+ clearWorkspaceClass(): void;
70
+ getWorkspaceClass(): WorkspaceInfoResponse.WorkspaceClass | undefined;
71
+ setWorkspaceClass(value?: WorkspaceInfoResponse.WorkspaceClass): WorkspaceInfoResponse;
72
+
68
73
  getWorkspaceLocationCase(): WorkspaceInfoResponse.WorkspaceLocationCase;
69
74
 
70
75
  serializeBinary(): Uint8Array;
@@ -93,6 +98,7 @@ export namespace WorkspaceInfoResponse {
93
98
  workspaceUrl: string,
94
99
  ideAlias: string,
95
100
  idePort: number,
101
+ workspaceClass?: WorkspaceInfoResponse.WorkspaceClass.AsObject,
96
102
  }
97
103
 
98
104
 
@@ -142,6 +148,32 @@ export namespace WorkspaceInfoResponse {
142
148
  }
143
149
  }
144
150
 
151
+ export class WorkspaceClass extends jspb.Message {
152
+ getId(): string;
153
+ setId(value: string): WorkspaceClass;
154
+ getDisplayName(): string;
155
+ setDisplayName(value: string): WorkspaceClass;
156
+ getDescription(): string;
157
+ setDescription(value: string): WorkspaceClass;
158
+
159
+ serializeBinary(): Uint8Array;
160
+ toObject(includeInstance?: boolean): WorkspaceClass.AsObject;
161
+ static toObject(includeInstance: boolean, msg: WorkspaceClass): WorkspaceClass.AsObject;
162
+ static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
163
+ static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
164
+ static serializeBinaryToWriter(message: WorkspaceClass, writer: jspb.BinaryWriter): void;
165
+ static deserializeBinary(bytes: Uint8Array): WorkspaceClass;
166
+ static deserializeBinaryFromReader(message: WorkspaceClass, reader: jspb.BinaryReader): WorkspaceClass;
167
+ }
168
+
169
+ export namespace WorkspaceClass {
170
+ export type AsObject = {
171
+ id: string,
172
+ displayName: string,
173
+ description: string,
174
+ }
175
+ }
176
+
145
177
 
146
178
  export enum WorkspaceLocationCase {
147
179
  WORKSPACE_LOCATION_NOT_SET = 0,
package/lib/info_pb.js CHANGED
@@ -13,18 +13,13 @@
13
13
 
14
14
  var jspb = require('google-protobuf');
15
15
  var goog = jspb;
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));
16
+ var global = (function() { return this || window || global || self || Function('return this')(); }).call(null);
23
17
 
24
18
  goog.exportSymbol('proto.supervisor.WorkspaceInfoRequest', null, global);
25
19
  goog.exportSymbol('proto.supervisor.WorkspaceInfoResponse', null, global);
26
20
  goog.exportSymbol('proto.supervisor.WorkspaceInfoResponse.GitpodAPI', null, global);
27
21
  goog.exportSymbol('proto.supervisor.WorkspaceInfoResponse.Repository', null, global);
22
+ goog.exportSymbol('proto.supervisor.WorkspaceInfoResponse.WorkspaceClass', null, global);
28
23
  goog.exportSymbol('proto.supervisor.WorkspaceInfoResponse.WorkspaceLocationCase', null, global);
29
24
  /**
30
25
  * Generated by JsPbCodeGenerator.
@@ -110,6 +105,27 @@ if (goog.DEBUG && !COMPILED) {
110
105
  */
111
106
  proto.supervisor.WorkspaceInfoResponse.Repository.displayName = 'proto.supervisor.WorkspaceInfoResponse.Repository';
112
107
  }
108
+ /**
109
+ * Generated by JsPbCodeGenerator.
110
+ * @param {Array=} opt_data Optional initial data array, typically from a
111
+ * server response, or constructed directly in Javascript. The array is used
112
+ * in place and becomes part of the constructed object. It is not cloned.
113
+ * If no data is provided, the constructed object will be empty, but still
114
+ * valid.
115
+ * @extends {jspb.Message}
116
+ * @constructor
117
+ */
118
+ proto.supervisor.WorkspaceInfoResponse.WorkspaceClass = function(opt_data) {
119
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
120
+ };
121
+ goog.inherits(proto.supervisor.WorkspaceInfoResponse.WorkspaceClass, jspb.Message);
122
+ if (goog.DEBUG && !COMPILED) {
123
+ /**
124
+ * @public
125
+ * @override
126
+ */
127
+ proto.supervisor.WorkspaceInfoResponse.WorkspaceClass.displayName = 'proto.supervisor.WorkspaceInfoResponse.WorkspaceClass';
128
+ }
113
129
 
114
130
 
115
131
 
@@ -282,7 +298,8 @@ proto.supervisor.WorkspaceInfoResponse.toObject = function(includeInstance, msg)
282
298
  workspaceClusterHost: jspb.Message.getFieldWithDefault(msg, 11, ""),
283
299
  workspaceUrl: jspb.Message.getFieldWithDefault(msg, 12, ""),
284
300
  ideAlias: jspb.Message.getFieldWithDefault(msg, 13, ""),
285
- idePort: jspb.Message.getFieldWithDefault(msg, 14, 0)
301
+ idePort: jspb.Message.getFieldWithDefault(msg, 14, 0),
302
+ workspaceClass: (f = msg.getWorkspaceClass()) && proto.supervisor.WorkspaceInfoResponse.WorkspaceClass.toObject(includeInstance, f)
286
303
  };
287
304
 
288
305
  if (includeInstance) {
@@ -377,6 +394,11 @@ proto.supervisor.WorkspaceInfoResponse.deserializeBinaryFromReader = function(ms
377
394
  var value = /** @type {number} */ (reader.readUint32());
378
395
  msg.setIdePort(value);
379
396
  break;
397
+ case 15:
398
+ var value = new proto.supervisor.WorkspaceInfoResponse.WorkspaceClass;
399
+ reader.readMessage(value,proto.supervisor.WorkspaceInfoResponse.WorkspaceClass.deserializeBinaryFromReader);
400
+ msg.setWorkspaceClass(value);
401
+ break;
380
402
  default:
381
403
  reader.skipField();
382
404
  break;
@@ -506,6 +528,14 @@ proto.supervisor.WorkspaceInfoResponse.serializeBinaryToWriter = function(messag
506
528
  f
507
529
  );
508
530
  }
531
+ f = message.getWorkspaceClass();
532
+ if (f != null) {
533
+ writer.writeMessage(
534
+ 15,
535
+ f,
536
+ proto.supervisor.WorkspaceInfoResponse.WorkspaceClass.serializeBinaryToWriter
537
+ );
538
+ }
509
539
  };
510
540
 
511
541
 
@@ -829,6 +859,196 @@ proto.supervisor.WorkspaceInfoResponse.Repository.prototype.setName = function(v
829
859
  };
830
860
 
831
861
 
862
+
863
+
864
+
865
+ if (jspb.Message.GENERATE_TO_OBJECT) {
866
+ /**
867
+ * Creates an object representation of this proto.
868
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
869
+ * Optional fields that are not set will be set to undefined.
870
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
871
+ * For the list of reserved names please see:
872
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
873
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
874
+ * JSPB instance for transitional soy proto support:
875
+ * http://goto/soy-param-migration
876
+ * @return {!Object}
877
+ */
878
+ proto.supervisor.WorkspaceInfoResponse.WorkspaceClass.prototype.toObject = function(opt_includeInstance) {
879
+ return proto.supervisor.WorkspaceInfoResponse.WorkspaceClass.toObject(opt_includeInstance, this);
880
+ };
881
+
882
+
883
+ /**
884
+ * Static version of the {@see toObject} method.
885
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
886
+ * the JSPB instance for transitional soy proto support:
887
+ * http://goto/soy-param-migration
888
+ * @param {!proto.supervisor.WorkspaceInfoResponse.WorkspaceClass} msg The msg instance to transform.
889
+ * @return {!Object}
890
+ * @suppress {unusedLocalVariables} f is only used for nested messages
891
+ */
892
+ proto.supervisor.WorkspaceInfoResponse.WorkspaceClass.toObject = function(includeInstance, msg) {
893
+ var f, obj = {
894
+ id: jspb.Message.getFieldWithDefault(msg, 1, ""),
895
+ displayName: jspb.Message.getFieldWithDefault(msg, 2, ""),
896
+ description: jspb.Message.getFieldWithDefault(msg, 3, "")
897
+ };
898
+
899
+ if (includeInstance) {
900
+ obj.$jspbMessageInstance = msg;
901
+ }
902
+ return obj;
903
+ };
904
+ }
905
+
906
+
907
+ /**
908
+ * Deserializes binary data (in protobuf wire format).
909
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
910
+ * @return {!proto.supervisor.WorkspaceInfoResponse.WorkspaceClass}
911
+ */
912
+ proto.supervisor.WorkspaceInfoResponse.WorkspaceClass.deserializeBinary = function(bytes) {
913
+ var reader = new jspb.BinaryReader(bytes);
914
+ var msg = new proto.supervisor.WorkspaceInfoResponse.WorkspaceClass;
915
+ return proto.supervisor.WorkspaceInfoResponse.WorkspaceClass.deserializeBinaryFromReader(msg, reader);
916
+ };
917
+
918
+
919
+ /**
920
+ * Deserializes binary data (in protobuf wire format) from the
921
+ * given reader into the given message object.
922
+ * @param {!proto.supervisor.WorkspaceInfoResponse.WorkspaceClass} msg The message object to deserialize into.
923
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
924
+ * @return {!proto.supervisor.WorkspaceInfoResponse.WorkspaceClass}
925
+ */
926
+ proto.supervisor.WorkspaceInfoResponse.WorkspaceClass.deserializeBinaryFromReader = function(msg, reader) {
927
+ while (reader.nextField()) {
928
+ if (reader.isEndGroup()) {
929
+ break;
930
+ }
931
+ var field = reader.getFieldNumber();
932
+ switch (field) {
933
+ case 1:
934
+ var value = /** @type {string} */ (reader.readString());
935
+ msg.setId(value);
936
+ break;
937
+ case 2:
938
+ var value = /** @type {string} */ (reader.readString());
939
+ msg.setDisplayName(value);
940
+ break;
941
+ case 3:
942
+ var value = /** @type {string} */ (reader.readString());
943
+ msg.setDescription(value);
944
+ break;
945
+ default:
946
+ reader.skipField();
947
+ break;
948
+ }
949
+ }
950
+ return msg;
951
+ };
952
+
953
+
954
+ /**
955
+ * Serializes the message to binary data (in protobuf wire format).
956
+ * @return {!Uint8Array}
957
+ */
958
+ proto.supervisor.WorkspaceInfoResponse.WorkspaceClass.prototype.serializeBinary = function() {
959
+ var writer = new jspb.BinaryWriter();
960
+ proto.supervisor.WorkspaceInfoResponse.WorkspaceClass.serializeBinaryToWriter(this, writer);
961
+ return writer.getResultBuffer();
962
+ };
963
+
964
+
965
+ /**
966
+ * Serializes the given message to binary data (in protobuf wire
967
+ * format), writing to the given BinaryWriter.
968
+ * @param {!proto.supervisor.WorkspaceInfoResponse.WorkspaceClass} message
969
+ * @param {!jspb.BinaryWriter} writer
970
+ * @suppress {unusedLocalVariables} f is only used for nested messages
971
+ */
972
+ proto.supervisor.WorkspaceInfoResponse.WorkspaceClass.serializeBinaryToWriter = function(message, writer) {
973
+ var f = undefined;
974
+ f = message.getId();
975
+ if (f.length > 0) {
976
+ writer.writeString(
977
+ 1,
978
+ f
979
+ );
980
+ }
981
+ f = message.getDisplayName();
982
+ if (f.length > 0) {
983
+ writer.writeString(
984
+ 2,
985
+ f
986
+ );
987
+ }
988
+ f = message.getDescription();
989
+ if (f.length > 0) {
990
+ writer.writeString(
991
+ 3,
992
+ f
993
+ );
994
+ }
995
+ };
996
+
997
+
998
+ /**
999
+ * optional string id = 1;
1000
+ * @return {string}
1001
+ */
1002
+ proto.supervisor.WorkspaceInfoResponse.WorkspaceClass.prototype.getId = function() {
1003
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
1004
+ };
1005
+
1006
+
1007
+ /**
1008
+ * @param {string} value
1009
+ * @return {!proto.supervisor.WorkspaceInfoResponse.WorkspaceClass} returns this
1010
+ */
1011
+ proto.supervisor.WorkspaceInfoResponse.WorkspaceClass.prototype.setId = function(value) {
1012
+ return jspb.Message.setProto3StringField(this, 1, value);
1013
+ };
1014
+
1015
+
1016
+ /**
1017
+ * optional string display_name = 2;
1018
+ * @return {string}
1019
+ */
1020
+ proto.supervisor.WorkspaceInfoResponse.WorkspaceClass.prototype.getDisplayName = function() {
1021
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
1022
+ };
1023
+
1024
+
1025
+ /**
1026
+ * @param {string} value
1027
+ * @return {!proto.supervisor.WorkspaceInfoResponse.WorkspaceClass} returns this
1028
+ */
1029
+ proto.supervisor.WorkspaceInfoResponse.WorkspaceClass.prototype.setDisplayName = function(value) {
1030
+ return jspb.Message.setProto3StringField(this, 2, value);
1031
+ };
1032
+
1033
+
1034
+ /**
1035
+ * optional string description = 3;
1036
+ * @return {string}
1037
+ */
1038
+ proto.supervisor.WorkspaceInfoResponse.WorkspaceClass.prototype.getDescription = function() {
1039
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
1040
+ };
1041
+
1042
+
1043
+ /**
1044
+ * @param {string} value
1045
+ * @return {!proto.supervisor.WorkspaceInfoResponse.WorkspaceClass} returns this
1046
+ */
1047
+ proto.supervisor.WorkspaceInfoResponse.WorkspaceClass.prototype.setDescription = function(value) {
1048
+ return jspb.Message.setProto3StringField(this, 3, value);
1049
+ };
1050
+
1051
+
832
1052
  /**
833
1053
  * optional string workspace_id = 1;
834
1054
  * @return {string}
@@ -1155,4 +1375,41 @@ proto.supervisor.WorkspaceInfoResponse.prototype.setIdePort = function(value) {
1155
1375
  };
1156
1376
 
1157
1377
 
1378
+ /**
1379
+ * optional WorkspaceClass workspace_class = 15;
1380
+ * @return {?proto.supervisor.WorkspaceInfoResponse.WorkspaceClass}
1381
+ */
1382
+ proto.supervisor.WorkspaceInfoResponse.prototype.getWorkspaceClass = function() {
1383
+ return /** @type{?proto.supervisor.WorkspaceInfoResponse.WorkspaceClass} */ (
1384
+ jspb.Message.getWrapperField(this, proto.supervisor.WorkspaceInfoResponse.WorkspaceClass, 15));
1385
+ };
1386
+
1387
+
1388
+ /**
1389
+ * @param {?proto.supervisor.WorkspaceInfoResponse.WorkspaceClass|undefined} value
1390
+ * @return {!proto.supervisor.WorkspaceInfoResponse} returns this
1391
+ */
1392
+ proto.supervisor.WorkspaceInfoResponse.prototype.setWorkspaceClass = function(value) {
1393
+ return jspb.Message.setWrapperField(this, 15, value);
1394
+ };
1395
+
1396
+
1397
+ /**
1398
+ * Clears the message field making it undefined.
1399
+ * @return {!proto.supervisor.WorkspaceInfoResponse} returns this
1400
+ */
1401
+ proto.supervisor.WorkspaceInfoResponse.prototype.clearWorkspaceClass = function() {
1402
+ return this.setWorkspaceClass(undefined);
1403
+ };
1404
+
1405
+
1406
+ /**
1407
+ * Returns whether this field is set.
1408
+ * @return {boolean}
1409
+ */
1410
+ proto.supervisor.WorkspaceInfoResponse.prototype.hasWorkspaceClass = function() {
1411
+ return jspb.Message.getField(this, 15) != null;
1412
+ };
1413
+
1414
+
1158
1415
  goog.object.extend(exports, proto.supervisor);
@@ -11,6 +11,9 @@ interface INotificationServiceService extends grpc.ServiceDefinition<grpc.Untype
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,6 +43,33 @@ 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
 
@@ -47,6 +77,9 @@ export interface INotificationServiceServer extends grpc.UntypedServiceImplement
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,6 +91,14 @@ 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 {
@@ -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);