@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.
@@ -106,13 +106,16 @@ export class ModerationApi {
106
106
  user_id: request?.user_id,
107
107
  };
108
108
 
109
- const response = await this.apiClient.sendRequest<
110
- StreamResponse<GetActionConfigResponse>
111
- >('GET', '/api/v2/moderation/action_config', undefined, queryParams);
109
+ const response = await this.apiClient.sendRequest<GetActionConfigResponse>(
110
+ 'GET',
111
+ '/api/v2/moderation/action_config',
112
+ undefined,
113
+ queryParams,
114
+ );
112
115
 
113
- decoders['GetActionConfigResponse']?.(response.body);
116
+ decoders['GetActionConfigResponse']?.(response);
114
117
 
115
- return { ...response.body, metadata: response.metadata };
118
+ return response;
116
119
  }
117
120
 
118
121
  async upsertActionConfig(
@@ -131,20 +134,18 @@ export class ModerationApi {
131
134
  user: request?.user,
132
135
  };
133
136
 
134
- const response = await this.apiClient.sendRequest<
135
- StreamResponse<UpsertActionConfigResponse>
136
- >(
137
- 'POST',
138
- '/api/v2/moderation/action_config',
139
- undefined,
140
- undefined,
141
- body,
142
- 'application/json',
143
- );
137
+ const response =
138
+ await this.apiClient.sendRequest<UpsertActionConfigResponse>(
139
+ 'POST',
140
+ '/api/v2/moderation/action_config',
141
+ undefined,
142
+ undefined,
143
+ body,
144
+ );
144
145
 
145
- decoders['UpsertActionConfigResponse']?.(response.body);
146
+ decoders['UpsertActionConfigResponse']?.(response);
146
147
 
147
- return { ...response.body, metadata: response.metadata };
148
+ return response;
148
149
  }
149
150
 
150
151
  async bulkUpsertActionConfig(
@@ -156,20 +157,18 @@ export class ModerationApi {
156
157
  user: request?.user,
157
158
  };
158
159
 
159
- const response = await this.apiClient.sendRequest<
160
- StreamResponse<BulkUpsertActionConfigResponse>
161
- >(
162
- 'POST',
163
- '/api/v2/moderation/action_config/bulk',
164
- undefined,
165
- undefined,
166
- body,
167
- 'application/json',
168
- );
160
+ const response =
161
+ await this.apiClient.sendRequest<BulkUpsertActionConfigResponse>(
162
+ 'POST',
163
+ '/api/v2/moderation/action_config/bulk',
164
+ undefined,
165
+ undefined,
166
+ body,
167
+ );
169
168
 
170
- decoders['BulkUpsertActionConfigResponse']?.(response.body);
169
+ decoders['BulkUpsertActionConfigResponse']?.(response);
171
170
 
172
- return { ...response.body, metadata: response.metadata };
171
+ return response;
173
172
  }
174
173
 
175
174
  async bulkDeleteActionConfig(
@@ -181,20 +180,18 @@ export class ModerationApi {
181
180
  user: request?.user,
182
181
  };
183
182
 
184
- const response = await this.apiClient.sendRequest<
185
- StreamResponse<BulkDeleteActionConfigResponse>
186
- >(
187
- 'POST',
188
- '/api/v2/moderation/action_config/bulk_delete',
189
- undefined,
190
- undefined,
191
- body,
192
- 'application/json',
193
- );
183
+ const response =
184
+ await this.apiClient.sendRequest<BulkDeleteActionConfigResponse>(
185
+ 'POST',
186
+ '/api/v2/moderation/action_config/bulk_delete',
187
+ undefined,
188
+ undefined,
189
+ body,
190
+ );
194
191
 
195
- decoders['BulkDeleteActionConfigResponse']?.(response.body);
192
+ decoders['BulkDeleteActionConfigResponse']?.(response);
196
193
 
197
- return { ...response.body, metadata: response.metadata };
194
+ return response;
198
195
  }
199
196
 
