@maxim_mazurok/gapi.client.chat-v1 0.0.20230504 → 0.0.20230516
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/index.d.ts +1412 -316
- package/package.json +1 -1
- package/readme.md +48 -0
- package/tests.ts +4159 -587
package/index.d.ts
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
// This file was generated by https://github.com/Maxim-Mazurok/google-api-typings-generator. Please do not edit it manually.
|
|
10
10
|
// In case of any problems please post issue to https://github.com/Maxim-Mazurok/google-api-typings-generator
|
|
11
11
|
// Generated from: https://chat.googleapis.com/$discovery/rest?version=v1
|
|
12
|
-
// Revision:
|
|
12
|
+
// Revision: 20230516
|
|
13
13
|
|
|
14
14
|
/// <reference types="gapi.client" />
|
|
15
15
|
|
|
@@ -37,7 +37,7 @@ declare namespace gapi.client {
|
|
|
37
37
|
/** Input only. The type of Chat app response. */
|
|
38
38
|
type?:
|
|
39
39
|
string;
|
|
40
|
-
/** Input only. URL for users to
|
|
40
|
+
/** Input only. URL for users to authenticate or configure. (Only for `REQUEST_CONFIG` response types.) */
|
|
41
41
|
url?:
|
|
42
42
|
string;
|
|
43
43
|
}
|
|
@@ -67,7 +67,7 @@ declare namespace gapi.client {
|
|
|
67
67
|
UserMentionMetadata;
|
|
68
68
|
}
|
|
69
69
|
interface Attachment {
|
|
70
|
-
/** A reference to the attachment data. This is used with the media API to download the attachment data. */
|
|
70
|
+
/** A reference to the attachment data. This field is used with the media API to download the attachment data. */
|
|
71
71
|
attachmentDataRef?:
|
|
72
72
|
AttachmentDataRef;
|
|
73
73
|
/** The original file name for the content, not the full path. */
|
|
@@ -76,32 +76,38 @@ declare namespace gapi.client {
|
|
|
76
76
|
/** The content type (MIME type) of the file. */
|
|
77
77
|
contentType?:
|
|
78
78
|
string;
|
|
79
|
-
/** Output only. The download URL which should be used to allow a human user to download the attachment. Chat apps
|
|
79
|
+
/** Output only. The download URL which should be used to allow a human user to download the attachment. Chat apps shouldn't use this URL to download attachment content. */
|
|
80
80
|
downloadUri?:
|
|
81
81
|
string;
|
|
82
|
-
/** A reference to the drive attachment. This is used with the Drive API. */
|
|
82
|
+
/** A reference to the drive attachment. This field is used with the Drive API. */
|
|
83
83
|
driveDataRef?:
|
|
84
84
|
DriveDataRef;
|
|
85
|
-
/** Resource name of the attachment, in the form
|
|
85
|
+
/** Resource name of the attachment, in the form `spaces/*/messages/*/attachments/*`. */
|
|
86
86
|
name?:
|
|
87
87
|
string;
|
|
88
88
|
/** The source of the attachment. */
|
|
89
89
|
source?:
|
|
90
90
|
string;
|
|
91
|
-
/** Output only. The thumbnail URL which should be used to preview the attachment to a human user. Chat apps
|
|
91
|
+
/** Output only. The thumbnail URL which should be used to preview the attachment to a human user. Chat apps shouldn't use this URL to download attachment content. */
|
|
92
92
|
thumbnailUri?:
|
|
93
93
|
string;
|
|
94
94
|
}
|
|
95
95
|
interface AttachmentDataRef {
|
|
96
|
-
/**
|
|
96
|
+
/**
|
|
97
|
+
* Opaque token containing a reference to an uploaded attachment. Treated by clients as an opaque string and used to create or update Chat messages with attachments. [Developer
|
|
98
|
+
* Preview](https://developers.google.com/workspace/preview).
|
|
99
|
+
*/
|
|
100
|
+
attachmentUploadToken?:
|
|
101
|
+
string;
|
|
102
|
+
/** The resource name of the attachment data. This field is used with the media API to download the attachment data. */
|
|
97
103
|
resourceName?:
|
|
98
104
|
string;
|
|
99
105
|
}
|
|
100
106
|
interface Button {
|
|
101
|
-
/** A button with image and onclick action. */
|
|
107
|
+
/** A button with image and `onclick` action. */
|
|
102
108
|
imageButton?:
|
|
103
109
|
ImageButton;
|
|
104
|
-
/** A button with text and onclick action. */
|
|
110
|
+
/** A button with text and `onclick` action. */
|
|
105
111
|
textButton?:
|
|
106
112
|
TextButton;
|
|
107
113
|
}
|
|
@@ -128,7 +134,7 @@ declare namespace gapi.client {
|
|
|
128
134
|
OnClick;
|
|
129
135
|
}
|
|
130
136
|
interface CardHeader {
|
|
131
|
-
/** The image's type (
|
|
137
|
+
/** The image's type (for example, square border or circular border). */
|
|
132
138
|
imageStyle?:
|
|
133
139
|
string;
|
|
134
140
|
/** The URL of the image in the card header. */
|
|
@@ -138,7 +144,7 @@ declare namespace gapi.client {
|
|
|
138
144
|
subtitle?:
|
|
139
145
|
string;
|
|
140
146
|
/**
|
|
141
|
-
* The title must be specified. The header has a fixed height: if both a title and subtitle is specified, each
|
|
147
|
+
* The title must be specified. The header has a fixed height: if both a title and subtitle is specified, each takes up one line. If only the title is specified, it takes up both
|
|
142
148
|
* lines.
|
|
143
149
|
*/
|
|
144
150
|
title?:
|
|
@@ -217,6 +223,11 @@ declare namespace gapi.client {
|
|
|
217
223
|
userLocale?:
|
|
218
224
|
string;
|
|
219
225
|
}
|
|
226
|
+
interface CustomEmoji {
|
|
227
|
+
/** Unique key for the custom emoji resource. */
|
|
228
|
+
uid?:
|
|
229
|
+
string;
|
|
230
|
+
}
|
|
220
231
|
interface DateInput {
|
|
221
232
|
/** Time since epoch time, in milliseconds. */
|
|
222
233
|
msSinceEpoch?:
|
|
@@ -233,6 +244,11 @@ declare namespace gapi.client {
|
|
|
233
244
|
msSinceEpoch?:
|
|
234
245
|
string;
|
|
235
246
|
}
|
|
247
|
+
interface DeletionMetadata {
|
|
248
|
+
/** Indicates who deleted the message. */
|
|
249
|
+
deletionType?:
|
|
250
|
+
string;
|
|
251
|
+
}
|
|
236
252
|
interface DeprecatedEvent {
|
|
237
253
|
/**
|
|
238
254
|
* The form action data associated with an interactive card that was clicked. Only populated for CARD_CLICKED events. See the [Interactive Cards guide](/chat/how-tos/cards-onclick) for
|
|
@@ -288,7 +304,7 @@ declare namespace gapi.client {
|
|
|
288
304
|
User;
|
|
289
305
|
}
|
|
290
306
|
interface Dialog {
|
|
291
|
-
/** Input only. Body of the dialog, which is rendered in a modal. Google Chat apps
|
|
307
|
+
/** Input only. Body of the dialog, which is rendered in a modal. Google Chat apps don't support the following card entities: `DateTimePicker`, `OnChangeAction`. */
|
|
292
308
|
body?:
|
|
293
309
|
GoogleAppsCardV1Card;
|
|
294
310
|
}
|
|
@@ -304,17 +320,33 @@ declare namespace gapi.client {
|
|
|
304
320
|
Dialog;
|
|
305
321
|
}
|
|
306
322
|
interface DriveDataRef {
|
|
307
|
-
/** The
|
|
323
|
+
/** The ID for the drive file. Use with the Drive API. */
|
|
308
324
|
driveFileId?:
|
|
309
325
|
string;
|
|
310
326
|
}
|
|
327
|
+
interface Emoji {
|
|
328
|
+
/** Output only. A custom emoji. */
|
|
329
|
+
customEmoji?:
|
|
330
|
+
CustomEmoji;
|
|
331
|
+
/** A basic emoji represented by a unicode string. */
|
|
332
|
+
unicode?:
|
|
333
|
+
string;
|
|
334
|
+
}
|
|
335
|
+
interface EmojiReactionSummary {
|
|
336
|
+
/** Emoji associated with the reactions. */
|
|
337
|
+
emoji?:
|
|
338
|
+
Emoji;
|
|
339
|
+
/** The total number of reactions using the associated emoji. */
|
|
340
|
+
reactionCount?:
|
|
341
|
+
number;
|
|
342
|
+
}
|
|
311
343
|
// tslint:disable-next-line:no-empty-interface
|
|
312
344
|
interface Empty {
|
|
313
345
|
}
|
|
314
346
|
interface FormAction {
|
|
315
347
|
/**
|
|
316
|
-
* The method name is used to identify which part of the form triggered the form submission. This information is echoed back to the Chat app as part of the card click event.
|
|
317
|
-
*
|
|
348
|
+
* The method name is used to identify which part of the form triggered the form submission. This information is echoed back to the Chat app as part of the card click event. You can
|
|
349
|
+
* use the same method name for several elements that trigger a common behavior.
|
|
318
350
|
*/
|
|
319
351
|
actionMethodName?:
|
|
320
352
|
string;
|
|
@@ -330,11 +362,11 @@ declare namespace gapi.client {
|
|
|
330
362
|
function?:
|
|
331
363
|
string;
|
|
332
364
|
/**
|
|
333
|
-
* Optional. Required when opening a [dialog](https://developers.google.com/chat/how-tos/dialogs). What to do in response to an interaction with a user, such as a user clicking
|
|
334
|
-
*
|
|
365
|
+
* Optional. Required when opening a [dialog](https://developers.google.com/chat/how-tos/dialogs). What to do in response to an interaction with a user, such as a user clicking a
|
|
366
|
+
* button in a card message. If unspecified, the app responds by executing an `action`—like opening a link or running a function—as normal. By specifying an `interaction`, the app can
|
|
335
367
|
* respond in special interactive ways. For example, by setting `interaction` to `OPEN_DIALOG`, the app can open a [dialog](https://developers.google.com/chat/how-tos/dialogs). When
|
|
336
|
-
* specified, a loading indicator
|
|
337
|
-
*
|
|
368
|
+
* specified, a loading indicator isn't shown. Supported by Chat apps, but not Google Workspace Add-ons. If specified for an add-on, the entire card is stripped and nothing is shown in
|
|
369
|
+
* the client.
|
|
338
370
|
*/
|
|
339
371
|
interaction?:
|
|
340
372
|
string;
|
|
@@ -346,12 +378,12 @@ declare namespace gapi.client {
|
|
|
346
378
|
GoogleAppsCardV1ActionParameter[];
|
|
347
379
|
/**
|
|
348
380
|
* Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. To let the user make changes while
|
|
349
|
-
* the action is being processed, set [LoadIndicator](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) to `NONE`. For [card
|
|
381
|
+
* the action is being processed, set [`LoadIndicator`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) to `NONE`. For [card
|
|
350
382
|
* messages](https://developers.google.com/chat/api/guides/message-formats/cards) in Chat apps, you must also set the action's
|
|
351
|
-
* [ResponseType](https://developers.google.com/chat/api/reference/rest/v1/spaces.messages#responsetype) to `UPDATE_MESSAGE` and use the same
|
|
383
|
+
* [`ResponseType`](https://developers.google.com/chat/api/reference/rest/v1/spaces.messages#responsetype) to `UPDATE_MESSAGE` and use the same
|
|
352
384
|
* [`card_id`](https://developers.google.com/chat/api/reference/rest/v1/spaces.messages#CardWithId) from the card that contained the action. If `false`, the form values are cleared
|
|
353
385
|
* when the action is triggered. To prevent the user from making changes while the action is being processed, set
|
|
354
|
-
* [LoadIndicator](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) to `SPINNER`.
|
|
386
|
+
* [`LoadIndicator`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) to `SPINNER`.
|
|
355
387
|
*/
|
|
356
388
|
persistValues?:
|
|
357
389
|
boolean;
|
|
@@ -377,17 +409,17 @@ declare namespace gapi.client {
|
|
|
377
409
|
}
|
|
378
410
|
interface GoogleAppsCardV1Button {
|
|
379
411
|
/**
|
|
380
|
-
* The alternative text used for accessibility. Set descriptive text that lets users know what the button does. For example, if a button opens a hyperlink, you might write:
|
|
381
|
-
* new browser tab and navigates to the Google Chat developer documentation at https://developers.google.com/chat".
|
|
412
|
+
* The alternative text that's used for accessibility. Set descriptive text that lets users know what the button does. For example, if a button opens a hyperlink, you might write:
|
|
413
|
+
* "Opens a new browser tab and navigates to the Google Chat developer documentation at https://developers.google.com/chat".
|
|
382
414
|
*/
|
|
383
415
|
altText?:
|
|
384
416
|
string;
|
|
385
417
|
/**
|
|
386
|
-
* If set, the button is filled with a solid background color and the font color changes to maintain contrast with the background color. For example, setting a blue background
|
|
387
|
-
*
|
|
388
|
-
*
|
|
389
|
-
*
|
|
390
|
-
*
|
|
418
|
+
* If set, the button is filled with a solid background color and the font color changes to maintain contrast with the background color. For example, setting a blue background likely
|
|
419
|
+
* results in white text. If unset, the image background is white and the font color is blue. For red, green, and blue, the value of each field is a `float` number that you can express
|
|
420
|
+
* in either of two ways: as a number between 0 and 255 divided by 255 (153/255), or as a value between 0 and 1 (0.6). 0 represents the absence of a color and 1 or 255/255 represent
|
|
421
|
+
* the full presence of that color on the RGB scale. Optionally set `alpha`, which sets a level of transparency using this equation: ``` pixel color = alpha * (this color) + (1.0 -
|
|
422
|
+
* alpha) * (background color) ``` For `alpha`, a value of `1` corresponds with a solid color, and a value of `0` corresponds with a completely transparent color. For example, the
|
|
391
423
|
* following color represents a half transparent red: ``` "color": { "red": 1, "green": 0, "blue": 0, "alpha": 0.5 } ```
|
|
392
424
|
*/
|
|
393
425
|
color?:
|
|
@@ -398,7 +430,7 @@ declare namespace gapi.client {
|
|
|
398
430
|
/** The icon image. If both `icon` and `text` are set, then the icon appears before the text. */
|
|
399
431
|
icon?:
|
|
400
432
|
GoogleAppsCardV1Icon;
|
|
401
|
-
/** Required. The action to perform when the button
|
|
433
|
+
/** Required. The action to perform when a user clicks the button, such as opening a hyperlink or running a custom function. */
|
|
402
434
|
onClick?:
|
|
403
435
|
GoogleAppsCardV1OnClick;
|
|
404
436
|
/** The text displayed inside the button. */
|
|
@@ -412,10 +444,10 @@ declare namespace gapi.client {
|
|
|
412
444
|
}
|
|
413
445
|
interface GoogleAppsCardV1Card {
|
|
414
446
|
/**
|
|
415
|
-
* The card's actions. Actions are added to the card's toolbar menu. Because Chat app cards have no toolbar, `cardActions[]`
|
|
416
|
-
* JSON constructs a card action menu with Settings and Send Feedback options: ``` "card_actions": [ { "actionLabel": "Settings", "onClick": { "action": { "functionName":
|
|
417
|
-
* "parameters": [ { "key": "viewType", "value": "SETTING" } ], "loadIndicator": "LoadIndicator.SPINNER" } } }, { "actionLabel": "Send Feedback", "onClick": { "openLink": {
|
|
418
|
-
* "https://example.com/feedback" } } } ] ```
|
|
447
|
+
* The card's actions. Actions are added to the card's toolbar menu. Because Chat app cards have no toolbar, `cardActions[]` isn't supported by Chat apps. For example, the following
|
|
448
|
+
* JSON constructs a card action menu with `Settings` and `Send Feedback` options: ``` "card_actions": [ { "actionLabel": "Settings", "onClick": { "action": { "functionName":
|
|
449
|
+
* "goToView", "parameters": [ { "key": "viewType", "value": "SETTING" } ], "loadIndicator": "LoadIndicator.SPINNER" } } }, { "actionLabel": "Send Feedback", "onClick": { "openLink": {
|
|
450
|
+
* "url": "https://example.com/feedback" } } } ] ```
|
|
419
451
|
*/
|
|
420
452
|
cardActions?:
|
|
421
453
|
GoogleAppsCardV1CardAction[];
|
|
@@ -457,12 +489,15 @@ declare namespace gapi.client {
|
|
|
457
489
|
/** The primary button of the fixed footer. The button must be a text button with text and color set. */
|
|
458
490
|
primaryButton?:
|
|
459
491
|
GoogleAppsCardV1Button;
|
|
460
|
-
/** The secondary button of the fixed footer. The button must be a text button with text and color set. `
|
|
492
|
+
/** The secondary button of the fixed footer. The button must be a text button with text and color set. If `secondaryButton` is set, you must also set `primaryButton`. */
|
|
461
493
|
secondaryButton?:
|
|
462
494
|
GoogleAppsCardV1Button;
|
|
495
|
+
/** A list of widgets included in the card footer. Primary button and secondary button are rendered below these widgets. */
|
|
496
|
+
widgets?:
|
|
497
|
+
GoogleAppsCardV1FooterWidget[];
|
|
463
498
|
}
|
|
464
499
|
interface GoogleAppsCardV1CardHeader {
|
|
465
|
-
/** The alternative text of this image
|
|
500
|
+
/** The alternative text of this image that's used for accessibility. */
|
|
466
501
|
imageAltText?:
|
|
467
502
|
string;
|
|
468
503
|
/** The shape used to crop the image. */
|
|
@@ -481,35 +516,55 @@ declare namespace gapi.client {
|
|
|
481
516
|
title?:
|
|
482
517
|
string;
|
|
483
518
|
}
|
|
519
|
+
interface GoogleAppsCardV1Column {
|
|
520
|
+
/** Specifies whether widgets align to the left, right, or center of a column. */
|
|
521
|
+
horizontalAlignment?:
|
|
522
|
+
string;
|
|
523
|
+
/** Specifies how a column fills the width of the card. */
|
|
524
|
+
horizontalSizeStyle?:
|
|
525
|
+
string;
|
|
526
|
+
/** Specifies whether widgets align to the top, bottom, or center of a column. */
|
|
527
|
+
verticalAlignment?:
|
|
528
|
+
string;
|
|
529
|
+
/** An array of widgets included in a column. Widgets appear in the order that they are specified. */
|
|
530
|
+
widgets?:
|
|
531
|
+
GoogleAppsCardV1Widgets[];
|
|
532
|
+
}
|
|
533
|
+
interface GoogleAppsCardV1Columns {
|
|
534
|
+
/** An array of columns. You can include up to 2 columns in a card or dialog. */
|
|
535
|
+
columnItems?:
|
|
536
|
+
GoogleAppsCardV1Column[];
|
|
537
|
+
}
|
|
484
538
|
interface GoogleAppsCardV1DateTimePicker {
|
|
485
539
|
/**
|
|
486
|
-
* The text that prompts users to
|
|
487
|
-
*
|
|
540
|
+
* The text that prompts users to input a date, a time, or a date and time. For example, if users are scheduling an appointment, use a label such as `Appointment date` or `Appointment
|
|
541
|
+
* date and time`.
|
|
488
542
|
*/
|
|
489
543
|
label?:
|
|
490
544
|
string;
|
|
491
545
|
/**
|
|
492
|
-
* The name by which the
|
|
546
|
+
* The name by which the `DateTimePicker` is identified in a form input event. For details about working with form inputs, see [Receive form
|
|
493
547
|
* data](https://developers.google.com/chat/how-tos/dialogs#receive_form_data_from_dialogs).
|
|
494
548
|
*/
|
|
495
549
|
name?:
|
|
496
550
|
string;
|
|
497
|
-
/** Triggered when the user clicks **Save** or **Clear** from the
|
|
551
|
+
/** Triggered when the user clicks **Save** or **Clear** from the `DateTimePicker` interface. */
|
|
498
552
|
onChangeAction?:
|
|
499
553
|
GoogleAppsCardV1Action;
|
|
500
554
|
/**
|
|
501
|
-
* The number representing the time zone offset from UTC, in minutes. If set, the `value_ms_epoch` is displayed in the specified time zone. If
|
|
502
|
-
*
|
|
555
|
+
* The number representing the time zone offset from UTC, in minutes. If set, the `value_ms_epoch` is displayed in the specified time zone. If unset, the value defaults to the user's
|
|
556
|
+
* time zone setting.
|
|
503
557
|
*/
|
|
504
558
|
timezoneOffsetDate?:
|
|
505
559
|
number;
|
|
506
|
-
/**
|
|
560
|
+
/** Whether the widget supports inputting a date, a time, or the date and time. */
|
|
507
561
|
type?:
|
|
508
562
|
string;
|
|
509
563
|
/**
|
|
510
|
-
* The value displayed
|
|
511
|
-
* `
|
|
512
|
-
* example, to represent
|
|
564
|
+
* The default value displayed in the widget, in milliseconds since [Unix epoch time](https://en.wikipedia.org/wiki/Unix_time). Specify the value based on the type of picker
|
|
565
|
+
* (`DateTimePickerType`): * `DATE_AND_TIME`: a calendar date and time in UTC. For example, to represent January 1, 2023 at 12:00 PM UTC, use `1672574400000`. * `DATE_ONLY`: a calendar
|
|
566
|
+
* date at 00:00:00 UTC. For example, to represent January 1, 2023, use `1672531200000`. * `TIME_ONLY`: a time in UTC. For example, to represent 12:00 PM, use `43200000` (or `12 * 60 *
|
|
567
|
+
* 60 * 1000`).
|
|
513
568
|
*/
|
|
514
569
|
valueMsEpoch?:
|
|
515
570
|
string;
|
|
@@ -518,7 +573,7 @@ declare namespace gapi.client {
|
|
|
518
573
|
/** The text that appears below `text`. Always truncates. */
|
|
519
574
|
bottomLabel?:
|
|
520
575
|
string;
|
|
521
|
-
/** A button that can
|
|
576
|
+
/** A button that a user can click to trigger an action. */
|
|
522
577
|
button?:
|
|
523
578
|
GoogleAppsCardV1Button;
|
|
524
579
|
/**
|
|
@@ -530,18 +585,19 @@ declare namespace gapi.client {
|
|
|
530
585
|
/** Deprecated in favor of `startIcon`. */
|
|
531
586
|
icon?:
|
|
532
587
|
GoogleAppsCardV1Icon;
|
|
533
|
-
/**
|
|
588
|
+
/** This action is triggered when users click `topLabel` or `bottomLabel`. */
|
|
534
589
|
onClick?:
|
|
535
590
|
GoogleAppsCardV1OnClick;
|
|
536
591
|
/** The icon displayed in front of the text. */
|
|
537
592
|
startIcon?:
|
|
538
593
|
GoogleAppsCardV1Icon;
|
|
539
|
-
/** A switch widget can
|
|
594
|
+
/** A switch widget that a user can click to change its state and trigger an action. */
|
|
540
595
|
switchControl?:
|
|
541
596
|
GoogleAppsCardV1SwitchControl;
|
|
542
597
|
/**
|
|
543
|
-
* Required. The primary text. Supports simple formatting. For more information about formatting text, see Formatting text in Google Chat
|
|
544
|
-
*
|
|
598
|
+
* Required. The primary text. Supports simple formatting. For more information about formatting text, see [Formatting text in Google Chat
|
|
599
|
+
* apps](https://developers.google.com/chat/api/guides/message-formats/cards#card_text_formatting) and [Formatting text in Google Workspace
|
|
600
|
+
* Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting).
|
|
545
601
|
*/
|
|
546
602
|
text?:
|
|
547
603
|
string;
|
|
@@ -555,6 +611,23 @@ declare namespace gapi.client {
|
|
|
555
611
|
// tslint:disable-next-line:no-empty-interface
|
|
556
612
|
interface GoogleAppsCardV1Divider {
|
|
557
613
|
}
|
|
614
|
+
interface GoogleAppsCardV1FooterWidget {
|
|
615
|
+
/** ButtonList widget. */
|
|
616
|
+
buttonList?:
|
|
617
|
+
GoogleAppsCardV1ButtonList;
|
|
618
|
+
/** DateTimePicker widget. */
|
|
619
|
+
dateTimePicker?:
|
|
620
|
+
GoogleAppsCardV1DateTimePicker;
|
|
621
|
+
/** DecoratedText widget. */
|
|
622
|
+
decoratedText?:
|
|
623
|
+
GoogleAppsCardV1DecoratedText;
|
|
624
|
+
/** TextInput widget. */
|
|
625
|
+
textInput?:
|
|
626
|
+
GoogleAppsCardV1TextInput;
|
|
627
|
+
/** TextParagraph widget. */
|
|
628
|
+
textParagraph?:
|
|
629
|
+
GoogleAppsCardV1TextParagraph;
|
|
630
|
+
}
|
|
558
631
|
interface GoogleAppsCardV1Grid {
|
|
559
632
|
/** The border style to apply to each grid item. */
|
|
560
633
|
borderStyle?:
|
|
@@ -576,7 +649,7 @@ declare namespace gapi.client {
|
|
|
576
649
|
string;
|
|
577
650
|
}
|
|
578
651
|
interface GoogleAppsCardV1GridItem {
|
|
579
|
-
/** A user-specified identifier for this grid item. This identifier is returned in the parent
|
|
652
|
+
/** A user-specified identifier for this grid item. This identifier is returned in the parent grid's `onClick` callback parameters. */
|
|
580
653
|
id?:
|
|
581
654
|
string;
|
|
582
655
|
/** The image that displays in the grid item. */
|
|
@@ -594,9 +667,9 @@ declare namespace gapi.client {
|
|
|
594
667
|
}
|
|
595
668
|
interface GoogleAppsCardV1Icon {
|
|
596
669
|
/**
|
|
597
|
-
* Optional. A description of the icon used for accessibility. If unspecified, the default value
|
|
670
|
+
* Optional. A description of the icon used for accessibility. If unspecified, the default value `Button` is provided. As a best practice, you should set a helpful description for what
|
|
598
671
|
* the icon displays, and if applicable, what it does. For example, `A user's account portrait`, or `Opens a new browser tab and navigates to the Google Chat developer documentation at
|
|
599
|
-
* https://developers.google.com/chat`. If the icon is set in a Button
|
|
672
|
+
* https://developers.google.com/chat`. If the icon is set in a `Button`, the `altText` appears as helper text when the user hovers over the button. However, if the button also sets
|
|
600
673
|
* `text`, the icon's `altText` is ignored.
|
|
601
674
|
*/
|
|
602
675
|
altText?:
|
|
@@ -618,13 +691,13 @@ declare namespace gapi.client {
|
|
|
618
691
|
string;
|
|
619
692
|
}
|
|
620
693
|
interface GoogleAppsCardV1Image {
|
|
621
|
-
/** The alternative text of this image
|
|
694
|
+
/** The alternative text of this image that's used for accessibility. */
|
|
622
695
|
altText?:
|
|
623
696
|
string;
|
|
624
|
-
/** The
|
|
697
|
+
/** The HTTPS URL that hosts the image. For example: ``` https://developers.google.com/chat/images/quickstart-app-avatar.png ``` */
|
|
625
698
|
imageUrl?:
|
|
626
699
|
string;
|
|
627
|
-
/** When a user clicks
|
|
700
|
+
/** When a user clicks the image, the click triggers this action. */
|
|
628
701
|
onClick?:
|
|
629
702
|
GoogleAppsCardV1OnClick;
|
|
630
703
|
}
|
|
@@ -644,8 +717,8 @@ declare namespace gapi.client {
|
|
|
644
717
|
}
|
|
645
718
|
interface GoogleAppsCardV1ImageCropStyle {
|
|
646
719
|
/**
|
|
647
|
-
* The aspect ratio to use if the crop type is `RECTANGLE_CUSTOM`. For example, here's how to apply a 16
|
|
648
|
-
*
|
|
720
|
+
* The aspect ratio to use if the crop type is `RECTANGLE_CUSTOM`. For example, here's how to apply a 16:9 aspect ratio: ``` cropStyle { "type": "RECTANGLE_CUSTOM", "aspectRatio": 16/9
|
|
721
|
+
* } ```
|
|
649
722
|
*/
|
|
650
723
|
aspectRatio?:
|
|
651
724
|
number;
|
|
@@ -689,8 +762,9 @@ declare namespace gapi.client {
|
|
|
689
762
|
collapsible?:
|
|
690
763
|
boolean;
|
|
691
764
|
/**
|
|
692
|
-
* Text that appears at the top of a section. Supports simple HTML formatted text. For more information about formatting text, see Formatting text in Google Chat
|
|
693
|
-
* text in Google Workspace
|
|
765
|
+
* Text that appears at the top of a section. Supports simple HTML formatted text. For more information about formatting text, see [Formatting text in Google Chat
|
|
766
|
+
* apps](https://developers.google.com/chat/api/guides/message-formats/cards#card_text_formatting) and [Formatting text in Google Workspace
|
|
767
|
+
* Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting).
|
|
694
768
|
*/
|
|
695
769
|
header?:
|
|
696
770
|
string;
|
|
@@ -701,7 +775,7 @@ declare namespace gapi.client {
|
|
|
701
775
|
*/
|
|
702
776
|
uncollapsibleWidgetsCount?:
|
|
703
777
|
number;
|
|
704
|
-
/** All the widgets in the section. Must contain at least
|
|
778
|
+
/** All the widgets in the section. Must contain at least one widget. */
|
|
705
779
|
widgets?:
|
|
706
780
|
GoogleAppsCardV1Widget[];
|
|
707
781
|
}
|
|
@@ -752,7 +826,7 @@ declare namespace gapi.client {
|
|
|
752
826
|
string;
|
|
753
827
|
}
|
|
754
828
|
interface GoogleAppsCardV1SuggestionItem {
|
|
755
|
-
/** The value of a suggested input to a text input field. This is equivalent to what users
|
|
829
|
+
/** The value of a suggested input to a text input field. This is equivalent to what users enter themselves. */
|
|
756
830
|
text?:
|
|
757
831
|
string;
|
|
758
832
|
}
|
|
@@ -799,16 +873,16 @@ declare namespace gapi.client {
|
|
|
799
873
|
string;
|
|
800
874
|
/**
|
|
801
875
|
* Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the
|
|
802
|
-
* users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing
|
|
803
|
-
* filters to show just Java and JavaScript
|
|
804
|
-
*
|
|
805
|
-
*
|
|
876
|
+
* users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions
|
|
877
|
+
* filters to show just `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter
|
|
878
|
+
* `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if
|
|
879
|
+
* it's set to `MULTIPLE_LINE`.
|
|
806
880
|
*/
|
|
807
881
|
initialSuggestions?:
|
|
808
882
|
GoogleAppsCardV1Suggestions;
|
|
809
883
|
/**
|
|
810
884
|
* The text that appears above the text input field in the user interface. Specify text that helps the user enter the information your app needs. For example, if you are asking
|
|
811
|
-
* someone's name, but specifically need their surname, write
|
|
885
|
+
* someone's name, but specifically need their surname, write `surname` instead of `name`. Required if `hintText` is unspecified. Otherwise, optional.
|
|
812
886
|
*/
|
|
813
887
|
label?:
|
|
814
888
|
string;
|
|
@@ -819,8 +893,8 @@ declare namespace gapi.client {
|
|
|
819
893
|
name?:
|
|
820
894
|
string;
|
|
821
895
|
/**
|
|
822
|
-
* What to do when a change occurs in the text input field.
|
|
823
|
-
*
|
|
896
|
+
* What to do when a change occurs in the text input field. For example, a user adding to the field or deleting text. Examples of actions to take include running a custom function or
|
|
897
|
+
* opening a [dialog](https://developers.google.com/chat/how-tos/dialogs) in Google Chat.
|
|
824
898
|
*/
|
|
825
899
|
onChangeAction?:
|
|
826
900
|
GoogleAppsCardV1Action;
|
|
@@ -848,9 +922,16 @@ declare namespace gapi.client {
|
|
|
848
922
|
buttonList?:
|
|
849
923
|
GoogleAppsCardV1ButtonList;
|
|
850
924
|
/**
|
|
851
|
-
* Displays
|
|
852
|
-
*
|
|
853
|
-
* "
|
|
925
|
+
* Displays up to 2 columns. To include more than 2 columns, or to use rows, use the `Grid` widget. For example, the following JSON creates 2 columns that each contain text paragraphs:
|
|
926
|
+
* ``` "columns": { "columnItems": [ { "horizontalSizeStyle": "FILL_AVAILABLE_SPACE", "horizontalAlignment": "CENTER", "verticalAlignment": "CENTER", "widgets": [ { "textParagraph": {
|
|
927
|
+
* "text": "First column text paragraph" } } ] }, { "horizontalSizeStyle": "FILL_AVAILABLE_SPACE", "horizontalAlignment": "CENTER", "verticalAlignment": "CENTER", "widgets": [ {
|
|
928
|
+
* "textParagraph": { "text": "Second column text paragraph" } } ] } ] } ```
|
|
929
|
+
*/
|
|
930
|
+
columns?:
|
|
931
|
+
GoogleAppsCardV1Columns;
|
|
932
|
+
/**
|
|
933
|
+
* Displays a widget that lets users input a date, time, or date and time. For example, the following JSON creates a date time picker to schedule an appointment: ``` "dateTimePicker":
|
|
934
|
+
* { "name": "appointment_time", "label": "Book your appointment at:", "type": "DATE_AND_TIME", "valueMsEpoch": "796435200000" } ```
|
|
854
935
|
*/
|
|
855
936
|
dateTimePicker?:
|
|
856
937
|
GoogleAppsCardV1DateTimePicker;
|
|
@@ -873,6 +954,9 @@ declare namespace gapi.client {
|
|
|
873
954
|
*/
|
|
874
955
|
grid?:
|
|
875
956
|
GoogleAppsCardV1Grid;
|
|
957
|
+
/** Specifies whether widgets align to the left, right, or center of a column. */
|
|
958
|
+
horizontalAlignment?:
|
|
959
|
+
string;
|
|
876
960
|
/**
|
|
877
961
|
* Displays an image. For example, the following JSON creates an image with alternative text: ``` "image": { "imageUrl":
|
|
878
962
|
* "https://developers.google.com/chat/images/quickstart-app-avatar.png", "altText": "Chat app avatar" } ```
|
|
@@ -896,37 +980,62 @@ declare namespace gapi.client {
|
|
|
896
980
|
textInput?:
|
|
897
981
|
GoogleAppsCardV1TextInput;
|
|
898
982
|
/**
|
|
899
|
-
* Displays a text paragraph. Supports simple HTML formatted text. For more information about formatting text, see Formatting text in Google Chat
|
|
900
|
-
*
|
|
983
|
+
* Displays a text paragraph. Supports simple HTML formatted text. For more information about formatting text, see [Formatting text in Google Chat
|
|
984
|
+
* apps](https://developers.google.com/chat/api/guides/message-formats/cards#card_text_formatting) and [Formatting text in Google Workspace
|
|
985
|
+
* Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). For example, the following JSON creates a bolded text: ``` "textParagraph": { "text": "
|
|
986
|
+
* *bold text*" } ```
|
|
901
987
|
*/
|
|
902
988
|
textParagraph?:
|
|
903
989
|
GoogleAppsCardV1TextParagraph;
|
|
904
990
|
}
|
|
991
|
+
interface GoogleAppsCardV1Widgets {
|
|
992
|
+
/** ButtonList widget. */
|
|
993
|
+
buttonList?:
|
|
994
|
+
GoogleAppsCardV1ButtonList;
|
|
995
|
+
/** DateTimePicker widget. */
|
|
996
|
+
dateTimePicker?:
|
|
997
|
+
GoogleAppsCardV1DateTimePicker;
|
|
998
|
+
/** DecoratedText widget. */
|
|
999
|
+
decoratedText?:
|
|
1000
|
+
GoogleAppsCardV1DecoratedText;
|
|
1001
|
+
/** Image widget. */
|
|
1002
|
+
image?:
|
|
1003
|
+
GoogleAppsCardV1Image;
|
|
1004
|
+
/** SelectionInput widget. */
|
|
1005
|
+
selectionInput?:
|
|
1006
|
+
GoogleAppsCardV1SelectionInput;
|
|
1007
|
+
/** TextInput widget. */
|
|
1008
|
+
textInput?:
|
|
1009
|
+
GoogleAppsCardV1TextInput;
|
|
1010
|
+
/** TextParagraph widget. */
|
|
1011
|
+
textParagraph?:
|
|
1012
|
+
GoogleAppsCardV1TextParagraph;
|
|
1013
|
+
}
|
|
905
1014
|
interface Image {
|
|
906
1015
|
/**
|
|
907
|
-
* The aspect ratio of this image (width
|
|
908
|
-
*
|
|
1016
|
+
* The aspect ratio of this image (width and height). This field lets you reserve the right height for the image while waiting for it to load. It's not meant to override the built-in
|
|
1017
|
+
* aspect ratio of the image. If unset, the server fills it by prefetching the image.
|
|
909
1018
|
*/
|
|
910
1019
|
aspectRatio?:
|
|
911
1020
|
number;
|
|
912
1021
|
/** The URL of the image. */
|
|
913
1022
|
imageUrl?:
|
|
914
1023
|
string;
|
|
915
|
-
/** The onclick action. */
|
|
1024
|
+
/** The `onclick` action. */
|
|
916
1025
|
onClick?:
|
|
917
1026
|
OnClick;
|
|
918
1027
|
}
|
|
919
1028
|
interface ImageButton {
|
|
920
|
-
/** The icon specified by an enum that indices to an icon provided by Chat API. */
|
|
1029
|
+
/** The icon specified by an `enum` that indices to an icon provided by Chat API. */
|
|
921
1030
|
icon?:
|
|
922
1031
|
string;
|
|
923
1032
|
/** The icon specified by a URL. */
|
|
924
1033
|
iconUrl?:
|
|
925
1034
|
string;
|
|
926
|
-
/** The name of this image_button
|
|
1035
|
+
/** The name of this `image_button` that's used for accessibility. Default value is provided if this name isn't specified. */
|
|
927
1036
|
name?:
|
|
928
1037
|
string;
|
|
929
|
-
/** The onclick action. */
|
|
1038
|
+
/** The `onclick` action. */
|
|
930
1039
|
onClick?:
|
|
931
1040
|
OnClick;
|
|
932
1041
|
}
|
|
@@ -946,8 +1055,9 @@ declare namespace gapi.client {
|
|
|
946
1055
|
}
|
|
947
1056
|
interface KeyValue {
|
|
948
1057
|
/**
|
|
949
|
-
* The text of the bottom label. Formatted text supported. For more information about formatting text, see Formatting text in Google Chat
|
|
950
|
-
*
|
|
1058
|
+
* The text of the bottom label. Formatted text supported. For more information about formatting text, see [Formatting text in Google Chat
|
|
1059
|
+
* apps](https://developers.google.com/chat/api/guides/message-formats/cards#card_text_formatting) and [Formatting text in Google Workspace
|
|
1060
|
+
* Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting).
|
|
951
1061
|
*/
|
|
952
1062
|
bottomLabel?:
|
|
953
1063
|
string;
|
|
@@ -955,26 +1065,28 @@ declare namespace gapi.client {
|
|
|
955
1065
|
button?:
|
|
956
1066
|
Button;
|
|
957
1067
|
/**
|
|
958
|
-
* The text of the content. Formatted text supported and always required. For more information about formatting text, see Formatting text in Google Chat
|
|
959
|
-
* Google Workspace
|
|
1068
|
+
* The text of the content. Formatted text supported and always required. For more information about formatting text, see [Formatting text in Google Chat
|
|
1069
|
+
* apps](https://developers.google.com/chat/api/guides/message-formats/cards#card_text_formatting) and [Formatting text in Google Workspace
|
|
1070
|
+
* Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting).
|
|
960
1071
|
*/
|
|
961
1072
|
content?:
|
|
962
1073
|
string;
|
|
963
1074
|
/** If the content should be multiline. */
|
|
964
1075
|
contentMultiline?:
|
|
965
1076
|
boolean;
|
|
966
|
-
/** An enum value that
|
|
1077
|
+
/** An enum value that's replaced by the Chat API with the corresponding icon image. */
|
|
967
1078
|
icon?:
|
|
968
1079
|
string;
|
|
969
1080
|
/** The icon specified by a URL. */
|
|
970
1081
|
iconUrl?:
|
|
971
1082
|
string;
|
|
972
|
-
/** The onclick action. Only the top label, bottom label and content region are clickable. */
|
|
1083
|
+
/** The `onclick` action. Only the top label, bottom label, and content region are clickable. */
|
|
973
1084
|
onClick?:
|
|
974
1085
|
OnClick;
|
|
975
1086
|
/**
|
|
976
|
-
* The text of the top label. Formatted text supported. For more information about formatting text, see Formatting text in Google Chat
|
|
977
|
-
*
|
|
1087
|
+
* The text of the top label. Formatted text supported. For more information about formatting text, see [Formatting text in Google Chat
|
|
1088
|
+
* apps](https://developers.google.com/chat/api/guides/message-formats/cards#card_text_formatting) and [Formatting text in Google Workspace
|
|
1089
|
+
* Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting).
|
|
978
1090
|
*/
|
|
979
1091
|
topLabel?:
|
|
980
1092
|
string;
|
|
@@ -983,12 +1095,28 @@ declare namespace gapi.client {
|
|
|
983
1095
|
/** List of memberships in the requested (or first) page. */
|
|
984
1096
|
memberships?:
|
|
985
1097
|
Membership[];
|
|
986
|
-
/** A token that can
|
|
1098
|
+
/** A token that you can send as `pageToken` to retrieve the next page of results. If empty, there are no subsequent pages. */
|
|
987
1099
|
nextPageToken?:
|
|
988
1100
|
string;
|
|
989
1101
|
}
|
|
1102
|
+
interface ListMessagesResponse {
|
|
1103
|
+
/** List of messages. */
|
|
1104
|
+
messages?:
|
|
1105
|
+
Message[];
|
|
1106
|
+
/** You can send a token as `pageToken` to retrieve the next page of results. If empty, there are no subsequent pages. */
|
|
1107
|
+
nextPageToken?:
|
|
1108
|
+
string;
|
|
1109
|
+
}
|
|
1110
|
+
interface ListReactionsResponse {
|
|
1111
|
+
/** Continuation token to retrieve the next page of results. It's empty for the last page of results. */
|
|
1112
|
+
nextPageToken?:
|
|
1113
|
+
string;
|
|
1114
|
+
/** List of reactions in the requested (or first) page. */
|
|
1115
|
+
reactions?:
|
|
1116
|
+
Reaction[];
|
|
1117
|
+
}
|
|
990
1118
|
interface ListSpacesResponse {
|
|
991
|
-
/**
|
|
1119
|
+
/** You can send a token as `pageToken` to retrieve the next page of results. If empty, there are no subsequent pages. */
|
|
992
1120
|
nextPageToken?:
|
|
993
1121
|
string;
|
|
994
1122
|
/** List of spaces in the requested (or first) page. */
|
|
@@ -996,7 +1124,7 @@ declare namespace gapi.client {
|
|
|
996
1124
|
Space[];
|
|
997
1125
|
}
|
|
998
1126
|
interface MatchedUrl {
|
|
999
|
-
/** Output only. The
|
|
1127
|
+
/** Output only. The URL that was matched. */
|
|
1000
1128
|
url?:
|
|
1001
1129
|
string;
|
|
1002
1130
|
}
|
|
@@ -1015,7 +1143,7 @@ declare namespace gapi.client {
|
|
|
1015
1143
|
*/
|
|
1016
1144
|
member?:
|
|
1017
1145
|
User;
|
|
1018
|
-
/** Resource name of the membership, assigned by the server. Format: spaces/{space}/members/{member} */
|
|
1146
|
+
/** Resource name of the membership, assigned by the server. Format: `spaces/{space}/members/{member}` */
|
|
1019
1147
|
name?:
|
|
1020
1148
|
string;
|
|
1021
1149
|
/** Output only. User's role within a Chat space, which determines their permitted actions in the space. */
|
|
@@ -1029,7 +1157,7 @@ declare namespace gapi.client {
|
|
|
1029
1157
|
/** Input only. Parameters that a Chat app can use to configure how its response is posted. */
|
|
1030
1158
|
actionResponse?:
|
|
1031
1159
|
ActionResponse;
|
|
1032
|
-
/** Output only. Annotations associated with the text in this message. */
|
|
1160
|
+
/** Output only. Annotations associated with the `text` in this message. */
|
|
1033
1161
|
annotations?:
|
|
1034
1162
|
Annotation[];
|
|
1035
1163
|
/** Output only. Plain-text body of the message with all Chat app mentions stripped out. */
|
|
@@ -1039,7 +1167,7 @@ declare namespace gapi.client {
|
|
|
1039
1167
|
attachment?:
|
|
1040
1168
|
Attachment[];
|
|
1041
1169
|
/**
|
|
1042
|
-
* Deprecated: Use `cards_v2` instead. Rich, formatted and interactive cards that can
|
|
1170
|
+
* Deprecated: Use `cards_v2` instead. Rich, formatted, and interactive cards that you can use to display UI elements such as: formatted texts, buttons, and clickable images. Cards are
|
|
1043
1171
|
* normally displayed below the plain-text body of the message. `cards` and `cards_v2` can have a maximum size of 32 KB.
|
|
1044
1172
|
*/
|
|
1045
1173
|
cards?:
|
|
@@ -1060,17 +1188,29 @@ declare namespace gapi.client {
|
|
|
1060
1188
|
*/
|
|
1061
1189
|
clientAssignedMessageId?:
|
|
1062
1190
|
string;
|
|
1063
|
-
/** Output only. The time at which the message was created in Google Chat
|
|
1191
|
+
/** Output only. The time at which the message was created in Google Chat. */
|
|
1064
1192
|
createTime?:
|
|
1065
1193
|
string;
|
|
1066
|
-
/**
|
|
1194
|
+
/**
|
|
1195
|
+
* Output only. The time at which the message was deleted in Google Chat server. If the message is never deleted, this field is empty. [Developer
|
|
1196
|
+
* Preview](https://developers.google.com/workspace/preview).
|
|
1197
|
+
*/
|
|
1198
|
+
deleteTime?:
|
|
1199
|
+
string;
|
|
1200
|
+
/** Output only. Information about a deleted message. A message is deleted when `delete_time` is set. [Developer Preview](https://developers.google.com/workspace/preview). */
|
|
1201
|
+
deletionMetadata?:
|
|
1202
|
+
DeletionMetadata;
|
|
1203
|
+
/** Output only. The list of emoji reaction summaries on the message. [Developer Preview](https://developers.google.com/workspace/preview). */
|
|
1204
|
+
emojiReactionSummaries?:
|
|
1205
|
+
EmojiReactionSummary[];
|
|
1206
|
+
/** A plain-text description of the message's cards, used when the actual cards can't be displayed—for example, mobile notifications. */
|
|
1067
1207
|
fallbackText?:
|
|
1068
1208
|
string;
|
|
1069
1209
|
/** Output only. The time at which the message was last edited by a user. If the message has never been edited, this field is empty. */
|
|
1070
1210
|
lastUpdateTime?:
|
|
1071
1211
|
string;
|
|
1072
1212
|
/**
|
|
1073
|
-
* Output only. A URL in `spaces.messages.text` that matches a link preview pattern. For more information,
|
|
1213
|
+
* Output only. A URL in `spaces.messages.text` that matches a link preview pattern. For more information, see [Preview
|
|
1074
1214
|
* links](https://developers.google.com/chat/how-tos/preview-links).
|
|
1075
1215
|
*/
|
|
1076
1216
|
matchedUrl?:
|
|
@@ -1110,10 +1250,10 @@ declare namespace gapi.client {
|
|
|
1110
1250
|
boolean;
|
|
1111
1251
|
}
|
|
1112
1252
|
interface OnClick {
|
|
1113
|
-
/** A form action
|
|
1253
|
+
/** A form action is triggered by this `onclick` action if specified. */
|
|
1114
1254
|
action?:
|
|
1115
1255
|
FormAction;
|
|
1116
|
-
/** This onclick triggers an open link action if specified. */
|
|
1256
|
+
/** This `onclick` action triggers an open link action if specified. */
|
|
1117
1257
|
openLink?:
|
|
1118
1258
|
OpenLink;
|
|
1119
1259
|
}
|
|
@@ -1122,19 +1262,57 @@ declare namespace gapi.client {
|
|
|
1122
1262
|
url?:
|
|
1123
1263
|
string;
|
|
1124
1264
|
}
|
|
1265
|
+
interface Reaction {
|
|
1266
|
+
/** The emoji used in the reaction. */
|
|
1267
|
+
emoji?:
|
|
1268
|
+
Emoji;
|
|
1269
|
+
/** The resource name of the reaction. Format: `spaces/{space}/messages/{message}/reactions/{reaction}` */
|
|
1270
|
+
name?:
|
|
1271
|
+
string;
|
|
1272
|
+
/** Output only. The user who created the reaction. */
|
|
1273
|
+
user?:
|
|
1274
|
+
User;
|
|
1275
|
+
}
|
|
1125
1276
|
interface Section {
|
|
1126
1277
|
/**
|
|
1127
|
-
* The header of the section. Formatted text is supported. For more information about formatting text, see Formatting text in Google Chat
|
|
1128
|
-
*
|
|
1278
|
+
* The header of the section. Formatted text is supported. For more information about formatting text, see [Formatting text in Google Chat
|
|
1279
|
+
* apps](https://developers.google.com/chat/api/guides/message-formats/cards#card_text_formatting) and [Formatting text in Google Workspace
|
|
1280
|
+
* Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting).
|
|
1129
1281
|
*/
|
|
1130
1282
|
header?:
|
|
1131
1283
|
string;
|
|
1132
|
-
/** A section must contain at least
|
|
1284
|
+
/** A section must contain at least one widget. */
|
|
1133
1285
|
widgets?:
|
|
1134
1286
|
WidgetMarkup[];
|
|
1135
1287
|
}
|
|
1288
|
+
interface SetUpSpaceRequest {
|
|
1289
|
+
/**
|
|
1290
|
+
* Optional. The initial set of in-domain users invited to join the space. The calling user is automatically added to the space, and shouldn't be specified as a membership. The set
|
|
1291
|
+
* currently allows up to 20 memberships (in addition to the caller). The `Membership.member` field must contain a user with `name` populated and `User.Type.HUMAN`. All other fields
|
|
1292
|
+
* are ignored. Optional when setting `Space.spaceType` to `SPACE`. Required when setting `Space.spaceType` to `GROUP_CHAT`, along with at least two memberships. Required when setting
|
|
1293
|
+
* `Space.spaceType` to `DIRECT_MESSAGE` with a human user, along with exactly one membership. Must be empty when creating a 1:1 conversation between a human and the calling Chat app
|
|
1294
|
+
* (when setting `Space.spaceType` to `DIRECT_MESSAGE` and `Space.singleUserBotDm` to `true`). Not supported: Inviting guest users, or adding other Chat apps.
|
|
1295
|
+
*/
|
|
1296
|
+
memberships?:
|
|
1297
|
+
Membership[];
|
|
1298
|
+
/**
|
|
1299
|
+
* Optional. A unique identifier for this request. A random UUID is recommended. Specifying an existing request ID returns the space created with that ID instead of creating a new
|
|
1300
|
+
* space. Specifying an existing request ID from the same Chat app with a different authenticated user returns an error.
|
|
1301
|
+
*/
|
|
1302
|
+
requestId?:
|
|
1303
|
+
string;
|
|
1304
|
+
/**
|
|
1305
|
+
* Required. The `Space.spaceType` field is required. To create a space, set `Space.spaceType` to `SPACE` and set `Space.displayName`. To create a group chat, set `Space.spaceType` to
|
|
1306
|
+
* `GROUP_CHAT`. Don't set `Space.displayName`. To create a 1:1 conversation between humans, set `Space.spaceType` to `DIRECT_MESSAGE` and set `Space.singleUserBotDm` to `false`. Don't
|
|
1307
|
+
* set `Space.displayName` or `Space.spaceDetails`. To create an 1:1 conversation between a human and the calling Chat app, set `Space.spaceType` to `DIRECT_MESSAGE` and
|
|
1308
|
+
* `Space.singleUserBotDm` to `true`. Don't set `Space.displayName` or `Space.spaceDetails`. If a `DIRECT_MESSAGE` space already exists, that space is returned instead of creating a
|
|
1309
|
+
* new space.
|
|
1310
|
+
*/
|
|
1311
|
+
space?:
|
|
1312
|
+
Space;
|
|
1313
|
+
}
|
|
1136
1314
|
interface SlashCommand {
|
|
1137
|
-
/** The
|
|
1315
|
+
/** The ID of the slash command invoked. */
|
|
1138
1316
|
commandId?:
|
|
1139
1317
|
string;
|
|
1140
1318
|
}
|
|
@@ -1142,13 +1320,13 @@ declare namespace gapi.client {
|
|
|
1142
1320
|
/** The Chat app whose command was invoked. */
|
|
1143
1321
|
bot?:
|
|
1144
1322
|
User;
|
|
1145
|
-
/** The command
|
|
1323
|
+
/** The command ID of the invoked slash command. */
|
|
1146
1324
|
commandId?:
|
|
1147
1325
|
string;
|
|
1148
1326
|
/** The name of the invoked slash command. */
|
|
1149
1327
|
commandName?:
|
|
1150
1328
|
string;
|
|
1151
|
-
/**
|
|
1329
|
+
/** Indicates whether the slash command is for a dialog. */
|
|
1152
1330
|
triggersDialog?:
|
|
1153
1331
|
boolean;
|
|
1154
1332
|
/** The type of slash command. */
|
|
@@ -1163,12 +1341,12 @@ declare namespace gapi.client {
|
|
|
1163
1341
|
adminInstalled?:
|
|
1164
1342
|
boolean;
|
|
1165
1343
|
/**
|
|
1166
|
-
* The space's display name. Required when [creating a space](https://developers.google.com/chat/api/reference/rest/v1/spaces/create). For direct messages, this field
|
|
1344
|
+
* The space's display name. Required when [creating a space](https://developers.google.com/chat/api/reference/rest/v1/spaces/create). For direct messages, this field might be empty.
|
|
1167
1345
|
* Supports up to 128 characters.
|
|
1168
1346
|
*/
|
|
1169
1347
|
displayName?:
|
|
1170
1348
|
string;
|
|
1171
|
-
/** Resource name of the space. Format: spaces/{space} */
|
|
1349
|
+
/** Resource name of the space. Format: `spaces/{space}` */
|
|
1172
1350
|
name?:
|
|
1173
1351
|
string;
|
|
1174
1352
|
/** Optional. Whether the space is a DM between a Chat app and a single human. */
|
|
@@ -1177,9 +1355,15 @@ declare namespace gapi.client {
|
|
|
1177
1355
|
/** Details about the space including description and rules. */
|
|
1178
1356
|
spaceDetails?:
|
|
1179
1357
|
SpaceDetails;
|
|
1358
|
+
/** The message history state for messages and threads in this space. [Developer Preview](https://developers.google.com/workspace/preview). */
|
|
1359
|
+
spaceHistoryState?:
|
|
1360
|
+
string;
|
|
1180
1361
|
/** Output only. The threading state in the Chat space. */
|
|
1181
1362
|
spaceThreadingState?:
|
|
1182
1363
|
string;
|
|
1364
|
+
/** The type of space. Required when creating or updating a space. Output only for other usage. [Developer Preview](https://developers.google.com/workspace/preview). */
|
|
1365
|
+
spaceType?:
|
|
1366
|
+
string;
|
|
1183
1367
|
/** Output only. Deprecated: Use `spaceThreadingState` instead. Whether messages are threaded in this space. */
|
|
1184
1368
|
threaded?:
|
|
1185
1369
|
boolean;
|
|
@@ -1188,7 +1372,7 @@ declare namespace gapi.client {
|
|
|
1188
1372
|
string;
|
|
1189
1373
|
}
|
|
1190
1374
|
interface SpaceDetails {
|
|
1191
|
-
/** Optional. A description of the space.
|
|
1375
|
+
/** Optional. A description of the space. For example, describe the space's discussion topic, functional purpose, or participants. Supports up to 150 characters. */
|
|
1192
1376
|
description?:
|
|
1193
1377
|
string;
|
|
1194
1378
|
/** Optional. The space's rules, expectations, and etiquette. Supports up to 5,000 characters. */
|
|
@@ -1215,7 +1399,7 @@ declare namespace gapi.client {
|
|
|
1215
1399
|
string[];
|
|
1216
1400
|
}
|
|
1217
1401
|
interface TextButton {
|
|
1218
|
-
/** The onclick action of the button. */
|
|
1402
|
+
/** The `onclick` action of the button. */
|
|
1219
1403
|
onClick?:
|
|
1220
1404
|
OnClick;
|
|
1221
1405
|
/** The text of the button. */
|
|
@@ -1227,7 +1411,7 @@ declare namespace gapi.client {
|
|
|
1227
1411
|
string;
|
|
1228
1412
|
}
|
|
1229
1413
|
interface Thread {
|
|
1230
|
-
/** Resource name of the thread. Example: spaces/{space}/threads/{thread} */
|
|
1414
|
+
/** Resource name of the thread. Example: `spaces/{space}/threads/{thread}` */
|
|
1231
1415
|
name?:
|
|
1232
1416
|
string;
|
|
1233
1417
|
/**
|
|
@@ -1253,6 +1437,16 @@ declare namespace gapi.client {
|
|
|
1253
1437
|
offset?:
|
|
1254
1438
|
number;
|
|
1255
1439
|
}
|
|
1440
|
+
interface UploadAttachmentRequest {
|
|
1441
|
+
/** Required. The filename of the attachment, including the file extension. */
|
|
1442
|
+
filename?:
|
|
1443
|
+
string;
|
|
1444
|
+
}
|
|
1445
|
+
interface UploadAttachmentResponse {
|
|
1446
|
+
/** Reference to the uploaded attachment. */
|
|
1447
|
+
attachmentDataRef?:
|
|
1448
|
+
AttachmentDataRef;
|
|
1449
|
+
}
|
|
1256
1450
|
interface User {
|
|
1257
1451
|
/** Output only. The user's display name. */
|
|
1258
1452
|
displayName?:
|
|
@@ -1337,15 +1531,12 @@ declare namespace gapi.client {
|
|
|
1337
1531
|
uploadType?:
|
|
1338
1532
|
string;
|
|
1339
1533
|
}): Request<Media>;
|
|
1340
|
-
}
|
|
1341
|
-
interface MembersResource {
|
|
1342
1534
|
/**
|
|
1343
|
-
*
|
|
1344
|
-
* authentication](https://developers.google.com/chat/api/guides/auth/
|
|
1345
|
-
*
|
|
1346
|
-
* authentication](https://developers.google.com/chat/api/guides/auth/users) requires the `chat.memberships` or `chat.memberships.readonly` authorization scope.
|
|
1535
|
+
* [Developer Preview](https://developers.google.com/workspace/preview): Uploads an attachment. Requires user
|
|
1536
|
+
* [authentication](https://developers.google.com/chat/api/guides/auth/users). You can upload attachments up to 200 MB. Certain file types aren't supported. For details, see [File
|
|
1537
|
+
* types blocked by Google Chat](https://support.google.com/chat/answer/7651457?&co=GENIE.Platform%3DDesktop#File%20types%20blocked%20in%20Google%20Chat).
|
|
1347
1538
|
*/
|
|
1348
|
-
|
|
1539
|
+
upload(request: {
|
|
1349
1540
|
/** V1 error format. */
|
|
1350
1541
|
"$.xgafv"?:
|
|
1351
1542
|
string;
|
|
@@ -1364,12 +1555,12 @@ declare namespace gapi.client {
|
|
|
1364
1555
|
/** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
|
|
1365
1556
|
key?:
|
|
1366
1557
|
string;
|
|
1367
|
-
/** Required. Resource name of the membership to retrieve. Format: spaces/{space}/members/{member} */
|
|
1368
|
-
name:
|
|
1369
|
-
string;
|
|
1370
1558
|
/** OAuth 2.0 token for the current user. */
|
|
1371
1559
|
oauth_token?:
|
|
1372
1560
|
string;
|
|
1561
|
+
/** Required. Resource name of the Chat space in which the attachment is uploaded. Format "spaces/{space}". */
|
|
1562
|
+
parent:
|
|
1563
|
+
string;
|
|
1373
1564
|
/** Returns response with indentations and line breaks. */
|
|
1374
1565
|
prettyPrint?:
|
|
1375
1566
|
boolean;
|
|
@@ -1382,14 +1573,11 @@ declare namespace gapi.client {
|
|
|
1382
1573
|
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
1383
1574
|
uploadType?:
|
|
1384
1575
|
string;
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
* authentication](https://developers.google.com/chat/api/guides/auth/users) requires the `chat.memberships` or `chat.memberships.readonly` authorization scope.
|
|
1391
|
-
*/
|
|
1392
|
-
list(request?: {
|
|
1576
|
+
/** Request body */
|
|
1577
|
+
resource:
|
|
1578
|
+
UploadAttachmentRequest;
|
|
1579
|
+
}): Request<UploadAttachmentResponse>;
|
|
1580
|
+
upload(request: {
|
|
1393
1581
|
/** V1 error format. */
|
|
1394
1582
|
"$.xgafv"?:
|
|
1395
1583
|
string;
|
|
@@ -1411,19 +1599,7 @@ declare namespace gapi.client {
|
|
|
1411
1599
|
/** OAuth 2.0 token for the current user. */
|
|
1412
1600
|
oauth_token?:
|
|
1413
1601
|
string;
|
|
1414
|
-
/**
|
|
1415
|
-
* The maximum number of memberships to return. The service may return fewer than this value. If unspecified, at most 100 memberships are returned. The maximum value is 1000;
|
|
1416
|
-
* values above 1000 are coerced to 1000. Negative values return an INVALID_ARGUMENT error.
|
|
1417
|
-
*/
|
|
1418
|
-
pageSize?:
|
|
1419
|
-
number;
|
|
1420
|
-
/**
|
|
1421
|
-
* A page token, received from a previous call to list memberships. Provide this to retrieve the subsequent page. When paginating, all other parameters provided should match the
|
|
1422
|
-
* call that provided the page token. Passing different values to the other parameters may lead to unexpected results.
|
|
1423
|
-
*/
|
|
1424
|
-
pageToken?:
|
|
1425
|
-
string;
|
|
1426
|
-
/** Required. The resource name of the space for which to fetch a membership list. Format: spaces/{space} */
|
|
1602
|
+
/** Required. Resource name of the Chat space in which the attachment is uploaded. Format "spaces/{space}". */
|
|
1427
1603
|
parent:
|
|
1428
1604
|
string;
|
|
1429
1605
|
/** Returns response with indentations and line breaks. */
|
|
@@ -1438,14 +1614,19 @@ declare namespace gapi.client {
|
|
|
1438
1614
|
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
1439
1615
|
uploadType?:
|
|
1440
1616
|
string;
|
|
1441
|
-
}
|
|
1617
|
+
},
|
|
1618
|
+
body: UploadAttachmentRequest): Request<UploadAttachmentResponse>;
|
|
1442
1619
|
}
|
|
1443
|
-
interface
|
|
1620
|
+
interface MembersResource {
|
|
1444
1621
|
/**
|
|
1445
|
-
*
|
|
1446
|
-
* [
|
|
1622
|
+
* [Developer Preview](https://developers.google.com/workspace/preview): Creates a human membership or app membership for the calling app. Creating memberships for other apps isn't
|
|
1623
|
+
* supported. Requires [user authentication](https://developers.google.com/chat/api/guides/auth/users) and the `chat.memberships` (for human membership) or `chat.memberships.app` (for
|
|
1624
|
+
* app membership) scope. To specify the member to add, set the `membership.member.name` in the `CreateMembershipRequest`: - To add the calling app to the space, use `users/app`. - To
|
|
1625
|
+
* add a human user, use `users/{user}`, where `{user}` is either the `{person_id}` for the [person](https://developers.google.com/people/api/rest/v1/people) from the People API, or
|
|
1626
|
+
* the `id` for the [user](https://developers.google.com/admin-sdk/directory/reference/rest/v1/users) in the Directory API. For example, if the People API `Person` `resourceName` is
|
|
1627
|
+
* `people/123456789`, you can add the user to the space by setting the `membership.member.name` to `users/123456789`.
|
|
1447
1628
|
*/
|
|
1448
|
-
|
|
1629
|
+
create(request: {
|
|
1449
1630
|
/** V1 error format. */
|
|
1450
1631
|
"$.xgafv"?:
|
|
1451
1632
|
string;
|
|
@@ -1464,12 +1645,12 @@ declare namespace gapi.client {
|
|
|
1464
1645
|
/** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
|
|
1465
1646
|
key?:
|
|
1466
1647
|
string;
|
|
1467
|
-
/** Required. Resource name of the attachment, in the form "spaces/*/messages/*/attachments/*". */
|
|
1468
|
-
name:
|
|
1469
|
-
string;
|
|
1470
1648
|
/** OAuth 2.0 token for the current user. */
|
|
1471
1649
|
oauth_token?:
|
|
1472
1650
|
string;
|
|
1651
|
+
/** Required. The resource name of the space for which to create the membership. Format: spaces/{space} */
|
|
1652
|
+
parent:
|
|
1653
|
+
string;
|
|
1473
1654
|
/** Returns response with indentations and line breaks. */
|
|
1474
1655
|
prettyPrint?:
|
|
1475
1656
|
boolean;
|
|
@@ -1482,18 +1663,10 @@ declare namespace gapi.client {
|
|
|
1482
1663
|
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
1483
1664
|
uploadType?:
|
|
1484
1665
|
string;
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
* Creates a message. For example usage, see [Create a message](https://developers.google.com/chat/api/guides/crudl/messages#create_a_message). Requires
|
|
1490
|
-
* [authentication](https://developers.google.com/chat/api/guides/auth). Fully supports [service account
|
|
1491
|
-
* authentication](https://developers.google.com/chat/api/guides/auth/service-accounts). Supports [user authentication](https://developers.google.com/chat/api/guides/auth/users) as
|
|
1492
|
-
* part of the [Google Workspace Developer Preview Program](https://developers.google.com/workspace/preview), which grants early access to certain features. [User
|
|
1493
|
-
* authentication](https://developers.google.com/chat/api/guides/auth/users) requires the `chat.messages` or `chat.messages.create` authorization scope. Because Chat provides
|
|
1494
|
-
* authentication for [webhooks](https://developers.google.com/chat/how-tos/webhooks) as part of the URL that's generated when a webhook is registered, webhooks can create messages
|
|
1495
|
-
* without a service account or user authentication.
|
|
1496
|
-
*/
|
|
1666
|
+
/** Request body */
|
|
1667
|
+
resource:
|
|
1668
|
+
Membership;
|
|
1669
|
+
}): Request<Membership>;
|
|
1497
1670
|
create(request: {
|
|
1498
1671
|
/** V1 error format. */
|
|
1499
1672
|
"$.xgafv"?:
|
|
@@ -1513,20 +1686,10 @@ declare namespace gapi.client {
|
|
|
1513
1686
|
/** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
|
|
1514
1687
|
key?:
|
|
1515
1688
|
string;
|
|
1516
|
-
/**
|
|
1517
|
-
* Optional. A custom name for a Chat message assigned at creation. Must start with `client-` and contain only lowercase letters, numbers, and hyphens up to 63 characters in
|
|
1518
|
-
* length. Specify this field to get, update, or delete the message with the specified value. For example usage, see [Name a created
|
|
1519
|
-
* message](https://developers.google.com/chat/api/guides/crudl/messages#name_a_created_message).
|
|
1520
|
-
*/
|
|
1521
|
-
messageId?:
|
|
1522
|
-
string;
|
|
1523
|
-
/** Optional. Specifies whether a message starts a thread or replies to one. Only supported in named spaces. */
|
|
1524
|
-
messageReplyOption?:
|
|
1525
|
-
string;
|
|
1526
1689
|
/** OAuth 2.0 token for the current user. */
|
|
1527
1690
|
oauth_token?:
|
|
1528
1691
|
string;
|
|
1529
|
-
/** Required. The resource name of the space
|
|
1692
|
+
/** Required. The resource name of the space for which to create the membership. Format: spaces/{space} */
|
|
1530
1693
|
parent:
|
|
1531
1694
|
string;
|
|
1532
1695
|
/** Returns response with indentations and line breaks. */
|
|
@@ -1535,26 +1698,19 @@ declare namespace gapi.client {
|
|
|
1535
1698
|
/** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
|
|
1536
1699
|
quotaUser?:
|
|
1537
1700
|
string;
|
|
1538
|
-
/** Optional. A unique request ID for this message. Specifying an existing request ID returns the message created with that ID instead of creating a new message. */
|
|
1539
|
-
requestId?:
|
|
1540
|
-
string;
|
|
1541
|
-
/**
|
|
1542
|
-
* Optional. Deprecated: Use thread.thread_key instead. Opaque thread identifier. To start or add to a thread, create a message and specify a `threadKey` or the thread.name. For
|
|
1543
|
-
* example usage, see [Start or reply to a message thread](https://developers.google.com/chat/api/guides/crudl/messages#start_or_reply_to_a_message_thread).
|
|
1544
|
-
*/
|
|
1545
|
-
threadKey?:
|
|
1546
|
-
string;
|
|
1547
1701
|
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
1548
1702
|
upload_protocol?:
|
|
1549
1703
|
string;
|
|
1550
1704
|
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
1551
1705
|
uploadType?:
|
|
1552
1706
|
string;
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1707
|
+
},
|
|
1708
|
+
body: Membership): Request<Membership>;
|
|
1709
|
+
/**
|
|
1710
|
+
* [Developer Preview](https://developers.google.com/workspace/preview): Deletes a membership. Requires [user authentication](https://developers.google.com/chat/api/guides/auth/users)
|
|
1711
|
+
* and the `chat.memberships` or `chat.memberships.app` authorization scope.
|
|
1712
|
+
*/
|
|
1713
|
+
delete(request?: {
|
|
1558
1714
|
/** V1 error format. */
|
|
1559
1715
|
"$.xgafv"?:
|
|
1560
1716
|
string;
|
|
@@ -1574,52 +1730,35 @@ declare namespace gapi.client {
|
|
|
1574
1730
|
key?:
|
|
1575
1731
|
string;
|
|
1576
1732
|
/**
|
|
1577
|
-
*
|
|
1578
|
-
*
|
|
1579
|
-
*
|
|
1733
|
+
* Required. Resource name of the membership to delete. Chat apps can delete human users' or their own memberships. Chat apps can't delete other apps' memberships. When deleting a
|
|
1734
|
+
* human membership, requires the `chat.memberships` scope and `spaces/{space}/members/{member}` format. When deleting an app membership, requires the `chat.memberships.app` scope
|
|
1735
|
+
* and `spaces/{space}/members/app` format. Format: `spaces/{space}/members/{member}` or `spaces/{space}/members/app`
|
|
1580
1736
|
*/
|
|
1581
|
-
|
|
1582
|
-
string;
|
|
1583
|
-
/** Optional. Specifies whether a message starts a thread or replies to one. Only supported in named spaces. */
|
|
1584
|
-
messageReplyOption?:
|
|
1737
|
+
name:
|
|
1585
1738
|
string;
|
|
1586
1739
|
/** OAuth 2.0 token for the current user. */
|
|
1587
1740
|
oauth_token?:
|
|
1588
1741
|
string;
|
|
1589
|
-
/** Required. The resource name of the space in which to create a message. Format: spaces/{space} */
|
|
1590
|
-
parent:
|
|
1591
|
-
string;
|
|
1592
1742
|
/** Returns response with indentations and line breaks. */
|
|
1593
1743
|
prettyPrint?:
|
|
1594
1744
|
boolean;
|
|
1595
1745
|
/** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
|
|
1596
1746
|
quotaUser?:
|
|
1597
1747
|
string;
|
|
1598
|
-
/** Optional. A unique request ID for this message. Specifying an existing request ID returns the message created with that ID instead of creating a new message. */
|
|
1599
|
-
requestId?:
|
|
1600
|
-
string;
|
|
1601
|
-
/**
|
|
1602
|
-
* Optional. Deprecated: Use thread.thread_key instead. Opaque thread identifier. To start or add to a thread, create a message and specify a `threadKey` or the thread.name. For
|
|
1603
|
-
* example usage, see [Start or reply to a message thread](https://developers.google.com/chat/api/guides/crudl/messages#start_or_reply_to_a_message_thread).
|
|
1604
|
-
*/
|
|
1605
|
-
threadKey?:
|
|
1606
|
-
string;
|
|
1607
1748
|
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
1608
1749
|
upload_protocol?:
|
|
1609
1750
|
string;
|
|
1610
1751
|
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
1611
1752
|
uploadType?:
|
|
1612
1753
|
string;
|
|
1613
|
-
}
|
|
1614
|
-
body: Message): Request<Message>;
|
|
1754
|
+
}): Request<Membership>;
|
|
1615
1755
|
/**
|
|
1616
|
-
*
|
|
1617
|
-
* [authentication](https://developers.google.com/chat/api/guides/auth). Fully supports [service account
|
|
1756
|
+
* Returns a membership. Requires [authentication](https://developers.google.com/chat/api/guides/auth/). Fully supports [service account
|
|
1618
1757
|
* authentication](https://developers.google.com/chat/api/guides/auth/service-accounts). Supports [user authentication](https://developers.google.com/chat/api/guides/auth/users) as
|
|
1619
1758
|
* part of the [Google Workspace Developer Preview Program](https://developers.google.com/workspace/preview), which grants early access to certain features. [User
|
|
1620
|
-
* authentication](https://developers.google.com/chat/api/guides/auth/users) requires the `chat.
|
|
1759
|
+
* authentication](https://developers.google.com/chat/api/guides/auth/users) requires the `chat.memberships` or `chat.memberships.readonly` authorization scope.
|
|
1621
1760
|
*/
|
|
1622
|
-
|
|
1761
|
+
get(request?: {
|
|
1623
1762
|
/** V1 error format. */
|
|
1624
1763
|
"$.xgafv"?:
|
|
1625
1764
|
string;
|
|
@@ -1638,7 +1777,7 @@ declare namespace gapi.client {
|
|
|
1638
1777
|
/** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
|
|
1639
1778
|
key?:
|
|
1640
1779
|
string;
|
|
1641
|
-
/** Required. Resource name of the
|
|
1780
|
+
/** Required. Resource name of the membership to retrieve. Format: `spaces/{space}/members/{member}` */
|
|
1642
1781
|
name:
|
|
1643
1782
|
string;
|
|
1644
1783
|
/** OAuth 2.0 token for the current user. */
|
|
@@ -1656,16 +1795,14 @@ declare namespace gapi.client {
|
|
|
1656
1795
|
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
1657
1796
|
uploadType?:
|
|
1658
1797
|
string;
|
|
1659
|
-
}): Request<
|
|
1798
|
+
}): Request<Membership>;
|
|
1660
1799
|
/**
|
|
1661
|
-
*
|
|
1662
|
-
* [authentication](https://developers.google.com/chat/api/guides/auth). Fully supports [Service account
|
|
1800
|
+
* Lists memberships in a space. Requires [authentication](https://developers.google.com/chat/api/guides/auth/). Fully supports [service account
|
|
1663
1801
|
* authentication](https://developers.google.com/chat/api/guides/auth/service-accounts). Supports [user authentication](https://developers.google.com/chat/api/guides/auth/users) as
|
|
1664
1802
|
* part of the [Google Workspace Developer Preview Program](https://developers.google.com/workspace/preview), which grants early access to certain features. [User
|
|
1665
|
-
* authentication](https://developers.google.com/chat/api/guides/auth/users) requires the `chat.
|
|
1666
|
-
* from a blocked member or space.
|
|
1803
|
+
* authentication](https://developers.google.com/chat/api/guides/auth/users) requires the `chat.memberships` or `chat.memberships.readonly` authorization scope.
|
|
1667
1804
|
*/
|
|
1668
|
-
|
|
1805
|
+
list(request?: {
|
|
1669
1806
|
/** V1 error format. */
|
|
1670
1807
|
"$.xgafv"?:
|
|
1671
1808
|
string;
|
|
@@ -1681,18 +1818,35 @@ declare namespace gapi.client {
|
|
|
1681
1818
|
/** Selector specifying which fields to include in a partial response. */
|
|
1682
1819
|
fields?:
|
|
1683
1820
|
string;
|
|
1821
|
+
/**
|
|
1822
|
+
* Optional. A query filter. You can filter memberships by a member's role ([`role`](https://developers.google.com/chat/api/reference/rest/v1/spaces.members#membershiprole)) and
|
|
1823
|
+
* type ([`member.type`](https://developers.google.com/chat/api/reference/rest/v1/User#type)). To filter by role, set `role` to `ROLE_MEMBER` or `ROLE_MANAGER`. To filter by type,
|
|
1824
|
+
* set `member.type` to `HUMAN` or `BOT`. To filter by both role and type, use the `AND` operator. To filter by either role or type, use the `OR` operator. For example, the
|
|
1825
|
+
* following queries are valid: ``` role = "ROLE_MANAGER" OR role = "ROLE_MEMBER" member.type = "HUMAN" AND role = "ROLE_MANAGER" ``` The following queries are invalid: ```
|
|
1826
|
+
* member.type = "HUMAN" AND member.type = "BOT" role = "ROLE_MANAGER" AND role = "ROLE_MEMBER" ``` Invalid queries are rejected by the server with an `INVALID_ARGUMENT` error.
|
|
1827
|
+
*/
|
|
1828
|
+
filter?:
|
|
1829
|
+
string;
|
|
1684
1830
|
/** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
|
|
1685
1831
|
key?:
|
|
1686
1832
|
string;
|
|
1833
|
+
/** OAuth 2.0 token for the current user. */
|
|
1834
|
+
oauth_token?:
|
|
1835
|
+
string;
|
|
1687
1836
|
/**
|
|
1688
|
-
*
|
|
1689
|
-
*
|
|
1690
|
-
* message] (https://developers.google.com/chat/api/guides/crudl/messages#name_a_created_message).
|
|
1837
|
+
* The maximum number of memberships to return. The service might return fewer than this value. If unspecified, at most 100 memberships are returned. The maximum value is 1,000. If
|
|
1838
|
+
* you use a value more than 1,000, it's automatically changed to 1,000. Negative values return an `INVALID_ARGUMENT` error.
|
|
1691
1839
|
*/
|
|
1692
|
-
|
|
1840
|
+
pageSize?:
|
|
1841
|
+
number;
|
|
1842
|
+
/**
|
|
1843
|
+
* A page token, received from a previous call to list memberships. Provide this parameter to retrieve the subsequent page. When paginating, all other parameters provided should
|
|
1844
|
+
* match the call that provided the page token. Passing different values to the other parameters might lead to unexpected results.
|
|
1845
|
+
*/
|
|
1846
|
+
pageToken?:
|
|
1693
1847
|
string;
|
|
1694
|
-
/**
|
|
1695
|
-
|
|
1848
|
+
/** Required. The resource name of the space for which to fetch a membership list. Format: spaces/{space} */
|
|
1849
|
+
parent:
|
|
1696
1850
|
string;
|
|
1697
1851
|
/** Returns response with indentations and line breaks. */
|
|
1698
1852
|
prettyPrint?:
|
|
@@ -1700,34 +1854,32 @@ declare namespace gapi.client {
|
|
|
1700
1854
|
/** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
|
|
1701
1855
|
quotaUser?:
|
|
1702
1856
|
string;
|
|
1857
|
+
/**
|
|
1858
|
+
* Optional. When `true`, also returns memberships associated with invited members, in addition to other types of memberships. If a filter is set, invited memberships that don't
|
|
1859
|
+
* match the filter criteria aren't returned. Currently requires [user authentication](https://developers.google.com/chat/api/guides/auth/users).
|
|
1860
|
+
*/
|
|
1861
|
+
showInvited?:
|
|
1862
|
+
boolean;
|
|
1703
1863
|
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
1704
1864
|
upload_protocol?:
|
|
1705
1865
|
string;
|
|
1706
1866
|
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
1707
1867
|
uploadType?:
|
|
1708
1868
|
string;
|
|
1709
|
-
}): Request<
|
|
1869
|
+
}): Request<ListMembershipsResponse>;
|
|
1870
|
+
}
|
|
1871
|
+
interface AttachmentsResource {
|
|
1710
1872
|
/**
|
|
1711
|
-
*
|
|
1712
|
-
*
|
|
1713
|
-
* [authentication](https://developers.google.com/chat/api/guides/auth/). Fully supports [service account
|
|
1714
|
-
* authentication](https://developers.google.com/chat/api/guides/auth/service-accounts). Supports [user authentication](https://developers.google.com/chat/api/guides/auth/users) as
|
|
1715
|
-
* part of the [Google Workspace Developer Preview Program](https://developers.google.com/workspace/preview), which grants early access to certain features. [User
|
|
1716
|
-
* authentication](https://developers.google.com/chat/api/guides/auth/users) requires the `chat.messages` authorization scope.
|
|
1873
|
+
* Gets the metadata of a message attachment. The attachment data is fetched using the [media API](https://developers.google.com/chat/api/reference/rest/v1/media/download). Requires
|
|
1874
|
+
* [service account authentication](https://developers.google.com/chat/api/guides/auth/service-accounts).
|
|
1717
1875
|
*/
|
|
1718
|
-
|
|
1876
|
+
get(request?: {
|
|
1719
1877
|
/** V1 error format. */
|
|
1720
1878
|
"$.xgafv"?:
|
|
1721
1879
|
string;
|
|
1722
1880
|
/** OAuth access token. */
|
|
1723
1881
|
access_token?:
|
|
1724
1882
|
string;
|
|
1725
|
-
/**
|
|
1726
|
-
* Optional. If `true` and the message is not found, a new message is created and `updateMask` is ignored. The specified message ID must be
|
|
1727
|
-
* [client-assigned](https://developers.google.com/chat/api/guides/crudl/messages#name_a_created_message) or the request fails.
|
|
1728
|
-
*/
|
|
1729
|
-
allowMissing?:
|
|
1730
|
-
boolean;
|
|
1731
1883
|
/** Data format for response. */
|
|
1732
1884
|
alt?:
|
|
1733
1885
|
string;
|
|
@@ -1740,7 +1892,7 @@ declare namespace gapi.client {
|
|
|
1740
1892
|
/** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
|
|
1741
1893
|
key?:
|
|
1742
1894
|
string;
|
|
1743
|
-
/** Resource name in the form `spaces/*/messages/*`.
|
|
1895
|
+
/** Required. Resource name of the attachment, in the form `spaces/*/messages/*/attachments/*`. */
|
|
1744
1896
|
name:
|
|
1745
1897
|
string;
|
|
1746
1898
|
/** OAuth 2.0 token for the current user. */
|
|
@@ -1752,35 +1904,758 @@ declare namespace gapi.client {
|
|
|
1752
1904
|
/** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
|
|
1753
1905
|
quotaUser?:
|
|
1754
1906
|
string;
|
|
1755
|
-
/**
|
|
1756
|
-
* Required. The field paths to update. Separate multiple values with commas. Currently supported field paths: - text - cards (Requires [service account
|
|
1757
|
-
* authentication](/chat/api/guides/auth/service-accounts).) - cards_v2
|
|
1758
|
-
*/
|
|
1759
|
-
updateMask?:
|
|
1760
|
-
string;
|
|
1761
1907
|
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
1762
1908
|
upload_protocol?:
|
|
1763
1909
|
string;
|
|
1764
1910
|
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
1765
1911
|
uploadType?:
|
|
1766
1912
|
string;
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
|
|
1774
|
-
|
|
1913
|
+
}): Request<Attachment>;
|
|
1914
|
+
}
|
|
1915
|
+
interface ReactionsResource {
|
|
1916
|
+
/**
|
|
1917
|
+
* [Developer Preview](https://developers.google.com/workspace/preview): Creates a reaction and adds it to a message. Requires [user
|
|
1918
|
+
* authentication](https://developers.google.com/chat/api/guides/auth/users) and the `chat.messages`, `chat.messages.reactions`, or `chat.messages.reactions.create` scope. Only unicode
|
|
1919
|
+
* emoji are supported.
|
|
1920
|
+
*/
|
|
1921
|
+
create(request: {
|
|
1922
|
+
/** V1 error format. */
|
|
1923
|
+
"$.xgafv"?:
|
|
1924
|
+
string;
|
|
1925
|
+
/** OAuth access token. */
|
|
1926
|
+
access_token?:
|
|
1927
|
+
string;
|
|
1928
|
+
/** Data format for response. */
|
|
1929
|
+
alt?:
|
|
1930
|
+
string;
|
|
1931
|
+
/** JSONP */
|
|
1932
|
+
callback?:
|
|
1933
|
+
string;
|
|
1934
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
1935
|
+
fields?:
|
|
1936
|
+
string;
|
|
1937
|
+
/** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
|
|
1938
|
+
key?:
|
|
1939
|
+
string;
|
|
1940
|
+
/** OAuth 2.0 token for the current user. */
|
|
1941
|
+
oauth_token?:
|
|
1942
|
+
string;
|
|
1943
|
+
/** Required. The message where the reaction is created. Format: `spaces/{space}/messages/{message}` */
|
|
1944
|
+
parent:
|
|
1945
|
+
string;
|
|
1946
|
+
/** Returns response with indentations and line breaks. */
|
|
1947
|
+
prettyPrint?:
|
|
1948
|
+
boolean;
|
|
1949
|
+
/** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
|
|
1950
|
+
quotaUser?:
|
|
1951
|
+
string;
|
|
1952
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
1953
|
+
upload_protocol?:
|
|
1954
|
+
string;
|
|
1955
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
1956
|
+
uploadType?:
|
|
1957
|
+
string;
|
|
1958
|
+
/** Request body */
|
|
1959
|
+
resource:
|
|
1960
|
+
Reaction;
|
|
1961
|
+
}): Request<Reaction>;
|
|
1962
|
+
create(request: {
|
|
1963
|
+
/** V1 error format. */
|
|
1964
|
+
"$.xgafv"?:
|
|
1965
|
+
string;
|
|
1966
|
+
/** OAuth access token. */
|
|
1967
|
+
access_token?:
|
|
1968
|
+
string;
|
|
1969
|
+
/** Data format for response. */
|
|
1970
|
+
alt?:
|
|
1971
|
+
string;
|
|
1972
|
+
/** JSONP */
|
|
1973
|
+
callback?:
|
|
1974
|
+
string;
|
|
1975
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
1976
|
+
fields?:
|
|
1977
|
+
string;
|
|
1978
|
+
/** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
|
|
1979
|
+
key?:
|
|
1980
|
+
string;
|
|
1981
|
+
/** OAuth 2.0 token for the current user. */
|
|
1982
|
+
oauth_token?:
|
|
1983
|
+
string;
|
|
1984
|
+
/** Required. The message where the reaction is created. Format: `spaces/{space}/messages/{message}` */
|
|
1985
|
+
parent:
|
|
1986
|
+
string;
|
|
1987
|
+
/** Returns response with indentations and line breaks. */
|
|
1988
|
+
prettyPrint?:
|
|
1989
|
+
boolean;
|
|
1990
|
+
/** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
|
|
1991
|
+
quotaUser?:
|
|
1992
|
+
string;
|
|
1993
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
1994
|
+
upload_protocol?:
|
|
1995
|
+
string;
|
|
1996
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
1997
|
+
uploadType?:
|
|
1998
|
+
string;
|
|
1999
|
+
},
|
|
2000
|
+
body: Reaction): Request<Reaction>;
|
|
2001
|
+
/**
|
|
2002
|
+
* [Developer Preview](https://developers.google.com/workspace/preview): Deletes a reaction to a message. Requires [user
|
|
2003
|
+
* authentication](https://developers.google.com/chat/api/guides/auth/users) and the `chat.messages` or `chat.messages.reactions` scope.
|
|
2004
|
+
*/
|
|
2005
|
+
delete(request?: {
|
|
2006
|
+
/** V1 error format. */
|
|
2007
|
+
"$.xgafv"?:
|
|
2008
|
+
string;
|
|
2009
|
+
/** OAuth access token. */
|
|
2010
|
+
access_token?:
|
|
2011
|
+
string;
|
|
2012
|
+
/** Data format for response. */
|
|
2013
|
+
alt?:
|
|
2014
|
+
string;
|
|
2015
|
+
/** JSONP */
|
|
2016
|
+
callback?:
|
|
2017
|
+
string;
|
|
2018
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
2019
|
+
fields?:
|
|
2020
|
+
string;
|
|
2021
|
+
/** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
|
|
2022
|
+
key?:
|
|
2023
|
+
string;
|
|
2024
|
+
/** Required. Name of the reaction to delete. Format: `spaces/{space}/messages/{message}/reactions/{reaction}` */
|
|
2025
|
+
name:
|
|
2026
|
+
string;
|
|
2027
|
+
/** OAuth 2.0 token for the current user. */
|
|
2028
|
+
oauth_token?:
|
|
2029
|
+
string;
|
|
2030
|
+
/** Returns response with indentations and line breaks. */
|
|
2031
|
+
prettyPrint?:
|
|
2032
|
+
boolean;
|
|
2033
|
+
/** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
|
|
2034
|
+
quotaUser?:
|
|
2035
|
+
string;
|
|
2036
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
2037
|
+
upload_protocol?:
|
|
2038
|
+
string;
|
|
2039
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
2040
|
+
uploadType?:
|
|
2041
|
+
string;
|
|
2042
|
+
}): Request<{}>;
|
|
2043
|
+
/**
|
|
2044
|
+
* [Developer Preview](https://developers.google.com/workspace/preview): Lists reactions to a message. Requires [user
|
|
2045
|
+
* authentication](https://developers.google.com/chat/api/guides/auth/users) and `chat.messages`, `chat.messages.readonly`, `chat.messages.reactions`, or
|
|
2046
|
+
* `chat.messages.reactions.readonly` scope.
|
|
2047
|
+
*/
|
|
2048
|
+
list(request?: {
|
|
2049
|
+
/** V1 error format. */
|
|
2050
|
+
"$.xgafv"?:
|
|
2051
|
+
string;
|
|
2052
|
+
/** OAuth access token. */
|
|
2053
|
+
access_token?:
|
|
2054
|
+
string;
|
|
2055
|
+
/** Data format for response. */
|
|
2056
|
+
alt?:
|
|
2057
|
+
string;
|
|
2058
|
+
/** JSONP */
|
|
2059
|
+
callback?:
|
|
2060
|
+
string;
|
|
2061
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
2062
|
+
fields?:
|
|
2063
|
+
string;
|
|
2064
|
+
/**
|
|
2065
|
+
* Optional. A query filter. You can filter reactions by [emoji](https://developers.google.com/chat/api/reference/rest/v1/Emoji) (either `emoji.unicode` or
|
|
2066
|
+
* `emoji.custom_emoji.uid`) and [user](https://developers.google.com/chat/api/reference/rest/v1/User) (`user.name`). To filter reactions for multiple emojis or users, join similar
|
|
2067
|
+
* fields with the `OR` operator, such as `emoji.unicode = "🙂" OR emoji.unicode = "👍"` and `user.name = "users/AAAAAA" OR user.name = "users/BBBBBB"`. To filter reactions by
|
|
2068
|
+
* emoji and user, use the `AND` operator, such as `emoji.unicode = "🙂" AND user.name = "users/AAAAAA"`. If your query uses both `AND` and `OR`, group them with parentheses. For
|
|
2069
|
+
* example, the following queries are valid: ``` user.name = "users/{user}" emoji.unicode = "🙂" emoji.custom_emoji.uid = "{uid}" emoji.unicode = "🙂" OR emoji.unicode = "👍"
|
|
2070
|
+
* emoji.unicode = "🙂" OR emoji.custom_emoji.uid = "{uid}" emoji.unicode = "🙂" AND user.name = "users/{user}" (emoji.unicode = "🙂" OR emoji.custom_emoji.uid = "{uid}") AND
|
|
2071
|
+
* user.name = "users/{user}" ``` The following queries are invalid: ``` emoji.unicode = "🙂" AND emoji.unicode = "👍" emoji.unicode = "🙂" AND emoji.custom_emoji.uid = "{uid}"
|
|
2072
|
+
* emoji.unicode = "🙂" OR user.name = "users/{user}" emoji.unicode = "🙂" OR emoji.custom_emoji.uid = "{uid}" OR user.name = "users/{user}" emoji.unicode = "🙂" OR
|
|
2073
|
+
* emoji.custom_emoji.uid = "{uid}" AND user.name = "users/{user}" ``` Invalid queries are rejected by the server with an `INVALID_ARGUMENT` error.
|
|
2074
|
+
*/
|
|
2075
|
+
filter?:
|
|
2076
|
+
string;
|
|
2077
|
+
/** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
|
|
2078
|
+
key?:
|
|
2079
|
+
string;
|
|
2080
|
+
/** OAuth 2.0 token for the current user. */
|
|
2081
|
+
oauth_token?:
|
|
2082
|
+
string;
|
|
2083
|
+
/**
|
|
2084
|
+
* Optional. The maximum number of reactions returned. The service can return fewer reactions than this value. If unspecified, the default value is 25. The maximum value is 200;
|
|
2085
|
+
* values above 200 are changed to 200.
|
|
2086
|
+
*/
|
|
2087
|
+
pageSize?:
|
|
2088
|
+
number;
|
|
2089
|
+
/**
|
|
2090
|
+
* Optional. (If resuming from a previous query.) A page token received from a previous list reactions call. Provide this to retrieve the subsequent page. When paginating, the
|
|
2091
|
+
* filter value should match the call that provided the page token. Passing a different value might lead to unexpected results.
|
|
2092
|
+
*/
|
|
2093
|
+
pageToken?:
|
|
2094
|
+
string;
|
|
2095
|
+
/** Required. The message users reacted to. Format: `spaces/{space}/messages/{message}` */
|
|
2096
|
+
parent:
|
|
2097
|
+
string;
|
|
2098
|
+
/** Returns response with indentations and line breaks. */
|
|
2099
|
+
prettyPrint?:
|
|
2100
|
+
boolean;
|
|
2101
|
+
/** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
|
|
2102
|
+
quotaUser?:
|
|
2103
|
+
string;
|
|
2104
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
2105
|
+
upload_protocol?:
|
|
2106
|
+
string;
|
|
2107
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
2108
|
+
uploadType?:
|
|
2109
|
+
string;
|
|
2110
|
+
}): Request<ListReactionsResponse>;
|
|
2111
|
+
}
|
|
2112
|
+
interface MessagesResource {
|
|
2113
|
+
/**
|
|
2114
|
+
* Creates a message. For example usage, see [Create a message](https://developers.google.com/chat/api/guides/crudl/messages#create_a_message). Requires
|
|
2115
|
+
* [authentication](https://developers.google.com/chat/api/guides/auth). Fully supports [service account
|
|
2116
|
+
* authentication](https://developers.google.com/chat/api/guides/auth/service-accounts). Supports [user authentication](https://developers.google.com/chat/api/guides/auth/users) as
|
|
2117
|
+
* part of the [Google Workspace Developer Preview Program](https://developers.google.com/workspace/preview), which grants early access to certain features. [User
|
|
2118
|
+
* authentication](https://developers.google.com/chat/api/guides/auth/users) requires the `chat.messages` or `chat.messages.create` authorization scope. Because Chat provides
|
|
2119
|
+
* authentication for [webhooks](https://developers.google.com/chat/how-tos/webhooks) as part of the URL that's generated when a webhook is registered, webhooks can create messages
|
|
2120
|
+
* without a service account or user authentication.
|
|
2121
|
+
*/
|
|
2122
|
+
create(request: {
|
|
2123
|
+
/** V1 error format. */
|
|
2124
|
+
"$.xgafv"?:
|
|
2125
|
+
string;
|
|
2126
|
+
/** OAuth access token. */
|
|
2127
|
+
access_token?:
|
|
2128
|
+
string;
|
|
2129
|
+
/** Data format for response. */
|
|
2130
|
+
alt?:
|
|
2131
|
+
string;
|
|
2132
|
+
/** JSONP */
|
|
2133
|
+
callback?:
|
|
2134
|
+
string;
|
|
2135
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
2136
|
+
fields?:
|
|
2137
|
+
string;
|
|
2138
|
+
/** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
|
|
2139
|
+
key?:
|
|
2140
|
+
string;
|
|
2141
|
+
/**
|
|
2142
|
+
* Optional. A custom name for a Chat message assigned at creation. Must start with `client-` and contain only lowercase letters, numbers, and hyphens up to 63 characters in
|
|
2143
|
+
* length. Specify this field to get, update, or delete the message with the specified value. For example usage, see [Name a created
|
|
2144
|
+
* message](https://developers.google.com/chat/api/guides/crudl/messages#name_a_created_message).
|
|
2145
|
+
*/
|
|
2146
|
+
messageId?:
|
|
2147
|
+
string;
|
|
2148
|
+
/** Optional. Specifies whether a message starts a thread or replies to one. Only supported in named spaces. */
|
|
2149
|
+
messageReplyOption?:
|
|
2150
|
+
string;
|
|
2151
|
+
/** OAuth 2.0 token for the current user. */
|
|
2152
|
+
oauth_token?:
|
|
2153
|
+
string;
|
|
2154
|
+
/** Required. The resource name of the space in which to create a message. Format: `spaces/{space}` */
|
|
2155
|
+
parent:
|
|
2156
|
+
string;
|
|
2157
|
+
/** Returns response with indentations and line breaks. */
|
|
2158
|
+
prettyPrint?:
|
|
2159
|
+
boolean;
|
|
2160
|
+
/** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
|
|
2161
|
+
quotaUser?:
|
|
2162
|
+
string;
|
|
2163
|
+
/** Optional. A unique request ID for this message. Specifying an existing request ID returns the message created with that ID instead of creating a new message. */
|
|
2164
|
+
requestId?:
|
|
2165
|
+
string;
|
|
2166
|
+
/**
|
|
2167
|
+
* Optional. Deprecated: Use thread.thread_key instead. Opaque thread identifier. To start or add to a thread, create a message and specify a `threadKey` or the thread.name. For
|
|
2168
|
+
* example usage, see [Start or reply to a message thread](https://developers.google.com/chat/api/guides/crudl/messages#start_or_reply_to_a_message_thread).
|
|
2169
|
+
*/
|
|
2170
|
+
threadKey?:
|
|
2171
|
+
string;
|
|
2172
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
2173
|
+
upload_protocol?:
|
|
2174
|
+
string;
|
|
2175
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
2176
|
+
uploadType?:
|
|
2177
|
+
string;
|
|
2178
|
+
/** Request body */
|
|
2179
|
+
resource:
|
|
2180
|
+
Message;
|
|
2181
|
+
}): Request<Message>;
|
|
2182
|
+
create(request: {
|
|
2183
|
+
/** V1 error format. */
|
|
2184
|
+
"$.xgafv"?:
|
|
2185
|
+
string;
|
|
2186
|
+
/** OAuth access token. */
|
|
2187
|
+
access_token?:
|
|
2188
|
+
string;
|
|
2189
|
+
/** Data format for response. */
|
|
2190
|
+
alt?:
|
|
2191
|
+
string;
|
|
2192
|
+
/** JSONP */
|
|
2193
|
+
callback?:
|
|
2194
|
+
string;
|
|
2195
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
2196
|
+
fields?:
|
|
2197
|
+
string;
|
|
2198
|
+
/** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
|
|
2199
|
+
key?:
|
|
2200
|
+
string;
|
|
2201
|
+
/**
|
|
2202
|
+
* Optional. A custom name for a Chat message assigned at creation. Must start with `client-` and contain only lowercase letters, numbers, and hyphens up to 63 characters in
|
|
2203
|
+
* length. Specify this field to get, update, or delete the message with the specified value. For example usage, see [Name a created
|
|
2204
|
+
* message](https://developers.google.com/chat/api/guides/crudl/messages#name_a_created_message).
|
|
2205
|
+
*/
|
|
2206
|
+
messageId?:
|
|
2207
|
+
string;
|
|
2208
|
+
/** Optional. Specifies whether a message starts a thread or replies to one. Only supported in named spaces. */
|
|
2209
|
+
messageReplyOption?:
|
|
2210
|
+
string;
|
|
2211
|
+
/** OAuth 2.0 token for the current user. */
|
|
2212
|
+
oauth_token?:
|
|
2213
|
+
string;
|
|
2214
|
+
/** Required. The resource name of the space in which to create a message. Format: `spaces/{space}` */
|
|
2215
|
+
parent:
|
|
2216
|
+
string;
|
|
2217
|
+
/** Returns response with indentations and line breaks. */
|
|
2218
|
+
prettyPrint?:
|
|
2219
|
+
boolean;
|
|
2220
|
+
/** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
|
|
2221
|
+
quotaUser?:
|
|
2222
|
+
string;
|
|
2223
|
+
/** Optional. A unique request ID for this message. Specifying an existing request ID returns the message created with that ID instead of creating a new message. */
|
|
2224
|
+
requestId?:
|
|
2225
|
+
string;
|
|
2226
|
+
/**
|
|
2227
|
+
* Optional. Deprecated: Use thread.thread_key instead. Opaque thread identifier. To start or add to a thread, create a message and specify a `threadKey` or the thread.name. For
|
|
2228
|
+
* example usage, see [Start or reply to a message thread](https://developers.google.com/chat/api/guides/crudl/messages#start_or_reply_to_a_message_thread).
|
|
2229
|
+
*/
|
|
2230
|
+
threadKey?:
|
|
2231
|
+
string;
|
|
2232
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
2233
|
+
upload_protocol?:
|
|
2234
|
+
string;
|
|
2235
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
2236
|
+
uploadType?:
|
|
2237
|
+
string;
|
|
2238
|
+
},
|
|
2239
|
+
body: Message): Request<Message>;
|
|
2240
|
+
/**
|
|
2241
|
+
* Deletes a message. For example usage, see [Delete a message](https://developers.google.com/chat/api/guides/crudl/messages#delete_a_message). Requires
|
|
2242
|
+
* [authentication](https://developers.google.com/chat/api/guides/auth). Fully supports [service account
|
|
2243
|
+
* authentication](https://developers.google.com/chat/api/guides/auth/service-accounts). Supports [user authentication](https://developers.google.com/chat/api/guides/auth/users) as
|
|
2244
|
+
* part of the [Google Workspace Developer Preview Program](https://developers.google.com/workspace/preview), which grants early access to certain features. [User
|
|
2245
|
+
* authentication](https://developers.google.com/chat/api/guides/auth/users) requires the `chat.messages` authorization scope.
|
|
2246
|
+
*/
|
|
2247
|
+
delete(request?: {
|
|
2248
|
+
/** V1 error format. */
|
|
2249
|
+
"$.xgafv"?:
|
|
2250
|
+
string;
|
|
2251
|
+
/** OAuth access token. */
|
|
2252
|
+
access_token?:
|
|
2253
|
+
string;
|
|
2254
|
+
/** Data format for response. */
|
|
2255
|
+
alt?:
|
|
2256
|
+
string;
|
|
2257
|
+
/** JSONP */
|
|
2258
|
+
callback?:
|
|
2259
|
+
string;
|
|
2260
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
2261
|
+
fields?:
|
|
2262
|
+
string;
|
|
2263
|
+
/**
|
|
2264
|
+
* When `true`, deleting a message also deletes its threaded replies. When `false`, if a message has threaded replies, deletion fails. Only applies when [authenticating as a
|
|
2265
|
+
* user](https://developers.google.com/chat/api/guides/auth/users). Has no effect when [authenticating with a service account]
|
|
2266
|
+
* (https://developers.google.com/chat/api/guides/auth/service-accounts).
|
|
2267
|
+
*/
|
|
2268
|
+
force?:
|
|
2269
|
+
boolean;
|
|
2270
|
+
/** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
|
|
2271
|
+
key?:
|
|
2272
|
+
string;
|
|
2273
|
+
/** Required. Resource name of the message that you want to delete, in the form `spaces/*/messages/*` Example: `spaces/AAAAAAAAAAA/messages/BBBBBBBBBBB.BBBBBBBBBBB` */
|
|
2274
|
+
name:
|
|
2275
|
+
string;
|
|
2276
|
+
/** OAuth 2.0 token for the current user. */
|
|
2277
|
+
oauth_token?:
|
|
2278
|
+
string;
|
|
2279
|
+
/** Returns response with indentations and line breaks. */
|
|
2280
|
+
prettyPrint?:
|
|
2281
|
+
boolean;
|
|
2282
|
+
/** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
|
|
2283
|
+
quotaUser?:
|
|
2284
|
+
string;
|
|
2285
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
2286
|
+
upload_protocol?:
|
|
2287
|
+
string;
|
|
2288
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
2289
|
+
uploadType?:
|
|
2290
|
+
string;
|
|
2291
|
+
}): Request<{}>;
|
|
2292
|
+
/**
|
|
2293
|
+
* Returns a message. For example usage, see [Read a message](https://developers.google.com/chat/api/guides/crudl/messages#read_a_message). Requires
|
|
2294
|
+
* [authentication](https://developers.google.com/chat/api/guides/auth). Fully supports [Service account
|
|
2295
|
+
* authentication](https://developers.google.com/chat/api/guides/auth/service-accounts). Supports [user authentication](https://developers.google.com/chat/api/guides/auth/users) as
|
|
2296
|
+
* part of the [Google Workspace Developer Preview Program](https://developers.google.com/workspace/preview), which grants early access to certain features. [User
|
|
2297
|
+
* authentication](https://developers.google.com/chat/api/guides/auth/users) requires the `chat.messages` or `chat.messages.readonly` authorization scope. Note: Might return a message
|
|
2298
|
+
* from a blocked member or space.
|
|
2299
|
+
*/
|
|
2300
|
+
get(request?: {
|
|
2301
|
+
/** V1 error format. */
|
|
2302
|
+
"$.xgafv"?:
|
|
2303
|
+
string;
|
|
2304
|
+
/** OAuth access token. */
|
|
2305
|
+
access_token?:
|
|
2306
|
+
string;
|
|
2307
|
+
/** Data format for response. */
|
|
2308
|
+
alt?:
|
|
2309
|
+
string;
|
|
2310
|
+
/** JSONP */
|
|
2311
|
+
callback?:
|
|
2312
|
+
string;
|
|
2313
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
2314
|
+
fields?:
|
|
2315
|
+
string;
|
|
2316
|
+
/** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
|
|
2317
|
+
key?:
|
|
2318
|
+
string;
|
|
2319
|
+
/**
|
|
2320
|
+
* Required. Resource name of the message to retrieve. Format: `spaces/{space}/messages/{message}` If the message begins with `client-`, then it has a custom name assigned by a
|
|
2321
|
+
* Chat app that created it with the Chat REST API. That Chat app (but not others) can pass the custom name to get, update, or delete the message. To learn more, see [create and
|
|
2322
|
+
* name a message] (https://developers.google.com/chat/api/guides/crudl/messages#name_a_created_message).
|
|
2323
|
+
*/
|
|
2324
|
+
name:
|
|
2325
|
+
string;
|
|
2326
|
+
/** OAuth 2.0 token for the current user. */
|
|
2327
|
+
oauth_token?:
|
|
2328
|
+
string;
|
|
2329
|
+
/** Returns response with indentations and line breaks. */
|
|
2330
|
+
prettyPrint?:
|
|
2331
|
+
boolean;
|
|
2332
|
+
/** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
|
|
2333
|
+
quotaUser?:
|
|
2334
|
+
string;
|
|
2335
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
2336
|
+
upload_protocol?:
|
|
2337
|
+
string;
|
|
2338
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
2339
|
+
uploadType?:
|
|
2340
|
+
string;
|
|
2341
|
+
}): Request<Message>;
|
|
2342
|
+
/**
|
|
2343
|
+
* [Developer Preview](https://developers.google.com/workspace/preview): Lists messages in a space that the caller is a member of, including messages from blocked members and spaces.
|
|
2344
|
+
* Requires [user authentication](https://developers.google.com/chat/api/guides/auth/users) and the `chat.messages` or `chat.messages.readonly` authorization scope. This method is only
|
|
2345
|
+
* supported in spaces that don't allow users from outside the Workspace organization to join.
|
|
2346
|
+
*/
|
|
2347
|
+
list(request?: {
|
|
2348
|
+
/** V1 error format. */
|
|
2349
|
+
"$.xgafv"?:
|
|
2350
|
+
string;
|
|
2351
|
+
/** OAuth access token. */
|
|
2352
|
+
access_token?:
|
|
2353
|
+
string;
|
|
2354
|
+
/** Data format for response. */
|
|
2355
|
+
alt?:
|
|
2356
|
+
string;
|
|
2357
|
+
/** JSONP */
|
|
2358
|
+
callback?:
|
|
2359
|
+
string;
|
|
2360
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
2361
|
+
fields?:
|
|
2362
|
+
string;
|
|
2363
|
+
/**
|
|
2364
|
+
* A query filter. You can filter messages by date (`create_time`) and thread (`thread.name`). To filter messages by the date they were created, specify the `create_time` with a
|
|
2365
|
+
* timestamp in [RFC-3339](https://www.rfc-editor.org/rfc/rfc3339) format and double quotation marks. For example, `"2023-04-21T11:30:00-04:00"`. You can use the greater than
|
|
2366
|
+
* operator `>` to list messages that were created after a timestamp, or the less than operator `<` to list messages that were created before a timestamp. To filter messages within
|
|
2367
|
+
* a time interval, use the `AND` operator between two timestamps. To filter by thread, specify the `thread.name`, formatted as `spaces/{space}/threads/{thread}`. You can only
|
|
2368
|
+
* specify one `thread.name` per query. To filter by both thread and date, use the `AND` operator in your query. For example, the following queries are valid: ``` create_time >
|
|
2369
|
+
* "2012-04-21T11:30:00-04:00" create_time > "2012-04-21T11:30:00-04:00" AND thread.name = spaces/AAAAAAAAAAA/threads/123 create_time > "2012-04-21T11:30:00+00:00" AND create_time
|
|
2370
|
+
* < "2013-01-01T00:00:00+00:00" AND thread.name = spaces/AAAAAAAAAAA/threads/123 thread.name = spaces/AAAAAAAAAAA/threads/123 ``` Invalid queries are rejected by the server with
|
|
2371
|
+
* an `INVALID_ARGUMENT` error.
|
|
2372
|
+
*/
|
|
2373
|
+
filter?:
|
|
2374
|
+
string;
|
|
2375
|
+
/** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
|
|
2376
|
+
key?:
|
|
2377
|
+
string;
|
|
2378
|
+
/** OAuth 2.0 token for the current user. */
|
|
2379
|
+
oauth_token?:
|
|
2380
|
+
string;
|
|
2381
|
+
/**
|
|
2382
|
+
* Optional, if resuming from a previous query. How the list of messages is ordered. Specify a value to order by an ordering operation. Valid ordering operation values are as
|
|
2383
|
+
* follows: - `ASC` for ascending. - `DESC` for descending. The default ordering is `create_time ASC`.
|
|
2384
|
+
*/
|
|
2385
|
+
orderBy?:
|
|
2386
|
+
string;
|
|
2387
|
+
/**
|
|
2388
|
+
* The maximum number of messages returned. The service might return fewer messages than this value. If unspecified, at most 25 are returned. The maximum value is 1,000. If you use
|
|
2389
|
+
* a value more than 1,000, it's automatically changed to 1,000. Negative values return an `INVALID_ARGUMENT` error.
|
|
2390
|
+
*/
|
|
2391
|
+
pageSize?:
|
|
2392
|
+
number;
|
|
2393
|
+
/**
|
|
2394
|
+
* Optional, if resuming from a previous query. A page token received from a previous list messages call. Provide this parameter to retrieve the subsequent page. When paginating,
|
|
2395
|
+
* all other parameters provided should match the call that provided the page token. Passing different values to the other parameters might lead to unexpected results.
|
|
2396
|
+
*/
|
|
2397
|
+
pageToken?:
|
|
2398
|
+
string;
|
|
2399
|
+
/** Required. The resource name of the space to list messages from. Format: `spaces/{space}` */
|
|
2400
|
+
parent:
|
|
2401
|
+
string;
|
|
2402
|
+
/** Returns response with indentations and line breaks. */
|
|
2403
|
+
prettyPrint?:
|
|
2404
|
+
boolean;
|
|
2405
|
+
/** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
|
|
2406
|
+
quotaUser?:
|
|
2407
|
+
string;
|
|
2408
|
+
/** Whether to include deleted messages. Deleted messages include deleted time and metadata about their deletion, but message content is unavailable. */
|
|
2409
|
+
showDeleted?:
|
|
2410
|
+
boolean;
|
|
2411
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
2412
|
+
upload_protocol?:
|
|
2413
|
+
string;
|
|
2414
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
2415
|
+
uploadType?:
|
|
2416
|
+
string;
|
|
2417
|
+
}): Request<ListMessagesResponse>;
|
|
2418
|
+
/**
|
|
2419
|
+
* Updates a message. There's a difference between `patch` and `update` methods. The `patch` method uses a `patch` request while the `update` method uses a `put` request. We recommend
|
|
2420
|
+
* using the `patch` method. For example usage, see [Update a message](https://developers.google.com/chat/api/guides/crudl/messages#update_a_message). Requires
|
|
2421
|
+
* [authentication](https://developers.google.com/chat/api/guides/auth/). Fully supports [service account
|
|
2422
|
+
* authentication](https://developers.google.com/chat/api/guides/auth/service-accounts). Supports [user authentication](https://developers.google.com/chat/api/guides/auth/users) as
|
|
2423
|
+
* part of the [Google Workspace Developer Preview Program](https://developers.google.com/workspace/preview), which grants early access to certain features. [User
|
|
2424
|
+
* authentication](https://developers.google.com/chat/api/guides/auth/users) requires the `chat.messages` authorization scope.
|
|
2425
|
+
*/
|
|
2426
|
+
patch(request: {
|
|
2427
|
+
/** V1 error format. */
|
|
2428
|
+
"$.xgafv"?:
|
|
2429
|
+
string;
|
|
2430
|
+
/** OAuth access token. */
|
|
2431
|
+
access_token?:
|
|
2432
|
+
string;
|
|
2433
|
+
/**
|
|
2434
|
+
* Optional. If `true` and the message isn't found, a new message is created and `updateMask` is ignored. The specified message ID must be
|
|
2435
|
+
* [client-assigned](https://developers.google.com/chat/api/guides/crudl/messages#name_a_created_message) or the request fails.
|
|
2436
|
+
*/
|
|
2437
|
+
allowMissing?:
|
|
2438
|
+
boolean;
|
|
2439
|
+
/** Data format for response. */
|
|
2440
|
+
alt?:
|
|
2441
|
+
string;
|
|
2442
|
+
/** JSONP */
|
|
2443
|
+
callback?:
|
|
2444
|
+
string;
|
|
2445
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
2446
|
+
fields?:
|
|
2447
|
+
string;
|
|
2448
|
+
/** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
|
|
2449
|
+
key?:
|
|
2450
|
+
string;
|
|
2451
|
+
/** Resource name in the form `spaces/*/messages/*`. Example: `spaces/AAAAAAAAAAA/messages/BBBBBBBBBBB.BBBBBBBBBBB` */
|
|
2452
|
+
name:
|
|
2453
|
+
string;
|
|
2454
|
+
/** OAuth 2.0 token for the current user. */
|
|
2455
|
+
oauth_token?:
|
|
2456
|
+
string;
|
|
2457
|
+
/** Returns response with indentations and line breaks. */
|
|
2458
|
+
prettyPrint?:
|
|
2459
|
+
boolean;
|
|
2460
|
+
/** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
|
|
2461
|
+
quotaUser?:
|
|
2462
|
+
string;
|
|
2463
|
+
/**
|
|
2464
|
+
* Required. The field paths to update. Separate multiple values with commas. Currently supported field paths: - `text` - `cards` (Requires [service account
|
|
2465
|
+
* authentication](/chat/api/guides/auth/service-accounts).) - `cards_v2`
|
|
2466
|
+
*/
|
|
2467
|
+
updateMask?:
|
|
2468
|
+
string;
|
|
2469
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
2470
|
+
upload_protocol?:
|
|
2471
|
+
string;
|
|
2472
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
2473
|
+
uploadType?:
|
|
2474
|
+
string;
|
|
2475
|
+
/** Request body */
|
|
2476
|
+
resource:
|
|
2477
|
+
Message;
|
|
2478
|
+
}): Request<Message>;
|
|
2479
|
+
patch(request: {
|
|
2480
|
+
/** V1 error format. */
|
|
2481
|
+
"$.xgafv"?:
|
|
2482
|
+
string;
|
|
2483
|
+
/** OAuth access token. */
|
|
2484
|
+
access_token?:
|
|
2485
|
+
string;
|
|
2486
|
+
/**
|
|
2487
|
+
* Optional. If `true` and the message isn't found, a new message is created and `updateMask` is ignored. The specified message ID must be
|
|
2488
|
+
* [client-assigned](https://developers.google.com/chat/api/guides/crudl/messages#name_a_created_message) or the request fails.
|
|
2489
|
+
*/
|
|
2490
|
+
allowMissing?:
|
|
2491
|
+
boolean;
|
|
2492
|
+
/** Data format for response. */
|
|
2493
|
+
alt?:
|
|
2494
|
+
string;
|
|
2495
|
+
/** JSONP */
|
|
2496
|
+
callback?:
|
|
2497
|
+
string;
|
|
2498
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
2499
|
+
fields?:
|
|
2500
|
+
string;
|
|
2501
|
+
/** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
|
|
2502
|
+
key?:
|
|
2503
|
+
string;
|
|
2504
|
+
/** Resource name in the form `spaces/*/messages/*`. Example: `spaces/AAAAAAAAAAA/messages/BBBBBBBBBBB.BBBBBBBBBBB` */
|
|
2505
|
+
name:
|
|
2506
|
+
string;
|
|
2507
|
+
/** OAuth 2.0 token for the current user. */
|
|
2508
|
+
oauth_token?:
|
|
2509
|
+
string;
|
|
2510
|
+
/** Returns response with indentations and line breaks. */
|
|
2511
|
+
prettyPrint?:
|
|
2512
|
+
boolean;
|
|
2513
|
+
/** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
|
|
2514
|
+
quotaUser?:
|
|
2515
|
+
string;
|
|
2516
|
+
/**
|
|
2517
|
+
* Required. The field paths to update. Separate multiple values with commas. Currently supported field paths: - `text` - `cards` (Requires [service account
|
|
2518
|
+
* authentication](/chat/api/guides/auth/service-accounts).) - `cards_v2`
|
|
2519
|
+
*/
|
|
2520
|
+
updateMask?:
|
|
2521
|
+
string;
|
|
2522
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
2523
|
+
upload_protocol?:
|
|
2524
|
+
string;
|
|
2525
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
2526
|
+
uploadType?:
|
|
2527
|
+
string;
|
|
2528
|
+
},
|
|
2529
|
+
body: Message): Request<Message>;
|
|
2530
|
+
/**
|
|
2531
|
+
* Updates a message. There's a difference between `patch` and `update` methods. The `patch` method uses a `patch` request while the `update` method uses a `put` request. We recommend
|
|
2532
|
+
* using the `patch` method. For example usage, see [Update a message](https://developers.google.com/chat/api/guides/crudl/messages#update_a_message). Requires
|
|
2533
|
+
* [authentication](https://developers.google.com/chat/api/guides/auth/). Fully supports [service account
|
|
2534
|
+
* authentication](https://developers.google.com/chat/api/guides/auth/service-accounts). Supports [user authentication](https://developers.google.com/chat/api/guides/auth/users) as
|
|
2535
|
+
* part of the [Google Workspace Developer Preview Program](https://developers.google.com/workspace/preview), which grants early access to certain features. [User
|
|
2536
|
+
* authentication](https://developers.google.com/chat/api/guides/auth/users) requires the `chat.messages` authorization scope.
|
|
2537
|
+
*/
|
|
2538
|
+
update(request: {
|
|
2539
|
+
/** V1 error format. */
|
|
2540
|
+
"$.xgafv"?:
|
|
2541
|
+
string;
|
|
2542
|
+
/** OAuth access token. */
|
|
2543
|
+
access_token?:
|
|
2544
|
+
string;
|
|
2545
|
+
/**
|
|
2546
|
+
* Optional. If `true` and the message isn't found, a new message is created and `updateMask` is ignored. The specified message ID must be
|
|
2547
|
+
* [client-assigned](https://developers.google.com/chat/api/guides/crudl/messages#name_a_created_message) or the request fails.
|
|
2548
|
+
*/
|
|
2549
|
+
allowMissing?:
|
|
2550
|
+
boolean;
|
|
2551
|
+
/** Data format for response. */
|
|
2552
|
+
alt?:
|
|
2553
|
+
string;
|
|
2554
|
+
/** JSONP */
|
|
2555
|
+
callback?:
|
|
2556
|
+
string;
|
|
2557
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
2558
|
+
fields?:
|
|
2559
|
+
string;
|
|
2560
|
+
/** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
|
|
2561
|
+
key?:
|
|
2562
|
+
string;
|
|
2563
|
+
/** Resource name in the form `spaces/*/messages/*`. Example: `spaces/AAAAAAAAAAA/messages/BBBBBBBBBBB.BBBBBBBBBBB` */
|
|
2564
|
+
name:
|
|
2565
|
+
string;
|
|
2566
|
+
/** OAuth 2.0 token for the current user. */
|
|
2567
|
+
oauth_token?:
|
|
2568
|
+
string;
|
|
2569
|
+
/** Returns response with indentations and line breaks. */
|
|
2570
|
+
prettyPrint?:
|
|
2571
|
+
boolean;
|
|
2572
|
+
/** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
|
|
2573
|
+
quotaUser?:
|
|
2574
|
+
string;
|
|
2575
|
+
/**
|
|
2576
|
+
* Required. The field paths to update. Separate multiple values with commas. Currently supported field paths: - `text` - `cards` (Requires [service account
|
|
2577
|
+
* authentication](/chat/api/guides/auth/service-accounts).) - `cards_v2`
|
|
2578
|
+
*/
|
|
2579
|
+
updateMask?:
|
|
2580
|
+
string;
|
|
2581
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
2582
|
+
upload_protocol?:
|
|
2583
|
+
string;
|
|
2584
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
2585
|
+
uploadType?:
|
|
2586
|
+
string;
|
|
2587
|
+
/** Request body */
|
|
2588
|
+
resource:
|
|
2589
|
+
Message;
|
|
2590
|
+
}): Request<Message>;
|
|
2591
|
+
update(request: {
|
|
2592
|
+
/** V1 error format. */
|
|
2593
|
+
"$.xgafv"?:
|
|
2594
|
+
string;
|
|
2595
|
+
/** OAuth access token. */
|
|
2596
|
+
access_token?:
|
|
2597
|
+
string;
|
|
2598
|
+
/**
|
|
2599
|
+
* Optional. If `true` and the message isn't found, a new message is created and `updateMask` is ignored. The specified message ID must be
|
|
2600
|
+
* [client-assigned](https://developers.google.com/chat/api/guides/crudl/messages#name_a_created_message) or the request fails.
|
|
2601
|
+
*/
|
|
2602
|
+
allowMissing?:
|
|
2603
|
+
boolean;
|
|
2604
|
+
/** Data format for response. */
|
|
2605
|
+
alt?:
|
|
2606
|
+
string;
|
|
2607
|
+
/** JSONP */
|
|
2608
|
+
callback?:
|
|
2609
|
+
string;
|
|
2610
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
2611
|
+
fields?:
|
|
2612
|
+
string;
|
|
2613
|
+
/** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
|
|
2614
|
+
key?:
|
|
2615
|
+
string;
|
|
2616
|
+
/** Resource name in the form `spaces/*/messages/*`. Example: `spaces/AAAAAAAAAAA/messages/BBBBBBBBBBB.BBBBBBBBBBB` */
|
|
2617
|
+
name:
|
|
2618
|
+
string;
|
|
2619
|
+
/** OAuth 2.0 token for the current user. */
|
|
2620
|
+
oauth_token?:
|
|
2621
|
+
string;
|
|
2622
|
+
/** Returns response with indentations and line breaks. */
|
|
2623
|
+
prettyPrint?:
|
|
2624
|
+
boolean;
|
|
2625
|
+
/** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
|
|
2626
|
+
quotaUser?:
|
|
2627
|
+
string;
|
|
2628
|
+
/**
|
|
2629
|
+
* Required. The field paths to update. Separate multiple values with commas. Currently supported field paths: - `text` - `cards` (Requires [service account
|
|
2630
|
+
* authentication](/chat/api/guides/auth/service-accounts).) - `cards_v2`
|
|
2631
|
+
*/
|
|
2632
|
+
updateMask?:
|
|
2633
|
+
string;
|
|
2634
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
2635
|
+
upload_protocol?:
|
|
2636
|
+
string;
|
|
2637
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
2638
|
+
uploadType?:
|
|
2639
|
+
string;
|
|
2640
|
+
},
|
|
2641
|
+
body: Message): Request<Message>;
|
|
2642
|
+
attachments:
|
|
2643
|
+
AttachmentsResource;
|
|
2644
|
+
reactions:
|
|
2645
|
+
ReactionsResource;
|
|
2646
|
+
}
|
|
2647
|
+
interface SpacesResource {
|
|
2648
|
+
/**
|
|
2649
|
+
* [Developer Preview](https://developers.google.com/workspace/preview): Creates a named space. Spaces grouped by topics or that have guest access aren't supported. Requires [user
|
|
2650
|
+
* authentication](https://developers.google.com/chat/api/guides/auth/users) and the `chat.spaces.create` or `chat.spaces` scope.
|
|
2651
|
+
*/
|
|
2652
|
+
create(request: {
|
|
2653
|
+
/** V1 error format. */
|
|
2654
|
+
"$.xgafv"?:
|
|
2655
|
+
string;
|
|
1775
2656
|
/** OAuth access token. */
|
|
1776
2657
|
access_token?:
|
|
1777
2658
|
string;
|
|
1778
|
-
/**
|
|
1779
|
-
* Optional. If `true` and the message is not found, a new message is created and `updateMask` is ignored. The specified message ID must be
|
|
1780
|
-
* [client-assigned](https://developers.google.com/chat/api/guides/crudl/messages#name_a_created_message) or the request fails.
|
|
1781
|
-
*/
|
|
1782
|
-
allowMissing?:
|
|
1783
|
-
boolean;
|
|
1784
2659
|
/** Data format for response. */
|
|
1785
2660
|
alt?:
|
|
1786
2661
|
string;
|
|
@@ -1793,9 +2668,6 @@ declare namespace gapi.client {
|
|
|
1793
2668
|
/** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
|
|
1794
2669
|
key?:
|
|
1795
2670
|
string;
|
|
1796
|
-
/** Resource name in the form `spaces/*/messages/*`. Example: `spaces/AAAAAAAAAAA/messages/BBBBBBBBBBB.BBBBBBBBBBB` */
|
|
1797
|
-
name:
|
|
1798
|
-
string;
|
|
1799
2671
|
/** OAuth 2.0 token for the current user. */
|
|
1800
2672
|
oauth_token?:
|
|
1801
2673
|
string;
|
|
@@ -1806,10 +2678,10 @@ declare namespace gapi.client {
|
|
|
1806
2678
|
quotaUser?:
|
|
1807
2679
|
string;
|
|
1808
2680
|
/**
|
|
1809
|
-
*
|
|
1810
|
-
*
|
|
2681
|
+
* Optional. A unique identifier for this request. A random UUID is recommended. Specifying an existing request ID returns the space created with that ID instead of creating a new
|
|
2682
|
+
* space. Specifying an existing request ID from the same Chat app with a different authenticated user returns an error.
|
|
1811
2683
|
*/
|
|
1812
|
-
|
|
2684
|
+
requestId?:
|
|
1813
2685
|
string;
|
|
1814
2686
|
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
1815
2687
|
upload_protocol?:
|
|
@@ -1817,29 +2689,17 @@ declare namespace gapi.client {
|
|
|
1817
2689
|
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
1818
2690
|
uploadType?:
|
|
1819
2691
|
string;
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
* [authentication](https://developers.google.com/chat/api/guides/auth/). Fully supports [service account
|
|
1826
|
-
* authentication](https://developers.google.com/chat/api/guides/auth/service-accounts). Supports [user authentication](https://developers.google.com/chat/api/guides/auth/users) as
|
|
1827
|
-
* part of the [Google Workspace Developer Preview Program](https://developers.google.com/workspace/preview), which grants early access to certain features. [User
|
|
1828
|
-
* authentication](https://developers.google.com/chat/api/guides/auth/users) requires the `chat.messages` authorization scope.
|
|
1829
|
-
*/
|
|
1830
|
-
update(request: {
|
|
2692
|
+
/** Request body */
|
|
2693
|
+
resource:
|
|
2694
|
+
Space;
|
|
2695
|
+
}): Request<Space>;
|
|
2696
|
+
create(request: {
|
|
1831
2697
|
/** V1 error format. */
|
|
1832
2698
|
"$.xgafv"?:
|
|
1833
2699
|
string;
|
|
1834
2700
|
/** OAuth access token. */
|
|
1835
2701
|
access_token?:
|
|
1836
2702
|
string;
|
|
1837
|
-
/**
|
|
1838
|
-
* Optional. If `true` and the message is not found, a new message is created and `updateMask` is ignored. The specified message ID must be
|
|
1839
|
-
* [client-assigned](https://developers.google.com/chat/api/guides/crudl/messages#name_a_created_message) or the request fails.
|
|
1840
|
-
*/
|
|
1841
|
-
allowMissing?:
|
|
1842
|
-
boolean;
|
|
1843
2703
|
/** Data format for response. */
|
|
1844
2704
|
alt?:
|
|
1845
2705
|
string;
|
|
@@ -1852,9 +2712,6 @@ declare namespace gapi.client {
|
|
|
1852
2712
|
/** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
|
|
1853
2713
|
key?:
|
|
1854
2714
|
string;
|
|
1855
|
-
/** Resource name in the form `spaces/*/messages/*`. Example: `spaces/AAAAAAAAAAA/messages/BBBBBBBBBBB.BBBBBBBBBBB` */
|
|
1856
|
-
name:
|
|
1857
|
-
string;
|
|
1858
2715
|
/** OAuth 2.0 token for the current user. */
|
|
1859
2716
|
oauth_token?:
|
|
1860
2717
|
string;
|
|
@@ -1865,10 +2722,10 @@ declare namespace gapi.client {
|
|
|
1865
2722
|
quotaUser?:
|
|
1866
2723
|
string;
|
|
1867
2724
|
/**
|
|
1868
|
-
*
|
|
1869
|
-
*
|
|
2725
|
+
* Optional. A unique identifier for this request. A random UUID is recommended. Specifying an existing request ID returns the space created with that ID instead of creating a new
|
|
2726
|
+
* space. Specifying an existing request ID from the same Chat app with a different authenticated user returns an error.
|
|
1870
2727
|
*/
|
|
1871
|
-
|
|
2728
|
+
requestId?:
|
|
1872
2729
|
string;
|
|
1873
2730
|
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
1874
2731
|
upload_protocol?:
|
|
@@ -1876,23 +2733,20 @@ declare namespace gapi.client {
|
|
|
1876
2733
|
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
1877
2734
|
uploadType?:
|
|
1878
2735
|
string;
|
|
1879
|
-
|
|
1880
|
-
|
|
1881
|
-
|
|
1882
|
-
|
|
1883
|
-
|
|
2736
|
+
},
|
|
2737
|
+
body: Space): Request<Space>;
|
|
2738
|
+
/**
|
|
2739
|
+
* [Developer Preview](https://developers.google.com/workspace/preview): Deletes a named space. Always performs a cascading delete, which means that the space's child resources—like
|
|
2740
|
+
* messages posted in the space and memberships in the space—are also deleted. Requires [user authentication](https://developers.google.com/chat/api/guides/auth/users) from a user who
|
|
2741
|
+
* has permission to delete the space, and the `chat.delete` scope.
|
|
2742
|
+
*/
|
|
2743
|
+
delete(request?: {
|
|
1884
2744
|
/** V1 error format. */
|
|
1885
2745
|
"$.xgafv"?:
|
|
1886
2746
|
string;
|
|
1887
2747
|
/** OAuth access token. */
|
|
1888
2748
|
access_token?:
|
|
1889
2749
|
string;
|
|
1890
|
-
/**
|
|
1891
|
-
* Optional. If `true` and the message is not found, a new message is created and `updateMask` is ignored. The specified message ID must be
|
|
1892
|
-
* [client-assigned](https://developers.google.com/chat/api/guides/crudl/messages#name_a_created_message) or the request fails.
|
|
1893
|
-
*/
|
|
1894
|
-
allowMissing?:
|
|
1895
|
-
boolean;
|
|
1896
2750
|
/** Data format for response. */
|
|
1897
2751
|
alt?:
|
|
1898
2752
|
string;
|
|
@@ -1905,7 +2759,7 @@ declare namespace gapi.client {
|
|
|
1905
2759
|
/** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
|
|
1906
2760
|
key?:
|
|
1907
2761
|
string;
|
|
1908
|
-
/** Resource name
|
|
2762
|
+
/** Required. Resource name of the space to delete. Format: `spaces/{space}` */
|
|
1909
2763
|
name:
|
|
1910
2764
|
string;
|
|
1911
2765
|
/** OAuth 2.0 token for the current user. */
|
|
@@ -1917,11 +2771,55 @@ declare namespace gapi.client {
|
|
|
1917
2771
|
/** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
|
|
1918
2772
|
quotaUser?:
|
|
1919
2773
|
string;
|
|
2774
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
2775
|
+
upload_protocol?:
|
|
2776
|
+
string;
|
|
2777
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
2778
|
+
uploadType?:
|
|
2779
|
+
string;
|
|
2780
|
+
}): Request<{}>;
|
|
2781
|
+
/**
|
|
2782
|
+
* [Developer Preview](https://developers.google.com/workspace/preview): Returns the existing direct message with the specified user. With [user
|
|
2783
|
+
* authentication](https://developers.google.com/chat/api/guides/auth/users), returns the direct message space between the specified user and the authenticated user. With [service
|
|
2784
|
+
* account authentication](https://developers.google.com/chat/api/guides/auth/service-accounts), returns the direct message space between the specified user and the calling Chat app.
|
|
2785
|
+
* If no direct message space is found, returns a `404 NOT_FOUND` error. Requires [user authentication](https://developers.google.com/chat/api/guides/auth/users) or [service account
|
|
2786
|
+
* authentication](https://developers.google.com/chat/api/guides/auth/service-accounts).
|
|
2787
|
+
*/
|
|
2788
|
+
findDirectMessage(request?: {
|
|
2789
|
+
/** V1 error format. */
|
|
2790
|
+
"$.xgafv"?:
|
|
2791
|
+
string;
|
|
2792
|
+
/** OAuth access token. */
|
|
2793
|
+
access_token?:
|
|
2794
|
+
string;
|
|
2795
|
+
/** Data format for response. */
|
|
2796
|
+
alt?:
|
|
2797
|
+
string;
|
|
2798
|
+
/** JSONP */
|
|
2799
|
+
callback?:
|
|
2800
|
+
string;
|
|
2801
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
2802
|
+
fields?:
|
|
2803
|
+
string;
|
|
2804
|
+
/** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
|
|
2805
|
+
key?:
|
|
2806
|
+
string;
|
|
1920
2807
|
/**
|
|
1921
|
-
* Required.
|
|
1922
|
-
*
|
|
2808
|
+
* Required. Resource name of the user to find direct message with. Format: `users/{user}`, where `{user}` is either the `{person_id}` for the
|
|
2809
|
+
* [person](https://developers.google.com/people/api/rest/v1/people) from the People API, or the `id` for the
|
|
2810
|
+
* [user](https://developers.google.com/admin-sdk/directory/reference/rest/v1/users) in the Directory API. For example, if the People API `Person.resourceName` is
|
|
2811
|
+
* `people/123456789`, you can find a direct message with that person by using `users/123456789` as the `name`.
|
|
1923
2812
|
*/
|
|
1924
|
-
|
|
2813
|
+
name?:
|
|
2814
|
+
string;
|
|
2815
|
+
/** OAuth 2.0 token for the current user. */
|
|
2816
|
+
oauth_token?:
|
|
2817
|
+
string;
|
|
2818
|
+
/** Returns response with indentations and line breaks. */
|
|
2819
|
+
prettyPrint?:
|
|
2820
|
+
boolean;
|
|
2821
|
+
/** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
|
|
2822
|
+
quotaUser?:
|
|
1925
2823
|
string;
|
|
1926
2824
|
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
1927
2825
|
upload_protocol?:
|
|
@@ -1929,12 +2827,7 @@ declare namespace gapi.client {
|
|
|
1929
2827
|
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
1930
2828
|
uploadType?:
|
|
1931
2829
|
string;
|
|
1932
|
-
}
|
|
1933
|
-
body: Message): Request<Message>;
|
|
1934
|
-
attachments:
|
|
1935
|
-
AttachmentsResource;
|
|
1936
|
-
}
|
|
1937
|
-
interface SpacesResource {
|
|
2830
|
+
}): Request<Space>;
|
|
1938
2831
|
/**
|
|
1939
2832
|
* Returns a space. Requires [authentication](https://developers.google.com/chat/api/guides/auth). Fully supports [service account
|
|
1940
2833
|
* authentication](https://developers.google.com/chat/api/guides/auth/service-accounts). Supports [user authentication](https://developers.google.com/chat/api/guides/auth/users) as
|
|
@@ -1960,7 +2853,7 @@ declare namespace gapi.client {
|
|
|
1960
2853
|
/** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
|
|
1961
2854
|
key?:
|
|
1962
2855
|
string;
|
|
1963
|
-
/** Required. Resource name of the space, in the form "spaces/*". Format: spaces/{space} */
|
|
2856
|
+
/** Required. Resource name of the space, in the form "spaces/*". Format: `spaces/{space}` */
|
|
1964
2857
|
name:
|
|
1965
2858
|
string;
|
|
1966
2859
|
/** OAuth 2.0 token for the current user. */
|
|
@@ -2002,6 +2895,16 @@ declare namespace gapi.client {
|
|
|
2002
2895
|
/** Selector specifying which fields to include in a partial response. */
|
|
2003
2896
|
fields?:
|
|
2004
2897
|
string;
|
|
2898
|
+
/**
|
|
2899
|
+
* Optional. A query filter. Requires [user authentication](https://developers.google.com/chat/api/guides/auth/users). You can filter spaces by the space type
|
|
2900
|
+
* ([`space_type`](https://developers.google.com/chat/api/reference/rest/v1/spaces#spacetype)). To filter by space type, you must specify valid enum value, such as `SPACE` or
|
|
2901
|
+
* `GROUP_CHAT` (the `space_type` can't be `SPACE_TYPE_UNSPECIFIED`). To query for multiple space types, use the `OR` operator. For example, the following queries are valid: ```
|
|
2902
|
+
* space_type = "SPACE" spaceType = "GROUP_CHAT" OR spaceType = "DIRECT_MESSAGE" ``` Invalid queries are rejected by the server with an `INVALID_ARGUMENT` error. With [service
|
|
2903
|
+
* account authentication](https://developers.google.com/chat/api/guides/auth/service-accounts), this field is ignored and the query always returns all spaces. But the Chat API
|
|
2904
|
+
* still validates the query syntax with service accounts, so invalid queries are still rejected. [Developer Preview](https://developers.google.com/workspace/preview).
|
|
2905
|
+
*/
|
|
2906
|
+
filter?:
|
|
2907
|
+
string;
|
|
2005
2908
|
/** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
|
|
2006
2909
|
key?:
|
|
2007
2910
|
string;
|
|
@@ -2009,14 +2912,14 @@ declare namespace gapi.client {
|
|
|
2009
2912
|
oauth_token?:
|
|
2010
2913
|
string;
|
|
2011
2914
|
/**
|
|
2012
|
-
* Optional. The maximum number of spaces to return. The service
|
|
2013
|
-
*
|
|
2915
|
+
* Optional. The maximum number of spaces to return. The service might return fewer than this value. If unspecified, at most 100 spaces are returned. The maximum value is 1,000. If
|
|
2916
|
+
* you use a value more than 1,000, it's automatically changed to 1,000. Negative values return an `INVALID_ARGUMENT` error.
|
|
2014
2917
|
*/
|
|
2015
2918
|
pageSize?:
|
|
2016
2919
|
number;
|
|
2017
2920
|
/**
|
|
2018
|
-
* Optional. A page token, received from a previous list spaces call. Provide this to retrieve the subsequent page. When paginating, the filter value should match the
|
|
2019
|
-
* provided the page token. Passing a different value may lead to unexpected results.
|
|
2921
|
+
* Optional. A page token, received from a previous list spaces call. Provide this parameter to retrieve the subsequent page. When paginating, the filter value should match the
|
|
2922
|
+
* call that provided the page token. Passing a different value may lead to unexpected results.
|
|
2020
2923
|
*/
|
|
2021
2924
|
pageToken?:
|
|
2022
2925
|
string;
|
|
@@ -2033,6 +2936,199 @@ declare namespace gapi.client {
|
|
|
2033
2936
|
uploadType?:
|
|
2034
2937
|
string;
|
|
2035
2938
|
}): Request<ListSpacesResponse>;
|
|
2939
|
+
/**
|
|
2940
|
+
* [Developer Preview](https://developers.google.com/workspace/preview): Updates a space. Requires [user authentication](https://developers.google.com/chat/api/guides/auth/users) and
|
|
2941
|
+
* the `chat.spaces` scope.
|
|
2942
|
+
*/
|
|
2943
|
+
patch(request: {
|
|
2944
|
+
/** V1 error format. */
|
|
2945
|
+
"$.xgafv"?:
|
|
2946
|
+
string;
|
|
2947
|
+
/** OAuth access token. */
|
|
2948
|
+
access_token?:
|
|
2949
|
+
string;
|
|
2950
|
+
/** Data format for response. */
|
|
2951
|
+
alt?:
|
|
2952
|
+
string;
|
|
2953
|
+
/** JSONP */
|
|
2954
|
+
callback?:
|
|
2955
|
+
string;
|
|
2956
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
2957
|
+
fields?:
|
|
2958
|
+
string;
|
|
2959
|
+
/** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
|
|
2960
|
+
key?:
|
|
2961
|
+
string;
|
|
2962
|
+
/** Resource name of the space. Format: `spaces/{space}` */
|
|
2963
|
+
name:
|
|
2964
|
+
string;
|
|
2965
|
+
/** OAuth 2.0 token for the current user. */
|
|
2966
|
+
oauth_token?:
|
|
2967
|
+
string;
|
|
2968
|
+
/** Returns response with indentations and line breaks. */
|
|
2969
|
+
prettyPrint?:
|
|
2970
|
+
boolean;
|
|
2971
|
+
/** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
|
|
2972
|
+
quotaUser?:
|
|
2973
|
+
string;
|
|
2974
|
+
/**
|
|
2975
|
+
* Required. The updated field paths, comma separated if there are multiple. Currently supported field paths: - `display_name` (Only supports changing the display name of a space
|
|
2976
|
+
* with the `SPACE` type, or when also including the `space_type` mask to change a `GROUP_CHAT` space type to `SPACE`. Trying to update the display name of a `GROUP_CHAT` or a
|
|
2977
|
+
* `DIRECT_MESSAGE` space results in an invalid argument error.) - `space_type` (Only supports changing a `GROUP_CHAT` space type to `SPACE`. Include `display_name` together with
|
|
2978
|
+
* `space_type` in the update mask and ensure that the specified space has a non-empty display name and the `SPACE` space type. Including the `space_type` mask and the `SPACE` type
|
|
2979
|
+
* in the specified space when updating the display name is optional if the existing space already has the `SPACE` type. Trying to update the space type in other ways results in an
|
|
2980
|
+
* invalid argument error). - `space_details` - `space_history_state` (Supports [turning history on or off for the space](https://support.google.com/chat/answer/7664687) if [the
|
|
2981
|
+
* organization allows users to change their history setting](https://support.google.com/a/answer/7664184). Warning: mutually exclusive with all other field paths.)
|
|
2982
|
+
*/
|
|
2983
|
+
updateMask?:
|
|
2984
|
+
string;
|
|
2985
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
2986
|
+
upload_protocol?:
|
|
2987
|
+
string;
|
|
2988
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
2989
|
+
uploadType?:
|
|
2990
|
+
string;
|
|
2991
|
+
/** Request body */
|
|
2992
|
+
resource:
|
|
2993
|
+
Space;
|
|
2994
|
+
}): Request<Space>;
|
|
2995
|
+
patch(request: {
|
|
2996
|
+
/** V1 error format. */
|
|
2997
|
+
"$.xgafv"?:
|
|
2998
|
+
string;
|
|
2999
|
+
/** OAuth access token. */
|
|
3000
|
+
access_token?:
|
|
3001
|
+
string;
|
|
3002
|
+
/** Data format for response. */
|
|
3003
|
+
alt?:
|
|
3004
|
+
string;
|
|
3005
|
+
/** JSONP */
|
|
3006
|
+
callback?:
|
|
3007
|
+
string;
|
|
3008
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
3009
|
+
fields?:
|
|
3010
|
+
string;
|
|
3011
|
+
/** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
|
|
3012
|
+
key?:
|
|
3013
|
+
string;
|
|
3014
|
+
/** Resource name of the space. Format: `spaces/{space}` */
|
|
3015
|
+
name:
|
|
3016
|
+
string;
|
|
3017
|
+
/** OAuth 2.0 token for the current user. */
|
|
3018
|
+
oauth_token?:
|
|
3019
|
+
string;
|
|
3020
|
+
/** Returns response with indentations and line breaks. */
|
|
3021
|
+
prettyPrint?:
|
|
3022
|
+
boolean;
|
|
3023
|
+
/** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
|
|
3024
|
+
quotaUser?:
|
|
3025
|
+
string;
|
|
3026
|
+
/**
|
|
3027
|
+
* Required. The updated field paths, comma separated if there are multiple. Currently supported field paths: - `display_name` (Only supports changing the display name of a space
|
|
3028
|
+
* with the `SPACE` type, or when also including the `space_type` mask to change a `GROUP_CHAT` space type to `SPACE`. Trying to update the display name of a `GROUP_CHAT` or a
|
|
3029
|
+
* `DIRECT_MESSAGE` space results in an invalid argument error.) - `space_type` (Only supports changing a `GROUP_CHAT` space type to `SPACE`. Include `display_name` together with
|
|
3030
|
+
* `space_type` in the update mask and ensure that the specified space has a non-empty display name and the `SPACE` space type. Including the `space_type` mask and the `SPACE` type
|
|
3031
|
+
* in the specified space when updating the display name is optional if the existing space already has the `SPACE` type. Trying to update the space type in other ways results in an
|
|
3032
|
+
* invalid argument error). - `space_details` - `space_history_state` (Supports [turning history on or off for the space](https://support.google.com/chat/answer/7664687) if [the
|
|
3033
|
+
* organization allows users to change their history setting](https://support.google.com/a/answer/7664184). Warning: mutually exclusive with all other field paths.)
|
|
3034
|
+
*/
|
|
3035
|
+
updateMask?:
|
|
3036
|
+
string;
|
|
3037
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
3038
|
+
upload_protocol?:
|
|
3039
|
+
string;
|
|
3040
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
3041
|
+
uploadType?:
|
|
3042
|
+
string;
|
|
3043
|
+
},
|
|
3044
|
+
body: Space): Request<Space>;
|
|
3045
|
+
/**
|
|
3046
|
+
* [Developer Preview](https://developers.google.com/workspace/preview): Creates a space and adds specified users to it. The calling user is automatically added to the space, and
|
|
3047
|
+
* shouldn't be specified as a membership in the request. To specify the human members to add, add memberships with the appropriate `member.name` in the `SetUpSpaceRequest`. To add a
|
|
3048
|
+
* human user, use `users/{user}`, where `{user}` is either the `{person_id}` for the [person](https://developers.google.com/people/api/rest/v1/people) from the People API, or the `id`
|
|
3049
|
+
* for the [user](https://developers.google.com/admin-sdk/directory/reference/rest/v1/users) in the Admin SDK Directory API. For example, if the People API `Person` `resourceName` is
|
|
3050
|
+
* `people/123456789`, you can add the user to the space by including a membership with `users/123456789` as the `member.name`. For a space or group chat, if the caller blocks or is
|
|
3051
|
+
* blocked by some members, then those members aren't added to the created space. To create a direct message (DM) between the calling user and another human user, specify exactly one
|
|
3052
|
+
* membership to represent the human user. If one user blocks the other, the request fails and the DM isn't created. To create a DM between the calling user and the calling app, set
|
|
3053
|
+
* `Space.singleUserBotDm` to true and don't specify any memberships. You can only use this method to add app memberships to DMs. To add the calling app as a member of other space
|
|
3054
|
+
* types, use [create membership](https://developers.google.com/chat/api/reference/rest/v1/spaces.members/create) If a DM already exists between two users, even when one user blocks
|
|
3055
|
+
* the other at the time a request is made, then the existing DM is returned. Spaces with threaded replies or guest access aren't supported. Requires [user
|
|
3056
|
+
* authentication](https://developers.google.com/chat/api/guides/auth/users) and the `chat.spaces.create` or `chat.spaces` scope.
|
|
3057
|
+
*/
|
|
3058
|
+
setup(request: {
|
|
3059
|
+
/** V1 error format. */
|
|
3060
|
+
"$.xgafv"?:
|
|
3061
|
+
string;
|
|
3062
|
+
/** OAuth access token. */
|
|
3063
|
+
access_token?:
|
|
3064
|
+
string;
|
|
3065
|
+
/** Data format for response. */
|
|
3066
|
+
alt?:
|
|
3067
|
+
string;
|
|
3068
|
+
/** JSONP */
|
|
3069
|
+
callback?:
|
|
3070
|
+
string;
|
|
3071
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
3072
|
+
fields?:
|
|
3073
|
+
string;
|
|
3074
|
+
/** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
|
|
3075
|
+
key?:
|
|
3076
|
+
string;
|
|
3077
|
+
/** OAuth 2.0 token for the current user. */
|
|
3078
|
+
oauth_token?:
|
|
3079
|
+
string;
|
|
3080
|
+
/** Returns response with indentations and line breaks. */
|
|
3081
|
+
prettyPrint?:
|
|
3082
|
+
boolean;
|
|
3083
|
+
/** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
|
|
3084
|
+
quotaUser?:
|
|
3085
|
+
string;
|
|
3086
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
3087
|
+
upload_protocol?:
|
|
3088
|
+
string;
|
|
3089
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
3090
|
+
uploadType?:
|
|
3091
|
+
string;
|
|
3092
|
+
/** Request body */
|
|
3093
|
+
resource:
|
|
3094
|
+
SetUpSpaceRequest;
|
|
3095
|
+
}): Request<Space>;
|
|
3096
|
+
setup(request: {
|
|
3097
|
+
/** V1 error format. */
|
|
3098
|
+
"$.xgafv"?:
|
|
3099
|
+
string;
|
|
3100
|
+
/** OAuth access token. */
|
|
3101
|
+
access_token?:
|
|
3102
|
+
string;
|
|
3103
|
+
/** Data format for response. */
|
|
3104
|
+
alt?:
|
|
3105
|
+
string;
|
|
3106
|
+
/** JSONP */
|
|
3107
|
+
callback?:
|
|
3108
|
+
string;
|
|
3109
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
3110
|
+
fields?:
|
|
3111
|
+
string;
|
|
3112
|
+
/** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
|
|
3113
|
+
key?:
|
|
3114
|
+
string;
|
|
3115
|
+
/** OAuth 2.0 token for the current user. */
|
|
3116
|
+
oauth_token?:
|
|
3117
|
+
string;
|
|
3118
|
+
/** Returns response with indentations and line breaks. */
|
|
3119
|
+
prettyPrint?:
|
|
3120
|
+
boolean;
|
|
3121
|
+
/** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
|
|
3122
|
+
quotaUser?:
|
|
3123
|
+
string;
|
|
3124
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
3125
|
+
upload_protocol?:
|
|
3126
|
+
string;
|
|
3127
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
3128
|
+
uploadType?:
|
|
3129
|
+
string;
|
|
3130
|
+
},
|
|
3131
|
+
body: SetUpSpaceRequest): Request<Space>;
|
|
2036
3132
|
members:
|
|
2037
3133
|
MembersResource;
|
|
2038
3134
|
messages:
|