@google-apps/chat 0.3.0 → 0.5.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.
Files changed (30) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/README.md +3 -0
  3. package/build/protos/google/apps/card/v1/card.proto +1 -1
  4. package/build/protos/google/chat/v1/action_status.proto +2 -1
  5. package/build/protos/google/chat/v1/annotation.proto +3 -1
  6. package/build/protos/google/chat/v1/attachment.proto +2 -1
  7. package/build/protos/google/chat/v1/chat_service.proto +71 -18
  8. package/build/protos/google/chat/v1/contextual_addon.proto +2 -1
  9. package/build/protos/google/chat/v1/deletion_metadata.proto +2 -1
  10. package/build/protos/google/chat/v1/group.proto +2 -1
  11. package/build/protos/google/chat/v1/history_state.proto +2 -1
  12. package/build/protos/google/chat/v1/matched_url.proto +2 -1
  13. package/build/protos/google/chat/v1/membership.proto +7 -5
  14. package/build/protos/google/chat/v1/message.proto +2 -1
  15. package/build/protos/google/chat/v1/reaction.proto +4 -3
  16. package/build/protos/google/chat/v1/slash_command.proto +2 -1
  17. package/build/protos/google/chat/v1/space.proto +7 -7
  18. package/build/protos/google/chat/v1/space_read_state.proto +113 -0
  19. package/build/protos/google/chat/v1/space_setup.proto +10 -9
  20. package/build/protos/google/chat/v1/thread_read_state.proto +75 -0
  21. package/build/protos/google/chat/v1/user.proto +2 -1
  22. package/build/protos/google/chat/v1/widgets.proto +2 -1
  23. package/build/protos/protos.d.ts +582 -16
  24. package/build/protos/protos.js +1255 -49
  25. package/build/protos/protos.json +163 -24
  26. package/build/src/v1/chat_service_client.d.ts +232 -26
  27. package/build/src/v1/chat_service_client.js +148 -0
  28. package/build/src/v1/chat_service_client.js.map +1 -1
  29. package/build/src/v1/chat_service_client_config.json +15 -0
  30. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.5.0](https://github.com/googleapis/google-cloud-node/compare/chat-v0.4.0...chat-v0.5.0) (2024-05-21)
4
+
5
+
6
+ ### Features
7
+
8
+ * [chat] update Nodejs generator to send API versions in headers for GAPICs ([#5345](https://github.com/googleapis/google-cloud-node/issues/5345)) ([e99879b](https://github.com/googleapis/google-cloud-node/commit/e99879b86eef7eb62f828fe4c3061a2077d714cc))
9
+ * [Many APIs] update Nodejs generator to send API versions in headers for GAPICs ([#5351](https://github.com/googleapis/google-cloud-node/issues/5351)) ([01f48fc](https://github.com/googleapis/google-cloud-node/commit/01f48fce63ec4ddf801d59ee2b8c0db9f6fb8372))
10
+ * [Many APIs] update Nodejs generator to send API versions in headers for GAPICs ([#5354](https://github.com/googleapis/google-cloud-node/issues/5354)) ([a9784ed](https://github.com/googleapis/google-cloud-node/commit/a9784ed3db6ee96d171762308bbbcd57390b6866))
11
+
12
+ ## [0.4.0](https://github.com/googleapis/google-cloud-node/compare/chat-v0.3.0...chat-v0.4.0) (2024-04-23)
13
+
14
+
15
+ ### Features
16
+
17
+ * [chat] Add Chat read state APIs ([#5268](https://github.com/googleapis/google-cloud-node/issues/5268)) ([3b345ca](https://github.com/googleapis/google-cloud-node/commit/3b345ca4dc99ee0e41be86eea4d3c1e8d07ac924))
18
+
3
19
  ## [0.3.0](https://github.com/googleapis/google-cloud-node/compare/chat-v0.2.0...chat-v0.3.0) (2024-04-18)
4
20
 
5
21
 
package/README.md CHANGED
@@ -140,6 +140,8 @@ Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/
140
140
  | Chat_service.get_membership | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-chat/samples/generated/v1/chat_service.get_membership.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-chat/samples/generated/v1/chat_service.get_membership.js,packages/google-chat/samples/README.md) |
141
141
  | Chat_service.get_message | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-chat/samples/generated/v1/chat_service.get_message.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-chat/samples/generated/v1/chat_service.get_message.js,packages/google-chat/samples/README.md) |
142
142
  | Chat_service.get_space | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-chat/samples/generated/v1/chat_service.get_space.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-chat/samples/generated/v1/chat_service.get_space.js,packages/google-chat/samples/README.md) |
143
+ | Chat_service.get_space_read_state | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-chat/samples/generated/v1/chat_service.get_space_read_state.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-chat/samples/generated/v1/chat_service.get_space_read_state.js,packages/google-chat/samples/README.md) |
144
+ | Chat_service.get_thread_read_state | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-chat/samples/generated/v1/chat_service.get_thread_read_state.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-chat/samples/generated/v1/chat_service.get_thread_read_state.js,packages/google-chat/samples/README.md) |
143
145
  | Chat_service.list_memberships | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-chat/samples/generated/v1/chat_service.list_memberships.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-chat/samples/generated/v1/chat_service.list_memberships.js,packages/google-chat/samples/README.md) |
144
146
  | Chat_service.list_messages | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-chat/samples/generated/v1/chat_service.list_messages.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-chat/samples/generated/v1/chat_service.list_messages.js,packages/google-chat/samples/README.md) |
145
147
  | Chat_service.list_reactions | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-chat/samples/generated/v1/chat_service.list_reactions.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-chat/samples/generated/v1/chat_service.list_reactions.js,packages/google-chat/samples/README.md) |
@@ -148,6 +150,7 @@ Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/
148
150
  | Chat_service.update_membership | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-chat/samples/generated/v1/chat_service.update_membership.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-chat/samples/generated/v1/chat_service.update_membership.js,packages/google-chat/samples/README.md) |
