@@ -87,6 +87,12 @@ export interface CreateForm {
87
87
* @memberof CreateForm
88
88
*/
89
89
createdAt ?: string ;
90
+ /**
91
+ *
92
+ * @type {string }
93
+ * @memberof CreateForm
94
+ */
95
+ updatedAt ?: string ;
90
96
/**
91
97
*
92
98
* @type {boolean }
@@ -173,6 +179,12 @@ export interface Form {
173
179
* @memberof Form
174
180
*/
175
181
createdAt ?: string ;
182
+ /**
183
+ *
184
+ * @type {string }
185
+ * @memberof Form
186
+ */
187
+ updatedAt ?: string ;
176
188
/**
177
189
*
178
190
* @type {boolean }
@@ -440,6 +452,56 @@ export const FormsApiAxiosParamCreator = function (
440
452
options : localVarRequestOptions ,
441
453
} ;
442
454
} ,
455
+ /**
456
+ *
457
+ * @summary Delete one form using id
458
+ * @param {string } formId Id the form
459
+ * @param {* } [options] Override http request option.
460
+ * @throws {RequiredError }
461
+ */
462
+ deleteFormById : async (
463
+ formId : string ,
464
+ options : RawAxiosRequestConfig = { }
465
+ ) : Promise < RequestArgs > => {
466
+ // verify required parameter 'formId' is not null or undefined
467
+ assertParamExists ( "deleteFormById" , "formId" , formId ) ;
468
+ const localVarPath = `/forms/{formId}` . replace (
469
+ `{${ "formId" } }` ,
470
+ encodeURIComponent ( String ( formId ) )
471
+ ) ;
472
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
473
+ const localVarUrlObj = new URL ( localVarPath , DUMMY_BASE_URL ) ;
474
+ let baseOptions ;
475
+ if ( configuration ) {
476
+ baseOptions = configuration . baseOptions ;
477
+ }
478
+
479
+ const localVarRequestOptions = {
480
+ method : "DELETE" ,
481
+ ...baseOptions ,
482
+ ...options ,
483
+ } ;
484
+ const localVarHeaderParameter = { } as any ;
485
+ const localVarQueryParameter = { } as any ;
486
+
487
+ // authentication BearerAuth required
488
+ // http bearer authentication required
489
+ await setBearerAuthToObject ( localVarHeaderParameter , configuration ) ;
490
+
491
+ setSearchParams ( localVarUrlObj , localVarQueryParameter ) ;
492
+ let headersFromBaseOptions =
493
+ baseOptions && baseOptions . headers ? baseOptions . headers : { } ;
494
+ localVarRequestOptions . headers = {
495
+ ...localVarHeaderParameter ,
496
+ ...headersFromBaseOptions ,
497
+ ...options . headers ,
498
+ } ;
499
+
500
+ return {
501
+ url : toPathString ( localVarUrlObj ) ,
502
+ options : localVarRequestOptions ,
503
+ } ;
504
+ } ,
443
505
/**
444
506
*
445
507
* @summary Get one form using id
@@ -493,11 +555,13 @@ export const FormsApiAxiosParamCreator = function (
493
555
/**
494
556
*
495
557
* @summary Get own forms
558
+ * @param {string } [sort]
496
559
* @param {Form } [form]
497
560
* @param {* } [options] Override http request option.
498
561
* @throws {RequiredError }
499
562
*/
500
563
getOwnForms : async (
564
+ sort ?: string ,
501
565
form ?: Form ,
502
566
options : RawAxiosRequestConfig = { }
503
567
) : Promise < RequestArgs > => {
@@ -521,6 +585,10 @@ export const FormsApiAxiosParamCreator = function (
521
585
// http bearer authentication required
522
586
await setBearerAuthToObject ( localVarHeaderParameter , configuration ) ;
523
587
588
+ if ( sort !== undefined ) {
589
+ localVarQueryParameter [ "sort" ] = sort ;
590
+ }
591
+
524
592
localVarHeaderParameter [ "Content-Type" ] = "application/json" ;
525
593
526
594
setSearchParams ( localVarUrlObj , localVarQueryParameter ) ;
@@ -616,6 +684,36 @@ export const FormsApiFp = function (configuration?: Configuration) {
616
684
configuration
617
685
) ( axios , localVarOperationServerBasePath || basePath ) ;
618
686
} ,
687
+ /**
688
+ *
689
+ * @summary Delete one form using id
690
+ * @param {string } formId Id the form
691
+ * @param {* } [options] Override http request option.
692
+ * @throws {RequiredError }
693
+ */
694
+ async deleteFormById (
695
+ formId : string ,
696
+ options ?: RawAxiosRequestConfig
697
+ ) : Promise <
698
+ ( axios ?: AxiosInstance , basePath ?: string ) => AxiosPromise < Form >
699
+ > {
700
+ const localVarAxiosArgs = await localVarAxiosParamCreator . deleteFormById (
701
+ formId ,
702
+ options
703
+ ) ;
704
+ const localVarOperationServerIndex = configuration ?. serverIndex ?? 0 ;
705
+ const localVarOperationServerBasePath =
706
+ operationServerMap [ "FormsApi.deleteFormById" ] ?. [
707
+ localVarOperationServerIndex
708
+ ] ?. url ;
709
+ return ( axios , basePath ) =>
710
+ createRequestFunction (
711
+ localVarAxiosArgs ,
712
+ globalAxios ,
713
+ BASE_PATH ,
714
+ configuration
715
+ ) ( axios , localVarOperationServerBasePath || basePath ) ;
716
+ } ,
619
717
/**
620
718
*
621
719
* @summary Get one form using id
@@ -649,17 +747,20 @@ export const FormsApiFp = function (configuration?: Configuration) {
649
747
/**
650
748
*
651
749
* @summary Get own forms
750
+ * @param {string } [sort]
652
751
* @param {Form } [form]
653
752
* @param {* } [options] Override http request option.
654
753
* @throws {RequiredError }
655
754
*/
656
755
async getOwnForms (
756
+ sort ?: string ,
657
757
form ?: Form ,
658
758
options ?: RawAxiosRequestConfig
659
759
) : Promise <
660
760
( axios ?: AxiosInstance , basePath ?: string ) => AxiosPromise < Form >
661
761
> {
662
762
const localVarAxiosArgs = await localVarAxiosParamCreator . getOwnForms (
763
+ sort ,
663
764
form ,
664
765
options
665
766
) ;
@@ -719,6 +820,18 @@ export const FormsApiFactory = function (
719
820
. crupdateFormQuestions ( formId , question , options )
720
821
. then ( ( request ) => request ( axios , basePath ) ) ;
721
822
} ,
823
+ /**
824
+ *
825
+ * @summary Delete one form using id
826
+ * @param {string } formId Id the form
827
+ * @param {* } [options] Override http request option.
828
+ * @throws {RequiredError }
829
+ */
830
+ deleteFormById ( formId : string , options ?: any ) : AxiosPromise < Form > {
831
+ return localVarFp
832
+ . deleteFormById ( formId , options )
833
+ . then ( ( request ) => request ( axios , basePath ) ) ;
834
+ } ,
722
835
/**
723
836
*
724
837
* @summary Get one form using id
@@ -734,13 +847,14 @@ export const FormsApiFactory = function (
734
847
/**
735
848
*
736
849
* @summary Get own forms
850
+ * @param {string } [sort]
737
851
* @param {Form } [form]
738
852
* @param {* } [options] Override http request option.
739
853
* @throws {RequiredError }
740
854
*/
741
- getOwnForms ( form ?: Form , options ?: any ) : AxiosPromise < Form > {
855
+ getOwnForms ( sort ?: string , form ?: Form , options ?: any ) : AxiosPromise < Form > {
742
856
return localVarFp
743
- . getOwnForms ( form , options )
857
+ . getOwnForms ( sort , form , options )
744
858
. then ( ( request ) => request ( axios , basePath ) ) ;
745
859
} ,
746
860
} ;
@@ -789,6 +903,20 @@ export class FormsApi extends BaseAPI {
789
903
. then ( ( request ) => request ( this . axios , this . basePath ) ) ;
790
904
}
791
905
906
+ /**
907
+ *
908
+ * @summary Delete one form using id
909
+ * @param {string } formId Id the form
910
+ * @param {* } [options] Override http request option.
911
+ * @throws {RequiredError }
912
+ * @memberof FormsApi
913
+ */
914
+ public deleteFormById ( formId : string , options ?: RawAxiosRequestConfig ) {
915
+ return FormsApiFp ( this . configuration )
916
+ . deleteFormById ( formId , options )
917
+ . then ( ( request ) => request ( this . axios , this . basePath ) ) ;
918
+ }
919
+
792
920
/**
793
921
*
794
922
* @summary Get one form using id
@@ -806,14 +934,19 @@ export class FormsApi extends BaseAPI {
806
934
/**
807
935
*
808
936
* @summary Get own forms
937
+ * @param {string } [sort]
809
938
* @param {Form } [form]
810
939
* @param {* } [options] Override http request option.
811
940
* @throws {RequiredError }
812
941
* @memberof FormsApi
813
942
*/
814
- public getOwnForms ( form ?: Form , options ?: RawAxiosRequestConfig ) {
943
+ public getOwnForms (
944
+ sort ?: string ,
945
+ form ?: Form ,
946
+ options ?: RawAxiosRequestConfig
947
+ ) {
815
948
return FormsApiFp ( this . configuration )
816
- . getOwnForms ( form , options )
949
+ . getOwnForms ( sort , form , options )
817
950
. then ( ( request ) => request ( this . axios , this . basePath ) ) ;
818
951
}
819
952
}
0 commit comments