@google-apps/chat 0.15.0 → 0.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -2
- package/build/protos/google/chat/v1/annotation.proto +80 -5
- package/build/protos/google/chat/v1/chat_service.proto +81 -0
- package/build/protos/google/chat/v1/message.proto +3 -1
- package/build/protos/google/chat/v1/reaction.proto +148 -3
- package/build/protos/protos.d.ts +1905 -354
- package/build/protos/protos.js +5220 -644
- package/build/protos/protos.json +546 -50
- package/build/src/v1/chat_service_client.d.ts +916 -636
- package/build/src/v1/chat_service_client.js +591 -365
- package/build/src/v1/chat_service_client.js.map +1 -1
- package/build/src/v1/chat_service_client_config.json +20 -0
- package/build/src/v1/gapic_metadata.json +44 -0
- package/package.json +4 -4
- package/CHANGELOG.md +0 -119
package/README.md
CHANGED
|
@@ -44,7 +44,7 @@ Google APIs Client Libraries, in [Client Libraries Explained][explained].
|
|
|
44
44
|
1. [Select or create a Cloud Platform project][projects].
|
|
45
45
|
1. [Enable billing for your project][billing].
|
|
46
46
|
1. [Enable the Google Chat API API][enable_api].
|
|
47
|
-
1. [Set up authentication
|
|
47
|
+
1. [Set up authentication][auth] so you can access the
|
|
48
48
|
API from your local workstation.
|
|
49
49
|
|
|
50
50
|
### Installing the client library
|
|
@@ -127,16 +127,19 @@ Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/
|
|
|
127
127
|
| Sample | Source Code | Try it |
|
|
128
128
|
| --------------------------- | --------------------------------- | ------ |
|
|
129
129
|
| Chat_service.complete_import_space | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-chat/samples/generated/v1/chat_service.complete_import_space.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-chat/samples/generated/v1/chat_service.complete_import_space.js,packages/google-chat/samples/README.md) |
|
|
130
|
+
| Chat_service.create_custom_emoji | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-chat/samples/generated/v1/chat_service.create_custom_emoji.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-chat/samples/generated/v1/chat_service.create_custom_emoji.js,packages/google-chat/samples/README.md) |
|
|
130
131
|
| Chat_service.create_membership | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-chat/samples/generated/v1/chat_service.create_membership.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-chat/samples/generated/v1/chat_service.create_membership.js,packages/google-chat/samples/README.md) |
|
|
131
132
|
| Chat_service.create_message | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-chat/samples/generated/v1/chat_service.create_message.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-chat/samples/generated/v1/chat_service.create_message.js,packages/google-chat/samples/README.md) |
|
|
132
133
|
| Chat_service.create_reaction | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-chat/samples/generated/v1/chat_service.create_reaction.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-chat/samples/generated/v1/chat_service.create_reaction.js,packages/google-chat/samples/README.md) |
|
|
133
134
|
| Chat_service.create_space | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-chat/samples/generated/v1/chat_service.create_space.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-chat/samples/generated/v1/chat_service.create_space.js,packages/google-chat/samples/README.md) |
|
|
135
|
+
| Chat_service.delete_custom_emoji | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-chat/samples/generated/v1/chat_service.delete_custom_emoji.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-chat/samples/generated/v1/chat_service.delete_custom_emoji.js,packages/google-chat/samples/README.md) |
|
|
134
136
|
| Chat_service.delete_membership | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-chat/samples/generated/v1/chat_service.delete_membership.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-chat/samples/generated/v1/chat_service.delete_membership.js,packages/google-chat/samples/README.md) |
|
|
135
137
|
| Chat_service.delete_message | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-chat/samples/generated/v1/chat_service.delete_message.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-chat/samples/generated/v1/chat_service.delete_message.js,packages/google-chat/samples/README.md) |
|
|
136
138
|
| Chat_service.delete_reaction | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-chat/samples/generated/v1/chat_service.delete_reaction.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-chat/samples/generated/v1/chat_service.delete_reaction.js,packages/google-chat/samples/README.md) |
|
|
137
139
|
| Chat_service.delete_space | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-chat/samples/generated/v1/chat_service.delete_space.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-chat/samples/generated/v1/chat_service.delete_space.js,packages/google-chat/samples/README.md) |
|
|
138
140
|
| Chat_service.find_direct_message | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-chat/samples/generated/v1/chat_service.find_direct_message.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-chat/samples/generated/v1/chat_service.find_direct_message.js,packages/google-chat/samples/README.md) |
|
|
139
141
|
| Chat_service.get_attachment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-chat/samples/generated/v1/chat_service.get_attachment.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-chat/samples/generated/v1/chat_service.get_attachment.js,packages/google-chat/samples/README.md) |
|
|
142
|
+
| Chat_service.get_custom_emoji | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-chat/samples/generated/v1/chat_service.get_custom_emoji.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-chat/samples/generated/v1/chat_service.get_custom_emoji.js,packages/google-chat/samples/README.md) |
|
|
140
143
|
| Chat_service.get_membership | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-chat/samples/generated/v1/chat_service.get_membership.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-chat/samples/generated/v1/chat_service.get_membership.js,packages/google-chat/samples/README.md) |
|
|
141
144
|
| Chat_service.get_message | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-chat/samples/generated/v1/chat_service.get_message.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-chat/samples/generated/v1/chat_service.get_message.js,packages/google-chat/samples/README.md) |
|
|
142
145
|
| Chat_service.get_space | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-chat/samples/generated/v1/chat_service.get_space.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-chat/samples/generated/v1/chat_service.get_space.js,packages/google-chat/samples/README.md) |
|
|
@@ -144,6 +147,7 @@ Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/
|
|
|
144
147
|
| Chat_service.get_space_notification_setting | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-chat/samples/generated/v1/chat_service.get_space_notification_setting.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-chat/samples/generated/v1/chat_service.get_space_notification_setting.js,packages/google-chat/samples/README.md) |
|
|
145
148
|
| Chat_service.get_space_read_state | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-chat/samples/generated/v1/chat_service.get_space_read_state.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-chat/samples/generated/v1/chat_service.get_space_read_state.js,packages/google-chat/samples/README.md) |
|
|
146
149
|
| Chat_service.get_thread_read_state | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-chat/samples/generated/v1/chat_service.get_thread_read_state.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-chat/samples/generated/v1/chat_service.get_thread_read_state.js,packages/google-chat/samples/README.md) |
|
|
150
|
+
| Chat_service.list_custom_emojis | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-chat/samples/generated/v1/chat_service.list_custom_emojis.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-chat/samples/generated/v1/chat_service.list_custom_emojis.js,packages/google-chat/samples/README.md) |
|
|
147
151
|
| Chat_service.list_memberships | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-chat/samples/generated/v1/chat_service.list_memberships.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-chat/samples/generated/v1/chat_service.list_memberships.js,packages/google-chat/samples/README.md) |
|
|
148
152
|
| Chat_service.list_messages | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-chat/samples/generated/v1/chat_service.list_messages.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-chat/samples/generated/v1/chat_service.list_messages.js,packages/google-chat/samples/README.md) |
|
|
149
153
|
| Chat_service.list_reactions | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-chat/samples/generated/v1/chat_service.list_reactions.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-chat/samples/generated/v1/chat_service.list_reactions.js,packages/google-chat/samples/README.md) |
|
|
@@ -226,4 +230,4 @@ See [LICENSE](https://github.com/googleapis/google-cloud-node/blob/main/LICENSE)
|
|
|
226
230
|
[projects]: https://console.cloud.google.com/project
|
|
227
231
|
[billing]: https://support.google.com/cloud/answer/6293499#enable-billing
|
|
228
232
|
[enable_api]: https://console.cloud.google.com/flows/enableapi?apiid=chat.googleapis.com
|
|
229
|
-
[auth]: https://cloud.google.com/docs/authentication/
|
|
233
|
+
[auth]: https://cloud.google.com/docs/authentication/external/set-up-adc-local
|
|
@@ -16,6 +16,7 @@ syntax = "proto3";
|
|
|
16
16
|
|
|
17
17
|
package google.chat.v1;
|
|
18
18
|
|
|
19
|
+
import "google/api/field_behavior.proto";
|
|
19
20
|
import "google/api/resource.proto";
|
|
20
21
|
import "google/chat/v1/attachment.proto";
|
|
21
22
|
import "google/chat/v1/reaction.proto";
|
|
@@ -30,9 +31,10 @@ option objc_class_prefix = "DYNAPIProto";
|
|
|
30
31
|
option php_namespace = "Google\\Apps\\Chat\\V1";
|
|
31
32
|
option ruby_package = "Google::Apps::Chat::V1";
|
|
32
33
|
|
|
33
|
-
// Output only. Annotations associated with the plain-text body of the
|
|
34
|
-
//
|
|
35
|
-
//
|
|
34
|
+
// Output only. Annotations can be associated with the plain-text body of the
|
|
35
|
+
// message or with chips that link to Google Workspace resources like Google
|
|
36
|
+
// Docs or Sheets with `start_index` and `length` of 0. To add basic formatting
|
|
37
|
+
// to a text message, see [Format text
|
|
36
38
|
// messages](https://developers.google.com/workspace/chat/format-messages).
|
|
37
39
|
//
|
|
38
40
|
// Example plain-text message body:
|
|
@@ -66,7 +68,7 @@ message Annotation {
|
|
|
66
68
|
optional int32 start_index = 2;
|
|
67
69
|
|
|
68
70
|
// Length of the substring in the plain-text message body this annotation
|
|
69
|
-
// corresponds to.
|
|
71
|
+
// corresponds to. If not present, indicates a length of 0.
|
|
70
72
|
int32 length = 3;
|
|
71
73
|
|
|
72
74
|
// Additional metadata about the annotation.
|
|
@@ -134,7 +136,10 @@ message SlashCommandMetadata {
|
|
|
134
136
|
bool triggers_dialog = 5;
|
|
135
137
|
}
|
|
136
138
|
|
|
137
|
-
// A rich link to a resource.
|
|
139
|
+
// A rich link to a resource. Rich links can be associated with the plain-text
|
|
140
|
+
// body of the message or represent chips that link to Google Workspace
|
|
141
|
+
// resources like Google Docs or Sheets with `start_index` and `length`
|
|
142
|
+
// of 0.
|
|
138
143
|
message RichLinkMetadata {
|
|
139
144
|
// The rich link type. More types might be added in the future.
|
|
140
145
|
enum RichLinkType {
|
|
@@ -146,6 +151,12 @@ message RichLinkMetadata {
|
|
|
146
151
|
|
|
147
152
|
// A Chat space rich link type. For example, a space smart chip.
|
|
148
153
|
CHAT_SPACE = 2;
|
|
154
|
+
|
|
155
|
+
// A Meet message rich link type. For example, a Meet chip.
|
|
156
|
+
MEET_SPACE = 4;
|
|
157
|
+
|
|
158
|
+
// A Calendar message rich link type. For example, a Calendar chip.
|
|
159
|
+
CALENDAR_EVENT = 5;
|
|
149
160
|
}
|
|
150
161
|
|
|
151
162
|
// The URI of this link.
|
|
@@ -161,6 +172,12 @@ message RichLinkMetadata {
|
|
|
161
172
|
|
|
162
173
|
// Data for a chat space link.
|
|
163
174
|
ChatSpaceLinkData chat_space_link_data = 4;
|
|
175
|
+
|
|
176
|
+
// Data for a Meet space link.
|
|
177
|
+
MeetSpaceLinkData meet_space_link_data = 5;
|
|
178
|
+
|
|
179
|
+
// Data for a Calendar event link.
|
|
180
|
+
CalendarEventLinkData calendar_event_link_data = 6;
|
|
164
181
|
}
|
|
165
182
|
}
|
|
166
183
|
|
|
@@ -204,6 +221,64 @@ message ChatSpaceLinkData {
|
|
|
204
221
|
];
|
|
205
222
|
}
|
|
206
223
|
|
|
224
|
+
// Data for Meet space links.
|
|
225
|
+
message MeetSpaceLinkData {
|
|
226
|
+
// The type of the Meet space.
|
|
227
|
+
enum Type {
|
|
228
|
+
// Default value for the enum. Don't use.
|
|
229
|
+
TYPE_UNSPECIFIED = 0;
|
|
230
|
+
|
|
231
|
+
// The Meet space is a meeting.
|
|
232
|
+
MEETING = 1;
|
|
233
|
+
|
|
234
|
+
// The Meet space is a huddle.
|
|
235
|
+
HUDDLE = 2;
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
// The status of the huddle
|
|
239
|
+
enum HuddleStatus {
|
|
240
|
+
// Default value for the enum. Don't use.
|
|
241
|
+
HUDDLE_STATUS_UNSPECIFIED = 0;
|
|
242
|
+
|
|
243
|
+
// The huddle has started.
|
|
244
|
+
STARTED = 1;
|
|
245
|
+
|
|
246
|
+
// The huddle has ended. In this case the Meet space URI and identifiers
|
|
247
|
+
// will no longer be valid.
|
|
248
|
+
ENDED = 2;
|
|
249
|
+
|
|
250
|
+
// The huddle has been missed. In this case the Meet space URI and
|
|
251
|
+
// identifiers will no longer be valid.
|
|
252
|
+
MISSED = 3;
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
// Meeting code of the linked Meet space.
|
|
256
|
+
string meeting_code = 1;
|
|
257
|
+
|
|
258
|
+
// Indicates the type of the Meet space.
|
|
259
|
+
Type type = 2;
|
|
260
|
+
|
|
261
|
+
// Optional. Output only. If the Meet is a Huddle, indicates the status of the
|
|
262
|
+
// huddle. Otherwise, this is unset.
|
|
263
|
+
HuddleStatus huddle_status = 3 [
|
|
264
|
+
(google.api.field_behavior) = OPTIONAL,
|
|
265
|
+
(google.api.field_behavior) = OUTPUT_ONLY
|
|
266
|
+
];
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
// Data for Calendar event links.
|
|
270
|
+
message CalendarEventLinkData {
|
|
271
|
+
// The [Calendar
|
|
272
|
+
// identifier](https://developers.google.com/workspace/calendar/api/v3/reference/calendars)
|
|
273
|
+
// of the linked Calendar.
|
|
274
|
+
string calendar_id = 1;
|
|
275
|
+
|
|
276
|
+
// The [Event
|
|
277
|
+
// identifier](https://developers.google.com/workspace/calendar/api/v3/reference/events)
|
|
278
|
+
// of the linked Calendar event.
|
|
279
|
+
string event_id = 2;
|
|
280
|
+
}
|
|
281
|
+
|
|
207
282
|
// Type of the annotation.
|
|
208
283
|
enum AnnotationType {
|
|
209
284
|
// Default value for the enum. Don't use.
|
|
@@ -50,6 +50,8 @@ service ChatService {
|
|
|
50
50
|
"https://www.googleapis.com/auth/chat.admin.spaces,"
|
|
51
51
|
"https://www.googleapis.com/auth/chat.admin.spaces.readonly,"
|
|
52
52
|
"https://www.googleapis.com/auth/chat.bot,"
|
|
53
|
+
"https://www.googleapis.com/auth/chat.customemojis,"
|
|
54
|
+
"https://www.googleapis.com/auth/chat.customemojis.readonly,"
|
|
53
55
|
"https://www.googleapis.com/auth/chat.delete,"
|
|
54
56
|
"https://www.googleapis.com/auth/chat.import,"
|
|
55
57
|
"https://www.googleapis.com/auth/chat.memberships,"
|
|
@@ -653,6 +655,85 @@ service ChatService {
|
|
|
653
655
|
option (google.api.method_signature) = "name";
|
|
654
656
|
}
|
|
655
657
|
|
|
658
|
+
// Creates a custom emoji.
|
|
659
|
+
//
|
|
660
|
+
// Custom emojis are only available for Google Workspace accounts, and the
|
|
661
|
+
// administrator must turn custom emojis on for the organization. For more
|
|
662
|
+
// information, see [Learn about custom emojis in Google
|
|
663
|
+
// Chat](https://support.google.com/chat/answer/12800149) and
|
|
664
|
+
// [Manage custom emoji
|
|
665
|
+
// permissions](https://support.google.com/a/answer/12850085).
|
|
666
|
+
//
|
|
667
|
+
// Requires [user
|
|
668
|
+
// authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
|
|
669
|
+
rpc CreateCustomEmoji(CreateCustomEmojiRequest) returns (CustomEmoji) {
|
|
670
|
+
option (google.api.http) = {
|
|
671
|
+
post: "/v1/customEmojis"
|
|
672
|
+
body: "custom_emoji"
|
|
673
|
+
};
|
|
674
|
+
option (google.api.method_signature) = "custom_emoji";
|
|
675
|
+
}
|
|
676
|
+
|
|
677
|
+
// Returns details about a custom emoji.
|
|
678
|
+
//
|
|
679
|
+
// Custom emojis are only available for Google Workspace accounts, and the
|
|
680
|
+
// administrator must turn custom emojis on for the organization. For more
|
|
681
|
+
// information, see [Learn about custom emojis in Google
|
|
682
|
+
// Chat](https://support.google.com/chat/answer/12800149) and
|
|
683
|
+
// [Manage custom emoji
|
|
684
|
+
// permissions](https://support.google.com/a/answer/12850085).
|
|
685
|
+
//
|
|
686
|
+
// Requires [user
|
|
687
|
+
// authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
|
|
688
|
+
rpc GetCustomEmoji(GetCustomEmojiRequest) returns (CustomEmoji) {
|
|
689
|
+
option (google.api.http) = {
|
|
690
|
+
get: "/v1/{name=customEmojis/*}"
|
|
691
|
+
};
|
|
692
|
+
option (google.api.method_signature) = "name";
|
|
693
|
+
}
|
|
694
|
+
|
|
695
|
+
// Lists custom emojis visible to the authenticated user.
|
|
696
|
+
//
|
|
697
|
+
// Custom emojis are only available for Google Workspace accounts, and the
|
|
698
|
+
// administrator must turn custom emojis on for the organization. For more
|
|
699
|
+
// information, see [Learn about custom emojis in Google
|
|
700
|
+
// Chat](https://support.google.com/chat/answer/12800149) and
|
|
701
|
+
// [Manage custom emoji
|
|
702
|
+
// permissions](https://support.google.com/a/answer/12850085).
|
|
703
|
+
//
|
|
704
|
+
// Requires [user
|
|
705
|
+
// authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
|
|
706
|
+
rpc ListCustomEmojis(ListCustomEmojisRequest)
|
|
707
|
+
returns (ListCustomEmojisResponse) {
|
|
708
|
+
option (google.api.http) = {
|
|
709
|
+
get: "/v1/customEmojis"
|
|
710
|
+
};
|
|
711
|
+
option (google.api.method_signature) = "";
|
|
712
|
+
}
|
|
713
|
+
|
|
714
|
+
// Deletes a custom emoji. By default, users can only delete custom emoji they
|
|
715
|
+
// created. [Emoji managers](https://support.google.com/a/answer/12850085)
|
|
716
|
+
// assigned by the administrator can delete any custom emoji in the
|
|
717
|
+
// organization. See [Learn about custom emojis in Google
|
|
718
|
+
// Chat](https://support.google.com/chat/answer/12800149).
|
|
719
|
+
//
|
|
720
|
+
// Custom emojis are only available for Google Workspace accounts, and the
|
|
721
|
+
// administrator must turn custom emojis on for the organization. For more
|
|
722
|
+
// information, see [Learn about custom emojis in Google
|
|
723
|
+
// Chat](https://support.google.com/chat/answer/12800149) and
|
|
724
|
+
// [Manage custom emoji
|
|
725
|
+
// permissions](https://support.google.com/a/answer/12850085).
|
|
726
|
+
//
|
|
727
|
+
// Requires [user
|
|
728
|
+
// authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
|
|
729
|
+
rpc DeleteCustomEmoji(DeleteCustomEmojiRequest)
|
|
730
|
+
returns (google.protobuf.Empty) {
|
|
731
|
+
option (google.api.http) = {
|
|
732
|
+
delete: "/v1/{name=customEmojis/*}"
|
|
733
|
+
};
|
|
734
|
+
option (google.api.method_signature) = "name";
|
|
735
|
+
}
|
|
736
|
+
|
|
656
737
|
// Returns details about a user's read state within a space, used to identify
|
|
657
738
|
// read and unread messages. For an example, see [Get details about a user's
|
|
658
739
|
// space read
|
|
@@ -152,7 +152,9 @@ message Message {
|
|
|
152
152
|
// [Card builder](https://addons.gsuite.google.com/uikit/builder)
|
|
153
153
|
repeated CardWithId cards_v2 = 22 [(google.api.field_behavior) = OPTIONAL];
|
|
154
154
|
|
|
155
|
-
// Output only. Annotations associated with the
|
|
155
|
+
// Output only. Annotations can be associated with the plain-text body of the
|
|
156
|
+
// message or with chips that link to Google Workspace resources like Google
|
|
157
|
+
// Docs or Sheets with `start_index` and `length` of 0.
|
|
156
158
|
repeated Annotation annotations = 10
|
|
157
159
|
[(google.api.field_behavior) = OUTPUT_ONLY];
|
|
158
160
|
|
|
@@ -61,13 +61,74 @@ message Emoji {
|
|
|
61
61
|
}
|
|
62
62
|
}
|
|
63
63
|
|
|
64
|
-
// Represents a custom emoji.
|
|
64
|
+
// Represents a [custom emoji](https://support.google.com/chat/answer/12800149).
|
|
65
65
|
message CustomEmoji {
|
|
66
|
+
option (google.api.resource) = {
|
|
67
|
+
type: "chat.googleapis.com/CustomEmoji"
|
|
68
|
+
pattern: "customEmojis/{custom_emoji}"
|
|
69
|
+
plural: "customEmojis"
|
|
70
|
+
singular: "customEmoji"
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
// Payload data for the custom emoji.
|
|
74
|
+
message CustomEmojiPayload {
|
|
75
|
+
// Required. Input only. The image used for the custom emoji.
|
|
76
|
+
//
|
|
77
|
+
// The payload must be under 256 KB and the dimension of
|
|
78
|
+
// the image must be square and between 64 and 500 pixels. The
|
|
79
|
+
// restrictions are subject to change.
|
|
80
|
+
bytes file_content = 1 [
|
|
81
|
+
(google.api.field_behavior) = INPUT_ONLY,
|
|
82
|
+
(google.api.field_behavior) = REQUIRED
|
|
83
|
+
];
|
|
84
|
+
|
|
85
|
+
// Required. Input only. The image file name.
|
|
86
|
+
//
|
|
87
|
+
// Supported file extensions: `.png`, `.jpg`, `.gif`.
|
|
88
|
+
string filename = 2 [
|
|
89
|
+
(google.api.field_behavior) = INPUT_ONLY,
|
|
90
|
+
(google.api.field_behavior) = REQUIRED
|
|
91
|
+
];
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
// Identifier. The resource name of the custom emoji, assigned by the server.
|
|
95
|
+
//
|
|
96
|
+
// Format: `customEmojis/{customEmoji}`
|
|
97
|
+
string name = 2 [(google.api.field_behavior) = IDENTIFIER];
|
|
98
|
+
|
|
66
99
|
// Output only. Unique key for the custom emoji resource.
|
|
67
100
|
string uid = 1 [
|
|
68
101
|
(google.api.field_info).format = UUID4,
|
|
69
102
|
(google.api.field_behavior) = OUTPUT_ONLY
|
|
70
103
|
];
|
|
104
|
+
|
|
105
|
+
// Optional. Immutable. User-provided name for the custom emoji, which is
|
|
106
|
+
// unique within the organization.
|
|
107
|
+
//
|
|
108
|
+
// Required when the custom emoji is created, output only otherwise.
|
|
109
|
+
//
|
|
110
|
+
// Emoji names must start and end with colons, must be lowercase and can only
|
|
111
|
+
// contain alphanumeric characters, hyphens, and underscores.
|
|
112
|
+
// Hyphens and underscores should be used to separate words and cannot be used
|
|
113
|
+
// consecutively.
|
|
114
|
+
//
|
|
115
|
+
// Example: `:valid-emoji-name:`
|
|
116
|
+
string emoji_name = 3 [
|
|
117
|
+
(google.api.field_behavior) = OPTIONAL,
|
|
118
|
+
(google.api.field_behavior) = IMMUTABLE
|
|
119
|
+
];
|
|
120
|
+
|
|
121
|
+
// Output only. A temporary image URL for the custom emoji, valid for at least
|
|
122
|
+
// 10 minutes. Note that this is not populated in the response when the custom
|
|
123
|
+
// emoji is created.
|
|
124
|
+
string temporary_image_uri = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
|
|
125
|
+
|
|
126
|
+
// Optional. Input only. Payload data.
|
|
127
|
+
// Required when the custom emoji is created.
|
|
128
|
+
CustomEmojiPayload payload = 5 [
|
|
129
|
+
(google.api.field_behavior) = INPUT_ONLY,
|
|
130
|
+
(google.api.field_behavior) = OPTIONAL
|
|
131
|
+
];
|
|
71
132
|
}
|
|
72
133
|
|
|
73
134
|
// The number of people who reacted to a message with a specific emoji.
|
|
@@ -163,8 +224,7 @@ message ListReactionsRequest {
|
|
|
163
224
|
// AND user.name = "users/{user}"
|
|
164
225
|
// ```
|
|
165
226
|
//
|
|
166
|
-
// Invalid queries are rejected
|
|
167
|
-
// error.
|
|
227
|
+
// Invalid queries are rejected with an `INVALID_ARGUMENT` error.
|
|
168
228
|
string filter = 4 [(google.api.field_behavior) = OPTIONAL];
|
|
169
229
|
}
|
|
170
230
|
|
|
@@ -188,3 +248,88 @@ message DeleteReactionRequest {
|
|
|
188
248
|
(google.api.resource_reference) = { type: "chat.googleapis.com/Reaction" }
|
|
189
249
|
];
|
|
190
250
|
}
|
|
251
|
+
|
|
252
|
+
// A request to create a custom emoji.
|
|
253
|
+
message CreateCustomEmojiRequest {
|
|
254
|
+
// Required. The custom emoji to create.
|
|
255
|
+
CustomEmoji custom_emoji = 1 [(google.api.field_behavior) = REQUIRED];
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
// A request to return a single custom emoji.
|
|
259
|
+
message GetCustomEmojiRequest {
|
|
260
|
+
// Required. Resource name of the custom emoji.
|
|
261
|
+
//
|
|
262
|
+
// Format: `customEmojis/{customEmoji}`
|
|
263
|
+
//
|
|
264
|
+
// You can use the emoji name as an alias for `{customEmoji}`. For example,
|
|
265
|
+
// `customEmojis/:example-emoji:` where `:example-emoji:` is the emoji name
|
|
266
|
+
// for a custom emoji.
|
|
267
|
+
string name = 1 [
|
|
268
|
+
(google.api.field_behavior) = REQUIRED,
|
|
269
|
+
(google.api.resource_reference) = {
|
|
270
|
+
type: "chat.googleapis.com/CustomEmoji"
|
|
271
|
+
}
|
|
272
|
+
];
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
// A request to return a list of custom emojis.
|
|
276
|
+
message ListCustomEmojisRequest {
|
|
277
|
+
// Optional. The maximum number of custom emojis returned. The service can
|
|
278
|
+
// return fewer custom emojis than this value. If unspecified, the default
|
|
279
|
+
// value is 25. The maximum value is 200; values above 200 are changed to 200.
|
|
280
|
+
int32 page_size = 1 [(google.api.field_behavior) = OPTIONAL];
|
|
281
|
+
|
|
282
|
+
// Optional. (If resuming from a previous query.)
|
|
283
|
+
//
|
|
284
|
+
// A page token received from a previous list custom emoji call. Provide this
|
|
285
|
+
// to retrieve the subsequent page.
|
|
286
|
+
//
|
|
287
|
+
// When paginating, the filter value should match the call that provided the
|
|
288
|
+
// page token. Passing a different value might lead to unexpected results.
|
|
289
|
+
string page_token = 2 [(google.api.field_behavior) = OPTIONAL];
|
|
290
|
+
|
|
291
|
+
// Optional. A query filter.
|
|
292
|
+
//
|
|
293
|
+
// Supports filtering by creator.
|
|
294
|
+
//
|
|
295
|
+
// To filter by creator, you must specify a valid value. Currently only
|
|
296
|
+
// `creator("users/me")` and `NOT creator("users/me")` are accepted to filter
|
|
297
|
+
// custom emojis by whether they were created by the calling user or not.
|
|
298
|
+
//
|
|
299
|
+
// For example, the following query returns custom emojis created by the
|
|
300
|
+
// caller:
|
|
301
|
+
// ```
|
|
302
|
+
// creator("users/me")
|
|
303
|
+
// ```
|
|
304
|
+
//
|
|
305
|
+
// Invalid queries are rejected with an `INVALID_ARGUMENT` error.
|
|
306
|
+
string filter = 3 [(google.api.field_behavior) = OPTIONAL];
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
// A response to list custom emojis.
|
|
310
|
+
message ListCustomEmojisResponse {
|
|
311
|
+
// Unordered list. List of custom emojis.
|
|
312
|
+
repeated CustomEmoji custom_emojis = 1
|
|
313
|
+
[(google.api.field_behavior) = UNORDERED_LIST];
|
|
314
|
+
|
|
315
|
+
// A token that you can send as `pageToken` to retrieve the next page of
|
|
316
|
+
// results. If empty, there are no subsequent pages.
|
|
317
|
+
string next_page_token = 2;
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
// Request for deleting a custom emoji.
|
|
321
|
+
message DeleteCustomEmojiRequest {
|
|
322
|
+
// Required. Resource name of the custom emoji to delete.
|
|
323
|
+
//
|
|
324
|
+
// Format: `customEmojis/{customEmoji}`
|
|
325
|
+
//
|
|
326
|
+
// You can use the emoji name as an alias for `{customEmoji}`. For example,
|
|
327
|
+
// `customEmojis/:example-emoji:` where `:example-emoji:` is the emoji name
|
|
328
|
+
// for a custom emoji.
|
|
329
|
+
string name = 1 [
|
|
330
|
+
(google.api.field_behavior) = REQUIRED,
|
|
331
|
+
(google.api.resource_reference) = {
|
|
332
|
+
type: "chat.googleapis.com/CustomEmoji"
|
|
333
|
+
}
|
|
334
|
+
];
|
|
335
|
+
}
|