149
151
  | Chat_service.update_message | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-chat/samples/generated/v1/chat_service.update_message.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-chat/samples/generated/v1/chat_service.update_message.js,packages/google-chat/samples/README.md) |
150
152
  | Chat_service.update_space | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-chat/samples/generated/v1/chat_service.update_space.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-chat/samples/generated/v1/chat_service.update_space.js,packages/google-chat/samples/README.md) |
153
+ | Chat_service.update_space_read_state | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-chat/samples/generated/v1/chat_service.update_space_read_state.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-chat/samples/generated/v1/chat_service.update_space_read_state.js,packages/google-chat/samples/README.md) |
151
154
  | Chat_service.upload_attachment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-chat/samples/generated/v1/chat_service.upload_attachment.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-chat/samples/generated/v1/chat_service.upload_attachment.js,packages/google-chat/samples/README.md) |
152
155
  | Quickstart | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-chat/samples/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-chat/samples/quickstart.js,packages/google-chat/samples/README.md) |
153
156
 
@@ -1,4 +1,4 @@
1
- // Copyright 2023 Google LLC
1
+ // Copyright 2024 Google LLC
2
2
  //
3
3
  // Licensed under the Apache License, Version 2.0 (the "License");
4
4
  // you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
1
- // Copyright 2023 Google LLC
1
+ // Copyright 2024 Google LLC
2
2
  //
3
3
  // Licensed under the Apache License, Version 2.0 (the "License");
4
4
  // you may not use this file except in compliance with the License.
@@ -23,6 +23,7 @@ option go_package = "cloud.google.com/go/chat/apiv1/chatpb;chatpb";
23
23
  option java_multiple_files = true;
24
24
  option java_outer_classname = "ActionStatusProto";
25
25
  option java_package = "com.google.chat.v1";
26
+ option objc_class_prefix = "DYNAPIProto";
26
27
  option php_namespace = "Google\\Apps\\Chat\\V1";
27
28
  option ruby_package = "Google::Apps::Chat::V1";
28
29
 
@@ -1,4 +1,4 @@
1
- // Copyright 2023 Google LLC
1
+ // Copyright 2024 Google LLC
2
2
  //
3
3
  // Licensed under the Apache License, Version 2.0 (the "License");
4
4
  // you may not use this file except in compliance with the License.
@@ -16,6 +16,7 @@ syntax = "proto3";
16
16
 
17
17
  package google.chat.v1;
18
18
 
19
+ import "google/api/resource.proto";
19
20
  import "google/chat/v1/attachment.proto";
20
21
  import "google/chat/v1/user.proto";
21
22
 
@@ -24,6 +25,7 @@ option go_package = "cloud.google.com/go/chat/apiv1/chatpb;chatpb";
24
25
  option java_multiple_files = true;
