hostinger-api-sdk 2.1.2 → 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 +662 -8
- package/base.ts +1 -1
- package/common.ts +1 -1
- package/configuration.ts +2 -2
- package/dist/api.d.ts +375 -5
- package/dist/api.js +525 -18
- 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 +375 -5
- package/dist/esm/api.js +515 -8
- 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/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',
|
|
@@ -24845,6 +24854,84 @@ export const ListProfileContactsV1SubscriptionStatusEnum = {
|
|
|
24845
24854
|
*/
|
|
24846
24855
|
export const ReachFormsApiAxiosParamCreator = function (configuration) {
|
|
24847
24856
|
return {
|
|
24857
|
+
/**
|
|
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
|
|
24860
|
+
* @param {string} profileUuid Profile uuid parameter
|
|
24861
|
+
* @param {string} formUuid Form uuid parameter
|
|
24862
|
+
* @param {ReachV1FormsAssignTagsRequest} reachV1FormsAssignTagsRequest
|
|
24863
|
+
* @param {*} [options] Override http request option.
|
|
24864
|
+
* @throws {RequiredError}
|
|
24865
|
+
*/
|
|
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 = {}) {
|
|
24867
|
+
// verify required parameter 'profileUuid' is not null or undefined
|
|
24868
|
+
assertParamExists('addFormSubmitterTagsV1', 'profileUuid', profileUuid);
|
|
24869
|
+
// verify required parameter 'formUuid' is not null or undefined
|
|
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`
|
|
24874
|
+
.replace(`{${"profileUuid"}}`, encodeURIComponent(String(profileUuid)))
|
|
24875
|
+
.replace(`{${"formUuid"}}`, encodeURIComponent(String(formUuid)));
|
|
24876
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
24877
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
24878
|
+
let baseOptions;
|
|
24879
|
+
if (configuration) {
|
|
24880
|
+
baseOptions = configuration.baseOptions;
|
|
24881
|
+
}
|
|
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
|
+
}),
|
|
24848
24935
|
/**
|
|
24849
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.
|
|
24850
24937
|
* @summary Delete form
|
|
@@ -24881,6 +24968,42 @@ export const ReachFormsApiAxiosParamCreator = function (configuration) {
|
|
|
24881
24968
|
options: localVarRequestOptions,
|
|
24882
24969
|
};
|
|
24883
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);
|
|
24994
|
+
const localVarHeaderParameter = {};
|
|
24995
|
+
const localVarQueryParameter = {};
|
|
24996
|
+
// authentication apiToken required
|
|
24997
|
+
// http bearer authentication required
|
|
24998
|
+
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
24999
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
25000
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
25001
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
25002
|
+
return {
|
|
25003
|
+
url: toPathString(localVarUrlObj),
|
|
25004
|
+
options: localVarRequestOptions,
|
|
25005
|
+
};
|
|
25006
|
+
}),
|
|
24884
25007
|
/**
|
|
24885
25008
|
* 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.
|
|
24886
25009
|
* @summary Get form details
|
|
@@ -24923,10 +25046,11 @@ export const ReachFormsApiAxiosParamCreator = function (configuration) {
|
|
|
24923
25046
|
* @param {string} profileUuid Profile uuid parameter
|
|
24924
25047
|
* @param {number} [page] Page number
|
|
24925
25048
|
* @param {number} [perPage] Number of items per page
|
|
25049
|
+
* @param {ListFormsV1StatusEnum} [status] Return only forms with this status.
|
|
24926
25050
|
* @param {*} [options] Override http request option.
|
|
24927
25051
|
* @throws {RequiredError}
|
|
24928
25052
|
*/
|
|
24929
|
-
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 = {}) {
|
|
24930
25054
|
// verify required parameter 'profileUuid' is not null or undefined
|
|
24931
25055
|
assertParamExists('listFormsV1', 'profileUuid', profileUuid);
|
|
24932
25056
|
const localVarPath = `/api/reach/v1/profiles/{profileUuid}/forms`
|
|
@@ -24949,9 +25073,135 @@ export const ReachFormsApiAxiosParamCreator = function (configuration) {
|
|
|
24949
25073
|
if (perPage !== undefined) {
|
|
24950
25074
|
localVarQueryParameter['per_page'] = perPage;
|
|
24951
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';
|
|
24952
25160
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
24953
25161
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
24954
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';
|
|
25201
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
25202
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
25203
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
25204
|
+
localVarRequestOptions.data = serializeDataIfNeeded(reachV1FormsUpdateRequest, localVarRequestOptions, configuration);
|
|
24955
25205
|
return {
|
|
24956
25206
|
url: toPathString(localVarUrlObj),
|
|
24957
25207
|
options: localVarRequestOptions,
|
|
@@ -24966,6 +25216,39 @@ export const ReachFormsApiAxiosParamCreator = function (configuration) {
|
|
|
24966
25216
|
export const ReachFormsApiFp = function (configuration) {
|
|
24967
25217
|
const localVarAxiosParamCreator = ReachFormsApiAxiosParamCreator(configuration);
|
|
24968
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
|
+
},
|
|
24969
25252
|
/**
|
|
24970
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.
|
|
24971
25254
|
* @summary Delete form
|
|
@@ -24982,6 +25265,22 @@ export const ReachFormsApiFp = function (configuration) {
|
|
|
24982
25265
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
24983
25266
|
});
|
|
24984
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
|
+
},
|
|
24985
25284
|
/**
|
|
24986
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.
|
|
24987
25286
|
* @summary Get form details
|
|
@@ -25004,17 +25303,69 @@ export const ReachFormsApiFp = function (configuration) {
|
|
|
25004
25303
|
* @param {string} profileUuid Profile uuid parameter
|
|
25005
25304
|
* @param {number} [page] Page number
|
|
25006
25305
|
* @param {number} [perPage] Number of items per page
|
|
25306
|
+
* @param {ListFormsV1StatusEnum} [status] Return only forms with this status.
|
|
25007
25307
|
* @param {*} [options] Override http request option.
|
|
25008
25308
|
* @throws {RequiredError}
|
|
25009
25309
|
*/
|
|
25010
|
-
listFormsV1(profileUuid, page, perPage, options) {
|
|
25310
|
+
listFormsV1(profileUuid, page, perPage, status, options) {
|
|
25011
25311
|
return __awaiter(this, void 0, void 0, function* () {
|
|
25012
25312
|
var _a, _b;
|
|
25013
|
-
const localVarAxiosArgs = yield localVarAxiosParamCreator.listFormsV1(profileUuid, page, perPage, options);
|
|
25313
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.listFormsV1(profileUuid, page, perPage, status, options);
|
|
25014
25314
|
const localVarOperationServerBasePath = (_b = (_a = operationServerMap['ReachFormsApi.listFormsV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
|
|
25015
25315
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
25016
25316
|
});
|
|
25017
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
|
+
},
|
|
25018
25369
|
};
|
|
25019
25370
|
};
|
|
25020
25371
|
/**
|
|
@@ -25024,6 +25375,29 @@ export const ReachFormsApiFp = function (configuration) {
|
|
|
25024
25375
|
export const ReachFormsApiFactory = function (configuration, basePath, axios) {
|
|
25025
25376
|
const localVarFp = ReachFormsApiFp(configuration);
|
|
25026
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
|
+
},
|
|
25027
25401
|
/**
|
|
25028
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.
|
|
25029
25403
|
* @summary Delete form
|
|
@@ -25035,6 +25409,17 @@ export const ReachFormsApiFactory = function (configuration, basePath, axios) {
|
|
|
25035
25409
|
deleteFormV1(profileUuid, formUuid, options) {
|
|
25036
25410
|
return localVarFp.deleteFormV1(profileUuid, formUuid, options).then((request) => request(axios, basePath));
|
|
25037
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
|
+
},
|
|
25038
25423
|
/**
|
|
25039
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.
|
|
25040
25425
|
* @summary Get form details
|
|
@@ -25052,11 +25437,48 @@ export const ReachFormsApiFactory = function (configuration, basePath, axios) {
|
|
|
25052
25437
|
* @param {string} profileUuid Profile uuid parameter
|
|
25053
25438
|
* @param {number} [page] Page number
|
|
25054
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
|
|
25055
25477
|
* @param {*} [options] Override http request option.
|
|
25056
25478
|
* @throws {RequiredError}
|
|
25057
25479
|
*/
|
|
25058
|
-
|
|
25059
|
-
return localVarFp.
|
|
25480
|
+
updateFormV1(profileUuid, formUuid, reachV1FormsUpdateRequest, options) {
|
|
25481
|
+
return localVarFp.updateFormV1(profileUuid, formUuid, reachV1FormsUpdateRequest, options).then((request) => request(axios, basePath));
|
|
25060
25482
|
},
|
|
25061
25483
|
};
|
|
25062
25484
|
};
|
|
@@ -25067,6 +25489,31 @@ export const ReachFormsApiFactory = function (configuration, basePath, axios) {
|
|
|
25067
25489
|
* @extends {BaseAPI}
|
|
25068
25490
|
*/
|
|
25069
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
|
+
}
|
|
25070
25517
|
/**
|
|
25071
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.
|
|
25072
25519
|
* @summary Delete form
|
|
@@ -25079,6 +25526,18 @@ export class ReachFormsApi extends BaseAPI {
|
|
|
25079
25526
|
deleteFormV1(profileUuid, formUuid, options) {
|
|
25080
25527
|
return ReachFormsApiFp(this.configuration).deleteFormV1(profileUuid, formUuid, options).then((request) => request(this.axios, this.basePath));
|
|
25081
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
|
+
}
|
|
25082
25541
|
/**
|
|
25083
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.
|
|
25084
25543
|
* @summary Get form details
|
|
@@ -25097,14 +25556,62 @@ export class ReachFormsApi extends BaseAPI {
|
|
|
25097
25556
|
* @param {string} profileUuid Profile uuid parameter
|
|
25098
25557
|
* @param {number} [page] Page number
|
|
25099
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
|
|
25100
25599
|
* @param {*} [options] Override http request option.
|
|
25101
25600
|
* @throws {RequiredError}
|
|
25102
25601
|
* @memberof ReachFormsApi
|
|
25103
25602
|
*/
|
|
25104
|
-
|
|
25105
|
-
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));
|
|
25106
25605
|
}
|
|
25107
25606
|
}
|
|
25607
|
+
/**
|
|
25608
|
+
* @export
|
|
25609
|
+
*/
|
|
25610
|
+
export const ListFormsV1StatusEnum = {
|
|
25611
|
+
Active: 'active',
|
|
25612
|
+
Paused: 'paused',
|
|
25613
|
+
Draft: 'draft'
|
|
25614
|
+
};
|
|
25108
25615
|
/**
|
|
25109
25616
|
* ReachProfilesApi - axios parameter creator
|
|
25110
25617
|
* @export
|