@google-apps/chat 0.6.0 → 0.8.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.8.0](https://github.com/googleapis/google-cloud-node/compare/chat-v0.7.0...chat-v0.8.0) (2024-09-10)
4
+
5
+
6
+ ### Features
7
+
8
+ * [chat] Add CHAT_SPACE link type support for GA launch ([#5659](https://github.com/googleapis/google-cloud-node/issues/5659)) ([b61a65d](https://github.com/googleapis/google-cloud-node/commit/b61a65d30dde04c2ff85d233ddbc1c79ff7a5736))
9
+
10
+ ## [0.7.0](https://github.com/googleapis/google-cloud-node/compare/chat-v0.6.0...chat-v0.7.0) (2024-07-22)
11
+
12
+
13
+ ### Features
14
+
15
+ * [chat] add GetSpaceEvent and ListSpaceEvents APIs ([#5546](https://github.com/googleapis/google-cloud-node/issues/5546)) ([40e0811](https://github.com/googleapis/google-cloud-node/commit/40e0811598fbf2c92eee5875b2ab2c3e2be18064))
16
+
3
17
  ## [0.6.0](https://github.com/googleapis/google-cloud-node/compare/chat-v0.5.0...chat-v0.6.0) (2024-07-10)
4
18
 
5
19
 
package/README.md CHANGED
@@ -140,11 +140,13 @@ 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_event | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-chat/samples/generated/v1/chat_service.get_space_event.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_event.js,packages/google-chat/samples/README.md) |
143
144
  | 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
145
  | 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) |
145
146
  | 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) |
146
147
  | 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) |
147
148
  | 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) |
149
+ | Chat_service.list_space_events | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-chat/samples/generated/v1/chat_service.list_space_events.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_space_events.js,packages/google-chat/samples/README.md) |
148
150
  | Chat_service.list_spaces | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-chat/samples/generated/v1/chat_service.list_spaces.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_spaces.js,packages/google-chat/samples/README.md) |
149
151
  | Chat_service.set_up_space | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-chat/samples/generated/v1/chat_service.set_up_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.set_up_space.js,packages/google-chat/samples/README.md) |
150
152
  | 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) |
@@ -139,6 +139,9 @@ message RichLinkMetadata {
139
139
 
140
140
  // A Google Drive rich link type.
141
141
  DRIVE_FILE = 1;
142
+
143
+ // A Chat space rich link type. For example, a space smart chip.
144
+ CHAT_SPACE = 2;
142
145
  }
143
146
 
144
147
  // The URI of this link.
@@ -151,6 +154,9 @@ message RichLinkMetadata {
151
154
  oneof data {
152
155
  // Data for a drive link.
153
156
  DriveLinkData drive_link_data = 3;
157
+
158
+ // Data for a chat space link.
159
+ ChatSpaceLinkData chat_space_link_data = 4;
154
160
  }
155
161
  }
156
162
 
@@ -165,6 +171,29 @@ message DriveLinkData {
165
171
  string mime_type = 2;
166
172
  }
167
173
 
174
+ // Data for Chat space links.
175
+ message ChatSpaceLinkData {
176
+ // The space of the linked Chat space resource.
177
+ //
178
+ // Format: `spaces/{space}`
179
+ string space = 1
180
+ [(google.api.resource_reference) = { type: "chat.googleapis.com/Space" }];
181
+
182
+ // The thread of the linked Chat space resource.
183
+ //
184
+ // Format: `spaces/{space}/threads/{thread}`
185
+ string thread = 2 [
186
+ (google.api.resource_reference) = { type: "chat.googleapis.com/Thread" }
187
+ ];
188
+
189
+ // The message of the linked Chat space resource.
190
+ //
191
+ // Format: `spaces/{space}/messages/{message}`
192
+ string message = 3 [
193
+ (google.api.resource_reference) = { type: "chat.googleapis.com/Message" }
194
+ ];
195
+ }
196
+
168
197
  // Type of the annotation.
