@stream-io/node-sdk 0.8.8 → 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 +8 -0
- package/dist/index.cjs.js +1171 -2372
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.mjs +1171 -2372
- 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 +279 -8
- 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 +545 -517
- package/src/gen/feeds/FeedsApi.ts +799 -856
- package/src/gen/model-decoders/decoders.ts +29 -0
- package/src/gen/models/index.ts +293 -8
- package/src/gen/moderation/ModerationApi.ts +339 -408
- package/src/gen/video/VideoApi.ts +470 -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(
|
|
@@ -1032,13 +1059,17 @@ export class CommonApi {
|
|
|
1032
1059
|
user: request?.user,
|
|
1033
1060
|
};
|
|
1034
1061
|
|
|
1035
|
-
const response = await this.apiClient.sendRequest<
|
|
1036
|
-
|
|
1037
|
-
|
|
1062
|
+
const response = await this.apiClient.sendRequest<PollResponse>(
|
|
1063
|
+
'POST',
|
|
1064
|
+
'/api/v2/polls',
|
|
1065
|
+
undefined,
|
|
1066
|
+
undefined,
|
|
1067
|
+
body,
|
|
1068
|
+
);
|
|
1038
1069
|
|
|
1039
|
-
decoders['PollResponse']?.(response
|
|
1070
|
+
decoders['PollResponse']?.(response);
|
|
1040
1071
|
|
|
1041
|
-
return
|
|
1072
|
+
return response;
|
|
1042
1073
|
}
|
|
1043
1074
|
|
|
1044
1075
|
async updatePoll(
|
|
@@ -1060,13 +1091,17 @@ export class CommonApi {
|
|
|
1060
1091
|
user: request?.user,
|
|
1061
1092
|
};
|
|
1062
1093
|
|
|
1063
|
-
const response = await this.apiClient.sendRequest<
|
|
1064
|
-
|
|
1065
|
-
|
|
1094
|
+
const response = await this.apiClient.sendRequest<PollResponse>(
|
|
1095
|
+
'PUT',
|
|
1096
|
+
'/api/v2/polls',
|
|
1097
|
+
undefined,
|
|
1098
|
+
undefined,
|
|
1099
|
+
body,
|
|
1100
|
+
);
|
|
1066
1101
|
|
|
1067
|
-
decoders['PollResponse']?.(response
|
|
1102
|
+
decoders['PollResponse']?.(response);
|
|
1068
1103
|
|
|
1069
|
-
return
|
|
1104
|
+
return response;
|
|
1070
1105
|
}
|
|
1071
1106
|
|
|
1072
1107
|
async queryPolls(
|
|
@@ -1083,20 +1118,17 @@ export class CommonApi {
|
|
|
1083
1118
|
filter: request?.filter,
|
|
1084
1119
|
};
|
|
1085
1120
|
|
|
1086
|
-
const response = await this.apiClient.sendRequest<
|
|
1087
|
-
StreamResponse<QueryPollsResponse>
|
|
1088
|
-
>(
|
|
1121
|
+
const response = await this.apiClient.sendRequest<QueryPollsResponse>(
|
|
1089
1122
|
'POST',
|
|
1090
1123
|
'/api/v2/polls/query',
|
|
1091
1124
|
undefined,
|
|
1092
1125
|
queryParams,
|
|
1093
1126
|
body,
|
|
1094
|
-
'application/json',
|
|
1095
1127
|
);
|
|
1096
1128
|
|
|
1097
|
-
decoders['QueryPollsResponse']?.(response
|
|
1129
|
+
decoders['QueryPollsResponse']?.(response);
|
|
1098
1130
|
|
|
1099
|
-
return
|
|
1131
|
+
return response;
|
|
1100
1132
|
}
|
|
1101
1133
|
|
|
1102
1134
|
async deletePoll(request: {
|
|
@@ -1110,16 +1142,16 @@ export class CommonApi {
|
|
|
1110
1142
|
poll_id: request?.poll_id,
|
|
1111
1143
|
};
|
|
1112
1144
|
|
|
1113
|
-
const response = await this.apiClient.sendRequest<
|
|
1145
|
+
const response = await this.apiClient.sendRequest<Response>(
|
|
1114
1146
|
'DELETE',
|
|
1115
1147
|
'/api/v2/polls/{poll_id}',
|
|
1116
1148
|
pathParams,
|
|
1117
1149
|
queryParams,
|
|
1118
1150
|
);
|
|
1119
1151
|
|
|
1120
|
-
decoders['Response']?.(response
|
|
1152
|
+
decoders['Response']?.(response);
|
|
1121
1153
|
|
|
1122
|
-
return
|
|
1154
|
+
return response;
|
|
1123
1155
|
}
|
|
1124
1156
|
|
|
1125
1157
|
async getPoll(request: {
|
|
@@ -1133,13 +1165,16 @@ export class CommonApi {
|
|
|
1133
1165
|
poll_id: request?.poll_id,
|
|
1134
1166
|
};
|
|
1135
1167
|
|
|
1136
|
-
const response = await this.apiClient.sendRequest<
|
|
1137
|
-
|
|
1138
|
-
|
|
1168
|
+
const response = await this.apiClient.sendRequest<PollResponse>(
|
|
1169
|
+
'GET',
|
|
1170
|
+
'/api/v2/polls/{poll_id}',
|
|
1171
|
+
pathParams,
|
|
1172
|
+
queryParams,
|
|
1173
|
+
);
|
|
1139
1174
|
|
|
1140
|
-
decoders['PollResponse']?.(response
|
|
1175
|
+
decoders['PollResponse']?.(response);
|
|
1141
1176
|
|
|
1142
|
-
return
|
|
1177
|
+
return response;
|
|
1143
1178
|
}
|
|
1144
1179
|
|
|
1145
1180
|
async updatePollPartial(
|
|
@@ -1155,20 +1190,17 @@ export class CommonApi {
|
|
|
1155
1190
|
user: request?.user,
|
|
1156
1191
|
};
|
|
1157
1192
|
|
|
1158
|
-
const response = await this.apiClient.sendRequest<
|
|
1159
|
-
StreamResponse<PollResponse>
|
|
1160
|
-
>(
|
|
1193
|
+
const response = await this.apiClient.sendRequest<PollResponse>(
|
|
1161
1194
|
'PATCH',
|
|
1162
1195
|
'/api/v2/polls/{poll_id}',
|
|
1163
1196
|
pathParams,
|
|
1164
1197
|
undefined,
|
|
1165
1198
|
body,
|
|
1166
|
-
'application/json',
|
|
1167
1199
|
);
|
|
1168
1200
|
|
|
1169
|
-
decoders['PollResponse']?.(response
|
|
1201
|
+
decoders['PollResponse']?.(response);
|
|
1170
1202
|
|
|
1171
|
-
return
|
|
1203
|
+
return response;
|
|
1172
1204
|
}
|
|
1173
1205
|
|
|
1174
1206
|
async createPollOption(
|
|
@@ -1184,20 +1216,17 @@ export class CommonApi {
|
|
|
1184
1216
|
user: request?.user,
|
|
1185
1217
|
};
|
|
1186
1218
|
|
|
1187
|
-
const response = await this.apiClient.sendRequest<
|
|
1188
|
-
StreamResponse<PollOptionResponse>
|
|
1189
|
-
>(
|
|
1219
|
+
const response = await this.apiClient.sendRequest<PollOptionResponse>(
|
|
1190
1220
|
'POST',
|
|
1191
1221
|
'/api/v2/polls/{poll_id}/options',
|
|
1192
1222
|
pathParams,
|
|
1193
1223
|
undefined,
|
|
1194
1224
|
body,
|
|
1195
|
-
'application/json',
|
|
1196
1225
|
);
|
|
1197
1226
|
|
|
1198
|
-
decoders['PollOptionResponse']?.(response
|
|
1227
|
+
decoders['PollOptionResponse']?.(response);
|
|
1199
1228
|
|
|
1200
|
-
return
|
|
1229
|
+
return response;
|
|
1201
1230
|
}
|
|
1202
1231
|
|
|
1203
1232
|
async updatePollOption(
|
|
@@ -1214,20 +1243,17 @@ export class CommonApi {
|
|
|
1214
1243
|
user: request?.user,
|
|
1215
1244
|
};
|
|
1216
1245
|
|
|
1217
|
-
const response = await this.apiClient.sendRequest<
|
|
1218
|
-
StreamResponse<PollOptionResponse>
|
|
1219
|
-
>(
|
|
1246
|
+
const response = await this.apiClient.sendRequest<PollOptionResponse>(
|
|
1220
1247
|
'PUT',
|
|
1221
1248
|
'/api/v2/polls/{poll_id}/options',
|
|
1222
1249
|
pathParams,
|
|
1223
1250
|
undefined,
|
|
1224
1251
|
body,
|
|
1225
|
-
'application/json',
|
|
1226
1252
|
);
|
|
1227
1253
|
|
|
1228
|
-
decoders['PollOptionResponse']?.(response
|
|
1254
|
+
decoders['PollOptionResponse']?.(response);
|
|
1229
1255
|
|
|
1230
|
-
return
|
|
1256
|
+
return response;
|
|
1231
1257
|
}
|
|
1232
1258
|
|
|
1233
1259
|
async deletePollOption(request: {
|
|
@@ -1243,16 +1269,16 @@ export class CommonApi {
|
|
|
1243
1269
|
option_id: request?.option_id,
|
|
1244
1270
|
};
|
|
1245
1271
|
|
|
1246
|
-
const response = await this.apiClient.sendRequest<
|
|
1272
|
+
const response = await this.apiClient.sendRequest<Response>(
|
|
1247
1273
|
'DELETE',
|
|
1248
1274
|
'/api/v2/polls/{poll_id}/options/{option_id}',
|
|
1249
1275
|
pathParams,
|
|
1250
1276
|
queryParams,
|
|
1251
1277
|
);
|
|
1252
1278
|
|
|
1253
|
-
decoders['Response']?.(response
|
|
1279
|
+
decoders['Response']?.(response);
|
|
1254
1280
|
|
|
1255
|
-
return
|
|
1281
|
+
return response;
|
|
1256
1282
|
}
|
|
1257
1283
|
|
|
1258
1284
|
async getPollOption(request: {
|
|
@@ -1268,18 +1294,16 @@ export class CommonApi {
|
|
|
1268
1294
|
option_id: request?.option_id,
|
|
1269
1295
|
};
|
|
1270
1296
|
|
|
1271
|
-
const response = await this.apiClient.sendRequest<
|
|
1272
|
-
StreamResponse<PollOptionResponse>
|
|
1273
|
-
>(
|
|
1297
|
+
const response = await this.apiClient.sendRequest<PollOptionResponse>(
|
|
1274
1298
|
'GET',
|
|
1275
1299
|
'/api/v2/polls/{poll_id}/options/{option_id}',
|
|
1276
1300
|
pathParams,
|
|
1277
1301
|
queryParams,
|
|
1278
1302
|
);
|
|
1279
1303
|
|
|
1280
|
-
decoders['PollOptionResponse']?.(response
|
|
1304
|
+
decoders['PollOptionResponse']?.(response);
|
|
1281
1305
|
|
|
1282
|
-
return
|
|
1306
|
+
return response;
|
|
1283
1307
|
}
|
|
1284
1308
|
|
|
1285
1309
|
async queryPollVotes(
|
|
@@ -1299,20 +1323,17 @@ export class CommonApi {
|
|
|
1299
1323
|
filter: request?.filter,
|
|
1300
1324
|
};
|
|
1301
1325
|
|
|
1302
|
-
const response = await this.apiClient.sendRequest<
|
|
1303
|
-
StreamResponse<PollVotesResponse>
|
|
1304
|
-
>(
|
|
1326
|
+
const response = await this.apiClient.sendRequest<PollVotesResponse>(
|
|
1305
1327
|
'POST',
|
|
1306
1328
|
'/api/v2/polls/{poll_id}/votes',
|
|
1307
1329
|
pathParams,
|
|
1308
1330
|
queryParams,
|
|
1309
1331
|
body,
|
|
1310
|
-
'application/json',
|
|
1311
1332
|
);
|
|
1312
1333
|
|
|
1313
|
-
decoders['PollVotesResponse']?.(response
|
|
1334
|
+
decoders['PollVotesResponse']?.(response);
|
|
1314
1335
|
|
|
1315
|
-
return
|
|
1336
|
+
return response;
|
|
1316
1337
|
}
|
|
1317
1338
|
|
|
1318
1339
|
async updatePushNotificationPreferences(
|
|
@@ -1322,32 +1343,34 @@ export class CommonApi {
|
|
|
1322
1343
|
preferences: request?.preferences,
|
|
1323
1344
|
};
|
|
1324
1345
|
|
|
1325
|
-
const response =
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
'application/json',
|
|
1334
|
-
);
|
|
1346
|
+
const response =
|
|
1347
|
+
await this.apiClient.sendRequest<UpsertPushPreferencesResponse>(
|
|
1348
|
+
'POST',
|
|
1349
|
+
'/api/v2/push_preferences',
|
|
1350
|
+
undefined,
|
|
1351
|
+
undefined,
|
|
1352
|
+
body,
|
|
1353
|
+
);
|
|
1335
1354
|
|
|
1336
|
-
decoders['UpsertPushPreferencesResponse']?.(response
|
|
1355
|
+
decoders['UpsertPushPreferencesResponse']?.(response);
|
|
1337
1356
|
|
|
1338
|
-
return
|
|
1357
|
+
return response;
|
|
1339
1358
|
}
|
|
1340
1359
|
|
|
1341
1360
|
async listPushProviders(): Promise<
|
|
1342
1361
|
StreamResponse<ListPushProvidersResponse>
|
|
1343
1362
|
> {
|
|
1344
|
-
const response =
|
|
1345
|
-
|
|
1346
|
-
|
|
1363
|
+
const response =
|
|
1364
|
+
await this.apiClient.sendRequest<ListPushProvidersResponse>(
|
|
1365
|
+
'GET',
|
|
1366
|
+
'/api/v2/push_providers',
|
|
1367
|
+
undefined,
|
|
1368
|
+
undefined,
|
|
1369
|
+
);
|
|
1347
1370
|
|
|
1348
|
-
decoders['ListPushProvidersResponse']?.(response
|
|
1371
|
+
decoders['ListPushProvidersResponse']?.(response);
|
|
1349
1372
|
|
|
1350
|
-
return
|
|
1373
|
+
return response;
|
|
1351
1374
|
}
|
|
1352
1375
|
|
|
1353
1376
|
async upsertPushProvider(
|
|
@@ -1357,20 +1380,18 @@ export class CommonApi {
|
|
|
1357
1380
|
push_provider: request?.push_provider,
|
|
1358
1381
|
};
|
|
1359
1382
|
|
|
1360
|
-
const response =
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
'application/json',
|
|
1369
|
-
);
|
|
1383
|
+
const response =
|
|
1384
|
+
await this.apiClient.sendRequest<UpsertPushProviderResponse>(
|
|
1385
|
+
'POST',
|
|
1386
|
+
'/api/v2/push_providers',
|
|
1387
|
+
undefined,
|
|
1388
|
+
undefined,
|
|
1389
|
+
body,
|
|
1390
|
+
);
|
|
1370
1391
|
|
|
1371
|
-
decoders['UpsertPushProviderResponse']?.(response
|
|
1392
|
+
decoders['UpsertPushProviderResponse']?.(response);
|
|
1372
1393
|
|
|
1373
|
-
return
|
|
1394
|
+
return response;
|
|
1374
1395
|
}
|
|
1375
1396
|
|
|
1376
1397
|
async deletePushProvider(request: {
|
|
@@ -1382,16 +1403,16 @@ export class CommonApi {
|
|
|
1382
1403
|
name: request?.name,
|
|
1383
1404
|
};
|
|
1384
1405
|
|
|
1385
|
-
const response = await this.apiClient.sendRequest<
|
|
1406
|
+
const response = await this.apiClient.sendRequest<Response>(
|
|
1386
1407
|
'DELETE',
|
|
1387
1408
|
'/api/v2/push_providers/{type}/{name}',
|
|
1388
1409
|
pathParams,
|
|
1389
1410
|
undefined,
|
|
1390
1411
|
);
|
|
1391
1412
|
|
|
1392
|
-
decoders['Response']?.(response
|
|
1413
|
+
decoders['Response']?.(response);
|
|
1393
1414
|
|
|
1394
|
-
return
|
|
1415
|
+
return response;
|
|
1395
1416
|
}
|
|
1396
1417
|
|
|
1397
1418
|
async getPushTemplates(request: {
|
|
@@ -1403,13 +1424,16 @@ export class CommonApi {
|
|
|
1403
1424
|
push_provider_name: request?.push_provider_name,
|
|
1404
1425
|
};
|
|
1405
1426
|
|
|
1406
|
-
const response = await this.apiClient.sendRequest<
|
|
1407
|
-
|
|
1408
|
-
|
|
1427
|
+
const response = await this.apiClient.sendRequest<GetPushTemplatesResponse>(
|
|
1428
|
+
'GET',
|
|
1429
|
+
'/api/v2/push_templates',
|
|
1430
|
+
undefined,
|
|
1431
|
+
queryParams,
|
|
1432
|
+
);
|
|
1409
1433
|
|
|
1410
|
-
decoders['GetPushTemplatesResponse']?.(response
|
|
1434
|
+
decoders['GetPushTemplatesResponse']?.(response);
|
|
1411
1435
|
|
|
1412
|
-
return
|
|
1436
|
+
return response;
|
|
1413
1437
|
}
|
|
1414
1438
|
|
|
1415
1439
|
async upsertPushTemplate(
|
|
@@ -1423,20 +1447,18 @@ export class CommonApi {
|
|
|
1423
1447
|
template: request?.template,
|
|
1424
1448
|
};
|
|
1425
1449
|
|
|
1426
|
-
const response =
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
'application/json',
|
|
1435
|
-
);
|
|
1450
|
+
const response =
|
|
1451
|
+
await this.apiClient.sendRequest<UpsertPushTemplateResponse>(
|
|
1452
|
+
'POST',
|
|
1453
|
+
'/api/v2/push_templates',
|
|
1454
|
+
undefined,
|
|
1455
|
+
undefined,
|
|
1456
|
+
body,
|
|
1457
|
+
);
|
|
1436
1458
|
|
|
1437
|
-
decoders['UpsertPushTemplateResponse']?.(response
|
|
1459
|
+
decoders['UpsertPushTemplateResponse']?.(response);
|
|
1438
1460
|
|
|
1439
|
-
return
|
|
1461
|
+
return response;
|
|
1440
1462
|
}
|
|
1441
1463
|
|
|
1442
1464
|
async getRateLimits(request?: {
|
|
@@ -1460,23 +1482,29 @@ export class CommonApi {
|
|
|
1460
1482
|
endpoints: request?.endpoints,
|
|
1461
1483
|
};
|
|
1462
1484
|
|
|
1463
|
-
const response = await this.apiClient.sendRequest<
|
|
1464
|
-
|
|
1465
|
-
|
|
1485
|
+
const response = await this.apiClient.sendRequest<GetRateLimitsResponse>(
|
|
1486
|
+
'GET',
|
|
1487
|
+
'/api/v2/rate_limits',
|
|
1488
|
+
undefined,
|
|
1489
|
+
queryParams,
|
|
1490
|
+
);
|
|
1466
1491
|
|
|
1467
|
-
decoders['GetRateLimitsResponse']?.(response
|
|
1492
|
+
decoders['GetRateLimitsResponse']?.(response);
|
|
1468
1493
|
|
|
1469
|
-
return
|
|
1494
|
+
return response;
|
|
1470
1495
|
}
|
|
1471
1496
|
|
|
1472
1497
|
async listRoles(): Promise<StreamResponse<ListRolesResponse>> {
|
|
1473
|
-
const response = await this.apiClient.sendRequest<
|
|
1474
|
-
|
|
1475
|
-
|
|
1498
|
+
const response = await this.apiClient.sendRequest<ListRolesResponse>(
|
|
1499
|
+
'GET',
|
|
1500
|
+
'/api/v2/roles',
|
|
1501
|
+
undefined,
|
|
1502
|
+
undefined,
|
|
1503
|
+
);
|
|
1476
1504
|
|
|
1477
|
-
decoders['ListRolesResponse']?.(response
|
|
1505
|
+
decoders['ListRolesResponse']?.(response);
|
|
1478
1506
|
|
|
1479
|
-
return
|
|
1507
|
+
return response;
|
|
1480
1508
|
}
|
|
1481
1509
|
|
|
1482
1510
|
async createRole(
|
|
@@ -1486,13 +1514,17 @@ export class CommonApi {
|
|
|
1486
1514
|
name: request?.name,
|
|
1487
1515
|
};
|
|
1488
1516
|
|
|
1489
|
-
const response = await this.apiClient.sendRequest<
|
|
1490
|
-
|
|
1491
|
-
|
|
1517
|
+
const response = await this.apiClient.sendRequest<CreateRoleResponse>(
|
|
1518
|
+
'POST',
|
|
1519
|
+
'/api/v2/roles',
|
|
1520
|
+
undefined,
|
|
1521
|
+
undefined,
|
|
1522
|
+
body,
|
|
1523
|
+
);
|
|
1492
1524
|
|
|
1493
|
-
decoders['CreateRoleResponse']?.(response
|
|
1525
|
+
decoders['CreateRoleResponse']?.(response);
|
|
1494
1526
|
|
|
1495
|
-
return
|
|
1527
|
+
return response;
|
|
1496
1528
|
}
|
|
1497
1529
|
|
|
1498
1530
|
async searchRoles(request: {
|
|
@@ -1510,13 +1542,16 @@ export class CommonApi {
|
|
|
1510
1542
|
include_global_roles: request?.include_global_roles,
|
|
1511
1543
|
};
|
|
1512
1544
|
|
|
1513
|
-
const response = await this.apiClient.sendRequest<
|
|
1514
|
-
|
|
1515
|
-
|
|
1545
|
+
const response = await this.apiClient.sendRequest<SearchRolesResponse>(
|
|
1546
|
+
'GET',
|
|
1547
|
+
'/api/v2/roles/search',
|
|
1548
|
+
undefined,
|
|
1549
|
+
queryParams,
|
|
1550
|
+
);
|
|
1516
1551
|
|
|
1517
|
-
decoders['SearchRolesResponse']?.(response
|
|
1552
|
+
decoders['SearchRolesResponse']?.(response);
|
|
1518
1553
|
|
|
1519
|
-
return
|
|
1554
|
+
return response;
|
|
1520
1555
|
}
|
|
1521
1556
|
|
|
1522
1557
|
async deleteRole(request: {
|
|
@@ -1526,16 +1561,16 @@ export class CommonApi {
|
|
|
1526
1561
|
name: request?.name,
|
|
1527
1562
|
};
|
|
1528
1563
|
|
|
1529
|
-
const response = await this.apiClient.sendRequest<
|
|
1564
|
+
const response = await this.apiClient.sendRequest<Response>(
|
|
1530
1565
|
'DELETE',
|
|
1531
1566
|
'/api/v2/roles/{name}',
|
|
1532
1567
|
pathParams,
|
|
1533
1568
|
undefined,
|
|
1534
1569
|
);
|
|
1535
1570
|
|
|
1536
|
-
decoders['Response']?.(response
|
|
1571
|
+
decoders['Response']?.(response);
|
|
1537
1572
|
|
|
1538
|
-
return
|
|
1573
|
+
return response;
|
|
1539
1574
|
}
|
|
1540
1575
|
|
|
1541
1576
|
async getTask(request: {
|
|
@@ -1545,13 +1580,16 @@ export class CommonApi {
|
|
|
1545
1580
|
id: request?.id,
|
|
1546
1581
|
};
|
|
1547
1582
|
|
|
1548
|
-
const response = await this.apiClient.sendRequest<
|
|
1549
|
-
|
|
1550
|
-
|
|
1583
|
+
const response = await this.apiClient.sendRequest<GetTaskResponse>(
|
|
1584
|
+
'GET',
|
|
1585
|
+
'/api/v2/tasks/{id}',
|
|
1586
|
+
pathParams,
|
|
1587
|
+
undefined,
|
|
1588
|
+
);
|
|
1551
1589
|
|
|
1552
|
-
decoders['GetTaskResponse']?.(response
|
|
1590
|
+
decoders['GetTaskResponse']?.(response);
|
|
1553
1591
|
|
|
1554
|
-
return
|
|
1592
|
+
return response;
|
|
1555
1593
|
}
|
|
1556
1594
|
|
|
1557
1595
|
async deleteFile(request?: {
|
|
@@ -1561,16 +1599,16 @@ export class CommonApi {
|
|
|
1561
1599
|
url: request?.url,
|
|
1562
1600
|
};
|
|
1563
1601
|
|
|
1564
|
-
const response = await this.apiClient.sendRequest<
|
|
1602
|
+
const response = await this.apiClient.sendRequest<Response>(
|
|
1565
1603
|
'DELETE',
|
|
1566
1604
|
'/api/v2/uploads/file',
|
|
1567
1605
|
undefined,
|
|
1568
1606
|
queryParams,
|
|
1569
1607
|
);
|
|
1570
1608
|
|
|
1571
|
-
decoders['Response']?.(response
|
|
1609
|
+
decoders['Response']?.(response);
|
|
1572
1610
|
|
|
1573
|
-
return
|
|
1611
|
+
return response;
|
|
1574
1612
|
}
|
|
1575
1613
|
|
|
1576
1614
|
async uploadFile(
|
|
@@ -1581,9 +1619,7 @@ export class CommonApi {
|
|
|
1581
1619
|
user: request?.user,
|
|
1582
1620
|
};
|
|
1583
1621
|
|
|
1584
|
-
const response = await this.apiClient.sendRequest<
|
|
1585
|
-
StreamResponse<FileUploadResponse>
|
|
1586
|
-
>(
|
|
1622
|
+
const response = await this.apiClient.sendRequest<FileUploadResponse>(
|
|
1587
1623
|
'POST',
|
|
1588
1624
|
'/api/v2/uploads/file',
|
|
1589
1625
|
undefined,
|
|
@@ -1592,9 +1628,9 @@ export class CommonApi {
|
|
|
1592
1628
|
'multipart/form-data',
|
|
1593
1629
|
);
|
|
1594
1630
|
|
|
1595
|
-
decoders['FileUploadResponse']?.(response
|
|
1631
|
+
decoders['FileUploadResponse']?.(response);
|
|
1596
1632
|
|
|
1597
|
-
return
|
|
1633
|
+
return response;
|
|
1598
1634
|
}
|
|
1599
1635
|
|
|
1600
1636
|
async deleteImage(request?: {
|
|
@@ -1604,16 +1640,16 @@ export class CommonApi {
|
|
|
1604
1640
|
url: request?.url,
|
|
1605
1641
|
};
|
|
1606
1642
|
|
|
1607
|
-
const response = await this.apiClient.sendRequest<
|
|
1643
|
+
const response = await this.apiClient.sendRequest<Response>(
|
|
1608
1644
|
'DELETE',
|
|
1609
1645
|
'/api/v2/uploads/image',
|
|
1610
1646
|
undefined,
|
|
1611
1647
|
queryParams,
|
|
1612
1648
|
);
|
|
1613
1649
|
|
|
1614
|
-
decoders['Response']?.(response
|
|
1650
|
+
decoders['Response']?.(response);
|
|
1615
1651
|
|
|
1616
|
-
return
|
|
1652
|
+
return response;
|
|
1617
1653
|
}
|
|
1618
1654
|
|
|
1619
1655
|
async uploadImage(
|
|
@@ -1625,9 +1661,7 @@ export class CommonApi {
|
|
|
1625
1661
|
user: request?.user,
|
|
1626
1662
|
};
|
|
1627
1663
|
|
|
1628
|
-
const response = await this.apiClient.sendRequest<
|
|
1629
|
-
StreamResponse<ImageUploadResponse>
|
|
1630
|
-
>(
|
|
1664
|
+
const response = await this.apiClient.sendRequest<ImageUploadResponse>(
|
|
1631
1665
|
'POST',
|
|
1632
1666
|
'/api/v2/uploads/image',
|
|
1633
1667
|
undefined,
|
|
@@ -1636,9 +1670,9 @@ export class CommonApi {
|
|
|
1636
1670
|
'multipart/form-data',
|
|
1637
1671
|
);
|
|
1638
1672
|
|
|
1639
|
-
decoders['ImageUploadResponse']?.(response
|
|
1673
|
+
decoders['ImageUploadResponse']?.(response);
|
|
1640
1674
|
|
|
1641
|
-
return
|
|
1675
|
+
return response;
|
|
1642
1676
|
}
|
|
1643
1677
|
|
|
1644
1678
|
async listUserGroups(request?: {
|
|
@@ -1654,13 +1688,16 @@ export class CommonApi {
|
|
|
1654
1688
|
team_id: request?.team_id,
|
|
1655
1689
|
};
|
|
1656
1690
|
|
|
1657
|
-
const response = await this.apiClient.sendRequest<
|
|
1658
|
-
|
|
1659
|
-
|
|
1691
|
+
const response = await this.apiClient.sendRequest<ListUserGroupsResponse>(
|
|
1692
|
+
'GET',
|
|
1693
|
+
'/api/v2/usergroups',
|
|
1694
|
+
undefined,
|
|
1695
|
+
queryParams,
|
|
1696
|
+
);
|
|
1660
1697
|
|
|
1661
|
-
decoders['ListUserGroupsResponse']?.(response
|
|
1698
|
+
decoders['ListUserGroupsResponse']?.(response);
|
|
1662
1699
|
|
|
1663
|
-
return
|
|
1700
|
+
return response;
|
|
1664
1701
|
}
|
|
1665
1702
|
|
|
1666
1703
|
async createUserGroup(
|
|
@@ -1674,20 +1711,17 @@ export class CommonApi {
|
|
|
1674
1711
|
member_ids: request?.member_ids,
|
|
1675
1712
|
};
|
|
1676
1713
|
|
|
1677
|
-
const response = await this.apiClient.sendRequest<
|
|
1678
|
-
StreamResponse<CreateUserGroupResponse>
|
|
1679
|
-
>(
|
|
1714
|
+
const response = await this.apiClient.sendRequest<CreateUserGroupResponse>(
|
|
1680
1715
|
'POST',
|
|
1681
1716
|
'/api/v2/usergroups',
|
|
1682
1717
|
undefined,
|
|
1683
1718
|
undefined,
|
|
1684
1719
|
body,
|
|
1685
|
-
'application/json',
|
|
1686
1720
|
);
|
|
1687
1721
|
|
|
1688
|
-
decoders['CreateUserGroupResponse']?.(response
|
|
1722
|
+
decoders['CreateUserGroupResponse']?.(response);
|
|
1689
1723
|
|
|
1690
|
-
return
|
|
1724
|
+
return response;
|
|
1691
1725
|
}
|
|
1692
1726
|
|
|
1693
1727
|
async searchUserGroups(request: {
|
|
@@ -1705,13 +1739,16 @@ export class CommonApi {
|
|
|
1705
1739
|
team_id: request?.team_id,
|
|
1706
1740
|
};
|
|
1707
1741
|
|
|
1708
|
-
const response = await this.apiClient.sendRequest<
|
|
1709
|
-
|
|
1710
|
-
|
|
1742
|
+
const response = await this.apiClient.sendRequest<SearchUserGroupsResponse>(
|
|
1743
|
+
'GET',
|
|
1744
|
+
'/api/v2/usergroups/search',
|
|
1745
|
+
undefined,
|
|
1746
|
+
queryParams,
|
|
1747
|
+
);
|
|
1711
1748
|
|
|
1712
|
-
decoders['SearchUserGroupsResponse']?.(response
|
|
1749
|
+
decoders['SearchUserGroupsResponse']?.(response);
|
|
1713
1750
|
|
|
1714
|
-
return
|
|
1751
|
+
return response;
|
|
1715
1752
|
}
|
|
1716
1753
|
|
|
1717
1754
|
async deleteUserGroup(request: {
|
|
@@ -1725,16 +1762,16 @@ export class CommonApi {
|
|
|
1725
1762
|
id: request?.id,
|
|
1726
1763
|
};
|
|
1727
1764
|
|
|
1728
|
-
const response = await this.apiClient.sendRequest<
|
|
1765
|
+
const response = await this.apiClient.sendRequest<Response>(
|
|
1729
1766
|
'DELETE',
|
|
1730
1767
|
'/api/v2/usergroups/{id}',
|
|
1731
1768
|
pathParams,
|
|
1732
1769
|
queryParams,
|
|
1733
1770
|
);
|
|
1734
1771
|
|
|
1735
|
-
decoders['Response']?.(response
|
|
1772
|
+
decoders['Response']?.(response);
|
|
1736
1773
|
|
|
1737
|
-
return
|
|
1774
|
+
return response;
|
|
1738
1775
|
}
|
|
1739
1776
|
|
|
1740
1777
|
async getUserGroup(request: {
|
|
@@ -1748,13 +1785,16 @@ export class CommonApi {
|
|
|
1748
1785
|
id: request?.id,
|
|
1749
1786
|
};
|
|
1750
1787
|
|
|
1751
|
-
const response = await this.apiClient.sendRequest<
|
|
1752
|
-
|
|
1753
|
-
|
|
1788
|
+
const response = await this.apiClient.sendRequest<GetUserGroupResponse>(
|
|
1789
|
+
'GET',
|
|
1790
|
+
'/api/v2/usergroups/{id}',
|
|
1791
|
+
pathParams,
|
|
1792
|
+
queryParams,
|
|
1793
|
+
);
|
|
1754
1794
|
|
|
1755
|
-
decoders['GetUserGroupResponse']?.(response
|
|
1795
|
+
decoders['GetUserGroupResponse']?.(response);
|
|
1756
1796
|
|
|
1757
|
-
return
|
|
1797
|
+
return response;
|
|
1758
1798
|
}
|
|
1759
1799
|
|
|
1760
1800
|
async updateUserGroup(
|
|
@@ -1769,20 +1809,17 @@ export class CommonApi {
|
|
|
1769
1809
|
team_id: request?.team_id,
|
|
1770
1810
|
};
|
|
1771
1811
|
|
|
1772
|
-
const response = await this.apiClient.sendRequest<
|
|
1773
|
-
StreamResponse<UpdateUserGroupResponse>
|
|
1774
|
-
>(
|
|
1812
|
+
const response = await this.apiClient.sendRequest<UpdateUserGroupResponse>(
|
|
1775
1813
|
'PUT',
|
|
1776
1814
|
'/api/v2/usergroups/{id}',
|
|
1777
1815
|
pathParams,
|
|
1778
1816
|
undefined,
|
|
1779
1817
|
body,
|
|
1780
|
-
'application/json',
|
|
1781
1818
|
);
|
|
1782
1819
|
|
|
1783
|
-
decoders['UpdateUserGroupResponse']?.(response
|
|
1820
|
+
decoders['UpdateUserGroupResponse']?.(response);
|
|
1784
1821
|
|
|
1785
|
-
return
|
|
1822
|
+
return response;
|
|
1786
1823
|
}
|
|
1787
1824
|
|
|
1788
1825
|
async addUserGroupMembers(
|
|
@@ -1797,20 +1834,18 @@ export class CommonApi {
|
|
|
1797
1834
|
team_id: request?.team_id,
|
|
1798
1835
|
};
|
|
1799
1836
|
|
|
1800
|
-
const response =
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
|
|
1806
|
-
|
|
1807
|
-
|
|
1808
|
-
'application/json',
|
|
1809
|
-
);
|
|
1837
|
+
const response =
|
|
1838
|
+
await this.apiClient.sendRequest<AddUserGroupMembersResponse>(
|
|
1839
|
+
'POST',
|
|
1840
|
+
'/api/v2/usergroups/{id}/members',
|
|
1841
|
+
pathParams,
|
|
1842
|
+
undefined,
|
|
1843
|
+
body,
|
|
1844
|
+
);
|
|
1810
1845
|
|
|
1811
|
-
decoders['AddUserGroupMembersResponse']?.(response
|
|
1846
|
+
decoders['AddUserGroupMembersResponse']?.(response);
|
|
1812
1847
|
|
|
1813
|
-
return
|
|
1848
|
+
return response;
|
|
1814
1849
|
}
|
|
1815
1850
|
|
|
1816
1851
|
async removeUserGroupMembers(
|
|
@@ -1824,20 +1859,18 @@ export class CommonApi {
|
|
|
1824
1859
|
team_id: request?.team_id,
|
|
1825
1860
|
};
|
|
1826
1861
|
|
|
1827
|
-
const response =
|
|
1828
|
-
|
|
1829
|
-
|
|
1830
|
-
|
|
1831
|
-
|
|
1832
|
-
|
|
1833
|
-
|
|
1834
|
-
|
|
1835
|
-
'application/json',
|
|
1836
|
-
);
|
|
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
|
+
);
|
|
1837
1870
|
|
|
1838
|
-
decoders['RemoveUserGroupMembersResponse']?.(response
|
|
1871
|
+
decoders['RemoveUserGroupMembersResponse']?.(response);
|
|
1839
1872
|
|
|
1840
|
-
return
|
|
1873
|
+
return response;
|
|
1841
1874
|
}
|
|
1842
1875
|
|
|
1843
1876
|
async queryUsers(request?: {
|
|
@@ -1847,13 +1880,16 @@ export class CommonApi {
|
|
|
1847
1880
|
payload: request?.payload,
|
|
1848
1881
|
};
|
|
1849
1882
|
|
|
1850
|
-
const response = await this.apiClient.sendRequest<
|
|
1851
|
-
|
|
1852
|
-
|
|
1883
|
+
const response = await this.apiClient.sendRequest<QueryUsersResponse>(
|
|
1884
|
+
'GET',
|
|
1885
|
+
'/api/v2/users',
|
|
1886
|
+
undefined,
|
|
1887
|
+
queryParams,
|
|
1888
|
+
);
|
|
1853
1889
|
|
|
1854
|
-
decoders['QueryUsersResponse']?.(response
|
|
1890
|
+
decoders['QueryUsersResponse']?.(response);
|
|
1855
1891
|
|
|
1856
|
-
return
|
|
1892
|
+
return response;
|
|
1857
1893
|
}
|
|
1858
1894
|
|
|
1859
1895
|
async updateUsersPartial(
|
|
@@ -1863,13 +1899,17 @@ export class CommonApi {
|
|
|
1863
1899
|
users: request?.users,
|
|
1864
1900
|
};
|
|
1865
1901
|
|
|
1866
|
-
const response = await this.apiClient.sendRequest<
|
|
1867
|
-
|
|
1868
|
-
|
|
1902
|
+
const response = await this.apiClient.sendRequest<UpdateUsersResponse>(
|
|
1903
|
+
'PATCH',
|
|
1904
|
+
'/api/v2/users',
|
|
1905
|
+
undefined,
|
|
1906
|
+
undefined,
|
|
1907
|
+
body,
|
|
1908
|
+
);
|
|
1869
1909
|
|
|
1870
|
-
decoders['UpdateUsersResponse']?.(response
|
|
1910
|
+
decoders['UpdateUsersResponse']?.(response);
|
|
1871
1911
|
|
|
1872
|
-
return
|
|
1912
|
+
return response;
|
|
1873
1913
|
}
|
|
1874
1914
|
|
|
1875
1915
|
async updateUsers(
|
|
@@ -1879,13 +1919,17 @@ export class CommonApi {
|
|
|
1879
1919
|
users: request?.users,
|
|
1880
1920
|
};
|
|
1881
1921
|
|
|
1882
|
-
const response = await this.apiClient.sendRequest<
|
|
1883
|
-
|
|
1884
|
-
|
|
1922
|
+
const response = await this.apiClient.sendRequest<UpdateUsersResponse>(
|
|
1923
|
+
'POST',
|
|
1924
|
+
'/api/v2/users',
|
|
1925
|
+
undefined,
|
|
1926
|
+
undefined,
|
|
1927
|
+
body,
|
|
1928
|
+
);
|
|
1885
1929
|
|
|
1886
|
-
decoders['UpdateUsersResponse']?.(response
|
|
1930
|
+
decoders['UpdateUsersResponse']?.(response);
|
|
1887
1931
|
|
|
1888
|
-
return
|
|
1932
|
+
return response;
|
|
1889
1933
|
}
|
|
1890
1934
|
|
|
1891
1935
|
async getBlockedUsers(request?: {
|
|
@@ -1895,13 +1939,16 @@ export class CommonApi {
|
|
|
1895
1939
|
user_id: request?.user_id,
|
|
1896
1940
|
};
|
|
1897
1941
|
|
|
1898
|
-
const response = await this.apiClient.sendRequest<
|
|
1899
|
-
|
|
1900
|
-
|
|
1942
|
+
const response = await this.apiClient.sendRequest<GetBlockedUsersResponse>(
|
|
1943
|
+
'GET',
|
|
1944
|
+
'/api/v2/users/block',
|
|
1945
|
+
undefined,
|
|
1946
|
+
queryParams,
|
|
1947
|
+
);
|
|
1901
1948
|
|
|
1902
|
-
decoders['GetBlockedUsersResponse']?.(response
|
|
1949
|
+
decoders['GetBlockedUsersResponse']?.(response);
|
|
1903
1950
|
|
|
1904
|
-
return
|
|
1951
|
+
return response;
|
|
1905
1952
|
}
|
|
1906
1953
|
|
|
1907
1954
|
async blockUsers(
|
|
@@ -1913,20 +1960,17 @@ export class CommonApi {
|
|
|
1913
1960
|
user: request?.user,
|
|
1914
1961
|
};
|
|
1915
1962
|
|
|
1916
|
-
const response = await this.apiClient.sendRequest<
|
|
1917
|
-
StreamResponse<BlockUsersResponse>
|
|
1918
|
-
>(
|
|
1963
|
+
const response = await this.apiClient.sendRequest<BlockUsersResponse>(
|
|
1919
1964
|
'POST',
|
|
1920
1965
|
'/api/v2/users/block',
|
|
1921
1966
|
undefined,
|
|
1922
1967
|
undefined,
|
|
1923
1968
|
body,
|
|
1924
|
-
'application/json',
|
|
1925
1969
|
);
|
|
1926
1970
|
|
|
1927
|
-
decoders['BlockUsersResponse']?.(response
|
|
1971
|
+
decoders['BlockUsersResponse']?.(response);
|
|
1928
1972
|
|
|
1929
|
-
return
|
|
1973
|
+
return response;
|
|
1930
1974
|
}
|
|
1931
1975
|
|
|
1932
1976
|
async deactivateUsers(
|
|
@@ -1939,20 +1983,17 @@ export class CommonApi {
|
|
|
1939
1983
|
mark_messages_deleted: request?.mark_messages_deleted,
|
|
1940
1984
|
};
|
|
1941
1985
|
|
|
1942
|
-
const response = await this.apiClient.sendRequest<
|
|
1943
|
-
StreamResponse<DeactivateUsersResponse>
|
|
1944
|
-
>(
|
|
1986
|
+
const response = await this.apiClient.sendRequest<DeactivateUsersResponse>(
|
|
1945
1987
|
'POST',
|
|
1946
1988
|
'/api/v2/users/deactivate',
|
|
1947
1989
|
undefined,
|
|
1948
1990
|
undefined,
|
|
1949
1991
|
body,
|
|
1950
|
-
'application/json',
|
|
1951
1992
|
);
|
|
1952
1993
|
|
|
1953
|
-
decoders['DeactivateUsersResponse']?.(response
|
|
1994
|
+
decoders['DeactivateUsersResponse']?.(response);
|
|
1954
1995
|
|
|
1955
|
-
return
|
|
1996
|
+
return response;
|
|
1956
1997
|
}
|
|
1957
1998
|
|
|
1958
1999
|
async deleteUsers(
|
|
@@ -1969,20 +2010,17 @@ export class CommonApi {
|
|
|
1969
2010
|
user: request?.user,
|
|
1970
2011
|
};
|
|
1971
2012
|
|
|
1972
|
-
const response = await this.apiClient.sendRequest<
|
|
1973
|
-
StreamResponse<DeleteUsersResponse>
|
|
1974
|
-
>(
|
|
2013
|
+
const response = await this.apiClient.sendRequest<DeleteUsersResponse>(
|
|
1975
2014
|
'POST',
|
|
1976
2015
|
'/api/v2/users/delete',
|
|
1977
2016
|
undefined,
|
|
1978
2017
|
undefined,
|
|
1979
2018
|
body,
|
|
1980
|
-
'application/json',
|
|
1981
2019
|
);
|
|
1982
2020
|
|
|
1983
|
-
decoders['DeleteUsersResponse']?.(response
|
|
2021
|
+
decoders['DeleteUsersResponse']?.(response);
|
|
1984
2022
|
|
|
1985
|
-
return
|
|
2023
|
+
return response;
|
|
1986
2024
|
}
|
|
1987
2025
|
|
|
1988
2026
|
async getUserLiveLocations(request?: {
|
|
@@ -1992,13 +2030,16 @@ export class CommonApi {
|
|
|
1992
2030
|
user_id: request?.user_id,
|
|
1993
2031
|
};
|
|
1994
2032
|
|
|
1995
|
-
const response = await this.apiClient.sendRequest<
|
|
1996
|
-
|
|
1997
|
-
|
|
2033
|
+
const response = await this.apiClient.sendRequest<SharedLocationsResponse>(
|
|
2034
|
+
'GET',
|
|
2035
|
+
'/api/v2/users/live_locations',
|
|
2036
|
+
undefined,
|
|
2037
|
+
queryParams,
|
|
2038
|
+
);
|
|
1998
2039
|
|
|
1999
|
-
decoders['SharedLocationsResponse']?.(response
|
|
2040
|
+
decoders['SharedLocationsResponse']?.(response);
|
|
2000
2041
|
|
|
2001
|
-
return
|
|
2042
|
+
return response;
|
|
2002
2043
|
}
|
|
2003
2044
|
|
|
2004
2045
|
async updateLiveLocation(
|
|
@@ -2014,20 +2055,17 @@ export class CommonApi {
|
|
|
2014
2055
|
longitude: request?.longitude,
|
|
2015
2056
|
};
|
|
2016
2057
|
|
|
2017
|
-
const response = await this.apiClient.sendRequest<
|
|
2018
|
-
StreamResponse<SharedLocationResponse>
|
|
2019
|
-
>(
|
|
2058
|
+
const response = await this.apiClient.sendRequest<SharedLocationResponse>(
|
|
2020
2059
|
'PUT',
|
|
2021
2060
|
'/api/v2/users/live_locations',
|
|
2022
2061
|
undefined,
|
|
2023
2062
|
queryParams,
|
|
2024
2063
|
body,
|
|
2025
|
-
'application/json',
|
|
2026
2064
|
);
|
|
2027
2065
|
|
|
2028
|
-
decoders['SharedLocationResponse']?.(response
|
|
2066
|
+
decoders['SharedLocationResponse']?.(response);
|
|
2029
2067
|
|
|
2030
|
-
return
|
|
2068
|
+
return response;
|
|
2031
2069
|
}
|
|
2032
2070
|
|
|
2033
2071
|
async reactivateUsers(
|
|
@@ -2040,20 +2078,17 @@ export class CommonApi {
|
|
|
2040
2078
|
restore_messages: request?.restore_messages,
|
|
2041
2079
|
};
|
|
2042
2080
|
|
|
2043
|
-
const response = await this.apiClient.sendRequest<
|
|
2044
|
-
StreamResponse<ReactivateUsersResponse>
|
|
2045
|
-
>(
|
|
2081
|
+
const response = await this.apiClient.sendRequest<ReactivateUsersResponse>(
|
|
2046
2082
|
'POST',
|
|
2047
2083
|
'/api/v2/users/reactivate',
|
|
2048
2084
|
undefined,
|
|
2049
2085
|
undefined,
|
|
2050
2086
|
body,
|
|
2051
|
-
'application/json',
|
|
2052
2087
|
);
|
|
2053
2088
|
|
|
2054
|
-
decoders['ReactivateUsersResponse']?.(response
|
|
2089
|
+
decoders['ReactivateUsersResponse']?.(response);
|
|
2055
2090
|
|
|
2056
|
-
return
|
|
2091
|
+
return response;
|
|
2057
2092
|
}
|
|
2058
2093
|
|
|
2059
2094
|
async restoreUsers(
|
|
@@ -2063,18 +2098,17 @@ export class CommonApi {
|
|
|
2063
2098
|
user_ids: request?.user_ids,
|
|
2064
2099
|
};
|
|
2065
2100
|
|
|
2066
|
-
const response = await this.apiClient.sendRequest<
|
|
2101
|
+
const response = await this.apiClient.sendRequest<Response>(
|
|
2067
2102
|
'POST',
|
|
2068
2103
|
'/api/v2/users/restore',
|
|
2069
2104
|
undefined,
|
|
2070
2105
|
undefined,
|
|
2071
2106
|
body,
|
|
2072
|
-
'application/json',
|
|
2073
2107
|
);
|
|
2074
2108
|
|
|
2075
|
-
decoders['Response']?.(response
|
|
2109
|
+
decoders['Response']?.(response);
|
|
2076
2110
|
|
|
2077
|
-
return
|
|
2111
|
+
return response;
|
|
2078
2112
|
}
|
|
2079
2113
|
|
|
2080
2114
|
async unblockUsers(
|
|
@@ -2086,20 +2120,17 @@ export class CommonApi {
|
|
|
2086
2120
|
user: request?.user,
|
|
2087
2121
|
};
|
|
2088
2122
|
|
|
2089
|
-
const response = await this.apiClient.sendRequest<
|
|
2090
|
-
StreamResponse<UnblockUsersResponse>
|
|
2091
|
-
>(
|
|
2123
|
+
const response = await this.apiClient.sendRequest<UnblockUsersResponse>(
|
|
2092
2124
|
'POST',
|
|
2093
2125
|
'/api/v2/users/unblock',
|
|
2094
2126
|
undefined,
|
|
2095
2127
|
undefined,
|
|
2096
2128
|
body,
|
|
2097
|
-
'application/json',
|
|
2098
2129
|
);
|
|
2099
2130
|
|
|
2100
|
-
decoders['UnblockUsersResponse']?.(response
|
|
2131
|
+
decoders['UnblockUsersResponse']?.(response);
|
|
2101
2132
|
|
|
2102
|
-
return
|
|
2133
|
+
return response;
|
|
2103
2134
|
}
|
|
2104
2135
|
|
|
2105
2136
|
async deactivateUser(
|
|
@@ -2113,20 +2144,17 @@ export class CommonApi {
|
|
|
2113
2144
|
mark_messages_deleted: request?.mark_messages_deleted,
|
|
2114
2145
|
};
|
|
2115
2146
|
|
|
2116
|
-
const response = await this.apiClient.sendRequest<
|
|
2117
|
-
StreamResponse<DeactivateUserResponse>
|
|
2118
|
-
>(
|
|
2147
|
+
const response = await this.apiClient.sendRequest<DeactivateUserResponse>(
|
|
2119
2148
|
'POST',
|
|
2120
2149
|
'/api/v2/users/{user_id}/deactivate',
|
|
2121
2150
|
pathParams,
|
|
2122
2151
|
undefined,
|
|
2123
2152
|
body,
|
|
2124
|
-
'application/json',
|
|
2125
2153
|
);
|
|
2126
2154
|
|
|
2127
|
-
decoders['DeactivateUserResponse']?.(response
|
|
2155
|
+
decoders['DeactivateUserResponse']?.(response);
|
|
2128
2156
|
|
|
2129
|
-
return
|
|
2157
|
+
return response;
|
|
2130
2158
|
}
|
|
2131
2159
|
|
|
2132
2160
|
async exportUser(request: {
|
|
@@ -2136,13 +2164,16 @@ export class CommonApi {
|
|
|
2136
2164
|
user_id: request?.user_id,
|
|
2137
2165
|
};
|
|
2138
2166
|
|
|
2139
|
-
const response = await this.apiClient.sendRequest<
|
|
2140
|
-
|
|
2141
|
-
|
|
2167
|
+
const response = await this.apiClient.sendRequest<ExportUserResponse>(
|
|
2168
|
+
'GET',
|
|
2169
|
+
'/api/v2/users/{user_id}/export',
|
|
2170
|
+
pathParams,
|
|
2171
|
+
undefined,
|
|
2172
|
+
);
|
|
2142
2173
|
|
|
2143
|
-
decoders['ExportUserResponse']?.(response
|
|
2174
|
+
decoders['ExportUserResponse']?.(response);
|
|
2144
2175
|
|
|
2145
|
-
return
|
|
2176
|
+
return response;
|
|
2146
2177
|
}
|
|
2147
2178
|
|
|
2148
2179
|
async reactivateUser(
|
|
@@ -2157,19 +2188,16 @@ export class CommonApi {
|
|
|
2157
2188
|
restore_messages: request?.restore_messages,
|
|
2158
2189
|
};
|
|
2159
2190
|
|
|
2160
|
-
const response = await this.apiClient.sendRequest<
|
|
2161
|
-
StreamResponse<ReactivateUserResponse>
|
|
2162
|
-
>(
|
|
2191
|
+
const response = await this.apiClient.sendRequest<ReactivateUserResponse>(
|
|
2163
2192
|
'POST',
|
|
2164
2193
|
'/api/v2/users/{user_id}/reactivate',
|
|
2165
2194
|
pathParams,
|
|
2166
2195
|
undefined,
|
|
2167
2196
|
body,
|
|
2168
|
-
'application/json',
|
|
2169
2197
|
);
|
|
2170
2198
|
|
|
2171
|
-
decoders['ReactivateUserResponse']?.(response
|
|
2199
|
+
decoders['ReactivateUserResponse']?.(response);
|
|
2172
2200
|
|
|
2173
|
-
return
|
|
2201
|
+
return response;
|
|
2174
2202
|
}
|
|
2175
2203
|
}
|