25
26
  option java_outer_classname = "AnnotationProto";
26
27
  option java_package = "com.google.chat.v1";
28
+ option objc_class_prefix = "DYNAPIProto";
27
29
  option php_namespace = "Google\\Apps\\Chat\\V1";
28
30
  option ruby_package = "Google::Apps::Chat::V1";
29
31
 
@@ -1,4 +1,4 @@
1
- // Copyright 2023 Google LLC
1
+ // Copyright 2024 Google LLC
2
2
  //
3
3
  // Licensed under the Apache License, Version 2.0 (the "License");
4
4
  // you may not use this file except in compliance with the License.
@@ -24,6 +24,7 @@ option go_package = "cloud.google.com/go/chat/apiv1/chatpb;chatpb";
24
24
  option java_multiple_files = true;
25
25
  option java_outer_classname = "AttachmentProto";
26
26
  option java_package = "com.google.chat.v1";
27
+ option objc_class_prefix = "DYNAPIProto";
27
28
  option php_namespace = "Google\\Apps\\Chat\\V1";
28
29
  option ruby_package = "Google::Apps::Chat::V1";
29
30
 
@@ -1,4 +1,4 @@
1
- // Copyright 2023 Google LLC
1
+ // Copyright 2024 Google LLC
2
2
  //
3
3
  // Licensed under the Apache License, Version 2.0 (the "License");
4
4
  // you may not use this file except in compliance with the License.
@@ -23,7 +23,9 @@ import "google/chat/v1/membership.proto";
23
23
  import "google/chat/v1/message.proto";
24
24
  import "google/chat/v1/reaction.proto";
25
25
  import "google/chat/v1/space.proto";
26
+ import "google/chat/v1/space_read_state.proto";
26
27
  import "google/chat/v1/space_setup.proto";
28
+ import "google/chat/v1/thread_read_state.proto";
27
29
  import "google/protobuf/empty.proto";
28
30
 
29
31
  option csharp_namespace = "Google.Apps.Chat.V1";
@@ -31,6 +33,7 @@ option go_package = "cloud.google.com/go/chat/apiv1/chatpb;chatpb";
31
33
  option java_multiple_files = true;
32
34
  option java_outer_classname = "ChatServiceProto";
33
35
  option java_package = "com.google.chat.v1";
36
+ option objc_class_prefix = "DYNAPIProto";
34
37
  option php_namespace = "Google\\Apps\\Chat\\V1";
35
38
  option ruby_package = "Google::Apps::Chat::V1";
36
39
 
