hostinger-api-sdk 2.1.2 → 2.2.0

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/dist/esm/api.js CHANGED
@@ -3,7 +3,7 @@
3
3
  /**
4
4
  * Hostinger API
5
5
  *
6
- * API Version: 2.1.2
6
+ * API Version: 2.2.0
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',
@@ -16510,6 +16519,66 @@ export const HostingNodeJSApiAxiosParamCreator = function (configuration) {
16510
16519
  options: localVarRequestOptions,
16511
16520
  };
16512
16521
  }),
16522
+ /**
16523
+ * Determine the build settings for a Node.js application from the package.json file of a branch in a Git repository. Use before starting a Git-source build to find out the auto-detected settings instead of guessing them. The repository is read through a Git installation: take `installation_uuid` from `List Git installations` and `owner` and `repository` from `List Git installation repositories`. Returns 422 when the installation is not found, the repository or branch is not found, or the branch has no package.json.
16524
+ * @summary Get Node.js build settings from repository
16525
+ * @param {string} username
16526
+ * @param {string} domain Domain name
16527
+ * @param {string} owner Repository owner login. GitLab group paths use slashes.
16528
+ * @param {string} repository Repository name without the .git suffix
16529
+ * @param {string} branch Branch whose package.json is inspected
16530
+ * @param {string} installationUuid Git installation used to access the repository, taken from `List Git installations`
16531
+ * @param {*} [options] Override http request option.
16532
+ * @throws {RequiredError}
16533
+ */
16534
+ getNodeJsBuildSettingsFromRepositoryV1: (username_1, domain_1, owner_1, repository_1, branch_1, installationUuid_1, ...args_1) => __awaiter(this, [username_1, domain_1, owner_1, repository_1, branch_1, installationUuid_1, ...args_1], void 0, function* (username, domain, owner, repository, branch, installationUuid, options = {}) {
16535
+ // verify required parameter 'username' is not null or undefined
16536
+ assertParamExists('getNodeJsBuildSettingsFromRepositoryV1', 'username', username);
16537
+ // verify required parameter 'domain' is not null or undefined
16538
+ assertParamExists('getNodeJsBuildSettingsFromRepositoryV1', 'domain', domain);
16539
+ // verify required parameter 'owner' is not null or undefined
16540
+ assertParamExists('getNodeJsBuildSettingsFromRepositoryV1', 'owner', owner);
16541
+ // verify required parameter 'repository' is not null or undefined
16542
+ assertParamExists('getNodeJsBuildSettingsFromRepositoryV1', 'repository', repository);
16543
+ // verify required parameter 'branch' is not null or undefined
16544
+ assertParamExists('getNodeJsBuildSettingsFromRepositoryV1', 'branch', branch);
16545
+ // verify required parameter 'installationUuid' is not null or undefined
16546
+ assertParamExists('getNodeJsBuildSettingsFromRepositoryV1', 'installationUuid', installationUuid);
16547
+ const localVarPath = `/api/hosting/v1/accounts/{username}/websites/{domain}/nodejs/builds/settings/from-repository`
16548
+ .replace(`{${"username"}}`, encodeURIComponent(String(username)))
16549
+ .replace(`{${"domain"}}`, encodeURIComponent(String(domain)));
16550
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
16551
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
16552
+ let baseOptions;
16553
+ if (configuration) {
16554
+ baseOptions = configuration.baseOptions;
16555
+ }
16556
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
16557
+ const localVarHeaderParameter = {};
16558
+ const localVarQueryParameter = {};
16559
+ // authentication apiToken required
16560
+ // http bearer authentication required
16561
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
16562
+ if (owner !== undefined) {
16563
+ localVarQueryParameter['owner'] = owner;
16564
+ }
16565
+ if (repository !== undefined) {
16566
+ localVarQueryParameter['repository'] = repository;
16567
+ }
16568
+ if (branch !== undefined) {
16569
+ localVarQueryParameter['branch'] = branch;
16570
+ }
16571
+ if (installationUuid !== undefined) {
16572
+ localVarQueryParameter['installation_uuid'] = installationUuid;
16573
+ }
16574
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
16575
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
16576
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
16577
+ return {
16578
+ url: toPathString(localVarUrlObj),
16579
+ options: localVarRequestOptions,
16580
+ };
16581
+ }),
16513
16582
  /**
16514
16583
  * Returns the build settings stored for the website: framework (`app_type`), Node.js version, root and output directory, build script, entry file and package manager. Stored settings drive Git auto-deployment builds. A build started through the API uses the values sent in that request and saves them here only when no settings exist yet. Returns 404 until the first build or the first settings update stores them. Use this after a failed build to check whether the framework or the entry file were detected wrong, then fix them with the `Update Node.js build settings` endpoint.
16515
16584
  * @summary Get Node.js build settings
@@ -17016,6 +17085,26 @@ export const HostingNodeJSApiFp = function (configuration) {
17016
17085
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
17017
17086
  });
17018
17087
  },
17088
+ /**
17089
+ * Determine the build settings for a Node.js application from the package.json file of a branch in a Git repository. Use before starting a Git-source build to find out the auto-detected settings instead of guessing them. The repository is read through a Git installation: take `installation_uuid` from `List Git installations` and `owner` and `repository` from `List Git installation repositories`. Returns 422 when the installation is not found, the repository or branch is not found, or the branch has no package.json.
17090
+ * @summary Get Node.js build settings from repository
17091
+ * @param {string} username
17092
+ * @param {string} domain Domain name
17093
+ * @param {string} owner Repository owner login. GitLab group paths use slashes.
17094
+ * @param {string} repository Repository name without the .git suffix
17095
+ * @param {string} branch Branch whose package.json is inspected
17096
+ * @param {string} installationUuid Git installation used to access the repository, taken from `List Git installations`
17097
+ * @param {*} [options] Override http request option.
17098
+ * @throws {RequiredError}
17099
+ */
17100
+ getNodeJsBuildSettingsFromRepositoryV1(username, domain, owner, repository, branch, installationUuid, options) {
17101
+ return __awaiter(this, void 0, void 0, function* () {
17102
+ var _a, _b;
17103
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getNodeJsBuildSettingsFromRepositoryV1(username, domain, owner, repository, branch, installationUuid, options);
17104
+ const localVarOperationServerBasePath = (_b = (_a = operationServerMap['HostingNodeJSApi.getNodeJsBuildSettingsFromRepositoryV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
17105
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
17106
+ });
17107
+ },
17019
17108
  /**
17020
17109
  * Returns the build settings stored for the website: framework (`app_type`), Node.js version, root and output directory, build script, entry file and package manager. Stored settings drive Git auto-deployment builds. A build started through the API uses the values sent in that request and saves them here only when no settings exist yet. Returns 404 until the first build or the first settings update stores them. Use this after a failed build to check whether the framework or the entry file were detected wrong, then fix them with the `Update Node.js build settings` endpoint.
17021
17110
  * @summary Get Node.js build settings
@@ -17257,6 +17346,21 @@ export const HostingNodeJSApiFactory = function (configuration, basePath, axios)
17257
17346
  getNodeJsBuildSettingsFromArchiveV1(username, domain, archivePath, options) {
17258
17347
  return localVarFp.getNodeJsBuildSettingsFromArchiveV1(username, domain, archivePath, options).then((request) => request(axios, basePath));
17259
17348
  },
17349
+ /**
17350
+ * Determine the build settings for a Node.js application from the package.json file of a branch in a Git repository. Use before starting a Git-source build to find out the auto-detected settings instead of guessing them. The repository is read through a Git installation: take `installation_uuid` from `List Git installations` and `owner` and `repository` from `List Git installation repositories`. Returns 422 when the installation is not found, the repository or branch is not found, or the branch has no package.json.
17351
+ * @summary Get Node.js build settings from repository
17352
+ * @param {string} username
17353
+ * @param {string} domain Domain name
17354
+ * @param {string} owner Repository owner login. GitLab group paths use slashes.
17355
+ * @param {string} repository Repository name without the .git suffix
17356
+ * @param {string} branch Branch whose package.json is inspected
17357
+ * @param {string} installationUuid Git installation used to access the repository, taken from `List Git installations`
17358
+ * @param {*} [options] Override http request option.
17359
+ * @throws {RequiredError}
17360
+ */
17361
+ getNodeJsBuildSettingsFromRepositoryV1(username, domain, owner, repository, branch, installationUuid, options) {
17362
+ return localVarFp.getNodeJsBuildSettingsFromRepositoryV1(username, domain, owner, repository, branch, installationUuid, options).then((request) => request(axios, basePath));
17363
+ },
17260
17364
  /**
17261
17365
  * Returns the build settings stored for the website: framework (`app_type`), Node.js version, root and output directory, build script, entry file and package manager. Stored settings drive Git auto-deployment builds. A build started through the API uses the values sent in that request and saves them here only when no settings exist yet. Returns 404 until the first build or the first settings update stores them. Use this after a failed build to check whether the framework or the entry file were detected wrong, then fix them with the `Update Node.js build settings` endpoint.
17262
17366
  * @summary Get Node.js build settings
@@ -17453,6 +17557,22 @@ export class HostingNodeJSApi extends BaseAPI {
17453
17557
  getNodeJsBuildSettingsFromArchiveV1(username, domain, archivePath, options) {
17454
17558
  return HostingNodeJSApiFp(this.configuration).getNodeJsBuildSettingsFromArchiveV1(username, domain, archivePath, options).then((request) => request(this.axios, this.basePath));
17455
17559
  }
17560
+ /**
17561
+ * Determine the build settings for a Node.js application from the package.json file of a branch in a Git repository. Use before starting a Git-source build to find out the auto-detected settings instead of guessing them. The repository is read through a Git installation: take `installation_uuid` from `List Git installations` and `owner` and `repository` from `List Git installation repositories`. Returns 422 when the installation is not found, the repository or branch is not found, or the branch has no package.json.
17562
+ * @summary Get Node.js build settings from repository
17563
+ * @param {string} username
17564
+ * @param {string} domain Domain name
17565
+ * @param {string} owner Repository owner login. GitLab group paths use slashes.
17566
+ * @param {string} repository Repository name without the .git suffix
17567
+ * @param {string} branch Branch whose package.json is inspected
17568
+ * @param {string} installationUuid Git installation used to access the repository, taken from `List Git installations`
17569
+ * @param {*} [options] Override http request option.
17570
+ * @throws {RequiredError}
17571
+ * @memberof HostingNodeJSApi
17572
+ */
17573
+ getNodeJsBuildSettingsFromRepositoryV1(username, domain, owner, repository, branch, installationUuid, options) {
17574
+ return HostingNodeJSApiFp(this.configuration).getNodeJsBuildSettingsFromRepositoryV1(username, domain, owner, repository, branch, installationUuid, options).then((request) => request(this.axios, this.basePath));
17575
+ }
17456
17576
  /**
17457
17577
  * Returns the build settings stored for the website: framework (`app_type`), Node.js version, root and output directory, build script, entry file and package manager. Stored settings drive Git auto-deployment builds. A build started through the API uses the values sent in that request and saves them here only when no settings exist yet. Returns 404 until the first build or the first settings update stores them. Use this after a failed build to check whether the framework or the entry file were detected wrong, then fix them with the `Update Node.js build settings` endpoint.
17458
17578
  * @summary Get Node.js build settings
@@ -24845,6 +24965,84 @@ export const ListProfileContactsV1SubscriptionStatusEnum = {
24845
24965
  */
24846
24966
  export const ReachFormsApiAxiosParamCreator = function (configuration) {
24847
24967
  return {
24968
+ /**
24969
+ * 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.
24970
+ * @summary Add form submitter tags
24971
+ * @param {string} profileUuid Profile uuid parameter
24972
+ * @param {string} formUuid Form uuid parameter
24973
+ * @param {ReachV1FormsAssignTagsRequest} reachV1FormsAssignTagsRequest
24974
+ * @param {*} [options] Override http request option.
24975
+ * @throws {RequiredError}
24976
+ */
24977
+ 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 = {}) {
24978
+ // verify required parameter 'profileUuid' is not null or undefined
24979
+ assertParamExists('addFormSubmitterTagsV1', 'profileUuid', profileUuid);
24980
+ // verify required parameter 'formUuid' is not null or undefined
24981
+ assertParamExists('addFormSubmitterTagsV1', 'formUuid', formUuid);
24982
+ // verify required parameter 'reachV1FormsAssignTagsRequest' is not null or undefined
24983
+ assertParamExists('addFormSubmitterTagsV1', 'reachV1FormsAssignTagsRequest', reachV1FormsAssignTagsRequest);
24984
+ const localVarPath = `/api/reach/v1/profiles/{profileUuid}/forms/{formUuid}/tags`
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
+ localVarHeaderParameter['Content-Type'] = 'application/json';
25000
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
25001
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
25002
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
25003
+ localVarRequestOptions.data = serializeDataIfNeeded(reachV1FormsAssignTagsRequest, localVarRequestOptions, configuration);
25004
+ return {
25005
+ url: toPathString(localVarUrlObj),
25006
+ options: localVarRequestOptions,
25007
+ };
25008
+ }),
25009
+ /**
25010
+ * 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.
25011
+ * @summary Create form
25012
+ * @param {string} profileUuid Profile uuid parameter
25013
+ * @param {ReachV1FormsStoreRequest} reachV1FormsStoreRequest
25014
+ * @param {*} [options] Override http request option.
25015
+ * @throws {RequiredError}
25016
+ */
25017
+ createFormV1: (profileUuid_1, reachV1FormsStoreRequest_1, ...args_1) => __awaiter(this, [profileUuid_1, reachV1FormsStoreRequest_1, ...args_1], void 0, function* (profileUuid, reachV1FormsStoreRequest, options = {}) {
25018
+ // verify required parameter 'profileUuid' is not null or undefined
25019
+ assertParamExists('createFormV1', 'profileUuid', profileUuid);
25020
+ // verify required parameter 'reachV1FormsStoreRequest' is not null or undefined
25021
+ assertParamExists('createFormV1', 'reachV1FormsStoreRequest', reachV1FormsStoreRequest);
25022
+ const localVarPath = `/api/reach/v1/profiles/{profileUuid}/forms`
25023
+ .replace(`{${"profileUuid"}}`, encodeURIComponent(String(profileUuid)));
25024
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
25025
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
25026
+ let baseOptions;
25027
+ if (configuration) {
25028
+ baseOptions = configuration.baseOptions;
25029
+ }
25030
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
25031
+ const localVarHeaderParameter = {};
25032
+ const localVarQueryParameter = {};
25033
+ // authentication apiToken required
25034
+ // http bearer authentication required
25035
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
25036
+ localVarHeaderParameter['Content-Type'] = 'application/json';
25037
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
25038
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
25039
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
25040
+ localVarRequestOptions.data = serializeDataIfNeeded(reachV1FormsStoreRequest, localVarRequestOptions, configuration);
25041
+ return {
25042
+ url: toPathString(localVarUrlObj),
25043
+ options: localVarRequestOptions,
25044
+ };
25045
+ }),
24848
25046
  /**
24849
25047
  * 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
25048
  * @summary Delete form
@@ -24881,6 +25079,42 @@ export const ReachFormsApiAxiosParamCreator = function (configuration) {
24881
25079
  options: localVarRequestOptions,
24882
25080
  };
24883
25081
  }),
25082
+ /**
25083
+ * 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`.
25084
+ * @summary Duplicate form
25085
+ * @param {string} profileUuid Profile uuid parameter
25086
+ * @param {string} formUuid Form uuid parameter
25087
+ * @param {*} [options] Override http request option.
25088
+ * @throws {RequiredError}
25089
+ */
25090
+ duplicateFormV1: (profileUuid_1, formUuid_1, ...args_1) => __awaiter(this, [profileUuid_1, formUuid_1, ...args_1], void 0, function* (profileUuid, formUuid, options = {}) {
25091
+ // verify required parameter 'profileUuid' is not null or undefined
25092
+ assertParamExists('duplicateFormV1', 'profileUuid', profileUuid);
25093
+ // verify required parameter 'formUuid' is not null or undefined
25094
+ assertParamExists('duplicateFormV1', 'formUuid', formUuid);
25095
+ const localVarPath = `/api/reach/v1/profiles/{profileUuid}/forms/{formUuid}/duplicate`
25096
+ .replace(`{${"profileUuid"}}`, encodeURIComponent(String(profileUuid)))
25097
+ .replace(`{${"formUuid"}}`, encodeURIComponent(String(formUuid)));
25098
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
25099
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
25100
+ let baseOptions;
25101
+ if (configuration) {
25102
+ baseOptions = configuration.baseOptions;
25103
+ }
25104
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
25105
+ const localVarHeaderParameter = {};
25106
+ const localVarQueryParameter = {};
25107
+ // authentication apiToken required
25108
+ // http bearer authentication required
25109
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
25110
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
25111
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
25112
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
25113
+ return {
25114
+ url: toPathString(localVarUrlObj),
25115
+ options: localVarRequestOptions,
25116
+ };
25117
+ }),
24884
25118
  /**
24885
25119
  * 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
25120
  * @summary Get form details
@@ -24923,10 +25157,11 @@ export const ReachFormsApiAxiosParamCreator = function (configuration) {
24923
25157
  * @param {string} profileUuid Profile uuid parameter
24924
25158
  * @param {number} [page] Page number
24925
25159
  * @param {number} [perPage] Number of items per page
25160
+ * @param {ListFormsV1StatusEnum} [status] Return only forms with this status.
24926
25161
  * @param {*} [options] Override http request option.
24927
25162
  * @throws {RequiredError}
24928
25163
  */
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 = {}) {
25164
+ 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
25165
  // verify required parameter 'profileUuid' is not null or undefined
24931
25166
  assertParamExists('listFormsV1', 'profileUuid', profileUuid);
24932
25167
  const localVarPath = `/api/reach/v1/profiles/{profileUuid}/forms`
@@ -24949,6 +25184,9 @@ export const ReachFormsApiAxiosParamCreator = function (configuration) {
24949
25184
  if (perPage !== undefined) {
24950
25185
  localVarQueryParameter['per_page'] = perPage;
24951
25186
  }
25187
+ if (status !== undefined) {
25188
+ localVarQueryParameter['status'] = status;
25189
+ }
24952
25190
  setSearchParams(localVarUrlObj, localVarQueryParameter);
24953
25191
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
24954
25192
  localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
@@ -24957,6 +25195,129 @@ export const ReachFormsApiAxiosParamCreator = function (configuration) {
24957
25195
  options: localVarRequestOptions,
24958
25196
  };
24959
25197
  }),
25198
+ /**
25199
+ * 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.
25200
+ * @summary Remove form submitter tag
25201
+ * @param {string} profileUuid Profile uuid parameter
25202
+ * @param {string} formUuid Form uuid parameter
25203
+ * @param {ReachV1FormsRemoveTagRequest} reachV1FormsRemoveTagRequest
25204
+ * @param {*} [options] Override http request option.
25205
+ * @throws {RequiredError}
25206
+ */
25207
+ 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 = {}) {
25208
+ // verify required parameter 'profileUuid' is not null or undefined
25209
+ assertParamExists('removeFormSubmitterTagV1', 'profileUuid', profileUuid);
25210
+ // verify required parameter 'formUuid' is not null or undefined
25211
+ assertParamExists('removeFormSubmitterTagV1', 'formUuid', formUuid);
25212
+ // verify required parameter 'reachV1FormsRemoveTagRequest' is not null or undefined
25213
+ assertParamExists('removeFormSubmitterTagV1', 'reachV1FormsRemoveTagRequest', reachV1FormsRemoveTagRequest);
25214
+ const localVarPath = `/api/reach/v1/profiles/{profileUuid}/forms/{formUuid}/tags`
25215
+ .replace(`{${"profileUuid"}}`, encodeURIComponent(String(profileUuid)))
25216
+ .replace(`{${"formUuid"}}`, encodeURIComponent(String(formUuid)));
25217
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
25218
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
25219
+ let baseOptions;
25220
+ if (configuration) {
25221
+ baseOptions = configuration.baseOptions;
25222
+ }
25223
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'DELETE' }, baseOptions), options);
25224
+ const localVarHeaderParameter = {};
25225
+ const localVarQueryParameter = {};
25226
+ // authentication apiToken required
25227
+ // http bearer authentication required
25228
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
25229
+ localVarHeaderParameter['Content-Type'] = 'application/json';
25230
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
25231
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
25232
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
25233
+ localVarRequestOptions.data = serializeDataIfNeeded(reachV1FormsRemoveTagRequest, localVarRequestOptions, configuration);
25234
+ return {
25235
+ url: toPathString(localVarUrlObj),
25236
+ options: localVarRequestOptions,
25237
+ };
25238
+ }),
25239
+ /**
25240
+ * 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.
25241
+ * @summary Update form template
25242
+ * @param {string} profileUuid Profile uuid parameter
25243
+ * @param {string} formUuid Form uuid parameter
25244
+ * @param {ReachV1FormsUpdateTemplateRequest} reachV1FormsUpdateTemplateRequest
25245
+ * @param {*} [options] Override http request option.
25246
+ * @throws {RequiredError}
25247
+ */
25248
+ 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 = {}) {
25249
+ // verify required parameter 'profileUuid' is not null or undefined
25250
+ assertParamExists('updateFormTemplateV1', 'profileUuid', profileUuid);
25251
+ // verify required parameter 'formUuid' is not null or undefined
25252
+ assertParamExists('updateFormTemplateV1', 'formUuid', formUuid);
25253
+ // verify required parameter 'reachV1FormsUpdateTemplateRequest' is not null or undefined
25254
+ assertParamExists('updateFormTemplateV1', 'reachV1FormsUpdateTemplateRequest', reachV1FormsUpdateTemplateRequest);
25255
+ const localVarPath = `/api/reach/v1/profiles/{profileUuid}/forms/{formUuid}/template`
25256
+ .replace(`{${"profileUuid"}}`, encodeURIComponent(String(profileUuid)))
25257
+ .replace(`{${"formUuid"}}`, encodeURIComponent(String(formUuid)));
25258
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
25259
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
25260
+ let baseOptions;
25261
+ if (configuration) {
25262
+ baseOptions = configuration.baseOptions;
25263
+ }
25264
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'PATCH' }, baseOptions), options);
25265
+ const localVarHeaderParameter = {};
25266
+ const localVarQueryParameter = {};
25267
+ // authentication apiToken required
25268
+ // http bearer authentication required
25269
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
25270
+ localVarHeaderParameter['Content-Type'] = 'application/json';
25271
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
25272
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
25273
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
25274
+ localVarRequestOptions.data = serializeDataIfNeeded(reachV1FormsUpdateTemplateRequest, localVarRequestOptions, configuration);
25275
+ return {
25276
+ url: toPathString(localVarUrlObj),
25277
+ options: localVarRequestOptions,
25278
+ };
25279
+ }),
25280
+ /**
25281
+ * 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.
25282
+ * @summary Update form
25283
+ * @param {string} profileUuid Profile uuid parameter
25284
+ * @param {string} formUuid Form uuid parameter
25285
+ * @param {ReachV1FormsUpdateRequest} reachV1FormsUpdateRequest
25286
+ * @param {*} [options] Override http request option.
25287
+ * @throws {RequiredError}
25288
+ */
25289
+ 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 = {}) {
25290
+ // verify required parameter 'profileUuid' is not null or undefined
25291
+ assertParamExists('updateFormV1', 'profileUuid', profileUuid);
25292
+ // verify required parameter 'formUuid' is not null or undefined
25293
+ assertParamExists('updateFormV1', 'formUuid', formUuid);
25294
+ // verify required parameter 'reachV1FormsUpdateRequest' is not null or undefined
25295
+ assertParamExists('updateFormV1', 'reachV1FormsUpdateRequest', reachV1FormsUpdateRequest);
25296
+ const localVarPath = `/api/reach/v1/profiles/{profileUuid}/forms/{formUuid}`
25297
+ .replace(`{${"profileUuid"}}`, encodeURIComponent(String(profileUuid)))
25298
+ .replace(`{${"formUuid"}}`, encodeURIComponent(String(formUuid)));
25299
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
25300
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
25301
+ let baseOptions;
25302
+ if (configuration) {
25303
+ baseOptions = configuration.baseOptions;
25304
+ }
25305
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'PATCH' }, baseOptions), options);
25306
+ const localVarHeaderParameter = {};
25307
+ const localVarQueryParameter = {};
25308
+ // authentication apiToken required
25309
+ // http bearer authentication required
25310
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
25311
+ localVarHeaderParameter['Content-Type'] = 'application/json';
25312
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
25313
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
25314
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
25315
+ localVarRequestOptions.data = serializeDataIfNeeded(reachV1FormsUpdateRequest, localVarRequestOptions, configuration);
25316
+ return {
25317
+ url: toPathString(localVarUrlObj),
25318
+ options: localVarRequestOptions,
25319
+ };
25320
+ }),
24960
25321
  };
