@unito/integrations-platform-client 0.48.4 → 1.0.1

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/dist/src/api.d.ts CHANGED
@@ -199,10 +199,31 @@ export declare function getIntegrations({ pagination, unitoOrganizationId, searc
199
199
  };
200
200
  unitoOrganizationId?: string;
201
201
  search?: string;
202
- }, opts?: Oazapfts.RequestOpts): Promise<Pagination & {
203
- /** The integrations. */
204
- data: IntegrationSummary[];
205
- }>;
202
+ }, opts?: Oazapfts.RequestOpts): Promise<Oazapfts.WithHeaders<{
203
+ status: 200;
204
+ data: Pagination & {
205
+ /** The integrations. */
206
+ data: IntegrationSummary[];
207
+ };
208
+ } | {
209
+ status: 400;
210
+ data: Error;
211
+ } | {
212
+ status: 401;
213
+ data: Error;
214
+ } | {
215
+ status: 403;
216
+ data: Error;
217
+ } | {
218
+ status: 404;
219
+ data: Error;
220
+ } | {
221
+ status: 422;
222
+ data: Error;
223
+ } | {
224
+ status: 500;
225
+ data: Error;
226
+ }>>;
206
227
  /**
207
228
  * Create an integration
208
229
  */
@@ -214,34 +235,159 @@ export declare function createIntegration(body?: {
214
235
  webhookParsingRelativeUrl?: string | null;
215
236
  webhookSubscriptionsRelativeUrl?: string | null;
216
237
  webhookAcknowledgeRelativeUrl?: string | null;
217
- }, opts?: Oazapfts.RequestOpts): Promise<Integration>;
238
+ }, opts?: Oazapfts.RequestOpts): Promise<Oazapfts.WithHeaders<{
239
+ status: 200;
240
+ data: Integration;
241
+ } | {
242
+ status: 400;
243
+ data: Error;
244
+ } | {
245
+ status: 401;
246
+ data: Error;
247
+ } | {
248
+ status: 403;
249
+ data: Error;
250
+ } | {
251
+ status: 404;
252
+ data: Error;
253
+ } | {
254
+ status: 422;
255
+ data: Error;
256
+ } | {
257
+ status: 500;
258
+ data: Error;
259
+ }>>;
218
260
  /**
219
261
  * Publish an integration
220
262
  */
221
263
  export declare function publishIntegration(body?: {
222
264
  /** The archive of the integration, including the .unito.json file. */
223
- file: Blob;
224
- }, opts?: Oazapfts.RequestOpts): Promise<Integration>;
265
+ file?: Blob;
266
+ }, opts?: Oazapfts.RequestOpts): Promise<Oazapfts.WithHeaders<{
267
+ status: 200;
268
+ data: Integration;
269
+ } | {
270
+ status: 400;
271
+ data: Error;
272
+ } | {
273
+ status: 401;
274
+ data: Error;
275
+ } | {
276
+ status: 403;
277
+ data: Error;
278
+ } | {
279
+ status: 404;
280
+ data: Error;
281
+ } | {
282
+ status: 422;
283
+ data: Error;
284
+ } | {
285
+ status: 500;
286
+ data: Error;
287
+ }>>;
225
288
  /**
226
289
  * Find an integration by exact name
227
290
  */
228
- export declare function getIntegrationByName(integrationName: string, opts?: Oazapfts.RequestOpts): Promise<Integration>;
291
+ export declare function getIntegrationByName(integrationName: string, opts?: Oazapfts.RequestOpts): Promise<Oazapfts.WithHeaders<{
292
+ status: 200;
293
+ data: Integration;
294
+ } | {
295
+ status: 400;
296
+ data: Error;
297
+ } | {
298
+ status: 401;
299
+ data: Error;
300
+ } | {
301
+ status: 403;
302
+ data: Error;
303
+ } | {
304
+ status: 404;
305
+ data: Error;
306
+ } | {
307
+ status: 422;
308
+ data: Error;
309
+ } | {
310
+ status: 500;
311
+ data: Error;
312
+ }>>;
229
313
  /**
230
314
  * Invite a user to an integration
231
315
  */
232
316
  export declare function inviteUser(integrationId: number, body?: {
233
317
  email?: string;
234
- }, opts?: Oazapfts.RequestOpts): Promise<unknown>;
318
+ }, opts?: Oazapfts.RequestOpts): Promise<Oazapfts.WithHeaders<{
319
+ status: 204;
320
+ } | {
321
+ status: 400;
322
+ data: Error;
323
+ } | {
324
+ status: 401;
325
+ data: Error;
326
+ } | {
327
+ status: 403;
328
+ data: Error;
329
+ } | {
330
+ status: 404;
331
+ data: Error;
332
+ } | {
333
+ status: 422;
334
+ data: Error;
335
+ } | {
336
+ status: 500;
337
+ data: Error;
338
+ }>>;
235
339
  /**
236
340
  * Invite a unito organization to an integration
237
341
  */
