@stream-io/node-sdk 0.8.7 → 0.8.9
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 +16 -0
- package/dist/index.cjs.js +1176 -2384
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.mjs +1176 -2384
- package/dist/index.es.mjs.map +1 -1
- package/dist/src/ApiClient.d.ts +1 -2
- package/dist/src/gen/feeds/FeedsApi.d.ts +7 -1
- package/dist/src/gen/models/index.d.ts +322 -4
- package/package.json +1 -1
- package/src/ApiClient.ts +1 -1
- package/src/gen/chat/ChatApi.ts +563 -659
- package/src/gen/common/CommonApi.ts +546 -517
- package/src/gen/feeds/FeedsApi.ts +799 -855
- package/src/gen/model-decoders/decoders.ts +29 -9
- package/src/gen/models/index.ts +336 -6947
- package/src/gen/moderation/ModerationApi.ts +341 -408
- package/src/gen/video/VideoApi.ts +471 -566
|
@@ -123,13 +123,16 @@ export class CommonApi {
|
|
|
123
123
|
constructor(public readonly apiClient: ApiClient) {}
|
|
124
124
|
|
|
125
125
|
async getApp(): Promise<StreamResponse<GetApplicationResponse>> {
|
|
126
|
-
const response = await this.apiClient.sendRequest<
|
|
127
|
-
|
|
128
|
-
|
|
126
|
+
const response = await this.apiClient.sendRequest<GetApplicationResponse>(
|
|
127
|
+
'GET',
|
|
128
|
+
'/api/v2/app',
|
|
129
|
+
undefined,
|
|
130
|
+
undefined,
|
|
131
|
+
);
|
|
129
132
|
|
|
130
|
-
decoders['GetApplicationResponse']?.(response
|
|
133
|
+
decoders['GetApplicationResponse']?.(response);
|
|
131
134
|
|
|
132
|
-
return
|
|
135
|
+
return response;
|
|
133
136
|
}
|
|
134
137
|
|
|
135
138
|
async updateApp(
|
|
@@ -205,18 +208,17 @@ export class CommonApi {
|
|
|
205
208
|
xiaomi_config: request?.xiaomi_config,
|
|
206
209
|
};
|
|
207
210
|
|
|
208
|
-
const response = await this.apiClient.sendRequest<
|
|
211
|
+
const response = await this.apiClient.sendRequest<Response>(
|
|
209
212
|
'PATCH',
|
|
210
213
|
'/api/v2/app',
|
|
211
214
|
undefined,
|
|
212
215
|
undefined,
|
|
213
216
|
body,
|
|
214
|
-
'application/json',
|
|
215
217
|
);
|
|
216
218
|
|
|
217
|
-
decoders['Response']?.(response
|
|
219
|
+
decoders['Response']?.(response);
|
|
218
220
|
|
|
219
|
-
return
|
|
221
|
+
return response;
|
|
220
222
|
}
|
|
221
223
|
|
|
222
224
|
async listBlockLists(request?: {
|
|
@@ -230,13 +232,16 @@ export class CommonApi {
|
|
|
230
232
|
limit: request?.limit,
|
|
231
233
|
};
|
|
232
234
|
|
|
233
|
-
const response = await this.apiClient.sendRequest<
|
|
234
|
-
|
|
235
|
-
|
|
235
|
+
const response = await this.apiClient.sendRequest<ListBlockListResponse>(
|
|
236
|
+
'GET',
|
|
237
|
+
'/api/v2/blocklists',
|
|
238
|
+
undefined,
|
|
239
|
+
queryParams,
|
|
240
|
+
);
|
|
236
241
|
|
|
237
|
-
decoders['ListBlockListResponse']?.(response
|
|
242
|
+
decoders['ListBlockListResponse']?.(response);
|
|
238
243
|
|
|
239
|
-
return
|
|
244
|
+
return response;
|
|
240
245
|
}
|
|
241
246
|
|
|
242
247
|
async createBlockList(
|
|
@@ -255,20 +260,17 @@ export class CommonApi {
|
|
|
255
260
|
user: request?.user,
|
|
256
261
|
};
|
|
257
262
|
|
|
258
|
-
const response = await this.apiClient.sendRequest<
|
|
259
|
-
StreamResponse<CreateBlockListResponse>
|
|
260
|
-
>(
|
|
263
|
+
const response = await this.apiClient.sendRequest<CreateBlockListResponse>(
|
|
261
264
|
'POST',
|
|
262
265
|
'/api/v2/blocklists',
|
|
263
266
|
undefined,
|
|
264
267
|
undefined,
|
|
265
268
|
body,
|
|
266
|
-
'application/json',
|
|
267
269
|
);
|
|
268
270
|
|
|
269
|
-
decoders['CreateBlockListResponse']?.(response
|
|
271
|
+
decoders['CreateBlockListResponse']?.(response);
|
|
270
272
|
|
|
271
|
-
return
|
|
273
|
+
return response;
|
|
272
274
|
}
|
|
273
275
|
|
|
274
276
|
async importBlockList(
|
|
@@ -282,20 +284,17 @@ export class CommonApi {
|
|
|
282
284
|
chunk_size: request?.chunk_size,
|
|
283
285
|
};
|
|
284
286
|
|
|
285
|
-
const response = await this.apiClient.sendRequest<
|
|
286
|
-
StreamResponse<ImportBlockListResponse>
|
|
287
|
-
>(
|
|
287
|
+
const response = await this.apiClient.sendRequest<ImportBlockListResponse>(
|
|
288
288
|
'POST',
|
|
289
289
|
'/api/v2/blocklists/{id}/import',
|
|
290
290
|
pathParams,
|
|
291
291
|
undefined,
|
|
292
292
|
body,
|
|
293
|
-
'application/json',
|
|
294
293
|
);
|
|
295
294
|
|
|
296
|
-
decoders['ImportBlockListResponse']?.(response
|
|
295
|
+
decoders['ImportBlockListResponse']?.(response);
|
|
297
296
|
|
|
298
|
-
return
|
|
297
|
+
return response;
|
|
299
298
|
}
|
|
300
299
|
|
|
301
300
|
async deleteBlockList(request: {
|
|
@@ -311,16 +310,16 @@ export class CommonApi {
|
|
|
311
310
|
name: request?.name,
|
|
312
311
|
};
|
|
313
312
|
|
|
314
|
-
const response = await this.apiClient.sendRequest<
|
|
313
|
+
const response = await this.apiClient.sendRequest<Response>(
|
|
315
314
|
'DELETE',
|
|
316
315
|
'/api/v2/blocklists/{name}',
|
|
317
316
|
pathParams,
|
|
318
317
|
queryParams,
|
|
319
318
|
);
|
|
320
319
|
|
|
321
|
-
decoders['Response']?.(response
|
|
320
|
+
decoders['Response']?.(response);
|
|
322
321
|
|
|
323
|
-
return
|
|
322
|
+
return response;
|
|
324
323
|
}
|
|
325
324
|
|
|
326
325
|
async getBlockList(request: {
|
|
@@ -334,13 +333,16 @@ export class CommonApi {
|
|
|
334
333
|
name: request?.name,
|
|
335
334
|
};
|
|
336
335
|
|
|
337
|
-
const response = await this.apiClient.sendRequest<
|
|
338
|
-
|
|
339
|
-
|
|
336
|
+
const response = await this.apiClient.sendRequest<GetBlockListResponse>(
|
|
337
|
+
'GET',
|
|
338
|
+
'/api/v2/blocklists/{name}',
|
|
339
|
+
pathParams,
|
|
340
|
+
queryParams,
|
|
341
|
+
);
|
|
340
342
|
|
|
341
|
-
decoders['GetBlockListResponse']?.(response
|
|
343
|
+
decoders['GetBlockListResponse']?.(response);
|
|
342
344
|
|
|
343
|
-
return
|
|
345
|
+
return response;
|
|
344
346
|
}
|
|
345
347
|
|
|
346
348
|
async updateBlockList(
|
|
@@ -360,20 +362,17 @@ export class CommonApi {
|
|
|
360
362
|
user: request?.user,
|
|
361
363
|
};
|
|
362
364
|
|
|
363
|
-
const response = await this.apiClient.sendRequest<
|
|
364
|
-
StreamResponse<UpdateBlockListResponse>
|
|
365
|
-
>(
|
|
365
|
+
const response = await this.apiClient.sendRequest<UpdateBlockListResponse>(
|
|
366
366
|
'PUT',
|
|
367
367
|
'/api/v2/blocklists/{name}',
|
|
368
368
|
pathParams,
|
|
369
369
|
undefined,
|
|
370
370
|
body,
|
|
371
|
-
'application/json',
|
|
372
371
|
);
|
|
373
372
|
|
|
374
|
-
decoders['UpdateBlockListResponse']?.(response
|
|
373
|
+
decoders['UpdateBlockListResponse']?.(response);
|
|
375
374
|
|
|
376
|
-
return
|
|
375
|
+
return response;
|
|
377
376
|
}
|
|
378
377
|
|
|
379
378
|
async checkPush(
|
|
@@ -392,20 +391,17 @@ export class CommonApi {
|
|
|
392
391
|
user: request?.user,
|
|
393
392
|
};
|
|
394
393
|
|
|
395
|
-
const response = await this.apiClient.sendRequest<
|
|
396
|
-
StreamResponse<CheckPushResponse>
|
|
397
|
-
>(
|
|
394
|
+
const response = await this.apiClient.sendRequest<CheckPushResponse>(
|
|
398
395
|
'POST',
|
|
399
396
|
'/api/v2/check_push',
|
|
400
397
|
undefined,
|
|
401
398
|
undefined,
|
|
402
399
|
body,
|
|
403
|
-
'application/json',
|
|
404
400
|
);
|
|
405
401
|
|
|
406
|
-
decoders['CheckPushResponse']?.(response
|
|
402
|
+
decoders['CheckPushResponse']?.(response);
|
|
407
403
|
|
|
408
|
-
return
|
|
404
|
+
return response;
|
|
409
405
|
}
|
|
410
406
|
|
|
411
407
|
async checkSNS(
|
|
@@ -417,20 +413,17 @@ export class CommonApi {
|
|
|
417
413
|
sns_topic_arn: request?.sns_topic_arn,
|
|
418
414
|
};
|
|
419
415
|
|
|
420
|
-
const response = await this.apiClient.sendRequest<
|
|
421
|
-
StreamResponse<CheckSNSResponse>
|
|
422
|
-
>(
|
|
416
|
+
const response = await this.apiClient.sendRequest<CheckSNSResponse>(
|
|
423
417
|
'POST',
|
|
424
418
|
'/api/v2/check_sns',
|
|
425
419
|
undefined,
|
|
426
420
|
undefined,
|
|
427
421
|
body,
|
|
428
|
-
'application/json',
|
|
429
422
|
);
|
|
430
423
|
|
|
431
|
-
decoders['CheckSNSResponse']?.(response
|
|
424
|
+
decoders['CheckSNSResponse']?.(response);
|
|
432
425
|
|
|
433
|
-
return
|
|
426
|
+
return response;
|
|
434
427
|
}
|
|
435
428
|
|
|
436
429
|
async checkSQS(
|
|
@@ -442,20 +435,17 @@ export class CommonApi {
|
|
|
442
435
|
sqs_url: request?.sqs_url,
|
|
443
436
|
};
|
|
444
437
|
|
|
445
|
-
const response = await this.apiClient.sendRequest<
|
|
446
|
-
StreamResponse<CheckSQSResponse>
|
|
447
|
-
>(
|
|
438
|
+
const response = await this.apiClient.sendRequest<CheckSQSResponse>(
|
|
448
439
|
'POST',
|
|
449
440
|
'/api/v2/check_sqs',
|
|
450
441
|
undefined,
|
|
451
442
|
undefined,
|
|
452
443
|
body,
|
|
453
|
-
'application/json',
|
|
454
444
|
);
|
|
455
445
|
|
|
456
|
-
decoders['CheckSQSResponse']?.(response
|
|
446
|
+
decoders['CheckSQSResponse']?.(response);
|
|
457
447
|
|
|
458
|
-
return
|
|
448
|
+
return response;
|
|
459
449
|
}
|
|
460
450
|
|
|
461
451
|
async deleteDevice(request: {
|
|
@@ -467,16 +457,16 @@ export class CommonApi {
|
|
|
467
457
|
user_id: request?.user_id,
|
|
468
458
|
};
|
|
469
459
|
|
|
470
|
-
const response = await this.apiClient.sendRequest<
|
|
460
|
+
const response = await this.apiClient.sendRequest<Response>(
|
|
471
461
|
'DELETE',
|
|
472
462
|
'/api/v2/devices',
|
|
473
463
|
undefined,
|
|
474
464
|
queryParams,
|
|
475
465
|
);
|
|
476
466
|
|
|
477
|
-
decoders['Response']?.(response
|
|
467
|
+
decoders['Response']?.(response);
|
|
478
468
|
|
|
479
|
-
return
|
|
469
|
+
return response;
|
|
480
470
|
}
|
|
481
471
|
|
|
482
472
|
async listDevices(request?: {
|
|
@@ -486,13 +476,16 @@ export class CommonApi {
|
|
|
486
476
|
user_id: request?.user_id,
|
|
487
477
|
};
|
|
488
478
|
|
|
489
|
-
const response = await this.apiClient.sendRequest<
|
|
490
|
-
|
|
491
|
-
|
|
479
|
+
const response = await this.apiClient.sendRequest<ListDevicesResponse>(
|
|
480
|
+
'GET',
|
|
481
|
+
'/api/v2/devices',
|
|
482
|
+
undefined,
|
|
483
|
+
queryParams,
|
|
484
|
+
);
|
|
492
485
|
|
|
493
|
-
decoders['ListDevicesResponse']?.(response
|
|
486
|
+
decoders['ListDevicesResponse']?.(response);
|
|
494
487
|
|
|
495
|
-
return
|
|
488
|
+
return response;
|
|
496
489
|
}
|
|
497
490
|
|
|
498
491
|
async createDevice(
|
|
@@ -508,18 +501,17 @@ export class CommonApi {
|
|
|
508
501
|
user: request?.user,
|
|
509
502
|
};
|
|
510
503
|
|
|
511
|
-
const response = await this.apiClient.sendRequest<
|
|
504
|
+
const response = await this.apiClient.sendRequest<Response>(
|
|
512
505
|
'POST',
|
|
513
506
|
'/api/v2/devices',
|
|
514
507
|
undefined,
|
|
515
508
|
undefined,
|
|
516
509
|
body,
|
|
517
|
-
'application/json',
|
|
518
510
|
);
|
|
519
511
|
|
|
520
|
-
decoders['Response']?.(response
|
|
512
|
+
decoders['Response']?.(response);
|
|
521
513
|
|
|
522
|
-
return
|
|
514
|
+
return response;
|
|
523
515
|
}
|
|
524
516
|
|
|
525
517
|
async exportUsers(
|
|
@@ -529,32 +521,33 @@ export class CommonApi {
|
|
|
529
521
|
user_ids: request?.user_ids,
|
|
530
522
|
};
|
|
531
523
|
|
|
532
|
-
const response = await this.apiClient.sendRequest<
|
|
533
|
-
StreamResponse<ExportUsersResponse>
|
|
534
|
-
>(
|
|
524
|
+
const response = await this.apiClient.sendRequest<ExportUsersResponse>(
|
|
535
525
|
'POST',
|
|
536
526
|
'/api/v2/export/users',
|
|
537
527
|
undefined,
|
|
538
528
|
undefined,
|
|
539
529
|
body,
|
|
540
|
-
'application/json',
|
|
541
530
|
);
|
|
542
531
|
|
|
543
|
-
decoders['ExportUsersResponse']?.(response
|
|
532
|
+
decoders['ExportUsersResponse']?.(response);
|
|
544
533
|
|
|
545
|
-
return
|
|
534
|
+
return response;
|
|
546
535
|
}
|
|
547
536
|
|
|
548
537
|
async listExternalStorage(): Promise<
|
|
549
538
|
StreamResponse<ListExternalStorageResponse>
|
|
550
539
|
> {
|
|
551
|
-
const response =
|
|
552
|
-
|
|
553
|
-
|
|
540
|
+
const response =
|
|
541
|
+
await this.apiClient.sendRequest<ListExternalStorageResponse>(
|
|
542
|
+
'GET',
|
|
543
|
+
'/api/v2/external_storage',
|
|
544
|
+
undefined,
|
|
545
|
+
undefined,
|
|
546
|
+
);
|
|
554
547
|
|
|
555
|
-
decoders['ListExternalStorageResponse']?.(response
|
|
548
|
+
decoders['ListExternalStorageResponse']?.(response);
|
|
556
549
|
|
|
557
|
-
return
|
|
550
|
+
return response;
|
|
558
551
|
}
|
|
559
552
|
|
|
560
553
|
async createExternalStorage(
|
|
@@ -570,20 +563,18 @@ export class CommonApi {
|
|
|
570
563
|
azure_blob: request?.azure_blob,
|
|
571
564
|
};
|
|
572
565
|
|
|
573
|
-
const response =
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
'application/json',
|
|
582
|
-
);
|
|
566
|
+
const response =
|
|
567
|
+
await this.apiClient.sendRequest<CreateExternalStorageResponse>(
|
|
568
|
+
'POST',
|
|
569
|
+
'/api/v2/external_storage',
|
|
570
|
+
undefined,
|
|
571
|
+
undefined,
|
|
572
|
+
body,
|
|
573
|
+
);
|
|
583
574
|
|
|
584
|
-
decoders['CreateExternalStorageResponse']?.(response
|
|
575
|
+
decoders['CreateExternalStorageResponse']?.(response);
|
|
585
576
|
|
|
586
|
-
return
|
|
577
|
+
return response;
|
|
587
578
|
}
|
|
588
579
|
|
|
589
580
|
async deleteExternalStorage(request: {
|
|
@@ -593,13 +584,17 @@ export class CommonApi {
|
|
|
593
584
|
name: request?.name,
|
|
594
585
|
};
|
|
595
586
|
|
|
596
|
-
const response =
|
|
597
|
-
|
|
598
|
-
|
|
587
|
+
const response =
|
|
588
|
+
await this.apiClient.sendRequest<DeleteExternalStorageResponse>(
|
|
589
|
+
'DELETE',
|
|
590
|
+
'/api/v2/external_storage/{name}',
|
|
591
|
+
pathParams,
|
|
592
|
+
undefined,
|
|
593
|
+
);
|
|
599
594
|
|
|
600
|
-
decoders['DeleteExternalStorageResponse']?.(response
|
|
595
|
+
decoders['DeleteExternalStorageResponse']?.(response);
|
|
601
596
|
|
|
602
|
-
return
|
|
597
|
+
return response;
|
|
603
598
|
}
|
|
604
599
|
|
|
605
600
|
async updateExternalStorage(
|
|
@@ -617,20 +612,18 @@ export class CommonApi {
|
|
|
617
612
|
azure_blob: request?.azure_blob,
|
|
618
613
|
};
|
|
619
614
|
|
|
620
|
-
const response =
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
'application/json',
|
|
629
|
-
);
|
|
615
|
+
const response =
|
|
616
|
+
await this.apiClient.sendRequest<UpdateExternalStorageResponse>(
|
|
617
|
+
'PUT',
|
|
618
|
+
'/api/v2/external_storage/{name}',
|
|
619
|
+
pathParams,
|
|
620
|
+
undefined,
|
|
621
|
+
body,
|
|
622
|
+
);
|
|
630
623
|
|
|
631
|
-
decoders['UpdateExternalStorageResponse']?.(response
|
|
624
|
+
decoders['UpdateExternalStorageResponse']?.(response);
|
|
632
625
|
|
|
633
|
-
return
|
|
626
|
+
return response;
|
|
634
627
|
}
|
|
635
628
|
|
|
636
629
|
async checkExternalStorage(request: {
|
|
@@ -640,13 +633,17 @@ export class CommonApi {
|
|
|
640
633
|
name: request?.name,
|
|
641
634
|
};
|
|
642
635
|
|
|
643
|
-
const response =
|
|
644
|
-
|
|
645
|
-
|
|
636
|
+
const response =
|
|
637
|
+
await this.apiClient.sendRequest<CheckExternalStorageResponse>(
|
|
638
|
+
'GET',
|
|
639
|
+
'/api/v2/external_storage/{name}/check',
|
|
640
|
+
pathParams,
|
|
641
|
+
undefined,
|
|
642
|
+
);
|
|
646
643
|
|
|
647
|
-
decoders['CheckExternalStorageResponse']?.(response
|
|
644
|
+
decoders['CheckExternalStorageResponse']?.(response);
|
|
648
645
|
|
|
649
|
-
return
|
|
646
|
+
return response;
|
|
650
647
|
}
|
|
651
648
|
|
|
652
649
|
async createGuest(
|
|
@@ -656,13 +653,17 @@ export class CommonApi {
|
|
|
656
653
|
user: request?.user,
|
|
657
654
|
};
|
|
658
655
|
|
|
659
|
-
const response = await this.apiClient.sendRequest<
|
|
660
|
-
|
|
661
|
-
|
|
656
|
+
const response = await this.apiClient.sendRequest<CreateGuestResponse>(
|
|
657
|
+
'POST',
|
|
658
|
+
'/api/v2/guest',
|
|
659
|
+
undefined,
|
|
660
|
+
undefined,
|
|
661
|
+
body,
|
|
662
|
+
);
|
|
662
663
|
|
|
663
|
-
decoders['CreateGuestResponse']?.(response
|
|
664
|
+
decoders['CreateGuestResponse']?.(response);
|
|
664
665
|
|
|
665
|
-
return
|
|
666
|
+
return response;
|
|
666
667
|
}
|
|
667
668
|
|
|
668
669
|
async createImportURL(
|
|
@@ -672,30 +673,30 @@ export class CommonApi {
|
|
|
672
673
|
filename: request?.filename,
|
|
673
674
|
};
|
|
674
675
|
|
|
675
|
-
const response = await this.apiClient.sendRequest<
|
|
676
|
-
StreamResponse<CreateImportURLResponse>
|
|
677
|
-
>(
|
|
676
|
+
const response = await this.apiClient.sendRequest<CreateImportURLResponse>(
|
|
678
677
|
'POST',
|
|
679
678
|
'/api/v2/import_urls',
|
|
680
679
|
undefined,
|
|
681
680
|
undefined,
|
|
682
681
|
body,
|
|
683
|
-
'application/json',
|
|
684
682
|
);
|
|
685
683
|
|
|
686
|
-
decoders['CreateImportURLResponse']?.(response
|
|
684
|
+
decoders['CreateImportURLResponse']?.(response);
|
|
687
685
|
|
|
688
|
-
return
|
|
686
|
+
return response;
|
|
689
687
|
}
|
|
690
688
|
|
|
691
689
|
async listImports(): Promise<StreamResponse<ListImportsResponse>> {
|
|
692
|
-
const response = await this.apiClient.sendRequest<
|
|
693
|
-
|
|
694
|
-
|
|
690
|
+
const response = await this.apiClient.sendRequest<ListImportsResponse>(
|
|
691
|
+
'GET',
|
|
692
|
+
'/api/v2/imports',
|
|
693
|
+
undefined,
|
|
694
|
+
undefined,
|
|
695
|
+
);
|
|
695
696
|
|
|
696
|
-
decoders['ListImportsResponse']?.(response
|
|
697
|
+
decoders['ListImportsResponse']?.(response);
|
|
697
698
|
|
|
698
|
-
return
|
|
699
|
+
return response;
|
|
699
700
|
}
|
|
700
701
|
|
|
701
702
|
async createImport(
|
|
@@ -707,20 +708,17 @@ export class CommonApi {
|
|
|
707
708
|
merge_custom: request?.merge_custom,
|
|
708
709
|
};
|
|
709
710
|
|
|
710
|
-
const response = await this.apiClient.sendRequest<
|
|
711
|
-
StreamResponse<CreateImportResponse>
|
|
712
|
-
>(
|
|
711
|
+
const response = await this.apiClient.sendRequest<CreateImportResponse>(
|
|
713
712
|
'POST',
|
|
714
713
|
'/api/v2/imports',
|
|
715
714
|
undefined,
|
|
716
715
|
undefined,
|
|
717
716
|
body,
|
|
718
|
-
'application/json',
|
|
719
717
|
);
|
|
720
718
|
|
|
721
|
-
decoders['CreateImportResponse']?.(response
|
|
719
|
+
decoders['CreateImportResponse']?.(response);
|
|
722
720
|
|
|
723
|
-
return
|
|
721
|
+
return response;
|
|
724
722
|
}
|
|
725
723
|
|
|
726
724
|
async listImportV2Tasks(request?: {
|
|
@@ -730,13 +728,17 @@ export class CommonApi {
|
|
|
730
728
|
state: request?.state,
|
|
731
729
|
};
|
|
732
730
|
|
|
733
|
-
const response =
|
|
734
|
-
|
|
735
|
-
|
|
731
|
+
const response =
|
|
732
|
+
await this.apiClient.sendRequest<ListImportV2TasksResponse>(
|
|
733
|
+
'GET',
|
|
734
|
+
'/api/v2/imports/v2',
|
|
735
|
+
undefined,
|
|
736
|
+
queryParams,
|
|
737
|
+
);
|
|
736
738
|
|
|
737
|
-
decoders['ListImportV2TasksResponse']?.(response
|
|
739
|
+
decoders['ListImportV2TasksResponse']?.(response);
|
|
738
740
|
|
|
739
|
-
return
|
|
741
|
+
return response;
|
|
740
742
|
}
|
|
741
743
|
|
|
742
744
|
async createImportV2Task(
|
|
@@ -749,44 +751,50 @@ export class CommonApi {
|
|
|
749
751
|
user: request?.user,
|
|
750
752
|
};
|
|
751
753
|
|
|
752
|
-
const response =
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
'application/json',
|
|
761
|
-
);
|
|
754
|
+
const response =
|
|
755
|
+
await this.apiClient.sendRequest<CreateImportV2TaskResponse>(
|
|
756
|
+
'POST',
|
|
757
|
+
'/api/v2/imports/v2',
|
|
758
|
+
undefined,
|
|
759
|
+
undefined,
|
|
760
|
+
body,
|
|
761
|
+
);
|
|
762
762
|
|
|
763
|
-
decoders['CreateImportV2TaskResponse']?.(response
|
|
763
|
+
decoders['CreateImportV2TaskResponse']?.(response);
|
|
764
764
|
|
|
765
|
-
return
|
|
765
|
+
return response;
|
|
766
766
|
}
|
|
767
767
|
|
|
768
768
|
async deleteImporterExternalStorage(): Promise<
|
|
769
769
|
StreamResponse<DeleteExternalStorageResponse>
|
|
770
770
|
> {
|
|
771
|
-
const response =
|
|
772
|
-
|
|
773
|
-
|
|
771
|
+
const response =
|
|
772
|
+
await this.apiClient.sendRequest<DeleteExternalStorageResponse>(
|
|
773
|
+
'DELETE',
|
|
774
|
+
'/api/v2/imports/v2/external-storage',
|
|
775
|
+
undefined,
|
|
776
|
+
undefined,
|
|
777
|
+
);
|
|
774
778
|
|
|
775
|
-
decoders['DeleteExternalStorageResponse']?.(response
|
|
779
|
+
decoders['DeleteExternalStorageResponse']?.(response);
|
|
776
780
|
|
|
777
|
-
return
|
|
781
|
+
return response;
|
|
778
782
|
}
|
|
779
783
|
|
|
780
784
|
async getImporterExternalStorage(): Promise<
|
|
781
785
|
StreamResponse<GetExternalStorageResponse>
|
|
782
786
|
> {
|
|
783
|
-
const response =
|
|
784
|
-
|
|
785
|
-
|
|
787
|
+
const response =
|
|
788
|
+
await this.apiClient.sendRequest<GetExternalStorageResponse>(
|
|
789
|
+
'GET',
|
|
790
|
+
'/api/v2/imports/v2/external-storage',
|
|
791
|
+
undefined,
|
|
792
|
+
undefined,
|
|
793
|
+
);
|
|
786
794
|
|
|
787
|
-
decoders['GetExternalStorageResponse']?.(response
|
|
795
|
+
decoders['GetExternalStorageResponse']?.(response);
|
|
788
796
|
|
|
789
|
-
return
|
|
797
|
+
return response;
|
|
790
798
|
}
|
|
791
799
|
|
|
792
800
|
async upsertImporterExternalStorage(
|
|
@@ -798,37 +806,34 @@ export class CommonApi {
|
|
|
798
806
|
gcs: request?.gcs,
|
|
799
807
|
};
|
|
800
808
|
|
|
801
|
-
const response =
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
'application/json',
|
|
810
|
-
);
|
|
809
|
+
const response =
|
|
810
|
+
await this.apiClient.sendRequest<UpsertExternalStorageResponse>(
|
|
811
|
+
'PUT',
|
|
812
|
+
'/api/v2/imports/v2/external-storage',
|
|
813
|
+
undefined,
|
|
814
|
+
undefined,
|
|
815
|
+
body,
|
|
816
|
+
);
|
|
811
817
|
|
|
812
|
-
decoders['UpsertExternalStorageResponse']?.(response
|
|
818
|
+
decoders['UpsertExternalStorageResponse']?.(response);
|
|
813
819
|
|
|
814
|
-
return
|
|
820
|
+
return response;
|
|
815
821
|
}
|
|
816
822
|
|
|
817
823
|
async validateImporterExternalStorage(): Promise<
|
|
818
824
|
StreamResponse<ValidateExternalStorageResponse>
|
|
819
825
|
> {
|
|
820
|
-
const response =
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
);
|
|
826
|
+
const response =
|
|
827
|
+
await this.apiClient.sendRequest<ValidateExternalStorageResponse>(
|
|
828
|
+
'POST',
|
|
829
|
+
'/api/v2/imports/v2/external-storage/validate',
|
|
830
|
+
undefined,
|
|
831
|
+
undefined,
|
|
832
|
+
);
|
|
828
833
|
|
|
829
|
-
decoders['ValidateExternalStorageResponse']?.(response
|
|
834
|
+
decoders['ValidateExternalStorageResponse']?.(response);
|
|
830
835
|
|
|
831
|
-
return
|
|
836
|
+
return response;
|
|
832
837
|
}
|
|
833
838
|
|
|
834
839
|
async deleteImportV2Task(request: {
|
|
@@ -838,13 +843,17 @@ export class CommonApi {
|
|
|
838
843
|
id: request?.id,
|
|
839
844
|
};
|
|
840
845
|
|
|
841
|
-
const response =
|
|
842
|
-
|
|
843
|
-
|
|
846
|
+
const response =
|
|
847
|
+
await this.apiClient.sendRequest<DeleteImportV2TaskResponse>(
|
|
848
|
+
'DELETE',
|
|
849
|
+
'/api/v2/imports/v2/{id}',
|
|
850
|
+
pathParams,
|
|
851
|
+
undefined,
|
|
852
|
+
);
|
|
844
853
|
|
|
845
|
-
decoders['DeleteImportV2TaskResponse']?.(response
|
|
854
|
+
decoders['DeleteImportV2TaskResponse']?.(response);
|
|
846
855
|
|
|
847
|
-
return
|
|
856
|
+
return response;
|
|
848
857
|
}
|
|
849
858
|
|
|
850
859
|
async getImportV2Task(request: {
|
|
@@ -854,13 +863,16 @@ export class CommonApi {
|
|
|
854
863
|
id: request?.id,
|
|
855
864
|
};
|
|
856
865
|
|
|
857
|
-
const response = await this.apiClient.sendRequest<
|
|
858
|
-
|
|
859
|
-
|
|
866
|
+
const response = await this.apiClient.sendRequest<GetImportV2TaskResponse>(
|
|
867
|
+
'GET',
|
|
868
|
+
'/api/v2/imports/v2/{id}',
|
|
869
|
+
pathParams,
|
|
870
|
+
undefined,
|
|
871
|
+
);
|
|
860
872
|
|
|
861
|
-
decoders['GetImportV2TaskResponse']?.(response
|
|
873
|
+
decoders['GetImportV2TaskResponse']?.(response);
|
|
862
874
|
|
|
863
|
-
return
|
|
875
|
+
return response;
|
|
864
876
|
}
|
|
865
877
|
|
|
866
878
|
async cancelImportV2Task(request: {
|
|
@@ -870,13 +882,17 @@ export class CommonApi {
|
|
|
870
882
|
id: request?.id,
|
|
871
883
|
};
|
|
872
884
|
|
|
873
|
-
const response =
|
|
874
|
-
|
|
875
|
-
|
|
885
|
+
const response =
|
|
886
|
+
await this.apiClient.sendRequest<CancelImportV2TaskResponse>(
|
|
887
|
+
'POST',
|
|
888
|
+
'/api/v2/imports/v2/{id}/cancel',
|
|
889
|
+
pathParams,
|
|
890
|
+
undefined,
|
|
891
|
+
);
|
|
876
892
|
|
|
877
|
-
decoders['CancelImportV2TaskResponse']?.(response
|
|
893
|
+
decoders['CancelImportV2TaskResponse']?.(response);
|
|
878
894
|
|
|
879
|
-
return
|
|
895
|
+
return response;
|
|
880
896
|
}
|
|
881
897
|
|
|
882
898
|
async getImport(request: {
|
|
@@ -886,13 +902,16 @@ export class CommonApi {
|
|
|
886
902
|
id: request?.id,
|
|
887
903
|
};
|
|
888
904
|
|
|
889
|
-
const response = await this.apiClient.sendRequest<
|
|
890
|
-
|
|
891
|
-
|
|
905
|
+
const response = await this.apiClient.sendRequest<GetImportResponse>(
|
|
906
|
+
'GET',
|
|
907
|
+
'/api/v2/imports/{id}',
|
|
908
|
+
pathParams,
|
|
909
|
+
undefined,
|
|
910
|
+
);
|
|
892
911
|
|
|
893
|
-
decoders['GetImportResponse']?.(response
|
|
912
|
+
decoders['GetImportResponse']?.(response);
|
|
894
913
|
|
|
895
|
-
return
|
|
914
|
+
return response;
|
|
896
915
|
}
|
|
897
916
|
|
|
898
917
|
async getOG(request: {
|
|
@@ -902,23 +921,29 @@ export class CommonApi {
|
|
|
902
921
|
url: request?.url,
|
|
903
922
|
};
|
|
904
923
|
|
|
905
|
-
const response = await this.apiClient.sendRequest<
|
|
906
|
-
|
|
907
|
-
|
|
924
|
+
const response = await this.apiClient.sendRequest<GetOGResponse>(
|
|
925
|
+
'GET',
|
|
926
|
+
'/api/v2/og',
|
|
927
|
+
undefined,
|
|
928
|
+
queryParams,
|
|
929
|
+
);
|
|
908
930
|
|
|
909
|
-
decoders['GetOGResponse']?.(response
|
|
931
|
+
decoders['GetOGResponse']?.(response);
|
|
910
932
|
|
|
911
|
-
return
|
|
933
|
+
return response;
|
|
912
934
|
}
|
|
913
935
|
|
|
914
936
|
async listPermissions(): Promise<StreamResponse<ListPermissionsResponse>> {
|
|
915
|
-
const response = await this.apiClient.sendRequest<
|
|
916
|
-
|
|
917
|
-
|
|
937
|
+
const response = await this.apiClient.sendRequest<ListPermissionsResponse>(
|
|
938
|
+
'GET',
|
|
939
|
+
'/api/v2/permissions',
|
|
940
|
+
undefined,
|
|
941
|
+
undefined,
|
|
942
|
+
);
|
|
918
943
|
|
|
919
|
-
decoders['ListPermissionsResponse']?.(response
|
|
944
|
+
decoders['ListPermissionsResponse']?.(response);
|
|
920
945
|
|
|
921
|
-
return
|
|
946
|
+
return response;
|
|
922
947
|
}
|
|
923
948
|
|
|
924
949
|
async createPermission(
|
|
@@ -934,18 +959,17 @@ export class CommonApi {
|
|
|
934
959
|
same_team: request?.same_team,
|
|
935
960
|
};
|
|
936
961
|
|
|
937
|
-
const response = await this.apiClient.sendRequest<
|
|
962
|
+
const response = await this.apiClient.sendRequest<Response>(
|
|
938
963
|
'POST',
|
|
939
964
|
'/api/v2/permissions',
|
|
940
965
|
undefined,
|
|
941
966
|
undefined,
|
|
942
967
|
body,
|
|
943
|
-
'application/json',
|
|
944
968
|
);
|
|
945
969
|
|
|
946
|
-
decoders['Response']?.(response
|
|
970
|
+
decoders['Response']?.(response);
|
|
947
971
|
|
|
948
|
-
return
|
|
972
|
+
return response;
|
|
949
973
|
}
|
|
950
974
|
|
|
951
975
|
async deletePermission(request: {
|
|
@@ -955,16 +979,16 @@ export class CommonApi {
|
|
|
955
979
|
id: request?.id,
|
|
956
980
|
};
|
|
957
981
|
|
|
958
|
-
const response = await this.apiClient.sendRequest<
|
|
982
|
+
const response = await this.apiClient.sendRequest<Response>(
|
|
959
983
|
'DELETE',
|
|
960
984
|
'/api/v2/permissions/{id}',
|
|
961
985
|
pathParams,
|
|
962
986
|
undefined,
|
|
963
987
|
);
|
|
964
988
|
|
|
965
|
-
decoders['Response']?.(response
|
|
989
|
+
decoders['Response']?.(response);
|
|
966
990
|
|
|
967
|
-
return
|
|
991
|
+
return response;
|
|
968
992
|
}
|
|
969
993
|
|
|
970
994
|
async getPermission(request: {
|
|
@@ -974,13 +998,17 @@ export class CommonApi {
|
|
|
974
998
|
id: request?.id,
|
|
975
999
|
};
|
|
976
1000
|
|
|
977
|
-
const response =
|
|
978
|
-
|
|
979
|
-
|
|
1001
|
+
const response =
|
|
1002
|
+
await this.apiClient.sendRequest<GetCustomPermissionResponse>(
|
|
1003
|
+
'GET',
|
|
1004
|
+
'/api/v2/permissions/{id}',
|
|
1005
|
+
pathParams,
|
|
1006
|
+
undefined,
|
|
1007
|
+
);
|
|
980
1008
|
|
|
981
|
-
decoders['GetCustomPermissionResponse']?.(response
|
|
1009
|
+
decoders['GetCustomPermissionResponse']?.(response);
|
|
982
1010
|
|
|
983
|
-
return
|
|
1011
|
+
return response;
|
|
984
1012
|
}
|
|
985
1013
|
|
|
986
1014
|
async updatePermission(
|
|
@@ -998,18 +1026,17 @@ export class CommonApi {
|
|
|
998
1026
|
same_team: request?.same_team,
|
|
999
1027
|
};
|
|
1000
1028
|
|
|
1001
|
-
const response = await this.apiClient.sendRequest<
|
|
1029
|
+
const response = await this.apiClient.sendRequest<Response>(
|
|
1002
1030
|
'PUT',
|
|
1003
1031
|
'/api/v2/permissions/{id}',
|
|
1004
1032
|
pathParams,
|
|
1005
1033
|
undefined,
|
|
1006
1034
|
body,
|
|
1007
|
-
'application/json',
|
|
1008
1035
|
);
|
|
1009
1036
|
|
|
1010
|
-
decoders['Response']?.(response
|
|
1037
|
+
decoders['Response']?.(response);
|
|
1011
1038
|
|
|
1012
|
-
return
|
|
1039
|
+
return response;
|
|
1013
1040
|
}
|
|
1014
1041
|
|
|
1015
1042
|
async createPoll(
|
|
@@ -1024,6 +1051,7 @@ export class CommonApi {
|
|
|
1024
1051
|
id: request?.id,
|
|
1025
1052
|
is_closed: request?.is_closed,
|
|
1026
1053
|
max_votes_allowed: request?.max_votes_allowed,
|
|
1054
|
+
team: request?.team,
|
|
1027
1055
|
user_id: request?.user_id,
|
|
1028
1056
|
voting_visibility: request?.voting_visibility,
|
|
1029
1057
|
options: request?.options,
|
|
@@ -1031,13 +1059,17 @@ export class CommonApi {
|
|
|
1031
1059
|
user: request?.user,
|
|
1032
1060
|
};
|
|
1033
1061
|
|
|
1034
|
-
const response = await this.apiClient.sendRequest<
|
|
1035
|
-
|
|
1036
|
-
|
|
1062
|
+
const response = await this.apiClient.sendRequest<PollResponse>(
|
|
1063
|
+
'POST',
|
|
1064
|
+
'/api/v2/polls',
|
|
1065
|
+
undefined,
|
|
1066
|
+
undefined,
|
|
1067
|
+
body,
|
|
1068
|
+
);
|
|
1037
1069
|
|
|
1038
|
-
decoders['PollResponse']?.(response
|
|
1070
|
+
decoders['PollResponse']?.(response);
|
|
1039
1071
|
|
|
1040
|
-
return
|
|
1072
|
+
return response;
|
|
1041
1073
|
}
|
|
1042
1074
|
|
|
1043
1075
|
async updatePoll(
|
|
@@ -1059,13 +1091,17 @@ export class CommonApi {
|
|
|
1059
1091
|
user: request?.user,
|
|
1060
1092
|
};
|
|
1061
1093
|
|
|
1062
|
-
const response = await this.apiClient.sendRequest<
|
|
1063
|
-
|
|
1064
|
-
|
|
1094
|
+
const response = await this.apiClient.sendRequest<PollResponse>(
|
|
1095
|
+
'PUT',
|
|
1096
|
+
'/api/v2/polls',
|
|
1097
|
+
undefined,
|
|
1098
|
+
undefined,
|
|
1099
|
+
body,
|
|
1100
|
+
);
|
|
1065
1101
|
|
|
1066
|
-
decoders['PollResponse']?.(response
|
|
1102
|
+
decoders['PollResponse']?.(response);
|
|
1067
1103
|
|
|
1068
|
-
return
|
|
1104
|
+
return response;
|
|
1069
1105
|
}
|
|
1070
1106
|
|
|
1071
1107
|
async queryPolls(
|
|
@@ -1082,20 +1118,17 @@ export class CommonApi {
|
|
|
1082
1118
|
filter: request?.filter,
|
|
1083
1119
|
};
|
|
1084
1120
|
|
|
1085
|
-
const response = await this.apiClient.sendRequest<
|
|
1086
|
-
StreamResponse<QueryPollsResponse>
|
|
1087
|
-
>(
|
|
1121
|
+
const response = await this.apiClient.sendRequest<QueryPollsResponse>(
|
|
1088
1122
|
'POST',
|
|
1089
1123
|
'/api/v2/polls/query',
|
|
1090
1124
|
undefined,
|
|
1091
1125
|
queryParams,
|
|
1092
1126
|
body,
|
|
1093
|
-
'application/json',
|
|
1094
1127
|
);
|
|
1095
1128
|
|
|
1096
|
-
decoders['QueryPollsResponse']?.(response
|
|
1129
|
+
decoders['QueryPollsResponse']?.(response);
|
|
1097
1130
|
|
|
1098
|
-
return
|
|
1131
|
+
return response;
|
|
1099
1132
|
}
|
|
1100
1133
|
|
|
1101
1134
|
async deletePoll(request: {
|
|
@@ -1109,16 +1142,16 @@ export class CommonApi {
|
|
|
1109
1142
|
poll_id: request?.poll_id,
|
|
1110
1143
|
};
|
|
1111
1144
|
|
|
1112
|
-
const response = await this.apiClient.sendRequest<
|
|
1145
|
+
const response = await this.apiClient.sendRequest<Response>(
|
|
1113
1146
|
'DELETE',
|
|
1114
1147
|
'/api/v2/polls/{poll_id}',
|
|
1115
1148
|
pathParams,
|
|
1116
1149
|
queryParams,
|
|
1117
1150
|
);
|
|
1118
1151
|
|
|
1119
|
-
decoders['Response']?.(response
|
|
1152
|
+
decoders['Response']?.(response);
|
|
1120
1153
|
|
|
1121
|
-
return
|
|
1154
|
+
return response;
|
|
1122
1155
|
}
|
|
1123
1156
|
|
|
1124
1157
|
async getPoll(request: {
|
|
@@ -1132,13 +1165,16 @@ export class CommonApi {
|
|
|
1132
1165
|
poll_id: request?.poll_id,
|
|
1133
1166
|
};
|
|
1134
1167
|
|
|
1135
|
-
const response = await this.apiClient.sendRequest<
|
|
1136
|
-
|
|
1137
|
-
|
|
1168
|
+
const response = await this.apiClient.sendRequest<PollResponse>(
|
|
1169
|
+
'GET',
|
|
1170
|
+
'/api/v2/polls/{poll_id}',
|
|
1171
|
+
pathParams,
|
|
1172
|
+
queryParams,
|
|
1173
|
+
);
|
|
1138
1174
|
|
|
1139
|
-
decoders['PollResponse']?.(response
|
|
1175
|
+
decoders['PollResponse']?.(response);
|
|
1140
1176
|
|
|
1141
|
-
return
|
|
1177
|
+
return response;
|
|
1142
1178
|
}
|
|
1143
1179
|
|
|
1144
1180
|
async updatePollPartial(
|
|
@@ -1154,20 +1190,17 @@ export class CommonApi {
|
|
|
1154
1190
|
user: request?.user,
|
|
1155
1191
|
};
|
|
1156
1192
|
|
|
1157
|
-
const response = await this.apiClient.sendRequest<
|
|
1158
|
-
StreamResponse<PollResponse>
|
|
1159
|
-
>(
|
|
1193
|
+
const response = await this.apiClient.sendRequest<PollResponse>(
|
|
1160
1194
|
'PATCH',
|
|
1161
1195
|
'/api/v2/polls/{poll_id}',
|
|
1162
1196
|
pathParams,
|
|
1163
1197
|
undefined,
|
|
1164
1198
|
body,
|
|
1165
|
-
'application/json',
|
|
1166
1199
|
);
|
|
1167
1200
|
|
|
1168
|
-
decoders['PollResponse']?.(response
|
|
1201
|
+
decoders['PollResponse']?.(response);
|
|
1169
1202
|
|
|
1170
|
-
return
|
|
1203
|
+
return response;
|
|
1171
1204
|
}
|
|
1172
1205
|
|
|
1173
1206
|
async createPollOption(
|
|
@@ -1183,20 +1216,17 @@ export class CommonApi {
|
|
|
1183
1216
|
user: request?.user,
|
|
1184
1217
|
};
|
|
1185
1218
|
|
|
1186
|
-
const response = await this.apiClient.sendRequest<
|
|
1187
|
-
StreamResponse<PollOptionResponse>
|
|
1188
|
-
>(
|
|
1219
|
+
const response = await this.apiClient.sendRequest<PollOptionResponse>(
|
|
1189
1220
|
'POST',
|
|
1190
1221
|
'/api/v2/polls/{poll_id}/options',
|
|
1191
1222
|
pathParams,
|
|
1192
1223
|
undefined,
|
|
1193
1224
|
body,
|
|
1194
|
-
'application/json',
|
|
1195
1225
|
);
|
|
1196
1226
|
|
|
1197
|
-
decoders['PollOptionResponse']?.(response
|
|
1227
|
+
decoders['PollOptionResponse']?.(response);
|
|
1198
1228
|
|
|
1199
|
-
return
|
|
1229
|
+
return response;
|
|
1200
1230
|
}
|
|
1201
1231
|
|
|
1202
1232
|
async updatePollOption(
|
|
@@ -1213,20 +1243,17 @@ export class CommonApi {
|
|
|
1213
1243
|
user: request?.user,
|
|
1214
1244
|
};
|
|
1215
1245
|
|
|
1216
|
-
const response = await this.apiClient.sendRequest<
|
|
1217
|
-
StreamResponse<PollOptionResponse>
|
|
1218
|
-
>(
|
|
1246
|
+
const response = await this.apiClient.sendRequest<PollOptionResponse>(
|
|
1219
1247
|
'PUT',
|
|
1220
1248
|
'/api/v2/polls/{poll_id}/options',
|
|
1221
1249
|
pathParams,
|
|
1222
1250
|
undefined,
|
|
1223
1251
|
body,
|
|
1224
|
-
'application/json',
|
|
1225
1252
|
);
|
|
1226
1253
|
|
|
1227
|
-
decoders['PollOptionResponse']?.(response
|
|
1254
|
+
decoders['PollOptionResponse']?.(response);
|
|
1228
1255
|
|
|
1229
|
-
return
|
|
1256
|
+
return response;
|
|
1230
1257
|
}
|
|
1231
1258
|
|
|
1232
1259
|
async deletePollOption(request: {
|
|
@@ -1242,16 +1269,16 @@ export class CommonApi {
|
|
|
1242
1269
|
option_id: request?.option_id,
|
|
1243
1270
|
};
|
|
1244
1271
|
|
|
1245
|
-
const response = await this.apiClient.sendRequest<
|
|
1272
|
+
const response = await this.apiClient.sendRequest<Response>(
|
|
1246
1273
|
'DELETE',
|
|
1247
1274
|
'/api/v2/polls/{poll_id}/options/{option_id}',
|
|
1248
1275
|
pathParams,
|
|
1249
1276
|
queryParams,
|
|
1250
1277
|
);
|
|
1251
1278
|
|
|
1252
|
-
decoders['Response']?.(response
|
|
1279
|
+
decoders['Response']?.(response);
|
|
1253
1280
|
|
|
1254
|
-
return
|
|
1281
|
+
return response;
|
|
1255
1282
|
}
|
|
1256
1283
|
|
|
1257
1284
|
async getPollOption(request: {
|
|
@@ -1267,18 +1294,16 @@ export class CommonApi {
|
|
|
1267
1294
|
option_id: request?.option_id,
|
|
1268
1295
|
};
|
|
1269
1296
|
|
|
1270
|
-
const response = await this.apiClient.sendRequest<
|
|
1271
|
-
StreamResponse<PollOptionResponse>
|
|
1272
|
-
>(
|
|
1297
|
+
const response = await this.apiClient.sendRequest<PollOptionResponse>(
|
|
1273
1298
|
'GET',
|
|
1274
1299
|
'/api/v2/polls/{poll_id}/options/{option_id}',
|
|
1275
1300
|
pathParams,
|
|
1276
1301
|
queryParams,
|
|
1277
1302
|
);
|
|
1278
1303
|
|
|
1279
|
-
decoders['PollOptionResponse']?.(response
|
|
1304
|
+
decoders['PollOptionResponse']?.(response);
|
|
1280
1305
|
|
|
1281
|
-
return
|
|
1306
|
+
return response;
|
|
1282
1307
|
}
|
|
1283
1308
|
|
|
1284
1309
|
async queryPollVotes(
|
|
@@ -1298,20 +1323,17 @@ export class CommonApi {
|
|
|
1298
1323
|
filter: request?.filter,
|
|
1299
1324
|
};
|
|
1300
1325
|
|
|
1301
|
-
const response = await this.apiClient.sendRequest<
|
|
1302
|
-
StreamResponse<PollVotesResponse>
|
|
1303
|
-
>(
|
|
1326
|
+
const response = await this.apiClient.sendRequest<PollVotesResponse>(
|
|
1304
1327
|
'POST',
|
|
1305
1328
|
'/api/v2/polls/{poll_id}/votes',
|
|
1306
1329
|
pathParams,
|
|
1307
1330
|
queryParams,
|
|
1308
1331
|
body,
|
|
1309
|
-
'application/json',
|
|
1310
1332
|
);
|
|
1311
1333
|
|
|
1312
|
-
decoders['PollVotesResponse']?.(response
|
|
1334
|
+
decoders['PollVotesResponse']?.(response);
|
|
1313
1335
|
|
|
1314
|
-
return
|
|
1336
|
+
return response;
|
|
1315
1337
|
}
|
|
1316
1338
|
|
|
1317
1339
|
async updatePushNotificationPreferences(
|
|
@@ -1321,32 +1343,34 @@ export class CommonApi {
|
|
|
1321
1343
|
preferences: request?.preferences,
|
|
1322
1344
|
};
|
|
1323
1345
|
|
|
1324
|
-
const response =
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
'application/json',
|
|
1333
|
-
);
|
|
1346
|
+
const response =
|
|
1347
|
+
await this.apiClient.sendRequest<UpsertPushPreferencesResponse>(
|
|
1348
|
+
'POST',
|
|
1349
|
+
'/api/v2/push_preferences',
|
|
1350
|
+
undefined,
|
|
1351
|
+
undefined,
|
|
1352
|
+
body,
|
|
1353
|
+
);
|
|
1334
1354
|
|
|
1335
|
-
decoders['UpsertPushPreferencesResponse']?.(response
|
|
1355
|
+
decoders['UpsertPushPreferencesResponse']?.(response);
|
|
1336
1356
|
|
|
1337
|
-
return
|
|
1357
|
+
return response;
|
|
1338
1358
|
}
|
|
1339
1359
|
|
|
1340
1360
|
async listPushProviders(): Promise<
|
|
1341
1361
|
StreamResponse<ListPushProvidersResponse>
|
|
1342
1362
|
> {
|
|
1343
|
-
const response =
|
|
1344
|
-
|
|
1345
|
-
|
|
1363
|
+
const response =
|
|
1364
|
+
await this.apiClient.sendRequest<ListPushProvidersResponse>(
|
|
1365
|
+
'GET',
|
|
1366
|
+
'/api/v2/push_providers',
|
|
1367
|
+
undefined,
|
|
1368
|
+
undefined,
|
|
1369
|
+
);
|
|
1346
1370
|
|
|
1347
|
-
decoders['ListPushProvidersResponse']?.(response
|
|
1371
|
+
decoders['ListPushProvidersResponse']?.(response);
|
|
1348
1372
|
|
|
1349
|
-
return
|
|
1373
|
+
return response;
|
|
1350
1374
|
}
|
|
1351
1375
|
|
|
1352
1376
|
async upsertPushProvider(
|
|
@@ -1356,20 +1380,18 @@ export class CommonApi {
|
|
|
1356
1380
|
push_provider: request?.push_provider,
|
|
1357
1381
|
};
|
|
1358
1382
|
|
|
1359
|
-
const response =
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
'application/json',
|
|
1368
|
-
);
|
|
1383
|
+
const response =
|
|
1384
|
+
await this.apiClient.sendRequest<UpsertPushProviderResponse>(
|
|
1385
|
+
'POST',
|
|
1386
|
+
'/api/v2/push_providers',
|
|
1387
|
+
undefined,
|
|
1388
|
+
undefined,
|
|
1389
|
+
body,
|
|
1390
|
+
);
|
|
1369
1391
|
|
|
1370
|
-
decoders['UpsertPushProviderResponse']?.(response
|
|
1392
|
+
decoders['UpsertPushProviderResponse']?.(response);
|
|
1371
1393
|
|
|
1372
|
-
return
|
|
1394
|
+
return response;
|
|
1373
1395
|
}
|
|
1374
1396
|
|
|
1375
1397
|
async deletePushProvider(request: {
|
|
@@ -1381,16 +1403,16 @@ export class CommonApi {
|
|
|
1381
1403
|
name: request?.name,
|
|
1382
1404
|
};
|
|
1383
1405
|
|
|
1384
|
-
const response = await this.apiClient.sendRequest<
|
|
1406
|
+
const response = await this.apiClient.sendRequest<Response>(
|
|
1385
1407
|
'DELETE',
|
|
1386
1408
|
'/api/v2/push_providers/{type}/{name}',
|
|
1387
1409
|
pathParams,
|
|
1388
1410
|
undefined,
|
|
1389
1411
|
);
|
|
1390
1412
|
|
|
1391
|
-
decoders['Response']?.(response
|
|
1413
|
+
decoders['Response']?.(response);
|
|
1392
1414
|
|
|
1393
|
-
return
|
|
1415
|
+
return response;
|
|
1394
1416
|
}
|
|
1395
1417
|
|
|
1396
1418
|
async getPushTemplates(request: {
|
|
@@ -1402,13 +1424,16 @@ export class CommonApi {
|
|
|
1402
1424
|
push_provider_name: request?.push_provider_name,
|
|
1403
1425
|
};
|
|
1404
1426
|
|
|
1405
|
-
const response = await this.apiClient.sendRequest<
|
|
1406
|
-
|
|
1407
|
-
|
|
1427
|
+
const response = await this.apiClient.sendRequest<GetPushTemplatesResponse>(
|
|
1428
|
+
'GET',
|
|
1429
|
+
'/api/v2/push_templates',
|
|
1430
|
+
undefined,
|
|
1431
|
+
queryParams,
|
|
1432
|
+
);
|
|
1408
1433
|
|
|
1409
|
-
decoders['GetPushTemplatesResponse']?.(response
|
|
1434
|
+
decoders['GetPushTemplatesResponse']?.(response);
|
|
1410
1435
|
|
|
1411
|
-
return
|
|
1436
|
+
return response;
|
|
1412
1437
|
}
|
|
1413
1438
|
|
|
1414
1439
|
async upsertPushTemplate(
|
|
@@ -1422,20 +1447,18 @@ export class CommonApi {
|
|
|
1422
1447
|
template: request?.template,
|
|
1423
1448
|
};
|
|
1424
1449
|
|
|
1425
|
-
const response =
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
'application/json',
|
|
1434
|
-
);
|
|
1450
|
+
const response =
|
|
1451
|
+
await this.apiClient.sendRequest<UpsertPushTemplateResponse>(
|
|
1452
|
+
'POST',
|
|
1453
|
+
'/api/v2/push_templates',
|
|
1454
|
+
undefined,
|
|
1455
|
+
undefined,
|
|
1456
|
+
body,
|
|
1457
|
+
);
|
|
1435
1458
|
|
|
1436
|
-
decoders['UpsertPushTemplateResponse']?.(response
|
|
1459
|
+
decoders['UpsertPushTemplateResponse']?.(response);
|
|
1437
1460
|
|
|
1438
|
-
return
|
|
1461
|
+
return response;
|
|
1439
1462
|
}
|
|
1440
1463
|
|
|
1441
1464
|
async getRateLimits(request?: {
|
|
@@ -1459,23 +1482,29 @@ export class CommonApi {
|
|
|
1459
1482
|
endpoints: request?.endpoints,
|
|
1460
1483
|
};
|
|
1461
1484
|
|
|
1462
|
-
const response = await this.apiClient.sendRequest<
|
|
1463
|
-
|
|
1464
|
-
|
|
1485
|
+
const response = await this.apiClient.sendRequest<GetRateLimitsResponse>(
|
|
1486
|
+
'GET',
|
|
1487
|
+
'/api/v2/rate_limits',
|
|
1488
|
+
undefined,
|
|
1489
|
+
queryParams,
|
|
1490
|
+
);
|
|
1465
1491
|
|
|
1466
|
-
decoders['GetRateLimitsResponse']?.(response
|
|
1492
|
+
decoders['GetRateLimitsResponse']?.(response);
|
|
1467
1493
|
|
|
1468
|
-
return
|
|
1494
|
+
return response;
|
|
1469
1495
|
}
|
|
1470
1496
|
|
|
1471
1497
|
async listRoles(): Promise<StreamResponse<ListRolesResponse>> {
|
|
1472
|
-
const response = await this.apiClient.sendRequest<
|
|
1473
|
-
|
|
1474
|
-
|
|
1498
|
+
const response = await this.apiClient.sendRequest<ListRolesResponse>(
|
|
1499
|
+
'GET',
|
|
1500
|
+
'/api/v2/roles',
|
|
1501
|
+
undefined,
|
|
1502
|
+
undefined,
|
|
1503
|
+
);
|
|
1475
1504
|
|
|
1476
|
-
decoders['ListRolesResponse']?.(response
|
|
1505
|
+
decoders['ListRolesResponse']?.(response);
|
|
1477
1506
|
|
|
1478
|
-
return
|
|
1507
|
+
return response;
|
|
1479
1508
|
}
|
|
1480
1509
|
|
|
1481
1510
|
async createRole(
|
|
@@ -1485,13 +1514,17 @@ export class CommonApi {
|
|
|
1485
1514
|
name: request?.name,
|
|
1486
1515
|
};
|
|
1487
1516
|
|
|
1488
|
-
const response = await this.apiClient.sendRequest<
|
|
1489
|
-
|
|
1490
|
-
|
|
1517
|
+
const response = await this.apiClient.sendRequest<CreateRoleResponse>(
|
|
1518
|
+
'POST',
|
|
1519
|
+
'/api/v2/roles',
|
|
1520
|
+
undefined,
|
|
1521
|
+
undefined,
|
|
1522
|
+
body,
|
|
1523
|
+
);
|
|
1491
1524
|
|
|
1492
|
-
decoders['CreateRoleResponse']?.(response
|
|
1525
|
+
decoders['CreateRoleResponse']?.(response);
|
|
1493
1526
|
|
|
1494
|
-
return
|
|
1527
|
+
return response;
|
|
1495
1528
|
}
|
|
1496
1529
|
|
|
1497
1530
|
async searchRoles(request: {
|
|
@@ -1509,13 +1542,16 @@ export class CommonApi {
|
|
|
1509
1542
|
include_global_roles: request?.include_global_roles,
|
|
1510
1543
|
};
|
|
1511
1544
|
|
|
1512
|
-
const response = await this.apiClient.sendRequest<
|
|
1513
|
-
|
|
1514
|
-
|
|
1545
|
+
const response = await this.apiClient.sendRequest<SearchRolesResponse>(
|
|
1546
|
+
'GET',
|
|
1547
|
+
'/api/v2/roles/search',
|
|
1548
|
+
undefined,
|
|
1549
|
+
queryParams,
|
|
1550
|
+
);
|
|
1515
1551
|
|
|
1516
|
-
decoders['SearchRolesResponse']?.(response
|
|
1552
|
+
decoders['SearchRolesResponse']?.(response);
|
|
1517
1553
|
|
|
1518
|
-
return
|
|
1554
|
+
return response;
|
|
1519
1555
|
}
|
|
1520
1556
|
|
|
1521
1557
|
async deleteRole(request: {
|
|
@@ -1525,16 +1561,16 @@ export class CommonApi {
|
|
|
1525
1561
|
name: request?.name,
|
|
1526
1562
|
};
|
|
1527
1563
|
|
|
1528
|
-
const response = await this.apiClient.sendRequest<
|
|
1564
|
+
const response = await this.apiClient.sendRequest<Response>(
|
|
1529
1565
|
'DELETE',
|
|
1530
1566
|
'/api/v2/roles/{name}',
|
|
1531
1567
|
pathParams,
|
|
1532
1568
|
undefined,
|
|
1533
1569
|
);
|
|
1534
1570
|
|
|
1535
|
-
decoders['Response']?.(response
|
|
1571
|
+
decoders['Response']?.(response);
|
|
1536
1572
|
|
|
1537
|
-
return
|
|
1573
|
+
return response;
|
|
1538
1574
|
}
|
|
1539
1575
|
|
|
1540
1576
|
async getTask(request: {
|
|
@@ -1544,13 +1580,16 @@ export class CommonApi {
|
|
|
1544
1580
|
id: request?.id,
|
|
1545
1581
|
};
|
|
1546
1582
|
|
|
1547
|
-
const response = await this.apiClient.sendRequest<
|
|
1548
|
-
|
|
1549
|
-
|
|
1583
|
+
const response = await this.apiClient.sendRequest<GetTaskResponse>(
|
|
1584
|
+
'GET',
|
|
1585
|
+
'/api/v2/tasks/{id}',
|
|
1586
|
+
pathParams,
|
|
1587
|
+
undefined,
|
|
1588
|
+
);
|
|
1550
1589
|
|
|
1551
|
-
decoders['GetTaskResponse']?.(response
|
|
1590
|
+
decoders['GetTaskResponse']?.(response);
|
|
1552
1591
|
|
|
1553
|
-
return
|
|
1592
|
+
return response;
|
|
1554
1593
|
}
|
|
1555
1594
|
|
|
1556
1595
|
async deleteFile(request?: {
|
|
@@ -1560,16 +1599,16 @@ export class CommonApi {
|
|
|
1560
1599
|
url: request?.url,
|
|
1561
1600
|
};
|
|
1562
1601
|
|
|
1563
|
-
const response = await this.apiClient.sendRequest<
|
|
1602
|
+
const response = await this.apiClient.sendRequest<Response>(
|
|
1564
1603
|
'DELETE',
|
|
1565
1604
|
'/api/v2/uploads/file',
|
|
1566
1605
|
undefined,
|
|
1567
1606
|
queryParams,
|
|
1568
1607
|
);
|
|
1569
1608
|
|
|
1570
|
-
decoders['Response']?.(response
|
|
1609
|
+
decoders['Response']?.(response);
|
|
1571
1610
|
|
|
1572
|
-
return
|
|
1611
|
+
return response;
|
|
1573
1612
|
}
|
|
1574
1613
|
|
|
1575
1614
|
async uploadFile(
|
|
@@ -1580,9 +1619,7 @@ export class CommonApi {
|
|
|
1580
1619
|
user: request?.user,
|
|
1581
1620
|
};
|
|
1582
1621
|
|
|
1583
|
-
const response = await this.apiClient.sendRequest<
|
|
1584
|
-
StreamResponse<FileUploadResponse>
|
|
1585
|
-
>(
|
|
1622
|
+
const response = await this.apiClient.sendRequest<FileUploadResponse>(
|
|
1586
1623
|
'POST',
|
|
1587
1624
|
'/api/v2/uploads/file',
|
|
1588
1625
|
undefined,
|
|
@@ -1591,9 +1628,9 @@ export class CommonApi {
|
|
|
1591
1628
|
'multipart/form-data',
|
|
1592
1629
|
);
|
|
1593
1630
|
|
|
1594
|
-
decoders['FileUploadResponse']?.(response
|
|
1631
|
+
decoders['FileUploadResponse']?.(response);
|
|
1595
1632
|
|
|
1596
|
-
return
|
|
1633
|
+
return response;
|
|
1597
1634
|
}
|
|
1598
1635
|
|
|
1599
1636
|
async deleteImage(request?: {
|
|
@@ -1603,16 +1640,16 @@ export class CommonApi {
|
|
|
1603
1640
|
url: request?.url,
|
|
1604
1641
|
};
|
|
1605
1642
|
|
|
1606
|
-
const response = await this.apiClient.sendRequest<
|
|
1643
|
+
const response = await this.apiClient.sendRequest<Response>(
|
|
1607
1644
|
'DELETE',
|
|
1608
1645
|
'/api/v2/uploads/image',
|
|
1609
1646
|
undefined,
|
|
1610
1647
|
queryParams,
|
|
1611
1648
|
);
|
|
1612
1649
|
|
|
1613
|
-
decoders['Response']?.(response
|
|
1650
|
+
decoders['Response']?.(response);
|
|
1614
1651
|
|
|
1615
|
-
return
|
|
1652
|
+
return response;
|
|
1616
1653
|
}
|
|
1617
1654
|
|
|
1618
1655
|
async uploadImage(
|
|
@@ -1624,9 +1661,7 @@ export class CommonApi {
|
|
|
1624
1661
|
user: request?.user,
|
|
1625
1662
|
};
|
|
1626
1663
|
|
|
1627
|
-
const response = await this.apiClient.sendRequest<
|
|
1628
|
-
StreamResponse<ImageUploadResponse>
|
|
1629
|
-
>(
|
|
1664
|
+
const response = await this.apiClient.sendRequest<ImageUploadResponse>(
|
|
1630
1665
|
'POST',
|
|
1631
1666
|
'/api/v2/uploads/image',
|
|
1632
1667
|
undefined,
|
|
@@ -1635,9 +1670,9 @@ export class CommonApi {
|
|
|
1635
1670
|
'multipart/form-data',
|
|
1636
1671
|
);
|
|
1637
1672
|
|
|
1638
|
-
decoders['ImageUploadResponse']?.(response
|
|
1673
|
+
decoders['ImageUploadResponse']?.(response);
|
|
1639
1674
|
|
|
1640
|
-
return
|
|
1675
|
+
return response;
|
|
1641
1676
|
}
|
|
1642
1677
|
|
|
1643
1678
|
async listUserGroups(request?: {
|
|
@@ -1653,13 +1688,16 @@ export class CommonApi {
|
|
|
1653
1688
|
team_id: request?.team_id,
|
|
1654
1689
|
};
|
|
1655
1690
|
|
|
1656
|
-
const response = await this.apiClient.sendRequest<
|
|
1657
|
-
|
|
1658
|
-
|
|
1691
|
+
const response = await this.apiClient.sendRequest<ListUserGroupsResponse>(
|
|
1692
|
+
'GET',
|
|
1693
|
+
'/api/v2/usergroups',
|
|
1694
|
+
undefined,
|
|
1695
|
+
queryParams,
|
|
1696
|
+
);
|
|
1659
1697
|
|
|
1660
|
-
decoders['ListUserGroupsResponse']?.(response
|
|
1698
|
+
decoders['ListUserGroupsResponse']?.(response);
|
|
1661
1699
|
|
|
1662
|
-
return
|
|
1700
|
+
return response;
|
|
1663
1701
|
}
|
|
1664
1702
|
|
|
1665
1703
|
async createUserGroup(
|
|
@@ -1673,20 +1711,17 @@ export class CommonApi {
|
|
|
1673
1711
|
member_ids: request?.member_ids,
|
|
1674
1712
|
};
|
|
1675
1713
|
|
|
1676
|
-
const response = await this.apiClient.sendRequest<
|
|
1677
|
-
StreamResponse<CreateUserGroupResponse>
|
|
1678
|
-
>(
|
|
1714
|
+
const response = await this.apiClient.sendRequest<CreateUserGroupResponse>(
|
|
1679
1715
|
'POST',
|
|
1680
1716
|
'/api/v2/usergroups',
|
|
1681
1717
|
undefined,
|
|
1682
1718
|
undefined,
|
|
1683
1719
|
body,
|
|
1684
|
-
'application/json',
|
|
1685
1720
|
);
|
|
1686
1721
|
|
|
1687
|
-
decoders['CreateUserGroupResponse']?.(response
|
|
1722
|
+
decoders['CreateUserGroupResponse']?.(response);
|
|
1688
1723
|
|
|
1689
|
-
return
|
|
1724
|
+
return response;
|
|
1690
1725
|
}
|
|
1691
1726
|
|
|
1692
1727
|
async searchUserGroups(request: {
|
|
@@ -1704,13 +1739,16 @@ export class CommonApi {
|
|
|
1704
1739
|
team_id: request?.team_id,
|
|
1705
1740
|
};
|
|
1706
1741
|
|
|
1707
|
-
const response = await this.apiClient.sendRequest<
|
|
1708
|
-
|
|
1709
|
-
|
|
1742
|
+
const response = await this.apiClient.sendRequest<SearchUserGroupsResponse>(
|
|
1743
|
+
'GET',
|
|
1744
|
+
'/api/v2/usergroups/search',
|
|
1745
|
+
undefined,
|
|
1746
|
+
queryParams,
|
|
1747
|
+
);
|
|
1710
1748
|
|
|
1711
|
-
decoders['SearchUserGroupsResponse']?.(response
|
|
1749
|
+
decoders['SearchUserGroupsResponse']?.(response);
|
|
1712
1750
|
|
|
1713
|
-
return
|
|
1751
|
+
return response;
|
|
1714
1752
|
}
|
|
1715
1753
|
|
|
1716
1754
|
async deleteUserGroup(request: {
|
|
@@ -1724,16 +1762,16 @@ export class CommonApi {
|
|
|
1724
1762
|
id: request?.id,
|
|
1725
1763
|
};
|
|
1726
1764
|
|
|
1727
|
-
const response = await this.apiClient.sendRequest<
|
|
1765
|
+
const response = await this.apiClient.sendRequest<Response>(
|
|
1728
1766
|
'DELETE',
|
|
1729
1767
|
'/api/v2/usergroups/{id}',
|
|
1730
1768
|
pathParams,
|
|
1731
1769
|
queryParams,
|
|
1732
1770
|
);
|
|
1733
1771
|
|
|
1734
|
-
decoders['Response']?.(response
|
|
1772
|
+
decoders['Response']?.(response);
|
|
1735
1773
|
|
|
1736
|
-
return
|
|
1774
|
+
return response;
|
|
1737
1775
|
}
|
|
1738
1776
|
|
|
1739
1777
|
async getUserGroup(request: {
|
|
@@ -1747,13 +1785,16 @@ export class CommonApi {
|
|
|
1747
1785
|
id: request?.id,
|
|
1748
1786
|
};
|
|
1749
1787
|
|
|
1750
|
-
const response = await this.apiClient.sendRequest<
|
|
1751
|
-
|
|
1752
|
-
|
|
1788
|
+
const response = await this.apiClient.sendRequest<GetUserGroupResponse>(
|
|
1789
|
+
'GET',
|
|
1790
|
+
'/api/v2/usergroups/{id}',
|
|
1791
|
+
pathParams,
|
|
1792
|
+
queryParams,
|
|
1793
|
+
);
|
|
1753
1794
|
|
|
1754
|
-
decoders['GetUserGroupResponse']?.(response
|
|
1795
|
+
decoders['GetUserGroupResponse']?.(response);
|
|
1755
1796
|
|
|
1756
|
-
return
|
|
1797
|
+
return response;
|
|
1757
1798
|
}
|
|
1758
1799
|
|
|
1759
1800
|
async updateUserGroup(
|
|
@@ -1768,20 +1809,17 @@ export class CommonApi {
|
|
|
1768
1809
|
team_id: request?.team_id,
|
|
1769
1810
|
};
|
|
1770
1811
|
|
|
1771
|
-
const response = await this.apiClient.sendRequest<
|
|
1772
|
-
StreamResponse<UpdateUserGroupResponse>
|
|
1773
|
-
>(
|
|
1812
|
+
const response = await this.apiClient.sendRequest<UpdateUserGroupResponse>(
|
|
1774
1813
|
'PUT',
|
|
1775
1814
|
'/api/v2/usergroups/{id}',
|
|
1776
1815
|
pathParams,
|
|
1777
1816
|
undefined,
|
|
1778
1817
|
body,
|
|
1779
|
-
'application/json',
|
|
1780
1818
|
);
|
|
1781
1819
|
|
|
1782
|
-
decoders['UpdateUserGroupResponse']?.(response
|
|
1820
|
+
decoders['UpdateUserGroupResponse']?.(response);
|
|
1783
1821
|
|
|
1784
|
-
return
|
|
1822
|
+
return response;
|
|
1785
1823
|
}
|
|
1786
1824
|
|
|
1787
1825
|
async addUserGroupMembers(
|
|
@@ -1796,20 +1834,18 @@ export class CommonApi {
|
|
|
1796
1834
|
team_id: request?.team_id,
|
|
1797
1835
|
};
|
|
1798
1836
|
|
|
1799
|
-
const response =
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
|
|
1806
|
-
|
|
1807
|
-
'application/json',
|
|
1808
|
-
);
|
|
1837
|
+
const response =
|
|
1838
|
+
await this.apiClient.sendRequest<AddUserGroupMembersResponse>(
|
|
1839
|
+
'POST',
|
|
1840
|
+
'/api/v2/usergroups/{id}/members',
|
|
1841
|
+
pathParams,
|
|
1842
|
+
undefined,
|
|
1843
|
+
body,
|
|
1844
|
+
);
|
|
1809
1845
|
|
|
1810
|
-
decoders['AddUserGroupMembersResponse']?.(response
|
|
1846
|
+
decoders['AddUserGroupMembersResponse']?.(response);
|
|
1811
1847
|
|
|
1812
|
-
return
|
|
1848
|
+
return response;
|
|
1813
1849
|
}
|
|
1814
1850
|
|
|
1815
1851
|
async removeUserGroupMembers(
|
|
@@ -1823,20 +1859,18 @@ export class CommonApi {
|
|
|
1823
1859
|
team_id: request?.team_id,
|
|
1824
1860
|
};
|
|
1825
1861
|
|
|
1826
|
-
const response =
|
|
1827
|
-
|
|
1828
|
-
|
|
1829
|
-
|
|
1830
|
-
|
|
1831
|
-
|
|
1832
|
-
|
|
1833
|
-
|
|
1834
|
-
'application/json',
|
|
1835
|
-
);
|
|
1862
|
+
const response =
|
|
1863
|
+
await this.apiClient.sendRequest<RemoveUserGroupMembersResponse>(
|
|
1864
|
+
'POST',
|
|
1865
|
+
'/api/v2/usergroups/{id}/members/delete',
|
|
1866
|
+
pathParams,
|
|
1867
|
+
undefined,
|
|
1868
|
+
body,
|
|
1869
|
+
);
|
|
1836
1870
|
|
|
1837
|
-
decoders['RemoveUserGroupMembersResponse']?.(response
|
|
1871
|
+
decoders['RemoveUserGroupMembersResponse']?.(response);
|
|
1838
1872
|
|
|
1839
|
-
return
|
|
1873
|
+
return response;
|
|
1840
1874
|
}
|
|
1841
1875
|
|
|
1842
1876
|
async queryUsers(request?: {
|
|
@@ -1846,13 +1880,16 @@ export class CommonApi {
|
|
|
1846
1880
|
payload: request?.payload,
|
|
1847
1881
|
};
|
|
1848
1882
|
|
|
1849
|
-
const response = await this.apiClient.sendRequest<
|
|
1850
|
-
|
|
1851
|
-
|
|
1883
|
+
const response = await this.apiClient.sendRequest<QueryUsersResponse>(
|
|
1884
|
+
'GET',
|
|
1885
|
+
'/api/v2/users',
|
|
1886
|
+
undefined,
|
|
1887
|
+
queryParams,
|
|
1888
|
+
);
|
|
1852
1889
|
|
|
1853
|
-
decoders['QueryUsersResponse']?.(response
|
|
1890
|
+
decoders['QueryUsersResponse']?.(response);
|
|
1854
1891
|
|
|
1855
|
-
return
|
|
1892
|
+
return response;
|
|
1856
1893
|
}
|
|
1857
1894
|
|
|
1858
1895
|
async updateUsersPartial(
|
|
@@ -1862,13 +1899,17 @@ export class CommonApi {
|
|
|
1862
1899
|
users: request?.users,
|
|
1863
1900
|
};
|
|
1864
1901
|
|
|
1865
|
-
const response = await this.apiClient.sendRequest<
|
|
1866
|
-
|
|
1867
|
-
|
|
1902
|
+
const response = await this.apiClient.sendRequest<UpdateUsersResponse>(
|
|
1903
|
+
'PATCH',
|
|
1904
|
+
'/api/v2/users',
|
|
1905
|
+
undefined,
|
|
1906
|
+
undefined,
|
|
1907
|
+
body,
|
|
1908
|
+
);
|
|
1868
1909
|
|
|
1869
|
-
decoders['UpdateUsersResponse']?.(response
|
|
1910
|
+
decoders['UpdateUsersResponse']?.(response);
|
|
1870
1911
|
|
|
1871
|
-
return
|
|
1912
|
+
return response;
|
|
1872
1913
|
}
|
|
1873
1914
|
|
|
1874
1915
|
async updateUsers(
|
|
@@ -1878,13 +1919,17 @@ export class CommonApi {
|
|
|
1878
1919
|
users: request?.users,
|
|
1879
1920
|
};
|
|
1880
1921
|
|
|
1881
|
-
const response = await this.apiClient.sendRequest<
|
|
1882
|
-
|
|
1883
|
-
|
|
1922
|
+
const response = await this.apiClient.sendRequest<UpdateUsersResponse>(
|
|
1923
|
+
'POST',
|
|
1924
|
+
'/api/v2/users',
|
|
1925
|
+
undefined,
|
|
1926
|
+
undefined,
|
|
1927
|
+
body,
|
|
1928
|
+
);
|
|
1884
1929
|
|
|
1885
|
-
decoders['UpdateUsersResponse']?.(response
|
|
1930
|
+
decoders['UpdateUsersResponse']?.(response);
|
|
1886
1931
|
|
|
1887
|
-
return
|
|
1932
|
+
return response;
|
|
1888
1933
|
}
|
|
1889
1934
|
|
|
1890
1935
|
async getBlockedUsers(request?: {
|
|
@@ -1894,13 +1939,16 @@ export class CommonApi {
|
|
|
1894
1939
|
user_id: request?.user_id,
|
|
1895
1940
|
};
|
|
1896
1941
|
|
|
1897
|
-
const response = await this.apiClient.sendRequest<
|
|
1898
|
-
|
|
1899
|
-
|
|
1942
|
+
const response = await this.apiClient.sendRequest<GetBlockedUsersResponse>(
|
|
1943
|
+
'GET',
|
|
1944
|
+
'/api/v2/users/block',
|
|
1945
|
+
undefined,
|
|
1946
|
+
queryParams,
|
|
1947
|
+
);
|
|
1900
1948
|
|
|
1901
|
-
decoders['GetBlockedUsersResponse']?.(response
|
|
1949
|
+
decoders['GetBlockedUsersResponse']?.(response);
|
|
1902
1950
|
|
|
1903
|
-
return
|
|
1951
|
+
return response;
|
|
1904
1952
|
}
|
|
1905
1953
|
|
|
1906
1954
|
async blockUsers(
|
|
@@ -1912,20 +1960,17 @@ export class CommonApi {
|
|
|
1912
1960
|
user: request?.user,
|
|
1913
1961
|
};
|
|
1914
1962
|
|
|
1915
|
-
const response = await this.apiClient.sendRequest<
|
|
1916
|
-
StreamResponse<BlockUsersResponse>
|
|
1917
|
-
>(
|
|
1963
|
+
const response = await this.apiClient.sendRequest<BlockUsersResponse>(
|
|
1918
1964
|
'POST',
|
|
1919
1965
|
'/api/v2/users/block',
|
|
1920
1966
|
undefined,
|
|
1921
1967
|
undefined,
|
|
1922
1968
|
body,
|
|
1923
|
-
'application/json',
|
|
1924
1969
|
);
|
|
1925
1970
|
|
|
1926
|
-
decoders['BlockUsersResponse']?.(response
|
|
1971
|
+
decoders['BlockUsersResponse']?.(response);
|
|
1927
1972
|
|
|
1928
|
-
return
|
|
1973
|
+
return response;
|
|
1929
1974
|
}
|
|
1930
1975
|
|
|
1931
1976
|
async deactivateUsers(
|
|
@@ -1938,20 +1983,17 @@ export class CommonApi {
|
|
|
1938
1983
|
mark_messages_deleted: request?.mark_messages_deleted,
|
|
1939
1984
|
};
|
|
1940
1985
|
|
|
1941
|
-
const response = await this.apiClient.sendRequest<
|
|
1942
|
-
StreamResponse<DeactivateUsersResponse>
|
|
1943
|
-
>(
|
|
1986
|
+
const response = await this.apiClient.sendRequest<DeactivateUsersResponse>(
|
|
1944
1987
|
'POST',
|
|
1945
1988
|
'/api/v2/users/deactivate',
|
|
1946
1989
|
undefined,
|
|
1947
1990
|
undefined,
|
|
1948
1991
|
body,
|
|
1949
|
-
'application/json',
|
|
1950
1992
|
);
|
|
1951
1993
|
|
|
1952
|
-
decoders['DeactivateUsersResponse']?.(response
|
|
1994
|
+
decoders['DeactivateUsersResponse']?.(response);
|
|
1953
1995
|
|
|
1954
|
-
return
|
|
1996
|
+
return response;
|
|
1955
1997
|
}
|
|
1956
1998
|
|
|
1957
1999
|
async deleteUsers(
|
|
@@ -1968,20 +2010,17 @@ export class CommonApi {
|
|
|
1968
2010
|
user: request?.user,
|
|
1969
2011
|
};
|
|
1970
2012
|
|
|
1971
|
-
const response = await this.apiClient.sendRequest<
|
|
1972
|
-
StreamResponse<DeleteUsersResponse>
|
|
1973
|
-
>(
|
|
2013
|
+
const response = await this.apiClient.sendRequest<DeleteUsersResponse>(
|
|
1974
2014
|
'POST',
|
|
1975
2015
|
'/api/v2/users/delete',
|
|
1976
2016
|
undefined,
|
|
1977
2017
|
undefined,
|
|
1978
2018
|
body,
|
|
1979
|
-
'application/json',
|
|
1980
2019
|
);
|
|
1981
2020
|
|
|
1982
|
-
decoders['DeleteUsersResponse']?.(response
|
|
2021
|
+
decoders['DeleteUsersResponse']?.(response);
|
|
1983
2022
|
|
|
1984
|
-
return
|
|
2023
|
+
return response;
|
|
1985
2024
|
}
|
|
1986
2025
|
|
|
1987
2026
|
async getUserLiveLocations(request?: {
|
|
@@ -1991,13 +2030,16 @@ export class CommonApi {
|
|
|
1991
2030
|
user_id: request?.user_id,
|
|
1992
2031
|
};
|
|
1993
2032
|
|
|
1994
|
-
const response = await this.apiClient.sendRequest<
|
|
1995
|
-
|
|
1996
|
-
|
|
2033
|
+
const response = await this.apiClient.sendRequest<SharedLocationsResponse>(
|
|
2034
|
+
'GET',
|
|
2035
|
+
'/api/v2/users/live_locations',
|
|
2036
|
+
undefined,
|
|
2037
|
+
queryParams,
|
|
2038
|
+
);
|
|
1997
2039
|
|
|
1998
|
-
decoders['SharedLocationsResponse']?.(response
|
|
2040
|
+
decoders['SharedLocationsResponse']?.(response);
|
|
1999
2041
|
|
|
2000
|
-
return
|
|
2042
|
+
return response;
|
|
2001
2043
|
}
|
|
2002
2044
|
|
|
2003
2045
|
async updateLiveLocation(
|
|
@@ -2013,20 +2055,17 @@ export class CommonApi {
|
|
|
2013
2055
|
longitude: request?.longitude,
|
|
2014
2056
|
};
|
|
2015
2057
|
|
|
2016
|
-
const response = await this.apiClient.sendRequest<
|
|
2017
|
-
StreamResponse<SharedLocationResponse>
|
|
2018
|
-
>(
|
|
2058
|
+
const response = await this.apiClient.sendRequest<SharedLocationResponse>(
|
|
2019
2059
|
'PUT',
|
|
2020
2060
|
'/api/v2/users/live_locations',
|
|
2021
2061
|
undefined,
|
|
2022
2062
|
queryParams,
|
|
2023
2063
|
body,
|
|
2024
|
-
'application/json',
|
|
2025
2064
|
);
|
|
2026
2065
|
|
|
2027
|
-
decoders['SharedLocationResponse']?.(response
|
|
2066
|
+
decoders['SharedLocationResponse']?.(response);
|
|
2028
2067
|
|
|
2029
|
-
return
|
|
2068
|
+
return response;
|
|
2030
2069
|
}
|
|
2031
2070
|
|
|
2032
2071
|
async reactivateUsers(
|
|
@@ -2039,20 +2078,17 @@ export class CommonApi {
|
|
|
2039
2078
|
restore_messages: request?.restore_messages,
|
|
2040
2079
|
};
|
|
2041
2080
|
|
|
2042
|
-
const response = await this.apiClient.sendRequest<
|
|
2043
|
-
StreamResponse<ReactivateUsersResponse>
|
|
2044
|
-
>(
|
|
2081
|
+
const response = await this.apiClient.sendRequest<ReactivateUsersResponse>(
|
|
2045
2082
|
'POST',
|
|
2046
2083
|
'/api/v2/users/reactivate',
|
|
2047
2084
|
undefined,
|
|
2048
2085
|
undefined,
|
|
2049
2086
|
body,
|
|
2050
|
-
'application/json',
|
|
2051
2087
|
);
|
|
2052
2088
|
|
|
2053
|
-
decoders['ReactivateUsersResponse']?.(response
|
|
2089
|
+
decoders['ReactivateUsersResponse']?.(response);
|
|
2054
2090
|
|
|
2055
|
-
return
|
|
2091
|
+
return response;
|
|
2056
2092
|
}
|
|
2057
2093
|
|
|
2058
2094
|
async restoreUsers(
|
|
@@ -2062,18 +2098,17 @@ export class CommonApi {
|
|
|
2062
2098
|
user_ids: request?.user_ids,
|
|
2063
2099
|
};
|
|
2064
2100
|
|
|
2065
|
-
const response = await this.apiClient.sendRequest<
|
|
2101
|
+
const response = await this.apiClient.sendRequest<Response>(
|
|
2066
2102
|
'POST',
|
|
2067
2103
|
'/api/v2/users/restore',
|
|
2068
2104
|
undefined,
|
|
2069
2105
|
undefined,
|
|
2070
2106
|
body,
|
|
2071
|
-
'application/json',
|
|
2072
2107
|
);
|
|
2073
2108
|
|
|
2074
|
-
decoders['Response']?.(response
|
|
2109
|
+
decoders['Response']?.(response);
|
|
2075
2110
|
|
|
2076
|
-
return
|
|
2111
|
+
return response;
|
|
2077
2112
|
}
|
|
2078
2113
|
|
|
2079
2114
|
async unblockUsers(
|
|
@@ -2085,20 +2120,17 @@ export class CommonApi {
|
|
|
2085
2120
|
user: request?.user,
|
|
2086
2121
|
};
|
|
2087
2122
|
|
|
2088
|
-
const response = await this.apiClient.sendRequest<
|
|
2089
|
-
StreamResponse<UnblockUsersResponse>
|
|
2090
|
-
>(
|
|
2123
|
+
const response = await this.apiClient.sendRequest<UnblockUsersResponse>(
|
|
2091
2124
|
'POST',
|
|
2092
2125
|
'/api/v2/users/unblock',
|
|
2093
2126
|
undefined,
|
|
2094
2127
|
undefined,
|
|
2095
2128
|
body,
|
|
2096
|
-
'application/json',
|
|
2097
2129
|
);
|
|
2098
2130
|
|
|
2099
|
-
decoders['UnblockUsersResponse']?.(response
|
|
2131
|
+
decoders['UnblockUsersResponse']?.(response);
|
|
2100
2132
|
|
|
2101
|
-
return
|
|
2133
|
+
return response;
|
|
2102
2134
|
}
|
|
2103
2135
|
|
|
2104
2136
|
async deactivateUser(
|
|
@@ -2112,20 +2144,17 @@ export class CommonApi {
|
|
|
2112
2144
|
mark_messages_deleted: request?.mark_messages_deleted,
|
|
2113
2145
|
};
|
|
2114
2146
|
|
|
2115
|
-
const response = await this.apiClient.sendRequest<
|
|
2116
|
-
StreamResponse<DeactivateUserResponse>
|
|
2117
|
-
>(
|
|
2147
|
+
const response = await this.apiClient.sendRequest<DeactivateUserResponse>(
|
|
2118
2148
|
'POST',
|
|
2119
2149
|
'/api/v2/users/{user_id}/deactivate',
|
|
2120
2150
|
pathParams,
|
|
2121
2151
|
undefined,
|
|
2122
2152
|
body,
|
|
2123
|
-
'application/json',
|
|
2124
2153
|
);
|
|
2125
2154
|
|
|
2126
|
-
decoders['DeactivateUserResponse']?.(response
|
|
2155
|
+
decoders['DeactivateUserResponse']?.(response);
|
|
2127
2156
|
|
|
2128
|
-
return
|
|
2157
|
+
return response;
|
|
2129
2158
|
}
|
|
2130
2159
|
|
|
2131
2160
|
async exportUser(request: {
|
|
@@ -2135,13 +2164,16 @@ export class CommonApi {
|
|
|
2135
2164
|
user_id: request?.user_id,
|
|
2136
2165
|
};
|
|
2137
2166
|
|
|
2138
|
-
const response = await this.apiClient.sendRequest<
|
|
2139
|
-
|
|
2140
|
-
|
|
2167
|
+
const response = await this.apiClient.sendRequest<ExportUserResponse>(
|
|
2168
|
+
'GET',
|
|
2169
|
+
'/api/v2/users/{user_id}/export',
|
|
2170
|
+
pathParams,
|
|
2171
|
+
undefined,
|
|
2172
|
+
);
|
|
2141
2173
|
|
|
2142
|
-
decoders['ExportUserResponse']?.(response
|
|
2174
|
+
decoders['ExportUserResponse']?.(response);
|
|
2143
2175
|
|
|
2144
|
-
return
|
|
2176
|
+
return response;
|
|
2145
2177
|
}
|
|
2146
2178
|
|
|
2147
2179
|
async reactivateUser(
|
|
@@ -2156,19 +2188,16 @@ export class CommonApi {
|
|
|
2156
2188
|
restore_messages: request?.restore_messages,
|
|
2157
2189
|
};
|
|
2158
2190
|
|
|
2159
|
-
const response = await this.apiClient.sendRequest<
|
|
2160
|
-
StreamResponse<ReactivateUserResponse>
|
|
2161
|
-
>(
|
|
2191
|
+
const response = await this.apiClient.sendRequest<ReactivateUserResponse>(
|
|
2162
2192
|
'POST',
|
|
2163
2193
|
'/api/v2/users/{user_id}/reactivate',
|
|
2164
2194
|
pathParams,
|
|
2165
2195
|
undefined,
|
|
2166
2196
|
body,
|
|
2167
|
-
'application/json',
|
|
2168
2197
|
);
|
|
2169
2198
|
|
|
2170
|
-
decoders['ReactivateUserResponse']?.(response
|
|
2199
|
+
decoders['ReactivateUserResponse']?.(response);
|
|
2171
2200
|
|
|
2172
|
-
return
|
|
2201
|
+
return response;
|
|
2173
2202
|
}
|
|
2174
2203
|
}
|