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/dist/esm/api.js
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
|
|
@@ -1029,6 +1029,15 @@ export const ReachV1FormsFormTagResourceTypeEnum = {
|
|
|
1029
1029
|
Import: 'import',
|
|
1030
1030
|
System: 'system'
|
|
1031
1031
|
};
|
|
1032
|
+
export const ReachV1FormsFormTemplateVersionResourceEditTypeEnum = {
|
|
1033
|
+
Manual: 'manual',
|
|
1034
|
+
Ai: 'ai'
|
|
1035
|
+
};
|
|
1036
|
+
export const ReachV1FormsUpdateRequestStatusEnum = {
|
|
1037
|
+
Active: 'active',
|
|
1038
|
+
Paused: 'paused',
|
|
1039
|
+
Draft: 'draft'
|
|
1040
|
+
};
|
|
1032
1041
|
export const ReachV1ProfilesDomainsSendingDomainResourceStatusEnum = {
|
|
1033
1042
|
Active: 'active',
|
|
1034
1043
|
Inactive: 'inactive',
|
|
@@ -12623,6 +12632,340 @@ export class HorizonsWebsitesApi extends BaseAPI {
|
|
|
12623
12632
|
return HorizonsWebsitesApiFp(this.configuration).publishWebsiteV1(websiteId, horizonsV1WebsitesPublishWebsiteRequest, options).then((request) => request(this.axios, this.basePath));
|
|
12624
12633
|
}
|
|
12625
12634
|
}
|
|
12635
|
+
/**
|
|
12636
|
+
* HostingCDNApi - axios parameter creator
|
|
12637
|
+
* @export
|
|
12638
|
+
*/
|
|
12639
|
+
export const HostingCDNApiAxiosParamCreator = function (configuration) {
|
|
12640
|
+
return {
|
|
12641
|
+
/**
|
|
12642
|
+
* 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.
|
|
12643
|
+
* @summary Disable CDN
|
|
12644
|
+
* @param {string} username
|
|
12645
|
+
* @param {string} domain Domain name
|
|
12646
|
+
* @param {*} [options] Override http request option.
|
|
12647
|
+
* @throws {RequiredError}
|
|
12648
|
+
*/
|
|
12649
|
+
disableCDNV1: (username_1, domain_1, ...args_1) => __awaiter(this, [username_1, domain_1, ...args_1], void 0, function* (username, domain, options = {}) {
|
|
12650
|
+
// verify required parameter 'username' is not null or undefined
|
|
12651
|
+
assertParamExists('disableCDNV1', 'username', username);
|
|
12652
|
+
// verify required parameter 'domain' is not null or undefined
|
|
12653
|
+
assertParamExists('disableCDNV1', 'domain', domain);
|
|
12654
|
+
const localVarPath = `/api/hosting/v1/accounts/{username}/websites/{domain}/cdn/disable`
|
|
12655
|
+
.replace(`{${"username"}}`, encodeURIComponent(String(username)))
|
|
12656
|
+
.replace(`{${"domain"}}`, encodeURIComponent(String(domain)));
|
|
12657
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
12658
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
12659
|
+
let baseOptions;
|
|
12660
|
+
if (configuration) {
|
|
12661
|
+
baseOptions = configuration.baseOptions;
|
|
12662
|
+
}
|
|
12663
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
|
12664
|
+
const localVarHeaderParameter = {};
|
|
12665
|
+
const localVarQueryParameter = {};
|
|
12666
|
+
// authentication apiToken required
|
|
12667
|
+
// http bearer authentication required
|
|
12668
|
+
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
12669
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
12670
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
12671
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
12672
|
+
return {
|
|
12673
|
+
url: toPathString(localVarUrlObj),
|
|
12674
|
+
options: localVarRequestOptions,
|
|
12675
|
+
};
|
|
12676
|
+
}),
|
|
12677
|
+
/**
|
|
12678
|
+
* 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.
|
|
12679
|
+
* @summary Enable CDN
|
|
12680
|
+
* @param {string} username
|
|
12681
|
+
* @param {string} domain Domain name
|
|
12682
|
+
* @param {*} [options] Override http request option.
|
|
12683
|
+
* @throws {RequiredError}
|
|
12684
|
+
*/
|
|
12685
|
+
enableCDNV1: (username_1, domain_1, ...args_1) => __awaiter(this, [username_1, domain_1, ...args_1], void 0, function* (username, domain, options = {}) {
|
|
12686
|
+
// verify required parameter 'username' is not null or undefined
|
|
12687
|
+
assertParamExists('enableCDNV1', 'username', username);
|
|
12688
|
+
// verify required parameter 'domain' is not null or undefined
|
|
12689
|
+
assertParamExists('enableCDNV1', 'domain', domain);
|
|
12690
|
+
const localVarPath = `/api/hosting/v1/accounts/{username}/websites/{domain}/cdn/enable`
|
|
12691
|
+
.replace(`{${"username"}}`, encodeURIComponent(String(username)))
|
|
12692
|
+
.replace(`{${"domain"}}`, encodeURIComponent(String(domain)));
|
|
12693
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
12694
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
12695
|
+
let baseOptions;
|
|
12696
|
+
if (configuration) {
|
|
12697
|
+
baseOptions = configuration.baseOptions;
|
|
12698
|
+
}
|
|
12699
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
|
12700
|
+
const localVarHeaderParameter = {};
|
|
12701
|
+
const localVarQueryParameter = {};
|
|
12702
|
+
// authentication apiToken required
|
|
12703
|
+
// http bearer authentication required
|
|
12704
|
+
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
12705
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
12706
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
12707
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
12708
|
+
return {
|
|
12709
|
+
url: toPathString(localVarUrlObj),
|
|
12710
|
+
options: localVarRequestOptions,
|
|
12711
|
+
};
|
|
12712
|
+
}),
|
|
12713
|
+
/**
|
|
12714
|
+
* 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.
|
|
12715
|
+
* @summary Get CDN status
|
|
12716
|
+
* @param {string} username
|
|
12717
|
+
* @param {string} domain Domain name
|
|
12718
|
+
* @param {*} [options] Override http request option.
|
|
12719
|
+
* @throws {RequiredError}
|
|
12720
|
+
*/
|
|
12721
|
+
getCDNStatusV1: (username_1, domain_1, ...args_1) => __awaiter(this, [username_1, domain_1, ...args_1], void 0, function* (username, domain, options = {}) {
|
|
12722
|
+
// verify required parameter 'username' is not null or undefined
|
|
12723
|
+
assertParamExists('getCDNStatusV1', 'username', username);
|
|
12724
|
+
// verify required parameter 'domain' is not null or undefined
|
|
12725
|
+
assertParamExists('getCDNStatusV1', 'domain', domain);
|
|
12726
|
+
const localVarPath = `/api/hosting/v1/accounts/{username}/websites/{domain}/cdn/status`
|
|
12727
|
+
.replace(`{${"username"}}`, encodeURIComponent(String(username)))
|
|
12728
|
+
.replace(`{${"domain"}}`, encodeURIComponent(String(domain)));
|
|
12729
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
12730
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
12731
|
+
let baseOptions;
|
|
12732
|
+
if (configuration) {
|
|
12733
|
+
baseOptions = configuration.baseOptions;
|
|
12734
|
+
}
|
|
12735
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
12736
|
+
const localVarHeaderParameter = {};
|
|
12737
|
+
const localVarQueryParameter = {};
|
|
12738
|
+
// authentication apiToken required
|
|
12739
|
+
// http bearer authentication required
|
|
12740
|
+
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
12741
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
12742
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
12743
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
12744
|
+
return {
|
|
12745
|
+
url: toPathString(localVarUrlObj),
|
|
12746
|
+
options: localVarRequestOptions,
|
|
12747
|
+
};
|
|
12748
|
+
}),
|
|
12749
|
+
/**
|
|
12750
|
+
* 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.
|
|
12751
|
+
* @summary Purge CDN cache
|
|
12752
|
+
* @param {string} username
|
|
12753
|
+
* @param {string} domain Domain name
|
|
12754
|
+
* @param {*} [options] Override http request option.
|
|
12755
|
+
* @throws {RequiredError}
|
|
12756
|
+
*/
|
|
12757
|
+
purgeCDNCacheV1: (username_1, domain_1, ...args_1) => __awaiter(this, [username_1, domain_1, ...args_1], void 0, function* (username, domain, options = {}) {
|
|
12758
|
+
// verify required parameter 'username' is not null or undefined
|
|
12759
|
+
assertParamExists('purgeCDNCacheV1', 'username', username);
|
|
12760
|
+
// verify required parameter 'domain' is not null or undefined
|
|
12761
|
+
assertParamExists('purgeCDNCacheV1', 'domain', domain);
|
|
12762
|
+
const localVarPath = `/api/hosting/v1/accounts/{username}/websites/{domain}/cdn/purge`
|
|
12763
|
+
.replace(`{${"username"}}`, encodeURIComponent(String(username)))
|
|
12764
|
+
.replace(`{${"domain"}}`, encodeURIComponent(String(domain)));
|
|
12765
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
12766
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
12767
|
+
let baseOptions;
|
|
12768
|
+
if (configuration) {
|
|
12769
|
+
baseOptions = configuration.baseOptions;
|
|
12770
|
+
}
|
|
12771
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'DELETE' }, baseOptions), options);
|
|
12772
|
+
const localVarHeaderParameter = {};
|
|
12773
|
+
const localVarQueryParameter = {};
|
|
12774
|
+
// authentication apiToken required
|
|
12775
|
+
// http bearer authentication required
|
|
12776
|
+
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
12777
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
12778
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
12779
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
12780
|
+
return {
|
|
12781
|
+
url: toPathString(localVarUrlObj),
|
|
12782
|
+
options: localVarRequestOptions,
|
|
12783
|
+
};
|
|
12784
|
+
}),
|
|
12785
|
+
};
|
|
12786
|
+
};
|
|
12787
|
+
/**
|
|
12788
|
+
* HostingCDNApi - functional programming interface
|
|
12789
|
+
* @export
|
|
12790
|
+
*/
|
|
12791
|
+
export const HostingCDNApiFp = function (configuration) {
|
|
12792
|
+
const localVarAxiosParamCreator = HostingCDNApiAxiosParamCreator(configuration);
|
|
12793
|
+
return {
|
|
12794
|
+
/**
|
|
12795
|
+
* 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.
|
|
12796
|
+
* @summary Disable CDN
|
|
12797
|
+
* @param {string} username
|
|
12798
|
+
* @param {string} domain Domain name
|
|
12799
|
+
* @param {*} [options] Override http request option.
|
|
12800
|
+
* @throws {RequiredError}
|
|
12801
|
+
*/
|
|
12802
|
+
disableCDNV1(username, domain, options) {
|
|
12803
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
12804
|
+
var _a, _b;
|
|
12805
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.disableCDNV1(username, domain, options);
|
|
12806
|
+
const localVarOperationServerBasePath = (_b = (_a = operationServerMap['HostingCDNApi.disableCDNV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
|
|
12807
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
12808
|
+
});
|
|
12809
|
+
},
|
|
12810
|
+
/**
|
|
12811
|
+
* 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.
|
|
12812
|
+
* @summary Enable CDN
|
|
12813
|
+
* @param {string} username
|
|
12814
|
+
* @param {string} domain Domain name
|
|
12815
|
+
* @param {*} [options] Override http request option.
|
|
12816
|
+
* @throws {RequiredError}
|
|
12817
|
+
*/
|
|
12818
|
+
enableCDNV1(username, domain, options) {
|
|
12819
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
12820
|
+
var _a, _b;
|
|
12821
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.enableCDNV1(username, domain, options);
|
|
12822
|
+
const localVarOperationServerBasePath = (_b = (_a = operationServerMap['HostingCDNApi.enableCDNV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
|
|
12823
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
12824
|
+
});
|
|
12825
|
+
},
|
|
12826
|
+
/**
|
|
12827
|
+
* 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.
|
|
12828
|
+
* @summary Get CDN status
|
|
12829
|
+
* @param {string} username
|
|
12830
|
+
* @param {string} domain Domain name
|
|
12831
|
+
* @param {*} [options] Override http request option.
|
|
12832
|
+
* @throws {RequiredError}
|
|
12833
|
+
*/
|
|
12834
|
+
getCDNStatusV1(username, domain, options) {
|
|
12835
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
12836
|
+
var _a, _b;
|
|
12837
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.getCDNStatusV1(username, domain, options);
|
|
12838
|
+
const localVarOperationServerBasePath = (_b = (_a = operationServerMap['HostingCDNApi.getCDNStatusV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
|
|
12839
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
12840
|
+
});
|
|
12841
|
+
},
|
|
12842
|
+
/**
|
|
12843
|
+
* 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.
|
|
12844
|
+
* @summary Purge CDN cache
|
|
12845
|
+
* @param {string} username
|
|
12846
|
+
* @param {string} domain Domain name
|
|
12847
|
+
* @param {*} [options] Override http request option.
|
|
12848
|
+
* @throws {RequiredError}
|
|
12849
|
+
*/
|
|
12850
|
+
purgeCDNCacheV1(username, domain, options) {
|
|
12851
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
12852
|
+
var _a, _b;
|
|
12853
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.purgeCDNCacheV1(username, domain, options);
|
|
12854
|
+
const localVarOperationServerBasePath = (_b = (_a = operationServerMap['HostingCDNApi.purgeCDNCacheV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
|
|
12855
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
12856
|
+
});
|
|
12857
|
+
},
|
|
12858
|
+
};
|
|
12859
|
+
};
|
|
12860
|
+
/**
|
|
12861
|
+
* HostingCDNApi - factory interface
|
|
12862
|
+
* @export
|
|
12863
|
+
*/
|
|
12864
|
+
export const HostingCDNApiFactory = function (configuration, basePath, axios) {
|
|
12865
|
+
const localVarFp = HostingCDNApiFp(configuration);
|
|
12866
|
+
return {
|
|
12867
|
+
/**
|
|
12868
|
+
* 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.
|
|
12869
|
+
* @summary Disable CDN
|
|
12870
|
+
* @param {string} username
|
|
12871
|
+
* @param {string} domain Domain name
|
|
12872
|
+
* @param {*} [options] Override http request option.
|
|
12873
|
+
* @throws {RequiredError}
|
|
12874
|
+
*/
|
|
12875
|
+
disableCDNV1(username, domain, options) {
|
|
12876
|
+
return localVarFp.disableCDNV1(username, domain, options).then((request) => request(axios, basePath));
|
|
12877
|
+
},
|
|
12878
|
+
/**
|
|
12879
|
+
* 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.
|
|
12880
|
+
* @summary Enable CDN
|
|
12881
|
+
* @param {string} username
|
|
12882
|
+
* @param {string} domain Domain name
|
|
12883
|
+
* @param {*} [options] Override http request option.
|
|
12884
|
+
* @throws {RequiredError}
|
|
12885
|
+
*/
|
|
12886
|
+
enableCDNV1(username, domain, options) {
|
|
12887
|
+
return localVarFp.enableCDNV1(username, domain, options).then((request) => request(axios, basePath));
|
|
12888
|
+
},
|
|
12889
|
+
/**
|
|
12890
|
+
* 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.
|
|
12891
|
+
* @summary Get CDN status
|
|
12892
|
+
* @param {string} username
|
|
12893
|
+
* @param {string} domain Domain name
|
|
12894
|
+
* @param {*} [options] Override http request option.
|
|
12895
|
+
* @throws {RequiredError}
|
|
12896
|
+
*/
|
|
12897
|
+
getCDNStatusV1(username, domain, options) {
|
|
12898
|
+
return localVarFp.getCDNStatusV1(username, domain, options).then((request) => request(axios, basePath));
|
|
12899
|
+
},
|
|
12900
|
+
/**
|
|
12901
|
+
* 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.
|
|
12902
|
+
* @summary Purge CDN cache
|
|
12903
|
+
* @param {string} username
|
|
12904
|
+
* @param {string} domain Domain name
|
|
12905
|
+
* @param {*} [options] Override http request option.
|
|
12906
|
+
* @throws {RequiredError}
|
|
12907
|
+
*/
|
|
12908
|
+
purgeCDNCacheV1(username, domain, options) {
|
|
12909
|
+
return localVarFp.purgeCDNCacheV1(username, domain, options).then((request) => request(axios, basePath));
|
|
12910
|
+
},
|
|
12911
|
+
};
|
|
12912
|
+
};
|
|
12913
|
+
/**
|
|
12914
|
+
* HostingCDNApi - object-oriented interface
|
|
12915
|
+
* @export
|
|
12916
|
+
* @class HostingCDNApi
|
|
12917
|
+
* @extends {BaseAPI}
|
|
12918
|
+
*/
|
|
12919
|
+
export class HostingCDNApi extends BaseAPI {
|
|
12920
|
+
/**
|
|
12921
|
+
* 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.
|
|
12922
|
+
* @summary Disable CDN
|
|
12923
|
+
* @param {string} username
|
|
12924
|
+
* @param {string} domain Domain name
|
|
12925
|
+
* @param {*} [options] Override http request option.
|
|
12926
|
+
* @throws {RequiredError}
|
|
12927
|
+
* @memberof HostingCDNApi
|
|
12928
|
+
*/
|
|
12929
|
+
disableCDNV1(username, domain, options) {
|
|
12930
|
+
return HostingCDNApiFp(this.configuration).disableCDNV1(username, domain, options).then((request) => request(this.axios, this.basePath));
|
|
12931
|
+
}
|
|
12932
|
+
/**
|
|
12933
|
+
* 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.
|
|
12934
|
+
* @summary Enable CDN
|
|
12935
|
+
* @param {string} username
|
|
12936
|
+
* @param {string} domain Domain name
|
|
12937
|
+
* @param {*} [options] Override http request option.
|
|
12938
|
+
* @throws {RequiredError}
|
|
12939
|
+
* @memberof HostingCDNApi
|
|
12940
|
+
*/
|
|
12941
|
+
enableCDNV1(username, domain, options) {
|
|
12942
|
+
return HostingCDNApiFp(this.configuration).enableCDNV1(username, domain, options).then((request) => request(this.axios, this.basePath));
|
|
12943
|
+
}
|
|
12944
|
+
/**
|
|
12945
|
+
* 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.
|
|
12946
|
+
* @summary Get CDN status
|
|
12947
|
+
* @param {string} username
|
|
12948
|
+
* @param {string} domain Domain name
|
|
12949
|
+
* @param {*} [options] Override http request option.
|
|
12950
|
+
* @throws {RequiredError}
|
|
12951
|
+
* @memberof HostingCDNApi
|
|
12952
|
+
*/
|
|
12953
|
+
getCDNStatusV1(username, domain, options) {
|
|
12954
|
+
return HostingCDNApiFp(this.configuration).getCDNStatusV1(username, domain, options).then((request) => request(this.axios, this.basePath));
|
|
12955
|
+
}
|
|
12956
|
+
/**
|
|
12957
|
+
* 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.
|
|
12958
|
+
* @summary Purge CDN cache
|
|
12959
|
+
* @param {string} username
|
|
12960
|
+
* @param {string} domain Domain name
|
|
12961
|
+
* @param {*} [options] Override http request option.
|
|
12962
|
+
* @throws {RequiredError}
|
|
12963
|
+
* @memberof HostingCDNApi
|
|
12964
|
+
*/
|
|
12965
|
+
purgeCDNCacheV1(username, domain, options) {
|
|
12966
|
+
return HostingCDNApiFp(this.configuration).purgeCDNCacheV1(username, domain, options).then((request) => request(this.axios, this.basePath));
|
|
12967
|
+
}
|
|
12968
|
+
}
|
|
12626
12969
|
/**
|
|
12627
12970
|
* HostingCacheApi - axios parameter creator
|
|
12628
12971
|
* @export
|
|
@@ -12630,7 +12973,7 @@ export class HorizonsWebsitesApi extends BaseAPI {
|
|
|
12630
12973
|
export const HostingCacheApiAxiosParamCreator = function (configuration) {
|
|
12631
12974
|
return {
|
|
12632
12975
|
/**
|
|
12633
|
-
* 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.
|
|
12976
|
+
* 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.
|
|
12634
12977
|
* @summary Clear website cache
|
|
12635
12978
|
* @param {string} username
|
|
12636
12979
|
* @param {string} domain Domain name
|
|
@@ -12761,7 +13104,7 @@ export const HostingCacheApiFp = function (configuration) {
|
|
|
12761
13104
|
const localVarAxiosParamCreator = HostingCacheApiAxiosParamCreator(configuration);
|
|
12762
13105
|
return {
|
|
12763
13106
|
/**
|
|
12764
|
-
* 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.
|
|
13107
|
+
* 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.
|
|
12765
13108
|
* @summary Clear website cache
|
|
12766
13109
|
* @param {string} username
|
|
12767
13110
|
* @param {string} domain Domain name
|
|
@@ -12821,7 +13164,7 @@ export const HostingCacheApiFactory = function (configuration, basePath, axios)
|
|
|
12821
13164
|
const localVarFp = HostingCacheApiFp(configuration);
|
|
12822
13165
|
return {
|
|
12823
13166
|
/**
|
|
12824
|
-
* 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.
|
|
13167
|
+
* 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.
|
|
12825
13168
|
* @summary Clear website cache
|
|
12826
13169
|
* @param {string} username
|
|
12827
13170
|
* @param {string} domain Domain name
|
|
@@ -12866,7 +13209,7 @@ export const HostingCacheApiFactory = function (configuration, basePath, axios)
|
|
|
12866
13209
|
*/
|
|
12867
13210
|
export class HostingCacheApi extends BaseAPI {
|
|
12868
13211
|
/**
|
|
12869
|
-
* 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.
|
|
13212
|
+
* 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.
|
|
12870
13213
|
* @summary Clear website cache
|
|
12871
13214
|
* @param {string} username
|
|
12872
13215
|
* @param {string} domain Domain name
|
|
@@ -24512,19 +24855,22 @@ export const ListProfileContactsV1SubscriptionStatusEnum = {
|
|
|
24512
24855
|
export const ReachFormsApiAxiosParamCreator = function (configuration) {
|
|
24513
24856
|
return {
|
|
24514
24857
|
/**
|
|
24515
|
-
*
|
|
24516
|
-
* @summary
|
|
24858
|
+
* 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.
|
|
24859
|
+
* @summary Add form submitter tags
|
|
24517
24860
|
* @param {string} profileUuid Profile uuid parameter
|
|
24518
24861
|
* @param {string} formUuid Form uuid parameter
|
|
24862
|
+
* @param {ReachV1FormsAssignTagsRequest} reachV1FormsAssignTagsRequest
|
|
24519
24863
|
* @param {*} [options] Override http request option.
|
|
24520
24864
|
* @throws {RequiredError}
|
|
24521
24865
|
*/
|
|
24522
|
-
|
|
24866
|
+
addFormSubmitterTagsV1: (profileUuid_1, formUuid_1, reachV1FormsAssignTagsRequest_1, ...args_1) => __awaiter(this, [profileUuid_1, formUuid_1, reachV1FormsAssignTagsRequest_1, ...args_1], void 0, function* (profileUuid, formUuid, reachV1FormsAssignTagsRequest, options = {}) {
|
|
24523
24867
|
// verify required parameter 'profileUuid' is not null or undefined
|
|
24524
|
-
assertParamExists('
|
|
24868
|
+
assertParamExists('addFormSubmitterTagsV1', 'profileUuid', profileUuid);
|
|
24525
24869
|
// verify required parameter 'formUuid' is not null or undefined
|
|
24526
|
-
assertParamExists('
|
|
24527
|
-
|
|
24870
|
+
assertParamExists('addFormSubmitterTagsV1', 'formUuid', formUuid);
|
|
24871
|
+
// verify required parameter 'reachV1FormsAssignTagsRequest' is not null or undefined
|
|
24872
|
+
assertParamExists('addFormSubmitterTagsV1', 'reachV1FormsAssignTagsRequest', reachV1FormsAssignTagsRequest);
|
|
24873
|
+
const localVarPath = `/api/reach/v1/profiles/{profileUuid}/forms/{formUuid}/tags`
|
|
24528
24874
|
.replace(`{${"profileUuid"}}`, encodeURIComponent(String(profileUuid)))
|
|
24529
24875
|
.replace(`{${"formUuid"}}`, encodeURIComponent(String(formUuid)));
|
|
24530
24876
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
@@ -24533,7 +24879,118 @@ export const ReachFormsApiAxiosParamCreator = function (configuration) {
|
|
|
24533
24879
|
if (configuration) {
|
|
24534
24880
|
baseOptions = configuration.baseOptions;
|
|
24535
24881
|
}
|
|
24536
|
-
const localVarRequestOptions = Object.assign(Object.assign({ method: '
|
|
24882
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
|
24883
|
+
const localVarHeaderParameter = {};
|
|
24884
|
+
const localVarQueryParameter = {};
|
|
24885
|
+
// authentication apiToken required
|
|
24886
|
+
// http bearer authentication required
|
|
24887
|
+
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
24888
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
24889
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
24890
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
24891
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
24892
|
+
localVarRequestOptions.data = serializeDataIfNeeded(reachV1FormsAssignTagsRequest, localVarRequestOptions, configuration);
|
|
24893
|
+
return {
|
|
24894
|
+
url: toPathString(localVarUrlObj),
|
|
24895
|
+
options: localVarRequestOptions,
|
|
24896
|
+
};
|
|
24897
|
+
}),
|
|
24898
|
+
/**
|
|
24899
|
+
* 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.
|
|
24900
|
+
* @summary Create form
|
|
24901
|
+
* @param {string} profileUuid Profile uuid parameter
|
|
24902
|
+
* @param {ReachV1FormsStoreRequest} reachV1FormsStoreRequest
|
|
24903
|
+
* @param {*} [options] Override http request option.
|
|
24904
|
+
* @throws {RequiredError}
|
|
24905
|
+
*/
|
|
24906
|
+
createFormV1: (profileUuid_1, reachV1FormsStoreRequest_1, ...args_1) => __awaiter(this, [profileUuid_1, reachV1FormsStoreRequest_1, ...args_1], void 0, function* (profileUuid, reachV1FormsStoreRequest, options = {}) {
|
|
24907
|
+
// verify required parameter 'profileUuid' is not null or undefined
|
|
24908
|
+
assertParamExists('createFormV1', 'profileUuid', profileUuid);
|
|
24909
|
+
// verify required parameter 'reachV1FormsStoreRequest' is not null or undefined
|
|
24910
|
+
assertParamExists('createFormV1', 'reachV1FormsStoreRequest', reachV1FormsStoreRequest);
|
|
24911
|
+
const localVarPath = `/api/reach/v1/profiles/{profileUuid}/forms`
|
|
24912
|
+
.replace(`{${"profileUuid"}}`, encodeURIComponent(String(profileUuid)));
|
|
24913
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
24914
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
24915
|
+
let baseOptions;
|
|
24916
|
+
if (configuration) {
|
|
24917
|
+
baseOptions = configuration.baseOptions;
|
|
24918
|
+
}
|
|
24919
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
|
24920
|
+
const localVarHeaderParameter = {};
|
|
24921
|
+
const localVarQueryParameter = {};
|
|
24922
|
+
// authentication apiToken required
|
|
24923
|
+
// http bearer authentication required
|
|
24924
|
+
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
24925
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
24926
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
24927
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
24928
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
24929
|
+
localVarRequestOptions.data = serializeDataIfNeeded(reachV1FormsStoreRequest, localVarRequestOptions, configuration);
|
|
24930
|
+
return {
|
|
24931
|
+
url: toPathString(localVarUrlObj),
|
|
24932
|
+
options: localVarRequestOptions,
|
|
24933
|
+
};
|
|
24934
|
+
}),
|
|
24935
|
+
/**
|
|
24936
|
+
* 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.
|
|
24937
|
+
* @summary Delete form
|
|
24938
|
+
* @param {string} profileUuid Profile uuid parameter
|
|
24939
|
+
* @param {string} formUuid Form uuid parameter
|
|
24940
|
+
* @param {*} [options] Override http request option.
|
|
24941
|
+
* @throws {RequiredError}
|
|
24942
|
+
*/
|
|
24943
|
+
deleteFormV1: (profileUuid_1, formUuid_1, ...args_1) => __awaiter(this, [profileUuid_1, formUuid_1, ...args_1], void 0, function* (profileUuid, formUuid, options = {}) {
|
|
24944
|
+
// verify required parameter 'profileUuid' is not null or undefined
|
|
24945
|
+
assertParamExists('deleteFormV1', 'profileUuid', profileUuid);
|
|
24946
|
+
// verify required parameter 'formUuid' is not null or undefined
|
|
24947
|
+
assertParamExists('deleteFormV1', 'formUuid', formUuid);
|
|
24948
|
+
const localVarPath = `/api/reach/v1/profiles/{profileUuid}/forms/{formUuid}`
|
|
24949
|
+
.replace(`{${"profileUuid"}}`, encodeURIComponent(String(profileUuid)))
|
|
24950
|
+
.replace(`{${"formUuid"}}`, encodeURIComponent(String(formUuid)));
|
|
24951
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
24952
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
24953
|
+
let baseOptions;
|
|
24954
|
+
if (configuration) {
|
|
24955
|
+
baseOptions = configuration.baseOptions;
|
|
24956
|
+
}
|
|
24957
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'DELETE' }, baseOptions), options);
|
|
24958
|
+
const localVarHeaderParameter = {};
|
|
24959
|
+
const localVarQueryParameter = {};
|
|
24960
|
+
// authentication apiToken required
|
|
24961
|
+
// http bearer authentication required
|
|
24962
|
+
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
24963
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
24964
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
24965
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
24966
|
+
return {
|
|
24967
|
+
url: toPathString(localVarUrlObj),
|
|
24968
|
+
options: localVarRequestOptions,
|
|
24969
|
+
};
|
|
24970
|
+
}),
|
|
24971
|
+
/**
|
|
24972
|
+
* 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`.
|
|
24973
|
+
* @summary Duplicate form
|
|
24974
|
+
* @param {string} profileUuid Profile uuid parameter
|
|
24975
|
+
* @param {string} formUuid Form uuid parameter
|
|
24976
|
+
* @param {*} [options] Override http request option.
|
|
24977
|
+
* @throws {RequiredError}
|
|
24978
|
+
*/
|
|
24979
|
+
duplicateFormV1: (profileUuid_1, formUuid_1, ...args_1) => __awaiter(this, [profileUuid_1, formUuid_1, ...args_1], void 0, function* (profileUuid, formUuid, options = {}) {
|
|
24980
|
+
// verify required parameter 'profileUuid' is not null or undefined
|
|
24981
|
+
assertParamExists('duplicateFormV1', 'profileUuid', profileUuid);
|
|
24982
|
+
// verify required parameter 'formUuid' is not null or undefined
|
|
24983
|
+
assertParamExists('duplicateFormV1', 'formUuid', formUuid);
|
|
24984
|
+
const localVarPath = `/api/reach/v1/profiles/{profileUuid}/forms/{formUuid}/duplicate`
|
|
24985
|
+
.replace(`{${"profileUuid"}}`, encodeURIComponent(String(profileUuid)))
|
|
24986
|
+
.replace(`{${"formUuid"}}`, encodeURIComponent(String(formUuid)));
|
|
24987
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
24988
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
24989
|
+
let baseOptions;
|
|
24990
|
+
if (configuration) {
|
|
24991
|
+
baseOptions = configuration.baseOptions;
|
|
24992
|
+
}
|
|
24993
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
|
24537
24994
|
const localVarHeaderParameter = {};
|
|
24538
24995
|
const localVarQueryParameter = {};
|
|
24539
24996
|
// authentication apiToken required
|
|
@@ -24589,10 +25046,11 @@ export const ReachFormsApiAxiosParamCreator = function (configuration) {
|
|
|
24589
25046
|
* @param {string} profileUuid Profile uuid parameter
|
|
24590
25047
|
* @param {number} [page] Page number
|
|
24591
25048
|
* @param {number} [perPage] Number of items per page
|
|
25049
|
+
* @param {ListFormsV1StatusEnum} [status] Return only forms with this status.
|
|
24592
25050
|
* @param {*} [options] Override http request option.
|
|
24593
25051
|
* @throws {RequiredError}
|
|
24594
25052
|
*/
|
|
24595
|
-
listFormsV1: (profileUuid_1, page_1, perPage_1, ...args_1) => __awaiter(this, [profileUuid_1, page_1, perPage_1, ...args_1], void 0, function* (profileUuid, page, perPage, options = {}) {
|
|
25053
|
+
listFormsV1: (profileUuid_1, page_1, perPage_1, status_1, ...args_1) => __awaiter(this, [profileUuid_1, page_1, perPage_1, status_1, ...args_1], void 0, function* (profileUuid, page, perPage, status, options = {}) {
|
|
24596
25054
|
// verify required parameter 'profileUuid' is not null or undefined
|
|
24597
25055
|
assertParamExists('listFormsV1', 'profileUuid', profileUuid);
|
|
24598
25056
|
const localVarPath = `/api/reach/v1/profiles/{profileUuid}/forms`
|
|
@@ -24615,9 +25073,135 @@ export const ReachFormsApiAxiosParamCreator = function (configuration) {
|
|
|
24615
25073
|
if (perPage !== undefined) {
|
|
24616
25074
|
localVarQueryParameter['per_page'] = perPage;
|
|
24617
25075
|
}
|
|
25076
|
+
if (status !== undefined) {
|
|
25077
|
+
localVarQueryParameter['status'] = status;
|
|
25078
|
+
}
|
|
25079
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
25080
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
25081
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
25082
|
+
return {
|
|
25083
|
+
url: toPathString(localVarUrlObj),
|
|
25084
|
+
options: localVarRequestOptions,
|
|
25085
|
+
};
|
|
25086
|
+
}),
|
|
25087
|
+
/**
|
|
25088
|
+
* 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.
|
|
25089
|
+
* @summary Remove form submitter tag
|
|
25090
|
+
* @param {string} profileUuid Profile uuid parameter
|
|
25091
|
+
* @param {string} formUuid Form uuid parameter
|
|
25092
|
+
* @param {ReachV1FormsRemoveTagRequest} reachV1FormsRemoveTagRequest
|
|
25093
|
+
* @param {*} [options] Override http request option.
|
|
25094
|
+
* @throws {RequiredError}
|
|
25095
|
+
*/
|
|
25096
|
+
removeFormSubmitterTagV1: (profileUuid_1, formUuid_1, reachV1FormsRemoveTagRequest_1, ...args_1) => __awaiter(this, [profileUuid_1, formUuid_1, reachV1FormsRemoveTagRequest_1, ...args_1], void 0, function* (profileUuid, formUuid, reachV1FormsRemoveTagRequest, options = {}) {
|
|
25097
|
+
// verify required parameter 'profileUuid' is not null or undefined
|
|
25098
|
+
assertParamExists('removeFormSubmitterTagV1', 'profileUuid', profileUuid);
|
|
25099
|
+
// verify required parameter 'formUuid' is not null or undefined
|
|
25100
|
+
assertParamExists('removeFormSubmitterTagV1', 'formUuid', formUuid);
|
|
25101
|
+
// verify required parameter 'reachV1FormsRemoveTagRequest' is not null or undefined
|
|
25102
|
+
assertParamExists('removeFormSubmitterTagV1', 'reachV1FormsRemoveTagRequest', reachV1FormsRemoveTagRequest);
|
|
25103
|
+
const localVarPath = `/api/reach/v1/profiles/{profileUuid}/forms/{formUuid}/tags`
|
|
25104
|
+
.replace(`{${"profileUuid"}}`, encodeURIComponent(String(profileUuid)))
|
|
25105
|
+
.replace(`{${"formUuid"}}`, encodeURIComponent(String(formUuid)));
|
|
25106
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
25107
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
25108
|
+
let baseOptions;
|
|
25109
|
+
if (configuration) {
|
|
25110
|
+
baseOptions = configuration.baseOptions;
|
|
25111
|
+
}
|
|
25112
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'DELETE' }, baseOptions), options);
|
|
25113
|
+
const localVarHeaderParameter = {};
|
|
25114
|
+
const localVarQueryParameter = {};
|
|
25115
|
+
// authentication apiToken required
|
|
25116
|
+
// http bearer authentication required
|
|
25117
|
+
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
25118
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
25119
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
25120
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
25121
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
25122
|
+
localVarRequestOptions.data = serializeDataIfNeeded(reachV1FormsRemoveTagRequest, localVarRequestOptions, configuration);
|
|
25123
|
+
return {
|
|
25124
|
+
url: toPathString(localVarUrlObj),
|
|
25125
|
+
options: localVarRequestOptions,
|
|
25126
|
+
};
|
|
25127
|
+
}),
|
|
25128
|
+
/**
|
|
25129
|
+
* 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.
|
|
25130
|
+
* @summary Update form template
|
|
25131
|
+
* @param {string} profileUuid Profile uuid parameter
|
|
25132
|
+
* @param {string} formUuid Form uuid parameter
|
|
25133
|
+
* @param {ReachV1FormsUpdateTemplateRequest} reachV1FormsUpdateTemplateRequest
|
|
25134
|
+
* @param {*} [options] Override http request option.
|
|
25135
|
+
* @throws {RequiredError}
|
|
25136
|
+
*/
|
|
25137
|
+
updateFormTemplateV1: (profileUuid_1, formUuid_1, reachV1FormsUpdateTemplateRequest_1, ...args_1) => __awaiter(this, [profileUuid_1, formUuid_1, reachV1FormsUpdateTemplateRequest_1, ...args_1], void 0, function* (profileUuid, formUuid, reachV1FormsUpdateTemplateRequest, options = {}) {
|
|
25138
|
+
// verify required parameter 'profileUuid' is not null or undefined
|
|
25139
|
+
assertParamExists('updateFormTemplateV1', 'profileUuid', profileUuid);
|
|
25140
|
+
// verify required parameter 'formUuid' is not null or undefined
|
|
25141
|
+
assertParamExists('updateFormTemplateV1', 'formUuid', formUuid);
|
|
25142
|
+
// verify required parameter 'reachV1FormsUpdateTemplateRequest' is not null or undefined
|
|
25143
|
+
assertParamExists('updateFormTemplateV1', 'reachV1FormsUpdateTemplateRequest', reachV1FormsUpdateTemplateRequest);
|
|
25144
|
+
const localVarPath = `/api/reach/v1/profiles/{profileUuid}/forms/{formUuid}/template`
|
|
25145
|
+
.replace(`{${"profileUuid"}}`, encodeURIComponent(String(profileUuid)))
|
|
25146
|
+
.replace(`{${"formUuid"}}`, encodeURIComponent(String(formUuid)));
|
|
25147
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
25148
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
25149
|
+
let baseOptions;
|
|
25150
|
+
if (configuration) {
|
|
25151
|
+
baseOptions = configuration.baseOptions;
|
|
25152
|
+
}
|
|
25153
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'PATCH' }, baseOptions), options);
|
|
25154
|
+
const localVarHeaderParameter = {};
|
|
25155
|
+
const localVarQueryParameter = {};
|
|
25156
|
+
// authentication apiToken required
|
|
25157
|
+
// http bearer authentication required
|
|
25158
|
+
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
25159
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
25160
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
25161
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
25162
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
25163
|
+
localVarRequestOptions.data = serializeDataIfNeeded(reachV1FormsUpdateTemplateRequest, localVarRequestOptions, configuration);
|
|
25164
|
+
return {
|
|
25165
|
+
url: toPathString(localVarUrlObj),
|
|
25166
|
+
options: localVarRequestOptions,
|
|
25167
|
+
};
|
|
25168
|
+
}),
|
|
25169
|
+
/**
|
|
25170
|
+
* 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.
|
|
25171
|
+
* @summary Update form
|
|
25172
|
+
* @param {string} profileUuid Profile uuid parameter
|
|
25173
|
+
* @param {string} formUuid Form uuid parameter
|
|
25174
|
+
* @param {ReachV1FormsUpdateRequest} reachV1FormsUpdateRequest
|
|
25175
|
+
* @param {*} [options] Override http request option.
|
|
25176
|
+
* @throws {RequiredError}
|
|
25177
|
+
*/
|
|
25178
|
+
updateFormV1: (profileUuid_1, formUuid_1, reachV1FormsUpdateRequest_1, ...args_1) => __awaiter(this, [profileUuid_1, formUuid_1, reachV1FormsUpdateRequest_1, ...args_1], void 0, function* (profileUuid, formUuid, reachV1FormsUpdateRequest, options = {}) {
|
|
25179
|
+
// verify required parameter 'profileUuid' is not null or undefined
|
|
25180
|
+
assertParamExists('updateFormV1', 'profileUuid', profileUuid);
|
|
25181
|
+
// verify required parameter 'formUuid' is not null or undefined
|
|
25182
|
+
assertParamExists('updateFormV1', 'formUuid', formUuid);
|
|
25183
|
+
// verify required parameter 'reachV1FormsUpdateRequest' is not null or undefined
|
|
25184
|
+
assertParamExists('updateFormV1', 'reachV1FormsUpdateRequest', reachV1FormsUpdateRequest);
|
|
25185
|
+
const localVarPath = `/api/reach/v1/profiles/{profileUuid}/forms/{formUuid}`
|
|
25186
|
+
.replace(`{${"profileUuid"}}`, encodeURIComponent(String(profileUuid)))
|
|
25187
|
+
.replace(`{${"formUuid"}}`, encodeURIComponent(String(formUuid)));
|
|
25188
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
25189
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
25190
|
+
let baseOptions;
|
|
25191
|
+
if (configuration) {
|
|
25192
|
+
baseOptions = configuration.baseOptions;
|
|
25193
|
+
}
|
|
25194
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'PATCH' }, baseOptions), options);
|
|
25195
|
+
const localVarHeaderParameter = {};
|
|
25196
|
+
const localVarQueryParameter = {};
|
|
25197
|
+
// authentication apiToken required
|
|
25198
|
+
// http bearer authentication required
|
|
25199
|
+
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
25200
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
24618
25201
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
24619
25202
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
24620
25203
|
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
25204
|
+
localVarRequestOptions.data = serializeDataIfNeeded(reachV1FormsUpdateRequest, localVarRequestOptions, configuration);
|
|
24621
25205
|
return {
|
|
24622
25206
|
url: toPathString(localVarUrlObj),
|
|
24623
25207
|
options: localVarRequestOptions,
|
|
@@ -24632,6 +25216,39 @@ export const ReachFormsApiAxiosParamCreator = function (configuration) {
|
|
|
24632
25216
|
export const ReachFormsApiFp = function (configuration) {
|
|
24633
25217
|
const localVarAxiosParamCreator = ReachFormsApiAxiosParamCreator(configuration);
|
|
24634
25218
|
return {
|
|
25219
|
+
/**
|
|
25220
|
+
* 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.
|
|
25221
|
+
* @summary Add form submitter tags
|
|
25222
|
+
* @param {string} profileUuid Profile uuid parameter
|
|
25223
|
+
* @param {string} formUuid Form uuid parameter
|
|
25224
|
+
* @param {ReachV1FormsAssignTagsRequest} reachV1FormsAssignTagsRequest
|
|
25225
|
+
* @param {*} [options] Override http request option.
|
|
25226
|
+
* @throws {RequiredError}
|
|
25227
|
+
*/
|
|
25228
|
+
addFormSubmitterTagsV1(profileUuid, formUuid, reachV1FormsAssignTagsRequest, options) {
|
|
25229
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
25230
|
+
var _a, _b;
|
|
25231
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.addFormSubmitterTagsV1(profileUuid, formUuid, reachV1FormsAssignTagsRequest, options);
|
|
25232
|
+
const localVarOperationServerBasePath = (_b = (_a = operationServerMap['ReachFormsApi.addFormSubmitterTagsV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
|
|
25233
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
25234
|
+
});
|
|
25235
|
+
},
|
|
25236
|
+
/**
|
|
25237
|
+
* 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.
|
|
25238
|
+
* @summary Create form
|
|
25239
|
+
* @param {string} profileUuid Profile uuid parameter
|
|
25240
|
+
* @param {ReachV1FormsStoreRequest} reachV1FormsStoreRequest
|
|
25241
|
+
* @param {*} [options] Override http request option.
|
|
25242
|
+
* @throws {RequiredError}
|
|
25243
|
+
*/
|
|
25244
|
+
createFormV1(profileUuid, reachV1FormsStoreRequest, options) {
|
|
25245
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
25246
|
+
var _a, _b;
|
|
25247
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.createFormV1(profileUuid, reachV1FormsStoreRequest, options);
|
|
25248
|
+
const localVarOperationServerBasePath = (_b = (_a = operationServerMap['ReachFormsApi.createFormV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
|
|
25249
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
25250
|
+
});
|
|
25251
|
+
},
|
|
24635
25252
|
/**
|
|
24636
25253
|
* 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.
|
|
24637
25254
|
* @summary Delete form
|
|
@@ -24648,6 +25265,22 @@ export const ReachFormsApiFp = function (configuration) {
|
|
|
24648
25265
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
24649
25266
|
});
|
|
24650
25267
|
},
|
|
25268
|
+
/**
|
|
25269
|
+
* 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`.
|
|
25270
|
+
* @summary Duplicate form
|
|
25271
|
+
* @param {string} profileUuid Profile uuid parameter
|
|
25272
|
+
* @param {string} formUuid Form uuid parameter
|
|
25273
|
+
* @param {*} [options] Override http request option.
|
|
25274
|
+
* @throws {RequiredError}
|
|
25275
|
+
*/
|
|
25276
|
+
duplicateFormV1(profileUuid, formUuid, options) {
|
|
25277
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
25278
|
+
var _a, _b;
|
|
25279
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.duplicateFormV1(profileUuid, formUuid, options);
|
|
25280
|
+
const localVarOperationServerBasePath = (_b = (_a = operationServerMap['ReachFormsApi.duplicateFormV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
|
|
25281
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
25282
|
+
});
|
|
25283
|
+
},
|
|
24651
25284
|
/**
|
|
24652
25285
|
* 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.
|
|
24653
25286
|
* @summary Get form details
|
|
@@ -24670,17 +25303,69 @@ export const ReachFormsApiFp = function (configuration) {
|
|
|
24670
25303
|
* @param {string} profileUuid Profile uuid parameter
|
|
24671
25304
|
* @param {number} [page] Page number
|
|
24672
25305
|
* @param {number} [perPage] Number of items per page
|
|
25306
|
+
* @param {ListFormsV1StatusEnum} [status] Return only forms with this status.
|
|
24673
25307
|
* @param {*} [options] Override http request option.
|
|
24674
25308
|
* @throws {RequiredError}
|
|
24675
25309
|
*/
|
|
24676
|
-
listFormsV1(profileUuid, page, perPage, options) {
|
|
25310
|
+
listFormsV1(profileUuid, page, perPage, status, options) {
|
|
24677
25311
|
return __awaiter(this, void 0, void 0, function* () {
|
|
24678
25312
|
var _a, _b;
|
|
24679
|
-
const localVarAxiosArgs = yield localVarAxiosParamCreator.listFormsV1(profileUuid, page, perPage, options);
|
|
25313
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.listFormsV1(profileUuid, page, perPage, status, options);
|
|
24680
25314
|
const localVarOperationServerBasePath = (_b = (_a = operationServerMap['ReachFormsApi.listFormsV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
|
|
24681
25315
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
24682
25316
|
});
|
|
24683
25317
|
},
|
|
25318
|
+
/**
|
|
25319
|
+
* 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.
|
|
25320
|
+
* @summary Remove form submitter tag
|
|
25321
|
+
* @param {string} profileUuid Profile uuid parameter
|
|
25322
|
+
* @param {string} formUuid Form uuid parameter
|
|
25323
|
+
* @param {ReachV1FormsRemoveTagRequest} reachV1FormsRemoveTagRequest
|
|
25324
|
+
* @param {*} [options] Override http request option.
|
|
25325
|
+
* @throws {RequiredError}
|
|
25326
|
+
*/
|
|
25327
|
+
removeFormSubmitterTagV1(profileUuid, formUuid, reachV1FormsRemoveTagRequest, options) {
|
|
25328
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
25329
|
+
var _a, _b;
|
|
25330
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.removeFormSubmitterTagV1(profileUuid, formUuid, reachV1FormsRemoveTagRequest, options);
|
|
25331
|
+
const localVarOperationServerBasePath = (_b = (_a = operationServerMap['ReachFormsApi.removeFormSubmitterTagV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
|
|
25332
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
25333
|
+
});
|
|
25334
|
+
},
|
|
25335
|
+
/**
|
|
25336
|
+
* 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.
|
|
25337
|
+
* @summary Update form template
|
|
25338
|
+
* @param {string} profileUuid Profile uuid parameter
|
|
25339
|
+
* @param {string} formUuid Form uuid parameter
|
|
25340
|
+
* @param {ReachV1FormsUpdateTemplateRequest} reachV1FormsUpdateTemplateRequest
|
|
25341
|
+
* @param {*} [options] Override http request option.
|
|
25342
|
+
* @throws {RequiredError}
|
|
25343
|
+
*/
|
|
25344
|
+
updateFormTemplateV1(profileUuid, formUuid, reachV1FormsUpdateTemplateRequest, options) {
|
|
25345
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
25346
|
+
var _a, _b;
|
|
25347
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.updateFormTemplateV1(profileUuid, formUuid, reachV1FormsUpdateTemplateRequest, options);
|
|
25348
|
+
const localVarOperationServerBasePath = (_b = (_a = operationServerMap['ReachFormsApi.updateFormTemplateV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
|
|
25349
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
25350
|
+
});
|
|
25351
|
+
},
|
|
25352
|
+
/**
|
|
25353
|
+
* 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.
|
|
25354
|
+
* @summary Update form
|
|
25355
|
+
* @param {string} profileUuid Profile uuid parameter
|
|
25356
|
+
* @param {string} formUuid Form uuid parameter
|
|
25357
|
+
* @param {ReachV1FormsUpdateRequest} reachV1FormsUpdateRequest
|
|
25358
|
+
* @param {*} [options] Override http request option.
|
|
25359
|
+
* @throws {RequiredError}
|
|
25360
|
+
*/
|
|
25361
|
+
updateFormV1(profileUuid, formUuid, reachV1FormsUpdateRequest, options) {
|
|
25362
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
25363
|
+
var _a, _b;
|
|
25364
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.updateFormV1(profileUuid, formUuid, reachV1FormsUpdateRequest, options);
|
|
25365
|
+
const localVarOperationServerBasePath = (_b = (_a = operationServerMap['ReachFormsApi.updateFormV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
|
|
25366
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
25367
|
+
});
|
|
25368
|
+
},
|
|
24684
25369
|
};
|
|
24685
25370
|
};
|
|
24686
25371
|
/**
|
|
@@ -24690,6 +25375,29 @@ export const ReachFormsApiFp = function (configuration) {
|
|
|
24690
25375
|
export const ReachFormsApiFactory = function (configuration, basePath, axios) {
|
|
24691
25376
|
const localVarFp = ReachFormsApiFp(configuration);
|
|
24692
25377
|
return {
|
|
25378
|
+
/**
|
|
25379
|
+
* 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.
|
|
25380
|
+
* @summary Add form submitter tags
|
|
25381
|
+
* @param {string} profileUuid Profile uuid parameter
|
|
25382
|
+
* @param {string} formUuid Form uuid parameter
|
|
25383
|
+
* @param {ReachV1FormsAssignTagsRequest} reachV1FormsAssignTagsRequest
|
|
25384
|
+
* @param {*} [options] Override http request option.
|
|
25385
|
+
* @throws {RequiredError}
|
|
25386
|
+
*/
|
|
25387
|
+
addFormSubmitterTagsV1(profileUuid, formUuid, reachV1FormsAssignTagsRequest, options) {
|
|
25388
|
+
return localVarFp.addFormSubmitterTagsV1(profileUuid, formUuid, reachV1FormsAssignTagsRequest, options).then((request) => request(axios, basePath));
|
|
25389
|
+
},
|
|
25390
|
+
/**
|
|
25391
|
+
* 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.
|
|
25392
|
+
* @summary Create form
|
|
25393
|
+
* @param {string} profileUuid Profile uuid parameter
|
|
25394
|
+
* @param {ReachV1FormsStoreRequest} reachV1FormsStoreRequest
|
|
25395
|
+
* @param {*} [options] Override http request option.
|
|
25396
|
+
* @throws {RequiredError}
|
|
25397
|
+
*/
|
|
25398
|
+
createFormV1(profileUuid, reachV1FormsStoreRequest, options) {
|
|
25399
|
+
return localVarFp.createFormV1(profileUuid, reachV1FormsStoreRequest, options).then((request) => request(axios, basePath));
|
|
25400
|
+
},
|
|
24693
25401
|
/**
|
|
24694
25402
|
* 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.
|
|
24695
25403
|
* @summary Delete form
|
|
@@ -24701,6 +25409,17 @@ export const ReachFormsApiFactory = function (configuration, basePath, axios) {
|
|
|
24701
25409
|
deleteFormV1(profileUuid, formUuid, options) {
|
|
24702
25410
|
return localVarFp.deleteFormV1(profileUuid, formUuid, options).then((request) => request(axios, basePath));
|
|
24703
25411
|
},
|
|
25412
|
+
/**
|
|
25413
|
+
* 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`.
|
|
25414
|
+
* @summary Duplicate form
|
|
25415
|
+
* @param {string} profileUuid Profile uuid parameter
|
|
25416
|
+
* @param {string} formUuid Form uuid parameter
|
|
25417
|
+
* @param {*} [options] Override http request option.
|
|
25418
|
+
* @throws {RequiredError}
|
|
25419
|
+
*/
|
|
25420
|
+
duplicateFormV1(profileUuid, formUuid, options) {
|
|
25421
|
+
return localVarFp.duplicateFormV1(profileUuid, formUuid, options).then((request) => request(axios, basePath));
|
|
25422
|
+
},
|
|
24704
25423
|
/**
|
|
24705
25424
|
* 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.
|
|
24706
25425
|
* @summary Get form details
|
|
@@ -24718,11 +25437,48 @@ export const ReachFormsApiFactory = function (configuration, basePath, axios) {
|
|
|
24718
25437
|
* @param {string} profileUuid Profile uuid parameter
|
|
24719
25438
|
* @param {number} [page] Page number
|
|
24720
25439
|
* @param {number} [perPage] Number of items per page
|
|
25440
|
+
* @param {ListFormsV1StatusEnum} [status] Return only forms with this status.
|
|
25441
|
+
* @param {*} [options] Override http request option.
|
|
25442
|
+
* @throws {RequiredError}
|
|
25443
|
+
*/
|
|
25444
|
+
listFormsV1(profileUuid, page, perPage, status, options) {
|
|
25445
|
+
return localVarFp.listFormsV1(profileUuid, page, perPage, status, options).then((request) => request(axios, basePath));
|
|
25446
|
+
},
|
|
25447
|
+
/**
|
|
25448
|
+
* 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.
|
|
25449
|
+
* @summary Remove form submitter tag
|
|
25450
|
+
* @param {string} profileUuid Profile uuid parameter
|
|
25451
|
+
* @param {string} formUuid Form uuid parameter
|
|
25452
|
+
* @param {ReachV1FormsRemoveTagRequest} reachV1FormsRemoveTagRequest
|
|
25453
|
+
* @param {*} [options] Override http request option.
|
|
25454
|
+
* @throws {RequiredError}
|
|
25455
|
+
*/
|
|
25456
|
+
removeFormSubmitterTagV1(profileUuid, formUuid, reachV1FormsRemoveTagRequest, options) {
|
|
25457
|
+
return localVarFp.removeFormSubmitterTagV1(profileUuid, formUuid, reachV1FormsRemoveTagRequest, options).then((request) => request(axios, basePath));
|
|
25458
|
+
},
|
|
25459
|
+
/**
|
|
25460
|
+
* 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.
|
|
25461
|
+
* @summary Update form template
|
|
25462
|
+
* @param {string} profileUuid Profile uuid parameter
|
|
25463
|
+
* @param {string} formUuid Form uuid parameter
|
|
25464
|
+
* @param {ReachV1FormsUpdateTemplateRequest} reachV1FormsUpdateTemplateRequest
|
|
25465
|
+
* @param {*} [options] Override http request option.
|
|
25466
|
+
* @throws {RequiredError}
|
|
25467
|
+
*/
|
|
25468
|
+
updateFormTemplateV1(profileUuid, formUuid, reachV1FormsUpdateTemplateRequest, options) {
|
|
25469
|
+
return localVarFp.updateFormTemplateV1(profileUuid, formUuid, reachV1FormsUpdateTemplateRequest, options).then((request) => request(axios, basePath));
|
|
25470
|
+
},
|
|
25471
|
+
/**
|
|
25472
|
+
* 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.
|
|
25473
|
+
* @summary Update form
|
|
25474
|
+
* @param {string} profileUuid Profile uuid parameter
|
|
25475
|
+
* @param {string} formUuid Form uuid parameter
|
|
25476
|
+
* @param {ReachV1FormsUpdateRequest} reachV1FormsUpdateRequest
|
|
24721
25477
|
* @param {*} [options] Override http request option.
|
|
24722
25478
|
* @throws {RequiredError}
|
|
24723
25479
|
*/
|
|
24724
|
-
|
|
24725
|
-
return localVarFp.
|
|
25480
|
+
updateFormV1(profileUuid, formUuid, reachV1FormsUpdateRequest, options) {
|
|
25481
|
+
return localVarFp.updateFormV1(profileUuid, formUuid, reachV1FormsUpdateRequest, options).then((request) => request(axios, basePath));
|
|
24726
25482
|
},
|
|
24727
25483
|
};
|
|
24728
25484
|
};
|
|
@@ -24733,6 +25489,31 @@ export const ReachFormsApiFactory = function (configuration, basePath, axios) {
|
|
|
24733
25489
|
* @extends {BaseAPI}
|
|
24734
25490
|
*/
|
|
24735
25491
|
export class ReachFormsApi extends BaseAPI {
|
|
25492
|
+
/**
|
|
25493
|
+
* 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.
|
|
25494
|
+
* @summary Add form submitter tags
|
|
25495
|
+
* @param {string} profileUuid Profile uuid parameter
|
|
25496
|
+
* @param {string} formUuid Form uuid parameter
|
|
25497
|
+
* @param {ReachV1FormsAssignTagsRequest} reachV1FormsAssignTagsRequest
|
|
25498
|
+
* @param {*} [options] Override http request option.
|
|
25499
|
+
* @throws {RequiredError}
|
|
25500
|
+
* @memberof ReachFormsApi
|
|
25501
|
+
*/
|
|
25502
|
+
addFormSubmitterTagsV1(profileUuid, formUuid, reachV1FormsAssignTagsRequest, options) {
|
|
25503
|
+
return ReachFormsApiFp(this.configuration).addFormSubmitterTagsV1(profileUuid, formUuid, reachV1FormsAssignTagsRequest, options).then((request) => request(this.axios, this.basePath));
|
|
25504
|
+
}
|
|
25505
|
+
/**
|
|
25506
|
+
* 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.
|
|
25507
|
+
* @summary Create form
|
|
25508
|
+
* @param {string} profileUuid Profile uuid parameter
|
|
25509
|
+
* @param {ReachV1FormsStoreRequest} reachV1FormsStoreRequest
|
|
25510
|
+
* @param {*} [options] Override http request option.
|
|
25511
|
+
* @throws {RequiredError}
|
|
25512
|
+
* @memberof ReachFormsApi
|
|
25513
|
+
*/
|
|
25514
|
+
createFormV1(profileUuid, reachV1FormsStoreRequest, options) {
|
|
25515
|
+
return ReachFormsApiFp(this.configuration).createFormV1(profileUuid, reachV1FormsStoreRequest, options).then((request) => request(this.axios, this.basePath));
|
|
25516
|
+
}
|
|
24736
25517
|
/**
|
|
24737
25518
|
* 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.
|
|
24738
25519
|
* @summary Delete form
|
|
@@ -24745,6 +25526,18 @@ export class ReachFormsApi extends BaseAPI {
|
|
|
24745
25526
|
deleteFormV1(profileUuid, formUuid, options) {
|
|
24746
25527
|
return ReachFormsApiFp(this.configuration).deleteFormV1(profileUuid, formUuid, options).then((request) => request(this.axios, this.basePath));
|
|
24747
25528
|
}
|
|
25529
|
+
/**
|
|
25530
|
+
* 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`.
|
|
25531
|
+
* @summary Duplicate form
|
|
25532
|
+
* @param {string} profileUuid Profile uuid parameter
|
|
25533
|
+
* @param {string} formUuid Form uuid parameter
|
|
25534
|
+
* @param {*} [options] Override http request option.
|
|
25535
|
+
* @throws {RequiredError}
|
|
25536
|
+
* @memberof ReachFormsApi
|
|
25537
|
+
*/
|
|
25538
|
+
duplicateFormV1(profileUuid, formUuid, options) {
|
|
25539
|
+
return ReachFormsApiFp(this.configuration).duplicateFormV1(profileUuid, formUuid, options).then((request) => request(this.axios, this.basePath));
|
|
25540
|
+
}
|
|
24748
25541
|
/**
|
|
24749
25542
|
* 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.
|
|
24750
25543
|
* @summary Get form details
|
|
@@ -24763,14 +25556,62 @@ export class ReachFormsApi extends BaseAPI {
|
|
|
24763
25556
|
* @param {string} profileUuid Profile uuid parameter
|
|
24764
25557
|
* @param {number} [page] Page number
|
|
24765
25558
|
* @param {number} [perPage] Number of items per page
|
|
25559
|
+
* @param {ListFormsV1StatusEnum} [status] Return only forms with this status.
|
|
25560
|
+
* @param {*} [options] Override http request option.
|
|
25561
|
+
* @throws {RequiredError}
|
|
25562
|
+
* @memberof ReachFormsApi
|
|
25563
|
+
*/
|
|
25564
|
+
listFormsV1(profileUuid, page, perPage, status, options) {
|
|
25565
|
+
return ReachFormsApiFp(this.configuration).listFormsV1(profileUuid, page, perPage, status, options).then((request) => request(this.axios, this.basePath));
|
|
25566
|
+
}
|
|
25567
|
+
/**
|
|
25568
|
+
* 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.
|
|
25569
|
+
* @summary Remove form submitter tag
|
|
25570
|
+
* @param {string} profileUuid Profile uuid parameter
|
|
25571
|
+
* @param {string} formUuid Form uuid parameter
|
|
25572
|
+
* @param {ReachV1FormsRemoveTagRequest} reachV1FormsRemoveTagRequest
|
|
25573
|
+
* @param {*} [options] Override http request option.
|
|
25574
|
+
* @throws {RequiredError}
|
|
25575
|
+
* @memberof ReachFormsApi
|
|
25576
|
+
*/
|
|
25577
|
+
removeFormSubmitterTagV1(profileUuid, formUuid, reachV1FormsRemoveTagRequest, options) {
|
|
25578
|
+
return ReachFormsApiFp(this.configuration).removeFormSubmitterTagV1(profileUuid, formUuid, reachV1FormsRemoveTagRequest, options).then((request) => request(this.axios, this.basePath));
|
|
25579
|
+
}
|
|
25580
|
+
/**
|
|
25581
|
+
* 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.
|
|
25582
|
+
* @summary Update form template
|
|
25583
|
+
* @param {string} profileUuid Profile uuid parameter
|
|
25584
|
+
* @param {string} formUuid Form uuid parameter
|
|
25585
|
+
* @param {ReachV1FormsUpdateTemplateRequest} reachV1FormsUpdateTemplateRequest
|
|
25586
|
+
* @param {*} [options] Override http request option.
|
|
25587
|
+
* @throws {RequiredError}
|
|
25588
|
+
* @memberof ReachFormsApi
|
|
25589
|
+
*/
|
|
25590
|
+
updateFormTemplateV1(profileUuid, formUuid, reachV1FormsUpdateTemplateRequest, options) {
|
|
25591
|
+
return ReachFormsApiFp(this.configuration).updateFormTemplateV1(profileUuid, formUuid, reachV1FormsUpdateTemplateRequest, options).then((request) => request(this.axios, this.basePath));
|
|
25592
|
+
}
|
|
25593
|
+
/**
|
|
25594
|
+
* 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.
|
|
25595
|
+
* @summary Update form
|
|
25596
|
+
* @param {string} profileUuid Profile uuid parameter
|
|
25597
|
+
* @param {string} formUuid Form uuid parameter
|
|
25598
|
+
* @param {ReachV1FormsUpdateRequest} reachV1FormsUpdateRequest
|
|
24766
25599
|
* @param {*} [options] Override http request option.
|
|
24767
25600
|
* @throws {RequiredError}
|
|
24768
25601
|
* @memberof ReachFormsApi
|
|
24769
25602
|
*/
|
|
24770
|
-
|
|
24771
|
-
return ReachFormsApiFp(this.configuration).
|
|
25603
|
+
updateFormV1(profileUuid, formUuid, reachV1FormsUpdateRequest, options) {
|
|
25604
|
+
return ReachFormsApiFp(this.configuration).updateFormV1(profileUuid, formUuid, reachV1FormsUpdateRequest, options).then((request) => request(this.axios, this.basePath));
|
|
24772
25605
|
}
|
|
24773
25606
|
}
|
|
25607
|
+
/**
|
|
25608
|
+
* @export
|
|
25609
|
+
*/
|
|
25610
|
+
export const ListFormsV1StatusEnum = {
|
|
25611
|
+
Active: 'active',
|
|
25612
|
+
Paused: 'paused',
|
|
25613
|
+
Draft: 'draft'
|
|
25614
|
+
};
|
|
24774
25615
|
/**
|
|
24775
25616
|
* ReachProfilesApi - axios parameter creator
|
|
24776
25617
|
* @export
|