238
342
  export declare function inviteOrganization(integrationId: number, body?: {
239
343
  unitoOrganizationId?: string;
240
- }, opts?: Oazapfts.RequestOpts): Promise<Integration>;
344
+ }, opts?: Oazapfts.RequestOpts): Promise<Oazapfts.WithHeaders<{
345
+ status: 200;
346
+ data: Integration;
347
+ } | {
348
+ status: 400;
349
+ data: Error;
350
+ } | {
351
+ status: 401;
352
+ data: Error;
353
+ } | {
354
+ status: 403;
355
+ data: Error;
356
+ } | {
357
+ status: 404;
358
+ data: Error;
359
+ } | {
360
+ status: 422;
361
+ data: Error;
362
+ } | {
363
+ status: 500;
364
+ data: Error;
365
+ }>>;
241
366
  /**
242
367
  * Get an integration
243
368
  */
244
- export declare function getIntegrationById(integrationId: number, opts?: Oazapfts.RequestOpts): Promise<Integration>;
369
+ export declare function getIntegrationById(integrationId: number, opts?: Oazapfts.RequestOpts): Promise<Oazapfts.WithHeaders<{
370
+ status: 200;
371
+ data: Integration;
372
+ } | {
373
+ status: 400;
374
+ data: Error;
375
+ } | {
376
+ status: 401;
377
+ data: Error;
378
+ } | {
379
+ status: 403;
380
+ data: Error;
381
+ } | {
382
+ status: 404;
383
+ data: Error;
384
+ } | {
385
+ status: 422;
386
+ data: Error;
387
+ } | {
388
+ status: 500;
389
+ data: Error;
390
+ }>>;
245
391
  /**
246
392
  * Update an integration
247
393
  */
@@ -273,11 +419,52 @@ export declare function updateIntegration(integrationId: number, body?: {
273
419
  secrets?: {
274
420
  [key: string]: string;
275
421
  };
276
- }, opts?: Oazapfts.RequestOpts): Promise<Integration>;
422
+ }, opts?: Oazapfts.RequestOpts): Promise<Oazapfts.WithHeaders<{
423
+ status: 200;
424
+ data: Integration;
425
+ } | {
426
+ status: 400;
427
+ data: Error;
428
+ } | {
429
+ status: 401;
430
+ data: Error;
431
+ } | {
432
+ status: 403;
433
+ data: Error;
434
+ } | {
435
+ status: 404;
436
+ data: Error;
437
+ } | {
438
+ status: 422;
439
+ data: Error;
440
+ } | {
441
+ status: 500;
442
+ data: Error;
443
+ }>>;
277
444
  /**
278
445
  * Delete an integration
279
446
  */
280
- export declare function deleteIntegration(integrationId: number, name: string, opts?: Oazapfts.RequestOpts): Promise<unknown>;
447
+ export declare function deleteIntegration(integrationId: number, name: string, opts?: Oazapfts.RequestOpts): Promise<Oazapfts.WithHeaders<{
448
+ status: 204;
449
+ } | {
450
+ status: 400;
451
+ data: Error;
452
+ } | {
453
+ status: 401;
454
+ data: Error;
455
+ } | {
456
+ status: 403;
457
+ data: Error;
458
+ } | {
459
+ status: 404;
460
+ data: Error;
461
+ } | {
462
+ status: 422;
463
+ data: Error;
464
+ } | {
465
+ status: 500;
466
+ data: Error;
467
+ }>>;
281
468
  /**
282
469
  * Get the events associated with this integration.
283
470
  */
@@ -285,14 +472,53 @@ export declare function getIntegrationEvents(integrationId: number, { search, $f
285
472
  search?: string;
286
473
  $from?: number;
287
474
  limit?: number;
288
- }, opts?: Oazapfts.RequestOpts): Promise<Pagination & {
289
- /** The integration events. */
290
- data: IntegrationEvent[];
291
- }>;
475
+ }, opts?: Oazapfts.RequestOpts): Promise<Oazapfts.WithHeaders<{
476
+ status: 200;
477
+ data: Pagination & {
478
+ /** The integration events. */
479
+ data: IntegrationEvent[];
480
+ };
481
+ } | {
482
+ status: 400;
483
+ data: Error;
484
+ } | {
485
+ status: 401;
486
+ data: Error;
487
+ } | {
488
+ status: 403;
489
+ data: Error;
490
+ } | {
491
+ status: 404;
492
+ data: Error;
493
+ } | {
494
+ status: 500;
495
+ data: Error;
496
+ }>>;
292
497
  /**
293
498
  * Get the logo of the integration, in SVG format.
294
499
  */
