@google-apps/chat 0.23.1 → 0.25.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -3
- package/build/protos/google/chat/v1/action_status.proto +1 -1
- package/build/protos/google/chat/v1/annotation.proto +1 -1
- package/build/protos/google/chat/v1/attachment.proto +1 -1
- package/build/protos/google/chat/v1/chat_service.proto +26 -0
- package/build/protos/google/chat/v1/contextual_addon.proto +1 -1
- package/build/protos/google/chat/v1/deletion_metadata.proto +1 -1
- package/build/protos/google/chat/v1/event_payload.proto +1 -1
- package/build/protos/google/chat/v1/group.proto +1 -1
- package/build/protos/google/chat/v1/history_state.proto +1 -1
- package/build/protos/google/chat/v1/matched_url.proto +1 -1
- package/build/protos/google/chat/v1/membership.proto +1 -1
- package/build/protos/google/chat/v1/message.proto +49 -7
- package/build/protos/google/chat/v1/reaction.proto +1 -1
- package/build/protos/google/chat/v1/slash_command.proto +1 -1
- package/build/protos/google/chat/v1/space.proto +81 -1
- package/build/protos/google/chat/v1/space_event.proto +1 -1
- package/build/protos/google/chat/v1/space_notification_setting.proto +1 -1
- package/build/protos/google/chat/v1/space_read_state.proto +1 -1
- package/build/protos/google/chat/v1/space_setup.proto +1 -1
- package/build/protos/google/chat/v1/thread_read_state.proto +1 -1
- package/build/protos/google/chat/v1/user.proto +1 -1
- package/build/protos/google/chat/v1/widgets.proto +1 -1
- package/build/protos/protos.d.ts +1004 -21
- package/build/protos/protos.js +8162 -2241
- package/build/protos/protos.json +311 -24
- package/build/src/v1/chat_service_client.d.ts +1103 -898
- package/build/src/v1/chat_service_client.js +830 -297
- package/build/src/v1/chat_service_client.js.map +1 -1
- package/build/src/v1/chat_service_client_config.json +5 -0
- package/build/src/v1/gapic_metadata.json +14 -0
- package/build/src/v1/index.js.map +1 -1
- package/package.json +1 -4
|
@@ -97,17 +97,26 @@ class ChatServiceClient {
|
|
|
97
97
|
constructor(opts, gaxInstance) {
|
|
98
98
|
// Ensure that options include all the required fields.
|
|
99
99
|
const staticMembers = this.constructor;
|
|
100
|
-
if (opts?.universe_domain &&
|
|
100
|
+
if (opts?.universe_domain &&
|
|
101
|
+
opts?.universeDomain &&
|
|
102
|
+
opts?.universe_domain !== opts?.universeDomain) {
|
|
101
103
|
throw new Error('Please set either universe_domain or universeDomain, but not both.');
|
|
102
104
|
}
|
|
103
|
-
const universeDomainEnvVar =
|
|
104
|
-
|
|
105
|
+
const universeDomainEnvVar = typeof process === 'object' && typeof process.env === 'object'
|
|
106
|
+
? process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']
|
|
107
|
+
: undefined;
|
|
108
|
+
this._universeDomain =
|
|
109
|
+
opts?.universeDomain ??
|
|
110
|
+
opts?.universe_domain ??
|
|
111
|
+
universeDomainEnvVar ??
|
|
112
|
+
'googleapis.com';
|
|
105
113
|
this._servicePath = 'chat.' + this._universeDomain;
|
|
106
114
|
const servicePath = opts?.servicePath || opts?.apiEndpoint || this._servicePath;
|
|
107
115
|
this._providedCustomServicePath = !!(opts?.servicePath || opts?.apiEndpoint);
|
|
108
116
|
const port = opts?.port || staticMembers.port;
|
|
109
117
|
const clientConfig = opts?.clientConfig ?? {};
|
|
110
|
-
const fallback = opts?.fallback ??
|
|
118
|
+
const fallback = opts?.fallback ??
|
|
119
|
+
(typeof window !== 'undefined' && typeof window?.fetch === 'function');
|
|
111
120
|
opts = Object.assign({ servicePath, port, clientConfig, fallback }, opts);
|
|
112
121
|
// Request numeric enum values if REST transport is used.
|
|
113
122
|
opts.numericEnums = true;
|
|
@@ -136,10 +145,7 @@ class ChatServiceClient {
|
|
|
136
145
|
this.auth.defaultScopes = staticMembers.scopes;
|
|
137
146
|
}
|
|
138
147
|
// Determine the client header string.
|
|
139
|
-
const clientHeader = [
|
|
140
|
-
`gax/${this._gaxModule.version}`,
|
|
141
|
-
`gapic/${version}`,
|
|
142
|
-
];
|
|
148
|
+
const clientHeader = [`gax/${this._gaxModule.version}`, `gapic/${version}`];
|
|
143
149
|
if (typeof process === 'object' && 'versions' in process) {
|
|
144
150
|
clientHeader.push(`gl-node/${process.versions.node}`);
|
|
145
151
|
}
|
|
@@ -184,11 +190,12 @@ class ChatServiceClient {
|
|
|
184
190
|
listMemberships: new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'memberships'),
|
|
185
191
|
listSpaces: new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'spaces'),
|
|
186
192
|
searchSpaces: new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'spaces'),
|
|
193
|
+
findGroupChats: new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'spaces'),
|
|
187
194
|
listReactions: new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'reactions'),
|
|
188
195
|
listCustomEmojis: new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'customEmojis'),
|
|
189
196
|
listSpaceEvents: new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'spaceEvents'),
|
|
190
197
|
listSections: new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'sections'),
|
|
191
|
-
listSectionItems: new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'sectionItems')
|
|
198
|
+
listSectionItems: new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'sectionItems'),
|
|
192
199
|
};
|
|
193
200
|
// Put together the default options sent with requests.
|
|
194
201
|
this._defaults = this._gaxGrpc.constructSettings('google.chat.v1.ChatService', gapicConfig, opts.clientConfig || {}, { 'x-goog-api-client': clientHeader.join(' ') });
|
|
@@ -217,15 +224,59 @@ class ChatServiceClient {
|
|
|
217
224
|
}
|
|
218
225
|
// Put together the "service stub" for
|
|
219
226
|
// google.chat.v1.ChatService.
|
|
220
|
-
this.chatServiceStub = this._gaxGrpc.createStub(this._opts.fallback
|
|
221
|
-
this._protos.lookupService('google.chat.v1.ChatService')
|
|
222
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
223
|
-
|
|
227
|
+
this.chatServiceStub = this._gaxGrpc.createStub(this._opts.fallback
|
|
228
|
+
? this._protos.lookupService('google.chat.v1.ChatService')
|
|
229
|
+
: // eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
230
|
+
this._protos.google.chat.v1.ChatService, this._opts, this._providedCustomServicePath);
|
|
224
231
|
// Iterate over each of the methods that the service provides
|
|
225
232
|
// and create an API call method for each.
|
|
226
|
-
const chatServiceStubMethods = [
|
|
233
|
+
const chatServiceStubMethods = [
|
|
234
|
+
'createMessage',
|
|
235
|
+
'listMessages',
|
|
236
|
+
'listMemberships',
|
|
237
|
+
'getMembership',
|
|
238
|
+
'getMessage',
|
|
239
|
+
'updateMessage',
|
|
240
|
+
'deleteMessage',
|
|
241
|
+
'getAttachment',
|
|
242
|
+
'uploadAttachment',
|
|
243
|
+
'listSpaces',
|
|
244
|
+
'searchSpaces',
|
|
245
|
+
'getSpace',
|
|
246
|
+
'createSpace',
|
|
247
|
+
'setUpSpace',
|
|
248
|
+
'updateSpace',
|
|
249
|
+
'deleteSpace',
|
|
250
|
+
'completeImportSpace',
|
|
251
|
+
'findDirectMessage',
|
|
252
|
+
'findGroupChats',
|
|
253
|
+
'createMembership',
|
|
254
|
+
'updateMembership',
|
|
255
|
+
'deleteMembership',
|
|
256
|
+
'createReaction',
|
|
257
|
+
'listReactions',
|
|
258
|
+
'deleteReaction',
|
|
259
|
+
'createCustomEmoji',
|
|
260
|
+
'getCustomEmoji',
|
|
261
|
+
'listCustomEmojis',
|
|
262
|
+
'deleteCustomEmoji',
|
|
263
|
+
'getSpaceReadState',
|
|
264
|
+
'updateSpaceReadState',
|
|
265
|
+
'getThreadReadState',
|
|
266
|
+
'getSpaceEvent',
|
|
267
|
+
'listSpaceEvents',
|
|
268
|
+
'getSpaceNotificationSetting',
|
|
269
|
+
'updateSpaceNotificationSetting',
|
|
270
|
+
'createSection',
|
|
271
|
+
'deleteSection',
|
|
272
|
+
'updateSection',
|
|
273
|
+
'listSections',
|
|
274
|
+
'positionSection',
|
|
275
|
+
'listSectionItems',
|
|
276
|
+
'moveSectionItem',
|
|
277
|
+
];
|
|
227
278
|
for (const methodName of chatServiceStubMethods) {
|
|
228
|
-
const callPromise = this.chatServiceStub.then(stub => (...args) => {
|
|
279
|
+
const callPromise = this.chatServiceStub.then((stub) => (...args) => {
|
|
229
280
|
if (this._terminated) {
|
|
230
281
|
return Promise.reject('The client has already been closed.');
|
|
231
282
|
}
|
|
@@ -234,8 +285,7 @@ class ChatServiceClient {
|
|
|
234
285
|
}, (err) => () => {
|
|
235
286
|
throw err;
|
|
236
287
|
});
|
|
237
|
-
const descriptor = this.descriptors.page[methodName] ||
|
|
238
|
-
undefined;
|
|
288
|
+
const descriptor = this.descriptors.page[methodName] || undefined;
|
|
239
289
|
const apiCall = this._gaxModule.createApiCall(callPromise, this._defaults[methodName], descriptor, this._opts.fallback);
|
|
240
290
|
this.innerApiCalls[methodName] = apiCall;
|
|
241
291
|
}
|
|
@@ -247,7 +297,8 @@ class ChatServiceClient {
|
|
|
247
297
|
* @returns {string} The DNS address for this service.
|
|
248
298
|
*/
|
|
249
299
|
static get servicePath() {
|
|
250
|
-
if (typeof process === 'object' &&
|
|
300
|
+
if (typeof process === 'object' &&
|
|
301
|
+
typeof process.emitWarning === 'function') {
|
|
251
302
|
process.emitWarning('Static servicePath is deprecated, please use the instance method instead.', 'DeprecationWarning');
|
|
252
303
|
}
|
|
253
304
|
return 'chat.googleapis.com';
|
|
@@ -258,7 +309,8 @@ class ChatServiceClient {
|
|
|
258
309
|
* @returns {string} The DNS address for this service.
|
|
259
310
|
*/
|
|
260
311
|
static get apiEndpoint() {
|
|
261
|
-
if (typeof process === 'object' &&
|
|
312
|
+
if (typeof process === 'object' &&
|
|
313
|
+
typeof process.emitWarning === 'function') {
|
|
262
314
|
process.emitWarning('Static apiEndpoint is deprecated, please use the instance method instead.', 'DeprecationWarning');
|
|
263
315
|
}
|
|
264
316
|
return 'chat.googleapis.com';
|
|
@@ -320,7 +372,7 @@ class ChatServiceClient {
|
|
|
320
372
|
'https://www.googleapis.com/auth/chat.users.readstate.readonly',
|
|
321
373
|
'https://www.googleapis.com/auth/chat.users.sections',
|
|
322
374
|
'https://www.googleapis.com/auth/chat.users.sections.readonly',
|
|
323
|
-
'https://www.googleapis.com/auth/chat.users.spacesettings'
|
|
375
|
+
'https://www.googleapis.com/auth/chat.users.spacesettings',
|
|
324
376
|
];
|
|
325
377
|
}
|
|
326
378
|
/**
|
|
@@ -347,10 +399,13 @@ class ChatServiceClient {
|
|
|
347
399
|
options = options || {};
|
|
348
400
|
options.otherArgs = options.otherArgs || {};
|
|
349
401
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
350
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
|
351
|
-
|
|
402
|
+
options.otherArgs.headers['x-goog-request-params'] =
|
|
403
|
+
this._gaxModule.routingHeader.fromParams({
|
|
404
|
+
parent: request.parent ?? '',
|
|
405
|
+
});
|
|
406
|
+
this.initialize().catch((err) => {
|
|
407
|
+
throw err;
|
|
352
408
|
});
|
|
353
|
-
this.initialize().catch(err => { throw err; });
|
|
354
409
|
this._log.info('createMessage request %j', request);
|
|
355
410
|
const wrappedCallback = callback
|
|
356
411
|
? (error, response, options, rawResponse) => {
|
|
@@ -358,12 +413,16 @@ class ChatServiceClient {
|
|
|
358
413
|
callback(error, response, options, rawResponse); // We verified callback above.
|
|
359
414
|
}
|
|
360
415
|
: undefined;
|
|
361
|
-
return this.innerApiCalls
|
|
416
|
+
return this.innerApiCalls
|
|
417
|
+
.createMessage(request, options, wrappedCallback)
|
|
362
418
|
?.then(([response, options, rawResponse]) => {
|
|
363
419
|
this._log.info('createMessage response %j', response);
|
|
364
420
|
return [response, options, rawResponse];
|
|
365
|
-
})
|
|
366
|
-
|
|
421
|
+
})
|
|
422
|
+
.catch((error) => {
|
|
423
|
+
if (error &&
|
|
424
|
+
'statusDetails' in error &&
|
|
425
|
+
error.statusDetails instanceof Array) {
|
|
367
426
|
const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
|
|
368
427
|
error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
|
|
369
428
|
}
|
|
@@ -383,10 +442,13 @@ class ChatServiceClient {
|
|
|
383
442
|
options = options || {};
|
|
384
443
|
options.otherArgs = options.otherArgs || {};
|
|
385
444
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
386
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
|
387
|
-
|
|
445
|
+
options.otherArgs.headers['x-goog-request-params'] =
|
|
446
|
+
this._gaxModule.routingHeader.fromParams({
|
|
447
|
+
name: request.name ?? '',
|
|
448
|
+
});
|
|
449
|
+
this.initialize().catch((err) => {
|
|
450
|
+
throw err;
|
|
388
451
|
});
|
|
389
|
-
this.initialize().catch(err => { throw err; });
|
|
390
452
|
this._log.info('getMembership request %j', request);
|
|
391
453
|
const wrappedCallback = callback
|
|
392
454
|
? (error, response, options, rawResponse) => {
|
|
@@ -394,12 +456,16 @@ class ChatServiceClient {
|
|
|
394
456
|
callback(error, response, options, rawResponse); // We verified callback above.
|
|
395
457
|
}
|
|
396
458
|
: undefined;
|
|
397
|
-
return this.innerApiCalls
|
|
459
|
+
return this.innerApiCalls
|
|
460
|
+
.getMembership(request, options, wrappedCallback)
|
|
398
461
|
?.then(([response, options, rawResponse]) => {
|
|
399
462
|
this._log.info('getMembership response %j', response);
|
|
400
463
|
return [response, options, rawResponse];
|
|
401
|
-
})
|
|
402
|
-
|
|
464
|
+
})
|
|
465
|
+
.catch((error) => {
|
|
466
|
+
if (error &&
|
|
467
|
+
'statusDetails' in error &&
|
|
468
|
+
error.statusDetails instanceof Array) {
|
|
403
469
|
const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
|
|
404
470
|
error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
|
|
405
471
|
}
|
|
@@ -419,10 +485,13 @@ class ChatServiceClient {
|
|
|
419
485
|
options = options || {};
|
|
420
486
|
options.otherArgs = options.otherArgs || {};
|
|
421
487
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
422
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
|
423
|
-
|
|
488
|
+
options.otherArgs.headers['x-goog-request-params'] =
|
|
489
|
+
this._gaxModule.routingHeader.fromParams({
|
|
490
|
+
name: request.name ?? '',
|
|
491
|
+
});
|
|
492
|
+
this.initialize().catch((err) => {
|
|
493
|
+
throw err;
|
|
424
494
|
});
|
|
425
|
-
this.initialize().catch(err => { throw err; });
|
|
426
495
|
this._log.info('getMessage request %j', request);
|
|
427
496
|
const wrappedCallback = callback
|
|
428
497
|
? (error, response, options, rawResponse) => {
|
|
@@ -430,12 +499,16 @@ class ChatServiceClient {
|
|
|
430
499
|
callback(error, response, options, rawResponse); // We verified callback above.
|
|
431
500
|
}
|
|
432
501
|
: undefined;
|
|
433
|
-
return this.innerApiCalls
|
|
502
|
+
return this.innerApiCalls
|
|
503
|
+
.getMessage(request, options, wrappedCallback)
|
|
434
504
|
?.then(([response, options, rawResponse]) => {
|
|
435
505
|
this._log.info('getMessage response %j', response);
|
|
436
506
|
return [response, options, rawResponse];
|
|
437
|
-
})
|
|
438
|
-
|
|
507
|
+
})
|
|
508
|
+
.catch((error) => {
|
|
509
|
+
if (error &&
|
|
510
|
+
'statusDetails' in error &&
|
|
511
|
+
error.statusDetails instanceof Array) {
|
|
439
512
|
const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
|
|
440
513
|
error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
|
|
441
514
|
}
|
|
@@ -455,10 +528,13 @@ class ChatServiceClient {
|
|
|
455
528
|
options = options || {};
|
|
456
529
|
options.otherArgs = options.otherArgs || {};
|
|
457
530
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
458
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
|
459
|
-
|
|
531
|
+
options.otherArgs.headers['x-goog-request-params'] =
|
|
532
|
+
this._gaxModule.routingHeader.fromParams({
|
|
533
|
+
'message.name': request.message.name ?? '',
|
|
534
|
+
});
|
|
535
|
+
this.initialize().catch((err) => {
|
|
536
|
+
throw err;
|
|
460
537
|
});
|
|
461
|
-
this.initialize().catch(err => { throw err; });
|
|
462
538
|
this._log.info('updateMessage request %j', request);
|
|
463
539
|
const wrappedCallback = callback
|
|
464
540
|
? (error, response, options, rawResponse) => {
|
|
@@ -466,12 +542,16 @@ class ChatServiceClient {
|
|
|
466
542
|
callback(error, response, options, rawResponse); // We verified callback above.
|
|
467
543
|
}
|
|
468
544
|
: undefined;
|
|
469
|
-
return this.innerApiCalls
|
|
545
|
+
return this.innerApiCalls
|
|
546
|
+
.updateMessage(request, options, wrappedCallback)
|
|
470
547
|
?.then(([response, options, rawResponse]) => {
|
|
471
548
|
this._log.info('updateMessage response %j', response);
|
|
472
549
|
return [response, options, rawResponse];
|
|
473
|
-
})
|
|
474
|
-
|
|
550
|
+
})
|
|
551
|
+
.catch((error) => {
|
|
552
|
+
if (error &&
|
|
553
|
+
'statusDetails' in error &&
|
|
554
|
+
error.statusDetails instanceof Array) {
|
|
475
555
|
const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
|
|
476
556
|
error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
|
|
477
557
|
}
|
|
@@ -491,10 +571,13 @@ class ChatServiceClient {
|
|
|
491
571
|
options = options || {};
|
|
492
572
|
options.otherArgs = options.otherArgs || {};
|
|
493
573
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
494
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
|
495
|
-
|
|
574
|
+
options.otherArgs.headers['x-goog-request-params'] =
|
|
575
|
+
this._gaxModule.routingHeader.fromParams({
|
|
576
|
+
name: request.name ?? '',
|
|
577
|
+
});
|
|
578
|
+
this.initialize().catch((err) => {
|
|
579
|
+
throw err;
|
|
496
580
|
});
|
|
497
|
-
this.initialize().catch(err => { throw err; });
|
|
498
581
|
this._log.info('deleteMessage request %j', request);
|
|
499
582
|
const wrappedCallback = callback
|
|
500
583
|
? (error, response, options, rawResponse) => {
|
|
@@ -502,12 +585,16 @@ class ChatServiceClient {
|
|
|
502
585
|
callback(error, response, options, rawResponse); // We verified callback above.
|
|
503
586
|
}
|
|
504
587
|
: undefined;
|
|
505
|
-
return this.innerApiCalls
|
|
588
|
+
return this.innerApiCalls
|
|
589
|
+
.deleteMessage(request, options, wrappedCallback)
|
|
506
590
|
?.then(([response, options, rawResponse]) => {
|
|
507
591
|
this._log.info('deleteMessage response %j', response);
|
|
508
592
|
return [response, options, rawResponse];
|
|
509
|
-
})
|
|
510
|
-
|
|
593
|
+
})
|
|
594
|
+
.catch((error) => {
|
|
595
|
+
if (error &&
|
|
596
|
+
'statusDetails' in error &&
|
|
597
|
+
error.statusDetails instanceof Array) {
|
|
511
598
|
const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
|
|
512
599
|
error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
|
|
513
600
|
}
|
|
@@ -527,10 +614,13 @@ class ChatServiceClient {
|
|
|
527
614
|
options = options || {};
|
|
528
615
|
options.otherArgs = options.otherArgs || {};
|
|
529
616
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
530
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
|
531
|
-
|
|
617
|
+
options.otherArgs.headers['x-goog-request-params'] =
|
|
618
|
+
this._gaxModule.routingHeader.fromParams({
|
|
619
|
+
name: request.name ?? '',
|
|
620
|
+
});
|
|
621
|
+
this.initialize().catch((err) => {
|
|
622
|
+
throw err;
|
|
532
623
|
});
|
|
533
|
-
this.initialize().catch(err => { throw err; });
|
|
534
624
|
this._log.info('getAttachment request %j', request);
|
|
535
625
|
const wrappedCallback = callback
|
|
536
626
|
? (error, response, options, rawResponse) => {
|
|
@@ -538,12 +628,16 @@ class ChatServiceClient {
|
|
|
538
628
|
callback(error, response, options, rawResponse); // We verified callback above.
|
|
539
629
|
}
|
|
540
630
|
: undefined;
|
|
541
|
-
return this.innerApiCalls
|
|
631
|
+
return this.innerApiCalls
|
|
632
|
+
.getAttachment(request, options, wrappedCallback)
|
|
542
633
|
?.then(([response, options, rawResponse]) => {
|
|
543
634
|
this._log.info('getAttachment response %j', response);
|
|
544
635
|
return [response, options, rawResponse];
|
|
545
|
-
})
|
|
546
|
-
|
|
636
|
+
})
|
|
637
|
+
.catch((error) => {
|
|
638
|
+
if (error &&
|
|
639
|
+
'statusDetails' in error &&
|
|
640
|
+
error.statusDetails instanceof Array) {
|
|
547
641
|
const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
|
|
548
642
|
error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
|
|
549
643
|
}
|
|
@@ -563,10 +657,13 @@ class ChatServiceClient {
|
|
|
563
657
|
options = options || {};
|
|
564
658
|
options.otherArgs = options.otherArgs || {};
|
|
565
659
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
566
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
|
567
|
-
|
|
660
|
+
options.otherArgs.headers['x-goog-request-params'] =
|
|
661
|
+
this._gaxModule.routingHeader.fromParams({
|
|
662
|
+
parent: request.parent ?? '',
|
|
663
|
+
});
|
|
664
|
+
this.initialize().catch((err) => {
|
|
665
|
+
throw err;
|
|
568
666
|
});
|
|
569
|
-
this.initialize().catch(err => { throw err; });
|
|
570
667
|
this._log.info('uploadAttachment request %j', request);
|
|
571
668
|
const wrappedCallback = callback
|
|
572
669
|
? (error, response, options, rawResponse) => {
|
|
@@ -574,12 +671,16 @@ class ChatServiceClient {
|
|
|
574
671
|
callback(error, response, options, rawResponse); // We verified callback above.
|
|
575
672
|
}
|
|
576
673
|
: undefined;
|
|
577
|
-
return this.innerApiCalls
|
|
674
|
+
return this.innerApiCalls
|
|
675
|
+
.uploadAttachment(request, options, wrappedCallback)
|
|
578
676
|
?.then(([response, options, rawResponse]) => {
|
|
579
677
|
this._log.info('uploadAttachment response %j', response);
|
|
580
678
|
return [response, options, rawResponse];
|
|
581
|
-
})
|
|
582
|
-
|
|
679
|
+
})
|
|
680
|
+
.catch((error) => {
|
|
681
|
+
if (error &&
|
|
682
|
+
'statusDetails' in error &&
|
|
683
|
+
error.statusDetails instanceof Array) {
|
|
583
684
|
const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
|
|
584
685
|
error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
|
|
585
686
|
}
|
|
@@ -599,10 +700,13 @@ class ChatServiceClient {
|
|
|
599
700
|
options = options || {};
|
|
600
701
|
options.otherArgs = options.otherArgs || {};
|
|
601
702
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
602
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
|
603
|
-
|
|
703
|
+
options.otherArgs.headers['x-goog-request-params'] =
|
|
704
|
+
this._gaxModule.routingHeader.fromParams({
|
|
705
|
+
name: request.name ?? '',
|
|
706
|
+
});
|
|
707
|
+
this.initialize().catch((err) => {
|
|
708
|
+
throw err;
|
|
604
709
|
});
|
|
605
|
-
this.initialize().catch(err => { throw err; });
|
|
606
710
|
this._log.info('getSpace request %j', request);
|
|
607
711
|
const wrappedCallback = callback
|
|
608
712
|
? (error, response, options, rawResponse) => {
|
|
@@ -610,12 +714,16 @@ class ChatServiceClient {
|
|
|
610
714
|
callback(error, response, options, rawResponse); // We verified callback above.
|
|
611
715
|
}
|
|
612
716
|
: undefined;
|
|
613
|
-
return this.innerApiCalls
|
|
717
|
+
return this.innerApiCalls
|
|
718
|
+
.getSpace(request, options, wrappedCallback)
|
|
614
719
|
?.then(([response, options, rawResponse]) => {
|
|
615
720
|
this._log.info('getSpace response %j', response);
|
|
616
721
|
return [response, options, rawResponse];
|
|
617
|
-
})
|
|
618
|
-
|
|
722
|
+
})
|
|
723
|
+
.catch((error) => {
|
|
724
|
+
if (error &&
|
|
725
|
+
'statusDetails' in error &&
|
|
726
|
+
error.statusDetails instanceof Array) {
|
|
619
727
|
const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
|
|
620
728
|
error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
|
|
621
729
|
}
|
|
@@ -635,7 +743,9 @@ class ChatServiceClient {
|
|
|
635
743
|
options = options || {};
|
|
636
744
|
options.otherArgs = options.otherArgs || {};
|
|
637
745
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
638
|
-
this.initialize().catch(err => {
|
|
746
|
+
this.initialize().catch((err) => {
|
|
747
|
+
throw err;
|
|
748
|
+
});
|
|
639
749
|
this._log.info('createSpace request %j', request);
|
|
640
750
|
const wrappedCallback = callback
|
|
641
751
|
? (error, response, options, rawResponse) => {
|
|
@@ -643,12 +753,16 @@ class ChatServiceClient {
|
|
|
643
753
|
callback(error, response, options, rawResponse); // We verified callback above.
|
|
644
754
|
}
|
|
645
755
|
: undefined;
|
|
646
|
-
return this.innerApiCalls
|
|
756
|
+
return this.innerApiCalls
|
|
757
|
+
.createSpace(request, options, wrappedCallback)
|
|
647
758
|
?.then(([response, options, rawResponse]) => {
|
|
648
759
|
this._log.info('createSpace response %j', response);
|
|
649
760
|
return [response, options, rawResponse];
|
|
650
|
-
})
|
|
651
|
-
|
|
761
|
+
})
|
|
762
|
+
.catch((error) => {
|
|
763
|
+
if (error &&
|
|
764
|
+
'statusDetails' in error &&
|
|
765
|
+
error.statusDetails instanceof Array) {
|
|
652
766
|
const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
|
|
653
767
|
error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
|
|
654
768
|
}
|
|
@@ -668,7 +782,9 @@ class ChatServiceClient {
|
|
|
668
782
|
options = options || {};
|
|
669
783
|
options.otherArgs = options.otherArgs || {};
|
|
670
784
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
671
|
-
this.initialize().catch(err => {
|
|
785
|
+
this.initialize().catch((err) => {
|
|
786
|
+
throw err;
|
|
787
|
+
});
|
|
672
788
|
this._log.info('setUpSpace request %j', request);
|
|
673
789
|
const wrappedCallback = callback
|
|
674
790
|
? (error, response, options, rawResponse) => {
|
|
@@ -676,12 +792,16 @@ class ChatServiceClient {
|
|
|
676
792
|
callback(error, response, options, rawResponse); // We verified callback above.
|
|
677
793
|
}
|
|
678
794
|
: undefined;
|
|
679
|
-
return this.innerApiCalls
|
|
795
|
+
return this.innerApiCalls
|
|
796
|
+
.setUpSpace(request, options, wrappedCallback)
|
|
680
797
|
?.then(([response, options, rawResponse]) => {
|
|
681
798
|
this._log.info('setUpSpace response %j', response);
|
|
682
799
|
return [response, options, rawResponse];
|
|
683
|
-
})
|
|
684
|
-
|
|
800
|
+
})
|
|
801
|
+
.catch((error) => {
|
|
802
|
+
if (error &&
|
|
803
|
+
'statusDetails' in error &&
|
|
804
|
+
error.statusDetails instanceof Array) {
|
|
685
805
|
const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
|
|
686
806
|
error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
|
|
687
807
|
}
|
|
@@ -701,10 +821,13 @@ class ChatServiceClient {
|
|
|
701
821
|
options = options || {};
|
|
702
822
|
options.otherArgs = options.otherArgs || {};
|
|
703
823
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
704
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
|
705
|
-
|
|
824
|
+
options.otherArgs.headers['x-goog-request-params'] =
|
|
825
|
+
this._gaxModule.routingHeader.fromParams({
|
|
826
|
+
'space.name': request.space.name ?? '',
|
|
827
|
+
});
|
|
828
|
+
this.initialize().catch((err) => {
|
|
829
|
+
throw err;
|
|
706
830
|
});
|
|
707
|
-
this.initialize().catch(err => { throw err; });
|
|
708
831
|
this._log.info('updateSpace request %j', request);
|
|
709
832
|
const wrappedCallback = callback
|
|
710
833
|
? (error, response, options, rawResponse) => {
|
|
@@ -712,12 +835,16 @@ class ChatServiceClient {
|
|
|
712
835
|
callback(error, response, options, rawResponse); // We verified callback above.
|
|
713
836
|
}
|
|
714
837
|
: undefined;
|
|
715
|
-
return this.innerApiCalls
|
|
838
|
+
return this.innerApiCalls
|
|
839
|
+
.updateSpace(request, options, wrappedCallback)
|
|
716
840
|
?.then(([response, options, rawResponse]) => {
|
|
717
841
|
this._log.info('updateSpace response %j', response);
|
|
718
842
|
return [response, options, rawResponse];
|
|
719
|
-
})
|
|
720
|
-
|
|
843
|
+
})
|
|
844
|
+
.catch((error) => {
|
|
845
|
+
if (error &&
|
|
846
|
+
'statusDetails' in error &&
|
|
847
|
+
error.statusDetails instanceof Array) {
|
|
721
848
|
const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
|
|
722
849
|
error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
|
|
723
850
|
}
|
|
@@ -737,10 +864,13 @@ class ChatServiceClient {
|
|
|
737
864
|
options = options || {};
|
|
738
865
|
options.otherArgs = options.otherArgs || {};
|
|
739
866
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
740
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
|
741
|
-
|
|
867
|
+
options.otherArgs.headers['x-goog-request-params'] =
|
|
868
|
+
this._gaxModule.routingHeader.fromParams({
|
|
869
|
+
name: request.name ?? '',
|
|
870
|
+
});
|
|
871
|
+
this.initialize().catch((err) => {
|
|
872
|
+
throw err;
|
|
742
873
|
});
|
|
743
|
-
this.initialize().catch(err => { throw err; });
|
|
744
874
|
this._log.info('deleteSpace request %j', request);
|
|
745
875
|
const wrappedCallback = callback
|
|
746
876
|
? (error, response, options, rawResponse) => {
|
|
@@ -748,12 +878,16 @@ class ChatServiceClient {
|
|
|
748
878
|
callback(error, response, options, rawResponse); // We verified callback above.
|
|
749
879
|
}
|
|
750
880
|
: undefined;
|
|
751
|
-
return this.innerApiCalls
|
|
881
|
+
return this.innerApiCalls
|
|
882
|
+
.deleteSpace(request, options, wrappedCallback)
|
|
752
883
|
?.then(([response, options, rawResponse]) => {
|
|
753
884
|
this._log.info('deleteSpace response %j', response);
|
|
754
885
|
return [response, options, rawResponse];
|
|
755
|
-
})
|
|
756
|
-
|
|
886
|
+
})
|
|
887
|
+
.catch((error) => {
|
|
888
|
+
if (error &&
|
|
889
|
+
'statusDetails' in error &&
|
|
890
|
+
error.statusDetails instanceof Array) {
|
|
757
891
|
const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
|
|
758
892
|
error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
|
|
759
893
|
}
|
|
@@ -773,10 +907,13 @@ class ChatServiceClient {
|
|
|
773
907
|
options = options || {};
|
|
774
908
|
options.otherArgs = options.otherArgs || {};
|
|
775
909
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
776
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
|
777
|
-
|
|
910
|
+
options.otherArgs.headers['x-goog-request-params'] =
|
|
911
|
+
this._gaxModule.routingHeader.fromParams({
|
|
912
|
+
name: request.name ?? '',
|
|
913
|
+
});
|
|
914
|
+
this.initialize().catch((err) => {
|
|
915
|
+
throw err;
|
|
778
916
|
});
|
|
779
|
-
this.initialize().catch(err => { throw err; });
|
|
780
917
|
this._log.info('completeImportSpace request %j', request);
|
|
781
918
|
const wrappedCallback = callback
|
|
782
919
|
? (error, response, options, rawResponse) => {
|
|
@@ -784,12 +921,16 @@ class ChatServiceClient {
|
|
|
784
921
|
callback(error, response, options, rawResponse); // We verified callback above.
|
|
785
922
|
}
|
|
786
923
|
: undefined;
|
|
787
|
-
return this.innerApiCalls
|
|
924
|
+
return this.innerApiCalls
|
|
925
|
+
.completeImportSpace(request, options, wrappedCallback)
|
|
788
926
|
?.then(([response, options, rawResponse]) => {
|
|
789
927
|
this._log.info('completeImportSpace response %j', response);
|
|
790
928
|
return [response, options, rawResponse];
|
|
791
|
-
})
|
|
792
|
-
|
|
929
|
+
})
|
|
930
|
+
.catch((error) => {
|
|
931
|
+
if (error &&
|
|
932
|
+
'statusDetails' in error &&
|
|
933
|
+
error.statusDetails instanceof Array) {
|
|
793
934
|
const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
|
|
794
935
|
error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
|
|
795
936
|
}
|
|
@@ -809,7 +950,9 @@ class ChatServiceClient {
|
|
|
809
950
|
options = options || {};
|
|
810
951
|
options.otherArgs = options.otherArgs || {};
|
|
811
952
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
812
|
-
this.initialize().catch(err => {
|
|
953
|
+
this.initialize().catch((err) => {
|
|
954
|
+
throw err;
|
|
955
|
+
});
|
|
813
956
|
this._log.info('findDirectMessage request %j', request);
|
|
814
957
|
const wrappedCallback = callback
|
|
815
958
|
? (error, response, options, rawResponse) => {
|
|
@@ -817,12 +960,16 @@ class ChatServiceClient {
|
|
|
817
960
|
callback(error, response, options, rawResponse); // We verified callback above.
|
|
818
961
|
}
|
|
819
962
|
: undefined;
|
|
820
|
-
return this.innerApiCalls
|
|
963
|
+
return this.innerApiCalls
|
|
964
|
+
.findDirectMessage(request, options, wrappedCallback)
|
|
821
965
|
?.then(([response, options, rawResponse]) => {
|
|
822
966
|
this._log.info('findDirectMessage response %j', response);
|
|
823
967
|
return [response, options, rawResponse];
|
|
824
|
-
})
|
|
825
|
-
|
|
968
|
+
})
|
|
969
|
+
.catch((error) => {
|
|
970
|
+
if (error &&
|
|
971
|
+
'statusDetails' in error &&
|
|
972
|
+
error.statusDetails instanceof Array) {
|
|
826
973
|
const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
|
|
827
974
|
error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
|
|
828
975
|
}
|
|
@@ -842,10 +989,13 @@ class ChatServiceClient {
|
|
|
842
989
|
options = options || {};
|
|
843
990
|
options.otherArgs = options.otherArgs || {};
|
|
844
991
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
845
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
|
846
|
-
|
|
992
|
+
options.otherArgs.headers['x-goog-request-params'] =
|
|
993
|
+
this._gaxModule.routingHeader.fromParams({
|
|
994
|
+
parent: request.parent ?? '',
|
|
995
|
+
});
|
|
996
|
+
this.initialize().catch((err) => {
|
|
997
|
+
throw err;
|
|
847
998
|
});
|
|
848
|
-
this.initialize().catch(err => { throw err; });
|
|
849
999
|
this._log.info('createMembership request %j', request);
|
|
850
1000
|
const wrappedCallback = callback
|
|
851
1001
|
? (error, response, options, rawResponse) => {
|
|
@@ -853,12 +1003,16 @@ class ChatServiceClient {
|
|
|
853
1003
|
callback(error, response, options, rawResponse); // We verified callback above.
|
|
854
1004
|
}
|
|
855
1005
|
: undefined;
|
|
856
|
-
return this.innerApiCalls
|
|
1006
|
+
return this.innerApiCalls
|
|
1007
|
+
.createMembership(request, options, wrappedCallback)
|
|
857
1008
|
?.then(([response, options, rawResponse]) => {
|
|
858
1009
|
this._log.info('createMembership response %j', response);
|
|
859
1010
|
return [response, options, rawResponse];
|
|
860
|
-
})
|
|
861
|
-
|
|
1011
|
+
})
|
|
1012
|
+
.catch((error) => {
|
|
1013
|
+
if (error &&
|
|
1014
|
+
'statusDetails' in error &&
|
|
1015
|
+
error.statusDetails instanceof Array) {
|
|
862
1016
|
const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
|
|
863
1017
|
error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
|
|
864
1018
|
}
|
|
@@ -878,10 +1032,13 @@ class ChatServiceClient {
|
|
|
878
1032
|
options = options || {};
|
|
879
1033
|
options.otherArgs = options.otherArgs || {};
|
|
880
1034
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
881
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
|
882
|
-
|
|
1035
|
+
options.otherArgs.headers['x-goog-request-params'] =
|
|
1036
|
+
this._gaxModule.routingHeader.fromParams({
|
|
1037
|
+
'membership.name': request.membership.name ?? '',
|
|
1038
|
+
});
|
|
1039
|
+
this.initialize().catch((err) => {
|
|
1040
|
+
throw err;
|
|
883
1041
|
});
|
|
884
|
-
this.initialize().catch(err => { throw err; });
|
|
885
1042
|
this._log.info('updateMembership request %j', request);
|
|
886
1043
|
const wrappedCallback = callback
|
|
887
1044
|
? (error, response, options, rawResponse) => {
|
|
@@ -889,12 +1046,16 @@ class ChatServiceClient {
|
|
|
889
1046
|
callback(error, response, options, rawResponse); // We verified callback above.
|
|
890
1047
|
}
|
|
891
1048
|
: undefined;
|
|
892
|
-
return this.innerApiCalls
|
|
1049
|
+
return this.innerApiCalls
|
|
1050
|
+
.updateMembership(request, options, wrappedCallback)
|
|
893
1051
|
?.then(([response, options, rawResponse]) => {
|
|
894
1052
|
this._log.info('updateMembership response %j', response);
|
|
895
1053
|
return [response, options, rawResponse];
|
|
896
|
-
})
|
|
897
|
-
|
|
1054
|
+
})
|
|
1055
|
+
.catch((error) => {
|
|
1056
|
+
if (error &&
|
|
1057
|
+
'statusDetails' in error &&
|
|
1058
|
+
error.statusDetails instanceof Array) {
|
|
898
1059
|
const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
|
|
899
1060
|
error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
|
|
900
1061
|
}
|
|
@@ -914,10 +1075,13 @@ class ChatServiceClient {
|
|
|
914
1075
|
options = options || {};
|
|
915
1076
|
options.otherArgs = options.otherArgs || {};
|
|
916
1077
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
917
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
|
918
|
-
|
|
1078
|
+
options.otherArgs.headers['x-goog-request-params'] =
|
|
1079
|
+
this._gaxModule.routingHeader.fromParams({
|
|
1080
|
+
name: request.name ?? '',
|
|
1081
|
+
});
|
|
1082
|
+
this.initialize().catch((err) => {
|
|
1083
|
+
throw err;
|
|
919
1084
|
});
|
|
920
|
-
this.initialize().catch(err => { throw err; });
|
|
921
1085
|
this._log.info('deleteMembership request %j', request);
|
|
922
1086
|
const wrappedCallback = callback
|
|
923
1087
|
? (error, response, options, rawResponse) => {
|
|
@@ -925,12 +1089,16 @@ class ChatServiceClient {
|
|
|
925
1089
|
callback(error, response, options, rawResponse); // We verified callback above.
|
|
926
1090
|
}
|
|
927
1091
|
: undefined;
|
|
928
|
-
return this.innerApiCalls
|
|
1092
|
+
return this.innerApiCalls
|
|
1093
|
+
.deleteMembership(request, options, wrappedCallback)
|
|
929
1094
|
?.then(([response, options, rawResponse]) => {
|
|
930
1095
|
this._log.info('deleteMembership response %j', response);
|
|
931
1096
|
return [response, options, rawResponse];
|
|
932
|
-
})
|
|
933
|
-
|
|
1097
|
+
})
|
|
1098
|
+
.catch((error) => {
|
|
1099
|
+
if (error &&
|
|
1100
|
+
'statusDetails' in error &&
|
|
1101
|
+
error.statusDetails instanceof Array) {
|
|
934
1102
|
const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
|
|
935
1103
|
error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
|
|
936
1104
|
}
|
|
@@ -950,10 +1118,13 @@ class ChatServiceClient {
|
|
|
950
1118
|
options = options || {};
|
|
951
1119
|
options.otherArgs = options.otherArgs || {};
|
|
952
1120
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
953
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
|
954
|
-
|
|
1121
|
+
options.otherArgs.headers['x-goog-request-params'] =
|
|
1122
|
+
this._gaxModule.routingHeader.fromParams({
|
|
1123
|
+
parent: request.parent ?? '',
|
|
1124
|
+
});
|
|
1125
|
+
this.initialize().catch((err) => {
|
|
1126
|
+
throw err;
|
|
955
1127
|
});
|
|
956
|
-
this.initialize().catch(err => { throw err; });
|
|
957
1128
|
this._log.info('createReaction request %j', request);
|
|
958
1129
|
const wrappedCallback = callback
|
|
959
1130
|
? (error, response, options, rawResponse) => {
|
|
@@ -961,12 +1132,16 @@ class ChatServiceClient {
|
|
|
961
1132
|
callback(error, response, options, rawResponse); // We verified callback above.
|
|
962
1133
|
}
|
|
963
1134
|
: undefined;
|
|
964
|
-
return this.innerApiCalls
|
|
1135
|
+
return this.innerApiCalls
|
|
1136
|
+
.createReaction(request, options, wrappedCallback)
|
|
965
1137
|
?.then(([response, options, rawResponse]) => {
|
|
966
1138
|
this._log.info('createReaction response %j', response);
|
|
967
1139
|
return [response, options, rawResponse];
|
|
968
|
-
})
|
|
969
|
-
|
|
1140
|
+
})
|
|
1141
|
+
.catch((error) => {
|
|
1142
|
+
if (error &&
|
|
1143
|
+
'statusDetails' in error &&
|
|
1144
|
+
error.statusDetails instanceof Array) {
|
|
970
1145
|
const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
|
|
971
1146
|
error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
|
|
972
1147
|
}
|
|
@@ -986,10 +1161,13 @@ class ChatServiceClient {
|
|
|
986
1161
|
options = options || {};
|
|
987
1162
|
options.otherArgs = options.otherArgs || {};
|
|
988
1163
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
989
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
|
990
|
-
|
|
1164
|
+
options.otherArgs.headers['x-goog-request-params'] =
|
|
1165
|
+
this._gaxModule.routingHeader.fromParams({
|
|
1166
|
+
name: request.name ?? '',
|
|
1167
|
+
});
|
|
1168
|
+
this.initialize().catch((err) => {
|
|
1169
|
+
throw err;
|
|
991
1170
|
});
|
|
992
|
-
this.initialize().catch(err => { throw err; });
|
|
993
1171
|
this._log.info('deleteReaction request %j', request);
|
|
994
1172
|
const wrappedCallback = callback
|
|
995
1173
|
? (error, response, options, rawResponse) => {
|
|
@@ -997,12 +1175,16 @@ class ChatServiceClient {
|
|
|
997
1175
|
callback(error, response, options, rawResponse); // We verified callback above.
|
|
998
1176
|
}
|
|
999
1177
|
: undefined;
|
|
1000
|
-
return this.innerApiCalls
|
|
1178
|
+
return this.innerApiCalls
|
|
1179
|
+
.deleteReaction(request, options, wrappedCallback)
|
|
1001
1180
|
?.then(([response, options, rawResponse]) => {
|
|
1002
1181
|
this._log.info('deleteReaction response %j', response);
|
|
1003
1182
|
return [response, options, rawResponse];
|
|
1004
|
-
})
|
|
1005
|
-
|
|
1183
|
+
})
|
|
1184
|
+
.catch((error) => {
|
|
1185
|
+
if (error &&
|
|
1186
|
+
'statusDetails' in error &&
|
|
1187
|
+
error.statusDetails instanceof Array) {
|
|
1006
1188
|
const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
|
|
1007
1189
|
error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
|
|
1008
1190
|
}
|
|
@@ -1022,7 +1204,9 @@ class ChatServiceClient {
|
|
|
1022
1204
|
options = options || {};
|
|
1023
1205
|
options.otherArgs = options.otherArgs || {};
|
|
1024
1206
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
1025
|
-
this.initialize().catch(err => {
|
|
1207
|
+
this.initialize().catch((err) => {
|
|
1208
|
+
throw err;
|
|
1209
|
+
});
|
|
1026
1210
|
this._log.info('createCustomEmoji request %j', request);
|
|
1027
1211
|
const wrappedCallback = callback
|
|
1028
1212
|
? (error, response, options, rawResponse) => {
|
|
@@ -1030,12 +1214,16 @@ class ChatServiceClient {
|
|
|
1030
1214
|
callback(error, response, options, rawResponse); // We verified callback above.
|
|
1031
1215
|
}
|
|
1032
1216
|
: undefined;
|
|
1033
|
-
return this.innerApiCalls
|
|
1217
|
+
return this.innerApiCalls
|
|
1218
|
+
.createCustomEmoji(request, options, wrappedCallback)
|
|
1034
1219
|
?.then(([response, options, rawResponse]) => {
|
|
1035
1220
|
this._log.info('createCustomEmoji response %j', response);
|
|
1036
1221
|
return [response, options, rawResponse];
|
|
1037
|
-
})
|
|
1038
|
-
|
|
1222
|
+
})
|
|
1223
|
+
.catch((error) => {
|
|
1224
|
+
if (error &&
|
|
1225
|
+
'statusDetails' in error &&
|
|
1226
|
+
error.statusDetails instanceof Array) {
|
|
1039
1227
|
const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
|
|
1040
1228
|
error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
|
|
1041
1229
|
}
|
|
@@ -1055,10 +1243,13 @@ class ChatServiceClient {
|
|
|
1055
1243
|
options = options || {};
|
|
1056
1244
|
options.otherArgs = options.otherArgs || {};
|
|
1057
1245
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
1058
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
|
1059
|
-
|
|
1246
|
+
options.otherArgs.headers['x-goog-request-params'] =
|
|
1247
|
+
this._gaxModule.routingHeader.fromParams({
|
|
1248
|
+
name: request.name ?? '',
|
|
1249
|
+
});
|
|
1250
|
+
this.initialize().catch((err) => {
|
|
1251
|
+
throw err;
|
|
1060
1252
|
});
|
|
1061
|
-
this.initialize().catch(err => { throw err; });
|
|
1062
1253
|
this._log.info('getCustomEmoji request %j', request);
|
|
1063
1254
|
const wrappedCallback = callback
|
|
1064
1255
|
? (error, response, options, rawResponse) => {
|
|
@@ -1066,12 +1257,16 @@ class ChatServiceClient {
|
|
|
1066
1257
|
callback(error, response, options, rawResponse); // We verified callback above.
|
|
1067
1258
|
}
|
|
1068
1259
|
: undefined;
|
|
1069
|
-
return this.innerApiCalls
|
|
1260
|
+
return this.innerApiCalls
|
|
1261
|
+
.getCustomEmoji(request, options, wrappedCallback)
|
|
1070
1262
|
?.then(([response, options, rawResponse]) => {
|
|
1071
1263
|
this._log.info('getCustomEmoji response %j', response);
|
|
1072
1264
|
return [response, options, rawResponse];
|
|
1073
|
-
})
|
|
1074
|
-
|
|
1265
|
+
})
|
|
1266
|
+
.catch((error) => {
|
|
1267
|
+
if (error &&
|
|
1268
|
+
'statusDetails' in error &&
|
|
1269
|
+
error.statusDetails instanceof Array) {
|
|
1075
1270
|
const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
|
|
1076
1271
|
error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
|
|
1077
1272
|
}
|
|
@@ -1091,10 +1286,13 @@ class ChatServiceClient {
|
|
|
1091
1286
|
options = options || {};
|
|
1092
1287
|
options.otherArgs = options.otherArgs || {};
|
|
1093
1288
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
1094
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
|
1095
|
-
|
|
1289
|
+
options.otherArgs.headers['x-goog-request-params'] =
|
|
1290
|
+
this._gaxModule.routingHeader.fromParams({
|
|
1291
|
+
name: request.name ?? '',
|
|
1292
|
+
});
|
|
1293
|
+
this.initialize().catch((err) => {
|
|
1294
|
+
throw err;
|
|
1096
1295
|
});
|
|
1097
|
-
this.initialize().catch(err => { throw err; });
|
|
1098
1296
|
this._log.info('deleteCustomEmoji request %j', request);
|
|
1099
1297
|
const wrappedCallback = callback
|
|
1100
1298
|
? (error, response, options, rawResponse) => {
|
|
@@ -1102,12 +1300,16 @@ class ChatServiceClient {
|
|
|
1102
1300
|
callback(error, response, options, rawResponse); // We verified callback above.
|
|
1103
1301
|
}
|
|
1104
1302
|
: undefined;
|
|
1105
|
-
return this.innerApiCalls
|
|
1303
|
+
return this.innerApiCalls
|
|
1304
|
+
.deleteCustomEmoji(request, options, wrappedCallback)
|
|
1106
1305
|
?.then(([response, options, rawResponse]) => {
|
|
1107
1306
|
this._log.info('deleteCustomEmoji response %j', response);
|
|
1108
1307
|
return [response, options, rawResponse];
|
|
1109
|
-
})
|
|
1110
|
-
|
|
1308
|
+
})
|
|
1309
|
+
.catch((error) => {
|
|
1310
|
+
if (error &&
|
|
1311
|
+
'statusDetails' in error &&
|
|
1312
|
+
error.statusDetails instanceof Array) {
|
|
1111
1313
|
const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
|
|
1112
1314
|
error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
|
|
1113
1315
|
}
|
|
@@ -1127,10 +1329,13 @@ class ChatServiceClient {
|
|
|
1127
1329
|
options = options || {};
|
|
1128
1330
|
options.otherArgs = options.otherArgs || {};
|
|
1129
1331
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
1130
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
|
1131
|
-
|
|
1332
|
+
options.otherArgs.headers['x-goog-request-params'] =
|
|
1333
|
+
this._gaxModule.routingHeader.fromParams({
|
|
1334
|
+
name: request.name ?? '',
|
|
1335
|
+
});
|
|
1336
|
+
this.initialize().catch((err) => {
|
|
1337
|
+
throw err;
|
|
1132
1338
|
});
|
|
1133
|
-
this.initialize().catch(err => { throw err; });
|
|
1134
1339
|
this._log.info('getSpaceReadState request %j', request);
|
|
1135
1340
|
const wrappedCallback = callback
|
|
1136
1341
|
? (error, response, options, rawResponse) => {
|
|
@@ -1138,12 +1343,16 @@ class ChatServiceClient {
|
|
|
1138
1343
|
callback(error, response, options, rawResponse); // We verified callback above.
|
|
1139
1344
|
}
|
|
1140
1345
|
: undefined;
|
|
1141
|
-
return this.innerApiCalls
|
|
1346
|
+
return this.innerApiCalls
|
|
1347
|
+
.getSpaceReadState(request, options, wrappedCallback)
|
|
1142
1348
|
?.then(([response, options, rawResponse]) => {
|
|
1143
1349
|
this._log.info('getSpaceReadState response %j', response);
|
|
1144
1350
|
return [response, options, rawResponse];
|
|
1145
|
-
})
|
|
1146
|
-
|
|
1351
|
+
})
|
|
1352
|
+
.catch((error) => {
|
|
1353
|
+
if (error &&
|
|
1354
|
+
'statusDetails' in error &&
|
|
1355
|
+
error.statusDetails instanceof Array) {
|
|
1147
1356
|
const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
|
|
1148
1357
|
error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
|
|
1149
1358
|
}
|
|
@@ -1163,10 +1372,13 @@ class ChatServiceClient {
|
|
|
1163
1372
|
options = options || {};
|
|
1164
1373
|
options.otherArgs = options.otherArgs || {};
|
|
1165
1374
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
1166
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
|
1167
|
-
|
|
1375
|
+
options.otherArgs.headers['x-goog-request-params'] =
|
|
1376
|
+
this._gaxModule.routingHeader.fromParams({
|
|
1377
|
+
'space_read_state.name': request.spaceReadState.name ?? '',
|
|
1378
|
+
});
|
|
1379
|
+
this.initialize().catch((err) => {
|
|
1380
|
+
throw err;
|
|
1168
1381
|
});
|
|
1169
|
-
this.initialize().catch(err => { throw err; });
|
|
1170
1382
|
this._log.info('updateSpaceReadState request %j', request);
|
|
1171
1383
|
const wrappedCallback = callback
|
|
1172
1384
|
? (error, response, options, rawResponse) => {
|
|
@@ -1174,12 +1386,16 @@ class ChatServiceClient {
|
|
|
1174
1386
|
callback(error, response, options, rawResponse); // We verified callback above.
|
|
1175
1387
|
}
|
|
1176
1388
|
: undefined;
|
|
1177
|
-
return this.innerApiCalls
|
|
1389
|
+
return this.innerApiCalls
|
|
1390
|
+
.updateSpaceReadState(request, options, wrappedCallback)
|
|
1178
1391
|
?.then(([response, options, rawResponse]) => {
|
|
1179
1392
|
this._log.info('updateSpaceReadState response %j', response);
|
|
1180
1393
|
return [response, options, rawResponse];
|
|
1181
|
-
})
|
|
1182
|
-
|
|
1394
|
+
})
|
|
1395
|
+
.catch((error) => {
|
|
1396
|
+
if (error &&
|
|
1397
|
+
'statusDetails' in error &&
|
|
1398
|
+
error.statusDetails instanceof Array) {
|
|
1183
1399
|
const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
|
|
1184
1400
|
error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
|
|
1185
1401
|
}
|
|
@@ -1199,10 +1415,13 @@ class ChatServiceClient {
|
|
|
1199
1415
|
options = options || {};
|
|
1200
1416
|
options.otherArgs = options.otherArgs || {};
|
|
1201
1417
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
1202
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
|
1203
|
-
|
|
1418
|
+
options.otherArgs.headers['x-goog-request-params'] =
|
|
1419
|
+
this._gaxModule.routingHeader.fromParams({
|
|
1420
|
+
name: request.name ?? '',
|
|
1421
|
+
});
|
|
1422
|
+
this.initialize().catch((err) => {
|
|
1423
|
+
throw err;
|
|
1204
1424
|
});
|
|
1205
|
-
this.initialize().catch(err => { throw err; });
|
|
1206
1425
|
this._log.info('getThreadReadState request %j', request);
|
|
1207
1426
|
const wrappedCallback = callback
|
|
1208
1427
|
? (error, response, options, rawResponse) => {
|
|
@@ -1210,12 +1429,16 @@ class ChatServiceClient {
|
|
|
1210
1429
|
callback(error, response, options, rawResponse); // We verified callback above.
|
|
1211
1430
|
}
|
|
1212
1431
|
: undefined;
|
|
1213
|
-
return this.innerApiCalls
|
|
1432
|
+
return this.innerApiCalls
|
|
1433
|
+
.getThreadReadState(request, options, wrappedCallback)
|
|
1214
1434
|
?.then(([response, options, rawResponse]) => {
|
|
1215
1435
|
this._log.info('getThreadReadState response %j', response);
|
|
1216
1436
|
return [response, options, rawResponse];
|
|
1217
|
-
})
|
|
1218
|
-
|
|
1437
|
+
})
|
|
1438
|
+
.catch((error) => {
|
|
1439
|
+
if (error &&
|
|
1440
|
+
'statusDetails' in error &&
|
|
1441
|
+
error.statusDetails instanceof Array) {
|
|
1219
1442
|
const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
|
|
1220
1443
|
error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
|
|
1221
1444
|
}
|
|
@@ -1235,10 +1458,13 @@ class ChatServiceClient {
|
|
|
1235
1458
|
options = options || {};
|
|
1236
1459
|
options.otherArgs = options.otherArgs || {};
|
|
1237
1460
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
1238
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
|
1239
|
-
|
|
1461
|
+
options.otherArgs.headers['x-goog-request-params'] =
|
|
1462
|
+
this._gaxModule.routingHeader.fromParams({
|
|
1463
|
+
name: request.name ?? '',
|
|
1464
|
+
});
|
|
1465
|
+
this.initialize().catch((err) => {
|
|
1466
|
+
throw err;
|
|
1240
1467
|
});
|
|
1241
|
-
this.initialize().catch(err => { throw err; });
|
|
1242
1468
|
this._log.info('getSpaceEvent request %j', request);
|
|
1243
1469
|
const wrappedCallback = callback
|
|
1244
1470
|
? (error, response, options, rawResponse) => {
|
|
@@ -1246,12 +1472,16 @@ class ChatServiceClient {
|
|
|
1246
1472
|
callback(error, response, options, rawResponse); // We verified callback above.
|
|
1247
1473
|
}
|
|
1248
1474
|
: undefined;
|
|
1249
|
-
return this.innerApiCalls
|
|
1475
|
+
return this.innerApiCalls
|
|
1476
|
+
.getSpaceEvent(request, options, wrappedCallback)
|
|
1250
1477
|
?.then(([response, options, rawResponse]) => {
|
|
1251
1478
|
this._log.info('getSpaceEvent response %j', response);
|
|
1252
1479
|
return [response, options, rawResponse];
|
|
1253
|
-
})
|
|
1254
|
-
|
|
1480
|
+
})
|
|
1481
|
+
.catch((error) => {
|
|
1482
|
+
if (error &&
|
|
1483
|
+
'statusDetails' in error &&
|
|
1484
|
+
error.statusDetails instanceof Array) {
|
|
1255
1485
|
const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
|
|
1256
1486
|
error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
|
|
1257
1487
|
}
|
|
@@ -1271,10 +1501,13 @@ class ChatServiceClient {
|
|
|
1271
1501
|
options = options || {};
|
|
1272
1502
|
options.otherArgs = options.otherArgs || {};
|
|
1273
1503
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
1274
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
|
1275
|
-
|
|
1504
|
+
options.otherArgs.headers['x-goog-request-params'] =
|
|
1505
|
+
this._gaxModule.routingHeader.fromParams({
|
|
1506
|
+
name: request.name ?? '',
|
|
1507
|
+
});
|
|
1508
|
+
this.initialize().catch((err) => {
|
|
1509
|
+
throw err;
|
|
1276
1510
|
});
|
|
1277
|
-
this.initialize().catch(err => { throw err; });
|
|
1278
1511
|
this._log.info('getSpaceNotificationSetting request %j', request);
|
|
1279
1512
|
const wrappedCallback = callback
|
|
1280
1513
|
? (error, response, options, rawResponse) => {
|
|
@@ -1282,12 +1515,16 @@ class ChatServiceClient {
|
|
|
1282
1515
|
callback(error, response, options, rawResponse); // We verified callback above.
|
|
1283
1516
|
}
|
|
1284
1517
|
: undefined;
|
|
1285
|
-
return this.innerApiCalls
|
|
1518
|
+
return this.innerApiCalls
|
|
1519
|
+
.getSpaceNotificationSetting(request, options, wrappedCallback)
|
|
1286
1520
|
?.then(([response, options, rawResponse]) => {
|
|
1287
1521
|
this._log.info('getSpaceNotificationSetting response %j', response);
|
|
1288
1522
|
return [response, options, rawResponse];
|
|
1289
|
-
})
|
|
1290
|
-
|
|
1523
|
+
})
|
|
1524
|
+
.catch((error) => {
|
|
1525
|
+
if (error &&
|
|
1526
|
+
'statusDetails' in error &&
|
|
1527
|
+
error.statusDetails instanceof Array) {
|
|
1291
1528
|
const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
|
|
1292
1529
|
error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
|
|
1293
1530
|
}
|
|
@@ -1307,10 +1544,13 @@ class ChatServiceClient {
|
|
|
1307
1544
|
options = options || {};
|
|
1308
1545
|
options.otherArgs = options.otherArgs || {};
|
|
1309
1546
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
1310
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
|
1311
|
-
|
|
1547
|
+
options.otherArgs.headers['x-goog-request-params'] =
|
|
1548
|
+
this._gaxModule.routingHeader.fromParams({
|
|
1549
|
+
'space_notification_setting.name': request.spaceNotificationSetting.name ?? '',
|
|
1550
|
+
});
|
|
1551
|
+
this.initialize().catch((err) => {
|
|
1552
|
+
throw err;
|
|
1312
1553
|
});
|
|
1313
|
-
this.initialize().catch(err => { throw err; });
|
|
1314
1554
|
this._log.info('updateSpaceNotificationSetting request %j', request);
|
|
1315
1555
|
const wrappedCallback = callback
|
|
1316
1556
|
? (error, response, options, rawResponse) => {
|
|
@@ -1318,12 +1558,16 @@ class ChatServiceClient {
|
|
|
1318
1558
|
callback(error, response, options, rawResponse); // We verified callback above.
|
|
1319
1559
|
}
|
|
1320
1560
|
: undefined;
|
|
1321
|
-
return this.innerApiCalls
|
|
1561
|
+
return this.innerApiCalls
|
|
1562
|
+
.updateSpaceNotificationSetting(request, options, wrappedCallback)
|
|
1322
1563
|
?.then(([response, options, rawResponse]) => {
|
|
1323
1564
|
this._log.info('updateSpaceNotificationSetting response %j', response);
|
|
1324
1565
|
return [response, options, rawResponse];
|
|
1325
|
-
})
|
|
1326
|
-
|
|
1566
|
+
})
|
|
1567
|
+
.catch((error) => {
|
|
1568
|
+
if (error &&
|
|
1569
|
+
'statusDetails' in error &&
|
|
1570
|
+
error.statusDetails instanceof Array) {
|
|
1327
1571
|
const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
|
|
1328
1572
|
error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
|
|
1329
1573
|
}
|
|
@@ -1343,10 +1587,13 @@ class ChatServiceClient {
|
|
|
1343
1587
|
options = options || {};
|
|
1344
1588
|
options.otherArgs = options.otherArgs || {};
|
|
1345
1589
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
1346
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
|
1347
|
-
|
|
1590
|
+
options.otherArgs.headers['x-goog-request-params'] =
|
|
1591
|
+
this._gaxModule.routingHeader.fromParams({
|
|
1592
|
+
parent: request.parent ?? '',
|
|
1593
|
+
});
|
|
1594
|
+
this.initialize().catch((err) => {
|
|
1595
|
+
throw err;
|
|
1348
1596
|
});
|
|
1349
|
-
this.initialize().catch(err => { throw err; });
|
|
1350
1597
|
this._log.info('createSection request %j', request);
|
|
1351
1598
|
const wrappedCallback = callback
|
|
1352
1599
|
? (error, response, options, rawResponse) => {
|
|
@@ -1354,12 +1601,16 @@ class ChatServiceClient {
|
|
|
1354
1601
|
callback(error, response, options, rawResponse); // We verified callback above.
|
|
1355
1602
|
}
|
|
1356
1603
|
: undefined;
|
|
1357
|
-
return this.innerApiCalls
|
|
1604
|
+
return this.innerApiCalls
|
|
1605
|
+
.createSection(request, options, wrappedCallback)
|
|
1358
1606
|
?.then(([response, options, rawResponse]) => {
|
|
1359
1607
|
this._log.info('createSection response %j', response);
|
|
1360
1608
|
return [response, options, rawResponse];
|
|
1361
|
-
})
|
|
1362
|
-
|
|
1609
|
+
})
|
|
1610
|
+
.catch((error) => {
|
|
1611
|
+
if (error &&
|
|
1612
|
+
'statusDetails' in error &&
|
|
1613
|
+
error.statusDetails instanceof Array) {
|
|
1363
1614
|
const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
|
|
1364
1615
|
error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
|
|
1365
1616
|
}
|
|
@@ -1379,10 +1630,13 @@ class ChatServiceClient {
|
|
|
1379
1630
|
options = options || {};
|
|
1380
1631
|
options.otherArgs = options.otherArgs || {};
|
|
1381
1632
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
1382
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
|
1383
|
-
|
|
1633
|
+
options.otherArgs.headers['x-goog-request-params'] =
|
|
1634
|
+
this._gaxModule.routingHeader.fromParams({
|
|
1635
|
+
name: request.name ?? '',
|
|
1636
|
+
});
|
|
1637
|
+
this.initialize().catch((err) => {
|
|
1638
|
+
throw err;
|
|
1384
1639
|
});
|
|
1385
|
-
this.initialize().catch(err => { throw err; });
|
|
1386
1640
|
this._log.info('deleteSection request %j', request);
|
|
1387
1641
|
const wrappedCallback = callback
|
|
1388
1642
|
? (error, response, options, rawResponse) => {
|
|
@@ -1390,12 +1644,16 @@ class ChatServiceClient {
|
|
|
1390
1644
|
callback(error, response, options, rawResponse); // We verified callback above.
|
|
1391
1645
|
}
|
|
1392
1646
|
: undefined;
|
|
1393
|
-
return this.innerApiCalls
|
|
1647
|
+
return this.innerApiCalls
|
|
1648
|
+
.deleteSection(request, options, wrappedCallback)
|
|
1394
1649
|
?.then(([response, options, rawResponse]) => {
|
|
1395
1650
|
this._log.info('deleteSection response %j', response);
|
|
1396
1651
|
return [response, options, rawResponse];
|
|
1397
|
-
})
|
|
1398
|
-
|
|
1652
|
+
})
|
|
1653
|
+
.catch((error) => {
|
|
1654
|
+
if (error &&
|
|
1655
|
+
'statusDetails' in error &&
|
|
1656
|
+
error.statusDetails instanceof Array) {
|
|
1399
1657
|
const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
|
|
1400
1658
|
error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
|
|
1401
1659
|
}
|
|
@@ -1415,10 +1673,13 @@ class ChatServiceClient {
|
|
|
1415
1673
|
options = options || {};
|
|
1416
1674
|
options.otherArgs = options.otherArgs || {};
|
|
1417
1675
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
1418
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
|
1419
|
-
|
|
1676
|
+
options.otherArgs.headers['x-goog-request-params'] =
|
|
1677
|
+
this._gaxModule.routingHeader.fromParams({
|
|
1678
|
+
'section.name': request.section.name ?? '',
|
|
1679
|
+
});
|
|
1680
|
+
this.initialize().catch((err) => {
|
|
1681
|
+
throw err;
|
|
1420
1682
|
});
|
|
1421
|
-
this.initialize().catch(err => { throw err; });
|
|
1422
1683
|
this._log.info('updateSection request %j', request);
|
|
1423
1684
|
const wrappedCallback = callback
|
|
1424
1685
|
? (error, response, options, rawResponse) => {
|
|
@@ -1426,12 +1687,16 @@ class ChatServiceClient {
|
|
|
1426
1687
|
callback(error, response, options, rawResponse); // We verified callback above.
|
|
1427
1688
|
}
|
|
1428
1689
|
: undefined;
|
|
1429
|
-
return this.innerApiCalls
|
|
1690
|
+
return this.innerApiCalls
|
|
1691
|
+
.updateSection(request, options, wrappedCallback)
|
|
1430
1692
|
?.then(([response, options, rawResponse]) => {
|
|
1431
1693
|
this._log.info('updateSection response %j', response);
|
|
1432
1694
|
return [response, options, rawResponse];
|
|
1433
|
-
})
|
|
1434
|
-
|
|
1695
|
+
})
|
|
1696
|
+
.catch((error) => {
|
|
1697
|
+
if (error &&
|
|
1698
|
+
'statusDetails' in error &&
|
|
1699
|
+
error.statusDetails instanceof Array) {
|
|
1435
1700
|
const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
|
|
1436
1701
|
error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
|
|
1437
1702
|
}
|
|
@@ -1451,10 +1716,13 @@ class ChatServiceClient {
|
|
|
1451
1716
|
options = options || {};
|
|
1452
1717
|
options.otherArgs = options.otherArgs || {};
|
|
1453
1718
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
1454
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
|
1455
|
-
|
|
1719
|
+
options.otherArgs.headers['x-goog-request-params'] =
|
|
1720
|
+
this._gaxModule.routingHeader.fromParams({
|
|
1721
|
+
name: request.name ?? '',
|
|
1722
|
+
});
|
|
1723
|
+
this.initialize().catch((err) => {
|
|
1724
|
+
throw err;
|
|
1456
1725
|
});
|
|
1457
|
-
this.initialize().catch(err => { throw err; });
|
|
1458
1726
|
this._log.info('positionSection request %j', request);
|
|
1459
1727
|
const wrappedCallback = callback
|
|
1460
1728
|
? (error, response, options, rawResponse) => {
|
|
@@ -1462,12 +1730,16 @@ class ChatServiceClient {
|
|
|
1462
1730
|
callback(error, response, options, rawResponse); // We verified callback above.
|
|
1463
1731
|
}
|
|
1464
1732
|
: undefined;
|
|
1465
|
-
return this.innerApiCalls
|
|
1733
|
+
return this.innerApiCalls
|
|
1734
|
+
.positionSection(request, options, wrappedCallback)
|
|
1466
1735
|
?.then(([response, options, rawResponse]) => {
|
|
1467
1736
|
this._log.info('positionSection response %j', response);
|
|
1468
1737
|
return [response, options, rawResponse];
|
|
1469
|
-
})
|
|
1470
|
-
|
|
1738
|
+
})
|
|
1739
|
+
.catch((error) => {
|
|
1740
|
+
if (error &&
|
|
1741
|
+
'statusDetails' in error &&
|
|
1742
|
+
error.statusDetails instanceof Array) {
|
|
1471
1743
|
const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
|
|
1472
1744
|
error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
|
|
1473
1745
|
}
|
|
@@ -1487,10 +1759,13 @@ class ChatServiceClient {
|
|
|
1487
1759
|
options = options || {};
|
|
1488
1760
|
options.otherArgs = options.otherArgs || {};
|
|
1489
1761
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
1490
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
|
1491
|
-
|
|
1762
|
+
options.otherArgs.headers['x-goog-request-params'] =
|
|
1763
|
+
this._gaxModule.routingHeader.fromParams({
|
|
1764
|
+
name: request.name ?? '',
|
|
1765
|
+
});
|
|
1766
|
+
this.initialize().catch((err) => {
|
|
1767
|
+
throw err;
|
|
1492
1768
|
});
|
|
1493
|
-
this.initialize().catch(err => { throw err; });
|
|
1494
1769
|
this._log.info('moveSectionItem request %j', request);
|
|
1495
1770
|
const wrappedCallback = callback
|
|
1496
1771
|
? (error, response, options, rawResponse) => {
|
|
@@ -1498,12 +1773,16 @@ class ChatServiceClient {
|
|
|
1498
1773
|
callback(error, response, options, rawResponse); // We verified callback above.
|
|
1499
1774
|
}
|
|
1500
1775
|
: undefined;
|
|
1501
|
-
return this.innerApiCalls
|
|
1776
|
+
return this.innerApiCalls
|
|
1777
|
+
.moveSectionItem(request, options, wrappedCallback)
|
|
1502
1778
|
?.then(([response, options, rawResponse]) => {
|
|
1503
1779
|
this._log.info('moveSectionItem response %j', response);
|
|
1504
1780
|
return [response, options, rawResponse];
|
|
1505
|
-
})
|
|
1506
|
-
|
|
1781
|
+
})
|
|
1782
|
+
.catch((error) => {
|
|
1783
|
+
if (error &&
|
|
1784
|
+
'statusDetails' in error &&
|
|
1785
|
+
error.statusDetails instanceof Array) {
|
|
1507
1786
|
const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
|
|
1508
1787
|
error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
|
|
1509
1788
|
}
|
|
@@ -1523,10 +1802,13 @@ class ChatServiceClient {
|
|
|
1523
1802
|
options = options || {};
|
|
1524
1803
|
options.otherArgs = options.otherArgs || {};
|
|
1525
1804
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
1526
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
|
1527
|
-
|
|
1805
|
+
options.otherArgs.headers['x-goog-request-params'] =
|
|
1806
|
+
this._gaxModule.routingHeader.fromParams({
|
|
1807
|
+
parent: request.parent ?? '',
|
|
1808
|
+
});
|
|
1809
|
+
this.initialize().catch((err) => {
|
|
1810
|
+
throw err;
|
|
1528
1811
|
});
|
|
1529
|
-
this.initialize().catch(err => { throw err; });
|
|
1530
1812
|
const wrappedCallback = callback
|
|
1531
1813
|
? (error, values, nextPageRequest, rawResponse) => {
|
|
1532
1814
|
this._log.info('listMessages values %j', values);
|
|
@@ -1633,12 +1915,15 @@ class ChatServiceClient {
|
|
|
1633
1915
|
options = options || {};
|
|
1634
1916
|
options.otherArgs = options.otherArgs || {};
|
|
1635
1917
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
1636
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
|
1637
|
-
|
|
1638
|
-
|
|
1918
|
+
options.otherArgs.headers['x-goog-request-params'] =
|
|
1919
|
+
this._gaxModule.routingHeader.fromParams({
|
|
1920
|
+
parent: request.parent ?? '',
|
|
1921
|
+
});
|
|
1639
1922
|
const defaultCallSettings = this._defaults['listMessages'];
|
|
1640
1923
|
const callSettings = defaultCallSettings.merge(options);
|
|
1641
|
-
this.initialize().catch(err => {
|
|
1924
|
+
this.initialize().catch((err) => {
|
|
1925
|
+
throw err;
|
|
1926
|
+
});
|
|
1642
1927
|
this._log.info('listMessages stream %j', request);
|
|
1643
1928
|
return this.descriptors.page.listMessages.createStream(this.innerApiCalls.listMessages, request, callSettings);
|
|
1644
1929
|
}
|
|
@@ -1737,12 +2022,15 @@ class ChatServiceClient {
|
|
|
1737
2022
|
options = options || {};
|
|
1738
2023
|
options.otherArgs = options.otherArgs || {};
|
|
1739
2024
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
1740
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
|
1741
|
-
|
|
1742
|
-
|
|
2025
|
+
options.otherArgs.headers['x-goog-request-params'] =
|
|
2026
|
+
this._gaxModule.routingHeader.fromParams({
|
|
2027
|
+
parent: request.parent ?? '',
|
|
2028
|
+
});
|
|
1743
2029
|
const defaultCallSettings = this._defaults['listMessages'];
|
|
1744
2030
|
const callSettings = defaultCallSettings.merge(options);
|
|
1745
|
-
this.initialize().catch(err => {
|
|
2031
|
+
this.initialize().catch((err) => {
|
|
2032
|
+
throw err;
|
|
2033
|
+
});
|
|
1746
2034
|
this._log.info('listMessages iterate %j', request);
|
|
1747
2035
|
return this.descriptors.page.listMessages.asyncIterate(this.innerApiCalls['listMessages'], request, callSettings);
|
|
1748
2036
|
}
|
|
@@ -1759,10 +2047,13 @@ class ChatServiceClient {
|
|
|
1759
2047
|
options = options || {};
|
|
1760
2048
|
options.otherArgs = options.otherArgs || {};
|
|
1761
2049
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
1762
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
|
1763
|
-
|
|
2050
|
+
options.otherArgs.headers['x-goog-request-params'] =
|
|
2051
|
+
this._gaxModule.routingHeader.fromParams({
|
|
2052
|
+
parent: request.parent ?? '',
|
|
2053
|
+
});
|
|
2054
|
+
this.initialize().catch((err) => {
|
|
2055
|
+
throw err;
|
|
1764
2056
|
});
|
|
1765
|
-
this.initialize().catch(err => { throw err; });
|
|
1766
2057
|
const wrappedCallback = callback
|
|
1767
2058
|
? (error, values, nextPageRequest, rawResponse) => {
|
|
1768
2059
|
this._log.info('listMemberships values %j', values);
|
|
@@ -1887,12 +2178,15 @@ class ChatServiceClient {
|
|
|
1887
2178
|
options = options || {};
|
|
1888
2179
|
options.otherArgs = options.otherArgs || {};
|
|
1889
2180
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
1890
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
|
1891
|
-
|
|
1892
|
-
|
|
2181
|
+
options.otherArgs.headers['x-goog-request-params'] =
|
|
2182
|
+
this._gaxModule.routingHeader.fromParams({
|
|
2183
|
+
parent: request.parent ?? '',
|
|
2184
|
+
});
|
|
1893
2185
|
const defaultCallSettings = this._defaults['listMemberships'];
|
|
1894
2186
|
const callSettings = defaultCallSettings.merge(options);
|
|
1895
|
-
this.initialize().catch(err => {
|
|
2187
|
+
this.initialize().catch((err) => {
|
|
2188
|
+
throw err;
|
|
2189
|
+
});
|
|
1896
2190
|
this._log.info('listMemberships stream %j', request);
|
|
1897
2191
|
return this.descriptors.page.listMemberships.createStream(this.innerApiCalls.listMemberships, request, callSettings);
|
|
1898
2192
|
}
|
|
@@ -2009,12 +2303,15 @@ class ChatServiceClient {
|
|
|
2009
2303
|
options = options || {};
|
|
2010
2304
|
options.otherArgs = options.otherArgs || {};
|
|
2011
2305
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
2012
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
|
2013
|
-
|
|
2014
|
-
|
|
2306
|
+
options.otherArgs.headers['x-goog-request-params'] =
|
|
2307
|
+
this._gaxModule.routingHeader.fromParams({
|
|
2308
|
+
parent: request.parent ?? '',
|
|
2309
|
+
});
|
|
2015
2310
|
const defaultCallSettings = this._defaults['listMemberships'];
|
|
2016
2311
|
const callSettings = defaultCallSettings.merge(options);
|
|
2017
|
-
this.initialize().catch(err => {
|
|
2312
|
+
this.initialize().catch((err) => {
|
|
2313
|
+
throw err;
|
|
2314
|
+
});
|
|
2018
2315
|
this._log.info('listMemberships iterate %j', request);
|
|
2019
2316
|
return this.descriptors.page.listMemberships.asyncIterate(this.innerApiCalls['listMemberships'], request, callSettings);
|
|
2020
2317
|
}
|
|
@@ -2031,7 +2328,9 @@ class ChatServiceClient {
|
|
|
2031
2328
|
options = options || {};
|
|
2032
2329
|
options.otherArgs = options.otherArgs || {};
|
|
2033
2330
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
2034
|
-
this.initialize().catch(err => {
|
|
2331
|
+
this.initialize().catch((err) => {
|
|
2332
|
+
throw err;
|
|
2333
|
+
});
|
|
2035
2334
|
const wrappedCallback = callback
|
|
2036
2335
|
? (error, values, nextPageRequest, rawResponse) => {
|
|
2037
2336
|
this._log.info('listSpaces values %j', values);
|
|
@@ -2104,7 +2403,9 @@ class ChatServiceClient {
|
|
|
2104
2403
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
2105
2404
|
const defaultCallSettings = this._defaults['listSpaces'];
|
|
2106
2405
|
const callSettings = defaultCallSettings.merge(options);
|
|
2107
|
-
this.initialize().catch(err => {
|
|
2406
|
+
this.initialize().catch((err) => {
|
|
2407
|
+
throw err;
|
|
2408
|
+
});
|
|
2108
2409
|
this._log.info('listSpaces stream %j', request);
|
|
2109
2410
|
return this.descriptors.page.listSpaces.createStream(this.innerApiCalls.listSpaces, request, callSettings);
|
|
2110
2411
|
}
|
|
@@ -2169,7 +2470,9 @@ class ChatServiceClient {
|
|
|
2169
2470
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
2170
2471
|
const defaultCallSettings = this._defaults['listSpaces'];
|
|
2171
2472
|
const callSettings = defaultCallSettings.merge(options);
|
|
2172
|
-
this.initialize().catch(err => {
|
|
2473
|
+
this.initialize().catch((err) => {
|
|
2474
|
+
throw err;
|
|
2475
|
+
});
|
|
2173
2476
|
this._log.info('listSpaces iterate %j', request);
|
|
2174
2477
|
return this.descriptors.page.listSpaces.asyncIterate(this.innerApiCalls['listSpaces'], request, callSettings);
|
|
2175
2478
|
}
|
|
@@ -2186,7 +2489,9 @@ class ChatServiceClient {
|
|
|
2186
2489
|
options = options || {};
|
|
2187
2490
|
options.otherArgs = options.otherArgs || {};
|
|
2188
2491
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
2189
|
-
this.initialize().catch(err => {
|
|
2492
|
+
this.initialize().catch((err) => {
|
|
2493
|
+
throw err;
|
|
2494
|
+
});
|
|
2190
2495
|
const wrappedCallback = callback
|
|
2191
2496
|
? (error, values, nextPageRequest, rawResponse) => {
|
|
2192
2497
|
this._log.info('searchSpaces values %j', values);
|
|
@@ -2346,7 +2651,9 @@ class ChatServiceClient {
|
|
|
2346
2651
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
2347
2652
|
const defaultCallSettings = this._defaults['searchSpaces'];
|
|
2348
2653
|
const callSettings = defaultCallSettings.merge(options);
|
|
2349
|
-
this.initialize().catch(err => {
|
|
2654
|
+
this.initialize().catch((err) => {
|
|
2655
|
+
throw err;
|
|
2656
|
+
});
|
|
2350
2657
|
this._log.info('searchSpaces stream %j', request);
|
|
2351
2658
|
return this.descriptors.page.searchSpaces.createStream(this.innerApiCalls.searchSpaces, request, callSettings);
|
|
2352
2659
|
}
|
|
@@ -2498,10 +2805,183 @@ class ChatServiceClient {
|
|
|
2498
2805
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
2499
2806
|
const defaultCallSettings = this._defaults['searchSpaces'];
|
|
2500
2807
|
const callSettings = defaultCallSettings.merge(options);
|
|
2501
|
-
this.initialize().catch(err => {
|
|
2808
|
+
this.initialize().catch((err) => {
|
|
2809
|
+
throw err;
|
|
2810
|
+
});
|
|
2502
2811
|
this._log.info('searchSpaces iterate %j', request);
|
|
2503
2812
|
return this.descriptors.page.searchSpaces.asyncIterate(this.innerApiCalls['searchSpaces'], request, callSettings);
|
|
2504
2813
|
}
|
|
2814
|
+
findGroupChats(request, optionsOrCallback, callback) {
|
|
2815
|
+
request = request || {};
|
|
2816
|
+
let options;
|
|
2817
|
+
if (typeof optionsOrCallback === 'function' && callback === undefined) {
|
|
2818
|
+
callback = optionsOrCallback;
|
|
2819
|
+
options = {};
|
|
2820
|
+
}
|
|
2821
|
+
else {
|
|
2822
|
+
options = optionsOrCallback;
|
|
2823
|
+
}
|
|
2824
|
+
options = options || {};
|
|
2825
|
+
options.otherArgs = options.otherArgs || {};
|
|
2826
|
+
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
2827
|
+
this.initialize().catch((err) => {
|
|
2828
|
+
throw err;
|
|
2829
|
+
});
|
|
2830
|
+
const wrappedCallback = callback
|
|
2831
|
+
? (error, values, nextPageRequest, rawResponse) => {
|
|
2832
|
+
this._log.info('findGroupChats values %j', values);
|
|
2833
|
+
callback(error, values, nextPageRequest, rawResponse); // We verified callback above.
|
|
2834
|
+
}
|
|
2835
|
+
: undefined;
|
|
2836
|
+
this._log.info('findGroupChats request %j', request);
|
|
2837
|
+
return this.innerApiCalls
|
|
2838
|
+
.findGroupChats(request, options, wrappedCallback)
|
|
2839
|
+
?.then(([response, input, output]) => {
|
|
2840
|
+
this._log.info('findGroupChats values %j', response);
|
|
2841
|
+
return [response, input, output];
|
|
2842
|
+
});
|
|
2843
|
+
}
|
|
2844
|
+
/**
|
|
2845
|
+
* Equivalent to `findGroupChats`, but returns a NodeJS Stream object.
|
|
2846
|
+
* @param {Object} request
|
|
2847
|
+
* The request object that will be sent.
|
|
2848
|
+
* @param {string[]} [request.users]
|
|
2849
|
+
* Optional. Resource names of all human users in group chat with the calling
|
|
2850
|
+
* user. Chat apps can't be included in the request.
|
|
2851
|
+
*
|
|
2852
|
+
* The maximum number of users that can be specified in a single request is
|
|
2853
|
+
* `49`.
|
|
2854
|
+
*
|
|
2855
|
+
* Format: `users/{user}`, where `{user}` is either the `id` for the
|
|
2856
|
+
* [person](https://developers.google.com/people/api/rest/v1/people) from the
|
|
2857
|
+
* People API, or the `id` for the
|
|
2858
|
+
* [user](https://developers.google.com/admin-sdk/directory/reference/rest/v1/users)
|
|
2859
|
+
* in the Directory API. For example, to find all group chats with the calling
|
|
2860
|
+
* user and two other users, with People API profile IDs `123456789` and
|
|
2861
|
+
* `987654321`, you can use `users/123456789` and `users/987654321`.
|
|
2862
|
+
* You can also use the email as an alias for `{user}`. For example,
|
|
2863
|
+
* `users/example@gmail.com` where `example@gmail.com` is the email of the
|
|
2864
|
+
* Google Chat user.
|
|
2865
|
+
* @param {number} [request.pageSize]
|
|
2866
|
+
* Optional. The maximum number of spaces to return. The service might return
|
|
2867
|
+
* fewer than this value.
|
|
2868
|
+
*
|
|
2869
|
+
* If unspecified, at most 10 spaces are returned.
|
|
2870
|
+
*
|
|
2871
|
+
* The maximum value is 30. If you use a value more than 30, it's
|
|
2872
|
+
* automatically changed to 30.
|
|
2873
|
+
*
|
|
2874
|
+
* Negative values return an `INVALID_ARGUMENT` error.
|
|
2875
|
+
* @param {string} [request.pageToken]
|
|
2876
|
+
* Optional. A page token, received from a previous call to find group chats.
|
|
2877
|
+
* Provide this parameter to retrieve the subsequent page.
|
|
2878
|
+
*
|
|
2879
|
+
* When paginating, all other parameters provided should match the call that
|
|
2880
|
+
* provided the token. Passing different values may lead to unexpected
|
|
2881
|
+
* results.
|
|
2882
|
+
* @param {google.chat.v1.SpaceView} request.spaceView
|
|
2883
|
+
* Requested space view type. If unset, defaults to
|
|
2884
|
+
* `SPACE_VIEW_RESOURCE_NAME_ONLY`. Requests that specify
|
|
2885
|
+
* `SPACE_VIEW_EXPANDED` must include scopes that allow reading space data,
|
|
2886
|
+
* for example,
|
|
2887
|
+
* https://www.googleapis.com/auth/chat.spaces or
|
|
2888
|
+
* https://www.googleapis.com/auth/chat.spaces.readonly.
|
|
2889
|
+
* @param {object} [options]
|
|
2890
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
2891
|
+
* @returns {Stream}
|
|
2892
|
+
* An object stream which emits an object representing {@link protos.google.chat.v1.Space|Space} on 'data' event.
|
|
2893
|
+
* The client library will perform auto-pagination by default: it will call the API as many
|
|
2894
|
+
* times as needed. Note that it can affect your quota.
|
|
2895
|
+
* We recommend using `findGroupChatsAsync()`
|
|
2896
|
+
* method described below for async iteration which you can stop as needed.
|
|
2897
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
|
|
2898
|
+
* for more details and examples.
|
|
2899
|
+
*/
|
|
2900
|
+
findGroupChatsStream(request, options) {
|
|
2901
|
+
request = request || {};
|
|
2902
|
+
options = options || {};
|
|
2903
|
+
options.otherArgs = options.otherArgs || {};
|
|
2904
|
+
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
2905
|
+
const defaultCallSettings = this._defaults['findGroupChats'];
|
|
2906
|
+
const callSettings = defaultCallSettings.merge(options);
|
|
2907
|
+
this.initialize().catch((err) => {
|
|
2908
|
+
throw err;
|
|
2909
|
+
});
|
|
2910
|
+
this._log.info('findGroupChats stream %j', request);
|
|
2911
|
+
return this.descriptors.page.findGroupChats.createStream(this.innerApiCalls.findGroupChats, request, callSettings);
|
|
2912
|
+
}
|
|
2913
|
+
/**
|
|
2914
|
+
* Equivalent to `findGroupChats`, but returns an iterable object.
|
|
2915
|
+
*
|
|
2916
|
+
* `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
|
|
2917
|
+
* @param {Object} request
|
|
2918
|
+
* The request object that will be sent.
|
|
2919
|
+
* @param {string[]} [request.users]
|
|
2920
|
+
* Optional. Resource names of all human users in group chat with the calling
|
|
2921
|
+
* user. Chat apps can't be included in the request.
|
|
2922
|
+
*
|
|
2923
|
+
* The maximum number of users that can be specified in a single request is
|
|
2924
|
+
* `49`.
|
|
2925
|
+
*
|
|
2926
|
+
* Format: `users/{user}`, where `{user}` is either the `id` for the
|
|
2927
|
+
* [person](https://developers.google.com/people/api/rest/v1/people) from the
|
|
2928
|
+
* People API, or the `id` for the
|
|
2929
|
+
* [user](https://developers.google.com/admin-sdk/directory/reference/rest/v1/users)
|
|
2930
|
+
* in the Directory API. For example, to find all group chats with the calling
|
|
2931
|
+
* user and two other users, with People API profile IDs `123456789` and
|
|
2932
|
+
* `987654321`, you can use `users/123456789` and `users/987654321`.
|
|
2933
|
+
* You can also use the email as an alias for `{user}`. For example,
|
|
2934
|
+
* `users/example@gmail.com` where `example@gmail.com` is the email of the
|
|
2935
|
+
* Google Chat user.
|
|
2936
|
+
* @param {number} [request.pageSize]
|
|
2937
|
+
* Optional. The maximum number of spaces to return. The service might return
|
|
2938
|
+
* fewer than this value.
|
|
2939
|
+
*
|
|
2940
|
+
* If unspecified, at most 10 spaces are returned.
|
|
2941
|
+
*
|
|
2942
|
+
* The maximum value is 30. If you use a value more than 30, it's
|
|
2943
|
+
* automatically changed to 30.
|
|
2944
|
+
*
|
|
2945
|
+
* Negative values return an `INVALID_ARGUMENT` error.
|
|
2946
|
+
* @param {string} [request.pageToken]
|
|
2947
|
+
* Optional. A page token, received from a previous call to find group chats.
|
|
2948
|
+
* Provide this parameter to retrieve the subsequent page.
|
|
2949
|
+
*
|
|
2950
|
+
* When paginating, all other parameters provided should match the call that
|
|
2951
|
+
* provided the token. Passing different values may lead to unexpected
|
|
2952
|
+
* results.
|
|
2953
|
+
* @param {google.chat.v1.SpaceView} request.spaceView
|
|
2954
|
+
* Requested space view type. If unset, defaults to
|
|
2955
|
+
* `SPACE_VIEW_RESOURCE_NAME_ONLY`. Requests that specify
|
|
2956
|
+
* `SPACE_VIEW_EXPANDED` must include scopes that allow reading space data,
|
|
2957
|
+
* for example,
|
|
2958
|
+
* https://www.googleapis.com/auth/chat.spaces or
|
|
2959
|
+
* https://www.googleapis.com/auth/chat.spaces.readonly.
|
|
2960
|
+
* @param {object} [options]
|
|
2961
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
2962
|
+
* @returns {Object}
|
|
2963
|
+
* An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
|
|
2964
|
+
* When you iterate the returned iterable, each element will be an object representing
|
|
2965
|
+
* {@link protos.google.chat.v1.Space|Space}. The API will be called under the hood as needed, once per the page,
|
|
2966
|
+
* so you can stop the iteration when you don't need more results.
|
|
2967
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
|
|
2968
|
+
* for more details and examples.
|
|
2969
|
+
* @example <caption>include:samples/generated/v1/chat_service.find_group_chats.js</caption>
|
|
2970
|
+
* region_tag:chat_v1_generated_ChatService_FindGroupChats_async
|
|
2971
|
+
*/
|
|
2972
|
+
findGroupChatsAsync(request, options) {
|
|
2973
|
+
request = request || {};
|
|
2974
|
+
options = options || {};
|
|
2975
|
+
options.otherArgs = options.otherArgs || {};
|
|
2976
|
+
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
2977
|
+
const defaultCallSettings = this._defaults['findGroupChats'];
|
|
2978
|
+
const callSettings = defaultCallSettings.merge(options);
|
|
2979
|
+
this.initialize().catch((err) => {
|
|
2980
|
+
throw err;
|
|
2981
|
+
});
|
|
2982
|
+
this._log.info('findGroupChats iterate %j', request);
|
|
2983
|
+
return this.descriptors.page.findGroupChats.asyncIterate(this.innerApiCalls['findGroupChats'], request, callSettings);
|
|
2984
|
+
}
|
|
2505
2985
|
listReactions(request, optionsOrCallback, callback) {
|
|
2506
2986
|
request = request || {};
|
|
2507
2987
|
let options;
|
|
@@ -2515,10 +2995,13 @@ class ChatServiceClient {
|
|
|
2515
2995
|
options = options || {};
|
|
2516
2996
|
options.otherArgs = options.otherArgs || {};
|
|
2517
2997
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
2518
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
|
2519
|
-
|
|
2998
|
+
options.otherArgs.headers['x-goog-request-params'] =
|
|
2999
|
+
this._gaxModule.routingHeader.fromParams({
|
|
3000
|
+
parent: request.parent ?? '',
|
|
3001
|
+
});
|
|
3002
|
+
this.initialize().catch((err) => {
|
|
3003
|
+
throw err;
|
|
2520
3004
|
});
|
|
2521
|
-
this.initialize().catch(err => { throw err; });
|
|
2522
3005
|
const wrappedCallback = callback
|
|
2523
3006
|
? (error, values, nextPageRequest, rawResponse) => {
|
|
2524
3007
|
this._log.info('listReactions values %j', values);
|
|
@@ -2613,12 +3096,15 @@ class ChatServiceClient {
|
|
|
2613
3096
|
options = options || {};
|
|
2614
3097
|
options.otherArgs = options.otherArgs || {};
|
|
2615
3098
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
2616
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
|
2617
|
-
|
|
2618
|
-
|
|
3099
|
+
options.otherArgs.headers['x-goog-request-params'] =
|
|
3100
|
+
this._gaxModule.routingHeader.fromParams({
|
|
3101
|
+
parent: request.parent ?? '',
|
|
3102
|
+
});
|
|
2619
3103
|
const defaultCallSettings = this._defaults['listReactions'];
|
|
2620
3104
|
const callSettings = defaultCallSettings.merge(options);
|
|
2621
|
-
this.initialize().catch(err => {
|
|
3105
|
+
this.initialize().catch((err) => {
|
|
3106
|
+
throw err;
|
|
3107
|
+
});
|
|
2622
3108
|
this._log.info('listReactions stream %j', request);
|
|
2623
3109
|
return this.descriptors.page.listReactions.createStream(this.innerApiCalls.listReactions, request, callSettings);
|
|
2624
3110
|
}
|
|
@@ -2705,12 +3191,15 @@ class ChatServiceClient {
|
|
|
2705
3191
|
options = options || {};
|
|
2706
3192
|
options.otherArgs = options.otherArgs || {};
|
|
2707
3193
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
2708
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
|
2709
|
-
|
|
2710
|
-
|
|
3194
|
+
options.otherArgs.headers['x-goog-request-params'] =
|
|
3195
|
+
this._gaxModule.routingHeader.fromParams({
|
|
3196
|
+
parent: request.parent ?? '',
|
|
3197
|
+
});
|
|
2711
3198
|
const defaultCallSettings = this._defaults['listReactions'];
|
|
2712
3199
|
const callSettings = defaultCallSettings.merge(options);
|
|
2713
|
-
this.initialize().catch(err => {
|
|
3200
|
+
this.initialize().catch((err) => {
|
|
3201
|
+
throw err;
|
|
3202
|
+
});
|
|
2714
3203
|
this._log.info('listReactions iterate %j', request);
|
|
2715
3204
|
return this.descriptors.page.listReactions.asyncIterate(this.innerApiCalls['listReactions'], request, callSettings);
|
|
2716
3205
|
}
|
|
@@ -2727,7 +3216,9 @@ class ChatServiceClient {
|
|
|
2727
3216
|
options = options || {};
|
|
2728
3217
|
options.otherArgs = options.otherArgs || {};
|
|
2729
3218
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
2730
|
-
this.initialize().catch(err => {
|
|
3219
|
+
this.initialize().catch((err) => {
|
|
3220
|
+
throw err;
|
|
3221
|
+
});
|
|
2731
3222
|
const wrappedCallback = callback
|
|
2732
3223
|
? (error, values, nextPageRequest, rawResponse) => {
|
|
2733
3224
|
this._log.info('listCustomEmojis values %j', values);
|
|
@@ -2792,7 +3283,9 @@ class ChatServiceClient {
|
|
|
2792
3283
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
2793
3284
|
const defaultCallSettings = this._defaults['listCustomEmojis'];
|
|
2794
3285
|
const callSettings = defaultCallSettings.merge(options);
|
|
2795
|
-
this.initialize().catch(err => {
|
|
3286
|
+
this.initialize().catch((err) => {
|
|
3287
|
+
throw err;
|
|
3288
|
+
});
|
|
2796
3289
|
this._log.info('listCustomEmojis stream %j', request);
|
|
2797
3290
|
return this.descriptors.page.listCustomEmojis.createStream(this.innerApiCalls.listCustomEmojis, request, callSettings);
|
|
2798
3291
|
}
|
|
@@ -2849,7 +3342,9 @@ class ChatServiceClient {
|
|
|
2849
3342
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
2850
3343
|
const defaultCallSettings = this._defaults['listCustomEmojis'];
|
|
2851
3344
|
const callSettings = defaultCallSettings.merge(options);
|
|
2852
|
-
this.initialize().catch(err => {
|
|
3345
|
+
this.initialize().catch((err) => {
|
|
3346
|
+
throw err;
|
|
3347
|
+
});
|
|
2853
3348
|
this._log.info('listCustomEmojis iterate %j', request);
|
|
2854
3349
|
return this.descriptors.page.listCustomEmojis.asyncIterate(this.innerApiCalls['listCustomEmojis'], request, callSettings);
|
|
2855
3350
|
}
|
|
@@ -2866,10 +3361,13 @@ class ChatServiceClient {
|
|
|
2866
3361
|
options = options || {};
|
|
2867
3362
|
options.otherArgs = options.otherArgs || {};
|
|
2868
3363
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
2869
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
|
2870
|
-
|
|
3364
|
+
options.otherArgs.headers['x-goog-request-params'] =
|
|
3365
|
+
this._gaxModule.routingHeader.fromParams({
|
|
3366
|
+
parent: request.parent ?? '',
|
|
3367
|
+
});
|
|
3368
|
+
this.initialize().catch((err) => {
|
|
3369
|
+
throw err;
|
|
2871
3370
|
});
|
|
2872
|
-
this.initialize().catch(err => { throw err; });
|
|
2873
3371
|
const wrappedCallback = callback
|
|
2874
3372
|
? (error, values, nextPageRequest, rawResponse) => {
|
|
2875
3373
|
this._log.info('listSpaceEvents values %j', values);
|
|
@@ -2975,12 +3473,15 @@ class ChatServiceClient {
|
|
|
2975
3473
|
options = options || {};
|
|
2976
3474
|
options.otherArgs = options.otherArgs || {};
|
|
2977
3475
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
2978
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
|
2979
|
-
|
|
2980
|
-
|
|
3476
|
+
options.otherArgs.headers['x-goog-request-params'] =
|
|
3477
|
+
this._gaxModule.routingHeader.fromParams({
|
|
3478
|
+
parent: request.parent ?? '',
|
|
3479
|
+
});
|
|
2981
3480
|
const defaultCallSettings = this._defaults['listSpaceEvents'];
|
|
2982
3481
|
const callSettings = defaultCallSettings.merge(options);
|
|
2983
|
-
this.initialize().catch(err => {
|
|
3482
|
+
this.initialize().catch((err) => {
|
|
3483
|
+
throw err;
|
|
3484
|
+
});
|
|
2984
3485
|
this._log.info('listSpaceEvents stream %j', request);
|
|
2985
3486
|
return this.descriptors.page.listSpaceEvents.createStream(this.innerApiCalls.listSpaceEvents, request, callSettings);
|
|
2986
3487
|
}
|
|
@@ -3078,12 +3579,15 @@ class ChatServiceClient {
|
|
|
3078
3579
|
options = options || {};
|
|
3079
3580
|
options.otherArgs = options.otherArgs || {};
|
|
3080
3581
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
3081
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
|
3082
|
-
|
|
3083
|
-
|
|
3582
|
+
options.otherArgs.headers['x-goog-request-params'] =
|
|
3583
|
+
this._gaxModule.routingHeader.fromParams({
|
|
3584
|
+
parent: request.parent ?? '',
|
|
3585
|
+
});
|
|
3084
3586
|
const defaultCallSettings = this._defaults['listSpaceEvents'];
|
|
3085
3587
|
const callSettings = defaultCallSettings.merge(options);
|
|
3086
|
-
this.initialize().catch(err => {
|
|
3588
|
+
this.initialize().catch((err) => {
|
|
3589
|
+
throw err;
|
|
3590
|
+
});
|
|
3087
3591
|
this._log.info('listSpaceEvents iterate %j', request);
|
|
3088
3592
|
return this.descriptors.page.listSpaceEvents.asyncIterate(this.innerApiCalls['listSpaceEvents'], request, callSettings);
|
|
3089
3593
|
}
|
|
@@ -3100,10 +3604,13 @@ class ChatServiceClient {
|
|
|
3100
3604
|
options = options || {};
|
|
3101
3605
|
options.otherArgs = options.otherArgs || {};
|
|
3102
3606
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
3103
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
|
3104
|
-
|
|
3607
|
+
options.otherArgs.headers['x-goog-request-params'] =
|
|
3608
|
+
this._gaxModule.routingHeader.fromParams({
|
|
3609
|
+
parent: request.parent ?? '',
|
|
3610
|
+
});
|
|
3611
|
+
this.initialize().catch((err) => {
|
|
3612
|
+
throw err;
|
|
3105
3613
|
});
|
|
3106
|
-
this.initialize().catch(err => { throw err; });
|
|
3107
3614
|
const wrappedCallback = callback
|
|
3108
3615
|
? (error, values, nextPageRequest, rawResponse) => {
|
|
3109
3616
|
this._log.info('listSections values %j', values);
|
|
@@ -3167,12 +3674,15 @@ class ChatServiceClient {
|
|
|
3167
3674
|
options = options || {};
|
|
3168
3675
|
options.otherArgs = options.otherArgs || {};
|
|
3169
3676
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
3170
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
|
3171
|
-
|
|
3172
|
-
|
|
3677
|
+
options.otherArgs.headers['x-goog-request-params'] =
|
|
3678
|
+
this._gaxModule.routingHeader.fromParams({
|
|
3679
|
+
parent: request.parent ?? '',
|
|
3680
|
+
});
|
|
3173
3681
|
const defaultCallSettings = this._defaults['listSections'];
|
|
3174
3682
|
const callSettings = defaultCallSettings.merge(options);
|
|
3175
|
-
this.initialize().catch(err => {
|
|
3683
|
+
this.initialize().catch((err) => {
|
|
3684
|
+
throw err;
|
|
3685
|
+
});
|
|
3176
3686
|
this._log.info('listSections stream %j', request);
|
|
3177
3687
|
return this.descriptors.page.listSections.createStream(this.innerApiCalls.listSections, request, callSettings);
|
|
3178
3688
|
}
|
|
@@ -3228,12 +3738,15 @@ class ChatServiceClient {
|
|
|
3228
3738
|
options = options || {};
|
|
3229
3739
|
options.otherArgs = options.otherArgs || {};
|
|
3230
3740
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
3231
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
|
3232
|
-
|
|
3233
|
-
|
|
3741
|
+
options.otherArgs.headers['x-goog-request-params'] =
|
|
3742
|
+
this._gaxModule.routingHeader.fromParams({
|
|
3743
|
+
parent: request.parent ?? '',
|
|
3744
|
+
});
|
|
3234
3745
|
const defaultCallSettings = this._defaults['listSections'];
|
|
3235
3746
|
const callSettings = defaultCallSettings.merge(options);
|
|
3236
|
-
this.initialize().catch(err => {
|
|
3747
|
+
this.initialize().catch((err) => {
|
|
3748
|
+
throw err;
|
|
3749
|
+
});
|
|
3237
3750
|
this._log.info('listSections iterate %j', request);
|
|
3238
3751
|
return this.descriptors.page.listSections.asyncIterate(this.innerApiCalls['listSections'], request, callSettings);
|
|
3239
3752
|
}
|
|
@@ -3250,10 +3763,13 @@ class ChatServiceClient {
|
|
|
3250
3763
|
options = options || {};
|
|
3251
3764
|
options.otherArgs = options.otherArgs || {};
|
|
3252
3765
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
3253
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
|
3254
|
-
|
|
3766
|
+
options.otherArgs.headers['x-goog-request-params'] =
|
|
3767
|
+
this._gaxModule.routingHeader.fromParams({
|
|
3768
|
+
parent: request.parent ?? '',
|
|
3769
|
+
});
|
|
3770
|
+
this.initialize().catch((err) => {
|
|
3771
|
+
throw err;
|
|
3255
3772
|
});
|
|
3256
|
-
this.initialize().catch(err => { throw err; });
|
|
3257
3773
|
const wrappedCallback = callback
|
|
3258
3774
|
? (error, values, nextPageRequest, rawResponse) => {
|
|
3259
3775
|
this._log.info('listSectionItems values %j', values);
|
|
@@ -3322,12 +3838,15 @@ class ChatServiceClient {
|
|
|
3322
3838
|
options = options || {};
|
|
3323
3839
|
options.otherArgs = options.otherArgs || {};
|
|
3324
3840
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
3325
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
|
3326
|
-
|
|
3327
|
-
|
|
3841
|
+
options.otherArgs.headers['x-goog-request-params'] =
|
|
3842
|
+
this._gaxModule.routingHeader.fromParams({
|
|
3843
|
+
parent: request.parent ?? '',
|
|
3844
|
+
});
|
|
3328
3845
|
const defaultCallSettings = this._defaults['listSectionItems'];
|
|
3329
3846
|
const callSettings = defaultCallSettings.merge(options);
|
|
3330
|
-
this.initialize().catch(err => {
|
|
3847
|
+
this.initialize().catch((err) => {
|
|
3848
|
+
throw err;
|
|
3849
|
+
});
|
|
3331
3850
|
this._log.info('listSectionItems stream %j', request);
|
|
3332
3851
|
return this.descriptors.page.listSectionItems.createStream(this.innerApiCalls.listSectionItems, request, callSettings);
|
|
3333
3852
|
}
|
|
@@ -3388,12 +3907,15 @@ class ChatServiceClient {
|
|
|
3388
3907
|
options = options || {};
|
|
3389
3908
|
options.otherArgs = options.otherArgs || {};
|
|
3390
3909
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
3391
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
|
3392
|
-
|
|
3393
|
-
|
|
3910
|
+
options.otherArgs.headers['x-goog-request-params'] =
|
|
3911
|
+
this._gaxModule.routingHeader.fromParams({
|
|
3912
|
+
parent: request.parent ?? '',
|
|
3913
|
+
});
|
|
3394
3914
|
const defaultCallSettings = this._defaults['listSectionItems'];
|
|
3395
3915
|
const callSettings = defaultCallSettings.merge(options);
|
|
3396
|
-
this.initialize().catch(err => {
|
|
3916
|
+
this.initialize().catch((err) => {
|
|
3917
|
+
throw err;
|
|
3918
|
+
});
|
|
3397
3919
|
this._log.info('listSectionItems iterate %j', request);
|
|
3398
3920
|
return this.descriptors.page.listSectionItems.asyncIterate(this.innerApiCalls['listSectionItems'], request, callSettings);
|
|
3399
3921
|
}
|
|
@@ -3423,7 +3945,8 @@ class ChatServiceClient {
|
|
|
3423
3945
|
* @returns {string} A string representing the space.
|
|
3424
3946
|
*/
|
|
3425
3947
|
matchSpaceFromAttachmentName(attachmentName) {
|
|
3426
|
-
return this.pathTemplates.attachmentPathTemplate.match(attachmentName)
|
|
3948
|
+
return this.pathTemplates.attachmentPathTemplate.match(attachmentName)
|
|
3949
|
+
.space;
|
|
3427
3950
|
}
|
|
3428
3951
|
/**
|
|
3429
3952
|
* Parse the message from Attachment resource.
|
|
@@ -3433,7 +3956,8 @@ class ChatServiceClient {
|
|
|
3433
3956
|
* @returns {string} A string representing the message.
|
|
3434
3957
|
*/
|
|
3435
3958
|
matchMessageFromAttachmentName(attachmentName) {
|
|
3436
|
-
return this.pathTemplates.attachmentPathTemplate.match(attachmentName)
|
|
3959
|
+
return this.pathTemplates.attachmentPathTemplate.match(attachmentName)
|
|
3960
|
+
.message;
|
|
3437
3961
|
}
|
|
3438
3962
|
/**
|
|
3439
3963
|
* Parse the attachment from Attachment resource.
|
|
@@ -3443,7 +3967,8 @@ class ChatServiceClient {
|
|
|
3443
3967
|
* @returns {string} A string representing the attachment.
|
|
3444
3968
|
*/
|
|
3445
3969
|
matchAttachmentFromAttachmentName(attachmentName) {
|
|
3446
|
-
return this.pathTemplates.attachmentPathTemplate.match(attachmentName)
|
|
3970
|
+
return this.pathTemplates.attachmentPathTemplate.match(attachmentName)
|
|
3971
|
+
.attachment;
|
|
3447
3972
|
}
|
|
3448
3973
|
/**
|
|
3449
3974
|
* Return a fully-qualified customEmoji resource name string.
|
|
@@ -3464,7 +3989,8 @@ class ChatServiceClient {
|
|
|
3464
3989
|
* @returns {string} A string representing the custom_emoji.
|
|
3465
3990
|
*/
|
|
3466
3991
|
matchCustomEmojiFromCustomEmojiName(customEmojiName) {
|
|
3467
|
-
return this.pathTemplates.customEmojiPathTemplate.match(customEmojiName)
|
|
3992
|
+
return this.pathTemplates.customEmojiPathTemplate.match(customEmojiName)
|
|
3993
|
+
.custom_emoji;
|
|
3468
3994
|
}
|
|
3469
3995
|
/**
|
|
3470
3996
|
* Return a fully-qualified membership resource name string.
|
|
@@ -3487,7 +4013,8 @@ class ChatServiceClient {
|
|
|
3487
4013
|
* @returns {string} A string representing the space.
|
|
3488
4014
|
*/
|
|
3489
4015
|
matchSpaceFromMembershipName(membershipName) {
|
|
3490
|
-
return this.pathTemplates.membershipPathTemplate.match(membershipName)
|
|
4016
|
+
return this.pathTemplates.membershipPathTemplate.match(membershipName)
|
|
4017
|
+
.space;
|
|
3491
4018
|
}
|
|
3492
4019
|
/**
|
|
3493
4020
|
* Parse the member from Membership resource.
|
|
@@ -3497,7 +4024,8 @@ class ChatServiceClient {
|
|
|
3497
4024
|
* @returns {string} A string representing the member.
|
|
3498
4025
|
*/
|
|
3499
4026
|
matchMemberFromMembershipName(membershipName) {
|
|
3500
|
-
return this.pathTemplates.membershipPathTemplate.match(membershipName)
|
|
4027
|
+
return this.pathTemplates.membershipPathTemplate.match(membershipName)
|
|
4028
|
+
.member;
|
|
3501
4029
|
}
|
|
3502
4030
|
/**
|
|
3503
4031
|
* Return a fully-qualified message resource name string.
|
|
@@ -3678,7 +4206,8 @@ class ChatServiceClient {
|
|
|
3678
4206
|
* @returns {string} A string representing the user.
|
|
3679
4207
|
*/
|
|
3680
4208
|
matchUserFromSectionItemName(sectionItemName) {
|
|
3681
|
-
return this.pathTemplates.sectionItemPathTemplate.match(sectionItemName)
|
|
4209
|
+
return this.pathTemplates.sectionItemPathTemplate.match(sectionItemName)
|
|
4210
|
+
.user;
|
|
3682
4211
|
}
|
|
3683
4212
|
/**
|
|
3684
4213
|
* Parse the section from SectionItem resource.
|
|
@@ -3688,7 +4217,8 @@ class ChatServiceClient {
|
|
|
3688
4217
|
* @returns {string} A string representing the section.
|
|
3689
4218
|
*/
|
|
3690
4219
|
matchSectionFromSectionItemName(sectionItemName) {
|
|
3691
|
-
return this.pathTemplates.sectionItemPathTemplate.match(sectionItemName)
|
|
4220
|
+
return this.pathTemplates.sectionItemPathTemplate.match(sectionItemName)
|
|
4221
|
+
.section;
|
|
3692
4222
|
}
|
|
3693
4223
|
/**
|
|
3694
4224
|
* Parse the item from SectionItem resource.
|
|
@@ -3698,7 +4228,8 @@ class ChatServiceClient {
|
|
|
3698
4228
|
* @returns {string} A string representing the item.
|
|
3699
4229
|
*/
|
|
3700
4230
|
matchItemFromSectionItemName(sectionItemName) {
|
|
3701
|
-
return this.pathTemplates.sectionItemPathTemplate.match(sectionItemName)
|
|
4231
|
+
return this.pathTemplates.sectionItemPathTemplate.match(sectionItemName)
|
|
4232
|
+
.item;
|
|
3702
4233
|
}
|
|
3703
4234
|
/**
|
|
3704
4235
|
* Return a fully-qualified space resource name string.
|
|
@@ -3742,7 +4273,8 @@ class ChatServiceClient {
|
|
|
3742
4273
|
* @returns {string} A string representing the space.
|
|
3743
4274
|
*/
|
|
3744
4275
|
matchSpaceFromSpaceEventName(spaceEventName) {
|
|
3745
|
-
return this.pathTemplates.spaceEventPathTemplate.match(spaceEventName)
|
|
4276
|
+
return this.pathTemplates.spaceEventPathTemplate.match(spaceEventName)
|
|
4277
|
+
.space;
|
|
3746
4278
|
}
|
|
3747
4279
|
/**
|
|
3748
4280
|
* Parse the space_event from SpaceEvent resource.
|
|
@@ -3752,7 +4284,8 @@ class ChatServiceClient {
|
|
|
3752
4284
|
* @returns {string} A string representing the space_event.
|
|
3753
4285
|
*/
|
|
3754
4286
|
matchSpaceEventFromSpaceEventName(spaceEventName) {
|
|
3755
|
-
return this.pathTemplates.spaceEventPathTemplate.match(spaceEventName)
|
|
4287
|
+
return this.pathTemplates.spaceEventPathTemplate.match(spaceEventName)
|
|
4288
|
+
.space_event;
|
|
3756
4289
|
}
|
|
3757
4290
|
/**
|
|
3758
4291
|
* Return a fully-qualified spaceNotificationSetting resource name string.
|
|
@@ -3906,7 +4439,7 @@ class ChatServiceClient {
|
|
|
3906
4439
|
*/
|
|
3907
4440
|
close() {
|
|
3908
4441
|
if (this.chatServiceStub && !this._terminated) {
|
|
3909
|
-
return this.chatServiceStub.then(stub => {
|
|
4442
|
+
return this.chatServiceStub.then((stub) => {
|
|
3910
4443
|
this._log.info('ending gRPC channel');
|
|
3911
4444
|
this._terminated = true;
|
|
3912
4445
|
stub.close();
|