hostinger-api-sdk 1.32.0 → 1.33.1

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/api.ts CHANGED
@@ -3,7 +3,7 @@
3
3
  /**
4
4
  * Hostinger API
5
5
  *
6
- * API Version: 1.34.0
6
+ * API Version: 1.35.1
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
@@ -5034,11 +5034,24 @@ export interface HostingV1NodeJsBuildOptionsResource {
5034
5034
 
5035
5035
  export const HostingV1NodeJsBuildOptionsResourceAppTypeEnum = {
5036
5036
  CreateReactApp: 'create-react-app',
5037
+ Gatsby: 'gatsby',
5037
5038
  Vite: 'vite',
5038
5039
  Angular: 'angular',
5039
5040
  React: 'react',
5040
5041
  Vue: 'vue',
5041
- Parcel: 'parcel'
5042
+ Parcel: 'parcel',
5043
+ Next: 'next',
5044
+ Nuxt: 'nuxt',
5045
+ Nest: 'nest',
5046
+ Express: 'express',
5047
+ Fastify: 'fastify',
5048
+ Astro: 'astro',
5049
+ Svelte: 'svelte',
5050
+ SvelteKit: 'svelte-kit',
5051
+ Hono: 'hono',
5052
+ ReactRouter: 'react-router',
5053
+ Nitro: 'nitro',
5054
+ Other: 'other'
5042
5055
  } as const;
5043
5056
 
5044
5057
  export type HostingV1NodeJsBuildOptionsResourceAppTypeEnum = typeof HostingV1NodeJsBuildOptionsResourceAppTypeEnum[keyof typeof HostingV1NodeJsBuildOptionsResourceAppTypeEnum];
@@ -5168,14 +5181,24 @@ export const HostingV1NodeJsCreateFromArchiveRequestNodeVersionEnum = {
5168
5181
  export type HostingV1NodeJsCreateFromArchiveRequestNodeVersionEnum = typeof HostingV1NodeJsCreateFromArchiveRequestNodeVersionEnum[keyof typeof HostingV1NodeJsCreateFromArchiveRequestNodeVersionEnum];
5169
5182
  export const HostingV1NodeJsCreateFromArchiveRequestAppTypeEnum = {
5170
5183
  CreateReactApp: 'create-react-app',
5184
+ Gatsby: 'gatsby',
5171
5185
  Vite: 'vite',
5172
5186
  Angular: 'angular',
5173
5187
  React: 'react',
5174
5188
  Vue: 'vue',
5175
5189
  Parcel: 'parcel',
5190
+ Next: 'next',
5191
+ Nuxt: 'nuxt',
5192
+ Nest: 'nest',
5176
5193
  Express: 'express',
5177
5194
  Fastify: 'fastify',
5178
- Nest: 'nest'
5195
+ Astro: 'astro',
5196
+ Svelte: 'svelte',
5197
+ SvelteKit: 'svelte-kit',
5198
+ Hono: 'hono',
5199
+ ReactRouter: 'react-router',
5200
+ Nitro: 'nitro',
5201
+ Other: 'other'
5179
5202
  } as const;
5180
5203
 
5181
5204
  export type HostingV1NodeJsCreateFromArchiveRequestAppTypeEnum = typeof HostingV1NodeJsCreateFromArchiveRequestAppTypeEnum[keyof typeof HostingV1NodeJsCreateFromArchiveRequestAppTypeEnum];
@@ -7828,6 +7851,25 @@ export interface ReachListContactsV1200Response {
7828
7851
  */
7829
7852
  'meta': CommonSchemaPaginationMetaSchema;
7830
7853
  }
7854
+ /**
7855
+ *
7856
+ * @export
7857
+ * @interface ReachListFormsV1200Response
7858
+ */
7859
+ export interface ReachListFormsV1200Response {
7860
+ /**
7861
+ * Array of [`Reach.V1.Forms.FormResource`](#model/reachv1formsformresource)
7862
+ * @type {Array<ReachV1FormsFormResource>}
7863
+ * @memberof ReachListFormsV1200Response
7864
+ */
7865
+ 'data': Array<ReachV1FormsFormResource>;
7866
+ /**
7867
+ *
7868
+ * @type {CommonSchemaPaginationMetaSchema}
7869
+ * @memberof ReachListFormsV1200Response
7870
+ */
7871
+ 'meta': CommonSchemaPaginationMetaSchema;
7872
+ }
7831
7873
  /**
7832
7874
  *
7833
7875
  * @export
@@ -9715,6 +9757,217 @@ export interface ReachV1ContactsUpdateRequestFieldsInner {
9715
9757
  */