169
198
  enum AnnotationType {
170
199
  // Default value for the enum. Don't use.
@@ -23,6 +23,7 @@ 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_event.proto";
26
27
  import "google/chat/v1/space_read_state.proto";
27
28
  import "google/chat/v1/space_setup.proto";
28
29
  import "google/chat/v1/thread_read_state.proto";
@@ -584,4 +585,47 @@ service ChatService {
584
585
  };
585
586
  option (google.api.method_signature) = "name";
586
587
  }
588
+
589
+ // Returns an event from a Google Chat space. The [event
590
+ // payload](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.spaceEvents#SpaceEvent.FIELDS.oneof_payload)
591
+ // contains the most recent version of the resource that changed. For example,
592
+ // if you request an event about a new message but the message was later
593
+ // updated, the server returns the updated `Message` resource in the event
594
+ // payload.
595
+ //
596
+ // Requires [user
597
+ // authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
598
+ // To get an event, the authenticated user must be a member of the space.
599
+ //
600
+ // For an example, see [Get details about an
601
+ // event from a Google Chat
602
+ // space](https://developers.google.com/workspace/chat/get-space-event).
603
+ rpc GetSpaceEvent(GetSpaceEventRequest) returns (SpaceEvent) {
604
+ option (google.api.http) = {
605
+ get: "/v1/{name=spaces/*/spaceEvents/*}"
606
+ };
607
+ option (google.api.method_signature) = "name";
608
+ }
609
+
610
+ // Lists events from a Google Chat space. For each event, the
611
+ // [payload](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.spaceEvents#SpaceEvent.FIELDS.oneof_payload)
612
+ // contains the most recent version of the Chat resource. For example, if you
613
+ // list events about new space members, the server returns `Membership`
614
+ // resources that contain the latest membership details. If new members were
615
+ // removed during the requested period, the event payload contains an empty
616
+ // `Membership` resource.
617
+ //
618
+ // Requires [user
619
+ // authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
620
+ // To list events, the authenticated user must be a member of the space.
621
+ //
622
+ // For an example, see [List events from a Google Chat
623
+ // space](https://developers.google.com/workspace/chat/list-space-events).
624
+ rpc ListSpaceEvents(ListSpaceEventsRequest)
625
+ returns (ListSpaceEventsResponse) {
626
+ option (google.api.http) = {
627
+ get: "/v1/{parent=spaces/*}/spaceEvents"
628
+ };
629
+ option (google.api.method_signature) = "parent,filter";
630
+ }
587
631
  }
