@hostinger/sdk 1.46.3 → 1.47.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.
Files changed (38) hide show
  1. package/README.md +2 -2
  2. package/api.ts +483 -59
  3. package/base.ts +1 -1
  4. package/common.ts +1 -1
  5. package/configuration.ts +2 -2
  6. package/dist/api.d.ts +341 -59
  7. package/dist/api.js +281 -12
  8. package/dist/base.d.ts +1 -1
  9. package/dist/base.js +1 -1
  10. package/dist/common.d.ts +1 -1
  11. package/dist/common.js +1 -1
  12. package/dist/configuration.d.ts +1 -1
  13. package/dist/configuration.js +2 -2
  14. package/dist/esm/api.d.ts +341 -59
  15. package/dist/esm/api.js +267 -2
  16. package/dist/esm/base.d.ts +1 -1
  17. package/dist/esm/base.js +1 -1
  18. package/dist/esm/common.d.ts +1 -1
  19. package/dist/esm/common.js +1 -1
  20. package/dist/esm/configuration.d.ts +1 -1
  21. package/dist/esm/configuration.js +2 -2
  22. package/dist/esm/index.d.ts +1 -1
  23. package/dist/esm/index.js +1 -1
  24. package/dist/index.d.ts +1 -1
  25. package/dist/index.js +1 -1
  26. package/docs/AgencyHostingV1SetupsCreateSetupRequest.md +0 -4
  27. package/docs/ReachCampaignsApi.md +59 -0
  28. package/docs/ReachTemplatesApi.md +120 -0
  29. package/docs/ReachV1CampaignsCreatedCampaignResource.md +43 -0
  30. package/docs/ReachV1CampaignsStoreRequest.md +31 -0
  31. package/docs/ReachV1CampaignsStoreRequestMetadata.md +23 -0
  32. package/docs/ReachV1TemplatesStoreRequest.md +23 -0
  33. package/docs/ReachV1TemplatesTemplateResource.md +26 -0
  34. package/index.ts +1 -1
  35. package/package.json +1 -1
  36. package/docs/AgencyHostingV1SetupsCreateSetupRequestClone.md +0 -21
  37. package/docs/AgencyHostingV1SetupsCreateSetupRequestDeriveDomain.md +0 -21
  38. package/docs/AgencyHostingV1SetupsCreateSetupRequestDeriveDomainFromVhost.md +0 -22
package/README.md CHANGED
@@ -1,9 +1,9 @@
1
- ## @hostinger/sdk@1.46.3
1
+ ## @hostinger/sdk@1.47.0
2
2
 
3
3
  For more information, please visit [https://developers.hostinger.com](https://developers.hostinger.com).
4
4
 
5
5
  ### Usage
6
6
 
7
7
  ```
8
- npm install @hostinger/sdk@1.46.3 --save
8
+ npm install @hostinger/sdk@1.47.0 --save
9
9
  ```
package/api.ts CHANGED
@@ -3,7 +3,7 @@
3
3
  /**
4
4
  * Hostinger API
5
5
  *
6
- * API Version: 1.46.2
6
+ * API Version: 1.47.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
@@ -708,72 +708,14 @@ export interface AgencyHostingV1SetupsCreateSetupRequest {
708
708
  * @memberof AgencyHostingV1SetupsCreateSetupRequest
709
709
  */
710
710
  'wordpress': AgencyHostingV1SetupsCreateSetupRequestWordpress;
711
- /**
712
- *
713
- * @type {AgencyHostingV1SetupsCreateSetupRequestClone}
714
- * @memberof AgencyHostingV1SetupsCreateSetupRequest
715
- */
716
- 'clone': AgencyHostingV1SetupsCreateSetupRequestClone;
717
- /**
718
- *
719
- * @type {AgencyHostingV1SetupsCreateSetupRequestDeriveDomain}
720
- * @memberof AgencyHostingV1SetupsCreateSetupRequest
721
- */
722
- 'derive_domain': AgencyHostingV1SetupsCreateSetupRequestDeriveDomain;
723
711
  }
724
712
 
725
713
  export const AgencyHostingV1SetupsCreateSetupRequestTypeEnum = {
726
- Horizons: 'horizons',
727
714
  NodeStatic: 'node-static'
728
715
  } as const;
729
716
 
730
717
  export type AgencyHostingV1SetupsCreateSetupRequestTypeEnum = typeof AgencyHostingV1SetupsCreateSetupRequestTypeEnum[keyof typeof AgencyHostingV1SetupsCreateSetupRequestTypeEnum];