9716
9758
  'selected_option_uuids': Array<string>;
9717
9759
  }
9760
+ /**
9761
+ *
9762
+ * @export
9763
+ * @interface ReachV1FormsFormDetailsResource
9764
+ */
9765
+ export interface ReachV1FormsFormDetailsResource {
9766
+ /**
9767
+ *
9768
+ * @type {string}
9769
+ * @memberof ReachV1FormsFormDetailsResource
9770
+ */
9771
+ 'uuid': string;
9772
+ /**
9773
+ *
9774
+ * @type {string}
9775
+ * @memberof ReachV1FormsFormDetailsResource
9776
+ */
9777
+ 'name': string;
9778
+ /**
9779
+ * A `paused` form keeps its template online but stops accepting submissions.
9780
+ * @type {string}
9781
+ * @memberof ReachV1FormsFormDetailsResource
9782
+ */
9783
+ 'status': ReachV1FormsFormDetailsResourceStatusEnum;
9784
+ /**
9785
+ *
9786
+ * @type {string}
9787
+ * @memberof ReachV1FormsFormDetailsResource
9788
+ */
9789
+ 'type': ReachV1FormsFormDetailsResourceTypeEnum;
9790
+ /**
9791
+ *
9792
+ * @type {ReachV1FormsFormTemplateDetailsResource}
9793
+ * @memberof ReachV1FormsFormDetailsResource
9794
+ */
9795
+ 'template': ReachV1FormsFormTemplateDetailsResource;
9796
+ /**
9797
+ * Tags applied to every contact this form captures.
9798
+ * @type {Array<ReachV1FormsFormTagResource>}
9799
+ * @memberof ReachV1FormsFormDetailsResource
9800
+ */
9801
+ 'tags': Array<ReachV1FormsFormTagResource>;
9802
+ /**
9803
+ *
9804
+ * @type {string}
9805
+ * @memberof ReachV1FormsFormDetailsResource
9806
+ */
9807
+ 'created_at': string;
9808
+ /**
9809
+ *
9810
+ * @type {string}
9811
+ * @memberof ReachV1FormsFormDetailsResource
9812
+ */
9813
+ 'updated_at': string | null;
9814
+ }
9815
+
9816
+ export const ReachV1FormsFormDetailsResourceStatusEnum = {
9817
+ Active: 'active',
9818
+ Paused: 'paused',
9819
+ Draft: 'draft'
9820
+ } as const;
9821
+
9822
+ export type ReachV1FormsFormDetailsResourceStatusEnum = typeof ReachV1FormsFormDetailsResourceStatusEnum[keyof typeof ReachV1FormsFormDetailsResourceStatusEnum];
9823
+ export const ReachV1FormsFormDetailsResourceTypeEnum = {
9824
+ Form: 'form'
9825
+ } as const;
9826
+
9827
+ export type ReachV1FormsFormDetailsResourceTypeEnum = typeof ReachV1FormsFormDetailsResourceTypeEnum[keyof typeof ReachV1FormsFormDetailsResourceTypeEnum];
9828
+
9829
+ /**
9830
+ *
9831
+ * @export
9832
+ * @interface ReachV1FormsFormResource
9833
+ */
9834
+ export interface ReachV1FormsFormResource {
9835
+ /**
9836
+ *
9837
+ * @type {string}
9838
+ * @memberof ReachV1FormsFormResource
9839
+ */
9840
+ 'uuid': string;
9841
+ /**
9842
+ *
9843
+ * @type {string}
9844
+ * @memberof ReachV1FormsFormResource
9845
+ */
9846
+ 'name': string;
9847
+ /**
9848
+ * A `paused` form keeps its template online but stops accepting submissions.
9849
+ * @type {string}
9850
+ * @memberof ReachV1FormsFormResource
9851
+ */
9852
+ 'status': ReachV1FormsFormResourceStatusEnum;
9853
+ /**
9854
+ *
9855
+ * @type {string}
9856
+ * @memberof ReachV1FormsFormResource
9857
+ */
9858
+ 'type': ReachV1FormsFormResourceTypeEnum;
9859
+ /**
9860
+ *
9861
+ * @type {ReachV1FormsFormTemplateResource}
9862
+ * @memberof ReachV1FormsFormResource
9863
+ */
9864
+ 'template': ReachV1FormsFormTemplateResource;
9865
+ /**
9866
+ *
9867
+ * @type {string}
9868
+ * @memberof ReachV1FormsFormResource
9869
+ */
9870
+ 'created_at': string;
9871
+ /**
9872
+ *
9873
+ * @type {string}
9874
+ * @memberof ReachV1FormsFormResource
9875
+ */
9876
+ 'updated_at': string | null;
9877
+ }
9878
+
9879
+ export const ReachV1FormsFormResourceStatusEnum = {
9880
+ Active: 'active',
9881
+ Paused: 'paused',
9882
+ Draft: 'draft'
9883
+ } as const;
9884
+
9885
+ export type ReachV1FormsFormResourceStatusEnum = typeof ReachV1FormsFormResourceStatusEnum[keyof typeof ReachV1FormsFormResourceStatusEnum];
9886
+ export const ReachV1FormsFormResourceTypeEnum = {
9887
+ Form: 'form'
9888
+ } as const;
9889
+
9890
+ export type ReachV1FormsFormResourceTypeEnum = typeof ReachV1FormsFormResourceTypeEnum[keyof typeof ReachV1FormsFormResourceTypeEnum];
9891
+
9892
+ /**
9893
+ * A tag applied to every contact this form captures.
9894
+ * @export
9895
+ * @interface ReachV1FormsFormTagResource
9896
+ */
9897
+ export interface ReachV1FormsFormTagResource {
9898
+ /**
9899
+ *
9900
+ * @type {string}
9901
+ * @memberof ReachV1FormsFormTagResource
9902
+ */
9903
+ 'uuid': string;
9904
+ /**
9905
+ *
9906
+ * @type {string}
9907
+ * @memberof ReachV1FormsFormTagResource
9908
+ */
9909
+ 'value': string;
9910
+ /**
9911
+ * How the tag came about. `custom` covers the tags you create yourself, `import` the ones added by contact imports, and `form` and `system` the ones Reach creates on its own. Every form gets a `form:{name}` tag when it is created.
9912
+ * @type {string}
9913
+ * @memberof ReachV1FormsFormTagResource
9914
+ */
9915
+ 'type': ReachV1FormsFormTagResourceTypeEnum;
9916
+ }
9917
+
9918
+ export const ReachV1FormsFormTagResourceTypeEnum = {
9919
+ Form: 'form',
9920
+ Custom: 'custom',
9921
+ Import: 'import',
9922
+ System: 'system'
9923
+ } as const;
9924
+
9925
+ export type ReachV1FormsFormTagResourceTypeEnum = typeof ReachV1FormsFormTagResourceTypeEnum[keyof typeof ReachV1FormsFormTagResourceTypeEnum];
9926
+
9927
+ /**
9928
+ * The rendered form template. There is no ready-made embed snippet - either serve the HTML behind `url` or build your own embed around the form uuid. All fields stay null until the template has been generated.
9929
+ * @export
9930
+ * @interface ReachV1FormsFormTemplateDetailsResource
9931
+ */
9932
+ export interface ReachV1FormsFormTemplateDetailsResource {
9933
+ /**
9934
+ *
9935
+ * @type {string}
9936
+ * @memberof ReachV1FormsFormTemplateDetailsResource
9937
+ */
9938
+ 'uuid': string | null;
9939
+ /**
9940
+ * Storage path of the template HTML, relative to the storage directory of this profile. `url` already includes that prefix, so prefer it unless you resolve storage paths yourself.
9941
+ * @type {string}
9942
+ * @memberof ReachV1FormsFormTemplateDetailsResource
9943
+ */
9944
+ 'path': string | null;
9945
+ /**
9946
+ * Publicly reachable URL of the template HTML.
9947
+ * @type {string}
9948
+ * @memberof ReachV1FormsFormTemplateDetailsResource
9949
+ */
9950
+ 'url': string | null;
9951
+ }
9952
+ /**
9953
+ * The rendered form template. Both fields stay null until the template has been generated.
9954
+ * @export
9955
+ * @interface ReachV1FormsFormTemplateResource
9956
+ */
9957
+ export interface ReachV1FormsFormTemplateResource {
9958
+ /**
9959
+ *
9960
+ * @type {string}
9961
+ * @memberof ReachV1FormsFormTemplateResource
9962
+ */
9963
+ 'uuid': string | null;
9964
+ /**
9965
+ * Storage path of the template HTML, relative to the storage directory of this profile. Get the form details to receive a directly usable URL instead.
9966
+ * @type {string}
9967
+ * @memberof ReachV1FormsFormTemplateResource
9968
+ */
9969
+ 'path': string | null;
9970
+ }
9718
9971
  /**
9719
9972
  *
9720
9973
  * @export
@@ -9821,6 +10074,68 @@ export interface ReachV1ProfilesDomainsDnsStatusResource {
9821
10074
  */