295
- export declare function getIntegrationLogo(integrationName: string, opts?: Oazapfts.RequestOpts): Promise<Blob>;
500
+ export declare function getIntegrationLogo(integrationName: string, opts?: Oazapfts.RequestOpts): Promise<Oazapfts.WithHeaders<{
501
+ status: 200;
502
+ data: Blob;
503
+ } | {
504
+ status: 400;
505
+ data: Error;
506
+ } | {
507
+ status: 401;
508
+ data: Error;
509
+ } | {
510
+ status: 403;
511
+ data: Error;
512
+ } | {
513
+ status: 404;
514
+ data: Error;
515
+ } | {
516
+ status: 422;
517
+ data: Error;
518
+ } | {
519
+ status: 500;
520
+ data: Error;
521
+ }>>;
296
522
  /**
297
523
  * Get all the credentials
298
524
  */
@@ -317,10 +543,31 @@ export declare function getCredentials({ pagination, filters, }?: {
317
543
  /** The id of the credential account for which this credential belongs to. */
318
544
  credentialAccountId?: string;
319
545
  };
320
- }, opts?: Oazapfts.RequestOpts): Promise<Pagination & {
321
- /** The credentials. */
322
- data: Credential[];
323
- }>;
546
+ }, opts?: Oazapfts.RequestOpts): Promise<Oazapfts.WithHeaders<{
547
+ status: 200;
548
+ data: Pagination & {
549
+ /** The credentials. */
550
+ data: Credential[];
551
+ };
552
+ } | {
553
+ status: 400;
554
+ data: Error;
555
+ } | {
556
+ status: 401;
557
+ data: Error;
558
+ } | {
559
+ status: 403;
560
+ data: Error;
561
+ } | {
562
+ status: 404;
563
+ data: Error;
564
+ } | {
565
+ status: 422;
566
+ data: Error;
567
+ } | {
568
+ status: 500;
569
+ data: Error;
570
+ }>>;
324
571
  /**
325
572
  * Create a credential
326
573
  */
@@ -332,11 +579,53 @@ export declare function createCredential(body?: {
332
579
  };
333
580
  unitoUserId?: string;
334
581
  credentialAccountId?: string;
335
- }, opts?: Oazapfts.RequestOpts): Promise<Credential>;
582
+ }, opts?: Oazapfts.RequestOpts): Promise<Oazapfts.WithHeaders<{
583
+ status: 200;
584
+ data: Credential;
585
+ } | {
586
+ status: 400;
587
+ data: Error;
588
+ } | {
589
+ status: 401;
590
+ data: Error;
591
+ } | {
592
+ status: 403;
593
+ data: Error;
594
+ } | {
595
+ status: 404;
596
+ data: Error;
597
+ } | {
598
+ status: 422;
599
+ data: Error;
600
+ } | {
601
+ status: 500;
602
+ data: Error;
603
+ }>>;
336
604
  /**
337
605
  * Get a credential
338
606
  */
339
- export declare function getCredentialById(credentialId: number, opts?: Oazapfts.RequestOpts): Promise<Credential>;
607
+ export declare function getCredentialById(credentialId: number, opts?: Oazapfts.RequestOpts): Promise<Oazapfts.WithHeaders<{
608
+ status: 200;
609
+ data: Credential;
610
+ } | {
611
+ status: 400;
612
+ data: Error;
613
+ } | {
614
+ status: 401;
615
+ data: Error;
616
+ } | {
617
+ status: 403;
618
+ data: Error;
619
+ } | {
620
+ status: 404;
621
+ data: Error;
622
+ } | {
623
+ status: 422;
624
+ data: Error;
625
+ } | {
626
+ status: 500;
627
+ data: Error;
628
+ }>>;
340
629
  /**
341
630
  * Update a credential
342
631
  */
@@ -348,18 +637,80 @@ export declare function updateCredential(credentialId: number, body?: {
348
637
  archived?: boolean;
349
638
  unitoUserId?: string;
350
639
  credentialAccountId?: string;
351
- }, opts?: Oazapfts.RequestOpts): Promise<Credential>;
640
+ }, opts?: Oazapfts.RequestOpts): Promise<Oazapfts.WithHeaders<{
641
+ status: 200;
642
+ data: Credential;
643
+ } | {
644
+ status: 400;
645
+ data: Error;
646
+ } | {
647
+ status: 401;
648
+ data: Error;
649
+ } | {
650
+ status: 403;
651
+ data: Error;
652
+ } | {
653
+ status: 404;
654
+ data: Error;
655
+ } | {
656
+ status: 422;
657
+ data: Error;
658
+ } | {
659
+ status: 500;
660
+ data: Error;
661
+ }>>;
352
662
  /**
353
663
  * Delete a credential
354
664
  */