@@ -53,9 +56,12 @@ service ChatService {
53
56
  "https://www.googleapis.com/auth/chat.messages.readonly,"
54
57
  "https://www.googleapis.com/auth/chat.spaces,"
55
58
  "https://www.googleapis.com/auth/chat.spaces.create,"
56
- "https://www.googleapis.com/auth/chat.spaces.readonly";
59
+ "https://www.googleapis.com/auth/chat.spaces.readonly,"
60
+ "https://www.googleapis.com/auth/chat.users.readstate,"
61
+ "https://www.googleapis.com/auth/chat.users.readstate.readonly";
57
62
 
58
- // Creates a message in a Google Chat space. For an example, see [Send a
63
+ // Creates a message in a Google Chat space. The maximum message size,
64
+ // including text and cards, is 32,000 bytes. For an example, see [Send a
59
65
  // message](https://developers.google.com/workspace/chat/create-messages).
60
66
  //
61
67
  // Calling this method requires
@@ -246,6 +252,7 @@ service ChatService {
246
252
  //
247
253
  // Lists spaces visible to the caller or authenticated user. Group chats
248
254
  // and DMs aren't listed until the first message is sent.
255
+ //
249
256
  rpc ListSpaces(ListSpacesRequest) returns (ListSpacesResponse) {
250
257
  option (google.api.http) = {
251
258
  get: "/v1/spaces"
@@ -296,17 +303,17 @@ service ChatService {
296
303
  // members](https://developers.google.com/workspace/chat/set-up-spaces).
297
304
  //
298
305
  // To specify the human members to add, add memberships with the appropriate
299
- // `member.name` in the `SetUpSpaceRequest`. To add a human user, use
300
- // `users/{user}`, where `{user}` can be the email address for the user. For
301
- // users in the same Workspace organization `{user}` can also be the `id` for
302
- // the person from the People API, or the `id` for the user in the Directory
303
- // API. For example, if the People API Person profile ID for
304
- // `user@example.com` is `123456789`, you can add the user to the space by
305
- // setting the `membership.member.name` to `users/user@example.com` or
306
- // `users/123456789`.
307
- //
308
- // For a space or group chat, if the caller blocks or is blocked by some
309
- // members, then those members aren't added to the created space.
306
+ // `membership.member.name`. To add a human user, use `users/{user}`, where
307
+ // `{user}` can be the email address for the user. For users in the same
308
+ // Workspace organization `{user}` can also be the `id` for the person from
309
+ // the People API, or the `id` for the user in the Directory API. For example,
310
+ // if the People API Person profile ID for `user@example.com` is `123456789`,
311
+ // you can add the user to the space by setting the `membership.member.name`
312
+ // to `users/user@example.com` or `users/123456789`.
313
+ //
314
+ // For a named space or group chat, if the caller blocks, or is blocked
315
+ // by some members, or doesn't have permission to add some members, then
316
+ // those members aren't added to the created space.
310
317
  //
311
318
  // To create a direct message (DM) between the calling user and another human
312
319
  // user, specify exactly one membership to represent the human user. If
@@ -419,8 +426,8 @@ service ChatService {
419
426
  // directly to the specified space. Requires [user
420
427
  // authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
421
428
  //
422
- // To specify the member to add, set the `membership.member.name` in the
423
- // `CreateMembershipRequest`:
429
+ // To specify the member to add, set the `membership.member.name` for the
430
+ // human or app member.
424
431
  //
425
432
  // - To add the calling app to a space or a direct message between two human
426
433
  // users, use `users/app`. Unable to add other
@@ -441,8 +448,11 @@ service ChatService {
441
448
  option (google.api.method_signature) = "parent,membership";
442
449
  }
443
450
 
444
- // Updates a membership. Requires [user
445
- // authentication](https://developers.google.com/chat/api/guides/auth/users).
451
+ // Updates a membership. For an example, see [Update a user's membership in
452
+ // a space](https://developers.google.com/workspace/chat/update-members).
453
+ //
454
+ // Requires [user
455
+ // authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
446
456
  rpc UpdateMembership(UpdateMembershipRequest) returns (Membership) {
447
457
  option (google.api.http) = {
448
458
  patch: "/v1/{membership.name=spaces/*/members/*}"
@@ -502,4 +512,47 @@ service ChatService {
502
512
  };
503
513
  option (google.api.method_signature) = "name";
504
514
  }
515
+
516
+ // Returns details about a user's read state within a space, used to identify
517
+ // read and unread messages. For an example, see [Get details about a user's
518
+ // space read
519
+ // state](https://developers.google.com/workspace/chat/get-space-read-state).
520
+ //
521
+ // Requires [user
522
+ // authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
523
+ rpc GetSpaceReadState(GetSpaceReadStateRequest) returns (SpaceReadState) {
524
+ option (google.api.http) = {
525
+ get: "/v1/{name=users/*/spaces/*/spaceReadState}"
526
+ };
527
+ option (google.api.method_signature) = "name";
528
+ }
529
+
530
+ // Updates a user's read state within a space, used to identify read and
531
+ // unread messages. For an example, see [Update a user's space read
532
+ // state](https://developers.google.com/workspace/chat/update-space-read-state).
533
+ //
534
+ // Requires [user
535
+ // authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
536
+ rpc UpdateSpaceReadState(UpdateSpaceReadStateRequest)
537
+ returns (SpaceReadState) {
538
+ option (google.api.http) = {
539
+ patch: "/v1/{space_read_state.name=users/*/spaces/*/spaceReadState}"
540
+ body: "space_read_state"
541
+ };
542
+ option (google.api.method_signature) = "space_read_state,update_mask";
543
+ }
544
+
545
+ // Returns details about a user's read state within a thread, used to identify
546
+ // read and unread messages. For an example, see [Get details about a user's
547
+ // thread read
548
+ // state](https://developers.google.com/workspace/chat/get-thread-read-state).
549
+ //
550
+ // Requires [user
551
+ // authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
552
+ rpc GetThreadReadState(GetThreadReadStateRequest) returns (ThreadReadState) {
553
+ option (google.api.http) = {
554
+ get: "/v1/{name=users/*/spaces/*/threads/*/threadReadState}"
555
+ };
556
+ option (google.api.method_signature) = "name";
557
+ }
505
558
  }
@@ -1,4 +1,4 @@
1
- // Copyright 2023 Google LLC
1
+ // Copyright 2024 Google LLC
2
2
  //
3
3
  // Licensed under the Apache License, Version 2.0 (the "License");
4
4
  // you may not use this file except in compliance with the License.
@@ -23,6 +23,7 @@ option go_package = "cloud.google.com/go/chat/apiv1/chatpb;chatpb";
23
23
  option java_multiple_files = true;
24
24
  option java_outer_classname = "ContextualAddOnProto";
25
25
  option java_package = "com.google.chat.v1";
26
+ option objc_class_prefix = "DYNAPIProto";
26
27
  option php_namespace = "Google\\Apps\\Chat\\V1";
27
28
  option ruby_package = "Google::Apps::Chat::V1";
28
29
 
@@ -1,4 +1,4 @@
1
- // Copyright 2023 Google LLC
1
+ // Copyright 2024 Google LLC
2
2
  //
3
3
  // Licensed under the Apache License, Version 2.0 (the "License");
4
4
  // you may not use this file except in compliance with the License.
@@ -21,6 +21,7 @@ option go_package = "cloud.google.com/go/chat/apiv1/chatpb;chatpb";
21
21
  option java_multiple_files = true;
22
22
  option java_outer_classname = "DeletionMetadataProto";
23
23
  option java_package = "com.google.chat.v1";
24
+ option objc_class_prefix = "DYNAPIProto";
24
25
  option php_namespace = "Google\\Apps\\Chat\\V1";
25
26
  option ruby_package = "Google::Apps::Chat::V1";
26
27
 
@@ -1,4 +1,4 @@
1
- // Copyright 2023 Google LLC
1
+ // Copyright 2024 Google LLC
2
2
  //
3
3
  // Licensed under the Apache License, Version 2.0 (the "License");
4
4
  // you may not use this file except in compliance with the License.
@@ -21,6 +21,7 @@ option go_package = "cloud.google.com/go/chat/apiv1/chatpb;chatpb";
21
21
  option java_multiple_files = true;
22
22
  option java_outer_classname = "GroupProto";
23
23
  option java_package = "com.google.chat.v1";
24
+ option objc_class_prefix = "DYNAPIProto";
24
25
  option php_namespace = "Google\\Apps\\Chat\\V1";
25
26
  option ruby_package = "Google::Apps::Chat::V1";
26
27
 
@@ -1,4 +1,4 @@
1
- // Copyright 2023 Google LLC
1
+ // Copyright 2024 Google LLC
2
2
  //
3
3
  // Licensed under the Apache License, Version 2.0 (the "License");
4
4
  // you may not use this file except in compliance with the License.
@@ -21,6 +21,7 @@ option go_package = "cloud.google.com/go/chat/apiv1/chatpb;chatpb";
21
21
  option java_multiple_files = true;
22
22
  option java_outer_classname = "HistoryStateProto";
23
23
  option java_package = "com.google.chat.v1";
24
+ option objc_class_prefix = "DYNAPIProto";
24
25
  option php_namespace = "Google\\Apps\\Chat\\V1";
25
26
  option ruby_package = "Google::Apps::Chat::V1";
26
27
 
@@ -1,4 +1,4 @@
1
- // Copyright 2023 Google LLC
1
+ // Copyright 2024 Google LLC
2
2
  //
3
3
  // Licensed under the Apache License, Version 2.0 (the "License");
4
4
  // you may not use this file except in compliance with the License.
@@ -23,6 +23,7 @@ option go_package = "cloud.google.com/go/chat/apiv1/chatpb;chatpb";
23
23
  option java_multiple_files = true;
24
24
  option java_outer_classname = "MatchedUrlProto";
25
25
  option java_package = "com.google.chat.v1";
26
+ option objc_class_prefix = "DYNAPIProto";
26
27
  option php_namespace = "Google\\Apps\\Chat\\V1";
27
28
  option ruby_package = "Google::Apps::Chat::V1";
28
29
 
@@ -1,4 +1,4 @@
1
- // Copyright 2023 Google LLC
1
+ // Copyright 2024 Google LLC
2
2
  //
3
3
  // Licensed under the Apache License, Version 2.0 (the "License");
4
4
  // you may not use this file except in compliance with the License.
@@ -28,6 +28,7 @@ option go_package = "cloud.google.com/go/chat/apiv1/chatpb;chatpb";
28
28
  option java_multiple_files = true;
29
29
  option java_outer_classname = "MembershipProto";
30
30
  option java_package = "com.google.chat.v1";
31
+ option objc_class_prefix = "DYNAPIProto";
31
32
  option php_namespace = "Google\\Apps\\Chat\\V1";
32
33
  option ruby_package = "Google::Apps::Chat::V1";
33
34
 
@@ -105,8 +106,8 @@ message Membership {
105
106
  User member = 3;
106
107
 
107
108
  // The Google Group the membership corresponds to.
108
- // Only supports read operations. Other operations, like creating or
109
- // updating a membership, aren't currently supported.
109
+ // Only supports read operations. Other operations, like
110
+ // creating or updating a membership, aren't currently supported.
110
111
  Group group_member = 5;
111
112
  }
112
113
 
@@ -275,8 +276,9 @@ message ListMembershipsResponse {
275
276
  message GetMembershipRequest {
276
277
  // Required. Resource name of the membership to retrieve.
277
278
  //
278
- // To get the app's own membership, you can optionally use
279
- // `spaces/{space}/members/app`.
279
+ // To get the app's own membership [by using user
280
+ // authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user),
281
+ // you can optionally use `spaces/{space}/members/app`.
280
282
  //
281
283
  // Format: `spaces/{space}/members/{member}` or `spaces/{space}/members/app`
282
284
  //
@@ -1,4 +1,4 @@
1
- // Copyright 2023 Google LLC
1
+ // Copyright 2024 Google LLC
2
2
  //
3
3
  // Licensed under the Apache License, Version 2.0 (the "License");
4
4
  // you may not use this file except in compliance with the License.
@@ -37,6 +37,7 @@ option go_package = "cloud.google.com/go/chat/apiv1/chatpb;chatpb";
37
37
  option java_multiple_files = true;
38
38
  option java_outer_classname = "MessageProto";
39
39
  option java_package = "com.google.chat.v1";
40
+ option objc_class_prefix = "DYNAPIProto";
40
41
  option php_namespace = "Google\\Apps\\Chat\\V1";
41
42
  option ruby_package = "Google::Apps::Chat::V1";
42
43
 
@@ -1,4 +1,4 @@
1
- // Copyright 2023 Google LLC
1
+ // Copyright 2024 Google LLC
2
2
  //
3
3
  // Licensed under the Apache License, Version 2.0 (the "License");
4
4
  // you may not use this file except in compliance with the License.
@@ -25,6 +25,7 @@ option go_package = "cloud.google.com/go/chat/apiv1/chatpb;chatpb";
25
25
  option java_multiple_files = true;
26
26
  option java_outer_classname = "ReactionProto";
27
27
  option java_package = "com.google.chat.v1";
28
+ option objc_class_prefix = "DYNAPIProto";
28
29
  option php_namespace = "Google\\Apps\\Chat\\V1";
29
30
  option ruby_package = "Google::Apps::Chat::V1";
30
31
 
@@ -61,8 +62,8 @@ message Emoji {
61
62
 
62
63
  // Represents a custom emoji.
63
64
  message CustomEmoji {
64
- // Unique key for the custom emoji resource.
65
- string uid = 1;
65
+ // Output only. Unique key for the custom emoji resource.
66
+ string uid = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
66
67
  }
67
68
 
68
69
  // The number of people who reacted to a message with a specific emoji.
@@ -1,4 +1,4 @@
1
- // Copyright 2023 Google LLC
1
+ // Copyright 2024 Google LLC
2
2
  //
3
3
  // Licensed under the Apache License, Version 2.0 (the "License");
4
4
  // you may not use this file except in compliance with the License.
@@ -21,6 +21,7 @@ option go_package = "cloud.google.com/go/chat/apiv1/chatpb;chatpb";
21
21
  option java_multiple_files = true;
22
22
  option java_outer_classname = "SlashCommandProto";
23
23
  option java_package = "com.google.chat.v1";
24
+ option objc_class_prefix = "DYNAPIProto";
24
25
  option php_namespace = "Google\\Apps\\Chat\\V1";
25
26
  option ruby_package = "Google::Apps::Chat::V1";
26
27
 
@@ -1,4 +1,4 @@
1
- // Copyright 2023 Google LLC
1
+ // Copyright 2024 Google LLC
2
2
  //
3
3
  // Licensed under the Apache License, Version 2.0 (the "License");
4
4
  // you may not use this file except in compliance with the License.
@@ -27,6 +27,7 @@ option go_package = "cloud.google.com/go/chat/apiv1/chatpb;chatpb";
27
27
  option java_multiple_files = true;
28
28
  option java_outer_classname = "SpaceProto";
29
29
  option java_package = "com.google.chat.v1";
30
+ option objc_class_prefix = "DYNAPIProto";
30
31
  option php_namespace = "Google\\Apps\\Chat\\V1";
31
32
  option ruby_package = "Google::Apps::Chat::V1";
32
33
 
@@ -184,13 +185,12 @@ message Space {
184
185
  (google.api.field_behavior) = OPTIONAL
185
186
  ];
186
187
 
187
- // Output only. Whether the Chat app was installed by a Google Workspace
188
- // administrator. Administrators can install a Chat app for their domain,
189
- // organizational unit, or a group of users.
188
+ // Output only. For direct message (DM) spaces with a Chat app, whether the
189
+ // space was created by a Google Workspace administrator. Administrators can
190
+ // install and set up a direct message with a Chat app on behalf of users in
191
+ // their organization.
190
192
  //
191
- // Administrators can only install Chat apps for direct messaging between
192
- // users and the app. To support admin install, your app must feature direct
193
- // messaging.
193
+ // To support admin install, your Chat app must feature direct messaging.
194
194
  bool admin_installed = 19 [(google.api.field_behavior) = OUTPUT_ONLY];
195
195
  }
196
196
 
@@ -0,0 +1,113 @@
1
+ // Copyright 2024 Google LLC
2
+ //
3
+ // Licensed under the Apache License, Version 2.0 (the "License");
4
+ // you may not use this file except in compliance with the License.
5
+ // You may obtain a copy of the License at
6
+ //
7
+ // http://www.apache.org/licenses/LICENSE-2.0
8
+ //
9
+ // Unless required by applicable law or agreed to in writing, software
10
+ // distributed under the License is distributed on an "AS IS" BASIS,
11
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ // See the License for the specific language governing permissions and
13
+ // limitations under the License.
14
+
15
+ syntax = "proto3";
16
+
17
+ package google.chat.v1;
18
+
19
+ import "google/api/field_behavior.proto";
20
+ import "google/api/resource.proto";
21
+ import "google/protobuf/field_mask.proto";
22
+ import "google/protobuf/timestamp.proto";
23
+
24
+ option csharp_namespace = "Google.Apps.Chat.V1";
25
+ option go_package = "cloud.google.com/go/chat/apiv1/chatpb;chatpb";
26
+ option java_multiple_files = true;
27
+ option java_outer_classname = "SpaceReadStateProto";
28
+ option java_package = "com.google.chat.v1";
29
+ option objc_class_prefix = "DYNAPIProto";
30
+ option php_namespace = "Google\\Apps\\Chat\\V1";
31
+ option ruby_package = "Google::Apps::Chat::V1";
32
+
33
+ // A user's read state within a space, used to identify read and unread
34
+ // messages.
35
+ message SpaceReadState {
36
+ option (google.api.resource) = {
37
+ type: "chat.googleapis.com/SpaceReadState"
38
+ pattern: "users/{user}/spaces/{space}/spaceReadState"
39
+ singular: "spaceReadState"
40
+ };
41
+
42
+ // Resource name of the space read state.
43
+ //
44
+ // Format: `users/{user}/spaces/{space}/spaceReadState`
45
+ string name = 1;
46
+
47
+ // Optional. The time when the user's space read state was updated. Usually
48
+ // this corresponds with either the timestamp of the last read message, or a
49
+ // timestamp specified by the user to mark the last read position in a space.
50
+ google.protobuf.Timestamp last_read_time = 2
51
+ [(google.api.field_behavior) = OPTIONAL];
52
+ }
53
+
54
+ // Request message for GetSpaceReadState API.
55
+ message GetSpaceReadStateRequest {
56
+ // Required. Resource name of the space read state to retrieve.
57
+ //
58
+ // Only supports getting read state for the calling user.
59
+ //
60
+ // To refer to the calling user, set one of the following:
61
+ //
62
+ // - The `me` alias. For example, `users/me/spaces/{space}/spaceReadState`.
63
+ //
64
+ // - Their Workspace email address. For example,
65
+ // `users/user@example.com/spaces/{space}/spaceReadState`.
66
+ //
67
+ // - Their user id. For example,
68
+ // `users/123456789/spaces/{space}/spaceReadState`.
69
+ //
70
+ // Format: users/{user}/spaces/{space}/spaceReadState
71
+ string name = 1 [
72
+ (google.api.field_behavior) = REQUIRED,
73
+ (google.api.resource_reference) = {
74
+ type: "chat.googleapis.com/SpaceReadState"
75
+ }
76
+ ];
77
+ }
78
+
79
+ // Request message for UpdateSpaceReadState API.
80
+ message UpdateSpaceReadStateRequest {
81
+ // Required. The space read state and fields to update.
82
+ //
83
+ // Only supports updating read state for the calling user.
84
+ //
85
+ // To refer to the calling user, set one of the following:
86
+ //
87
+ // - The `me` alias. For example, `users/me/spaces/{space}/spaceReadState`.
88
+ //
89
+ // - Their Workspace email address. For example,
90
+ // `users/user@example.com/spaces/{space}/spaceReadState`.
91
+ //
92
+ // - Their user id. For example,
93
+ // `users/123456789/spaces/{space}/spaceReadState`.
94
+ //
95
+ // Format: users/{user}/spaces/{space}/spaceReadState
96
+ SpaceReadState space_read_state = 1 [(google.api.field_behavior) = REQUIRED];
97
+
98
+ // Required. The field paths to update. Currently supported field paths:
99
+ //
100
+ // - `last_read_time`
101
+ //
102
+ // When the `last_read_time` is before the latest message create time, the
103
+ // space appears as unread in the UI.
104
+ //
105
+ // To mark the space as read, set `last_read_time` to any value later (larger)
106
+ // than the latest message create time. The `last_read_time` is coerced to
107
+ // match the latest message create time. Note that the space read state only
108
+ // affects the read state of messages that are visible in the space's
109
+ // top-level conversation. Replies in threads are unaffected by this
110
+ // timestamp, and instead rely on the thread read state.
111
+ google.protobuf.FieldMask update_mask = 2
112
+ [(google.api.field_behavior) = REQUIRED];
113
+ }
@@ -1,4 +1,4 @@
1
- // Copyright 2023 Google LLC
1
+ // Copyright 2024 Google LLC
2
2
  //
3
3
  // Licensed under the Apache License, Version 2.0 (the "License");
4
4
  // you may not use this file except in compliance with the License.
@@ -25,6 +25,7 @@ option go_package = "cloud.google.com/go/chat/apiv1/chatpb;chatpb";
25
25
  option java_multiple_files = true;
26
26
  option java_outer_classname = "SpaceSetupProto";
27
27
  option java_package = "com.google.chat.v1";
28
+ option objc_class_prefix = "DYNAPIProto";
28
29
  option php_namespace = "Google\\Apps\\Chat\\V1";
29
30
  option ruby_package = "Google::Apps::Chat::V1";
30
31
 
@@ -68,14 +69,14 @@ message SetUpSpaceRequest {
68
69
  //
69
70
  // The set currently allows up to 20 memberships (in addition to the caller).
70
71
  //
71
- // The `Membership.member` field must contain a `user` with `name` populated
72
- // (format: `users/{user}`) and `type` set to `User.Type.HUMAN`. You can only
73
- // add human users when setting up a space (adding Chat apps is only supported
74
- // for direct message setup with the calling app). You can also add members
75
- // using the user's email as an alias for {user}. For example, the `user.name`
76
- // can be `users/example@gmail.com`." To invite Gmail users or users from
77
- // external Google Workspace domains, user's email must be used for
78
- // `{user}`.
72
+ // For human membership, the `Membership.member` field must contain a `user`
73
+ // with `name` populated (format: `users/{user}`) and `type` set to
74
+ // `User.Type.HUMAN`. You can only add human users when setting up a space
75
+ // (adding Chat apps is only supported for direct message setup with the
76
+ // calling app). You can also add members using the user's email as an alias
77
+ // for {user}. For example, the `user.name` can be `users/example@gmail.com`.
78
+ // To invite Gmail users or users from external Google Workspace domains,
79
+ // user's email must be used for `{user}`.
79
80
  //
80
81
  // Optional when setting `Space.spaceType` to `SPACE`.
81
82
  //