@hostinger/sdk 1.46.2 → 1.46.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,9 +1,9 @@
1
- ## @hostinger/sdk@1.46.2
1
+ ## @hostinger/sdk@1.46.4
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.2 --save
8
+ npm install @hostinger/sdk@1.46.4 --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.46.3
7
7
  *
8
8
  * NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
9
9
  * If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
@@ -11113,6 +11113,165 @@ export interface ReachV1CampaignsCampaignSummaryStatisticsResource {
11113
11113
  */
11114
11114
  'click_to_open_rate': number;
11115
11115
  }
11116
+ /**
11117
+ * The campaign as it was stored, without targeting or delivery progress
11118
+ * @export
11119
+ * @interface ReachV1CampaignsCreatedCampaignResource
11120
+ */
11121
+ export interface ReachV1CampaignsCreatedCampaignResource {
11122
+ /**
11123
+ *
11124
+ * @type {string}
11125
+ * @memberof ReachV1CampaignsCreatedCampaignResource
11126
+ */
11127
+ 'uuid': string;
11128
+ /**
11129
+ *
11130
+ * @type {string}
11131
+ * @memberof ReachV1CampaignsCreatedCampaignResource
11132
+ */
11133
+ 'title': string;
11134
+ /**
11135
+ *
11136
+ * @type {string}
11137
+ * @memberof ReachV1CampaignsCreatedCampaignResource
11138
+ */
11139
+ 'subject': string;
11140
+ /**
11141
+ *
11142
+ * @type {string}
11143
+ * @memberof ReachV1CampaignsCreatedCampaignResource
11144
+ */
11145
+ 'sender_name': string;
11146
+ /**
11147
+ *
11148
+ * @type {string}
11149
+ * @memberof ReachV1CampaignsCreatedCampaignResource
11150
+ */
11151
+ 'sender_email': string;
11152
+ /**
11153
+ *
11154
+ * @type {string}
11155
+ * @memberof ReachV1CampaignsCreatedCampaignResource
11156
+ */
11157
+ 'template_uuid': string | null;
11158
+ /**
11159
+ * Always `draft` for a campaign that was just created.
11160
+ * @type {string}
11161
+ * @memberof ReachV1CampaignsCreatedCampaignResource
11162
+ */
11163
+ 'status': ReachV1CampaignsCreatedCampaignResourceStatusEnum;
11164
+ /**
11165
+ *
11166
+ * @type {string}
11167
+ * @memberof ReachV1CampaignsCreatedCampaignResource
11168
+ */
11169
+ 'type': ReachV1CampaignsCreatedCampaignResourceTypeEnum;
11170
+ /**
11171
+ * Whether the campaign targets every contact instead of selected segments.
11172
+ * @type {boolean}
11173
+ * @memberof ReachV1CampaignsCreatedCampaignResource
11174
+ */
11175
+ 'is_all_contacts': boolean;
11176
+ /**
11177
+ * The stored extra fields, including the ones Reach sets itself.
11178
+ * @type {{ [key: string]: string; }}
11179
+ * @memberof ReachV1CampaignsCreatedCampaignResource
11180
+ */
11181
+ 'metadata': { [key: string]: string; };
11182
+ /**
11183
+ *
11184
+ * @type {string}
11185
+ * @memberof ReachV1CampaignsCreatedCampaignResource
11186
+ */
11187
+ 'created_at': string | null;
11188
+ /**
11189
+ *
11190
+ * @type {string}
11191
+ * @memberof ReachV1CampaignsCreatedCampaignResource
11192
+ */
11193
+ 'updated_at': string | null;
11194
+ }
11195
+
11196
+ export const ReachV1CampaignsCreatedCampaignResourceStatusEnum = {
11197
+ Draft: 'draft',
11198
+ Scheduled: 'scheduled',
11199
+ Sending: 'sending',
11200
+ Publish: 'publish',
11201
+ Failed: 'failed'
11202
+ } as const;
11203
+
11204
+ export type ReachV1CampaignsCreatedCampaignResourceStatusEnum = typeof ReachV1CampaignsCreatedCampaignResourceStatusEnum[keyof typeof ReachV1CampaignsCreatedCampaignResourceStatusEnum];
11205
+ export const ReachV1CampaignsCreatedCampaignResourceTypeEnum = {
11206
+ Campaign: 'campaign',
11207
+ Automation: 'automation',
11208
+ DoubleOptIn: 'double_opt_in'
11209
+ } as const;
11210
+
11211
+ export type ReachV1CampaignsCreatedCampaignResourceTypeEnum = typeof ReachV1CampaignsCreatedCampaignResourceTypeEnum[keyof typeof ReachV1CampaignsCreatedCampaignResourceTypeEnum];
11212
+
11213
+ /**
11214
+ * Create a campaign in draft status
11215
+ * @export
11216
+ * @interface ReachV1CampaignsStoreRequest
11217
+ */
11218
+ export interface ReachV1CampaignsStoreRequest {
11219
+ /**
11220
+ * From name shown to the recipients.
11221
+ * @type {string}
11222
+ * @memberof ReachV1CampaignsStoreRequest
11223
+ */
11224
+ 'sender_name': string;
11225
+ /**
11226
+ * From address of the campaign. Its domain has to be verified on the profile before the campaign can be sent.
11227
+ * @type {string}
11228
+ * @memberof ReachV1CampaignsStoreRequest
11229
+ */
11230
+ 'sender_email': string;
11231
+ /**
11232
+ * Name the campaign is listed under. Not shown to the recipients.
11233
+ * @type {string}
11234
+ * @memberof ReachV1CampaignsStoreRequest
11235
+ */
11236
+ 'title': string;
11237
+ /**
11238
+ * Subject line of the email.
11239
+ * @type {string}
11240
+ * @memberof ReachV1CampaignsStoreRequest
11241
+ */
11242
+ 'subject': string;
11243
+ /**
11244
+ * Template to send, as returned by the template endpoints. Can be left out and attached later, but the campaign cannot be sent without one.
11245
+ * @type {string}
11246
+ * @memberof ReachV1CampaignsStoreRequest
11247
+ */
11248
+ 'template_uuid': string;
11249
+ /**
11250
+ *
11251
+ * @type {ReachV1CampaignsStoreRequestMetadata}
11252
+ * @memberof ReachV1CampaignsStoreRequest
11253
+ */
11254
+ 'metadata': ReachV1CampaignsStoreRequestMetadata | null;
11255
+ }
11256
+ /**
11257
+ * Extra campaign fields. Any key outside the listed ones is rejected.
11258
+ * @export
11259
+ * @interface ReachV1CampaignsStoreRequestMetadata
11260
+ */
11261
+ export interface ReachV1CampaignsStoreRequestMetadata {
11262
+ /**
11263
+ * Preview text shown after the subject line in the inbox.
11264
+ * @type {string}
11265
+ * @memberof ReachV1CampaignsStoreRequestMetadata
11266
+ */
11267
+ 'preheader': string;
11268
+ /**
11269
+ * Where the campaign was created from.
11270
+ * @type {string}
11271
+ * @memberof ReachV1CampaignsStoreRequestMetadata
11272
+ */
11273
+ 'source': string;
11274
+ }
11116
11275
  /**
11117
11276
  * Create many contacts in one call
11118
11277
  * @export
@@ -13254,6 +13413,56 @@ export interface ReachV1ProfilesProfileResourceProfilesInner {
13254
13413
  */
