@google-apps/chat 0.17.0 → 0.19.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.
@@ -29,7 +29,9 @@ option ruby_package = "Google::Apps::Chat::V1";
29
29
  // is set.
30
30
  message DeletionMetadata {
31
31
  // Who deleted the message and how it was deleted. More values may be added in
32
- // the future.
32
+ // the future. See [Edit or delete a message in Google
33
+ // Chat](https://support.google.com/chat/answer/7653281) for details on when
34
+ // messages can be deleted.
33
35
  enum DeletionType {
34
36
  // This value is unused.
35
37
  DELETION_TYPE_UNSPECIFIED = 0;
@@ -37,23 +39,27 @@ message DeletionMetadata {
37
39
  // User deleted their own message.
38
40
  CREATOR = 1;
39
41
 
40
- // The space owner deleted the message.
42
+ // A space manager deleted the message.
41
43
  SPACE_OWNER = 2;
42
44
 
43
- // A Google Workspace admin deleted the message.
45
+ // A Google Workspace administrator deleted the message. Administrators can
46
+ // delete any message in the space, including messages sent by any space
47
+ // member or Chat app.
44
48
  ADMIN = 3;
45
49
 
46
50
  // A Chat app deleted its own message when it expired.
47
51
  APP_MESSAGE_EXPIRY = 4;
48
52
 
49
- // A Chat app deleted the message on behalf of the user.
53
+ // A Chat app deleted the message on behalf of the creator (using user
54
+ // authentication).
50
55
  CREATOR_VIA_APP = 5;
51
56
 
52
- // A Chat app deleted the message on behalf of the space owner.
57
+ // A Chat app deleted the message on behalf of a space manager (using user
58
+ // authentication).
53
59
  SPACE_OWNER_VIA_APP = 6;
54
60
 
55
- // A member of the space deleted the message. Human users can delete
56
- // messages sent by apps.
61
+ // A member of the space deleted the message. Users can delete messages sent
62
+ // by apps.
57
63
  SPACE_MEMBER = 7;
58
64
  }
59
65
 
@@ -156,8 +156,6 @@ message CreateMembershipRequest {
156
156
  // - When [authenticating as an
157
157
  // app](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app),
158
158
  // the `chat.app.memberships` authorization scope is required.
159
- // Authenticating as an app is available in [Developer
160
- // Preview](https://developers.google.com/workspace/preview).
161
159
  //
162
160
  // - Set `user.type` to `HUMAN`, and set `user.name` with format
163
161
  // `users/{user}`, where `{user}` can be the email address for the user. For
@@ -377,9 +375,13 @@ message DeleteMembershipRequest {
377
375
  // human users' or their own memberships. Chat apps can't delete other apps'
378
376
  // memberships.
379
377
  //
380
- // When deleting a human membership, requires the `chat.memberships` scope and
381
- // `spaces/{space}/members/{member}` format. You can use the email as an
382
- // alias for `{member}`. For example,
378
+ // When deleting a human membership, requires the `chat.memberships` scope
379
+ // with [user
380
+ // authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
381
+ // or the `chat.memberships.app` scope with [app
382
+ // authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app)
383
+ // and the `spaces/{space}/members/{member}` format.
384
+ // You can use the email as an alias for `{member}`. For example,
383
385
  // `spaces/{space}/members/example@gmail.com` where `example@gmail.com` is the
384
386
  // email of the Google Chat user.
385
387
  //
@@ -238,10 +238,19 @@ message Message {
238
238
  DeletionMetadata deletion_metadata = 38
239
239
  [(google.api.field_behavior) = OUTPUT_ONLY];
240
240
 
241
- // Output only. Information about a message that's quoted by a Google Chat
242
- // user in a space. Google Chat users can quote a message to reply to it.
241
+ // Optional. Information about a message that another message quotes.
242
+ //
243
+ // When you create a message, you can quote messages within the same
244
+ // thread, or quote a root message to create a new root message.
245
+ // However, you can't quote a message reply from a different thread.
246
+ //
247
+ // When you update a message, you can't add or replace the
248
+ // `quotedMessageMetadata` field, but you can remove it.
249
+ //
250
+ // For example usage, see [Quote another
251
+ // message](https://developers.google.com/workspace/chat/create-messages#quote-a-message).
243
252
  QuotedMessageMetadata quoted_message_metadata = 39
244
- [(google.api.field_behavior) = OUTPUT_ONLY];
253
+ [(google.api.field_behavior) = OPTIONAL];
245
254
 
246
255
  // Output only. GIF images that are attached to the message.
247
256
  repeated AttachedGif attached_gifs = 42
@@ -266,25 +275,41 @@ message AttachedGif {
266
275
  string uri = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
267
276
  }
268
277
 
269
- // Information about a quoted message.
278
+ // Information about a message that another message quotes.
279
+ //
280
+ // When you create a message, you can quote messages within the same
281
+ // thread, or quote a root message to create a new root message.
282
+ // However, you can't quote a message reply from a different thread.
283
+ //
284
+ // When you update a message, you can't add or replace the
285
+ // `quotedMessageMetadata` field, but you can remove it.
286
+ //
287
+ // For example usage, see [Quote another
288
+ // message](https://developers.google.com/workspace/chat/create-messages#quote-a-message).
270
289
  message QuotedMessageMetadata {
271
290
  option (google.api.resource) = {
272
291
  type: "chat.googleapis.com/QuotedMessageMetadata"
273
292
  pattern: "spaces/{space}/messages/{message}/quotedMessageMetadata/{quoted_message_metadata}"
274
293
  };
275
294
 
276
- // Output only. Resource name of the quoted message.
295
+ // Required. Resource name of the message that is quoted.
277
296
  //
278
297
  // Format: `spaces/{space}/messages/{message}`
279
298
  string name = 1 [
280
- (google.api.field_behavior) = OUTPUT_ONLY,
299
+ (google.api.field_behavior) = REQUIRED,
281
300
  (google.api.resource_reference) = { type: "chat.googleapis.com/Message" }
282
301
  ];
283
302
 
284
- // Output only. The timestamp when the quoted message was created or when the
303
+ // Required. The timestamp when the quoted message was created or when the
285
304
  // quoted message was last updated.
305
+ //
306
+ // If the message was edited, use this field, `last_update_time`.
307
+ // If the message was never edited, use `create_time`.
308
+ //
309
+ // If `last_update_time` doesn't match the latest version of the quoted
310
+ // message, the request fails.
286
311
  google.protobuf.Timestamp last_update_time = 2
287
- [(google.api.field_behavior) = OUTPUT_ONLY];
312
+ [(google.api.field_behavior) = REQUIRED];
288
313
  }
289
314
 
290
315
  // A thread in a Google Chat space. For example usage, see
@@ -456,6 +481,8 @@ message UpdateMessageRequest {
456
481
  //
457
482
  // - `accessory_widgets` (Requires [app
458
483
  // authentication](/chat/api/guides/auth/service-accounts).)
484
+ //
485
+ // - `quoted_message_metadata` (Only allows removal of the quoted message.)
459
486
  google.protobuf.FieldMask update_mask = 2
460
487
  [(google.api.field_behavior) = REQUIRED];
461
488
 
@@ -25,10 +25,10 @@ option objc_class_prefix = "DYNAPIProto";
25
25
  option php_namespace = "Google\\Apps\\Chat\\V1";
26
26
  option ruby_package = "Google::Apps::Chat::V1";
27
27
 
28
- // A [slash
28
+ // Metadata about a [slash
29
29
  // command](https://developers.google.com/workspace/chat/commands) in
30
30
  // Google Chat.
31
31
  message SlashCommand {
32
- // The ID of the slash command invoked.
32
+ // The ID of the slash command.
33
33
  int64 command_id = 1;
34
34
  }
@@ -163,8 +163,7 @@ message Space {
163
163
  // authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app)
164
164
  // with [administrator
165
165
  // approval](https://support.google.com/a?p=chat-app-auth)
166
- // with the `chat.app.spaces` scope in [Developer
167
- // Preview](https://developers.google.com/workspace/preview).
166
+ // with the `chat.app.spaces` scope.
168
167
  //
169
168
  // This field is not populated when using the `chat.bot` scope with [app
170
169
  // authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app).
@@ -350,20 +349,45 @@ message Space {
350
349
  // Only populated when the `space_type` is `SPACE`.
351
350
  AccessSettings access_settings = 23 [(google.api.field_behavior) = OPTIONAL];
352
351
 
352
+ // Optional. Immutable. The customer id of the domain of the space.
353
+ // Required only when creating a space with [app
354
+ // authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app)
355
+ // and `SpaceType` is `SPACE`, otherwise should not be set.
356
+ //
357
+ // In the format `customers/{customer}`, where `customer` is the `id` from the
358
+ // [Admin SDK customer
359
+ // resource](https://developers.google.com/admin-sdk/directory/reference/rest/v1/customers).
360
+ // Private apps can also use the `customers/my_customer` alias to create
361
+ // the space in the same Google Workspace organization as the app.
362
+ //
363
+ // For DMs, this field isn't populated.
364
+ optional string customer = 24 [
365
+ (google.api.field_behavior) = IMMUTABLE,
366
+ (google.api.field_behavior) = OPTIONAL
367
+ ];
368
+
353
369
  // Output only. The URI for a user to access the space.
354
370
  string space_uri = 25 [(google.api.field_behavior) = OUTPUT_ONLY];
355
371
 
356
372
  // Represents the [permission settings]
357
373
  // (https://support.google.com/chat/answer/13340792) of a space. Only
358
374
  // populated when the `space_type` is `SPACE`.
359
- //
360
- // Requires [user
361
- // authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
362
375
  oneof space_permission_settings {
363
376
  // Optional. Input only. Predefined space permission settings, input only
364
377
  // when creating a space. If the field is not set, a collaboration space is
365
378
  // created. After you create the space, settings are populated in the
366
379
  // `PermissionSettings` field.
380
+ //
381
+ // Setting predefined permission settings supports:
382
+ //
383
+ // - [App
384
+ // authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app)
385
+ // with [administrator
386
+ // approval](https://support.google.com/a?p=chat-app-auth) with the
387
+ // `chat.app.spaces` or `chat.app.spaces.create` scopes.
388
+ //
389
+ // - [User
390
+ // authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
367
391
  PredefinedPermissionSettings predefined_permission_settings = 26 [
368
392
  (google.api.field_behavior) = INPUT_ONLY,
369
393
  (google.api.field_behavior) = OPTIONAL
@@ -372,6 +396,18 @@ message Space {
372
396
  // Optional. Space permission settings for existing spaces. Input for
373
397
  // updating exact space permission settings, where existing permission
374
398
  // settings are replaced. Output lists current permission settings.
399
+ //
400
+ // Reading and updating permission settings supports:
401
+ //
402
+ // - [App
403
+ // authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app)
404
+ // with [administrator
405
+ // approval](https://support.google.com/a?p=chat-app-auth) with the
406
+ // `chat.app.spaces` scope. Only populated and settable when the Chat app
407
+ // created the space.
408
+ //
409
+ // - [User
410
+ // authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
375
411
  PermissionSettings permission_settings = 27
376
412
  [(google.api.field_behavior) = OPTIONAL];
377
413
  }
@@ -67,7 +67,7 @@ message SetUpSpaceRequest {
67
67
  // Optional. The Google Chat users or groups to invite to join the space. Omit
68
68
  // the calling user, as they are added automatically.
69
69
  //
70
- // The set currently allows up to 20 memberships (in addition to the caller).
70
+ // The set currently allows up to 49 memberships (in addition to the caller).
71
71
  //
72
72
  // For human membership, the `Membership.member` field must contain a `user`
73
73
  // with `name` populated (format: `users/{user}`) and `type` set to
@@ -17,7 +17,6 @@ syntax = "proto3";
17
17
  package google.chat.v1;
18
18
 
19
19
  import "google/api/field_behavior.proto";
20
- import "google/api/resource.proto";
21
20
 
22
21
  option csharp_namespace = "Google.Apps.Chat.V1";
23
22
  option go_package = "cloud.google.com/go/chat/apiv1/chatpb;chatpb";
@@ -19171,6 +19171,9 @@ export namespace google {
19171
19171
  /** Space accessSettings */
19172
19172
  accessSettings?: (google.chat.v1.Space.IAccessSettings|null);
19173
19173
 
19174
+ /** Space customer */
19175
+ customer?: (string|null);
19176
+
19174
19177
  /** Space spaceUri */
19175
19178
  spaceUri?: (string|null);
19176
19179
 
@@ -19241,6 +19244,9 @@ export namespace google {
19241
19244
  /** Space accessSettings. */
19242
19245
  public accessSettings?: (google.chat.v1.Space.IAccessSettings|null);
19243
19246
 
19247
+ /** Space customer. */
19248
+ public customer?: (string|null);
19249
+
19244
19250
  /** Space spaceUri. */
19245
19251
  public spaceUri: string;
19246
19252
 
@@ -49682,6 +49682,7 @@
49682
49682
  * @property {boolean|null} [adminInstalled] Space adminInstalled
49683
49683
  * @property {google.chat.v1.Space.IMembershipCount|null} [membershipCount] Space membershipCount
49684
49684
  * @property {google.chat.v1.Space.IAccessSettings|null} [accessSettings] Space accessSettings
49685
+ * @property {string|null} [customer] Space customer
49685
49686
  * @property {string|null} [spaceUri] Space spaceUri
49686
49687
  * @property {google.chat.v1.Space.PredefinedPermissionSettings|null} [predefinedPermissionSettings] Space predefinedPermissionSettings
49687
49688
  * @property {google.chat.v1.Space.IPermissionSettings|null} [permissionSettings] Space permissionSettings
@@ -49831,6 +49832,14 @@
49831
49832
  */
49832
49833
  Space.prototype.accessSettings = null;
49833
49834
 
49835
+ /**
49836
+ * Space customer.
49837
+ * @member {string|null|undefined} customer
49838
+ * @memberof google.chat.v1.Space
49839
+ * @instance
49840
+ */
49841
+ Space.prototype.customer = null;
49842
+
49834
49843
  /**
49835
49844
  * Space spaceUri.
49836
49845
  * @member {string} spaceUri
@@ -49866,6 +49875,12 @@
49866
49875
  // OneOf field names bound to virtual getters and setters
49867
49876
  var $oneOfFields;
49868
49877
 
49878
+ // Virtual OneOf for proto3 optional field
49879
+ Object.defineProperty(Space.prototype, "_customer", {
49880
+ get: $util.oneOfGetter($oneOfFields = ["customer"]),
49881
+ set: $util.oneOfSetter($oneOfFields)
49882
+ });
49883
+
49869
49884
  /**
49870
49885
  * Space spacePermissionSettings.
49871
49886
  * @member {"predefinedPermissionSettings"|"permissionSettings"|undefined} spacePermissionSettings
@@ -49933,6 +49948,8 @@
49933
49948
  $root.google.chat.v1.Space.MembershipCount.encode(message.membershipCount, writer.uint32(/* id 20, wireType 2 =*/162).fork()).ldelim();
49934
49949
  if (message.accessSettings != null && Object.hasOwnProperty.call(message, "accessSettings"))
49935
49950
  $root.google.chat.v1.Space.AccessSettings.encode(message.accessSettings, writer.uint32(/* id 23, wireType 2 =*/186).fork()).ldelim();
49951
+ if (message.customer != null && Object.hasOwnProperty.call(message, "customer"))
49952
+ writer.uint32(/* id 24, wireType 2 =*/194).string(message.customer);
49936
49953
  if (message.spaceUri != null && Object.hasOwnProperty.call(message, "spaceUri"))
49937
49954
  writer.uint32(/* id 25, wireType 2 =*/202).string(message.spaceUri);
49938
49955
  if (message.predefinedPermissionSettings != null && Object.hasOwnProperty.call(message, "predefinedPermissionSettings"))
@@ -50041,6 +50058,10 @@
50041
50058
  message.accessSettings = $root.google.chat.v1.Space.AccessSettings.decode(reader, reader.uint32());
50042
50059
  break;
50043
50060
  }
50061
+ case 24: {
50062
+ message.customer = reader.string();
50063
+ break;
50064
+ }
50044
50065
  case 25: {
50045
50066
  message.spaceUri = reader.string();
50046
50067
  break;
@@ -50177,6 +50198,11 @@
50177
50198
  if (error)
50178
50199
  return "accessSettings." + error;
50179
50200
  }
50201
+ if (message.customer != null && message.hasOwnProperty("customer")) {
50202
+ properties._customer = 1;
50203
+ if (!$util.isString(message.customer))
50204
+ return "customer: string expected";
50205
+ }
50180
50206
  if (message.spaceUri != null && message.hasOwnProperty("spaceUri"))
50181
50207
  if (!$util.isString(message.spaceUri))
50182
50208
  return "spaceUri: string expected";
@@ -50348,6 +50374,8 @@
50348
50374
  throw TypeError(".google.chat.v1.Space.accessSettings: object expected");
50349
50375
  message.accessSettings = $root.google.chat.v1.Space.AccessSettings.fromObject(object.accessSettings);
50350
50376
  }
50377
+ if (object.customer != null)
50378
+ message.customer = String(object.customer);
50351
50379
  if (object.spaceUri != null)
50352
50380
  message.spaceUri = String(object.spaceUri);
50353
50381
  switch (object.predefinedPermissionSettings) {
@@ -50448,6 +50476,11 @@
50448
50476
  object.membershipCount = $root.google.chat.v1.Space.MembershipCount.toObject(message.membershipCount, options);
50449
50477
  if (message.accessSettings != null && message.hasOwnProperty("accessSettings"))
50450
50478
  object.accessSettings = $root.google.chat.v1.Space.AccessSettings.toObject(message.accessSettings, options);
50479
+ if (message.customer != null && message.hasOwnProperty("customer")) {
50480
+ object.customer = message.customer;
50481
+ if (options.oneofs)
50482
+ object._customer = "customer";
50483
+ }
50451
50484
  if (message.spaceUri != null && message.hasOwnProperty("spaceUri"))
50452
50485
  object.spaceUri = message.spaceUri;
50453
50486
  if (message.predefinedPermissionSettings != null && message.hasOwnProperty("predefinedPermissionSettings")) {
@@ -3332,7 +3332,7 @@
3332
3332
  "ChatService": {
3333
3333
  "options": {
3334
3334
  "(google.api.default_host)": "chat.googleapis.com",
3335
- "(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.customemojis,https://www.googleapis.com/auth/chat.customemojis.readonly,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,https://www.googleapis.com/auth/chat.users.spacesettings"
3335
+ "(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.app.delete,https://www.googleapis.com/auth/chat.app.memberships,https://www.googleapis.com/auth/chat.app.spaces,https://www.googleapis.com/auth/chat.app.spaces.create,https://www.googleapis.com/auth/chat.bot,https://www.googleapis.com/auth/chat.customemojis,https://www.googleapis.com/auth/chat.customemojis.readonly,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,https://www.googleapis.com/auth/chat.users.spacesettings"
3336
3336
  },
3337
3337
  "methods": {
3338
3338
  "CreateMessage": {
@@ -4405,7 +4405,7 @@
4405
4405
  "type": "QuotedMessageMetadata",
4406
4406
  "id": 39,
4407
4407
  "options": {
4408
- "(google.api.field_behavior)": "OUTPUT_ONLY"
4408
+ "(google.api.field_behavior)": "OPTIONAL"
4409
4409
  }
4410
4410
  },
4411
4411
  "attachedGifs": {
@@ -4447,7 +4447,7 @@
4447
4447
  "type": "string",
4448
4448
  "id": 1,
4449
4449
  "options": {
4450
- "(google.api.field_behavior)": "OUTPUT_ONLY",
4450
+ "(google.api.field_behavior)": "REQUIRED",
4451
4451
  "(google.api.resource_reference).type": "chat.googleapis.com/Message"
4452
4452
  }
4453
4453
  },
@@ -4455,7 +4455,7 @@
4455
4455
  "type": "google.protobuf.Timestamp",
4456
4456
  "id": 2,
4457
4457
  "options": {
4458
- "(google.api.field_behavior)": "OUTPUT_ONLY"
4458
+ "(google.api.field_behavior)": "REQUIRED"
4459
4459
  }
4460
4460
  }
4461
4461
  }
@@ -5176,6 +5176,11 @@
5176
5176
  "(google.api.resource).pattern": "spaces/{space}"
5177
5177
  },
5178
5178
  "oneofs": {
5179
+ "_customer": {
5180
+ "oneof": [
5181
+ "customer"
5182
+ ]
5183
+ },
5179
5184
  "spacePermissionSettings": {
5180
5185
  "oneof": [
5181
5186
  "predefinedPermissionSettings",
@@ -5298,6 +5303,14 @@
5298
5303
  "(google.api.field_behavior)": "OPTIONAL"
5299
5304
  }
5300
5305
  },
5306
+ "customer": {
5307
+ "type": "string",
5308
+ "id": 24,
5309
+ "options": {
5310
+ "(google.api.field_behavior)": "OPTIONAL",
5311
+ "proto3_optional": true
5312
+ }
5313
+ },
5301
5314
  "spaceUri": {
5302
5315
  "type": "string",
5303
5316
  "id": 25,