@headspace/protos-events 1.22.0 → 1.23.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/index.d.ts CHANGED
@@ -143,20 +143,6 @@ export namespace subscription {
143
143
  * @returns Promise
144
144
  */
145
145
  public findCurrentSubscription(request: subscription.IFindCurrentSubscriptionRequest): Promise<subscription.OneSubscriptionResponse>;
146
-
147
- /**
148
- * Calls FindCurrentUserSubscription.
149
- * @param request FindCurrentUserSubscriptionRequest message or plain object
150
- * @param callback Node-style callback called with the error, if any, and UserSubscriptionResponse
151
- */
152
- public findCurrentUserSubscription(request: subscription.IFindCurrentUserSubscriptionRequest, callback: subscription.SubscriptionGrpcManager.FindCurrentUserSubscriptionCallback): void;
153
-
154
- /**
155
- * Calls FindCurrentUserSubscription.
156
- * @param request FindCurrentUserSubscriptionRequest message or plain object
157
- * @returns Promise
158
- */
159
- public findCurrentUserSubscription(request: subscription.IFindCurrentUserSubscriptionRequest): Promise<subscription.UserSubscriptionResponse>;
160
146
  }
161
147
 
162
148
  namespace SubscriptionGrpcManager {
@@ -174,13 +160,51 @@ export namespace subscription {
174
160
  * @param [response] OneSubscriptionResponse
175
161
  */
176
162
  type findCurrentSubscriptionCallback = (error: (Error|null), response?: subscription.OneSubscriptionResponse) => void;
163
+ }
164
+
165
+ /** Represents a UserSubscriptionGrpcManager */
166
+ class UserSubscriptionGrpcManager extends $protobuf.rpc.Service {
167
+
168
+ /**
169
+ * Constructs a new UserSubscriptionGrpcManager service.
170
+ * @param rpcImpl RPC implementation
171
+ * @param [requestDelimited=false] Whether requests are length-delimited
172
+ * @param [responseDelimited=false] Whether responses are length-delimited
173
+ */
174
+ constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean);
175
+
176
+ /**
177
+ * Creates new UserSubscriptionGrpcManager service using the specified rpc implementation.
178
+ * @param rpcImpl RPC implementation
179
+ * @param [requestDelimited=false] Whether requests are length-delimited
180
+ * @param [responseDelimited=false] Whether responses are length-delimited
181
+ * @returns RPC service. Useful where requests and/or responses are streamed.
182
+ */
183
+ public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): UserSubscriptionGrpcManager;
184
+
185
+ /**
186
+ * Calls findCurrentUserSubscription.
187
+ * @param request FindCurrentUserSubscriptionRequest message or plain object
188
+ * @param callback Node-style callback called with the error, if any, and UserSubscriptionResponse
189
+ */
190
+ public findCurrentUserSubscription(request: subscription.IFindCurrentUserSubscriptionRequest, callback: subscription.UserSubscriptionGrpcManager.findCurrentUserSubscriptionCallback): void;
191
+
192
+ /**
193
+ * Calls findCurrentUserSubscription.
194
+ * @param request FindCurrentUserSubscriptionRequest message or plain object
195
+ * @returns Promise
196
+ */
197
+ public findCurrentUserSubscription(request: subscription.IFindCurrentUserSubscriptionRequest): Promise<subscription.UserSubscriptionResponse>;
198
+ }
199
+
200
+ namespace UserSubscriptionGrpcManager {
177
201
 
178
202
  /**
179
- * Callback as used by {@link subscription.SubscriptionGrpcManager#findCurrentUserSubscription}.
203
+ * Callback as used by {@link subscription.UserSubscriptionGrpcManager#findCurrentUserSubscription}.
180
204
  * @param error Error, if any
181
205
  * @param [response] UserSubscriptionResponse
182
206
  */
183
- type FindCurrentUserSubscriptionCallback = (error: (Error|null), response?: subscription.UserSubscriptionResponse) => void;
207
+ type findCurrentUserSubscriptionCallback = (error: (Error|null), response?: subscription.UserSubscriptionResponse) => void;
184
208
  }
185
209
 
186
210
  /** Properties of a FindAllSubscriptionsRequest. */
