@maxim_mazurok/gapi.client.chat-v1 0.0.20220805

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 ADDED
@@ -0,0 +1,1735 @@
1
+ /* Type definitions for non-npm package Google Chat API v1 0.0 */
2
+ // Project: https://developers.google.com/hangouts/chat
3
+ // Definitions by: Maxim Mazurok <https://github.com/Maxim-Mazurok>
4
+ // Nick Amoscato <https://github.com/namoscato>
5
+ // Declan Vong <https://github.com/declanvong>
6
+ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
7
+ // TypeScript Version: 2.8
8
+
9
+ // IMPORTANT
10
+ // This file was generated by https://github.com/Maxim-Mazurok/google-api-typings-generator. Please do not edit it manually.
11
+ // In case of any problems please post issue to https://github.com/Maxim-Mazurok/google-api-typings-generator
12
+ // Generated from: https://chat.googleapis.com/$discovery/rest?version=v1
13
+ // Revision: 20220805
14
+
15
+ /// <reference types="gapi.client" />
16
+
17
+ declare namespace gapi.client {
18
+ /** Load Google Chat API v1 */
19
+ function load(urlOrObject: "https://chat.googleapis.com/$discovery/rest?version=v1"): Promise<void>;
20
+ /** @deprecated Please load APIs with discovery documents. */
21
+ function load(name: "chat", version: "v1"): Promise<void>;
22
+ /** @deprecated Please load APIs with discovery documents. */
23
+ function load(name: "chat", version: "v1", callback: () => any): void;
24
+
25
+ namespace chat {
26
+ interface ActionParameter {
27
+ /** The name of the parameter for the action script. */
28
+ key?: string;
29
+ /** The value of the parameter. */
30
+ value?: string;
31
+ }
32
+ interface ActionResponse {
33
+ /** Input only. A response to an event related to a [dialog](https://developers.google.com/chat/how-tos/dialogs). Must be accompanied by `ResponseType.Dialog`. */
34
+ dialogAction?: DialogAction;
35
+ /** Input only. The type of Chat app response. */
36
+ type?: string;
37
+ /** Input only. URL for users to auth or config. (Only for REQUEST_CONFIG response types.) */
38
+ url?: string;
39
+ }
40
+ interface ActionStatus {
41
+ /** The status code. */
42
+ statusCode?: string;
43
+ /** The message to send users about the status of their request. If unset, a generic message based on the `status_code` is sent. */
44
+ userFacingMessage?: string;
45
+ }
46
+ interface Annotation {
47
+ /** Length of the substring in the plain-text message body this annotation corresponds to. */
48
+ length?: number;
49
+ /** The metadata for a slash command. */
50
+ slashCommand?: SlashCommandMetadata;
51
+ /** Start index (0-based, inclusive) in the plain-text message body this annotation corresponds to. */
52
+ startIndex?: number;
53
+ /** The type of this annotation. */
54
+ type?: string;
55
+ /** The metadata of user mention. */
56
+ userMention?: UserMentionMetadata;
57
+ }
58
+ interface Attachment {
59
+ /** A reference to the attachment data. This is used with the media API to download the attachment data. */
60
+ attachmentDataRef?: AttachmentDataRef;
61
+ /** The original file name for the content, not the full path. */
62
+ contentName?: string;
63
+ /** The content type (MIME type) of the file. */
64
+ contentType?: string;
65
+ /** Output only. The download URL which should be used to allow a human user to download the attachment. Chat apps should not use this URL to download attachment content. */
66
+ downloadUri?: string;
67
+ /** A reference to the drive attachment. This is used with the Drive API. */
68
+ driveDataRef?: DriveDataRef;
69
+ /** Resource name of the attachment, in the form "spaces/*‍/messages/*‍/attachments/*". */
70
+ name?: string;
71
+ /** The source of the attachment. */
72
+ source?: string;
73
+ /** Output only. The thumbnail URL which should be used to preview the attachment to a human user. Chat apps should not use this URL to download attachment content. */
74
+ thumbnailUri?: string;
75
+ }
76
+ interface AttachmentDataRef {
77
+ /** The resource name of the attachment data. This is used with the media API to download the attachment data. */
78
+ resourceName?: string;
79
+ }
80
+ interface Button {
81
+ /** A button with image and onclick action. */
82
+ imageButton?: ImageButton;
83
+ /** A button with text and onclick action. */
84
+ textButton?: TextButton;
85
+ }
86
+ interface Card {
87
+ /** The actions of this card. */
88
+ cardActions?: CardAction[];
89
+ /** The header of the card. A header usually contains a title and an image. */
90
+ header?: CardHeader;
91
+ /** Name of the card. */
92
+ name?: string;
93
+ /** Sections are separated by a line divider. */
94
+ sections?: Section[];
95
+ }
96
+ interface CardAction {
97
+ /** The label used to be displayed in the action menu item. */
98
+ actionLabel?: string;
99
+ /** The onclick action for this action item. */
100
+ onClick?: OnClick;
101
+ }
102
+ interface CardHeader {
103
+ /** The image's type (e.g. square border or circular border). */
104
+ imageStyle?: string;
105
+ /** The URL of the image in the card header. */
106
+ imageUrl?: string;
107
+ /** The subtitle of the card header. */
108
+ subtitle?: string;
109
+ /**
110
+ * The title must be specified. The header has a fixed height: if both a title and subtitle is specified, each will take up 1 line. If only the title is specified, it will take up both
111
+ * lines.
112
+ */
113
+ title?: string;
114
+ }
115
+ interface CardWithId {
116
+ /** Card proto that allows Chat apps to specify UI elements and editable widgets. */
117
+ card?: GoogleAppsCardV1Card;
118
+ /** Required for `cardsV2` messages. Chat app-specified identifier for this widget. Scoped within a message. */
119
+ cardId?: string;
120
+ }
121
+ interface ChatAppLogEntry {
122
+ /** The deployment that caused the error. For Chat apps built in Apps Script, this is the deployment ID defined by Apps Script. */
123
+ deployment?: string;
124
+ /** The unencrypted `callback_method` name that was running when the error was encountered. */
125
+ deploymentFunction?: string;
126
+ /** The error code and message. */
127
+ error?: Status;
128
+ }
129
+ interface Color {
130
+ /**
131
+ * The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: `pixel color = alpha * (this color) + (1.0 - alpha) *
132
+ * (background color)` This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message
133
+ * rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is rendered as a solid color
134
+ * (as if the alpha value had been explicitly given a value of 1.0).
135
+ */
136
+ alpha?: number;
137
+ /** The amount of blue in the color as a value in the interval [0, 1]. */
138
+ blue?: number;
139
+ /** The amount of green in the color as a value in the interval [0, 1]. */
140
+ green?: number;
141
+ /** The amount of red in the color as a value in the interval [0, 1]. */
142
+ red?: number;
143
+ }
144
+ interface CommonEventObject {
145
+ /**
146
+ * A map containing the current values of the widgets in a card. The map keys are the string IDs assigned to each widget, and the values represent inputs to the widget. Depending on
147
+ * the input data type, a different object represents each input: For single-value widgets, `StringInput`. For multi-value widgets, an array of `StringInput` objects. For a date-time
148
+ * picker, a `DateTimeInput`. For a date-only picker, a `DateInput`. For a time-only picker, a `TimeInput`. Corresponds with the data entered by a user on a card in a
149
+ * [dialog](https://developers.google.com/chat/how-tos/dialogs).
150
+ */
151
+ formInputs?: { [P in string]: Inputs };
152
+ /** The hostApp enum which indicates the app the add-on is invoked from. Always `CHAT` for Chat apps. */
153
+ hostApp?: string;
154
+ /** Name of the invoked function associated with the widget. Only set for Chat apps. */
155
+ invokedFunction?: string;
156
+ /** Custom [parameters](/chat/api/reference/rest/v1/cards#ActionParameter) passed to the invoked function. Both keys and values must be strings. */
157
+ parameters?: { [P in string]: string };
158
+ /** The platform enum which indicates the platform where the event originates (`WEB`, `IOS`, or `ANDROID`). Not supported by Chat apps. */
159
+ platform?: string;
160
+ /** The timezone ID and offset from Coordinated Universal Time (UTC). */
161
+ timeZone?: TimeZone;
162
+ /** The full `locale.displayName` in the format of [ISO 639 language code]-[ISO 3166 country/region code] such as "en-US". Not supported by Chat apps. */
163
+ userLocale?: string;
164
+ }
165
+ interface DateInput {
166
+ /** Time since epoch time, in milliseconds. */
167
+ msSinceEpoch?: string;
168
+ }
169
+ interface DateTimeInput {
170
+ /** Whether the `datetime` input includes a calendar date. */
171
+ hasDate?: boolean;
172
+ /** Whether the `datetime` input includes a timestamp. */
173
+ hasTime?: boolean;
174
+ /** Time since epoch time, in milliseconds. */
175
+ msSinceEpoch?: string;
176
+ }
177
+ interface DeprecatedEvent {
178
+ /**
179
+ * 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
180
+ * more information.
181
+ */
182
+ action?: FormAction;
183
+ /**
184
+ * Represents information about the user's client, such as locale, host app, and platform. For Chat apps, `CommonEventObject` includes information submitted by users interacting with
185
+ * [dialogs](https://developers.google.com/chat/how-tos/dialogs), like data entered on a card.
186
+ */
187
+ common?: CommonEventObject;
188
+ /**
189
+ * The URL the Chat app should redirect the user to after they have completed an authorization or configuration flow outside of Google Chat. See the [Authorizing access to 3p services
190
+ * guide](/chat/how-tos/auth-3p) for more information.
191
+ */
192
+ configCompleteRedirectUrl?: string;
193
+ /** The type of [dialog](https://developers.google.com/chat/how-tos/dialogs) event received. */
194
+ dialogEventType?: string;
195
+ /** The timestamp indicating when the event occurred. */
196
+ eventTime?: string;
197
+ /** True when the event is related to [dialogs](https://developers.google.com/chat/how-tos/dialogs). */
198
+ isDialogEvent?: boolean;
199
+ /** The message that triggered the event, if applicable. */
200
+ message?: Message;
201
+ /** The space in which the event occurred. */
202
+ space?: Space;
203
+ /** The Chat app-defined key for the thread related to the event. See the thread_key field of the `spaces.message.create` request for more information. */
204
+ threadKey?: string;
205
+ /**
206
+ * A secret value that legacy Chat apps can use to verify if a request is from Google. Google randomly generates the token, and its value remains static. You can obtain, revoke, or
207
+ * regenerate the token from the [Chat API configuration page](https://console.cloud.google.com/apis/api/chat.googleapis.com/hangouts-chat) in the Google Cloud Console. Modern Chat
208
+ * apps don't use this field. It is absent from API responses and the [Chat API configuration page](https://console.cloud.google.com/apis/api/chat.googleapis.com/hangouts-chat).
209
+ */
210
+ token?: string;
211
+ /** The type of the event. */
212
+ type?: string;
213
+ /** The user that triggered the event. */
214
+ user?: User;
215
+ }
216
+ interface Dialog {
217
+ /** Input only. Body of the dialog, which is rendered in a modal. Google Chat apps do not support the following card entities: `DateTimePicker`, `OnChangeAction`. */
218
+ body?: GoogleAppsCardV1Card;
219
+ }
220
+ interface DialogAction {
221
+ /**
222
+ * Input only. Status for a request to either invoke or submit a [dialog](https://developers.google.com/chat/how-tos/dialogs). Displays a status and message to users, if necessary. For
223
+ * example, in case of an error or success.
224
+ */
225
+ actionStatus?: ActionStatus;
226
+ /** Input only. [Dialog](https://developers.google.com/chat/how-tos/dialogs) for the request. */
227
+ dialog?: Dialog;
228
+ }
229
+ interface DriveDataRef {
230
+ /** The id for the drive file, for use with the Drive API. */
231
+ driveFileId?: string;
232
+ }
233
+ // tslint:disable-next-line:no-empty-interface
234
+ interface Empty {
235
+ }
236
+ interface FormAction {
237
+ /**
238
+ * 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. The same
239
+ * method name can be used for several elements that trigger a common behavior if desired.
240
+ */
241
+ actionMethodName?: string;
242
+ /** List of action parameters. */
243
+ parameters?: ActionParameter[];
244
+ }
245
+ interface GoogleAppsCardV1Action {
246
+ /** Apps Script function to invoke when the containing element is clicked/activated. */
247
+ function?: string;
248
+ /** Specifies the loading indicator that the action displays while making the call to the action. */
249
+ loadIndicator?: string;
250
+ /** List of action parameters. */
251
+ parameters?: GoogleAppsCardV1ActionParameter[];
252
+ /**
253
+ * Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. When using
254
+ * [LoadIndicator.NONE](workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) for actions, `persist_values` = `true`is recommended, as it ensures that any changes made by
255
+ * the user after form or on change actions are sent to the server are not overwritten by the response. If `false`, the form values are cleared when the action is triggered. When
256
+ * `persist_values` is set to `false`, it is strongly recommended that the card use [LoadIndicator.SPINNER](workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) for all
257
+ * actions, as this locks the UI to ensure no changes are made by the user while the action is being processed. Not supported by Google Chat apps.
258
+ */
259
+ persistValues?: boolean;
260
+ }
261
+ interface GoogleAppsCardV1ActionParameter {
262
+ /** The name of the parameter for the action script. */
263
+ key?: string;
264
+ /** The value of the parameter. */
265
+ value?: string;
266
+ }
267
+ interface GoogleAppsCardV1BorderStyle {
268
+ /** The corner radius for the border. */
269
+ cornerRadius?: number;
270
+ /** The colors to use when the type is `BORDER_TYPE_STROKE`. */
271
+ strokeColor?: Color;
272
+ /** The border type. */
273
+ type?: string;
274
+ }
275
+ interface GoogleAppsCardV1Button {
276
+ /** The alternative text used for accessibility. Has no effect when an icon is set; use `icon.alt_text` instead. */
277
+ altText?: string;
278
+ /** If set, the button is filled with a solid background. */
279
+ color?: Color;
280
+ /** If `true`, the button is displayed in a disabled state and doesn't respond to user actions. */
281
+ disabled?: boolean;
282
+ /** The icon image. */
283
+ icon?: GoogleAppsCardV1Icon;
284
+ /** The action to perform when the button is clicked. */
285
+ onClick?: GoogleAppsCardV1OnClick;
286
+ /** The text of the button. */
287
+ text?: string;
288
+ }
289
+ interface GoogleAppsCardV1ButtonList {
290
+ /** An array of buttons. */
291
+ buttons?: GoogleAppsCardV1Button[];
292
+ }
293
+ interface GoogleAppsCardV1Card {
294
+ /**
295
+ * The card's actions. Actions are added to the card's generated toolbar menu. For example, the following JSON constructs a card action menu with Settings and Send Feedback options:
296
+ * ``` "card_actions": [ { "actionLabel": "Settings", "onClick": { "action": { "functionName": "goToView", "parameters": [ { "key": "viewType", "value": "SETTING" } ], "loadIndicator":
297
+ * "LoadIndicator.SPINNER" } } }, { "actionLabel": "Send Feedback", "onClick": { "openLink": { "url": "https://example.com/feedback" } } } ] ```
298
+ */
299
+ cardActions?: GoogleAppsCardV1CardAction[];
300
+ /** The `peekCardHeader` display style for. Not supported by Google Chat apps. */
301
+ displayStyle?: string;
302
+ /** The fixed footer shown at the bottom of this card. */
303
+ fixedFooter?: GoogleAppsCardV1CardFixedFooter;
304
+ /** The header of the card. A header usually contains a title and an image. */
305
+ header?: GoogleAppsCardV1CardHeader;
306
+ /** Name of the card. Used as a card identifier in card navigation. */
307
+ name?: string;
308
+ /**
309
+ * When displaying contextual content, the peek card header acts as a placeholder so that the user can navigate forward between the homepage cards and the contextual cards. Not
310
+ * supported by Google Chat apps.
311
+ */
312
+ peekCardHeader?: GoogleAppsCardV1CardHeader;
313
+ /** Sections are separated by a line divider. */
314
+ sections?: GoogleAppsCardV1Section[];
315
+ }
316
+ interface GoogleAppsCardV1CardAction {
317
+ /** The label that displays as the action menu item. */
318
+ actionLabel?: string;
319
+ /** The `onClick` action for this action item. */
320
+ onClick?: GoogleAppsCardV1OnClick;
321
+ }
322
+ interface GoogleAppsCardV1CardFixedFooter {
323
+ /** The primary button of the fixed footer. The button must be a text button with text and color set. */
324
+ primaryButton?: GoogleAppsCardV1Button;
325
+ /** The secondary button of the fixed footer. The button must be a text button with text and color set. `primaryButton` must be set if `secondaryButton` is set. */
326
+ secondaryButton?: GoogleAppsCardV1Button;
327
+ }
328
+ interface GoogleAppsCardV1CardHeader {
329
+ /** The alternative text of this image which is used for accessibility. */
330
+ imageAltText?: string;
331
+ /** The image's type. */
332
+ imageType?: string;
333
+ /** The URL of the image in the card header. */
334
+ imageUrl?: string;
335
+ /** The subtitle of the card header. */
336
+ subtitle?: string;
337
+ /**
338
+ * Required. The title of the card header. The header has a fixed height: if both a title and subtitle are specified, each takes up one line. If only the title is specified, it takes
339
+ * up both lines.
340
+ */
341
+ title?: string;
342
+ }
343
+ interface GoogleAppsCardV1DateTimePicker {
344
+ /** The label for the field that displays to the user. */
345
+ label?: string;
346
+ /** The name of the text input that's used in `formInput`, and uniquely identifies this input. */
347
+ name?: string;
348
+ /** Triggered when the user clicks Save or Clear from the date/time picker dialog. This is only triggered if the value changed as a result of the Save/Clear operation. */
349
+ onChangeAction?: GoogleAppsCardV1Action;
350
+ /**
351
+ * 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 not set, it uses the user's time zone
352
+ * setting on the client side.
353
+ */
354
+ timezoneOffsetDate?: number;
355
+ /** The type of the date/time picker. */
356
+ type?: string;
357
+ /**
358
+ * The value to display as the default value before user input or previous user input. It is represented in milliseconds (Epoch time). For `DATE_AND_TIME` type, the full epoch value is
359
+ * used. For `DATE_ONLY` type, only date of the epoch time is used. For `TIME_ONLY` type, only time of the epoch time is used. For example, you can set epoch time to `3 * 60 * 60 *
360
+ * 1000` to represent 3am.
361
+ */
362
+ valueMsEpoch?: string;
363
+ }
364
+ interface GoogleAppsCardV1DecoratedText {
365
+ /** The formatted text label that shows below the main text. */
366
+ bottomLabel?: string;
367
+ /** A button that can be clicked to trigger an action. */
368
+ button?: GoogleAppsCardV1Button;
369
+ /** An icon displayed after the text. */
370
+ endIcon?: GoogleAppsCardV1Icon;
371
+ /** Deprecated in favor of start_icon. */
372
+ icon?: GoogleAppsCardV1Icon;
373
+ /** Only the top and bottom label and content region are clickable. */
374
+ onClick?: GoogleAppsCardV1OnClick;
375
+ /** The icon displayed in front of the text. */
376
+ startIcon?: GoogleAppsCardV1Icon;
377
+ /** A switch widget can be clicked to change its state or trigger an action. */
378
+ switchControl?: GoogleAppsCardV1SwitchControl;
379
+ /** Required. The main widget formatted text. See Text formatting for details. */
380
+ text?: string;
381
+ /** The formatted text label that shows above the main text. */
382
+ topLabel?: string;
383
+ /** The wrap text setting. If `true`, the text is wrapped and displayed in multiline. Otherwise, the text is truncated. */
384
+ wrapText?: boolean;
385
+ }
386
+ // tslint:disable-next-line:no-empty-interface
387
+ interface GoogleAppsCardV1Divider {
388
+ }
389
+ interface GoogleAppsCardV1Grid {
390
+ /** The border style to apply to each grid item. */
391
+ borderStyle?: GoogleAppsCardV1BorderStyle;
392
+ /**
393
+ * The number of columns to display in the grid. A default value is used if this field isn't specified, and that default value is different depending on where the grid is shown (dialog
394
+ * versus companion).
395
+ */
396
+ columnCount?: number;
397
+ /** The items to display in the grid. */
398
+ items?: GoogleAppsCardV1GridItem[];
399
+ /** This callback is reused by each individual grid item, but with the item's identifier and index in the items list added to the callback's parameters. */
400
+ onClick?: GoogleAppsCardV1OnClick;
401
+ /** The text that displays in the grid header. */
402
+ title?: string;
403
+ }
404
+ interface GoogleAppsCardV1GridItem {
405
+ /** A user-specified identifier for this grid item. This identifier is returned in the parent Grid's onClick callback parameters. */
406
+ id?: string;
407
+ /** The image that displays in the grid item. */
408
+ image?: GoogleAppsCardV1ImageComponent;
409
+ /** The layout to use for the grid item. */
410
+ layout?: string;
411
+ /** The grid item's subtitle. */
412
+ subtitle?: string;
413
+ /** The horizontal alignment of the grid item's text. */
414
+ textAlignment?: string;
415
+ /** The grid item's title. */
416
+ title?: string;
417
+ }
418
+ interface GoogleAppsCardV1Icon {
419
+ /** The description of the icon, used for accessibility. The default value is provided if you don't specify one. */
420
+ altText?: string;
421
+ /** The icon specified by a URL. */
422
+ iconUrl?: string;
423
+ /** The crop style applied to the image. In some cases, applying a `CIRCLE` crop causes the image to be drawn larger than a standard icon. */
424
+ imageType?: string;
425
+ /** The icon specified by the string name of a list of known icons. */
426
+ knownIcon?: string;
427
+ }
428
+ interface GoogleAppsCardV1Image {
429
+ /** The alternative text of this image, used for accessibility. */
430
+ altText?: string;
431
+ /** An image URL. */
432
+ imageUrl?: string;
433
+ /** The action triggered by an `onClick` event. */
434
+ onClick?: GoogleAppsCardV1OnClick;
435
+ }
436
+ interface GoogleAppsCardV1ImageComponent {
437
+ /** The accessibility label for the image. */
438
+ altText?: string;
439
+ /** The border style to apply to the image. */
440
+ borderStyle?: GoogleAppsCardV1BorderStyle;
441
+ /** The crop style to apply to the image. */
442
+ cropStyle?: GoogleAppsCardV1ImageCropStyle;
443
+ /** The image URL. */
444
+ imageUri?: string;
445
+ }
446
+ interface GoogleAppsCardV1ImageCropStyle {
447
+ /** The aspect ratio to use if the crop type is `RECTANGLE_CUSTOM`. */
448
+ aspectRatio?: number;
449
+ /** The crop type. */
450
+ type?: string;
451
+ }
452
+ interface GoogleAppsCardV1OnClick {
453
+ /** If specified, an action is triggered by this `onClick`. */
454
+ action?: GoogleAppsCardV1Action;
455
+ /** A new card is pushed to the card stack after clicking if specified. */
456
+ card?: GoogleAppsCardV1Card;
457
+ /**
458
+ * An add-on triggers this action when the action needs to open a link. This differs from the `open_link` above in that this needs to talk to server to get the link. Thus some
459
+ * preparation work is required for web client to do before the open link action response comes back.
460
+ */
461
+ openDynamicLinkAction?: GoogleAppsCardV1Action;
462
+ /** If specified, this `onClick` triggers an open link action. */
463
+ openLink?: GoogleAppsCardV1OpenLink;
464
+ }
465
+ interface GoogleAppsCardV1OpenLink {
466
+ /** Whether the client forgets about a link after opening it, or observes it until the window closes. Not supported by Chat apps. */
467
+ onClose?: string;
468
+ /** How to open a link. Not supported by Chat apps. */
469
+ openAs?: string;
470
+ /** The URL to open. */
471
+ url?: string;
472
+ }
473
+ interface GoogleAppsCardV1Section {
474
+ /** Indicates whether this section is collapsible. If a section is collapsible, the description must be given. */
475
+ collapsible?: boolean;
476
+ /** The header of the section. Formatted text is supported. */
477
+ header?: string;
478
+ /**
479
+ * The number of uncollapsible widgets. For example, when a section contains five widgets and the `uncollapsibleWidgetsCount` is set to `2`, the first two widgets are always shown and
480
+ * the last three are collapsed as default. The `uncollapsibleWidgetsCount` is taken into account only when `collapsible` is `true`.
481
+ */
482
+ uncollapsibleWidgetsCount?: number;
483
+ /** A section must contain at least 1 widget. */
484
+ widgets?: GoogleAppsCardV1Widget[];
485
+ }
486
+ interface GoogleAppsCardV1SelectionInput {
487
+ /** An array of the selected items. */
488
+ items?: GoogleAppsCardV1SelectionItem[];
489
+ /** The label displayed ahead of the switch control. */
490
+ label?: string;
491
+ /** The name of the text input which is used in `formInput`. */
492
+ name?: string;
493
+ /** If specified, the form is submitted when the selection changes. If not specified, you must specify a separate button. */
494
+ onChangeAction?: GoogleAppsCardV1Action;
495
+ /** The type of the selection. */
496
+ type?: string;
497
+ }
498
+ interface GoogleAppsCardV1SelectionItem {
499
+ /** If more than one item is selected for `RADIO_BUTTON` and `DROPDOWN`, the first selected item is treated as selected and the ones after are ignored. */
500
+ selected?: boolean;
501
+ /** The text to be displayed. */
502
+ text?: string;
503
+ /** The value associated with this item. The client should use this as a form input value. */
504
+ value?: string;
505
+ }
506
+ interface GoogleAppsCardV1SuggestionItem {
507
+ /** The suggested autocomplete result. */
508
+ text?: string;
509
+ }
510
+ interface GoogleAppsCardV1Suggestions {
511
+ /** A list of suggestions used for autocomplete recommendations. */
512
+ items?: GoogleAppsCardV1SuggestionItem[];
513
+ }
514
+ interface GoogleAppsCardV1SwitchControl {
515
+ /** The control type, either switch or checkbox. */
516
+ controlType?: string;
517
+ /** The name of the switch widget that's used in `formInput`. */
518
+ name?: string;
519
+ /** The action when the switch state is changed. */
520
+ onChangeAction?: GoogleAppsCardV1Action;
521
+ /** If the switch is selected. */
522
+ selected?: boolean;
523
+ /** The value is what is passed back in the callback. */
524
+ value?: string;
525
+ }
526
+ interface GoogleAppsCardV1TextInput {
527
+ /**
528
+ * The refresh function that returns suggestions based on the user's input text. If the callback is not specified, autocomplete is done in client side based on the initial suggestion
529
+ * items.
530
+ */
531
+ autoCompleteAction?: GoogleAppsCardV1Action;
532
+ /** The hint text. */
533
+ hintText?: string;
534
+ /** The initial suggestions made before any user input. */
535
+ initialSuggestions?: GoogleAppsCardV1Suggestions;
536
+ /** At least one of label and hintText must be specified. */
537
+ label?: string;
538
+ /** The name of the text input which is used in `formInput`. */
539
+ name?: string;
540
+ /** The onChange action, for example, invoke a function. */
541
+ onChangeAction?: GoogleAppsCardV1Action;
542
+ /** The style of the text, for example, a single line or multiple lines. */
543
+ type?: string;
544
+ /** The default value when there is no input from the user. */
545
+ value?: string;
546
+ }
547
+ interface GoogleAppsCardV1TextParagraph {
548
+ /** The text that's shown in the widget. */
549
+ text?: string;
550
+ }
551
+ interface GoogleAppsCardV1Widget {
552
+ /**
553
+ * A list of buttons. For example, the following JSON creates two buttons. The first is a filled text button and the second is an image button that opens a link: ``` "buttonList": {
554
+ * "buttons": [ "button": { "text": "Edit", "Color": { "Red": 255 "Green": 255 "Blue": 255 } "disabled": true }, "button": { "icon": { "knownIcon": "INVITE" "altText": "check calendar"
555
+ * }, "onClick": { "openLink": { "url": "https://example.com/calendar" } } }, ] } ```
556
+ */
557
+ buttonList?: GoogleAppsCardV1ButtonList;
558
+ /**
559
+ * Displays a selection/input widget for date/time. For example, the following JSON creates a date/time picker for an appointment time: ``` "date_time_picker": { "name":
560
+ * "appointment_time", "label": "Book your appointment at:", "type": "DateTimePickerType.DATE_AND_TIME", "valueMsEpoch": "796435200000" } ```
561
+ */
562
+ dateTimePicker?: GoogleAppsCardV1DateTimePicker;
563
+ /**
564
+ * Displays a decorated text item in this widget. For example, the following JSON creates a decorated text widget showing email address: ``` "decoratedText": { "icon": { "knownIcon":
565
+ * "EMAIL" }, "topLabel": "Email Address", "content": "sasha@example.com", "bottomLabel": "This is a new Email address!", "switchWidget": { "name": "has_send_welcome_email_to_sasha",
566
+ * "selected": false, "controlType": "ControlType.CHECKBOX" } } ```
567
+ */
568
+ decoratedText?: GoogleAppsCardV1DecoratedText;
569
+ /** Displays a divider. For example, the following JSON creates a divider: ``` "divider": { } ``` */
570
+ divider?: any;
571
+ /**
572
+ * Displays a grid with a collection of items. For example, the following JSON creates a 2 column grid with a single item: ``` "grid": { "title": "A fine collection of items",
573
+ * "numColumns": 2, "borderStyle": { "type": "STROKE", "cornerRadius": 4.0 }, "items": [ "image": { "imageUri": "https://www.example.com/image.png", "cropStyle": { "type": "SQUARE" },
574
+ * "borderStyle": { "type": "STROKE" } }, "title": "An item", "textAlignment": "CENTER" ], "onClick": { "openLink": { "url":"https://www.example.com" } } } ```
575
+ */
576
+ grid?: GoogleAppsCardV1Grid;
577
+ /** The horizontal alignment of this widget. */
578
+ horizontalAlignment?: string;
579
+ /**
580
+ * Displays an image in this widget. For example, the following JSON creates an image with alternative text: ``` "image": { "imageUrl": "https://example.com/sasha.png" "altText":
581
+ * "Avatar for Sasha" } ```
582
+ */
583
+ image?: GoogleAppsCardV1Image;
584
+ /**
585
+ * Displays a switch control in this widget. For example, the following JSON creates a dropdown selection for size: ``` "switchControl": { "name": "size", "label": "Size" "type":
586
+ * "SelectionType.DROPDOWN", "items": [ { "text": "S", "value": "small", "selected": false }, { "text": "M", "value": "medium", "selected": true }, { "text": "L", "value": "large",
587
+ * "selected": false }, { "text": "XL", "value": "extra_large", "selected": false } ] } ```
588
+ */
589
+ selectionInput?: GoogleAppsCardV1SelectionInput;
590
+ /**
591
+ * Displays a text input in this widget. For example, the following JSON creates a text input for mail address: ``` "textInput": { "name": "mailing_address", "label": "Mailing Address"
592
+ * } ``` As another example, the following JSON creates a text input for programming language with static suggestions: ``` "textInput": { "name": "preferred_programing_language",
593
+ * "label": "Preferred Language", "initialSuggestions": { "items": [ { "text": "C++" }, { "text": "Java" }, { "text": "JavaScript" }, { "text": "Python" } ] } } ```
594
+ */
595
+ textInput?: GoogleAppsCardV1TextInput;
596
+ /** Displays a text paragraph in this widget. For example, the following JSON creates a bolded text: ``` "textParagraph": { "text": " *bold text*" } ``` */
597
+ textParagraph?: GoogleAppsCardV1TextParagraph;
598
+ }
599
+ interface Image {
600
+ /**
601
+ * The aspect ratio of this image (width/height). This field allows clients to reserve the right height for the image while waiting for it to load. It's not meant to override the
602
+ * native aspect ratio of the image. If unset, the server fills it by prefetching the image.
603
+ */
604
+ aspectRatio?: number;
605
+ /** The URL of the image. */
606
+ imageUrl?: string;
607
+ /** The onclick action. */
608
+ onClick?: OnClick;
609
+ }
610
+ interface ImageButton {
611
+ /** The icon specified by an enum that indices to an icon provided by Chat API. */
612
+ icon?: string;
613
+ /** The icon specified by a URL. */
614
+ iconUrl?: string;
615
+ /** The name of this image_button which will be used for accessibility. Default value will be provided if developers don't specify. */
616
+ name?: string;
617
+ /** The onclick action. */
618
+ onClick?: OnClick;
619
+ }
620
+ interface Inputs {
621
+ /** Date input values. Not supported by Chat apps. */
622
+ dateInput?: DateInput;
623
+ /** Date and time input values. Not supported by Chat apps. */
624
+ dateTimeInput?: DateTimeInput;
625
+ /** Input parameter for regular widgets. For single-valued widgets, it is a single value list. For multi-valued widgets, such as checkbox, all the values are presented. */
626
+ stringInputs?: StringInputs;
627
+ /** Time input values. Not supported by Chat apps. */
628
+ timeInput?: TimeInput;
629
+ }
630
+ interface KeyValue {
631
+ /** The text of the bottom label. Formatted text supported. */
632
+ bottomLabel?: string;
633
+ /** A button that can be clicked to trigger an action. */
634
+ button?: Button;
635
+ /** The text of the content. Formatted text supported and always required. */
636
+ content?: string;
637
+ /** If the content should be multiline. */
638
+ contentMultiline?: boolean;
639
+ /** An enum value that will be replaced by the Chat API with the corresponding icon image. */
640
+ icon?: string;
641
+ /** The icon specified by a URL. */
642
+ iconUrl?: string;
643
+ /** The onclick action. Only the top label, bottom label and content region are clickable. */
644
+ onClick?: OnClick;
645
+ /** The text of the top label. Formatted text supported. */
646
+ topLabel?: string;
647
+ }
648
+ interface ListMembershipsResponse {
649
+ /** List of memberships in the requested (or first) page. */
650
+ memberships?: Membership[];
651
+ /** Continuation token to retrieve the next page of results. It will be empty for the last page of results. */
652
+ nextPageToken?: string;
653
+ }
654
+ interface ListSpacesResponse {
655
+ /** Continuation token to retrieve the next page of results. It will be empty for the last page of results. Tokens expire in an hour. An error is thrown if an expired token is passed. */
656
+ nextPageToken?: string;
657
+ /** List of spaces in the requested (or first) page. */
658
+ spaces?: Space[];
659
+ }
660
+ interface MatchedUrl {
661
+ /** Output only. The url that was matched. */
662
+ url?: string;
663
+ }
664
+ interface Media {
665
+ /** Name of the media resource. */
666
+ resourceName?: string;
667
+ }
668
+ interface Membership {
669
+ /** Output only. The creation time of the membership, such as when a member joined or was invited to join a space. */
670
+ createTime?: string;
671
+ /**
672
+ * A Google Chat user or app. Format: `users/{user}` or `users/app` When `users/{user}`, represents a [person](https://developers.google.com/people/api/rest/v1/people) in the People
673
+ * API or a [user](https://developers.google.com/admin-sdk/directory/reference/rest/v1/users) in the Admin SDK Directory API. When `users/app`, represents a Chat app creating
674
+ * membership for itself.
675
+ */
676
+ member?: User;
677
+ /** Resource name of the membership. Format: spaces/{space}/members/{member} */
678
+ name?: string;
679
+ /** Output only. User's role within a Chat space, which determines their permitted actions in the space. */
680
+ role?: string;
681
+ /** Output only. State of the membership. */
682
+ state?: string;
683
+ }
684
+ interface Message {
685
+ /** Input only. Parameters that a Chat app can use to configure how its response is posted. */
686
+ actionResponse?: ActionResponse;
687
+ /** Output only. Annotations associated with the text in this message. */
688
+ annotations?: Annotation[];
689
+ /** Plain-text body of the message with all Chat app mentions stripped out. */
690
+ argumentText?: string;
691
+ /** User uploaded attachment. */
692
+ attachment?: Attachment[];
693
+ /**
694
+ * Rich, formatted and interactive cards that can be used to display UI elements such as: formatted texts, buttons, clickable images. Cards are normally displayed below the plain-text
695
+ * body of the message.
696
+ */
697
+ cards?: Card[];
698
+ /**
699
+ * Richly formatted and interactive cards that display UI elements and editable widgets, such as: - Formatted text - Buttons - Clickable images - Checkboxes - Radio buttons - Input
700
+ * widgets. Cards are usually displayed below the text-body of a Chat message, but can situationally appear other places, such as
701
+ * [dialogs](https://developers.google.com/chat/how-tos/dialogs). The `cardId` is a unique identifier among cards in the same message and for identifying user input values. Currently
702
+ * supported widgets include: - `TextParagraph` - `DecoratedText` - `Image` - `ButtonList`
703
+ */
704
+ cardsV2?: CardWithId[];
705
+ /** Output only. The time at which the message was created in Google Chat server. */
706
+ createTime?: string;
707
+ /** A plain-text description of the message's cards, used when the actual cards cannot be displayed (e.g. mobile notifications). */
708
+ fallbackText?: string;
709
+ /** 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. */
710
+ lastUpdateTime?: string;
711
+ /**
712
+ * Output only. A URL in `spaces.messages.text` that matches a link preview pattern. For more information, refer to [Preview
713
+ * links](https://developers.google.com/chat/how-tos/preview-links).
714
+ */
715
+ matchedUrl?: MatchedUrl;
716
+ /** Resource name in the form `spaces/*‍/messages/*`. Example: `spaces/AAAAAAAAAAA/messages/BBBBBBBBBBB.BBBBBBBBBBB` */
717
+ name?: string;
718
+ /** Output only. The user who created the message. */
719
+ sender?: User;
720
+ /** Output only. Slash command information, if applicable. */
721
+ slashCommand?: SlashCommand;
722
+ /** The space the message belongs to. */
723
+ space?: Space;
724
+ /** Plain-text body of the message. The first link to an image, video, web page, or other preview-able item generates a preview chip. */
725
+ text?: string;
726
+ /** The thread the message belongs to. */
727
+ thread?: Thread;
728
+ }
729
+ interface OnClick {
730
+ /** A form action will be triggered by this onclick if specified. */
731
+ action?: FormAction;
732
+ /** This onclick triggers an open link action if specified. */
733
+ openLink?: OpenLink;
734
+ }
735
+ interface OpenLink {
736
+ /** The URL to open. */
737
+ url?: string;
738
+ }
739
+ interface Section {
740
+ /** The header of the section, text formatted supported. */
741
+ header?: string;
742
+ /** A section must contain at least 1 widget. */
743
+ widgets?: WidgetMarkup[];
744
+ }
745
+ interface SlashCommand {
746
+ /** The id of the slash command invoked. */
747
+ commandId?: string;
748
+ }
749
+ interface SlashCommandMetadata {
750
+ /** The Chat app whose command was invoked. */
751
+ bot?: User;
752
+ /** The command id of the invoked slash command. */
753
+ commandId?: string;
754
+ /** The name of the invoked slash command. */
755
+ commandName?: string;
756
+ /** Indicating whether the slash command is for a dialog. */
757
+ triggersDialog?: boolean;
758
+ /** The type of slash command. */
759
+ type?: string;
760
+ }
761
+ interface Space {
762
+ /** The space's display name. For direct messages between humans, this field might be empty. */
763
+ displayName?: string;
764
+ /** Resource name of the space. Format: spaces/{space} */
765
+ name?: string;
766
+ /** Output only. Whether the space is a DM between a Chat app and a single human. */
767
+ singleUserBotDm?: boolean;
768
+ /** Details about the space including description and rules. */
769
+ spaceDetails?: SpaceDetails;
770
+ /** Output only. Whether messages are threaded in this space. */
771
+ threaded?: boolean;
772
+ /** Output only. Deprecated: Use `singleUserBotDm` or `spaceType` (developer preview) instead. The type of a space. */
773
+ type?: string;
774
+ }
775
+ interface SpaceDetails {
776
+ /** Optional. A description of the space. It could describe the space's discussion topic, functional purpose, or participants. */
777
+ description?: string;
778
+ /** Optional. The space's rules, expectations, and etiquette. */
779
+ guidelines?: string;
780
+ }
781
+ interface Status {
782
+ /** The status code, which should be an enum value of google.rpc.Code. */
783
+ code?: number;
784
+ /** A list of messages that carry the error details. There is a common set of message types for APIs to use. */
785
+ details?: Array<{ [P in string]: any }>;
786
+ /**
787
+ * A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the
788
+ * client.
789
+ */
790
+ message?: string;
791
+ }
792
+ interface StringInputs {
793
+ /** An array of strings entered by the user. */
794
+ value?: string[];
795
+ }
796
+ interface TextButton {
797
+ /** The onclick action of the button. */
798
+ onClick?: OnClick;
799
+ /** The text of the button. */
800
+ text?: string;
801
+ }
802
+ interface TextParagraph {
803
+ text?: string;
804
+ }
805
+ interface Thread {
806
+ /** Resource name, in the form "spaces/*‍/threads/*". Example: spaces/AAAAAAAAAAA/threads/TTTTTTTTTTT */
807
+ name?: string;
808
+ }
809
+ interface TimeInput {
810
+ /** The hour on a 24-hour clock. */
811
+ hours?: number;
812
+ /** The number of minutes past the hour. Valid values are 0 to 59. */
813
+ minutes?: number;
814
+ }
815
+ interface TimeZone {
816
+ /** The [IANA TZ](https://www.iana.org/time-zones) time zone database code, such as "America/Toronto". */
817
+ id?: string;
818
+ /** The user timezone offset, in milliseconds, from Coordinated Universal Time (UTC). */
819
+ offset?: number;
820
+ }
821
+ interface User {
822
+ /** Output only. The user's display name. */
823
+ displayName?: string;
824
+ /** Unique identifier of the user's Google Workspace domain. */
825
+ domainId?: string;
826
+ /** Output only. When `true`, the user is deleted or their profile is not visible. */
827
+ isAnonymous?: boolean;
828
+ /**
829
+ * Resource name for a Google Chat user. Represents a [person](https://developers.google.com/people/api/rest/v1/people#Person) in the People API or a
830
+ * [user](https://developers.google.com/admin-sdk/directory/reference/rest/v1/users) in the Admin SDK Directory API. Formatted as: `users/{user}`
831
+ */
832
+ name?: string;
833
+ /** User type. */
834
+ type?: string;
835
+ }
836
+ interface UserMentionMetadata {
837
+ /** The type of user mention. */
838
+ type?: string;
839
+ /** The user mentioned. */
840
+ user?: User;
841
+ }
842
+ interface WidgetMarkup {
843
+ /** A list of buttons. Buttons is also oneof data and only one of these fields should be set. */
844
+ buttons?: Button[];
845
+ /** Display an image in this widget. */
846
+ image?: Image;
847
+ /** Display a key value item in this widget. */
848
+ keyValue?: KeyValue;
849
+ /** Display a text paragraph in this widget. */
850
+ textParagraph?: TextParagraph;
851
+ }
852
+ interface ConversationsResource {
853
+ /** Legacy path for creating message. Calling these will result in a BadRequest response. */
854
+ messages(request: {
855
+ /** V1 error format. */
856
+ "$.xgafv"?: string;
857
+ /** OAuth access token. */
858
+ access_token?: string;
859
+ /** Data format for response. */
860
+ alt?: string;
861
+ /** JSONP */
862
+ callback?: string;
863
+ /** Selector specifying which fields to include in a partial response. */
864
+ fields?: string;
865
+ /** 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. */
866
+ key?: string;
867
+ /** OAuth 2.0 token for the current user. */
868
+ oauth_token?: string;
869
+ /** Required. Space resource name, in the form "spaces/*". Example: spaces/AAAAAAAAAAA */
870
+ parent: string;
871
+ /** Returns response with indentations and line breaks. */
872
+ prettyPrint?: boolean;
873
+ /** 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. */
874
+ quotaUser?: string;
875
+ /** 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. */
876
+ requestId?: string;
877
+ /**
878
+ * Optional. Opaque thread identifier. To start or add to a thread, create a message and specify a `threadKey` instead of thread.name. (Setting thread.name has no effect.) The
879
+ * first message with a given `threadKey` starts a new thread. Subsequent messages with the same `threadKey` post into the same thread.
880
+ */
881
+ threadKey?: string;
882
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
883
+ upload_protocol?: string;
884
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
885
+ uploadType?: string;
886
+ /** Request body */
887
+ resource: Message;
888
+ }): Request<Message>;
889
+ messages(request: {
890
+ /** V1 error format. */
891
+ "$.xgafv"?: string;
892
+ /** OAuth access token. */
893
+ access_token?: string;
894
+ /** Data format for response. */
895
+ alt?: string;
896
+ /** JSONP */
897
+ callback?: string;
898
+ /** Selector specifying which fields to include in a partial response. */
899
+ fields?: string;
900
+ /** 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. */
901
+ key?: string;
902
+ /** OAuth 2.0 token for the current user. */
903
+ oauth_token?: string;
904
+ /** Required. Space resource name, in the form "spaces/*". Example: spaces/AAAAAAAAAAA */
905
+ parent: string;
906
+ /** Returns response with indentations and line breaks. */
907
+ prettyPrint?: boolean;
908
+ /** 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. */
909
+ quotaUser?: string;
910
+ /** 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. */
911
+ requestId?: string;
912
+ /**
913
+ * Optional. Opaque thread identifier. To start or add to a thread, create a message and specify a `threadKey` instead of thread.name. (Setting thread.name has no effect.) The
914
+ * first message with a given `threadKey` starts a new thread. Subsequent messages with the same `threadKey` post into the same thread.
915
+ */
916
+ threadKey?: string;
917
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
918
+ upload_protocol?: string;
919
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
920
+ uploadType?: string;
921
+ },
922
+ body: Message): Request<Message>;
923
+ }
924
+ interface DmsResource {
925
+ /** Legacy path for creating message. Calling these will result in a BadRequest response. */
926
+ messages(request: {
927
+ /** V1 error format. */
928
+ "$.xgafv"?: string;
929
+ /** OAuth access token. */
930
+ access_token?: string;
931
+ /** Data format for response. */
932
+ alt?: string;
933
+ /** JSONP */
934
+ callback?: string;
935
+ /** Selector specifying which fields to include in a partial response. */
936
+ fields?: string;
937
+ /** 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. */
938
+ key?: string;
939
+ /** OAuth 2.0 token for the current user. */
940
+ oauth_token?: string;
941
+ /** Required. Space resource name, in the form "spaces/*". Example: spaces/AAAAAAAAAAA */
942
+ parent: string;
943
+ /** Returns response with indentations and line breaks. */
944
+ prettyPrint?: boolean;
945
+ /** 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. */
946
+ quotaUser?: string;
947
+ /** 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. */
948
+ requestId?: string;
949
+ /**
950
+ * Optional. Opaque thread identifier. To start or add to a thread, create a message and specify a `threadKey` instead of thread.name. (Setting thread.name has no effect.) The
951
+ * first message with a given `threadKey` starts a new thread. Subsequent messages with the same `threadKey` post into the same thread.
952
+ */
953
+ threadKey?: string;
954
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
955
+ upload_protocol?: string;
956
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
957
+ uploadType?: string;
958
+ /** Request body */
959
+ resource: Message;
960
+ }): Request<Message>;
961
+ messages(request: {
962
+ /** V1 error format. */
963
+ "$.xgafv"?: string;
964
+ /** OAuth access token. */
965
+ access_token?: string;
966
+ /** Data format for response. */
967
+ alt?: string;
968
+ /** JSONP */
969
+ callback?: string;
970
+ /** Selector specifying which fields to include in a partial response. */
971
+ fields?: string;
972
+ /** 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. */
973
+ key?: string;
974
+ /** OAuth 2.0 token for the current user. */
975
+ oauth_token?: string;
976
+ /** Required. Space resource name, in the form "spaces/*". Example: spaces/AAAAAAAAAAA */
977
+ parent: string;
978
+ /** Returns response with indentations and line breaks. */
979
+ prettyPrint?: boolean;
980
+ /** 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. */
981
+ quotaUser?: string;
982
+ /** 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. */
983
+ requestId?: string;
984
+ /**
985
+ * Optional. Opaque thread identifier. To start or add to a thread, create a message and specify a `threadKey` instead of thread.name. (Setting thread.name has no effect.) The
986
+ * first message with a given `threadKey` starts a new thread. Subsequent messages with the same `threadKey` post into the same thread.
987
+ */
988
+ threadKey?: string;
989
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
990
+ upload_protocol?: string;
991
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
992
+ uploadType?: string;
993
+ },
994
+ body: Message): Request<Message>;
995
+ /** Legacy path for creating message. Calling these will result in a BadRequest response. */
996
+ webhooks(request: {
997
+ /** V1 error format. */
998
+ "$.xgafv"?: string;
999
+ /** OAuth access token. */
1000
+ access_token?: string;
1001
+ /** Data format for response. */
1002
+ alt?: string;
1003
+ /** JSONP */
1004
+ callback?: string;
1005
+ /** Selector specifying which fields to include in a partial response. */
1006
+ fields?: string;
1007
+ /** 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. */
1008
+ key?: string;
1009
+ /** OAuth 2.0 token for the current user. */
1010
+ oauth_token?: string;
1011
+ /** Required. Space resource name, in the form "spaces/*". Example: spaces/AAAAAAAAAAA */
1012
+ parent: string;
1013
+ /** Returns response with indentations and line breaks. */
1014
+ prettyPrint?: boolean;
1015
+ /** 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. */
1016
+ quotaUser?: string;
1017
+ /** 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. */
1018
+ requestId?: string;
1019
+ /**
1020
+ * Optional. Opaque thread identifier. To start or add to a thread, create a message and specify a `threadKey` instead of thread.name. (Setting thread.name has no effect.) The
1021
+ * first message with a given `threadKey` starts a new thread. Subsequent messages with the same `threadKey` post into the same thread.
1022
+ */
1023
+ threadKey?: string;
1024
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
1025
+ upload_protocol?: string;
1026
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1027
+ uploadType?: string;
1028
+ /** Request body */
1029
+ resource: Message;
1030
+ }): Request<Message>;
1031
+ webhooks(request: {
1032
+ /** V1 error format. */
1033
+ "$.xgafv"?: string;
1034
+ /** OAuth access token. */
1035
+ access_token?: string;
1036
+ /** Data format for response. */
1037
+ alt?: string;
1038
+ /** JSONP */
1039
+ callback?: string;
1040
+ /** Selector specifying which fields to include in a partial response. */
1041
+ fields?: string;
1042
+ /** 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. */
1043
+ key?: string;
1044
+ /** OAuth 2.0 token for the current user. */
1045
+ oauth_token?: string;
1046
+ /** Required. Space resource name, in the form "spaces/*". Example: spaces/AAAAAAAAAAA */
1047
+ parent: string;
1048
+ /** Returns response with indentations and line breaks. */
1049
+ prettyPrint?: boolean;
1050
+ /** 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. */
1051
+ quotaUser?: string;
1052
+ /** 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. */
1053
+ requestId?: string;
1054
+ /**
1055
+ * Optional. Opaque thread identifier. To start or add to a thread, create a message and specify a `threadKey` instead of thread.name. (Setting thread.name has no effect.) The
1056
+ * first message with a given `threadKey` starts a new thread. Subsequent messages with the same `threadKey` post into the same thread.
1057
+ */
1058
+ threadKey?: string;
1059
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
1060
+ upload_protocol?: string;
1061
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1062
+ uploadType?: string;
1063
+ },
1064
+ body: Message): Request<Message>;
1065
+ conversations: ConversationsResource;
1066
+ }
1067
+ interface MediaResource {
1068
+ /** Downloads media. Download is supported on the URI `/v1/media/{+name}?alt=media`. */
1069
+ download(request?: {
1070
+ /** V1 error format. */
1071
+ "$.xgafv"?: string;
1072
+ /** OAuth access token. */
1073
+ access_token?: string;
1074
+ /** Data format for response. */
1075
+ alt?: string;
1076
+ /** JSONP */
1077
+ callback?: string;
1078
+ /** Selector specifying which fields to include in a partial response. */
1079
+ fields?: string;
1080
+ /** 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. */
1081
+ key?: string;
1082
+ /** OAuth 2.0 token for the current user. */
1083
+ oauth_token?: string;
1084
+ /** Returns response with indentations and line breaks. */
1085
+ prettyPrint?: boolean;
1086
+ /** 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. */
1087
+ quotaUser?: string;
1088
+ /** Name of the media that is being downloaded. See ReadRequest.resource_name. */
1089
+ resourceName: string;
1090
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
1091
+ upload_protocol?: string;
1092
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1093
+ uploadType?: string;
1094
+ }): Request<Media>;
1095
+ }
1096
+ interface ConversationsResource {
1097
+ /** Legacy path for creating message. Calling these will result in a BadRequest response. */
1098
+ messages(request: {
1099
+ /** V1 error format. */
1100
+ "$.xgafv"?: string;
1101
+ /** OAuth access token. */
1102
+ access_token?: string;
1103
+ /** Data format for response. */
1104
+ alt?: string;
1105
+ /** JSONP */
1106
+ callback?: string;
1107
+ /** Selector specifying which fields to include in a partial response. */
1108
+ fields?: string;
1109
+ /** 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. */
1110
+ key?: string;
1111
+ /** OAuth 2.0 token for the current user. */
1112
+ oauth_token?: string;
1113
+ /** Required. Space resource name, in the form "spaces/*". Example: spaces/AAAAAAAAAAA */
1114
+ parent: string;
1115
+ /** Returns response with indentations and line breaks. */
1116
+ prettyPrint?: boolean;
1117
+ /** 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. */
1118
+ quotaUser?: string;
1119
+ /** 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. */
1120
+ requestId?: string;
1121
+ /**
1122
+ * Optional. Opaque thread identifier. To start or add to a thread, create a message and specify a `threadKey` instead of thread.name. (Setting thread.name has no effect.) The
1123
+ * first message with a given `threadKey` starts a new thread. Subsequent messages with the same `threadKey` post into the same thread.
1124
+ */
1125
+ threadKey?: string;
1126
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
1127
+ upload_protocol?: string;
1128
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1129
+ uploadType?: string;
1130
+ /** Request body */
1131
+ resource: Message;
1132
+ }): Request<Message>;
1133
+ messages(request: {
1134
+ /** V1 error format. */
1135
+ "$.xgafv"?: string;
1136
+ /** OAuth access token. */
1137
+ access_token?: string;
1138
+ /** Data format for response. */
1139
+ alt?: string;
1140
+ /** JSONP */
1141
+ callback?: string;
1142
+ /** Selector specifying which fields to include in a partial response. */
1143
+ fields?: string;
1144
+ /** 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. */
1145
+ key?: string;
1146
+ /** OAuth 2.0 token for the current user. */
1147
+ oauth_token?: string;
1148
+ /** Required. Space resource name, in the form "spaces/*". Example: spaces/AAAAAAAAAAA */
1149
+ parent: string;
1150
+ /** Returns response with indentations and line breaks. */
1151
+ prettyPrint?: boolean;
1152
+ /** 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. */
1153
+ quotaUser?: string;
1154
+ /** 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. */
1155
+ requestId?: string;
1156
+ /**
1157
+ * Optional. Opaque thread identifier. To start or add to a thread, create a message and specify a `threadKey` instead of thread.name. (Setting thread.name has no effect.) The
1158
+ * first message with a given `threadKey` starts a new thread. Subsequent messages with the same `threadKey` post into the same thread.
1159
+ */
1160
+ threadKey?: string;
1161
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
1162
+ upload_protocol?: string;
1163
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1164
+ uploadType?: string;
1165
+ },
1166
+ body: Message): Request<Message>;
1167
+ }
1168
+ interface RoomsResource {
1169
+ /** Legacy path for creating message. Calling these will result in a BadRequest response. */
1170
+ messages(request: {
1171
+ /** V1 error format. */
1172
+ "$.xgafv"?: string;
1173
+ /** OAuth access token. */
1174
+ access_token?: string;
1175
+ /** Data format for response. */
1176
+ alt?: string;
1177
+ /** JSONP */
1178
+ callback?: string;
1179
+ /** Selector specifying which fields to include in a partial response. */
1180
+ fields?: string;
1181
+ /** 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. */
1182
+ key?: string;
1183
+ /** OAuth 2.0 token for the current user. */
1184
+ oauth_token?: string;
1185
+ /** Required. Space resource name, in the form "spaces/*". Example: spaces/AAAAAAAAAAA */
1186
+ parent: string;
1187
+ /** Returns response with indentations and line breaks. */
1188
+ prettyPrint?: boolean;
1189
+ /** 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. */
1190
+ quotaUser?: string;
1191
+ /** 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. */
1192
+ requestId?: string;
1193
+ /**
1194
+ * Optional. Opaque thread identifier. To start or add to a thread, create a message and specify a `threadKey` instead of thread.name. (Setting thread.name has no effect.) The
1195
+ * first message with a given `threadKey` starts a new thread. Subsequent messages with the same `threadKey` post into the same thread.
1196
+ */
1197
+ threadKey?: string;
1198
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
1199
+ upload_protocol?: string;
1200
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1201
+ uploadType?: string;
1202
+ /** Request body */
1203
+ resource: Message;
1204
+ }): Request<Message>;
1205
+ messages(request: {
1206
+ /** V1 error format. */
1207
+ "$.xgafv"?: string;
1208
+ /** OAuth access token. */
1209
+ access_token?: string;
1210
+ /** Data format for response. */
1211
+ alt?: string;
1212
+ /** JSONP */
1213
+ callback?: string;
1214
+ /** Selector specifying which fields to include in a partial response. */
1215
+ fields?: string;
1216
+ /** 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. */
1217
+ key?: string;
1218
+ /** OAuth 2.0 token for the current user. */
1219
+ oauth_token?: string;
1220
+ /** Required. Space resource name, in the form "spaces/*". Example: spaces/AAAAAAAAAAA */
1221
+ parent: string;
1222
+ /** Returns response with indentations and line breaks. */
1223
+ prettyPrint?: boolean;
1224
+ /** 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. */
1225
+ quotaUser?: string;
1226
+ /** 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. */
1227
+ requestId?: string;
1228
+ /**
1229
+ * Optional. Opaque thread identifier. To start or add to a thread, create a message and specify a `threadKey` instead of thread.name. (Setting thread.name has no effect.) The
1230
+ * first message with a given `threadKey` starts a new thread. Subsequent messages with the same `threadKey` post into the same thread.
1231
+ */
1232
+ threadKey?: string;
1233
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
1234
+ upload_protocol?: string;
1235
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1236
+ uploadType?: string;
1237
+ },
1238
+ body: Message): Request<Message>;
1239
+ /** Legacy path for creating message. Calling these will result in a BadRequest response. */
1240
+ webhooks(request: {
1241
+ /** V1 error format. */
1242
+ "$.xgafv"?: string;
1243
+ /** OAuth access token. */
1244
+ access_token?: string;
1245
+ /** Data format for response. */
1246
+ alt?: string;
1247
+ /** JSONP */
1248
+ callback?: string;
1249
+ /** Selector specifying which fields to include in a partial response. */
1250
+ fields?: string;
1251
+ /** 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. */
1252
+ key?: string;
1253
+ /** OAuth 2.0 token for the current user. */
1254
+ oauth_token?: string;
1255
+ /** Required. Space resource name, in the form "spaces/*". Example: spaces/AAAAAAAAAAA */
1256
+ parent: string;
1257
+ /** Returns response with indentations and line breaks. */
1258
+ prettyPrint?: boolean;
1259
+ /** 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. */
1260
+ quotaUser?: string;
1261
+ /** 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. */
1262
+ requestId?: string;
1263
+ /**
1264
+ * Optional. Opaque thread identifier. To start or add to a thread, create a message and specify a `threadKey` instead of thread.name. (Setting thread.name has no effect.) The
1265
+ * first message with a given `threadKey` starts a new thread. Subsequent messages with the same `threadKey` post into the same thread.
1266
+ */
1267
+ threadKey?: string;
1268
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
1269
+ upload_protocol?: string;
1270
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1271
+ uploadType?: string;
1272
+ /** Request body */
1273
+ resource: Message;
1274
+ }): Request<Message>;
1275
+ webhooks(request: {
1276
+ /** V1 error format. */
1277
+ "$.xgafv"?: string;
1278
+ /** OAuth access token. */
1279
+ access_token?: string;
1280
+ /** Data format for response. */
1281
+ alt?: string;
1282
+ /** JSONP */
1283
+ callback?: string;
1284
+ /** Selector specifying which fields to include in a partial response. */
1285
+ fields?: string;
1286
+ /** 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. */
1287
+ key?: string;
1288
+ /** OAuth 2.0 token for the current user. */
1289
+ oauth_token?: string;
1290
+ /** Required. Space resource name, in the form "spaces/*". Example: spaces/AAAAAAAAAAA */
1291
+ parent: string;
1292
+ /** Returns response with indentations and line breaks. */
1293
+ prettyPrint?: boolean;
1294
+ /** 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. */
1295
+ quotaUser?: string;
1296
+ /** 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. */
1297
+ requestId?: string;
1298
+ /**
1299
+ * Optional. Opaque thread identifier. To start or add to a thread, create a message and specify a `threadKey` instead of thread.name. (Setting thread.name has no effect.) The
1300
+ * first message with a given `threadKey` starts a new thread. Subsequent messages with the same `threadKey` post into the same thread.
1301
+ */
1302
+ threadKey?: string;
1303
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
1304
+ upload_protocol?: string;
1305
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1306
+ uploadType?: string;
1307
+ },
1308
+ body: Message): Request<Message>;
1309
+ conversations: ConversationsResource;
1310
+ }
1311
+ interface MembersResource {
1312
+ /** Returns a membership. Requires [service account authentication](https://developers.google.com/chat/api/guides/auth/service-accounts). */
1313
+ get(request?: {
1314
+ /** V1 error format. */
1315
+ "$.xgafv"?: string;
1316
+ /** OAuth access token. */
1317
+ access_token?: string;
1318
+ /** Data format for response. */
1319
+ alt?: string;
1320
+ /** JSONP */
1321
+ callback?: string;
1322
+ /** Selector specifying which fields to include in a partial response. */
1323
+ fields?: string;
1324
+ /** 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. */
1325
+ key?: string;
1326
+ /** Required. Resource name of the membership to retrieve. Format: spaces/{space}/members/{member} */
1327
+ name: string;
1328
+ /** OAuth 2.0 token for the current user. */
1329
+ oauth_token?: string;
1330
+ /** Returns response with indentations and line breaks. */
1331
+ prettyPrint?: boolean;
1332
+ /** 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. */
1333
+ quotaUser?: string;
1334
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
1335
+ upload_protocol?: string;
1336
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1337
+ uploadType?: string;
1338
+ }): Request<Membership>;
1339
+ /** Lists human memberships in a space. Requires [service account authentication](https://developers.google.com/chat/api/guides/auth/service-accounts). */
1340
+ list(request?: {
1341
+ /** V1 error format. */
1342
+ "$.xgafv"?: string;
1343
+ /** OAuth access token. */
1344
+ access_token?: string;
1345
+ /** Data format for response. */
1346
+ alt?: string;
1347
+ /** JSONP */
1348
+ callback?: string;
1349
+ /** Selector specifying which fields to include in a partial response. */
1350
+ fields?: string;
1351
+ /** 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. */
1352
+ key?: string;
1353
+ /** OAuth 2.0 token for the current user. */
1354
+ oauth_token?: string;
1355
+ /** Requested page size. The value is capped at 1000. Server may return fewer results than requested. If unspecified, server will default to 100. */
1356
+ pageSize?: number;
1357
+ /** A token identifying a page of results the server should return. */
1358
+ pageToken?: string;
1359
+ /** Required. The resource name of the space for which to fetch a membership list. Format: spaces/{space} */
1360
+ parent: string;
1361
+ /** Returns response with indentations and line breaks. */
1362
+ prettyPrint?: boolean;
1363
+ /** 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. */
1364
+ quotaUser?: string;
1365
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
1366
+ upload_protocol?: string;
1367
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1368
+ uploadType?: string;
1369
+ }): Request<ListMembershipsResponse>;
1370
+ }
1371
+ interface AttachmentsResource {
1372
+ /**
1373
+ * Gets the metadata of a message attachment. The attachment data is fetched using the media API. Requires [service account
1374
+ * authentication](https://developers.google.com/chat/api/guides/auth/service-accounts).
1375
+ */
1376
+ get(request?: {
1377
+ /** V1 error format. */
1378
+ "$.xgafv"?: string;
1379
+ /** OAuth access token. */
1380
+ access_token?: string;
1381
+ /** Data format for response. */
1382
+ alt?: string;
1383
+ /** JSONP */
1384
+ callback?: string;
1385
+ /** Selector specifying which fields to include in a partial response. */
1386
+ fields?: string;
1387
+ /** 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. */
1388
+ key?: string;
1389
+ /** Required. Resource name of the attachment, in the form "spaces/*‍/messages/*‍/attachments/*". */
1390
+ name: string;
1391
+ /** OAuth 2.0 token for the current user. */
1392
+ oauth_token?: string;
1393
+ /** Returns response with indentations and line breaks. */
1394
+ prettyPrint?: boolean;
1395
+ /** 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. */
1396
+ quotaUser?: string;
1397
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
1398
+ upload_protocol?: string;
1399
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1400
+ uploadType?: string;
1401
+ }): Request<Attachment>;
1402
+ }
1403
+ interface MessagesResource {
1404
+ /** Creates a message. Requires [service account authentication](https://developers.google.com/chat/api/guides/auth/service-accounts). */
1405
+ create(request: {
1406
+ /** V1 error format. */
1407
+ "$.xgafv"?: string;
1408
+ /** OAuth access token. */
1409
+ access_token?: string;
1410
+ /** Data format for response. */
1411
+ alt?: string;
1412
+ /** JSONP */
1413
+ callback?: string;
1414
+ /** Selector specifying which fields to include in a partial response. */
1415
+ fields?: string;
1416
+ /** 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. */
1417
+ key?: string;
1418
+ /** OAuth 2.0 token for the current user. */
1419
+ oauth_token?: string;
1420
+ /** Required. Space resource name, in the form "spaces/*". Example: spaces/AAAAAAAAAAA */
1421
+ parent: string;
1422
+ /** Returns response with indentations and line breaks. */
1423
+ prettyPrint?: boolean;
1424
+ /** 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. */
1425
+ quotaUser?: string;
1426
+ /** 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. */
1427
+ requestId?: string;
1428
+ /**
1429
+ * Optional. Opaque thread identifier. To start or add to a thread, create a message and specify a `threadKey` instead of thread.name. (Setting thread.name has no effect.) The
1430
+ * first message with a given `threadKey` starts a new thread. Subsequent messages with the same `threadKey` post into the same thread.
1431
+ */
1432
+ threadKey?: string;
1433
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
1434
+ upload_protocol?: string;
1435
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1436
+ uploadType?: string;
1437
+ /** Request body */
1438
+ resource: Message;
1439
+ }): Request<Message>;
1440
+ create(request: {
1441
+ /** V1 error format. */
1442
+ "$.xgafv"?: string;
1443
+ /** OAuth access token. */
1444
+ access_token?: string;
1445
+ /** Data format for response. */
1446
+ alt?: string;
1447
+ /** JSONP */
1448
+ callback?: string;
1449
+ /** Selector specifying which fields to include in a partial response. */
1450
+ fields?: string;
1451
+ /** 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. */
1452
+ key?: string;
1453
+ /** OAuth 2.0 token for the current user. */
1454
+ oauth_token?: string;
1455
+ /** Required. Space resource name, in the form "spaces/*". Example: spaces/AAAAAAAAAAA */
1456
+ parent: string;
1457
+ /** Returns response with indentations and line breaks. */
1458
+ prettyPrint?: boolean;
1459
+ /** 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. */
1460
+ quotaUser?: string;
1461
+ /** 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. */
1462
+ requestId?: string;
1463
+ /**
1464
+ * Optional. Opaque thread identifier. To start or add to a thread, create a message and specify a `threadKey` instead of thread.name. (Setting thread.name has no effect.) The
1465
+ * first message with a given `threadKey` starts a new thread. Subsequent messages with the same `threadKey` post into the same thread.
1466
+ */
1467
+ threadKey?: string;
1468
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
1469
+ upload_protocol?: string;
1470
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1471
+ uploadType?: string;
1472
+ },
1473
+ body: Message): Request<Message>;
1474
+ /** Deletes a message. Requires [service account authentication](https://developers.google.com/chat/api/guides/auth/service-accounts). */
1475
+ delete(request?: {
1476
+ /** V1 error format. */
1477
+ "$.xgafv"?: string;
1478
+ /** OAuth access token. */
1479
+ access_token?: string;
1480
+ /** Data format for response. */
1481
+ alt?: string;
1482
+ /** JSONP */
1483
+ callback?: string;
1484
+ /** Selector specifying which fields to include in a partial response. */
1485
+ fields?: string;
1486
+ /** 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. */
1487
+ key?: string;
1488
+ /** Required. Resource name of the message to be deleted, in the form "spaces/*‍/messages/*" Example: spaces/AAAAAAAAAAA/messages/BBBBBBBBBBB.BBBBBBBBBBB */
1489
+ name: string;
1490
+ /** OAuth 2.0 token for the current user. */
1491
+ oauth_token?: string;
1492
+ /** Returns response with indentations and line breaks. */
1493
+ prettyPrint?: boolean;
1494
+ /** 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. */
1495
+ quotaUser?: string;
1496
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
1497
+ upload_protocol?: string;
1498
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1499
+ uploadType?: string;
1500
+ }): Request<{}>;
1501
+ /** Returns a message. Requires [service account authentication](https://developers.google.com/chat/api/guides/auth/service-accounts). */
1502
+ get(request?: {
1503
+ /** V1 error format. */
1504
+ "$.xgafv"?: string;
1505
+ /** OAuth access token. */
1506
+ access_token?: string;
1507
+ /** Data format for response. */
1508
+ alt?: string;
1509
+ /** JSONP */
1510
+ callback?: string;
1511
+ /** Selector specifying which fields to include in a partial response. */
1512
+ fields?: string;
1513
+ /** 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
+ key?: string;
1515
+ /** Required. Resource name of the message to be retrieved, in the form "spaces/*‍/messages/*". Example: spaces/AAAAAAAAAAA/messages/BBBBBBBBBBB.BBBBBBBBBBB */
1516
+ name: string;
1517
+ /** OAuth 2.0 token for the current user. */
1518
+ oauth_token?: string;
1519
+ /** Returns response with indentations and line breaks. */
1520
+ prettyPrint?: boolean;
1521
+ /** 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. */
1522
+ quotaUser?: string;
1523
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
1524
+ upload_protocol?: string;
1525
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1526
+ uploadType?: string;
1527
+ }): Request<Message>;
1528
+ /** Updates a message. Requires [service account authentication](https://developers.google.com/chat/api/guides/auth/service-accounts). */
1529
+ update(request: {
1530
+ /** V1 error format. */
1531
+ "$.xgafv"?: string;
1532
+ /** OAuth access token. */
1533
+ access_token?: string;
1534
+ /** Data format for response. */
1535
+ alt?: string;
1536
+ /** JSONP */
1537
+ callback?: string;
1538
+ /** Selector specifying which fields to include in a partial response. */
1539
+ fields?: string;
1540
+ /** 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. */
1541
+ key?: string;
1542
+ /** Resource name in the form `spaces/*‍/messages/*`. Example: `spaces/AAAAAAAAAAA/messages/BBBBBBBBBBB.BBBBBBBBBBB` */
1543
+ name: string;
1544
+ /** OAuth 2.0 token for the current user. */
1545
+ oauth_token?: string;
1546
+ /** Returns response with indentations and line breaks. */
1547
+ prettyPrint?: boolean;
1548
+ /** 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. */
1549
+ quotaUser?: string;
1550
+ /**
1551
+ * Required. The field paths to update. Separate multiple values with commas. Currently supported field paths: - text - cards (Requires [service account
1552
+ * authentication](/chat/api/guides/auth/service-accounts).)
1553
+ */
1554
+ updateMask?: string;
1555
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
1556
+ upload_protocol?: string;
1557
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1558
+ uploadType?: string;
1559
+ /** Request body */
1560
+ resource: Message;
1561
+ }): Request<Message>;
1562
+ update(request: {
1563
+ /** V1 error format. */
1564
+ "$.xgafv"?: string;
1565
+ /** OAuth access token. */
1566
+ access_token?: string;
1567
+ /** Data format for response. */
1568
+ alt?: string;
1569
+ /** JSONP */
1570
+ callback?: string;
1571
+ /** Selector specifying which fields to include in a partial response. */
1572
+ fields?: string;
1573
+ /** 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. */
1574
+ key?: string;
1575
+ /** Resource name in the form `spaces/*‍/messages/*`. Example: `spaces/AAAAAAAAAAA/messages/BBBBBBBBBBB.BBBBBBBBBBB` */
1576
+ name: string;
1577
+ /** OAuth 2.0 token for the current user. */
1578
+ oauth_token?: string;
1579
+ /** Returns response with indentations and line breaks. */
1580
+ prettyPrint?: boolean;
1581
+ /** 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. */
1582
+ quotaUser?: string;
1583
+ /**
1584
+ * Required. The field paths to update. Separate multiple values with commas. Currently supported field paths: - text - cards (Requires [service account
1585
+ * authentication](/chat/api/guides/auth/service-accounts).)
1586
+ */
1587
+ updateMask?: string;
1588
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
1589
+ upload_protocol?: string;
1590
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1591
+ uploadType?: string;
1592
+ },
1593
+ body: Message): Request<Message>;
1594
+ attachments: AttachmentsResource;
1595
+ }
1596
+ interface SpacesResource {
1597
+ /** Returns a space. Requires [service account authentication](https://developers.google.com/chat/api/guides/auth/service-accounts). */
1598
+ get(request?: {
1599
+ /** V1 error format. */
1600
+ "$.xgafv"?: string;
1601
+ /** OAuth access token. */
1602
+ access_token?: string;
1603
+ /** Data format for response. */
1604
+ alt?: string;
1605
+ /** JSONP */
1606
+ callback?: string;
1607
+ /** Selector specifying which fields to include in a partial response. */
1608
+ fields?: string;
1609
+ /** 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. */
1610
+ key?: string;
1611
+ /** Required. Resource name of the space, in the form "spaces/*". Format: spaces/{space} */
1612
+ name: string;
1613
+ /** OAuth 2.0 token for the current user. */
1614
+ oauth_token?: string;
1615
+ /** Returns response with indentations and line breaks. */
1616
+ prettyPrint?: boolean;
1617
+ /** 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. */
1618
+ quotaUser?: string;
1619
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
1620
+ upload_protocol?: string;
1621
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1622
+ uploadType?: string;
1623
+ }): Request<Space>;
1624
+ /** Lists spaces the caller is a member of. Requires [service account authentication](https://developers.google.com/chat/api/guides/auth/service-accounts). */
1625
+ list(request?: {
1626
+ /** V1 error format. */
1627
+ "$.xgafv"?: string;
1628
+ /** OAuth access token. */
1629
+ access_token?: string;
1630
+ /** Data format for response. */
1631
+ alt?: string;
1632
+ /** JSONP */
1633
+ callback?: string;
1634
+ /** Selector specifying which fields to include in a partial response. */
1635
+ fields?: string;
1636
+ /** 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. */
1637
+ key?: string;
1638
+ /** OAuth 2.0 token for the current user. */
1639
+ oauth_token?: string;
1640
+ /** Optional. Requested page size. The value is capped at 1000. Server may return fewer results than requested. If unspecified, server will default to 100. */
1641
+ pageSize?: number;
1642
+ /** Optional. A token identifying a page of results the server should return. */
1643
+ pageToken?: string;
1644
+ /** Returns response with indentations and line breaks. */
1645
+ prettyPrint?: boolean;
1646
+ /** 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. */
1647
+ quotaUser?: string;
1648
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
1649
+ upload_protocol?: string;
1650
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1651
+ uploadType?: string;
1652
+ }): Request<ListSpacesResponse>;
1653
+ /** Legacy path for creating message. Calling these will result in a BadRequest response. */
1654
+ webhooks(request: {
1655
+ /** V1 error format. */
1656
+ "$.xgafv"?: string;
1657
+ /** OAuth access token. */
1658
+ access_token?: string;
1659
+ /** Data format for response. */
1660
+ alt?: string;
1661
+ /** JSONP */
1662
+ callback?: string;
1663
+ /** Selector specifying which fields to include in a partial response. */
1664
+ fields?: string;
1665
+ /** 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. */
1666
+ key?: string;
1667
+ /** OAuth 2.0 token for the current user. */
1668
+ oauth_token?: string;
1669
+ /** Required. Space resource name, in the form "spaces/*". Example: spaces/AAAAAAAAAAA */
1670
+ parent: string;
1671
+ /** Returns response with indentations and line breaks. */
1672
+ prettyPrint?: boolean;
1673
+ /** 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. */
1674
+ quotaUser?: string;
1675
+ /** 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. */
1676
+ requestId?: string;
1677
+ /**
1678
+ * Optional. Opaque thread identifier. To start or add to a thread, create a message and specify a `threadKey` instead of thread.name. (Setting thread.name has no effect.) The
1679
+ * first message with a given `threadKey` starts a new thread. Subsequent messages with the same `threadKey` post into the same thread.
1680
+ */
1681
+ threadKey?: string;
1682
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
1683
+ upload_protocol?: string;
1684
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1685
+ uploadType?: string;
1686
+ /** Request body */
1687
+ resource: Message;
1688
+ }): Request<Message>;
1689
+ webhooks(request: {
1690
+ /** V1 error format. */
1691
+ "$.xgafv"?: string;
1692
+ /** OAuth access token. */
1693
+ access_token?: string;
1694
+ /** Data format for response. */
1695
+ alt?: string;
1696
+ /** JSONP */
1697
+ callback?: string;
1698
+ /** Selector specifying which fields to include in a partial response. */
1699
+ fields?: string;
1700
+ /** 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. */
1701
+ key?: string;
1702
+ /** OAuth 2.0 token for the current user. */
1703
+ oauth_token?: string;
1704
+ /** Required. Space resource name, in the form "spaces/*". Example: spaces/AAAAAAAAAAA */
1705
+ parent: string;
1706
+ /** Returns response with indentations and line breaks. */
1707
+ prettyPrint?: boolean;
1708
+ /** 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. */
1709
+ quotaUser?: string;
1710
+ /** 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. */
1711
+ requestId?: string;
1712
+ /**
1713
+ * Optional. Opaque thread identifier. To start or add to a thread, create a message and specify a `threadKey` instead of thread.name. (Setting thread.name has no effect.) The
1714
+ * first message with a given `threadKey` starts a new thread. Subsequent messages with the same `threadKey` post into the same thread.
1715
+ */
1716
+ threadKey?: string;
1717
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
1718
+ upload_protocol?: string;
1719
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1720
+ uploadType?: string;
1721
+ },
1722
+ body: Message): Request<Message>;
1723
+ members: MembersResource;
1724
+ messages: MessagesResource;
1725
+ }
1726
+
1727
+ const dms: DmsResource;
1728
+
1729
+ const media: MediaResource;
1730
+
1731
+ const rooms: RoomsResource;
1732
+
1733
+ const spaces: SpacesResource;
1734
+ }
1735
+ }