@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.d.cts CHANGED
@@ -432,13 +432,13 @@ type SubmissionsList = {
432
432
  limit: number;
433
433
  offset: number;
434
434
  };
435
- type GetApiV1FormsData = {
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 GetApiV1FormsErrors = {
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 GetApiV1FormsError = GetApiV1FormsErrors[keyof GetApiV1FormsErrors];
452
- type GetApiV1FormsResponses = {
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 GetApiV1FormsResponse = GetApiV1FormsResponses[keyof GetApiV1FormsResponses];
459
- type PostApiV1FormsData = {
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 PostApiV1FormsErrors = {
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 PostApiV1FormsError = PostApiV1FormsErrors[keyof PostApiV1FormsErrors];
476
- type PostApiV1FormsResponses = {
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 PostApiV1FormsResponse = PostApiV1FormsResponses[keyof PostApiV1FormsResponses];
483
- type GetApiV1SitesData = {
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 GetApiV1SitesErrors = {
489
+ type ListSitesErrors = {
490
490
  /**
491
491
  * Unauthorized
492
492
  */
493
493
  401: Error;
494
494
  };
495
- type GetApiV1SitesError = GetApiV1SitesErrors[keyof GetApiV1SitesErrors];
496
- type GetApiV1SitesResponses = {
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 GetApiV1SitesResponse = GetApiV1SitesResponses[keyof GetApiV1SitesResponses];
503
- type PostApiV1SitesData = {
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 PostApiV1SitesErrors = {
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 PostApiV1SitesError = PostApiV1SitesErrors[keyof PostApiV1SitesErrors];
520
- type PostApiV1SitesResponses = {
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 PostApiV1SitesResponse = PostApiV1SitesResponses[keyof PostApiV1SitesResponses];
527
- type DeleteApiV1SitesBySiteIdData = {
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 DeleteApiV1SitesBySiteIdErrors = {
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 DeleteApiV1SitesBySiteIdError = DeleteApiV1SitesBySiteIdErrors[keyof DeleteApiV1SitesBySiteIdErrors];
546
- type DeleteApiV1SitesBySiteIdResponses = {
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 DeleteApiV1SitesBySiteIdResponse = DeleteApiV1SitesBySiteIdResponses[keyof DeleteApiV1SitesBySiteIdResponses];
553
- type GetApiV1SitesBySiteIdData = {
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 GetApiV1SitesBySiteIdErrors = {
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 GetApiV1SitesBySiteIdError = GetApiV1SitesBySiteIdErrors[keyof GetApiV1SitesBySiteIdErrors];
572
- type GetApiV1SitesBySiteIdResponses = {
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 GetApiV1SitesBySiteIdResponse = GetApiV1SitesBySiteIdResponses[keyof GetApiV1SitesBySiteIdResponses];
579
- type PatchApiV1SitesBySiteIdData = {
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 PatchApiV1SitesBySiteIdErrors = {
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 PatchApiV1SitesBySiteIdError = PatchApiV1SitesBySiteIdErrors[keyof PatchApiV1SitesBySiteIdErrors];
598
- type PatchApiV1SitesBySiteIdResponses = {
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 PatchApiV1SitesBySiteIdResponse = PatchApiV1SitesBySiteIdResponses[keyof PatchApiV1SitesBySiteIdResponses];
605
- type PatchApiV1SitesBySiteIdDomainsData = {
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 PatchApiV1SitesBySiteIdDomainsErrors = {
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 PatchApiV1SitesBySiteIdDomainsError = PatchApiV1SitesBySiteIdDomainsErrors[keyof PatchApiV1SitesBySiteIdDomainsErrors];
624
- type PatchApiV1SitesBySiteIdDomainsResponses = {
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 PatchApiV1SitesBySiteIdDomainsResponse = PatchApiV1SitesBySiteIdDomainsResponses[keyof PatchApiV1SitesBySiteIdDomainsResponses];
631
- type GetApiV1SitesBySiteIdFormsData = {
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 GetApiV1SitesBySiteIdFormsErrors = {
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 GetApiV1SitesBySiteIdFormsError = GetApiV1SitesBySiteIdFormsErrors[keyof GetApiV1SitesBySiteIdFormsErrors];
650
- type GetApiV1SitesBySiteIdFormsResponses = {
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 GetApiV1SitesBySiteIdFormsResponse = GetApiV1SitesBySiteIdFormsResponses[keyof GetApiV1SitesBySiteIdFormsResponses];
657
- type PostApiV1SitesBySiteIdFormsData = {
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 PostApiV1SitesBySiteIdFormsErrors = {
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 PostApiV1SitesBySiteIdFormsError = PostApiV1SitesBySiteIdFormsErrors[keyof PostApiV1SitesBySiteIdFormsErrors];
676
- type PostApiV1SitesBySiteIdFormsResponses = {
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 PostApiV1SitesBySiteIdFormsResponse = PostApiV1SitesBySiteIdFormsResponses[keyof PostApiV1SitesBySiteIdFormsResponses];
683
- type DeleteApiV1FormsByFormIdData = {
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 DeleteApiV1FormsByFormIdErrors = {
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 DeleteApiV1FormsByFormIdError = DeleteApiV1FormsByFormIdErrors[keyof DeleteApiV1FormsByFormIdErrors];
702
- type DeleteApiV1FormsByFormIdResponses = {
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 DeleteApiV1FormsByFormIdResponse = DeleteApiV1FormsByFormIdResponses[keyof DeleteApiV1FormsByFormIdResponses];
709
- type GetApiV1FormsByFormIdData = {
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 GetApiV1FormsByFormIdErrors = {
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 GetApiV1FormsByFormIdError = GetApiV1FormsByFormIdErrors[keyof GetApiV1FormsByFormIdErrors];
728
- type GetApiV1FormsByFormIdResponses = {
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 GetApiV1FormsByFormIdResponse = GetApiV1FormsByFormIdResponses[keyof GetApiV1FormsByFormIdResponses];
735
- type PatchApiV1FormsByFormIdData = {
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 PatchApiV1FormsByFormIdErrors = {
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 PatchApiV1FormsByFormIdError = PatchApiV1FormsByFormIdErrors[keyof PatchApiV1FormsByFormIdErrors];
754
- type PatchApiV1FormsByFormIdResponses = {
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 PatchApiV1FormsByFormIdResponse = PatchApiV1FormsByFormIdResponses[keyof PatchApiV1FormsByFormIdResponses];
761
- type GetApiV1FormsByFormIdSubmissionsData = {
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 GetApiV1FormsByFormIdSubmissionsErrors = {
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 GetApiV1FormsByFormIdSubmissionsError = GetApiV1FormsByFormIdSubmissionsErrors[keyof GetApiV1FormsByFormIdSubmissionsErrors];
793
- type GetApiV1FormsByFormIdSubmissionsResponses = {
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 GetApiV1FormsByFormIdSubmissionsResponse = GetApiV1FormsByFormIdSubmissionsResponses[keyof GetApiV1FormsByFormIdSubmissionsResponses];
800
- type DeleteApiV1SubmissionsBySubmissionIdData = {
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 DeleteApiV1SubmissionsBySubmissionIdErrors = {
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 DeleteApiV1SubmissionsBySubmissionIdError = DeleteApiV1SubmissionsBySubmissionIdErrors[keyof DeleteApiV1SubmissionsBySubmissionIdErrors];
819
- type DeleteApiV1SubmissionsBySubmissionIdResponses = {
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 DeleteApiV1SubmissionsBySubmissionIdResponse = DeleteApiV1SubmissionsBySubmissionIdResponses[keyof DeleteApiV1SubmissionsBySubmissionIdResponses];
826
- type GetApiV1SubmissionsBySubmissionIdData = {
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 GetApiV1SubmissionsBySubmissionIdErrors = {
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 GetApiV1SubmissionsBySubmissionIdError = GetApiV1SubmissionsBySubmissionIdErrors[keyof GetApiV1SubmissionsBySubmissionIdErrors];
845
- type GetApiV1SubmissionsBySubmissionIdResponses = {
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 GetApiV1SubmissionsBySubmissionIdResponse = GetApiV1SubmissionsBySubmissionIdResponses[keyof GetApiV1SubmissionsBySubmissionIdResponses];
852
- type GetApiV1SubmissionsBySubmissionIdAttachmentsByFilenameData = {
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 GetApiV1SubmissionsBySubmissionIdAttachmentsByFilenameErrors = {
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 GetApiV1SubmissionsBySubmissionIdAttachmentsByFilenameError = GetApiV1SubmissionsBySubmissionIdAttachmentsByFilenameErrors[keyof GetApiV1SubmissionsBySubmissionIdAttachmentsByFilenameErrors];
872
- type GetApiV1SubmissionsBySubmissionIdAttachmentsByFilenameResponses = {
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 getApiV1Forms: <ThrowOnError extends boolean = false>(options?: Options<GetApiV1FormsData, ThrowOnError>) => RequestResult<GetApiV1FormsResponses, GetApiV1FormsErrors, ThrowOnError, "fields">;
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 postApiV1Forms: <ThrowOnError extends boolean = false>(options: Options<PostApiV1FormsData, ThrowOnError>) => RequestResult<PostApiV1FormsResponses, PostApiV1FormsErrors, ThrowOnError, "fields">;
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 getApiV1Sites: <ThrowOnError extends boolean = false>(options?: Options<GetApiV1SitesData, ThrowOnError>) => RequestResult<GetApiV1SitesResponses, GetApiV1SitesErrors, ThrowOnError, "fields">;
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 postApiV1Sites: <ThrowOnError extends boolean = false>(options: Options<PostApiV1SitesData, ThrowOnError>) => RequestResult<PostApiV1SitesResponses, PostApiV1SitesErrors, ThrowOnError, "fields">;
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 deleteApiV1SitesBySiteId: <ThrowOnError extends boolean = false>(options: Options<DeleteApiV1SitesBySiteIdData, ThrowOnError>) => RequestResult<DeleteApiV1SitesBySiteIdResponses, DeleteApiV1SitesBySiteIdErrors, ThrowOnError, "fields">;
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 getApiV1SitesBySiteId: <ThrowOnError extends boolean = false>(options: Options<GetApiV1SitesBySiteIdData, ThrowOnError>) => RequestResult<GetApiV1SitesBySiteIdResponses, GetApiV1SitesBySiteIdErrors, ThrowOnError, "fields">;
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 patchApiV1SitesBySiteId: <ThrowOnError extends boolean = false>(options: Options<PatchApiV1SitesBySiteIdData, ThrowOnError>) => RequestResult<PatchApiV1SitesBySiteIdResponses, PatchApiV1SitesBySiteIdErrors, ThrowOnError, "fields">;
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 patchApiV1SitesBySiteIdDomains: <ThrowOnError extends boolean = false>(options: Options<PatchApiV1SitesBySiteIdDomainsData, ThrowOnError>) => RequestResult<PatchApiV1SitesBySiteIdDomainsResponses, PatchApiV1SitesBySiteIdDomainsErrors, ThrowOnError, "fields">;
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 getApiV1SitesBySiteIdForms: <ThrowOnError extends boolean = false>(options: Options<GetApiV1SitesBySiteIdFormsData, ThrowOnError>) => RequestResult<GetApiV1SitesBySiteIdFormsResponses, GetApiV1SitesBySiteIdFormsErrors, ThrowOnError, "fields">;
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 postApiV1SitesBySiteIdForms: <ThrowOnError extends boolean = false>(options: Options<PostApiV1SitesBySiteIdFormsData, ThrowOnError>) => RequestResult<PostApiV1SitesBySiteIdFormsResponses, PostApiV1SitesBySiteIdFormsErrors, ThrowOnError, "fields">;
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 deleteApiV1FormsByFormId: <ThrowOnError extends boolean = false>(options: Options<DeleteApiV1FormsByFormIdData, ThrowOnError>) => RequestResult<DeleteApiV1FormsByFormIdResponses, DeleteApiV1FormsByFormIdErrors, ThrowOnError, "fields">;
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 getApiV1FormsByFormId: <ThrowOnError extends boolean = false>(options: Options<GetApiV1FormsByFormIdData, ThrowOnError>) => RequestResult<GetApiV1FormsByFormIdResponses, GetApiV1FormsByFormIdErrors, ThrowOnError, "fields">;
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 patchApiV1FormsByFormId: <ThrowOnError extends boolean = false>(options: Options<PatchApiV1FormsByFormIdData, ThrowOnError>) => RequestResult<PatchApiV1FormsByFormIdResponses, PatchApiV1FormsByFormIdErrors, ThrowOnError, "fields">;
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 getApiV1FormsByFormIdSubmissions: <ThrowOnError extends boolean = false>(options: Options<GetApiV1FormsByFormIdSubmissionsData, ThrowOnError>) => RequestResult<GetApiV1FormsByFormIdSubmissionsResponses, GetApiV1FormsByFormIdSubmissionsErrors, ThrowOnError, "fields">;
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 deleteApiV1SubmissionsBySubmissionId: <ThrowOnError extends boolean = false>(options: Options<DeleteApiV1SubmissionsBySubmissionIdData, ThrowOnError>) => RequestResult<DeleteApiV1SubmissionsBySubmissionIdResponses, DeleteApiV1SubmissionsBySubmissionIdErrors, ThrowOnError, "fields">;
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 getApiV1SubmissionsBySubmissionId: <ThrowOnError extends boolean = false>(options: Options<GetApiV1SubmissionsBySubmissionIdData, ThrowOnError>) => RequestResult<GetApiV1SubmissionsBySubmissionIdResponses, GetApiV1SubmissionsBySubmissionIdErrors, ThrowOnError, "fields">;
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 getApiV1SubmissionsBySubmissionIdAttachmentsByFilename: <ThrowOnError extends boolean = false>(options: Options<GetApiV1SubmissionsBySubmissionIdAttachmentsByFilenameData, ThrowOnError>) => RequestResult<GetApiV1SubmissionsBySubmissionIdAttachmentsByFilenameResponses, GetApiV1SubmissionsBySubmissionIdAttachmentsByFilenameErrors, ThrowOnError, "fields">;
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 CreateSite, type DeleteApiV1FormsByFormIdData, type DeleteApiV1FormsByFormIdError, type DeleteApiV1FormsByFormIdErrors, type DeleteApiV1FormsByFormIdResponse, type DeleteApiV1FormsByFormIdResponses, type DeleteApiV1SitesBySiteIdData, type DeleteApiV1SitesBySiteIdError, type DeleteApiV1SitesBySiteIdErrors, type DeleteApiV1SitesBySiteIdResponse, type DeleteApiV1SitesBySiteIdResponses, type DeleteApiV1SubmissionsBySubmissionIdData, type DeleteApiV1SubmissionsBySubmissionIdError, type DeleteApiV1SubmissionsBySubmissionIdErrors, type DeleteApiV1SubmissionsBySubmissionIdResponse, type DeleteApiV1SubmissionsBySubmissionIdResponses, type Error, type Form, type FormsList, type GetApiV1FormsByFormIdData, type GetApiV1FormsByFormIdError, type GetApiV1FormsByFormIdErrors, type GetApiV1FormsByFormIdResponse, type GetApiV1FormsByFormIdResponses, type GetApiV1FormsByFormIdSubmissionsData, type GetApiV1FormsByFormIdSubmissionsError, type GetApiV1FormsByFormIdSubmissionsErrors, type GetApiV1FormsByFormIdSubmissionsResponse, type GetApiV1FormsByFormIdSubmissionsResponses, type GetApiV1FormsData, type GetApiV1FormsError, type GetApiV1FormsErrors, type GetApiV1FormsResponse, type GetApiV1FormsResponses, type GetApiV1SitesBySiteIdData, type GetApiV1SitesBySiteIdError, type GetApiV1SitesBySiteIdErrors, type GetApiV1SitesBySiteIdFormsData, type GetApiV1SitesBySiteIdFormsError, type GetApiV1SitesBySiteIdFormsErrors, type GetApiV1SitesBySiteIdFormsResponse, type GetApiV1SitesBySiteIdFormsResponses, type GetApiV1SitesBySiteIdResponse, type GetApiV1SitesBySiteIdResponses, type GetApiV1SitesData, type GetApiV1SitesError, type GetApiV1SitesErrors, type GetApiV1SitesResponse, type GetApiV1SitesResponses, type GetApiV1SubmissionsBySubmissionIdAttachmentsByFilenameData, type GetApiV1SubmissionsBySubmissionIdAttachmentsByFilenameError, type GetApiV1SubmissionsBySubmissionIdAttachmentsByFilenameErrors, type GetApiV1SubmissionsBySubmissionIdAttachmentsByFilenameResponses, type GetApiV1SubmissionsBySubmissionIdData, type GetApiV1SubmissionsBySubmissionIdError, type GetApiV1SubmissionsBySubmissionIdErrors, type GetApiV1SubmissionsBySubmissionIdResponse, type GetApiV1SubmissionsBySubmissionIdResponses, type Options, type PatchApiV1FormsByFormIdData, type PatchApiV1FormsByFormIdError, type PatchApiV1FormsByFormIdErrors, type PatchApiV1FormsByFormIdResponse, type PatchApiV1FormsByFormIdResponses, type PatchApiV1SitesBySiteIdData, type PatchApiV1SitesBySiteIdDomainsData, type PatchApiV1SitesBySiteIdDomainsError, type PatchApiV1SitesBySiteIdDomainsErrors, type PatchApiV1SitesBySiteIdDomainsResponse, type PatchApiV1SitesBySiteIdDomainsResponses, type PatchApiV1SitesBySiteIdError, type PatchApiV1SitesBySiteIdErrors, type PatchApiV1SitesBySiteIdResponse, type PatchApiV1SitesBySiteIdResponses, type PostApiV1FormsData, type PostApiV1FormsError, type PostApiV1FormsErrors, type PostApiV1FormsResponse, type PostApiV1FormsResponses, type PostApiV1SitesBySiteIdFormsData, type PostApiV1SitesBySiteIdFormsError, type PostApiV1SitesBySiteIdFormsErrors, type PostApiV1SitesBySiteIdFormsResponse, type PostApiV1SitesBySiteIdFormsResponses, type PostApiV1SitesData, type PostApiV1SitesError, type PostApiV1SitesErrors, type PostApiV1SitesResponse, type PostApiV1SitesResponses, type Site, type SiteDomains, type SiteWithToken, type SitesList, type Submission, type SubmissionMetadata, type SubmissionsList, type UpdateForm, type UpdateSite, type UpdateSiteDomains, deleteApiV1FormsByFormId, deleteApiV1SitesBySiteId, deleteApiV1SubmissionsBySubmissionId, getApiV1Forms, getApiV1FormsByFormId, getApiV1FormsByFormIdSubmissions, getApiV1Sites, getApiV1SitesBySiteId, getApiV1SitesBySiteIdForms, getApiV1SubmissionsBySubmissionId, getApiV1SubmissionsBySubmissionIdAttachmentsByFilename, patchApiV1FormsByFormId, patchApiV1SitesBySiteId, patchApiV1SitesBySiteIdDomains, postApiV1Forms, postApiV1Sites, postApiV1SitesBySiteIdForms };
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 };