@google-apps/chat 0.23.1 → 0.25.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 (33) hide show
  1. package/README.md +3 -3
  2. package/build/protos/google/chat/v1/action_status.proto +1 -1
  3. package/build/protos/google/chat/v1/annotation.proto +1 -1
  4. package/build/protos/google/chat/v1/attachment.proto +1 -1
  5. package/build/protos/google/chat/v1/chat_service.proto +26 -0
  6. package/build/protos/google/chat/v1/contextual_addon.proto +1 -1
  7. package/build/protos/google/chat/v1/deletion_metadata.proto +1 -1
  8. package/build/protos/google/chat/v1/event_payload.proto +1 -1
  9. package/build/protos/google/chat/v1/group.proto +1 -1
  10. package/build/protos/google/chat/v1/history_state.proto +1 -1
  11. package/build/protos/google/chat/v1/matched_url.proto +1 -1
  12. package/build/protos/google/chat/v1/membership.proto +1 -1
  13. package/build/protos/google/chat/v1/message.proto +49 -7
  14. package/build/protos/google/chat/v1/reaction.proto +1 -1
  15. package/build/protos/google/chat/v1/slash_command.proto +1 -1
  16. package/build/protos/google/chat/v1/space.proto +81 -1
  17. package/build/protos/google/chat/v1/space_event.proto +1 -1
  18. package/build/protos/google/chat/v1/space_notification_setting.proto +1 -1
  19. package/build/protos/google/chat/v1/space_read_state.proto +1 -1
  20. package/build/protos/google/chat/v1/space_setup.proto +1 -1
  21. package/build/protos/google/chat/v1/thread_read_state.proto +1 -1
  22. package/build/protos/google/chat/v1/user.proto +1 -1
  23. package/build/protos/google/chat/v1/widgets.proto +1 -1
  24. package/build/protos/protos.d.ts +1004 -21
  25. package/build/protos/protos.js +8162 -2241
  26. package/build/protos/protos.json +311 -24
  27. package/build/src/v1/chat_service_client.d.ts +1103 -898
  28. package/build/src/v1/chat_service_client.js +830 -297
  29. package/build/src/v1/chat_service_client.js.map +1 -1
  30. package/build/src/v1/chat_service_client_config.json +5 -0
  31. package/build/src/v1/gapic_metadata.json +14 -0
  32. package/build/src/v1/index.js.map +1 -1
  33. package/package.json +1 -4
package/README.md CHANGED
@@ -71,6 +71,7 @@ Samples are in the [`samples/`][homepage_samples] directory. Each sample's `READ
71
71
  | delete section | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-chat/samples/generated/v1/chat_service.delete_section.js) |
72
72
  | delete space | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-chat/samples/generated/v1/chat_service.delete_space.js) |
73
73
  | find direct message | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-chat/samples/generated/v1/chat_service.find_direct_message.js) |
74
+ | find group chats | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-chat/samples/generated/v1/chat_service.find_group_chats.js) |
74
75
  | get attachment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-chat/samples/generated/v1/chat_service.get_attachment.js) |
75
76
  | get custom emoji | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-chat/samples/generated/v1/chat_service.get_custom_emoji.js) |
76
77
  | get membership | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-chat/samples/generated/v1/chat_service.get_membership.js) |
@@ -99,7 +100,6 @@ Samples are in the [`samples/`][homepage_samples] directory. Each sample's `READ
99
100
  | update space notification setting | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-chat/samples/generated/v1/chat_service.update_space_notification_setting.js) |
100
101
  | 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) |
101
102
  | upload attachment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-chat/samples/generated/v1/chat_service.upload_attachment.js) |
102
- | chat | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-chat/samples/generated/v1/snippet_metadata_google.chat.v1.json) |
103
103
 
104
104
 
105
105
  ## Supported Node.js Versions
@@ -133,7 +133,7 @@ More Information: [Google Cloud Platform Launch Stages][launch_stages]
133
133
 
134
134
  ## Contributing
135
135
 