200
197
  async deleteActionConfig(request: {
@@ -208,18 +205,17 @@ export class ModerationApi {
208
205
  id: request?.id,
209
206
  };
210
207
 
211
- const response = await this.apiClient.sendRequest<
212
- StreamResponse<DeleteActionConfigResponse>
213
- >(
214
- 'DELETE',
215
- '/api/v2/moderation/action_config/{id}',
216
- pathParams,
217
- queryParams,
218
- );
208
+ const response =
209
+ await this.apiClient.sendRequest<DeleteActionConfigResponse>(
210
+ 'DELETE',
211
+ '/api/v2/moderation/action_config/{id}',
212
+ pathParams,
213
+ queryParams,
214
+ );
219
215
 
220
- decoders['DeleteActionConfigResponse']?.(response.body);
216
+ decoders['DeleteActionConfigResponse']?.(response);
221
217
 
222
- return { ...response.body, metadata: response.metadata };
218
+ return response;
223
219
  }
224
220
 
225
221
  async insertActionLog(
@@ -236,20 +232,17 @@ export class ModerationApi {
236
232
  custom: request?.custom,
237
233
  };
238
234
 
239
- const response = await this.apiClient.sendRequest<
240
- StreamResponse<InsertActionLogResponse>
241
- >(
235
+ const response = await this.apiClient.sendRequest<InsertActionLogResponse>(
242
236
  'POST',
243
237
  '/api/v2/moderation/action_logs',
244
238
  undefined,
245
239
  undefined,
246
240
  body,
247
- 'application/json',
248
241
  );
249
242
 
250
- decoders['InsertActionLogResponse']?.(response.body);
243
+ decoders['InsertActionLogResponse']?.(response);
251
244
 
252
- return { ...response.body, metadata: response.metadata };
245
+ return response;
253
246
  }
254
247
 
255
248
  async analyze(
@@ -259,6 +252,7 @@ export class ModerationApi {
259
252
  async_response: request?.async_response,
260
253
  config_key: request?.config_key,
261
254
  content_published_at: request?.content_published_at,
255
+ country_code: request?.country_code,
262
256
  entity_creator_id: request?.entity_creator_id,
263
257
  entity_id: request?.entity_id,
264
258
  entity_type: request?.entity_type,
@@ -269,20 +263,17 @@ export class ModerationApi {
269
263
  user: request?.user,
270
264
  };
271
265
 
272
- const response = await this.apiClient.sendRequest<
273
- StreamResponse<AnalyzeResponse>
274
- >(
266
+ const response = await this.apiClient.sendRequest<AnalyzeResponse>(
275
267
  'POST',
276
268
  '/api/v2/moderation/analyze',
277
269
  undefined,
278
270
  undefined,
279
271
  body,
280
- 'application/json',
281
272
  );
282
273
 
283
- decoders['AnalyzeResponse']?.(response.body);
274
+ decoders['AnalyzeResponse']?.(response);
284
275
 
285
- return { ...response.body, metadata: response.metadata };
276
+ return response;
286
277
  }
287
278
 
288
279
  async appeal(
@@ -299,20 +290,17 @@ export class ModerationApi {
299
290
  user: request?.user,
300
291
  };
301
292
 
302
- const response = await this.apiClient.sendRequest<
303
- StreamResponse<AppealResponse>
304
- >(
293
+ const response = await this.apiClient.sendRequest<AppealResponse>(
305
294
  'POST',
306
295
  '/api/v2/moderation/appeal',
307
296
  undefined,
308
297
  undefined,
309
298
  body,
310
- 'application/json',
311
299
  );
312
300
 
313
- decoders['AppealResponse']?.(response.body);
301
+ decoders['AppealResponse']?.(response);
314
302
 
315
- return { ...response.body, metadata: response.metadata };
303
+ return response;
316
304
  }
317
305
 
318
306
  async getAppeal(request: {
@@ -322,13 +310,16 @@ export class ModerationApi {
322
310
  id: request?.id,
323
311
  };
324
312
 
325
- const response = await this.apiClient.sendRequest<
326
- StreamResponse<GetAppealResponse>
327
- >('GET', '/api/v2/moderation/appeal/{id}', pathParams, undefined);
313
+ const response = await this.apiClient.sendRequest<GetAppealResponse>(
314
+ 'GET',
315
+ '/api/v2/moderation/appeal/{id}',
316
+ pathParams,
317
+ undefined,
318
+ );
328
319
 
329
- decoders['GetAppealResponse']?.(response.body);
320
+ decoders['GetAppealResponse']?.(response);
330
321
 
331
- return { ...response.body, metadata: response.metadata };
322
+ return response;
332
323
  }
333
324
 
334
325
  async queryAppeals(
@@ -344,20 +335,17 @@ export class ModerationApi {
344
335
  user: request?.user,
345
336
  };
346
337
 
347
- const response = await this.apiClient.sendRequest<
348
- StreamResponse<QueryAppealsResponse>
349
- >(
338
+ const response = await this.apiClient.sendRequest<QueryAppealsResponse>(
350
339
  'POST',
351
340
  '/api/v2/moderation/appeals',
352
341
  undefined,
353
342
  undefined,
354
343
  body,
355
- 'application/json',
356
344
  );
357
345
 
358
- decoders['QueryAppealsResponse']?.(response.body);
346
+ decoders['QueryAppealsResponse']?.(response);
359
347
 
360
- return { ...response.body, metadata: response.metadata };
348
+ return response;
361
349
  }
362
350
 
363
351
  async bulkActionAppeals(
@@ -375,20 +363,18 @@ export class ModerationApi {
375
363
  user: request?.user,
376
364
  };
377
365
 
378
- const response = await this.apiClient.sendRequest<
379
- StreamResponse<BulkActionAppealsResponse>
380
- >(
381
- 'POST',
382
- '/api/v2/moderation/appeals/bulk_action',
383
- undefined,
384
- undefined,
385
- body,
386
- 'application/json',
387
- );
366
+ const response =
367
+ await this.apiClient.sendRequest<BulkActionAppealsResponse>(
368
+ 'POST',
369
+ '/api/v2/moderation/appeals/bulk_action',
370
+ undefined,
371
+ undefined,
372
+ body,
373
+ );
388
374
 
389
- decoders['BulkActionAppealsResponse']?.(response.body);
375
+ decoders['BulkActionAppealsResponse']?.(response);
390
376
 
391
- return { ...response.body, metadata: response.metadata };
377
+ return response;
392
378
  }
393
379
 
394
380
  async ban(
@@ -406,20 +392,17 @@ export class ModerationApi {
406
392
  banned_by: request?.banned_by,
407
393
  };
408
394
 
409
- const response = await this.apiClient.sendRequest<
410
- StreamResponse<ModerationBanResponse>
411
- >(
395
+ const response = await this.apiClient.sendRequest<ModerationBanResponse>(
412
396
  'POST',
413
397
  '/api/v2/moderation/ban',
414
398
  undefined,
415
399
  undefined,
416
400
  body,
417
- 'application/json',
418
401
  );
419
402
 
420
- decoders['ModerationBanResponse']?.(response.body);
403
+ decoders['ModerationBanResponse']?.(response);
421
404
 
422
- return { ...response.body, metadata: response.metadata };
405
+ return response;
423
406
  }
424
407
 
425
408
  async bulkImageModeration(
@@ -429,20 +412,18 @@ export class ModerationApi {
429
412
  csv_file: request?.csv_file,
430
413
  };
431
414
 
432
- const response = await this.apiClient.sendRequest<
433
- StreamResponse<BulkImageModerationResponse>
434
- >(
435
- 'POST',
436
- '/api/v2/moderation/bulk_image_moderation',
437
- undefined,
438
- undefined,
439
- body,
440
- 'application/json',
441
- );
415
+ const response =
416
+ await this.apiClient.sendRequest<BulkImageModerationResponse>(
417
+ 'POST',
418
+ '/api/v2/moderation/bulk_image_moderation',
419
+ undefined,
420
+ undefined,
421
+ body,
422
+ );
442
423
 
443
- decoders['BulkImageModerationResponse']?.(response.body);
424
+ decoders['BulkImageModerationResponse']?.(response);
444
425
 
445
- return { ...response.body, metadata: response.metadata };
426
+ return response;
446
427
  }
447
428
 
448
429
  async bypass(
@@ -453,20 +434,17 @@ export class ModerationApi {
453
434
  target_user_id: request?.target_user_id,
454
435
  };
455
436
 
456
- const response = await this.apiClient.sendRequest<
457
- StreamResponse<BypassResponse>
458
- >(
437
+ const response = await this.apiClient.sendRequest<BypassResponse>(
459
438
  'POST',
460
439
  '/api/v2/moderation/bypass',
461
440
  undefined,
462
441
  undefined,
463
442
  body,
464
- 'application/json',
465
443
  );
466
444
 
467
- decoders['BypassResponse']?.(response.body);
445
+ decoders['BypassResponse']?.(response);
468
446
 
469
- return { ...response.body, metadata: response.metadata };
447
+ return response;
470
448
  }
471
449
 
472
450
  async check(request: CheckRequest): Promise<StreamResponse<CheckResponse>> {
@@ -477,6 +455,7 @@ export class ModerationApi {
477
455
  config_key: request?.config_key,
478
456
  config_team: request?.config_team,
479
457
  content_published_at: request?.content_published_at,
458
+ country_code: request?.country_code,
480
459
  test_mode: request?.test_mode,
481
460
  user_id: request?.user_id,
482
461
  config: request?.config,
@@ -485,20 +464,17 @@ export class ModerationApi {
485
464
  user: request?.user,
486
465
  };
487
466
 
488
- const response = await this.apiClient.sendRequest<
489
- StreamResponse<CheckResponse>
490
- >(
467
+ const response = await this.apiClient.sendRequest<CheckResponse>(
491
468
  'POST',
492
469
  '/api/v2/moderation/check',
493
470
  undefined,
494
471
  undefined,
495
472
  body,
496
- 'application/json',
497
473
  );
498
474
 
499
- decoders['CheckResponse']?.(response.body);
475
+ decoders['CheckResponse']?.(response);
500
476
 
501
- return { ...response.body, metadata: response.metadata };
477
+ return response;
502
478
  }
503
479
 
504
480
  async checkS3Access(
@@ -508,20 +484,17 @@ export class ModerationApi {
508
484
  s3_url: request?.s3_url,
509
485
  };
510
486
 
511
- const response = await this.apiClient.sendRequest<
512
- StreamResponse<CheckS3AccessResponse>
513
- >(
487
+ const response = await this.apiClient.sendRequest<CheckS3AccessResponse>(
514
488
  'POST',
515
489
  '/api/v2/moderation/check_s3_access',
516
490
  undefined,
517
491
  undefined,
518
492
  body,
519
- 'application/json',
520
493
  );
521
494
 
522
- decoders['CheckS3AccessResponse']?.(response.body);
495
+ decoders['CheckS3AccessResponse']?.(response);
523
496
 
524
- return { ...response.body, metadata: response.metadata };
497
+ return response;
525
498
  }
526
499
 
527
500
  async upsertConfig(
@@ -545,6 +518,7 @@ export class ModerationApi {
545
518
  bodyguard_config: request?.bodyguard_config,
546
519
  flood_config: request?.flood_config,
547
520
  google_vision_config: request?.google_vision_config,
521
+ intent_config: request?.intent_config,
548
522
  llm_config: request?.llm_config,
549
523
  rule_builder_config: request?.rule_builder_config,
550
524
  user: request?.user,
@@ -552,20 +526,17 @@ export class ModerationApi {
552
526
  video_call_rule_config: request?.video_call_rule_config,
553
527
  };
554
528
 
555
- const response = await this.apiClient.sendRequest<
556
- StreamResponse<UpsertConfigResponse>
557
- >(
529
+ const response = await this.apiClient.sendRequest<UpsertConfigResponse>(
558
530
  'POST',
559
531
  '/api/v2/moderation/config',
560
532
  undefined,
561
533
  undefined,
562
534
  body,
563
- 'application/json',
564
535
  );
565
536
 
566
- decoders['UpsertConfigResponse']?.(response.body);
537
+ decoders['UpsertConfigResponse']?.(response);
567
538
 
568
- return { ...response.body, metadata: response.metadata };
539
+ return response;
569
540
  }
570
541
 
571
542
  async deleteConfig(request: {
@@ -581,13 +552,17 @@ export class ModerationApi {
581
552
  key: request?.key,
582
553
  };
583
554
 
584
- const response = await this.apiClient.sendRequest<
585
- StreamResponse<DeleteModerationConfigResponse>
586
- >('DELETE', '/api/v2/moderation/config/{key}', pathParams, queryParams);
555
+ const response =
556
+ await this.apiClient.sendRequest<DeleteModerationConfigResponse>(
557
+ 'DELETE',
558
+ '/api/v2/moderation/config/{key}',
559
+ pathParams,
560
+ queryParams,
561
+ );
587
562
 
588
- decoders['DeleteModerationConfigResponse']?.(response.body);
563
+ decoders['DeleteModerationConfigResponse']?.(response);
589
564
 
590
- return { ...response.body, metadata: response.metadata };
565
+ return response;
591
566
  }
592
567
 
593
568
  async getConfig(request: {
@@ -601,13 +576,16 @@ export class ModerationApi {
601
576
  key: request?.key,
602
577
  };
603
578
 
604
- const response = await this.apiClient.sendRequest<
605
- StreamResponse<GetConfigResponse>
606
- >('GET', '/api/v2/moderation/config/{key}', pathParams, queryParams);
579
+ const response = await this.apiClient.sendRequest<GetConfigResponse>(
580
+ 'GET',
581
+ '/api/v2/moderation/config/{key}',
582
+ pathParams,
583
+ queryParams,
584
+ );
607
585
 
608
- decoders['GetConfigResponse']?.(response.body);
586
+ decoders['GetConfigResponse']?.(response);
609
587
 
610
- return { ...response.body, metadata: response.metadata };
588
+ return response;
611
589
  }
612
590
 
613
591
  async queryModerationConfigs(
@@ -623,20 +601,18 @@ export class ModerationApi {
623
601
  user: request?.user,
624
602
  };
625
603
 
626
- const response = await this.apiClient.sendRequest<
627
- StreamResponse<QueryModerationConfigsResponse>
628
- >(
629
- 'POST',
630
- '/api/v2/moderation/configs',
631
- undefined,
632
- undefined,
633
- body,
634
- 'application/json',
635
- );
604
+ const response =
605
+ await this.apiClient.sendRequest<QueryModerationConfigsResponse>(
606
+ 'POST',
607
+ '/api/v2/moderation/configs',
608
+ undefined,
609
+ undefined,
610
+ body,
611
+ );
636
612
 
637
- decoders['QueryModerationConfigsResponse']?.(response.body);
613
+ decoders['QueryModerationConfigsResponse']?.(response);
638
614
 
639
- return { ...response.body, metadata: response.metadata };
615
+ return response;
640
616
  }
641
617
 
642
618
  async customCheck(
@@ -652,54 +628,49 @@ export class ModerationApi {
652
628
  user: request?.user,
653
629
  };
654
630
 
655
- const response = await this.apiClient.sendRequest<
656
- StreamResponse<CustomCheckResponse>
657
- >(
631
+ const response = await this.apiClient.sendRequest<CustomCheckResponse>(
658
632
  'POST',
659
633
  '/api/v2/moderation/custom_check',
660
634
  undefined,
661
635
  undefined,
662
636
  body,
663
- 'application/json',
664
637
  );
665
638
 
666
- decoders['CustomCheckResponse']?.(response.body);
639
+ decoders['CustomCheckResponse']?.(response);
667
640
 
668
- return { ...response.body, metadata: response.metadata };
641
+ return response;
669
642
  }
670
643
 
671
644
  async v2DeleteTemplate(): Promise<
672
645
  StreamResponse<DeleteModerationTemplateResponse>
673
646
  > {
674
- const response = await this.apiClient.sendRequest<
675
- StreamResponse<DeleteModerationTemplateResponse>
676
- >(
677
- 'DELETE',
678
- '/api/v2/moderation/feeds_moderation_template',
679
- undefined,
680
- undefined,
681
- );
647
+ const response =
648
+ await this.apiClient.sendRequest<DeleteModerationTemplateResponse>(
649
+ 'DELETE',
650
+ '/api/v2/moderation/feeds_moderation_template',
651
+ undefined,
652
+ undefined,
653
+ );
682
654
 
683
- decoders['DeleteModerationTemplateResponse']?.(response.body);
655
+ decoders['DeleteModerationTemplateResponse']?.(response);
684
656
 
685
- return { ...response.body, metadata: response.metadata };
657
+ return response;
686
658
  }
687
659
 
688
660
  async v2QueryTemplates(): Promise<
689
661
  StreamResponse<QueryFeedModerationTemplatesResponse>
690
662
  > {
691
- const response = await this.apiClient.sendRequest<
692
- StreamResponse<QueryFeedModerationTemplatesResponse>
693
- >(
694
- 'GET',
695
- '/api/v2/moderation/feeds_moderation_template',
696
- undefined,
697
- undefined,
698
- );
663
+ const response =
664
+ await this.apiClient.sendRequest<QueryFeedModerationTemplatesResponse>(
665
+ 'GET',
666
+ '/api/v2/moderation/feeds_moderation_template',
667
+ undefined,
668
+ undefined,
669
+ );
699
670
 
700
- decoders['QueryFeedModerationTemplatesResponse']?.(response.body);
671
+ decoders['QueryFeedModerationTemplatesResponse']?.(response);
701
672
 
702
- return { ...response.body, metadata: response.metadata };
673
+ return response;
703
674
  }
704
675
 
705
676
  async v2UpsertTemplate(
@@ -710,20 +681,18 @@ export class ModerationApi {
710
681
  config: request?.config,
711
682
  };
712
683
 
713
- const response = await this.apiClient.sendRequest<
714
- StreamResponse<UpsertModerationTemplateResponse>
715
- >(
716
- 'POST',
717
- '/api/v2/moderation/feeds_moderation_template',
718
- undefined,
719
- undefined,
720
- body,
721
- 'application/json',
722
- );
684
+ const response =
685
+ await this.apiClient.sendRequest<UpsertModerationTemplateResponse>(
686
+ 'POST',
687
+ '/api/v2/moderation/feeds_moderation_template',
688
+ undefined,
689
+ undefined,
690
+ body,
691
+ );
723
692
 
724
- decoders['UpsertModerationTemplateResponse']?.(response.body);
693
+ decoders['UpsertModerationTemplateResponse']?.(response);
725
694
 
726
- return { ...response.body, metadata: response.metadata };
695
+ return response;
727
696
  }
728
697
 
729
698
  async flag(request: FlagRequest): Promise<StreamResponse<FlagItemResponse>> {
@@ -738,20 +707,17 @@ export class ModerationApi {
738
707
  user: request?.user,
739
708
  };
740
709
 
741
- const response = await this.apiClient.sendRequest<
742
- StreamResponse<FlagItemResponse>
743
- >(
710
+ const response = await this.apiClient.sendRequest<FlagItemResponse>(
744
711
  'POST',
745
712
  '/api/v2/moderation/flag',
746
713
  undefined,
747
714
  undefined,
748
715
  body,
749
- 'application/json',
750
716
  );
751
717
 
752
- decoders['FlagItemResponse']?.(response.body);
718
+ decoders['FlagItemResponse']?.(response);
753
719
 
754
- return { ...response.body, metadata: response.metadata };
720
+ return response;
755
721
  }
756
722
 
757
723
  async getFlagCount(
@@ -762,20 +728,17 @@ export class ModerationApi {
762
728
  entity_type: request?.entity_type,
763
729
  };
764
730
 
765
- const response = await this.apiClient.sendRequest<
766
- StreamResponse<GetFlagCountResponse>
767
- >(
731
+ const response = await this.apiClient.sendRequest<GetFlagCountResponse>(
768
732
  'POST',
769
733
  '/api/v2/moderation/flag_count',
770
734
  undefined,
771
735
  undefined,
772
736
  body,
773
- 'application/json',
774
737
  );
775
738
 
776
- decoders['GetFlagCountResponse']?.(response.body);
739
+ decoders['GetFlagCountResponse']?.(response);
777
740
 
778
- return { ...response.body, metadata: response.metadata };
741
+ return response;
779
742
  }
780
743
 
781
744
  async queryModerationFlags(
@@ -789,20 +752,18 @@ export class ModerationApi {
789
752
  filter: request?.filter,
790
753
  };
791
754
 
792
- const response = await this.apiClient.sendRequest<
793
- StreamResponse<QueryModerationFlagsResponse>
794
- >(
795
- 'POST',
796
- '/api/v2/moderation/flags',
797
- undefined,
798
- undefined,
799
- body,
800
- 'application/json',
801
- );
755
+ const response =
756
+ await this.apiClient.sendRequest<QueryModerationFlagsResponse>(
757
+ 'POST',
758
+ '/api/v2/moderation/flags',
759
+ undefined,
760
+ undefined,
761
+ body,
762
+ );
802
763
 
803
- decoders['QueryModerationFlagsResponse']?.(response.body);
764
+ decoders['QueryModerationFlagsResponse']?.(response);
804
765
 
805
- return { ...response.body, metadata: response.metadata };
766
+ return response;
806
767
  }
807
768
 
808
769
  async labels(
@@ -818,20 +779,17 @@ export class ModerationApi {
818
779
  user_id: request?.user_id,
819
780
  };
820
781
 
821
- const response = await this.apiClient.sendRequest<
822
- StreamResponse<LabelsResponse>
823
- >(
782
+ const response = await this.apiClient.sendRequest<LabelsResponse>(
824
783
  'POST',
825
784
  '/api/v2/moderation/labels',
826
785
  undefined,
827
786
  undefined,
828
787
  body,
829
- 'application/json',
830
788
  );
831
789
 
832
- decoders['LabelsResponse']?.(response.body);
790
+ decoders['LabelsResponse']?.(response);
833
791
 
834
- return { ...response.body, metadata: response.metadata };
792
+ return response;
835
793
  }
836
794
 
837
795
  async queryLabelResults(
@@ -847,20 +805,18 @@ export class ModerationApi {
847
805
  user: request?.user,
848
806
  };
849
807
 
850
- const response = await this.apiClient.sendRequest<
851
- StreamResponse<QueryLabelResultsResponse>
852
- >(
853
- 'POST',
854
- '/api/v2/moderation/labels/results',
855
- undefined,
856
- undefined,
857
- body,
858
- 'application/json',
859
- );
808
+ const response =
809
+ await this.apiClient.sendRequest<QueryLabelResultsResponse>(
810
+ 'POST',
811
+ '/api/v2/moderation/labels/results',
812
+ undefined,
813
+ undefined,
814
+ body,
815
+ );
860
816
 
861
- decoders['QueryLabelResultsResponse']?.(response.body);
817
+ decoders['QueryLabelResultsResponse']?.(response);
862
818
 
863
- return { ...response.body, metadata: response.metadata };
819
+ return response;
864
820
  }
865
821
 
866
822
  async queryModerationLogs(
@@ -876,20 +832,18 @@ export class ModerationApi {
876
832
  user: request?.user,
877
833
  };
878
834
 
879
- const response = await this.apiClient.sendRequest<
880
- StreamResponse<QueryModerationLogsResponse>
881
- >(
882
- 'POST',
883
- '/api/v2/moderation/logs',
884
- undefined,
885
- undefined,
886
- body,
887
- 'application/json',
888
- );
835
+ const response =
836
+ await this.apiClient.sendRequest<QueryModerationLogsResponse>(
837
+ 'POST',
838
+ '/api/v2/moderation/logs',
839
+ undefined,
840
+ undefined,
841
+ body,
842
+ );
889
843
 
890
- decoders['QueryModerationLogsResponse']?.(response.body);
844
+ decoders['QueryModerationLogsResponse']?.(response);
891
845
 
892
- return { ...response.body, metadata: response.metadata };
846
+ return response;
893
847
  }
894
848
 
895
849
  async upsertModerationRule(
@@ -912,20 +866,18 @@ export class ModerationApi {
912
866
  user: request?.user,
913
867
  };
914
868
 
915
- const response = await this.apiClient.sendRequest<
916
- StreamResponse<UpsertModerationRuleResponse>
917
- >(
918
- 'POST',
919
- '/api/v2/moderation/moderation_rule',
920
- undefined,
921
- undefined,
922
- body,
923
- 'application/json',
924
- );
869
+ const response =
870
+ await this.apiClient.sendRequest<UpsertModerationRuleResponse>(
871
+ 'POST',
872
+ '/api/v2/moderation/moderation_rule',
873
+ undefined,
874
+ undefined,
875
+ body,
876
+ );
925
877
 
926
- decoders['UpsertModerationRuleResponse']?.(response.body);
878
+ decoders['UpsertModerationRuleResponse']?.(response);
927
879
 
928
- return { ...response.body, metadata: response.metadata };
880
+ return response;
929
881
  }
930
882
 
931
883
  async deleteModerationRule(request: {
@@ -939,18 +891,17 @@ export class ModerationApi {
939
891
  id: request?.id,
940
892
  };
941
893
 
942
- const response = await this.apiClient.sendRequest<
943
- StreamResponse<DeleteModerationRuleResponse>
944
- >(
945
- 'DELETE',
946
- '/api/v2/moderation/moderation_rule/{id}',
947
- pathParams,
948
- queryParams,
949
- );
894
+ const response =
895
+ await this.apiClient.sendRequest<DeleteModerationRuleResponse>(
896
+ 'DELETE',
897
+ '/api/v2/moderation/moderation_rule/{id}',
898
+ pathParams,
899
+ queryParams,
900
+ );
950
901
 
951
- decoders['DeleteModerationRuleResponse']?.(response.body);
902
+ decoders['DeleteModerationRuleResponse']?.(response);
952
903
 
953
- return { ...response.body, metadata: response.metadata };
904
+ return response;
954
905
  }
955
906
 
956
907
  async getModerationRule(request: {
@@ -960,13 +911,17 @@ export class ModerationApi {
960
911
  id: request?.id,
961
912
  };
962
913
 
963
- const response = await this.apiClient.sendRequest<
964
- StreamResponse<GetModerationRuleResponse>
965
- >('GET', '/api/v2/moderation/moderation_rule/{id}', pathParams, undefined);
914
+ const response =
915
+ await this.apiClient.sendRequest<GetModerationRuleResponse>(
916
+ 'GET',
917
+ '/api/v2/moderation/moderation_rule/{id}',
918
+ pathParams,
919
+ undefined,
920
+ );
966
921
 
967
- decoders['GetModerationRuleResponse']?.(response.body);
922
+ decoders['GetModerationRuleResponse']?.(response);
968
923
 
969
- return { ...response.body, metadata: response.metadata };
924
+ return response;
970
925
  }
971
926
 
972
927
  async queryModerationRules(
@@ -982,20 +937,18 @@ export class ModerationApi {
982
937
  user: request?.user,
983
938
  };
984
939
 
985
- const response = await this.apiClient.sendRequest<
986
- StreamResponse<QueryModerationRulesResponse>
987
- >(
988
- 'POST',
989
- '/api/v2/moderation/moderation_rules',
990
- undefined,
991
- undefined,
992
- body,
993
- 'application/json',
994
- );
940
+ const response =
941
+ await this.apiClient.sendRequest<QueryModerationRulesResponse>(
942
+ 'POST',
943
+ '/api/v2/moderation/moderation_rules',
944
+ undefined,
945
+ undefined,
946
+ body,
947
+ );
995
948
 
996
- decoders['QueryModerationRulesResponse']?.(response.body);
949
+ decoders['QueryModerationRulesResponse']?.(response);
997
950
 
998
- return { ...response.body, metadata: response.metadata };
951
+ return response;
999
952
  }
1000
953
 
1001
954
  async mute(request: MuteRequest): Promise<StreamResponse<MuteResponse>> {
@@ -1006,20 +959,17 @@ export class ModerationApi {
1006
959
  user: request?.user,
1007
960
  };
1008
961
 
1009
- const response = await this.apiClient.sendRequest<
1010
- StreamResponse<MuteResponse>
1011
- >(
962
+ const response = await this.apiClient.sendRequest<MuteResponse>(
1012
963
  'POST',
1013
964
  '/api/v2/moderation/mute',
1014
965
  undefined,
1015
966
  undefined,
1016
967
  body,
1017
- 'application/json',
1018
968
  );
1019
969
 
1020
- decoders['MuteResponse']?.(response.body);
970
+ decoders['MuteResponse']?.(response);
1021
971
 
1022
- return { ...response.body, metadata: response.metadata };
972
+ return response;
1023
973
  }
1024
974
 
1025
975
  async getPolicyTestRun(request: {
@@ -1029,30 +979,32 @@ export class ModerationApi {
1029
979
  id: request?.id,
1030
980
  };
1031
981
 
1032
- const response = await this.apiClient.sendRequest<
1033
- StreamResponse<PolicyTestRunResponse>
1034
- >(
982
+ const response = await this.apiClient.sendRequest<PolicyTestRunResponse>(
1035
983
  'GET',
1036
984
  '/api/v2/moderation/policy_tests/runs/{id}',
1037
985
  pathParams,
1038
986
  undefined,
1039
987
  );
1040
988
 
1041
- decoders['PolicyTestRunResponse']?.(response.body);
989
+ decoders['PolicyTestRunResponse']?.(response);
1042
990
 
1043
- return { ...response.body, metadata: response.metadata };
991
+ return response;
1044
992
  }
1045
993
 
1046
994
  async listPolicyTestSets(): Promise<
1047
995
  StreamResponse<PolicyTestSetListResponse>
1048
996
  > {
1049
- const response = await this.apiClient.sendRequest<
1050
- StreamResponse<PolicyTestSetListResponse>
1051
- >('GET', '/api/v2/moderation/policy_tests/sets', undefined, undefined);
997
+ const response =
998
+ await this.apiClient.sendRequest<PolicyTestSetListResponse>(
999
+ 'GET',
1000
+ '/api/v2/moderation/policy_tests/sets',
1001
+ undefined,
1002
+ undefined,
1003
+ );
1052
1004
 
1053
- decoders['PolicyTestSetListResponse']?.(response.body);
1005
+ decoders['PolicyTestSetListResponse']?.(response);
1054
1006
 
1055
- return { ...response.body, metadata: response.metadata };
1007
+ return response;
1056
1008
  }
1057
1009
 
1058
1010
  async createPolicyTestSet(
@@ -1067,20 +1019,17 @@ export class ModerationApi {
1067
1019
  seed: request?.seed,
1068
1020
  };
1069
1021
 
1070
- const response = await this.apiClient.sendRequest<
1071
- StreamResponse<PolicyTestSetResponse>
1072
- >(
1022
+ const response = await this.apiClient.sendRequest<PolicyTestSetResponse>(
1073
1023
  'POST',
1074
1024
  '/api/v2/moderation/policy_tests/sets',
1075
1025
  undefined,
1076
1026
  undefined,
1077
1027
  body,
1078
- 'application/json',
1079
1028
  );
1080
1029
 
1081
- decoders['PolicyTestSetResponse']?.(response.body);
1030
+ decoders['PolicyTestSetResponse']?.(response);
1082
1031
 
1083
- return { ...response.body, metadata: response.metadata };
1032
+ return response;
1084
1033
  }
1085
1034
 
1086
1035
  async deletePolicyTestSet(request: {
@@ -1090,16 +1039,16 @@ export class ModerationApi {
1090
1039
  id: request?.id,
1091
1040
  };
1092
1041
 
1093
- const response = await this.apiClient.sendRequest<StreamResponse<Response>>(
1042
+ const response = await this.apiClient.sendRequest<Response>(
1094
1043
  'DELETE',
1095
1044
  '/api/v2/moderation/policy_tests/sets/{id}',
1096
1045
  pathParams,
1097
1046
  undefined,
1098
1047
  );
1099
1048
 
1100
- decoders['Response']?.(response.body);
1049
+ decoders['Response']?.(response);
1101
1050
 
1102
- return { ...response.body, metadata: response.metadata };
1051
+ return response;
1103
1052
  }
1104
1053
 
1105
1054
  async getPolicyTestSet(request: {
@@ -1109,18 +1058,16 @@ export class ModerationApi {
1109
1058
  id: request?.id,
1110
1059
  };
1111
1060
 
1112
- const response = await this.apiClient.sendRequest<
1113
- StreamResponse<PolicyTestSetResponse>
1114
- >(
1061
+ const response = await this.apiClient.sendRequest<PolicyTestSetResponse>(
1115
1062
  'GET',
1116
1063
  '/api/v2/moderation/policy_tests/sets/{id}',
1117
1064
  pathParams,
1118
1065
  undefined,
1119
1066
  );
1120
1067
 
1121
- decoders['PolicyTestSetResponse']?.(response.body);
1068
+ decoders['PolicyTestSetResponse']?.(response);
1122
1069
 
1123
- return { ...response.body, metadata: response.metadata };
1070
+ return response;
1124
1071
  }
1125
1072
 
1126
1073
  async startPolicyTestRun(request: {
@@ -1130,18 +1077,16 @@ export class ModerationApi {
1130
1077
  id: request?.id,
1131
1078
  };
1132
1079
 
1133
- const response = await this.apiClient.sendRequest<
1134
- StreamResponse<PolicyTestRunResponse>
1135
- >(
1080
+ const response = await this.apiClient.sendRequest<PolicyTestRunResponse>(
1136
1081
  'POST',
1137
1082
  '/api/v2/moderation/policy_tests/sets/{id}/runs',
1138
1083
  pathParams,
1139
1084
  undefined,
1140
1085
  );
1141
1086
 
1142
- decoders['PolicyTestRunResponse']?.(response.body);
1087
+ decoders['PolicyTestRunResponse']?.(response);
1143
1088
 
1144
- return { ...response.body, metadata: response.metadata };
1089
+ return response;
1145
1090
  }
1146
1091
 
1147
1092
  async listQueues(request?: {
@@ -1151,13 +1096,16 @@ export class ModerationApi {
1151
1096
  user_id: request?.user_id,
1152
1097
  };
1153
1098
 
1154
- const response = await this.apiClient.sendRequest<
1155
- StreamResponse<ListQueuesResponse>
1156
- >('GET', '/api/v2/moderation/queues', undefined, queryParams);
1099
+ const response = await this.apiClient.sendRequest<ListQueuesResponse>(
1100
+ 'GET',
1101
+ '/api/v2/moderation/queues',
1102
+ undefined,
1103
+ queryParams,
1104
+ );
1157
1105
 
1158
- decoders['ListQueuesResponse']?.(response.body);
1106
+ decoders['ListQueuesResponse']?.(response);
1159
1107
 
1160
- return { ...response.body, metadata: response.metadata };
1108
+ return response;
1161
1109
  }
1162
1110
 
1163
1111
  async createQueue(
@@ -1173,20 +1121,17 @@ export class ModerationApi {
1173
1121
  user: request?.user,
1174
1122
  };
1175
1123
 
1176
- const response = await this.apiClient.sendRequest<
1177
- StreamResponse<QueueResponse>
1178
- >(
1124
+ const response = await this.apiClient.sendRequest<QueueResponse>(
1179
1125
  'POST',
1180
1126
  '/api/v2/moderation/queues',
1181
1127
  undefined,
1182
1128
  undefined,
1183
1129
  body,
1184
- 'application/json',
1185
1130
  );
1186
1131
 
1187
- decoders['QueueResponse']?.(response.body);
1132
+ decoders['QueueResponse']?.(response);
1188
1133
 
1189
- return { ...response.body, metadata: response.metadata };
1134
+ return response;
1190
1135
  }
1191
1136
 
1192
1137
  async getQueue(request: {
@@ -1200,13 +1145,16 @@ export class ModerationApi {
1200
1145
  id: request?.id,
1201
1146
  };
1202
1147
 
1203
- const response = await this.apiClient.sendRequest<
1204
- StreamResponse<QueueResponse>
1205
- >('GET', '/api/v2/moderation/queues/{id}', pathParams, queryParams);
1148
+ const response = await this.apiClient.sendRequest<QueueResponse>(
1149
+ 'GET',
1150
+ '/api/v2/moderation/queues/{id}',
1151
+ pathParams,
1152
+ queryParams,
1153
+ );
1206
1154
 
1207
- decoders['QueueResponse']?.(response.body);
1155
+ decoders['QueueResponse']?.(response);
1208
1156
 
1209
- return { ...response.body, metadata: response.metadata };
1157
+ return response;
1210
1158
  }
1211
1159
 
1212
1160
  async updateQueue(
@@ -1224,20 +1172,17 @@ export class ModerationApi {
1224
1172
  user: request?.user,
1225
1173
  };
1226
1174
 
1227
- const response = await this.apiClient.sendRequest<
1228
- StreamResponse<QueueResponse>
1229
- >(
1175
+ const response = await this.apiClient.sendRequest<QueueResponse>(
1230
1176
  'PATCH',
1231
1177
  '/api/v2/moderation/queues/{id}',
1232
1178
  pathParams,
1233
1179
  undefined,
1234
1180
  body,
1235
- 'application/json',
1236
1181
  );
1237
1182
 
1238
- decoders['QueueResponse']?.(response.body);
1183
+ decoders['QueueResponse']?.(response);
1239
1184
 
1240
- return { ...response.body, metadata: response.metadata };
1185
+ return response;
1241
1186
  }
1242
1187
 
1243
1188
  async deleteQueue(
@@ -1251,20 +1196,17 @@ export class ModerationApi {
1251
1196
  user: request?.user,
1252
1197
  };
1253
1198
 
1254
- const response = await this.apiClient.sendRequest<
1255
- StreamResponse<QueueResponse>
1256
- >(
1199
+ const response = await this.apiClient.sendRequest<QueueResponse>(
1257
1200
  'POST',
1258
1201
  '/api/v2/moderation/queues/{id}/delete',
1259
1202
  pathParams,
1260
1203
  undefined,
1261
1204
  body,
1262
- 'application/json',
1263
1205
  );
1264
1206
 
1265
- decoders['QueueResponse']?.(response.body);
1207
+ decoders['QueueResponse']?.(response);
1266
1208
 
1267
- return { ...response.body, metadata: response.metadata };
1209
+ return response;
1268
1210
  }
1269
1211
 
1270
1212
  async queryReviewQueue(
@@ -1285,20 +1227,17 @@ export class ModerationApi {
1285
1227
  user: request?.user,
1286
1228
  };
1287
1229
 
1288
- const response = await this.apiClient.sendRequest<
1289
- StreamResponse<QueryReviewQueueResponse>
1290
- >(
1230
+ const response = await this.apiClient.sendRequest<QueryReviewQueueResponse>(
1291
1231
  'POST',
1292
1232
  '/api/v2/moderation/review_queue',
1293
1233
  undefined,
1294
1234
  undefined,
1295
1235
  body,
1296
- 'application/json',
1297
1236
  );
1298
1237
 
1299
- decoders['QueryReviewQueueResponse']?.(response.body);
1238
+ decoders['QueryReviewQueueResponse']?.(response);
1300
1239
 
1301
- return { ...response.body, metadata: response.metadata };
1240
+ return response;
1302
1241
  }
1303
1242
 
1304
1243
  async getReviewQueueItem(request: {
@@ -1308,23 +1247,30 @@ export class ModerationApi {
1308
1247
  id: request?.id,
1309
1248
  };
1310
1249
 
1311
- const response = await this.apiClient.sendRequest<
1312
- StreamResponse<GetReviewQueueItemResponse>
1313
- >('GET', '/api/v2/moderation/review_queue/{id}', pathParams, undefined);
1250
+ const response =
1251
+ await this.apiClient.sendRequest<GetReviewQueueItemResponse>(
1252
+ 'GET',
1253
+ '/api/v2/moderation/review_queue/{id}',
1254
+ pathParams,
1255
+ undefined,
1256
+ );
1314
1257
 
1315
- decoders['GetReviewQueueItemResponse']?.(response.body);
1258
+ decoders['GetReviewQueueItemResponse']?.(response);
1316
1259
 
1317
- return { ...response.body, metadata: response.metadata };
1260
+ return response;
1318
1261
  }
1319
1262
 
1320
1263
  async getSetupSession(): Promise<StreamResponse<GetSetupSessionResponse>> {
1321
- const response = await this.apiClient.sendRequest<
1322
- StreamResponse<GetSetupSessionResponse>
1323
- >('GET', '/api/v2/moderation/setup', undefined, undefined);
1264
+ const response = await this.apiClient.sendRequest<GetSetupSessionResponse>(
1265
+ 'GET',
1266
+ '/api/v2/moderation/setup',
1267
+ undefined,
1268
+ undefined,
1269
+ );
1324
1270
 
1325
- decoders['GetSetupSessionResponse']?.(response.body);
1271
+ decoders['GetSetupSessionResponse']?.(response);
1326
1272
 
1327
- return { ...response.body, metadata: response.metadata };
1273
+ return response;
1328
1274
  }
1329
1275
 
1330
1276
  async upsertSetupSession(
@@ -1336,20 +1282,18 @@ export class ModerationApi {
1336
1282
  setup_data: request?.setup_data,
1337
1283
  };
1338
1284
 
1339
- const response = await this.apiClient.sendRequest<
1340
- StreamResponse<UpsertSetupSessionResponse>
1341
- >(
1342
- 'POST',
1343
- '/api/v2/moderation/setup',
1344
- undefined,
1345
- undefined,
1346
- body,
1347
- 'application/json',
1348
- );
1285
+ const response =
1286
+ await this.apiClient.sendRequest<UpsertSetupSessionResponse>(
1287
+ 'POST',
1288
+ '/api/v2/moderation/setup',
1289
+ undefined,
1290
+ undefined,
1291
+ body,
1292
+ );
1349
1293
 
1350
- decoders['UpsertSetupSessionResponse']?.(response.body);
1294
+ decoders['UpsertSetupSessionResponse']?.(response);
1351
1295
 
1352
- return { ...response.body, metadata: response.metadata };
1296
+ return response;
1353
1297
  }
1354
1298
 
1355
1299
  async submitAction(
@@ -1381,20 +1325,17 @@ export class ModerationApi {
1381
1325
  user: request?.user,
1382
1326
  };
1383
1327
 
1384
- const response = await this.apiClient.sendRequest<
1385
- StreamResponse<SubmitActionResponse>
1386
- >(
1328
+ const response = await this.apiClient.sendRequest<SubmitActionResponse>(
1387
1329
  'POST',
1388
1330
  '/api/v2/moderation/submit_action',
1389
1331
  undefined,
1390
1332
  undefined,
1391
1333
  body,
1392
- 'application/json',
1393
1334
  );
1394
1335
 
1395
- decoders['SubmitActionResponse']?.(response.body);
1336
+ decoders['SubmitActionResponse']?.(response);
1396
1337
 
1397
- return { ...response.body, metadata: response.metadata };
1338
+ return response;
1398
1339
  }
1399
1340
 
1400
1341
  async submitModerationFeedback(
@@ -1412,20 +1353,18 @@ export class ModerationApi {
1412
1353
  expected_labels: request?.expected_labels,
1413
1354
  };
1414
1355
 
1415
- const response = await this.apiClient.sendRequest<
1416
- StreamResponse<SubmitModerationFeedbackResponse>
1417
- >(
1418
- 'POST',
1419
- '/api/v2/moderation/submit_moderation_feedback',
1420
- undefined,
1421
- undefined,
1422
- body,
1423
- 'application/json',
1424
- );
1356
+ const response =
1357
+ await this.apiClient.sendRequest<SubmitModerationFeedbackResponse>(
1358
+ 'POST',
1359
+ '/api/v2/moderation/submit_moderation_feedback',
1360
+ undefined,
1361
+ undefined,
1362
+ body,
1363
+ );
1425
1364
 
1426
- decoders['SubmitModerationFeedbackResponse']?.(response.body);
1365
+ decoders['SubmitModerationFeedbackResponse']?.(response);
1427
1366
 
1428
- return { ...response.body, metadata: response.metadata };
1367
+ return response;
1429
1368
  }
1430
1369
 
1431
1370
  async unban(
@@ -1445,20 +1384,17 @@ export class ModerationApi {
1445
1384
  unbanned_by: request?.unbanned_by,
1446
1385
  };
1447
1386
 
1448
- const response = await this.apiClient.sendRequest<
1449
- StreamResponse<UnbanResponse>
1450
- >(
1387
+ const response = await this.apiClient.sendRequest<UnbanResponse>(
1451
1388
  'POST',
1452
1389
  '/api/v2/moderation/unban',
1453
1390
  undefined,
1454
1391
  queryParams,
1455
1392
  body,
1456
- 'application/json',
1457
1393
  );
1458
1394
 
1459
- decoders['UnbanResponse']?.(response.body);
1395
+ decoders['UnbanResponse']?.(response);
1460
1396
 
1461
- return { ...response.body, metadata: response.metadata };
1397
+ return response;
1462
1398
  }
1463
1399
 
1464
1400
  async unmute(
@@ -1470,19 +1406,16 @@ export class ModerationApi {
1470
1406
  user: request?.user,
1471
1407
  };
1472
1408
 
1473
- const response = await this.apiClient.sendRequest<
1474
- StreamResponse<UnmuteResponse>
1475
- >(
1409
+ const response = await this.apiClient.sendRequest<UnmuteResponse>(
1476
1410
  'POST',
1477
1411
  '/api/v2/moderation/unmute',
1478
1412
  undefined,
1479
1413
  undefined,
1480
1414
  body,
1481
- 'application/json',
1482
1415
  );
1483
1416
 
1484
- decoders['UnmuteResponse']?.(response.body);
1417
+ decoders['UnmuteResponse']?.(response);
1485
1418
 
1486
- return { ...response.body, metadata: response.metadata };
1419
+ return response;
1487
1420
  }
1488
1421
  }