@google-apps/chat 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -0
- package/LICENSE +202 -0
- package/README.md +220 -0
- package/build/protos/google/apps/card/v1/card.proto +1918 -0
- package/build/protos/google/chat/v1/action_status.proto +38 -0
- package/build/protos/google/chat/v1/annotation.proto +137 -0
- package/build/protos/google/chat/v1/attachment.proto +122 -0
- package/build/protos/google/chat/v1/chat_service.proto +493 -0
- package/build/protos/google/chat/v1/contextual_addon.proto +106 -0
- package/build/protos/google/chat/v1/deletion_metadata.proto +56 -0
- package/build/protos/google/chat/v1/group.proto +37 -0
- package/build/protos/google/chat/v1/history_state.proto +41 -0
- package/build/protos/google/chat/v1/matched_url.proto +35 -0
- package/build/protos/google/chat/v1/membership.proto +292 -0
- package/build/protos/google/chat/v1/message.proto +645 -0
- package/build/protos/google/chat/v1/reaction.proto +183 -0
- package/build/protos/google/chat/v1/slash_command.proto +32 -0
- package/build/protos/google/chat/v1/space.proto +360 -0
- package/build/protos/google/chat/v1/space_setup.proto +91 -0
- package/build/protos/google/chat/v1/user.proto +82 -0
- package/build/protos/google/chat/v1/widgets.proto +277 -0
- package/build/protos/protos.d.ts +20339 -0
- package/build/protos/protos.js +52506 -0
- package/build/protos/protos.json +5114 -0
- package/build/src/index.d.ts +11 -0
- package/build/src/index.js +28 -0
- package/build/src/index.js.map +1 -0
- package/build/src/v1/chat_service_client.d.ts +2194 -0
- package/build/src/v1/chat_service_client.js +1763 -0
- package/build/src/v1/chat_service_client.js.map +1 -0
- package/build/src/v1/chat_service_client_config.json +148 -0
- package/build/src/v1/index.d.ts +1 -0
- package/build/src/v1/index.js +23 -0
- package/build/src/v1/index.js.map +1 -0
- package/package.json +70 -0
|
@@ -0,0 +1,2194 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
import type * as gax from 'google-gax';
|
|
3
|
+
import type { Callback, CallOptions, Descriptors, ClientOptions, PaginationCallback } from 'google-gax';
|
|
4
|
+
import { Transform } from 'stream';
|
|
5
|
+
import * as protos from '../../protos/protos';
|
|
6
|
+
/**
|
|
7
|
+
* Enables developers to build Chat apps and
|
|
8
|
+
* integrations on Google Chat Platform.
|
|
9
|
+
* @class
|
|
10
|
+
* @memberof v1
|
|
11
|
+
*/
|
|
12
|
+
export declare class ChatServiceClient {
|
|
13
|
+
private _terminated;
|
|
14
|
+
private _opts;
|
|
15
|
+
private _providedCustomServicePath;
|
|
16
|
+
private _gaxModule;
|
|
17
|
+
private _gaxGrpc;
|
|
18
|
+
private _protos;
|
|
19
|
+
private _defaults;
|
|
20
|
+
private _universeDomain;
|
|
21
|
+
private _servicePath;
|
|
22
|
+
auth: gax.GoogleAuth;
|
|
23
|
+
descriptors: Descriptors;
|
|
24
|
+
warn: (code: string, message: string, warnType?: string) => void;
|
|
25
|
+
innerApiCalls: {
|
|
26
|
+
[name: string]: Function;
|
|
27
|
+
};
|
|
28
|
+
pathTemplates: {
|
|
29
|
+
[name: string]: gax.PathTemplate;
|
|
30
|
+
};
|
|
31
|
+
chatServiceStub?: Promise<{
|
|
32
|
+
[name: string]: Function;
|
|
33
|
+
}>;
|
|
34
|
+
/**
|
|
35
|
+
* Construct an instance of ChatServiceClient.
|
|
36
|
+
*
|
|
37
|
+
* @param {object} [options] - The configuration object.
|
|
38
|
+
* The options accepted by the constructor are described in detail
|
|
39
|
+
* in [this document](https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#creating-the-client-instance).
|
|
40
|
+
* The common options are:
|
|
41
|
+
* @param {object} [options.credentials] - Credentials object.
|
|
42
|
+
* @param {string} [options.credentials.client_email]
|
|
43
|
+
* @param {string} [options.credentials.private_key]
|
|
44
|
+
* @param {string} [options.email] - Account email address. Required when
|
|
45
|
+
* using a .pem or .p12 keyFilename.
|
|
46
|
+
* @param {string} [options.keyFilename] - Full path to the a .json, .pem, or
|
|
47
|
+
* .p12 key downloaded from the Google Developers Console. If you provide
|
|
48
|
+
* a path to a JSON file, the projectId option below is not necessary.
|
|
49
|
+
* NOTE: .pem and .p12 require you to specify options.email as well.
|
|
50
|
+
* @param {number} [options.port] - The port on which to connect to
|
|
51
|
+
* the remote host.
|
|
52
|
+
* @param {string} [options.projectId] - The project ID from the Google
|
|
53
|
+
* Developer's Console, e.g. 'grape-spaceship-123'. We will also check
|
|
54
|
+
* the environment variable GCLOUD_PROJECT for your project ID. If your
|
|
55
|
+
* app is running in an environment which supports
|
|
56
|
+
* {@link https://developers.google.com/identity/protocols/application-default-credentials Application Default Credentials},
|
|
57
|
+
* your project ID will be detected automatically.
|
|
58
|
+
* @param {string} [options.apiEndpoint] - The domain name of the
|
|
59
|
+
* API remote host.
|
|
60
|
+
* @param {gax.ClientConfig} [options.clientConfig] - Client configuration override.
|
|
61
|
+
* Follows the structure of {@link gapicConfig}.
|
|
62
|
+
* @param {boolean} [options.fallback] - Use HTTP/1.1 REST mode.
|
|
63
|
+
* For more information, please check the
|
|
64
|
+
* {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}.
|
|
65
|
+
* @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you
|
|
66
|
+
* need to avoid loading the default gRPC version and want to use the fallback
|
|
67
|
+
* HTTP implementation. Load only fallback version and pass it to the constructor:
|
|
68
|
+
* ```
|
|
69
|
+
* const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC
|
|
70
|
+
* const client = new ChatServiceClient({fallback: true}, gax);
|
|
71
|
+
* ```
|
|
72
|
+
*/
|
|
73
|
+
constructor(opts?: ClientOptions, gaxInstance?: typeof gax | typeof gax.fallback);
|
|
74
|
+
/**
|
|
75
|
+
* Initialize the client.
|
|
76
|
+
* Performs asynchronous operations (such as authentication) and prepares the client.
|
|
77
|
+
* This function will be called automatically when any class method is called for the
|
|
78
|
+
* first time, but if you need to initialize it before calling an actual method,
|
|
79
|
+
* feel free to call initialize() directly.
|
|
80
|
+
*
|
|
81
|
+
* You can await on this method if you want to make sure the client is initialized.
|
|
82
|
+
*
|
|
83
|
+
* @returns {Promise} A promise that resolves to an authenticated service stub.
|
|
84
|
+
*/
|
|
85
|
+
initialize(): Promise<{
|
|
86
|
+
[name: string]: Function;
|
|
87
|
+
}>;
|
|
88
|
+
/**
|
|
89
|
+
* The DNS address for this API service.
|
|
90
|
+
* @deprecated Use the apiEndpoint method of the client instance.
|
|
91
|
+
* @returns {string} The DNS address for this service.
|
|
92
|
+
*/
|
|
93
|
+
static get servicePath(): string;
|
|
94
|
+
/**
|
|
95
|
+
* The DNS address for this API service - same as servicePath.
|
|
96
|
+
* @deprecated Use the apiEndpoint method of the client instance.
|
|
97
|
+
* @returns {string} The DNS address for this service.
|
|
98
|
+
*/
|
|
99
|
+
static get apiEndpoint(): string;
|
|
100
|
+
/**
|
|
101
|
+
* The DNS address for this API service.
|
|
102
|
+
* @returns {string} The DNS address for this service.
|
|
103
|
+
*/
|
|
104
|
+
get apiEndpoint(): string;
|
|
105
|
+
get universeDomain(): string;
|
|
106
|
+
/**
|
|
107
|
+
* The port for this API service.
|
|
108
|
+
* @returns {number} The default port for this service.
|
|
109
|
+
*/
|
|
110
|
+
static get port(): number;
|
|
111
|
+
/**
|
|
112
|
+
* The scopes needed to make gRPC calls for every method defined
|
|
113
|
+
* in this service.
|
|
114
|
+
* @returns {string[]} List of default scopes.
|
|
115
|
+
*/
|
|
116
|
+
static get scopes(): string[];
|
|
117
|
+
getProjectId(): Promise<string>;
|
|
118
|
+
getProjectId(callback: Callback<string, undefined, undefined>): void;
|
|
119
|
+
/**
|
|
120
|
+
* Creates a message in a Google Chat space. For an example, see [Create a
|
|
121
|
+
* message](https://developers.google.com/chat/api/guides/v1/messages/create).
|
|
122
|
+
*
|
|
123
|
+
* Calling this method requires
|
|
124
|
+
* [authentication](https://developers.google.com/chat/api/guides/auth) and
|
|
125
|
+
* supports the following authentication types:
|
|
126
|
+
*
|
|
127
|
+
* - For text messages, user authentication or app authentication are
|
|
128
|
+
* supported.
|
|
129
|
+
* - For card messages, only app authentication is supported. (Only Chat apps
|
|
130
|
+
* can create card messages.)
|
|
131
|
+
*
|
|
132
|
+
* @param {Object} request
|
|
133
|
+
* The request object that will be sent.
|
|
134
|
+
* @param {string} request.parent
|
|
135
|
+
* Required. The resource name of the space in which to create a message.
|
|
136
|
+
*
|
|
137
|
+
* Format: `spaces/{space}`
|
|
138
|
+
* @param {google.chat.v1.Message} request.message
|
|
139
|
+
* Required. Message body.
|
|
140
|
+
* @param {string} [request.threadKey]
|
|
141
|
+
* Optional. Deprecated: Use
|
|
142
|
+
* {@link protos.google.chat.v1.Thread.thread_key|thread.thread_key} instead. ID for the
|
|
143
|
+
* thread. Supports up to 4000 characters. To start or add to a thread, create
|
|
144
|
+
* a message and specify a `threadKey` or the
|
|
145
|
+
* {@link protos.google.chat.v1.Thread.name|thread.name}. For example usage, see [Start or
|
|
146
|
+
* reply to a message
|
|
147
|
+
* thread](https://developers.google.com/chat/api/guides/v1/messages/create#create-message-thread).
|
|
148
|
+
* @param {string} [request.requestId]
|
|
149
|
+
* Optional. A unique request ID for this message. Specifying an existing
|
|
150
|
+
* request ID returns the message created with that ID instead of creating a
|
|
151
|
+
* new message.
|
|
152
|
+
* @param {google.chat.v1.CreateMessageRequest.MessageReplyOption} [request.messageReplyOption]
|
|
153
|
+
* Optional. Specifies whether a message starts a thread or replies to one.
|
|
154
|
+
* Only supported in named spaces.
|
|
155
|
+
* @param {string} [request.messageId]
|
|
156
|
+
* Optional. A custom ID for a message. Lets Chat apps get, update, or delete
|
|
157
|
+
* a message without needing to store the system-assigned ID in the message's
|
|
158
|
+
* resource name (represented in the message `name` field).
|
|
159
|
+
*
|
|
160
|
+
* The value for this field must meet the following requirements:
|
|
161
|
+
*
|
|
162
|
+
* * Begins with `client-`. For example, `client-custom-name` is a valid
|
|
163
|
+
* custom ID, but `custom-name` is not.
|
|
164
|
+
* * Contains up to 63 characters and only lowercase letters, numbers, and
|
|
165
|
+
* hyphens.
|
|
166
|
+
* * Is unique within a space. A Chat app can't use the same custom ID for
|
|
167
|
+
* different messages.
|
|
168
|
+
*
|
|
169
|
+
* For details, see [Name a
|
|
170
|
+
* message](https://developers.google.com/chat/api/guides/v1/messages/create#name_a_created_message).
|
|
171
|
+
* @param {object} [options]
|
|
172
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
173
|
+
* @returns {Promise} - The promise which resolves to an array.
|
|
174
|
+
* The first element of the array is an object representing {@link protos.google.chat.v1.Message|Message}.
|
|
175
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
|
|
176
|
+
* for more details and examples.
|
|
177
|
+
* @example <caption>include:samples/generated/v1/chat_service.create_message.js</caption>
|
|
178
|
+
* region_tag:chat_v1_generated_ChatService_CreateMessage_async
|
|
179
|
+
*/
|
|
180
|
+
createMessage(request?: protos.google.chat.v1.ICreateMessageRequest, options?: CallOptions): Promise<[
|
|
181
|
+
protos.google.chat.v1.IMessage,
|
|
182
|
+
protos.google.chat.v1.ICreateMessageRequest | undefined,
|
|
183
|
+
{} | undefined
|
|
184
|
+
]>;
|
|
185
|
+
createMessage(request: protos.google.chat.v1.ICreateMessageRequest, options: CallOptions, callback: Callback<protos.google.chat.v1.IMessage, protos.google.chat.v1.ICreateMessageRequest | null | undefined, {} | null | undefined>): void;
|
|
186
|
+
createMessage(request: protos.google.chat.v1.ICreateMessageRequest, callback: Callback<protos.google.chat.v1.IMessage, protos.google.chat.v1.ICreateMessageRequest | null | undefined, {} | null | undefined>): void;
|
|
187
|
+
/**
|
|
188
|
+
* Returns details about a membership. For an example, see
|
|
189
|
+
* [Get a
|
|
190
|
+
* membership](https://developers.google.com/chat/api/guides/v1/members/get).
|
|
191
|
+
*
|
|
192
|
+
* Requires
|
|
193
|
+
* [authentication](https://developers.google.com/chat/api/guides/auth).
|
|
194
|
+
* Supports
|
|
195
|
+
* [app
|
|
196
|
+
* authentication](https://developers.google.com/chat/api/guides/auth/service-accounts)
|
|
197
|
+
* and [user
|
|
198
|
+
* authentication](https://developers.google.com/chat/api/guides/auth/users).
|
|
199
|
+
*
|
|
200
|
+
* @param {Object} request
|
|
201
|
+
* The request object that will be sent.
|
|
202
|
+
* @param {string} request.name
|
|
203
|
+
* Required. Resource name of the membership to retrieve.
|
|
204
|
+
*
|
|
205
|
+
* To get the app's own membership, you can optionally use
|
|
206
|
+
* `spaces/{space}/members/app`.
|
|
207
|
+
*
|
|
208
|
+
* Format: `spaces/{space}/members/{member}` or `spaces/{space}/members/app`
|
|
209
|
+
*
|
|
210
|
+
* When [authenticated as a
|
|
211
|
+
* user](https://developers.google.com/chat/api/guides/auth/users), you can
|
|
212
|
+
* use the user's email as an alias for `{member}`. For example,
|
|
213
|
+
* `spaces/{space}/members/example@gmail.com` where `example@gmail.com` is the
|
|
214
|
+
* email of the Google Chat user.
|
|
215
|
+
* @param {object} [options]
|
|
216
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
217
|
+
* @returns {Promise} - The promise which resolves to an array.
|
|
218
|
+
* The first element of the array is an object representing {@link protos.google.chat.v1.Membership|Membership}.
|
|
219
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
|
|
220
|
+
* for more details and examples.
|
|
221
|
+
* @example <caption>include:samples/generated/v1/chat_service.get_membership.js</caption>
|
|
222
|
+
* region_tag:chat_v1_generated_ChatService_GetMembership_async
|
|
223
|
+
*/
|
|
224
|
+
getMembership(request?: protos.google.chat.v1.IGetMembershipRequest, options?: CallOptions): Promise<[
|
|
225
|
+
protos.google.chat.v1.IMembership,
|
|
226
|
+
protos.google.chat.v1.IGetMembershipRequest | undefined,
|
|
227
|
+
{} | undefined
|
|
228
|
+
]>;
|
|
229
|
+
getMembership(request: protos.google.chat.v1.IGetMembershipRequest, options: CallOptions, callback: Callback<protos.google.chat.v1.IMembership, protos.google.chat.v1.IGetMembershipRequest | null | undefined, {} | null | undefined>): void;
|
|
230
|
+
getMembership(request: protos.google.chat.v1.IGetMembershipRequest, callback: Callback<protos.google.chat.v1.IMembership, protos.google.chat.v1.IGetMembershipRequest | null | undefined, {} | null | undefined>): void;
|
|
231
|
+
/**
|
|
232
|
+
* Returns details about a message.
|
|
233
|
+
* For an example, see [Read a
|
|
234
|
+
* message](https://developers.google.com/chat/api/guides/v1/messages/get).
|
|
235
|
+
*
|
|
236
|
+
* Requires
|
|
237
|
+
* [authentication](https://developers.google.com/chat/api/guides/auth).
|
|
238
|
+
* Supports
|
|
239
|
+
* [app
|
|
240
|
+
* authentication](https://developers.google.com/chat/api/guides/auth/service-accounts)
|
|
241
|
+
* and [user
|
|
242
|
+
* authentication](https://developers.google.com/chat/api/guides/auth/users).
|
|
243
|
+
*
|
|
244
|
+
* Note: Might return a message from a blocked member or space.
|
|
245
|
+
*
|
|
246
|
+
* @param {Object} request
|
|
247
|
+
* The request object that will be sent.
|
|
248
|
+
* @param {string} request.name
|
|
249
|
+
* Required. Resource name of the message.
|
|
250
|
+
*
|
|
251
|
+
* Format: `spaces/{space}/messages/{message}`
|
|
252
|
+
*
|
|
253
|
+
* If you've set a custom ID for your message, you can use the value from the
|
|
254
|
+
* `clientAssignedMessageId` field for `{message}`. For details, see [Name a
|
|
255
|
+
* message]
|
|
256
|
+
* (https://developers.google.com/chat/api/guides/v1/messages/create#name_a_created_message).
|
|
257
|
+
* @param {object} [options]
|
|
258
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
259
|
+
* @returns {Promise} - The promise which resolves to an array.
|
|
260
|
+
* The first element of the array is an object representing {@link protos.google.chat.v1.Message|Message}.
|
|
261
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
|
|
262
|
+
* for more details and examples.
|
|
263
|
+
* @example <caption>include:samples/generated/v1/chat_service.get_message.js</caption>
|
|
264
|
+
* region_tag:chat_v1_generated_ChatService_GetMessage_async
|
|
265
|
+
*/
|
|
266
|
+
getMessage(request?: protos.google.chat.v1.IGetMessageRequest, options?: CallOptions): Promise<[
|
|
267
|
+
protos.google.chat.v1.IMessage,
|
|
268
|
+
protos.google.chat.v1.IGetMessageRequest | undefined,
|
|
269
|
+
{} | undefined
|
|
270
|
+
]>;
|
|
271
|
+
getMessage(request: protos.google.chat.v1.IGetMessageRequest, options: CallOptions, callback: Callback<protos.google.chat.v1.IMessage, protos.google.chat.v1.IGetMessageRequest | null | undefined, {} | null | undefined>): void;
|
|
272
|
+
getMessage(request: protos.google.chat.v1.IGetMessageRequest, callback: Callback<protos.google.chat.v1.IMessage, protos.google.chat.v1.IGetMessageRequest | null | undefined, {} | null | undefined>): void;
|
|
273
|
+
/**
|
|
274
|
+
* Updates a message. There's a difference between the `patch` and `update`
|
|
275
|
+
* methods. The `patch`
|
|
276
|
+
* method uses a `patch` request while the `update` method uses a `put`
|
|
277
|
+
* request. We recommend using the `patch` method. For an example, see
|
|
278
|
+
* [Update a
|
|
279
|
+
* message](https://developers.google.com/chat/api/guides/v1/messages/update).
|
|
280
|
+
*
|
|
281
|
+
* Requires
|
|
282
|
+
* [authentication](https://developers.google.com/chat/api/guides/auth).
|
|
283
|
+
* Supports
|
|
284
|
+
* [app
|
|
285
|
+
* authentication](https://developers.google.com/chat/api/guides/auth/service-accounts)
|
|
286
|
+
* and [user
|
|
287
|
+
* authentication](https://developers.google.com/chat/api/guides/auth/users).
|
|
288
|
+
* When using app authentication, requests can only update messages
|
|
289
|
+
* created by the calling Chat app.
|
|
290
|
+
*
|
|
291
|
+
* @param {Object} request
|
|
292
|
+
* The request object that will be sent.
|
|
293
|
+
* @param {google.chat.v1.Message} request.message
|
|
294
|
+
* Required. Message with fields updated.
|
|
295
|
+
* @param {google.protobuf.FieldMask} request.updateMask
|
|
296
|
+
* Required. The field paths to update. Separate multiple values with commas
|
|
297
|
+
* or use `*` to update all field paths.
|
|
298
|
+
*
|
|
299
|
+
* Currently supported field paths:
|
|
300
|
+
*
|
|
301
|
+
* - `text`
|
|
302
|
+
*
|
|
303
|
+
* - `attachment`
|
|
304
|
+
*
|
|
305
|
+
* - `cards` (Requires [app
|
|
306
|
+
* authentication](/chat/api/guides/auth/service-accounts).)
|
|
307
|
+
*
|
|
308
|
+
* - `cards_v2` (Requires [app
|
|
309
|
+
* authentication](/chat/api/guides/auth/service-accounts).)
|
|
310
|
+
*
|
|
311
|
+
* - Developer Preview: `accessory_widgets` (Requires [app
|
|
312
|
+
* authentication](/chat/api/guides/auth/service-accounts).)
|
|
313
|
+
* @param {boolean} [request.allowMissing]
|
|
314
|
+
* Optional. If `true` and the message isn't found, a new message is created
|
|
315
|
+
* and `updateMask` is ignored. The specified message ID must be
|
|
316
|
+
* [client-assigned](https://developers.google.com/chat/api/guides/v1/messages/create#name_a_created_message)
|
|
317
|
+
* or the request fails.
|
|
318
|
+
* @param {object} [options]
|
|
319
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
320
|
+
* @returns {Promise} - The promise which resolves to an array.
|
|
321
|
+
* The first element of the array is an object representing {@link protos.google.chat.v1.Message|Message}.
|
|
322
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
|
|
323
|
+
* for more details and examples.
|
|
324
|
+
* @example <caption>include:samples/generated/v1/chat_service.update_message.js</caption>
|
|
325
|
+
* region_tag:chat_v1_generated_ChatService_UpdateMessage_async
|
|
326
|
+
*/
|
|
327
|
+
updateMessage(request?: protos.google.chat.v1.IUpdateMessageRequest, options?: CallOptions): Promise<[
|
|
328
|
+
protos.google.chat.v1.IMessage,
|
|
329
|
+
protos.google.chat.v1.IUpdateMessageRequest | undefined,
|
|
330
|
+
{} | undefined
|
|
331
|
+
]>;
|
|
332
|
+
updateMessage(request: protos.google.chat.v1.IUpdateMessageRequest, options: CallOptions, callback: Callback<protos.google.chat.v1.IMessage, protos.google.chat.v1.IUpdateMessageRequest | null | undefined, {} | null | undefined>): void;
|
|
333
|
+
updateMessage(request: protos.google.chat.v1.IUpdateMessageRequest, callback: Callback<protos.google.chat.v1.IMessage, protos.google.chat.v1.IUpdateMessageRequest | null | undefined, {} | null | undefined>): void;
|
|
334
|
+
/**
|
|
335
|
+
* Deletes a message.
|
|
336
|
+
* For an example, see [Delete a
|
|
337
|
+
* message](https://developers.google.com/chat/api/guides/v1/messages/delete).
|
|
338
|
+
*
|
|
339
|
+
* Requires
|
|
340
|
+
* [authentication](https://developers.google.com/chat/api/guides/auth).
|
|
341
|
+
* Supports
|
|
342
|
+
* [app
|
|
343
|
+
* authentication](https://developers.google.com/chat/api/guides/auth/service-accounts)
|
|
344
|
+
* and [user
|
|
345
|
+
* authentication](https://developers.google.com/chat/api/guides/auth/users).
|
|
346
|
+
* When using app authentication, requests can only delete messages
|
|
347
|
+
* created by the calling Chat app.
|
|
348
|
+
*
|
|
349
|
+
* @param {Object} request
|
|
350
|
+
* The request object that will be sent.
|
|
351
|
+
* @param {string} request.name
|
|
352
|
+
* Required. Resource name of the message.
|
|
353
|
+
*
|
|
354
|
+
* Format: `spaces/{space}/messages/{message}`
|
|
355
|
+
*
|
|
356
|
+
* If you've set a custom ID for your message, you can use the value from the
|
|
357
|
+
* `clientAssignedMessageId` field for `{message}`. For details, see [Name a
|
|
358
|
+
* message]
|
|
359
|
+
* (https://developers.google.com/chat/api/guides/v1/messages/create#name_a_created_message).
|
|
360
|
+
* @param {boolean} request.force
|
|
361
|
+
* When `true`, deleting a message also deletes its threaded replies. When
|
|
362
|
+
* `false`, if a message has threaded replies, deletion fails.
|
|
363
|
+
*
|
|
364
|
+
* Only applies when [authenticating as a
|
|
365
|
+
* user](https://developers.google.com/chat/api/guides/auth/users). Has no
|
|
366
|
+
* effect when [authenticating as a Chat app]
|
|
367
|
+
* (https://developers.google.com/chat/api/guides/auth/service-accounts).
|
|
368
|
+
* @param {object} [options]
|
|
369
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
370
|
+
* @returns {Promise} - The promise which resolves to an array.
|
|
371
|
+
* The first element of the array is an object representing {@link protos.google.protobuf.Empty|Empty}.
|
|
372
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
|
|
373
|
+
* for more details and examples.
|
|
374
|
+
* @example <caption>include:samples/generated/v1/chat_service.delete_message.js</caption>
|
|
375
|
+
* region_tag:chat_v1_generated_ChatService_DeleteMessage_async
|
|
376
|
+
*/
|
|
377
|
+
deleteMessage(request?: protos.google.chat.v1.IDeleteMessageRequest, options?: CallOptions): Promise<[
|
|
378
|
+
protos.google.protobuf.IEmpty,
|
|
379
|
+
protos.google.chat.v1.IDeleteMessageRequest | undefined,
|
|
380
|
+
{} | undefined
|
|
381
|
+
]>;
|
|
382
|
+
deleteMessage(request: protos.google.chat.v1.IDeleteMessageRequest, options: CallOptions, callback: Callback<protos.google.protobuf.IEmpty, protos.google.chat.v1.IDeleteMessageRequest | null | undefined, {} | null | undefined>): void;
|
|
383
|
+
deleteMessage(request: protos.google.chat.v1.IDeleteMessageRequest, callback: Callback<protos.google.protobuf.IEmpty, protos.google.chat.v1.IDeleteMessageRequest | null | undefined, {} | null | undefined>): void;
|
|
384
|
+
/**
|
|
385
|
+
* Gets the metadata of a message attachment. The attachment data is fetched
|
|
386
|
+
* using the [media
|
|
387
|
+
* API](https://developers.google.com/chat/api/reference/rest/v1/media/download).
|
|
388
|
+
* For an example, see
|
|
389
|
+
* [Get a message
|
|
390
|
+
* attachment](https://developers.google.com/chat/api/guides/v1/media-and-attachments/get).
|
|
391
|
+
* Requires [app
|
|
392
|
+
* authentication](https://developers.google.com/chat/api/guides/auth/service-accounts).
|
|
393
|
+
*
|
|
394
|
+
* @param {Object} request
|
|
395
|
+
* The request object that will be sent.
|
|
396
|
+
* @param {string} request.name
|
|
397
|
+
* Required. Resource name of the attachment, in the form
|
|
398
|
+
* `spaces/* /messages/* /attachments/*`.
|
|
399
|
+
* @param {object} [options]
|
|
400
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
401
|
+
* @returns {Promise} - The promise which resolves to an array.
|
|
402
|
+
* The first element of the array is an object representing {@link protos.google.chat.v1.Attachment|Attachment}.
|
|
403
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
|
|
404
|
+
* for more details and examples.
|
|
405
|
+
* @example <caption>include:samples/generated/v1/chat_service.get_attachment.js</caption>
|
|
406
|
+
* region_tag:chat_v1_generated_ChatService_GetAttachment_async
|
|
407
|
+
*/
|
|
408
|
+
getAttachment(request?: protos.google.chat.v1.IGetAttachmentRequest, options?: CallOptions): Promise<[
|
|
409
|
+
protos.google.chat.v1.IAttachment,
|
|
410
|
+
protos.google.chat.v1.IGetAttachmentRequest | undefined,
|
|
411
|
+
{} | undefined
|
|
412
|
+
]>;
|
|
413
|
+
getAttachment(request: protos.google.chat.v1.IGetAttachmentRequest, options: CallOptions, callback: Callback<protos.google.chat.v1.IAttachment, protos.google.chat.v1.IGetAttachmentRequest | null | undefined, {} | null | undefined>): void;
|
|
414
|
+
getAttachment(request: protos.google.chat.v1.IGetAttachmentRequest, callback: Callback<protos.google.chat.v1.IAttachment, protos.google.chat.v1.IGetAttachmentRequest | null | undefined, {} | null | undefined>): void;
|
|
415
|
+
/**
|
|
416
|
+
* Uploads an attachment. For an example, see
|
|
417
|
+
* [Upload media as a file
|
|
418
|
+
* attachment](https://developers.google.com/chat/api/guides/v1/media-and-attachments/upload).
|
|
419
|
+
* Requires user
|
|
420
|
+
* [authentication](https://developers.google.com/chat/api/guides/auth/users).
|
|
421
|
+
*
|
|
422
|
+
* You can upload attachments up to 200 MB. Certain file types aren't
|
|
423
|
+
* supported. For details, see [File types blocked by Google
|
|
424
|
+
* Chat](https://support.google.com/chat/answer/7651457?&co=GENIE.Platform%3DDesktop#File%20types%20blocked%20in%20Google%20Chat).
|
|
425
|
+
*
|
|
426
|
+
* @param {Object} request
|
|
427
|
+
* The request object that will be sent.
|
|
428
|
+
* @param {string} request.parent
|
|
429
|
+
* Required. Resource name of the Chat space in which the attachment is
|
|
430
|
+
* uploaded. Format "spaces/{space}".
|
|
431
|
+
* @param {string} request.filename
|
|
432
|
+
* Required. The filename of the attachment, including the file extension.
|
|
433
|
+
* @param {object} [options]
|
|
434
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
435
|
+
* @returns {Promise} - The promise which resolves to an array.
|
|
436
|
+
* The first element of the array is an object representing {@link protos.google.chat.v1.UploadAttachmentResponse|UploadAttachmentResponse}.
|
|
437
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
|
|
438
|
+
* for more details and examples.
|
|
439
|
+
* @example <caption>include:samples/generated/v1/chat_service.upload_attachment.js</caption>
|
|
440
|
+
* region_tag:chat_v1_generated_ChatService_UploadAttachment_async
|
|
441
|
+
*/
|
|
442
|
+
uploadAttachment(request?: protos.google.chat.v1.IUploadAttachmentRequest, options?: CallOptions): Promise<[
|
|
443
|
+
protos.google.chat.v1.IUploadAttachmentResponse,
|
|
444
|
+
protos.google.chat.v1.IUploadAttachmentRequest | undefined,
|
|
445
|
+
{} | undefined
|
|
446
|
+
]>;
|
|
447
|
+
uploadAttachment(request: protos.google.chat.v1.IUploadAttachmentRequest, options: CallOptions, callback: Callback<protos.google.chat.v1.IUploadAttachmentResponse, protos.google.chat.v1.IUploadAttachmentRequest | null | undefined, {} | null | undefined>): void;
|
|
448
|
+
uploadAttachment(request: protos.google.chat.v1.IUploadAttachmentRequest, callback: Callback<protos.google.chat.v1.IUploadAttachmentResponse, protos.google.chat.v1.IUploadAttachmentRequest | null | undefined, {} | null | undefined>): void;
|
|
449
|
+
/**
|
|
450
|
+
* Returns details about a space. For an example, see
|
|
451
|
+
* [Get a space](https://developers.google.com/chat/api/guides/v1/spaces/get).
|
|
452
|
+
*
|
|
453
|
+
* Requires
|
|
454
|
+
* [authentication](https://developers.google.com/chat/api/guides/auth).
|
|
455
|
+
* Supports
|
|
456
|
+
* [app
|
|
457
|
+
* authentication](https://developers.google.com/chat/api/guides/auth/service-accounts)
|
|
458
|
+
* and [user
|
|
459
|
+
* authentication](https://developers.google.com/chat/api/guides/auth/users).
|
|
460
|
+
*
|
|
461
|
+
* @param {Object} request
|
|
462
|
+
* The request object that will be sent.
|
|
463
|
+
* @param {string} request.name
|
|
464
|
+
* Required. Resource name of the space, in the form "spaces/*".
|
|
465
|
+
*
|
|
466
|
+
* Format: `spaces/{space}`
|
|
467
|
+
* @param {object} [options]
|
|
468
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
469
|
+
* @returns {Promise} - The promise which resolves to an array.
|
|
470
|
+
* The first element of the array is an object representing {@link protos.google.chat.v1.Space|Space}.
|
|
471
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
|
|
472
|
+
* for more details and examples.
|
|
473
|
+
* @example <caption>include:samples/generated/v1/chat_service.get_space.js</caption>
|
|
474
|
+
* region_tag:chat_v1_generated_ChatService_GetSpace_async
|
|
475
|
+
*/
|
|
476
|
+
getSpace(request?: protos.google.chat.v1.IGetSpaceRequest, options?: CallOptions): Promise<[
|
|
477
|
+
protos.google.chat.v1.ISpace,
|
|
478
|
+
protos.google.chat.v1.IGetSpaceRequest | undefined,
|
|
479
|
+
{} | undefined
|
|
480
|
+
]>;
|
|
481
|
+
getSpace(request: protos.google.chat.v1.IGetSpaceRequest, options: CallOptions, callback: Callback<protos.google.chat.v1.ISpace, protos.google.chat.v1.IGetSpaceRequest | null | undefined, {} | null | undefined>): void;
|
|
482
|
+
getSpace(request: protos.google.chat.v1.IGetSpaceRequest, callback: Callback<protos.google.chat.v1.ISpace, protos.google.chat.v1.IGetSpaceRequest | null | undefined, {} | null | undefined>): void;
|
|
483
|
+
/**
|
|
484
|
+
* Creates a named space. Spaces grouped by topics aren't supported. For an
|
|
485
|
+
* example, see [Create a
|
|
486
|
+
* space](https://developers.google.com/chat/api/guides/v1/spaces/create).
|
|
487
|
+
*
|
|
488
|
+
* If you receive the error message `ALREADY_EXISTS` when creating
|
|
489
|
+
* a space, try a different `displayName`. An existing space within
|
|
490
|
+
* the Google Workspace organization might already use this display name.
|
|
491
|
+
*
|
|
492
|
+
* Requires [user
|
|
493
|
+
* authentication](https://developers.google.com/chat/api/guides/auth/users).
|
|
494
|
+
*
|
|
495
|
+
* @param {Object} request
|
|
496
|
+
* The request object that will be sent.
|
|
497
|
+
* @param {google.chat.v1.Space} request.space
|
|
498
|
+
* Required. The `displayName` and `spaceType` fields must be populated. Only
|
|
499
|
+
* `SpaceType.SPACE` is supported.
|
|
500
|
+
*
|
|
501
|
+
* If you receive the error message `ALREADY_EXISTS` when creating a space,
|
|
502
|
+
* try a different `displayName`. An existing space within the Google
|
|
503
|
+
* Workspace organization might already use this display name.
|
|
504
|
+
*
|
|
505
|
+
* The space `name` is assigned on the server so anything specified in this
|
|
506
|
+
* field will be ignored.
|
|
507
|
+
* @param {string} [request.requestId]
|
|
508
|
+
* Optional. A unique identifier for this request.
|
|
509
|
+
* A random UUID is recommended.
|
|
510
|
+
* Specifying an existing request ID returns the space created with that ID
|
|
511
|
+
* instead of creating a new space.
|
|
512
|
+
* Specifying an existing request ID from the same Chat app with a different
|
|
513
|
+
* authenticated user returns an error.
|
|
514
|
+
* @param {object} [options]
|
|
515
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
516
|
+
* @returns {Promise} - The promise which resolves to an array.
|
|
517
|
+
* The first element of the array is an object representing {@link protos.google.chat.v1.Space|Space}.
|
|
518
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
|
|
519
|
+
* for more details and examples.
|
|
520
|
+
* @example <caption>include:samples/generated/v1/chat_service.create_space.js</caption>
|
|
521
|
+
* region_tag:chat_v1_generated_ChatService_CreateSpace_async
|
|
522
|
+
*/
|
|
523
|
+
createSpace(request?: protos.google.chat.v1.ICreateSpaceRequest, options?: CallOptions): Promise<[
|
|
524
|
+
protos.google.chat.v1.ISpace,
|
|
525
|
+
protos.google.chat.v1.ICreateSpaceRequest | undefined,
|
|
526
|
+
{} | undefined
|
|
527
|
+
]>;
|
|
528
|
+
createSpace(request: protos.google.chat.v1.ICreateSpaceRequest, options: CallOptions, callback: Callback<protos.google.chat.v1.ISpace, protos.google.chat.v1.ICreateSpaceRequest | null | undefined, {} | null | undefined>): void;
|
|
529
|
+
createSpace(request: protos.google.chat.v1.ICreateSpaceRequest, callback: Callback<protos.google.chat.v1.ISpace, protos.google.chat.v1.ICreateSpaceRequest | null | undefined, {} | null | undefined>): void;
|
|
530
|
+
/**
|
|
531
|
+
* Creates a space and adds specified users to it. The calling user is
|
|
532
|
+
* automatically added to the space, and shouldn't be specified as a
|
|
533
|
+
* membership in the request. For an example, see
|
|
534
|
+
* [Set up a
|
|
535
|
+
* space](https://developers.google.com/chat/api/guides/v1/spaces/set-up).
|
|
536
|
+
*
|
|
537
|
+
* To specify the human members to add, add memberships with the appropriate
|
|
538
|
+
* `member.name` in the `SetUpSpaceRequest`. To add a human user, use
|
|
539
|
+
* `users/{user}`, where `{user}` can be the email address for the user. For
|
|
540
|
+
* users in the same Workspace organization `{user}` can also be the `id` for
|
|
541
|
+
* the person from the People API, or the `id` for the user in the Directory
|
|
542
|
+
* API. For example, if the People API Person profile ID for
|
|
543
|
+
* `user@example.com` is `123456789`, you can add the user to the space by
|
|
544
|
+
* setting the `membership.member.name` to `users/user@example.com` or
|
|
545
|
+
* `users/123456789`.
|
|
546
|
+
*
|
|
547
|
+
* For a space or group chat, if the caller blocks or is blocked by some
|
|
548
|
+
* members, then those members aren't added to the created space.
|
|
549
|
+
*
|
|
550
|
+
* To create a direct message (DM) between the calling user and another human
|
|
551
|
+
* user, specify exactly one membership to represent the human user. If
|
|
552
|
+
* one user blocks the other, the request fails and the DM isn't created.
|
|
553
|
+
*
|
|
554
|
+
* To create a DM between the calling user and the calling app, set
|
|
555
|
+
* `Space.singleUserBotDm` to `true` and don't specify any memberships. You
|
|
556
|
+
* can only use this method to set up a DM with the calling app. To add the
|
|
557
|
+
* calling app as a member of a space or an existing DM between two human
|
|
558
|
+
* users, see
|
|
559
|
+
* [create a
|
|
560
|
+
* membership](https://developers.google.com/chat/api/guides/v1/members/create).
|
|
561
|
+
*
|
|
562
|
+
* If a DM already exists between two users, even when one user blocks the
|
|
563
|
+
* other at the time a request is made, then the existing DM is returned.
|
|
564
|
+
*
|
|
565
|
+
* Spaces with threaded replies aren't supported. If you receive the error
|
|
566
|
+
* message `ALREADY_EXISTS` when setting up a space, try a different
|
|
567
|
+
* `displayName`. An existing space within the Google Workspace organization
|
|
568
|
+
* might already use this display name.
|
|
569
|
+
*
|
|
570
|
+
* Requires [user
|
|
571
|
+
* authentication](https://developers.google.com/chat/api/guides/auth/users).
|
|
572
|
+
*
|
|
573
|
+
* @param {Object} request
|
|
574
|
+
* The request object that will be sent.
|
|
575
|
+
* @param {google.chat.v1.Space} request.space
|
|
576
|
+
* Required. The `Space.spaceType` field is required.
|
|
577
|
+
*
|
|
578
|
+
* To create a space, set `Space.spaceType` to `SPACE` and set
|
|
579
|
+
* `Space.displayName`. If you receive the error message `ALREADY_EXISTS` when
|
|
580
|
+
* setting up a space, try a different `displayName`. An existing space
|
|
581
|
+
* within the Google Workspace organization might already use this display
|
|
582
|
+
* name.
|
|
583
|
+
*
|
|
584
|
+
* To create a group chat, set `Space.spaceType` to
|
|
585
|
+
* `GROUP_CHAT`. Don't set `Space.displayName`.
|
|
586
|
+
*
|
|
587
|
+
* To create a 1:1 conversation between humans,
|
|
588
|
+
* set `Space.spaceType` to `DIRECT_MESSAGE` and set
|
|
589
|
+
* `Space.singleUserBotDm` to `false`. Don't set `Space.displayName` or
|
|
590
|
+
* `Space.spaceDetails`.
|
|
591
|
+
*
|
|
592
|
+
* To create an 1:1 conversation between a human and the calling Chat app, set
|
|
593
|
+
* `Space.spaceType` to `DIRECT_MESSAGE` and
|
|
594
|
+
* `Space.singleUserBotDm` to `true`. Don't set `Space.displayName` or
|
|
595
|
+
* `Space.spaceDetails`.
|
|
596
|
+
*
|
|
597
|
+
* If a `DIRECT_MESSAGE` space already exists, that space is returned instead
|
|
598
|
+
* of creating a new space.
|
|
599
|
+
* @param {string} [request.requestId]
|
|
600
|
+
* Optional. A unique identifier for this request.
|
|
601
|
+
* A random UUID is recommended.
|
|
602
|
+
* Specifying an existing request ID returns the space created with that ID
|
|
603
|
+
* instead of creating a new space.
|
|
604
|
+
* Specifying an existing request ID from the same Chat app with a different
|
|
605
|
+
* authenticated user returns an error.
|
|
606
|
+
* @param {number[]} [request.memberships]
|
|
607
|
+
* Optional. The Google Chat users to invite to join the space. Omit the
|
|
608
|
+
* calling user, as they are added automatically.
|
|
609
|
+
*
|
|
610
|
+
* The set currently allows up to 20 memberships (in addition to the caller).
|
|
611
|
+
*
|
|
612
|
+
* The `Membership.member` field must contain a `user` with `name` populated
|
|
613
|
+
* (format: `users/{user}`) and `type` set to `User.Type.HUMAN`. You can only
|
|
614
|
+
* add human users when setting up a space (adding Chat apps is only supported
|
|
615
|
+
* for direct message setup with the calling app). You can also add members
|
|
616
|
+
* using the user's email as an alias for {user}. For example, the `user.name`
|
|
617
|
+
* can be `users/example@gmail.com`." To invite Gmail users or users from
|
|
618
|
+
* external Google Workspace domains, user's email must be used for
|
|
619
|
+
* `{user}`.
|
|
620
|
+
*
|
|
621
|
+
* Optional when setting `Space.spaceType` to `SPACE`.
|
|
622
|
+
*
|
|
623
|
+
* Required when setting `Space.spaceType` to `GROUP_CHAT`, along with at
|
|
624
|
+
* least two memberships.
|
|
625
|
+
*
|
|
626
|
+
* Required when setting `Space.spaceType` to `DIRECT_MESSAGE` with a human
|
|
627
|
+
* user, along with exactly one membership.
|
|
628
|
+
*
|
|
629
|
+
* Must be empty when creating a 1:1 conversation between a human and the
|
|
630
|
+
* calling Chat app (when setting `Space.spaceType` to
|
|
631
|
+
* `DIRECT_MESSAGE` and `Space.singleUserBotDm` to `true`).
|
|
632
|
+
* @param {object} [options]
|
|
633
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
634
|
+
* @returns {Promise} - The promise which resolves to an array.
|
|
635
|
+
* The first element of the array is an object representing {@link protos.google.chat.v1.Space|Space}.
|
|
636
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
|
|
637
|
+
* for more details and examples.
|
|
638
|
+
* @example <caption>include:samples/generated/v1/chat_service.set_up_space.js</caption>
|
|
639
|
+
* region_tag:chat_v1_generated_ChatService_SetUpSpace_async
|
|
640
|
+
*/
|
|
641
|
+
setUpSpace(request?: protos.google.chat.v1.ISetUpSpaceRequest, options?: CallOptions): Promise<[
|
|
642
|
+
protos.google.chat.v1.ISpace,
|
|
643
|
+
protos.google.chat.v1.ISetUpSpaceRequest | undefined,
|
|
644
|
+
{} | undefined
|
|
645
|
+
]>;
|
|
646
|
+
setUpSpace(request: protos.google.chat.v1.ISetUpSpaceRequest, options: CallOptions, callback: Callback<protos.google.chat.v1.ISpace, protos.google.chat.v1.ISetUpSpaceRequest | null | undefined, {} | null | undefined>): void;
|
|
647
|
+
setUpSpace(request: protos.google.chat.v1.ISetUpSpaceRequest, callback: Callback<protos.google.chat.v1.ISpace, protos.google.chat.v1.ISetUpSpaceRequest | null | undefined, {} | null | undefined>): void;
|
|
648
|
+
/**
|
|
649
|
+
* Updates a space. For an example, see
|
|
650
|
+
* [Update a
|
|
651
|
+
* space](https://developers.google.com/chat/api/guides/v1/spaces/update).
|
|
652
|
+
*
|
|
653
|
+
* If you're updating the `displayName` field and receive the error message
|
|
654
|
+
* `ALREADY_EXISTS`, try a different display name.. An existing space within
|
|
655
|
+
* the Google Workspace organization might already use this display name.
|
|
656
|
+
*
|
|
657
|
+
* Requires [user
|
|
658
|
+
* authentication](https://developers.google.com/chat/api/guides/auth/users).
|
|
659
|
+
*
|
|
660
|
+
* @param {Object} request
|
|
661
|
+
* The request object that will be sent.
|
|
662
|
+
* @param {google.chat.v1.Space} request.space
|
|
663
|
+
* Required. Space with fields to be updated. `Space.name` must be
|
|
664
|
+
* populated in the form of `spaces/{space}`. Only fields
|
|
665
|
+
* specified by `update_mask` are updated.
|
|
666
|
+
* @param {google.protobuf.FieldMask} request.updateMask
|
|
667
|
+
* Required. The updated field paths, comma separated if there are
|
|
668
|
+
* multiple.
|
|
669
|
+
*
|
|
670
|
+
* Currently supported field paths:
|
|
671
|
+
*
|
|
672
|
+
* - `display_name` (Only supports changing the display name of a space with
|
|
673
|
+
* the `SPACE` type, or when also including the `space_type` mask to change a
|
|
674
|
+
* `GROUP_CHAT` space type to `SPACE`. Trying to update the display name of a
|
|
675
|
+
* `GROUP_CHAT` or a `DIRECT_MESSAGE` space results in an invalid argument
|
|
676
|
+
* error. If you receive the error message `ALREADY_EXISTS` when updating the
|
|
677
|
+
* `displayName`, try a different `displayName`. An existing space within the
|
|
678
|
+
* Google Workspace organization might already use this display name.)
|
|
679
|
+
*
|
|
680
|
+
* - `space_type` (Only supports changing a `GROUP_CHAT` space type to
|
|
681
|
+
* `SPACE`. Include `display_name` together with `space_type` in the update
|
|
682
|
+
* mask and ensure that the specified space has a non-empty display name and
|
|
683
|
+
* the `SPACE` space type. Including the `space_type` mask and the `SPACE`
|
|
684
|
+
* type in the specified space when updating the display name is optional if
|
|
685
|
+
* the existing space already has the `SPACE` type. Trying to update the
|
|
686
|
+
* space type in other ways results in an invalid argument error).
|
|
687
|
+
*
|
|
688
|
+
* - `space_details`
|
|
689
|
+
*
|
|
690
|
+
* - `space_history_state` (Supports [turning history on or off for the
|
|
691
|
+
* space](https://support.google.com/chat/answer/7664687) if [the organization
|
|
692
|
+
* allows users to change their history
|
|
693
|
+
* setting](https://support.google.com/a/answer/7664184).
|
|
694
|
+
* Warning: mutually exclusive with all other field paths.)
|
|
695
|
+
* - Developer Preview: `access_settings.audience` (Supports changing the
|
|
696
|
+
* [access setting](https://support.google.com/chat/answer/11971020) of a
|
|
697
|
+
* space. If no audience is specified in the access setting, the space's
|
|
698
|
+
* access setting is updated to restricted. Warning: mutually exclusive with
|
|
699
|
+
* all other field paths.)
|
|
700
|
+
* @param {object} [options]
|
|
701
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
702
|
+
* @returns {Promise} - The promise which resolves to an array.
|
|
703
|
+
* The first element of the array is an object representing {@link protos.google.chat.v1.Space|Space}.
|
|
704
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
|
|
705
|
+
* for more details and examples.
|
|
706
|
+
* @example <caption>include:samples/generated/v1/chat_service.update_space.js</caption>
|
|
707
|
+
* region_tag:chat_v1_generated_ChatService_UpdateSpace_async
|
|
708
|
+
*/
|
|
709
|
+
updateSpace(request?: protos.google.chat.v1.IUpdateSpaceRequest, options?: CallOptions): Promise<[
|
|
710
|
+
protos.google.chat.v1.ISpace,
|
|
711
|
+
protos.google.chat.v1.IUpdateSpaceRequest | undefined,
|
|
712
|
+
{} | undefined
|
|
713
|
+
]>;
|
|
714
|
+
updateSpace(request: protos.google.chat.v1.IUpdateSpaceRequest, options: CallOptions, callback: Callback<protos.google.chat.v1.ISpace, protos.google.chat.v1.IUpdateSpaceRequest | null | undefined, {} | null | undefined>): void;
|
|
715
|
+
updateSpace(request: protos.google.chat.v1.IUpdateSpaceRequest, callback: Callback<protos.google.chat.v1.ISpace, protos.google.chat.v1.IUpdateSpaceRequest | null | undefined, {} | null | undefined>): void;
|
|
716
|
+
/**
|
|
717
|
+
* Deletes a named space. Always performs a cascading delete, which means
|
|
718
|
+
* that the space's child resources—like messages posted in the space and
|
|
719
|
+
* memberships in the space—are also deleted. For an example, see
|
|
720
|
+
* [Delete a
|
|
721
|
+
* space](https://developers.google.com/chat/api/guides/v1/spaces/delete).
|
|
722
|
+
* Requires [user
|
|
723
|
+
* authentication](https://developers.google.com/chat/api/guides/auth/users)
|
|
724
|
+
* from a user who has permission to delete the space.
|
|
725
|
+
*
|
|
726
|
+
* @param {Object} request
|
|
727
|
+
* The request object that will be sent.
|
|
728
|
+
* @param {string} request.name
|
|
729
|
+
* Required. Resource name of the space to delete.
|
|
730
|
+
*
|
|
731
|
+
* Format: `spaces/{space}`
|
|
732
|
+
* @param {object} [options]
|
|
733
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
734
|
+
* @returns {Promise} - The promise which resolves to an array.
|
|
735
|
+
* The first element of the array is an object representing {@link protos.google.protobuf.Empty|Empty}.
|
|
736
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
|
|
737
|
+
* for more details and examples.
|
|
738
|
+
* @example <caption>include:samples/generated/v1/chat_service.delete_space.js</caption>
|
|
739
|
+
* region_tag:chat_v1_generated_ChatService_DeleteSpace_async
|
|
740
|
+
*/
|
|
741
|
+
deleteSpace(request?: protos.google.chat.v1.IDeleteSpaceRequest, options?: CallOptions): Promise<[
|
|
742
|
+
protos.google.protobuf.IEmpty,
|
|
743
|
+
protos.google.chat.v1.IDeleteSpaceRequest | undefined,
|
|
744
|
+
{} | undefined
|
|
745
|
+
]>;
|
|
746
|
+
deleteSpace(request: protos.google.chat.v1.IDeleteSpaceRequest, options: CallOptions, callback: Callback<protos.google.protobuf.IEmpty, protos.google.chat.v1.IDeleteSpaceRequest | null | undefined, {} | null | undefined>): void;
|
|
747
|
+
deleteSpace(request: protos.google.chat.v1.IDeleteSpaceRequest, callback: Callback<protos.google.protobuf.IEmpty, protos.google.chat.v1.IDeleteSpaceRequest | null | undefined, {} | null | undefined>): void;
|
|
748
|
+
/**
|
|
749
|
+
* Completes the
|
|
750
|
+
* [import process](https://developers.google.com/chat/api/guides/import-data)
|
|
751
|
+
* for the specified space and makes it visible to users.
|
|
752
|
+
* Requires app authentication and domain-wide delegation. For more
|
|
753
|
+
* information, see [Authorize Google Chat apps to import
|
|
754
|
+
* data](https://developers.google.com/chat/api/guides/authorize-import).
|
|
755
|
+
*
|
|
756
|
+
* @param {Object} request
|
|
757
|
+
* The request object that will be sent.
|
|
758
|
+
* @param {string} request.name
|
|
759
|
+
* Required. Resource name of the import mode space.
|
|
760
|
+
*
|
|
761
|
+
* Format: `spaces/{space}`
|
|
762
|
+
* @param {object} [options]
|
|
763
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
764
|
+
* @returns {Promise} - The promise which resolves to an array.
|
|
765
|
+
* The first element of the array is an object representing {@link protos.google.chat.v1.CompleteImportSpaceResponse|CompleteImportSpaceResponse}.
|
|
766
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
|
|
767
|
+
* for more details and examples.
|
|
768
|
+
* @example <caption>include:samples/generated/v1/chat_service.complete_import_space.js</caption>
|
|
769
|
+
* region_tag:chat_v1_generated_ChatService_CompleteImportSpace_async
|
|
770
|
+
*/
|
|
771
|
+
completeImportSpace(request?: protos.google.chat.v1.ICompleteImportSpaceRequest, options?: CallOptions): Promise<[
|
|
772
|
+
protos.google.chat.v1.ICompleteImportSpaceResponse,
|
|
773
|
+
protos.google.chat.v1.ICompleteImportSpaceRequest | undefined,
|
|
774
|
+
{} | undefined
|
|
775
|
+
]>;
|
|
776
|
+
completeImportSpace(request: protos.google.chat.v1.ICompleteImportSpaceRequest, options: CallOptions, callback: Callback<protos.google.chat.v1.ICompleteImportSpaceResponse, protos.google.chat.v1.ICompleteImportSpaceRequest | null | undefined, {} | null | undefined>): void;
|
|
777
|
+
completeImportSpace(request: protos.google.chat.v1.ICompleteImportSpaceRequest, callback: Callback<protos.google.chat.v1.ICompleteImportSpaceResponse, protos.google.chat.v1.ICompleteImportSpaceRequest | null | undefined, {} | null | undefined>): void;
|
|
778
|
+
/**
|
|
779
|
+
* Returns the existing direct message with the specified user. If no direct
|
|
780
|
+
* message space is found, returns a `404 NOT_FOUND` error. For an example,
|
|
781
|
+
* see
|
|
782
|
+
* [Find a direct message](/chat/api/guides/v1/spaces/find-direct-message).
|
|
783
|
+
*
|
|
784
|
+
* With [user
|
|
785
|
+
* authentication](https://developers.google.com/chat/api/guides/auth/users),
|
|
786
|
+
* returns the direct message space between the specified user and the
|
|
787
|
+
* authenticated user.
|
|
788
|
+
*
|
|
789
|
+
* With [app
|
|
790
|
+
* authentication](https://developers.google.com/chat/api/guides/auth/service-accounts),
|
|
791
|
+
* returns the direct message space between the specified user and the calling
|
|
792
|
+
* Chat app.
|
|
793
|
+
*
|
|
794
|
+
* Requires [user
|
|
795
|
+
* authentication](https://developers.google.com/chat/api/guides/auth/users)
|
|
796
|
+
* or [app
|
|
797
|
+
* authentication](https://developers.google.com/chat/api/guides/auth/service-accounts).
|
|
798
|
+
*
|
|
799
|
+
* @param {Object} request
|
|
800
|
+
* The request object that will be sent.
|
|
801
|
+
* @param {string} request.name
|
|
802
|
+
* Required. Resource name of the user to find direct message with.
|
|
803
|
+
*
|
|
804
|
+
* Format: `users/{user}`, where `{user}` is either the `id` for the
|
|
805
|
+
* [person](https://developers.google.com/people/api/rest/v1/people) from the
|
|
806
|
+
* People API, or the `id` for the
|
|
807
|
+
* [user](https://developers.google.com/admin-sdk/directory/reference/rest/v1/users)
|
|
808
|
+
* in the Directory API. For example, if the People API profile ID is
|
|
809
|
+
* `123456789`, you can find a direct message with that person by using
|
|
810
|
+
* `users/123456789` as the `name`. When [authenticated as a
|
|
811
|
+
* user](https://developers.google.com/chat/api/guides/auth/users), you can
|
|
812
|
+
* use the email as an alias for `{user}`. For example,
|
|
813
|
+
* `users/example@gmail.com` where `example@gmail.com` is the email of the
|
|
814
|
+
* Google Chat user.
|
|
815
|
+
* @param {object} [options]
|
|
816
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
817
|
+
* @returns {Promise} - The promise which resolves to an array.
|
|
818
|
+
* The first element of the array is an object representing {@link protos.google.chat.v1.Space|Space}.
|
|
819
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
|
|
820
|
+
* for more details and examples.
|
|
821
|
+
* @example <caption>include:samples/generated/v1/chat_service.find_direct_message.js</caption>
|
|
822
|
+
* region_tag:chat_v1_generated_ChatService_FindDirectMessage_async
|
|
823
|
+
*/
|
|
824
|
+
findDirectMessage(request?: protos.google.chat.v1.IFindDirectMessageRequest, options?: CallOptions): Promise<[
|
|
825
|
+
protos.google.chat.v1.ISpace,
|
|
826
|
+
protos.google.chat.v1.IFindDirectMessageRequest | undefined,
|
|
827
|
+
{} | undefined
|
|
828
|
+
]>;
|
|
829
|
+
findDirectMessage(request: protos.google.chat.v1.IFindDirectMessageRequest, options: CallOptions, callback: Callback<protos.google.chat.v1.ISpace, protos.google.chat.v1.IFindDirectMessageRequest | null | undefined, {} | null | undefined>): void;
|
|
830
|
+
findDirectMessage(request: protos.google.chat.v1.IFindDirectMessageRequest, callback: Callback<protos.google.chat.v1.ISpace, protos.google.chat.v1.IFindDirectMessageRequest | null | undefined, {} | null | undefined>): void;
|
|
831
|
+
/**
|
|
832
|
+
* Creates a human membership or app membership for the calling app. Creating
|
|
833
|
+
* memberships for other apps isn't supported. For an example, see
|
|
834
|
+
* [ Create a
|
|
835
|
+
* membership](https://developers.google.com/chat/api/guides/v1/members/create).
|
|
836
|
+
* When creating a membership, if the specified member has their auto-accept
|
|
837
|
+
* policy turned off, then they're invited, and must accept the space
|
|
838
|
+
* invitation before joining. Otherwise, creating a membership adds the member
|
|
839
|
+
* directly to the specified space. Requires [user
|
|
840
|
+
* authentication](https://developers.google.com/chat/api/guides/auth/users).
|
|
841
|
+
*
|
|
842
|
+
* To specify the member to add, set the `membership.member.name` in the
|
|
843
|
+
* `CreateMembershipRequest`:
|
|
844
|
+
*
|
|
845
|
+
* - To add the calling app to a space or a direct message between two human
|
|
846
|
+
* users, use `users/app`. Unable to add other
|
|
847
|
+
* apps to the space.
|
|
848
|
+
*
|
|
849
|
+
* - To add a human user, use `users/{user}`, where `{user}` can be the email
|
|
850
|
+
* address for the user. For users in the same Workspace organization `{user}`
|
|
851
|
+
* can also be the `id` for the person from the People API, or the `id` for
|
|
852
|
+
* the user in the Directory API. For example, if the People API Person
|
|
853
|
+
* profile ID for `user@example.com` is `123456789`, you can add the user to
|
|
854
|
+
* the space by setting the `membership.member.name` to
|
|
855
|
+
* `users/user@example.com` or `users/123456789`.
|
|
856
|
+
*
|
|
857
|
+
* @param {Object} request
|
|
858
|
+
* The request object that will be sent.
|
|
859
|
+
* @param {string} request.parent
|
|
860
|
+
* Required. The resource name of the space for which to create the
|
|
861
|
+
* membership.
|
|
862
|
+
*
|
|
863
|
+
* Format: spaces/{space}
|
|
864
|
+
* @param {google.chat.v1.Membership} request.membership
|
|
865
|
+
* Required. The membership relation to create.
|
|
866
|
+
* The `memberType` field must contain a user with the `user.name` and
|
|
867
|
+
* `user.type` fields populated. The server will assign a resource name
|
|
868
|
+
* and overwrite anything specified.
|
|
869
|
+
* When a Chat app creates a membership relation for a human user, it must use
|
|
870
|
+
* the `chat.memberships` scope, set `user.type` to `HUMAN`, and set
|
|
871
|
+
* `user.name` with format `users/{user}`, where `{user}` can be the email
|
|
872
|
+
* address for the user. For users in the same Workspace organization `{user}`
|
|
873
|
+
* can also be the `id` of the
|
|
874
|
+
* [person](https://developers.google.com/people/api/rest/v1/people) from the
|
|
875
|
+
* People API, or the `id` for the user in the Directory API. For example, if
|
|
876
|
+
* the People API Person profile ID for `user@example.com` is `123456789`, you
|
|
877
|
+
* can add the user to the space by setting the `membership.member.name` to
|
|
878
|
+
* `users/user@example.com` or `users/123456789`. When a Chat app creates a
|
|
879
|
+
* membership relation for itself, it must use the `chat.memberships.app`
|
|
880
|
+
* scope, set `user.type` to `BOT`, and set `user.name` to `users/app`.
|
|
881
|
+
* @param {object} [options]
|
|
882
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
883
|
+
* @returns {Promise} - The promise which resolves to an array.
|
|
884
|
+
* The first element of the array is an object representing {@link protos.google.chat.v1.Membership|Membership}.
|
|
885
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
|
|
886
|
+
* for more details and examples.
|
|
887
|
+
* @example <caption>include:samples/generated/v1/chat_service.create_membership.js</caption>
|
|
888
|
+
* region_tag:chat_v1_generated_ChatService_CreateMembership_async
|
|
889
|
+
*/
|
|
890
|
+
createMembership(request?: protos.google.chat.v1.ICreateMembershipRequest, options?: CallOptions): Promise<[
|
|
891
|
+
protos.google.chat.v1.IMembership,
|
|
892
|
+
protos.google.chat.v1.ICreateMembershipRequest | undefined,
|
|
893
|
+
{} | undefined
|
|
894
|
+
]>;
|
|
895
|
+
createMembership(request: protos.google.chat.v1.ICreateMembershipRequest, options: CallOptions, callback: Callback<protos.google.chat.v1.IMembership, protos.google.chat.v1.ICreateMembershipRequest | null | undefined, {} | null | undefined>): void;
|
|
896
|
+
createMembership(request: protos.google.chat.v1.ICreateMembershipRequest, callback: Callback<protos.google.chat.v1.IMembership, protos.google.chat.v1.ICreateMembershipRequest | null | undefined, {} | null | undefined>): void;
|
|
897
|
+
/**
|
|
898
|
+
* Deletes a membership. For an example, see
|
|
899
|
+
* [Delete a
|
|
900
|
+
* membership](https://developers.google.com/chat/api/guides/v1/members/delete).
|
|
901
|
+
*
|
|
902
|
+
* Requires [user
|
|
903
|
+
* authentication](https://developers.google.com/chat/api/guides/auth/users).
|
|
904
|
+
*
|
|
905
|
+
* @param {Object} request
|
|
906
|
+
* The request object that will be sent.
|
|
907
|
+
* @param {string} request.name
|
|
908
|
+
* Required. Resource name of the membership to delete. Chat apps can delete
|
|
909
|
+
* human users' or their own memberships. Chat apps can't delete other apps'
|
|
910
|
+
* memberships.
|
|
911
|
+
*
|
|
912
|
+
* When deleting a human membership, requires the `chat.memberships` scope and
|
|
913
|
+
* `spaces/{space}/members/{member}` format. You can use the email as an
|
|
914
|
+
* alias for `{member}`. For example,
|
|
915
|
+
* `spaces/{space}/members/example@gmail.com` where `example@gmail.com` is the
|
|
916
|
+
* email of the Google Chat user.
|
|
917
|
+
*
|
|
918
|
+
* When deleting an app membership, requires the `chat.memberships.app` scope
|
|
919
|
+
* and `spaces/{space}/members/app` format.
|
|
920
|
+
*
|
|
921
|
+
* Format: `spaces/{space}/members/{member}` or `spaces/{space}/members/app`.
|
|
922
|
+
* @param {object} [options]
|
|
923
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
924
|
+
* @returns {Promise} - The promise which resolves to an array.
|
|
925
|
+
* The first element of the array is an object representing {@link protos.google.chat.v1.Membership|Membership}.
|
|
926
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
|
|
927
|
+
* for more details and examples.
|
|
928
|
+
* @example <caption>include:samples/generated/v1/chat_service.delete_membership.js</caption>
|
|
929
|
+
* region_tag:chat_v1_generated_ChatService_DeleteMembership_async
|
|
930
|
+
*/
|
|
931
|
+
deleteMembership(request?: protos.google.chat.v1.IDeleteMembershipRequest, options?: CallOptions): Promise<[
|
|
932
|
+
protos.google.chat.v1.IMembership,
|
|
933
|
+
protos.google.chat.v1.IDeleteMembershipRequest | undefined,
|
|
934
|
+
{} | undefined
|
|
935
|
+
]>;
|
|
936
|
+
deleteMembership(request: protos.google.chat.v1.IDeleteMembershipRequest, options: CallOptions, callback: Callback<protos.google.chat.v1.IMembership, protos.google.chat.v1.IDeleteMembershipRequest | null | undefined, {} | null | undefined>): void;
|
|
937
|
+
deleteMembership(request: protos.google.chat.v1.IDeleteMembershipRequest, callback: Callback<protos.google.chat.v1.IMembership, protos.google.chat.v1.IDeleteMembershipRequest | null | undefined, {} | null | undefined>): void;
|
|
938
|
+
/**
|
|
939
|
+
* Creates a reaction and adds it to a message. For an example, see
|
|
940
|
+
* [Create a
|
|
941
|
+
* reaction](https://developers.google.com/chat/api/guides/v1/reactions/create).
|
|
942
|
+
* Requires [user
|
|
943
|
+
* authentication](https://developers.google.com/chat/api/guides/auth/users).
|
|
944
|
+
* Only unicode emoji are supported.
|
|
945
|
+
*
|
|
946
|
+
* @param {Object} request
|
|
947
|
+
* The request object that will be sent.
|
|
948
|
+
* @param {string} request.parent
|
|
949
|
+
* Required. The message where the reaction is created.
|
|
950
|
+
*
|
|
951
|
+
* Format: `spaces/{space}/messages/{message}`
|
|
952
|
+
* @param {google.chat.v1.Reaction} request.reaction
|
|
953
|
+
* Required. The reaction to create.
|
|
954
|
+
* @param {object} [options]
|
|
955
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
956
|
+
* @returns {Promise} - The promise which resolves to an array.
|
|
957
|
+
* The first element of the array is an object representing {@link protos.google.chat.v1.Reaction|Reaction}.
|
|
958
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
|
|
959
|
+
* for more details and examples.
|
|
960
|
+
* @example <caption>include:samples/generated/v1/chat_service.create_reaction.js</caption>
|
|
961
|
+
* region_tag:chat_v1_generated_ChatService_CreateReaction_async
|
|
962
|
+
*/
|
|
963
|
+
createReaction(request?: protos.google.chat.v1.ICreateReactionRequest, options?: CallOptions): Promise<[
|
|
964
|
+
protos.google.chat.v1.IReaction,
|
|
965
|
+
protos.google.chat.v1.ICreateReactionRequest | undefined,
|
|
966
|
+
{} | undefined
|
|
967
|
+
]>;
|
|
968
|
+
createReaction(request: protos.google.chat.v1.ICreateReactionRequest, options: CallOptions, callback: Callback<protos.google.chat.v1.IReaction, protos.google.chat.v1.ICreateReactionRequest | null | undefined, {} | null | undefined>): void;
|
|
969
|
+
createReaction(request: protos.google.chat.v1.ICreateReactionRequest, callback: Callback<protos.google.chat.v1.IReaction, protos.google.chat.v1.ICreateReactionRequest | null | undefined, {} | null | undefined>): void;
|
|
970
|
+
/**
|
|
971
|
+
* Deletes a reaction to a message. For an example, see
|
|
972
|
+
* [Delete a
|
|
973
|
+
* reaction](https://developers.google.com/chat/api/guides/v1/reactions/delete).
|
|
974
|
+
* Requires [user
|
|
975
|
+
* authentication](https://developers.google.com/chat/api/guides/auth/users).
|
|
976
|
+
*
|
|
977
|
+
* @param {Object} request
|
|
978
|
+
* The request object that will be sent.
|
|
979
|
+
* @param {string} request.name
|
|
980
|
+
* Required. Name of the reaction to delete.
|
|
981
|
+
*
|
|
982
|
+
* Format: `spaces/{space}/messages/{message}/reactions/{reaction}`
|
|
983
|
+
* @param {object} [options]
|
|
984
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
985
|
+
* @returns {Promise} - The promise which resolves to an array.
|
|
986
|
+
* The first element of the array is an object representing {@link protos.google.protobuf.Empty|Empty}.
|
|
987
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
|
|
988
|
+
* for more details and examples.
|
|
989
|
+
* @example <caption>include:samples/generated/v1/chat_service.delete_reaction.js</caption>
|
|
990
|
+
* region_tag:chat_v1_generated_ChatService_DeleteReaction_async
|
|
991
|
+
*/
|
|
992
|
+
deleteReaction(request?: protos.google.chat.v1.IDeleteReactionRequest, options?: CallOptions): Promise<[
|
|
993
|
+
protos.google.protobuf.IEmpty,
|
|
994
|
+
protos.google.chat.v1.IDeleteReactionRequest | undefined,
|
|
995
|
+
{} | undefined
|
|
996
|
+
]>;
|
|
997
|
+
deleteReaction(request: protos.google.chat.v1.IDeleteReactionRequest, options: CallOptions, callback: Callback<protos.google.protobuf.IEmpty, protos.google.chat.v1.IDeleteReactionRequest | null | undefined, {} | null | undefined>): void;
|
|
998
|
+
deleteReaction(request: protos.google.chat.v1.IDeleteReactionRequest, callback: Callback<protos.google.protobuf.IEmpty, protos.google.chat.v1.IDeleteReactionRequest | null | undefined, {} | null | undefined>): void;
|
|
999
|
+
/**
|
|
1000
|
+
* Lists messages in a space that the caller is a member of, including
|
|
1001
|
+
* messages from blocked members and spaces. For an example, see
|
|
1002
|
+
* [List messages](/chat/api/guides/v1/messages/list).
|
|
1003
|
+
* Requires [user
|
|
1004
|
+
* authentication](https://developers.google.com/chat/api/guides/auth/users).
|
|
1005
|
+
*
|
|
1006
|
+
* @param {Object} request
|
|
1007
|
+
* The request object that will be sent.
|
|
1008
|
+
* @param {string} request.parent
|
|
1009
|
+
* Required. The resource name of the space to list messages from.
|
|
1010
|
+
*
|
|
1011
|
+
* Format: `spaces/{space}`
|
|
1012
|
+
* @param {number} request.pageSize
|
|
1013
|
+
* The maximum number of messages returned. The service might return fewer
|
|
1014
|
+
* messages than this value.
|
|
1015
|
+
*
|
|
1016
|
+
* If unspecified, at most 25 are returned.
|
|
1017
|
+
*
|
|
1018
|
+
* The maximum value is 1,000. If you use a value more than 1,000, it's
|
|
1019
|
+
* automatically changed to 1,000.
|
|
1020
|
+
*
|
|
1021
|
+
* Negative values return an `INVALID_ARGUMENT` error.
|
|
1022
|
+
* @param {string} request.pageToken
|
|
1023
|
+
* Optional, if resuming from a previous query.
|
|
1024
|
+
*
|
|
1025
|
+
* A page token received from a previous list messages call. Provide this
|
|
1026
|
+
* parameter to retrieve the subsequent page.
|
|
1027
|
+
*
|
|
1028
|
+
* When paginating, all other parameters provided should match the call that
|
|
1029
|
+
* provided the page token. Passing different values to the other parameters
|
|
1030
|
+
* might lead to unexpected results.
|
|
1031
|
+
* @param {string} request.filter
|
|
1032
|
+
* A query filter.
|
|
1033
|
+
*
|
|
1034
|
+
* You can filter messages by date (`create_time`) and thread (`thread.name`).
|
|
1035
|
+
*
|
|
1036
|
+
* To filter messages by the date they were created, specify the `create_time`
|
|
1037
|
+
* with a timestamp in [RFC-3339](https://www.rfc-editor.org/rfc/rfc3339)
|
|
1038
|
+
* format and double quotation marks. For example,
|
|
1039
|
+
* `"2023-04-21T11:30:00-04:00"`. You can use the greater than operator `>` to
|
|
1040
|
+
* list messages that were created after a timestamp, or the less than
|
|
1041
|
+
* operator `<` to list messages that were created before a timestamp. To
|
|
1042
|
+
* filter messages within a time interval, use the `AND` operator between two
|
|
1043
|
+
* timestamps.
|
|
1044
|
+
*
|
|
1045
|
+
* To filter by thread, specify the `thread.name`, formatted as
|
|
1046
|
+
* `spaces/{space}/threads/{thread}`. You can only specify one
|
|
1047
|
+
* `thread.name` per query.
|
|
1048
|
+
*
|
|
1049
|
+
* To filter by both thread and date, use the `AND` operator in your query.
|
|
1050
|
+
*
|
|
1051
|
+
* For example, the following queries are valid:
|
|
1052
|
+
*
|
|
1053
|
+
* ```
|
|
1054
|
+
* create_time > "2012-04-21T11:30:00-04:00"
|
|
1055
|
+
*
|
|
1056
|
+
* create_time > "2012-04-21T11:30:00-04:00" AND
|
|
1057
|
+
* thread.name = spaces/AAAAAAAAAAA/threads/123
|
|
1058
|
+
*
|
|
1059
|
+
* create_time > "2012-04-21T11:30:00+00:00" AND
|
|
1060
|
+
*
|
|
1061
|
+
* create_time < "2013-01-01T00:00:00+00:00" AND
|
|
1062
|
+
* thread.name = spaces/AAAAAAAAAAA/threads/123
|
|
1063
|
+
*
|
|
1064
|
+
* thread.name = spaces/AAAAAAAAAAA/threads/123
|
|
1065
|
+
* ```
|
|
1066
|
+
*
|
|
1067
|
+
* Invalid queries are rejected by the server with an `INVALID_ARGUMENT`
|
|
1068
|
+
* error.
|
|
1069
|
+
* @param {string} request.orderBy
|
|
1070
|
+
* Optional, if resuming from a previous query.
|
|
1071
|
+
*
|
|
1072
|
+
* How the list of messages is ordered. Specify a value to order by an
|
|
1073
|
+
* ordering operation. Valid ordering operation values are as follows:
|
|
1074
|
+
*
|
|
1075
|
+
* - `ASC` for ascending.
|
|
1076
|
+
*
|
|
1077
|
+
* - `DESC` for descending.
|
|
1078
|
+
*
|
|
1079
|
+
* The default ordering is `create_time ASC`.
|
|
1080
|
+
* @param {boolean} request.showDeleted
|
|
1081
|
+
* Whether to include deleted messages. Deleted messages include deleted time
|
|
1082
|
+
* and metadata about their deletion, but message content is unavailable.
|
|
1083
|
+
* @param {object} [options]
|
|
1084
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
1085
|
+
* @returns {Promise} - The promise which resolves to an array.
|
|
1086
|
+
* The first element of the array is Array of {@link protos.google.chat.v1.Message|Message}.
|
|
1087
|
+
* The client library will perform auto-pagination by default: it will call the API as many
|
|
1088
|
+
* times as needed and will merge results from all the pages into this array.
|
|
1089
|
+
* Note that it can affect your quota.
|
|
1090
|
+
* We recommend using `listMessagesAsync()`
|
|
1091
|
+
* method described below for async iteration which you can stop as needed.
|
|
1092
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
|
|
1093
|
+
* for more details and examples.
|
|
1094
|
+
*/
|
|
1095
|
+
listMessages(request?: protos.google.chat.v1.IListMessagesRequest, options?: CallOptions): Promise<[
|
|
1096
|
+
protos.google.chat.v1.IMessage[],
|
|
1097
|
+
protos.google.chat.v1.IListMessagesRequest | null,
|
|
1098
|
+
protos.google.chat.v1.IListMessagesResponse
|
|
1099
|
+
]>;
|
|
1100
|
+
listMessages(request: protos.google.chat.v1.IListMessagesRequest, options: CallOptions, callback: PaginationCallback<protos.google.chat.v1.IListMessagesRequest, protos.google.chat.v1.IListMessagesResponse | null | undefined, protos.google.chat.v1.IMessage>): void;
|
|
1101
|
+
listMessages(request: protos.google.chat.v1.IListMessagesRequest, callback: PaginationCallback<protos.google.chat.v1.IListMessagesRequest, protos.google.chat.v1.IListMessagesResponse | null | undefined, protos.google.chat.v1.IMessage>): void;
|
|
1102
|
+
/**
|
|
1103
|
+
* Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object.
|
|
1104
|
+
* @param {Object} request
|
|
1105
|
+
* The request object that will be sent.
|
|
1106
|
+
* @param {string} request.parent
|
|
1107
|
+
* Required. The resource name of the space to list messages from.
|
|
1108
|
+
*
|
|
1109
|
+
* Format: `spaces/{space}`
|
|
1110
|
+
* @param {number} request.pageSize
|
|
1111
|
+
* The maximum number of messages returned. The service might return fewer
|
|
1112
|
+
* messages than this value.
|
|
1113
|
+
*
|
|
1114
|
+
* If unspecified, at most 25 are returned.
|
|
1115
|
+
*
|
|
1116
|
+
* The maximum value is 1,000. If you use a value more than 1,000, it's
|
|
1117
|
+
* automatically changed to 1,000.
|
|
1118
|
+
*
|
|
1119
|
+
* Negative values return an `INVALID_ARGUMENT` error.
|
|
1120
|
+
* @param {string} request.pageToken
|
|
1121
|
+
* Optional, if resuming from a previous query.
|
|
1122
|
+
*
|
|
1123
|
+
* A page token received from a previous list messages call. Provide this
|
|
1124
|
+
* parameter to retrieve the subsequent page.
|
|
1125
|
+
*
|
|
1126
|
+
* When paginating, all other parameters provided should match the call that
|
|
1127
|
+
* provided the page token. Passing different values to the other parameters
|
|
1128
|
+
* might lead to unexpected results.
|
|
1129
|
+
* @param {string} request.filter
|
|
1130
|
+
* A query filter.
|
|
1131
|
+
*
|
|
1132
|
+
* You can filter messages by date (`create_time`) and thread (`thread.name`).
|
|
1133
|
+
*
|
|
1134
|
+
* To filter messages by the date they were created, specify the `create_time`
|
|
1135
|
+
* with a timestamp in [RFC-3339](https://www.rfc-editor.org/rfc/rfc3339)
|
|
1136
|
+
* format and double quotation marks. For example,
|
|
1137
|
+
* `"2023-04-21T11:30:00-04:00"`. You can use the greater than operator `>` to
|
|
1138
|
+
* list messages that were created after a timestamp, or the less than
|
|
1139
|
+
* operator `<` to list messages that were created before a timestamp. To
|
|
1140
|
+
* filter messages within a time interval, use the `AND` operator between two
|
|
1141
|
+
* timestamps.
|
|
1142
|
+
*
|
|
1143
|
+
* To filter by thread, specify the `thread.name`, formatted as
|
|
1144
|
+
* `spaces/{space}/threads/{thread}`. You can only specify one
|
|
1145
|
+
* `thread.name` per query.
|
|
1146
|
+
*
|
|
1147
|
+
* To filter by both thread and date, use the `AND` operator in your query.
|
|
1148
|
+
*
|
|
1149
|
+
* For example, the following queries are valid:
|
|
1150
|
+
*
|
|
1151
|
+
* ```
|
|
1152
|
+
* create_time > "2012-04-21T11:30:00-04:00"
|
|
1153
|
+
*
|
|
1154
|
+
* create_time > "2012-04-21T11:30:00-04:00" AND
|
|
1155
|
+
* thread.name = spaces/AAAAAAAAAAA/threads/123
|
|
1156
|
+
*
|
|
1157
|
+
* create_time > "2012-04-21T11:30:00+00:00" AND
|
|
1158
|
+
*
|
|
1159
|
+
* create_time < "2013-01-01T00:00:00+00:00" AND
|
|
1160
|
+
* thread.name = spaces/AAAAAAAAAAA/threads/123
|
|
1161
|
+
*
|
|
1162
|
+
* thread.name = spaces/AAAAAAAAAAA/threads/123
|
|
1163
|
+
* ```
|
|
1164
|
+
*
|
|
1165
|
+
* Invalid queries are rejected by the server with an `INVALID_ARGUMENT`
|
|
1166
|
+
* error.
|
|
1167
|
+
* @param {string} request.orderBy
|
|
1168
|
+
* Optional, if resuming from a previous query.
|
|
1169
|
+
*
|
|
1170
|
+
* How the list of messages is ordered. Specify a value to order by an
|
|
1171
|
+
* ordering operation. Valid ordering operation values are as follows:
|
|
1172
|
+
*
|
|
1173
|
+
* - `ASC` for ascending.
|
|
1174
|
+
*
|
|
1175
|
+
* - `DESC` for descending.
|
|
1176
|
+
*
|
|
1177
|
+
* The default ordering is `create_time ASC`.
|
|
1178
|
+
* @param {boolean} request.showDeleted
|
|
1179
|
+
* Whether to include deleted messages. Deleted messages include deleted time
|
|
1180
|
+
* and metadata about their deletion, but message content is unavailable.
|
|
1181
|
+
* @param {object} [options]
|
|
1182
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
1183
|
+
* @returns {Stream}
|
|
1184
|
+
* An object stream which emits an object representing {@link protos.google.chat.v1.Message|Message} on 'data' event.
|
|
1185
|
+
* The client library will perform auto-pagination by default: it will call the API as many
|
|
1186
|
+
* times as needed. Note that it can affect your quota.
|
|
1187
|
+
* We recommend using `listMessagesAsync()`
|
|
1188
|
+
* method described below for async iteration which you can stop as needed.
|
|
1189
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
|
|
1190
|
+
* for more details and examples.
|
|
1191
|
+
*/
|
|
1192
|
+
listMessagesStream(request?: protos.google.chat.v1.IListMessagesRequest, options?: CallOptions): Transform;
|
|
1193
|
+
/**
|
|
1194
|
+
* Equivalent to `listMessages`, but returns an iterable object.
|
|
1195
|
+
*
|
|
1196
|
+
* `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
|
|
1197
|
+
* @param {Object} request
|
|
1198
|
+
* The request object that will be sent.
|
|
1199
|
+
* @param {string} request.parent
|
|
1200
|
+
* Required. The resource name of the space to list messages from.
|
|
1201
|
+
*
|
|
1202
|
+
* Format: `spaces/{space}`
|
|
1203
|
+
* @param {number} request.pageSize
|
|
1204
|
+
* The maximum number of messages returned. The service might return fewer
|
|
1205
|
+
* messages than this value.
|
|
1206
|
+
*
|
|
1207
|
+
* If unspecified, at most 25 are returned.
|
|
1208
|
+
*
|
|
1209
|
+
* The maximum value is 1,000. If you use a value more than 1,000, it's
|
|
1210
|
+
* automatically changed to 1,000.
|
|
1211
|
+
*
|
|
1212
|
+
* Negative values return an `INVALID_ARGUMENT` error.
|
|
1213
|
+
* @param {string} request.pageToken
|
|
1214
|
+
* Optional, if resuming from a previous query.
|
|
1215
|
+
*
|
|
1216
|
+
* A page token received from a previous list messages call. Provide this
|
|
1217
|
+
* parameter to retrieve the subsequent page.
|
|
1218
|
+
*
|
|
1219
|
+
* When paginating, all other parameters provided should match the call that
|
|
1220
|
+
* provided the page token. Passing different values to the other parameters
|
|
1221
|
+
* might lead to unexpected results.
|
|
1222
|
+
* @param {string} request.filter
|
|
1223
|
+
* A query filter.
|
|
1224
|
+
*
|
|
1225
|
+
* You can filter messages by date (`create_time`) and thread (`thread.name`).
|
|
1226
|
+
*
|
|
1227
|
+
* To filter messages by the date they were created, specify the `create_time`
|
|
1228
|
+
* with a timestamp in [RFC-3339](https://www.rfc-editor.org/rfc/rfc3339)
|
|
1229
|
+
* format and double quotation marks. For example,
|
|
1230
|
+
* `"2023-04-21T11:30:00-04:00"`. You can use the greater than operator `>` to
|
|
1231
|
+
* list messages that were created after a timestamp, or the less than
|
|
1232
|
+
* operator `<` to list messages that were created before a timestamp. To
|
|
1233
|
+
* filter messages within a time interval, use the `AND` operator between two
|
|
1234
|
+
* timestamps.
|
|
1235
|
+
*
|
|
1236
|
+
* To filter by thread, specify the `thread.name`, formatted as
|
|
1237
|
+
* `spaces/{space}/threads/{thread}`. You can only specify one
|
|
1238
|
+
* `thread.name` per query.
|
|
1239
|
+
*
|
|
1240
|
+
* To filter by both thread and date, use the `AND` operator in your query.
|
|
1241
|
+
*
|
|
1242
|
+
* For example, the following queries are valid:
|
|
1243
|
+
*
|
|
1244
|
+
* ```
|
|
1245
|
+
* create_time > "2012-04-21T11:30:00-04:00"
|
|
1246
|
+
*
|
|
1247
|
+
* create_time > "2012-04-21T11:30:00-04:00" AND
|
|
1248
|
+
* thread.name = spaces/AAAAAAAAAAA/threads/123
|
|
1249
|
+
*
|
|
1250
|
+
* create_time > "2012-04-21T11:30:00+00:00" AND
|
|
1251
|
+
*
|
|
1252
|
+
* create_time < "2013-01-01T00:00:00+00:00" AND
|
|
1253
|
+
* thread.name = spaces/AAAAAAAAAAA/threads/123
|
|
1254
|
+
*
|
|
1255
|
+
* thread.name = spaces/AAAAAAAAAAA/threads/123
|
|
1256
|
+
* ```
|
|
1257
|
+
*
|
|
1258
|
+
* Invalid queries are rejected by the server with an `INVALID_ARGUMENT`
|
|
1259
|
+
* error.
|
|
1260
|
+
* @param {string} request.orderBy
|
|
1261
|
+
* Optional, if resuming from a previous query.
|
|
1262
|
+
*
|
|
1263
|
+
* How the list of messages is ordered. Specify a value to order by an
|
|
1264
|
+
* ordering operation. Valid ordering operation values are as follows:
|
|
1265
|
+
*
|
|
1266
|
+
* - `ASC` for ascending.
|
|
1267
|
+
*
|
|
1268
|
+
* - `DESC` for descending.
|
|
1269
|
+
*
|
|
1270
|
+
* The default ordering is `create_time ASC`.
|
|
1271
|
+
* @param {boolean} request.showDeleted
|
|
1272
|
+
* Whether to include deleted messages. Deleted messages include deleted time
|
|
1273
|
+
* and metadata about their deletion, but message content is unavailable.
|
|
1274
|
+
* @param {object} [options]
|
|
1275
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
1276
|
+
* @returns {Object}
|
|
1277
|
+
* An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
|
|
1278
|
+
* When you iterate the returned iterable, each element will be an object representing
|
|
1279
|
+
* {@link protos.google.chat.v1.Message|Message}. The API will be called under the hood as needed, once per the page,
|
|
1280
|
+
* so you can stop the iteration when you don't need more results.
|
|
1281
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
|
|
1282
|
+
* for more details and examples.
|
|
1283
|
+
* @example <caption>include:samples/generated/v1/chat_service.list_messages.js</caption>
|
|
1284
|
+
* region_tag:chat_v1_generated_ChatService_ListMessages_async
|
|
1285
|
+
*/
|
|
1286
|
+
listMessagesAsync(request?: protos.google.chat.v1.IListMessagesRequest, options?: CallOptions): AsyncIterable<protos.google.chat.v1.IMessage>;
|
|
1287
|
+
/**
|
|
1288
|
+
* Lists memberships in a space. For an example, see [List
|
|
1289
|
+
* memberships](https://developers.google.com/chat/api/guides/v1/members/list).
|
|
1290
|
+
* Listing memberships with
|
|
1291
|
+
* [app
|
|
1292
|
+
* authentication](https://developers.google.com/chat/api/guides/auth/service-accounts)
|
|
1293
|
+
* lists memberships in spaces that the Chat app has
|
|
1294
|
+
* access to, but excludes Chat app memberships,
|
|
1295
|
+
* including its own. Listing memberships with
|
|
1296
|
+
* [User
|
|
1297
|
+
* authentication](https://developers.google.com/chat/api/guides/auth/users)
|
|
1298
|
+
* lists memberships in spaces that the authenticated user has access to.
|
|
1299
|
+
*
|
|
1300
|
+
* Requires
|
|
1301
|
+
* [authentication](https://developers.google.com/chat/api/guides/auth).
|
|
1302
|
+
* Supports
|
|
1303
|
+
* [app
|
|
1304
|
+
* authentication](https://developers.google.com/chat/api/guides/auth/service-accounts)
|
|
1305
|
+
* and [user
|
|
1306
|
+
* authentication](https://developers.google.com/chat/api/guides/auth/users).
|
|
1307
|
+
*
|
|
1308
|
+
* @param {Object} request
|
|
1309
|
+
* The request object that will be sent.
|
|
1310
|
+
* @param {string} request.parent
|
|
1311
|
+
* Required. The resource name of the space for which to fetch a membership
|
|
1312
|
+
* list.
|
|
1313
|
+
*
|
|
1314
|
+
* Format: spaces/{space}
|
|
1315
|
+
* @param {number} [request.pageSize]
|
|
1316
|
+
* Optional. The maximum number of memberships to return. The service might
|
|
1317
|
+
* return fewer than this value.
|
|
1318
|
+
*
|
|
1319
|
+
* If unspecified, at most 100 memberships are returned.
|
|
1320
|
+
*
|
|
1321
|
+
* The maximum value is 1,000. If you use a value more than 1,000, it's
|
|
1322
|
+
* automatically changed to 1,000.
|
|
1323
|
+
*
|
|
1324
|
+
* Negative values return an `INVALID_ARGUMENT` error.
|
|
1325
|
+
* @param {string} [request.pageToken]
|
|
1326
|
+
* Optional. A page token, received from a previous call to list memberships.
|
|
1327
|
+
* Provide this parameter to retrieve the subsequent page.
|
|
1328
|
+
*
|
|
1329
|
+
* When paginating, all other parameters provided should match the call that
|
|
1330
|
+
* provided the page token. Passing different values to the other parameters
|
|
1331
|
+
* might lead to unexpected results.
|
|
1332
|
+
* @param {string} [request.filter]
|
|
1333
|
+
* Optional. A query filter.
|
|
1334
|
+
*
|
|
1335
|
+
* You can filter memberships by a member's role
|
|
1336
|
+
* ([`role`](https://developers.google.com/chat/api/reference/rest/v1/spaces.members#membershiprole))
|
|
1337
|
+
* and type
|
|
1338
|
+
* ([`member.type`](https://developers.google.com/chat/api/reference/rest/v1/User#type)).
|
|
1339
|
+
*
|
|
1340
|
+
* To filter by role, set `role` to `ROLE_MEMBER` or `ROLE_MANAGER`.
|
|
1341
|
+
*
|
|
1342
|
+
* To filter by type, set `member.type` to `HUMAN` or `BOT`.
|
|
1343
|
+
*
|
|
1344
|
+
* To filter by both role and type, use the `AND` operator. To filter by
|
|
1345
|
+
* either role or type, use the `OR` operator.
|
|
1346
|
+
*
|
|
1347
|
+
* For example, the following queries are valid:
|
|
1348
|
+
*
|
|
1349
|
+
* ```
|
|
1350
|
+
* role = "ROLE_MANAGER" OR role = "ROLE_MEMBER"
|
|
1351
|
+
* member.type = "HUMAN" AND role = "ROLE_MANAGER"
|
|
1352
|
+
* ```
|
|
1353
|
+
*
|
|
1354
|
+
* The following queries are invalid:
|
|
1355
|
+
*
|
|
1356
|
+
* ```
|
|
1357
|
+
* member.type = "HUMAN" AND member.type = "BOT"
|
|
1358
|
+
* role = "ROLE_MANAGER" AND role = "ROLE_MEMBER"
|
|
1359
|
+
* ```
|
|
1360
|
+
*
|
|
1361
|
+
* Invalid queries are rejected by the server with an `INVALID_ARGUMENT`
|
|
1362
|
+
* error.
|
|
1363
|
+
* @param {boolean} [request.showGroups]
|
|
1364
|
+
* Optional. When `true`, also returns memberships associated with a
|
|
1365
|
+
* {@link protos.google.chat.v1.Membership.group_member|Google Group}, in
|
|
1366
|
+
* addition to other types of memberships. If a
|
|
1367
|
+
* {@link protos.google.chat.v1.ListMembershipsRequest.filter|filter} is set,
|
|
1368
|
+
* {@link protos.google.chat.v1.Membership.group_member|Google Group}
|
|
1369
|
+
* memberships that don't match the filter criteria aren't returned.
|
|
1370
|
+
* @param {boolean} [request.showInvited]
|
|
1371
|
+
* Optional. When `true`, also returns memberships associated with
|
|
1372
|
+
* {@link protos.google.chat.v1.Membership.MembershipState.INVITED|invited} members, in
|
|
1373
|
+
* addition to other types of memberships. If a
|
|
1374
|
+
* filter is set,
|
|
1375
|
+
* {@link protos.google.chat.v1.Membership.MembershipState.INVITED|invited} memberships
|
|
1376
|
+
* that don't match the filter criteria aren't returned.
|
|
1377
|
+
*
|
|
1378
|
+
* Currently requires [user
|
|
1379
|
+
* authentication](https://developers.google.com/chat/api/guides/auth/users).
|
|
1380
|
+
* @param {object} [options]
|
|
1381
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
1382
|
+
* @returns {Promise} - The promise which resolves to an array.
|
|
1383
|
+
* The first element of the array is Array of {@link protos.google.chat.v1.Membership|Membership}.
|
|
1384
|
+
* The client library will perform auto-pagination by default: it will call the API as many
|
|
1385
|
+
* times as needed and will merge results from all the pages into this array.
|
|
1386
|
+
* Note that it can affect your quota.
|
|
1387
|
+
* We recommend using `listMembershipsAsync()`
|
|
1388
|
+
* method described below for async iteration which you can stop as needed.
|
|
1389
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
|
|
1390
|
+
* for more details and examples.
|
|
1391
|
+
*/
|
|
1392
|
+
listMemberships(request?: protos.google.chat.v1.IListMembershipsRequest, options?: CallOptions): Promise<[
|
|
1393
|
+
protos.google.chat.v1.IMembership[],
|
|
1394
|
+
protos.google.chat.v1.IListMembershipsRequest | null,
|
|
1395
|
+
protos.google.chat.v1.IListMembershipsResponse
|
|
1396
|
+
]>;
|
|
1397
|
+
listMemberships(request: protos.google.chat.v1.IListMembershipsRequest, options: CallOptions, callback: PaginationCallback<protos.google.chat.v1.IListMembershipsRequest, protos.google.chat.v1.IListMembershipsResponse | null | undefined, protos.google.chat.v1.IMembership>): void;
|
|
1398
|
+
listMemberships(request: protos.google.chat.v1.IListMembershipsRequest, callback: PaginationCallback<protos.google.chat.v1.IListMembershipsRequest, protos.google.chat.v1.IListMembershipsResponse | null | undefined, protos.google.chat.v1.IMembership>): void;
|
|
1399
|
+
/**
|
|
1400
|
+
* Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object.
|
|
1401
|
+
* @param {Object} request
|
|
1402
|
+
* The request object that will be sent.
|
|
1403
|
+
* @param {string} request.parent
|
|
1404
|
+
* Required. The resource name of the space for which to fetch a membership
|
|
1405
|
+
* list.
|
|
1406
|
+
*
|
|
1407
|
+
* Format: spaces/{space}
|
|
1408
|
+
* @param {number} [request.pageSize]
|
|
1409
|
+
* Optional. The maximum number of memberships to return. The service might
|
|
1410
|
+
* return fewer than this value.
|
|
1411
|
+
*
|
|
1412
|
+
* If unspecified, at most 100 memberships are returned.
|
|
1413
|
+
*
|
|
1414
|
+
* The maximum value is 1,000. If you use a value more than 1,000, it's
|
|
1415
|
+
* automatically changed to 1,000.
|
|
1416
|
+
*
|
|
1417
|
+
* Negative values return an `INVALID_ARGUMENT` error.
|
|
1418
|
+
* @param {string} [request.pageToken]
|
|
1419
|
+
* Optional. A page token, received from a previous call to list memberships.
|
|
1420
|
+
* Provide this parameter to retrieve the subsequent page.
|
|
1421
|
+
*
|
|
1422
|
+
* When paginating, all other parameters provided should match the call that
|
|
1423
|
+
* provided the page token. Passing different values to the other parameters
|
|
1424
|
+
* might lead to unexpected results.
|
|
1425
|
+
* @param {string} [request.filter]
|
|
1426
|
+
* Optional. A query filter.
|
|
1427
|
+
*
|
|
1428
|
+
* You can filter memberships by a member's role
|
|
1429
|
+
* ([`role`](https://developers.google.com/chat/api/reference/rest/v1/spaces.members#membershiprole))
|
|
1430
|
+
* and type
|
|
1431
|
+
* ([`member.type`](https://developers.google.com/chat/api/reference/rest/v1/User#type)).
|
|
1432
|
+
*
|
|
1433
|
+
* To filter by role, set `role` to `ROLE_MEMBER` or `ROLE_MANAGER`.
|
|
1434
|
+
*
|
|
1435
|
+
* To filter by type, set `member.type` to `HUMAN` or `BOT`.
|
|
1436
|
+
*
|
|
1437
|
+
* To filter by both role and type, use the `AND` operator. To filter by
|
|
1438
|
+
* either role or type, use the `OR` operator.
|
|
1439
|
+
*
|
|
1440
|
+
* For example, the following queries are valid:
|
|
1441
|
+
*
|
|
1442
|
+
* ```
|
|
1443
|
+
* role = "ROLE_MANAGER" OR role = "ROLE_MEMBER"
|
|
1444
|
+
* member.type = "HUMAN" AND role = "ROLE_MANAGER"
|
|
1445
|
+
* ```
|
|
1446
|
+
*
|
|
1447
|
+
* The following queries are invalid:
|
|
1448
|
+
*
|
|
1449
|
+
* ```
|
|
1450
|
+
* member.type = "HUMAN" AND member.type = "BOT"
|
|
1451
|
+
* role = "ROLE_MANAGER" AND role = "ROLE_MEMBER"
|
|
1452
|
+
* ```
|
|
1453
|
+
*
|
|
1454
|
+
* Invalid queries are rejected by the server with an `INVALID_ARGUMENT`
|
|
1455
|
+
* error.
|
|
1456
|
+
* @param {boolean} [request.showGroups]
|
|
1457
|
+
* Optional. When `true`, also returns memberships associated with a
|
|
1458
|
+
* {@link protos.google.chat.v1.Membership.group_member|Google Group}, in
|
|
1459
|
+
* addition to other types of memberships. If a
|
|
1460
|
+
* {@link protos.google.chat.v1.ListMembershipsRequest.filter|filter} is set,
|
|
1461
|
+
* {@link protos.google.chat.v1.Membership.group_member|Google Group}
|
|
1462
|
+
* memberships that don't match the filter criteria aren't returned.
|
|
1463
|
+
* @param {boolean} [request.showInvited]
|
|
1464
|
+
* Optional. When `true`, also returns memberships associated with
|
|
1465
|
+
* {@link protos.google.chat.v1.Membership.MembershipState.INVITED|invited} members, in
|
|
1466
|
+
* addition to other types of memberships. If a
|
|
1467
|
+
* filter is set,
|
|
1468
|
+
* {@link protos.google.chat.v1.Membership.MembershipState.INVITED|invited} memberships
|
|
1469
|
+
* that don't match the filter criteria aren't returned.
|
|
1470
|
+
*
|
|
1471
|
+
* Currently requires [user
|
|
1472
|
+
* authentication](https://developers.google.com/chat/api/guides/auth/users).
|
|
1473
|
+
* @param {object} [options]
|
|
1474
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
1475
|
+
* @returns {Stream}
|
|
1476
|
+
* An object stream which emits an object representing {@link protos.google.chat.v1.Membership|Membership} on 'data' event.
|
|
1477
|
+
* The client library will perform auto-pagination by default: it will call the API as many
|
|
1478
|
+
* times as needed. Note that it can affect your quota.
|
|
1479
|
+
* We recommend using `listMembershipsAsync()`
|
|
1480
|
+
* method described below for async iteration which you can stop as needed.
|
|
1481
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
|
|
1482
|
+
* for more details and examples.
|
|
1483
|
+
*/
|
|
1484
|
+
listMembershipsStream(request?: protos.google.chat.v1.IListMembershipsRequest, options?: CallOptions): Transform;
|
|
1485
|
+
/**
|
|
1486
|
+
* Equivalent to `listMemberships`, but returns an iterable object.
|
|
1487
|
+
*
|
|
1488
|
+
* `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
|
|
1489
|
+
* @param {Object} request
|
|
1490
|
+
* The request object that will be sent.
|
|
1491
|
+
* @param {string} request.parent
|
|
1492
|
+
* Required. The resource name of the space for which to fetch a membership
|
|
1493
|
+
* list.
|
|
1494
|
+
*
|
|
1495
|
+
* Format: spaces/{space}
|
|
1496
|
+
* @param {number} [request.pageSize]
|
|
1497
|
+
* Optional. The maximum number of memberships to return. The service might
|
|
1498
|
+
* return fewer than this value.
|
|
1499
|
+
*
|
|
1500
|
+
* If unspecified, at most 100 memberships are returned.
|
|
1501
|
+
*
|
|
1502
|
+
* The maximum value is 1,000. If you use a value more than 1,000, it's
|
|
1503
|
+
* automatically changed to 1,000.
|
|
1504
|
+
*
|
|
1505
|
+
* Negative values return an `INVALID_ARGUMENT` error.
|
|
1506
|
+
* @param {string} [request.pageToken]
|
|
1507
|
+
* Optional. A page token, received from a previous call to list memberships.
|
|
1508
|
+
* Provide this parameter to retrieve the subsequent page.
|
|
1509
|
+
*
|
|
1510
|
+
* When paginating, all other parameters provided should match the call that
|
|
1511
|
+
* provided the page token. Passing different values to the other parameters
|
|
1512
|
+
* might lead to unexpected results.
|
|
1513
|
+
* @param {string} [request.filter]
|
|
1514
|
+
* Optional. A query filter.
|
|
1515
|
+
*
|
|
1516
|
+
* You can filter memberships by a member's role
|
|
1517
|
+
* ([`role`](https://developers.google.com/chat/api/reference/rest/v1/spaces.members#membershiprole))
|
|
1518
|
+
* and type
|
|
1519
|
+
* ([`member.type`](https://developers.google.com/chat/api/reference/rest/v1/User#type)).
|
|
1520
|
+
*
|
|
1521
|
+
* To filter by role, set `role` to `ROLE_MEMBER` or `ROLE_MANAGER`.
|
|
1522
|
+
*
|
|
1523
|
+
* To filter by type, set `member.type` to `HUMAN` or `BOT`.
|
|
1524
|
+
*
|
|
1525
|
+
* To filter by both role and type, use the `AND` operator. To filter by
|
|
1526
|
+
* either role or type, use the `OR` operator.
|
|
1527
|
+
*
|
|
1528
|
+
* For example, the following queries are valid:
|
|
1529
|
+
*
|
|
1530
|
+
* ```
|
|
1531
|
+
* role = "ROLE_MANAGER" OR role = "ROLE_MEMBER"
|
|
1532
|
+
* member.type = "HUMAN" AND role = "ROLE_MANAGER"
|
|
1533
|
+
* ```
|
|
1534
|
+
*
|
|
1535
|
+
* The following queries are invalid:
|
|
1536
|
+
*
|
|
1537
|
+
* ```
|
|
1538
|
+
* member.type = "HUMAN" AND member.type = "BOT"
|
|
1539
|
+
* role = "ROLE_MANAGER" AND role = "ROLE_MEMBER"
|
|
1540
|
+
* ```
|
|
1541
|
+
*
|
|
1542
|
+
* Invalid queries are rejected by the server with an `INVALID_ARGUMENT`
|
|
1543
|
+
* error.
|
|
1544
|
+
* @param {boolean} [request.showGroups]
|
|
1545
|
+
* Optional. When `true`, also returns memberships associated with a
|
|
1546
|
+
* {@link protos.google.chat.v1.Membership.group_member|Google Group}, in
|
|
1547
|
+
* addition to other types of memberships. If a
|
|
1548
|
+
* {@link protos.google.chat.v1.ListMembershipsRequest.filter|filter} is set,
|
|
1549
|
+
* {@link protos.google.chat.v1.Membership.group_member|Google Group}
|
|
1550
|
+
* memberships that don't match the filter criteria aren't returned.
|
|
1551
|
+
* @param {boolean} [request.showInvited]
|
|
1552
|
+
* Optional. When `true`, also returns memberships associated with
|
|
1553
|
+
* {@link protos.google.chat.v1.Membership.MembershipState.INVITED|invited} members, in
|
|
1554
|
+
* addition to other types of memberships. If a
|
|
1555
|
+
* filter is set,
|
|
1556
|
+
* {@link protos.google.chat.v1.Membership.MembershipState.INVITED|invited} memberships
|
|
1557
|
+
* that don't match the filter criteria aren't returned.
|
|
1558
|
+
*
|
|
1559
|
+
* Currently requires [user
|
|
1560
|
+
* authentication](https://developers.google.com/chat/api/guides/auth/users).
|
|
1561
|
+
* @param {object} [options]
|
|
1562
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
1563
|
+
* @returns {Object}
|
|
1564
|
+
* An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
|
|
1565
|
+
* When you iterate the returned iterable, each element will be an object representing
|
|
1566
|
+
* {@link protos.google.chat.v1.Membership|Membership}. The API will be called under the hood as needed, once per the page,
|
|
1567
|
+
* so you can stop the iteration when you don't need more results.
|
|
1568
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
|
|
1569
|
+
* for more details and examples.
|
|
1570
|
+
* @example <caption>include:samples/generated/v1/chat_service.list_memberships.js</caption>
|
|
1571
|
+
* region_tag:chat_v1_generated_ChatService_ListMemberships_async
|
|
1572
|
+
*/
|
|
1573
|
+
listMembershipsAsync(request?: protos.google.chat.v1.IListMembershipsRequest, options?: CallOptions): AsyncIterable<protos.google.chat.v1.IMembership>;
|
|
1574
|
+
/**
|
|
1575
|
+
* Lists spaces the caller is a member of. Group chats and DMs aren't listed
|
|
1576
|
+
* until the first message is sent. For an example, see
|
|
1577
|
+
* [List
|
|
1578
|
+
* spaces](https://developers.google.com/chat/api/guides/v1/spaces/list).
|
|
1579
|
+
*
|
|
1580
|
+
* Requires
|
|
1581
|
+
* [authentication](https://developers.google.com/chat/api/guides/auth).
|
|
1582
|
+
* Supports
|
|
1583
|
+
* [app
|
|
1584
|
+
* authentication](https://developers.google.com/chat/api/guides/auth/service-accounts)
|
|
1585
|
+
* and [user
|
|
1586
|
+
* authentication](https://developers.google.com/chat/api/guides/auth/users).
|
|
1587
|
+
*
|
|
1588
|
+
* Lists spaces visible to the caller or authenticated user. Group chats
|
|
1589
|
+
* and DMs aren't listed until the first message is sent.
|
|
1590
|
+
*
|
|
1591
|
+
* @param {Object} request
|
|
1592
|
+
* The request object that will be sent.
|
|
1593
|
+
* @param {number} [request.pageSize]
|
|
1594
|
+
* Optional. The maximum number of spaces to return. The service might return
|
|
1595
|
+
* fewer than this value.
|
|
1596
|
+
*
|
|
1597
|
+
* If unspecified, at most 100 spaces are returned.
|
|
1598
|
+
*
|
|
1599
|
+
* The maximum value is 1,000. If you use a value more than 1,000, it's
|
|
1600
|
+
* automatically changed to 1,000.
|
|
1601
|
+
*
|
|
1602
|
+
* Negative values return an `INVALID_ARGUMENT` error.
|
|
1603
|
+
* @param {string} [request.pageToken]
|
|
1604
|
+
* Optional. A page token, received from a previous list spaces call.
|
|
1605
|
+
* Provide this parameter to retrieve the subsequent page.
|
|
1606
|
+
*
|
|
1607
|
+
* When paginating, the filter value should match the call that provided the
|
|
1608
|
+
* page token. Passing a different value may lead to unexpected results.
|
|
1609
|
+
* @param {string} [request.filter]
|
|
1610
|
+
* Optional. A query filter.
|
|
1611
|
+
*
|
|
1612
|
+
* You can filter spaces by the space type
|
|
1613
|
+
* ([`space_type`](https://developers.google.com/chat/api/reference/rest/v1/spaces#spacetype)).
|
|
1614
|
+
*
|
|
1615
|
+
* To filter by space type, you must specify valid enum value, such as
|
|
1616
|
+
* `SPACE` or `GROUP_CHAT` (the `space_type` can't be
|
|
1617
|
+
* `SPACE_TYPE_UNSPECIFIED`). To query for multiple space types, use the `OR`
|
|
1618
|
+
* operator.
|
|
1619
|
+
*
|
|
1620
|
+
* For example, the following queries are valid:
|
|
1621
|
+
*
|
|
1622
|
+
* ```
|
|
1623
|
+
* space_type = "SPACE"
|
|
1624
|
+
* spaceType = "GROUP_CHAT" OR spaceType = "DIRECT_MESSAGE"
|
|
1625
|
+
* ```
|
|
1626
|
+
*
|
|
1627
|
+
* Invalid queries are rejected by the server with an `INVALID_ARGUMENT`
|
|
1628
|
+
* error.
|
|
1629
|
+
* @param {object} [options]
|
|
1630
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
1631
|
+
* @returns {Promise} - The promise which resolves to an array.
|
|
1632
|
+
* The first element of the array is Array of {@link protos.google.chat.v1.Space|Space}.
|
|
1633
|
+
* The client library will perform auto-pagination by default: it will call the API as many
|
|
1634
|
+
* times as needed and will merge results from all the pages into this array.
|
|
1635
|
+
* Note that it can affect your quota.
|
|
1636
|
+
* We recommend using `listSpacesAsync()`
|
|
1637
|
+
* method described below for async iteration which you can stop as needed.
|
|
1638
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
|
|
1639
|
+
* for more details and examples.
|
|
1640
|
+
*/
|
|
1641
|
+
listSpaces(request?: protos.google.chat.v1.IListSpacesRequest, options?: CallOptions): Promise<[
|
|
1642
|
+
protos.google.chat.v1.ISpace[],
|
|
1643
|
+
protos.google.chat.v1.IListSpacesRequest | null,
|
|
1644
|
+
protos.google.chat.v1.IListSpacesResponse
|
|
1645
|
+
]>;
|
|
1646
|
+
listSpaces(request: protos.google.chat.v1.IListSpacesRequest, options: CallOptions, callback: PaginationCallback<protos.google.chat.v1.IListSpacesRequest, protos.google.chat.v1.IListSpacesResponse | null | undefined, protos.google.chat.v1.ISpace>): void;
|
|
1647
|
+
listSpaces(request: protos.google.chat.v1.IListSpacesRequest, callback: PaginationCallback<protos.google.chat.v1.IListSpacesRequest, protos.google.chat.v1.IListSpacesResponse | null | undefined, protos.google.chat.v1.ISpace>): void;
|
|
1648
|
+
/**
|
|
1649
|
+
* Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object.
|
|
1650
|
+
* @param {Object} request
|
|
1651
|
+
* The request object that will be sent.
|
|
1652
|
+
* @param {number} [request.pageSize]
|
|
1653
|
+
* Optional. The maximum number of spaces to return. The service might return
|
|
1654
|
+
* fewer than this value.
|
|
1655
|
+
*
|
|
1656
|
+
* If unspecified, at most 100 spaces are returned.
|
|
1657
|
+
*
|
|
1658
|
+
* The maximum value is 1,000. If you use a value more than 1,000, it's
|
|
1659
|
+
* automatically changed to 1,000.
|
|
1660
|
+
*
|
|
1661
|
+
* Negative values return an `INVALID_ARGUMENT` error.
|
|
1662
|
+
* @param {string} [request.pageToken]
|
|
1663
|
+
* Optional. A page token, received from a previous list spaces call.
|
|
1664
|
+
* Provide this parameter to retrieve the subsequent page.
|
|
1665
|
+
*
|
|
1666
|
+
* When paginating, the filter value should match the call that provided the
|
|
1667
|
+
* page token. Passing a different value may lead to unexpected results.
|
|
1668
|
+
* @param {string} [request.filter]
|
|
1669
|
+
* Optional. A query filter.
|
|
1670
|
+
*
|
|
1671
|
+
* You can filter spaces by the space type
|
|
1672
|
+
* ([`space_type`](https://developers.google.com/chat/api/reference/rest/v1/spaces#spacetype)).
|
|
1673
|
+
*
|
|
1674
|
+
* To filter by space type, you must specify valid enum value, such as
|
|
1675
|
+
* `SPACE` or `GROUP_CHAT` (the `space_type` can't be
|
|
1676
|
+
* `SPACE_TYPE_UNSPECIFIED`). To query for multiple space types, use the `OR`
|
|
1677
|
+
* operator.
|
|
1678
|
+
*
|
|
1679
|
+
* For example, the following queries are valid:
|
|
1680
|
+
*
|
|
1681
|
+
* ```
|
|
1682
|
+
* space_type = "SPACE"
|
|
1683
|
+
* spaceType = "GROUP_CHAT" OR spaceType = "DIRECT_MESSAGE"
|
|
1684
|
+
* ```
|
|
1685
|
+
*
|
|
1686
|
+
* Invalid queries are rejected by the server with an `INVALID_ARGUMENT`
|
|
1687
|
+
* error.
|
|
1688
|
+
* @param {object} [options]
|
|
1689
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
1690
|
+
* @returns {Stream}
|
|
1691
|
+
* An object stream which emits an object representing {@link protos.google.chat.v1.Space|Space} on 'data' event.
|
|
1692
|
+
* The client library will perform auto-pagination by default: it will call the API as many
|
|
1693
|
+
* times as needed. Note that it can affect your quota.
|
|
1694
|
+
* We recommend using `listSpacesAsync()`
|
|
1695
|
+
* method described below for async iteration which you can stop as needed.
|
|
1696
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
|
|
1697
|
+
* for more details and examples.
|
|
1698
|
+
*/
|
|
1699
|
+
listSpacesStream(request?: protos.google.chat.v1.IListSpacesRequest, options?: CallOptions): Transform;
|
|
1700
|
+
/**
|
|
1701
|
+
* Equivalent to `listSpaces`, but returns an iterable object.
|
|
1702
|
+
*
|
|
1703
|
+
* `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
|
|
1704
|
+
* @param {Object} request
|
|
1705
|
+
* The request object that will be sent.
|
|
1706
|
+
* @param {number} [request.pageSize]
|
|
1707
|
+
* Optional. The maximum number of spaces to return. The service might return
|
|
1708
|
+
* fewer than this value.
|
|
1709
|
+
*
|
|
1710
|
+
* If unspecified, at most 100 spaces are returned.
|
|
1711
|
+
*
|
|
1712
|
+
* The maximum value is 1,000. If you use a value more than 1,000, it's
|
|
1713
|
+
* automatically changed to 1,000.
|
|
1714
|
+
*
|
|
1715
|
+
* Negative values return an `INVALID_ARGUMENT` error.
|
|
1716
|
+
* @param {string} [request.pageToken]
|
|
1717
|
+
* Optional. A page token, received from a previous list spaces call.
|
|
1718
|
+
* Provide this parameter to retrieve the subsequent page.
|
|
1719
|
+
*
|
|
1720
|
+
* When paginating, the filter value should match the call that provided the
|
|
1721
|
+
* page token. Passing a different value may lead to unexpected results.
|
|
1722
|
+
* @param {string} [request.filter]
|
|
1723
|
+
* Optional. A query filter.
|
|
1724
|
+
*
|
|
1725
|
+
* You can filter spaces by the space type
|
|
1726
|
+
* ([`space_type`](https://developers.google.com/chat/api/reference/rest/v1/spaces#spacetype)).
|
|
1727
|
+
*
|
|
1728
|
+
* To filter by space type, you must specify valid enum value, such as
|
|
1729
|
+
* `SPACE` or `GROUP_CHAT` (the `space_type` can't be
|
|
1730
|
+
* `SPACE_TYPE_UNSPECIFIED`). To query for multiple space types, use the `OR`
|
|
1731
|
+
* operator.
|
|
1732
|
+
*
|
|
1733
|
+
* For example, the following queries are valid:
|
|
1734
|
+
*
|
|
1735
|
+
* ```
|
|
1736
|
+
* space_type = "SPACE"
|
|
1737
|
+
* spaceType = "GROUP_CHAT" OR spaceType = "DIRECT_MESSAGE"
|
|
1738
|
+
* ```
|
|
1739
|
+
*
|
|
1740
|
+
* Invalid queries are rejected by the server with an `INVALID_ARGUMENT`
|
|
1741
|
+
* error.
|
|
1742
|
+
* @param {object} [options]
|
|
1743
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
1744
|
+
* @returns {Object}
|
|
1745
|
+
* An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
|
|
1746
|
+
* When you iterate the returned iterable, each element will be an object representing
|
|
1747
|
+
* {@link protos.google.chat.v1.Space|Space}. The API will be called under the hood as needed, once per the page,
|
|
1748
|
+
* so you can stop the iteration when you don't need more results.
|
|
1749
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
|
|
1750
|
+
* for more details and examples.
|
|
1751
|
+
* @example <caption>include:samples/generated/v1/chat_service.list_spaces.js</caption>
|
|
1752
|
+
* region_tag:chat_v1_generated_ChatService_ListSpaces_async
|
|
1753
|
+
*/
|
|
1754
|
+
listSpacesAsync(request?: protos.google.chat.v1.IListSpacesRequest, options?: CallOptions): AsyncIterable<protos.google.chat.v1.ISpace>;
|
|
1755
|
+
/**
|
|
1756
|
+
* Lists reactions to a message. For an example, see
|
|
1757
|
+
* [List
|
|
1758
|
+
* reactions](https://developers.google.com/chat/api/guides/v1/reactions/list).
|
|
1759
|
+
* Requires [user
|
|
1760
|
+
* authentication](https://developers.google.com/chat/api/guides/auth/users).
|
|
1761
|
+
*
|
|
1762
|
+
* @param {Object} request
|
|
1763
|
+
* The request object that will be sent.
|
|
1764
|
+
* @param {string} request.parent
|
|
1765
|
+
* Required. The message users reacted to.
|
|
1766
|
+
*
|
|
1767
|
+
* Format: `spaces/{space}/messages/{message}`
|
|
1768
|
+
* @param {number} [request.pageSize]
|
|
1769
|
+
* Optional. The maximum number of reactions returned. The service can return
|
|
1770
|
+
* fewer reactions than this value. If unspecified, the default value is 25.
|
|
1771
|
+
* The maximum value is 200; values above 200 are changed to 200.
|
|
1772
|
+
* @param {string} [request.pageToken]
|
|
1773
|
+
* Optional. (If resuming from a previous query.)
|
|
1774
|
+
*
|
|
1775
|
+
* A page token received from a previous list reactions call. Provide this
|
|
1776
|
+
* to retrieve the subsequent page.
|
|
1777
|
+
*
|
|
1778
|
+
* When paginating, the filter value should match the call that provided the
|
|
1779
|
+
* page token. Passing a different value might lead to unexpected results.
|
|
1780
|
+
* @param {string} [request.filter]
|
|
1781
|
+
* Optional. A query filter.
|
|
1782
|
+
*
|
|
1783
|
+
* You can filter reactions by
|
|
1784
|
+
* [emoji](https://developers.google.com/chat/api/reference/rest/v1/Emoji)
|
|
1785
|
+
* (either `emoji.unicode` or `emoji.custom_emoji.uid`) and
|
|
1786
|
+
* [user](https://developers.google.com/chat/api/reference/rest/v1/User)
|
|
1787
|
+
* (`user.name`).
|
|
1788
|
+
*
|
|
1789
|
+
* To filter reactions for multiple emojis or users, join similar fields
|
|
1790
|
+
* with the `OR` operator, such as `emoji.unicode = "🙂" OR emoji.unicode =
|
|
1791
|
+
* "👍"` and `user.name = "users/AAAAAA" OR user.name = "users/BBBBBB"`.
|
|
1792
|
+
*
|
|
1793
|
+
* To filter reactions by emoji and user, use the `AND` operator, such as
|
|
1794
|
+
* `emoji.unicode = "🙂" AND user.name = "users/AAAAAA"`.
|
|
1795
|
+
*
|
|
1796
|
+
* If your query uses both `AND` and `OR`, group them with parentheses.
|
|
1797
|
+
*
|
|
1798
|
+
* For example, the following queries are valid:
|
|
1799
|
+
*
|
|
1800
|
+
* ```
|
|
1801
|
+
* user.name = "users/{user}"
|
|
1802
|
+
* emoji.unicode = "🙂"
|
|
1803
|
+
* emoji.custom_emoji.uid = "{uid}"
|
|
1804
|
+
* emoji.unicode = "🙂" OR emoji.unicode = "👍"
|
|
1805
|
+
* emoji.unicode = "🙂" OR emoji.custom_emoji.uid = "{uid}"
|
|
1806
|
+
* emoji.unicode = "🙂" AND user.name = "users/{user}"
|
|
1807
|
+
* (emoji.unicode = "🙂" OR emoji.custom_emoji.uid = "{uid}")
|
|
1808
|
+
* AND user.name = "users/{user}"
|
|
1809
|
+
* ```
|
|
1810
|
+
*
|
|
1811
|
+
* The following queries are invalid:
|
|
1812
|
+
*
|
|
1813
|
+
* ```
|
|
1814
|
+
* emoji.unicode = "🙂" AND emoji.unicode = "👍"
|
|
1815
|
+
* emoji.unicode = "🙂" AND emoji.custom_emoji.uid = "{uid}"
|
|
1816
|
+
* emoji.unicode = "🙂" OR user.name = "users/{user}"
|
|
1817
|
+
* emoji.unicode = "🙂" OR emoji.custom_emoji.uid = "{uid}" OR
|
|
1818
|
+
* user.name = "users/{user}"
|
|
1819
|
+
* emoji.unicode = "🙂" OR emoji.custom_emoji.uid = "{uid}"
|
|
1820
|
+
* AND user.name = "users/{user}"
|
|
1821
|
+
* ```
|
|
1822
|
+
*
|
|
1823
|
+
* Invalid queries are rejected by the server with an `INVALID_ARGUMENT`
|
|
1824
|
+
* error.
|
|
1825
|
+
* @param {object} [options]
|
|
1826
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
1827
|
+
* @returns {Promise} - The promise which resolves to an array.
|
|
1828
|
+
* The first element of the array is Array of {@link protos.google.chat.v1.Reaction|Reaction}.
|
|
1829
|
+
* The client library will perform auto-pagination by default: it will call the API as many
|
|
1830
|
+
* times as needed and will merge results from all the pages into this array.
|
|
1831
|
+
* Note that it can affect your quota.
|
|
1832
|
+
* We recommend using `listReactionsAsync()`
|
|
1833
|
+
* method described below for async iteration which you can stop as needed.
|
|
1834
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
|
|
1835
|
+
* for more details and examples.
|
|
1836
|
+
*/
|
|
1837
|
+
listReactions(request?: protos.google.chat.v1.IListReactionsRequest, options?: CallOptions): Promise<[
|
|
1838
|
+
protos.google.chat.v1.IReaction[],
|
|
1839
|
+
protos.google.chat.v1.IListReactionsRequest | null,
|
|
1840
|
+
protos.google.chat.v1.IListReactionsResponse
|
|
1841
|
+
]>;
|
|
1842
|
+
listReactions(request: protos.google.chat.v1.IListReactionsRequest, options: CallOptions, callback: PaginationCallback<protos.google.chat.v1.IListReactionsRequest, protos.google.chat.v1.IListReactionsResponse | null | undefined, protos.google.chat.v1.IReaction>): void;
|
|
1843
|
+
listReactions(request: protos.google.chat.v1.IListReactionsRequest, callback: PaginationCallback<protos.google.chat.v1.IListReactionsRequest, protos.google.chat.v1.IListReactionsResponse | null | undefined, protos.google.chat.v1.IReaction>): void;
|
|
1844
|
+
/**
|
|
1845
|
+
* Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object.
|
|
1846
|
+
* @param {Object} request
|
|
1847
|
+
* The request object that will be sent.
|
|
1848
|
+
* @param {string} request.parent
|
|
1849
|
+
* Required. The message users reacted to.
|
|
1850
|
+
*
|
|
1851
|
+
* Format: `spaces/{space}/messages/{message}`
|
|
1852
|
+
* @param {number} [request.pageSize]
|
|
1853
|
+
* Optional. The maximum number of reactions returned. The service can return
|
|
1854
|
+
* fewer reactions than this value. If unspecified, the default value is 25.
|
|
1855
|
+
* The maximum value is 200; values above 200 are changed to 200.
|
|
1856
|
+
* @param {string} [request.pageToken]
|
|
1857
|
+
* Optional. (If resuming from a previous query.)
|
|
1858
|
+
*
|
|
1859
|
+
* A page token received from a previous list reactions call. Provide this
|
|
1860
|
+
* to retrieve the subsequent page.
|
|
1861
|
+
*
|
|
1862
|
+
* When paginating, the filter value should match the call that provided the
|
|
1863
|
+
* page token. Passing a different value might lead to unexpected results.
|
|
1864
|
+
* @param {string} [request.filter]
|
|
1865
|
+
* Optional. A query filter.
|
|
1866
|
+
*
|
|
1867
|
+
* You can filter reactions by
|
|
1868
|
+
* [emoji](https://developers.google.com/chat/api/reference/rest/v1/Emoji)
|
|
1869
|
+
* (either `emoji.unicode` or `emoji.custom_emoji.uid`) and
|
|
1870
|
+
* [user](https://developers.google.com/chat/api/reference/rest/v1/User)
|
|
1871
|
+
* (`user.name`).
|
|
1872
|
+
*
|
|
1873
|
+
* To filter reactions for multiple emojis or users, join similar fields
|
|
1874
|
+
* with the `OR` operator, such as `emoji.unicode = "🙂" OR emoji.unicode =
|
|
1875
|
+
* "👍"` and `user.name = "users/AAAAAA" OR user.name = "users/BBBBBB"`.
|
|
1876
|
+
*
|
|
1877
|
+
* To filter reactions by emoji and user, use the `AND` operator, such as
|
|
1878
|
+
* `emoji.unicode = "🙂" AND user.name = "users/AAAAAA"`.
|
|
1879
|
+
*
|
|
1880
|
+
* If your query uses both `AND` and `OR`, group them with parentheses.
|
|
1881
|
+
*
|
|
1882
|
+
* For example, the following queries are valid:
|
|
1883
|
+
*
|
|
1884
|
+
* ```
|
|
1885
|
+
* user.name = "users/{user}"
|
|
1886
|
+
* emoji.unicode = "🙂"
|
|
1887
|
+
* emoji.custom_emoji.uid = "{uid}"
|
|
1888
|
+
* emoji.unicode = "🙂" OR emoji.unicode = "👍"
|
|
1889
|
+
* emoji.unicode = "🙂" OR emoji.custom_emoji.uid = "{uid}"
|
|
1890
|
+
* emoji.unicode = "🙂" AND user.name = "users/{user}"
|
|
1891
|
+
* (emoji.unicode = "🙂" OR emoji.custom_emoji.uid = "{uid}")
|
|
1892
|
+
* AND user.name = "users/{user}"
|
|
1893
|
+
* ```
|
|
1894
|
+
*
|
|
1895
|
+
* The following queries are invalid:
|
|
1896
|
+
*
|
|
1897
|
+
* ```
|
|
1898
|
+
* emoji.unicode = "🙂" AND emoji.unicode = "👍"
|
|
1899
|
+
* emoji.unicode = "🙂" AND emoji.custom_emoji.uid = "{uid}"
|
|
1900
|
+
* emoji.unicode = "🙂" OR user.name = "users/{user}"
|
|
1901
|
+
* emoji.unicode = "🙂" OR emoji.custom_emoji.uid = "{uid}" OR
|
|
1902
|
+
* user.name = "users/{user}"
|
|
1903
|
+
* emoji.unicode = "🙂" OR emoji.custom_emoji.uid = "{uid}"
|
|
1904
|
+
* AND user.name = "users/{user}"
|
|
1905
|
+
* ```
|
|
1906
|
+
*
|
|
1907
|
+
* Invalid queries are rejected by the server with an `INVALID_ARGUMENT`
|
|
1908
|
+
* error.
|
|
1909
|
+
* @param {object} [options]
|
|
1910
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
1911
|
+
* @returns {Stream}
|
|
1912
|
+
* An object stream which emits an object representing {@link protos.google.chat.v1.Reaction|Reaction} on 'data' event.
|
|
1913
|
+
* The client library will perform auto-pagination by default: it will call the API as many
|
|
1914
|
+
* times as needed. Note that it can affect your quota.
|
|
1915
|
+
* We recommend using `listReactionsAsync()`
|
|
1916
|
+
* method described below for async iteration which you can stop as needed.
|
|
1917
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
|
|
1918
|
+
* for more details and examples.
|
|
1919
|
+
*/
|
|
1920
|
+
listReactionsStream(request?: protos.google.chat.v1.IListReactionsRequest, options?: CallOptions): Transform;
|
|
1921
|
+
/**
|
|
1922
|
+
* Equivalent to `listReactions`, but returns an iterable object.
|
|
1923
|
+
*
|
|
1924
|
+
* `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
|
|
1925
|
+
* @param {Object} request
|
|
1926
|
+
* The request object that will be sent.
|
|
1927
|
+
* @param {string} request.parent
|
|
1928
|
+
* Required. The message users reacted to.
|
|
1929
|
+
*
|
|
1930
|
+
* Format: `spaces/{space}/messages/{message}`
|
|
1931
|
+
* @param {number} [request.pageSize]
|
|
1932
|
+
* Optional. The maximum number of reactions returned. The service can return
|
|
1933
|
+
* fewer reactions than this value. If unspecified, the default value is 25.
|
|
1934
|
+
* The maximum value is 200; values above 200 are changed to 200.
|
|
1935
|
+
* @param {string} [request.pageToken]
|
|
1936
|
+
* Optional. (If resuming from a previous query.)
|
|
1937
|
+
*
|
|
1938
|
+
* A page token received from a previous list reactions call. Provide this
|
|
1939
|
+
* to retrieve the subsequent page.
|
|
1940
|
+
*
|
|
1941
|
+
* When paginating, the filter value should match the call that provided the
|
|
1942
|
+
* page token. Passing a different value might lead to unexpected results.
|
|
1943
|
+
* @param {string} [request.filter]
|
|
1944
|
+
* Optional. A query filter.
|
|
1945
|
+
*
|
|
1946
|
+
* You can filter reactions by
|
|
1947
|
+
* [emoji](https://developers.google.com/chat/api/reference/rest/v1/Emoji)
|
|
1948
|
+
* (either `emoji.unicode` or `emoji.custom_emoji.uid`) and
|
|
1949
|
+
* [user](https://developers.google.com/chat/api/reference/rest/v1/User)
|
|
1950
|
+
* (`user.name`).
|
|
1951
|
+
*
|
|
1952
|
+
* To filter reactions for multiple emojis or users, join similar fields
|
|
1953
|
+
* with the `OR` operator, such as `emoji.unicode = "🙂" OR emoji.unicode =
|
|
1954
|
+
* "👍"` and `user.name = "users/AAAAAA" OR user.name = "users/BBBBBB"`.
|
|
1955
|
+
*
|
|
1956
|
+
* To filter reactions by emoji and user, use the `AND` operator, such as
|
|
1957
|
+
* `emoji.unicode = "🙂" AND user.name = "users/AAAAAA"`.
|
|
1958
|
+
*
|
|
1959
|
+
* If your query uses both `AND` and `OR`, group them with parentheses.
|
|
1960
|
+
*
|
|
1961
|
+
* For example, the following queries are valid:
|
|
1962
|
+
*
|
|
1963
|
+
* ```
|
|
1964
|
+
* user.name = "users/{user}"
|
|
1965
|
+
* emoji.unicode = "🙂"
|
|
1966
|
+
* emoji.custom_emoji.uid = "{uid}"
|
|
1967
|
+
* emoji.unicode = "🙂" OR emoji.unicode = "👍"
|
|
1968
|
+
* emoji.unicode = "🙂" OR emoji.custom_emoji.uid = "{uid}"
|
|
1969
|
+
* emoji.unicode = "🙂" AND user.name = "users/{user}"
|
|
1970
|
+
* (emoji.unicode = "🙂" OR emoji.custom_emoji.uid = "{uid}")
|
|
1971
|
+
* AND user.name = "users/{user}"
|
|
1972
|
+
* ```
|
|
1973
|
+
*
|
|
1974
|
+
* The following queries are invalid:
|
|
1975
|
+
*
|
|
1976
|
+
* ```
|
|
1977
|
+
* emoji.unicode = "🙂" AND emoji.unicode = "👍"
|
|
1978
|
+
* emoji.unicode = "🙂" AND emoji.custom_emoji.uid = "{uid}"
|
|
1979
|
+
* emoji.unicode = "🙂" OR user.name = "users/{user}"
|
|
1980
|
+
* emoji.unicode = "🙂" OR emoji.custom_emoji.uid = "{uid}" OR
|
|
1981
|
+
* user.name = "users/{user}"
|
|
1982
|
+
* emoji.unicode = "🙂" OR emoji.custom_emoji.uid = "{uid}"
|
|
1983
|
+
* AND user.name = "users/{user}"
|
|
1984
|
+
* ```
|
|
1985
|
+
*
|
|
1986
|
+
* Invalid queries are rejected by the server with an `INVALID_ARGUMENT`
|
|
1987
|
+
* error.
|
|
1988
|
+
* @param {object} [options]
|
|
1989
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
1990
|
+
* @returns {Object}
|
|
1991
|
+
* An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
|
|
1992
|
+
* When you iterate the returned iterable, each element will be an object representing
|
|
1993
|
+
* {@link protos.google.chat.v1.Reaction|Reaction}. The API will be called under the hood as needed, once per the page,
|
|
1994
|
+
* so you can stop the iteration when you don't need more results.
|
|
1995
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
|
|
1996
|
+
* for more details and examples.
|
|
1997
|
+
* @example <caption>include:samples/generated/v1/chat_service.list_reactions.js</caption>
|
|
1998
|
+
* region_tag:chat_v1_generated_ChatService_ListReactions_async
|
|
1999
|
+
*/
|
|
2000
|
+
listReactionsAsync(request?: protos.google.chat.v1.IListReactionsRequest, options?: CallOptions): AsyncIterable<protos.google.chat.v1.IReaction>;
|
|
2001
|
+
/**
|
|
2002
|
+
* Return a fully-qualified attachment resource name string.
|
|
2003
|
+
*
|
|
2004
|
+
* @param {string} space
|
|
2005
|
+
* @param {string} message
|
|
2006
|
+
* @param {string} attachment
|
|
2007
|
+
* @returns {string} Resource name string.
|
|
2008
|
+
*/
|
|
2009
|
+
attachmentPath(space: string, message: string, attachment: string): string;
|
|
2010
|
+
/**
|
|
2011
|
+
* Parse the space from Attachment resource.
|
|
2012
|
+
*
|
|
2013
|
+
* @param {string} attachmentName
|
|
2014
|
+
* A fully-qualified path representing Attachment resource.
|
|
2015
|
+
* @returns {string} A string representing the space.
|
|
2016
|
+
*/
|
|
2017
|
+
matchSpaceFromAttachmentName(attachmentName: string): string | number;
|
|
2018
|
+
/**
|
|
2019
|
+
* Parse the message from Attachment resource.
|
|
2020
|
+
*
|
|
2021
|
+
* @param {string} attachmentName
|
|
2022
|
+
* A fully-qualified path representing Attachment resource.
|
|
2023
|
+
* @returns {string} A string representing the message.
|
|
2024
|
+
*/
|
|
2025
|
+
matchMessageFromAttachmentName(attachmentName: string): string | number;
|
|
2026
|
+
/**
|
|
2027
|
+
* Parse the attachment from Attachment resource.
|
|
2028
|
+
*
|
|
2029
|
+
* @param {string} attachmentName
|
|
2030
|
+
* A fully-qualified path representing Attachment resource.
|
|
2031
|
+
* @returns {string} A string representing the attachment.
|
|
2032
|
+
*/
|
|
2033
|
+
matchAttachmentFromAttachmentName(attachmentName: string): string | number;
|
|
2034
|
+
/**
|
|
2035
|
+
* Return a fully-qualified membership resource name string.
|
|
2036
|
+
*
|
|
2037
|
+
* @param {string} space
|
|
2038
|
+
* @param {string} member
|
|
2039
|
+
* @returns {string} Resource name string.
|
|
2040
|
+
*/
|
|
2041
|
+
membershipPath(space: string, member: string): string;
|
|
2042
|
+
/**
|
|
2043
|
+
* Parse the space from Membership resource.
|
|
2044
|
+
*
|
|
2045
|
+
* @param {string} membershipName
|
|
2046
|
+
* A fully-qualified path representing Membership resource.
|
|
2047
|
+
* @returns {string} A string representing the space.
|
|
2048
|
+
*/
|
|
2049
|
+
matchSpaceFromMembershipName(membershipName: string): string | number;
|
|
2050
|
+
/**
|
|
2051
|
+
* Parse the member from Membership resource.
|
|
2052
|
+
*
|
|
2053
|
+
* @param {string} membershipName
|
|
2054
|
+
* A fully-qualified path representing Membership resource.
|
|
2055
|
+
* @returns {string} A string representing the member.
|
|
2056
|
+
*/
|
|
2057
|
+
matchMemberFromMembershipName(membershipName: string): string | number;
|
|
2058
|
+
/**
|
|
2059
|
+
* Return a fully-qualified message resource name string.
|
|
2060
|
+
*
|
|
2061
|
+
* @param {string} space
|
|
2062
|
+
* @param {string} message
|
|
2063
|
+
* @returns {string} Resource name string.
|
|
2064
|
+
*/
|
|
2065
|
+
messagePath(space: string, message: string): string;
|
|
2066
|
+
/**
|
|
2067
|
+
* Parse the space from Message resource.
|
|
2068
|
+
*
|
|
2069
|
+
* @param {string} messageName
|
|
2070
|
+
* A fully-qualified path representing Message resource.
|
|
2071
|
+
* @returns {string} A string representing the space.
|
|
2072
|
+
*/
|
|
2073
|
+
matchSpaceFromMessageName(messageName: string): string | number;
|
|
2074
|
+
/**
|
|
2075
|
+
* Parse the message from Message resource.
|
|
2076
|
+
*
|
|
2077
|
+
* @param {string} messageName
|
|
2078
|
+
* A fully-qualified path representing Message resource.
|
|
2079
|
+
* @returns {string} A string representing the message.
|
|
2080
|
+
*/
|
|
2081
|
+
matchMessageFromMessageName(messageName: string): string | number;
|
|
2082
|
+
/**
|
|
2083
|
+
* Return a fully-qualified quotedMessageMetadata resource name string.
|
|
2084
|
+
*
|
|
2085
|
+
* @param {string} space
|
|
2086
|
+
* @param {string} message
|
|
2087
|
+
* @param {string} quoted_message_metadata
|
|
2088
|
+
* @returns {string} Resource name string.
|
|
2089
|
+
*/
|
|
2090
|
+
quotedMessageMetadataPath(space: string, message: string, quotedMessageMetadata: string): string;
|
|
2091
|
+
/**
|
|
2092
|
+
* Parse the space from QuotedMessageMetadata resource.
|
|
2093
|
+
*
|
|
2094
|
+
* @param {string} quotedMessageMetadataName
|
|
2095
|
+
* A fully-qualified path representing QuotedMessageMetadata resource.
|
|
2096
|
+
* @returns {string} A string representing the space.
|
|
2097
|
+
*/
|
|
2098
|
+
matchSpaceFromQuotedMessageMetadataName(quotedMessageMetadataName: string): string | number;
|
|
2099
|
+
/**
|
|
2100
|
+
* Parse the message from QuotedMessageMetadata resource.
|
|
2101
|
+
*
|
|
2102
|
+
* @param {string} quotedMessageMetadataName
|
|
2103
|
+
* A fully-qualified path representing QuotedMessageMetadata resource.
|
|
2104
|
+
* @returns {string} A string representing the message.
|
|
2105
|
+
*/
|
|
2106
|
+
matchMessageFromQuotedMessageMetadataName(quotedMessageMetadataName: string): string | number;
|
|
2107
|
+
/**
|
|
2108
|
+
* Parse the quoted_message_metadata from QuotedMessageMetadata resource.
|
|
2109
|
+
*
|
|
2110
|
+
* @param {string} quotedMessageMetadataName
|
|
2111
|
+
* A fully-qualified path representing QuotedMessageMetadata resource.
|
|
2112
|
+
* @returns {string} A string representing the quoted_message_metadata.
|
|
2113
|
+
*/
|
|
2114
|
+
matchQuotedMessageMetadataFromQuotedMessageMetadataName(quotedMessageMetadataName: string): string | number;
|
|
2115
|
+
/**
|
|
2116
|
+
* Return a fully-qualified reaction resource name string.
|
|
2117
|
+
*
|
|
2118
|
+
* @param {string} space
|
|
2119
|
+
* @param {string} message
|
|
2120
|
+
* @param {string} reaction
|
|
2121
|
+
* @returns {string} Resource name string.
|
|
2122
|
+
*/
|
|
2123
|
+
reactionPath(space: string, message: string, reaction: string): string;
|
|
2124
|
+
/**
|
|
2125
|
+
* Parse the space from Reaction resource.
|
|
2126
|
+
*
|
|
2127
|
+
* @param {string} reactionName
|
|
2128
|
+
* A fully-qualified path representing Reaction resource.
|
|
2129
|
+
* @returns {string} A string representing the space.
|
|
2130
|
+
*/
|
|
2131
|
+
matchSpaceFromReactionName(reactionName: string): string | number;
|
|
2132
|
+
/**
|
|
2133
|
+
* Parse the message from Reaction resource.
|
|
2134
|
+
*
|
|
2135
|
+
* @param {string} reactionName
|
|
2136
|
+
* A fully-qualified path representing Reaction resource.
|
|
2137
|
+
* @returns {string} A string representing the message.
|
|
2138
|
+
*/
|
|
2139
|
+
matchMessageFromReactionName(reactionName: string): string | number;
|
|
2140
|
+
/**
|
|
2141
|
+
* Parse the reaction from Reaction resource.
|
|
2142
|
+
*
|
|
2143
|
+
* @param {string} reactionName
|
|
2144
|
+
* A fully-qualified path representing Reaction resource.
|
|
2145
|
+
* @returns {string} A string representing the reaction.
|
|
2146
|
+
*/
|
|
2147
|
+
matchReactionFromReactionName(reactionName: string): string | number;
|
|
2148
|
+
/**
|
|
2149
|
+
* Return a fully-qualified space resource name string.
|
|
2150
|
+
*
|
|
2151
|
+
* @param {string} space
|
|
2152
|
+
* @returns {string} Resource name string.
|
|
2153
|
+
*/
|
|
2154
|
+
spacePath(space: string): string;
|
|
2155
|
+
/**
|
|
2156
|
+
* Parse the space from Space resource.
|
|
2157
|
+
*
|
|
2158
|
+
* @param {string} spaceName
|
|
2159
|
+
* A fully-qualified path representing Space resource.
|
|
2160
|
+
* @returns {string} A string representing the space.
|
|
2161
|
+
*/
|
|
2162
|
+
matchSpaceFromSpaceName(spaceName: string): string | number;
|
|
2163
|
+
/**
|
|
2164
|
+
* Return a fully-qualified thread resource name string.
|
|
2165
|
+
*
|
|
2166
|
+
* @param {string} space
|
|
2167
|
+
* @param {string} thread
|
|
2168
|
+
* @returns {string} Resource name string.
|
|
2169
|
+
*/
|
|
2170
|
+
threadPath(space: string, thread: string): string;
|
|
2171
|
+
/**
|
|
2172
|
+
* Parse the space from Thread resource.
|
|
2173
|
+
*
|
|
2174
|
+
* @param {string} threadName
|
|
2175
|
+
* A fully-qualified path representing Thread resource.
|
|
2176
|
+
* @returns {string} A string representing the space.
|
|
2177
|
+
*/
|
|
2178
|
+
matchSpaceFromThreadName(threadName: string): string | number;
|
|
2179
|
+
/**
|
|
2180
|
+
* Parse the thread from Thread resource.
|
|
2181
|
+
*
|
|
2182
|
+
* @param {string} threadName
|
|
2183
|
+
* A fully-qualified path representing Thread resource.
|
|
2184
|
+
* @returns {string} A string representing the thread.
|
|
2185
|
+
*/
|
|
2186
|
+
matchThreadFromThreadName(threadName: string): string | number;
|
|
2187
|
+
/**
|
|
2188
|
+
* Terminate the gRPC channel and close the client.
|
|
2189
|
+
*
|
|
2190
|
+
* The client will no longer be usable and all future behavior is undefined.
|
|
2191
|
+
* @returns {Promise} A promise that resolves when the client is closed.
|
|
2192
|
+
*/
|
|
2193
|
+
close(): Promise<void>;
|
|
2194
|
+
}
|