355
- export declare function deleteCredential(credentialId: number, opts?: Oazapfts.RequestOpts): Promise<unknown>;
665
+ export declare function deleteCredential(credentialId: number, opts?: Oazapfts.RequestOpts): Promise<Oazapfts.WithHeaders<{
666
+ status: 204;
667
+ } | {
668
+ status: 400;
669
+ data: Error;
670
+ } | {
671
+ status: 401;
672
+ data: Error;
673
+ } | {
674
+ status: 403;
675
+ data: Error;
676
+ } | {
677
+ status: 404;
678
+ data: Error;
679
+ } | {
680
+ status: 422;
681
+ data: Error;
682
+ } | {
683
+ status: 500;
684
+ data: Error;
685
+ }>>;
356
686
  /**
357
687
  * Returns the credentialAccount either from the integration's /me endpoint, if available, or the credential's latestCredentialAccount
358
688
  */
359
689
  export declare function getCredentialAccount(xUnitoCredentialId: string, { xUnitoCorrelationId, xUnitoAdditionalLoggingContext, }?: {
360
690
  xUnitoCorrelationId?: string;
361
691
  xUnitoAdditionalLoggingContext?: string;
362
- }, opts?: Oazapfts.RequestOpts): Promise<CredentialAccount>;
692
+ }, opts?: Oazapfts.RequestOpts): Promise<Oazapfts.WithHeaders<{
693
+ status: 200;
694
+ data: CredentialAccount;
695
+ } | {
696
+ status: 400;
697
+ data: Error;
698
+ } | {
699
+ status: 401;
700
+ data: Error;
701
+ } | {
702
+ status: 403;
703
+ data: Error;
704
+ } | {
705
+ status: 404;
706
+ data: Error;
707
+ } | {
708
+ status: 422;
709
+ data: Error;
710
+ } | {
711
+ status: 500;
712
+ data: Error;
713
+ }>>;
363
714
  /**
364
715
  * Used by the frontend to send analytics data
365
716
  */
@@ -369,7 +720,27 @@ export declare function postTrack(body: {
369
720
  payload?: {
370
721
  [key: string]: any;
371
722
  };
372
- }, opts?: Oazapfts.RequestOpts): Promise<unknown>;
723
+ }, opts?: Oazapfts.RequestOpts): Promise<Oazapfts.WithHeaders<{
724
+ status: 204;
725
+ } | {
726
+ status: 400;
727
+ data: Error;
728
+ } | {
729
+ status: 401;
730
+ data: Error;
731
+ } | {
732
+ status: 403;
733
+ data: Error;
734
+ } | {
735
+ status: 404;
736
+ data: Error;
737
+ } | {
738
+ status: 422;
739
+ data: Error;
740
+ } | {
741
+ status: 500;
742
+ data: Error;
743
+ }>>;
373
744
  /**
374
745
  * Encrypt data
375
746
  */
@@ -377,18 +748,60 @@ export declare function encryptData(body: {
377
748
  data: string;
378
749
  integrationName: string;
379
750
  sensitive?: boolean;
380
- }, opts?: Oazapfts.RequestOpts): Promise<{
381
- encryptedData: string;
382
- }>;
751
+ }, opts?: Oazapfts.RequestOpts): Promise<Oazapfts.WithHeaders<{
752
+ status: 200;
753
+ data: {
754
+ encryptedData: string;
755
+ };
756
+ } | {
757
+ status: 400;
758
+ data: Error;
759
+ } | {
760
+ status: 401;
761
+ data: Error;
762
+ } | {
763
+ status: 403;
764
+ data: Error;
765
+ } | {
766
+ status: 404;
767
+ data: Error;
768
+ } | {
769
+ status: 422;
770
+ data: Error;
771
+ } | {
772
+ status: 500;
773
+ data: Error;
774
+ }>>;
383
775
  /**
384
776
  * Decrypt data
385
777
  */
386
778
  export declare function decryptData(body: {
387
779
  data: string;
388
780
  integrationName: string;
389
- }, opts?: Oazapfts.RequestOpts): Promise<{
390
- decryptedData: string;
391
- }>;
781
+ }, opts?: Oazapfts.RequestOpts): Promise<Oazapfts.WithHeaders<{
782
+ status: 200;
783
+ data: {
784
+ decryptedData: string;
785
+ };
786
+ } | {
787
+ status: 400;
788
+ data: Error;
789
+ } | {
790
+ status: 401;
791
+ data: Error;
792
+ } | {
793
+ status: 403;
794
+ data: Error;
795
+ } | {
796
+ status: 404;
797
+ data: Error;
798
+ } | {
799
+ status: 422;
800
+ data: Error;
801
+ } | {
802
+ status: 500;
803
+ data: Error;
804
+ }>>;
392
805
  /**
393
806
  * Decrypt and encrypt data
394
807
  */
