@google-apps/chat 0.5.0 → 0.6.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.
@@ -45215,6 +45215,8 @@
45215
45215
  * @property {boolean|null} [importMode] Space importMode
45216
45216
  * @property {google.protobuf.ITimestamp|null} [createTime] Space createTime
45217
45217
  * @property {boolean|null} [adminInstalled] Space adminInstalled
45218
+ * @property {google.chat.v1.Space.IAccessSettings|null} [accessSettings] Space accessSettings
45219
+ * @property {string|null} [spaceUri] Space spaceUri
45218
45220
  */
45219
45221
 
45220
45222
  /**
@@ -45336,6 +45338,22 @@
45336
45338
  */
45337
45339
  Space.prototype.adminInstalled = false;
45338
45340
 
45341
+ /**
45342
+ * Space accessSettings.
45343
+ * @member {google.chat.v1.Space.IAccessSettings|null|undefined} accessSettings
45344
+ * @memberof google.chat.v1.Space
45345
+ * @instance
45346
+ */
45347
+ Space.prototype.accessSettings = null;
45348
+
45349
+ /**
45350
+ * Space spaceUri.
45351
+ * @member {string} spaceUri
45352
+ * @memberof google.chat.v1.Space
45353
+ * @instance
45354
+ */
45355
+ Space.prototype.spaceUri = "";
45356
+
45339
45357
  /**
45340
45358
  * Creates a new Space instance using the specified properties.
45341
45359
  * @function create
@@ -45386,6 +45404,10 @@
45386
45404
  $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim();
45387
45405
  if (message.adminInstalled != null && Object.hasOwnProperty.call(message, "adminInstalled"))
45388
45406
  writer.uint32(/* id 19, wireType 0 =*/152).bool(message.adminInstalled);
45407
+ if (message.accessSettings != null && Object.hasOwnProperty.call(message, "accessSettings"))
45408
+ $root.google.chat.v1.Space.AccessSettings.encode(message.accessSettings, writer.uint32(/* id 23, wireType 2 =*/186).fork()).ldelim();
45409
+ if (message.spaceUri != null && Object.hasOwnProperty.call(message, "spaceUri"))
45410
+ writer.uint32(/* id 25, wireType 2 =*/202).string(message.spaceUri);
45389
45411
  return writer;
45390
45412
  };
45391
45413
 
@@ -45472,6 +45494,14 @@
45472
45494
  message.adminInstalled = reader.bool();
45473
45495
  break;
45474
45496
  }
45497
+ case 23: {
45498
+ message.accessSettings = $root.google.chat.v1.Space.AccessSettings.decode(reader, reader.uint32());
45499
+ break;
45500
+ }
45501
+ case 25: {
45502
+ message.spaceUri = reader.string();
45503
+ break;
45504
+ }
45475
45505
  default:
45476
45506
  reader.skipType(tag & 7);
45477
45507
  break;
@@ -45576,6 +45606,14 @@
45576
45606
  if (message.adminInstalled != null && message.hasOwnProperty("adminInstalled"))
45577
45607
  if (typeof message.adminInstalled !== "boolean")
45578
45608
  return "adminInstalled: boolean expected";
45609
+ if (message.accessSettings != null && message.hasOwnProperty("accessSettings")) {
45610
+ var error = $root.google.chat.v1.Space.AccessSettings.verify(message.accessSettings);
45611
+ if (error)
45612
+ return "accessSettings." + error;
45613
+ }
45614
+ if (message.spaceUri != null && message.hasOwnProperty("spaceUri"))
45615
+ if (!$util.isString(message.spaceUri))
45616
+ return "spaceUri: string expected";
45579
45617
  return null;
45580
45618
  };
45581
45619
 
@@ -45703,6 +45741,13 @@
45703
45741
  }
45704
45742
  if (object.adminInstalled != null)
45705
45743
  message.adminInstalled = Boolean(object.adminInstalled);
45744
+ if (object.accessSettings != null) {
45745
+ if (typeof object.accessSettings !== "object")
45746
+ throw TypeError(".google.chat.v1.Space.accessSettings: object expected");
45747
+ message.accessSettings = $root.google.chat.v1.Space.AccessSettings.fromObject(object.accessSettings);
45748
+ }
45749
+ if (object.spaceUri != null)
45750
+ message.spaceUri = String(object.spaceUri);
45706
45751
  return message;
