hostinger-api-sdk 2.1.1 → 2.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/README.md +2 -2
- package/api.ts +1281 -259
- package/base.ts +1 -1
- package/common.ts +1 -1
- package/configuration.ts +2 -2
- package/dist/api.d.ts +566 -9
- package/dist/api.js +874 -29
- package/dist/base.d.ts +1 -1
- package/dist/base.js +1 -1
- package/dist/common.d.ts +1 -1
- package/dist/common.js +1 -1
- package/dist/configuration.d.ts +1 -1
- package/dist/configuration.js +2 -2
- package/dist/esm/api.d.ts +566 -9
- package/dist/esm/api.js +860 -19
- package/dist/esm/base.d.ts +1 -1
- package/dist/esm/base.js +1 -1
- package/dist/esm/common.d.ts +1 -1
- package/dist/esm/common.js +1 -1
- package/dist/esm/configuration.d.ts +1 -1
- package/dist/esm/configuration.js +2 -2
- package/dist/esm/index.d.ts +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/docs/HostingCDNApi.md +238 -0
- package/docs/HostingCacheApi.md +1 -1
- package/docs/HostingV1CdnCdnStatusResource.md +20 -0
- package/docs/ReachFormsApi.md +369 -1
- package/docs/ReachV1FormsAssignTagsRequest.md +21 -0
- package/docs/ReachV1FormsFormTemplateVersionResource.md +29 -0
- package/docs/ReachV1FormsRemoveTagRequest.md +21 -0
- package/docs/ReachV1FormsStoreRequest.md +21 -0
- package/docs/ReachV1FormsUpdateRequest.md +23 -0
- package/docs/ReachV1FormsUpdateTemplateRequest.md +21 -0
- package/index.ts +1 -1
- package/package.json +1 -1
package/api.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
/**
|
|
4
4
|
* Hostinger API
|
|
5
5
|
*
|
|
6
|
-
* API Version: 2.1.
|
|
6
|
+
* API Version: 2.1.3
|
|
7
7
|
*
|
|
8
8
|
* NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
|
|
9
9
|
* If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
|
|
@@ -7228,6 +7228,19 @@ export interface HostingV1CacheToggleCachelessModeRequest {
|
|
|
7228
7228
|
*/
|
|
7229
7229
|
'enabled': boolean;
|
|
7230
7230
|
}
|
|
7231
|
+
/**
|
|
7232
|
+
*
|
|
7233
|
+
* @export
|
|
7234
|
+
* @interface HostingV1CdnCdnStatusResource
|
|
7235
|
+
*/
|
|
7236
|
+
export interface HostingV1CdnCdnStatusResource {
|
|
7237
|
+
/**
|
|
7238
|
+
* Whether the Hostinger CDN is enabled for the website domain
|
|
7239
|
+
* @type {boolean}
|
|
7240
|
+
* @memberof HostingV1CdnCdnStatusResource
|
|
7241
|
+
*/
|
|
7242
|
+
'is_enabled': boolean;
|
|
7243
|
+
}
|
|
7231
7244
|
/**
|
|
7232
7245
|
*
|
|
7233
7246
|
* @export
|
|
@@ -14657,6 +14670,19 @@ export interface ReachV1ContactsUpdateRequestFieldsInner {
|
|
|
14657
14670
|
*/
|
|
14658
14671
|
'selected_option_uuids': Array<string>;
|
|
14659
14672
|
}
|
|
14673
|
+
/**
|
|
14674
|
+
* Tags every future submitter of the form receives
|
|
14675
|
+
* @export
|
|
14676
|
+
* @interface ReachV1FormsAssignTagsRequest
|
|
14677
|
+
*/
|
|
14678
|
+
export interface ReachV1FormsAssignTagsRequest {
|
|
14679
|
+
/**
|
|
14680
|
+
*
|
|
14681
|
+
* @type {Array<string>}
|
|
14682
|
+
* @memberof ReachV1FormsAssignTagsRequest
|
|
14683
|
+
*/
|
|
14684
|
+
'tag_uuids': Array<string>;
|
|
14685
|
+
}
|
|
14660
14686
|
/**
|
|
14661
14687
|
*
|
|
14662
14688
|
* @export
|
|
@@ -14868,6 +14894,118 @@ export interface ReachV1FormsFormTemplateResource {
|
|
|
14868
14894
|
*/
|
|
14869
14895
|
'path': string | null;
|
|
14870
14896
|
}
|
|
14897
|
+
/**
|
|
14898
|
+
* The stored version of a saved form design.
|
|
14899
|
+
* @export
|
|
14900
|
+
* @interface ReachV1FormsFormTemplateVersionResource
|
|
14901
|
+
*/
|
|
14902
|
+
export interface ReachV1FormsFormTemplateVersionResource {
|
|
14903
|
+
/**
|
|
14904
|
+
*
|
|
14905
|
+
* @type {string}
|
|
14906
|
+
* @memberof ReachV1FormsFormTemplateVersionResource
|
|
14907
|
+
*/
|
|
14908
|
+
'uuid': string;
|
|
14909
|
+
/**
|
|
14910
|
+
* Storage path of the template HTML, relative to the storage directory of this profile.
|
|
14911
|
+
* @type {string}
|
|
14912
|
+
* @memberof ReachV1FormsFormTemplateVersionResource
|
|
14913
|
+
*/
|
|
14914
|
+
'path': string;
|
|
14915
|
+
/**
|
|
14916
|
+
* Whether the design was saved by hand or by the AI builder.
|
|
14917
|
+
* @type {string}
|
|
14918
|
+
* @memberof ReachV1FormsFormTemplateVersionResource
|
|
14919
|
+
*/
|
|
14920
|
+
'edit_type': ReachV1FormsFormTemplateVersionResourceEditTypeEnum | null;
|
|
14921
|
+
/**
|
|
14922
|
+
*
|
|
14923
|
+
* @type {string}
|
|
14924
|
+
* @memberof ReachV1FormsFormTemplateVersionResource
|
|
14925
|
+
*/
|
|
14926
|
+
'created_at': string;
|
|
14927
|
+
/**
|
|
14928
|
+
*
|
|
14929
|
+
* @type {string}
|
|
14930
|
+
* @memberof ReachV1FormsFormTemplateVersionResource
|
|
14931
|
+
*/
|
|
14932
|
+
'updated_at': string;
|
|
14933
|
+
}
|
|
14934
|
+
|
|
14935
|
+
export const ReachV1FormsFormTemplateVersionResourceEditTypeEnum = {
|
|
14936
|
+
Manual: 'manual',
|
|
14937
|
+
Ai: 'ai'
|
|
14938
|
+
} as const;
|
|
14939
|
+
|
|
14940
|
+
export type ReachV1FormsFormTemplateVersionResourceEditTypeEnum = typeof ReachV1FormsFormTemplateVersionResourceEditTypeEnum[keyof typeof ReachV1FormsFormTemplateVersionResourceEditTypeEnum];
|
|
14941
|
+
|
|
14942
|
+
/**
|
|
14943
|
+
* Tag the form stops applying to future submitters
|
|
14944
|
+
* @export
|
|
14945
|
+
* @interface ReachV1FormsRemoveTagRequest
|
|
14946
|
+
*/
|
|
14947
|
+
export interface ReachV1FormsRemoveTagRequest {
|
|
14948
|
+
/**
|
|
14949
|
+
*
|
|
14950
|
+
* @type {string}
|
|
14951
|
+
* @memberof ReachV1FormsRemoveTagRequest
|
|
14952
|
+
*/
|
|
14953
|
+
'tag_uuid': string;
|
|
14954
|
+
}
|
|
14955
|
+
/**
|
|
14956
|
+
* Create a draft form
|
|
14957
|
+
* @export
|
|
14958
|
+
* @interface ReachV1FormsStoreRequest
|
|
14959
|
+
*/
|
|
14960
|
+
export interface ReachV1FormsStoreRequest {
|
|
14961
|
+
/**
|
|
14962
|
+
* Form name. Letters, digits, spaces and - . \' _ only.
|
|
14963
|
+
* @type {string}
|
|
14964
|
+
* @memberof ReachV1FormsStoreRequest
|
|
14965
|
+
*/
|
|
14966
|
+
'name': string;
|
|
14967
|
+
}
|
|
14968
|
+
/**
|
|
14969
|
+
* Rename a form and/or change its status. Send at least one field.
|
|
14970
|
+
* @export
|
|
14971
|
+
* @interface ReachV1FormsUpdateRequest
|
|
14972
|
+
*/
|
|
14973
|
+
export interface ReachV1FormsUpdateRequest {
|
|
14974
|
+
/**
|
|
14975
|
+
* Form name. Letters, digits, spaces and - . \' _ only.
|
|
14976
|
+
* @type {string}
|
|
14977
|
+
* @memberof ReachV1FormsUpdateRequest
|
|
14978
|
+
*/
|
|
14979
|
+
'name': string;
|
|
14980
|
+
/**
|
|
14981
|
+
* `active` takes the form live, `paused` and `draft` stop it accepting submissions.
|
|
14982
|
+
* @type {string}
|
|
14983
|
+
* @memberof ReachV1FormsUpdateRequest
|
|
14984
|
+
*/
|
|
14985
|
+
'status': ReachV1FormsUpdateRequestStatusEnum;
|
|
14986
|
+
}
|
|
14987
|
+
|
|
14988
|
+
export const ReachV1FormsUpdateRequestStatusEnum = {
|
|
14989
|
+
Active: 'active',
|
|
14990
|
+
Paused: 'paused',
|
|
14991
|
+
Draft: 'draft'
|
|
14992
|
+
} as const;
|
|
14993
|
+
|
|
14994
|
+
export type ReachV1FormsUpdateRequestStatusEnum = typeof ReachV1FormsUpdateRequestStatusEnum[keyof typeof ReachV1FormsUpdateRequestStatusEnum];
|
|
14995
|
+
|
|
14996
|
+
/**
|
|
14997
|
+
* Save the design of a form
|
|
14998
|
+
* @export
|
|
14999
|
+
* @interface ReachV1FormsUpdateTemplateRequest
|
|
15000
|
+
*/
|
|
15001
|
+
export interface ReachV1FormsUpdateTemplateRequest {
|
|
15002
|
+
/**
|
|
15003
|
+
* HTML of the form design. After sanitizing it must still contain a form container (`data-reach-form`), an email input (`data-reach-field=\"email\"`) and a submit button (`data-reach-submit`).
|
|
15004
|
+
* @type {string}
|
|
15005
|
+
* @memberof ReachV1FormsUpdateTemplateRequest
|
|
15006
|
+
*/
|
|
15007
|
+
'content': string;
|
|
15008
|
+
}
|
|
14871
15009
|
/**
|
|
14872
15010
|
* Sending domain to connect to the profile
|
|
14873
15011
|
* @export
|
|
@@ -30829,26 +30967,25 @@ export class HorizonsWebsitesApi extends BaseAPI {
|
|
|
30829
30967
|
|
|
30830
30968
|
|
|
30831
30969
|
/**
|
|
30832
|
-
*
|
|
30970
|
+
* HostingCDNApi - axios parameter creator
|
|
30833
30971
|
* @export
|
|
30834
30972
|
*/
|
|
30835
|
-
export const
|
|
30973
|
+
export const HostingCDNApiAxiosParamCreator = function (configuration?: Configuration) {
|
|
30836
30974
|
return {
|
|
30837
30975
|
/**
|
|
30838
|
-
*
|
|
30839
|
-
* @summary
|
|
30976
|
+
* Turns off the Hostinger CDN for the website domain. Once DNS propagation completes, the website content is served directly from the origin server. Repeating the call is safe; when CDN is already disabled, it applies the DNS change again. Returns 422 for platform-managed domains (for example `*.hostingersite.com` and `*.app-preview.com`), where CDN cannot be disabled, even when CDN is already off. Also returns 422 while the account is being moved to another server (retry after the move finishes), or when the CDN provider rejects the change. Returns 404 when the domain is not a website on the account.
|
|
30977
|
+
* @summary Disable CDN
|
|
30840
30978
|
* @param {string} username
|
|
30841
30979
|
* @param {string} domain Domain name
|
|
30842
|
-
* @param {string} [directory] Directory of the website installation to clear, relative to the website root. Defaults to the website root.
|
|
30843
30980
|
* @param {*} [options] Override http request option.
|
|
30844
30981
|
* @throws {RequiredError}
|
|
30845
30982
|
*/
|
|
30846
|
-
|
|
30983
|
+
disableCDNV1: async (username: string, domain: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
30847
30984
|
// verify required parameter 'username' is not null or undefined
|
|
30848
|
-
assertParamExists('
|
|
30985
|
+
assertParamExists('disableCDNV1', 'username', username)
|
|
30849
30986
|
// verify required parameter 'domain' is not null or undefined
|
|
30850
|
-
assertParamExists('
|
|
30851
|
-
const localVarPath = `/api/hosting/v1/accounts/{username}/websites/{domain}/
|
|
30987
|
+
assertParamExists('disableCDNV1', 'domain', domain)
|
|
30988
|
+
const localVarPath = `/api/hosting/v1/accounts/{username}/websites/{domain}/cdn/disable`
|
|
30852
30989
|
.replace(`{${"username"}}`, encodeURIComponent(String(username)))
|
|
30853
30990
|
.replace(`{${"domain"}}`, encodeURIComponent(String(domain)));
|
|
30854
30991
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
@@ -30858,7 +30995,7 @@ export const HostingCacheApiAxiosParamCreator = function (configuration?: Config
|
|
|
30858
30995
|
baseOptions = configuration.baseOptions;
|
|
30859
30996
|
}
|
|
30860
30997
|
|
|
30861
|
-
const localVarRequestOptions = { method: '
|
|
30998
|
+
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
|
|
30862
30999
|
const localVarHeaderParameter = {} as any;
|
|
30863
31000
|
const localVarQueryParameter = {} as any;
|
|
30864
31001
|
|
|
@@ -30866,10 +31003,6 @@ export const HostingCacheApiAxiosParamCreator = function (configuration?: Config
|
|
|
30866
31003
|
// http bearer authentication required
|
|
30867
31004
|
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
30868
31005
|
|
|
30869
|
-
if (directory !== undefined) {
|
|
30870
|
-
localVarQueryParameter['directory'] = directory;
|
|
30871
|
-
}
|
|
30872
|
-
|
|
30873
31006
|
|
|
30874
31007
|
|
|
30875
31008
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
@@ -30882,22 +31015,19 @@ export const HostingCacheApiAxiosParamCreator = function (configuration?: Config
|
|
|
30882
31015
|
};
|
|
30883
31016
|
},
|
|
30884
31017
|
/**
|
|
30885
|
-
* Turns
|
|
30886
|
-
* @summary
|
|
31018
|
+
* Turns on the Hostinger CDN for the website domain, which speeds up page loads and reduces the load on the server. Works for the main domain, parked domains and subdomains of the account. Enabling changes the domain\'s DNS records and usually takes a few seconds. After that, DNS propagation can take a few more minutes before visitors are served through the CDN. Repeating the call is safe, for example after a timeout. When CDN is already enabled, it applies the DNS change again and refreshes the CDN SSL certificate. Returns 422 when the account is disabled, while the account is being moved to another server (retry after the move finishes), or when the CDN provider rejects the change. Returns 404 when the domain is not a website on the account.
|
|
31019
|
+
* @summary Enable CDN
|
|
30887
31020
|
* @param {string} username
|
|
30888
31021
|
* @param {string} domain Domain name
|
|
30889
|
-
* @param {HostingV1CacheToggleCachelessModeRequest} hostingV1CacheToggleCachelessModeRequest
|
|
30890
31022
|
* @param {*} [options] Override http request option.
|
|
30891
31023
|
* @throws {RequiredError}
|
|
30892
31024
|
*/
|
|
30893
|
-
|
|
31025
|
+
enableCDNV1: async (username: string, domain: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
30894
31026
|
// verify required parameter 'username' is not null or undefined
|
|
30895
|
-
assertParamExists('
|
|
31027
|
+
assertParamExists('enableCDNV1', 'username', username)
|
|
30896
31028
|
// verify required parameter 'domain' is not null or undefined
|
|
30897
|
-
assertParamExists('
|
|
30898
|
-
|
|
30899
|
-
assertParamExists('toggleCachelessModeV1', 'hostingV1CacheToggleCachelessModeRequest', hostingV1CacheToggleCachelessModeRequest)
|
|
30900
|
-
const localVarPath = `/api/hosting/v1/accounts/{username}/websites/{domain}/cacheless-mode/toggle`
|
|
31029
|
+
assertParamExists('enableCDNV1', 'domain', domain)
|
|
31030
|
+
const localVarPath = `/api/hosting/v1/accounts/{username}/websites/{domain}/cdn/enable`
|
|
30901
31031
|
.replace(`{${"username"}}`, encodeURIComponent(String(username)))
|
|
30902
31032
|
.replace(`{${"domain"}}`, encodeURIComponent(String(domain)));
|
|
30903
31033
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
@@ -30907,7 +31037,7 @@ export const HostingCacheApiAxiosParamCreator = function (configuration?: Config
|
|
|
30907
31037
|
baseOptions = configuration.baseOptions;
|
|
30908
31038
|
}
|
|
30909
31039
|
|
|
30910
|
-
const localVarRequestOptions = { method: '
|
|
31040
|
+
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
|
|
30911
31041
|
const localVarHeaderParameter = {} as any;
|
|
30912
31042
|
const localVarQueryParameter = {} as any;
|
|
30913
31043
|
|
|
@@ -30917,12 +31047,9 @@ export const HostingCacheApiAxiosParamCreator = function (configuration?: Config
|
|
|
30917
31047
|
|
|
30918
31048
|
|
|
30919
31049
|
|
|
30920
|
-
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
30921
|
-
|
|
30922
31050
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
30923
31051
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
30924
31052
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
30925
|
-
localVarRequestOptions.data = serializeDataIfNeeded(hostingV1CacheToggleCachelessModeRequest, localVarRequestOptions, configuration)
|
|
30926
31053
|
|
|
30927
31054
|
return {
|
|
30928
31055
|
url: toPathString(localVarUrlObj),
|
|
@@ -30930,22 +31057,19 @@ export const HostingCacheApiAxiosParamCreator = function (configuration?: Config
|
|
|
30930
31057
|
};
|
|
30931
31058
|
},
|
|
30932
31059
|
/**
|
|
30933
|
-
*
|
|
30934
|
-
* @summary
|
|
31060
|
+
* Returns whether the Hostinger CDN is enabled for the website domain. Works for the main domain, parked domains and subdomains of the account. The domain must be the exact website name as listed on the account, without a `www.` prefix. Returns 404 when the domain is not a website on the account.
|
|
31061
|
+
* @summary Get CDN status
|
|
30935
31062
|
* @param {string} username
|
|
30936
31063
|
* @param {string} domain Domain name
|
|
30937
|
-
* @param {HostingV1CacheToggleCacheRequest} hostingV1CacheToggleCacheRequest
|
|
30938
31064
|
* @param {*} [options] Override http request option.
|
|
30939
31065
|
* @throws {RequiredError}
|
|
30940
31066
|
*/
|
|
30941
|
-
|
|
31067
|
+
getCDNStatusV1: async (username: string, domain: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
30942
31068
|
// verify required parameter 'username' is not null or undefined
|
|
30943
|
-
assertParamExists('
|
|
31069
|
+
assertParamExists('getCDNStatusV1', 'username', username)
|
|
30944
31070
|
// verify required parameter 'domain' is not null or undefined
|
|
30945
|
-
assertParamExists('
|
|
30946
|
-
|
|
30947
|
-
assertParamExists('toggleWebsiteCacheV1', 'hostingV1CacheToggleCacheRequest', hostingV1CacheToggleCacheRequest)
|
|
30948
|
-
const localVarPath = `/api/hosting/v1/accounts/{username}/websites/{domain}/cache/toggle`
|
|
31071
|
+
assertParamExists('getCDNStatusV1', 'domain', domain)
|
|
31072
|
+
const localVarPath = `/api/hosting/v1/accounts/{username}/websites/{domain}/cdn/status`
|
|
30949
31073
|
.replace(`{${"username"}}`, encodeURIComponent(String(username)))
|
|
30950
31074
|
.replace(`{${"domain"}}`, encodeURIComponent(String(domain)));
|
|
30951
31075
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
@@ -30955,7 +31079,7 @@ export const HostingCacheApiAxiosParamCreator = function (configuration?: Config
|
|
|
30955
31079
|
baseOptions = configuration.baseOptions;
|
|
30956
31080
|
}
|
|
30957
31081
|
|
|
30958
|
-
const localVarRequestOptions = { method: '
|
|
31082
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
|
30959
31083
|
const localVarHeaderParameter = {} as any;
|
|
30960
31084
|
const localVarQueryParameter = {} as any;
|
|
30961
31085
|
|
|
@@ -30965,237 +31089,606 @@ export const HostingCacheApiAxiosParamCreator = function (configuration?: Config
|
|
|
30965
31089
|
|
|
30966
31090
|
|
|
30967
31091
|
|
|
30968
|
-
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
30969
|
-
|
|
30970
31092
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
30971
31093
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
30972
31094
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
30973
|
-
localVarRequestOptions.data = serializeDataIfNeeded(hostingV1CacheToggleCacheRequest, localVarRequestOptions, configuration)
|
|
30974
31095
|
|
|
30975
31096
|
return {
|
|
30976
31097
|
url: toPathString(localVarUrlObj),
|
|
30977
31098
|
options: localVarRequestOptions,
|
|
30978
31099
|
};
|
|
30979
31100
|
},
|
|
30980
|
-
}
|
|
30981
|
-
};
|
|
30982
|
-
|
|
30983
|
-
/**
|
|
30984
|
-
* HostingCacheApi - functional programming interface
|
|
30985
|
-
* @export
|
|
30986
|
-
*/
|
|
30987
|
-
export const HostingCacheApiFp = function(configuration?: Configuration) {
|
|
30988
|
-
const localVarAxiosParamCreator = HostingCacheApiAxiosParamCreator(configuration)
|
|
30989
|
-
return {
|
|
30990
31101
|
/**
|
|
30991
|
-
*
|
|
30992
|
-
* @summary
|
|
31102
|
+
* Purges the website\'s content from the Hostinger CDN edge cache only. The origin server cache is not touched; to clear both, use `Clear website cache`. Returns 422 when CDN is not enabled on the website. Returns 404 when the domain is not a website on the account.
|
|
31103
|
+
* @summary Purge CDN cache
|
|
30993
31104
|
* @param {string} username
|
|
30994
31105
|
* @param {string} domain Domain name
|
|
30995
|
-
* @param {string} [directory] Directory of the website installation to clear, relative to the website root. Defaults to the website root.
|
|
30996
31106
|
* @param {*} [options] Override http request option.
|
|
30997
31107
|
* @throws {RequiredError}
|
|
30998
31108
|
*/
|
|
30999
|
-
async
|
|
31000
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.clearWebsiteCacheV1(username, domain, directory, options);
|
|
31001
|
-
const localVarOperationServerBasePath = operationServerMap['HostingCacheApi.clearWebsiteCacheV1']?.[0]?.url;
|
|
31002
|
-
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
31003
|
-
},
|
|
31004
|
-
/**
|
|
31005
|
-
* Turns development (cacheless) mode on or off, based on the enabled flag. When enabled, nothing is cached, effectively turning off all caching for the website; use it while actively developing, testing changes, debugging issues, or when real-time updates must be visible. Disable it after finishing development work to restore the performance benefits of caching.
|
|
31006
|
-
* @summary Toggle cacheless mode
|
|
31007
|
-
* @param {string} username
|
|
31008
|
-
* @param {string} domain Domain name
|
|
31009
|
-
* @param {HostingV1CacheToggleCachelessModeRequest} hostingV1CacheToggleCachelessModeRequest
|
|
31010
|
-
* @param {*} [options] Override http request option.
|
|
31011
|
-
* @throws {RequiredError}
|
|
31012
|
-
*/
|
|
31013
|
-
async toggleCachelessModeV1(username: string, domain: string, hostingV1CacheToggleCachelessModeRequest: HostingV1CacheToggleCachelessModeRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CommonSuccessEmptyResource>> {
|
|
31014
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.toggleCachelessModeV1(username, domain, hostingV1CacheToggleCachelessModeRequest, options);
|
|
31015
|
-
const localVarOperationServerBasePath = operationServerMap['HostingCacheApi.toggleCachelessModeV1']?.[0]?.url;
|
|
31016
|
-
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
31017
|
-
},
|
|
31018
|
-
/**
|
|
31019
|
-
* Turns server-side caching for the website on or off, based on the enabled flag. Enable it for faster page loads, reduced server load, and improved user experience; recommended for production websites. Disabling may impact performance; to temporarily bypass caching while developing or debugging, prefer toggling cacheless mode instead. Does nothing if caching is already in the requested state.
|
|
31020
|
-
* @summary Toggle website cache
|
|
31021
|
-
* @param {string} username
|
|
31022
|
-
* @param {string} domain Domain name
|
|
31023
|
-
* @param {HostingV1CacheToggleCacheRequest} hostingV1CacheToggleCacheRequest
|
|
31024
|
-
* @param {*} [options] Override http request option.
|
|
31025
|
-
* @throws {RequiredError}
|
|
31026
|
-
*/
|
|
31027
|
-
async toggleWebsiteCacheV1(username: string, domain: string, hostingV1CacheToggleCacheRequest: HostingV1CacheToggleCacheRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CommonSuccessEmptyResource>> {
|
|
31028
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.toggleWebsiteCacheV1(username, domain, hostingV1CacheToggleCacheRequest, options);
|
|
31029
|
-
const localVarOperationServerBasePath = operationServerMap['HostingCacheApi.toggleWebsiteCacheV1']?.[0]?.url;
|
|
31030
|
-
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
31031
|
-
},
|
|
31032
|
-
}
|
|
31033
|
-
};
|
|
31034
|
-
|
|
31035
|
-
/**
|
|
31036
|
-
* HostingCacheApi - factory interface
|
|
31037
|
-
* @export
|
|
31038
|
-
*/
|
|
31039
|
-
export const HostingCacheApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
|
31040
|
-
const localVarFp = HostingCacheApiFp(configuration)
|
|
31041
|
-
return {
|
|
31042
|
-
/**
|
|
31043
|
-
* Permanently clears all server-side cache for the website at once. Use it when content was updated and needs to be visible immediately, or after making major changes. Also purges the Hostinger CDN cache when CDN is enabled on the website. For a WordPress installation living in a subdirectory, pass the directory query parameter to clear its cache.
|
|
31044
|
-
* @summary Clear website cache
|
|
31045
|
-
* @param {string} username
|
|
31046
|
-
* @param {string} domain Domain name
|
|
31047
|
-
* @param {string} [directory] Directory of the website installation to clear, relative to the website root. Defaults to the website root.
|
|
31048
|
-
* @param {*} [options] Override http request option.
|
|
31049
|
-
* @throws {RequiredError}
|
|
31050
|
-
*/
|
|
31051
|
-
clearWebsiteCacheV1(username: string, domain: string, directory?: string, options?: RawAxiosRequestConfig): AxiosPromise<CommonSuccessEmptyResource> {
|
|
31052
|
-
return localVarFp.clearWebsiteCacheV1(username, domain, directory, options).then((request) => request(axios, basePath));
|
|
31053
|
-
},
|
|
31054
|
-
/**
|
|
31055
|
-
* Turns development (cacheless) mode on or off, based on the enabled flag. When enabled, nothing is cached, effectively turning off all caching for the website; use it while actively developing, testing changes, debugging issues, or when real-time updates must be visible. Disable it after finishing development work to restore the performance benefits of caching.
|
|
31056
|
-
* @summary Toggle cacheless mode
|
|
31057
|
-
* @param {string} username
|
|
31058
|
-
* @param {string} domain Domain name
|
|
31059
|
-
* @param {HostingV1CacheToggleCachelessModeRequest} hostingV1CacheToggleCachelessModeRequest
|
|
31060
|
-
* @param {*} [options] Override http request option.
|
|
31061
|
-
* @throws {RequiredError}
|
|
31062
|
-
*/
|
|
31063
|
-
toggleCachelessModeV1(username: string, domain: string, hostingV1CacheToggleCachelessModeRequest: HostingV1CacheToggleCachelessModeRequest, options?: RawAxiosRequestConfig): AxiosPromise<CommonSuccessEmptyResource> {
|
|
31064
|
-
return localVarFp.toggleCachelessModeV1(username, domain, hostingV1CacheToggleCachelessModeRequest, options).then((request) => request(axios, basePath));
|
|
31065
|
-
},
|
|
31066
|
-
/**
|
|
31067
|
-
* Turns server-side caching for the website on or off, based on the enabled flag. Enable it for faster page loads, reduced server load, and improved user experience; recommended for production websites. Disabling may impact performance; to temporarily bypass caching while developing or debugging, prefer toggling cacheless mode instead. Does nothing if caching is already in the requested state.
|
|
31068
|
-
* @summary Toggle website cache
|
|
31069
|
-
* @param {string} username
|
|
31070
|
-
* @param {string} domain Domain name
|
|
31071
|
-
* @param {HostingV1CacheToggleCacheRequest} hostingV1CacheToggleCacheRequest
|
|
31072
|
-
* @param {*} [options] Override http request option.
|
|
31073
|
-
* @throws {RequiredError}
|
|
31074
|
-
*/
|
|
31075
|
-
toggleWebsiteCacheV1(username: string, domain: string, hostingV1CacheToggleCacheRequest: HostingV1CacheToggleCacheRequest, options?: RawAxiosRequestConfig): AxiosPromise<CommonSuccessEmptyResource> {
|
|
31076
|
-
return localVarFp.toggleWebsiteCacheV1(username, domain, hostingV1CacheToggleCacheRequest, options).then((request) => request(axios, basePath));
|
|
31077
|
-
},
|
|
31078
|
-
};
|
|
31079
|
-
};
|
|
31080
|
-
|
|
31081
|
-
/**
|
|
31082
|
-
* HostingCacheApi - object-oriented interface
|
|
31083
|
-
* @export
|
|
31084
|
-
* @class HostingCacheApi
|
|
31085
|
-
* @extends {BaseAPI}
|
|
31086
|
-
*/
|
|
31087
|
-
export class HostingCacheApi extends BaseAPI {
|
|
31088
|
-
/**
|
|
31089
|
-
* Permanently clears all server-side cache for the website at once. Use it when content was updated and needs to be visible immediately, or after making major changes. Also purges the Hostinger CDN cache when CDN is enabled on the website. For a WordPress installation living in a subdirectory, pass the directory query parameter to clear its cache.
|
|
31090
|
-
* @summary Clear website cache
|
|
31091
|
-
* @param {string} username
|
|
31092
|
-
* @param {string} domain Domain name
|
|
31093
|
-
* @param {string} [directory] Directory of the website installation to clear, relative to the website root. Defaults to the website root.
|
|
31094
|
-
* @param {*} [options] Override http request option.
|
|
31095
|
-
* @throws {RequiredError}
|
|
31096
|
-
* @memberof HostingCacheApi
|
|
31097
|
-
*/
|
|
31098
|
-
public clearWebsiteCacheV1(username: string, domain: string, directory?: string, options?: RawAxiosRequestConfig) {
|
|
31099
|
-
return HostingCacheApiFp(this.configuration).clearWebsiteCacheV1(username, domain, directory, options).then((request) => request(this.axios, this.basePath));
|
|
31100
|
-
}
|
|
31101
|
-
|
|
31102
|
-
/**
|
|
31103
|
-
* Turns development (cacheless) mode on or off, based on the enabled flag. When enabled, nothing is cached, effectively turning off all caching for the website; use it while actively developing, testing changes, debugging issues, or when real-time updates must be visible. Disable it after finishing development work to restore the performance benefits of caching.
|
|
31104
|
-
* @summary Toggle cacheless mode
|
|
31105
|
-
* @param {string} username
|
|
31106
|
-
* @param {string} domain Domain name
|
|
31107
|
-
* @param {HostingV1CacheToggleCachelessModeRequest} hostingV1CacheToggleCachelessModeRequest
|
|
31108
|
-
* @param {*} [options] Override http request option.
|
|
31109
|
-
* @throws {RequiredError}
|
|
31110
|
-
* @memberof HostingCacheApi
|
|
31111
|
-
*/
|
|
31112
|
-
public toggleCachelessModeV1(username: string, domain: string, hostingV1CacheToggleCachelessModeRequest: HostingV1CacheToggleCachelessModeRequest, options?: RawAxiosRequestConfig) {
|
|
31113
|
-
return HostingCacheApiFp(this.configuration).toggleCachelessModeV1(username, domain, hostingV1CacheToggleCachelessModeRequest, options).then((request) => request(this.axios, this.basePath));
|
|
31114
|
-
}
|
|
31115
|
-
|
|
31116
|
-
/**
|
|
31117
|
-
* Turns server-side caching for the website on or off, based on the enabled flag. Enable it for faster page loads, reduced server load, and improved user experience; recommended for production websites. Disabling may impact performance; to temporarily bypass caching while developing or debugging, prefer toggling cacheless mode instead. Does nothing if caching is already in the requested state.
|
|
31118
|
-
* @summary Toggle website cache
|
|
31119
|
-
* @param {string} username
|
|
31120
|
-
* @param {string} domain Domain name
|
|
31121
|
-
* @param {HostingV1CacheToggleCacheRequest} hostingV1CacheToggleCacheRequest
|
|
31122
|
-
* @param {*} [options] Override http request option.
|
|
31123
|
-
* @throws {RequiredError}
|
|
31124
|
-
* @memberof HostingCacheApi
|
|
31125
|
-
*/
|
|
31126
|
-
public toggleWebsiteCacheV1(username: string, domain: string, hostingV1CacheToggleCacheRequest: HostingV1CacheToggleCacheRequest, options?: RawAxiosRequestConfig) {
|
|
31127
|
-
return HostingCacheApiFp(this.configuration).toggleWebsiteCacheV1(username, domain, hostingV1CacheToggleCacheRequest, options).then((request) => request(this.axios, this.basePath));
|
|
31128
|
-
}
|
|
31129
|
-
}
|
|
31130
|
-
|
|
31131
|
-
|
|
31132
|
-
|
|
31133
|
-
/**
|
|
31134
|
-
* HostingCronJobsApi - axios parameter creator
|
|
31135
|
-
* @export
|
|
31136
|
-
*/
|
|
31137
|
-
export const HostingCronJobsApiAxiosParamCreator = function (configuration?: Configuration) {
|
|
31138
|
-
return {
|
|
31139
|
-
/**
|
|
31140
|
-
* Creates a cron job for the specified account from a schedule expression and a command. Returns the created cron job, including its uid, which is required to delete the cron job or fetch its output.
|
|
31141
|
-
* @summary Create account cron job
|
|
31142
|
-
* @param {string} username
|
|
31143
|
-
* @param {HostingV1CronJobsCreateCronJobRequest} hostingV1CronJobsCreateCronJobRequest
|
|
31144
|
-
* @param {*} [options] Override http request option.
|
|
31145
|
-
* @throws {RequiredError}
|
|
31146
|
-
*/
|
|
31147
|
-
createAccountCronJobV1: async (username: string, hostingV1CronJobsCreateCronJobRequest: HostingV1CronJobsCreateCronJobRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
31109
|
+
purgeCDNCacheV1: async (username: string, domain: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
31148
31110
|
// verify required parameter 'username' is not null or undefined
|
|
31149
|
-
assertParamExists('
|
|
31150
|
-
// verify required parameter '
|
|
31151
|
-
assertParamExists('
|
|
31152
|
-
const localVarPath = `/api/hosting/v1/accounts/{username}/
|
|
31153
|
-
.replace(`{${"username"}}`, encodeURIComponent(String(username)));
|
|
31154
|
-
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
31155
|
-
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
31156
|
-
let baseOptions;
|
|
31157
|
-
if (configuration) {
|
|
31158
|
-
baseOptions = configuration.baseOptions;
|
|
31159
|
-
}
|
|
31160
|
-
|
|
31161
|
-
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
|
|
31162
|
-
const localVarHeaderParameter = {} as any;
|
|
31163
|
-
const localVarQueryParameter = {} as any;
|
|
31164
|
-
|
|
31165
|
-
// authentication apiToken required
|
|
31166
|
-
// http bearer authentication required
|
|
31167
|
-
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
31168
|
-
|
|
31169
|
-
|
|
31170
|
-
|
|
31171
|
-
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
31172
|
-
|
|
31173
|
-
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
31174
|
-
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
31175
|
-
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
31176
|
-
localVarRequestOptions.data = serializeDataIfNeeded(hostingV1CronJobsCreateCronJobRequest, localVarRequestOptions, configuration)
|
|
31177
|
-
|
|
31178
|
-
return {
|
|
31179
|
-
url: toPathString(localVarUrlObj),
|
|
31180
|
-
options: localVarRequestOptions,
|
|
31181
|
-
};
|
|
31182
|
-
},
|
|
31183
|
-
/**
|
|
31184
|
-
* Permanently deletes the cron job identified by its uid. The uid is returned by the list cron jobs endpoint.
|
|
31185
|
-
* @summary Delete account cron job
|
|
31186
|
-
* @param {string} username
|
|
31187
|
-
* @param {string} uid Unique identifier of the cron job as returned by the list cron jobs endpoint.
|
|
31188
|
-
* @param {*} [options] Override http request option.
|
|
31189
|
-
* @throws {RequiredError}
|
|
31190
|
-
*/
|
|
31191
|
-
deleteAccountCronJobV1: async (username: string, uid: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
31192
|
-
// verify required parameter 'username' is not null or undefined
|
|
31193
|
-
assertParamExists('deleteAccountCronJobV1', 'username', username)
|
|
31194
|
-
// verify required parameter 'uid' is not null or undefined
|
|
31195
|
-
assertParamExists('deleteAccountCronJobV1', 'uid', uid)
|
|
31196
|
-
const localVarPath = `/api/hosting/v1/accounts/{username}/cron-jobs/{uid}`
|
|
31111
|
+
assertParamExists('purgeCDNCacheV1', 'username', username)
|
|
31112
|
+
// verify required parameter 'domain' is not null or undefined
|
|
31113
|
+
assertParamExists('purgeCDNCacheV1', 'domain', domain)
|
|
31114
|
+
const localVarPath = `/api/hosting/v1/accounts/{username}/websites/{domain}/cdn/purge`
|
|
31197
31115
|
.replace(`{${"username"}}`, encodeURIComponent(String(username)))
|
|
31198
|
-
.replace(`{${"
|
|
31116
|
+
.replace(`{${"domain"}}`, encodeURIComponent(String(domain)));
|
|
31117
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
31118
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
31119
|
+
let baseOptions;
|
|
31120
|
+
if (configuration) {
|
|
31121
|
+
baseOptions = configuration.baseOptions;
|
|
31122
|
+
}
|
|
31123
|
+
|
|
31124
|
+
const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options};
|
|
31125
|
+
const localVarHeaderParameter = {} as any;
|
|
31126
|
+
const localVarQueryParameter = {} as any;
|
|
31127
|
+
|
|
31128
|
+
// authentication apiToken required
|
|
31129
|
+
// http bearer authentication required
|
|
31130
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
31131
|
+
|
|
31132
|
+
|
|
31133
|
+
|
|
31134
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
31135
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
31136
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
31137
|
+
|
|
31138
|
+
return {
|
|
31139
|
+
url: toPathString(localVarUrlObj),
|
|
31140
|
+
options: localVarRequestOptions,
|
|
31141
|
+
};
|
|
31142
|
+
},
|
|
31143
|
+
}
|
|
31144
|
+
};
|
|
31145
|
+
|
|
31146
|
+
/**
|
|
31147
|
+
* HostingCDNApi - functional programming interface
|
|
31148
|
+
* @export
|
|
31149
|
+
*/
|
|
31150
|
+
export const HostingCDNApiFp = function(configuration?: Configuration) {
|
|
31151
|
+
const localVarAxiosParamCreator = HostingCDNApiAxiosParamCreator(configuration)
|
|
31152
|
+
return {
|
|
31153
|
+
/**
|
|
31154
|
+
* Turns off the Hostinger CDN for the website domain. Once DNS propagation completes, the website content is served directly from the origin server. Repeating the call is safe; when CDN is already disabled, it applies the DNS change again. Returns 422 for platform-managed domains (for example `*.hostingersite.com` and `*.app-preview.com`), where CDN cannot be disabled, even when CDN is already off. Also returns 422 while the account is being moved to another server (retry after the move finishes), or when the CDN provider rejects the change. Returns 404 when the domain is not a website on the account.
|
|
31155
|
+
* @summary Disable CDN
|
|
31156
|
+
* @param {string} username
|
|
31157
|
+
* @param {string} domain Domain name
|
|
31158
|
+
* @param {*} [options] Override http request option.
|
|
31159
|
+
* @throws {RequiredError}
|
|
31160
|
+
*/
|
|
31161
|
+
async disableCDNV1(username: string, domain: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CommonSuccessEmptyResource>> {
|
|
31162
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.disableCDNV1(username, domain, options);
|
|
31163
|
+
const localVarOperationServerBasePath = operationServerMap['HostingCDNApi.disableCDNV1']?.[0]?.url;
|
|
31164
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
31165
|
+
},
|
|
31166
|
+
/**
|
|
31167
|
+
* Turns on the Hostinger CDN for the website domain, which speeds up page loads and reduces the load on the server. Works for the main domain, parked domains and subdomains of the account. Enabling changes the domain\'s DNS records and usually takes a few seconds. After that, DNS propagation can take a few more minutes before visitors are served through the CDN. Repeating the call is safe, for example after a timeout. When CDN is already enabled, it applies the DNS change again and refreshes the CDN SSL certificate. Returns 422 when the account is disabled, while the account is being moved to another server (retry after the move finishes), or when the CDN provider rejects the change. Returns 404 when the domain is not a website on the account.
|
|
31168
|
+
* @summary Enable CDN
|
|
31169
|
+
* @param {string} username
|
|
31170
|
+
* @param {string} domain Domain name
|
|
31171
|
+
* @param {*} [options] Override http request option.
|
|
31172
|
+
* @throws {RequiredError}
|
|
31173
|
+
*/
|
|
31174
|
+
async enableCDNV1(username: string, domain: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CommonSuccessEmptyResource>> {
|
|
31175
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.enableCDNV1(username, domain, options);
|
|
31176
|
+
const localVarOperationServerBasePath = operationServerMap['HostingCDNApi.enableCDNV1']?.[0]?.url;
|
|
31177
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
31178
|
+
},
|
|
31179
|
+
/**
|
|
31180
|
+
* Returns whether the Hostinger CDN is enabled for the website domain. Works for the main domain, parked domains and subdomains of the account. The domain must be the exact website name as listed on the account, without a `www.` prefix. Returns 404 when the domain is not a website on the account.
|
|
31181
|
+
* @summary Get CDN status
|
|
31182
|
+
* @param {string} username
|
|
31183
|
+
* @param {string} domain Domain name
|
|
31184
|
+
* @param {*} [options] Override http request option.
|
|
31185
|
+
* @throws {RequiredError}
|
|
31186
|
+
*/
|
|
31187
|
+
async getCDNStatusV1(username: string, domain: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<HostingV1CdnCdnStatusResource>> {
|
|
31188
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getCDNStatusV1(username, domain, options);
|
|
31189
|
+
const localVarOperationServerBasePath = operationServerMap['HostingCDNApi.getCDNStatusV1']?.[0]?.url;
|
|
31190
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
31191
|
+
},
|
|
31192
|
+
/**
|
|
31193
|
+
* Purges the website\'s content from the Hostinger CDN edge cache only. The origin server cache is not touched; to clear both, use `Clear website cache`. Returns 422 when CDN is not enabled on the website. Returns 404 when the domain is not a website on the account.
|
|
31194
|
+
* @summary Purge CDN cache
|
|
31195
|
+
* @param {string} username
|
|
31196
|
+
* @param {string} domain Domain name
|
|
31197
|
+
* @param {*} [options] Override http request option.
|
|
31198
|
+
* @throws {RequiredError}
|
|
31199
|
+
*/
|
|
31200
|
+
async purgeCDNCacheV1(username: string, domain: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CommonSuccessEmptyResource>> {
|
|
31201
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.purgeCDNCacheV1(username, domain, options);
|
|
31202
|
+
const localVarOperationServerBasePath = operationServerMap['HostingCDNApi.purgeCDNCacheV1']?.[0]?.url;
|
|
31203
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
31204
|
+
},
|
|
31205
|
+
}
|
|
31206
|
+
};
|
|
31207
|
+
|
|
31208
|
+
/**
|
|
31209
|
+
* HostingCDNApi - factory interface
|
|
31210
|
+
* @export
|
|
31211
|
+
*/
|
|
31212
|
+
export const HostingCDNApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
|
31213
|
+
const localVarFp = HostingCDNApiFp(configuration)
|
|
31214
|
+
return {
|
|
31215
|
+
/**
|
|
31216
|
+
* Turns off the Hostinger CDN for the website domain. Once DNS propagation completes, the website content is served directly from the origin server. Repeating the call is safe; when CDN is already disabled, it applies the DNS change again. Returns 422 for platform-managed domains (for example `*.hostingersite.com` and `*.app-preview.com`), where CDN cannot be disabled, even when CDN is already off. Also returns 422 while the account is being moved to another server (retry after the move finishes), or when the CDN provider rejects the change. Returns 404 when the domain is not a website on the account.
|
|
31217
|
+
* @summary Disable CDN
|
|
31218
|
+
* @param {string} username
|
|
31219
|
+
* @param {string} domain Domain name
|
|
31220
|
+
* @param {*} [options] Override http request option.
|
|
31221
|
+
* @throws {RequiredError}
|
|
31222
|
+
*/
|
|
31223
|
+
disableCDNV1(username: string, domain: string, options?: RawAxiosRequestConfig): AxiosPromise<CommonSuccessEmptyResource> {
|
|
31224
|
+
return localVarFp.disableCDNV1(username, domain, options).then((request) => request(axios, basePath));
|
|
31225
|
+
},
|
|
31226
|
+
/**
|
|
31227
|
+
* Turns on the Hostinger CDN for the website domain, which speeds up page loads and reduces the load on the server. Works for the main domain, parked domains and subdomains of the account. Enabling changes the domain\'s DNS records and usually takes a few seconds. After that, DNS propagation can take a few more minutes before visitors are served through the CDN. Repeating the call is safe, for example after a timeout. When CDN is already enabled, it applies the DNS change again and refreshes the CDN SSL certificate. Returns 422 when the account is disabled, while the account is being moved to another server (retry after the move finishes), or when the CDN provider rejects the change. Returns 404 when the domain is not a website on the account.
|
|
31228
|
+
* @summary Enable CDN
|
|
31229
|
+
* @param {string} username
|
|
31230
|
+
* @param {string} domain Domain name
|
|
31231
|
+
* @param {*} [options] Override http request option.
|
|
31232
|
+
* @throws {RequiredError}
|
|
31233
|
+
*/
|
|
31234
|
+
enableCDNV1(username: string, domain: string, options?: RawAxiosRequestConfig): AxiosPromise<CommonSuccessEmptyResource> {
|
|
31235
|
+
return localVarFp.enableCDNV1(username, domain, options).then((request) => request(axios, basePath));
|
|
31236
|
+
},
|
|
31237
|
+
/**
|
|
31238
|
+
* Returns whether the Hostinger CDN is enabled for the website domain. Works for the main domain, parked domains and subdomains of the account. The domain must be the exact website name as listed on the account, without a `www.` prefix. Returns 404 when the domain is not a website on the account.
|
|
31239
|
+
* @summary Get CDN status
|
|
31240
|
+
* @param {string} username
|
|
31241
|
+
* @param {string} domain Domain name
|
|
31242
|
+
* @param {*} [options] Override http request option.
|
|
31243
|
+
* @throws {RequiredError}
|
|
31244
|
+
*/
|
|
31245
|
+
getCDNStatusV1(username: string, domain: string, options?: RawAxiosRequestConfig): AxiosPromise<HostingV1CdnCdnStatusResource> {
|
|
31246
|
+
return localVarFp.getCDNStatusV1(username, domain, options).then((request) => request(axios, basePath));
|
|
31247
|
+
},
|
|
31248
|
+
/**
|
|
31249
|
+
* Purges the website\'s content from the Hostinger CDN edge cache only. The origin server cache is not touched; to clear both, use `Clear website cache`. Returns 422 when CDN is not enabled on the website. Returns 404 when the domain is not a website on the account.
|
|
31250
|
+
* @summary Purge CDN cache
|
|
31251
|
+
* @param {string} username
|
|
31252
|
+
* @param {string} domain Domain name
|
|
31253
|
+
* @param {*} [options] Override http request option.
|
|
31254
|
+
* @throws {RequiredError}
|
|
31255
|
+
*/
|
|
31256
|
+
purgeCDNCacheV1(username: string, domain: string, options?: RawAxiosRequestConfig): AxiosPromise<CommonSuccessEmptyResource> {
|
|
31257
|
+
return localVarFp.purgeCDNCacheV1(username, domain, options).then((request) => request(axios, basePath));
|
|
31258
|
+
},
|
|
31259
|
+
};
|
|
31260
|
+
};
|
|
31261
|
+
|
|
31262
|
+
/**
|
|
31263
|
+
* HostingCDNApi - object-oriented interface
|
|
31264
|
+
* @export
|
|
31265
|
+
* @class HostingCDNApi
|
|
31266
|
+
* @extends {BaseAPI}
|
|
31267
|
+
*/
|
|
31268
|
+
export class HostingCDNApi extends BaseAPI {
|
|
31269
|
+
/**
|
|
31270
|
+
* Turns off the Hostinger CDN for the website domain. Once DNS propagation completes, the website content is served directly from the origin server. Repeating the call is safe; when CDN is already disabled, it applies the DNS change again. Returns 422 for platform-managed domains (for example `*.hostingersite.com` and `*.app-preview.com`), where CDN cannot be disabled, even when CDN is already off. Also returns 422 while the account is being moved to another server (retry after the move finishes), or when the CDN provider rejects the change. Returns 404 when the domain is not a website on the account.
|
|
31271
|
+
* @summary Disable CDN
|
|
31272
|
+
* @param {string} username
|
|
31273
|
+
* @param {string} domain Domain name
|
|
31274
|
+
* @param {*} [options] Override http request option.
|
|
31275
|
+
* @throws {RequiredError}
|
|
31276
|
+
* @memberof HostingCDNApi
|
|
31277
|
+
*/
|
|
31278
|
+
public disableCDNV1(username: string, domain: string, options?: RawAxiosRequestConfig) {
|
|
31279
|
+
return HostingCDNApiFp(this.configuration).disableCDNV1(username, domain, options).then((request) => request(this.axios, this.basePath));
|
|
31280
|
+
}
|
|
31281
|
+
|
|
31282
|
+
/**
|
|
31283
|
+
* Turns on the Hostinger CDN for the website domain, which speeds up page loads and reduces the load on the server. Works for the main domain, parked domains and subdomains of the account. Enabling changes the domain\'s DNS records and usually takes a few seconds. After that, DNS propagation can take a few more minutes before visitors are served through the CDN. Repeating the call is safe, for example after a timeout. When CDN is already enabled, it applies the DNS change again and refreshes the CDN SSL certificate. Returns 422 when the account is disabled, while the account is being moved to another server (retry after the move finishes), or when the CDN provider rejects the change. Returns 404 when the domain is not a website on the account.
|
|
31284
|
+
* @summary Enable CDN
|
|
31285
|
+
* @param {string} username
|
|
31286
|
+
* @param {string} domain Domain name
|
|
31287
|
+
* @param {*} [options] Override http request option.
|
|
31288
|
+
* @throws {RequiredError}
|
|
31289
|
+
* @memberof HostingCDNApi
|
|
31290
|
+
*/
|
|
31291
|
+
public enableCDNV1(username: string, domain: string, options?: RawAxiosRequestConfig) {
|
|
31292
|
+
return HostingCDNApiFp(this.configuration).enableCDNV1(username, domain, options).then((request) => request(this.axios, this.basePath));
|
|
31293
|
+
}
|
|
31294
|
+
|
|
31295
|
+
/**
|
|
31296
|
+
* Returns whether the Hostinger CDN is enabled for the website domain. Works for the main domain, parked domains and subdomains of the account. The domain must be the exact website name as listed on the account, without a `www.` prefix. Returns 404 when the domain is not a website on the account.
|
|
31297
|
+
* @summary Get CDN status
|
|
31298
|
+
* @param {string} username
|
|
31299
|
+
* @param {string} domain Domain name
|
|
31300
|
+
* @param {*} [options] Override http request option.
|
|
31301
|
+
* @throws {RequiredError}
|
|
31302
|
+
* @memberof HostingCDNApi
|
|
31303
|
+
*/
|
|
31304
|
+
public getCDNStatusV1(username: string, domain: string, options?: RawAxiosRequestConfig) {
|
|
31305
|
+
return HostingCDNApiFp(this.configuration).getCDNStatusV1(username, domain, options).then((request) => request(this.axios, this.basePath));
|
|
31306
|
+
}
|
|
31307
|
+
|
|
31308
|
+
/**
|
|
31309
|
+
* Purges the website\'s content from the Hostinger CDN edge cache only. The origin server cache is not touched; to clear both, use `Clear website cache`. Returns 422 when CDN is not enabled on the website. Returns 404 when the domain is not a website on the account.
|
|
31310
|
+
* @summary Purge CDN cache
|
|
31311
|
+
* @param {string} username
|
|
31312
|
+
* @param {string} domain Domain name
|
|
31313
|
+
* @param {*} [options] Override http request option.
|
|
31314
|
+
* @throws {RequiredError}
|
|
31315
|
+
* @memberof HostingCDNApi
|
|
31316
|
+
*/
|
|
31317
|
+
public purgeCDNCacheV1(username: string, domain: string, options?: RawAxiosRequestConfig) {
|
|
31318
|
+
return HostingCDNApiFp(this.configuration).purgeCDNCacheV1(username, domain, options).then((request) => request(this.axios, this.basePath));
|
|
31319
|
+
}
|
|
31320
|
+
}
|
|
31321
|
+
|
|
31322
|
+
|
|
31323
|
+
|
|
31324
|
+
/**
|
|
31325
|
+
* HostingCacheApi - axios parameter creator
|
|
31326
|
+
* @export
|
|
31327
|
+
*/
|
|
31328
|
+
export const HostingCacheApiAxiosParamCreator = function (configuration?: Configuration) {
|
|
31329
|
+
return {
|
|
31330
|
+
/**
|
|
31331
|
+
* Permanently clears all server-side cache for the website at once. Use it when content was updated and needs to be visible immediately, or after making major changes. Also purges the Hostinger CDN cache when CDN is enabled on the website. To purge only the CDN cache and leave the server cache untouched, use `Purge CDN cache`. For a WordPress installation living in a subdirectory, pass the directory query parameter to clear its cache.
|
|
31332
|
+
* @summary Clear website cache
|
|
31333
|
+
* @param {string} username
|
|
31334
|
+
* @param {string} domain Domain name
|
|
31335
|
+
* @param {string} [directory] Directory of the website installation to clear, relative to the website root. Defaults to the website root.
|
|
31336
|
+
* @param {*} [options] Override http request option.
|
|
31337
|
+
* @throws {RequiredError}
|
|
31338
|
+
*/
|
|
31339
|
+
clearWebsiteCacheV1: async (username: string, domain: string, directory?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
31340
|
+
// verify required parameter 'username' is not null or undefined
|
|
31341
|
+
assertParamExists('clearWebsiteCacheV1', 'username', username)
|
|
31342
|
+
// verify required parameter 'domain' is not null or undefined
|
|
31343
|
+
assertParamExists('clearWebsiteCacheV1', 'domain', domain)
|
|
31344
|
+
const localVarPath = `/api/hosting/v1/accounts/{username}/websites/{domain}/cache/clear`
|
|
31345
|
+
.replace(`{${"username"}}`, encodeURIComponent(String(username)))
|
|
31346
|
+
.replace(`{${"domain"}}`, encodeURIComponent(String(domain)));
|
|
31347
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
31348
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
31349
|
+
let baseOptions;
|
|
31350
|
+
if (configuration) {
|
|
31351
|
+
baseOptions = configuration.baseOptions;
|
|
31352
|
+
}
|
|
31353
|
+
|
|
31354
|
+
const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options};
|
|
31355
|
+
const localVarHeaderParameter = {} as any;
|
|
31356
|
+
const localVarQueryParameter = {} as any;
|
|
31357
|
+
|
|
31358
|
+
// authentication apiToken required
|
|
31359
|
+
// http bearer authentication required
|
|
31360
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
31361
|
+
|
|
31362
|
+
if (directory !== undefined) {
|
|
31363
|
+
localVarQueryParameter['directory'] = directory;
|
|
31364
|
+
}
|
|
31365
|
+
|
|
31366
|
+
|
|
31367
|
+
|
|
31368
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
31369
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
31370
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
31371
|
+
|
|
31372
|
+
return {
|
|
31373
|
+
url: toPathString(localVarUrlObj),
|
|
31374
|
+
options: localVarRequestOptions,
|
|
31375
|
+
};
|
|
31376
|
+
},
|
|
31377
|
+
/**
|
|
31378
|
+
* Turns development (cacheless) mode on or off, based on the enabled flag. When enabled, nothing is cached, effectively turning off all caching for the website; use it while actively developing, testing changes, debugging issues, or when real-time updates must be visible. Disable it after finishing development work to restore the performance benefits of caching.
|
|
31379
|
+
* @summary Toggle cacheless mode
|
|
31380
|
+
* @param {string} username
|
|
31381
|
+
* @param {string} domain Domain name
|
|
31382
|
+
* @param {HostingV1CacheToggleCachelessModeRequest} hostingV1CacheToggleCachelessModeRequest
|
|
31383
|
+
* @param {*} [options] Override http request option.
|
|
31384
|
+
* @throws {RequiredError}
|
|
31385
|
+
*/
|
|
31386
|
+
toggleCachelessModeV1: async (username: string, domain: string, hostingV1CacheToggleCachelessModeRequest: HostingV1CacheToggleCachelessModeRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
31387
|
+
// verify required parameter 'username' is not null or undefined
|
|
31388
|
+
assertParamExists('toggleCachelessModeV1', 'username', username)
|
|
31389
|
+
// verify required parameter 'domain' is not null or undefined
|
|
31390
|
+
assertParamExists('toggleCachelessModeV1', 'domain', domain)
|
|
31391
|
+
// verify required parameter 'hostingV1CacheToggleCachelessModeRequest' is not null or undefined
|
|
31392
|
+
assertParamExists('toggleCachelessModeV1', 'hostingV1CacheToggleCachelessModeRequest', hostingV1CacheToggleCachelessModeRequest)
|
|
31393
|
+
const localVarPath = `/api/hosting/v1/accounts/{username}/websites/{domain}/cacheless-mode/toggle`
|
|
31394
|
+
.replace(`{${"username"}}`, encodeURIComponent(String(username)))
|
|
31395
|
+
.replace(`{${"domain"}}`, encodeURIComponent(String(domain)));
|
|
31396
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
31397
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
31398
|
+
let baseOptions;
|
|
31399
|
+
if (configuration) {
|
|
31400
|
+
baseOptions = configuration.baseOptions;
|
|
31401
|
+
}
|
|
31402
|
+
|
|
31403
|
+
const localVarRequestOptions = { method: 'PATCH', ...baseOptions, ...options};
|
|
31404
|
+
const localVarHeaderParameter = {} as any;
|
|
31405
|
+
const localVarQueryParameter = {} as any;
|
|
31406
|
+
|
|
31407
|
+
// authentication apiToken required
|
|
31408
|
+
// http bearer authentication required
|
|
31409
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
31410
|
+
|
|
31411
|
+
|
|
31412
|
+
|
|
31413
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
31414
|
+
|
|
31415
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
31416
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
31417
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
31418
|
+
localVarRequestOptions.data = serializeDataIfNeeded(hostingV1CacheToggleCachelessModeRequest, localVarRequestOptions, configuration)
|
|
31419
|
+
|
|
31420
|
+
return {
|
|
31421
|
+
url: toPathString(localVarUrlObj),
|
|
31422
|
+
options: localVarRequestOptions,
|
|
31423
|
+
};
|
|
31424
|
+
},
|
|
31425
|
+
/**
|
|
31426
|
+
* Turns server-side caching for the website on or off, based on the enabled flag. Enable it for faster page loads, reduced server load, and improved user experience; recommended for production websites. Disabling may impact performance; to temporarily bypass caching while developing or debugging, prefer toggling cacheless mode instead. Does nothing if caching is already in the requested state.
|
|
31427
|
+
* @summary Toggle website cache
|
|
31428
|
+
* @param {string} username
|
|
31429
|
+
* @param {string} domain Domain name
|
|
31430
|
+
* @param {HostingV1CacheToggleCacheRequest} hostingV1CacheToggleCacheRequest
|
|
31431
|
+
* @param {*} [options] Override http request option.
|
|
31432
|
+
* @throws {RequiredError}
|
|
31433
|
+
*/
|
|
31434
|
+
toggleWebsiteCacheV1: async (username: string, domain: string, hostingV1CacheToggleCacheRequest: HostingV1CacheToggleCacheRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
31435
|
+
// verify required parameter 'username' is not null or undefined
|
|
31436
|
+
assertParamExists('toggleWebsiteCacheV1', 'username', username)
|
|
31437
|
+
// verify required parameter 'domain' is not null or undefined
|
|
31438
|
+
assertParamExists('toggleWebsiteCacheV1', 'domain', domain)
|
|
31439
|
+
// verify required parameter 'hostingV1CacheToggleCacheRequest' is not null or undefined
|
|
31440
|
+
assertParamExists('toggleWebsiteCacheV1', 'hostingV1CacheToggleCacheRequest', hostingV1CacheToggleCacheRequest)
|
|
31441
|
+
const localVarPath = `/api/hosting/v1/accounts/{username}/websites/{domain}/cache/toggle`
|
|
31442
|
+
.replace(`{${"username"}}`, encodeURIComponent(String(username)))
|
|
31443
|
+
.replace(`{${"domain"}}`, encodeURIComponent(String(domain)));
|
|
31444
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
31445
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
31446
|
+
let baseOptions;
|
|
31447
|
+
if (configuration) {
|
|
31448
|
+
baseOptions = configuration.baseOptions;
|
|
31449
|
+
}
|
|
31450
|
+
|
|
31451
|
+
const localVarRequestOptions = { method: 'PATCH', ...baseOptions, ...options};
|
|
31452
|
+
const localVarHeaderParameter = {} as any;
|
|
31453
|
+
const localVarQueryParameter = {} as any;
|
|
31454
|
+
|
|
31455
|
+
// authentication apiToken required
|
|
31456
|
+
// http bearer authentication required
|
|
31457
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
31458
|
+
|
|
31459
|
+
|
|
31460
|
+
|
|
31461
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
31462
|
+
|
|
31463
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
31464
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
31465
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
31466
|
+
localVarRequestOptions.data = serializeDataIfNeeded(hostingV1CacheToggleCacheRequest, localVarRequestOptions, configuration)
|
|
31467
|
+
|
|
31468
|
+
return {
|
|
31469
|
+
url: toPathString(localVarUrlObj),
|
|
31470
|
+
options: localVarRequestOptions,
|
|
31471
|
+
};
|
|
31472
|
+
},
|
|
31473
|
+
}
|
|
31474
|
+
};
|
|
31475
|
+
|
|
31476
|
+
/**
|
|
31477
|
+
* HostingCacheApi - functional programming interface
|
|
31478
|
+
* @export
|
|
31479
|
+
*/
|
|
31480
|
+
export const HostingCacheApiFp = function(configuration?: Configuration) {
|
|
31481
|
+
const localVarAxiosParamCreator = HostingCacheApiAxiosParamCreator(configuration)
|
|
31482
|
+
return {
|
|
31483
|
+
/**
|
|
31484
|
+
* Permanently clears all server-side cache for the website at once. Use it when content was updated and needs to be visible immediately, or after making major changes. Also purges the Hostinger CDN cache when CDN is enabled on the website. To purge only the CDN cache and leave the server cache untouched, use `Purge CDN cache`. For a WordPress installation living in a subdirectory, pass the directory query parameter to clear its cache.
|
|
31485
|
+
* @summary Clear website cache
|
|
31486
|
+
* @param {string} username
|
|
31487
|
+
* @param {string} domain Domain name
|
|
31488
|
+
* @param {string} [directory] Directory of the website installation to clear, relative to the website root. Defaults to the website root.
|
|
31489
|
+
* @param {*} [options] Override http request option.
|
|
31490
|
+
* @throws {RequiredError}
|
|
31491
|
+
*/
|
|
31492
|
+
async clearWebsiteCacheV1(username: string, domain: string, directory?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CommonSuccessEmptyResource>> {
|
|
31493
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.clearWebsiteCacheV1(username, domain, directory, options);
|
|
31494
|
+
const localVarOperationServerBasePath = operationServerMap['HostingCacheApi.clearWebsiteCacheV1']?.[0]?.url;
|
|
31495
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
31496
|
+
},
|
|
31497
|
+
/**
|
|
31498
|
+
* Turns development (cacheless) mode on or off, based on the enabled flag. When enabled, nothing is cached, effectively turning off all caching for the website; use it while actively developing, testing changes, debugging issues, or when real-time updates must be visible. Disable it after finishing development work to restore the performance benefits of caching.
|
|
31499
|
+
* @summary Toggle cacheless mode
|
|
31500
|
+
* @param {string} username
|
|
31501
|
+
* @param {string} domain Domain name
|
|
31502
|
+
* @param {HostingV1CacheToggleCachelessModeRequest} hostingV1CacheToggleCachelessModeRequest
|
|
31503
|
+
* @param {*} [options] Override http request option.
|
|
31504
|
+
* @throws {RequiredError}
|
|
31505
|
+
*/
|
|
31506
|
+
async toggleCachelessModeV1(username: string, domain: string, hostingV1CacheToggleCachelessModeRequest: HostingV1CacheToggleCachelessModeRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CommonSuccessEmptyResource>> {
|
|
31507
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.toggleCachelessModeV1(username, domain, hostingV1CacheToggleCachelessModeRequest, options);
|
|
31508
|
+
const localVarOperationServerBasePath = operationServerMap['HostingCacheApi.toggleCachelessModeV1']?.[0]?.url;
|
|
31509
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
31510
|
+
},
|
|
31511
|
+
/**
|
|
31512
|
+
* Turns server-side caching for the website on or off, based on the enabled flag. Enable it for faster page loads, reduced server load, and improved user experience; recommended for production websites. Disabling may impact performance; to temporarily bypass caching while developing or debugging, prefer toggling cacheless mode instead. Does nothing if caching is already in the requested state.
|
|
31513
|
+
* @summary Toggle website cache
|
|
31514
|
+
* @param {string} username
|
|
31515
|
+
* @param {string} domain Domain name
|
|
31516
|
+
* @param {HostingV1CacheToggleCacheRequest} hostingV1CacheToggleCacheRequest
|
|
31517
|
+
* @param {*} [options] Override http request option.
|
|
31518
|
+
* @throws {RequiredError}
|
|
31519
|
+
*/
|
|
31520
|
+
async toggleWebsiteCacheV1(username: string, domain: string, hostingV1CacheToggleCacheRequest: HostingV1CacheToggleCacheRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CommonSuccessEmptyResource>> {
|
|
31521
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.toggleWebsiteCacheV1(username, domain, hostingV1CacheToggleCacheRequest, options);
|
|
31522
|
+
const localVarOperationServerBasePath = operationServerMap['HostingCacheApi.toggleWebsiteCacheV1']?.[0]?.url;
|
|
31523
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
31524
|
+
},
|
|
31525
|
+
}
|
|
31526
|
+
};
|
|
31527
|
+
|
|
31528
|
+
/**
|
|
31529
|
+
* HostingCacheApi - factory interface
|
|
31530
|
+
* @export
|
|
31531
|
+
*/
|
|
31532
|
+
export const HostingCacheApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
|
31533
|
+
const localVarFp = HostingCacheApiFp(configuration)
|
|
31534
|
+
return {
|
|
31535
|
+
/**
|
|
31536
|
+
* Permanently clears all server-side cache for the website at once. Use it when content was updated and needs to be visible immediately, or after making major changes. Also purges the Hostinger CDN cache when CDN is enabled on the website. To purge only the CDN cache and leave the server cache untouched, use `Purge CDN cache`. For a WordPress installation living in a subdirectory, pass the directory query parameter to clear its cache.
|
|
31537
|
+
* @summary Clear website cache
|
|
31538
|
+
* @param {string} username
|
|
31539
|
+
* @param {string} domain Domain name
|
|
31540
|
+
* @param {string} [directory] Directory of the website installation to clear, relative to the website root. Defaults to the website root.
|
|
31541
|
+
* @param {*} [options] Override http request option.
|
|
31542
|
+
* @throws {RequiredError}
|
|
31543
|
+
*/
|
|
31544
|
+
clearWebsiteCacheV1(username: string, domain: string, directory?: string, options?: RawAxiosRequestConfig): AxiosPromise<CommonSuccessEmptyResource> {
|
|
31545
|
+
return localVarFp.clearWebsiteCacheV1(username, domain, directory, options).then((request) => request(axios, basePath));
|
|
31546
|
+
},
|
|
31547
|
+
/**
|
|
31548
|
+
* Turns development (cacheless) mode on or off, based on the enabled flag. When enabled, nothing is cached, effectively turning off all caching for the website; use it while actively developing, testing changes, debugging issues, or when real-time updates must be visible. Disable it after finishing development work to restore the performance benefits of caching.
|
|
31549
|
+
* @summary Toggle cacheless mode
|
|
31550
|
+
* @param {string} username
|
|
31551
|
+
* @param {string} domain Domain name
|
|
31552
|
+
* @param {HostingV1CacheToggleCachelessModeRequest} hostingV1CacheToggleCachelessModeRequest
|
|
31553
|
+
* @param {*} [options] Override http request option.
|
|
31554
|
+
* @throws {RequiredError}
|
|
31555
|
+
*/
|
|
31556
|
+
toggleCachelessModeV1(username: string, domain: string, hostingV1CacheToggleCachelessModeRequest: HostingV1CacheToggleCachelessModeRequest, options?: RawAxiosRequestConfig): AxiosPromise<CommonSuccessEmptyResource> {
|
|
31557
|
+
return localVarFp.toggleCachelessModeV1(username, domain, hostingV1CacheToggleCachelessModeRequest, options).then((request) => request(axios, basePath));
|
|
31558
|
+
},
|
|
31559
|
+
/**
|
|
31560
|
+
* Turns server-side caching for the website on or off, based on the enabled flag. Enable it for faster page loads, reduced server load, and improved user experience; recommended for production websites. Disabling may impact performance; to temporarily bypass caching while developing or debugging, prefer toggling cacheless mode instead. Does nothing if caching is already in the requested state.
|
|
31561
|
+
* @summary Toggle website cache
|
|
31562
|
+
* @param {string} username
|
|
31563
|
+
* @param {string} domain Domain name
|
|
31564
|
+
* @param {HostingV1CacheToggleCacheRequest} hostingV1CacheToggleCacheRequest
|
|
31565
|
+
* @param {*} [options] Override http request option.
|
|
31566
|
+
* @throws {RequiredError}
|
|
31567
|
+
*/
|
|
31568
|
+
toggleWebsiteCacheV1(username: string, domain: string, hostingV1CacheToggleCacheRequest: HostingV1CacheToggleCacheRequest, options?: RawAxiosRequestConfig): AxiosPromise<CommonSuccessEmptyResource> {
|
|
31569
|
+
return localVarFp.toggleWebsiteCacheV1(username, domain, hostingV1CacheToggleCacheRequest, options).then((request) => request(axios, basePath));
|
|
31570
|
+
},
|
|
31571
|
+
};
|
|
31572
|
+
};
|
|
31573
|
+
|
|
31574
|
+
/**
|
|
31575
|
+
* HostingCacheApi - object-oriented interface
|
|
31576
|
+
* @export
|
|
31577
|
+
* @class HostingCacheApi
|
|
31578
|
+
* @extends {BaseAPI}
|
|
31579
|
+
*/
|
|
31580
|
+
export class HostingCacheApi extends BaseAPI {
|
|
31581
|
+
/**
|
|
31582
|
+
* Permanently clears all server-side cache for the website at once. Use it when content was updated and needs to be visible immediately, or after making major changes. Also purges the Hostinger CDN cache when CDN is enabled on the website. To purge only the CDN cache and leave the server cache untouched, use `Purge CDN cache`. For a WordPress installation living in a subdirectory, pass the directory query parameter to clear its cache.
|
|
31583
|
+
* @summary Clear website cache
|
|
31584
|
+
* @param {string} username
|
|
31585
|
+
* @param {string} domain Domain name
|
|
31586
|
+
* @param {string} [directory] Directory of the website installation to clear, relative to the website root. Defaults to the website root.
|
|
31587
|
+
* @param {*} [options] Override http request option.
|
|
31588
|
+
* @throws {RequiredError}
|
|
31589
|
+
* @memberof HostingCacheApi
|
|
31590
|
+
*/
|
|
31591
|
+
public clearWebsiteCacheV1(username: string, domain: string, directory?: string, options?: RawAxiosRequestConfig) {
|
|
31592
|
+
return HostingCacheApiFp(this.configuration).clearWebsiteCacheV1(username, domain, directory, options).then((request) => request(this.axios, this.basePath));
|
|
31593
|
+
}
|
|
31594
|
+
|
|
31595
|
+
/**
|
|
31596
|
+
* Turns development (cacheless) mode on or off, based on the enabled flag. When enabled, nothing is cached, effectively turning off all caching for the website; use it while actively developing, testing changes, debugging issues, or when real-time updates must be visible. Disable it after finishing development work to restore the performance benefits of caching.
|
|
31597
|
+
* @summary Toggle cacheless mode
|
|
31598
|
+
* @param {string} username
|
|
31599
|
+
* @param {string} domain Domain name
|
|
31600
|
+
* @param {HostingV1CacheToggleCachelessModeRequest} hostingV1CacheToggleCachelessModeRequest
|
|
31601
|
+
* @param {*} [options] Override http request option.
|
|
31602
|
+
* @throws {RequiredError}
|
|
31603
|
+
* @memberof HostingCacheApi
|
|
31604
|
+
*/
|
|
31605
|
+
public toggleCachelessModeV1(username: string, domain: string, hostingV1CacheToggleCachelessModeRequest: HostingV1CacheToggleCachelessModeRequest, options?: RawAxiosRequestConfig) {
|
|
31606
|
+
return HostingCacheApiFp(this.configuration).toggleCachelessModeV1(username, domain, hostingV1CacheToggleCachelessModeRequest, options).then((request) => request(this.axios, this.basePath));
|
|
31607
|
+
}
|
|
31608
|
+
|
|
31609
|
+
/**
|
|
31610
|
+
* Turns server-side caching for the website on or off, based on the enabled flag. Enable it for faster page loads, reduced server load, and improved user experience; recommended for production websites. Disabling may impact performance; to temporarily bypass caching while developing or debugging, prefer toggling cacheless mode instead. Does nothing if caching is already in the requested state.
|
|
31611
|
+
* @summary Toggle website cache
|
|
31612
|
+
* @param {string} username
|
|
31613
|
+
* @param {string} domain Domain name
|
|
31614
|
+
* @param {HostingV1CacheToggleCacheRequest} hostingV1CacheToggleCacheRequest
|
|
31615
|
+
* @param {*} [options] Override http request option.
|
|
31616
|
+
* @throws {RequiredError}
|
|
31617
|
+
* @memberof HostingCacheApi
|
|
31618
|
+
*/
|
|
31619
|
+
public toggleWebsiteCacheV1(username: string, domain: string, hostingV1CacheToggleCacheRequest: HostingV1CacheToggleCacheRequest, options?: RawAxiosRequestConfig) {
|
|
31620
|
+
return HostingCacheApiFp(this.configuration).toggleWebsiteCacheV1(username, domain, hostingV1CacheToggleCacheRequest, options).then((request) => request(this.axios, this.basePath));
|
|
31621
|
+
}
|
|
31622
|
+
}
|
|
31623
|
+
|
|
31624
|
+
|
|
31625
|
+
|
|
31626
|
+
/**
|
|
31627
|
+
* HostingCronJobsApi - axios parameter creator
|
|
31628
|
+
* @export
|
|
31629
|
+
*/
|
|
31630
|
+
export const HostingCronJobsApiAxiosParamCreator = function (configuration?: Configuration) {
|
|
31631
|
+
return {
|
|
31632
|
+
/**
|
|
31633
|
+
* Creates a cron job for the specified account from a schedule expression and a command. Returns the created cron job, including its uid, which is required to delete the cron job or fetch its output.
|
|
31634
|
+
* @summary Create account cron job
|
|
31635
|
+
* @param {string} username
|
|
31636
|
+
* @param {HostingV1CronJobsCreateCronJobRequest} hostingV1CronJobsCreateCronJobRequest
|
|
31637
|
+
* @param {*} [options] Override http request option.
|
|
31638
|
+
* @throws {RequiredError}
|
|
31639
|
+
*/
|
|
31640
|
+
createAccountCronJobV1: async (username: string, hostingV1CronJobsCreateCronJobRequest: HostingV1CronJobsCreateCronJobRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
31641
|
+
// verify required parameter 'username' is not null or undefined
|
|
31642
|
+
assertParamExists('createAccountCronJobV1', 'username', username)
|
|
31643
|
+
// verify required parameter 'hostingV1CronJobsCreateCronJobRequest' is not null or undefined
|
|
31644
|
+
assertParamExists('createAccountCronJobV1', 'hostingV1CronJobsCreateCronJobRequest', hostingV1CronJobsCreateCronJobRequest)
|
|
31645
|
+
const localVarPath = `/api/hosting/v1/accounts/{username}/cron-jobs`
|
|
31646
|
+
.replace(`{${"username"}}`, encodeURIComponent(String(username)));
|
|
31647
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
31648
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
31649
|
+
let baseOptions;
|
|
31650
|
+
if (configuration) {
|
|
31651
|
+
baseOptions = configuration.baseOptions;
|
|
31652
|
+
}
|
|
31653
|
+
|
|
31654
|
+
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
|
|
31655
|
+
const localVarHeaderParameter = {} as any;
|
|
31656
|
+
const localVarQueryParameter = {} as any;
|
|
31657
|
+
|
|
31658
|
+
// authentication apiToken required
|
|
31659
|
+
// http bearer authentication required
|
|
31660
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
31661
|
+
|
|
31662
|
+
|
|
31663
|
+
|
|
31664
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
31665
|
+
|
|
31666
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
31667
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
31668
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
31669
|
+
localVarRequestOptions.data = serializeDataIfNeeded(hostingV1CronJobsCreateCronJobRequest, localVarRequestOptions, configuration)
|
|
31670
|
+
|
|
31671
|
+
return {
|
|
31672
|
+
url: toPathString(localVarUrlObj),
|
|
31673
|
+
options: localVarRequestOptions,
|
|
31674
|
+
};
|
|
31675
|
+
},
|
|
31676
|
+
/**
|
|
31677
|
+
* Permanently deletes the cron job identified by its uid. The uid is returned by the list cron jobs endpoint.
|
|
31678
|
+
* @summary Delete account cron job
|
|
31679
|
+
* @param {string} username
|
|
31680
|
+
* @param {string} uid Unique identifier of the cron job as returned by the list cron jobs endpoint.
|
|
31681
|
+
* @param {*} [options] Override http request option.
|
|
31682
|
+
* @throws {RequiredError}
|
|
31683
|
+
*/
|
|
31684
|
+
deleteAccountCronJobV1: async (username: string, uid: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
31685
|
+
// verify required parameter 'username' is not null or undefined
|
|
31686
|
+
assertParamExists('deleteAccountCronJobV1', 'username', username)
|
|
31687
|
+
// verify required parameter 'uid' is not null or undefined
|
|
31688
|
+
assertParamExists('deleteAccountCronJobV1', 'uid', uid)
|
|
31689
|
+
const localVarPath = `/api/hosting/v1/accounts/{username}/cron-jobs/{uid}`
|
|
31690
|
+
.replace(`{${"username"}}`, encodeURIComponent(String(username)))
|
|
31691
|
+
.replace(`{${"uid"}}`, encodeURIComponent(String(uid)));
|
|
31199
31692
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
31200
31693
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
31201
31694
|
let baseOptions;
|
|
@@ -43584,6 +44077,98 @@ export type ListProfileContactsV1SubscriptionStatusEnum = typeof ListProfileCont
|
|
|
43584
44077
|
*/
|
|
43585
44078
|
export const ReachFormsApiAxiosParamCreator = function (configuration?: Configuration) {
|
|
43586
44079
|
return {
|
|
44080
|
+
/**
|
|
44081
|
+
* Add tags to a form so that every contact who submits it from now on receives them. A tag the form already has is skipped; an unknown tag is rejected. Contacts who submitted earlier are not tagged.
|
|
44082
|
+
* @summary Add form submitter tags
|
|
44083
|
+
* @param {string} profileUuid Profile uuid parameter
|
|
44084
|
+
* @param {string} formUuid Form uuid parameter
|
|
44085
|
+
* @param {ReachV1FormsAssignTagsRequest} reachV1FormsAssignTagsRequest
|
|
44086
|
+
* @param {*} [options] Override http request option.
|
|
44087
|
+
* @throws {RequiredError}
|
|
44088
|
+
*/
|
|
44089
|
+
addFormSubmitterTagsV1: async (profileUuid: string, formUuid: string, reachV1FormsAssignTagsRequest: ReachV1FormsAssignTagsRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
44090
|
+
// verify required parameter 'profileUuid' is not null or undefined
|
|
44091
|
+
assertParamExists('addFormSubmitterTagsV1', 'profileUuid', profileUuid)
|
|
44092
|
+
// verify required parameter 'formUuid' is not null or undefined
|
|
44093
|
+
assertParamExists('addFormSubmitterTagsV1', 'formUuid', formUuid)
|
|
44094
|
+
// verify required parameter 'reachV1FormsAssignTagsRequest' is not null or undefined
|
|
44095
|
+
assertParamExists('addFormSubmitterTagsV1', 'reachV1FormsAssignTagsRequest', reachV1FormsAssignTagsRequest)
|
|
44096
|
+
const localVarPath = `/api/reach/v1/profiles/{profileUuid}/forms/{formUuid}/tags`
|
|
44097
|
+
.replace(`{${"profileUuid"}}`, encodeURIComponent(String(profileUuid)))
|
|
44098
|
+
.replace(`{${"formUuid"}}`, encodeURIComponent(String(formUuid)));
|
|
44099
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
44100
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
44101
|
+
let baseOptions;
|
|
44102
|
+
if (configuration) {
|
|
44103
|
+
baseOptions = configuration.baseOptions;
|
|
44104
|
+
}
|
|
44105
|
+
|
|
44106
|
+
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
|
|
44107
|
+
const localVarHeaderParameter = {} as any;
|
|
44108
|
+
const localVarQueryParameter = {} as any;
|
|
44109
|
+
|
|
44110
|
+
// authentication apiToken required
|
|
44111
|
+
// http bearer authentication required
|
|
44112
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
44113
|
+
|
|
44114
|
+
|
|
44115
|
+
|
|
44116
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
44117
|
+
|
|
44118
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
44119
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
44120
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
44121
|
+
localVarRequestOptions.data = serializeDataIfNeeded(reachV1FormsAssignTagsRequest, localVarRequestOptions, configuration)
|
|
44122
|
+
|
|
44123
|
+
return {
|
|
44124
|
+
url: toPathString(localVarUrlObj),
|
|
44125
|
+
options: localVarRequestOptions,
|
|
44126
|
+
};
|
|
44127
|
+
},
|
|
44128
|
+
/**
|
|
44129
|
+
* Create an empty draft form. Reach also adds an automatic `form:{name}` tag that every submitter receives. A draft has no design and is not reachable by visitors: save a design with the update form template operation, then take the form live by setting its status to `active`. Creating a form does not consume AI credits.
|
|
44130
|
+
* @summary Create form
|
|
44131
|
+
* @param {string} profileUuid Profile uuid parameter
|
|
44132
|
+
* @param {ReachV1FormsStoreRequest} reachV1FormsStoreRequest
|
|
44133
|
+
* @param {*} [options] Override http request option.
|
|
44134
|
+
* @throws {RequiredError}
|
|
44135
|
+
*/
|
|
44136
|
+
createFormV1: async (profileUuid: string, reachV1FormsStoreRequest: ReachV1FormsStoreRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
44137
|
+
// verify required parameter 'profileUuid' is not null or undefined
|
|
44138
|
+
assertParamExists('createFormV1', 'profileUuid', profileUuid)
|
|
44139
|
+
// verify required parameter 'reachV1FormsStoreRequest' is not null or undefined
|
|
44140
|
+
assertParamExists('createFormV1', 'reachV1FormsStoreRequest', reachV1FormsStoreRequest)
|
|
44141
|
+
const localVarPath = `/api/reach/v1/profiles/{profileUuid}/forms`
|
|
44142
|
+
.replace(`{${"profileUuid"}}`, encodeURIComponent(String(profileUuid)));
|
|
44143
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
44144
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
44145
|
+
let baseOptions;
|
|
44146
|
+
if (configuration) {
|
|
44147
|
+
baseOptions = configuration.baseOptions;
|
|
44148
|
+
}
|
|
44149
|
+
|
|
44150
|
+
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
|
|
44151
|
+
const localVarHeaderParameter = {} as any;
|
|
44152
|
+
const localVarQueryParameter = {} as any;
|
|
44153
|
+
|
|
44154
|
+
// authentication apiToken required
|
|
44155
|
+
// http bearer authentication required
|
|
44156
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
44157
|
+
|
|
44158
|
+
|
|
44159
|
+
|
|
44160
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
44161
|
+
|
|
44162
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
44163
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
44164
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
44165
|
+
localVarRequestOptions.data = serializeDataIfNeeded(reachV1FormsStoreRequest, localVarRequestOptions, configuration)
|
|
44166
|
+
|
|
44167
|
+
return {
|
|
44168
|
+
url: toPathString(localVarUrlObj),
|
|
44169
|
+
options: localVarRequestOptions,
|
|
44170
|
+
};
|
|
44171
|
+
},
|
|
43587
44172
|
/**
|
|
43588
44173
|
* Permanently delete a form together with its template. A form that has already captured submissions cannot be deleted, so that the contacts it collected are never silently discarded - pause the form instead to stop it collecting new ones. Views alone do not block deletion.
|
|
43589
44174
|
* @summary Delete form
|
|
@@ -43617,6 +44202,48 @@ export const ReachFormsApiAxiosParamCreator = function (configuration?: Configur
|
|
|
43617
44202
|
|
|
43618
44203
|
|
|
43619
44204
|
|
|
44205
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
44206
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
44207
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
44208
|
+
|
|
44209
|
+
return {
|
|
44210
|
+
url: toPathString(localVarUrlObj),
|
|
44211
|
+
options: localVarRequestOptions,
|
|
44212
|
+
};
|
|
44213
|
+
},
|
|
44214
|
+
/**
|
|
44215
|
+
* Copy a form into a new draft form with the same name and design. The copy shares the source\'s automatic `form:{name}` tag; other submitter tags are not copied. The copy is not live until its status is set to `active`.
|
|
44216
|
+
* @summary Duplicate form
|
|
44217
|
+
* @param {string} profileUuid Profile uuid parameter
|
|
44218
|
+
* @param {string} formUuid Form uuid parameter
|
|
44219
|
+
* @param {*} [options] Override http request option.
|
|
44220
|
+
* @throws {RequiredError}
|
|
44221
|
+
*/
|
|
44222
|
+
duplicateFormV1: async (profileUuid: string, formUuid: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
44223
|
+
// verify required parameter 'profileUuid' is not null or undefined
|
|
44224
|
+
assertParamExists('duplicateFormV1', 'profileUuid', profileUuid)
|
|
44225
|
+
// verify required parameter 'formUuid' is not null or undefined
|
|
44226
|
+
assertParamExists('duplicateFormV1', 'formUuid', formUuid)
|
|
44227
|
+
const localVarPath = `/api/reach/v1/profiles/{profileUuid}/forms/{formUuid}/duplicate`
|
|
44228
|
+
.replace(`{${"profileUuid"}}`, encodeURIComponent(String(profileUuid)))
|
|
44229
|
+
.replace(`{${"formUuid"}}`, encodeURIComponent(String(formUuid)));
|
|
44230
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
44231
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
44232
|
+
let baseOptions;
|
|
44233
|
+
if (configuration) {
|
|
44234
|
+
baseOptions = configuration.baseOptions;
|
|
44235
|
+
}
|
|
44236
|
+
|
|
44237
|
+
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
|
|
44238
|
+
const localVarHeaderParameter = {} as any;
|
|
44239
|
+
const localVarQueryParameter = {} as any;
|
|
44240
|
+
|
|
44241
|
+
// authentication apiToken required
|
|
44242
|
+
// http bearer authentication required
|
|
44243
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
44244
|
+
|
|
44245
|
+
|
|
44246
|
+
|
|
43620
44247
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
43621
44248
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
43622
44249
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
@@ -43674,10 +44301,11 @@ export const ReachFormsApiAxiosParamCreator = function (configuration?: Configur
|
|
|
43674
44301
|
* @param {string} profileUuid Profile uuid parameter
|
|
43675
44302
|
* @param {number} [page] Page number
|
|
43676
44303
|
* @param {number} [perPage] Number of items per page
|
|
44304
|
+
* @param {ListFormsV1StatusEnum} [status] Return only forms with this status.
|
|
43677
44305
|
* @param {*} [options] Override http request option.
|
|
43678
44306
|
* @throws {RequiredError}
|
|
43679
44307
|
*/
|
|
43680
|
-
listFormsV1: async (profileUuid: string, page?: number, perPage?: number, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
44308
|
+
listFormsV1: async (profileUuid: string, page?: number, perPage?: number, status?: ListFormsV1StatusEnum, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
43681
44309
|
// verify required parameter 'profileUuid' is not null or undefined
|
|
43682
44310
|
assertParamExists('listFormsV1', 'profileUuid', profileUuid)
|
|
43683
44311
|
const localVarPath = `/api/reach/v1/profiles/{profileUuid}/forms`
|
|
@@ -43705,12 +44333,160 @@ export const ReachFormsApiAxiosParamCreator = function (configuration?: Configur
|
|
|
43705
44333
|
localVarQueryParameter['per_page'] = perPage;
|
|
43706
44334
|
}
|
|
43707
44335
|
|
|
44336
|
+
if (status !== undefined) {
|
|
44337
|
+
localVarQueryParameter['status'] = status;
|
|
44338
|
+
}
|
|
44339
|
+
|
|
43708
44340
|
|
|
43709
44341
|
|
|
43710
44342
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
43711
44343
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
43712
44344
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
43713
44345
|
|
|
44346
|
+
return {
|
|
44347
|
+
url: toPathString(localVarUrlObj),
|
|
44348
|
+
options: localVarRequestOptions,
|
|
44349
|
+
};
|
|
44350
|
+
},
|
|
44351
|
+
/**
|
|
44352
|
+
* Stop a form from applying a tag to its future submitters. Succeeds also when the form did not have the tag. Contacts who already received the tag keep it, and the tag itself is not deleted. The automatic `form:{name}` tag cannot be removed and is rejected with a conflict.
|
|
44353
|
+
* @summary Remove form submitter tag
|
|
44354
|
+
* @param {string} profileUuid Profile uuid parameter
|
|
44355
|
+
* @param {string} formUuid Form uuid parameter
|
|
44356
|
+
* @param {ReachV1FormsRemoveTagRequest} reachV1FormsRemoveTagRequest
|
|
44357
|
+
* @param {*} [options] Override http request option.
|
|
44358
|
+
* @throws {RequiredError}
|
|
44359
|
+
*/
|
|
44360
|
+
removeFormSubmitterTagV1: async (profileUuid: string, formUuid: string, reachV1FormsRemoveTagRequest: ReachV1FormsRemoveTagRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
44361
|
+
// verify required parameter 'profileUuid' is not null or undefined
|
|
44362
|
+
assertParamExists('removeFormSubmitterTagV1', 'profileUuid', profileUuid)
|
|
44363
|
+
// verify required parameter 'formUuid' is not null or undefined
|
|
44364
|
+
assertParamExists('removeFormSubmitterTagV1', 'formUuid', formUuid)
|
|
44365
|
+
// verify required parameter 'reachV1FormsRemoveTagRequest' is not null or undefined
|
|
44366
|
+
assertParamExists('removeFormSubmitterTagV1', 'reachV1FormsRemoveTagRequest', reachV1FormsRemoveTagRequest)
|
|
44367
|
+
const localVarPath = `/api/reach/v1/profiles/{profileUuid}/forms/{formUuid}/tags`
|
|
44368
|
+
.replace(`{${"profileUuid"}}`, encodeURIComponent(String(profileUuid)))
|
|
44369
|
+
.replace(`{${"formUuid"}}`, encodeURIComponent(String(formUuid)));
|
|
44370
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
44371
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
44372
|
+
let baseOptions;
|
|
44373
|
+
if (configuration) {
|
|
44374
|
+
baseOptions = configuration.baseOptions;
|
|
44375
|
+
}
|
|
44376
|
+
|
|
44377
|
+
const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options};
|
|
44378
|
+
const localVarHeaderParameter = {} as any;
|
|
44379
|
+
const localVarQueryParameter = {} as any;
|
|
44380
|
+
|
|
44381
|
+
// authentication apiToken required
|
|
44382
|
+
// http bearer authentication required
|
|
44383
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
44384
|
+
|
|
44385
|
+
|
|
44386
|
+
|
|
44387
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
44388
|
+
|
|
44389
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
44390
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
44391
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
44392
|
+
localVarRequestOptions.data = serializeDataIfNeeded(reachV1FormsRemoveTagRequest, localVarRequestOptions, configuration)
|
|
44393
|
+
|
|
44394
|
+
return {
|
|
44395
|
+
url: toPathString(localVarUrlObj),
|
|
44396
|
+
options: localVarRequestOptions,
|
|
44397
|
+
};
|
|
44398
|
+
},
|
|
44399
|
+
/**
|
|
44400
|
+
* Save `content` as the latest design of a form and return the stored version. The HTML is sanitized and, unless the plan allows removing it, the Reach signature is added. Visitors submit the form with an `email` field (required) and optional `name`, `surname` and `phone`. After sanitizing, the design must contain a form container (`data-reach-form`), an email input (`data-reach-field=\"email\"`) and a submit button (`data-reach-submit`); otherwise the request fails with `422` and `errors.content` lists `missing_form_container`, `missing_email_field` and/or `missing_submit_button`. A `draft` or `paused` form stays unreachable until its status is set to `active`, which publishes this design. On a form that is already `active` the saved design is not public until the form is paused and set to `active` again. Saving a design does not consume AI credits.
|
|
44401
|
+
* @summary Update form template
|
|
44402
|
+
* @param {string} profileUuid Profile uuid parameter
|
|
44403
|
+
* @param {string} formUuid Form uuid parameter
|
|
44404
|
+
* @param {ReachV1FormsUpdateTemplateRequest} reachV1FormsUpdateTemplateRequest
|
|
44405
|
+
* @param {*} [options] Override http request option.
|
|
44406
|
+
* @throws {RequiredError}
|
|
44407
|
+
*/
|
|
44408
|
+
updateFormTemplateV1: async (profileUuid: string, formUuid: string, reachV1FormsUpdateTemplateRequest: ReachV1FormsUpdateTemplateRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
44409
|
+
// verify required parameter 'profileUuid' is not null or undefined
|
|
44410
|
+
assertParamExists('updateFormTemplateV1', 'profileUuid', profileUuid)
|
|
44411
|
+
// verify required parameter 'formUuid' is not null or undefined
|
|
44412
|
+
assertParamExists('updateFormTemplateV1', 'formUuid', formUuid)
|
|
44413
|
+
// verify required parameter 'reachV1FormsUpdateTemplateRequest' is not null or undefined
|
|
44414
|
+
assertParamExists('updateFormTemplateV1', 'reachV1FormsUpdateTemplateRequest', reachV1FormsUpdateTemplateRequest)
|
|
44415
|
+
const localVarPath = `/api/reach/v1/profiles/{profileUuid}/forms/{formUuid}/template`
|
|
44416
|
+
.replace(`{${"profileUuid"}}`, encodeURIComponent(String(profileUuid)))
|
|
44417
|
+
.replace(`{${"formUuid"}}`, encodeURIComponent(String(formUuid)));
|
|
44418
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
44419
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
44420
|
+
let baseOptions;
|
|
44421
|
+
if (configuration) {
|
|
44422
|
+
baseOptions = configuration.baseOptions;
|
|
44423
|
+
}
|
|
44424
|
+
|
|
44425
|
+
const localVarRequestOptions = { method: 'PATCH', ...baseOptions, ...options};
|
|
44426
|
+
const localVarHeaderParameter = {} as any;
|
|
44427
|
+
const localVarQueryParameter = {} as any;
|
|
44428
|
+
|
|
44429
|
+
// authentication apiToken required
|
|
44430
|
+
// http bearer authentication required
|
|
44431
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
44432
|
+
|
|
44433
|
+
|
|
44434
|
+
|
|
44435
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
44436
|
+
|
|
44437
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
44438
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
44439
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
44440
|
+
localVarRequestOptions.data = serializeDataIfNeeded(reachV1FormsUpdateTemplateRequest, localVarRequestOptions, configuration)
|
|
44441
|
+
|
|
44442
|
+
return {
|
|
44443
|
+
url: toPathString(localVarUrlObj),
|
|
44444
|
+
options: localVarRequestOptions,
|
|
44445
|
+
};
|
|
44446
|
+
},
|
|
44447
|
+
/**
|
|
44448
|
+
* Rename a form and/or change its status. Setting a `draft` or `paused` form to `active` takes it live: its latest saved design is published and visitors can submit it. `paused` and `draft` stop the form from accepting submissions. A form is not reachable by visitors until it is taken live. Design changes saved while the form is already `active` stay unpublished until the form is paused and set to `active` again. Renaming does not rename the automatic `form:{name}` tag.
|
|
44449
|
+
* @summary Update form
|
|
44450
|
+
* @param {string} profileUuid Profile uuid parameter
|
|
44451
|
+
* @param {string} formUuid Form uuid parameter
|
|
44452
|
+
* @param {ReachV1FormsUpdateRequest} reachV1FormsUpdateRequest
|
|
44453
|
+
* @param {*} [options] Override http request option.
|
|
44454
|
+
* @throws {RequiredError}
|
|
44455
|
+
*/
|
|
44456
|
+
updateFormV1: async (profileUuid: string, formUuid: string, reachV1FormsUpdateRequest: ReachV1FormsUpdateRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
44457
|
+
// verify required parameter 'profileUuid' is not null or undefined
|
|
44458
|
+
assertParamExists('updateFormV1', 'profileUuid', profileUuid)
|
|
44459
|
+
// verify required parameter 'formUuid' is not null or undefined
|
|
44460
|
+
assertParamExists('updateFormV1', 'formUuid', formUuid)
|
|
44461
|
+
// verify required parameter 'reachV1FormsUpdateRequest' is not null or undefined
|
|
44462
|
+
assertParamExists('updateFormV1', 'reachV1FormsUpdateRequest', reachV1FormsUpdateRequest)
|
|
44463
|
+
const localVarPath = `/api/reach/v1/profiles/{profileUuid}/forms/{formUuid}`
|
|
44464
|
+
.replace(`{${"profileUuid"}}`, encodeURIComponent(String(profileUuid)))
|
|
44465
|
+
.replace(`{${"formUuid"}}`, encodeURIComponent(String(formUuid)));
|
|
44466
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
44467
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
44468
|
+
let baseOptions;
|
|
44469
|
+
if (configuration) {
|
|
44470
|
+
baseOptions = configuration.baseOptions;
|
|
44471
|
+
}
|
|
44472
|
+
|
|
44473
|
+
const localVarRequestOptions = { method: 'PATCH', ...baseOptions, ...options};
|
|
44474
|
+
const localVarHeaderParameter = {} as any;
|
|
44475
|
+
const localVarQueryParameter = {} as any;
|
|
44476
|
+
|
|
44477
|
+
// authentication apiToken required
|
|
44478
|
+
// http bearer authentication required
|
|
44479
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
44480
|
+
|
|
44481
|
+
|
|
44482
|
+
|
|
44483
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
44484
|
+
|
|
44485
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
44486
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
44487
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
44488
|
+
localVarRequestOptions.data = serializeDataIfNeeded(reachV1FormsUpdateRequest, localVarRequestOptions, configuration)
|
|
44489
|
+
|
|
43714
44490
|
return {
|
|
43715
44491
|
url: toPathString(localVarUrlObj),
|
|
43716
44492
|
options: localVarRequestOptions,
|
|
@@ -43726,6 +44502,33 @@ export const ReachFormsApiAxiosParamCreator = function (configuration?: Configur
|
|
|
43726
44502
|
export const ReachFormsApiFp = function(configuration?: Configuration) {
|
|
43727
44503
|
const localVarAxiosParamCreator = ReachFormsApiAxiosParamCreator(configuration)
|
|
43728
44504
|
return {
|
|
44505
|
+
/**
|
|
44506
|
+
* Add tags to a form so that every contact who submits it from now on receives them. A tag the form already has is skipped; an unknown tag is rejected. Contacts who submitted earlier are not tagged.
|
|
44507
|
+
* @summary Add form submitter tags
|
|
44508
|
+
* @param {string} profileUuid Profile uuid parameter
|
|
44509
|
+
* @param {string} formUuid Form uuid parameter
|
|
44510
|
+
* @param {ReachV1FormsAssignTagsRequest} reachV1FormsAssignTagsRequest
|
|
44511
|
+
* @param {*} [options] Override http request option.
|
|
44512
|
+
* @throws {RequiredError}
|
|
44513
|
+
*/
|
|
44514
|
+
async addFormSubmitterTagsV1(profileUuid: string, formUuid: string, reachV1FormsAssignTagsRequest: ReachV1FormsAssignTagsRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CommonSuccessEmptyResource>> {
|
|
44515
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.addFormSubmitterTagsV1(profileUuid, formUuid, reachV1FormsAssignTagsRequest, options);
|
|
44516
|
+
const localVarOperationServerBasePath = operationServerMap['ReachFormsApi.addFormSubmitterTagsV1']?.[0]?.url;
|
|
44517
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
44518
|
+
},
|
|
44519
|
+
/**
|
|
44520
|
+
* Create an empty draft form. Reach also adds an automatic `form:{name}` tag that every submitter receives. A draft has no design and is not reachable by visitors: save a design with the update form template operation, then take the form live by setting its status to `active`. Creating a form does not consume AI credits.
|
|
44521
|
+
* @summary Create form
|
|
44522
|
+
* @param {string} profileUuid Profile uuid parameter
|
|
44523
|
+
* @param {ReachV1FormsStoreRequest} reachV1FormsStoreRequest
|
|
44524
|
+
* @param {*} [options] Override http request option.
|
|
44525
|
+
* @throws {RequiredError}
|
|
44526
|
+
*/
|
|
44527
|
+
async createFormV1(profileUuid: string, reachV1FormsStoreRequest: ReachV1FormsStoreRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ReachV1FormsFormResource>> {
|
|
44528
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.createFormV1(profileUuid, reachV1FormsStoreRequest, options);
|
|
44529
|
+
const localVarOperationServerBasePath = operationServerMap['ReachFormsApi.createFormV1']?.[0]?.url;
|
|
44530
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
44531
|
+
},
|
|
43729
44532
|
/**
|
|
43730
44533
|
* Permanently delete a form together with its template. A form that has already captured submissions cannot be deleted, so that the contacts it collected are never silently discarded - pause the form instead to stop it collecting new ones. Views alone do not block deletion.
|
|
43731
44534
|
* @summary Delete form
|
|
@@ -43739,6 +44542,19 @@ export const ReachFormsApiFp = function(configuration?: Configuration) {
|
|
|
43739
44542
|
const localVarOperationServerBasePath = operationServerMap['ReachFormsApi.deleteFormV1']?.[0]?.url;
|
|
43740
44543
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
43741
44544
|
},
|
|
44545
|
+
/**
|
|
44546
|
+
* Copy a form into a new draft form with the same name and design. The copy shares the source\'s automatic `form:{name}` tag; other submitter tags are not copied. The copy is not live until its status is set to `active`.
|
|
44547
|
+
* @summary Duplicate form
|
|
44548
|
+
* @param {string} profileUuid Profile uuid parameter
|
|
44549
|
+
* @param {string} formUuid Form uuid parameter
|
|
44550
|
+
* @param {*} [options] Override http request option.
|
|
44551
|
+
* @throws {RequiredError}
|
|
44552
|
+
*/
|
|
44553
|
+
async duplicateFormV1(profileUuid: string, formUuid: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ReachV1FormsFormResource>> {
|
|
44554
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.duplicateFormV1(profileUuid, formUuid, options);
|
|
44555
|
+
const localVarOperationServerBasePath = operationServerMap['ReachFormsApi.duplicateFormV1']?.[0]?.url;
|
|
44556
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
44557
|
+
},
|
|
43742
44558
|
/**
|
|
43743
44559
|
* Get a single form with the URL of its hosted template and the tags it applies to the contacts it captures. There is no ready-made embed snippet in the response - either serve the template HTML yourself or build your own embed around the form uuid.
|
|
43744
44560
|
* @summary Get form details
|
|
@@ -43758,14 +44574,57 @@ export const ReachFormsApiFp = function(configuration?: Configuration) {
|
|
|
43758
44574
|
* @param {string} profileUuid Profile uuid parameter
|
|
43759
44575
|
* @param {number} [page] Page number
|
|
43760
44576
|
* @param {number} [perPage] Number of items per page
|
|
44577
|
+
* @param {ListFormsV1StatusEnum} [status] Return only forms with this status.
|
|
43761
44578
|
* @param {*} [options] Override http request option.
|
|
43762
44579
|
* @throws {RequiredError}
|
|
43763
44580
|
*/
|
|
43764
|
-
async listFormsV1(profileUuid: string, page?: number, perPage?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ReachListFormsV1200Response>> {
|
|
43765
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.listFormsV1(profileUuid, page, perPage, options);
|
|
44581
|
+
async listFormsV1(profileUuid: string, page?: number, perPage?: number, status?: ListFormsV1StatusEnum, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ReachListFormsV1200Response>> {
|
|
44582
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.listFormsV1(profileUuid, page, perPage, status, options);
|
|
43766
44583
|
const localVarOperationServerBasePath = operationServerMap['ReachFormsApi.listFormsV1']?.[0]?.url;
|
|
43767
44584
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
43768
44585
|
},
|
|
44586
|
+
/**
|
|
44587
|
+
* Stop a form from applying a tag to its future submitters. Succeeds also when the form did not have the tag. Contacts who already received the tag keep it, and the tag itself is not deleted. The automatic `form:{name}` tag cannot be removed and is rejected with a conflict.
|
|
44588
|
+
* @summary Remove form submitter tag
|
|
44589
|
+
* @param {string} profileUuid Profile uuid parameter
|
|
44590
|
+
* @param {string} formUuid Form uuid parameter
|
|
44591
|
+
* @param {ReachV1FormsRemoveTagRequest} reachV1FormsRemoveTagRequest
|
|
44592
|
+
* @param {*} [options] Override http request option.
|
|
44593
|
+
* @throws {RequiredError}
|
|
44594
|
+
*/
|
|
44595
|
+
async removeFormSubmitterTagV1(profileUuid: string, formUuid: string, reachV1FormsRemoveTagRequest: ReachV1FormsRemoveTagRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CommonSuccessEmptyResource>> {
|
|
44596
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.removeFormSubmitterTagV1(profileUuid, formUuid, reachV1FormsRemoveTagRequest, options);
|
|
44597
|
+
const localVarOperationServerBasePath = operationServerMap['ReachFormsApi.removeFormSubmitterTagV1']?.[0]?.url;
|
|
44598
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
44599
|
+
},
|
|
44600
|
+
/**
|
|
44601
|
+
* Save `content` as the latest design of a form and return the stored version. The HTML is sanitized and, unless the plan allows removing it, the Reach signature is added. Visitors submit the form with an `email` field (required) and optional `name`, `surname` and `phone`. After sanitizing, the design must contain a form container (`data-reach-form`), an email input (`data-reach-field=\"email\"`) and a submit button (`data-reach-submit`); otherwise the request fails with `422` and `errors.content` lists `missing_form_container`, `missing_email_field` and/or `missing_submit_button`. A `draft` or `paused` form stays unreachable until its status is set to `active`, which publishes this design. On a form that is already `active` the saved design is not public until the form is paused and set to `active` again. Saving a design does not consume AI credits.
|
|
44602
|
+
* @summary Update form template
|
|
44603
|
+
* @param {string} profileUuid Profile uuid parameter
|
|
44604
|
+
* @param {string} formUuid Form uuid parameter
|
|
44605
|
+
* @param {ReachV1FormsUpdateTemplateRequest} reachV1FormsUpdateTemplateRequest
|
|
44606
|
+
* @param {*} [options] Override http request option.
|
|
44607
|
+
* @throws {RequiredError}
|
|
44608
|
+
*/
|
|
44609
|
+
async updateFormTemplateV1(profileUuid: string, formUuid: string, reachV1FormsUpdateTemplateRequest: ReachV1FormsUpdateTemplateRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ReachV1FormsFormTemplateVersionResource>> {
|
|
44610
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.updateFormTemplateV1(profileUuid, formUuid, reachV1FormsUpdateTemplateRequest, options);
|
|
44611
|
+
const localVarOperationServerBasePath = operationServerMap['ReachFormsApi.updateFormTemplateV1']?.[0]?.url;
|
|
44612
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
44613
|
+
},
|
|
44614
|
+
/**
|
|
44615
|
+
* Rename a form and/or change its status. Setting a `draft` or `paused` form to `active` takes it live: its latest saved design is published and visitors can submit it. `paused` and `draft` stop the form from accepting submissions. A form is not reachable by visitors until it is taken live. Design changes saved while the form is already `active` stay unpublished until the form is paused and set to `active` again. Renaming does not rename the automatic `form:{name}` tag.
|
|
44616
|
+
* @summary Update form
|
|
44617
|
+
* @param {string} profileUuid Profile uuid parameter
|
|
44618
|
+
* @param {string} formUuid Form uuid parameter
|
|
44619
|
+
* @param {ReachV1FormsUpdateRequest} reachV1FormsUpdateRequest
|
|
44620
|
+
* @param {*} [options] Override http request option.
|
|
44621
|
+
* @throws {RequiredError}
|
|
44622
|
+
*/
|
|
44623
|
+
async updateFormV1(profileUuid: string, formUuid: string, reachV1FormsUpdateRequest: ReachV1FormsUpdateRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ReachV1FormsFormResource>> {
|
|
44624
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.updateFormV1(profileUuid, formUuid, reachV1FormsUpdateRequest, options);
|
|
44625
|
+
const localVarOperationServerBasePath = operationServerMap['ReachFormsApi.updateFormV1']?.[0]?.url;
|
|
44626
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
44627
|
+
},
|
|
43769
44628
|
}
|
|
43770
44629
|
};
|
|
43771
44630
|
|
|
@@ -43776,6 +44635,29 @@ export const ReachFormsApiFp = function(configuration?: Configuration) {
|
|
|
43776
44635
|
export const ReachFormsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
|
43777
44636
|
const localVarFp = ReachFormsApiFp(configuration)
|
|
43778
44637
|
return {
|
|
44638
|
+
/**
|
|
44639
|
+
* Add tags to a form so that every contact who submits it from now on receives them. A tag the form already has is skipped; an unknown tag is rejected. Contacts who submitted earlier are not tagged.
|
|
44640
|
+
* @summary Add form submitter tags
|
|
44641
|
+
* @param {string} profileUuid Profile uuid parameter
|
|
44642
|
+
* @param {string} formUuid Form uuid parameter
|
|
44643
|
+
* @param {ReachV1FormsAssignTagsRequest} reachV1FormsAssignTagsRequest
|
|
44644
|
+
* @param {*} [options] Override http request option.
|
|
44645
|
+
* @throws {RequiredError}
|
|
44646
|
+
*/
|
|
44647
|
+
addFormSubmitterTagsV1(profileUuid: string, formUuid: string, reachV1FormsAssignTagsRequest: ReachV1FormsAssignTagsRequest, options?: RawAxiosRequestConfig): AxiosPromise<CommonSuccessEmptyResource> {
|
|
44648
|
+
return localVarFp.addFormSubmitterTagsV1(profileUuid, formUuid, reachV1FormsAssignTagsRequest, options).then((request) => request(axios, basePath));
|
|
44649
|
+
},
|
|
44650
|
+
/**
|
|
44651
|
+
* Create an empty draft form. Reach also adds an automatic `form:{name}` tag that every submitter receives. A draft has no design and is not reachable by visitors: save a design with the update form template operation, then take the form live by setting its status to `active`. Creating a form does not consume AI credits.
|
|
44652
|
+
* @summary Create form
|
|
44653
|
+
* @param {string} profileUuid Profile uuid parameter
|
|
44654
|
+
* @param {ReachV1FormsStoreRequest} reachV1FormsStoreRequest
|
|
44655
|
+
* @param {*} [options] Override http request option.
|
|
44656
|
+
* @throws {RequiredError}
|
|
44657
|
+
*/
|
|
44658
|
+
createFormV1(profileUuid: string, reachV1FormsStoreRequest: ReachV1FormsStoreRequest, options?: RawAxiosRequestConfig): AxiosPromise<ReachV1FormsFormResource> {
|
|
44659
|
+
return localVarFp.createFormV1(profileUuid, reachV1FormsStoreRequest, options).then((request) => request(axios, basePath));
|
|
44660
|
+
},
|
|
43779
44661
|
/**
|
|
43780
44662
|
* Permanently delete a form together with its template. A form that has already captured submissions cannot be deleted, so that the contacts it collected are never silently discarded - pause the form instead to stop it collecting new ones. Views alone do not block deletion.
|
|
43781
44663
|
* @summary Delete form
|
|
@@ -43787,6 +44669,17 @@ export const ReachFormsApiFactory = function (configuration?: Configuration, bas
|
|
|
43787
44669
|
deleteFormV1(profileUuid: string, formUuid: string, options?: RawAxiosRequestConfig): AxiosPromise<CommonSuccessEmptyResource> {
|
|
43788
44670
|
return localVarFp.deleteFormV1(profileUuid, formUuid, options).then((request) => request(axios, basePath));
|
|
43789
44671
|
},
|
|
44672
|
+
/**
|
|
44673
|
+
* Copy a form into a new draft form with the same name and design. The copy shares the source\'s automatic `form:{name}` tag; other submitter tags are not copied. The copy is not live until its status is set to `active`.
|
|
44674
|
+
* @summary Duplicate form
|
|
44675
|
+
* @param {string} profileUuid Profile uuid parameter
|
|
44676
|
+
* @param {string} formUuid Form uuid parameter
|
|
44677
|
+
* @param {*} [options] Override http request option.
|
|
44678
|
+
* @throws {RequiredError}
|
|
44679
|
+
*/
|
|
44680
|
+
duplicateFormV1(profileUuid: string, formUuid: string, options?: RawAxiosRequestConfig): AxiosPromise<ReachV1FormsFormResource> {
|
|
44681
|
+
return localVarFp.duplicateFormV1(profileUuid, formUuid, options).then((request) => request(axios, basePath));
|
|
44682
|
+
},
|
|
43790
44683
|
/**
|
|
43791
44684
|
* Get a single form with the URL of its hosted template and the tags it applies to the contacts it captures. There is no ready-made embed snippet in the response - either serve the template HTML yourself or build your own embed around the form uuid.
|
|
43792
44685
|
* @summary Get form details
|
|
@@ -43804,11 +44697,48 @@ export const ReachFormsApiFactory = function (configuration?: Configuration, bas
|
|
|
43804
44697
|
* @param {string} profileUuid Profile uuid parameter
|
|
43805
44698
|
* @param {number} [page] Page number
|
|
43806
44699
|
* @param {number} [perPage] Number of items per page
|
|
44700
|
+
* @param {ListFormsV1StatusEnum} [status] Return only forms with this status.
|
|
44701
|
+
* @param {*} [options] Override http request option.
|
|
44702
|
+
* @throws {RequiredError}
|
|
44703
|
+
*/
|
|
44704
|
+
listFormsV1(profileUuid: string, page?: number, perPage?: number, status?: ListFormsV1StatusEnum, options?: RawAxiosRequestConfig): AxiosPromise<ReachListFormsV1200Response> {
|
|
44705
|
+
return localVarFp.listFormsV1(profileUuid, page, perPage, status, options).then((request) => request(axios, basePath));
|
|
44706
|
+
},
|
|
44707
|
+
/**
|
|
44708
|
+
* Stop a form from applying a tag to its future submitters. Succeeds also when the form did not have the tag. Contacts who already received the tag keep it, and the tag itself is not deleted. The automatic `form:{name}` tag cannot be removed and is rejected with a conflict.
|
|
44709
|
+
* @summary Remove form submitter tag
|
|
44710
|
+
* @param {string} profileUuid Profile uuid parameter
|
|
44711
|
+
* @param {string} formUuid Form uuid parameter
|
|
44712
|
+
* @param {ReachV1FormsRemoveTagRequest} reachV1FormsRemoveTagRequest
|
|
43807
44713
|
* @param {*} [options] Override http request option.
|
|
43808
44714
|
* @throws {RequiredError}
|
|
43809
44715
|
*/
|
|
43810
|
-
|
|
43811
|
-
return localVarFp.
|
|
44716
|
+
removeFormSubmitterTagV1(profileUuid: string, formUuid: string, reachV1FormsRemoveTagRequest: ReachV1FormsRemoveTagRequest, options?: RawAxiosRequestConfig): AxiosPromise<CommonSuccessEmptyResource> {
|
|
44717
|
+
return localVarFp.removeFormSubmitterTagV1(profileUuid, formUuid, reachV1FormsRemoveTagRequest, options).then((request) => request(axios, basePath));
|
|
44718
|
+
},
|
|
44719
|
+
/**
|
|
44720
|
+
* Save `content` as the latest design of a form and return the stored version. The HTML is sanitized and, unless the plan allows removing it, the Reach signature is added. Visitors submit the form with an `email` field (required) and optional `name`, `surname` and `phone`. After sanitizing, the design must contain a form container (`data-reach-form`), an email input (`data-reach-field=\"email\"`) and a submit button (`data-reach-submit`); otherwise the request fails with `422` and `errors.content` lists `missing_form_container`, `missing_email_field` and/or `missing_submit_button`. A `draft` or `paused` form stays unreachable until its status is set to `active`, which publishes this design. On a form that is already `active` the saved design is not public until the form is paused and set to `active` again. Saving a design does not consume AI credits.
|
|
44721
|
+
* @summary Update form template
|
|
44722
|
+
* @param {string} profileUuid Profile uuid parameter
|
|
44723
|
+
* @param {string} formUuid Form uuid parameter
|
|
44724
|
+
* @param {ReachV1FormsUpdateTemplateRequest} reachV1FormsUpdateTemplateRequest
|
|
44725
|
+
* @param {*} [options] Override http request option.
|
|
44726
|
+
* @throws {RequiredError}
|
|
44727
|
+
*/
|
|
44728
|
+
updateFormTemplateV1(profileUuid: string, formUuid: string, reachV1FormsUpdateTemplateRequest: ReachV1FormsUpdateTemplateRequest, options?: RawAxiosRequestConfig): AxiosPromise<ReachV1FormsFormTemplateVersionResource> {
|
|
44729
|
+
return localVarFp.updateFormTemplateV1(profileUuid, formUuid, reachV1FormsUpdateTemplateRequest, options).then((request) => request(axios, basePath));
|
|
44730
|
+
},
|
|
44731
|
+
/**
|
|
44732
|
+
* Rename a form and/or change its status. Setting a `draft` or `paused` form to `active` takes it live: its latest saved design is published and visitors can submit it. `paused` and `draft` stop the form from accepting submissions. A form is not reachable by visitors until it is taken live. Design changes saved while the form is already `active` stay unpublished until the form is paused and set to `active` again. Renaming does not rename the automatic `form:{name}` tag.
|
|
44733
|
+
* @summary Update form
|
|
44734
|
+
* @param {string} profileUuid Profile uuid parameter
|
|
44735
|
+
* @param {string} formUuid Form uuid parameter
|
|
44736
|
+
* @param {ReachV1FormsUpdateRequest} reachV1FormsUpdateRequest
|
|
44737
|
+
* @param {*} [options] Override http request option.
|
|
44738
|
+
* @throws {RequiredError}
|
|
44739
|
+
*/
|
|
44740
|
+
updateFormV1(profileUuid: string, formUuid: string, reachV1FormsUpdateRequest: ReachV1FormsUpdateRequest, options?: RawAxiosRequestConfig): AxiosPromise<ReachV1FormsFormResource> {
|
|
44741
|
+
return localVarFp.updateFormV1(profileUuid, formUuid, reachV1FormsUpdateRequest, options).then((request) => request(axios, basePath));
|
|
43812
44742
|
},
|
|
43813
44743
|
};
|
|
43814
44744
|
};
|
|
@@ -43820,6 +44750,33 @@ export const ReachFormsApiFactory = function (configuration?: Configuration, bas
|
|
|
43820
44750
|
* @extends {BaseAPI}
|
|
43821
44751
|
*/
|
|
43822
44752
|
export class ReachFormsApi extends BaseAPI {
|
|
44753
|
+
/**
|
|
44754
|
+
* Add tags to a form so that every contact who submits it from now on receives them. A tag the form already has is skipped; an unknown tag is rejected. Contacts who submitted earlier are not tagged.
|
|
44755
|
+
* @summary Add form submitter tags
|
|
44756
|
+
* @param {string} profileUuid Profile uuid parameter
|
|
44757
|
+
* @param {string} formUuid Form uuid parameter
|
|
44758
|
+
* @param {ReachV1FormsAssignTagsRequest} reachV1FormsAssignTagsRequest
|
|
44759
|
+
* @param {*} [options] Override http request option.
|
|
44760
|
+
* @throws {RequiredError}
|
|
44761
|
+
* @memberof ReachFormsApi
|
|
44762
|
+
*/
|
|
44763
|
+
public addFormSubmitterTagsV1(profileUuid: string, formUuid: string, reachV1FormsAssignTagsRequest: ReachV1FormsAssignTagsRequest, options?: RawAxiosRequestConfig) {
|
|
44764
|
+
return ReachFormsApiFp(this.configuration).addFormSubmitterTagsV1(profileUuid, formUuid, reachV1FormsAssignTagsRequest, options).then((request) => request(this.axios, this.basePath));
|
|
44765
|
+
}
|
|
44766
|
+
|
|
44767
|
+
/**
|
|
44768
|
+
* Create an empty draft form. Reach also adds an automatic `form:{name}` tag that every submitter receives. A draft has no design and is not reachable by visitors: save a design with the update form template operation, then take the form live by setting its status to `active`. Creating a form does not consume AI credits.
|
|
44769
|
+
* @summary Create form
|
|
44770
|
+
* @param {string} profileUuid Profile uuid parameter
|
|
44771
|
+
* @param {ReachV1FormsStoreRequest} reachV1FormsStoreRequest
|
|
44772
|
+
* @param {*} [options] Override http request option.
|
|
44773
|
+
* @throws {RequiredError}
|
|
44774
|
+
* @memberof ReachFormsApi
|
|
44775
|
+
*/
|
|
44776
|
+
public createFormV1(profileUuid: string, reachV1FormsStoreRequest: ReachV1FormsStoreRequest, options?: RawAxiosRequestConfig) {
|
|
44777
|
+
return ReachFormsApiFp(this.configuration).createFormV1(profileUuid, reachV1FormsStoreRequest, options).then((request) => request(this.axios, this.basePath));
|
|
44778
|
+
}
|
|
44779
|
+
|
|
43823
44780
|
/**
|
|
43824
44781
|
* Permanently delete a form together with its template. A form that has already captured submissions cannot be deleted, so that the contacts it collected are never silently discarded - pause the form instead to stop it collecting new ones. Views alone do not block deletion.
|
|
43825
44782
|
* @summary Delete form
|
|
@@ -43833,6 +44790,19 @@ export class ReachFormsApi extends BaseAPI {
|
|
|
43833
44790
|
return ReachFormsApiFp(this.configuration).deleteFormV1(profileUuid, formUuid, options).then((request) => request(this.axios, this.basePath));
|
|
43834
44791
|
}
|
|
43835
44792
|
|
|
44793
|
+
/**
|
|
44794
|
+
* Copy a form into a new draft form with the same name and design. The copy shares the source\'s automatic `form:{name}` tag; other submitter tags are not copied. The copy is not live until its status is set to `active`.
|
|
44795
|
+
* @summary Duplicate form
|
|
44796
|
+
* @param {string} profileUuid Profile uuid parameter
|
|
44797
|
+
* @param {string} formUuid Form uuid parameter
|
|
44798
|
+
* @param {*} [options] Override http request option.
|
|
44799
|
+
* @throws {RequiredError}
|
|
44800
|
+
* @memberof ReachFormsApi
|
|
44801
|
+
*/
|
|
44802
|
+
public duplicateFormV1(profileUuid: string, formUuid: string, options?: RawAxiosRequestConfig) {
|
|
44803
|
+
return ReachFormsApiFp(this.configuration).duplicateFormV1(profileUuid, formUuid, options).then((request) => request(this.axios, this.basePath));
|
|
44804
|
+
}
|
|
44805
|
+
|
|
43836
44806
|
/**
|
|
43837
44807
|
* Get a single form with the URL of its hosted template and the tags it applies to the contacts it captures. There is no ready-made embed snippet in the response - either serve the template HTML yourself or build your own embed around the form uuid.
|
|
43838
44808
|
* @summary Get form details
|
|
@@ -43852,15 +44822,67 @@ export class ReachFormsApi extends BaseAPI {
|
|
|
43852
44822
|
* @param {string} profileUuid Profile uuid parameter
|
|
43853
44823
|
* @param {number} [page] Page number
|
|
43854
44824
|
* @param {number} [perPage] Number of items per page
|
|
44825
|
+
* @param {ListFormsV1StatusEnum} [status] Return only forms with this status.
|
|
43855
44826
|
* @param {*} [options] Override http request option.
|
|
43856
44827
|
* @throws {RequiredError}
|
|
43857
44828
|
* @memberof ReachFormsApi
|
|
43858
44829
|
*/
|
|
43859
|
-
public listFormsV1(profileUuid: string, page?: number, perPage?: number, options?: RawAxiosRequestConfig) {
|
|
43860
|
-
return ReachFormsApiFp(this.configuration).listFormsV1(profileUuid, page, perPage, options).then((request) => request(this.axios, this.basePath));
|
|
44830
|
+
public listFormsV1(profileUuid: string, page?: number, perPage?: number, status?: ListFormsV1StatusEnum, options?: RawAxiosRequestConfig) {
|
|
44831
|
+
return ReachFormsApiFp(this.configuration).listFormsV1(profileUuid, page, perPage, status, options).then((request) => request(this.axios, this.basePath));
|
|
44832
|
+
}
|
|
44833
|
+
|
|
44834
|
+
/**
|
|
44835
|
+
* Stop a form from applying a tag to its future submitters. Succeeds also when the form did not have the tag. Contacts who already received the tag keep it, and the tag itself is not deleted. The automatic `form:{name}` tag cannot be removed and is rejected with a conflict.
|
|
44836
|
+
* @summary Remove form submitter tag
|
|
44837
|
+
* @param {string} profileUuid Profile uuid parameter
|
|
44838
|
+
* @param {string} formUuid Form uuid parameter
|
|
44839
|
+
* @param {ReachV1FormsRemoveTagRequest} reachV1FormsRemoveTagRequest
|
|
44840
|
+
* @param {*} [options] Override http request option.
|
|
44841
|
+
* @throws {RequiredError}
|
|
44842
|
+
* @memberof ReachFormsApi
|
|
44843
|
+
*/
|
|
44844
|
+
public removeFormSubmitterTagV1(profileUuid: string, formUuid: string, reachV1FormsRemoveTagRequest: ReachV1FormsRemoveTagRequest, options?: RawAxiosRequestConfig) {
|
|
44845
|
+
return ReachFormsApiFp(this.configuration).removeFormSubmitterTagV1(profileUuid, formUuid, reachV1FormsRemoveTagRequest, options).then((request) => request(this.axios, this.basePath));
|
|
44846
|
+
}
|
|
44847
|
+
|
|
44848
|
+
/**
|
|
44849
|
+
* Save `content` as the latest design of a form and return the stored version. The HTML is sanitized and, unless the plan allows removing it, the Reach signature is added. Visitors submit the form with an `email` field (required) and optional `name`, `surname` and `phone`. After sanitizing, the design must contain a form container (`data-reach-form`), an email input (`data-reach-field=\"email\"`) and a submit button (`data-reach-submit`); otherwise the request fails with `422` and `errors.content` lists `missing_form_container`, `missing_email_field` and/or `missing_submit_button`. A `draft` or `paused` form stays unreachable until its status is set to `active`, which publishes this design. On a form that is already `active` the saved design is not public until the form is paused and set to `active` again. Saving a design does not consume AI credits.
|
|
44850
|
+
* @summary Update form template
|
|
44851
|
+
* @param {string} profileUuid Profile uuid parameter
|
|
44852
|
+
* @param {string} formUuid Form uuid parameter
|
|
44853
|
+
* @param {ReachV1FormsUpdateTemplateRequest} reachV1FormsUpdateTemplateRequest
|
|
44854
|
+
* @param {*} [options] Override http request option.
|
|
44855
|
+
* @throws {RequiredError}
|
|
44856
|
+
* @memberof ReachFormsApi
|
|
44857
|
+
*/
|
|
44858
|
+
public updateFormTemplateV1(profileUuid: string, formUuid: string, reachV1FormsUpdateTemplateRequest: ReachV1FormsUpdateTemplateRequest, options?: RawAxiosRequestConfig) {
|
|
44859
|
+
return ReachFormsApiFp(this.configuration).updateFormTemplateV1(profileUuid, formUuid, reachV1FormsUpdateTemplateRequest, options).then((request) => request(this.axios, this.basePath));
|
|
44860
|
+
}
|
|
44861
|
+
|
|
44862
|
+
/**
|
|
44863
|
+
* Rename a form and/or change its status. Setting a `draft` or `paused` form to `active` takes it live: its latest saved design is published and visitors can submit it. `paused` and `draft` stop the form from accepting submissions. A form is not reachable by visitors until it is taken live. Design changes saved while the form is already `active` stay unpublished until the form is paused and set to `active` again. Renaming does not rename the automatic `form:{name}` tag.
|
|
44864
|
+
* @summary Update form
|
|
44865
|
+
* @param {string} profileUuid Profile uuid parameter
|
|
44866
|
+
* @param {string} formUuid Form uuid parameter
|
|
44867
|
+
* @param {ReachV1FormsUpdateRequest} reachV1FormsUpdateRequest
|
|
44868
|
+
* @param {*} [options] Override http request option.
|
|
44869
|
+
* @throws {RequiredError}
|
|
44870
|
+
* @memberof ReachFormsApi
|
|
44871
|
+
*/
|
|
44872
|
+
public updateFormV1(profileUuid: string, formUuid: string, reachV1FormsUpdateRequest: ReachV1FormsUpdateRequest, options?: RawAxiosRequestConfig) {
|
|
44873
|
+
return ReachFormsApiFp(this.configuration).updateFormV1(profileUuid, formUuid, reachV1FormsUpdateRequest, options).then((request) => request(this.axios, this.basePath));
|
|
43861
44874
|
}
|
|
43862
44875
|
}
|
|
43863
44876
|
|
|
44877
|
+
/**
|
|
44878
|
+
* @export
|
|
44879
|
+
*/
|
|
44880
|
+
export const ListFormsV1StatusEnum = {
|
|
44881
|
+
Active: 'active',
|
|
44882
|
+
Paused: 'paused',
|
|
44883
|
+
Draft: 'draft'
|
|
44884
|
+
} as const;
|
|
44885
|
+
export type ListFormsV1StatusEnum = typeof ListFormsV1StatusEnum[keyof typeof ListFormsV1StatusEnum];
|
|
43864
44886
|
|
|
43865
44887
|
|
|
43866
44888
|
/**
|