@@ -396,26 +809,110 @@ export declare function reencryptData(body: {
396
809
  encryptedData: string;
397
810
  integrationName: string;
398
811
  newIntegrationName: string;
399
- }, opts?: Oazapfts.RequestOpts): Promise<{
400
- encryptedData: string;
401
- }>;
812
+ }, opts?: Oazapfts.RequestOpts): Promise<Oazapfts.WithHeaders<{
813
+ status: 200;
814
+ data: {
815
+ encryptedData: string;
816
+ };
817
+ } | {
818
+ status: 400;
819
+ data: Error;
820
+ } | {
821
+ status: 401;
822
+ data: Error;
823
+ } | {
824
+ status: 403;
825
+ data: Error;
826
+ } | {
827
+ status: 404;
828
+ data: Error;
829
+ } | {
830
+ status: 422;
831
+ data: Error;
832
+ } | {
833
+ status: 500;
834
+ data: Error;
835
+ }>>;
402
836
  /**
403
837
  * Get my profile
404
838
  */
405
- export declare function getProfile(opts?: Oazapfts.RequestOpts): Promise<User>;
839
+ export declare function getProfile(opts?: Oazapfts.RequestOpts): Promise<Oazapfts.WithHeaders<{
840
+ status: 200;
841
+ data: User;
842
+ } | {
843
+ status: 400;
844
+ data: Error;
845
+ } | {
846
+ status: 401;
847
+ data: Error;
848
+ } | {
849
+ status: 403;
850
+ data: Error;
851
+ } | {
852
+ status: 404;
853
+ data: Error;
854
+ } | {
855
+ status: 422;
856
+ data: Error;
857
+ } | {
858
+ status: 500;
859
+ data: Error;
860
+ }>>;
406
861
  /**
407
862
  * Update my profile
408
863
  */
409
864
  export declare function updateProfile(body?: {
410
865
  termsAccepted?: boolean;
411
- }, opts?: Oazapfts.RequestOpts): Promise<User>;
866
+ }, opts?: Oazapfts.RequestOpts): Promise<Oazapfts.WithHeaders<{
867
+ status: 200;
868
+ data: User;
869
+ } | {
870
+ status: 400;
871
+ data: Error;
872
+ } | {
873
+ status: 401;
874
+ data: Error;
875
+ } | {
876
+ status: 403;
877
+ data: Error;
878
+ } | {
879
+ status: 404;
880
+ data: Error;
881
+ } | {
882
+ status: 422;
883
+ data: Error;
884
+ } | {
885
+ status: 500;
886
+ data: Error;
887
+ }>>;
412
888
  /**
413
889
  * Call an integration's me
414
890
  */
415
891
  export declare function getProxyMe(xUnitoCredentialId: string, { xUnitoCorrelationId, xUnitoAdditionalLoggingContext, }?: {
416
892
  xUnitoCorrelationId?: string;
417
893
  xUnitoAdditionalLoggingContext?: string;
418
- }, opts?: Oazapfts.RequestOpts): Promise<CredentialAccount>;
894
+ }, opts?: Oazapfts.RequestOpts): Promise<Oazapfts.WithHeaders<{
895
+ status: 200;
896
+ data: CredentialAccount;
897
+ } | {
898
+ status: 400;
899
+ data: Error;
900
+ } | {
901
+ status: 401;
902
+ data: Error;
903
+ } | {
904
+ status: 403;
905
+ data: Error;
906
+ } | {
907
+ status: 404;
908
+ data: Error;
909
+ } | {
910
+ status: 422;
911
+ data: Error;
912
+ } | {
913
+ status: 500;
914
+ data: Error;
915
+ }>>;
419
916
  /**
420
917
  * Update a webhook subscription
421
918
  */
@@ -426,35 +923,168 @@ export declare function updateWebhookSubscription(xUnitoCredentialId: string, bo
426
923
  }, { xUnitoCorrelationId, xUnitoAdditionalLoggingContext, }?: {
427
924
  xUnitoCorrelationId?: string;
428
925
  xUnitoAdditionalLoggingContext?: string;
429
- }, opts?: Oazapfts.RequestOpts): Promise<unknown>;
926
+ }, opts?: Oazapfts.RequestOpts): Promise<Oazapfts.WithHeaders<{
927
+ status: 202;
928
+ } | {
929
+ status: 204;
930
+ } | {
931
+ status: 400;
932
+ data: Error;
933
+ } | {
934
+ status: 401;
935
+ data: Error;
936
+ } | {
937
+ status: 403;
938
+ data: Error;
939
+ } | {
940
+ status: 404;
941
+ data: Error;
942
+ } | {
943
+ status: 422;
944
+ data: Error;
945
+ } | {
946
+ status: 500;
947
+ data: Error;
948
+ }>>;
430
949
  /**
431
950
  * Call an integration's graph
432
951
  */