45707
45752
  };
45708
45753
 
@@ -45733,6 +45778,8 @@
45733
45778
  object.importMode = false;
45734
45779
  object.createTime = null;
45735
45780
  object.adminInstalled = false;
45781
+ object.accessSettings = null;
45782
+ object.spaceUri = "";
45736
45783
  }
45737
45784
  if (message.name != null && message.hasOwnProperty("name"))
45738
45785
  object.name = message.name;
@@ -45760,6 +45807,10 @@
45760
45807
  object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options);
45761
45808
  if (message.adminInstalled != null && message.hasOwnProperty("adminInstalled"))
45762
45809
  object.adminInstalled = message.adminInstalled;
45810
+ if (message.accessSettings != null && message.hasOwnProperty("accessSettings"))
45811
+ object.accessSettings = $root.google.chat.v1.Space.AccessSettings.toObject(message.accessSettings, options);
45812
+ if (message.spaceUri != null && message.hasOwnProperty("spaceUri"))
45813
+ object.spaceUri = message.spaceUri;
45763
45814
  return object;
45764
45815
  };
45765
45816
 
@@ -46068,6 +46119,273 @@
46068
46119
  return SpaceDetails;
46069
46120
  })();
46070
46121
 
46122
+ Space.AccessSettings = (function() {
46123
+
46124
+ /**
46125
+ * Properties of an AccessSettings.
46126
+ * @memberof google.chat.v1.Space
46127
+ * @interface IAccessSettings
46128
+ * @property {google.chat.v1.Space.AccessSettings.AccessState|null} [accessState] AccessSettings accessState
46129
+ * @property {string|null} [audience] AccessSettings audience
46130
+ */
46131
+
46132
+ /**
46133
+ * Constructs a new AccessSettings.
46134
+ * @memberof google.chat.v1.Space
46135
+ * @classdesc Represents an AccessSettings.
46136
+ * @implements IAccessSettings
46137
+ * @constructor
46138
+ * @param {google.chat.v1.Space.IAccessSettings=} [properties] Properties to set
46139
+ */
46140
+ function AccessSettings(properties) {
46141
+ if (properties)
46142
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
46143
+ if (properties[keys[i]] != null)
46144
+ this[keys[i]] = properties[keys[i]];
46145
+ }
46146
+
46147
+ /**
46148
+ * AccessSettings accessState.
46149
+ * @member {google.chat.v1.Space.AccessSettings.AccessState} accessState
46150
+ * @memberof google.chat.v1.Space.AccessSettings
46151
+ * @instance
46152
+ */
46153
+ AccessSettings.prototype.accessState = 0;
46154
+
46155
+ /**
46156
+ * AccessSettings audience.
46157
+ * @member {string} audience
46158
+ * @memberof google.chat.v1.Space.AccessSettings
46159
+ * @instance
46160
+ */
46161
+ AccessSettings.prototype.audience = "";
46162
+
46163
+ /**
46164
+ * Creates a new AccessSettings instance using the specified properties.
46165
+ * @function create
46166
+ * @memberof google.chat.v1.Space.AccessSettings
46167
+ * @static
46168
+ * @param {google.chat.v1.Space.IAccessSettings=} [properties] Properties to set
46169
+ * @returns {google.chat.v1.Space.AccessSettings} AccessSettings instance
46170
+ */
46171
+ AccessSettings.create = function create(properties) {
46172
+ return new AccessSettings(properties);
46173
+ };
46174
+
46175
+ /**
46176
+ * Encodes the specified AccessSettings message. Does not implicitly {@link google.chat.v1.Space.AccessSettings.verify|verify} messages.
46177
+ * @function encode
46178
+ * @memberof google.chat.v1.Space.AccessSettings
46179
+ * @static
46180
+ * @param {google.chat.v1.Space.IAccessSettings} message AccessSettings message or plain object to encode
46181
+ * @param {$protobuf.Writer} [writer] Writer to encode to
46182
+ * @returns {$protobuf.Writer} Writer
46183
+ */
46184
+ AccessSettings.encode = function encode(message, writer) {
46185
+ if (!writer)
46186
+ writer = $Writer.create();
46187
+ if (message.accessState != null && Object.hasOwnProperty.call(message, "accessState"))
46188
+ writer.uint32(/* id 1, wireType 0 =*/8).int32(message.accessState);
46189
+ if (message.audience != null && Object.hasOwnProperty.call(message, "audience"))
46190
+ writer.uint32(/* id 3, wireType 2 =*/26).string(message.audience);
46191
+ return writer;
46192
+ };
46193
+
46194
+ /**
46195
+ * Encodes the specified AccessSettings message, length delimited. Does not implicitly {@link google.chat.v1.Space.AccessSettings.verify|verify} messages.
46196
+ * @function encodeDelimited
46197
+ * @memberof google.chat.v1.Space.AccessSettings
46198
+ * @static
46199
+ * @param {google.chat.v1.Space.IAccessSettings} message AccessSettings message or plain object to encode
46200
+ * @param {$protobuf.Writer} [writer] Writer to encode to
46201
+ * @returns {$protobuf.Writer} Writer
46202
+ */
46203
+ AccessSettings.encodeDelimited = function encodeDelimited(message, writer) {
46204
+ return this.encode(message, writer).ldelim();
46205
+ };
46206
+
46207
+ /**
46208
+ * Decodes an AccessSettings message from the specified reader or buffer.
46209
+ * @function decode
46210
+ * @memberof google.chat.v1.Space.AccessSettings
46211
+ * @static
46212
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
46213
+ * @param {number} [length] Message length if known beforehand
46214
+ * @returns {google.chat.v1.Space.AccessSettings} AccessSettings
46215
+ * @throws {Error} If the payload is not a reader or valid buffer
46216
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
46217
+ */
46218
+ AccessSettings.decode = function decode(reader, length) {
46219
+ if (!(reader instanceof $Reader))
46220
+ reader = $Reader.create(reader);
46221
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.chat.v1.Space.AccessSettings();
46222
+ while (reader.pos < end) {
46223
+ var tag = reader.uint32();
46224
+ switch (tag >>> 3) {
46225
+ case 1: {
46226
+ message.accessState = reader.int32();
46227
+ break;
46228
+ }
46229
+ case 3: {
46230
+ message.audience = reader.string();
46231
+ break;
46232
+ }
46233
+ default:
46234
+ reader.skipType(tag & 7);
46235
+ break;
46236
+ }
46237
+ }
46238
+ return message;
46239
+ };
46240
+
46241
+ /**
46242
+ * Decodes an AccessSettings message from the specified reader or buffer, length delimited.
46243
+ * @function decodeDelimited
46244
+ * @memberof google.chat.v1.Space.AccessSettings
46245
+ * @static
46246
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
46247
+ * @returns {google.chat.v1.Space.AccessSettings} AccessSettings
46248
+ * @throws {Error} If the payload is not a reader or valid buffer
46249
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
46250
+ */
46251
+ AccessSettings.decodeDelimited = function decodeDelimited(reader) {
46252
+ if (!(reader instanceof $Reader))
46253
+ reader = new $Reader(reader);
46254
+ return this.decode(reader, reader.uint32());
46255
+ };
46256
+
46257
+ /**
46258
+ * Verifies an AccessSettings message.
46259
+ * @function verify
46260
+ * @memberof google.chat.v1.Space.AccessSettings
46261
+ * @static
46262
+ * @param {Object.<string,*>} message Plain object to verify
46263
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
46264
+ */
46265
+ AccessSettings.verify = function verify(message) {
46266
+ if (typeof message !== "object" || message === null)
46267
+ return "object expected";
46268
+ if (message.accessState != null && message.hasOwnProperty("accessState"))
46269
+ switch (message.accessState) {
46270
+ default:
46271
+ return "accessState: enum value expected";
46272
+ case 0:
46273
+ case 1:
46274
+ case 2:
46275
+ break;
46276
+ }
46277
+ if (message.audience != null && message.hasOwnProperty("audience"))
46278
+ if (!$util.isString(message.audience))
46279
+ return "audience: string expected";
46280
+ return null;
46281
+ };
46282
+
46283
+ /**
46284
+ * Creates an AccessSettings message from a plain object. Also converts values to their respective internal types.
46285
+ * @function fromObject
46286
+ * @memberof google.chat.v1.Space.AccessSettings
46287
+ * @static
46288
+ * @param {Object.<string,*>} object Plain object
46289
+ * @returns {google.chat.v1.Space.AccessSettings} AccessSettings
46290
+ */
46291
+ AccessSettings.fromObject = function fromObject(object) {
46292
+ if (object instanceof $root.google.chat.v1.Space.AccessSettings)
46293
+ return object;
46294
+ var message = new $root.google.chat.v1.Space.AccessSettings();
46295
+ switch (object.accessState) {
46296
+ default:
46297
+ if (typeof object.accessState === "number") {
46298
+ message.accessState = object.accessState;
46299
+ break;
46300
+ }
46301
+ break;
46302
+ case "ACCESS_STATE_UNSPECIFIED":
46303
+ case 0:
46304
+ message.accessState = 0;
46305
+ break;
46306
+ case "PRIVATE":
46307
+ case 1:
46308
+ message.accessState = 1;
46309
+ break;
46310
+ case "DISCOVERABLE":
46311
+ case 2:
46312
+ message.accessState = 2;
46313
+ break;
46314
+ }
46315
+ if (object.audience != null)
46316
+ message.audience = String(object.audience);
46317
+ return message;
46318
+ };
46319
+
46320
+ /**
46321
+ * Creates a plain object from an AccessSettings message. Also converts values to other types if specified.
46322
+ * @function toObject
46323
+ * @memberof google.chat.v1.Space.AccessSettings
46324
+ * @static
46325
+ * @param {google.chat.v1.Space.AccessSettings} message AccessSettings
46326
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
46327
+ * @returns {Object.<string,*>} Plain object
46328
+ */
46329
+ AccessSettings.toObject = function toObject(message, options) {
46330
+ if (!options)
46331
+ options = {};
46332
+ var object = {};
46333
+ if (options.defaults) {
46334
+ object.accessState = options.enums === String ? "ACCESS_STATE_UNSPECIFIED" : 0;
46335
+ object.audience = "";
46336
+ }
46337
+ if (message.accessState != null && message.hasOwnProperty("accessState"))
46338
+ object.accessState = options.enums === String ? $root.google.chat.v1.Space.AccessSettings.AccessState[message.accessState] === undefined ? message.accessState : $root.google.chat.v1.Space.AccessSettings.AccessState[message.accessState] : message.accessState;
46339
+ if (message.audience != null && message.hasOwnProperty("audience"))
46340
+ object.audience = message.audience;
46341
+ return object;
46342
+ };
46343
+
46344
+ /**
46345
+ * Converts this AccessSettings to JSON.
46346
+ * @function toJSON
46347
+ * @memberof google.chat.v1.Space.AccessSettings
46348
+ * @instance
46349
+ * @returns {Object.<string,*>} JSON object
46350
+ */
46351
+ AccessSettings.prototype.toJSON = function toJSON() {
46352
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
46353
+ };
46354
+
46355
+ /**
46356
+ * Gets the default type url for AccessSettings
46357
+ * @function getTypeUrl
46358
+ * @memberof google.chat.v1.Space.AccessSettings
46359
+ * @static
46360
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
46361
+ * @returns {string} The default type url
46362
+ */
46363
+ AccessSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
46364
+ if (typeUrlPrefix === undefined) {
46365
+ typeUrlPrefix = "type.googleapis.com";
46366
+ }
46367
+ return typeUrlPrefix + "/google.chat.v1.Space.AccessSettings";
46368
+ };
46369
+
46370
+ /**
46371
+ * AccessState enum.
46372
+ * @name google.chat.v1.Space.AccessSettings.AccessState
46373
+ * @enum {number}
46374
+ * @property {number} ACCESS_STATE_UNSPECIFIED=0 ACCESS_STATE_UNSPECIFIED value
46375
+ * @property {number} PRIVATE=1 PRIVATE value
46376
+ * @property {number} DISCOVERABLE=2 DISCOVERABLE value
46377
+ */
46378
+ AccessSettings.AccessState = (function() {
46379
+ var valuesById = {}, values = Object.create(valuesById);
46380
+ values[valuesById[0] = "ACCESS_STATE_UNSPECIFIED"] = 0;
46381
+ values[valuesById[1] = "PRIVATE"] = 1;
46382
+ values[valuesById[2] = "DISCOVERABLE"] = 2;
46383
+ return values;
46384
+ })();
46385
+
46386
+ return AccessSettings;
46387
+ })();
46388
+
46071
46389
  return Space;