9822
10075
  'dmarc': ReachV1ProfilesDomainsDnsRecordStatus;
9823
10076
  }
10077
+ /**
10078
+ * Allowance, consumption and headroom of a single plan limit for the current period.
10079
+ * @export
10080
+ * @interface ReachV1ProfilesPlanLimitUsageResource
10081
+ */
10082
+ export interface ReachV1ProfilesPlanLimitUsageResource {
10083
+ /**
10084
+ * The allowance for the current period.
10085
+ * @type {number}
10086
+ * @memberof ReachV1ProfilesPlanLimitUsageResource
10087
+ */
10088
+ 'limit': number;
10089
+ /**
10090
+ * How much of the allowance has been consumed so far.
10091
+ * @type {number}
10092
+ * @memberof ReachV1ProfilesPlanLimitUsageResource
10093
+ */
10094
+ 'used': number;
10095
+ /**
10096
+ * Headroom left. Floors at 0, so it never reports a negative overage.
10097
+ * @type {number}
10098
+ * @memberof ReachV1ProfilesPlanLimitUsageResource
10099
+ */
10100
+ 'remaining': number;
10101
+ }
10102
+ /**
10103
+ * What the plan allows and what is left of it for the current period. `emails` counts every email sent. `recipients` counts the distinct contacts emailed - it is not the size of the contact list, a contact emailed three times counts once and a contact never emailed does not count at all. `ai_credits` counts the AI generations used, and its limit includes any extra credits bought on top of the plan.
10104
+ * @export
10105
+ * @interface ReachV1ProfilesPlanLimitsResource
10106
+ */
10107
+ export interface ReachV1ProfilesPlanLimitsResource {
10108
+ /**
10109
+ *
10110
+ * @type {ReachV1ProfilesPlanLimitUsageResource}
10111
+ * @memberof ReachV1ProfilesPlanLimitsResource
10112
+ */
10113
+ 'emails': ReachV1ProfilesPlanLimitUsageResource;
10114
+ /**
10115
+ *
10116
+ * @type {ReachV1ProfilesPlanLimitUsageResource}
10117
+ * @memberof ReachV1ProfilesPlanLimitsResource
10118
+ */
10119
+ 'recipients': ReachV1ProfilesPlanLimitUsageResource;
10120
+ /**
10121
+ *
10122
+ * @type {ReachV1ProfilesPlanLimitUsageResource}
10123
+ * @memberof ReachV1ProfilesPlanLimitsResource
10124
+ */
10125
+ 'ai_credits': ReachV1ProfilesPlanLimitUsageResource;
10126
+ /**
10127
+ * Start of the current period. Periods are calendar months rather than billing anniversaries, so the counters reset at midnight UTC on the 1st no matter when the subscription started.
10128
+ * @type {string}
10129
+ * @memberof ReachV1ProfilesPlanLimitsResource
10130
+ */
10131
+ 'period_start': string;
10132
+ /**
10133
+ * End of the current period, that is the last moment of the calendar month.
10134
+ * @type {string}
10135
+ * @memberof ReachV1ProfilesPlanLimitsResource
10136
+ */
10137
+ 'period_end': string;
10138
+ }
9824
10139
  /**
9825
10140
  *
9826
10141
  * @export
@@ -31008,6 +31323,291 @@ export const ListProfileContactsV1SubscriptionStatusEnum = {
31008
31323
  export type ListProfileContactsV1SubscriptionStatusEnum = typeof ListProfileContactsV1SubscriptionStatusEnum[keyof typeof ListProfileContactsV1SubscriptionStatusEnum];
31009
31324
 
31010
31325
 
31326
+ /**
31327
+ * ReachFormsApi - axios parameter creator
31328
+ * @export
31329
+ */
31330
+ export const ReachFormsApiAxiosParamCreator = function (configuration?: Configuration) {
31331
+ return {
31332
+ /**
31333
+ * 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.
31334
+ * @summary Delete form
31335
+ * @param {string} profileUuid Profile uuid parameter
31336
+ * @param {string} formUuid Form uuid parameter
31337
+ * @param {*} [options] Override http request option.
31338
+ * @throws {RequiredError}
31339
+ */
31340
+ deleteFormV1: async (profileUuid: string, formUuid: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
31341
+ // verify required parameter 'profileUuid' is not null or undefined
31342
+ assertParamExists('deleteFormV1', 'profileUuid', profileUuid)
31343
+ // verify required parameter 'formUuid' is not null or undefined
31344
+ assertParamExists('deleteFormV1', 'formUuid', formUuid)
31345
+ const localVarPath = `/api/reach/v1/profiles/{profileUuid}/forms/{formUuid}`
31346
+ .replace(`{${"profileUuid"}}`, encodeURIComponent(String(profileUuid)))
31347
+ .replace(`{${"formUuid"}}`, encodeURIComponent(String(formUuid)));
31348
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
31349
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
31350
+ let baseOptions;
31351
+ if (configuration) {
31352
+ baseOptions = configuration.baseOptions;
31353
+ }
31354
+
31355
+ const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options};
31356
+ const localVarHeaderParameter = {} as any;
31357
+ const localVarQueryParameter = {} as any;
31358
+
31359
+ // authentication apiToken required
31360
+ // http bearer authentication required
31361
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
31362
+
31363
+
31364
+
31365
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
31366
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
31367
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
31368
+
31369
+ return {
31370
+ url: toPathString(localVarUrlObj),
31371
+ options: localVarRequestOptions,
31372
+ };
31373
+ },
31374
+ /**
31375
+ * 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.
31376
+ * @summary Get form details
31377
+ * @param {string} profileUuid Profile uuid parameter
31378
+ * @param {string} formUuid Form uuid parameter
31379
+ * @param {*} [options] Override http request option.
31380
+ * @throws {RequiredError}
31381
+ */
31382
+ getFormDetailsV1: async (profileUuid: string, formUuid: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
31383
+ // verify required parameter 'profileUuid' is not null or undefined
31384
+ assertParamExists('getFormDetailsV1', 'profileUuid', profileUuid)
31385
+ // verify required parameter 'formUuid' is not null or undefined
31386
+ assertParamExists('getFormDetailsV1', 'formUuid', formUuid)
31387
+ const localVarPath = `/api/reach/v1/profiles/{profileUuid}/forms/{formUuid}`
31388
+ .replace(`{${"profileUuid"}}`, encodeURIComponent(String(profileUuid)))
31389
+ .replace(`{${"formUuid"}}`, encodeURIComponent(String(formUuid)));
31390
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
31391
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
31392
+ let baseOptions;
31393
+ if (configuration) {
31394
+ baseOptions = configuration.baseOptions;
31395
+ }
31396
+
31397
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
31398
+ const localVarHeaderParameter = {} as any;
31399
+ const localVarQueryParameter = {} as any;
31400
+
31401
+ // authentication apiToken required
31402
+ // http bearer authentication required
31403
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
31404
+
31405
+
31406
+
31407
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
31408
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
31409
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
31410
+
31411
+ return {
31412
+ url: toPathString(localVarUrlObj),
31413
+ options: localVarRequestOptions,
31414
+ };
31415
+ },
31416
+ /**
31417
+ * Get a paginated list of the signup forms in a profile. Each form carries a reference to the template that renders it. Get the form details for a directly usable template URL and for the tags the form puts on the contacts it captures.
31418
+ * @summary List forms
31419
+ * @param {string} profileUuid Profile uuid parameter
31420
+ * @param {number} [page] Page number
31421
+ * @param {number} [perPage] Number of items per page
31422
+ * @param {*} [options] Override http request option.
31423
+ * @throws {RequiredError}
31424
+ */
31425
+ listFormsV1: async (profileUuid: string, page?: number, perPage?: number, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
31426
+ // verify required parameter 'profileUuid' is not null or undefined
31427
+ assertParamExists('listFormsV1', 'profileUuid', profileUuid)
31428
+ const localVarPath = `/api/reach/v1/profiles/{profileUuid}/forms`
31429
+ .replace(`{${"profileUuid"}}`, encodeURIComponent(String(profileUuid)));
31430
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
31431
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
31432
+ let baseOptions;
31433
+ if (configuration) {
31434
+ baseOptions = configuration.baseOptions;
31435
+ }
31436
+
31437
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
31438
+ const localVarHeaderParameter = {} as any;
31439
+ const localVarQueryParameter = {} as any;
31440
+
31441
+ // authentication apiToken required
31442
+ // http bearer authentication required
31443
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
31444
+
31445
+ if (page !== undefined) {
31446
+ localVarQueryParameter['page'] = page;
31447
+ }
31448
+
31449
+ if (perPage !== undefined) {
31450
+ localVarQueryParameter['per_page'] = perPage;
31451
+ }
31452
+
31453
+
31454
+
31455
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
31456
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
31457
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
31458
+
31459
+ return {
31460
+ url: toPathString(localVarUrlObj),
31461
+ options: localVarRequestOptions,
31462
+ };
31463
+ },
31464
+ }
31465
+ };
31466
+
31467
+ /**
31468
+ * ReachFormsApi - functional programming interface
31469
+ * @export
31470
+ */
31471
+ export const ReachFormsApiFp = function(configuration?: Configuration) {
31472
+ const localVarAxiosParamCreator = ReachFormsApiAxiosParamCreator(configuration)
31473
+ return {
31474
+ /**
31475
+ * 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.
31476
+ * @summary Delete form
31477
+ * @param {string} profileUuid Profile uuid parameter
31478
+ * @param {string} formUuid Form uuid parameter
31479
+ * @param {*} [options] Override http request option.
31480
+ * @throws {RequiredError}
31481
+ */
31482
+ async deleteFormV1(profileUuid: string, formUuid: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CommonSuccessEmptyResource>> {
31483
+ const localVarAxiosArgs = await localVarAxiosParamCreator.deleteFormV1(profileUuid, formUuid, options);
31484
+ const localVarOperationServerBasePath = operationServerMap['ReachFormsApi.deleteFormV1']?.[0]?.url;
31485
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
31486
+ },
31487
+ /**
31488
+ * 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.
31489
+ * @summary Get form details
31490
+ * @param {string} profileUuid Profile uuid parameter
31491
+ * @param {string} formUuid Form uuid parameter
31492
+ * @param {*} [options] Override http request option.
31493
+ * @throws {RequiredError}
31494
+ */
31495
+ async getFormDetailsV1(profileUuid: string, formUuid: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ReachV1FormsFormDetailsResource>> {
31496
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getFormDetailsV1(profileUuid, formUuid, options);
31497
+ const localVarOperationServerBasePath = operationServerMap['ReachFormsApi.getFormDetailsV1']?.[0]?.url;
31498
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
31499
+ },
31500
+ /**
31501
+ * Get a paginated list of the signup forms in a profile. Each form carries a reference to the template that renders it. Get the form details for a directly usable template URL and for the tags the form puts on the contacts it captures.
31502
+ * @summary List forms
31503
+ * @param {string} profileUuid Profile uuid parameter
31504
+ * @param {number} [page] Page number
31505
+ * @param {number} [perPage] Number of items per page
31506
+ * @param {*} [options] Override http request option.
31507
+ * @throws {RequiredError}
31508
+ */
31509
+ async listFormsV1(profileUuid: string, page?: number, perPage?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ReachListFormsV1200Response>> {
31510
+ const localVarAxiosArgs = await localVarAxiosParamCreator.listFormsV1(profileUuid, page, perPage, options);
31511
+ const localVarOperationServerBasePath = operationServerMap['ReachFormsApi.listFormsV1']?.[0]?.url;
31512
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
31513
+ },
31514
+ }
31515
+ };
31516
+
31517
+ /**
31518
+ * ReachFormsApi - factory interface
31519
+ * @export
31520
+ */
31521
+ export const ReachFormsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
31522
+ const localVarFp = ReachFormsApiFp(configuration)
31523
+ return {
31524
+ /**
31525
+ * 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.
31526
+ * @summary Delete form
31527
+ * @param {string} profileUuid Profile uuid parameter
31528
+ * @param {string} formUuid Form uuid parameter
31529
+ * @param {*} [options] Override http request option.
31530
+ * @throws {RequiredError}
31531
+ */
31532
+ deleteFormV1(profileUuid: string, formUuid: string, options?: RawAxiosRequestConfig): AxiosPromise<CommonSuccessEmptyResource> {
31533
+ return localVarFp.deleteFormV1(profileUuid, formUuid, options).then((request) => request(axios, basePath));
31534
+ },
31535
+ /**
31536
+ * 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.
31537
+ * @summary Get form details
31538
+ * @param {string} profileUuid Profile uuid parameter
31539
+ * @param {string} formUuid Form uuid parameter
31540
+ * @param {*} [options] Override http request option.
31541
+ * @throws {RequiredError}
31542
+ */
31543
+ getFormDetailsV1(profileUuid: string, formUuid: string, options?: RawAxiosRequestConfig): AxiosPromise<ReachV1FormsFormDetailsResource> {
31544
+ return localVarFp.getFormDetailsV1(profileUuid, formUuid, options).then((request) => request(axios, basePath));
31545
+ },
31546
+ /**
31547
+ * Get a paginated list of the signup forms in a profile. Each form carries a reference to the template that renders it. Get the form details for a directly usable template URL and for the tags the form puts on the contacts it captures.
31548
+ * @summary List forms
31549
+ * @param {string} profileUuid Profile uuid parameter
31550
+ * @param {number} [page] Page number
31551
+ * @param {number} [perPage] Number of items per page
31552
+ * @param {*} [options] Override http request option.
31553
+ * @throws {RequiredError}
31554
+ */
31555
+ listFormsV1(profileUuid: string, page?: number, perPage?: number, options?: RawAxiosRequestConfig): AxiosPromise<ReachListFormsV1200Response> {
31556
+ return localVarFp.listFormsV1(profileUuid, page, perPage, options).then((request) => request(axios, basePath));
31557
+ },
31558
+ };
31559
+ };
31560
+
31561
+ /**
31562
+ * ReachFormsApi - object-oriented interface
31563
+ * @export
31564
+ * @class ReachFormsApi
31565
+ * @extends {BaseAPI}
31566
+ */
31567
+ export class ReachFormsApi extends BaseAPI {
31568
+ /**
31569
+ * 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.
31570
+ * @summary Delete form
31571
+ * @param {string} profileUuid Profile uuid parameter
31572
+ * @param {string} formUuid Form uuid parameter
31573
+ * @param {*} [options] Override http request option.
31574
+ * @throws {RequiredError}
31575
+ * @memberof ReachFormsApi
31576
+ */
31577
+ public deleteFormV1(profileUuid: string, formUuid: string, options?: RawAxiosRequestConfig) {
31578
+ return ReachFormsApiFp(this.configuration).deleteFormV1(profileUuid, formUuid, options).then((request) => request(this.axios, this.basePath));
31579
+ }
31580
+
31581
+ /**
31582
+ * 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.
31583
+ * @summary Get form details
31584
+ * @param {string} profileUuid Profile uuid parameter
31585
+ * @param {string} formUuid Form uuid parameter
31586
+ * @param {*} [options] Override http request option.
31587
+ * @throws {RequiredError}
31588
+ * @memberof ReachFormsApi
31589
+ */
31590
+ public getFormDetailsV1(profileUuid: string, formUuid: string, options?: RawAxiosRequestConfig) {
31591
+ return ReachFormsApiFp(this.configuration).getFormDetailsV1(profileUuid, formUuid, options).then((request) => request(this.axios, this.basePath));
31592
+ }
31593
+
31594
+ /**
31595
+ * Get a paginated list of the signup forms in a profile. Each form carries a reference to the template that renders it. Get the form details for a directly usable template URL and for the tags the form puts on the contacts it captures.
31596
+ * @summary List forms
31597
+ * @param {string} profileUuid Profile uuid parameter
31598
+ * @param {number} [page] Page number
31599
+ * @param {number} [perPage] Number of items per page
31600
+ * @param {*} [options] Override http request option.
31601
+ * @throws {RequiredError}
31602
+ * @memberof ReachFormsApi
31603
+ */
31604
+ public listFormsV1(profileUuid: string, page?: number, perPage?: number, options?: RawAxiosRequestConfig) {
31605
+ return ReachFormsApiFp(this.configuration).listFormsV1(profileUuid, page, perPage, options).then((request) => request(this.axios, this.basePath));
31606
+ }
31607
+ }
31608
+
31609
+
31610
+
31011
31611
  /**
31012
31612
  * ReachProfilesApi - axios parameter creator
31013
31613
  * @export
@@ -31043,6 +31643,44 @@ export const ReachProfilesApiAxiosParamCreator = function (configuration?: Confi
31043
31643
 
31044
31644
 
31045
31645
 
31646
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
31647
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
31648
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
31649
+
31650
+ return {
31651
+ url: toPathString(localVarUrlObj),
31652
+ options: localVarRequestOptions,
31653
+ };
31654
+ },
31655
+ /**
31656
+ * Get how much of the plan is left for the current period. Two things to keep in mind before you build alerting on this. The period is a calendar month rather than a billing anniversary, so the counters reset on the 1st no matter when the subscription started. And usage is tracked per order, so every profile on the same order shares one pool and reports the same numbers here. Only the current period is available, past usage is not kept.
31657
+ * @summary Get remaining plan limits
31658
+ * @param {string} profileUuid Profile uuid parameter
31659
+ * @param {*} [options] Override http request option.
31660
+ * @throws {RequiredError}
31661
+ */
31662
+ getRemainingPlanLimitsV1: async (profileUuid: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
31663
+ // verify required parameter 'profileUuid' is not null or undefined
31664
+ assertParamExists('getRemainingPlanLimitsV1', 'profileUuid', profileUuid)
31665
+ const localVarPath = `/api/reach/v1/profiles/{profileUuid}/limits`
31666
+ .replace(`{${"profileUuid"}}`, encodeURIComponent(String(profileUuid)));
31667
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
31668
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
31669
+ let baseOptions;
31670
+ if (configuration) {
31671
+ baseOptions = configuration.baseOptions;
31672
+ }
31673
+
31674
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
31675
+ const localVarHeaderParameter = {} as any;
31676
+ const localVarQueryParameter = {} as any;
31677
+
31678
+ // authentication apiToken required
31679
+ // http bearer authentication required
31680
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
31681
+
31682
+
31683
+
31046
31684
  setSearchParams(localVarUrlObj, localVarQueryParameter);
31047
31685
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
31048
31686
  localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
@@ -31108,6 +31746,18 @@ export const ReachProfilesApiFp = function(configuration?: Configuration) {
31108
31746
  const localVarOperationServerBasePath = operationServerMap['ReachProfilesApi.getProfileDomainDNSStatusV1']?.[0]?.url;
31109
31747
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
31110
31748
  },
31749
+ /**
31750
+ * Get how much of the plan is left for the current period. Two things to keep in mind before you build alerting on this. The period is a calendar month rather than a billing anniversary, so the counters reset on the 1st no matter when the subscription started. And usage is tracked per order, so every profile on the same order shares one pool and reports the same numbers here. Only the current period is available, past usage is not kept.
31751
+ * @summary Get remaining plan limits
31752
+ * @param {string} profileUuid Profile uuid parameter
31753
+ * @param {*} [options] Override http request option.
31754
+ * @throws {RequiredError}
31755
+ */
31756
+ async getRemainingPlanLimitsV1(profileUuid: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ReachV1ProfilesPlanLimitsResource>> {
31757
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getRemainingPlanLimitsV1(profileUuid, options);
31758
+ const localVarOperationServerBasePath = operationServerMap['ReachProfilesApi.getRemainingPlanLimitsV1']?.[0]?.url;
31759
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
31760
+ },
31111
31761
  /**
31112
31762
  * This endpoint returns all profiles available to the client, including their basic information.
31113
31763
  * @summary List Profiles
@@ -31139,6 +31789,16 @@ export const ReachProfilesApiFactory = function (configuration?: Configuration,
31139
31789
  getProfileDomainDNSStatusV1(profileUuid: string, options?: RawAxiosRequestConfig): AxiosPromise<ReachV1ProfilesDomainsDnsStatusResource> {
31140
31790
  return localVarFp.getProfileDomainDNSStatusV1(profileUuid, options).then((request) => request(axios, basePath));
31141
31791
  },
31792
+ /**
31793
+ * Get how much of the plan is left for the current period. Two things to keep in mind before you build alerting on this. The period is a calendar month rather than a billing anniversary, so the counters reset on the 1st no matter when the subscription started. And usage is tracked per order, so every profile on the same order shares one pool and reports the same numbers here. Only the current period is available, past usage is not kept.
31794
+ * @summary Get remaining plan limits
31795
+ * @param {string} profileUuid Profile uuid parameter
31796
+ * @param {*} [options] Override http request option.
31797
+ * @throws {RequiredError}
31798
+ */
31799
+ getRemainingPlanLimitsV1(profileUuid: string, options?: RawAxiosRequestConfig): AxiosPromise<ReachV1ProfilesPlanLimitsResource> {
31800
+ return localVarFp.getRemainingPlanLimitsV1(profileUuid, options).then((request) => request(axios, basePath));
31801
+ },
31142
31802
  /**
31143
31803
  * This endpoint returns all profiles available to the client, including their basic information.
31144
31804
  * @summary List Profiles
@@ -31170,6 +31830,18 @@ export class ReachProfilesApi extends BaseAPI {
31170
31830
  return ReachProfilesApiFp(this.configuration).getProfileDomainDNSStatusV1(profileUuid, options).then((request) => request(this.axios, this.basePath));
31171
31831
  }
31172
31832
 
31833
+ /**
31834
+ * Get how much of the plan is left for the current period. Two things to keep in mind before you build alerting on this. The period is a calendar month rather than a billing anniversary, so the counters reset on the 1st no matter when the subscription started. And usage is tracked per order, so every profile on the same order shares one pool and reports the same numbers here. Only the current period is available, past usage is not kept.
31835
+ * @summary Get remaining plan limits
31836
+ * @param {string} profileUuid Profile uuid parameter
31837
+ * @param {*} [options] Override http request option.
31838
+ * @throws {RequiredError}
31839
+ * @memberof ReachProfilesApi
31840
+ */
31841
+ public getRemainingPlanLimitsV1(profileUuid: string, options?: RawAxiosRequestConfig) {
31842
+ return ReachProfilesApiFp(this.configuration).getRemainingPlanLimitsV1(profileUuid, options).then((request) => request(this.axios, this.basePath));
31843
+ }
31844
+
31173
31845
  /**
31174
31846
  * This endpoint returns all profiles available to the client, including their basic information.
31175
31847
  * @summary List Profiles