433
- export declare function getProxyGraph(xUnitoCredentialId: string, path: string, { xUnitoCorrelationId, xUnitoAdditionalLoggingContext, }?: {
952
+ export declare function getProxyGraph(xUnitoCredentialId: string, path: string, { xUnitoCorrelationId, xUnitoAdditionalLoggingContext, accept, }?: {
434
953
  xUnitoCorrelationId?: string;
435
954
  xUnitoAdditionalLoggingContext?: string;
436
- }, opts?: Oazapfts.RequestOpts): Promise<any>;
955
+ accept?: string;
956
+ }, opts?: Oazapfts.RequestOpts): Promise<Oazapfts.WithHeaders<{
957
+ status: 200;
958
+ data: object | any;
959
+ } | {
960
+ status: 400;
961
+ data: Error;
962
+ } | {
963
+ status: 401;
964
+ data: Error;
965
+ } | {
966
+ status: 403;
967
+ data: Error;
968
+ } | {
969
+ status: 404;
970
+ data: Error;
971
+ } | {
972
+ status: 406;
973
+ data: Error;
974
+ } | {
975
+ status: 410;
976
+ data: Error;
977
+ } | {
978
+ status: 422;
979
+ data: Error;
980
+ } | {
981
+ status: 500;
982
+ data: Error;
983
+ }>>;
437
984
  /**
438
985
  * Call an integration's graph
439
986
  */
440
- export declare function patchProxyGraph(xUnitoCredentialId: string, path: string, body?: object, { xUnitoCorrelationId, xUnitoAdditionalLoggingContext, }?: {
987
+ export declare function patchProxyGraph(xUnitoCredentialId: string, path: string, body?: object, { xUnitoCorrelationId, xUnitoAdditionalLoggingContext, contentType, }?: {
441
988
  xUnitoCorrelationId?: string;
442
989
  xUnitoAdditionalLoggingContext?: string;
443
- }, opts?: Oazapfts.RequestOpts): Promise<any>;
990
+ contentType?: string;
991
+ }, opts?: Oazapfts.RequestOpts): Promise<Oazapfts.WithHeaders<{
992
+ status: 200;
993
+ data: object | any;
994
+ } | {
995
+ status: 400;
996
+ data: Error;
997
+ } | {
998
+ status: 401;
999
+ data: Error;
1000
+ } | {
1001
+ status: 403;
1002
+ data: Error;
1003
+ } | {
1004
+ status: 404;
1005
+ data: Error;
1006
+ } | {
1007
+ status: 406;
1008
+ data: Error;
1009
+ } | {
1010
+ status: 410;
1011
+ data: Error;
1012
+ } | {
1013
+ status: 422;
1014
+ data: Error;
1015
+ } | {
1016
+ status: 500;
1017
+ data: Error;
1018
+ }>>;
444
1019
  /**
445
1020
  * Call an integration's graph
446
1021
  */
447
- export declare function postProxyGraph(xUnitoCredentialId: string, path: string, body?: object, { xUnitoCorrelationId, xUnitoAdditionalLoggingContext, }?: {
1022
+ export declare function postProxyGraph(xUnitoCredentialId: string, path: string, body?: object, { xUnitoCorrelationId, xUnitoAdditionalLoggingContext, contentType, }?: {
448
1023
  xUnitoCorrelationId?: string;
449
1024
  xUnitoAdditionalLoggingContext?: string;
450
- }, opts?: Oazapfts.RequestOpts): Promise<any>;
1025
+ contentType?: string;
1026
+ }, opts?: Oazapfts.RequestOpts): Promise<Oazapfts.WithHeaders<{
1027
+ status: 200;
1028
+ data: object | any;
1029
+ } | {
1030
+ status: 400;
1031
+ data: Error;
1032
+ } | {
1033
+ status: 401;
1034
+ data: Error;
1035
+ } | {
1036
+ status: 403;
1037
+ data: Error;
1038
+ } | {
1039
+ status: 404;
1040
+ data: Error;
1041
+ } | {
1042
+ status: 406;
1043
+ data: Error;
1044
+ } | {
1045
+ status: 410;
1046
+ data: Error;
1047
+ } | {
1048
+ status: 422;
1049
+ data: Error;
1050
+ } | {
1051
+ status: 500;
1052
+ data: Error;
1053
+ }>>;
451
1054
  /**
452
1055
  * Call an integration's graph
453
1056
  */
