@google-apps/chat 0.24.0 → 0.26.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/README.md +2 -3
- package/build/protos/google/chat/v1/audience.proto +48 -0
- package/build/protos/google/chat/v1/availability.proto +232 -0
- package/build/protos/google/chat/v1/chat_service.proto +105 -0
- package/build/protos/google/chat/v1/message.proto +8 -7
- package/build/protos/google/chat/v1/space.proto +55 -0
- package/build/protos/protos.d.ts +2133 -141
- package/build/protos/protos.js +1 -75666
- package/build/protos/protos.json +565 -25
- package/build/src/index.js +1 -1
- package/build/src/v1/chat_service_client.d.ts +1260 -1009
- package/build/src/v1/chat_service_client.js +912 -300
- package/build/src/v1/chat_service_client.js.map +1 -1
- package/build/src/v1/chat_service_client_config.json +25 -0
- package/build/src/v1/chat_service_proto_list.json +2 -0
- package/build/src/v1/gapic_metadata.json +50 -0
- package/build/src/v1/index.js.map +1 -1
- package/package.json +3 -6
- package/LICENSE +0 -202
package/README.md
CHANGED
|
@@ -100,7 +100,6 @@ Samples are in the [`samples/`][homepage_samples] directory. Each sample's `READ
|
|
|
100
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) |
|
|
101
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) |
|
|
102
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) |
|
|
103
|
-
| chat | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-chat/samples/generated/v1/snippet_metadata_google.chat.v1.json) |
|
|
104
103
|
|
|
105
104
|
|
|
106
105
|
## Supported Node.js Versions
|
|
@@ -134,7 +133,7 @@ More Information: [Google Cloud Platform Launch Stages][launch_stages]
|
|
|
134
133
|
|
|
135
134
|
## Contributing
|
|
136
135
|
|
|
137
|
-
Contributions welcome! See the [Contributing Guide](https://github.com/googleapis/google-cloud-node/blob/main/
|
|
136
|
+
Contributions welcome! See the [Contributing Guide](https://github.com/googleapis/google-cloud-node/blob/main/CONTRIBUTING.md).
|
|
138
137
|
|
|
139
138
|
Please note that this `README.md`
|
|
140
139
|
and a variety of configuration files in this repository (including `.nycrc` and `tsconfig.json`)
|
|
@@ -144,7 +143,7 @@ are generated from a central template.
|
|
|
144
143
|
|
|
145
144
|
Apache Version 2.0
|
|
146
145
|
|
|
147
|
-
See [LICENSE](https://github.com/googleapis/google-cloud-node/blob/main/
|
|
146
|
+
See [LICENSE](https://github.com/googleapis/google-cloud-node/blob/main/LICENSE)
|
|
148
147
|
|
|
149
148
|
[shell_img]: https://gstatic.com/cloudssh/images/open-btn.png
|
|
150
149
|
[projects]: https://console.cloud.google.com/project
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
// Copyright 2026 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
|
+
option csharp_namespace = "Google.Apps.Chat.V1";
|
|
20
|
+
option go_package = "cloud.google.com/go/chat/apiv1/chatpb;chatpb";
|
|
21
|
+
option java_multiple_files = true;
|
|
22
|
+
option java_outer_classname = "AudienceProto";
|
|
23
|
+
option java_package = "com.google.chat.v1";
|
|
24
|
+
option objc_class_prefix = "DYNAPIProto";
|
|
25
|
+
option php_namespace = "Google\\Apps\\Chat\\V1";
|
|
26
|
+
option ruby_package = "Google::Apps::Chat::V1";
|
|
27
|
+
|
|
28
|
+
// A target audience in Google Chat. A target audience represents a group of
|
|
29
|
+
// users within a Google Workspace organization, defined by an administrator.
|
|
30
|
+
// Target audiences are used to configure access and visibility settings for
|
|
31
|
+
// resources, such as making a space discoverable to a specific group of users.
|
|
32
|
+
//
|
|
33
|
+
// For more details, see [Target
|
|
34
|
+
// audiences](https://support.google.com/a/answer/9934697) and [Make a space
|
|
35
|
+
// discoverable to a target
|
|
36
|
+
// audience](https://developers.google.com/workspace/chat/space-target-audience).
|
|
37
|
+
message Audience {
|
|
38
|
+
// The resource name of the [target
|
|
39
|
+
// audience](https://support.google.com/a/answer/9934697) who can discover
|
|
40
|
+
// or join the space. For details, see [Make a space
|
|
41
|
+
// discoverable to a target
|
|
42
|
+
// audience](https://developers.google.com/workspace/chat/space-target-audience).
|
|
43
|
+
// Format: `audiences/{audience}`
|
|
44
|
+
//
|
|
45
|
+
// To use the default target audience for the Google Workspace organization,
|
|
46
|
+
// set to `audiences/default`.
|
|
47
|
+
string name = 1;
|
|
48
|
+
}
|
|
@@ -0,0 +1,232 @@
|
|
|
1
|
+
// Copyright 2026 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/reaction.proto";
|
|
22
|
+
import "google/protobuf/duration.proto";
|
|
23
|
+
import "google/protobuf/field_mask.proto";
|
|
24
|
+
import "google/protobuf/timestamp.proto";
|
|
25
|
+
|
|
26
|
+
option csharp_namespace = "Google.Apps.Chat.V1";
|
|
27
|
+
option go_package = "cloud.google.com/go/chat/apiv1/chatpb;chatpb";
|
|
28
|
+
option java_multiple_files = true;
|
|
29
|
+
option java_outer_classname = "AvailabilityProto";
|
|
30
|
+
option java_package = "com.google.chat.v1";
|
|
31
|
+
option objc_class_prefix = "DYNAPIProto";
|
|
32
|
+
option php_namespace = "Google\\Apps\\Chat\\V1";
|
|
33
|
+
option ruby_package = "Google::Apps::Chat::V1";
|
|
34
|
+
|
|
35
|
+
// Represents a user's current availability information in Google Chat,
|
|
36
|
+
// including their state (for example, Active, Away, Do Not Disturb) and any
|
|
37
|
+
// custom status.
|
|
38
|
+
message Availability {
|
|
39
|
+
option (google.api.resource) = {
|
|
40
|
+
type: "chat.googleapis.com/Availability"
|
|
41
|
+
pattern: "users/{user}/availability"
|
|
42
|
+
plural: "availabilities"
|
|
43
|
+
singular: "availability"
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
// Represents the current availability state of the user.
|
|
47
|
+
enum State {
|
|
48
|
+
// Default value. The state is unspecified.
|
|
49
|
+
STATE_UNSPECIFIED = 0;
|
|
50
|
+
|
|
51
|
+
// The user is currently active, based on recent activity.
|
|
52
|
+
ACTIVE = 1;
|
|
53
|
+
|
|
54
|
+
// The user is currently idle. This state indicates a period of inactivity
|
|
55
|
+
// after being ACTIVE, before potentially transitioning to AWAY.
|
|
56
|
+
IDLE = 2;
|
|
57
|
+
|
|
58
|
+
// The user is currently away. This can be either automatically set after
|
|
59
|
+
// a period of inactivity in ACTIVE or IDLE state, or it can be manually set
|
|
60
|
+
// by the user. When manually set via `MarkAsAway`, this state persists
|
|
61
|
+
// regardless of user activity.
|
|
62
|
+
AWAY = 3;
|
|
63
|
+
|
|
64
|
+
// The user is in Do Not Disturb state, which is manually set.
|
|
65
|
+
DO_NOT_DISTURB = 4;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
// Identifier. Resource name of the user's availability.
|
|
69
|
+
//
|
|
70
|
+
// Format: `users/{user}/availability`
|
|
71
|
+
//
|
|
72
|
+
// `{user}` is the id for the Person in the People API or Admin SDK directory
|
|
73
|
+
// API. For example, `users/123456789`.
|
|
74
|
+
//
|
|
75
|
+
// The user's email address or `me` can also be used as an alias to refer to
|
|
76
|
+
// the caller. For example, `users/user@example.com` or `users/me`.
|
|
77
|
+
string name = 1 [(google.api.field_behavior) = IDENTIFIER];
|
|
78
|
+
|
|
79
|
+
// Output only. The user's current availability state.
|
|
80
|
+
State state = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
|
|
81
|
+
|
|
82
|
+
// Additional metadata associated with the user's availability state.
|
|
83
|
+
oneof state_metadata {
|
|
84
|
+
// Output only. Metadata if the user state is set to DO_NOT_DISTURB.
|
|
85
|
+
DoNotDisturbMetadata do_not_disturb_metadata = 3
|
|
86
|
+
[(google.api.field_behavior) = OUTPUT_ONLY];
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
// Optional. The user's custom status.
|
|
90
|
+
CustomStatus custom_status = 4 [(google.api.field_behavior) = OPTIONAL];
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
// Represents a user's custom status in Google Chat.
|
|
94
|
+
// This includes a short text message with an optional emoji that a user sets to
|
|
95
|
+
// give more context about their availability.
|
|
96
|
+
message CustomStatus {
|
|
97
|
+
// Required. The text of the custom status. This will be a string with maximum
|
|
98
|
+
// length of 64.
|
|
99
|
+
string text = 1 [(google.api.field_behavior) = REQUIRED];
|
|
100
|
+
|
|
101
|
+
// Required. The emoji of the custom status. Only Unicode emojis are
|
|
102
|
+
// supported; custom emojis are not supported.
|
|
103
|
+
Emoji emoji = 2 [(google.api.field_behavior) = REQUIRED];
|
|
104
|
+
|
|
105
|
+
// The expiration time of the custom status. It can be specified as either
|
|
106
|
+
// an absolute timestamp or a time-to-live duration.
|
|
107
|
+
oneof expiration {
|
|
108
|
+
// The timestamp when the custom status expires.
|
|
109
|
+
google.protobuf.Timestamp expire_time = 3;
|
|
110
|
+
|
|
111
|
+
// Input only. The time-to-live duration after which the custom status
|
|
112
|
+
// expires.
|
|
113
|
+
google.protobuf.Duration ttl = 4 [(google.api.field_behavior) = INPUT_ONLY];
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
// Metadata associated with the `DO_NOT_DISTURB` availability state,
|
|
118
|
+
// specifying when the state is set to expire.
|
|
119
|
+
message DoNotDisturbMetadata {
|
|
120
|
+
// Output only. Timestamp until which the user should be marked as
|
|
121
|
+
// DO_NOT_DISTURB. This can be maximum of 1 year in the future.
|
|
122
|
+
google.protobuf.Timestamp expiration_time = 1
|
|
123
|
+
[(google.api.field_behavior) = OUTPUT_ONLY];
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
// Request message for the `GetAvailability` method.
|
|
127
|
+
message GetAvailabilityRequest {
|
|
128
|
+
// Required. The resource name of the availability to retrieve.
|
|
129
|
+
//
|
|
130
|
+
// Format: users/{user}/availability
|
|
131
|
+
//
|
|
132
|
+
// `{user}` is the id for the Person in the People API or Admin SDK directory
|
|
133
|
+
// API. For example, `users/123456789`.
|
|
134
|
+
//
|
|
135
|
+
// The user's email address or `me` can also be used as an alias to refer to
|
|
136
|
+
// the caller. For example, `users/user@example.com` or `users/me`.
|
|
137
|
+
string name = 1 [
|
|
138
|
+
(google.api.field_behavior) = REQUIRED,
|
|
139
|
+
(google.api.resource_reference) = {
|
|
140
|
+
type: "chat.googleapis.com/Availability"
|
|
141
|
+
}
|
|
142
|
+
];
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
// Request message for the `UpdateAvailability` method.
|
|
146
|
+
message UpdateAvailabilityRequest {
|
|
147
|
+
// Required. The availability to update.
|
|
148
|
+
Availability availability = 1 [(google.api.field_behavior) = REQUIRED];
|
|
149
|
+
|
|
150
|
+
// Required. The list of fields to update.
|
|
151
|
+
// The only field that can be updated is `custom_status`.
|
|
152
|
+
google.protobuf.FieldMask update_mask = 2
|
|
153
|
+
[(google.api.field_behavior) = REQUIRED];
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
// Request message for the `MarkAsActive` method.
|
|
157
|
+
message MarkAsActiveRequest {
|
|
158
|
+
// Required. The resource name of the availability to mark as active.
|
|
159
|
+
// Format: users/{user}/availability
|
|
160
|
+
//
|
|
161
|
+
// `{user}` is the id for the Person in the People API or Admin SDK directory
|
|
162
|
+
// API. For example, `users/123456789`.
|
|
163
|
+
//
|
|
164
|
+
// The user's email address or `me` can also be used as an alias to refer to
|
|
165
|
+
// the caller. For example, `users/user@example.com` or `users/me`.
|
|
166
|
+
string name = 1 [
|
|
167
|
+
(google.api.field_behavior) = REQUIRED,
|
|
168
|
+
(google.api.resource_reference) = {
|
|
169
|
+
type: "chat.googleapis.com/Availability"
|
|
170
|
+
}
|
|
171
|
+
];
|
|
172
|
+
|
|
173
|
+
// The expiration for the ACTIVE availability state. The user will
|
|
174
|
+
// be marked as Away after expiration. If no expiration is provided, the
|
|
175
|
+
// ACTIVE state will expire 30 minutes from the current time.
|
|
176
|
+
oneof expiration {
|
|
177
|
+
// The absolute timestamp when the ACTIVE state expires.
|
|
178
|
+
google.protobuf.Timestamp expire_time = 2;
|
|
179
|
+
|
|
180
|
+
// The duration from the current time until the ACTIVE state expires.
|
|
181
|
+
// Using a short TTL can effectively reset the user's state to be based
|
|
182
|
+
// on activity after this brief duration.
|
|
183
|
+
google.protobuf.Duration ttl = 3;
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
// Request message for the `MarkAsAway` method.
|
|
188
|
+
message MarkAsAwayRequest {
|
|
189
|
+
// Required. The resource name of the availability to mark as away.
|
|
190
|
+
// Format: users/{user}/availability
|
|
191
|
+
//
|
|
192
|
+
// `{user}` is the id for the Person in the People API or Admin SDK directory
|
|
193
|
+
// API. For example, `users/123456789`.
|
|
194
|
+
//
|
|
195
|
+
// The user's email address or `me` can also be used as an alias to refer to
|
|
196
|
+
// the caller. For example, `users/user@example.com` or `users/me`.
|
|
197
|
+
string name = 1 [
|
|
198
|
+
(google.api.field_behavior) = REQUIRED,
|
|
199
|
+
(google.api.resource_reference) = {
|
|
200
|
+
type: "chat.googleapis.com/Availability"
|
|
201
|
+
}
|
|
202
|
+
];
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
// Request message for the `MarkAsDoNotDisturb` method.
|
|
206
|
+
message MarkAsDoNotDisturbRequest {
|
|
207
|
+
// Required. The resource name of the availability to mark as Do Not Disturb.
|
|
208
|
+
// Format: users/{user}/availability
|
|
209
|
+
//
|
|
210
|
+
// `{user}` is the id for the Person in the People API or Admin SDK directory
|
|
211
|
+
// API. For example, `users/123456789`.
|
|
212
|
+
//
|
|
213
|
+
// The user's email address or `me` can also be used as an alias to refer to
|
|
214
|
+
// the caller. For example, `users/user@example.com` or `users/me`.
|
|
215
|
+
string name = 1 [
|
|
216
|
+
(google.api.field_behavior) = REQUIRED,
|
|
217
|
+
(google.api.resource_reference) = {
|
|
218
|
+
type: "chat.googleapis.com/Availability"
|
|
219
|
+
}
|
|
220
|
+
];
|
|
221
|
+
|
|
222
|
+
// Required. The expiration for the DND availability state. The user will be
|
|
223
|
+
// marked as Away after expiration. This can be at most 1 year from the
|
|
224
|
+
// current time.
|
|
225
|
+
oneof expiration {
|
|
226
|
+
// The absolute timestamp when the DND state expires.
|
|
227
|
+
google.protobuf.Timestamp expire_time = 2;
|
|
228
|
+
|
|
229
|
+
// The duration from the current time until the DND state expires.
|
|
230
|
+
google.protobuf.Duration ttl = 3;
|
|
231
|
+
}
|
|
232
|
+
}
|
|
@@ -19,6 +19,7 @@ package google.chat.v1;
|
|
|
19
19
|
import "google/api/annotations.proto";
|
|
20
20
|
import "google/api/client.proto";
|
|
21
21
|
import "google/chat/v1/attachment.proto";
|
|
22
|
+
import "google/chat/v1/availability.proto";
|
|
22
23
|
import "google/chat/v1/membership.proto";
|
|
23
24
|
import "google/chat/v1/message.proto";
|
|
24
25
|
import "google/chat/v1/reaction.proto";
|
|
@@ -74,6 +75,8 @@ service ChatService {
|
|
|
74
75
|
"https://www.googleapis.com/auth/chat.spaces,"
|
|
75
76
|
"https://www.googleapis.com/auth/chat.spaces.create,"
|
|
76
77
|
"https://www.googleapis.com/auth/chat.spaces.readonly,"
|
|
78
|
+
"https://www.googleapis.com/auth/chat.users.availability,"
|
|
79
|
+
"https://www.googleapis.com/auth/chat.users.availability.readonly,"
|
|
77
80
|
"https://www.googleapis.com/auth/chat.users.readstate,"
|
|
78
81
|
"https://www.googleapis.com/auth/chat.users.readstate.readonly,"
|
|
79
82
|
"https://www.googleapis.com/auth/chat.users.sections,"
|
|
@@ -1083,6 +1086,108 @@ service ChatService {
|
|
|
1083
1086
|
option (google.api.method_signature) = "name";
|
|
1084
1087
|
}
|
|
1085
1088
|
|
|
1089
|
+
// Returns availability information for a human user in Google Chat. For
|
|
1090
|
+
// example, this can be used to check if a user is online or away, or to
|
|
1091
|
+
// retrieve their custom status message.
|
|
1092
|
+
//
|
|
1093
|
+
// This method only retrieves the authenticated user's availability.
|
|
1094
|
+
//
|
|
1095
|
+
// Requires [user
|
|
1096
|
+
// authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
|
|
1097
|
+
// with one of the following [authorization
|
|
1098
|
+
// scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
|
|
1099
|
+
//
|
|
1100
|
+
// - `https://www.googleapis.com/auth/chat.users.availability.readonly`
|
|
1101
|
+
// - `https://www.googleapis.com/auth/chat.users.availability`
|
|
1102
|
+
rpc GetAvailability(GetAvailabilityRequest) returns (Availability) {
|
|
1103
|
+
option (google.api.http) = {
|
|
1104
|
+
get: "/v1/{name=users/*/availability}"
|
|
1105
|
+
};
|
|
1106
|
+
option (google.api.method_signature) = "name";
|
|
1107
|
+
}
|
|
1108
|
+
|
|
1109
|
+
// Marks user as `ACTIVE` in Google Chat.
|
|
1110
|
+
//
|
|
1111
|
+
// Sets the user's availability state to `ACTIVE`. The `ACTIVE` state
|
|
1112
|
+
// lasts until the specified expiration, at which point the user's state
|
|
1113
|
+
// becomes `AWAY`. Note that if the user is actively using Chat, the `ACTIVE`
|
|
1114
|
+
// state duration may extend beyond the provided expiration.
|
|
1115
|
+
//
|
|
1116
|
+
// This method only updates the authenticated user's availability.
|
|
1117
|
+
//
|
|
1118
|
+
// Requires [user
|
|
1119
|
+
// authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
|
|
1120
|
+
// with [authorization
|
|
1121
|
+
// scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
|
|
1122
|
+
//
|
|
1123
|
+
// - `https://www.googleapis.com/auth/chat.users.availability`
|
|
1124
|
+
rpc MarkAsActive(MarkAsActiveRequest) returns (Availability) {
|
|
1125
|
+
option (google.api.http) = {
|
|
1126
|
+
post: "/v1/{name=users/*/availability}:markAsActive"
|
|
1127
|
+
body: "*"
|
|
1128
|
+
};
|
|
1129
|
+
}
|
|
1130
|
+
|
|
1131
|
+
// Marks user as `AWAY` in Google Chat.
|
|
1132
|
+
//
|
|
1133
|
+
// Sets the user's state to away and is not affected by the user's
|
|
1134
|
+
// activity.
|
|
1135
|
+
//
|
|
1136
|
+
// This method only updates the authenticated user's availability.
|
|
1137
|
+
//
|
|
1138
|
+
// Requires [user
|
|
1139
|
+
// authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
|
|
1140
|
+
// with [authorization
|
|
1141
|
+
// scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
|
|
1142
|
+
//
|
|
1143
|
+
// - `https://www.googleapis.com/auth/chat.users.availability`
|
|
1144
|
+
rpc MarkAsAway(MarkAsAwayRequest) returns (Availability) {
|
|
1145
|
+
option (google.api.http) = {
|
|
1146
|
+
post: "/v1/{name=users/*/availability}:markAsAway"
|
|
1147
|
+
body: "*"
|
|
1148
|
+
};
|
|
1149
|
+
}
|
|
1150
|
+
|
|
1151
|
+
// Marks user as `DO_NOT_DISTURB` in Google Chat.
|
|
1152
|
+
//
|
|
1153
|
+
// Sets a user's availability state to `DO_NOT_DISTURB` until a specified
|
|
1154
|
+
// expiration time.
|
|
1155
|
+
// When in `DO_NOT_DISTURB`, users typically won't receive notifications.
|
|
1156
|
+
//
|
|
1157
|
+
// This method only updates the authenticated user's availability.
|
|
1158
|
+
//
|
|
1159
|
+
// Requires [user
|
|
1160
|
+
// authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
|
|
1161
|
+
// with [authorization
|
|
1162
|
+
// scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
|
|
1163
|
+
//
|
|
1164
|
+
// - `https://www.googleapis.com/auth/chat.users.availability`
|
|
1165
|
+
rpc MarkAsDoNotDisturb(MarkAsDoNotDisturbRequest) returns (Availability) {
|
|
1166
|
+
option (google.api.http) = {
|
|
1167
|
+
post: "/v1/{name=users/*/availability}:markAsDoNotDisturb"
|
|
1168
|
+
body: "*"
|
|
1169
|
+
};
|
|
1170
|
+
}
|
|
1171
|
+
|
|
1172
|
+
// Updates availability information for a human user. Only the `custom_status`
|
|
1173
|
+
// field can be updated through this method.
|
|
1174
|
+
//
|
|
1175
|
+
// This method only updates the authenticated user's availability.
|
|
1176
|
+
//
|
|
1177
|
+
// Requires [user
|
|
1178
|
+
// authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
|
|
1179
|
+
// with one of the following [authorization
|
|
1180
|
+
// scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
|
|
1181
|
+
//
|
|
1182
|
+
// - `https://www.googleapis.com/auth/chat.users.availability`
|
|
1183
|
+
rpc UpdateAvailability(UpdateAvailabilityRequest) returns (Availability) {
|
|
1184
|
+
option (google.api.http) = {
|
|
1185
|
+
patch: "/v1/{availability.name=users/*/availability}"
|
|
1186
|
+
body: "availability"
|
|
1187
|
+
};
|
|
1188
|
+
option (google.api.method_signature) = "availability,update_mask";
|
|
1189
|
+
}
|
|
1190
|
+
|
|
1086
1191
|
// Returns an event from a Google Chat space. The [event
|
|
1087
1192
|
// payload](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.spaceEvents#SpaceEvent.FIELDS.oneof_payload)
|
|
1088
1193
|
// contains the most recent version of the resource that changed. For example,
|
|
@@ -281,10 +281,6 @@ message AttachedGif {
|
|
|
281
281
|
|
|
282
282
|
// Information about a message that another message quotes.
|
|
283
283
|
//
|
|
284
|
-
// When you create a message, you can quote messages within the same
|
|
285
|
-
// thread, or quote a root message to create a new root message.
|
|
286
|
-
// However, you can't quote a message reply from a different thread.
|
|
287
|
-
//
|
|
288
284
|
// When you update a message, you can't add or replace the
|
|
289
285
|
// `quotedMessageMetadata` field, but you can remove it.
|
|
290
286
|
//
|
|
@@ -301,16 +297,21 @@ message QuotedMessageMetadata {
|
|
|
301
297
|
// Reserved. This value is unused.
|
|
302
298
|
QUOTE_TYPE_UNSPECIFIED = 0;
|
|
303
299
|
|
|
304
|
-
//
|
|
300
|
+
// When `quote_type` is `REPLY`, you can do the following:
|
|
305
301
|
//
|
|
306
302
|
// * If you're replying in a thread, you can quote another message in that
|
|
307
303
|
// thread.
|
|
308
304
|
//
|
|
309
305
|
// * If you're creating a root message, you can quote another root message
|
|
310
306
|
// in that space.
|
|
311
|
-
//
|
|
312
|
-
// You can't quote a message reply from a different thread.
|
|
313
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;
|
|
314
315
|
}
|
|
315
316
|
|
|
316
317
|
// Required. Resource name of the message that is quoted.
|
|
@@ -18,6 +18,7 @@ package google.chat.v1;
|
|
|
18
18
|
|
|
19
19
|
import "google/api/field_behavior.proto";
|
|
20
20
|
import "google/api/resource.proto";
|
|
21
|
+
import "google/chat/v1/audience.proto";
|
|
21
22
|
import "google/chat/v1/history_state.proto";
|
|
22
23
|
import "google/protobuf/field_mask.proto";
|
|
23
24
|
import "google/protobuf/timestamp.proto";
|
|
@@ -171,6 +172,42 @@ message Space {
|
|
|
171
172
|
// Setting the target audience requires [user
|
|
172
173
|
// authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
|
|
173
174
|
string audience = 3 [(google.api.field_behavior) = OPTIONAL];
|
|
175
|
+
|
|
176
|
+
// Optional. Access permission settings for the space.
|
|
177
|
+
//
|
|
178
|
+
// To set the target audience when creating a space, specify the
|
|
179
|
+
// `accessSettings.audience` field in your request.
|
|
180
|
+
AccessPermissionSettings access_permission_settings = 5
|
|
181
|
+
[(google.api.field_behavior) = OPTIONAL];
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
// Access permission settings for a space.
|
|
185
|
+
message AccessPermissionSettings {
|
|
186
|
+
// Optional. Access permission setting for discovering the space.
|
|
187
|
+
AccessPermissionSetting discover_space_setting = 1
|
|
188
|
+
[(google.api.field_behavior) = OPTIONAL];
|
|
189
|
+
|
|
190
|
+
// Optional. Access permission setting for joining the space.
|
|
191
|
+
AccessPermissionSetting join_space_setting = 2
|
|
192
|
+
[(google.api.field_behavior) = OPTIONAL];
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
// An access permission setting.
|
|
196
|
+
message AccessPermissionSetting {
|
|
197
|
+
// Optional. Unordered list. Allowed principals for this permission.
|
|
198
|
+
repeated Principal principals = 1 [
|
|
199
|
+
(google.api.field_behavior) = OPTIONAL,
|
|
200
|
+
(google.api.field_behavior) = UNORDERED_LIST
|
|
201
|
+
];
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
// A principal representing an entity granted access.
|
|
205
|
+
message Principal {
|
|
206
|
+
// The type of principal.
|
|
207
|
+
oneof principal_type {
|
|
208
|
+
// An audience.
|
|
209
|
+
Audience audience = 1;
|
|
210
|
+
}
|
|
174
211
|
}
|
|
175
212
|
|
|
176
213
|
// Predefined permission settings that you can only specify when creating a
|
|
@@ -665,6 +702,24 @@ message UpdateSpaceRequest {
|
|
|
665
702
|
// users](https://developers.google.com/workspace/chat/space-target-audience).
|
|
666
703
|
// `access_settings.audience` is not supported with `useAdminAccess`.
|
|
667
704
|
//
|
|
705
|
+
// `access_settings.access_permission_settings`: Updates the [access
|
|
706
|
+
// permission
|
|
707
|
+
// settings](https://support.google.com/chat/answer/11971020) of who can
|
|
708
|
+
// discover and join the space where `spaceType` field is `SPACE`. Principals
|
|
709
|
+
// allowed to join the space must also be allowed to discover it. To update
|
|
710
|
+
// access permission settings for a space, the authenticating user must be a
|
|
711
|
+
// space manager or assistant manager and omit all other field masks in the
|
|
712
|
+
// request. You can't update this field if the space is in [import
|
|
713
|
+
// mode](https://developers.google.com/workspace/chat/import-data-overview).
|
|
714
|
+
// To learn more, see [Make a space discoverable to specific
|
|
715
|
+
// users](https://developers.google.com/workspace/chat/space-target-audience).
|
|
716
|
+
// `access_settings.access_permission_settings` is not supported with
|
|
717
|
+
// `useAdminAccess`.
|
|
718
|
+
// The supported field masks include:
|
|
719
|
+
//
|
|
720
|
+
// - `access_settings.access_permission_settings.discoverSpaceSetting`
|
|
721
|
+
// - `access_settings.access_permission_settings.joinSpaceSetting`
|
|
722
|
+
//
|
|
668
723
|
// `permission_settings`: Supports changing the
|
|
669
724
|
// [permission settings](https://support.google.com/chat/answer/13340792)
|
|
670
725
|
// of a space.
|