@google-apps/chat 0.2.0 → 0.4.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 +14 -0
- package/README.md +4 -0
- package/build/protos/google/apps/card/v1/card.proto +242 -160
- package/build/protos/google/chat/v1/action_status.proto +1 -1
- package/build/protos/google/chat/v1/annotation.proto +2 -2
- package/build/protos/google/chat/v1/attachment.proto +9 -0
- package/build/protos/google/chat/v1/chat_service.proto +135 -81
- package/build/protos/google/chat/v1/contextual_addon.proto +1 -1
- package/build/protos/google/chat/v1/membership.proto +33 -11
- package/build/protos/google/chat/v1/message.proto +71 -113
- package/build/protos/google/chat/v1/reaction.proto +4 -2
- package/build/protos/google/chat/v1/slash_command.proto +3 -2
- package/build/protos/google/chat/v1/space.proto +28 -17
- package/build/protos/google/chat/v1/space_read_state.proto +112 -0
- package/build/protos/google/chat/v1/space_setup.proto +1 -0
- package/build/protos/google/chat/v1/thread_read_state.proto +74 -0
- package/build/protos/google/chat/v1/user.proto +3 -2
- package/build/protos/google/chat/v1/widgets.proto +4 -4
- package/build/protos/protos.d.ts +887 -76
- package/build/protos/protos.js +1976 -192
- package/build/protos/protos.json +210 -12
- package/build/src/v1/chat_service_client.d.ts +368 -134
- package/build/src/v1/chat_service_client.js +196 -24
- package/build/src/v1/chat_service_client.js.map +1 -1
- package/build/src/v1/chat_service_client_config.json +20 -0
- package/package.json +1 -1
|
@@ -27,7 +27,7 @@ option php_namespace = "Google\\Apps\\Chat\\V1";
|
|
|
27
27
|
option ruby_package = "Google::Apps::Chat::V1";
|
|
28
28
|
|
|
29
29
|
// Represents the status for a request to either invoke or submit a
|
|
30
|
-
// [dialog](https://developers.google.com/chat/
|
|
30
|
+
// [dialog](https://developers.google.com/workspace/chat/dialogs).
|
|
31
31
|
message ActionStatus {
|
|
32
32
|
// The status code.
|
|
33
33
|
google.rpc.Code status_code = 1;
|
|
@@ -30,7 +30,7 @@ option ruby_package = "Google::Apps::Chat::V1";
|
|
|
30
30
|
// Output only. Annotations associated with the plain-text body of the message.
|
|
31
31
|
// To add basic formatting to a text message, see
|
|
32
32
|
// [Format text
|
|
33
|
-
// messages](https://developers.google.com/chat/format-messages).
|
|
33
|
+
// messages](https://developers.google.com/workspace/chat/format-messages).
|
|
34
34
|
//
|
|
35
35
|
// Example plain-text message body:
|
|
36
36
|
// ```
|
|
@@ -155,7 +155,7 @@ message RichLinkMetadata {
|
|
|
155
155
|
// Data for Google Drive links.
|
|
156
156
|
message DriveLinkData {
|
|
157
157
|
// A
|
|
158
|
-
// [DriveDataRef](https://developers.google.com/chat/api/reference/rest/v1/spaces.messages.attachments#drivedataref)
|
|
158
|
+
// [DriveDataRef](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages.attachments#drivedataref)
|
|
159
159
|
// which references a Google Drive file.
|
|
160
160
|
DriveDataRef drive_data_ref = 1;
|
|
161
161
|
|
|
@@ -34,11 +34,15 @@ message Attachment {
|
|
|
34
34
|
pattern: "spaces/{space}/messages/{message}/attachments/{attachment}"
|
|
35
35
|
};
|
|
36
36
|
|
|
37
|
+
// The source of the attachment.
|
|
37
38
|
enum Source {
|
|
39
|
+
// Reserved.
|
|
38
40
|
SOURCE_UNSPECIFIED = 0;
|
|
39
41
|
|
|
42
|
+
// The file is a Google Drive file.
|
|
40
43
|
DRIVE_FILE = 1;
|
|
41
44
|
|
|
45
|
+
// The file is uploaded to Chat.
|
|
42
46
|
UPLOADED_CONTENT = 2;
|
|
43
47
|
}
|
|
44
48
|
|
|
@@ -52,6 +56,7 @@ message Attachment {
|
|
|
52
56
|
// Output only. The content type (MIME type) of the file.
|
|
53
57
|
string content_type = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
|
|
54
58
|
|
|
59
|
+
// The data reference to the attachment.
|
|
55
60
|
oneof data_ref {
|
|
56
61
|
// A reference to the attachment data. This field is used with the media API
|
|
57
62
|
// to download the attachment data.
|
|
@@ -82,6 +87,7 @@ message DriveDataRef {
|
|
|
82
87
|
string drive_file_id = 2;
|
|
83
88
|
}
|
|
84
89
|
|
|
90
|
+
// A reference to the attachment data.
|
|
85
91
|
message AttachmentDataRef {
|
|
86
92
|
// The resource name of the attachment data. This field is used with the media
|
|
87
93
|
// API to download the attachment data.
|
|
@@ -93,6 +99,7 @@ message AttachmentDataRef {
|
|
|
93
99
|
string attachment_upload_token = 2;
|
|
94
100
|
}
|
|
95
101
|
|
|
102
|
+
// Request to get an attachment.
|
|
96
103
|
message GetAttachmentRequest {
|
|
97
104
|
// Required. Resource name of the attachment, in the form
|
|
98
105
|
// `spaces/*/messages/*/attachments/*`.
|
|
@@ -102,6 +109,7 @@ message GetAttachmentRequest {
|
|
|
102
109
|
];
|
|
103
110
|
}
|
|
104
111
|
|
|
112
|
+
// Request to upload an attachment.
|
|
105
113
|
message UploadAttachmentRequest {
|
|
106
114
|
// Required. Resource name of the Chat space in which the attachment is
|
|
107
115
|
// uploaded. Format "spaces/{space}".
|
|
@@ -116,6 +124,7 @@ message UploadAttachmentRequest {
|
|
|
116
124
|
string filename = 4 [(google.api.field_behavior) = REQUIRED];
|
|
117
125
|
}
|
|
118
126
|
|
|
127
|
+
// Response of uploading an attachment.
|
|
119
128
|
message UploadAttachmentResponse {
|
|
120
129
|
// Reference to the uploaded attachment.
|
|
121
130
|
AttachmentDataRef attachment_data_ref = 1;
|
|
@@ -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";
|
|
@@ -53,14 +55,16 @@ service ChatService {
|
|
|
53
55
|
"https://www.googleapis.com/auth/chat.messages.readonly,"
|
|
54
56
|
"https://www.googleapis.com/auth/chat.spaces,"
|
|
55
57
|
"https://www.googleapis.com/auth/chat.spaces.create,"
|
|
56
|
-
"https://www.googleapis.com/auth/chat.spaces.readonly"
|
|
58
|
+
"https://www.googleapis.com/auth/chat.spaces.readonly,"
|
|
59
|
+
"https://www.googleapis.com/auth/chat.users.readstate,"
|
|
60
|
+
"https://www.googleapis.com/auth/chat.users.readstate.readonly";
|
|
57
61
|
|
|
58
|
-
// Creates a message in a Google Chat space. For an example, see [
|
|
59
|
-
// message](https://developers.google.com/chat/
|
|
62
|
+
// Creates a message in a Google Chat space. For an example, see [Send a
|
|
63
|
+
// message](https://developers.google.com/workspace/chat/create-messages).
|
|
60
64
|
//
|
|
61
65
|
// Calling this method requires
|
|
62
|
-
// [authentication](https://developers.google.com/chat/
|
|
63
|
-
// supports the following authentication types:
|
|
66
|
+
// [authentication](https://developers.google.com/workspace/chat/authenticate-authorize)
|
|
67
|
+
// and supports the following authentication types:
|
|
64
68
|
//
|
|
65
69
|
// - For text messages, user authentication or app authentication are
|
|
66
70
|
// supported.
|
|
@@ -78,7 +82,7 @@ service ChatService {
|
|
|
78
82
|
// messages from blocked members and spaces. For an example, see
|
|
79
83
|
// [List messages](/chat/api/guides/v1/messages/list).
|
|
80
84
|
// Requires [user
|
|
81
|
-
// authentication](https://developers.google.com/chat/
|
|
85
|
+
// authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
|
|
82
86
|
rpc ListMessages(ListMessagesRequest) returns (ListMessagesResponse) {
|
|
83
87
|
option (google.api.http) = {
|
|
84
88
|
get: "/v1/{parent=spaces/*}/messages"
|
|
@@ -86,25 +90,25 @@ service ChatService {
|
|
|
86
90
|
option (google.api.method_signature) = "parent";
|
|
87
91
|
}
|
|
88
92
|
|
|
89
|
-
// Lists memberships in a space. For an example, see [List
|
|
90
|
-
//
|
|
91
|
-
// Listing
|
|
92
|
-
// [app
|
|
93
|
-
// authentication](https://developers.google.com/chat/
|
|
93
|
+
// Lists memberships in a space. For an example, see [List users and Google
|
|
94
|
+
// Chat apps in a
|
|
95
|
+
// space](https://developers.google.com/workspace/chat/list-members). Listing
|
|
96
|
+
// memberships with [app
|
|
97
|
+
// authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app)
|
|
94
98
|
// lists memberships in spaces that the Chat app has
|
|
95
99
|
// access to, but excludes Chat app memberships,
|
|
96
100
|
// including its own. Listing memberships with
|
|
97
101
|
// [User
|
|
98
|
-
// authentication](https://developers.google.com/chat/
|
|
102
|
+
// authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
|
|
99
103
|
// lists memberships in spaces that the authenticated user has access to.
|
|
100
104
|
//
|
|
101
105
|
// Requires
|
|
102
|
-
// [authentication](https://developers.google.com/chat/
|
|
106
|
+
// [authentication](https://developers.google.com/workspace/chat/authenticate-authorize).
|
|
103
107
|
// Supports
|
|
104
108
|
// [app
|
|
105
|
-
// authentication](https://developers.google.com/chat/
|
|
109
|
+
// authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app)
|
|
106
110
|
// and [user
|
|
107
|
-
// authentication](https://developers.google.com/chat/
|
|
111
|
+
// authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
|
|
108
112
|
rpc ListMemberships(ListMembershipsRequest)
|
|
109
113
|
returns (ListMembershipsResponse) {
|
|
110
114
|
option (google.api.http) = {
|
|
@@ -114,16 +118,16 @@ service ChatService {
|
|
|
114
118
|
}
|
|
115
119
|
|
|
116
120
|
// Returns details about a membership. For an example, see
|
|
117
|
-
// [Get a
|
|
118
|
-
// membership](https://developers.google.com/chat/
|
|
121
|
+
// [Get details about a user's or Google Chat app's
|
|
122
|
+
// membership](https://developers.google.com/workspace/chat/get-members).
|
|
119
123
|
//
|
|
120
124
|
// Requires
|
|
121
|
-
// [authentication](https://developers.google.com/chat/
|
|
125
|
+
// [authentication](https://developers.google.com/workspace/chat/authenticate-authorize).
|
|
122
126
|
// Supports
|
|
123
127
|
// [app
|
|
124
|
-
// authentication](https://developers.google.com/chat/
|
|
128
|
+
// authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app)
|
|
125
129
|
// and [user
|
|
126
|
-
// authentication](https://developers.google.com/chat/
|
|
130
|
+
// authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
|
|
127
131
|
rpc GetMembership(GetMembershipRequest) returns (Membership) {
|
|
128
132
|
option (google.api.http) = {
|
|
129
133
|
get: "/v1/{name=spaces/*/members/*}"
|
|
@@ -132,16 +136,16 @@ service ChatService {
|
|
|
132
136
|
}
|
|
133
137
|
|
|
134
138
|
// Returns details about a message.
|
|
135
|
-
// For an example, see [
|
|
136
|
-
// message](https://developers.google.com/chat/
|
|
139
|
+
// For an example, see [Get details about a
|
|
140
|
+
// message](https://developers.google.com/workspace/chat/get-messages).
|
|
137
141
|
//
|
|
138
142
|
// Requires
|
|
139
|
-
// [authentication](https://developers.google.com/chat/
|
|
143
|
+
// [authentication](https://developers.google.com/workspace/chat/authenticate-authorize).
|
|
140
144
|
// Supports
|
|
141
145
|
// [app
|
|
142
|
-
// authentication](https://developers.google.com/chat/
|
|
146
|
+
// authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app)
|
|
143
147
|
// and [user
|
|
144
|
-
// authentication](https://developers.google.com/chat/
|
|
148
|
+
// authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
|
|
145
149
|
//
|
|
146
150
|
// Note: Might return a message from a blocked member or space.
|
|
147
151
|
rpc GetMessage(GetMessageRequest) returns (Message) {
|
|
@@ -156,15 +160,15 @@ service ChatService {
|
|
|
156
160
|
// method uses a `patch` request while the `update` method uses a `put`
|
|
157
161
|
// request. We recommend using the `patch` method. For an example, see
|
|
158
162
|
// [Update a
|
|
159
|
-
// message](https://developers.google.com/chat/
|
|
163
|
+
// message](https://developers.google.com/workspace/chat/update-messages).
|
|
160
164
|
//
|
|
161
165
|
// Requires
|
|
162
|
-
// [authentication](https://developers.google.com/chat/
|
|
166
|
+
// [authentication](https://developers.google.com/workspace/chat/authenticate-authorize).
|
|
163
167
|
// Supports
|
|
164
168
|
// [app
|
|
165
|
-
// authentication](https://developers.google.com/chat/
|
|
169
|
+
// authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app)
|
|
166
170
|
// and [user
|
|
167
|
-
// authentication](https://developers.google.com/chat/
|
|
171
|
+
// authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
|
|
168
172
|
// When using app authentication, requests can only update messages
|
|
169
173
|
// created by the calling Chat app.
|
|
170
174
|
rpc UpdateMessage(UpdateMessageRequest) returns (Message) {
|
|
@@ -181,15 +185,15 @@ service ChatService {
|
|
|
181
185
|
|
|
182
186
|
// Deletes a message.
|
|
183
187
|
// For an example, see [Delete a
|
|
184
|
-
// message](https://developers.google.com/chat/
|
|
188
|
+
// message](https://developers.google.com/workspace/chat/delete-messages).
|
|
185
189
|
//
|
|
186
190
|
// Requires
|
|
187
|
-
// [authentication](https://developers.google.com/chat/
|
|
191
|
+
// [authentication](https://developers.google.com/workspace/chat/authenticate-authorize).
|
|
188
192
|
// Supports
|
|
189
193
|
// [app
|
|
190
|
-
// authentication](https://developers.google.com/chat/
|
|
194
|
+
// authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app)
|
|
191
195
|
// and [user
|
|
192
|
-
// authentication](https://developers.google.com/chat/
|
|
196
|
+
// authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
|
|
193
197
|
// When using app authentication, requests can only delete messages
|
|
194
198
|
// created by the calling Chat app.
|
|
195
199
|
rpc DeleteMessage(DeleteMessageRequest) returns (google.protobuf.Empty) {
|
|
@@ -201,12 +205,12 @@ service ChatService {
|
|
|
201
205
|
|
|
202
206
|
// Gets the metadata of a message attachment. The attachment data is fetched
|
|
203
207
|
// using the [media
|
|
204
|
-
// API](https://developers.google.com/chat/api/reference/rest/v1/media/download).
|
|
208
|
+
// API](https://developers.google.com/workspace/chat/api/reference/rest/v1/media/download).
|
|
205
209
|
// For an example, see
|
|
206
|
-
// [Get a message
|
|
207
|
-
// attachment](https://developers.google.com/chat/
|
|
210
|
+
// [Get metadata about a message
|
|
211
|
+
// attachment](https://developers.google.com/workspace/chat/get-media-attachments).
|
|
208
212
|
// Requires [app
|
|
209
|
-
// authentication](https://developers.google.com/chat/
|
|
213
|
+
// authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app).
|
|
210
214
|
rpc GetAttachment(GetAttachmentRequest) returns (Attachment) {
|
|
211
215
|
option (google.api.http) = {
|
|
212
216
|
get: "/v1/{name=spaces/*/messages/*/attachments/*}"
|
|
@@ -216,9 +220,9 @@ service ChatService {
|
|
|
216
220
|
|
|
217
221
|
// Uploads an attachment. For an example, see
|
|
218
222
|
// [Upload media as a file
|
|
219
|
-
// attachment](https://developers.google.com/chat/
|
|
223
|
+
// attachment](https://developers.google.com/workspace/chat/upload-media-attachments).
|
|
220
224
|
// Requires user
|
|
221
|
-
// [authentication](https://developers.google.com/chat/
|
|
225
|
+
// [authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
|
|
222
226
|
//
|
|
223
227
|
// You can upload attachments up to 200 MB. Certain file types aren't
|
|
224
228
|
// supported. For details, see [File types blocked by Google
|
|
@@ -234,15 +238,15 @@ service ChatService {
|
|
|
234
238
|
// Lists spaces the caller is a member of. Group chats and DMs aren't listed
|
|
235
239
|
// until the first message is sent. For an example, see
|
|
236
240
|
// [List
|
|
237
|
-
// spaces](https://developers.google.com/chat/
|
|
241
|
+
// spaces](https://developers.google.com/workspace/chat/list-spaces).
|
|
238
242
|
//
|
|
239
243
|
// Requires
|
|
240
|
-
// [authentication](https://developers.google.com/chat/
|
|
244
|
+
// [authentication](https://developers.google.com/workspace/chat/authenticate-authorize).
|
|
241
245
|
// Supports
|
|
242
246
|
// [app
|
|
243
|
-
// authentication](https://developers.google.com/chat/
|
|
247
|
+
// authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app)
|
|
244
248
|
// and [user
|
|
245
|
-
// authentication](https://developers.google.com/chat/
|
|
249
|
+
// authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
|
|
246
250
|
//
|
|
247
251
|
// Lists spaces visible to the caller or authenticated user. Group chats
|
|
248
252
|
// and DMs aren't listed until the first message is sent.
|
|
@@ -254,15 +258,16 @@ service ChatService {
|
|
|
254
258
|
}
|
|
255
259
|
|
|
256
260
|
// Returns details about a space. For an example, see
|
|
257
|
-
// [Get a
|
|
261
|
+
// [Get details about a
|
|
262
|
+
// space](https://developers.google.com/workspace/chat/get-spaces).
|
|
258
263
|
//
|
|
259
264
|
// Requires
|
|
260
|
-
// [authentication](https://developers.google.com/chat/
|
|
265
|
+
// [authentication](https://developers.google.com/workspace/chat/authenticate-authorize).
|
|
261
266
|
// Supports
|
|
262
267
|
// [app
|
|
263
|
-
// authentication](https://developers.google.com/chat/
|
|
268
|
+
// authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app)
|
|
264
269
|
// and [user
|
|
265
|
-
// authentication](https://developers.google.com/chat/
|
|
270
|
+
// authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
|
|
266
271
|
rpc GetSpace(GetSpaceRequest) returns (Space) {
|
|
267
272
|
option (google.api.http) = {
|
|
268
273
|
get: "/v1/{name=spaces/*}"
|
|
@@ -272,14 +277,14 @@ service ChatService {
|
|
|
272
277
|
|
|
273
278
|
// Creates a named space. Spaces grouped by topics aren't supported. For an
|
|
274
279
|
// example, see [Create a
|
|
275
|
-
// space](https://developers.google.com/chat/
|
|
280
|
+
// space](https://developers.google.com/workspace/chat/create-spaces).
|
|
276
281
|
//
|
|
277
282
|
// If you receive the error message `ALREADY_EXISTS` when creating
|
|
278
283
|
// a space, try a different `displayName`. An existing space within
|
|
279
284
|
// the Google Workspace organization might already use this display name.
|
|
280
285
|
//
|
|
281
286
|
// Requires [user
|
|
282
|
-
// authentication](https://developers.google.com/chat/
|
|
287
|
+
// authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
|
|
283
288
|
rpc CreateSpace(CreateSpaceRequest) returns (Space) {
|
|
284
289
|
option (google.api.http) = {
|
|
285
290
|
post: "/v1/spaces"
|
|
@@ -291,8 +296,8 @@ service ChatService {
|
|
|
291
296
|
// Creates a space and adds specified users to it. The calling user is
|
|
292
297
|
// automatically added to the space, and shouldn't be specified as a
|
|
293
298
|
// membership in the request. For an example, see
|
|
294
|
-
// [Set up a
|
|
295
|
-
//
|
|
299
|
+
// [Set up a space with initial
|
|
300
|
+
// members](https://developers.google.com/workspace/chat/set-up-spaces).
|
|
296
301
|
//
|
|
297
302
|
// To specify the human members to add, add memberships with the appropriate
|
|
298
303
|
// `member.name` in the `SetUpSpaceRequest`. To add a human user, use
|
|
@@ -316,8 +321,8 @@ service ChatService {
|
|
|
316
321
|
// can only use this method to set up a DM with the calling app. To add the
|
|
317
322
|
// calling app as a member of a space or an existing DM between two human
|
|
318
323
|
// users, see
|
|
319
|
-
// [
|
|
320
|
-
//
|
|
324
|
+
// [Invite or add a user or app to a
|
|
325
|
+
// space](https://developers.google.com/workspace/chat/create-members).
|
|
321
326
|
//
|
|
322
327
|
// If a DM already exists between two users, even when one user blocks the
|
|
323
328
|
// other at the time a request is made, then the existing DM is returned.
|
|
@@ -328,7 +333,7 @@ service ChatService {
|
|
|
328
333
|
// might already use this display name.
|
|
329
334
|
//
|
|
330
335
|
// Requires [user
|
|
331
|
-
// authentication](https://developers.google.com/chat/
|
|
336
|
+
// authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
|
|
332
337
|
rpc SetUpSpace(SetUpSpaceRequest) returns (Space) {
|
|
333
338
|
option (google.api.http) = {
|
|
334
339
|
post: "/v1/spaces:setup"
|
|
@@ -338,14 +343,14 @@ service ChatService {
|
|
|
338
343
|
|
|
339
344
|
// Updates a space. For an example, see
|
|
340
345
|
// [Update a
|
|
341
|
-
// space](https://developers.google.com/chat/
|
|
346
|
+
// space](https://developers.google.com/workspace/chat/update-spaces).
|
|
342
347
|
//
|
|
343
348
|
// If you're updating the `displayName` field and receive the error message
|
|
344
349
|
// `ALREADY_EXISTS`, try a different display name.. An existing space within
|
|
345
350
|
// the Google Workspace organization might already use this display name.
|
|
346
351
|
//
|
|
347
352
|
// Requires [user
|
|
348
|
-
// authentication](https://developers.google.com/chat/
|
|
353
|
+
// authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
|
|
349
354
|
rpc UpdateSpace(UpdateSpaceRequest) returns (Space) {
|
|
350
355
|
option (google.api.http) = {
|
|
351
356
|
patch: "/v1/{space.name=spaces/*}"
|
|
@@ -358,9 +363,9 @@ service ChatService {
|
|
|
358
363
|
// that the space's child resources—like messages posted in the space and
|
|
359
364
|
// memberships in the space—are also deleted. For an example, see
|
|
360
365
|
// [Delete a
|
|
361
|
-
// space](https://developers.google.com/chat/
|
|
366
|
+
// space](https://developers.google.com/workspace/chat/delete-spaces).
|
|
362
367
|
// Requires [user
|
|
363
|
-
// authentication](https://developers.google.com/chat/
|
|
368
|
+
// authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
|
|
364
369
|
// from a user who has permission to delete the space.
|
|
365
370
|
rpc DeleteSpace(DeleteSpaceRequest) returns (google.protobuf.Empty) {
|
|
366
371
|
option (google.api.http) = {
|
|
@@ -370,11 +375,11 @@ service ChatService {
|
|
|
370
375
|
}
|
|
371
376
|
|
|
372
377
|
// Completes the
|
|
373
|
-
// [import process](https://developers.google.com/chat/
|
|
378
|
+
// [import process](https://developers.google.com/workspace/chat/import-data)
|
|
374
379
|
// for the specified space and makes it visible to users.
|
|
375
380
|
// Requires app authentication and domain-wide delegation. For more
|
|
376
381
|
// information, see [Authorize Google Chat apps to import
|
|
377
|
-
// data](https://developers.google.com/chat/
|
|
382
|
+
// data](https://developers.google.com/workspace/chat/authorize-import).
|
|
378
383
|
rpc CompleteImportSpace(CompleteImportSpaceRequest)
|
|
379
384
|
returns (CompleteImportSpaceResponse) {
|
|
380
385
|
option (google.api.http) = {
|
|
@@ -389,19 +394,19 @@ service ChatService {
|
|
|
389
394
|
// [Find a direct message](/chat/api/guides/v1/spaces/find-direct-message).
|
|
390
395
|
//
|
|
391
396
|
// With [user
|
|
392
|
-
// authentication](https://developers.google.com/chat/
|
|
397
|
+
// authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user),
|
|
393
398
|
// returns the direct message space between the specified user and the
|
|
394
399
|
// authenticated user.
|
|
395
400
|
//
|
|
396
401
|
// With [app
|
|
397
|
-
// authentication](https://developers.google.com/chat/
|
|
402
|
+
// authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app),
|
|
398
403
|
// returns the direct message space between the specified user and the calling
|
|
399
404
|
// Chat app.
|
|
400
405
|
//
|
|
401
406
|
// Requires [user
|
|
402
|
-
// authentication](https://developers.google.com/chat/
|
|
407
|
+
// authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
|
|
403
408
|
// or [app
|
|
404
|
-
// authentication](https://developers.google.com/chat/
|
|
409
|
+
// authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app).
|
|
405
410
|
rpc FindDirectMessage(FindDirectMessageRequest) returns (Space) {
|
|
406
411
|
option (google.api.http) = {
|
|
407
412
|
get: "/v1/spaces:findDirectMessage"
|
|
@@ -410,13 +415,13 @@ service ChatService {
|
|
|
410
415
|
|
|
411
416
|
// Creates a human membership or app membership for the calling app. Creating
|
|
412
417
|
// memberships for other apps isn't supported. For an example, see
|
|
413
|
-
// [
|
|
414
|
-
//
|
|
418
|
+
// [Invite or add a user or a Google Chat app to a
|
|
419
|
+
// space](https://developers.google.com/workspace/chat/create-members).
|
|
415
420
|
// When creating a membership, if the specified member has their auto-accept
|
|
416
421
|
// policy turned off, then they're invited, and must accept the space
|
|
417
422
|
// invitation before joining. Otherwise, creating a membership adds the member
|
|
418
423
|
// directly to the specified space. Requires [user
|
|
419
|
-
// authentication](https://developers.google.com/chat/
|
|
424
|
+
// authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
|
|
420
425
|
//
|
|
421
426
|
// To specify the member to add, set the `membership.member.name` in the
|
|
422
427
|
// `CreateMembershipRequest`:
|
|
@@ -440,12 +445,22 @@ service ChatService {
|
|
|
440
445
|
option (google.api.method_signature) = "parent,membership";
|
|
441
446
|
}
|
|
442
447
|
|
|
448
|
+
// Updates a membership. Requires [user
|
|
449
|
+
// authentication](https://developers.google.com/chat/api/guides/auth/users).
|
|
450
|
+
rpc UpdateMembership(UpdateMembershipRequest) returns (Membership) {
|
|
451
|
+
option (google.api.http) = {
|
|
452
|
+
patch: "/v1/{membership.name=spaces/*/members/*}"
|
|
453
|
+
body: "membership"
|
|
454
|
+
};
|
|
455
|
+
option (google.api.method_signature) = "membership,update_mask";
|
|
456
|
+
}
|
|
457
|
+
|
|
443
458
|
// Deletes a membership. For an example, see
|
|
444
|
-
// [
|
|
445
|
-
//
|
|
459
|
+
// [Remove a user or a Google Chat app from a
|
|
460
|
+
// space](https://developers.google.com/workspace/chat/delete-members).
|
|
446
461
|
//
|
|
447
462
|
// Requires [user
|
|
448
|
-
// authentication](https://developers.google.com/chat/
|
|
463
|
+
// authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
|
|
449
464
|
rpc DeleteMembership(DeleteMembershipRequest) returns (Membership) {
|
|
450
465
|
option (google.api.http) = {
|
|
451
466
|
delete: "/v1/{name=spaces/*/members/*}"
|
|
@@ -453,12 +468,12 @@ service ChatService {
|
|
|
453
468
|
option (google.api.method_signature) = "name";
|
|
454
469
|
}
|
|
455
470
|
|
|
456
|
-
// Creates a reaction and adds it to a message.
|
|
457
|
-
//
|
|
458
|
-
// reaction
|
|
471
|
+
// Creates a reaction and adds it to a message. Only unicode emojis are
|
|
472
|
+
// supported. For an example, see
|
|
473
|
+
// [Add a reaction to a
|
|
474
|
+
// message](https://developers.google.com/workspace/chat/create-reactions).
|
|
459
475
|
// Requires [user
|
|
460
|
-
// authentication](https://developers.google.com/chat/
|
|
461
|
-
// Only unicode emoji are supported.
|
|
476
|
+
// authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
|
|
462
477
|
rpc CreateReaction(CreateReactionRequest) returns (Reaction) {
|
|
463
478
|
option (google.api.http) = {
|
|
464
479
|
post: "/v1/{parent=spaces/*/messages/*}/reactions"
|
|
@@ -468,10 +483,10 @@ service ChatService {
|
|
|
468
483
|
}
|
|
469
484
|
|
|
470
485
|
// Lists reactions to a message. For an example, see
|
|
471
|
-
// [List
|
|
472
|
-
//
|
|
486
|
+
// [List reactions for a
|
|
487
|
+
// message](https://developers.google.com/workspace/chat/list-reactions).
|
|
473
488
|
// Requires [user
|
|
474
|
-
// authentication](https://developers.google.com/chat/
|
|
489
|
+
// authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
|
|
475
490
|
rpc ListReactions(ListReactionsRequest) returns (ListReactionsResponse) {
|
|
476
491
|
option (google.api.http) = {
|
|
477
492
|
get: "/v1/{parent=spaces/*/messages/*}/reactions"
|
|
@@ -479,15 +494,54 @@ service ChatService {
|
|
|
479
494
|
option (google.api.method_signature) = "parent";
|
|
480
495
|
}
|
|
481
496
|
|
|
482
|
-
// Deletes a reaction to a message.
|
|
497
|
+
// Deletes a reaction to a message. Only unicode emojis are supported.
|
|
498
|
+
// For an example, see
|
|
483
499
|
// [Delete a
|
|
484
|
-
// reaction](https://developers.google.com/chat/
|
|
500
|
+
// reaction](https://developers.google.com/workspace/chat/delete-reactions).
|
|
485
501
|
// Requires [user
|
|
486
|
-
// authentication](https://developers.google.com/chat/
|
|
502
|
+
// authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
|
|
487
503
|
rpc DeleteReaction(DeleteReactionRequest) returns (google.protobuf.Empty) {
|
|
488
504
|
option (google.api.http) = {
|
|
489
505
|
delete: "/v1/{name=spaces/*/messages/*/reactions/*}"
|
|
490
506
|
};
|
|
491
507
|
option (google.api.method_signature) = "name";
|
|
492
508
|
}
|
|
509
|
+
|
|
510
|
+
// Returns details about a user's read state within a space, used to identify
|
|
511
|
+
// read and unread messages.
|
|
512
|
+
//
|
|
513
|
+
// Requires [user
|
|
514
|
+
// authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
|
|
515
|
+
rpc GetSpaceReadState(GetSpaceReadStateRequest) returns (SpaceReadState) {
|
|
516
|
+
option (google.api.http) = {
|
|
517
|
+
get: "/v1/{name=users/*/spaces/*/spaceReadState}"
|
|
518
|
+
};
|
|
519
|
+
option (google.api.method_signature) = "name";
|
|
520
|
+
}
|
|
521
|
+
|
|
522
|
+
// Updates a user's read state within a space, used to identify read and
|
|
523
|
+
// unread messages.
|
|
524
|
+
//
|
|
525
|
+
// Requires [user
|
|
526
|
+
// authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
|
|
527
|
+
rpc UpdateSpaceReadState(UpdateSpaceReadStateRequest)
|
|
528
|
+
returns (SpaceReadState) {
|
|
529
|
+
option (google.api.http) = {
|
|
530
|
+
patch: "/v1/{space_read_state.name=users/*/spaces/*/spaceReadState}"
|
|
531
|
+
body: "space_read_state"
|
|
532
|
+
};
|
|
533
|
+
option (google.api.method_signature) = "space_read_state,update_mask";
|
|
534
|
+
}
|
|
535
|
+
|
|
536
|
+
// Returns details about a user's read state within a thread, used to identify
|
|
537
|
+
// read and unread messages.
|
|
538
|
+
//
|
|
539
|
+
// Requires [user
|
|
540
|
+
// authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
|
|
541
|
+
rpc GetThreadReadState(GetThreadReadStateRequest) returns (ThreadReadState) {
|
|
542
|
+
option (google.api.http) = {
|
|
543
|
+
get: "/v1/{name=users/*/spaces/*/threads/*/threadReadState}"
|
|
544
|
+
};
|
|
545
|
+
option (google.api.method_signature) = "name";
|
|
546
|
+
}
|
|
493
547
|
}
|
|
@@ -66,7 +66,7 @@ message ContextualAddOnMarkup {
|
|
|
66
66
|
// supported. For more information
|
|
67
67
|
// about formatting text, see
|
|
68
68
|
// [Formatting text in Google Chat
|
|
69
|
-
// apps](https://developers.google.com/chat/format-messages#card-formatting)
|
|
69
|
+
// apps](https://developers.google.com/workspace/chat/format-messages#card-formatting)
|
|
70
70
|
// and
|
|
71
71
|
// [Formatting
|
|
72
72
|
// text in Google Workspace
|