@lansweeper/permissions-grpc 0.1.5 → 0.1.7

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.
@@ -23,6 +23,8 @@ var global = (function() {
23
23
 
24
24
  var limits_limits_pb = require('./limits/limits_pb.js');
25
25
  goog.object.extend(proto, limits_limits_pb);
26
+ goog.exportSymbol('proto.checkpermission.CheckPermissionForMultipleSitesRequest', null, global);
27
+ goog.exportSymbol('proto.checkpermission.CheckPermissionForMultipleSitesResponse', null, global);
26
28
  goog.exportSymbol('proto.checkpermission.CheckPermissionRequest', null, global);
27
29
  goog.exportSymbol('proto.checkpermission.CheckPermissionResponse', null, global);
28
30
  goog.exportSymbol('proto.checkpermission.GetSitesLimitsRequest', null, global);
@@ -30,6 +32,48 @@ goog.exportSymbol('proto.checkpermission.GetSitesLimitsResponse', null, global);
30
32
  goog.exportSymbol('proto.checkpermission.GetUserPermissionsRequest', null, global);
31
33
  goog.exportSymbol('proto.checkpermission.GetUserPermissionsResponse', null, global);
32
34
  goog.exportSymbol('proto.checkpermission.GetUserPermissionsResponse.Permissions', null, global);
35
+ /**
36
+ * Generated by JsPbCodeGenerator.
37
+ * @param {Array=} opt_data Optional initial data array, typically from a
38
+ * server response, or constructed directly in Javascript. The array is used
39
+ * in place and becomes part of the constructed object. It is not cloned.
40
+ * If no data is provided, the constructed object will be empty, but still
41
+ * valid.
42
+ * @extends {jspb.Message}
43
+ * @constructor
44
+ */
45
+ proto.checkpermission.CheckPermissionForMultipleSitesRequest = function(opt_data) {
46
+ jspb.Message.initialize(this, opt_data, 0, -1, proto.checkpermission.CheckPermissionForMultipleSitesRequest.repeatedFields_, null);
47
+ };
48
+ goog.inherits(proto.checkpermission.CheckPermissionForMultipleSitesRequest, jspb.Message);
49
+ if (goog.DEBUG && !COMPILED) {
50
+ /**
51
+ * @public
52
+ * @override
53
+ */
54
+ proto.checkpermission.CheckPermissionForMultipleSitesRequest.displayName = 'proto.checkpermission.CheckPermissionForMultipleSitesRequest';
55
+ }
56
+ /**
57
+ * Generated by JsPbCodeGenerator.
58
+ * @param {Array=} opt_data Optional initial data array, typically from a
59
+ * server response, or constructed directly in Javascript. The array is used
60
+ * in place and becomes part of the constructed object. It is not cloned.
61
+ * If no data is provided, the constructed object will be empty, but still
62
+ * valid.
63
+ * @extends {jspb.Message}
64
+ * @constructor
65
+ */
66
+ proto.checkpermission.CheckPermissionForMultipleSitesResponse = function(opt_data) {
67
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
68
+ };
69
+ goog.inherits(proto.checkpermission.CheckPermissionForMultipleSitesResponse, jspb.Message);
70
+ if (goog.DEBUG && !COMPILED) {
71
+ /**
72
+ * @public
73
+ * @override
74
+ */
75
+ proto.checkpermission.CheckPermissionForMultipleSitesResponse.displayName = 'proto.checkpermission.CheckPermissionForMultipleSitesResponse';
76
+ }
33
77
  /**
34
78
  * Generated by JsPbCodeGenerator.
35
79
  * @param {Array=} opt_data Optional initial data array, typically from a
@@ -178,6 +222,415 @@ if (goog.DEBUG && !COMPILED) {
178
222
  proto.checkpermission.GetSitesLimitsResponse.displayName = 'proto.checkpermission.GetSitesLimitsResponse';
179
223
  }
180
224
 
225
+ /**
226
+ * List of repeated fields within this message type.
227
+ * @private {!Array<number>}
228
+ * @const
229
+ */
230
+ proto.checkpermission.CheckPermissionForMultipleSitesRequest.repeatedFields_ = [2];
231
+
232
+
233
+
234
+ if (jspb.Message.GENERATE_TO_OBJECT) {
235
+ /**
236
+ * Creates an object representation of this proto.
237
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
238
+ * Optional fields that are not set will be set to undefined.
239
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
240
+ * For the list of reserved names please see:
241
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
242
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
243
+ * JSPB instance for transitional soy proto support:
244
+ * http://goto/soy-param-migration
245
+ * @return {!Object}
246
+ */
247
+ proto.checkpermission.CheckPermissionForMultipleSitesRequest.prototype.toObject = function(opt_includeInstance) {
248
+ return proto.checkpermission.CheckPermissionForMultipleSitesRequest.toObject(opt_includeInstance, this);
249
+ };
250
+
251
+
252
+ /**
253
+ * Static version of the {@see toObject} method.
254
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
255
+ * the JSPB instance for transitional soy proto support:
256
+ * http://goto/soy-param-migration
257
+ * @param {!proto.checkpermission.CheckPermissionForMultipleSitesRequest} msg The msg instance to transform.
258
+ * @return {!Object}
259
+ * @suppress {unusedLocalVariables} f is only used for nested messages
260
+ */
261
+ proto.checkpermission.CheckPermissionForMultipleSitesRequest.toObject = function(includeInstance, msg) {
262
+ var f, obj = {
263
+ accountid: jspb.Message.getFieldWithDefault(msg, 1, ""),
264
+ clientkeysList: (f = jspb.Message.getRepeatedField(msg, 2)) == null ? undefined : f,
265
+ action: jspb.Message.getFieldWithDefault(msg, 3, ""),
266
+ traceid: jspb.Message.getFieldWithDefault(msg, 4, "")
267
+ };
268
+
269
+ if (includeInstance) {
270
+ obj.$jspbMessageInstance = msg;
271
+ }
272
+ return obj;
273
+ };
274
+ }
275
+
276
+
277
+ /**
278
+ * Deserializes binary data (in protobuf wire format).
279
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
280
+ * @return {!proto.checkpermission.CheckPermissionForMultipleSitesRequest}
281
+ */
282
+ proto.checkpermission.CheckPermissionForMultipleSitesRequest.deserializeBinary = function(bytes) {
283
+ var reader = new jspb.BinaryReader(bytes);
284
+ var msg = new proto.checkpermission.CheckPermissionForMultipleSitesRequest;
285
+ return proto.checkpermission.CheckPermissionForMultipleSitesRequest.deserializeBinaryFromReader(msg, reader);
286
+ };
287
+
288
+
289
+ /**
290
+ * Deserializes binary data (in protobuf wire format) from the
291
+ * given reader into the given message object.
292
+ * @param {!proto.checkpermission.CheckPermissionForMultipleSitesRequest} msg The message object to deserialize into.
293
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
294
+ * @return {!proto.checkpermission.CheckPermissionForMultipleSitesRequest}
295
+ */
296
+ proto.checkpermission.CheckPermissionForMultipleSitesRequest.deserializeBinaryFromReader = function(msg, reader) {
297
+ while (reader.nextField()) {
298
+ if (reader.isEndGroup()) {
299
+ break;
300
+ }
301
+ var field = reader.getFieldNumber();
302
+ switch (field) {
303
+ case 1:
304
+ var value = /** @type {string} */ (reader.readString());
305
+ msg.setAccountid(value);
306
+ break;
307
+ case 2:
308
+ var value = /** @type {string} */ (reader.readString());
309
+ msg.addClientkeys(value);
310
+ break;
311
+ case 3:
312
+ var value = /** @type {string} */ (reader.readString());
313
+ msg.setAction(value);
314
+ break;
315
+ case 4:
316
+ var value = /** @type {string} */ (reader.readString());
317
+ msg.setTraceid(value);
318
+ break;
319
+ default:
320
+ reader.skipField();
321
+ break;
322
+ }
323
+ }
324
+ return msg;
325
+ };
326
+
327
+
328
+ /**
329
+ * Serializes the message to binary data (in protobuf wire format).
330
+ * @return {!Uint8Array}
331
+ */
332
+ proto.checkpermission.CheckPermissionForMultipleSitesRequest.prototype.serializeBinary = function() {
333
+ var writer = new jspb.BinaryWriter();
334
+ proto.checkpermission.CheckPermissionForMultipleSitesRequest.serializeBinaryToWriter(this, writer);
335
+ return writer.getResultBuffer();
336
+ };
337
+
338
+
339
+ /**
340
+ * Serializes the given message to binary data (in protobuf wire
341
+ * format), writing to the given BinaryWriter.
342
+ * @param {!proto.checkpermission.CheckPermissionForMultipleSitesRequest} message
343
+ * @param {!jspb.BinaryWriter} writer
344
+ * @suppress {unusedLocalVariables} f is only used for nested messages
345
+ */
346
+ proto.checkpermission.CheckPermissionForMultipleSitesRequest.serializeBinaryToWriter = function(message, writer) {
347
+ var f = undefined;
348
+ f = message.getAccountid();
349
+ if (f.length > 0) {
350
+ writer.writeString(
351
+ 1,
352
+ f
353
+ );
354
+ }
355
+ f = message.getClientkeysList();
356
+ if (f.length > 0) {
357
+ writer.writeRepeatedString(
358
+ 2,
359
+ f
360
+ );
361
+ }
362
+ f = message.getAction();
363
+ if (f.length > 0) {
364
+ writer.writeString(
365
+ 3,
366
+ f
367
+ );
368
+ }
369
+ f = message.getTraceid();
370
+ if (f.length > 0) {
371
+ writer.writeString(
372
+ 4,
373
+ f
374
+ );
375
+ }
376
+ };
377
+
378
+
379
+ /**
380
+ * optional string accountId = 1;
381
+ * @return {string}
382
+ */
383
+ proto.checkpermission.CheckPermissionForMultipleSitesRequest.prototype.getAccountid = function() {
384
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
385
+ };
386
+
387
+
388
+ /**
389
+ * @param {string} value
390
+ * @return {!proto.checkpermission.CheckPermissionForMultipleSitesRequest} returns this
391
+ */
392
+ proto.checkpermission.CheckPermissionForMultipleSitesRequest.prototype.setAccountid = function(value) {
393
+ return jspb.Message.setProto3StringField(this, 1, value);
394
+ };
395
+
396
+
397
+ /**
398
+ * repeated string clientKeys = 2;
399
+ * @return {!Array<string>}
400
+ */
401
+ proto.checkpermission.CheckPermissionForMultipleSitesRequest.prototype.getClientkeysList = function() {
402
+ return /** @type {!Array<string>} */ (jspb.Message.getRepeatedField(this, 2));
403
+ };
404
+
405
+
406
+ /**
407
+ * @param {!Array<string>} value
408
+ * @return {!proto.checkpermission.CheckPermissionForMultipleSitesRequest} returns this
409
+ */
410
+ proto.checkpermission.CheckPermissionForMultipleSitesRequest.prototype.setClientkeysList = function(value) {
411
+ return jspb.Message.setField(this, 2, value || []);
412
+ };
413
+
414
+
415
+ /**
416
+ * @param {string} value
417
+ * @param {number=} opt_index
418
+ * @return {!proto.checkpermission.CheckPermissionForMultipleSitesRequest} returns this
419
+ */
420
+ proto.checkpermission.CheckPermissionForMultipleSitesRequest.prototype.addClientkeys = function(value, opt_index) {
421
+ return jspb.Message.addToRepeatedField(this, 2, value, opt_index);
422
+ };
423
+
424
+
425
+ /**
426
+ * Clears the list making it empty but non-null.
427
+ * @return {!proto.checkpermission.CheckPermissionForMultipleSitesRequest} returns this
428
+ */
429
+ proto.checkpermission.CheckPermissionForMultipleSitesRequest.prototype.clearClientkeysList = function() {
430
+ return this.setClientkeysList([]);
431
+ };
432
+
433
+
434
+ /**
435
+ * optional string action = 3;
436
+ * @return {string}
437
+ */
438
+ proto.checkpermission.CheckPermissionForMultipleSitesRequest.prototype.getAction = function() {
439
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
440
+ };
441
+
442
+
443
+ /**
444
+ * @param {string} value
445
+ * @return {!proto.checkpermission.CheckPermissionForMultipleSitesRequest} returns this
446
+ */
447
+ proto.checkpermission.CheckPermissionForMultipleSitesRequest.prototype.setAction = function(value) {
448
+ return jspb.Message.setProto3StringField(this, 3, value);
449
+ };
450
+
451
+
452
+ /**
453
+ * optional string traceId = 4;
454
+ * @return {string}
455
+ */
456
+ proto.checkpermission.CheckPermissionForMultipleSitesRequest.prototype.getTraceid = function() {
457
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
458
+ };
459
+
460
+
461
+ /**
462
+ * @param {string} value
463
+ * @return {!proto.checkpermission.CheckPermissionForMultipleSitesRequest} returns this
464
+ */
465
+ proto.checkpermission.CheckPermissionForMultipleSitesRequest.prototype.setTraceid = function(value) {
466
+ return jspb.Message.setProto3StringField(this, 4, value);
467
+ };
468
+
469
+
470
+
471
+
472
+
473
+ if (jspb.Message.GENERATE_TO_OBJECT) {
474
+ /**
475
+ * Creates an object representation of this proto.
476
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
477
+ * Optional fields that are not set will be set to undefined.
478
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
479
+ * For the list of reserved names please see:
480
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
481
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
482
+ * JSPB instance for transitional soy proto support:
483
+ * http://goto/soy-param-migration
484
+ * @return {!Object}
485
+ */
486
+ proto.checkpermission.CheckPermissionForMultipleSitesResponse.prototype.toObject = function(opt_includeInstance) {
487
+ return proto.checkpermission.CheckPermissionForMultipleSitesResponse.toObject(opt_includeInstance, this);
488
+ };
489
+
490
+
491
+ /**
492
+ * Static version of the {@see toObject} method.
493
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
494
+ * the JSPB instance for transitional soy proto support:
495
+ * http://goto/soy-param-migration
496
+ * @param {!proto.checkpermission.CheckPermissionForMultipleSitesResponse} msg The msg instance to transform.
497
+ * @return {!Object}
498
+ * @suppress {unusedLocalVariables} f is only used for nested messages
499
+ */
500
+ proto.checkpermission.CheckPermissionForMultipleSitesResponse.toObject = function(includeInstance, msg) {
501
+ var f, obj = {
502
+ granted: jspb.Message.getBooleanFieldWithDefault(msg, 1, false),
503
+ sitesMap: (f = msg.getSitesMap()) ? f.toObject(includeInstance, undefined) : []
504
+ };
505
+
506
+ if (includeInstance) {
507
+ obj.$jspbMessageInstance = msg;
508
+ }
509
+ return obj;
510
+ };
511
+ }
512
+
513
+
514
+ /**
515
+ * Deserializes binary data (in protobuf wire format).
516
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
517
+ * @return {!proto.checkpermission.CheckPermissionForMultipleSitesResponse}
518
+ */
519
+ proto.checkpermission.CheckPermissionForMultipleSitesResponse.deserializeBinary = function(bytes) {
520
+ var reader = new jspb.BinaryReader(bytes);
521
+ var msg = new proto.checkpermission.CheckPermissionForMultipleSitesResponse;
522
+ return proto.checkpermission.CheckPermissionForMultipleSitesResponse.deserializeBinaryFromReader(msg, reader);
523
+ };
524
+
525
+
526
+ /**
527
+ * Deserializes binary data (in protobuf wire format) from the
528
+ * given reader into the given message object.
529
+ * @param {!proto.checkpermission.CheckPermissionForMultipleSitesResponse} msg The message object to deserialize into.
530
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
531
+ * @return {!proto.checkpermission.CheckPermissionForMultipleSitesResponse}
532
+ */
533
+ proto.checkpermission.CheckPermissionForMultipleSitesResponse.deserializeBinaryFromReader = function(msg, reader) {
534
+ while (reader.nextField()) {
535
+ if (reader.isEndGroup()) {
536
+ break;
537
+ }
538
+ var field = reader.getFieldNumber();
539
+ switch (field) {
540
+ case 1:
541
+ var value = /** @type {boolean} */ (reader.readBool());
542
+ msg.setGranted(value);
543
+ break;
544
+ case 2:
545
+ var value = msg.getSitesMap();
546
+ reader.readMessage(value, function(message, reader) {
547
+ jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readBool, null, "", false);
548
+ });
549
+ break;
550
+ default:
551
+ reader.skipField();
552
+ break;
553
+ }
554
+ }
555
+ return msg;
556
+ };
557
+
558
+
559
+ /**
560
+ * Serializes the message to binary data (in protobuf wire format).
561
+ * @return {!Uint8Array}
562
+ */
563
+ proto.checkpermission.CheckPermissionForMultipleSitesResponse.prototype.serializeBinary = function() {
564
+ var writer = new jspb.BinaryWriter();
565
+ proto.checkpermission.CheckPermissionForMultipleSitesResponse.serializeBinaryToWriter(this, writer);
566
+ return writer.getResultBuffer();
567
+ };
568
+
569
+
570
+ /**
571
+ * Serializes the given message to binary data (in protobuf wire
572
+ * format), writing to the given BinaryWriter.
573
+ * @param {!proto.checkpermission.CheckPermissionForMultipleSitesResponse} message
574
+ * @param {!jspb.BinaryWriter} writer
575
+ * @suppress {unusedLocalVariables} f is only used for nested messages
576
+ */
577
+ proto.checkpermission.CheckPermissionForMultipleSitesResponse.serializeBinaryToWriter = function(message, writer) {
578
+ var f = undefined;
579
+ f = message.getGranted();
580
+ if (f) {
581
+ writer.writeBool(
582
+ 1,
583
+ f
584
+ );
585
+ }
586
+ f = message.getSitesMap(true);
587
+ if (f && f.getLength() > 0) {
588
+ f.serializeBinary(2, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeBool);
589
+ }
590
+ };
591
+
592
+
593
+ /**
594
+ * optional bool granted = 1;
595
+ * @return {boolean}
596
+ */
597
+ proto.checkpermission.CheckPermissionForMultipleSitesResponse.prototype.getGranted = function() {
598
+ return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false));
599
+ };
600
+
601
+
602
+ /**
603
+ * @param {boolean} value
604
+ * @return {!proto.checkpermission.CheckPermissionForMultipleSitesResponse} returns this
605
+ */
606
+ proto.checkpermission.CheckPermissionForMultipleSitesResponse.prototype.setGranted = function(value) {
607
+ return jspb.Message.setProto3BooleanField(this, 1, value);
608
+ };
609
+
610
+
611
+ /**
612
+ * map<string, bool> sites = 2;
613
+ * @param {boolean=} opt_noLazyCreate Do not create the map if
614
+ * empty, instead returning `undefined`
615
+ * @return {!jspb.Map<string,boolean>}
616
+ */
617
+ proto.checkpermission.CheckPermissionForMultipleSitesResponse.prototype.getSitesMap = function(opt_noLazyCreate) {
618
+ return /** @type {!jspb.Map<string,boolean>} */ (
619
+ jspb.Message.getMapField(this, 2, opt_noLazyCreate,
620
+ null));
621
+ };
622
+
623
+
624
+ /**
625
+ * Clears values from the map. The map will be non-null.
626
+ * @return {!proto.checkpermission.CheckPermissionForMultipleSitesResponse} returns this
627
+ */
628
+ proto.checkpermission.CheckPermissionForMultipleSitesResponse.prototype.clearSitesMap = function() {
629
+ this.getSitesMap().clear();
630
+ return this;};
631
+
632
+
633
+
181
634
 
182
635
 
183
636
  if (jspb.Message.GENERATE_TO_OBJECT) {