@google-apps/chat 0.22.0 → 0.23.1
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 +7 -0
- package/build/protos/google/apps/card/v1/card.proto +21 -1
- package/build/protos/google/chat/v1/chat_service.proto +152 -12
- package/build/protos/google/chat/v1/message.proto +75 -1
- package/build/protos/google/chat/v1/section.proto +344 -0
- package/build/protos/protos.d.ts +1783 -0
- package/build/protos/protos.js +13397 -9237
- package/build/protos/protos.json +514 -2
- package/build/src/index.js +1 -1
- package/build/src/v1/chat_service_client.d.ts +592 -11
- package/build/src/v1/chat_service_client.js +578 -2
- package/build/src/v1/chat_service_client.js.map +1 -1
- package/build/src/v1/chat_service_client_config.json +35 -0
- package/build/src/v1/chat_service_proto_list.json +1 -0
- package/build/src/v1/gapic_metadata.json +78 -0
- package/package.json +10 -2
- package/LICENSE +0 -202
|
@@ -0,0 +1,344 @@
|
|
|
1
|
+
// Copyright 2026 Google LLC
|
|
2
|
+
//
|
|
3
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
// you may not use this file except in compliance with the License.
|
|
5
|
+
// You may obtain a copy of the License at
|
|
6
|
+
//
|
|
7
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
//
|
|
9
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
// See the License for the specific language governing permissions and
|
|
13
|
+
// limitations under the License.
|
|
14
|
+
|
|
15
|
+
syntax = "proto3";
|
|
16
|
+
|
|
17
|
+
package google.chat.v1;
|
|
18
|
+
|
|
19
|
+
import "google/api/field_behavior.proto";
|
|
20
|
+
import "google/api/resource.proto";
|
|
21
|
+
import "google/protobuf/field_mask.proto";
|
|
22
|
+
|
|
23
|
+
option csharp_namespace = "Google.Apps.Chat.V1";
|
|
24
|
+
option go_package = "cloud.google.com/go/chat/apiv1/chatpb;chatpb";
|
|
25
|
+
option java_multiple_files = true;
|
|
26
|
+
option java_outer_classname = "SectionProto";
|
|
27
|
+
option java_package = "com.google.chat.v1";
|
|
28
|
+
option objc_class_prefix = "DYNAPIProto";
|
|
29
|
+
option php_namespace = "Google\\Apps\\Chat\\V1";
|
|
30
|
+
option ruby_package = "Google::Apps::Chat::V1";
|
|
31
|
+
option (google.api.resource_definition) = {
|
|
32
|
+
type: "chat.googleapis.com/User"
|
|
33
|
+
pattern: "users/{user}"
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
// Represents a [section](https://support.google.com/chat/answer/16059854) in
|
|
37
|
+
// Google Chat. Sections help users organize their spaces. There are two types
|
|
38
|
+
// of sections:
|
|
39
|
+
//
|
|
40
|
+
// 1. **System Sections:** These are predefined sections managed by Google
|
|
41
|
+
// Chat.
|
|
42
|
+
// Their resource names are fixed, and they cannot be created, deleted, or
|
|
43
|
+
// have their `display_name` modified. Examples include:
|
|
44
|
+
// * `users/{user}/sections/default-direct-messages`
|
|
45
|
+
// * `users/{user}/sections/default-spaces`
|
|
46
|
+
// * `users/{user}/sections/default-apps`
|
|
47
|
+
//
|
|
48
|
+
// 2. **Custom Sections:** These are sections created and managed by the user.
|
|
49
|
+
// Creating a custom section using `CreateSection` **requires** a
|
|
50
|
+
// `display_name`. Custom sections can be updated using `UpdateSection` and
|
|
51
|
+
// deleted using `DeleteSection`.
|
|
52
|
+
message Section {
|
|
53
|
+
option (google.api.resource) = {
|
|
54
|
+
type: "chat.googleapis.com/Section"
|
|
55
|
+
pattern: "users/{user}/sections/{section}"
|
|
56
|
+
plural: "sections"
|
|
57
|
+
singular: "section"
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
// Section types.
|
|
61
|
+
enum SectionType {
|
|
62
|
+
// Unspecified section type.
|
|
63
|
+
SECTION_TYPE_UNSPECIFIED = 0;
|
|
64
|
+
|
|
65
|
+
// Custom section.
|
|
66
|
+
CUSTOM_SECTION = 1;
|
|
67
|
+
|
|
68
|
+
// Default section containing
|
|
69
|
+
// [DIRECT_MESSAGE](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces#spacetype)
|
|
70
|
+
// between two human users or
|
|
71
|
+
// [GROUP_CHAT](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces#spacetype)
|
|
72
|
+
// spaces that don't belong to any custom section.
|
|
73
|
+
DEFAULT_DIRECT_MESSAGES = 2;
|
|
74
|
+
|
|
75
|
+
// Default spaces that don't belong to any custom section.
|
|
76
|
+
DEFAULT_SPACES = 3;
|
|
77
|
+
|
|
78
|
+
// Default section containing a user's installed apps.
|
|
79
|
+
DEFAULT_APPS = 6;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
// Identifier. Resource name of the section.
|
|
83
|
+
//
|
|
84
|
+
// For system sections, the section ID is a constant string:
|
|
85
|
+
//
|
|
86
|
+
// - DEFAULT_DIRECT_MESSAGES: `users/{user}/sections/default-direct-messages`
|
|
87
|
+
// - DEFAULT_SPACES: `users/{user}/sections/default-spaces`
|
|
88
|
+
// - DEFAULT_APPS: `users/{user}/sections/default-apps`
|
|
89
|
+
//
|
|
90
|
+
// Format: `users/{user}/sections/{section}`
|
|
91
|
+
string name = 1 [(google.api.field_behavior) = IDENTIFIER];
|
|
92
|
+
|
|
93
|
+
// Optional. The section's display name. Only populated for sections of type
|
|
94
|
+
// `CUSTOM_SECTION`. Supports up to 80 characters. Required when creating a
|
|
95
|
+
// `CUSTOM_SECTION`.
|
|
96
|
+
string display_name = 2 [(google.api.field_behavior) = OPTIONAL];
|
|
97
|
+
|
|
98
|
+
// Output only. The order of the section in relation to other sections.
|
|
99
|
+
// Sections with a lower `sort_order` value appear before sections with a
|
|
100
|
+
// higher value.
|
|
101
|
+
int32 sort_order = 3;
|
|
102
|
+
|
|
103
|
+
// Required. The type of the section.
|
|
104
|
+
SectionType type = 4 [(google.api.field_behavior) = REQUIRED];
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
// A user's defined section item. This is used to represent section items, such
|
|
108
|
+
// as spaces, grouped under a section.
|
|
109
|
+
message SectionItem {
|
|
110
|
+
option (google.api.resource) = {
|
|
111
|
+
type: "chat.googleapis.com/SectionItem"
|
|
112
|
+
pattern: "users/{user}/sections/{section}/items/{item}"
|
|
113
|
+
plural: "sectionItems"
|
|
114
|
+
singular: "sectionItem"
|
|
115
|
+
};
|
|
116
|
+
|
|
117
|
+
// Identifier. The resource name of the section item.
|
|
118
|
+
//
|
|
119
|
+
// Format: `users/{user}/sections/{section}/items/{item}`
|
|
120
|
+
string name = 1 [(google.api.field_behavior) = IDENTIFIER];
|
|
121
|
+
|
|
122
|
+
// Required. The section item.
|
|
123
|
+
oneof item {
|
|
124
|
+
// Optional. The space resource name.
|
|
125
|
+
//
|
|
126
|
+
// Format: `spaces/{space}`
|
|
127
|
+
string space = 2 [
|
|
128
|
+
(google.api.field_behavior) = OPTIONAL,
|
|
129
|
+
(google.api.resource_reference) = { type: "chat.googleapis.com/Space" }
|
|
130
|
+
];
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
// Request message for creating a section.
|
|
135
|
+
message CreateSectionRequest {
|
|
136
|
+
// Required. The parent resource name where the section is created.
|
|
137
|
+
//
|
|
138
|
+
// Format: `users/{user}`
|
|
139
|
+
string parent = 1 [
|
|
140
|
+
(google.api.field_behavior) = REQUIRED,
|
|
141
|
+
(google.api.resource_reference) = { type: "chat.googleapis.com/User" }
|
|
142
|
+
];
|
|
143
|
+
|
|
144
|
+
// Required. The section to create.
|
|
145
|
+
Section section = 2 [(google.api.field_behavior) = REQUIRED];
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
// Request message for deleting a section.
|
|
149
|
+
// [Developer Preview](https://developers.google.com/workspace/preview).
|
|
150
|
+
message DeleteSectionRequest {
|
|
151
|
+
// Required. The name of the section to delete.
|
|
152
|
+
//
|
|
153
|
+
// Format: `users/{user}/sections/{section}`
|
|
154
|
+
string name = 1 [
|
|
155
|
+
(google.api.field_behavior) = REQUIRED,
|
|
156
|
+
(google.api.resource_reference) = { type: "chat.googleapis.com/Section" }
|
|
157
|
+
];
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
// Request message for updating a section.
|
|
161
|
+
message UpdateSectionRequest {
|
|
162
|
+
// Required. The section to update.
|
|
163
|
+
Section section = 1 [(google.api.field_behavior) = REQUIRED];
|
|
164
|
+
|
|
165
|
+
// Required. The mask to specify which fields to update.
|
|
166
|
+
//
|
|
167
|
+
// Currently supported field paths:
|
|
168
|
+
//
|
|
169
|
+
// - `display_name`
|
|
170
|
+
google.protobuf.FieldMask update_mask = 2
|
|
171
|
+
[(google.api.field_behavior) = REQUIRED];
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
// Request message for listing sections.
|
|
175
|
+
message ListSectionsRequest {
|
|
176
|
+
// Required. The parent, which is the user resource name that owns this
|
|
177
|
+
// collection of sections. Only supports listing sections for the calling
|
|
178
|
+
// user. To refer to the calling user, set one of the following:
|
|
179
|
+
//
|
|
180
|
+
// - The `me` alias. For example, `users/me`.
|
|
181
|
+
//
|
|
182
|
+
// - Their Workspace email address. For example, `users/user@example.com`.
|
|
183
|
+
//
|
|
184
|
+
// - Their user id. For example, `users/123456789`.
|
|
185
|
+
//
|
|
186
|
+
// Format: `users/{user}`
|
|
187
|
+
string parent = 1 [
|
|
188
|
+
(google.api.field_behavior) = REQUIRED,
|
|
189
|
+
(google.api.resource_reference) = { type: "chat.googleapis.com/User" }
|
|
190
|
+
];
|
|
191
|
+
|
|
192
|
+
// Optional. The maximum number of sections to return. The service may return
|
|
193
|
+
// fewer than this value.
|
|
194
|
+
//
|
|
195
|
+
// If unspecified, at most 10 sections will be returned.
|
|
196
|
+
//
|
|
197
|
+
// The maximum value is 100. If you use a value more than 100, it's
|
|
198
|
+
// automatically changed to 100.
|
|
199
|
+
//
|
|
200
|
+
// Negative values return an `INVALID_ARGUMENT` error.
|
|
201
|
+
int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL];
|
|
202
|
+
|
|
203
|
+
// Optional. A page token, received from a previous list sections call.
|
|
204
|
+
// Provide this to retrieve the subsequent page.
|
|
205
|
+
//
|
|
206
|
+
// When paginating, all other parameters provided should match the call that
|
|
207
|
+
// provided the page token. Passing different values to the other parameters
|
|
208
|
+
// might lead to unexpected results.
|
|
209
|
+
string page_token = 3 [(google.api.field_behavior) = OPTIONAL];
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
// Response message for listing sections.
|
|
213
|
+
message ListSectionsResponse {
|
|
214
|
+
// The sections from the specified user.
|
|
215
|
+
repeated Section sections = 1;
|
|
216
|
+
|
|
217
|
+
// A token, which can be sent as `page_token` to retrieve the next page.
|
|
218
|
+
// If this field is omitted, there are no subsequent pages.
|
|
219
|
+
string next_page_token = 2;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
// Request message for positioning a section.
|
|
223
|
+
message PositionSectionRequest {
|
|
224
|
+
// The position of the section.
|
|
225
|
+
enum Position {
|
|
226
|
+
// Unspecified position.
|
|
227
|
+
POSITION_UNSPECIFIED = 0;
|
|
228
|
+
|
|
229
|
+
// Start of the list of sections.
|
|
230
|
+
START = 1;
|
|
231
|
+
|
|
232
|
+
// End of the list of sections.
|
|
233
|
+
END = 2;
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
// Required. The resource name of the section to position.
|
|
237
|
+
//
|
|
238
|
+
// Format: `users/{user}/sections/{section}`
|
|
239
|
+
string name = 1 [
|
|
240
|
+
(google.api.field_behavior) = REQUIRED,
|
|
241
|
+
(google.api.resource_reference) = { type: "chat.googleapis.com/Section" }
|
|
242
|
+
];
|
|
243
|
+
|
|
244
|
+
// Required. The new position of the section.
|
|
245
|
+
oneof position {
|
|
246
|
+
// Optional. The absolute position of the section in the list of sections.
|
|
247
|
+
// The position must be greater than 0. If the position is greater than the
|
|
248
|
+
// number of sections, the section will be appended to the end of the list.
|
|
249
|
+
// This operation inserts the section at the given position and shifts the
|
|
250
|
+
// original section at that position, and those below it, to the next
|
|
251
|
+
// position.
|
|
252
|
+
int32 sort_order = 2 [(google.api.field_behavior) = OPTIONAL];
|
|
253
|
+
|
|
254
|
+
// Optional. The relative position of the section in the list of sections.
|
|
255
|
+
Position relative_position = 3 [(google.api.field_behavior) = OPTIONAL];
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
// Response message for positioning a section.
|
|
260
|
+
message PositionSectionResponse {
|
|
261
|
+
// The updated section.
|
|
262
|
+
Section section = 1;
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
// Request message for listing section items.
|
|
266
|
+
message ListSectionItemsRequest {
|
|
267
|
+
// Required. The parent, which is the section resource name that owns this
|
|
268
|
+
// collection of section items. Only supports listing section items for the
|
|
269
|
+
// calling user.
|
|
270
|
+
//
|
|
271
|
+
// When you're filtering by space, use the wildcard `-` to search across all
|
|
272
|
+
// sections. For example, `users/{user}/sections/-`.
|
|
273
|
+
//
|
|
274
|
+
// Format: `users/{user}/sections/{section}`
|
|
275
|
+
string parent = 1 [
|
|
276
|
+
(google.api.field_behavior) = REQUIRED,
|
|
277
|
+
(google.api.resource_reference) = { type: "chat.googleapis.com/Section" }
|
|
278
|
+
];
|
|
279
|
+
|
|
280
|
+
// Optional. The maximum number of section items to return. The service may
|
|
281
|
+
// return fewer than this value.
|
|
282
|
+
//
|
|
283
|
+
// If unspecified, at most 10 section items will be returned.
|
|
284
|
+
//
|
|
285
|
+
// The maximum value is 100. If you use a value more than 100, it's
|
|
286
|
+
// automatically changed to 100.
|
|
287
|
+
//
|
|
288
|
+
// Negative values return an `INVALID_ARGUMENT` error.
|
|
289
|
+
int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL];
|
|
290
|
+
|
|
291
|
+
// Optional. A page token, received from a previous list section items call.
|
|
292
|
+
// Provide this to retrieve the subsequent page.
|
|
293
|
+
//
|
|
294
|
+
// When paginating, all other parameters provided should match the call that
|
|
295
|
+
// provided the page token. Passing different values to the other parameters
|
|
296
|
+
// might lead to unexpected results.
|
|
297
|
+
string page_token = 3 [(google.api.field_behavior) = OPTIONAL];
|
|
298
|
+
|
|
299
|
+
// Optional. A query filter.
|
|
300
|
+
//
|
|
301
|
+
// Currently only supports filtering by space.
|
|
302
|
+
//
|
|
303
|
+
// For example, `space = spaces/{space}`.
|
|
304
|
+
//
|
|
305
|
+
// Invalid queries are rejected with an `INVALID_ARGUMENT` error.
|
|
306
|
+
string filter = 4 [(google.api.field_behavior) = OPTIONAL];
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
// Response message for listing section items.
|
|
310
|
+
message ListSectionItemsResponse {
|
|
311
|
+
// The section items from the specified section.
|
|
312
|
+
repeated SectionItem section_items = 1;
|
|
313
|
+
|
|
314
|
+
// A token, which can be sent as `page_token` to retrieve the next page. If
|
|
315
|
+
// this field is omitted, there are no subsequent pages.
|
|
316
|
+
string next_page_token = 2;
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
// Request message for moving a section item across sections.
|
|
320
|
+
message MoveSectionItemRequest {
|
|
321
|
+
// Required. The resource name of the section item to move.
|
|
322
|
+
//
|
|
323
|
+
// Format: `users/{user}/sections/{section}/items/{item}`
|
|
324
|
+
string name = 1 [
|
|
325
|
+
(google.api.field_behavior) = REQUIRED,
|
|
326
|
+
(google.api.resource_reference) = {
|
|
327
|
+
type: "chat.googleapis.com/SectionItem"
|
|
328
|
+
}
|
|
329
|
+
];
|
|
330
|
+
|
|
331
|
+
// Required. The resource name of the section to move the section item to.
|
|
332
|
+
//
|
|
333
|
+
// Format: `users/{user}/sections/{section}`
|
|
334
|
+
string target_section = 2 [
|
|
335
|
+
(google.api.field_behavior) = REQUIRED,
|
|
336
|
+
(google.api.resource_reference) = { type: "chat.googleapis.com/Section" }
|
|
337
|
+
];
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
// Response message for moving a section item.
|
|
341
|
+
message MoveSectionItemResponse {
|
|
342
|
+
// The updated section item.
|
|
343
|
+
SectionItem section_item = 1;
|
|
344
|
+
}
|