@@ -0,0 +1,177 @@
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/chat/v1/membership.proto";
21
+ import "google/chat/v1/message.proto";
22
+ import "google/chat/v1/reaction.proto";
23
+ import "google/chat/v1/space.proto";
24
+
25
+ option csharp_namespace = "Google.Apps.Chat.V1";
26
+ option go_package = "cloud.google.com/go/chat/apiv1/chatpb;chatpb";
27
+ option java_multiple_files = true;
28
+ option java_outer_classname = "EventPayloadProto";
29
+ option java_package = "com.google.chat.v1";
30
+ option objc_class_prefix = "DYNAPIProto";
31
+ option php_namespace = "Google\\Apps\\Chat\\V1";
32
+ option ruby_package = "Google::Apps::Chat::V1";
33
+
34
+ // Event payload for a new membership.
35
+ //
36
+ // Event type: `google.workspace.chat.membership.v1.created`.
37
+ message MembershipCreatedEventData {
38
+ // The new membership.
39
+ Membership membership = 1;
40
+ }
41
+
42
+ // Event payload for a deleted membership.
43
+ //
44
+ // Event type: `google.workspace.chat.membership.v1.deleted`
45
+ message MembershipDeletedEventData {
46
+ // The deleted membership. Only the `name` and `state` fields are populated.
47
+ Membership membership = 1;
48
+ }
49
+
50
+ // Event payload for an updated membership.
51
+ //
52
+ // Event type: `google.workspace.chat.membership.v1.updated`
53
+ message MembershipUpdatedEventData {
54
+ // The updated membership.
55
+ Membership membership = 1;
56
+ }
57
+
58
+ // Event payload for multiple new memberships.
59
+ //
60
+ // Event type: `google.workspace.chat.membership.v1.batchCreated`
61
+ message MembershipBatchCreatedEventData {
62
+ // A list of new memberships.
63
+ repeated MembershipCreatedEventData memberships = 1;
64
+ }
65
+
66
+ // Event payload for multiple updated memberships.
67
+ //
68
+ // Event type: `google.workspace.chat.membership.v1.batchUpdated`
69
+ message MembershipBatchUpdatedEventData {
70
+ // A list of updated memberships.
71
+ repeated MembershipUpdatedEventData memberships = 1;
72
+ }
73
+
74
+ // Event payload for multiple deleted memberships.
75
+ //
76
+ // Event type: `google.workspace.chat.membership.v1.batchDeleted`
77
+ message MembershipBatchDeletedEventData {
78
+ // A list of deleted memberships.
79
+ repeated MembershipDeletedEventData memberships = 1;
80
+ }
81
+
82
+ // Event payload for a new message.
83
+ //
84
+ // Event type: `google.workspace.chat.message.v1.created`
85
+ message MessageCreatedEventData {
86
+ // The new message.
87
+ Message message = 1;
88
+ }
89
+
90
+ // Event payload for an updated message.
91
+ //
92
+ // Event type: `google.workspace.chat.message.v1.updated`
93
+ message MessageUpdatedEventData {
94
+ // The updated message.
95
+ Message message = 1;
96
+ }
97
+
98
+ // Event payload for a deleted message.
99
+ //
100
+ // Event type: `google.workspace.chat.message.v1.deleted`
101
+ message MessageDeletedEventData {
102
+ // The deleted message. Only the `name`, `createTime`, `deleteTime`, and
103
+ // `deletionMetadata` fields are populated.
104
+ Message message = 1;
105
+ }
106
+
107
+ // Event payload for multiple new messages.
108
+ //
109
+ // Event type: `google.workspace.chat.message.v1.batchCreated`
110
+ message MessageBatchCreatedEventData {
111
+ // A list of new messages.
112
+ repeated MessageCreatedEventData messages = 1;
113
+ }
114
+
115
+ // Event payload for multiple updated messages.
116
+ //
117
+ // Event type: `google.workspace.chat.message.v1.batchUpdated`
118
+ message MessageBatchUpdatedEventData {
119
+ // A list of updated messages.
120
+ repeated MessageUpdatedEventData messages = 1;
121
+ }
122
+
123
+ // Event payload for multiple deleted messages.
124
+ //
125
+ // Event type: `google.workspace.chat.message.v1.batchDeleted`
126
+ message MessageBatchDeletedEventData {
127
+ // A list of deleted messages.
128
+ repeated MessageDeletedEventData messages = 1;
129
+ }
130
+
131
+ // Event payload for an updated space.
132
+ //
133
+ // Event type: `google.workspace.chat.space.v1.updated`
134
+ message SpaceUpdatedEventData {
135
+ // The updated space.
136
+ Space space = 1;
137
+ }
138
+
139
+ // Event payload for multiple updates to a space.
140
+ //
141
+ // Event type: `google.workspace.chat.space.v1.batchUpdated`
142
+ message SpaceBatchUpdatedEventData {
143
+ // A list of updated spaces.
144
+ repeated SpaceUpdatedEventData spaces = 1;
145
+ }
146
+
147
+ // Event payload for a new reaction.
148
+ //
149
+ // Event type: `google.workspace.chat.reaction.v1.created`
150
+ message ReactionCreatedEventData {
151
+ // The new reaction.
152
+ Reaction reaction = 1;
153
+ }
154
+
155
+ // Event payload for a deleted reaction.
156
+ //
157
+ // Type: `google.workspace.chat.reaction.v1.deleted`
158
+ message ReactionDeletedEventData {
159
+ // The deleted reaction.
160
+ Reaction reaction = 1;
161
+ }
162
+
163
+ // Event payload for multiple new reactions.
164
+ //
165
+ // Event type: `google.workspace.chat.reaction.v1.batchCreated`
166
+ message ReactionBatchCreatedEventData {
167
+ // A list of new reactions.
168
+ repeated ReactionCreatedEventData reactions = 1;
169
+ }
170
+
171
+ // Event payload for multiple deleted reactions.
172
+ //
173
+ // Event type: `google.workspace.chat.reaction.v1.batchDeleted`
174
+ message ReactionBatchDeletedEventData {
175
+ // A list of deleted reactions.
176
+ repeated ReactionDeletedEventData reactions = 1;
177
+ }
@@ -0,0 +1,292 @@
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/chat/v1/event_payload.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 = "SpaceEventProto";
28
+ option java_package = "com.google.chat.v1";
29
+ option php_namespace = "Google\\Apps\\Chat\\V1";
30
+ option ruby_package = "Google::Apps::Chat::V1";
31
+
32
+ // An event that represents a change or activity in a Google Chat space. To
33
+ // learn more, see [Work with events from Google
34
+ // Chat](https://developers.google.com/workspace/chat/events-overview).
35
+ message SpaceEvent {
36
+ option (google.api.resource) = {
37
+ type: "chat.googleapis.com/SpaceEvent"
38
+ pattern: "spaces/{space}/spaceEvents/{space_event}"
39
+ };
40
+
41
+ // Resource name of the space event.
42
+ //
43
+ // Format: `spaces/{space}/spaceEvents/{spaceEvent}`
44
+ string name = 1;
45
+
46
+ // Time when the event occurred.
47
+ google.protobuf.Timestamp event_time = 3;
48
+
49
+ // Type of space event. Each event type has a batch version, which
50
+ // represents multiple instances of the event type that occur in a short
51
+ // period of time. For `spaceEvents.list()` requests, omit batch event types
52
+ // in your query filter. By default, the server returns both event type and
53
+ // its batch version.
54
+ //
55
+ // Supported event types for
56
+ // [messages](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages):
57
+ //
58
+ // * New message: `google.workspace.chat.message.v1.created`
59
+ // * Updated message: `google.workspace.chat.message.v1.updated`
60
+ // * Deleted message: `google.workspace.chat.message.v1.deleted`
61
+ // * Multiple new messages: `google.workspace.chat.message.v1.batchCreated`
62
+ // * Multiple updated messages:
63
+ // `google.workspace.chat.message.v1.batchUpdated`
64
+ // * Multiple deleted messages:
65
+ // `google.workspace.chat.message.v1.batchDeleted`
66
+ //
67
+ // Supported event types for
68
+ // [memberships](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.members):
69
+ //
70
+ // * New membership: `google.workspace.chat.membership.v1.created`
71
+ // * Updated membership: `google.workspace.chat.membership.v1.updated`
72
+ // * Deleted membership: `google.workspace.chat.membership.v1.deleted`
73
+ // * Multiple new memberships:
74
+ // `google.workspace.chat.membership.v1.batchCreated`
75
+ // * Multiple updated memberships:
76
+ // `google.workspace.chat.membership.v1.batchUpdated`
77
+ // * Multiple deleted memberships:
78
+ // `google.workspace.chat.membership.v1.batchDeleted`
79
+ //
80
+ // Supported event types for
81
+ // [reactions](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages.reactions):
82
+ //
83
+ // * New reaction: `google.workspace.chat.reaction.v1.created`
84
+ // * Deleted reaction: `google.workspace.chat.reaction.v1.deleted`
85
+ // * Multiple new reactions:
86
+ // `google.workspace.chat.reaction.v1.batchCreated`
87
+ // * Multiple deleted reactions:
88
+ // `google.workspace.chat.reaction.v1.batchDeleted`
89
+ //
90
+ // Supported event types about the
91
+ // [space](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces):
92
+ //
93
+ // * Updated space: `google.workspace.chat.space.v1.updated`
94
+ // * Multiple space updates: `google.workspace.chat.space.v1.batchUpdated`
95
+ string event_type = 6;
96
+
97
+ oneof payload {
98
+ // Event payload for a new message.
99
+ //
100
+ // Event type: `google.workspace.chat.message.v1.created`
101
+ MessageCreatedEventData message_created_event_data = 12;
102
+
103
+ // Event payload for an updated message.
104
+ //
105
+ // Event type: `google.workspace.chat.message.v1.updated`
106
+ MessageUpdatedEventData message_updated_event_data = 13;
107
+
108
+ // Event payload for a deleted message.
109
+ //
110
+ // Event type: `google.workspace.chat.message.v1.deleted`
111
+ MessageDeletedEventData message_deleted_event_data = 14;
112
+
113
+ // Event payload for multiple new messages.
114
+ //
115
+ // Event type: `google.workspace.chat.message.v1.batchCreated`
116
+ MessageBatchCreatedEventData message_batch_created_event_data = 26;
117
+
118
+ // Event payload for multiple updated messages.
119
+ //
120
+ // Event type: `google.workspace.chat.message.v1.batchUpdated`
121
+ MessageBatchUpdatedEventData message_batch_updated_event_data = 27;
122
+
123
+ // Event payload for multiple deleted messages.
124
+ //
125
+ // Event type: `google.workspace.chat.message.v1.batchDeleted`
126
+ MessageBatchDeletedEventData message_batch_deleted_event_data = 28;
127
+
128
+ // Event payload for a space update.
129
+ //
130
+ // Event type: `google.workspace.chat.space.v1.updated`
131
+ SpaceUpdatedEventData space_updated_event_data = 15;
132
+
133
+ // Event payload for multiple updates to a space.
134
+ //
135
+ // Event type: `google.workspace.chat.space.v1.batchUpdated`
136
+ SpaceBatchUpdatedEventData space_batch_updated_event_data = 29;
137
+
138
+ // Event payload for a new membership.
139
+ //
140
+ // Event type: `google.workspace.chat.membership.v1.created`
141
+ MembershipCreatedEventData membership_created_event_data = 17;
142
+
143
+ // Event payload for an updated membership.
144
+ //
145
+ // Event type: `google.workspace.chat.membership.v1.updated`
146
+ MembershipUpdatedEventData membership_updated_event_data = 18;
147
+
148
+ // Event payload for a deleted membership.
149
+ //
150
+ // Event type: `google.workspace.chat.membership.v1.deleted`
151
+ MembershipDeletedEventData membership_deleted_event_data = 219;
152
+
153
+ // Event payload for multiple new memberships.
154
+ //
155
+ // Event type: `google.workspace.chat.membership.v1.batchCreated`
156
+ MembershipBatchCreatedEventData membership_batch_created_event_data = 31;
157
+
158
+ // Event payload for multiple updated memberships.
159
+ //
160
+ // Event type: `google.workspace.chat.membership.v1.batchUpdated`
161
+ MembershipBatchUpdatedEventData membership_batch_updated_event_data = 32;
162
+
163
+ // Event payload for multiple deleted memberships.
164
+ //
165
+ // Event type: `google.workspace.chat.membership.v1.batchDeleted`
166
+ MembershipBatchDeletedEventData membership_batch_deleted_event_data = 33;
167
+
168
+ // Event payload for a new reaction.
169
+ //
170
+ // Event type: `google.workspace.chat.reaction.v1.created`
171
+ ReactionCreatedEventData reaction_created_event_data = 21;
172
+
173
+ // Event payload for a deleted reaction.
174
+ //
175
+ // Event type: `google.workspace.chat.reaction.v1.deleted`
176
+ ReactionDeletedEventData reaction_deleted_event_data = 22;
177
+
178
+ // Event payload for multiple new reactions.
179
+ //
180
+ // Event type: `google.workspace.chat.reaction.v1.batchCreated`
181
+ ReactionBatchCreatedEventData reaction_batch_created_event_data = 34;
182
+
183
+ // Event payload for multiple deleted reactions.
184
+ //
185
+ // Event type: `google.workspace.chat.reaction.v1.batchDeleted`
186
+ ReactionBatchDeletedEventData reaction_batch_deleted_event_data = 35;
187
+ }
188
+ }
189
+
190
+ // Request message for getting a space event.
191
+ message GetSpaceEventRequest {
192
+ // Required. The resource name of the space event.
193
+ //
194
+ // Format: `spaces/{space}/spaceEvents/{spaceEvent}`
195
+ string name = 1 [
196
+ (google.api.field_behavior) = REQUIRED,
197
+ (google.api.resource_reference) = { type: "chat.googleapis.com/SpaceEvent" }
198
+ ];
199
+ }
200
+
201
+ // Request message for listing space events.
202
+ message ListSpaceEventsRequest {
203
+ // Required. Resource name of the [Google Chat
204
+ // space](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces)
205
+ // where the events occurred.
206
+ //
207
+ // Format: `spaces/{space}`.
208
+ string parent = 1 [
209
+ (google.api.field_behavior) = REQUIRED,
210
+ (google.api.resource_reference) = {
211
+ child_type: "chat.googleapis.com/SpaceEvent"
212
+ }
213
+ ];
214
+
215
+ // Optional. The maximum number of space events returned. The service might
216
+ // return fewer than this value.
217
+ //
218
+ // Negative values return an `INVALID_ARGUMENT` error.
219
+ int32 page_size = 5;
220
+
221
+ // A page token, received from a previous list space events call. Provide this
222
+ // to retrieve the subsequent page.
223
+ //
224
+ // When paginating, all other parameters provided to list space events must
225
+ // match the call that provided the page token. Passing different values to
226
+ // the other parameters might lead to unexpected results.
227
+ string page_token = 6;
228
+
229
+ // Required. A query filter.
230
+ //
231
+ // You must specify at least one event type (`event_type`)
232
+ // using the has `:` operator. To filter by multiple event types, use the `OR`
233
+ // operator. Omit batch event types in your filter. The request automatically
234
+ // returns any related batch events. For example, if you filter by new
235
+ // reactions
236
+ // (`google.workspace.chat.reaction.v1.created`), the server also returns
237
+ // batch new reactions events
238
+ // (`google.workspace.chat.reaction.v1.batchCreated`). For a list of supported
239
+ // event types, see the [`SpaceEvents` reference
240
+ // documentation](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.spaceEvents#SpaceEvent.FIELDS.event_type).
241
+ //
242
+ // Optionally, you can also filter by start time (`start_time`) and
243
+ // end time (`end_time`):
244
+ //
245
+ // * `start_time`: Exclusive timestamp from which to start listing space
246
+ // events.
247
+ // You can list events that occurred up to 28 days ago. If unspecified, lists
248
+ // space events from the past 28 days.
249
+ // * `end_time`: Inclusive timestamp until which space events are listed.
250
+ // If unspecified, lists events up to the time of the request.
251
+ //
252
+ // To specify a start or end time, use the equals `=` operator and format in
253
+ // [RFC-3339](https://www.rfc-editor.org/rfc/rfc3339). To filter by both
254
+ // `start_time` and `end_time`, use the `AND` operator.
255
+ //
256
+ // For example, the following queries are valid:
257
+ //
258
+ // ```
259
+ // start_time="2023-08-23T19:20:33+00:00" AND
260
+ // end_time="2023-08-23T19:21:54+00:00"
261
+ // ```
262
+ // ```
263
+ // start_time="2023-08-23T19:20:33+00:00" AND
264
+ // (event_types:"google.workspace.chat.space.v1.updated" OR
265
+ // event_types:"google.workspace.chat.message.v1.created")
266
+ // ```
267
+ //
268
+ // The following queries are invalid:
269
+ //
270
+ // ```
271
+ // start_time="2023-08-23T19:20:33+00:00" OR
272
+ // end_time="2023-08-23T19:21:54+00:00"
273
+ // ```
274
+ // ```
275
+ // event_types:"google.workspace.chat.space.v1.updated" AND
276
+ // event_types:"google.workspace.chat.message.v1.created"
277
+ // ```
278
+ //
279
+ // Invalid queries are rejected by the server with an `INVALID_ARGUMENT`
280
+ // error.
281
+ string filter = 8 [(google.api.field_behavior) = REQUIRED];
282
+ }
283
+
284
+ // Response message for listing space events.
285
+ message ListSpaceEventsResponse {
286
+ // Results are returned in chronological order (oldest event first).
287
+ repeated SpaceEvent space_events = 1;
288
+
289
+ // Continuation token used to fetch more events.
290
+ // If this field is omitted, there are no subsequent pages.
291
+ string next_page_token = 2;
292
+ }