454
1057
  export declare function deleteProxyGraph(xUnitoCredentialId: string, path: string, { xUnitoCorrelationId, xUnitoAdditionalLoggingContext, }?: {
455
1058
  xUnitoCorrelationId?: string;
456
1059
  xUnitoAdditionalLoggingContext?: string;
457
- }, opts?: Oazapfts.RequestOpts): Promise<any>;
1060
+ }, opts?: Oazapfts.RequestOpts): Promise<Oazapfts.WithHeaders<{
1061
+ status: 200;
1062
+ data: object | any;
1063
+ } | {
1064
+ status: 400;
1065
+ data: Error;
1066
+ } | {
1067
+ status: 401;
1068
+ data: Error;
1069
+ } | {
1070
+ status: 403;
1071
+ data: Error;
1072
+ } | {
1073
+ status: 404;
1074
+ data: Error;
1075
+ } | {
1076
+ status: 406;
1077
+ data: Error;
1078
+ } | {
1079
+ status: 410;
1080
+ data: Error;
1081
+ } | {
1082
+ status: 422;
1083
+ data: Error;
1084
+ } | {
1085
+ status: 500;
1086
+ data: Error;
1087
+ }>>;
458
1088
  /**
459
1089
  * Get all the users
460
1090
  */
@@ -465,10 +1095,31 @@ export declare function getUsers({ pagination, }?: {
465
1095
  /** Maximum number of results after the offset */
466
1096
  limit?: number;
467
1097
  };
468
- }, opts?: Oazapfts.RequestOpts): Promise<Pagination & {
469
- /** The users. */
470
- data: UserSummary[];
471
- }>;
1098
+ }, opts?: Oazapfts.RequestOpts): Promise<Oazapfts.WithHeaders<{
1099
+ status: 200;
1100
+ data: Pagination & {
1101
+ /** The users. */
1102
+ data: UserSummary[];
1103
+ };
1104
+ } | {
1105
+ status: 400;
1106
+ data: Error;
1107
+ } | {
1108
+ status: 401;
1109
+ data: Error;
1110
+ } | {
1111
+ status: 403;
1112
+ data: Error;
1113
+ } | {
1114
+ status: 404;
1115
+ data: Error;
1116
+ } | {
1117
+ status: 422;
1118
+ data: Error;
1119
+ } | {
1120
+ status: 500;
1121
+ data: Error;
1122
+ }>>;
472
1123
  /**
473
1124
  * Create a user
474
1125
  */
@@ -476,11 +1127,53 @@ export declare function createUser(body: {
476
1127
  email: string;
477
1128
  defaultUnitoOrganizationId?: string | null;
478
1129
  role: UserRole;
479
- }, opts?: Oazapfts.RequestOpts): Promise<User>;
1130
+ }, opts?: Oazapfts.RequestOpts): Promise<Oazapfts.WithHeaders<{
1131
+ status: 200;
1132
+ data: User;
1133
+ } | {
1134
+ status: 400;
1135
+ data: Error;
1136
+ } | {
1137
+ status: 401;
1138
+ data: Error;
1139
+ } | {
1140
+ status: 403;
1141
+ data: Error;
1142
+ } | {
1143
+ status: 404;
1144
+ data: Error;
1145
+ } | {
1146
+ status: 422;
1147
+ data: Error;
1148
+ } | {
1149
+ status: 500;
1150
+ data: Error;
1151
+ }>>;
480
1152
  /**
481
1153
  * Get a user
482
1154
  */
483
- export declare function getUserById(userId: number, opts?: Oazapfts.RequestOpts): Promise<User>;
1155
+ export declare function getUserById(userId: number, opts?: Oazapfts.RequestOpts): Promise<Oazapfts.WithHeaders<{
1156
+ status: 200;
1157
+ data: User;
1158
+ } | {
1159
+ status: 400;
1160
+ data: Error;
1161
+ } | {
1162
+ status: 401;
1163
+ data: Error;
1164
+ } | {
1165
+ status: 403;
1166
+ data: Error;
1167
+ } | {
1168
+ status: 404;
1169
+ data: Error;
1170
+ } | {
1171
+ status: 422;
1172
+ data: Error;
1173
+ } | {
1174
+ status: 500;
1175
+ data: Error;
1176
+ }>>;
484
1177
  /**
485
1178
  * Update a user
486
1179
  */
@@ -489,50 +1182,75 @@ export declare function updateUser(userId: number, body: {
489
1182
  role?: UserRole;
490
1183
  archived?: boolean;
491
1184
  defaultUnitoOrganizationId?: string | null;
492
- }, opts?: Oazapfts.RequestOpts): Promise<User>;
1185
+ }, opts?: Oazapfts.RequestOpts): Promise<Oazapfts.WithHeaders<{
1186
+ status: 200;
1187
+ data: User;
1188
+ } | {
1189
+ status: 400;
1190
+ data: Error;
1191
+ } | {
1192
+ status: 401;
1193
+ data: Error;
1194
+ } | {
1195
+ status: 403;
1196
+ data: Error;
1197
+ } | {
1198
+ status: 404;
1199
+ data: Error;
1200
+ } | {
1201
+ status: 422;
1202
+ data: Error;
1203
+ } | {
1204
+ status: 500;
1205
+ data: Error;
1206
+ }>>;
493
1207
  /**
494
1208
  * Regenerate the api key of a user
495
1209
  */