24961
25322
  };
24962
25323
  /**
@@ -24966,6 +25327,39 @@ export const ReachFormsApiAxiosParamCreator = function (configuration) {
24966
25327
  export const ReachFormsApiFp = function (configuration) {
24967
25328
  const localVarAxiosParamCreator = ReachFormsApiAxiosParamCreator(configuration);
24968
25329
  return {
25330
+ /**
25331
+ * 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.
25332
+ * @summary Add form submitter tags
25333
+ * @param {string} profileUuid Profile uuid parameter
25334
+ * @param {string} formUuid Form uuid parameter
25335
+ * @param {ReachV1FormsAssignTagsRequest} reachV1FormsAssignTagsRequest
25336
+ * @param {*} [options] Override http request option.
25337
+ * @throws {RequiredError}
25338
+ */
25339
+ addFormSubmitterTagsV1(profileUuid, formUuid, reachV1FormsAssignTagsRequest, options) {
25340
+ return __awaiter(this, void 0, void 0, function* () {
25341
+ var _a, _b;
25342
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.addFormSubmitterTagsV1(profileUuid, formUuid, reachV1FormsAssignTagsRequest, options);
25343
+ const localVarOperationServerBasePath = (_b = (_a = operationServerMap['ReachFormsApi.addFormSubmitterTagsV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
25344
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
25345
+ });
25346
+ },
25347
+ /**
25348
+ * 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.
25349
+ * @summary Create form
25350
+ * @param {string} profileUuid Profile uuid parameter
25351
+ * @param {ReachV1FormsStoreRequest} reachV1FormsStoreRequest
25352
+ * @param {*} [options] Override http request option.
25353
+ * @throws {RequiredError}
25354
+ */
25355
+ createFormV1(profileUuid, reachV1FormsStoreRequest, options) {
25356
+ return __awaiter(this, void 0, void 0, function* () {
25357
+ var _a, _b;
25358
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.createFormV1(profileUuid, reachV1FormsStoreRequest, options);
25359
+ const localVarOperationServerBasePath = (_b = (_a = operationServerMap['ReachFormsApi.createFormV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
25360
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
25361
+ });
25362
+ },
24969
25363
  /**
24970
25364
  * 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
25365
  * @summary Delete form
@@ -24982,6 +25376,22 @@ export const ReachFormsApiFp = function (configuration) {
24982
25376
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
24983
25377
  });
24984
25378
  },
25379
+ /**
25380
+ * 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`.
25381
+ * @summary Duplicate form
25382
+ * @param {string} profileUuid Profile uuid parameter
25383
+ * @param {string} formUuid Form uuid parameter
25384
+ * @param {*} [options] Override http request option.
25385
+ * @throws {RequiredError}
25386
+ */
25387
+ duplicateFormV1(profileUuid, formUuid, options) {
25388
+ return __awaiter(this, void 0, void 0, function* () {
25389
+ var _a, _b;
25390
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.duplicateFormV1(profileUuid, formUuid, options);
25391
+ const localVarOperationServerBasePath = (_b = (_a = operationServerMap['ReachFormsApi.duplicateFormV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
25392
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
25393
+ });
25394
+ },
24985
25395
  /**
24986
25396
  * 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
25397
  * @summary Get form details
@@ -25004,17 +25414,69 @@ export const ReachFormsApiFp = function (configuration) {
25004
25414
  * @param {string} profileUuid Profile uuid parameter
25005
25415
  * @param {number} [page] Page number
25006
25416
  * @param {number} [perPage] Number of items per page
25417
+ * @param {ListFormsV1StatusEnum} [status] Return only forms with this status.
25007
25418
  * @param {*} [options] Override http request option.
25008
25419
  * @throws {RequiredError}
25009
25420
  */
25010
- listFormsV1(profileUuid, page, perPage, options) {
25421
+ listFormsV1(profileUuid, page, perPage, status, options) {
25011
25422
  return __awaiter(this, void 0, void 0, function* () {
25012
25423
  var _a, _b;
25013
- const localVarAxiosArgs = yield localVarAxiosParamCreator.listFormsV1(profileUuid, page, perPage, options);
25424
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.listFormsV1(profileUuid, page, perPage, status, options);
25014
25425
  const localVarOperationServerBasePath = (_b = (_a = operationServerMap['ReachFormsApi.listFormsV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
25015
25426
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
25016
25427
  });
25017
25428
  },
25429
+ /**
25430
+ * 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.
25431
+ * @summary Remove form submitter tag
25432
+ * @param {string} profileUuid Profile uuid parameter
25433
+ * @param {string} formUuid Form uuid parameter
25434
+ * @param {ReachV1FormsRemoveTagRequest} reachV1FormsRemoveTagRequest
25435
+ * @param {*} [options] Override http request option.
25436
+ * @throws {RequiredError}
25437
+ */
25438
+ removeFormSubmitterTagV1(profileUuid, formUuid, reachV1FormsRemoveTagRequest, options) {
25439
+ return __awaiter(this, void 0, void 0, function* () {
25440
+ var _a, _b;
25441
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.removeFormSubmitterTagV1(profileUuid, formUuid, reachV1FormsRemoveTagRequest, options);
25442
+ const localVarOperationServerBasePath = (_b = (_a = operationServerMap['ReachFormsApi.removeFormSubmitterTagV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
25443
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
25444
+ });
25445
+ },
25446
+ /**
25447
+ * 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.
25448
+ * @summary Update form template
25449
+ * @param {string} profileUuid Profile uuid parameter
25450
+ * @param {string} formUuid Form uuid parameter
25451
+ * @param {ReachV1FormsUpdateTemplateRequest} reachV1FormsUpdateTemplateRequest
25452
+ * @param {*} [options] Override http request option.
25453
+ * @throws {RequiredError}
25454
+ */
25455
+ updateFormTemplateV1(profileUuid, formUuid, reachV1FormsUpdateTemplateRequest, options) {
25456
+ return __awaiter(this, void 0, void 0, function* () {
25457
+ var _a, _b;
25458
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.updateFormTemplateV1(profileUuid, formUuid, reachV1FormsUpdateTemplateRequest, options);
25459
+ const localVarOperationServerBasePath = (_b = (_a = operationServerMap['ReachFormsApi.updateFormTemplateV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
25460
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
25461
+ });
25462
+ },
25463
+ /**
25464
+ * 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.
25465
+ * @summary Update form
25466
+ * @param {string} profileUuid Profile uuid parameter
25467
+ * @param {string} formUuid Form uuid parameter
25468
+ * @param {ReachV1FormsUpdateRequest} reachV1FormsUpdateRequest
25469
+ * @param {*} [options] Override http request option.
25470
+ * @throws {RequiredError}
25471
+ */
25472
+ updateFormV1(profileUuid, formUuid, reachV1FormsUpdateRequest, options) {
25473
+ return __awaiter(this, void 0, void 0, function* () {
25474
+ var _a, _b;
25475
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.updateFormV1(profileUuid, formUuid, reachV1FormsUpdateRequest, options);
25476
+ const localVarOperationServerBasePath = (_b = (_a = operationServerMap['ReachFormsApi.updateFormV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
25477
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
25478
+ });
25479
+ },
25018
25480
  };
25019
25481
  };
25020
25482
  /**
@@ -25024,6 +25486,29 @@ export const ReachFormsApiFp = function (configuration) {
25024
25486
  export const ReachFormsApiFactory = function (configuration, basePath, axios) {
25025
25487
  const localVarFp = ReachFormsApiFp(configuration);
25026
25488
  return {
25489
+ /**
25490
+ * 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.
25491
+ * @summary Add form submitter tags
25492
+ * @param {string} profileUuid Profile uuid parameter
25493
+ * @param {string} formUuid Form uuid parameter
25494
+ * @param {ReachV1FormsAssignTagsRequest} reachV1FormsAssignTagsRequest
25495
+ * @param {*} [options] Override http request option.
25496
+ * @throws {RequiredError}
25497
+ */
25498
+ addFormSubmitterTagsV1(profileUuid, formUuid, reachV1FormsAssignTagsRequest, options) {
25499
+ return localVarFp.addFormSubmitterTagsV1(profileUuid, formUuid, reachV1FormsAssignTagsRequest, options).then((request) => request(axios, basePath));
25500
+ },
25501
+ /**
25502
+ * 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.
25503
+ * @summary Create form
25504
+ * @param {string} profileUuid Profile uuid parameter
25505
+ * @param {ReachV1FormsStoreRequest} reachV1FormsStoreRequest
25506
+ * @param {*} [options] Override http request option.
25507
+ * @throws {RequiredError}
25508
+ */
25509
+ createFormV1(profileUuid, reachV1FormsStoreRequest, options) {
25510
+ return localVarFp.createFormV1(profileUuid, reachV1FormsStoreRequest, options).then((request) => request(axios, basePath));
25511
+ },
25027
25512
  /**
25028
25513
  * 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
25514
  * @summary Delete form
@@ -25035,6 +25520,17 @@ export const ReachFormsApiFactory = function (configuration, basePath, axios) {
25035
25520
  deleteFormV1(profileUuid, formUuid, options) {
25036
25521
  return localVarFp.deleteFormV1(profileUuid, formUuid, options).then((request) => request(axios, basePath));
25037
25522
  },
25523
+ /**
25524
+ * 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`.
25525
+ * @summary Duplicate form
25526
+ * @param {string} profileUuid Profile uuid parameter
25527
+ * @param {string} formUuid Form uuid parameter
25528
+ * @param {*} [options] Override http request option.
25529
+ * @throws {RequiredError}
25530
+ */
25531
+ duplicateFormV1(profileUuid, formUuid, options) {
25532
+ return localVarFp.duplicateFormV1(profileUuid, formUuid, options).then((request) => request(axios, basePath));
25533
+ },
25038
25534
  /**
25039
25535
  * 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
25536
  * @summary Get form details
@@ -25052,11 +25548,48 @@ export const ReachFormsApiFactory = function (configuration, basePath, axios) {
25052
25548
  * @param {string} profileUuid Profile uuid parameter
25053
25549
  * @param {number} [page] Page number
25054
25550
  * @param {number} [perPage] Number of items per page
25551
+ * @param {ListFormsV1StatusEnum} [status] Return only forms with this status.
25552
+ * @param {*} [options] Override http request option.
25553
+ * @throws {RequiredError}
25554
+ */
25555
+ listFormsV1(profileUuid, page, perPage, status, options) {
25556
+ return localVarFp.listFormsV1(profileUuid, page, perPage, status, options).then((request) => request(axios, basePath));
25557
+ },
25558
+ /**
25559
+ * 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.
25560
+ * @summary Remove form submitter tag
25561
+ * @param {string} profileUuid Profile uuid parameter
25562
+ * @param {string} formUuid Form uuid parameter
25563
+ * @param {ReachV1FormsRemoveTagRequest} reachV1FormsRemoveTagRequest
25564
+ * @param {*} [options] Override http request option.
25565
+ * @throws {RequiredError}
25566
+ */
25567
+ removeFormSubmitterTagV1(profileUuid, formUuid, reachV1FormsRemoveTagRequest, options) {
25568
+ return localVarFp.removeFormSubmitterTagV1(profileUuid, formUuid, reachV1FormsRemoveTagRequest, options).then((request) => request(axios, basePath));
25569
+ },
25570
+ /**
25571
+ * 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.
25572
+ * @summary Update form template
25573
+ * @param {string} profileUuid Profile uuid parameter
25574
+ * @param {string} formUuid Form uuid parameter
25575
+ * @param {ReachV1FormsUpdateTemplateRequest} reachV1FormsUpdateTemplateRequest
25055
25576
  * @param {*} [options] Override http request option.
25056
25577
  * @throws {RequiredError}
25057
25578
  */
25058
- listFormsV1(profileUuid, page, perPage, options) {
25059
- return localVarFp.listFormsV1(profileUuid, page, perPage, options).then((request) => request(axios, basePath));
25579
+ updateFormTemplateV1(profileUuid, formUuid, reachV1FormsUpdateTemplateRequest, options) {
25580
+ return localVarFp.updateFormTemplateV1(profileUuid, formUuid, reachV1FormsUpdateTemplateRequest, options).then((request) => request(axios, basePath));
25581
+ },
25582
+ /**
25583
+ * 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.
25584
+ * @summary Update form
25585
+ * @param {string} profileUuid Profile uuid parameter
25586
+ * @param {string} formUuid Form uuid parameter
25587
+ * @param {ReachV1FormsUpdateRequest} reachV1FormsUpdateRequest
25588
+ * @param {*} [options] Override http request option.
25589
+ * @throws {RequiredError}
25590
+ */
25591
+ updateFormV1(profileUuid, formUuid, reachV1FormsUpdateRequest, options) {
25592
+ return localVarFp.updateFormV1(profileUuid, formUuid, reachV1FormsUpdateRequest, options).then((request) => request(axios, basePath));
25060
25593
  },
25061
25594
  };
25062
25595
  };
@@ -25067,6 +25600,31 @@ export const ReachFormsApiFactory = function (configuration, basePath, axios) {
25067
25600
  * @extends {BaseAPI}
25068
25601
  */
25069
25602
  export class ReachFormsApi extends BaseAPI {
25603
+ /**
25604
+ * 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.
25605
+ * @summary Add form submitter tags
25606
+ * @param {string} profileUuid Profile uuid parameter
25607
+ * @param {string} formUuid Form uuid parameter
25608
+ * @param {ReachV1FormsAssignTagsRequest} reachV1FormsAssignTagsRequest
25609
+ * @param {*} [options] Override http request option.
25610
+ * @throws {RequiredError}
25611
+ * @memberof ReachFormsApi
25612
+ */
25613
+ addFormSubmitterTagsV1(profileUuid, formUuid, reachV1FormsAssignTagsRequest, options) {
25614
+ return ReachFormsApiFp(this.configuration).addFormSubmitterTagsV1(profileUuid, formUuid, reachV1FormsAssignTagsRequest, options).then((request) => request(this.axios, this.basePath));
25615
+ }
25616
+ /**
25617
+ * 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.
25618
+ * @summary Create form
25619
+ * @param {string} profileUuid Profile uuid parameter
25620
+ * @param {ReachV1FormsStoreRequest} reachV1FormsStoreRequest
25621
+ * @param {*} [options] Override http request option.
25622
+ * @throws {RequiredError}
25623
+ * @memberof ReachFormsApi
25624
+ */
25625
+ createFormV1(profileUuid, reachV1FormsStoreRequest, options) {
25626
+ return ReachFormsApiFp(this.configuration).createFormV1(profileUuid, reachV1FormsStoreRequest, options).then((request) => request(this.axios, this.basePath));
25627
+ }
25070
25628
  /**
25071
25629
  * 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
25630
  * @summary Delete form
@@ -25079,6 +25637,18 @@ export class ReachFormsApi extends BaseAPI {
25079
25637
  deleteFormV1(profileUuid, formUuid, options) {
25080
25638
  return ReachFormsApiFp(this.configuration).deleteFormV1(profileUuid, formUuid, options).then((request) => request(this.axios, this.basePath));
25081
25639
  }
25640
+ /**
25641
+ * 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`.
25642
+ * @summary Duplicate form
25643
+ * @param {string} profileUuid Profile uuid parameter
25644
+ * @param {string} formUuid Form uuid parameter
25645
+ * @param {*} [options] Override http request option.
25646
+ * @throws {RequiredError}
25647
+ * @memberof ReachFormsApi
25648
+ */
25649
+ duplicateFormV1(profileUuid, formUuid, options) {
25650
+ return ReachFormsApiFp(this.configuration).duplicateFormV1(profileUuid, formUuid, options).then((request) => request(this.axios, this.basePath));
25651
+ }
25082
25652
  /**
25083
25653
  * 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
25654
  * @summary Get form details
@@ -25097,14 +25667,62 @@ export class ReachFormsApi extends BaseAPI {
25097
25667
  * @param {string} profileUuid Profile uuid parameter
25098
25668
  * @param {number} [page] Page number
25099
25669
  * @param {number} [perPage] Number of items per page
25670
+ * @param {ListFormsV1StatusEnum} [status] Return only forms with this status.
25100
25671
  * @param {*} [options] Override http request option.
25101
25672
  * @throws {RequiredError}
25102
25673
  * @memberof ReachFormsApi
25103
25674
  */
25104
- listFormsV1(profileUuid, page, perPage, options) {
25105
- return ReachFormsApiFp(this.configuration).listFormsV1(profileUuid, page, perPage, options).then((request) => request(this.axios, this.basePath));
25675
+ listFormsV1(profileUuid, page, perPage, status, options) {
25676
+ return ReachFormsApiFp(this.configuration).listFormsV1(profileUuid, page, perPage, status, options).then((request) => request(this.axios, this.basePath));
25677
+ }
25678
+ /**
25679
+ * 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.
25680
+ * @summary Remove form submitter tag
25681
+ * @param {string} profileUuid Profile uuid parameter
25682
+ * @param {string} formUuid Form uuid parameter
25683
+ * @param {ReachV1FormsRemoveTagRequest} reachV1FormsRemoveTagRequest
25684
+ * @param {*} [options] Override http request option.
25685
+ * @throws {RequiredError}
25686
+ * @memberof ReachFormsApi
25687
+ */
25688
+ removeFormSubmitterTagV1(profileUuid, formUuid, reachV1FormsRemoveTagRequest, options) {
25689
+ return ReachFormsApiFp(this.configuration).removeFormSubmitterTagV1(profileUuid, formUuid, reachV1FormsRemoveTagRequest, options).then((request) => request(this.axios, this.basePath));
25690
+ }
25691
+ /**
25692
+ * 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.
25693
+ * @summary Update form template
25694
+ * @param {string} profileUuid Profile uuid parameter
25695
+ * @param {string} formUuid Form uuid parameter
25696
+ * @param {ReachV1FormsUpdateTemplateRequest} reachV1FormsUpdateTemplateRequest
25697
+ * @param {*} [options] Override http request option.
25698
+ * @throws {RequiredError}
25699
+ * @memberof ReachFormsApi
25700
+ */
25701
+ updateFormTemplateV1(profileUuid, formUuid, reachV1FormsUpdateTemplateRequest, options) {
25702
+ return ReachFormsApiFp(this.configuration).updateFormTemplateV1(profileUuid, formUuid, reachV1FormsUpdateTemplateRequest, options).then((request) => request(this.axios, this.basePath));
25703
+ }
25704
+ /**
25705
+ * 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.
25706
+ * @summary Update form
25707
+ * @param {string} profileUuid Profile uuid parameter
25708
+ * @param {string} formUuid Form uuid parameter
25709
+ * @param {ReachV1FormsUpdateRequest} reachV1FormsUpdateRequest
25710
+ * @param {*} [options] Override http request option.
25711
+ * @throws {RequiredError}
25712
+ * @memberof ReachFormsApi
25713
+ */
25714
+ updateFormV1(profileUuid, formUuid, reachV1FormsUpdateRequest, options) {
25715
+ return ReachFormsApiFp(this.configuration).updateFormV1(profileUuid, formUuid, reachV1FormsUpdateRequest, options).then((request) => request(this.axios, this.basePath));
25106
25716
  }
25107
25717
  }
25718
+ /**
25719
+ * @export
25720
+ */
25721
+ export const ListFormsV1StatusEnum = {
25722
+ Active: 'active',
25723
+ Paused: 'paused',
25724
+ Draft: 'draft'
25725
+ };
25108
25726
  /**
25109
25727
  * ReachProfilesApi - axios parameter creator
25110
25728
  * @export