731
718
 
732
- /**
733
- * Clone the new website from an existing website
734
- * @export
735
- * @interface AgencyHostingV1SetupsCreateSetupRequestClone
736
- */
737
- export interface AgencyHostingV1SetupsCreateSetupRequestClone {
738
- /**
739
- *
740
- * @type {string}
741
- * @memberof AgencyHostingV1SetupsCreateSetupRequestClone
742
- */
743
- 'website_uid': string;
744
- }
745
- /**
746
- * Derive the domain from an existing vhost
747
- * @export
748
- * @interface AgencyHostingV1SetupsCreateSetupRequestDeriveDomain
749
- */
750
- export interface AgencyHostingV1SetupsCreateSetupRequestDeriveDomain {
751
- /**
752
- *
753
- * @type {AgencyHostingV1SetupsCreateSetupRequestDeriveDomainFromVhost}
754
- * @memberof AgencyHostingV1SetupsCreateSetupRequestDeriveDomain
755
- */
756
- 'from_vhost': AgencyHostingV1SetupsCreateSetupRequestDeriveDomainFromVhost;
757
- }
758
- /**
759
- *
760
- * @export
761
- * @interface AgencyHostingV1SetupsCreateSetupRequestDeriveDomainFromVhost
762
- */
763
- export interface AgencyHostingV1SetupsCreateSetupRequestDeriveDomainFromVhost {
764
- /**
765
- *
766
- * @type {string}
767
- * @memberof AgencyHostingV1SetupsCreateSetupRequestDeriveDomainFromVhost
768
- */
769
- 'username': string;
770
- /**
771
- *
772
- * @type {string}
773
- * @memberof AgencyHostingV1SetupsCreateSetupRequestDeriveDomainFromVhost
774
- */
775
- 'vhost': string;
776
- }
777
719
  /**
778
720
  * Website settings
779
721
  * @export
@@ -11113,6 +11055,165 @@ export interface ReachV1CampaignsCampaignSummaryStatisticsResource {
11113
11055
  */
11114
11056
  'click_to_open_rate': number;
11115
11057
  }