496
- export declare function regenerateApiKey(userId: number, opts?: Oazapfts.RequestOpts): Promise<User>;
1210
+ export declare function regenerateApiKey(userId: number, opts?: Oazapfts.RequestOpts): Promise<Oazapfts.WithHeaders<{
1211
+ status: 200;
1212
+ data: User;
1213
+ } | {
1214
+ status: 400;
1215
+ data: Error;
1216
+ } | {
1217
+ status: 401;
1218
+ data: Error;
1219
+ } | {
1220
+ status: 403;
1221
+ data: Error;
1222
+ } | {
1223
+ status: 404;
1224
+ data: Error;
1225
+ } | {
1226
+ status: 422;
1227
+ data: Error;
1228
+ } | {
1229
+ status: 500;
1230
+ data: Error;
1231
+ }>>;
497
1232
  /**
498
1233
  * Get a user by its email address
499
1234
  */
500
- export declare function getUserByEmail(email: string, opts?: Oazapfts.RequestOpts): Promise<User>;
501
- import { HttpError } from '@oazapfts/runtime';
502
- export { HttpError };
503
- import * as IntegrationApi from '@unito/integration-api';
504
- /**
505
- * Return true if object has the shape of an item, false otherwise.
506
- * @param object
507
- */
508
- export declare function isIntegrationApiItem(object: any): object is IntegrationApi.Item;
509
- /**
510
- * Return true if object has the shape of an item, false otherwise.
511
- * @param object
512
- */
513
- export declare function isIntegrationApiItemSummary(object: any): object is IntegrationApi.ItemSummary;
514
- /**
515
- * Return true if object has the shape of a collection, false otherwise.
516
- * @param object
517
- */
518
- export declare function isIntegrationApiCollection(object: any): object is IntegrationApi.Collection;
519
- export declare function getProxyGraphItem(xUnitoCredentialId: string, path: string, { xUnitoCorrelationId, xUnitoAdditionalLoggingContext, }?: {
520
- xUnitoCorrelationId?: string;
521
- xUnitoAdditionalLoggingContext?: string;
522
- }, opts?: Oazapfts.RequestOpts): Promise<IntegrationApi.Item>;
523
- export declare function getProxyGraphCollection(xUnitoCredentialId: string, path: string, { xUnitoCorrelationId, xUnitoAdditionalLoggingContext, }?: {
524
- xUnitoCorrelationId?: string;
525
- xUnitoAdditionalLoggingContext?: string;
526
- }, opts?: Oazapfts.RequestOpts): Promise<IntegrationApi.Collection>;
527
- export declare function patchProxyGraphItem(xUnitoCredentialId: string, path: string, body?: object, { xUnitoCorrelationId, xUnitoAdditionalLoggingContext, }?: {
528
- xUnitoCorrelationId?: string;
529
- xUnitoAdditionalLoggingContext?: string;
530
- }, opts?: Oazapfts.RequestOpts): Promise<IntegrationApi.Item>;
531
- export declare function postProxyGraphCollection(xUnitoCredentialId: string, path: string, body?: object, { xUnitoCorrelationId, xUnitoAdditionalLoggingContext, }?: {
532
- xUnitoCorrelationId?: string;
533
- xUnitoAdditionalLoggingContext?: string;
534
- }, opts?: Oazapfts.RequestOpts): Promise<IntegrationApi.ItemSummary>;
535
- export declare function deleteProxyGraphItem(xUnitoCredentialId: string, path: string, { xUnitoCorrelationId, xUnitoAdditionalLoggingContext, }?: {
536
- xUnitoCorrelationId?: string;
537
- xUnitoAdditionalLoggingContext?: string;
538
- }, opts?: Oazapfts.RequestOpts): Promise<void>;
1235
+ export declare function getUserByEmail(email: string, opts?: Oazapfts.RequestOpts): Promise<Oazapfts.WithHeaders<{
1236
+ status: 200;
1237
+ data: User;
1238
+ } | {
1239
+ status: 400;
1240
+ data: Error;
1241
+ } | {
1242
+ status: 401;
1243
+ data: Error;
1244
+ } | {
1245
+ status: 403;
1246
+ data: Error;
1247
+ } | {
1248
+ status: 404;
1249
+ data: Error;
1250
+ } | {
1251
+ status: 422;
1252
+ data: Error;
1253
+ } | {
1254
+ status: 500;
1255
+ data: Error;
1256
+ }>>;