13255
13414
  'updated_at': string;
13256
13415
  }
13416
+ /**
13417
+ * Create a reusable email template
13418
+ * @export
13419
+ * @interface ReachV1TemplatesStoreRequest
13420
+ */
13421
+ export interface ReachV1TemplatesStoreRequest {
13422
+ /**
13423
+ * 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.
13424
+ * @type {string}
13425
+ * @memberof ReachV1TemplatesStoreRequest
13426
+ */
13427
+ 'template_content': string;
13428
+ /**
13429
+ * Name the template is listed under. Not shown to the recipients.
13430
+ * @type {string}
13431
+ * @memberof ReachV1TemplatesStoreRequest
13432
+ */
13433
+ 'title': string | null;
13434
+ }
13435
+ /**
13436
+ *
13437
+ * @export
13438
+ * @interface ReachV1TemplatesTemplateResource
13439
+ */
13440
+ export interface ReachV1TemplatesTemplateResource {
13441
+ /**
13442
+ * Pass this as the `template_uuid` of a campaign.
13443
+ * @type {string}
13444
+ * @memberof ReachV1TemplatesTemplateResource
13445
+ */
13446
+ 'uuid': string | null;
13447
+ /**
13448
+ * Null for templates that were never named.
13449
+ * @type {string}
13450
+ * @memberof ReachV1TemplatesTemplateResource
13451
+ */
13452
+ 'title': string | null;
13453
+ /**
13454
+ *
13455
+ * @type {string}
13456
+ * @memberof ReachV1TemplatesTemplateResource
13457
+ */
13458
+ 'created_at': string | null;
13459
+ /**
13460
+ *
13461
+ * @type {string}
13462
+ * @memberof ReachV1TemplatesTemplateResource
13463
+ */
13464
+ 'updated_at': string | null;
13465
+ }
13257
13466
  /**
13258
13467
  *
13259
13468
  * @export
@@ -36125,6 +36334,50 @@ export type ListAutomationsV1SortDirectionEnum = typeof ListAutomationsV1SortDir
36125
36334
  */