11058
+ /**
11059
+ * The campaign as it was stored, without targeting or delivery progress
11060
+ * @export
11061
+ * @interface ReachV1CampaignsCreatedCampaignResource
11062
+ */
11063
+ export interface ReachV1CampaignsCreatedCampaignResource {
11064
+ /**
11065
+ *
11066
+ * @type {string}
11067
+ * @memberof ReachV1CampaignsCreatedCampaignResource
11068
+ */
11069
+ 'uuid': string;
11070
+ /**
11071
+ *
11072
+ * @type {string}
11073
+ * @memberof ReachV1CampaignsCreatedCampaignResource
11074
+ */
11075
+ 'title': string;
11076
+ /**
11077
+ *
11078
+ * @type {string}
11079
+ * @memberof ReachV1CampaignsCreatedCampaignResource
11080
+ */
11081
+ 'subject': string;
11082
+ /**
11083
+ *
11084
+ * @type {string}
11085
+ * @memberof ReachV1CampaignsCreatedCampaignResource
11086
+ */
11087
+ 'sender_name': string;
11088
+ /**
11089
+ *
11090
+ * @type {string}
11091
+ * @memberof ReachV1CampaignsCreatedCampaignResource
11092
+ */
11093
+ 'sender_email': string;
11094
+ /**
11095
+ *
11096
+ * @type {string}
11097
+ * @memberof ReachV1CampaignsCreatedCampaignResource
11098
+ */
11099
+ 'template_uuid': string | null;
11100
+ /**
11101
+ * Always `draft` for a campaign that was just created.
11102
+ * @type {string}
11103
+ * @memberof ReachV1CampaignsCreatedCampaignResource
11104
+ */
11105
+ 'status': ReachV1CampaignsCreatedCampaignResourceStatusEnum;
11106
+ /**
11107
+ *
11108
+ * @type {string}
11109
+ * @memberof ReachV1CampaignsCreatedCampaignResource
11110
+ */
11111
+ 'type': ReachV1CampaignsCreatedCampaignResourceTypeEnum;
11112
+ /**
11113
+ * Whether the campaign targets every contact instead of selected segments.
11114
+ * @type {boolean}
11115
+ * @memberof ReachV1CampaignsCreatedCampaignResource
11116
+ */
11117
+ 'is_all_contacts': boolean;
11118
+ /**
11119
+ * The stored extra fields, including the ones Reach sets itself.
11120
+ * @type {{ [key: string]: string; }}
11121
+ * @memberof ReachV1CampaignsCreatedCampaignResource
11122
+ */
11123
+ 'metadata': { [key: string]: string; };
11124
+ /**
11125
+ *
11126
+ * @type {string}
11127
+ * @memberof ReachV1CampaignsCreatedCampaignResource
11128
+ */
11129
+ 'created_at': string | null;
11130
+ /**
11131
+ *
11132
+ * @type {string}
11133
+ * @memberof ReachV1CampaignsCreatedCampaignResource
11134
+ */
11135
+ 'updated_at': string | null;
11136
+ }
11137
+
11138
+ export const ReachV1CampaignsCreatedCampaignResourceStatusEnum = {
11139
+ Draft: 'draft',
11140
+ Scheduled: 'scheduled',
11141
+ Sending: 'sending',
11142
+ Publish: 'publish',
11143
+ Failed: 'failed'
11144
+ } as const;
11145
+
11146
+ export type ReachV1CampaignsCreatedCampaignResourceStatusEnum = typeof ReachV1CampaignsCreatedCampaignResourceStatusEnum[keyof typeof ReachV1CampaignsCreatedCampaignResourceStatusEnum];
11147
+ export const ReachV1CampaignsCreatedCampaignResourceTypeEnum = {
11148
+ Campaign: 'campaign',
11149
+ Automation: 'automation',
11150
+ DoubleOptIn: 'double_opt_in'
11151
+ } as const;
11152
+
11153
+ export type ReachV1CampaignsCreatedCampaignResourceTypeEnum = typeof ReachV1CampaignsCreatedCampaignResourceTypeEnum[keyof typeof ReachV1CampaignsCreatedCampaignResourceTypeEnum];
11154
+
11155
+ /**
11156
+ * Create a campaign in draft status
11157
+ * @export
11158
+ * @interface ReachV1CampaignsStoreRequest
11159
+ */
11160
+ export interface ReachV1CampaignsStoreRequest {
11161
+ /**
11162
+ * From name shown to the recipients.
11163
+ * @type {string}
11164
+ * @memberof ReachV1CampaignsStoreRequest
11165
+ */
11166
+ 'sender_name': string;
11167
+ /**
11168
+ * From address of the campaign. Its domain has to be verified on the profile before the campaign can be sent.
11169
+ * @type {string}
11170
+ * @memberof ReachV1CampaignsStoreRequest
11171
+ */
11172
+ 'sender_email': string;
11173
+ /**
11174
+ * Name the campaign is listed under. Not shown to the recipients.
11175
+ * @type {string}
11176
+ * @memberof ReachV1CampaignsStoreRequest
11177
+ */
11178
+ 'title': string;
11179
+ /**
11180
+ * Subject line of the email.
11181
+ * @type {string}
11182
+ * @memberof ReachV1CampaignsStoreRequest
11183
+ */
11184
+ 'subject': string;
11185
+ /**
11186
+ * Template to send, as returned by the template endpoints. Can be left out and attached later, but the campaign cannot be sent without one.
11187
+ * @type {string}
11188
+ * @memberof ReachV1CampaignsStoreRequest
11189
+ */
11190
+ 'template_uuid': string;
11191
+ /**
11192
+ *
11193
+ * @type {ReachV1CampaignsStoreRequestMetadata}
11194
+ * @memberof ReachV1CampaignsStoreRequest
11195
+ */
11196
+ 'metadata': ReachV1CampaignsStoreRequestMetadata | null;
11197
+ }
11198
+ /**
11199
+ * Extra campaign fields. Any key outside the listed ones is rejected.
11200
+ * @export
11201
+ * @interface ReachV1CampaignsStoreRequestMetadata
11202
+ */
11203
+ export interface ReachV1CampaignsStoreRequestMetadata {
11204
+ /**
11205
+ * Preview text shown after the subject line in the inbox.
11206
+ * @type {string}
11207
+ * @memberof ReachV1CampaignsStoreRequestMetadata
11208
+ */
11209
+ 'preheader': string;
11210
+ /**
11211
+ * Where the campaign was created from.
11212
+ * @type {string}
11213
+ * @memberof ReachV1CampaignsStoreRequestMetadata
11214
+ */
11215
+ 'source': string;
11216
+ }
11116
11217
  /**
11117
11218
  * Create many contacts in one call
11118
11219
  * @export
@@ -13254,6 +13355,56 @@ export interface ReachV1ProfilesProfileResourceProfilesInner {
13254
13355
  */