package/lib/index.js CHANGED
@@ -329,40 +329,75 @@ $root.subscription = (function() {
329
329
  * @variation 2
330
330
  */
331
331
 
332
+ return SubscriptionGrpcManager;
333
+ })();
334
+
335
+ subscription.UserSubscriptionGrpcManager = (function() {
336
+
332
337
  /**
333
- * Callback as used by {@link subscription.SubscriptionGrpcManager#findCurrentUserSubscription}.
334
- * @memberof subscription.SubscriptionGrpcManager
335
- * @typedef FindCurrentUserSubscriptionCallback
338
+ * Constructs a new UserSubscriptionGrpcManager service.
339
+ * @memberof subscription
340
+ * @classdesc Represents a UserSubscriptionGrpcManager
341
+ * @extends $protobuf.rpc.Service
342
+ * @constructor
343
+ * @param {$protobuf.RPCImpl} rpcImpl RPC implementation
344
+ * @param {boolean} [requestDelimited=false] Whether requests are length-delimited
345
+ * @param {boolean} [responseDelimited=false] Whether responses are length-delimited
346
+ */
347
+ function UserSubscriptionGrpcManager(rpcImpl, requestDelimited, responseDelimited) {
348
+ $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited);
349
+ }
350
+
351
+ (UserSubscriptionGrpcManager.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = UserSubscriptionGrpcManager;
352
+
353
+ /**
354
+ * Creates new UserSubscriptionGrpcManager service using the specified rpc implementation.
355
+ * @function create
356
+ * @memberof subscription.UserSubscriptionGrpcManager
357
+ * @static
358
+ * @param {$protobuf.RPCImpl} rpcImpl RPC implementation
359
+ * @param {boolean} [requestDelimited=false] Whether requests are length-delimited
360
+ * @param {boolean} [responseDelimited=false] Whether responses are length-delimited
361
+ * @returns {UserSubscriptionGrpcManager} RPC service. Useful where requests and/or responses are streamed.
362
+ */
363
+ UserSubscriptionGrpcManager.create = function create(rpcImpl, requestDelimited, responseDelimited) {
364
+ return new this(rpcImpl, requestDelimited, responseDelimited);
365
+ };
366
+
367
+ /**
368
+ * Callback as used by {@link subscription.UserSubscriptionGrpcManager#findCurrentUserSubscription}.
369
+ * @memberof subscription.UserSubscriptionGrpcManager
370
+ * @typedef findCurrentUserSubscriptionCallback
336
371
  * @type {function}
337
372
  * @param {Error|null} error Error, if any
338
373
  * @param {subscription.UserSubscriptionResponse} [response] UserSubscriptionResponse
339
374
  */
340
375
 
341
376
  /**
342
- * Calls FindCurrentUserSubscription.
377
+ * Calls findCurrentUserSubscription.
343
378
  * @function findCurrentUserSubscription
344
- * @memberof subscription.SubscriptionGrpcManager
379
+ * @memberof subscription.UserSubscriptionGrpcManager
345
380
  * @instance
346
381
  * @param {subscription.IFindCurrentUserSubscriptionRequest} request FindCurrentUserSubscriptionRequest message or plain object
347
- * @param {subscription.SubscriptionGrpcManager.FindCurrentUserSubscriptionCallback} callback Node-style callback called with the error, if any, and UserSubscriptionResponse
382
+ * @param {subscription.UserSubscriptionGrpcManager.findCurrentUserSubscriptionCallback} callback Node-style callback called with the error, if any, and UserSubscriptionResponse
348
383
  * @returns {undefined}
349
384
  * @variation 1
350
385
  */
351
- Object.defineProperty(SubscriptionGrpcManager.prototype.findCurrentUserSubscription = function findCurrentUserSubscription(request, callback) {
386
+ Object.defineProperty(UserSubscriptionGrpcManager.prototype.findCurrentUserSubscription = function findCurrentUserSubscription(request, callback) {
352
387
  return this.rpcCall(findCurrentUserSubscription, $root.subscription.FindCurrentUserSubscriptionRequest, $root.subscription.UserSubscriptionResponse, request, callback);
353
- }, "name", { value: "FindCurrentUserSubscription" });
388
+ }, "name", { value: "findCurrentUserSubscription" });
354
389
 
355
390
  /**
356
- * Calls FindCurrentUserSubscription.
391
+ * Calls findCurrentUserSubscription.
357
392
  * @function findCurrentUserSubscription
358
- * @memberof subscription.SubscriptionGrpcManager
393
+ * @memberof subscription.UserSubscriptionGrpcManager
359
394
  * @instance
360
395
  * @param {subscription.IFindCurrentUserSubscriptionRequest} request FindCurrentUserSubscriptionRequest message or plain object
361
396
  * @returns {Promise<subscription.UserSubscriptionResponse>} Promise
362
397
  * @variation 2
363
398
  */
364
399
 
365
- return SubscriptionGrpcManager;
400
+ return UserSubscriptionGrpcManager;
366
401
  })();
367
402
 
368
403
  subscription.FindAllSubscriptionsRequest = (function() {
package/package.json CHANGED
@@ -16,5 +16,5 @@
16
16
  "main": "lib/index.js",
17
17
  "name": "@headspace/protos-events",
18
18
  "typings": "lib/index.d.ts",
19
- "version": "1.22.0"
19
+ "version": "1.23.0"
20
20
  }