36126
36335
  export const ReachCampaignsApiAxiosParamCreator = function (configuration?: Configuration) {
36127
36336
  return {
36337
+ /**
36338
+ * 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.
36339
+ * @summary Create a draft campaign
36340
+ * @param {string} profileUuid Profile uuid parameter
36341
+ * @param {ReachV1CampaignsStoreRequest} reachV1CampaignsStoreRequest
36342
+ * @param {*} [options] Override http request option.
36343
+ * @throws {RequiredError}
36344
+ */
36345
+ createADraftCampaignV1: async (profileUuid: string, reachV1CampaignsStoreRequest: ReachV1CampaignsStoreRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
36346
+ // verify required parameter 'profileUuid' is not null or undefined
36347
+ assertParamExists('createADraftCampaignV1', 'profileUuid', profileUuid)
36348
+ // verify required parameter 'reachV1CampaignsStoreRequest' is not null or undefined
36349
+ assertParamExists('createADraftCampaignV1', 'reachV1CampaignsStoreRequest', reachV1CampaignsStoreRequest)
36350
+ const localVarPath = `/api/reach/v1/profiles/{profileUuid}/campaigns`
36351
+ .replace(`{${"profileUuid"}}`, encodeURIComponent(String(profileUuid)));
36352
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
36353
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
36354
+ let baseOptions;
36355
+ if (configuration) {
36356
+ baseOptions = configuration.baseOptions;
36357
+ }
36358
+
36359
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
36360
+ const localVarHeaderParameter = {} as any;
36361
+ const localVarQueryParameter = {} as any;
36362
+
36363
+ // authentication apiToken required
36364
+ // http bearer authentication required
36365
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
36366
+
36367
+
36368
+
36369
+ localVarHeaderParameter['Content-Type'] = 'application/json';
36370
+
36371
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
36372
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
36373
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
36374
+ localVarRequestOptions.data = serializeDataIfNeeded(reachV1CampaignsStoreRequest, localVarRequestOptions, configuration)
36375
+
36376
+ return {
36377
+ url: toPathString(localVarUrlObj),
36378
+ options: localVarRequestOptions,
36379
+ };
36380
+ },
36128
36381
  /**
36129
36382
  * 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
36383
  * @summary Get campaign details
@@ -36282,6 +36535,19 @@ export const ReachCampaignsApiAxiosParamCreator = function (configuration?: Conf
36282
36535
  export const ReachCampaignsApiFp = function(configuration?: Configuration) {
36283
36536
  const localVarAxiosParamCreator = ReachCampaignsApiAxiosParamCreator(configuration)
36284
36537
  return {
36538
+ /**
36539
+ * 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.
36540
+ * @summary Create a draft campaign
36541
+ * @param {string} profileUuid Profile uuid parameter
36542
+ * @param {ReachV1CampaignsStoreRequest} reachV1CampaignsStoreRequest
36543
+ * @param {*} [options] Override http request option.
36544
+ * @throws {RequiredError}
36545
+ */
36546
+ async createADraftCampaignV1(profileUuid: string, reachV1CampaignsStoreRequest: ReachV1CampaignsStoreRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ReachV1CampaignsCreatedCampaignResource>> {
36547
+ const localVarAxiosArgs = await localVarAxiosParamCreator.createADraftCampaignV1(profileUuid, reachV1CampaignsStoreRequest, options);
36548
+ const localVarOperationServerBasePath = operationServerMap['ReachCampaignsApi.createADraftCampaignV1']?.[0]?.url;
36549
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
36550
+ },
36285
36551
  /**
36286
36552
  * 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
36553
  * @summary Get campaign details
@@ -36335,6 +36601,17 @@ export const ReachCampaignsApiFp = function(configuration?: Configuration) {
36335
36601
  export const ReachCampaignsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
36336
36602
  const localVarFp = ReachCampaignsApiFp(configuration)
36337
36603
  return {
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
+ */
36612
+ createADraftCampaignV1(profileUuid: string, reachV1CampaignsStoreRequest: ReachV1CampaignsStoreRequest, options?: RawAxiosRequestConfig): AxiosPromise<ReachV1CampaignsCreatedCampaignResource> {
36613
+ return localVarFp.createADraftCampaignV1(profileUuid, reachV1CampaignsStoreRequest, options).then((request) => request(axios, basePath));
36614
+ },
36338
36615
  /**
36339
36616
  * 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
36617
  * @summary Get campaign details
@@ -36382,6 +36659,19 @@ export const ReachCampaignsApiFactory = function (configuration?: Configuration,
36382
36659
  * @extends {BaseAPI}
36383
36660
  */
36384
36661
  export class ReachCampaignsApi extends BaseAPI {
36662
+ /**
36663
+ * 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.
36664
+ * @summary Create a draft campaign
36665
+ * @param {string} profileUuid Profile uuid parameter
36666
+ * @param {ReachV1CampaignsStoreRequest} reachV1CampaignsStoreRequest
36667
+ * @param {*} [options] Override http request option.
36668
+ * @throws {RequiredError}
36669
+ * @memberof ReachCampaignsApi
36670
+ */
36671
+ public createADraftCampaignV1(profileUuid: string, reachV1CampaignsStoreRequest: ReachV1CampaignsStoreRequest, options?: RawAxiosRequestConfig) {
36672
+ return ReachCampaignsApiFp(this.configuration).createADraftCampaignV1(profileUuid, reachV1CampaignsStoreRequest, options).then((request) => request(this.axios, this.basePath));
36673
+ }
36674
+
36385
36675
  /**
36386
36676
  * 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
36677
  * @summary Get campaign details
@@ -40206,6 +40496,198 @@ export class ReachTagsApi extends BaseAPI {
40206
40496
 
40207
40497
 
40208
40498
 
40499
+ /**
40500
+ * ReachTemplatesApi - axios parameter creator
40501
+ * @export
40502
+ */
40503
+ export const ReachTemplatesApiAxiosParamCreator = function (configuration?: Configuration) {
40504
+ return {
40505
+ /**
40506
+ * 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.
40507
+ * @summary Create an email template
40508
+ * @param {string} profileUuid Profile uuid parameter
40509
+ * @param {ReachV1TemplatesStoreRequest} reachV1TemplatesStoreRequest
40510
+ * @param {*} [options] Override http request option.
40511
+ * @throws {RequiredError}
40512
+ */
40513
+ createAnEmailTemplateV1: async (profileUuid: string, reachV1TemplatesStoreRequest: ReachV1TemplatesStoreRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
40514
+ // verify required parameter 'profileUuid' is not null or undefined
40515
+ assertParamExists('createAnEmailTemplateV1', 'profileUuid', profileUuid)
40516
+ // verify required parameter 'reachV1TemplatesStoreRequest' is not null or undefined
40517
+ assertParamExists('createAnEmailTemplateV1', 'reachV1TemplatesStoreRequest', reachV1TemplatesStoreRequest)
40518
+ const localVarPath = `/api/reach/v1/profiles/{profileUuid}/templates`
40519
+ .replace(`{${"profileUuid"}}`, encodeURIComponent(String(profileUuid)));
40520
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
40521
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
40522
+ let baseOptions;
40523
+ if (configuration) {
40524
+ baseOptions = configuration.baseOptions;
40525
+ }
40526
+
40527
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
40528
+ const localVarHeaderParameter = {} as any;
40529
+ const localVarQueryParameter = {} as any;
40530
+
40531
+ // authentication apiToken required
40532
+ // http bearer authentication required
40533
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
40534
+
40535
+
40536
+
40537
+ localVarHeaderParameter['Content-Type'] = 'application/json';
40538
+
40539
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
40540
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
40541
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
40542
+ localVarRequestOptions.data = serializeDataIfNeeded(reachV1TemplatesStoreRequest, localVarRequestOptions, configuration)
40543
+
40544
+ return {
40545
+ url: toPathString(localVarUrlObj),
40546
+ options: localVarRequestOptions,
40547
+ };
40548
+ },
40549
+ /**
40550
+ * 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.
40551
+ * @summary List email templates
40552
+ * @param {string} profileUuid Profile uuid parameter
40553
+ * @param {*} [options] Override http request option.
40554
+ * @throws {RequiredError}
40555
+ */
40556
+ listEmailTemplatesV1: async (profileUuid: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
40557
+ // verify required parameter 'profileUuid' is not null or undefined
40558
+ assertParamExists('listEmailTemplatesV1', 'profileUuid', profileUuid)
40559
+ const localVarPath = `/api/reach/v1/profiles/{profileUuid}/templates`
40560
+ .replace(`{${"profileUuid"}}`, encodeURIComponent(String(profileUuid)));
40561
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
40562
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
40563
+ let baseOptions;
40564
+ if (configuration) {
40565
+ baseOptions = configuration.baseOptions;
40566
+ }
40567
+
40568
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
40569
+ const localVarHeaderParameter = {} as any;
40570
+ const localVarQueryParameter = {} as any;
40571
+
40572
+ // authentication apiToken required
40573
+ // http bearer authentication required
40574
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
40575
+
40576
+
40577
+
40578
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
40579
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
40580
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
40581
+
40582
+ return {
40583
+ url: toPathString(localVarUrlObj),
40584
+ options: localVarRequestOptions,
40585
+ };
40586
+ },
40587
+ }
40588
+ };
40589
+
40590
+ /**
40591
+ * ReachTemplatesApi - functional programming interface
40592
+ * @export
40593
+ */
40594
+ export const ReachTemplatesApiFp = function(configuration?: Configuration) {
40595
+ const localVarAxiosParamCreator = ReachTemplatesApiAxiosParamCreator(configuration)
40596
+ return {
40597
+ /**
40598
+ * 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.
40599
+ * @summary Create an email template
40600
+ * @param {string} profileUuid Profile uuid parameter
40601
+ * @param {ReachV1TemplatesStoreRequest} reachV1TemplatesStoreRequest
40602
+ * @param {*} [options] Override http request option.
40603
+ * @throws {RequiredError}
40604
+ */
40605
+ async createAnEmailTemplateV1(profileUuid: string, reachV1TemplatesStoreRequest: ReachV1TemplatesStoreRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ReachV1TemplatesTemplateResource>> {
40606
+ const localVarAxiosArgs = await localVarAxiosParamCreator.createAnEmailTemplateV1(profileUuid, reachV1TemplatesStoreRequest, options);
40607
+ const localVarOperationServerBasePath = operationServerMap['ReachTemplatesApi.createAnEmailTemplateV1']?.[0]?.url;
40608
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
40609
+ },
40610
+ /**
40611
+ * 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.
40612
+ * @summary List email templates
40613
+ * @param {string} profileUuid Profile uuid parameter
40614
+ * @param {*} [options] Override http request option.
40615
+ * @throws {RequiredError}
40616
+ */
40617
+ async listEmailTemplatesV1(profileUuid: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<ReachV1TemplatesTemplateResource>>> {
40618
+ const localVarAxiosArgs = await localVarAxiosParamCreator.listEmailTemplatesV1(profileUuid, options);
40619
+ const localVarOperationServerBasePath = operationServerMap['ReachTemplatesApi.listEmailTemplatesV1']?.[0]?.url;
40620
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
40621
+ },
40622
+ }
40623
+ };
40624
+
40625
+ /**
40626
+ * ReachTemplatesApi - factory interface
40627
+ * @export
40628
+ */
40629
+ export const ReachTemplatesApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
40630
+ const localVarFp = ReachTemplatesApiFp(configuration)
40631
+ return {
40632
+ /**
40633
+ * 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.
40634
+ * @summary Create an email template
40635
+ * @param {string} profileUuid Profile uuid parameter
40636
+ * @param {ReachV1TemplatesStoreRequest} reachV1TemplatesStoreRequest
40637
+ * @param {*} [options] Override http request option.
40638
+ * @throws {RequiredError}
40639
+ */
40640
+ createAnEmailTemplateV1(profileUuid: string, reachV1TemplatesStoreRequest: ReachV1TemplatesStoreRequest, options?: RawAxiosRequestConfig): AxiosPromise<ReachV1TemplatesTemplateResource> {
40641
+ return localVarFp.createAnEmailTemplateV1(profileUuid, reachV1TemplatesStoreRequest, options).then((request) => request(axios, basePath));
40642
+ },
40643
+ /**
40644
+ * 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.
40645
+ * @summary List email templates
40646
+ * @param {string} profileUuid Profile uuid parameter
40647
+ * @param {*} [options] Override http request option.
40648
+ * @throws {RequiredError}
40649
+ */
40650
+ listEmailTemplatesV1(profileUuid: string, options?: RawAxiosRequestConfig): AxiosPromise<Array<ReachV1TemplatesTemplateResource>> {
40651
+ return localVarFp.listEmailTemplatesV1(profileUuid, options).then((request) => request(axios, basePath));
40652
+ },
40653
+ };
40654
+ };
40655
+
40656
+ /**
40657
+ * ReachTemplatesApi - object-oriented interface
40658
+ * @export
40659
+ * @class ReachTemplatesApi
40660
+ * @extends {BaseAPI}
40661
+ */
40662
+ export class ReachTemplatesApi extends BaseAPI {
40663
+ /**
40664
+ * 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.
40665
+ * @summary Create an email template
40666
+ * @param {string} profileUuid Profile uuid parameter
40667
+ * @param {ReachV1TemplatesStoreRequest} reachV1TemplatesStoreRequest
40668
+ * @param {*} [options] Override http request option.
40669
+ * @throws {RequiredError}
40670
+ * @memberof ReachTemplatesApi
40671
+ */
40672
+ public createAnEmailTemplateV1(profileUuid: string, reachV1TemplatesStoreRequest: ReachV1TemplatesStoreRequest, options?: RawAxiosRequestConfig) {
40673
+ return ReachTemplatesApiFp(this.configuration).createAnEmailTemplateV1(profileUuid, reachV1TemplatesStoreRequest, options).then((request) => request(this.axios, this.basePath));
40674
+ }
40675
+
40676
+ /**
40677
+ * 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.
40678
+ * @summary List email templates
40679
+ * @param {string} profileUuid Profile uuid parameter
40680
+ * @param {*} [options] Override http request option.
40681
+ * @throws {RequiredError}
40682
+ * @memberof ReachTemplatesApi
40683
+ */
40684
+ public listEmailTemplatesV1(profileUuid: string, options?: RawAxiosRequestConfig) {
40685
+ return ReachTemplatesApiFp(this.configuration).listEmailTemplatesV1(profileUuid, options).then((request) => request(this.axios, this.basePath));
40686
+ }
40687
+ }
40688
+
40689
+
40690
+
40209
40691
  /**
40210
40692
  * VPSActionsApi - axios parameter creator
40211
40693
  * @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.46.3
7
7
  *
8
8
  * NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
9
9
  * If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
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.46.3
7
7
  *
8
8
  * NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
9
9
  * If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
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.46.3
7
7
  *
8
8
  * NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
9
9
  * If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
@@ -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.2",
51
+ 'User-Agent': "hostinger-typescript-sdk/1.46.4",
52
52
  ...param.baseOptions?.headers,
53
53
  },
54
54
  };