136
- Contributions welcome! See the [Contributing Guide](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-chat/CONTRIBUTING.md).
136
+ Contributions welcome! See the [Contributing Guide](https://github.com/googleapis/google-cloud-node/blob/main/CONTRIBUTING.md).
137
137
 
138
138
  Please note that this `README.md`
139
139
  and a variety of configuration files in this repository (including `.nycrc` and `tsconfig.json`)
@@ -143,7 +143,7 @@ are generated from a central template.
143
143
 
144
144
  Apache Version 2.0
145
145
 
146
- See [LICENSE](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-chat/LICENSE)
146
+ See [LICENSE](https://github.com/googleapis/google-cloud-node/blob/main/LICENSE)
147
147
 
148
148
  [shell_img]: https://gstatic.com/cloudssh/images/open-btn.png
149
149
  [projects]: https://console.cloud.google.com/project
@@ -1,4 +1,4 @@
1
- // Copyright 2025 Google LLC
1
+ // Copyright 2026 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 2025 Google LLC
1
+ // Copyright 2026 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 2025 Google LLC
1
+ // Copyright 2026 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.
@@ -717,6 +717,32 @@ service ChatService {
717
717
  };
718
718
  }
719
719
 
720
+ // Returns all spaces with `spaceType == GROUP_CHAT`, whose
721
+ // human memberships contain exactly the calling user, and the users specified
722
+ // in `FindGroupChatsRequest.users`. Only members that have joined the
723
+ // conversation are supported. For an example, see [Find group
724
+ // chats](https://developers.google.com/workspace/chat/find-group-chats).
725
+ //
726
+ // If the calling user blocks, or is blocked by, some users, and no spaces
727
+ // with the entire specified set of users are found, this method returns
728
+ // spaces that don't include the blocked or blocking users.
729
+ //
730
+ // The specified set of users must contain only human (non-app) memberships.
731
+ // A request that contains non-human users doesn't return any spaces.
732
+ //
733
+ // Requires [user
734
+ // authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
735
+ // with one of the following [authorization
736
+ // scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
737
+ //
738
+ // - `https://www.googleapis.com/auth/chat.memberships.readonly`
739
+ // - `https://www.googleapis.com/auth/chat.memberships`
740
+ rpc FindGroupChats(FindGroupChatsRequest) returns (FindGroupChatsResponse) {
741
+ option (google.api.http) = {
742
+ get: "/v1/spaces:findGroupChats"
743
+ };
744
+ }
745
+
720
746
  // Creates a membership for the calling Chat app, a user, or a Google Group.
721
747
  // Creating memberships for other Chat apps isn't supported.
722
748
  // When creating a membership, if the specified member has their auto-accept
@@ -1,4 +1,4 @@
1
- // Copyright 2025 Google LLC
1
+ // Copyright 2026 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 2025 Google LLC
1
+ // Copyright 2026 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 2025 Google LLC
1
+ // Copyright 2026 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 2025 Google LLC
1
+ // Copyright 2026 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 2025 Google LLC
1
+ // Copyright 2026 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 2025 Google LLC
1
+ // Copyright 2026 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 2025 Google LLC
1
+ // Copyright 2026 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.
@@ -204,6 +204,10 @@ message Message {
204
204
  // `false`.
205
205
  bool thread_reply = 25 [(google.api.field_behavior) = OUTPUT_ONLY];
206
206
 
207
+ // Output only. Whether this is a silent message. Silent messages are messages
208
+ // where Chat suppresses push notifications for recipients.
209
+ bool silent = 46 [(google.api.field_behavior) = OUTPUT_ONLY];
210
+
207
211
  // Optional. A custom ID for the message. You can use field to identify a
208
212
  // message, or to get, delete, or update a message. To set a custom ID,
209
213
  // specify the
@@ -277,10 +281,6 @@ message AttachedGif {
277
281
 
278
282
  // Information about a message that another message quotes.
279
283
  //
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
284
  // When you update a message, you can't add or replace the
285
285
  // `quotedMessageMetadata` field, but you can remove it.
286
286
  //
@@ -297,16 +297,21 @@ message QuotedMessageMetadata {
297
297
  // Reserved. This value is unused.
298
298
  QUOTE_TYPE_UNSPECIFIED = 0;
299
299
 
300
- // If quote_type is `REPLY`, you can do the following:
300
+ // When `quote_type` is `REPLY`, you can do the following:
301
301
  //
302
302
  // * If you're replying in a thread, you can quote another message in that
303
303
  // thread.
304
304
  //
305
305
  // * If you're creating a root message, you can quote another root message
306
306
  // in that space.
307
- //
308
- // You can't quote a message reply from a different thread.
309
307
  REPLY = 1;
308
+
309
+ // When `quote_type` is `FORWARD`, you can quote a:
310
+ //
311
+ // * Message from a different space.
312
+ //
313
+ // * Message reply from a different thread in the same space.
314
+ FORWARD = 2;
310
315
  }
311
316
 
312
317
  // Required. Resource name of the message that is quoted.
@@ -646,6 +651,43 @@ message CreateMessageRequest {
646
651
  // For details, see [Name a
647
652
  // message](https://developers.google.com/workspace/chat/create-messages#name_a_created_message).
648
653
  string message_id = 9 [(google.api.field_behavior) = OPTIONAL];
654
+
655
+ // Optional. Controls the notification behavior when the message is posted.
656
+ // To learn more, see [Force notifications or send silent
657
+ // messages](https://developer.google.com/workspace/chat/create-messages#force-notify-silent).
658
+ CreateMessageNotificationOptions create_message_notification_options = 10
659
+ [(google.api.field_behavior) = OPTIONAL];
660
+ }
661
+
662
+ // Options for the notification behavior when the message is posted.
663
+ message CreateMessageNotificationOptions {
664
+ // The notification types options for the message.
665
+ enum NotificationType {
666
+ // Default behavior. Notification behavior is similar to when the human user
667
+ // sends the message using the Chat UI: no notification is sent to the
668
+ // human sender.
669
+ NOTIFICATION_TYPE_NONE = 0;
670
+
671
+ // Force notify recipients. This bypasses users' space notification settings
672
+ // and [Chat Do Not Disturb
673
+ // settings](https://support.google.com/chat/answer/9093489). This option
674
+ // does not bypass device-level Do Not Disturb settings.
675
+ //
676
+ // Requires [app authentication]
677
+ // (https://developers.google.com/workspace/chat/authenticate-authorize-chat-app).
678
+ NOTIFICATION_TYPE_FORCE_NOTIFY = 2;
679
+
680
+ // Silence the notification as if the recipients have [Chat Do Not
681
+ // Disturb](https://support.google.com/chat/answer/9093489) enabled or
682
+ // have muted the space.
683
+ //
684
+ // Requires [app authentication]
685
+ // (https://developers.google.com/workspace/chat/authenticate-authorize-chat-app).
686
+ NOTIFICATION_TYPE_SILENT = 3;
687
+ }
688
+
689
+ // The notification type for the message.
690
+ NotificationType notification_type = 1;
649
691
  }
650
692
 
651
693
  // Lists messages in the specified space, that the user is a member of.
@@ -1,4 +1,4 @@
1
- // Copyright 2025 Google LLC
1
+ // Copyright 2026 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 2025 Google LLC
1
+ // Copyright 2026 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 2025 Google LLC
1
+ // Copyright 2026 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.
@@ -552,6 +552,65 @@ message FindDirectMessageRequest {
552
552
  string name = 1 [(google.api.field_behavior) = REQUIRED];
553
553
  }
554
554
 
555
+ // A request to get group chat spaces based on user resources.
556
+ message FindGroupChatsRequest {
557
+ // Optional. Resource names of all human users in group chat with the calling
558
+ // user. Chat apps can't be included in the request.
559
+ //
560
+ // The maximum number of users that can be specified in a single request is
561
+ // `49`.
562
+ //
563
+ // Format: `users/{user}`, where `{user}` is either the `id` for the
564
+ // [person](https://developers.google.com/people/api/rest/v1/people) from the
565
+ // People API, or the `id` for the
566
+ // [user](https://developers.google.com/admin-sdk/directory/reference/rest/v1/users)
567
+ // in the Directory API. For example, to find all group chats with the calling
568
+ // user and two other users, with People API profile IDs `123456789` and
569
+ // `987654321`, you can use `users/123456789` and `users/987654321`.
570
+ // You can also use the email as an alias for `{user}`. For example,
571
+ // `users/example@gmail.com` where `example@gmail.com` is the email of the
572
+ // Google Chat user.
573
+ repeated string users = 5 [(google.api.field_behavior) = OPTIONAL];
574
+
575
+ // Optional. The maximum number of spaces to return. The service might return
576
+ // fewer than this value.
577
+ //
578
+ // If unspecified, at most 10 spaces are returned.
579
+ //
580
+ // The maximum value is 30. If you use a value more than 30, it's
581
+ // automatically changed to 30.
582
+ //
583
+ // Negative values return an `INVALID_ARGUMENT` error.
584
+ int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL];
585
+
586
+ // Optional. A page token, received from a previous call to find group chats.
587
+ // Provide this parameter to retrieve the subsequent page.
588
+ //
589
+ // When paginating, all other parameters provided should match the call that
590
+ // provided the token. Passing different values may lead to unexpected
591
+ // results.
592
+ string page_token = 3 [(google.api.field_behavior) = OPTIONAL];
593
+
594
+ // Requested space view type. If unset, defaults to
595
+ // `SPACE_VIEW_RESOURCE_NAME_ONLY`. Requests that specify
596
+ // `SPACE_VIEW_EXPANDED` must include scopes that allow reading space data,
597
+ // for example,
598
+ // https://www.googleapis.com/auth/chat.spaces or
599
+ // https://www.googleapis.com/auth/chat.spaces.readonly.
600
+ SpaceView space_view = 4;
601
+ }
602
+
603
+ // A response containing group chat spaces with exactly the calling user and the
604
+ // requested users.
605
+ message FindGroupChatsResponse {
606
+ // List of spaces in the requested (or first) page.
607
+ repeated Space spaces = 1;
608
+
609
+ // A token that you can send as `pageToken` to retrieve the next page of
610
+ // results. If empty, there are no subsequent pages.
611
+ string next_page_token = 2;
612
+ }
613
+
555
614
  // A request to update a single space.
556
615
  message UpdateSpaceRequest {
557
616
  // Required. Space with fields to be updated. `Space.name` must be
@@ -822,3 +881,24 @@ message CompleteImportSpaceResponse {
822
881
  // The import mode space.
823
882
  Space space = 1;
824
883
  }
884
+
885
+ // A view that specifies which fields should be populated on the
886
+ // [`Space`](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces)
887
+ // resource.
888
+ // To ensure compatibility with future releases, we recommend that your code
889
+ // account for additional values.
890
+ enum SpaceView {
891
+ // The default / unset value.
892
+ SPACE_VIEW_UNSPECIFIED = 0;
893
+
894
+ // Populates only the Space resource name.
895
+ SPACE_VIEW_RESOURCE_NAME_ONLY = 3;
896
+
897
+ // Populates Space resource fields. Note: the `permissionSettings` field
898
+ // will not be populated.
899
+ // Requests that specify SPACE_VIEW_EXPANDED must include scopes that allow
900
+ // reading space data, for example,
901
+ // https://www.googleapis.com/auth/chat.spaces or
902
+ // https://www.googleapis.com/auth/chat.spaces.readonly.
903
+ SPACE_VIEW_EXPANDED = 4;
904
+ }
@@ -1,4 +1,4 @@
1
- // Copyright 2025 Google LLC
1
+ // Copyright 2026 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 2025 Google LLC
1
+ // Copyright 2026 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 2025 Google LLC
1
+ // Copyright 2026 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 2025 Google LLC
1
+ // Copyright 2026 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 2025 Google LLC
1
+ // Copyright 2026 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 2025 Google LLC
1
+ // Copyright 2026 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 2025 Google LLC
1
+ // Copyright 2026 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.