@google-apps/chat 0.12.0 → 0.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +24 -0
- package/README.md +4 -2
- package/build/protos/google/apps/card/v1/card.proto +1 -1
- 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 +34 -2
- package/build/protos/google/chat/v1/contextual_addon.proto +1 -1
- package/build/protos/google/chat/v1/deletion_metadata.proto +5 -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 +1 -1
- package/build/protos/google/chat/v1/reaction.proto +1 -1
- package/build/protos/google/chat/v1/slash_command.proto +2 -2
- package/build/protos/google/chat/v1/space.proto +1 -1
- package/build/protos/google/chat/v1/space_event.proto +1 -1
- package/build/protos/google/chat/v1/space_notification_setting.proto +122 -0
- 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 +378 -1
- package/build/protos/protos.js +890 -0
- package/build/protos/protos.json +131 -5
- package/build/src/v1/chat_service_client.d.ts +102 -7
- package/build/src/v1/chat_service_client.js +565 -117
- package/build/src/v1/chat_service_client.js.map +1 -1
- package/build/src/v1/chat_service_client_config.json +10 -0
- package/build/src/v1/chat_service_proto_list.json +25 -0
- package/build/src/v1/gapic_metadata.json +357 -0
- package/package.json +16 -16
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
20
20
|
exports.ChatServiceClient = void 0;
|
|
21
21
|
const jsonProtos = require("../../protos/protos.json");
|
|
22
|
+
const google_gax_1 = require("google-gax");
|
|
22
23
|
/**
|
|
23
24
|
* Client JSON configuration object, loaded from
|
|
24
25
|
* `src/v1/chat_service_client_config.json`.
|
|
@@ -33,6 +34,27 @@ const version = require('../../../package.json').version;
|
|
|
33
34
|
* @memberof v1
|
|
34
35
|
*/
|
|
35
36
|
class ChatServiceClient {
|
|
37
|
+
_terminated = false;
|
|
38
|
+
_opts;
|
|
39
|
+
_providedCustomServicePath;
|
|
40
|
+
_gaxModule;
|
|
41
|
+
_gaxGrpc;
|
|
42
|
+
_protos;
|
|
43
|
+
_defaults;
|
|
44
|
+
_universeDomain;
|
|
45
|
+
_servicePath;
|
|
46
|
+
_log = google_gax_1.loggingUtils.log('chat');
|
|
47
|
+
auth;
|
|
48
|
+
descriptors = {
|
|
49
|
+
page: {},
|
|
50
|
+
stream: {},
|
|
51
|
+
longrunning: {},
|
|
52
|
+
batching: {},
|
|
53
|
+
};
|
|
54
|
+
warn;
|
|
55
|
+
innerApiCalls;
|
|
56
|
+
pathTemplates;
|
|
57
|
+
chatServiceStub;
|
|
36
58
|
/**
|
|
37
59
|
* Construct an instance of ChatServiceClient.
|
|
38
60
|
*
|
|
@@ -55,7 +77,7 @@ class ChatServiceClient {
|
|
|
55
77
|
* Developer's Console, e.g. 'grape-spaceship-123'. We will also check
|
|
56
78
|
* the environment variable GCLOUD_PROJECT for your project ID. If your
|
|
57
79
|
* app is running in an environment which supports
|
|
58
|
-
* {@link https://
|
|
80
|
+
* {@link https://cloud.google.com/docs/authentication/application-default-credentials Application Default Credentials},
|
|
59
81
|
* your project ID will be detected automatically.
|
|
60
82
|
* @param {string} [options.apiEndpoint] - The domain name of the
|
|
61
83
|
* API remote host.
|
|
@@ -73,32 +95,28 @@ class ChatServiceClient {
|
|
|
73
95
|
* ```
|
|
74
96
|
*/
|
|
75
97
|
constructor(opts, gaxInstance) {
|
|
76
|
-
var _a, _b, _c, _d, _e;
|
|
77
|
-
this._terminated = false;
|
|
78
|
-
this.descriptors = {
|
|
79
|
-
page: {},
|
|
80
|
-
stream: {},
|
|
81
|
-
longrunning: {},
|
|
82
|
-
batching: {},
|
|
83
|
-
};
|
|
84
98
|
// Ensure that options include all the required fields.
|
|
85
99
|
const staticMembers = this.constructor;
|
|
86
|
-
if (
|
|
87
|
-
|
|
88
|
-
|
|
100
|
+
if (opts?.universe_domain &&
|
|
101
|
+
opts?.universeDomain &&
|
|
102
|
+
opts?.universe_domain !== opts?.universeDomain) {
|
|
89
103
|
throw new Error('Please set either universe_domain or universeDomain, but not both.');
|
|
90
104
|
}
|
|
91
105
|
const universeDomainEnvVar = typeof process === 'object' && typeof process.env === 'object'
|
|
92
106
|
? process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']
|
|
93
107
|
: undefined;
|
|
94
108
|
this._universeDomain =
|
|
95
|
-
|
|
109
|
+
opts?.universeDomain ??
|
|
110
|
+
opts?.universe_domain ??
|
|
111
|
+
universeDomainEnvVar ??
|
|
112
|
+
'googleapis.com';
|
|
96
113
|
this._servicePath = 'chat.' + this._universeDomain;
|
|
97
|
-
const servicePath =
|
|
98
|
-
this._providedCustomServicePath = !!(
|
|
99
|
-
const port =
|
|
100
|
-
const clientConfig =
|
|
101
|
-
const fallback =
|
|
114
|
+
const servicePath = opts?.servicePath || opts?.apiEndpoint || this._servicePath;
|
|
115
|
+
this._providedCustomServicePath = !!(opts?.servicePath || opts?.apiEndpoint);
|
|
116
|
+
const port = opts?.port || staticMembers.port;
|
|
117
|
+
const clientConfig = opts?.clientConfig ?? {};
|
|
118
|
+
const fallback = opts?.fallback ??
|
|
119
|
+
(typeof window !== 'undefined' && typeof window?.fetch === 'function');
|
|
102
120
|
opts = Object.assign({ servicePath, port, clientConfig, fallback }, opts);
|
|
103
121
|
// Request numeric enum values if REST transport is used.
|
|
104
122
|
opts.numericEnums = true;
|
|
@@ -156,6 +174,7 @@ class ChatServiceClient {
|
|
|
156
174
|
reactionPathTemplate: new this._gaxModule.PathTemplate('spaces/{space}/messages/{message}/reactions/{reaction}'),
|
|
157
175
|
spacePathTemplate: new this._gaxModule.PathTemplate('spaces/{space}'),
|
|
158
176
|
spaceEventPathTemplate: new this._gaxModule.PathTemplate('spaces/{space}/spaceEvents/{space_event}'),
|
|
177
|
+
spaceNotificationSettingPathTemplate: new this._gaxModule.PathTemplate('users/{user}/spaces/{space}/spaceNotificationSetting'),
|
|
159
178
|
spaceReadStatePathTemplate: new this._gaxModule.PathTemplate('users/{user}/spaces/{space}/spaceReadState'),
|
|
160
179
|
threadPathTemplate: new this._gaxModule.PathTemplate('spaces/{space}/threads/{thread}'),
|
|
161
180
|
threadReadStatePathTemplate: new this._gaxModule.PathTemplate('users/{user}/spaces/{space}/threads/{thread}/threadReadState'),
|
|
@@ -234,6 +253,8 @@ class ChatServiceClient {
|
|
|
234
253
|
'getThreadReadState',
|
|
235
254
|
'getSpaceEvent',
|
|
236
255
|
'listSpaceEvents',
|
|
256
|
+
'getSpaceNotificationSetting',
|
|
257
|
+
'updateSpaceNotificationSetting',
|
|
237
258
|
];
|
|
238
259
|
for (const methodName of chatServiceStubMethods) {
|
|
239
260
|
const callPromise = this.chatServiceStub.then(stub => (...args) => {
|
|
@@ -321,6 +342,7 @@ class ChatServiceClient {
|
|
|
321
342
|
'https://www.googleapis.com/auth/chat.spaces.readonly',
|
|
322
343
|
'https://www.googleapis.com/auth/chat.users.readstate',
|
|
323
344
|
'https://www.googleapis.com/auth/chat.users.readstate.readonly',
|
|
345
|
+
'https://www.googleapis.com/auth/chat.users.spacesettings',
|
|
324
346
|
];
|
|
325
347
|
}
|
|
326
348
|
/**
|
|
@@ -335,7 +357,6 @@ class ChatServiceClient {
|
|
|
335
357
|
return this.auth.getProjectId();
|
|
336
358
|
}
|
|
337
359
|
createMessage(request, optionsOrCallback, callback) {
|
|
338
|
-
var _a;
|
|
339
360
|
request = request || {};
|
|
340
361
|
let options;
|
|
341
362
|
if (typeof optionsOrCallback === 'function' && callback === undefined) {
|
|
@@ -350,13 +371,24 @@ class ChatServiceClient {
|
|
|
350
371
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
351
372
|
options.otherArgs.headers['x-goog-request-params'] =
|
|
352
373
|
this._gaxModule.routingHeader.fromParams({
|
|
353
|
-
parent:
|
|
374
|
+
parent: request.parent ?? '',
|
|
354
375
|
});
|
|
355
376
|
this.initialize();
|
|
356
|
-
|
|
377
|
+
this._log.info('createMessage request %j', request);
|
|
378
|
+
const wrappedCallback = callback
|
|
379
|
+
? (error, response, options, rawResponse) => {
|
|
380
|
+
this._log.info('createMessage response %j', response);
|
|
381
|
+
callback(error, response, options, rawResponse); // We verified callback above.
|
|
382
|
+
}
|
|
383
|
+
: undefined;
|
|
384
|
+
return this.innerApiCalls
|
|
385
|
+
.createMessage(request, options, wrappedCallback)
|
|
386
|
+
?.then(([response, options, rawResponse]) => {
|
|
387
|
+
this._log.info('createMessage response %j', response);
|
|
388
|
+
return [response, options, rawResponse];
|
|
389
|
+
});
|
|
357
390
|
}
|
|
358
391
|
getMembership(request, optionsOrCallback, callback) {
|
|
359
|
-
var _a;
|
|
360
392
|
request = request || {};
|
|
361
393
|
let options;
|
|
362
394
|
if (typeof optionsOrCallback === 'function' && callback === undefined) {
|
|
@@ -371,13 +403,24 @@ class ChatServiceClient {
|
|
|
371
403
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
372
404
|
options.otherArgs.headers['x-goog-request-params'] =
|
|
373
405
|
this._gaxModule.routingHeader.fromParams({
|
|
374
|
-
name:
|
|
406
|
+
name: request.name ?? '',
|
|
375
407
|
});
|
|
376
408
|
this.initialize();
|
|
377
|
-
|
|
409
|
+
this._log.info('getMembership request %j', request);
|
|
410
|
+
const wrappedCallback = callback
|
|
411
|
+
? (error, response, options, rawResponse) => {
|
|
412
|
+
this._log.info('getMembership response %j', response);
|
|
413
|
+
callback(error, response, options, rawResponse); // We verified callback above.
|
|
414
|
+
}
|
|
415
|
+
: undefined;
|
|
416
|
+
return this.innerApiCalls
|
|
417
|
+
.getMembership(request, options, wrappedCallback)
|
|
418
|
+
?.then(([response, options, rawResponse]) => {
|
|
419
|
+
this._log.info('getMembership response %j', response);
|
|
420
|
+
return [response, options, rawResponse];
|
|
421
|
+
});
|
|
378
422
|
}
|
|
379
423
|
getMessage(request, optionsOrCallback, callback) {
|
|
380
|
-
var _a;
|
|
381
424
|
request = request || {};
|
|
382
425
|
let options;
|
|
383
426
|
if (typeof optionsOrCallback === 'function' && callback === undefined) {
|
|
@@ -392,13 +435,24 @@ class ChatServiceClient {
|
|
|
392
435
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
393
436
|
options.otherArgs.headers['x-goog-request-params'] =
|
|
394
437
|
this._gaxModule.routingHeader.fromParams({
|
|
395
|
-
name:
|
|
438
|
+
name: request.name ?? '',
|
|
396
439
|
});
|
|
397
440
|
this.initialize();
|
|
398
|
-
|
|
441
|
+
this._log.info('getMessage request %j', request);
|
|
442
|
+
const wrappedCallback = callback
|
|
443
|
+
? (error, response, options, rawResponse) => {
|
|
444
|
+
this._log.info('getMessage response %j', response);
|
|
445
|
+
callback(error, response, options, rawResponse); // We verified callback above.
|
|
446
|
+
}
|
|
447
|
+
: undefined;
|
|
448
|
+
return this.innerApiCalls
|
|
449
|
+
.getMessage(request, options, wrappedCallback)
|
|
450
|
+
?.then(([response, options, rawResponse]) => {
|
|
451
|
+
this._log.info('getMessage response %j', response);
|
|
452
|
+
return [response, options, rawResponse];
|
|
453
|
+
});
|
|
399
454
|
}
|
|
400
455
|
updateMessage(request, optionsOrCallback, callback) {
|
|
401
|
-
var _a;
|
|
402
456
|
request = request || {};
|
|
403
457
|
let options;
|
|
404
458
|
if (typeof optionsOrCallback === 'function' && callback === undefined) {
|
|
@@ -413,13 +467,24 @@ class ChatServiceClient {
|
|
|
413
467
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
414
468
|
options.otherArgs.headers['x-goog-request-params'] =
|
|
415
469
|
this._gaxModule.routingHeader.fromParams({
|
|
416
|
-
'message.name':
|
|
470
|
+
'message.name': request.message.name ?? '',
|
|
417
471
|
});
|
|
418
472
|
this.initialize();
|
|
419
|
-
|
|
473
|
+
this._log.info('updateMessage request %j', request);
|
|
474
|
+
const wrappedCallback = callback
|
|
475
|
+
? (error, response, options, rawResponse) => {
|
|
476
|
+
this._log.info('updateMessage response %j', response);
|
|
477
|
+
callback(error, response, options, rawResponse); // We verified callback above.
|
|
478
|
+
}
|
|
479
|
+
: undefined;
|
|
480
|
+
return this.innerApiCalls
|
|
481
|
+
.updateMessage(request, options, wrappedCallback)
|
|
482
|
+
?.then(([response, options, rawResponse]) => {
|
|
483
|
+
this._log.info('updateMessage response %j', response);
|
|
484
|
+
return [response, options, rawResponse];
|
|
485
|
+
});
|
|
420
486
|
}
|
|
421
487
|
deleteMessage(request, optionsOrCallback, callback) {
|
|
422
|
-
var _a;
|
|
423
488
|
request = request || {};
|
|
424
489
|
let options;
|
|
425
490
|
if (typeof optionsOrCallback === 'function' && callback === undefined) {
|
|
@@ -434,13 +499,24 @@ class ChatServiceClient {
|
|
|
434
499
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
435
500
|
options.otherArgs.headers['x-goog-request-params'] =
|
|
436
501
|
this._gaxModule.routingHeader.fromParams({
|
|
437
|
-
name:
|
|
502
|
+
name: request.name ?? '',
|
|
438
503
|
});
|
|
439
504
|
this.initialize();
|
|
440
|
-
|
|
505
|
+
this._log.info('deleteMessage request %j', request);
|
|
506
|
+
const wrappedCallback = callback
|
|
507
|
+
? (error, response, options, rawResponse) => {
|
|
508
|
+
this._log.info('deleteMessage response %j', response);
|
|
509
|
+
callback(error, response, options, rawResponse); // We verified callback above.
|
|
510
|
+
}
|
|
511
|
+
: undefined;
|
|
512
|
+
return this.innerApiCalls
|
|
513
|
+
.deleteMessage(request, options, wrappedCallback)
|
|
514
|
+
?.then(([response, options, rawResponse]) => {
|
|
515
|
+
this._log.info('deleteMessage response %j', response);
|
|
516
|
+
return [response, options, rawResponse];
|
|
517
|
+
});
|
|
441
518
|
}
|
|
442
519
|
getAttachment(request, optionsOrCallback, callback) {
|
|
443
|
-
var _a;
|
|
444
520
|
request = request || {};
|
|
445
521
|
let options;
|
|
446
522
|
if (typeof optionsOrCallback === 'function' && callback === undefined) {
|
|
@@ -455,13 +531,24 @@ class ChatServiceClient {
|
|
|
455
531
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
456
532
|
options.otherArgs.headers['x-goog-request-params'] =
|
|
457
533
|
this._gaxModule.routingHeader.fromParams({
|
|
458
|
-
name:
|
|
534
|
+
name: request.name ?? '',
|
|
459
535
|
});
|
|
460
536
|
this.initialize();
|
|
461
|
-
|
|
537
|
+
this._log.info('getAttachment request %j', request);
|
|
538
|
+
const wrappedCallback = callback
|
|
539
|
+
? (error, response, options, rawResponse) => {
|
|
540
|
+
this._log.info('getAttachment response %j', response);
|
|
541
|
+
callback(error, response, options, rawResponse); // We verified callback above.
|
|
542
|
+
}
|
|
543
|
+
: undefined;
|
|
544
|
+
return this.innerApiCalls
|
|
545
|
+
.getAttachment(request, options, wrappedCallback)
|
|
546
|
+
?.then(([response, options, rawResponse]) => {
|
|
547
|
+
this._log.info('getAttachment response %j', response);
|
|
548
|
+
return [response, options, rawResponse];
|
|
549
|
+
});
|
|
462
550
|
}
|
|
463
551
|
uploadAttachment(request, optionsOrCallback, callback) {
|
|
464
|
-
var _a;
|
|
465
552
|
request = request || {};
|
|
466
553
|
let options;
|
|
467
554
|
if (typeof optionsOrCallback === 'function' && callback === undefined) {
|
|
@@ -476,13 +563,24 @@ class ChatServiceClient {
|
|
|
476
563
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
477
564
|
options.otherArgs.headers['x-goog-request-params'] =
|
|
478
565
|
this._gaxModule.routingHeader.fromParams({
|
|
479
|
-
parent:
|
|
566
|
+
parent: request.parent ?? '',
|
|
480
567
|
});
|
|
481
568
|
this.initialize();
|
|
482
|
-
|
|
569
|
+
this._log.info('uploadAttachment request %j', request);
|
|
570
|
+
const wrappedCallback = callback
|
|
571
|
+
? (error, response, options, rawResponse) => {
|
|
572
|
+
this._log.info('uploadAttachment response %j', response);
|
|
573
|
+
callback(error, response, options, rawResponse); // We verified callback above.
|
|
574
|
+
}
|
|
575
|
+
: undefined;
|
|
576
|
+
return this.innerApiCalls
|
|
577
|
+
.uploadAttachment(request, options, wrappedCallback)
|
|
578
|
+
?.then(([response, options, rawResponse]) => {
|
|
579
|
+
this._log.info('uploadAttachment response %j', response);
|
|
580
|
+
return [response, options, rawResponse];
|
|
581
|
+
});
|
|
483
582
|
}
|
|
484
583
|
getSpace(request, optionsOrCallback, callback) {
|
|
485
|
-
var _a;
|
|
486
584
|
request = request || {};
|
|
487
585
|
let options;
|
|
488
586
|
if (typeof optionsOrCallback === 'function' && callback === undefined) {
|
|
@@ -497,10 +595,22 @@ class ChatServiceClient {
|
|
|
497
595
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
498
596
|
options.otherArgs.headers['x-goog-request-params'] =
|
|
499
597
|
this._gaxModule.routingHeader.fromParams({
|
|
500
|
-
name:
|
|
598
|
+
name: request.name ?? '',
|
|
501
599
|
});
|
|
502
600
|
this.initialize();
|
|
503
|
-
|
|
601
|
+
this._log.info('getSpace request %j', request);
|
|
602
|
+
const wrappedCallback = callback
|
|
603
|
+
? (error, response, options, rawResponse) => {
|
|
604
|
+
this._log.info('getSpace response %j', response);
|
|
605
|
+
callback(error, response, options, rawResponse); // We verified callback above.
|
|
606
|
+
}
|
|
607
|
+
: undefined;
|
|
608
|
+
return this.innerApiCalls
|
|
609
|
+
.getSpace(request, options, wrappedCallback)
|
|
610
|
+
?.then(([response, options, rawResponse]) => {
|
|
611
|
+
this._log.info('getSpace response %j', response);
|
|
612
|
+
return [response, options, rawResponse];
|
|
613
|
+
});
|
|
504
614
|
}
|
|
505
615
|
createSpace(request, optionsOrCallback, callback) {
|
|
506
616
|
request = request || {};
|
|
@@ -516,7 +626,19 @@ class ChatServiceClient {
|
|
|
516
626
|
options.otherArgs = options.otherArgs || {};
|
|
517
627
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
518
628
|
this.initialize();
|
|
519
|
-
|
|
629
|
+
this._log.info('createSpace request %j', request);
|
|
630
|
+
const wrappedCallback = callback
|
|
631
|
+
? (error, response, options, rawResponse) => {
|
|
632
|
+
this._log.info('createSpace response %j', response);
|
|
633
|
+
callback(error, response, options, rawResponse); // We verified callback above.
|
|
634
|
+
}
|
|
635
|
+
: undefined;
|
|
636
|
+
return this.innerApiCalls
|
|
637
|
+
.createSpace(request, options, wrappedCallback)
|
|
638
|
+
?.then(([response, options, rawResponse]) => {
|
|
639
|
+
this._log.info('createSpace response %j', response);
|
|
640
|
+
return [response, options, rawResponse];
|
|
641
|
+
});
|
|
520
642
|
}
|
|
521
643
|
setUpSpace(request, optionsOrCallback, callback) {
|
|
522
644
|
request = request || {};
|
|
@@ -532,10 +654,21 @@ class ChatServiceClient {
|
|
|
532
654
|
options.otherArgs = options.otherArgs || {};
|
|
533
655
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
534
656
|
this.initialize();
|
|
535
|
-
|
|
657
|
+
this._log.info('setUpSpace request %j', request);
|
|
658
|
+
const wrappedCallback = callback
|
|
659
|
+
? (error, response, options, rawResponse) => {
|
|
660
|
+
this._log.info('setUpSpace response %j', response);
|
|
661
|
+
callback(error, response, options, rawResponse); // We verified callback above.
|
|
662
|
+
}
|
|
663
|
+
: undefined;
|
|
664
|
+
return this.innerApiCalls
|
|
665
|
+
.setUpSpace(request, options, wrappedCallback)
|
|
666
|
+
?.then(([response, options, rawResponse]) => {
|
|
667
|
+
this._log.info('setUpSpace response %j', response);
|
|
668
|
+
return [response, options, rawResponse];
|
|
669
|
+
});
|
|
536
670
|
}
|
|
537
671
|
updateSpace(request, optionsOrCallback, callback) {
|
|
538
|
-
var _a;
|
|
539
672
|
request = request || {};
|
|
540
673
|
let options;
|
|
541
674
|
if (typeof optionsOrCallback === 'function' && callback === undefined) {
|
|
@@ -550,13 +683,24 @@ class ChatServiceClient {
|
|
|
550
683
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
551
684
|
options.otherArgs.headers['x-goog-request-params'] =
|
|
552
685
|
this._gaxModule.routingHeader.fromParams({
|
|
553
|
-
'space.name':
|
|
686
|
+
'space.name': request.space.name ?? '',
|
|
554
687
|
});
|
|
555
688
|
this.initialize();
|
|
556
|
-
|
|
689
|
+
this._log.info('updateSpace request %j', request);
|
|
690
|
+
const wrappedCallback = callback
|
|
691
|
+
? (error, response, options, rawResponse) => {
|
|
692
|
+
this._log.info('updateSpace response %j', response);
|
|
693
|
+
callback(error, response, options, rawResponse); // We verified callback above.
|
|
694
|
+
}
|
|
695
|
+
: undefined;
|
|
696
|
+
return this.innerApiCalls
|
|
697
|
+
.updateSpace(request, options, wrappedCallback)
|
|
698
|
+
?.then(([response, options, rawResponse]) => {
|
|
699
|
+
this._log.info('updateSpace response %j', response);
|
|
700
|
+
return [response, options, rawResponse];
|
|
701
|
+
});
|
|
557
702
|
}
|
|
558
703
|
deleteSpace(request, optionsOrCallback, callback) {
|
|
559
|
-
var _a;
|
|
560
704
|
request = request || {};
|
|
561
705
|
let options;
|
|
562
706
|
if (typeof optionsOrCallback === 'function' && callback === undefined) {
|
|
@@ -571,13 +715,24 @@ class ChatServiceClient {
|
|
|
571
715
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
572
716
|
options.otherArgs.headers['x-goog-request-params'] =
|
|
573
717
|
this._gaxModule.routingHeader.fromParams({
|
|
574
|
-
name:
|
|
718
|
+
name: request.name ?? '',
|
|
575
719
|
});
|
|
576
720
|
this.initialize();
|
|
577
|
-
|
|
721
|
+
this._log.info('deleteSpace request %j', request);
|
|
722
|
+
const wrappedCallback = callback
|
|
723
|
+
? (error, response, options, rawResponse) => {
|
|
724
|
+
this._log.info('deleteSpace response %j', response);
|
|
725
|
+
callback(error, response, options, rawResponse); // We verified callback above.
|
|
726
|
+
}
|
|
727
|
+
: undefined;
|
|
728
|
+
return this.innerApiCalls
|
|
729
|
+
.deleteSpace(request, options, wrappedCallback)
|
|
730
|
+
?.then(([response, options, rawResponse]) => {
|
|
731
|
+
this._log.info('deleteSpace response %j', response);
|
|
732
|
+
return [response, options, rawResponse];
|
|
733
|
+
});
|
|
578
734
|
}
|
|
579
735
|
completeImportSpace(request, optionsOrCallback, callback) {
|
|
580
|
-
var _a;
|
|
581
736
|
request = request || {};
|
|
582
737
|
let options;
|
|
583
738
|
if (typeof optionsOrCallback === 'function' && callback === undefined) {
|
|
@@ -592,10 +747,22 @@ class ChatServiceClient {
|
|
|
592
747
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
593
748
|
options.otherArgs.headers['x-goog-request-params'] =
|
|
594
749
|
this._gaxModule.routingHeader.fromParams({
|
|
595
|
-
name:
|
|
750
|
+
name: request.name ?? '',
|
|
596
751
|
});
|
|
597
752
|
this.initialize();
|
|
598
|
-
|
|
753
|
+
this._log.info('completeImportSpace request %j', request);
|
|
754
|
+
const wrappedCallback = callback
|
|
755
|
+
? (error, response, options, rawResponse) => {
|
|
756
|
+
this._log.info('completeImportSpace response %j', response);
|
|
757
|
+
callback(error, response, options, rawResponse); // We verified callback above.
|
|
758
|
+
}
|
|
759
|
+
: undefined;
|
|
760
|
+
return this.innerApiCalls
|
|
761
|
+
.completeImportSpace(request, options, wrappedCallback)
|
|
762
|
+
?.then(([response, options, rawResponse]) => {
|
|
763
|
+
this._log.info('completeImportSpace response %j', response);
|
|
764
|
+
return [response, options, rawResponse];
|
|
765
|
+
});
|
|
599
766
|
}
|
|
600
767
|
findDirectMessage(request, optionsOrCallback, callback) {
|
|
601
768
|
request = request || {};
|
|
@@ -611,10 +778,21 @@ class ChatServiceClient {
|
|
|
611
778
|
options.otherArgs = options.otherArgs || {};
|
|
612
779
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
613
780
|
this.initialize();
|
|
614
|
-
|
|
781
|
+
this._log.info('findDirectMessage request %j', request);
|
|
782
|
+
const wrappedCallback = callback
|
|
783
|
+
? (error, response, options, rawResponse) => {
|
|
784
|
+
this._log.info('findDirectMessage response %j', response);
|
|
785
|
+
callback(error, response, options, rawResponse); // We verified callback above.
|
|
786
|
+
}
|
|
787
|
+
: undefined;
|
|
788
|
+
return this.innerApiCalls
|
|
789
|
+
.findDirectMessage(request, options, wrappedCallback)
|
|
790
|
+
?.then(([response, options, rawResponse]) => {
|
|
791
|
+
this._log.info('findDirectMessage response %j', response);
|
|
792
|
+
return [response, options, rawResponse];
|
|
793
|
+
});
|
|
615
794
|
}
|
|
616
795
|
createMembership(request, optionsOrCallback, callback) {
|
|
617
|
-
var _a;
|
|
618
796
|
request = request || {};
|
|
619
797
|
let options;
|
|
620
798
|
if (typeof optionsOrCallback === 'function' && callback === undefined) {
|
|
@@ -629,13 +807,24 @@ class ChatServiceClient {
|
|
|
629
807
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
630
808
|
options.otherArgs.headers['x-goog-request-params'] =
|
|
631
809
|
this._gaxModule.routingHeader.fromParams({
|
|
632
|
-
parent:
|
|
810
|
+
parent: request.parent ?? '',
|
|
633
811
|
});
|
|
634
812
|
this.initialize();
|
|
635
|
-
|
|
813
|
+
this._log.info('createMembership request %j', request);
|
|
814
|
+
const wrappedCallback = callback
|
|
815
|
+
? (error, response, options, rawResponse) => {
|
|
816
|
+
this._log.info('createMembership response %j', response);
|
|
817
|
+
callback(error, response, options, rawResponse); // We verified callback above.
|
|
818
|
+
}
|
|
819
|
+
: undefined;
|
|
820
|
+
return this.innerApiCalls
|
|
821
|
+
.createMembership(request, options, wrappedCallback)
|
|
822
|
+
?.then(([response, options, rawResponse]) => {
|
|
823
|
+
this._log.info('createMembership response %j', response);
|
|
824
|
+
return [response, options, rawResponse];
|
|
825
|
+
});
|
|
636
826
|
}
|
|
637
827
|
updateMembership(request, optionsOrCallback, callback) {
|
|
638
|
-
var _a;
|
|
639
828
|
request = request || {};
|
|
640
829
|
let options;
|
|
641
830
|
if (typeof optionsOrCallback === 'function' && callback === undefined) {
|
|
@@ -650,13 +839,24 @@ class ChatServiceClient {
|
|
|
650
839
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
651
840
|
options.otherArgs.headers['x-goog-request-params'] =
|
|
652
841
|
this._gaxModule.routingHeader.fromParams({
|
|
653
|
-
'membership.name':
|
|
842
|
+
'membership.name': request.membership.name ?? '',
|
|
654
843
|
});
|
|
655
844
|
this.initialize();
|
|
656
|
-
|
|
845
|
+
this._log.info('updateMembership request %j', request);
|
|
846
|
+
const wrappedCallback = callback
|
|
847
|
+
? (error, response, options, rawResponse) => {
|
|
848
|
+
this._log.info('updateMembership response %j', response);
|
|
849
|
+
callback(error, response, options, rawResponse); // We verified callback above.
|
|
850
|
+
}
|
|
851
|
+
: undefined;
|
|
852
|
+
return this.innerApiCalls
|
|
853
|
+
.updateMembership(request, options, wrappedCallback)
|
|
854
|
+
?.then(([response, options, rawResponse]) => {
|
|
855
|
+
this._log.info('updateMembership response %j', response);
|
|
856
|
+
return [response, options, rawResponse];
|
|
857
|
+
});
|
|
657
858
|
}
|
|
658
859
|
deleteMembership(request, optionsOrCallback, callback) {
|
|
659
|
-
var _a;
|
|
660
860
|
request = request || {};
|
|
661
861
|
let options;
|
|
662
862
|
if (typeof optionsOrCallback === 'function' && callback === undefined) {
|
|
@@ -671,13 +871,24 @@ class ChatServiceClient {
|
|
|
671
871
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
672
872
|
options.otherArgs.headers['x-goog-request-params'] =
|
|
673
873
|
this._gaxModule.routingHeader.fromParams({
|
|
674
|
-
name:
|
|
874
|
+
name: request.name ?? '',
|
|
675
875
|
});
|
|
676
876
|
this.initialize();
|
|
677
|
-
|
|
877
|
+
this._log.info('deleteMembership request %j', request);
|
|
878
|
+
const wrappedCallback = callback
|
|
879
|
+
? (error, response, options, rawResponse) => {
|
|
880
|
+
this._log.info('deleteMembership response %j', response);
|
|
881
|
+
callback(error, response, options, rawResponse); // We verified callback above.
|
|
882
|
+
}
|
|
883
|
+
: undefined;
|
|
884
|
+
return this.innerApiCalls
|
|
885
|
+
.deleteMembership(request, options, wrappedCallback)
|
|
886
|
+
?.then(([response, options, rawResponse]) => {
|
|
887
|
+
this._log.info('deleteMembership response %j', response);
|
|
888
|
+
return [response, options, rawResponse];
|
|
889
|
+
});
|
|
678
890
|
}
|
|
679
891
|
createReaction(request, optionsOrCallback, callback) {
|
|
680
|
-
var _a;
|
|
681
892
|
request = request || {};
|
|
682
893
|
let options;
|
|
683
894
|
if (typeof optionsOrCallback === 'function' && callback === undefined) {
|
|
@@ -692,13 +903,24 @@ class ChatServiceClient {
|
|
|
692
903
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
693
904
|
options.otherArgs.headers['x-goog-request-params'] =
|
|
694
905
|
this._gaxModule.routingHeader.fromParams({
|
|
695
|
-
parent:
|
|
906
|
+
parent: request.parent ?? '',
|
|
696
907
|
});
|
|
697
908
|
this.initialize();
|
|
698
|
-
|
|
909
|
+
this._log.info('createReaction request %j', request);
|
|
910
|
+
const wrappedCallback = callback
|
|
911
|
+
? (error, response, options, rawResponse) => {
|
|
912
|
+
this._log.info('createReaction response %j', response);
|
|
913
|
+
callback(error, response, options, rawResponse); // We verified callback above.
|
|
914
|
+
}
|
|
915
|
+
: undefined;
|
|
916
|
+
return this.innerApiCalls
|
|
917
|
+
.createReaction(request, options, wrappedCallback)
|
|
918
|
+
?.then(([response, options, rawResponse]) => {
|
|
919
|
+
this._log.info('createReaction response %j', response);
|
|
920
|
+
return [response, options, rawResponse];
|
|
921
|
+
});
|
|
699
922
|
}
|
|
700
923
|
deleteReaction(request, optionsOrCallback, callback) {
|
|
701
|
-
var _a;
|
|
702
924
|
request = request || {};
|
|
703
925
|
let options;
|
|
704
926
|
if (typeof optionsOrCallback === 'function' && callback === undefined) {
|
|
@@ -713,13 +935,24 @@ class ChatServiceClient {
|
|
|
713
935
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
714
936
|
options.otherArgs.headers['x-goog-request-params'] =
|
|
715
937
|
this._gaxModule.routingHeader.fromParams({
|
|
716
|
-
name:
|
|
938
|
+
name: request.name ?? '',
|
|
717
939
|
});
|
|
718
940
|
this.initialize();
|
|
719
|
-
|
|
941
|
+
this._log.info('deleteReaction request %j', request);
|
|
942
|
+
const wrappedCallback = callback
|
|
943
|
+
? (error, response, options, rawResponse) => {
|
|
944
|
+
this._log.info('deleteReaction response %j', response);
|
|
945
|
+
callback(error, response, options, rawResponse); // We verified callback above.
|
|
946
|
+
}
|
|
947
|
+
: undefined;
|
|
948
|
+
return this.innerApiCalls
|
|
949
|
+
.deleteReaction(request, options, wrappedCallback)
|
|
950
|
+
?.then(([response, options, rawResponse]) => {
|
|
951
|
+
this._log.info('deleteReaction response %j', response);
|
|
952
|
+
return [response, options, rawResponse];
|
|
953
|
+
});
|
|
720
954
|
}
|
|
721
955
|
getSpaceReadState(request, optionsOrCallback, callback) {
|
|
722
|
-
var _a;
|
|
723
956
|
request = request || {};
|
|
724
957
|
let options;
|
|
725
958
|
if (typeof optionsOrCallback === 'function' && callback === undefined) {
|
|
@@ -734,13 +967,24 @@ class ChatServiceClient {
|
|
|
734
967
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
735
968
|
options.otherArgs.headers['x-goog-request-params'] =
|
|
736
969
|
this._gaxModule.routingHeader.fromParams({
|
|
737
|
-
name:
|
|
970
|
+
name: request.name ?? '',
|
|
738
971
|
});
|
|
739
972
|
this.initialize();
|
|
740
|
-
|
|
973
|
+
this._log.info('getSpaceReadState request %j', request);
|
|
974
|
+
const wrappedCallback = callback
|
|
975
|
+
? (error, response, options, rawResponse) => {
|
|
976
|
+
this._log.info('getSpaceReadState response %j', response);
|
|
977
|
+
callback(error, response, options, rawResponse); // We verified callback above.
|
|
978
|
+
}
|
|
979
|
+
: undefined;
|
|
980
|
+
return this.innerApiCalls
|
|
981
|
+
.getSpaceReadState(request, options, wrappedCallback)
|
|
982
|
+
?.then(([response, options, rawResponse]) => {
|
|
983
|
+
this._log.info('getSpaceReadState response %j', response);
|
|
984
|
+
return [response, options, rawResponse];
|
|
985
|
+
});
|
|
741
986
|
}
|
|
742
987
|
updateSpaceReadState(request, optionsOrCallback, callback) {
|
|
743
|
-
var _a;
|
|
744
988
|
request = request || {};
|
|
745
989
|
let options;
|
|
746
990
|
if (typeof optionsOrCallback === 'function' && callback === undefined) {
|
|
@@ -755,13 +999,24 @@ class ChatServiceClient {
|
|
|
755
999
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
756
1000
|
options.otherArgs.headers['x-goog-request-params'] =
|
|
757
1001
|
this._gaxModule.routingHeader.fromParams({
|
|
758
|
-
'space_read_state.name':
|
|
1002
|
+
'space_read_state.name': request.spaceReadState.name ?? '',
|
|
759
1003
|
});
|
|
760
1004
|
this.initialize();
|
|
761
|
-
|
|
1005
|
+
this._log.info('updateSpaceReadState request %j', request);
|
|
1006
|
+
const wrappedCallback = callback
|
|
1007
|
+
? (error, response, options, rawResponse) => {
|
|
1008
|
+
this._log.info('updateSpaceReadState response %j', response);
|
|
1009
|
+
callback(error, response, options, rawResponse); // We verified callback above.
|
|
1010
|
+
}
|
|
1011
|
+
: undefined;
|
|
1012
|
+
return this.innerApiCalls
|
|
1013
|
+
.updateSpaceReadState(request, options, wrappedCallback)
|
|
1014
|
+
?.then(([response, options, rawResponse]) => {
|
|
1015
|
+
this._log.info('updateSpaceReadState response %j', response);
|
|
1016
|
+
return [response, options, rawResponse];
|
|
1017
|
+
});
|
|
762
1018
|
}
|
|
763
1019
|
getThreadReadState(request, optionsOrCallback, callback) {
|
|
764
|
-
var _a;
|
|
765
1020
|
request = request || {};
|
|
766
1021
|
let options;
|
|
767
1022
|
if (typeof optionsOrCallback === 'function' && callback === undefined) {
|
|
@@ -776,13 +1031,24 @@ class ChatServiceClient {
|
|
|
776
1031
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
777
1032
|
options.otherArgs.headers['x-goog-request-params'] =
|
|
778
1033
|
this._gaxModule.routingHeader.fromParams({
|
|
779
|
-
name:
|
|
1034
|
+
name: request.name ?? '',
|
|
780
1035
|
});
|
|
781
1036
|
this.initialize();
|
|
782
|
-
|
|
1037
|
+
this._log.info('getThreadReadState request %j', request);
|
|
1038
|
+
const wrappedCallback = callback
|
|
1039
|
+
? (error, response, options, rawResponse) => {
|
|
1040
|
+
this._log.info('getThreadReadState response %j', response);
|
|
1041
|
+
callback(error, response, options, rawResponse); // We verified callback above.
|
|
1042
|
+
}
|
|
1043
|
+
: undefined;
|
|
1044
|
+
return this.innerApiCalls
|
|
1045
|
+
.getThreadReadState(request, options, wrappedCallback)
|
|
1046
|
+
?.then(([response, options, rawResponse]) => {
|
|
1047
|
+
this._log.info('getThreadReadState response %j', response);
|
|
1048
|
+
return [response, options, rawResponse];
|
|
1049
|
+
});
|
|
783
1050
|
}
|
|
784
1051
|
getSpaceEvent(request, optionsOrCallback, callback) {
|
|
785
|
-
var _a;
|
|
786
1052
|
request = request || {};
|
|
787
1053
|
let options;
|
|
788
1054
|
if (typeof optionsOrCallback === 'function' && callback === undefined) {
|
|
@@ -797,13 +1063,88 @@ class ChatServiceClient {
|
|
|
797
1063
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
798
1064
|
options.otherArgs.headers['x-goog-request-params'] =
|
|
799
1065
|
this._gaxModule.routingHeader.fromParams({
|
|
800
|
-
name:
|
|
1066
|
+
name: request.name ?? '',
|
|
801
1067
|
});
|
|
802
1068
|
this.initialize();
|
|
803
|
-
|
|
1069
|
+
this._log.info('getSpaceEvent request %j', request);
|
|
1070
|
+
const wrappedCallback = callback
|
|
1071
|
+
? (error, response, options, rawResponse) => {
|
|
1072
|
+
this._log.info('getSpaceEvent response %j', response);
|
|
1073
|
+
callback(error, response, options, rawResponse); // We verified callback above.
|
|
1074
|
+
}
|
|
1075
|
+
: undefined;
|
|
1076
|
+
return this.innerApiCalls
|
|
1077
|
+
.getSpaceEvent(request, options, wrappedCallback)
|
|
1078
|
+
?.then(([response, options, rawResponse]) => {
|
|
1079
|
+
this._log.info('getSpaceEvent response %j', response);
|
|
1080
|
+
return [response, options, rawResponse];
|
|
1081
|
+
});
|
|
1082
|
+
}
|
|
1083
|
+
getSpaceNotificationSetting(request, optionsOrCallback, callback) {
|
|
1084
|
+
request = request || {};
|
|
1085
|
+
let options;
|
|
1086
|
+
if (typeof optionsOrCallback === 'function' && callback === undefined) {
|
|
1087
|
+
callback = optionsOrCallback;
|
|
1088
|
+
options = {};
|
|
1089
|
+
}
|
|
1090
|
+
else {
|
|
1091
|
+
options = optionsOrCallback;
|
|
1092
|
+
}
|
|
1093
|
+
options = options || {};
|
|
1094
|
+
options.otherArgs = options.otherArgs || {};
|
|
1095
|
+
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
1096
|
+
options.otherArgs.headers['x-goog-request-params'] =
|
|
1097
|
+
this._gaxModule.routingHeader.fromParams({
|
|
1098
|
+
name: request.name ?? '',
|
|
1099
|
+
});
|
|
1100
|
+
this.initialize();
|
|
1101
|
+
this._log.info('getSpaceNotificationSetting request %j', request);
|
|
1102
|
+
const wrappedCallback = callback
|
|
1103
|
+
? (error, response, options, rawResponse) => {
|
|
1104
|
+
this._log.info('getSpaceNotificationSetting response %j', response);
|
|
1105
|
+
callback(error, response, options, rawResponse); // We verified callback above.
|
|
1106
|
+
}
|
|
1107
|
+
: undefined;
|
|
1108
|
+
return this.innerApiCalls
|
|
1109
|
+
.getSpaceNotificationSetting(request, options, wrappedCallback)
|
|
1110
|
+
?.then(([response, options, rawResponse]) => {
|
|
1111
|
+
this._log.info('getSpaceNotificationSetting response %j', response);
|
|
1112
|
+
return [response, options, rawResponse];
|
|
1113
|
+
});
|
|
1114
|
+
}
|
|
1115
|
+
updateSpaceNotificationSetting(request, optionsOrCallback, callback) {
|
|
1116
|
+
request = request || {};
|
|
1117
|
+
let options;
|
|
1118
|
+
if (typeof optionsOrCallback === 'function' && callback === undefined) {
|
|
1119
|
+
callback = optionsOrCallback;
|
|
1120
|
+
options = {};
|
|
1121
|
+
}
|
|
1122
|
+
else {
|
|
1123
|
+
options = optionsOrCallback;
|
|
1124
|
+
}
|
|
1125
|
+
options = options || {};
|
|
1126
|
+
options.otherArgs = options.otherArgs || {};
|
|
1127
|
+
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
1128
|
+
options.otherArgs.headers['x-goog-request-params'] =
|
|
1129
|
+
this._gaxModule.routingHeader.fromParams({
|
|
1130
|
+
'space_notification_setting.name': request.spaceNotificationSetting.name ?? '',
|
|
1131
|
+
});
|
|
1132
|
+
this.initialize();
|
|
1133
|
+
this._log.info('updateSpaceNotificationSetting request %j', request);
|
|
1134
|
+
const wrappedCallback = callback
|
|
1135
|
+
? (error, response, options, rawResponse) => {
|
|
1136
|
+
this._log.info('updateSpaceNotificationSetting response %j', response);
|
|
1137
|
+
callback(error, response, options, rawResponse); // We verified callback above.
|
|
1138
|
+
}
|
|
1139
|
+
: undefined;
|
|
1140
|
+
return this.innerApiCalls
|
|
1141
|
+
.updateSpaceNotificationSetting(request, options, wrappedCallback)
|
|
1142
|
+
?.then(([response, options, rawResponse]) => {
|
|
1143
|
+
this._log.info('updateSpaceNotificationSetting response %j', response);
|
|
1144
|
+
return [response, options, rawResponse];
|
|
1145
|
+
});
|
|
804
1146
|
}
|
|
805
1147
|
listMessages(request, optionsOrCallback, callback) {
|
|
806
|
-
var _a;
|
|
807
1148
|
request = request || {};
|
|
808
1149
|
let options;
|
|
809
1150
|
if (typeof optionsOrCallback === 'function' && callback === undefined) {
|
|
@@ -818,13 +1159,25 @@ class ChatServiceClient {
|
|
|
818
1159
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
819
1160
|
options.otherArgs.headers['x-goog-request-params'] =
|
|
820
1161
|
this._gaxModule.routingHeader.fromParams({
|
|
821
|
-
parent:
|
|
1162
|
+
parent: request.parent ?? '',
|
|
822
1163
|
});
|
|
823
1164
|
this.initialize();
|
|
824
|
-
|
|
1165
|
+
const wrappedCallback = callback
|
|
1166
|
+
? (error, values, nextPageRequest, rawResponse) => {
|
|
1167
|
+
this._log.info('listMessages values %j', values);
|
|
1168
|
+
callback(error, values, nextPageRequest, rawResponse); // We verified callback above.
|
|
1169
|
+
}
|
|
1170
|
+
: undefined;
|
|
1171
|
+
this._log.info('listMessages request %j', request);
|
|
1172
|
+
return this.innerApiCalls
|
|
1173
|
+
.listMessages(request, options, wrappedCallback)
|
|
1174
|
+
?.then(([response, input, output]) => {
|
|
1175
|
+
this._log.info('listMessages values %j', response);
|
|
1176
|
+
return [response, input, output];
|
|
1177
|
+
});
|
|
825
1178
|
}
|
|
826
1179
|
/**
|
|
827
|
-
* Equivalent to `
|
|
1180
|
+
* Equivalent to `listMessages`, but returns a NodeJS Stream object.
|
|
828
1181
|
* @param {Object} request
|
|
829
1182
|
* The request object that will be sent.
|
|
830
1183
|
* @param {string} request.parent
|
|
@@ -911,18 +1264,18 @@ class ChatServiceClient {
|
|
|
911
1264
|
* for more details and examples.
|
|
912
1265
|
*/
|
|
913
1266
|
listMessagesStream(request, options) {
|
|
914
|
-
var _a;
|
|
915
1267
|
request = request || {};
|
|
916
1268
|
options = options || {};
|
|
917
1269
|
options.otherArgs = options.otherArgs || {};
|
|
918
1270
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
919
1271
|
options.otherArgs.headers['x-goog-request-params'] =
|
|
920
1272
|
this._gaxModule.routingHeader.fromParams({
|
|
921
|
-
parent:
|
|
1273
|
+
parent: request.parent ?? '',
|
|
922
1274
|
});
|
|
923
1275
|
const defaultCallSettings = this._defaults['listMessages'];
|
|
924
1276
|
const callSettings = defaultCallSettings.merge(options);
|
|
925
1277
|
this.initialize();
|
|
1278
|
+
this._log.info('listMessages stream %j', request);
|
|
926
1279
|
return this.descriptors.page.listMessages.createStream(this.innerApiCalls.listMessages, request, callSettings);
|
|
927
1280
|
}
|
|
928
1281
|
/**
|
|
@@ -1016,22 +1369,21 @@ class ChatServiceClient {
|
|
|
1016
1369
|
* region_tag:chat_v1_generated_ChatService_ListMessages_async
|
|
1017
1370
|
*/
|
|
1018
1371
|
listMessagesAsync(request, options) {
|
|
1019
|
-
var _a;
|
|
1020
1372
|
request = request || {};
|
|
1021
1373
|
options = options || {};
|
|
1022
1374
|
options.otherArgs = options.otherArgs || {};
|
|
1023
1375
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
1024
1376
|
options.otherArgs.headers['x-goog-request-params'] =
|
|
1025
1377
|
this._gaxModule.routingHeader.fromParams({
|
|
1026
|
-
parent:
|
|
1378
|
+
parent: request.parent ?? '',
|
|
1027
1379
|
});
|
|
1028
1380
|
const defaultCallSettings = this._defaults['listMessages'];
|
|
1029
1381
|
const callSettings = defaultCallSettings.merge(options);
|
|
1030
1382
|
this.initialize();
|
|
1383
|
+
this._log.info('listMessages iterate %j', request);
|
|
1031
1384
|
return this.descriptors.page.listMessages.asyncIterate(this.innerApiCalls['listMessages'], request, callSettings);
|
|
1032
1385
|
}
|
|
1033
1386
|
listMemberships(request, optionsOrCallback, callback) {
|
|
1034
|
-
var _a;
|
|
1035
1387
|
request = request || {};
|
|
1036
1388
|
let options;
|
|
1037
1389
|
if (typeof optionsOrCallback === 'function' && callback === undefined) {
|
|
@@ -1046,13 +1398,25 @@ class ChatServiceClient {
|
|
|
1046
1398
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
1047
1399
|
options.otherArgs.headers['x-goog-request-params'] =
|
|
1048
1400
|
this._gaxModule.routingHeader.fromParams({
|
|
1049
|
-
parent:
|
|
1401
|
+
parent: request.parent ?? '',
|
|
1050
1402
|
});
|
|
1051
1403
|
this.initialize();
|
|
1052
|
-
|
|
1404
|
+
const wrappedCallback = callback
|
|
1405
|
+
? (error, values, nextPageRequest, rawResponse) => {
|
|
1406
|
+
this._log.info('listMemberships values %j', values);
|
|
1407
|
+
callback(error, values, nextPageRequest, rawResponse); // We verified callback above.
|
|
1408
|
+
}
|
|
1409
|
+
: undefined;
|
|
1410
|
+
this._log.info('listMemberships request %j', request);
|
|
1411
|
+
return this.innerApiCalls
|
|
1412
|
+
.listMemberships(request, options, wrappedCallback)
|
|
1413
|
+
?.then(([response, input, output]) => {
|
|
1414
|
+
this._log.info('listMemberships values %j', response);
|
|
1415
|
+
return [response, input, output];
|
|
1416
|
+
});
|
|
1053
1417
|
}
|
|
1054
1418
|
/**
|
|
1055
|
-
* Equivalent to `
|
|
1419
|
+
* Equivalent to `listMemberships`, but returns a NodeJS Stream object.
|
|
1056
1420
|
* @param {Object} request
|
|
1057
1421
|
* The request object that will be sent.
|
|
1058
1422
|
* @param {string} request.parent
|
|
@@ -1157,18 +1521,18 @@ class ChatServiceClient {
|
|
|
1157
1521
|
* for more details and examples.
|
|
1158
1522
|
*/
|
|
1159
1523
|
listMembershipsStream(request, options) {
|
|
1160
|
-
var _a;
|
|
1161
1524
|
request = request || {};
|
|
1162
1525
|
options = options || {};
|
|
1163
1526
|
options.otherArgs = options.otherArgs || {};
|
|
1164
1527
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
1165
1528
|
options.otherArgs.headers['x-goog-request-params'] =
|
|
1166
1529
|
this._gaxModule.routingHeader.fromParams({
|
|
1167
|
-
parent:
|
|
1530
|
+
parent: request.parent ?? '',
|
|
1168
1531
|
});
|
|
1169
1532
|
const defaultCallSettings = this._defaults['listMemberships'];
|
|
1170
1533
|
const callSettings = defaultCallSettings.merge(options);
|
|
1171
1534
|
this.initialize();
|
|
1535
|
+
this._log.info('listMemberships stream %j', request);
|
|
1172
1536
|
return this.descriptors.page.listMemberships.createStream(this.innerApiCalls.listMemberships, request, callSettings);
|
|
1173
1537
|
}
|
|
1174
1538
|
/**
|
|
@@ -1280,18 +1644,18 @@ class ChatServiceClient {
|
|
|
1280
1644
|
* region_tag:chat_v1_generated_ChatService_ListMemberships_async
|
|
1281
1645
|
*/
|
|
1282
1646
|
listMembershipsAsync(request, options) {
|
|
1283
|
-
var _a;
|
|
1284
1647
|
request = request || {};
|
|
1285
1648
|
options = options || {};
|
|
1286
1649
|
options.otherArgs = options.otherArgs || {};
|
|
1287
1650
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
1288
1651
|
options.otherArgs.headers['x-goog-request-params'] =
|
|
1289
1652
|
this._gaxModule.routingHeader.fromParams({
|
|
1290
|
-
parent:
|
|
1653
|
+
parent: request.parent ?? '',
|
|
1291
1654
|
});
|
|
1292
1655
|
const defaultCallSettings = this._defaults['listMemberships'];
|
|
1293
1656
|
const callSettings = defaultCallSettings.merge(options);
|
|
1294
1657
|
this.initialize();
|
|
1658
|
+
this._log.info('listMemberships iterate %j', request);
|
|
1295
1659
|
return this.descriptors.page.listMemberships.asyncIterate(this.innerApiCalls['listMemberships'], request, callSettings);
|
|
1296
1660
|
}
|
|
1297
1661
|
listSpaces(request, optionsOrCallback, callback) {
|
|
@@ -1308,10 +1672,22 @@ class ChatServiceClient {
|
|
|
1308
1672
|
options.otherArgs = options.otherArgs || {};
|
|
1309
1673
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
1310
1674
|
this.initialize();
|
|
1311
|
-
|
|
1675
|
+
const wrappedCallback = callback
|
|
1676
|
+
? (error, values, nextPageRequest, rawResponse) => {
|
|
1677
|
+
this._log.info('listSpaces values %j', values);
|
|
1678
|
+
callback(error, values, nextPageRequest, rawResponse); // We verified callback above.
|
|
1679
|
+
}
|
|
1680
|
+
: undefined;
|
|
1681
|
+
this._log.info('listSpaces request %j', request);
|
|
1682
|
+
return this.innerApiCalls
|
|
1683
|
+
.listSpaces(request, options, wrappedCallback)
|
|
1684
|
+
?.then(([response, input, output]) => {
|
|
1685
|
+
this._log.info('listSpaces values %j', response);
|
|
1686
|
+
return [response, input, output];
|
|
1687
|
+
});
|
|
1312
1688
|
}
|
|
1313
1689
|
/**
|
|
1314
|
-
* Equivalent to `
|
|
1690
|
+
* Equivalent to `listSpaces`, but returns a NodeJS Stream object.
|
|
1315
1691
|
* @param {Object} request
|
|
1316
1692
|
* The request object that will be sent.
|
|
1317
1693
|
* @param {number} [request.pageSize]
|
|
@@ -1369,6 +1745,7 @@ class ChatServiceClient {
|
|
|
1369
1745
|
const defaultCallSettings = this._defaults['listSpaces'];
|
|
1370
1746
|
const callSettings = defaultCallSettings.merge(options);
|
|
1371
1747
|
this.initialize();
|
|
1748
|
+
this._log.info('listSpaces stream %j', request);
|
|
1372
1749
|
return this.descriptors.page.listSpaces.createStream(this.innerApiCalls.listSpaces, request, callSettings);
|
|
1373
1750
|
}
|
|
1374
1751
|
/**
|
|
@@ -1433,6 +1810,7 @@ class ChatServiceClient {
|
|
|
1433
1810
|
const defaultCallSettings = this._defaults['listSpaces'];
|
|
1434
1811
|
const callSettings = defaultCallSettings.merge(options);
|
|
1435
1812
|
this.initialize();
|
|
1813
|
+
this._log.info('listSpaces iterate %j', request);
|
|
1436
1814
|
return this.descriptors.page.listSpaces.asyncIterate(this.innerApiCalls['listSpaces'], request, callSettings);
|
|
1437
1815
|
}
|
|
1438
1816
|
searchSpaces(request, optionsOrCallback, callback) {
|
|
@@ -1449,10 +1827,22 @@ class ChatServiceClient {
|
|
|
1449
1827
|
options.otherArgs = options.otherArgs || {};
|
|
1450
1828
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
1451
1829
|
this.initialize();
|
|
1452
|
-
|
|
1830
|
+
const wrappedCallback = callback
|
|
1831
|
+
? (error, values, nextPageRequest, rawResponse) => {
|
|
1832
|
+
this._log.info('searchSpaces values %j', values);
|
|
1833
|
+
callback(error, values, nextPageRequest, rawResponse); // We verified callback above.
|
|
1834
|
+
}
|
|
1835
|
+
: undefined;
|
|
1836
|
+
this._log.info('searchSpaces request %j', request);
|
|
1837
|
+
return this.innerApiCalls
|
|
1838
|
+
.searchSpaces(request, options, wrappedCallback)
|
|
1839
|
+
?.then(([response, input, output]) => {
|
|
1840
|
+
this._log.info('searchSpaces values %j', response);
|
|
1841
|
+
return [response, input, output];
|
|
1842
|
+
});
|
|
1453
1843
|
}
|
|
1454
1844
|
/**
|
|
1455
|
-
* Equivalent to `
|
|
1845
|
+
* Equivalent to `searchSpaces`, but returns a NodeJS Stream object.
|
|
1456
1846
|
* @param {Object} request
|
|
1457
1847
|
* The request object that will be sent.
|
|
1458
1848
|
* @param {boolean} request.useAdminAccess
|
|
@@ -1597,6 +1987,7 @@ class ChatServiceClient {
|
|
|
1597
1987
|
const defaultCallSettings = this._defaults['searchSpaces'];
|
|
1598
1988
|
const callSettings = defaultCallSettings.merge(options);
|
|
1599
1989
|
this.initialize();
|
|
1990
|
+
this._log.info('searchSpaces stream %j', request);
|
|
1600
1991
|
return this.descriptors.page.searchSpaces.createStream(this.innerApiCalls.searchSpaces, request, callSettings);
|
|
1601
1992
|
}
|
|
1602
1993
|
/**
|
|
@@ -1748,10 +2139,10 @@ class ChatServiceClient {
|
|
|
1748
2139
|
const defaultCallSettings = this._defaults['searchSpaces'];
|
|
1749
2140
|
const callSettings = defaultCallSettings.merge(options);
|
|
1750
2141
|
this.initialize();
|
|
2142
|
+
this._log.info('searchSpaces iterate %j', request);
|
|
1751
2143
|
return this.descriptors.page.searchSpaces.asyncIterate(this.innerApiCalls['searchSpaces'], request, callSettings);
|
|
1752
2144
|
}
|
|
1753
2145
|
listReactions(request, optionsOrCallback, callback) {
|
|
1754
|
-
var _a;
|
|
1755
2146
|
request = request || {};
|
|
1756
2147
|
let options;
|
|
1757
2148
|
if (typeof optionsOrCallback === 'function' && callback === undefined) {
|
|
@@ -1766,13 +2157,25 @@ class ChatServiceClient {
|
|
|
1766
2157
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
1767
2158
|
options.otherArgs.headers['x-goog-request-params'] =
|
|
1768
2159
|
this._gaxModule.routingHeader.fromParams({
|
|
1769
|
-
parent:
|
|
2160
|
+
parent: request.parent ?? '',
|
|
1770
2161
|
});
|
|
1771
2162
|
this.initialize();
|
|
1772
|
-
|
|
2163
|
+
const wrappedCallback = callback
|
|
2164
|
+
? (error, values, nextPageRequest, rawResponse) => {
|
|
2165
|
+
this._log.info('listReactions values %j', values);
|
|
2166
|
+
callback(error, values, nextPageRequest, rawResponse); // We verified callback above.
|
|
2167
|
+
}
|
|
2168
|
+
: undefined;
|
|
2169
|
+
this._log.info('listReactions request %j', request);
|
|
2170
|
+
return this.innerApiCalls
|
|
2171
|
+
.listReactions(request, options, wrappedCallback)
|
|
2172
|
+
?.then(([response, input, output]) => {
|
|
2173
|
+
this._log.info('listReactions values %j', response);
|
|
2174
|
+
return [response, input, output];
|
|
2175
|
+
});
|
|
1773
2176
|
}
|
|
1774
2177
|
/**
|
|
1775
|
-
* Equivalent to `
|
|
2178
|
+
* Equivalent to `listReactions`, but returns a NodeJS Stream object.
|
|
1776
2179
|
* @param {Object} request
|
|
1777
2180
|
* The request object that will be sent.
|
|
1778
2181
|
* @param {string} request.parent
|
|
@@ -1848,18 +2251,18 @@ class ChatServiceClient {
|
|
|
1848
2251
|
* for more details and examples.
|
|
1849
2252
|
*/
|
|
1850
2253
|
listReactionsStream(request, options) {
|
|
1851
|
-
var _a;
|
|
1852
2254
|
request = request || {};
|
|
1853
2255
|
options = options || {};
|
|
1854
2256
|
options.otherArgs = options.otherArgs || {};
|
|
1855
2257
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
1856
2258
|
options.otherArgs.headers['x-goog-request-params'] =
|
|
1857
2259
|
this._gaxModule.routingHeader.fromParams({
|
|
1858
|
-
parent:
|
|
2260
|
+
parent: request.parent ?? '',
|
|
1859
2261
|
});
|
|
1860
2262
|
const defaultCallSettings = this._defaults['listReactions'];
|
|
1861
2263
|
const callSettings = defaultCallSettings.merge(options);
|
|
1862
2264
|
this.initialize();
|
|
2265
|
+
this._log.info('listReactions stream %j', request);
|
|
1863
2266
|
return this.descriptors.page.listReactions.createStream(this.innerApiCalls.listReactions, request, callSettings);
|
|
1864
2267
|
}
|
|
1865
2268
|
/**
|
|
@@ -1942,22 +2345,21 @@ class ChatServiceClient {
|
|
|
1942
2345
|
* region_tag:chat_v1_generated_ChatService_ListReactions_async
|
|
1943
2346
|
*/
|
|
1944
2347
|
listReactionsAsync(request, options) {
|
|
1945
|
-
var _a;
|
|
1946
2348
|
request = request || {};
|
|
1947
2349
|
options = options || {};
|
|
1948
2350
|
options.otherArgs = options.otherArgs || {};
|
|
1949
2351
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
1950
2352
|
options.otherArgs.headers['x-goog-request-params'] =
|
|
1951
2353
|
this._gaxModule.routingHeader.fromParams({
|
|
1952
|
-
parent:
|
|
2354
|
+
parent: request.parent ?? '',
|
|
1953
2355
|
});
|
|
1954
2356
|
const defaultCallSettings = this._defaults['listReactions'];
|
|
1955
2357
|
const callSettings = defaultCallSettings.merge(options);
|
|
1956
2358
|
this.initialize();
|
|
2359
|
+
this._log.info('listReactions iterate %j', request);
|
|
1957
2360
|
return this.descriptors.page.listReactions.asyncIterate(this.innerApiCalls['listReactions'], request, callSettings);
|
|
1958
2361
|
}
|
|
1959
2362
|
listSpaceEvents(request, optionsOrCallback, callback) {
|
|
1960
|
-
var _a;
|
|
1961
2363
|
request = request || {};
|
|
1962
2364
|
let options;
|
|
1963
2365
|
if (typeof optionsOrCallback === 'function' && callback === undefined) {
|
|
@@ -1972,13 +2374,25 @@ class ChatServiceClient {
|
|
|
1972
2374
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
1973
2375
|
options.otherArgs.headers['x-goog-request-params'] =
|
|
1974
2376
|
this._gaxModule.routingHeader.fromParams({
|
|
1975
|
-
parent:
|
|
2377
|
+
parent: request.parent ?? '',
|
|
1976
2378
|
});
|
|
1977
2379
|
this.initialize();
|
|
1978
|
-
|
|
2380
|
+
const wrappedCallback = callback
|
|
2381
|
+
? (error, values, nextPageRequest, rawResponse) => {
|
|
2382
|
+
this._log.info('listSpaceEvents values %j', values);
|
|
2383
|
+
callback(error, values, nextPageRequest, rawResponse); // We verified callback above.
|
|
2384
|
+
}
|
|
2385
|
+
: undefined;
|
|
2386
|
+
this._log.info('listSpaceEvents request %j', request);
|
|
2387
|
+
return this.innerApiCalls
|
|
2388
|
+
.listSpaceEvents(request, options, wrappedCallback)
|
|
2389
|
+
?.then(([response, input, output]) => {
|
|
2390
|
+
this._log.info('listSpaceEvents values %j', response);
|
|
2391
|
+
return [response, input, output];
|
|
2392
|
+
});
|
|
1979
2393
|
}
|
|
1980
2394
|
/**
|
|
1981
|
-
* Equivalent to `
|
|
2395
|
+
* Equivalent to `listSpaceEvents`, but returns a NodeJS Stream object.
|
|
1982
2396
|
* @param {Object} request
|
|
1983
2397
|
* The request object that will be sent.
|
|
1984
2398
|
* @param {string} request.parent
|
|
@@ -2064,18 +2478,18 @@ class ChatServiceClient {
|
|
|
2064
2478
|
* for more details and examples.
|
|
2065
2479
|
*/
|
|
2066
2480
|
listSpaceEventsStream(request, options) {
|
|
2067
|
-
var _a;
|
|
2068
2481
|
request = request || {};
|
|
2069
2482
|
options = options || {};
|
|
2070
2483
|
options.otherArgs = options.otherArgs || {};
|
|
2071
2484
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
2072
2485
|
options.otherArgs.headers['x-goog-request-params'] =
|
|
2073
2486
|
this._gaxModule.routingHeader.fromParams({
|
|
2074
|
-
parent:
|
|
2487
|
+
parent: request.parent ?? '',
|
|
2075
2488
|
});
|
|
2076
2489
|
const defaultCallSettings = this._defaults['listSpaceEvents'];
|
|
2077
2490
|
const callSettings = defaultCallSettings.merge(options);
|
|
2078
2491
|
this.initialize();
|
|
2492
|
+
this._log.info('listSpaceEvents stream %j', request);
|
|
2079
2493
|
return this.descriptors.page.listSpaceEvents.createStream(this.innerApiCalls.listSpaceEvents, request, callSettings);
|
|
2080
2494
|
}
|
|
2081
2495
|
/**
|
|
@@ -2168,18 +2582,18 @@ class ChatServiceClient {
|
|
|
2168
2582
|
* region_tag:chat_v1_generated_ChatService_ListSpaceEvents_async
|
|
2169
2583
|
*/
|
|
2170
2584
|
listSpaceEventsAsync(request, options) {
|
|
2171
|
-
var _a;
|
|
2172
2585
|
request = request || {};
|
|
2173
2586
|
options = options || {};
|
|
2174
2587
|
options.otherArgs = options.otherArgs || {};
|
|
2175
2588
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
2176
2589
|
options.otherArgs.headers['x-goog-request-params'] =
|
|
2177
2590
|
this._gaxModule.routingHeader.fromParams({
|
|
2178
|
-
parent:
|
|
2591
|
+
parent: request.parent ?? '',
|
|
2179
2592
|
});
|
|
2180
2593
|
const defaultCallSettings = this._defaults['listSpaceEvents'];
|
|
2181
2594
|
const callSettings = defaultCallSettings.merge(options);
|
|
2182
2595
|
this.initialize();
|
|
2596
|
+
this._log.info('listSpaceEvents iterate %j', request);
|
|
2183
2597
|
return this.descriptors.page.listSpaceEvents.asyncIterate(this.innerApiCalls['listSpaceEvents'], request, callSettings);
|
|
2184
2598
|
}
|
|
2185
2599
|
// --------------------
|
|
@@ -2447,6 +2861,39 @@ class ChatServiceClient {
|
|
|
2447
2861
|
return this.pathTemplates.spaceEventPathTemplate.match(spaceEventName)
|
|
2448
2862
|
.space_event;
|
|
2449
2863
|
}
|
|
2864
|
+
/**
|
|
2865
|
+
* Return a fully-qualified spaceNotificationSetting resource name string.
|
|
2866
|
+
*
|
|
2867
|
+
* @param {string} user
|
|
2868
|
+
* @param {string} space
|
|
2869
|
+
* @returns {string} Resource name string.
|
|
2870
|
+
*/
|
|
2871
|
+
spaceNotificationSettingPath(user, space) {
|
|
2872
|
+
return this.pathTemplates.spaceNotificationSettingPathTemplate.render({
|
|
2873
|
+
user: user,
|
|
2874
|
+
space: space,
|
|
2875
|
+
});
|
|
2876
|
+
}
|
|
2877
|
+
/**
|
|
2878
|
+
* Parse the user from SpaceNotificationSetting resource.
|
|
2879
|
+
*
|
|
2880
|
+
* @param {string} spaceNotificationSettingName
|
|
2881
|
+
* A fully-qualified path representing SpaceNotificationSetting resource.
|
|
2882
|
+
* @returns {string} A string representing the user.
|
|
2883
|
+
*/
|
|
2884
|
+
matchUserFromSpaceNotificationSettingName(spaceNotificationSettingName) {
|
|
2885
|
+
return this.pathTemplates.spaceNotificationSettingPathTemplate.match(spaceNotificationSettingName).user;
|
|
2886
|
+
}
|
|
2887
|
+
/**
|
|
2888
|
+
* Parse the space from SpaceNotificationSetting resource.
|
|
2889
|
+
*
|
|
2890
|
+
* @param {string} spaceNotificationSettingName
|
|
2891
|
+
* A fully-qualified path representing SpaceNotificationSetting resource.
|
|
2892
|
+
* @returns {string} A string representing the space.
|
|
2893
|
+
*/
|
|
2894
|
+
matchSpaceFromSpaceNotificationSettingName(spaceNotificationSettingName) {
|
|
2895
|
+
return this.pathTemplates.spaceNotificationSettingPathTemplate.match(spaceNotificationSettingName).space;
|
|
2896
|
+
}
|
|
2450
2897
|
/**
|
|
2451
2898
|
* Return a fully-qualified spaceReadState resource name string.
|
|
2452
2899
|
*
|
|
@@ -2567,6 +3014,7 @@ class ChatServiceClient {
|
|
|
2567
3014
|
close() {
|
|
2568
3015
|
if (this.chatServiceStub && !this._terminated) {
|
|
2569
3016
|
return this.chatServiceStub.then(stub => {
|
|
3017
|
+
this._log.info('ending gRPC channel');
|
|
2570
3018
|
this._terminated = true;
|
|
2571
3019
|
stub.close();
|
|
2572
3020
|
});
|