@aifeatures/backend 0.1.2 → 0.1.3
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/index.cjs +63 -59
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +102 -102
- package/dist/index.d.ts +102 -102
- package/dist/index.js +46 -42
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.d.cts
CHANGED
|
@@ -432,13 +432,13 @@ type SubmissionsList = {
|
|
|
432
432
|
limit: number;
|
|
433
433
|
offset: number;
|
|
434
434
|
};
|
|
435
|
-
type
|
|
435
|
+
type ListFormsWithSiteTokenData = {
|
|
436
436
|
body?: never;
|
|
437
437
|
path?: never;
|
|
438
438
|
query?: never;
|
|
439
439
|
url: "/api/v1/forms";
|
|
440
440
|
};
|
|
441
|
-
type
|
|
441
|
+
type ListFormsWithSiteTokenErrors = {
|
|
442
442
|
/**
|
|
443
443
|
* Unauthorized - requires site token
|
|
444
444
|
*/
|
|
@@ -448,21 +448,21 @@ type GetApiV1FormsErrors = {
|
|
|
448
448
|
*/
|
|
449
449
|
404: Error;
|
|
450
450
|
};
|
|
451
|
-
type
|
|
452
|
-
type
|
|
451
|
+
type ListFormsWithSiteTokenError = ListFormsWithSiteTokenErrors[keyof ListFormsWithSiteTokenErrors];
|
|
452
|
+
type ListFormsWithSiteTokenResponses = {
|
|
453
453
|
/**
|
|
454
454
|
* List of forms
|
|
455
455
|
*/
|
|
456
456
|
200: FormsList;
|
|
457
457
|
};
|
|
458
|
-
type
|
|
459
|
-
type
|
|
458
|
+
type ListFormsWithSiteTokenResponse = ListFormsWithSiteTokenResponses[keyof ListFormsWithSiteTokenResponses];
|
|
459
|
+
type CreateFormWithSiteTokenData = {
|
|
460
460
|
body: CreateForm;
|
|
461
461
|
path?: never;
|
|
462
462
|
query?: never;
|
|
463
463
|
url: "/api/v1/forms";
|
|
464
464
|
};
|
|
465
|
-
type
|
|
465
|
+
type CreateFormWithSiteTokenErrors = {
|
|
466
466
|
/**
|
|
467
467
|
* Unauthorized - requires site token
|
|
468
468
|
*/
|
|
@@ -472,41 +472,41 @@ type PostApiV1FormsErrors = {
|
|
|
472
472
|
*/
|
|
473
473
|
404: Error;
|
|
474
474
|
};
|
|
475
|
-
type
|
|
476
|
-
type
|
|
475
|
+
type CreateFormWithSiteTokenError = CreateFormWithSiteTokenErrors[keyof CreateFormWithSiteTokenErrors];
|
|
476
|
+
type CreateFormWithSiteTokenResponses = {
|
|
477
477
|
/**
|
|
478
478
|
* Form created successfully
|
|
479
479
|
*/
|
|
480
480
|
201: Form;
|
|
481
481
|
};
|
|
482
|
-
type
|
|
483
|
-
type
|
|
482
|
+
type CreateFormWithSiteTokenResponse = CreateFormWithSiteTokenResponses[keyof CreateFormWithSiteTokenResponses];
|
|
483
|
+
type ListSitesData = {
|
|
484
484
|
body?: never;
|
|
485
485
|
path?: never;
|
|
486
486
|
query?: never;
|
|
487
487
|
url: "/api/v1/sites";
|
|
488
488
|
};
|
|
489
|
-
type
|
|
489
|
+
type ListSitesErrors = {
|
|
490
490
|
/**
|
|
491
491
|
* Unauthorized
|
|
492
492
|
*/
|
|
493
493
|
401: Error;
|
|
494
494
|
};
|
|
495
|
-
type
|
|
496
|
-
type
|
|
495
|
+
type ListSitesError = ListSitesErrors[keyof ListSitesErrors];
|
|
496
|
+
type ListSitesResponses = {
|
|
497
497
|
/**
|
|
498
498
|
* List of sites
|
|
499
499
|
*/
|
|
500
500
|
200: SitesList;
|
|
501
501
|
};
|
|
502
|
-
type
|
|
503
|
-
type
|
|
502
|
+
type ListSitesResponse = ListSitesResponses[keyof ListSitesResponses];
|
|
503
|
+
type CreateSiteData = {
|
|
504
504
|
body: CreateSite;
|
|
505
505
|
path?: never;
|
|
506
506
|
query?: never;
|
|
507
507
|
url: "/api/v1/sites";
|
|
508
508
|
};
|
|
509
|
-
type
|
|
509
|
+
type CreateSiteErrors = {
|
|
510
510
|
/**
|
|
511
511
|
* Unauthorized
|
|
512
512
|
*/
|
|
@@ -516,15 +516,15 @@ type PostApiV1SitesErrors = {
|
|
|
516
516
|
*/
|
|
517
517
|
409: Error;
|
|
518
518
|
};
|
|
519
|
-
type
|
|
520
|
-
type
|
|
519
|
+
type CreateSiteError = CreateSiteErrors[keyof CreateSiteErrors];
|
|
520
|
+
type CreateSiteResponses = {
|
|
521
521
|
/**
|
|
522
522
|
* Site created successfully. The api_token is only returned once!
|
|
523
523
|
*/
|
|
524
524
|
201: SiteWithToken;
|
|
525
525
|
};
|
|
526
|
-
type
|
|
527
|
-
type
|
|
526
|
+
type CreateSiteResponse = CreateSiteResponses[keyof CreateSiteResponses];
|
|
527
|
+
type DeleteSiteData = {
|
|
528
528
|
body?: never;
|
|
529
529
|
path: {
|
|
530
530
|
siteId: string;
|
|
@@ -532,7 +532,7 @@ type DeleteApiV1SitesBySiteIdData = {
|
|
|
532
532
|
query?: never;
|
|
533
533
|
url: "/api/v1/sites/{siteId}";
|
|
534
534
|
};
|
|
535
|
-
type
|
|
535
|
+
type DeleteSiteErrors = {
|
|
536
536
|
/**
|
|
537
537
|
* Unauthorized
|
|
538
538
|
*/
|
|
@@ -542,15 +542,15 @@ type DeleteApiV1SitesBySiteIdErrors = {
|
|
|
542
542
|
*/
|
|
543
543
|
404: Error;
|
|
544
544
|
};
|
|
545
|
-
type
|
|
546
|
-
type
|
|
545
|
+
type DeleteSiteError = DeleteSiteErrors[keyof DeleteSiteErrors];
|
|
546
|
+
type DeleteSiteResponses = {
|
|
547
547
|
/**
|
|
548
548
|
* Site deleted successfully
|
|
549
549
|
*/
|
|
550
550
|
204: void;
|
|
551
551
|
};
|
|
552
|
-
type
|
|
553
|
-
type
|
|
552
|
+
type DeleteSiteResponse = DeleteSiteResponses[keyof DeleteSiteResponses];
|
|
553
|
+
type GetSiteData = {
|
|
554
554
|
body?: never;
|
|
555
555
|
path: {
|
|
556
556
|
siteId: string;
|
|
@@ -558,7 +558,7 @@ type GetApiV1SitesBySiteIdData = {
|
|
|
558
558
|
query?: never;
|
|
559
559
|
url: "/api/v1/sites/{siteId}";
|
|
560
560
|
};
|
|
561
|
-
type
|
|
561
|
+
type GetSiteErrors = {
|
|
562
562
|
/**
|
|
563
563
|
* Unauthorized
|
|
564
564
|
*/
|
|
@@ -568,15 +568,15 @@ type GetApiV1SitesBySiteIdErrors = {
|
|
|
568
568
|
*/
|
|
569
569
|
404: Error;
|
|
570
570
|
};
|
|
571
|
-
type
|
|
572
|
-
type
|
|
571
|
+
type GetSiteError = GetSiteErrors[keyof GetSiteErrors];
|
|
572
|
+
type GetSiteResponses = {
|
|
573
573
|
/**
|
|
574
574
|
* Site details
|
|
575
575
|
*/
|
|
576
576
|
200: Site;
|
|
577
577
|
};
|
|
578
|
-
type
|
|
579
|
-
type
|
|
578
|
+
type GetSiteResponse = GetSiteResponses[keyof GetSiteResponses];
|
|
579
|
+
type UpdateSiteData = {
|
|
580
580
|
body: UpdateSite;
|
|
581
581
|
path: {
|
|
582
582
|
siteId: string;
|
|
@@ -584,7 +584,7 @@ type PatchApiV1SitesBySiteIdData = {
|
|
|
584
584
|
query?: never;
|
|
585
585
|
url: "/api/v1/sites/{siteId}";
|
|
586
586
|
};
|
|
587
|
-
type
|
|
587
|
+
type UpdateSiteErrors = {
|
|
588
588
|
/**
|
|
589
589
|
* Unauthorized
|
|
590
590
|
*/
|
|
@@ -594,15 +594,15 @@ type PatchApiV1SitesBySiteIdErrors = {
|
|
|
594
594
|
*/
|
|
595
595
|
404: Error;
|
|
596
596
|
};
|
|
597
|
-
type
|
|
598
|
-
type
|
|
597
|
+
type UpdateSiteError = UpdateSiteErrors[keyof UpdateSiteErrors];
|
|
598
|
+
type UpdateSiteResponses = {
|
|
599
599
|
/**
|
|
600
600
|
* Site updated successfully
|
|
601
601
|
*/
|
|
602
602
|
200: Site;
|
|
603
603
|
};
|
|
604
|
-
type
|
|
605
|
-
type
|
|
604
|
+
type UpdateSiteResponse = UpdateSiteResponses[keyof UpdateSiteResponses];
|
|
605
|
+
type UpdateSiteDomainsData = {
|
|
606
606
|
body: UpdateSiteDomains;
|
|
607
607
|
path: {
|
|
608
608
|
siteId: string;
|
|
@@ -610,7 +610,7 @@ type PatchApiV1SitesBySiteIdDomainsData = {
|
|
|
610
610
|
query?: never;
|
|
611
611
|
url: "/api/v1/sites/{siteId}/domains";
|
|
612
612
|
};
|
|
613
|
-
type
|
|
613
|
+
type UpdateSiteDomainsErrors = {
|
|
614
614
|
/**
|
|
615
615
|
* Unauthorized
|
|
616
616
|
*/
|
|
@@ -620,15 +620,15 @@ type PatchApiV1SitesBySiteIdDomainsErrors = {
|
|
|
620
620
|
*/
|
|
621
621
|
404: Error;
|
|
622
622
|
};
|
|
623
|
-
type
|
|
624
|
-
type
|
|
623
|
+
type UpdateSiteDomainsError = UpdateSiteDomainsErrors[keyof UpdateSiteDomainsErrors];
|
|
624
|
+
type UpdateSiteDomainsResponses = {
|
|
625
625
|
/**
|
|
626
626
|
* Site domains updated successfully
|
|
627
627
|
*/
|
|
628
628
|
200: SiteDomains;
|
|
629
629
|
};
|
|
630
|
-
type
|
|
631
|
-
type
|
|
630
|
+
type UpdateSiteDomainsResponse = UpdateSiteDomainsResponses[keyof UpdateSiteDomainsResponses];
|
|
631
|
+
type ListFormsData = {
|
|
632
632
|
body?: never;
|
|
633
633
|
path: {
|
|
634
634
|
siteId: string;
|
|
@@ -636,7 +636,7 @@ type GetApiV1SitesBySiteIdFormsData = {
|
|
|
636
636
|
query?: never;
|
|
637
637
|
url: "/api/v1/sites/{siteId}/forms";
|
|
638
638
|
};
|
|
639
|
-
type
|
|
639
|
+
type ListFormsErrors = {
|
|
640
640
|
/**
|
|
641
641
|
* Unauthorized
|
|
642
642
|
*/
|
|
@@ -646,15 +646,15 @@ type GetApiV1SitesBySiteIdFormsErrors = {
|
|
|
646
646
|
*/
|
|
647
647
|
404: Error;
|
|
648
648
|
};
|
|
649
|
-
type
|
|
650
|
-
type
|
|
649
|
+
type ListFormsError = ListFormsErrors[keyof ListFormsErrors];
|
|
650
|
+
type ListFormsResponses = {
|
|
651
651
|
/**
|
|
652
652
|
* List of forms
|
|
653
653
|
*/
|
|
654
654
|
200: FormsList;
|
|
655
655
|
};
|
|
656
|
-
type
|
|
657
|
-
type
|
|
656
|
+
type ListFormsResponse = ListFormsResponses[keyof ListFormsResponses];
|
|
657
|
+
type CreateFormData = {
|
|
658
658
|
body: CreateForm;
|
|
659
659
|
path: {
|
|
660
660
|
siteId: string;
|
|
@@ -662,7 +662,7 @@ type PostApiV1SitesBySiteIdFormsData = {
|
|
|
662
662
|
query?: never;
|
|
663
663
|
url: "/api/v1/sites/{siteId}/forms";
|
|
664
664
|
};
|
|
665
|
-
type
|
|
665
|
+
type CreateFormErrors = {
|
|
666
666
|
/**
|
|
667
667
|
* Unauthorized
|
|
668
668
|
*/
|
|
@@ -672,15 +672,15 @@ type PostApiV1SitesBySiteIdFormsErrors = {
|
|
|
672
672
|
*/
|
|
673
673
|
404: Error;
|
|
674
674
|
};
|
|
675
|
-
type
|
|
676
|
-
type
|
|
675
|
+
type CreateFormError = CreateFormErrors[keyof CreateFormErrors];
|
|
676
|
+
type CreateFormResponses = {
|
|
677
677
|
/**
|
|
678
678
|
* Form created successfully
|
|
679
679
|
*/
|
|
680
680
|
201: Form;
|
|
681
681
|
};
|
|
682
|
-
type
|
|
683
|
-
type
|
|
682
|
+
type CreateFormResponse = CreateFormResponses[keyof CreateFormResponses];
|
|
683
|
+
type DeleteFormData = {
|
|
684
684
|
body?: never;
|
|
685
685
|
path: {
|
|
686
686
|
formId: string;
|
|
@@ -688,7 +688,7 @@ type DeleteApiV1FormsByFormIdData = {
|
|
|
688
688
|
query?: never;
|
|
689
689
|
url: "/api/v1/forms/{formId}";
|
|
690
690
|
};
|
|
691
|
-
type
|
|
691
|
+
type DeleteFormErrors = {
|
|
692
692
|
/**
|
|
693
693
|
* Unauthorized
|
|
694
694
|
*/
|
|
@@ -698,15 +698,15 @@ type DeleteApiV1FormsByFormIdErrors = {
|
|
|
698
698
|
*/
|
|
699
699
|
404: Error;
|
|
700
700
|
};
|
|
701
|
-
type
|
|
702
|
-
type
|
|
701
|
+
type DeleteFormError = DeleteFormErrors[keyof DeleteFormErrors];
|
|
702
|
+
type DeleteFormResponses = {
|
|
703
703
|
/**
|
|
704
704
|
* Form deleted successfully
|
|
705
705
|
*/
|
|
706
706
|
204: void;
|
|
707
707
|
};
|
|
708
|
-
type
|
|
709
|
-
type
|
|
708
|
+
type DeleteFormResponse = DeleteFormResponses[keyof DeleteFormResponses];
|
|
709
|
+
type GetFormData = {
|
|
710
710
|
body?: never;
|
|
711
711
|
path: {
|
|
712
712
|
formId: string;
|
|
@@ -714,7 +714,7 @@ type GetApiV1FormsByFormIdData = {
|
|
|
714
714
|
query?: never;
|
|
715
715
|
url: "/api/v1/forms/{formId}";
|
|
716
716
|
};
|
|
717
|
-
type
|
|
717
|
+
type GetFormErrors = {
|
|
718
718
|
/**
|
|
719
719
|
* Unauthorized
|
|
720
720
|
*/
|
|
@@ -724,15 +724,15 @@ type GetApiV1FormsByFormIdErrors = {
|
|
|
724
724
|
*/
|
|
725
725
|
404: Error;
|
|
726
726
|
};
|
|
727
|
-
type
|
|
728
|
-
type
|
|
727
|
+
type GetFormError = GetFormErrors[keyof GetFormErrors];
|
|
728
|
+
type GetFormResponses = {
|
|
729
729
|
/**
|
|
730
730
|
* Form details
|
|
731
731
|
*/
|
|
732
732
|
200: Form;
|
|
733
733
|
};
|
|
734
|
-
type
|
|
735
|
-
type
|
|
734
|
+
type GetFormResponse = GetFormResponses[keyof GetFormResponses];
|
|
735
|
+
type UpdateFormData = {
|
|
736
736
|
body: UpdateForm;
|
|
737
737
|
path: {
|
|
738
738
|
formId: string;
|
|
@@ -740,7 +740,7 @@ type PatchApiV1FormsByFormIdData = {
|
|
|
740
740
|
query?: never;
|
|
741
741
|
url: "/api/v1/forms/{formId}";
|
|
742
742
|
};
|
|
743
|
-
type
|
|
743
|
+
type UpdateFormErrors = {
|
|
744
744
|
/**
|
|
745
745
|
* Unauthorized
|
|
746
746
|
*/
|
|
@@ -750,15 +750,15 @@ type PatchApiV1FormsByFormIdErrors = {
|
|
|
750
750
|
*/
|
|
751
751
|
404: Error;
|
|
752
752
|
};
|
|
753
|
-
type
|
|
754
|
-
type
|
|
753
|
+
type UpdateFormError = UpdateFormErrors[keyof UpdateFormErrors];
|
|
754
|
+
type UpdateFormResponses = {
|
|
755
755
|
/**
|
|
756
756
|
* Form updated successfully
|
|
757
757
|
*/
|
|
758
758
|
200: Form;
|
|
759
759
|
};
|
|
760
|
-
type
|
|
761
|
-
type
|
|
760
|
+
type UpdateFormResponse = UpdateFormResponses[keyof UpdateFormResponses];
|
|
761
|
+
type ListSubmissionsData = {
|
|
762
762
|
body?: never;
|
|
763
763
|
path: {
|
|
764
764
|
formId: string;
|
|
@@ -779,7 +779,7 @@ type GetApiV1FormsByFormIdSubmissionsData = {
|
|
|
779
779
|
};
|
|
780
780
|
url: "/api/v1/forms/{formId}/submissions";
|
|
781
781
|
};
|
|
782
|
-
type
|
|
782
|
+
type ListSubmissionsErrors = {
|
|
783
783
|
/**
|
|
784
784
|
* Unauthorized
|
|
785
785
|
*/
|
|
@@ -789,15 +789,15 @@ type GetApiV1FormsByFormIdSubmissionsErrors = {
|
|
|
789
789
|
*/
|
|
790
790
|
404: Error;
|
|
791
791
|
};
|
|
792
|
-
type
|
|
793
|
-
type
|
|
792
|
+
type ListSubmissionsError = ListSubmissionsErrors[keyof ListSubmissionsErrors];
|
|
793
|
+
type ListSubmissionsResponses = {
|
|
794
794
|
/**
|
|
795
795
|
* List of submissions
|
|
796
796
|
*/
|
|
797
797
|
200: SubmissionsList;
|
|
798
798
|
};
|
|
799
|
-
type
|
|
800
|
-
type
|
|
799
|
+
type ListSubmissionsResponse = ListSubmissionsResponses[keyof ListSubmissionsResponses];
|
|
800
|
+
type DeleteSubmissionData = {
|
|
801
801
|
body?: never;
|
|
802
802
|
path: {
|
|
803
803
|
submissionId: string;
|
|
@@ -805,7 +805,7 @@ type DeleteApiV1SubmissionsBySubmissionIdData = {
|
|
|
805
805
|
query?: never;
|
|
806
806
|
url: "/api/v1/submissions/{submissionId}";
|
|
807
807
|
};
|
|
808
|
-
type
|
|
808
|
+
type DeleteSubmissionErrors = {
|
|
809
809
|
/**
|
|
810
810
|
* Unauthorized
|
|
811
811
|
*/
|
|
@@ -815,15 +815,15 @@ type DeleteApiV1SubmissionsBySubmissionIdErrors = {
|
|
|
815
815
|
*/
|
|
816
816
|
404: Error;
|
|
817
817
|
};
|
|
818
|
-
type
|
|
819
|
-
type
|
|
818
|
+
type DeleteSubmissionError = DeleteSubmissionErrors[keyof DeleteSubmissionErrors];
|
|
819
|
+
type DeleteSubmissionResponses = {
|
|
820
820
|
/**
|
|
821
821
|
* Submission deleted successfully
|
|
822
822
|
*/
|
|
823
823
|
204: void;
|
|
824
824
|
};
|
|
825
|
-
type
|
|
826
|
-
type
|
|
825
|
+
type DeleteSubmissionResponse = DeleteSubmissionResponses[keyof DeleteSubmissionResponses];
|
|
826
|
+
type GetSubmissionData = {
|
|
827
827
|
body?: never;
|
|
828
828
|
path: {
|
|
829
829
|
submissionId: string;
|
|
@@ -831,7 +831,7 @@ type GetApiV1SubmissionsBySubmissionIdData = {
|
|
|
831
831
|
query?: never;
|
|
832
832
|
url: "/api/v1/submissions/{submissionId}";
|
|
833
833
|
};
|
|
834
|
-
type
|
|
834
|
+
type GetSubmissionErrors = {
|
|
835
835
|
/**
|
|
836
836
|
* Unauthorized
|
|
837
837
|
*/
|
|
@@ -841,15 +841,15 @@ type GetApiV1SubmissionsBySubmissionIdErrors = {
|
|
|
841
841
|
*/
|
|
842
842
|
404: Error;
|
|
843
843
|
};
|
|
844
|
-
type
|
|
845
|
-
type
|
|
844
|
+
type GetSubmissionError = GetSubmissionErrors[keyof GetSubmissionErrors];
|
|
845
|
+
type GetSubmissionResponses = {
|
|
846
846
|
/**
|
|
847
847
|
* Submission details
|
|
848
848
|
*/
|
|
849
849
|
200: Submission;
|
|
850
850
|
};
|
|
851
|
-
type
|
|
852
|
-
type
|
|
851
|
+
type GetSubmissionResponse = GetSubmissionResponses[keyof GetSubmissionResponses];
|
|
852
|
+
type DownloadAttachmentData = {
|
|
853
853
|
body?: never;
|
|
854
854
|
path: {
|
|
855
855
|
submissionId: string;
|
|
@@ -858,7 +858,7 @@ type GetApiV1SubmissionsBySubmissionIdAttachmentsByFilenameData = {
|
|
|
858
858
|
query?: never;
|
|
859
859
|
url: "/api/v1/submissions/{submissionId}/attachments/{filename}";
|
|
860
860
|
};
|
|
861
|
-
type
|
|
861
|
+
type DownloadAttachmentErrors = {
|
|
862
862
|
/**
|
|
863
863
|
* Unauthorized
|
|
864
864
|
*/
|
|
@@ -868,8 +868,8 @@ type GetApiV1SubmissionsBySubmissionIdAttachmentsByFilenameErrors = {
|
|
|
868
868
|
*/
|
|
869
869
|
404: Error;
|
|
870
870
|
};
|
|
871
|
-
type
|
|
872
|
-
type
|
|
871
|
+
type DownloadAttachmentError = DownloadAttachmentErrors[keyof DownloadAttachmentErrors];
|
|
872
|
+
type DownloadAttachmentResponses = {
|
|
873
873
|
/**
|
|
874
874
|
* File content
|
|
875
875
|
*/
|
|
@@ -894,102 +894,102 @@ type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean
|
|
|
894
894
|
*
|
|
895
895
|
* Returns all forms for the site associated with your site token. Requires a site token (st_xxx), not an org API key.
|
|
896
896
|
*/
|
|
897
|
-
declare const
|
|
897
|
+
declare const listFormsWithSiteToken: <ThrowOnError extends boolean = false>(options?: Options<ListFormsWithSiteTokenData, ThrowOnError>) => RequestResult<ListFormsWithSiteTokenResponses, ListFormsWithSiteTokenErrors, ThrowOnError, "fields">;
|
|
898
898
|
/**
|
|
899
899
|
* Create a form (site token)
|
|
900
900
|
*
|
|
901
901
|
* Creates a new form endpoint for the site associated with your site token. Requires a site token (st_xxx), not an org API key.
|
|
902
902
|
*/
|
|
903
|
-
declare const
|
|
903
|
+
declare const createFormWithSiteToken: <ThrowOnError extends boolean = false>(options: Options<CreateFormWithSiteTokenData, ThrowOnError>) => RequestResult<CreateFormWithSiteTokenResponses, CreateFormWithSiteTokenErrors, ThrowOnError, "fields">;
|
|
904
904
|
/**
|
|
905
905
|
* List all sites
|
|
906
906
|
*
|
|
907
907
|
* Returns all sites belonging to your organization.
|
|
908
908
|
*/
|
|
909
|
-
declare const
|
|
909
|
+
declare const listSites: <ThrowOnError extends boolean = false>(options?: Options<ListSitesData, ThrowOnError>) => RequestResult<ListSitesResponses, ListSitesErrors, ThrowOnError, "fields">;
|
|
910
910
|
/**
|
|
911
911
|
* Create a site
|
|
912
912
|
*
|
|
913
913
|
* Creates a new site to group forms under. Returns a site-scoped API token that is only shown once - store it securely!
|
|
914
914
|
*/
|
|
915
|
-
declare const
|
|
915
|
+
declare const createSite: <ThrowOnError extends boolean = false>(options: Options<CreateSiteData, ThrowOnError>) => RequestResult<CreateSiteResponses, CreateSiteErrors, ThrowOnError, "fields">;
|
|
916
916
|
/**
|
|
917
917
|
* Delete a site
|
|
918
918
|
*
|
|
919
919
|
* Permanently deletes a site and all its forms and submissions.
|
|
920
920
|
*/
|
|
921
|
-
declare const
|
|
921
|
+
declare const deleteSite: <ThrowOnError extends boolean = false>(options: Options<DeleteSiteData, ThrowOnError>) => RequestResult<DeleteSiteResponses, DeleteSiteErrors, ThrowOnError, "fields">;
|
|
922
922
|
/**
|
|
923
923
|
* Get a site
|
|
924
924
|
*
|
|
925
925
|
* Returns details of a specific site.
|
|
926
926
|
*/
|
|
927
|
-
declare const
|
|
927
|
+
declare const getSite: <ThrowOnError extends boolean = false>(options: Options<GetSiteData, ThrowOnError>) => RequestResult<GetSiteResponses, GetSiteErrors, ThrowOnError, "fields">;
|
|
928
928
|
/**
|
|
929
929
|
* Update a site
|
|
930
930
|
*
|
|
931
931
|
* Updates an existing site.
|
|
932
932
|
*/
|
|
933
|
-
declare const
|
|
933
|
+
declare const updateSite: <ThrowOnError extends boolean = false>(options: Options<UpdateSiteData, ThrowOnError>) => RequestResult<UpdateSiteResponses, UpdateSiteErrors, ThrowOnError, "fields">;
|
|
934
934
|
/**
|
|
935
935
|
* Update site domains
|
|
936
936
|
*
|
|
937
937
|
* Updates the allowed domains for Turnstile CAPTCHA verification. This should be called when a custom domain is connected or disconnected from a website.
|
|
938
938
|
*/
|
|
939
|
-
declare const
|
|
939
|
+
declare const updateSiteDomains: <ThrowOnError extends boolean = false>(options: Options<UpdateSiteDomainsData, ThrowOnError>) => RequestResult<UpdateSiteDomainsResponses, UpdateSiteDomainsErrors, ThrowOnError, "fields">;
|
|
940
940
|
/**
|
|
941
941
|
* List all forms for a site
|
|
942
942
|
*
|
|
943
943
|
* Returns all forms belonging to a site.
|
|
944
944
|
*/
|
|
945
|
-
declare const
|
|
945
|
+
declare const listForms: <ThrowOnError extends boolean = false>(options: Options<ListFormsData, ThrowOnError>) => RequestResult<ListFormsResponses, ListFormsErrors, ThrowOnError, "fields">;
|
|
946
946
|
/**
|
|
947
947
|
* Create a form
|
|
948
948
|
*
|
|
949
949
|
* Creates a new form endpoint under a site. If captcha is enabled, a Cloudflare Turnstile widget will be automatically provisioned.
|
|
950
950
|
*/
|
|
951
|
-
declare const
|
|
951
|
+
declare const createForm: <ThrowOnError extends boolean = false>(options: Options<CreateFormData, ThrowOnError>) => RequestResult<CreateFormResponses, CreateFormErrors, ThrowOnError, "fields">;
|
|
952
952
|
/**
|
|
953
953
|
* Delete a form
|
|
954
954
|
*
|
|
955
955
|
* Permanently deletes a form and all its submissions.
|
|
956
956
|
*/
|
|
957
|
-
declare const
|
|
957
|
+
declare const deleteForm: <ThrowOnError extends boolean = false>(options: Options<DeleteFormData, ThrowOnError>) => RequestResult<DeleteFormResponses, DeleteFormErrors, ThrowOnError, "fields">;
|
|
958
958
|
/**
|
|
959
959
|
* Get a form
|
|
960
960
|
*
|
|
961
961
|
* Returns details of a specific form.
|
|
962
962
|
*/
|
|
963
|
-
declare const
|
|
963
|
+
declare const getForm: <ThrowOnError extends boolean = false>(options: Options<GetFormData, ThrowOnError>) => RequestResult<GetFormResponses, GetFormErrors, ThrowOnError, "fields">;
|
|
964
964
|
/**
|
|
965
965
|
* Update a form
|
|
966
966
|
*
|
|
967
967
|
* Updates an existing form. Only provided fields will be updated.
|
|
968
968
|
*/
|
|
969
|
-
declare const
|
|
969
|
+
declare const updateForm: <ThrowOnError extends boolean = false>(options: Options<UpdateFormData, ThrowOnError>) => RequestResult<UpdateFormResponses, UpdateFormErrors, ThrowOnError, "fields">;
|
|
970
970
|
/**
|
|
971
971
|
* List submissions
|
|
972
972
|
*
|
|
973
973
|
* Returns submissions for a form.
|
|
974
974
|
*/
|
|
975
|
-
declare const
|
|
975
|
+
declare const listSubmissions: <ThrowOnError extends boolean = false>(options: Options<ListSubmissionsData, ThrowOnError>) => RequestResult<ListSubmissionsResponses, ListSubmissionsErrors, ThrowOnError, "fields">;
|
|
976
976
|
/**
|
|
977
977
|
* Delete a submission
|
|
978
978
|
*
|
|
979
979
|
* Permanently deletes a submission and its attachments.
|
|
980
980
|
*/
|
|
981
|
-
declare const
|
|
981
|
+
declare const deleteSubmission: <ThrowOnError extends boolean = false>(options: Options<DeleteSubmissionData, ThrowOnError>) => RequestResult<DeleteSubmissionResponses, DeleteSubmissionErrors, ThrowOnError, "fields">;
|
|
982
982
|
/**
|
|
983
983
|
* Get a submission
|
|
984
984
|
*
|
|
985
985
|
* Returns details of a specific submission.
|
|
986
986
|
*/
|
|
987
|
-
declare const
|
|
987
|
+
declare const getSubmission: <ThrowOnError extends boolean = false>(options: Options<GetSubmissionData, ThrowOnError>) => RequestResult<GetSubmissionResponses, GetSubmissionErrors, ThrowOnError, "fields">;
|
|
988
988
|
/**
|
|
989
989
|
* Download an attachment
|
|
990
990
|
*
|
|
991
991
|
* Downloads a file attachment from a submission. Returns the file with appropriate Content-Type and Content-Disposition headers.
|
|
992
992
|
*/
|
|
993
|
-
declare const
|
|
993
|
+
declare const downloadAttachment: <ThrowOnError extends boolean = false>(options: Options<DownloadAttachmentData, ThrowOnError>) => RequestResult<DownloadAttachmentResponses, DownloadAttachmentErrors, ThrowOnError, "fields">;
|
|
994
994
|
|
|
995
|
-
export { type Attachment, type Captcha, type ClientOptions, type CreateForm, type
|
|
995
|
+
export { type Attachment, type Captcha, type ClientOptions, type CreateForm, type CreateFormData, type CreateFormError, type CreateFormErrors, type CreateFormResponse, type CreateFormResponses, type CreateFormWithSiteTokenData, type CreateFormWithSiteTokenError, type CreateFormWithSiteTokenErrors, type CreateFormWithSiteTokenResponse, type CreateFormWithSiteTokenResponses, type CreateSite, type CreateSiteData, type CreateSiteError, type CreateSiteErrors, type CreateSiteResponse, type CreateSiteResponses, type DeleteFormData, type DeleteFormError, type DeleteFormErrors, type DeleteFormResponse, type DeleteFormResponses, type DeleteSiteData, type DeleteSiteError, type DeleteSiteErrors, type DeleteSiteResponse, type DeleteSiteResponses, type DeleteSubmissionData, type DeleteSubmissionError, type DeleteSubmissionErrors, type DeleteSubmissionResponse, type DeleteSubmissionResponses, type DownloadAttachmentData, type DownloadAttachmentError, type DownloadAttachmentErrors, type DownloadAttachmentResponses, type Error, type Form, type FormsList, type GetFormData, type GetFormError, type GetFormErrors, type GetFormResponse, type GetFormResponses, type GetSiteData, type GetSiteError, type GetSiteErrors, type GetSiteResponse, type GetSiteResponses, type GetSubmissionData, type GetSubmissionError, type GetSubmissionErrors, type GetSubmissionResponse, type GetSubmissionResponses, type ListFormsData, type ListFormsError, type ListFormsErrors, type ListFormsResponse, type ListFormsResponses, type ListFormsWithSiteTokenData, type ListFormsWithSiteTokenError, type ListFormsWithSiteTokenErrors, type ListFormsWithSiteTokenResponse, type ListFormsWithSiteTokenResponses, type ListSitesData, type ListSitesError, type ListSitesErrors, type ListSitesResponse, type ListSitesResponses, type ListSubmissionsData, type ListSubmissionsError, type ListSubmissionsErrors, type ListSubmissionsResponse, type ListSubmissionsResponses, type Options, type Site, type SiteDomains, type SiteWithToken, type SitesList, type Submission, type SubmissionMetadata, type SubmissionsList, type UpdateForm, type UpdateFormData, type UpdateFormError, type UpdateFormErrors, type UpdateFormResponse, type UpdateFormResponses, type UpdateSite, type UpdateSiteData, type UpdateSiteDomains, type UpdateSiteDomainsData, type UpdateSiteDomainsError, type UpdateSiteDomainsErrors, type UpdateSiteDomainsResponse, type UpdateSiteDomainsResponses, type UpdateSiteError, type UpdateSiteErrors, type UpdateSiteResponse, type UpdateSiteResponses, createForm, createFormWithSiteToken, createSite, deleteForm, deleteSite, deleteSubmission, downloadAttachment, getForm, getSite, getSubmission, listForms, listFormsWithSiteToken, listSites, listSubmissions, updateForm, updateSite, updateSiteDomains };
|