46072
46390
  })();
46073
46391
 
@@ -2754,7 +2754,7 @@
2754
2754
  "ChatService": {
2755
2755
  "options": {
2756
2756
  "(google.api.default_host)": "chat.googleapis.com",
2757
- "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/chat.bot,https://www.googleapis.com/auth/chat.delete,https://www.googleapis.com/auth/chat.import,https://www.googleapis.com/auth/chat.memberships,https://www.googleapis.com/auth/chat.memberships.app,https://www.googleapis.com/auth/chat.memberships.readonly,https://www.googleapis.com/auth/chat.messages,https://www.googleapis.com/auth/chat.messages.create,https://www.googleapis.com/auth/chat.messages.reactions,https://www.googleapis.com/auth/chat.messages.reactions.create,https://www.googleapis.com/auth/chat.messages.reactions.readonly,https://www.googleapis.com/auth/chat.messages.readonly,https://www.googleapis.com/auth/chat.spaces,https://www.googleapis.com/auth/chat.spaces.create,https://www.googleapis.com/auth/chat.spaces.readonly,https://www.googleapis.com/auth/chat.users.readstate,https://www.googleapis.com/auth/chat.users.readstate.readonly"
2757
+ "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/chat.admin.delete,https://www.googleapis.com/auth/chat.admin.memberships,https://www.googleapis.com/auth/chat.admin.memberships.readonly,https://www.googleapis.com/auth/chat.admin.spaces,https://www.googleapis.com/auth/chat.admin.spaces.readonly,https://www.googleapis.com/auth/chat.bot,https://www.googleapis.com/auth/chat.delete,https://www.googleapis.com/auth/chat.import,https://www.googleapis.com/auth/chat.memberships,https://www.googleapis.com/auth/chat.memberships.app,https://www.googleapis.com/auth/chat.memberships.readonly,https://www.googleapis.com/auth/chat.messages,https://www.googleapis.com/auth/chat.messages.create,https://www.googleapis.com/auth/chat.messages.reactions,https://www.googleapis.com/auth/chat.messages.reactions.create,https://www.googleapis.com/auth/chat.messages.reactions.readonly,https://www.googleapis.com/auth/chat.messages.readonly,https://www.googleapis.com/auth/chat.spaces,https://www.googleapis.com/auth/chat.spaces.create,https://www.googleapis.com/auth/chat.spaces.readonly,https://www.googleapis.com/auth/chat.users.readstate,https://www.googleapis.com/auth/chat.users.readstate.readonly"
2758
2758
  },
2759
2759
  "methods": {
2760
2760
  "CreateMessage": {
@@ -4575,6 +4575,20 @@
4575
4575
  "options": {
4576
4576
  "(google.api.field_behavior)": "OUTPUT_ONLY"
4577
4577
  }
4578
+ },
4579
+ "accessSettings": {
4580
+ "type": "AccessSettings",
4581
+ "id": 23,
4582
+ "options": {
4583
+ "(google.api.field_behavior)": "OPTIONAL"
4584
+ }
4585
+ },
4586
+ "spaceUri": {
4587
+ "type": "string",
4588
+ "id": 25,
4589
+ "options": {
4590
+ "(google.api.field_behavior)": "OUTPUT_ONLY"
4591
+ }
4578
4592
  }
4579
4593
  },
4580
4594
  "nested": {
@@ -4612,6 +4626,33 @@
4612
4626
  "id": 2
4613
4627
  }
4614
4628
  }
4629
+ },
4630
+ "AccessSettings": {
4631
+ "fields": {
4632
+ "accessState": {
4633
+ "type": "AccessState",
4634
+ "id": 1,
4635
+ "options": {
4636
+ "(google.api.field_behavior)": "OUTPUT_ONLY"
4637
+ }
4638
+ },
4639
+ "audience": {
4640
+ "type": "string",
4641
+ "id": 3,
4642
+ "options": {
4643
+ "(google.api.field_behavior)": "OPTIONAL"
4644
+ }
4645
+ }
4646
+ },
4647
+ "nested": {
4648
+ "AccessState": {
4649
+ "values": {
4650
+ "ACCESS_STATE_UNSPECIFIED": 0,
4651
+ "PRIVATE": 1,
4652
+ "DISCOVERABLE": 2
4653
+ }
4654
+ }
4655
+ }
4615
4656
  }
4616
4657
  }
4617
4658
  },