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/api.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
/**
|
|
4
4
|
* Hostinger API
|
|
5
5
|
*
|
|
6
|
-
* API Version: 2.1.
|
|
6
|
+
* API Version: 2.1.3
|
|
7
7
|
*
|
|
8
8
|
* NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
|
|
9
9
|
* If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
|
|
@@ -14670,6 +14670,19 @@ export interface ReachV1ContactsUpdateRequestFieldsInner {
|
|
|
14670
14670
|
*/
|
|
14671
14671
|
'selected_option_uuids': Array<string>;
|
|
14672
14672
|
}
|
|
14673
|
+
/**
|
|
14674
|
+
* Tags every future submitter of the form receives
|
|
14675
|
+
* @export
|
|
14676
|
+
* @interface ReachV1FormsAssignTagsRequest
|
|
14677
|
+
*/
|
|
14678
|
+
export interface ReachV1FormsAssignTagsRequest {
|
|
14679
|
+
/**
|
|
14680
|
+
*
|
|
14681
|
+
* @type {Array<string>}
|
|
14682
|
+
* @memberof ReachV1FormsAssignTagsRequest
|
|
14683
|
+
*/
|
|
14684
|
+
'tag_uuids': Array<string>;
|
|
14685
|
+
}
|
|
14673
14686
|
/**
|
|
14674
14687
|
*
|
|
14675
14688
|
* @export
|
|
@@ -14881,6 +14894,118 @@ export interface ReachV1FormsFormTemplateResource {
|
|
|
14881
14894
|
*/
|
|
14882
14895
|
'path': string | null;
|
|
14883
14896
|
}
|
|
14897
|
+
/**
|
|
14898
|
+
* The stored version of a saved form design.
|
|
14899
|
+
* @export
|
|
14900
|
+
* @interface ReachV1FormsFormTemplateVersionResource
|
|
14901
|
+
*/
|
|
14902
|
+
export interface ReachV1FormsFormTemplateVersionResource {
|
|
14903
|
+
/**
|
|
14904
|
+
*
|
|
14905
|
+
* @type {string}
|
|
14906
|
+
* @memberof ReachV1FormsFormTemplateVersionResource
|
|
14907
|
+
*/
|
|
14908
|
+
'uuid': string;
|
|
14909
|
+
/**
|
|
14910
|
+
* Storage path of the template HTML, relative to the storage directory of this profile.
|
|
14911
|
+
* @type {string}
|
|
14912
|
+
* @memberof ReachV1FormsFormTemplateVersionResource
|
|
14913
|
+
*/
|
|
14914
|
+
'path': string;
|
|
14915
|
+
/**
|
|
14916
|
+
* Whether the design was saved by hand or by the AI builder.
|
|
14917
|
+
* @type {string}
|
|
14918
|
+
* @memberof ReachV1FormsFormTemplateVersionResource
|
|
14919
|
+
*/
|
|
14920
|
+
'edit_type': ReachV1FormsFormTemplateVersionResourceEditTypeEnum | null;
|
|
14921
|
+
/**
|
|
14922
|
+
*
|
|
14923
|
+
* @type {string}
|
|
14924
|
+
* @memberof ReachV1FormsFormTemplateVersionResource
|
|
14925
|
+
*/
|
|
14926
|
+
'created_at': string;
|
|
14927
|
+
/**
|
|
14928
|
+
*
|
|
14929
|
+
* @type {string}
|
|
14930
|
+
* @memberof ReachV1FormsFormTemplateVersionResource
|
|
14931
|
+
*/
|
|
14932
|
+
'updated_at': string;
|
|
14933
|
+
}
|
|
14934
|
+
|
|
14935
|
+
export const ReachV1FormsFormTemplateVersionResourceEditTypeEnum = {
|
|
14936
|
+
Manual: 'manual',
|
|
14937
|
+
Ai: 'ai'
|
|
14938
|
+
} as const;
|
|
14939
|
+
|
|
14940
|
+
export type ReachV1FormsFormTemplateVersionResourceEditTypeEnum = typeof ReachV1FormsFormTemplateVersionResourceEditTypeEnum[keyof typeof ReachV1FormsFormTemplateVersionResourceEditTypeEnum];
|
|
14941
|
+
|
|
14942
|
+
/**
|
|
14943
|
+
* Tag the form stops applying to future submitters
|
|
14944
|
+
* @export
|
|
14945
|
+
* @interface ReachV1FormsRemoveTagRequest
|
|
14946
|
+
*/
|
|
14947
|
+
export interface ReachV1FormsRemoveTagRequest {
|
|
14948
|
+
/**
|
|
14949
|
+
*
|
|
14950
|
+
* @type {string}
|
|
14951
|
+
* @memberof ReachV1FormsRemoveTagRequest
|
|
14952
|
+
*/
|
|
14953
|
+
'tag_uuid': string;
|
|
14954
|
+
}
|
|
14955
|
+
/**
|
|
14956
|
+
* Create a draft form
|
|
14957
|
+
* @export
|
|
14958
|
+
* @interface ReachV1FormsStoreRequest
|
|
14959
|
+
*/
|
|
14960
|
+
export interface ReachV1FormsStoreRequest {
|
|
14961
|
+
/**
|
|
14962
|
+
* Form name. Letters, digits, spaces and - . \' _ only.
|
|
14963
|
+
* @type {string}
|
|
14964
|
+
* @memberof ReachV1FormsStoreRequest
|
|
14965
|
+
*/
|
|
14966
|
+
'name': string;
|
|
14967
|
+
}
|
|
14968
|
+
/**
|
|
14969
|
+
* Rename a form and/or change its status. Send at least one field.
|
|
14970
|
+
* @export
|
|
14971
|
+
* @interface ReachV1FormsUpdateRequest
|
|
14972
|
+
*/
|
|
14973
|
+
export interface ReachV1FormsUpdateRequest {
|
|
14974
|
+
/**
|
|
14975
|
+
* Form name. Letters, digits, spaces and - . \' _ only.
|
|
14976
|
+
* @type {string}
|
|
14977
|
+
* @memberof ReachV1FormsUpdateRequest
|
|
14978
|
+
*/
|
|
14979
|
+
'name': string;
|
|
14980
|
+
/**
|
|
14981
|
+
* `active` takes the form live, `paused` and `draft` stop it accepting submissions.
|
|
14982
|
+
* @type {string}
|
|
14983
|
+
* @memberof ReachV1FormsUpdateRequest
|
|
14984
|
+
*/
|
|
14985
|
+
'status': ReachV1FormsUpdateRequestStatusEnum;
|
|
14986
|
+
}
|
|
14987
|
+
|
|
14988
|
+
export const ReachV1FormsUpdateRequestStatusEnum = {
|
|
14989
|
+
Active: 'active',
|
|
14990
|
+
Paused: 'paused',
|
|
14991
|
+
Draft: 'draft'
|
|
14992
|
+
} as const;
|
|
14993
|
+
|
|
14994
|
+
export type ReachV1FormsUpdateRequestStatusEnum = typeof ReachV1FormsUpdateRequestStatusEnum[keyof typeof ReachV1FormsUpdateRequestStatusEnum];
|
|
14995
|
+
|
|
14996
|
+
/**
|
|
14997
|
+
* Save the design of a form
|
|
14998
|
+
* @export
|
|
14999
|
+
* @interface ReachV1FormsUpdateTemplateRequest
|
|
15000
|
+
*/
|
|
15001
|
+
export interface ReachV1FormsUpdateTemplateRequest {
|
|
15002
|
+
/**
|
|
15003
|
+
* HTML of the form design. After sanitizing it must still contain a form container (`data-reach-form`), an email input (`data-reach-field=\"email\"`) and a submit button (`data-reach-submit`).
|
|
15004
|
+
* @type {string}
|
|
15005
|
+
* @memberof ReachV1FormsUpdateTemplateRequest
|
|
15006
|
+
*/
|
|
15007
|
+
'content': string;
|
|
15008
|
+
}
|
|
14884
15009
|
/**
|
|
14885
15010
|
* Sending domain to connect to the profile
|
|
14886
15011
|
* @export
|
|
@@ -43952,6 +44077,98 @@ export type ListProfileContactsV1SubscriptionStatusEnum = typeof ListProfileCont
|
|
|
43952
44077
|
*/
|
|
43953
44078
|
export const ReachFormsApiAxiosParamCreator = function (configuration?: Configuration) {
|
|
43954
44079
|
return {
|
|
44080
|
+
/**
|
|
44081
|
+
* Add tags to a form so that every contact who submits it from now on receives them. A tag the form already has is skipped; an unknown tag is rejected. Contacts who submitted earlier are not tagged.
|
|
44082
|
+
* @summary Add form submitter tags
|
|
44083
|
+
* @param {string} profileUuid Profile uuid parameter
|
|
44084
|
+
* @param {string} formUuid Form uuid parameter
|
|
44085
|
+
* @param {ReachV1FormsAssignTagsRequest} reachV1FormsAssignTagsRequest
|
|
44086
|
+
* @param {*} [options] Override http request option.
|
|
44087
|
+
* @throws {RequiredError}
|
|
44088
|
+
*/
|
|
44089
|
+
addFormSubmitterTagsV1: async (profileUuid: string, formUuid: string, reachV1FormsAssignTagsRequest: ReachV1FormsAssignTagsRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
44090
|
+
// verify required parameter 'profileUuid' is not null or undefined
|
|
44091
|
+
assertParamExists('addFormSubmitterTagsV1', 'profileUuid', profileUuid)
|
|
44092
|
+
// verify required parameter 'formUuid' is not null or undefined
|
|
44093
|
+
assertParamExists('addFormSubmitterTagsV1', 'formUuid', formUuid)
|
|
44094
|
+
// verify required parameter 'reachV1FormsAssignTagsRequest' is not null or undefined
|
|
44095
|
+
assertParamExists('addFormSubmitterTagsV1', 'reachV1FormsAssignTagsRequest', reachV1FormsAssignTagsRequest)
|
|
44096
|
+
const localVarPath = `/api/reach/v1/profiles/{profileUuid}/forms/{formUuid}/tags`
|
|
44097
|
+
.replace(`{${"profileUuid"}}`, encodeURIComponent(String(profileUuid)))
|
|
44098
|
+
.replace(`{${"formUuid"}}`, encodeURIComponent(String(formUuid)));
|
|
44099
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
44100
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
44101
|
+
let baseOptions;
|
|
44102
|
+
if (configuration) {
|
|
44103
|
+
baseOptions = configuration.baseOptions;
|
|
44104
|
+
}
|
|
44105
|
+
|
|
44106
|
+
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
|
|
44107
|
+
const localVarHeaderParameter = {} as any;
|
|
44108
|
+
const localVarQueryParameter = {} as any;
|
|
44109
|
+
|
|
44110
|
+
// authentication apiToken required
|
|
44111
|
+
// http bearer authentication required
|
|
44112
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
44113
|
+
|
|
44114
|
+
|
|
44115
|
+
|
|
44116
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
44117
|
+
|
|
44118
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
44119
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
44120
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
44121
|
+
localVarRequestOptions.data = serializeDataIfNeeded(reachV1FormsAssignTagsRequest, localVarRequestOptions, configuration)
|
|
44122
|
+
|
|
44123
|
+
return {
|
|
44124
|
+
url: toPathString(localVarUrlObj),
|
|
44125
|
+
options: localVarRequestOptions,
|
|
44126
|
+
};
|
|
44127
|
+
},
|
|
44128
|
+
/**
|
|
44129
|
+
* Create an empty draft form. Reach also adds an automatic `form:{name}` tag that every submitter receives. A draft has no design and is not reachable by visitors: save a design with the update form template operation, then take the form live by setting its status to `active`. Creating a form does not consume AI credits.
|
|
44130
|
+
* @summary Create form
|
|
44131
|
+
* @param {string} profileUuid Profile uuid parameter
|
|
44132
|
+
* @param {ReachV1FormsStoreRequest} reachV1FormsStoreRequest
|
|
44133
|
+
* @param {*} [options] Override http request option.
|
|
44134
|
+
* @throws {RequiredError}
|
|
44135
|
+
*/
|
|
44136
|
+
createFormV1: async (profileUuid: string, reachV1FormsStoreRequest: ReachV1FormsStoreRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
44137
|
+
// verify required parameter 'profileUuid' is not null or undefined
|
|
44138
|
+
assertParamExists('createFormV1', 'profileUuid', profileUuid)
|
|
44139
|
+
// verify required parameter 'reachV1FormsStoreRequest' is not null or undefined
|
|
44140
|
+
assertParamExists('createFormV1', 'reachV1FormsStoreRequest', reachV1FormsStoreRequest)
|
|
44141
|
+
const localVarPath = `/api/reach/v1/profiles/{profileUuid}/forms`
|
|
44142
|
+
.replace(`{${"profileUuid"}}`, encodeURIComponent(String(profileUuid)));
|
|
44143
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
44144
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
44145
|
+
let baseOptions;
|
|
44146
|
+
if (configuration) {
|
|
44147
|
+
baseOptions = configuration.baseOptions;
|
|
44148
|
+
}
|
|
44149
|
+
|
|
44150
|
+
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
|
|
44151
|
+
const localVarHeaderParameter = {} as any;
|
|
44152
|
+
const localVarQueryParameter = {} as any;
|
|
44153
|
+
|
|
44154
|
+
// authentication apiToken required
|
|
44155
|
+
// http bearer authentication required
|
|
44156
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
44157
|
+
|
|
44158
|
+
|
|
44159
|
+
|
|
44160
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
44161
|
+
|
|
44162
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
44163
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
44164
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
44165
|
+
localVarRequestOptions.data = serializeDataIfNeeded(reachV1FormsStoreRequest, localVarRequestOptions, configuration)
|
|
44166
|
+
|
|
44167
|
+
return {
|
|
44168
|
+
url: toPathString(localVarUrlObj),
|
|
44169
|
+
options: localVarRequestOptions,
|
|
44170
|
+
};
|
|
44171
|
+
},
|
|
43955
44172
|
/**
|
|
43956
44173
|
* Permanently delete a form together with its template. A form that has already captured submissions cannot be deleted, so that the contacts it collected are never silently discarded - pause the form instead to stop it collecting new ones. Views alone do not block deletion.
|
|
43957
44174
|
* @summary Delete form
|
|
@@ -43985,6 +44202,48 @@ export const ReachFormsApiAxiosParamCreator = function (configuration?: Configur
|
|
|
43985
44202
|
|
|
43986
44203
|
|
|
43987
44204
|
|
|
44205
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
44206
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
44207
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
44208
|
+
|
|
44209
|
+
return {
|
|
44210
|
+
url: toPathString(localVarUrlObj),
|
|
44211
|
+
options: localVarRequestOptions,
|
|
44212
|
+
};
|
|
44213
|
+
},
|
|
44214
|
+
/**
|
|
44215
|
+
* Copy a form into a new draft form with the same name and design. The copy shares the source\'s automatic `form:{name}` tag; other submitter tags are not copied. The copy is not live until its status is set to `active`.
|
|
44216
|
+
* @summary Duplicate form
|
|
44217
|
+
* @param {string} profileUuid Profile uuid parameter
|
|
44218
|
+
* @param {string} formUuid Form uuid parameter
|
|
44219
|
+
* @param {*} [options] Override http request option.
|
|
44220
|
+
* @throws {RequiredError}
|
|
44221
|
+
*/
|
|
44222
|
+
duplicateFormV1: async (profileUuid: string, formUuid: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
44223
|
+
// verify required parameter 'profileUuid' is not null or undefined
|
|
44224
|
+
assertParamExists('duplicateFormV1', 'profileUuid', profileUuid)
|
|
44225
|
+
// verify required parameter 'formUuid' is not null or undefined
|
|
44226
|
+
assertParamExists('duplicateFormV1', 'formUuid', formUuid)
|
|
44227
|
+
const localVarPath = `/api/reach/v1/profiles/{profileUuid}/forms/{formUuid}/duplicate`
|
|
44228
|
+
.replace(`{${"profileUuid"}}`, encodeURIComponent(String(profileUuid)))
|
|
44229
|
+
.replace(`{${"formUuid"}}`, encodeURIComponent(String(formUuid)));
|
|
44230
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
44231
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
44232
|
+
let baseOptions;
|
|
44233
|
+
if (configuration) {
|
|
44234
|
+
baseOptions = configuration.baseOptions;
|
|
44235
|
+
}
|
|
44236
|
+
|
|
44237
|
+
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
|
|
44238
|
+
const localVarHeaderParameter = {} as any;
|
|
44239
|
+
const localVarQueryParameter = {} as any;
|
|
44240
|
+
|
|
44241
|
+
// authentication apiToken required
|
|
44242
|
+
// http bearer authentication required
|
|
44243
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
44244
|
+
|
|
44245
|
+
|
|
44246
|
+
|
|
43988
44247
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
43989
44248
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
43990
44249
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
@@ -44042,10 +44301,11 @@ export const ReachFormsApiAxiosParamCreator = function (configuration?: Configur
|
|
|
44042
44301
|
* @param {string} profileUuid Profile uuid parameter
|
|
44043
44302
|
* @param {number} [page] Page number
|
|
44044
44303
|
* @param {number} [perPage] Number of items per page
|
|
44304
|
+
* @param {ListFormsV1StatusEnum} [status] Return only forms with this status.
|
|
44045
44305
|
* @param {*} [options] Override http request option.
|
|
44046
44306
|
* @throws {RequiredError}
|
|
44047
44307
|
*/
|
|
44048
|
-
listFormsV1: async (profileUuid: string, page?: number, perPage?: number, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
44308
|
+
listFormsV1: async (profileUuid: string, page?: number, perPage?: number, status?: ListFormsV1StatusEnum, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
44049
44309
|
// verify required parameter 'profileUuid' is not null or undefined
|
|
44050
44310
|
assertParamExists('listFormsV1', 'profileUuid', profileUuid)
|
|
44051
44311
|
const localVarPath = `/api/reach/v1/profiles/{profileUuid}/forms`
|
|
@@ -44073,12 +44333,160 @@ export const ReachFormsApiAxiosParamCreator = function (configuration?: Configur
|
|
|
44073
44333
|
localVarQueryParameter['per_page'] = perPage;
|
|
44074
44334
|
}
|
|
44075
44335
|
|
|
44336
|
+
if (status !== undefined) {
|
|
44337
|
+
localVarQueryParameter['status'] = status;
|
|
44338
|
+
}
|
|
44339
|
+
|
|
44076
44340
|
|
|
44077
44341
|
|
|
44078
44342
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
44079
44343
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
44080
44344
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
44081
44345
|
|
|
44346
|
+
return {
|
|
44347
|
+
url: toPathString(localVarUrlObj),
|
|
44348
|
+
options: localVarRequestOptions,
|
|
44349
|
+
};
|
|
44350
|
+
},
|
|
44351
|
+
/**
|
|
44352
|
+
* Stop a form from applying a tag to its future submitters. Succeeds also when the form did not have the tag. Contacts who already received the tag keep it, and the tag itself is not deleted. The automatic `form:{name}` tag cannot be removed and is rejected with a conflict.
|
|
44353
|
+
* @summary Remove form submitter tag
|
|
44354
|
+
* @param {string} profileUuid Profile uuid parameter
|
|
44355
|
+
* @param {string} formUuid Form uuid parameter
|
|
44356
|
+
* @param {ReachV1FormsRemoveTagRequest} reachV1FormsRemoveTagRequest
|
|
44357
|
+
* @param {*} [options] Override http request option.
|
|
44358
|
+
* @throws {RequiredError}
|
|
44359
|
+
*/
|
|
44360
|
+
removeFormSubmitterTagV1: async (profileUuid: string, formUuid: string, reachV1FormsRemoveTagRequest: ReachV1FormsRemoveTagRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
44361
|
+
// verify required parameter 'profileUuid' is not null or undefined
|
|
44362
|
+
assertParamExists('removeFormSubmitterTagV1', 'profileUuid', profileUuid)
|
|
44363
|
+
// verify required parameter 'formUuid' is not null or undefined
|
|
44364
|
+
assertParamExists('removeFormSubmitterTagV1', 'formUuid', formUuid)
|
|
44365
|
+
// verify required parameter 'reachV1FormsRemoveTagRequest' is not null or undefined
|
|
44366
|
+
assertParamExists('removeFormSubmitterTagV1', 'reachV1FormsRemoveTagRequest', reachV1FormsRemoveTagRequest)
|
|
44367
|
+
const localVarPath = `/api/reach/v1/profiles/{profileUuid}/forms/{formUuid}/tags`
|
|
44368
|
+
.replace(`{${"profileUuid"}}`, encodeURIComponent(String(profileUuid)))
|
|
44369
|
+
.replace(`{${"formUuid"}}`, encodeURIComponent(String(formUuid)));
|
|
44370
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
44371
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
44372
|
+
let baseOptions;
|
|
44373
|
+
if (configuration) {
|
|
44374
|
+
baseOptions = configuration.baseOptions;
|
|
44375
|
+
}
|
|
44376
|
+
|
|
44377
|
+
const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options};
|
|
44378
|
+
const localVarHeaderParameter = {} as any;
|
|
44379
|
+
const localVarQueryParameter = {} as any;
|
|
44380
|
+
|
|
44381
|
+
// authentication apiToken required
|
|
44382
|
+
// http bearer authentication required
|
|
44383
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
44384
|
+
|
|
44385
|
+
|
|
44386
|
+
|
|
44387
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
44388
|
+
|
|
44389
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
44390
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
44391
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
44392
|
+
localVarRequestOptions.data = serializeDataIfNeeded(reachV1FormsRemoveTagRequest, localVarRequestOptions, configuration)
|
|
44393
|
+
|
|
44394
|
+
return {
|
|
44395
|
+
url: toPathString(localVarUrlObj),
|
|
44396
|
+
options: localVarRequestOptions,
|
|
44397
|
+
};
|
|
44398
|
+
},
|
|
44399
|
+
/**
|
|
44400
|
+
* Save `content` as the latest design of a form and return the stored version. The HTML is sanitized and, unless the plan allows removing it, the Reach signature is added. Visitors submit the form with an `email` field (required) and optional `name`, `surname` and `phone`. After sanitizing, the design must contain a form container (`data-reach-form`), an email input (`data-reach-field=\"email\"`) and a submit button (`data-reach-submit`); otherwise the request fails with `422` and `errors.content` lists `missing_form_container`, `missing_email_field` and/or `missing_submit_button`. A `draft` or `paused` form stays unreachable until its status is set to `active`, which publishes this design. On a form that is already `active` the saved design is not public until the form is paused and set to `active` again. Saving a design does not consume AI credits.
|
|
44401
|
+
* @summary Update form template
|
|
44402
|
+
* @param {string} profileUuid Profile uuid parameter
|
|
44403
|
+
* @param {string} formUuid Form uuid parameter
|
|
44404
|
+
* @param {ReachV1FormsUpdateTemplateRequest} reachV1FormsUpdateTemplateRequest
|
|
44405
|
+
* @param {*} [options] Override http request option.
|
|
44406
|
+
* @throws {RequiredError}
|
|
44407
|
+
*/
|
|
44408
|
+
updateFormTemplateV1: async (profileUuid: string, formUuid: string, reachV1FormsUpdateTemplateRequest: ReachV1FormsUpdateTemplateRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
44409
|
+
// verify required parameter 'profileUuid' is not null or undefined
|
|
44410
|
+
assertParamExists('updateFormTemplateV1', 'profileUuid', profileUuid)
|
|
44411
|
+
// verify required parameter 'formUuid' is not null or undefined
|
|
44412
|
+
assertParamExists('updateFormTemplateV1', 'formUuid', formUuid)
|
|
44413
|
+
// verify required parameter 'reachV1FormsUpdateTemplateRequest' is not null or undefined
|
|
44414
|
+
assertParamExists('updateFormTemplateV1', 'reachV1FormsUpdateTemplateRequest', reachV1FormsUpdateTemplateRequest)
|
|
44415
|
+
const localVarPath = `/api/reach/v1/profiles/{profileUuid}/forms/{formUuid}/template`
|
|
44416
|
+
.replace(`{${"profileUuid"}}`, encodeURIComponent(String(profileUuid)))
|
|
44417
|
+
.replace(`{${"formUuid"}}`, encodeURIComponent(String(formUuid)));
|
|
44418
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
44419
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
44420
|
+
let baseOptions;
|
|
44421
|
+
if (configuration) {
|
|
44422
|
+
baseOptions = configuration.baseOptions;
|
|
44423
|
+
}
|
|
44424
|
+
|
|
44425
|
+
const localVarRequestOptions = { method: 'PATCH', ...baseOptions, ...options};
|
|
44426
|
+
const localVarHeaderParameter = {} as any;
|
|
44427
|
+
const localVarQueryParameter = {} as any;
|
|
44428
|
+
|
|
44429
|
+
// authentication apiToken required
|
|
44430
|
+
// http bearer authentication required
|
|
44431
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
44432
|
+
|
|
44433
|
+
|
|
44434
|
+
|
|
44435
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
44436
|
+
|
|
44437
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
44438
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
44439
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
44440
|
+
localVarRequestOptions.data = serializeDataIfNeeded(reachV1FormsUpdateTemplateRequest, localVarRequestOptions, configuration)
|
|
44441
|
+
|
|
44442
|
+
return {
|
|
44443
|
+
url: toPathString(localVarUrlObj),
|
|
44444
|
+
options: localVarRequestOptions,
|
|
44445
|
+
};
|
|
44446
|
+
},
|
|
44447
|
+
/**
|
|
44448
|
+
* Rename a form and/or change its status. Setting a `draft` or `paused` form to `active` takes it live: its latest saved design is published and visitors can submit it. `paused` and `draft` stop the form from accepting submissions. A form is not reachable by visitors until it is taken live. Design changes saved while the form is already `active` stay unpublished until the form is paused and set to `active` again. Renaming does not rename the automatic `form:{name}` tag.
|
|
44449
|
+
* @summary Update form
|
|
44450
|
+
* @param {string} profileUuid Profile uuid parameter
|
|
44451
|
+
* @param {string} formUuid Form uuid parameter
|
|
44452
|
+
* @param {ReachV1FormsUpdateRequest} reachV1FormsUpdateRequest
|
|
44453
|
+
* @param {*} [options] Override http request option.
|
|
44454
|
+
* @throws {RequiredError}
|
|
44455
|
+
*/
|
|
44456
|
+
updateFormV1: async (profileUuid: string, formUuid: string, reachV1FormsUpdateRequest: ReachV1FormsUpdateRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
44457
|
+
// verify required parameter 'profileUuid' is not null or undefined
|
|
44458
|
+
assertParamExists('updateFormV1', 'profileUuid', profileUuid)
|
|
44459
|
+
// verify required parameter 'formUuid' is not null or undefined
|
|
44460
|
+
assertParamExists('updateFormV1', 'formUuid', formUuid)
|
|
44461
|
+
// verify required parameter 'reachV1FormsUpdateRequest' is not null or undefined
|
|
44462
|
+
assertParamExists('updateFormV1', 'reachV1FormsUpdateRequest', reachV1FormsUpdateRequest)
|
|
44463
|
+
const localVarPath = `/api/reach/v1/profiles/{profileUuid}/forms/{formUuid}`
|
|
44464
|
+
.replace(`{${"profileUuid"}}`, encodeURIComponent(String(profileUuid)))
|
|
44465
|
+
.replace(`{${"formUuid"}}`, encodeURIComponent(String(formUuid)));
|
|
44466
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
44467
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
44468
|
+
let baseOptions;
|
|
44469
|
+
if (configuration) {
|
|
44470
|
+
baseOptions = configuration.baseOptions;
|
|
44471
|
+
}
|
|
44472
|
+
|
|
44473
|
+
const localVarRequestOptions = { method: 'PATCH', ...baseOptions, ...options};
|
|
44474
|
+
const localVarHeaderParameter = {} as any;
|
|
44475
|
+
const localVarQueryParameter = {} as any;
|
|
44476
|
+
|
|
44477
|
+
// authentication apiToken required
|
|
44478
|
+
// http bearer authentication required
|
|
44479
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
44480
|
+
|
|
44481
|
+
|
|
44482
|
+
|
|
44483
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
44484
|
+
|
|
44485
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
44486
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
44487
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
44488
|
+
localVarRequestOptions.data = serializeDataIfNeeded(reachV1FormsUpdateRequest, localVarRequestOptions, configuration)
|
|
44489
|
+
|
|
44082
44490
|
return {
|
|
44083
44491
|
url: toPathString(localVarUrlObj),
|
|
44084
44492
|
options: localVarRequestOptions,
|
|
@@ -44094,6 +44502,33 @@ export const ReachFormsApiAxiosParamCreator = function (configuration?: Configur
|
|
|
44094
44502
|
export const ReachFormsApiFp = function(configuration?: Configuration) {
|
|
44095
44503
|
const localVarAxiosParamCreator = ReachFormsApiAxiosParamCreator(configuration)
|
|
44096
44504
|
return {
|
|
44505
|
+
/**
|
|
44506
|
+
* Add tags to a form so that every contact who submits it from now on receives them. A tag the form already has is skipped; an unknown tag is rejected. Contacts who submitted earlier are not tagged.
|
|
44507
|
+
* @summary Add form submitter tags
|
|
44508
|
+
* @param {string} profileUuid Profile uuid parameter
|
|
44509
|
+
* @param {string} formUuid Form uuid parameter
|
|
44510
|
+
* @param {ReachV1FormsAssignTagsRequest} reachV1FormsAssignTagsRequest
|
|
44511
|
+
* @param {*} [options] Override http request option.
|
|
44512
|
+
* @throws {RequiredError}
|
|
44513
|
+
*/
|
|
44514
|
+
async addFormSubmitterTagsV1(profileUuid: string, formUuid: string, reachV1FormsAssignTagsRequest: ReachV1FormsAssignTagsRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CommonSuccessEmptyResource>> {
|
|
44515
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.addFormSubmitterTagsV1(profileUuid, formUuid, reachV1FormsAssignTagsRequest, options);
|
|
44516
|
+
const localVarOperationServerBasePath = operationServerMap['ReachFormsApi.addFormSubmitterTagsV1']?.[0]?.url;
|
|
44517
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
44518
|
+
},
|
|
44519
|
+
/**
|
|
44520
|
+
* Create an empty draft form. Reach also adds an automatic `form:{name}` tag that every submitter receives. A draft has no design and is not reachable by visitors: save a design with the update form template operation, then take the form live by setting its status to `active`. Creating a form does not consume AI credits.
|
|
44521
|
+
* @summary Create form
|
|
44522
|
+
* @param {string} profileUuid Profile uuid parameter
|
|
44523
|
+
* @param {ReachV1FormsStoreRequest} reachV1FormsStoreRequest
|
|
44524
|
+
* @param {*} [options] Override http request option.
|
|
44525
|
+
* @throws {RequiredError}
|
|
44526
|
+
*/
|
|
44527
|
+
async createFormV1(profileUuid: string, reachV1FormsStoreRequest: ReachV1FormsStoreRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ReachV1FormsFormResource>> {
|
|
44528
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.createFormV1(profileUuid, reachV1FormsStoreRequest, options);
|
|
44529
|
+
const localVarOperationServerBasePath = operationServerMap['ReachFormsApi.createFormV1']?.[0]?.url;
|
|
44530
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
44531
|
+
},
|
|
44097
44532
|
/**
|
|
44098
44533
|
* Permanently delete a form together with its template. A form that has already captured submissions cannot be deleted, so that the contacts it collected are never silently discarded - pause the form instead to stop it collecting new ones. Views alone do not block deletion.
|
|
44099
44534
|
* @summary Delete form
|
|
@@ -44107,6 +44542,19 @@ export const ReachFormsApiFp = function(configuration?: Configuration) {
|
|
|
44107
44542
|
const localVarOperationServerBasePath = operationServerMap['ReachFormsApi.deleteFormV1']?.[0]?.url;
|
|
44108
44543
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
44109
44544
|
},
|
|
44545
|
+
/**
|
|
44546
|
+
* Copy a form into a new draft form with the same name and design. The copy shares the source\'s automatic `form:{name}` tag; other submitter tags are not copied. The copy is not live until its status is set to `active`.
|
|
44547
|
+
* @summary Duplicate form
|
|
44548
|
+
* @param {string} profileUuid Profile uuid parameter
|
|
44549
|
+
* @param {string} formUuid Form uuid parameter
|
|
44550
|
+
* @param {*} [options] Override http request option.
|
|
44551
|
+
* @throws {RequiredError}
|
|
44552
|
+
*/
|
|
44553
|
+
async duplicateFormV1(profileUuid: string, formUuid: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ReachV1FormsFormResource>> {
|
|
44554
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.duplicateFormV1(profileUuid, formUuid, options);
|
|
44555
|
+
const localVarOperationServerBasePath = operationServerMap['ReachFormsApi.duplicateFormV1']?.[0]?.url;
|
|
44556
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
44557
|
+
},
|
|
44110
44558
|
/**
|
|
44111
44559
|
* Get a single form with the URL of its hosted template and the tags it applies to the contacts it captures. There is no ready-made embed snippet in the response - either serve the template HTML yourself or build your own embed around the form uuid.
|
|
44112
44560
|
* @summary Get form details
|
|
@@ -44126,14 +44574,57 @@ export const ReachFormsApiFp = function(configuration?: Configuration) {
|
|
|
44126
44574
|
* @param {string} profileUuid Profile uuid parameter
|
|
44127
44575
|
* @param {number} [page] Page number
|
|
44128
44576
|
* @param {number} [perPage] Number of items per page
|
|
44577
|
+
* @param {ListFormsV1StatusEnum} [status] Return only forms with this status.
|
|
44129
44578
|
* @param {*} [options] Override http request option.
|
|
44130
44579
|
* @throws {RequiredError}
|
|
44131
44580
|
*/
|
|
44132
|
-
async listFormsV1(profileUuid: string, page?: number, perPage?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ReachListFormsV1200Response>> {
|
|
44133
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.listFormsV1(profileUuid, page, perPage, options);
|
|
44581
|
+
async listFormsV1(profileUuid: string, page?: number, perPage?: number, status?: ListFormsV1StatusEnum, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ReachListFormsV1200Response>> {
|
|
44582
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.listFormsV1(profileUuid, page, perPage, status, options);
|
|
44134
44583
|
const localVarOperationServerBasePath = operationServerMap['ReachFormsApi.listFormsV1']?.[0]?.url;
|
|
44135
44584
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
44136
44585
|
},
|
|
44586
|
+
/**
|
|
44587
|
+
* Stop a form from applying a tag to its future submitters. Succeeds also when the form did not have the tag. Contacts who already received the tag keep it, and the tag itself is not deleted. The automatic `form:{name}` tag cannot be removed and is rejected with a conflict.
|
|
44588
|
+
* @summary Remove form submitter tag
|
|
44589
|
+
* @param {string} profileUuid Profile uuid parameter
|
|
44590
|
+
* @param {string} formUuid Form uuid parameter
|
|
44591
|
+
* @param {ReachV1FormsRemoveTagRequest} reachV1FormsRemoveTagRequest
|
|
44592
|
+
* @param {*} [options] Override http request option.
|
|
44593
|
+
* @throws {RequiredError}
|
|
44594
|
+
*/
|
|
44595
|
+
async removeFormSubmitterTagV1(profileUuid: string, formUuid: string, reachV1FormsRemoveTagRequest: ReachV1FormsRemoveTagRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CommonSuccessEmptyResource>> {
|
|
44596
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.removeFormSubmitterTagV1(profileUuid, formUuid, reachV1FormsRemoveTagRequest, options);
|
|
44597
|
+
const localVarOperationServerBasePath = operationServerMap['ReachFormsApi.removeFormSubmitterTagV1']?.[0]?.url;
|
|
44598
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
44599
|
+
},
|
|
44600
|
+
/**
|
|
44601
|
+
* Save `content` as the latest design of a form and return the stored version. The HTML is sanitized and, unless the plan allows removing it, the Reach signature is added. Visitors submit the form with an `email` field (required) and optional `name`, `surname` and `phone`. After sanitizing, the design must contain a form container (`data-reach-form`), an email input (`data-reach-field=\"email\"`) and a submit button (`data-reach-submit`); otherwise the request fails with `422` and `errors.content` lists `missing_form_container`, `missing_email_field` and/or `missing_submit_button`. A `draft` or `paused` form stays unreachable until its status is set to `active`, which publishes this design. On a form that is already `active` the saved design is not public until the form is paused and set to `active` again. Saving a design does not consume AI credits.
|
|
44602
|
+
* @summary Update form template
|
|
44603
|
+
* @param {string} profileUuid Profile uuid parameter
|
|
44604
|
+
* @param {string} formUuid Form uuid parameter
|
|
44605
|
+
* @param {ReachV1FormsUpdateTemplateRequest} reachV1FormsUpdateTemplateRequest
|
|
44606
|
+
* @param {*} [options] Override http request option.
|
|
44607
|
+
* @throws {RequiredError}
|
|
44608
|
+
*/
|
|
44609
|
+
async updateFormTemplateV1(profileUuid: string, formUuid: string, reachV1FormsUpdateTemplateRequest: ReachV1FormsUpdateTemplateRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ReachV1FormsFormTemplateVersionResource>> {
|
|
44610
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.updateFormTemplateV1(profileUuid, formUuid, reachV1FormsUpdateTemplateRequest, options);
|
|
44611
|
+
const localVarOperationServerBasePath = operationServerMap['ReachFormsApi.updateFormTemplateV1']?.[0]?.url;
|
|
44612
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
44613
|
+
},
|
|
44614
|
+
/**
|
|
44615
|
+
* Rename a form and/or change its status. Setting a `draft` or `paused` form to `active` takes it live: its latest saved design is published and visitors can submit it. `paused` and `draft` stop the form from accepting submissions. A form is not reachable by visitors until it is taken live. Design changes saved while the form is already `active` stay unpublished until the form is paused and set to `active` again. Renaming does not rename the automatic `form:{name}` tag.
|
|
44616
|
+
* @summary Update form
|
|
44617
|
+
* @param {string} profileUuid Profile uuid parameter
|
|
44618
|
+
* @param {string} formUuid Form uuid parameter
|
|
44619
|
+
* @param {ReachV1FormsUpdateRequest} reachV1FormsUpdateRequest
|
|
44620
|
+
* @param {*} [options] Override http request option.
|
|
44621
|
+
* @throws {RequiredError}
|
|
44622
|
+
*/
|
|
44623
|
+
async updateFormV1(profileUuid: string, formUuid: string, reachV1FormsUpdateRequest: ReachV1FormsUpdateRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ReachV1FormsFormResource>> {
|
|
44624
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.updateFormV1(profileUuid, formUuid, reachV1FormsUpdateRequest, options);
|
|
44625
|
+
const localVarOperationServerBasePath = operationServerMap['ReachFormsApi.updateFormV1']?.[0]?.url;
|
|
44626
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
44627
|
+
},
|
|
44137
44628
|
}
|
|
44138
44629
|
};
|
|
44139
44630
|
|
|
@@ -44144,6 +44635,29 @@ export const ReachFormsApiFp = function(configuration?: Configuration) {
|
|
|
44144
44635
|
export const ReachFormsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
|
44145
44636
|
const localVarFp = ReachFormsApiFp(configuration)
|
|
44146
44637
|
return {
|
|
44638
|
+
/**
|
|
44639
|
+
* Add tags to a form so that every contact who submits it from now on receives them. A tag the form already has is skipped; an unknown tag is rejected. Contacts who submitted earlier are not tagged.
|
|
44640
|
+
* @summary Add form submitter tags
|
|
44641
|
+
* @param {string} profileUuid Profile uuid parameter
|
|
44642
|
+
* @param {string} formUuid Form uuid parameter
|
|
44643
|
+
* @param {ReachV1FormsAssignTagsRequest} reachV1FormsAssignTagsRequest
|
|
44644
|
+
* @param {*} [options] Override http request option.
|
|
44645
|
+
* @throws {RequiredError}
|
|
44646
|
+
*/
|
|
44647
|
+
addFormSubmitterTagsV1(profileUuid: string, formUuid: string, reachV1FormsAssignTagsRequest: ReachV1FormsAssignTagsRequest, options?: RawAxiosRequestConfig): AxiosPromise<CommonSuccessEmptyResource> {
|
|
44648
|
+
return localVarFp.addFormSubmitterTagsV1(profileUuid, formUuid, reachV1FormsAssignTagsRequest, options).then((request) => request(axios, basePath));
|
|
44649
|
+
},
|
|
44650
|
+
/**
|
|
44651
|
+
* Create an empty draft form. Reach also adds an automatic `form:{name}` tag that every submitter receives. A draft has no design and is not reachable by visitors: save a design with the update form template operation, then take the form live by setting its status to `active`. Creating a form does not consume AI credits.
|
|
44652
|
+
* @summary Create form
|
|
44653
|
+
* @param {string} profileUuid Profile uuid parameter
|
|
44654
|
+
* @param {ReachV1FormsStoreRequest} reachV1FormsStoreRequest
|
|
44655
|
+
* @param {*} [options] Override http request option.
|
|
44656
|
+
* @throws {RequiredError}
|
|
44657
|
+
*/
|
|
44658
|
+
createFormV1(profileUuid: string, reachV1FormsStoreRequest: ReachV1FormsStoreRequest, options?: RawAxiosRequestConfig): AxiosPromise<ReachV1FormsFormResource> {
|
|
44659
|
+
return localVarFp.createFormV1(profileUuid, reachV1FormsStoreRequest, options).then((request) => request(axios, basePath));
|
|
44660
|
+
},
|
|
44147
44661
|
/**
|
|
44148
44662
|
* Permanently delete a form together with its template. A form that has already captured submissions cannot be deleted, so that the contacts it collected are never silently discarded - pause the form instead to stop it collecting new ones. Views alone do not block deletion.
|
|
44149
44663
|
* @summary Delete form
|
|
@@ -44155,6 +44669,17 @@ export const ReachFormsApiFactory = function (configuration?: Configuration, bas
|
|
|
44155
44669
|
deleteFormV1(profileUuid: string, formUuid: string, options?: RawAxiosRequestConfig): AxiosPromise<CommonSuccessEmptyResource> {
|
|
44156
44670
|
return localVarFp.deleteFormV1(profileUuid, formUuid, options).then((request) => request(axios, basePath));
|
|
44157
44671
|
},
|
|
44672
|
+
/**
|
|
44673
|
+
* Copy a form into a new draft form with the same name and design. The copy shares the source\'s automatic `form:{name}` tag; other submitter tags are not copied. The copy is not live until its status is set to `active`.
|
|
44674
|
+
* @summary Duplicate form
|
|
44675
|
+
* @param {string} profileUuid Profile uuid parameter
|
|
44676
|
+
* @param {string} formUuid Form uuid parameter
|
|
44677
|
+
* @param {*} [options] Override http request option.
|
|
44678
|
+
* @throws {RequiredError}
|
|
44679
|
+
*/
|
|
44680
|
+
duplicateFormV1(profileUuid: string, formUuid: string, options?: RawAxiosRequestConfig): AxiosPromise<ReachV1FormsFormResource> {
|
|
44681
|
+
return localVarFp.duplicateFormV1(profileUuid, formUuid, options).then((request) => request(axios, basePath));
|
|
44682
|
+
},
|
|
44158
44683
|
/**
|
|
44159
44684
|
* Get a single form with the URL of its hosted template and the tags it applies to the contacts it captures. There is no ready-made embed snippet in the response - either serve the template HTML yourself or build your own embed around the form uuid.
|
|
44160
44685
|
* @summary Get form details
|
|
@@ -44172,11 +44697,48 @@ export const ReachFormsApiFactory = function (configuration?: Configuration, bas
|
|
|
44172
44697
|
* @param {string} profileUuid Profile uuid parameter
|
|
44173
44698
|
* @param {number} [page] Page number
|
|
44174
44699
|
* @param {number} [perPage] Number of items per page
|
|
44700
|
+
* @param {ListFormsV1StatusEnum} [status] Return only forms with this status.
|
|
44701
|
+
* @param {*} [options] Override http request option.
|
|
44702
|
+
* @throws {RequiredError}
|
|
44703
|
+
*/
|
|
44704
|
+
listFormsV1(profileUuid: string, page?: number, perPage?: number, status?: ListFormsV1StatusEnum, options?: RawAxiosRequestConfig): AxiosPromise<ReachListFormsV1200Response> {
|
|
44705
|
+
return localVarFp.listFormsV1(profileUuid, page, perPage, status, options).then((request) => request(axios, basePath));
|
|
44706
|
+
},
|
|
44707
|
+
/**
|
|
44708
|
+
* Stop a form from applying a tag to its future submitters. Succeeds also when the form did not have the tag. Contacts who already received the tag keep it, and the tag itself is not deleted. The automatic `form:{name}` tag cannot be removed and is rejected with a conflict.
|
|
44709
|
+
* @summary Remove form submitter tag
|
|
44710
|
+
* @param {string} profileUuid Profile uuid parameter
|
|
44711
|
+
* @param {string} formUuid Form uuid parameter
|
|
44712
|
+
* @param {ReachV1FormsRemoveTagRequest} reachV1FormsRemoveTagRequest
|
|
44713
|
+
* @param {*} [options] Override http request option.
|
|
44714
|
+
* @throws {RequiredError}
|
|
44715
|
+
*/
|
|
44716
|
+
removeFormSubmitterTagV1(profileUuid: string, formUuid: string, reachV1FormsRemoveTagRequest: ReachV1FormsRemoveTagRequest, options?: RawAxiosRequestConfig): AxiosPromise<CommonSuccessEmptyResource> {
|
|
44717
|
+
return localVarFp.removeFormSubmitterTagV1(profileUuid, formUuid, reachV1FormsRemoveTagRequest, options).then((request) => request(axios, basePath));
|
|
44718
|
+
},
|
|
44719
|
+
/**
|
|
44720
|
+
* Save `content` as the latest design of a form and return the stored version. The HTML is sanitized and, unless the plan allows removing it, the Reach signature is added. Visitors submit the form with an `email` field (required) and optional `name`, `surname` and `phone`. After sanitizing, the design must contain a form container (`data-reach-form`), an email input (`data-reach-field=\"email\"`) and a submit button (`data-reach-submit`); otherwise the request fails with `422` and `errors.content` lists `missing_form_container`, `missing_email_field` and/or `missing_submit_button`. A `draft` or `paused` form stays unreachable until its status is set to `active`, which publishes this design. On a form that is already `active` the saved design is not public until the form is paused and set to `active` again. Saving a design does not consume AI credits.
|
|
44721
|
+
* @summary Update form template
|
|
44722
|
+
* @param {string} profileUuid Profile uuid parameter
|
|
44723
|
+
* @param {string} formUuid Form uuid parameter
|
|
44724
|
+
* @param {ReachV1FormsUpdateTemplateRequest} reachV1FormsUpdateTemplateRequest
|
|
44725
|
+
* @param {*} [options] Override http request option.
|
|
44726
|
+
* @throws {RequiredError}
|
|
44727
|
+
*/
|
|
44728
|
+
updateFormTemplateV1(profileUuid: string, formUuid: string, reachV1FormsUpdateTemplateRequest: ReachV1FormsUpdateTemplateRequest, options?: RawAxiosRequestConfig): AxiosPromise<ReachV1FormsFormTemplateVersionResource> {
|
|
44729
|
+
return localVarFp.updateFormTemplateV1(profileUuid, formUuid, reachV1FormsUpdateTemplateRequest, options).then((request) => request(axios, basePath));
|
|
44730
|
+
},
|
|
44731
|
+
/**
|
|
44732
|
+
* Rename a form and/or change its status. Setting a `draft` or `paused` form to `active` takes it live: its latest saved design is published and visitors can submit it. `paused` and `draft` stop the form from accepting submissions. A form is not reachable by visitors until it is taken live. Design changes saved while the form is already `active` stay unpublished until the form is paused and set to `active` again. Renaming does not rename the automatic `form:{name}` tag.
|
|
44733
|
+
* @summary Update form
|
|
44734
|
+
* @param {string} profileUuid Profile uuid parameter
|
|
44735
|
+
* @param {string} formUuid Form uuid parameter
|
|
44736
|
+
* @param {ReachV1FormsUpdateRequest} reachV1FormsUpdateRequest
|
|
44175
44737
|
* @param {*} [options] Override http request option.
|
|
44176
44738
|
* @throws {RequiredError}
|
|
44177
44739
|
*/
|
|
44178
|
-
|
|
44179
|
-
return localVarFp.
|
|
44740
|
+
updateFormV1(profileUuid: string, formUuid: string, reachV1FormsUpdateRequest: ReachV1FormsUpdateRequest, options?: RawAxiosRequestConfig): AxiosPromise<ReachV1FormsFormResource> {
|
|
44741
|
+
return localVarFp.updateFormV1(profileUuid, formUuid, reachV1FormsUpdateRequest, options).then((request) => request(axios, basePath));
|
|
44180
44742
|
},
|
|
44181
44743
|
};
|
|
44182
44744
|
};
|
|
@@ -44188,6 +44750,33 @@ export const ReachFormsApiFactory = function (configuration?: Configuration, bas
|
|
|
44188
44750
|
* @extends {BaseAPI}
|
|
44189
44751
|
*/
|
|
44190
44752
|
export class ReachFormsApi extends BaseAPI {
|
|
44753
|
+
/**
|
|
44754
|
+
* Add tags to a form so that every contact who submits it from now on receives them. A tag the form already has is skipped; an unknown tag is rejected. Contacts who submitted earlier are not tagged.
|
|
44755
|
+
* @summary Add form submitter tags
|
|
44756
|
+
* @param {string} profileUuid Profile uuid parameter
|
|
44757
|
+
* @param {string} formUuid Form uuid parameter
|
|
44758
|
+
* @param {ReachV1FormsAssignTagsRequest} reachV1FormsAssignTagsRequest
|
|
44759
|
+
* @param {*} [options] Override http request option.
|
|
44760
|
+
* @throws {RequiredError}
|
|
44761
|
+
* @memberof ReachFormsApi
|
|
44762
|
+
*/
|
|
44763
|
+
public addFormSubmitterTagsV1(profileUuid: string, formUuid: string, reachV1FormsAssignTagsRequest: ReachV1FormsAssignTagsRequest, options?: RawAxiosRequestConfig) {
|
|
44764
|
+
return ReachFormsApiFp(this.configuration).addFormSubmitterTagsV1(profileUuid, formUuid, reachV1FormsAssignTagsRequest, options).then((request) => request(this.axios, this.basePath));
|
|
44765
|
+
}
|
|
44766
|
+
|
|
44767
|
+
/**
|
|
44768
|
+
* Create an empty draft form. Reach also adds an automatic `form:{name}` tag that every submitter receives. A draft has no design and is not reachable by visitors: save a design with the update form template operation, then take the form live by setting its status to `active`. Creating a form does not consume AI credits.
|
|
44769
|
+
* @summary Create form
|
|
44770
|
+
* @param {string} profileUuid Profile uuid parameter
|
|
44771
|
+
* @param {ReachV1FormsStoreRequest} reachV1FormsStoreRequest
|
|
44772
|
+
* @param {*} [options] Override http request option.
|
|
44773
|
+
* @throws {RequiredError}
|
|
44774
|
+
* @memberof ReachFormsApi
|
|
44775
|
+
*/
|
|
44776
|
+
public createFormV1(profileUuid: string, reachV1FormsStoreRequest: ReachV1FormsStoreRequest, options?: RawAxiosRequestConfig) {
|
|
44777
|
+
return ReachFormsApiFp(this.configuration).createFormV1(profileUuid, reachV1FormsStoreRequest, options).then((request) => request(this.axios, this.basePath));
|
|
44778
|
+
}
|
|
44779
|
+
|
|
44191
44780
|
/**
|
|
44192
44781
|
* Permanently delete a form together with its template. A form that has already captured submissions cannot be deleted, so that the contacts it collected are never silently discarded - pause the form instead to stop it collecting new ones. Views alone do not block deletion.
|
|
44193
44782
|
* @summary Delete form
|
|
@@ -44201,6 +44790,19 @@ export class ReachFormsApi extends BaseAPI {
|
|
|
44201
44790
|
return ReachFormsApiFp(this.configuration).deleteFormV1(profileUuid, formUuid, options).then((request) => request(this.axios, this.basePath));
|
|
44202
44791
|
}
|
|
44203
44792
|
|
|
44793
|
+
/**
|
|
44794
|
+
* Copy a form into a new draft form with the same name and design. The copy shares the source\'s automatic `form:{name}` tag; other submitter tags are not copied. The copy is not live until its status is set to `active`.
|
|
44795
|
+
* @summary Duplicate form
|
|
44796
|
+
* @param {string} profileUuid Profile uuid parameter
|
|
44797
|
+
* @param {string} formUuid Form uuid parameter
|
|
44798
|
+
* @param {*} [options] Override http request option.
|
|
44799
|
+
* @throws {RequiredError}
|
|
44800
|
+
* @memberof ReachFormsApi
|
|
44801
|
+
*/
|
|
44802
|
+
public duplicateFormV1(profileUuid: string, formUuid: string, options?: RawAxiosRequestConfig) {
|
|
44803
|
+
return ReachFormsApiFp(this.configuration).duplicateFormV1(profileUuid, formUuid, options).then((request) => request(this.axios, this.basePath));
|
|
44804
|
+
}
|
|
44805
|
+
|
|
44204
44806
|
/**
|
|
44205
44807
|
* Get a single form with the URL of its hosted template and the tags it applies to the contacts it captures. There is no ready-made embed snippet in the response - either serve the template HTML yourself or build your own embed around the form uuid.
|
|
44206
44808
|
* @summary Get form details
|
|
@@ -44220,15 +44822,67 @@ export class ReachFormsApi extends BaseAPI {
|
|
|
44220
44822
|
* @param {string} profileUuid Profile uuid parameter
|
|
44221
44823
|
* @param {number} [page] Page number
|
|
44222
44824
|
* @param {number} [perPage] Number of items per page
|
|
44825
|
+
* @param {ListFormsV1StatusEnum} [status] Return only forms with this status.
|
|
44223
44826
|
* @param {*} [options] Override http request option.
|
|
44224
44827
|
* @throws {RequiredError}
|
|
44225
44828
|
* @memberof ReachFormsApi
|
|
44226
44829
|
*/
|
|
44227
|
-
public listFormsV1(profileUuid: string, page?: number, perPage?: number, options?: RawAxiosRequestConfig) {
|
|
44228
|
-
return ReachFormsApiFp(this.configuration).listFormsV1(profileUuid, page, perPage, options).then((request) => request(this.axios, this.basePath));
|
|
44830
|
+
public listFormsV1(profileUuid: string, page?: number, perPage?: number, status?: ListFormsV1StatusEnum, options?: RawAxiosRequestConfig) {
|
|
44831
|
+
return ReachFormsApiFp(this.configuration).listFormsV1(profileUuid, page, perPage, status, options).then((request) => request(this.axios, this.basePath));
|
|
44832
|
+
}
|
|
44833
|
+
|
|
44834
|
+
/**
|
|
44835
|
+
* Stop a form from applying a tag to its future submitters. Succeeds also when the form did not have the tag. Contacts who already received the tag keep it, and the tag itself is not deleted. The automatic `form:{name}` tag cannot be removed and is rejected with a conflict.
|
|
44836
|
+
* @summary Remove form submitter tag
|
|
44837
|
+
* @param {string} profileUuid Profile uuid parameter
|
|
44838
|
+
* @param {string} formUuid Form uuid parameter
|
|
44839
|
+
* @param {ReachV1FormsRemoveTagRequest} reachV1FormsRemoveTagRequest
|
|
44840
|
+
* @param {*} [options] Override http request option.
|
|
44841
|
+
* @throws {RequiredError}
|
|
44842
|
+
* @memberof ReachFormsApi
|
|
44843
|
+
*/
|
|
44844
|
+
public removeFormSubmitterTagV1(profileUuid: string, formUuid: string, reachV1FormsRemoveTagRequest: ReachV1FormsRemoveTagRequest, options?: RawAxiosRequestConfig) {
|
|
44845
|
+
return ReachFormsApiFp(this.configuration).removeFormSubmitterTagV1(profileUuid, formUuid, reachV1FormsRemoveTagRequest, options).then((request) => request(this.axios, this.basePath));
|
|
44846
|
+
}
|
|
44847
|
+
|
|
44848
|
+
/**
|
|
44849
|
+
* Save `content` as the latest design of a form and return the stored version. The HTML is sanitized and, unless the plan allows removing it, the Reach signature is added. Visitors submit the form with an `email` field (required) and optional `name`, `surname` and `phone`. After sanitizing, the design must contain a form container (`data-reach-form`), an email input (`data-reach-field=\"email\"`) and a submit button (`data-reach-submit`); otherwise the request fails with `422` and `errors.content` lists `missing_form_container`, `missing_email_field` and/or `missing_submit_button`. A `draft` or `paused` form stays unreachable until its status is set to `active`, which publishes this design. On a form that is already `active` the saved design is not public until the form is paused and set to `active` again. Saving a design does not consume AI credits.
|
|
44850
|
+
* @summary Update form template
|
|
44851
|
+
* @param {string} profileUuid Profile uuid parameter
|
|
44852
|
+
* @param {string} formUuid Form uuid parameter
|
|
44853
|
+
* @param {ReachV1FormsUpdateTemplateRequest} reachV1FormsUpdateTemplateRequest
|
|
44854
|
+
* @param {*} [options] Override http request option.
|
|
44855
|
+
* @throws {RequiredError}
|
|
44856
|
+
* @memberof ReachFormsApi
|
|
44857
|
+
*/
|
|
44858
|
+
public updateFormTemplateV1(profileUuid: string, formUuid: string, reachV1FormsUpdateTemplateRequest: ReachV1FormsUpdateTemplateRequest, options?: RawAxiosRequestConfig) {
|
|
44859
|
+
return ReachFormsApiFp(this.configuration).updateFormTemplateV1(profileUuid, formUuid, reachV1FormsUpdateTemplateRequest, options).then((request) => request(this.axios, this.basePath));
|
|
44860
|
+
}
|
|
44861
|
+
|
|
44862
|
+
/**
|
|
44863
|
+
* Rename a form and/or change its status. Setting a `draft` or `paused` form to `active` takes it live: its latest saved design is published and visitors can submit it. `paused` and `draft` stop the form from accepting submissions. A form is not reachable by visitors until it is taken live. Design changes saved while the form is already `active` stay unpublished until the form is paused and set to `active` again. Renaming does not rename the automatic `form:{name}` tag.
|
|
44864
|
+
* @summary Update form
|
|
44865
|
+
* @param {string} profileUuid Profile uuid parameter
|
|
44866
|
+
* @param {string} formUuid Form uuid parameter
|
|
44867
|
+
* @param {ReachV1FormsUpdateRequest} reachV1FormsUpdateRequest
|
|
44868
|
+
* @param {*} [options] Override http request option.
|
|
44869
|
+
* @throws {RequiredError}
|
|
44870
|
+
* @memberof ReachFormsApi
|
|
44871
|
+
*/
|
|
44872
|
+
public updateFormV1(profileUuid: string, formUuid: string, reachV1FormsUpdateRequest: ReachV1FormsUpdateRequest, options?: RawAxiosRequestConfig) {
|
|
44873
|
+
return ReachFormsApiFp(this.configuration).updateFormV1(profileUuid, formUuid, reachV1FormsUpdateRequest, options).then((request) => request(this.axios, this.basePath));
|
|
44229
44874
|
}
|
|
44230
44875
|
}
|
|
44231
44876
|
|
|
44877
|
+
/**
|
|
44878
|
+
* @export
|
|
44879
|
+
*/
|
|
44880
|
+
export const ListFormsV1StatusEnum = {
|
|
44881
|
+
Active: 'active',
|
|
44882
|
+
Paused: 'paused',
|
|
44883
|
+
Draft: 'draft'
|
|
44884
|
+
} as const;
|
|
44885
|
+
export type ListFormsV1StatusEnum = typeof ListFormsV1StatusEnum[keyof typeof ListFormsV1StatusEnum];
|
|
44232
44886
|
|
|
44233
44887
|
|
|
44234
44888
|
/**
|