13255
13356
  'updated_at': string;
13256
13357
  }
13358
+ /**
13359
+ * Create a reusable email template
13360
+ * @export
13361
+ * @interface ReachV1TemplatesStoreRequest
13362
+ */
13363
+ export interface ReachV1TemplatesStoreRequest {
13364
+ /**
13365
+ * The email body as HTML. It is sanitised before it is stored, so the saved template can differ from what was sent - inline any styles the email clients need and keep the markup self-contained.
13366
+ * @type {string}
13367
+ * @memberof ReachV1TemplatesStoreRequest
13368
+ */
13369
+ 'template_content': string;
13370
+ /**
13371
+ * Name the template is listed under. Not shown to the recipients.
13372
+ * @type {string}
13373
+ * @memberof ReachV1TemplatesStoreRequest
13374
+ */
13375
+ 'title': string | null;
13376
+ }
13377
+ /**
13378
+ *
13379
+ * @export
13380
+ * @interface ReachV1TemplatesTemplateResource
13381
+ */
13382
+ export interface ReachV1TemplatesTemplateResource {
13383
+ /**
13384
+ * Pass this as the `template_uuid` of a campaign.
13385
+ * @type {string}
13386
+ * @memberof ReachV1TemplatesTemplateResource
13387
+ */
13388
+ 'uuid': string | null;
13389
+ /**
13390
+ * Null for templates that were never named.
13391
+ * @type {string}
13392
+ * @memberof ReachV1TemplatesTemplateResource
13393
+ */
13394
+ 'title': string | null;
13395
+ /**
13396
+ *
13397
+ * @type {string}
13398
+ * @memberof ReachV1TemplatesTemplateResource
13399
+ */
13400
+ 'created_at': string | null;
13401
+ /**
13402
+ *
13403
+ * @type {string}
13404
+ * @memberof ReachV1TemplatesTemplateResource
13405
+ */
13406
+ 'updated_at': string | null;
13407
+ }
13257
13408
  /**
13258
13409
  *
13259
13410
  * @export
@@ -36125,6 +36276,50 @@ export type ListAutomationsV1SortDirectionEnum = typeof ListAutomationsV1SortDir
36125
36276
  */
