@google-apps/chat 0.1.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 +14 -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 +4 -4
- package/build/protos/google/chat/v1/annotation.proto +46 -4
- package/build/protos/google/chat/v1/attachment.proto +12 -3
- package/build/protos/google/chat/v1/chat_service.proto +95 -83
- package/build/protos/google/chat/v1/contextual_addon.proto +4 -4
- package/build/protos/google/chat/v1/deletion_metadata.proto +3 -3
- package/build/protos/google/chat/v1/group.proto +3 -3
- package/build/protos/google/chat/v1/history_state.proto +3 -3
- package/build/protos/google/chat/v1/matched_url.proto +3 -3
- package/build/protos/google/chat/v1/membership.proto +36 -14
- package/build/protos/google/chat/v1/message.proto +88 -57
- package/build/protos/google/chat/v1/reaction.proto +7 -5
- package/build/protos/google/chat/v1/slash_command.proto +6 -5
- package/build/protos/google/chat/v1/space.proto +31 -20
- package/build/protos/google/chat/v1/space_setup.proto +4 -3
- package/build/protos/google/chat/v1/user.proto +6 -5
- package/build/protos/google/chat/v1/widgets.proto +7 -7
- package/build/protos/protos.d.ts +724 -142
- package/build/protos/protos.js +2007 -576
- package/build/protos/protos.json +179 -47
- package/build/src/v1/chat_service_client.d.ts +174 -135
- package/build/src/v1/chat_service_client.js +58 -31
- 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
|
@@ -18,16 +18,16 @@ package google.chat.v1;
|
|
|
18
18
|
|
|
19
19
|
import "google/rpc/code.proto";
|
|
20
20
|
|
|
21
|
-
option csharp_namespace = "Google.Chat.V1";
|
|
21
|
+
option csharp_namespace = "Google.Apps.Chat.V1";
|
|
22
22
|
option go_package = "cloud.google.com/go/chat/apiv1/chatpb;chatpb";
|
|
23
23
|
option java_multiple_files = true;
|
|
24
24
|
option java_outer_classname = "ActionStatusProto";
|
|
25
25
|
option java_package = "com.google.chat.v1";
|
|
26
|
-
option php_namespace = "Google\\Chat\\V1";
|
|
27
|
-
option ruby_package = "Google::Chat::V1";
|
|
26
|
+
option php_namespace = "Google\\Apps\\Chat\\V1";
|
|
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;
|
|
@@ -16,20 +16,21 @@ syntax = "proto3";
|
|
|
16
16
|
|
|
17
17
|
package google.chat.v1;
|
|
18
18
|
|
|
19
|
+
import "google/chat/v1/attachment.proto";
|
|
19
20
|
import "google/chat/v1/user.proto";
|
|
20
21
|
|
|
21
|
-
option csharp_namespace = "Google.Chat.V1";
|
|
22
|
+
option csharp_namespace = "Google.Apps.Chat.V1";
|
|
22
23
|
option go_package = "cloud.google.com/go/chat/apiv1/chatpb;chatpb";
|
|
23
24
|
option java_multiple_files = true;
|
|
24
25
|
option java_outer_classname = "AnnotationProto";
|
|
25
26
|
option java_package = "com.google.chat.v1";
|
|
26
|
-
option php_namespace = "Google\\Chat\\V1";
|
|
27
|
-
option ruby_package = "Google::Chat::V1";
|
|
27
|
+
option php_namespace = "Google\\Apps\\Chat\\V1";
|
|
28
|
+
option ruby_package = "Google::Apps::Chat::V1";
|
|
28
29
|
|
|
29
30
|
// Output only. Annotations associated with the plain-text body of the message.
|
|
30
31
|
// To add basic formatting to a text message, see
|
|
31
32
|
// [Format text
|
|
32
|
-
// messages](https://developers.google.com/chat/format-messages).
|
|
33
|
+
// messages](https://developers.google.com/workspace/chat/format-messages).
|
|
33
34
|
//
|
|
34
35
|
// Example plain-text message body:
|
|
35
36
|
// ```
|
|
@@ -72,6 +73,9 @@ message Annotation {
|
|
|
72
73
|
|
|
73
74
|
// The metadata for a slash command.
|
|
74
75
|
SlashCommandMetadata slash_command = 5;
|
|
76
|
+
|
|
77
|
+
// The metadata for a rich link.
|
|
78
|
+
RichLinkMetadata rich_link_metadata = 6;
|
|
75
79
|
}
|
|
76
80
|
}
|
|
77
81
|
|
|
@@ -124,6 +128,41 @@ message SlashCommandMetadata {
|
|
|
124
128
|
bool triggers_dialog = 5;
|
|
125
129
|
}
|
|
126
130
|
|
|
131
|
+
// A rich link to a resource.
|
|
132
|
+
message RichLinkMetadata {
|
|
133
|
+
// The rich link type. More types might be added in the future.
|
|
134
|
+
enum RichLinkType {
|
|
135
|
+
// Default value for the enum. Don't use.
|
|
136
|
+
RICH_LINK_TYPE_UNSPECIFIED = 0;
|
|
137
|
+
|
|
138
|
+
// A Google Drive rich link type.
|
|
139
|
+
DRIVE_FILE = 1;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
// The URI of this link.
|
|
143
|
+
string uri = 1;
|
|
144
|
+
|
|
145
|
+
// The rich link type.
|
|
146
|
+
RichLinkType rich_link_type = 2;
|
|
147
|
+
|
|
148
|
+
// Data for the linked resource.
|
|
149
|
+
oneof data {
|
|
150
|
+
// Data for a drive link.
|
|
151
|
+
DriveLinkData drive_link_data = 3;
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
// Data for Google Drive links.
|
|
156
|
+
message DriveLinkData {
|
|
157
|
+
// A
|
|
158
|
+
// [DriveDataRef](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages.attachments#drivedataref)
|
|
159
|
+
// which references a Google Drive file.
|
|
160
|
+
DriveDataRef drive_data_ref = 1;
|
|
161
|
+
|
|
162
|
+
// The mime type of the linked Google Drive resource.
|
|
163
|
+
string mime_type = 2;
|
|
164
|
+
}
|
|
165
|
+
|
|
127
166
|
// Type of the annotation.
|
|
128
167
|
enum AnnotationType {
|
|
129
168
|
// Default value for the enum. Don't use.
|
|
@@ -134,4 +173,7 @@ enum AnnotationType {
|
|
|
134
173
|
|
|
135
174
|
// A slash command is invoked.
|
|
136
175
|
SLASH_COMMAND = 2;
|
|
176
|
+
|
|
177
|
+
// A rich link annotation.
|
|
178
|
+
RICH_LINK = 3;
|
|
137
179
|
}
|
|
@@ -19,13 +19,13 @@ package google.chat.v1;
|
|
|
19
19
|
import "google/api/field_behavior.proto";
|
|
20
20
|
import "google/api/resource.proto";
|
|
21
21
|
|
|
22
|
-
option csharp_namespace = "Google.Chat.V1";
|
|
22
|
+
option csharp_namespace = "Google.Apps.Chat.V1";
|
|
23
23
|
option go_package = "cloud.google.com/go/chat/apiv1/chatpb;chatpb";
|
|
24
24
|
option java_multiple_files = true;
|
|
25
25
|
option java_outer_classname = "AttachmentProto";
|
|
26
26
|
option java_package = "com.google.chat.v1";
|
|
27
|
-
option php_namespace = "Google\\Chat\\V1";
|
|
28
|
-
option ruby_package = "Google::Chat::V1";
|
|
27
|
+
option php_namespace = "Google\\Apps\\Chat\\V1";
|
|
28
|
+
option ruby_package = "Google::Apps::Chat::V1";
|
|
29
29
|
|
|
30
30
|
// An attachment in Google Chat.
|
|
31
31
|
message Attachment {
|
|
@@ -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;
|
|
@@ -26,13 +26,13 @@ import "google/chat/v1/space.proto";
|
|
|
26
26
|
import "google/chat/v1/space_setup.proto";
|
|
27
27
|
import "google/protobuf/empty.proto";
|
|
28
28
|
|
|
29
|
-
option csharp_namespace = "Google.Chat.V1";
|
|
29
|
+
option csharp_namespace = "Google.Apps.Chat.V1";
|
|
30
30
|
option go_package = "cloud.google.com/go/chat/apiv1/chatpb;chatpb";
|
|
31
31
|
option java_multiple_files = true;
|
|
32
32
|
option java_outer_classname = "ChatServiceProto";
|
|
33
33
|
option java_package = "com.google.chat.v1";
|
|
34
|
-
option php_namespace = "Google\\Chat\\V1";
|
|
35
|
-
option ruby_package = "Google::Chat::V1";
|
|
34
|
+
option php_namespace = "Google\\Apps\\Chat\\V1";
|
|
35
|
+
option ruby_package = "Google::Apps::Chat::V1";
|
|
36
36
|
|
|
37
37
|
// Enables developers to build Chat apps and
|
|
38
38
|
// integrations on Google Chat Platform.
|
|
@@ -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/*}"
|
|
@@ -18,13 +18,13 @@ package google.chat.v1;
|
|
|
18
18
|
|
|
19
19
|
import "google/chat/v1/widgets.proto";
|
|
20
20
|
|
|
21
|
-
option csharp_namespace = "Google.Chat.V1";
|
|
21
|
+
option csharp_namespace = "Google.Apps.Chat.V1";
|
|
22
22
|
option go_package = "cloud.google.com/go/chat/apiv1/chatpb;chatpb";
|
|
23
23
|
option java_multiple_files = true;
|
|
24
24
|
option java_outer_classname = "ContextualAddOnProto";
|
|
25
25
|
option java_package = "com.google.chat.v1";
|
|
26
|
-
option php_namespace = "Google\\Chat\\V1";
|
|
27
|
-
option ruby_package = "Google::Chat::V1";
|
|
26
|
+
option php_namespace = "Google\\Apps\\Chat\\V1";
|
|
27
|
+
option ruby_package = "Google::Apps::Chat::V1";
|
|
28
28
|
|
|
29
29
|
// The markup for developers to specify the contents of a contextual AddOn.
|
|
30
30
|
message ContextualAddOnMarkup {
|
|
@@ -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
|