@google-apps/chat 0.2.0 → 0.3.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 +7 -0
- package/README.md +1 -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 +92 -80
- 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_setup.proto +1 -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 +320 -75
- package/build/protos/protos.js +826 -248
- package/build/protos/protos.json +73 -10
- package/build/src/v1/chat_service_client.d.ts +173 -134
- package/build/src/v1/chat_service_client.js +48 -24
- package/build/src/v1/chat_service_client.js.map +1 -1
- package/build/src/v1/chat_service_client_config.json +5 -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;
|
|
@@ -55,12 +55,12 @@ service ChatService {
|
|
|
55
55
|
"https://www.googleapis.com/auth/chat.spaces.create,"
|
|
56
56
|
"https://www.googleapis.com/auth/chat.spaces.readonly";
|
|
57
57
|
|
|
58
|
-
// Creates a message in a Google Chat space. For an example, see [
|
|
59
|
-
// message](https://developers.google.com/chat/
|
|
58
|
+
// Creates a message in a Google Chat space. For an example, see [Send a
|
|
59
|
+
// message](https://developers.google.com/workspace/chat/create-messages).
|
|
60
60
|
//
|
|
61
61
|
// Calling this method requires
|
|
62
|
-
// [authentication](https://developers.google.com/chat/
|
|
63
|
-
// supports the following authentication types:
|
|
62
|
+
// [authentication](https://developers.google.com/workspace/chat/authenticate-authorize)
|
|
63
|
+
// and supports the following authentication types:
|
|
64
64
|
//
|
|
65
65
|
// - For text messages, user authentication or app authentication are
|
|
66
66
|
// supported.
|
|
@@ -78,7 +78,7 @@ service ChatService {
|
|
|
78
78
|
// messages from blocked members and spaces. For an example, see
|
|
79
79
|
// [List messages](/chat/api/guides/v1/messages/list).
|
|
80
80
|
// Requires [user
|
|
81
|
-
// authentication](https://developers.google.com/chat/
|
|
81
|
+
// authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
|
|
82
82
|
rpc ListMessages(ListMessagesRequest) returns (ListMessagesResponse) {
|
|
83
83
|
option (google.api.http) = {
|
|
84
84
|
get: "/v1/{parent=spaces/*}/messages"
|
|
@@ -86,25 +86,25 @@ service ChatService {
|
|
|
86
86
|
option (google.api.method_signature) = "parent";
|
|
87
87
|
}
|
|
88
88
|
|
|
89
|
-
// Lists memberships in a space. For an example, see [List
|
|
90
|
-
//
|
|
91
|
-
// Listing
|
|
92
|
-
// [app
|
|
93
|
-
// authentication](https://developers.google.com/chat/
|
|
89
|
+
// Lists memberships in a space. For an example, see [List users and Google
|
|
90
|
+
// Chat apps in a
|
|
91
|
+
// space](https://developers.google.com/workspace/chat/list-members). Listing
|
|
92
|
+
// memberships with [app
|
|
93
|
+
// authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app)
|
|
94
94
|
// lists memberships in spaces that the Chat app has
|
|
95
95
|
// access to, but excludes Chat app memberships,
|
|
96
96
|
// including its own. Listing memberships with
|
|
97
97
|
// [User
|
|
98
|
-
// authentication](https://developers.google.com/chat/
|
|
98
|
+
// authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
|
|
99
99
|
// lists memberships in spaces that the authenticated user has access to.
|
|
100
100
|
//
|
|
101
101
|
// Requires
|
|
102
|
-
// [authentication](https://developers.google.com/chat/
|
|
102
|
+
// [authentication](https://developers.google.com/workspace/chat/authenticate-authorize).
|
|
103
103
|
// Supports
|
|
104
104
|
// [app
|
|
105
|
-
// authentication](https://developers.google.com/chat/
|
|
105
|
+
// authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app)
|
|
106
106
|
// and [user
|
|
107
|
-
// authentication](https://developers.google.com/chat/
|
|
107
|
+
// authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
|
|
108
108
|
rpc ListMemberships(ListMembershipsRequest)
|
|
109
109
|
returns (ListMembershipsResponse) {
|
|
110
110
|
option (google.api.http) = {
|
|
@@ -114,16 +114,16 @@ service ChatService {
|
|
|
114
114
|
}
|
|
115
115
|
|
|
116
116
|
// Returns details about a membership. For an example, see
|
|
117
|
-
// [Get a
|
|
118
|
-
// membership](https://developers.google.com/chat/
|
|
117
|
+
// [Get details about a user's or Google Chat app's
|
|
118
|
+
// membership](https://developers.google.com/workspace/chat/get-members).
|
|
119
119
|
//
|
|
120
120
|
// Requires
|
|
121
|
-
// [authentication](https://developers.google.com/chat/
|
|
121
|
+
// [authentication](https://developers.google.com/workspace/chat/authenticate-authorize).
|
|
122
122
|
// Supports
|
|
123
123
|
// [app
|
|
124
|
-
// authentication](https://developers.google.com/chat/
|
|
124
|
+
// authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app)
|
|
125
125
|
// and [user
|
|
126
|
-
// authentication](https://developers.google.com/chat/
|
|
126
|
+
// authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
|
|
127
127
|
rpc GetMembership(GetMembershipRequest) returns (Membership) {
|
|
128
128
|
option (google.api.http) = {
|
|
129
129
|
get: "/v1/{name=spaces/*/members/*}"
|
|
@@ -132,16 +132,16 @@ service ChatService {
|
|
|
132
132
|
}
|
|
133
133
|
|
|
134
134
|
// Returns details about a message.
|
|
135
|
-
// For an example, see [
|
|
136
|
-
// message](https://developers.google.com/chat/
|
|
135
|
+
// For an example, see [Get details about a
|
|
136
|
+
// message](https://developers.google.com/workspace/chat/get-messages).
|
|
137
137
|
//
|
|
138
138
|
// Requires
|
|
139
|
-
// [authentication](https://developers.google.com/chat/
|
|
139
|
+
// [authentication](https://developers.google.com/workspace/chat/authenticate-authorize).
|
|
140
140
|
// Supports
|
|
141
141
|
// [app
|
|
142
|
-
// authentication](https://developers.google.com/chat/
|
|
142
|
+
// authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app)
|
|
143
143
|
// and [user
|
|
144
|
-
// authentication](https://developers.google.com/chat/
|
|
144
|
+
// authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
|
|
145
145
|
//
|
|
146
146
|
// Note: Might return a message from a blocked member or space.
|
|
147
147
|
rpc GetMessage(GetMessageRequest) returns (Message) {
|
|
@@ -156,15 +156,15 @@ service ChatService {
|
|
|
156
156
|
// method uses a `patch` request while the `update` method uses a `put`
|
|
157
157
|
// request. We recommend using the `patch` method. For an example, see
|
|
158
158
|
// [Update a
|
|
159
|
-
// message](https://developers.google.com/chat/
|
|
159
|
+
// message](https://developers.google.com/workspace/chat/update-messages).
|
|
160
160
|
//
|
|
161
161
|
// Requires
|
|
162
|
-
// [authentication](https://developers.google.com/chat/
|
|
162
|
+
// [authentication](https://developers.google.com/workspace/chat/authenticate-authorize).
|
|
163
163
|
// Supports
|
|
164
164
|
// [app
|
|
165
|
-
// authentication](https://developers.google.com/chat/
|
|
165
|
+
// authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app)
|
|
166
166
|
// and [user
|
|
167
|
-
// authentication](https://developers.google.com/chat/
|
|
167
|
+
// authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
|
|
168
168
|
// When using app authentication, requests can only update messages
|
|
169
169
|
// created by the calling Chat app.
|
|
170
170
|
rpc UpdateMessage(UpdateMessageRequest) returns (Message) {
|
|
@@ -181,15 +181,15 @@ service ChatService {
|
|
|
181
181
|
|
|
182
182
|
// Deletes a message.
|
|
183
183
|
// For an example, see [Delete a
|
|
184
|
-
// message](https://developers.google.com/chat/
|
|
184
|
+
// message](https://developers.google.com/workspace/chat/delete-messages).
|
|
185
185
|
//
|
|
186
186
|
// Requires
|
|
187
|
-
// [authentication](https://developers.google.com/chat/
|
|
187
|
+
// [authentication](https://developers.google.com/workspace/chat/authenticate-authorize).
|
|
188
188
|
// Supports
|
|
189
189
|
// [app
|
|
190
|
-
// authentication](https://developers.google.com/chat/
|
|
190
|
+
// authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app)
|
|
191
191
|
// and [user
|
|
192
|
-
// authentication](https://developers.google.com/chat/
|
|
192
|
+
// authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
|
|
193
193
|
// When using app authentication, requests can only delete messages
|
|
194
194
|
// created by the calling Chat app.
|
|
195
195
|
rpc DeleteMessage(DeleteMessageRequest) returns (google.protobuf.Empty) {
|
|
@@ -201,12 +201,12 @@ service ChatService {
|
|
|
201
201
|
|
|
202
202
|
// Gets the metadata of a message attachment. The attachment data is fetched
|
|
203
203
|
// using the [media
|
|
204
|
-
// API](https://developers.google.com/chat/api/reference/rest/v1/media/download).
|
|
204
|
+
// API](https://developers.google.com/workspace/chat/api/reference/rest/v1/media/download).
|
|
205
205
|
// For an example, see
|
|
206
|
-
// [Get a message
|
|
207
|
-
// attachment](https://developers.google.com/chat/
|
|
206
|
+
// [Get metadata about a message
|
|
207
|
+
// attachment](https://developers.google.com/workspace/chat/get-media-attachments).
|
|
208
208
|
// Requires [app
|
|
209
|
-
// authentication](https://developers.google.com/chat/
|
|
209
|
+
// authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app).
|
|
210
210
|
rpc GetAttachment(GetAttachmentRequest) returns (Attachment) {
|
|
211
211
|
option (google.api.http) = {
|
|
212
212
|
get: "/v1/{name=spaces/*/messages/*/attachments/*}"
|
|
@@ -216,9 +216,9 @@ service ChatService {
|
|
|
216
216
|
|
|
217
217
|
// Uploads an attachment. For an example, see
|
|
218
218
|
// [Upload media as a file
|
|
219
|
-
// attachment](https://developers.google.com/chat/
|
|
219
|
+
// attachment](https://developers.google.com/workspace/chat/upload-media-attachments).
|
|
220
220
|
// Requires user
|
|
221
|
-
// [authentication](https://developers.google.com/chat/
|
|
221
|
+
// [authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
|
|
222
222
|
//
|
|
223
223
|
// You can upload attachments up to 200 MB. Certain file types aren't
|
|
224
224
|
// supported. For details, see [File types blocked by Google
|
|
@@ -234,15 +234,15 @@ service ChatService {
|
|
|
234
234
|
// Lists spaces the caller is a member of. Group chats and DMs aren't listed
|
|
235
235
|
// until the first message is sent. For an example, see
|
|
236
236
|
// [List
|
|
237
|
-
// spaces](https://developers.google.com/chat/
|
|
237
|
+
// spaces](https://developers.google.com/workspace/chat/list-spaces).
|
|
238
238
|
//
|
|
239
239
|
// Requires
|
|
240
|
-
// [authentication](https://developers.google.com/chat/
|
|
240
|
+
// [authentication](https://developers.google.com/workspace/chat/authenticate-authorize).
|
|
241
241
|
// Supports
|
|
242
242
|
// [app
|
|
243
|
-
// authentication](https://developers.google.com/chat/
|
|
243
|
+
// authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app)
|
|
244
244
|
// and [user
|
|
245
|
-
// authentication](https://developers.google.com/chat/
|
|
245
|
+
// authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
|
|
246
246
|
//
|
|
247
247
|
// Lists spaces visible to the caller or authenticated user. Group chats
|
|
248
248
|
// and DMs aren't listed until the first message is sent.
|
|
@@ -254,15 +254,16 @@ service ChatService {
|
|
|
254
254
|
}
|
|
255
255
|
|
|
256
256
|
// Returns details about a space. For an example, see
|
|
257
|
-
// [Get a
|
|
257
|
+
// [Get details about a
|
|
258
|
+
// space](https://developers.google.com/workspace/chat/get-spaces).
|
|
258
259
|
//
|
|
259
260
|
// Requires
|
|
260
|
-
// [authentication](https://developers.google.com/chat/
|
|
261
|
+
// [authentication](https://developers.google.com/workspace/chat/authenticate-authorize).
|
|
261
262
|
// Supports
|
|
262
263
|
// [app
|
|
263
|
-
// authentication](https://developers.google.com/chat/
|
|
264
|
+
// authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app)
|
|
264
265
|
// and [user
|
|
265
|
-
// authentication](https://developers.google.com/chat/
|
|
266
|
+
// authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
|
|
266
267
|
rpc GetSpace(GetSpaceRequest) returns (Space) {
|
|
267
268
|
option (google.api.http) = {
|
|
268
269
|
get: "/v1/{name=spaces/*}"
|
|
@@ -272,14 +273,14 @@ service ChatService {
|
|
|
272
273
|
|
|
273
274
|
// Creates a named space. Spaces grouped by topics aren't supported. For an
|
|
274
275
|
// example, see [Create a
|
|
275
|
-
// space](https://developers.google.com/chat/
|
|
276
|
+
// space](https://developers.google.com/workspace/chat/create-spaces).
|
|
276
277
|
//
|
|
277
278
|
// If you receive the error message `ALREADY_EXISTS` when creating
|
|
278
279
|
// a space, try a different `displayName`. An existing space within
|
|
279
280
|
// the Google Workspace organization might already use this display name.
|
|
280
281
|
//
|
|
281
282
|
// Requires [user
|
|
282
|
-
// authentication](https://developers.google.com/chat/
|
|
283
|
+
// authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
|
|
283
284
|
rpc CreateSpace(CreateSpaceRequest) returns (Space) {
|
|
284
285
|
option (google.api.http) = {
|
|
285
286
|
post: "/v1/spaces"
|
|
@@ -291,8 +292,8 @@ service ChatService {
|
|
|
291
292
|
// Creates a space and adds specified users to it. The calling user is
|
|
292
293
|
// automatically added to the space, and shouldn't be specified as a
|
|
293
294
|
// membership in the request. For an example, see
|
|
294
|
-
// [Set up a
|
|
295
|
-
//
|
|
295
|
+
// [Set up a space with initial
|
|
296
|
+
// members](https://developers.google.com/workspace/chat/set-up-spaces).
|
|
296
297
|
//
|
|
297
298
|
// To specify the human members to add, add memberships with the appropriate
|
|
298
299
|
// `member.name` in the `SetUpSpaceRequest`. To add a human user, use
|
|
@@ -316,8 +317,8 @@ service ChatService {
|
|
|
316
317
|
// can only use this method to set up a DM with the calling app. To add the
|
|
317
318
|
// calling app as a member of a space or an existing DM between two human
|
|
318
319
|
// users, see
|
|
319
|
-
// [
|
|
320
|
-
//
|
|
320
|
+
// [Invite or add a user or app to a
|
|
321
|
+
// space](https://developers.google.com/workspace/chat/create-members).
|
|
321
322
|
//
|
|
322
323
|
// If a DM already exists between two users, even when one user blocks the
|
|
323
324
|
// other at the time a request is made, then the existing DM is returned.
|
|
@@ -328,7 +329,7 @@ service ChatService {
|
|
|
328
329
|
// might already use this display name.
|
|
329
330
|
//
|
|
330
331
|
// Requires [user
|
|
331
|
-
// authentication](https://developers.google.com/chat/
|
|
332
|
+
// authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
|
|
332
333
|
rpc SetUpSpace(SetUpSpaceRequest) returns (Space) {
|
|
333
334
|
option (google.api.http) = {
|
|
334
335
|
post: "/v1/spaces:setup"
|
|
@@ -338,14 +339,14 @@ service ChatService {
|
|
|
338
339
|
|
|
339
340
|
// Updates a space. For an example, see
|
|
340
341
|
// [Update a
|
|
341
|
-
// space](https://developers.google.com/chat/
|
|
342
|
+
// space](https://developers.google.com/workspace/chat/update-spaces).
|
|
342
343
|
//
|
|
343
344
|
// If you're updating the `displayName` field and receive the error message
|
|
344
345
|
// `ALREADY_EXISTS`, try a different display name.. An existing space within
|
|
345
346
|
// the Google Workspace organization might already use this display name.
|
|
346
347
|
//
|
|
347
348
|
// Requires [user
|
|
348
|
-
// authentication](https://developers.google.com/chat/
|
|
349
|
+
// authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
|
|
349
350
|
rpc UpdateSpace(UpdateSpaceRequest) returns (Space) {
|
|
350
351
|
option (google.api.http) = {
|
|
351
352
|
patch: "/v1/{space.name=spaces/*}"
|
|
@@ -358,9 +359,9 @@ service ChatService {
|
|
|
358
359
|
// that the space's child resources—like messages posted in the space and
|
|
359
360
|
// memberships in the space—are also deleted. For an example, see
|
|
360
361
|
// [Delete a
|
|
361
|
-
// space](https://developers.google.com/chat/
|
|
362
|
+
// space](https://developers.google.com/workspace/chat/delete-spaces).
|
|
362
363
|
// Requires [user
|
|
363
|
-
// authentication](https://developers.google.com/chat/
|
|
364
|
+
// authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
|
|
364
365
|
// from a user who has permission to delete the space.
|
|
365
366
|
rpc DeleteSpace(DeleteSpaceRequest) returns (google.protobuf.Empty) {
|
|
366
367
|
option (google.api.http) = {
|
|
@@ -370,11 +371,11 @@ service ChatService {
|
|
|
370
371
|
}
|
|
371
372
|
|
|
372
373
|
// Completes the
|
|
373
|
-
// [import process](https://developers.google.com/chat/
|
|
374
|
+
// [import process](https://developers.google.com/workspace/chat/import-data)
|
|
374
375
|
// for the specified space and makes it visible to users.
|
|
375
376
|
// Requires app authentication and domain-wide delegation. For more
|
|
376
377
|
// information, see [Authorize Google Chat apps to import
|
|
377
|
-
// data](https://developers.google.com/chat/
|
|
378
|
+
// data](https://developers.google.com/workspace/chat/authorize-import).
|
|
378
379
|
rpc CompleteImportSpace(CompleteImportSpaceRequest)
|
|
379
380
|
returns (CompleteImportSpaceResponse) {
|
|
380
381
|
option (google.api.http) = {
|
|
@@ -389,19 +390,19 @@ service ChatService {
|
|
|
389
390
|
// [Find a direct message](/chat/api/guides/v1/spaces/find-direct-message).
|
|
390
391
|
//
|
|
391
392
|
// With [user
|
|
392
|
-
// authentication](https://developers.google.com/chat/
|
|
393
|
+
// authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user),
|
|
393
394
|
// returns the direct message space between the specified user and the
|
|
394
395
|
// authenticated user.
|
|
395
396
|
//
|
|
396
397
|
// With [app
|
|
397
|
-
// authentication](https://developers.google.com/chat/
|
|
398
|
+
// authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app),
|
|
398
399
|
// returns the direct message space between the specified user and the calling
|
|
399
400
|
// Chat app.
|
|
400
401
|
//
|
|
401
402
|
// Requires [user
|
|
402
|
-
// authentication](https://developers.google.com/chat/
|
|
403
|
+
// authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
|
|
403
404
|
// or [app
|
|
404
|
-
// authentication](https://developers.google.com/chat/
|
|
405
|
+
// authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app).
|
|
405
406
|
rpc FindDirectMessage(FindDirectMessageRequest) returns (Space) {
|
|
406
407
|
option (google.api.http) = {
|
|
407
408
|
get: "/v1/spaces:findDirectMessage"
|
|
@@ -410,13 +411,13 @@ service ChatService {
|
|
|
410
411
|
|
|
411
412
|
// Creates a human membership or app membership for the calling app. Creating
|
|
412
413
|
// memberships for other apps isn't supported. For an example, see
|
|
413
|
-
// [
|
|
414
|
-
//
|
|
414
|
+
// [Invite or add a user or a Google Chat app to a
|
|
415
|
+
// space](https://developers.google.com/workspace/chat/create-members).
|
|
415
416
|
// When creating a membership, if the specified member has their auto-accept
|
|
416
417
|
// policy turned off, then they're invited, and must accept the space
|
|
417
418
|
// invitation before joining. Otherwise, creating a membership adds the member
|
|
418
419
|
// directly to the specified space. Requires [user
|
|
419
|
-
// authentication](https://developers.google.com/chat/
|
|
420
|
+
// authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
|
|
420
421
|
//
|
|
421
422
|
// To specify the member to add, set the `membership.member.name` in the
|
|
422
423
|
// `CreateMembershipRequest`:
|
|
@@ -440,12 +441,22 @@ service ChatService {
|
|
|
440
441
|
option (google.api.method_signature) = "parent,membership";
|
|
441
442
|
}
|
|
442
443
|
|
|
444
|
+
// Updates a membership. Requires [user
|
|
445
|
+
// authentication](https://developers.google.com/chat/api/guides/auth/users).
|
|
446
|
+
rpc UpdateMembership(UpdateMembershipRequest) returns (Membership) {
|
|
447
|
+
option (google.api.http) = {
|
|
448
|
+
patch: "/v1/{membership.name=spaces/*/members/*}"
|
|
449
|
+
body: "membership"
|
|
450
|
+
};
|
|
451
|
+
option (google.api.method_signature) = "membership,update_mask";
|
|
452
|
+
}
|
|
453
|
+
|
|
443
454
|
// Deletes a membership. For an example, see
|
|
444
|
-
// [
|
|
445
|
-
//
|
|
455
|
+
// [Remove a user or a Google Chat app from a
|
|
456
|
+
// space](https://developers.google.com/workspace/chat/delete-members).
|
|
446
457
|
//
|
|
447
458
|
// Requires [user
|
|
448
|
-
// authentication](https://developers.google.com/chat/
|
|
459
|
+
// authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
|
|
449
460
|
rpc DeleteMembership(DeleteMembershipRequest) returns (Membership) {
|
|
450
461
|
option (google.api.http) = {
|
|
451
462
|
delete: "/v1/{name=spaces/*/members/*}"
|
|
@@ -453,12 +464,12 @@ service ChatService {
|
|
|
453
464
|
option (google.api.method_signature) = "name";
|
|
454
465
|
}
|
|
455
466
|
|
|
456
|
-
// Creates a reaction and adds it to a message.
|
|
457
|
-
//
|
|
458
|
-
// reaction
|
|
467
|
+
// Creates a reaction and adds it to a message. Only unicode emojis are
|
|
468
|
+
// supported. For an example, see
|
|
469
|
+
// [Add a reaction to a
|
|
470
|
+
// message](https://developers.google.com/workspace/chat/create-reactions).
|
|
459
471
|
// Requires [user
|
|
460
|
-
// authentication](https://developers.google.com/chat/
|
|
461
|
-
// Only unicode emoji are supported.
|
|
472
|
+
// authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
|
|
462
473
|
rpc CreateReaction(CreateReactionRequest) returns (Reaction) {
|
|
463
474
|
option (google.api.http) = {
|
|
464
475
|
post: "/v1/{parent=spaces/*/messages/*}/reactions"
|
|
@@ -468,10 +479,10 @@ service ChatService {
|
|
|
468
479
|
}
|
|
469
480
|
|
|
470
481
|
// Lists reactions to a message. For an example, see
|
|
471
|
-
// [List
|
|
472
|
-
//
|
|
482
|
+
// [List reactions for a
|
|
483
|
+
// message](https://developers.google.com/workspace/chat/list-reactions).
|
|
473
484
|
// Requires [user
|
|
474
|
-
// authentication](https://developers.google.com/chat/
|
|
485
|
+
// authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
|
|
475
486
|
rpc ListReactions(ListReactionsRequest) returns (ListReactionsResponse) {
|
|
476
487
|
option (google.api.http) = {
|
|
477
488
|
get: "/v1/{parent=spaces/*/messages/*}/reactions"
|
|
@@ -479,11 +490,12 @@ service ChatService {
|
|
|
479
490
|
option (google.api.method_signature) = "parent";
|
|
480
491
|
}
|
|
481
492
|
|
|
482
|
-
// Deletes a reaction to a message.
|
|
493
|
+
// Deletes a reaction to a message. Only unicode emojis are supported.
|
|
494
|
+
// For an example, see
|
|
483
495
|
// [Delete a
|
|
484
|
-
// reaction](https://developers.google.com/chat/
|
|
496
|
+
// reaction](https://developers.google.com/workspace/chat/delete-reactions).
|
|
485
497
|
// Requires [user
|
|
486
|
-
// authentication](https://developers.google.com/chat/
|
|
498
|
+
// authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
|
|
487
499
|
rpc DeleteReaction(DeleteReactionRequest) returns (google.protobuf.Empty) {
|
|
488
500
|
option (google.api.http) = {
|
|
489
501
|
delete: "/v1/{name=spaces/*/messages/*/reactions/*}"
|
|
@@ -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
|
|
@@ -20,6 +20,7 @@ import "google/api/field_behavior.proto";
|
|
|
20
20
|
import "google/api/resource.proto";
|
|
21
21
|
import "google/chat/v1/group.proto";
|
|
22
22
|
import "google/chat/v1/user.proto";
|
|
23
|
+
import "google/protobuf/field_mask.proto";
|
|
23
24
|
import "google/protobuf/timestamp.proto";
|
|
24
25
|
|
|
25
26
|
option csharp_namespace = "Google.Apps.Chat.V1";
|
|
@@ -89,7 +90,6 @@ message Membership {
|
|
|
89
90
|
// Optional. User's role within a Chat space, which determines their permitted
|
|
90
91
|
// actions in the space.
|
|
91
92
|
//
|
|
92
|
-
// [Developer Preview](https://developers.google.com/workspace/preview):
|
|
93
93
|
// This field can only be used as input in `UpdateMembership`.
|
|
94
94
|
MembershipRole role = 7 [(google.api.field_behavior) = OPTIONAL];
|
|
95
95
|
|
|
@@ -98,9 +98,9 @@ message Membership {
|
|
|
98
98
|
oneof memberType {
|
|
99
99
|
// The Google Chat user or app the membership corresponds to.
|
|
100
100
|
// If your Chat app [authenticates as a
|
|
101
|
-
// user](https://developers.google.com/chat/
|
|
102
|
-
// output populates the
|
|
103
|
-
// [user](https://developers.google.com/chat/api/reference/rest/v1/User)
|
|
101
|
+
// user](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user),
|
|
102
|
+
// the output populates the
|
|
103
|
+
// [user](https://developers.google.com/workspace/chat/api/reference/rest/v1/User)
|
|
104
104
|
// `name` and `type`.
|
|
105
105
|
User member = 3;
|
|
106
106
|
|
|
@@ -127,6 +127,7 @@ message Membership {
|
|
|
127
127
|
];
|
|
128
128
|
}
|
|
129
129
|
|
|
130
|
+
// Request message for creating a membership.
|
|
130
131
|
message CreateMembershipRequest {
|
|
131
132
|
// Required. The resource name of the space for which to create the
|
|
132
133
|
// membership.
|
|
@@ -158,6 +159,23 @@ message CreateMembershipRequest {
|
|
|
158
159
|
Membership membership = 2 [(google.api.field_behavior) = REQUIRED];
|
|
159
160
|
}
|
|
160
161
|
|
|
162
|
+
// Request message for updating a membership.
|
|
163
|
+
message UpdateMembershipRequest {
|
|
164
|
+
// Required. The membership to update. Only fields specified by `update_mask`
|
|
165
|
+
// are updated.
|
|
166
|
+
Membership membership = 1 [(google.api.field_behavior) = REQUIRED];
|
|
167
|
+
|
|
168
|
+
// Required. The field paths to update. Separate multiple values with commas
|
|
169
|
+
// or use `*` to update all field paths.
|
|
170
|
+
//
|
|
171
|
+
// Currently supported field paths:
|
|
172
|
+
//
|
|
173
|
+
// - `role`
|
|
174
|
+
google.protobuf.FieldMask update_mask = 2
|
|
175
|
+
[(google.api.field_behavior) = REQUIRED];
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
// Request message for listing memberships.
|
|
161
179
|
message ListMembershipsRequest {
|
|
162
180
|
// Required. The resource name of the space for which to fetch a membership
|
|
163
181
|
// list.
|
|
@@ -175,8 +193,8 @@ message ListMembershipsRequest {
|
|
|
175
193
|
//
|
|
176
194
|
// If unspecified, at most 100 memberships are returned.
|
|
177
195
|
//
|
|
178
|
-
// The maximum value is
|
|
179
|
-
// automatically changed to
|
|
196
|
+
// The maximum value is 1000. If you use a value more than 1000, it's
|
|
197
|
+
// automatically changed to 1000.
|
|
180
198
|
//
|
|
181
199
|
// Negative values return an `INVALID_ARGUMENT` error.
|
|
182
200
|
int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL];
|
|
@@ -192,9 +210,9 @@ message ListMembershipsRequest {
|
|
|
192
210
|
// Optional. A query filter.
|
|
193
211
|
//
|
|
194
212
|
// You can filter memberships by a member's role
|
|
195
|
-
// ([`role`](https://developers.google.com/chat/api/reference/rest/v1/spaces.members#membershiprole))
|
|
213
|
+
// ([`role`](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.members#membershiprole))
|
|
196
214
|
// and type
|
|
197
|
-
// ([`member.type`](https://developers.google.com/chat/api/reference/rest/v1/User#type)).
|
|
215
|
+
// ([`member.type`](https://developers.google.com/workspace/chat/api/reference/rest/v1/User#type)).
|
|
198
216
|
//
|
|
199
217
|
// To filter by role, set `role` to `ROLE_MEMBER` or `ROLE_MANAGER`.
|
|
200
218
|
//
|
|
@@ -217,6 +235,7 @@ message ListMembershipsRequest {
|
|
|
217
235
|
// role = "ROLE_MANAGER" AND role = "ROLE_MEMBER"
|
|
218
236
|
// ```
|
|
219
237
|
//
|
|
238
|
+
//
|
|
220
239
|
// Invalid queries are rejected by the server with an `INVALID_ARGUMENT`
|
|
221
240
|
// error.
|
|
222
241
|
string filter = 5 [(google.api.field_behavior) = OPTIONAL];
|
|
@@ -237,10 +256,11 @@ message ListMembershipsRequest {
|
|
|
237
256
|
// that don't match the filter criteria aren't returned.
|
|
238
257
|
//
|
|
239
258
|
// Currently requires [user
|
|
240
|
-
// authentication](https://developers.google.com/chat/
|
|
259
|
+
// authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
|
|
241
260
|
bool show_invited = 7 [(google.api.field_behavior) = OPTIONAL];
|
|
242
261
|
}
|
|
243
262
|
|
|
263
|
+
// Response to list memberships of the space.
|
|
244
264
|
message ListMembershipsResponse {
|
|
245
265
|
// Unordered list. List of memberships in the requested (or first) page.
|
|
246
266
|
repeated Membership memberships = 1
|
|
@@ -251,6 +271,7 @@ message ListMembershipsResponse {
|
|
|
251
271
|
string next_page_token = 2;
|
|
252
272
|
}
|
|
253
273
|
|
|
274
|
+
// Request to get a membership of a space.
|
|
254
275
|
message GetMembershipRequest {
|
|
255
276
|
// Required. Resource name of the membership to retrieve.
|
|
256
277
|
//
|
|
@@ -260,8 +281,8 @@ message GetMembershipRequest {
|
|
|
260
281
|
// Format: `spaces/{space}/members/{member}` or `spaces/{space}/members/app`
|
|
261
282
|
//
|
|
262
283
|
// When [authenticated as a
|
|
263
|
-
// user](https://developers.google.com/chat/
|
|
264
|
-
// use the user's email as an alias for `{member}`. For example,
|
|
284
|
+
// user](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user),
|
|
285
|
+
// you can use the user's email as an alias for `{member}`. For example,
|
|
265
286
|
// `spaces/{space}/members/example@gmail.com` where `example@gmail.com` is the
|
|
266
287
|
// email of the Google Chat user.
|
|
267
288
|
string name = 1 [
|
|
@@ -270,6 +291,7 @@ message GetMembershipRequest {
|
|
|
270
291
|
];
|
|
271
292
|
}
|
|
272
293
|
|
|
294
|
+
// Request to delete a membership in a space.
|
|
273
295
|
message DeleteMembershipRequest {
|
|
274
296
|
// Required. Resource name of the membership to delete. Chat apps can delete
|
|
275
297
|
// human users' or their own memberships. Chat apps can't delete other apps'
|