36126
36277
  export const ReachCampaignsApiAxiosParamCreator = function (configuration?: Configuration) {
36127
36278
  return {
36279
+ /**
36280
+ * Create a campaign in a profile. The campaign is created as a draft, so nothing is sent and no contact is touched. It has no audience yet either - targeting and scheduling are not part of this request, the draft is finished and sent from the Reach interface.
36281
+ * @summary Create a draft campaign
36282
+ * @param {string} profileUuid Profile uuid parameter
36283
+ * @param {ReachV1CampaignsStoreRequest} reachV1CampaignsStoreRequest
36284
+ * @param {*} [options] Override http request option.
36285
+ * @throws {RequiredError}
36286
+ */
36287
+ createADraftCampaignV1: async (profileUuid: string, reachV1CampaignsStoreRequest: ReachV1CampaignsStoreRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
36288
+ // verify required parameter 'profileUuid' is not null or undefined
36289
+ assertParamExists('createADraftCampaignV1', 'profileUuid', profileUuid)
36290
+ // verify required parameter 'reachV1CampaignsStoreRequest' is not null or undefined
36291
+ assertParamExists('createADraftCampaignV1', 'reachV1CampaignsStoreRequest', reachV1CampaignsStoreRequest)
36292
+ const localVarPath = `/api/reach/v1/profiles/{profileUuid}/campaigns`
36293
+ .replace(`{${"profileUuid"}}`, encodeURIComponent(String(profileUuid)));
36294
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
36295
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
36296
+ let baseOptions;
36297
+ if (configuration) {
36298
+ baseOptions = configuration.baseOptions;
36299
+ }
36300
+
36301
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
36302
+ const localVarHeaderParameter = {} as any;
36303
+ const localVarQueryParameter = {} as any;
36304
+
36305
+ // authentication apiToken required
36306
+ // http bearer authentication required
36307
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
36308
+
36309
+
36310
+
36311
+ localVarHeaderParameter['Content-Type'] = 'application/json';
36312
+
36313
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
36314
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
36315
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
36316
+ localVarRequestOptions.data = serializeDataIfNeeded(reachV1CampaignsStoreRequest, localVarRequestOptions, configuration)
36317
+
36318
+ return {
36319
+ url: toPathString(localVarUrlObj),
36320
+ options: localVarRequestOptions,
36321
+ };
36322
+ },
36128
36323
  /**
36129
36324
  * Get a single campaign with its sender, subject, template reference, targeting and delivery progress. This describes how the campaign was set up and how far it has got. For opens, clicks and unsubscribes use the campaign statistics endpoint.
36130
36325
  * @summary Get campaign details
@@ -36282,6 +36477,19 @@ export const ReachCampaignsApiAxiosParamCreator = function (configuration?: Conf
36282
36477
  export const ReachCampaignsApiFp = function(configuration?: Configuration) {
36283
36478
  const localVarAxiosParamCreator = ReachCampaignsApiAxiosParamCreator(configuration)
36284
36479
  return {
36480
+ /**
36481
+ * Create a campaign in a profile. The campaign is created as a draft, so nothing is sent and no contact is touched. It has no audience yet either - targeting and scheduling are not part of this request, the draft is finished and sent from the Reach interface.
36482
+ * @summary Create a draft campaign
36483
+ * @param {string} profileUuid Profile uuid parameter
36484
+ * @param {ReachV1CampaignsStoreRequest} reachV1CampaignsStoreRequest
36485
+ * @param {*} [options] Override http request option.
36486
+ * @throws {RequiredError}
36487
+ */
36488
+ async createADraftCampaignV1(profileUuid: string, reachV1CampaignsStoreRequest: ReachV1CampaignsStoreRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ReachV1CampaignsCreatedCampaignResource>> {
36489
+ const localVarAxiosArgs = await localVarAxiosParamCreator.createADraftCampaignV1(profileUuid, reachV1CampaignsStoreRequest, options);
36490
+ const localVarOperationServerBasePath = operationServerMap['ReachCampaignsApi.createADraftCampaignV1']?.[0]?.url;
36491
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
36492
+ },
36285
36493
  /**
36286
36494
  * Get a single campaign with its sender, subject, template reference, targeting and delivery progress. This describes how the campaign was set up and how far it has got. For opens, clicks and unsubscribes use the campaign statistics endpoint.
36287
36495
  * @summary Get campaign details
@@ -36335,6 +36543,17 @@ export const ReachCampaignsApiFp = function(configuration?: Configuration) {
36335
36543
  export const ReachCampaignsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
36336
36544
  const localVarFp = ReachCampaignsApiFp(configuration)
36337
36545
  return {
36546
+ /**
36547
+ * Create a campaign in a profile. The campaign is created as a draft, so nothing is sent and no contact is touched. It has no audience yet either - targeting and scheduling are not part of this request, the draft is finished and sent from the Reach interface.
36548
+ * @summary Create a draft campaign
36549
+ * @param {string} profileUuid Profile uuid parameter
36550
+ * @param {ReachV1CampaignsStoreRequest} reachV1CampaignsStoreRequest
36551
+ * @param {*} [options] Override http request option.
36552
+ * @throws {RequiredError}
36553
+ */
36554
+ createADraftCampaignV1(profileUuid: string, reachV1CampaignsStoreRequest: ReachV1CampaignsStoreRequest, options?: RawAxiosRequestConfig): AxiosPromise<ReachV1CampaignsCreatedCampaignResource> {
36555
+ return localVarFp.createADraftCampaignV1(profileUuid, reachV1CampaignsStoreRequest, options).then((request) => request(axios, basePath));
36556
+ },
36338
36557
  /**
36339
36558
  * Get a single campaign with its sender, subject, template reference, targeting and delivery progress. This describes how the campaign was set up and how far it has got. For opens, clicks and unsubscribes use the campaign statistics endpoint.
36340
36559
  * @summary Get campaign details
@@ -36382,6 +36601,19 @@ export const ReachCampaignsApiFactory = function (configuration?: Configuration,
36382
36601
  * @extends {BaseAPI}
36383
36602
  */
36384
36603
  export class ReachCampaignsApi extends BaseAPI {
36604
+ /**
36605
+ * Create a campaign in a profile. The campaign is created as a draft, so nothing is sent and no contact is touched. It has no audience yet either - targeting and scheduling are not part of this request, the draft is finished and sent from the Reach interface.
36606
+ * @summary Create a draft campaign
36607
+ * @param {string} profileUuid Profile uuid parameter
36608
+ * @param {ReachV1CampaignsStoreRequest} reachV1CampaignsStoreRequest
36609
+ * @param {*} [options] Override http request option.
36610
+ * @throws {RequiredError}
36611
+ * @memberof ReachCampaignsApi
36612
+ */
36613
+ public createADraftCampaignV1(profileUuid: string, reachV1CampaignsStoreRequest: ReachV1CampaignsStoreRequest, options?: RawAxiosRequestConfig) {
36614
+ return ReachCampaignsApiFp(this.configuration).createADraftCampaignV1(profileUuid, reachV1CampaignsStoreRequest, options).then((request) => request(this.axios, this.basePath));
36615
+ }
36616
+
36385
36617
  /**
36386
36618
  * Get a single campaign with its sender, subject, template reference, targeting and delivery progress. This describes how the campaign was set up and how far it has got. For opens, clicks and unsubscribes use the campaign statistics endpoint.
36387
36619
  * @summary Get campaign details
@@ -40206,6 +40438,198 @@ export class ReachTagsApi extends BaseAPI {
40206
40438
 
40207
40439
 
40208
40440
 
40441
+ /**
40442
+ * ReachTemplatesApi - axios parameter creator
40443
+ * @export
40444
+ */
40445
+ export const ReachTemplatesApiAxiosParamCreator = function (configuration?: Configuration) {
40446
+ return {
40447
+ /**
40448
+ * Create an email template in a profile. The template holds the HTML body a campaign reuses, so it can be created before any campaign exists. Only the template metadata comes back - keep the returned `uuid` to reference it as the `template_uuid` of a campaign.
40449
+ * @summary Create an email template
40450
+ * @param {string} profileUuid Profile uuid parameter
40451
+ * @param {ReachV1TemplatesStoreRequest} reachV1TemplatesStoreRequest
40452
+ * @param {*} [options] Override http request option.
40453
+ * @throws {RequiredError}
40454
+ */
40455
+ createAnEmailTemplateV1: async (profileUuid: string, reachV1TemplatesStoreRequest: ReachV1TemplatesStoreRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
40456
+ // verify required parameter 'profileUuid' is not null or undefined
40457
+ assertParamExists('createAnEmailTemplateV1', 'profileUuid', profileUuid)
40458
+ // verify required parameter 'reachV1TemplatesStoreRequest' is not null or undefined
40459
+ assertParamExists('createAnEmailTemplateV1', 'reachV1TemplatesStoreRequest', reachV1TemplatesStoreRequest)
40460
+ const localVarPath = `/api/reach/v1/profiles/{profileUuid}/templates`
40461
+ .replace(`{${"profileUuid"}}`, encodeURIComponent(String(profileUuid)));
40462
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
40463
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
40464
+ let baseOptions;
40465
+ if (configuration) {
40466
+ baseOptions = configuration.baseOptions;
40467
+ }
40468
+
40469
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
40470
+ const localVarHeaderParameter = {} as any;
40471
+ const localVarQueryParameter = {} as any;
40472
+
40473
+ // authentication apiToken required
40474
+ // http bearer authentication required
40475
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
40476
+
40477
+
40478
+
40479
+ localVarHeaderParameter['Content-Type'] = 'application/json';
40480
+
40481
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
40482
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
40483
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
40484
+ localVarRequestOptions.data = serializeDataIfNeeded(reachV1TemplatesStoreRequest, localVarRequestOptions, configuration)
40485
+
40486
+ return {
40487
+ url: toPathString(localVarUrlObj),
40488
+ options: localVarRequestOptions,
40489
+ };
40490
+ },
40491
+ /**
40492
+ * Get a list of the email templates in a profile, most recently updated first. Templates are the reusable email bodies a campaign is built from. The list is not paginated and only the metadata is returned - the template content itself is not exposed. Use the `uuid` of a template as the `template_uuid` when creating a campaign.
40493
+ * @summary List email templates
40494
+ * @param {string} profileUuid Profile uuid parameter
40495
+ * @param {*} [options] Override http request option.
40496
+ * @throws {RequiredError}
40497
+ */
40498
+ listEmailTemplatesV1: async (profileUuid: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
40499
+ // verify required parameter 'profileUuid' is not null or undefined
40500
+ assertParamExists('listEmailTemplatesV1', 'profileUuid', profileUuid)
40501
+ const localVarPath = `/api/reach/v1/profiles/{profileUuid}/templates`
40502
+ .replace(`{${"profileUuid"}}`, encodeURIComponent(String(profileUuid)));
40503
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
40504
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
40505
+ let baseOptions;
40506
+ if (configuration) {
40507
+ baseOptions = configuration.baseOptions;
40508
+ }
40509
+
40510
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
40511
+ const localVarHeaderParameter = {} as any;
40512
+ const localVarQueryParameter = {} as any;
40513
+
40514
+ // authentication apiToken required
40515
+ // http bearer authentication required
40516
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
40517
+
40518
+
40519
+
40520
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
40521
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
40522
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
40523
+
40524
+ return {
40525
+ url: toPathString(localVarUrlObj),
40526
+ options: localVarRequestOptions,
40527
+ };
40528
+ },
40529
+ }
40530
+ };
40531
+
40532
+ /**
40533
+ * ReachTemplatesApi - functional programming interface
40534
+ * @export
40535
+ */
40536
+ export const ReachTemplatesApiFp = function(configuration?: Configuration) {
40537
+ const localVarAxiosParamCreator = ReachTemplatesApiAxiosParamCreator(configuration)
40538
+ return {
40539
+ /**
40540
+ * Create an email template in a profile. The template holds the HTML body a campaign reuses, so it can be created before any campaign exists. Only the template metadata comes back - keep the returned `uuid` to reference it as the `template_uuid` of a campaign.
40541
+ * @summary Create an email template
40542
+ * @param {string} profileUuid Profile uuid parameter
40543
+ * @param {ReachV1TemplatesStoreRequest} reachV1TemplatesStoreRequest
40544
+ * @param {*} [options] Override http request option.
40545
+ * @throws {RequiredError}
40546
+ */
40547
+ async createAnEmailTemplateV1(profileUuid: string, reachV1TemplatesStoreRequest: ReachV1TemplatesStoreRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ReachV1TemplatesTemplateResource>> {
40548
+ const localVarAxiosArgs = await localVarAxiosParamCreator.createAnEmailTemplateV1(profileUuid, reachV1TemplatesStoreRequest, options);
40549
+ const localVarOperationServerBasePath = operationServerMap['ReachTemplatesApi.createAnEmailTemplateV1']?.[0]?.url;
40550
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
40551
+ },
40552
+ /**
40553
+ * Get a list of the email templates in a profile, most recently updated first. Templates are the reusable email bodies a campaign is built from. The list is not paginated and only the metadata is returned - the template content itself is not exposed. Use the `uuid` of a template as the `template_uuid` when creating a campaign.
40554
+ * @summary List email templates
40555
+ * @param {string} profileUuid Profile uuid parameter
40556
+ * @param {*} [options] Override http request option.
40557
+ * @throws {RequiredError}
40558
+ */
40559
+ async listEmailTemplatesV1(profileUuid: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<ReachV1TemplatesTemplateResource>>> {
40560
+ const localVarAxiosArgs = await localVarAxiosParamCreator.listEmailTemplatesV1(profileUuid, options);
40561
+ const localVarOperationServerBasePath = operationServerMap['ReachTemplatesApi.listEmailTemplatesV1']?.[0]?.url;
40562
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
40563
+ },
40564
+ }
40565
+ };
40566
+
40567
+ /**
40568
+ * ReachTemplatesApi - factory interface
40569
+ * @export
40570
+ */
40571
+ export const ReachTemplatesApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
40572
+ const localVarFp = ReachTemplatesApiFp(configuration)
40573
+ return {
40574
+ /**
40575
+ * Create an email template in a profile. The template holds the HTML body a campaign reuses, so it can be created before any campaign exists. Only the template metadata comes back - keep the returned `uuid` to reference it as the `template_uuid` of a campaign.
40576
+ * @summary Create an email template
40577
+ * @param {string} profileUuid Profile uuid parameter
40578
+ * @param {ReachV1TemplatesStoreRequest} reachV1TemplatesStoreRequest
40579
+ * @param {*} [options] Override http request option.
40580
+ * @throws {RequiredError}
40581
+ */
40582
+ createAnEmailTemplateV1(profileUuid: string, reachV1TemplatesStoreRequest: ReachV1TemplatesStoreRequest, options?: RawAxiosRequestConfig): AxiosPromise<ReachV1TemplatesTemplateResource> {
40583
+ return localVarFp.createAnEmailTemplateV1(profileUuid, reachV1TemplatesStoreRequest, options).then((request) => request(axios, basePath));
40584
+ },
40585
+ /**
40586
+ * Get a list of the email templates in a profile, most recently updated first. Templates are the reusable email bodies a campaign is built from. The list is not paginated and only the metadata is returned - the template content itself is not exposed. Use the `uuid` of a template as the `template_uuid` when creating a campaign.
40587
+ * @summary List email templates
40588
+ * @param {string} profileUuid Profile uuid parameter
40589
+ * @param {*} [options] Override http request option.
40590
+ * @throws {RequiredError}
40591
+ */
40592
+ listEmailTemplatesV1(profileUuid: string, options?: RawAxiosRequestConfig): AxiosPromise<Array<ReachV1TemplatesTemplateResource>> {
40593
+ return localVarFp.listEmailTemplatesV1(profileUuid, options).then((request) => request(axios, basePath));
40594
+ },
40595
+ };
40596
+ };
40597
+
40598
+ /**
40599
+ * ReachTemplatesApi - object-oriented interface
40600
+ * @export
40601
+ * @class ReachTemplatesApi
40602
+ * @extends {BaseAPI}
40603
+ */
40604
+ export class ReachTemplatesApi extends BaseAPI {
40605
+ /**
40606
+ * Create an email template in a profile. The template holds the HTML body a campaign reuses, so it can be created before any campaign exists. Only the template metadata comes back - keep the returned `uuid` to reference it as the `template_uuid` of a campaign.
40607
+ * @summary Create an email template
40608
+ * @param {string} profileUuid Profile uuid parameter
40609
+ * @param {ReachV1TemplatesStoreRequest} reachV1TemplatesStoreRequest
40610
+ * @param {*} [options] Override http request option.
40611
+ * @throws {RequiredError}
40612
+ * @memberof ReachTemplatesApi
40613
+ */
40614
+ public createAnEmailTemplateV1(profileUuid: string, reachV1TemplatesStoreRequest: ReachV1TemplatesStoreRequest, options?: RawAxiosRequestConfig) {
40615
+ return ReachTemplatesApiFp(this.configuration).createAnEmailTemplateV1(profileUuid, reachV1TemplatesStoreRequest, options).then((request) => request(this.axios, this.basePath));
40616
+ }
40617
+
40618
+ /**
40619
+ * Get a list of the email templates in a profile, most recently updated first. Templates are the reusable email bodies a campaign is built from. The list is not paginated and only the metadata is returned - the template content itself is not exposed. Use the `uuid` of a template as the `template_uuid` when creating a campaign.
40620
+ * @summary List email templates
40621
+ * @param {string} profileUuid Profile uuid parameter
40622
+ * @param {*} [options] Override http request option.
40623
+ * @throws {RequiredError}
40624
+ * @memberof ReachTemplatesApi
40625
+ */
40626
+ public listEmailTemplatesV1(profileUuid: string, options?: RawAxiosRequestConfig) {
40627
+ return ReachTemplatesApiFp(this.configuration).listEmailTemplatesV1(profileUuid, options).then((request) => request(this.axios, this.basePath));
40628
+ }
40629
+ }
40630
+
40631
+
40632
+
40209
40633
  /**
40210
40634
  * VPSActionsApi - axios parameter creator
40211
40635
  * @export
package/base.ts CHANGED
@@ -3,7 +3,7 @@
3
3
  /**
4
4
  * Hostinger API
5
5
  *
6
- * API Version: 1.46.2
6
+ * API Version: 1.47.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
package/common.ts CHANGED
@@ -3,7 +3,7 @@
3
3
  /**
4
4
  * Hostinger API
5
5
  *
6
- * API Version: 1.46.2
6
+ * API Version: 1.47.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
package/configuration.ts CHANGED
@@ -3,7 +3,7 @@
3
3
  /**
4
4
  * Hostinger API
5
5
  *
6
- * API Version: 1.46.2
6
+ * API Version: 1.47.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
@@ -48,7 +48,7 @@ export class Configuration {
48
48
  this.baseOptions = {
49
49
  ...param.baseOptions,
50
50
  headers: {
51
- 'User-Agent': "hostinger-typescript-sdk/1.46.3",
51
+ 'User-Agent': "hostinger-typescript-sdk/1.47.0",
52
52
  ...param.baseOptions?.headers,
53
53
  },
54
54
  };