@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/dist/api.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Hostinger API
3
3
  *
4
- * API Version: 1.46.2
4
+ * API Version: 1.46.3
5
5
  *
6
6
  * NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
7
7
  * If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
@@ -10895,6 +10895,163 @@ export interface ReachV1CampaignsCampaignSummaryStatisticsResource {
10895
10895
  */
10896
10896
  'click_to_open_rate': number;
10897
10897
  }
10898
+ /**
10899
+ * The campaign as it was stored, without targeting or delivery progress
10900
+ * @export
10901
+ * @interface ReachV1CampaignsCreatedCampaignResource
10902
+ */
10903
+ export interface ReachV1CampaignsCreatedCampaignResource {
10904
+ /**
10905
+ *
10906
+ * @type {string}
10907
+ * @memberof ReachV1CampaignsCreatedCampaignResource
10908
+ */
10909
+ 'uuid': string;
10910
+ /**
10911
+ *
10912
+ * @type {string}
10913
+ * @memberof ReachV1CampaignsCreatedCampaignResource
10914
+ */
10915
+ 'title': string;
10916
+ /**
10917
+ *
10918
+ * @type {string}
10919
+ * @memberof ReachV1CampaignsCreatedCampaignResource
10920
+ */
10921
+ 'subject': string;
10922
+ /**
10923
+ *
10924
+ * @type {string}
10925
+ * @memberof ReachV1CampaignsCreatedCampaignResource
10926
+ */
10927
+ 'sender_name': string;
10928
+ /**
10929
+ *
10930
+ * @type {string}
10931
+ * @memberof ReachV1CampaignsCreatedCampaignResource
10932
+ */
10933
+ 'sender_email': string;
10934
+ /**
10935
+ *
10936
+ * @type {string}
10937
+ * @memberof ReachV1CampaignsCreatedCampaignResource
10938
+ */
10939
+ 'template_uuid': string | null;
10940
+ /**
10941
+ * Always `draft` for a campaign that was just created.
10942
+ * @type {string}
10943
+ * @memberof ReachV1CampaignsCreatedCampaignResource
10944
+ */
10945
+ 'status': ReachV1CampaignsCreatedCampaignResourceStatusEnum;
10946
+ /**
10947
+ *
10948
+ * @type {string}
10949
+ * @memberof ReachV1CampaignsCreatedCampaignResource
10950
+ */
10951
+ 'type': ReachV1CampaignsCreatedCampaignResourceTypeEnum;
10952
+ /**
10953
+ * Whether the campaign targets every contact instead of selected segments.
10954
+ * @type {boolean}
10955
+ * @memberof ReachV1CampaignsCreatedCampaignResource
10956
+ */
10957
+ 'is_all_contacts': boolean;
10958
+ /**
10959
+ * The stored extra fields, including the ones Reach sets itself.
10960
+ * @type {{ [key: string]: string; }}
10961
+ * @memberof ReachV1CampaignsCreatedCampaignResource
10962
+ */
10963
+ 'metadata': {
10964
+ [key: string]: string;
10965
+ };
10966
+ /**
10967
+ *
10968
+ * @type {string}
10969
+ * @memberof ReachV1CampaignsCreatedCampaignResource
10970
+ */
10971
+ 'created_at': string | null;
10972
+ /**
10973
+ *
10974
+ * @type {string}
10975
+ * @memberof ReachV1CampaignsCreatedCampaignResource
10976
+ */
10977
+ 'updated_at': string | null;
10978
+ }
10979
+ export declare const ReachV1CampaignsCreatedCampaignResourceStatusEnum: {
10980
+ readonly Draft: "draft";
10981
+ readonly Scheduled: "scheduled";
10982
+ readonly Sending: "sending";
10983
+ readonly Publish: "publish";
10984
+ readonly Failed: "failed";
10985
+ };
10986
+ export type ReachV1CampaignsCreatedCampaignResourceStatusEnum = typeof ReachV1CampaignsCreatedCampaignResourceStatusEnum[keyof typeof ReachV1CampaignsCreatedCampaignResourceStatusEnum];
10987
+ export declare const ReachV1CampaignsCreatedCampaignResourceTypeEnum: {
10988
+ readonly Campaign: "campaign";
10989
+ readonly Automation: "automation";
10990
+ readonly DoubleOptIn: "double_opt_in";
10991
+ };
10992
+ export type ReachV1CampaignsCreatedCampaignResourceTypeEnum = typeof ReachV1CampaignsCreatedCampaignResourceTypeEnum[keyof typeof ReachV1CampaignsCreatedCampaignResourceTypeEnum];
10993
+ /**
10994
+ * Create a campaign in draft status
10995
+ * @export
10996
+ * @interface ReachV1CampaignsStoreRequest
10997
+ */
10998
+ export interface ReachV1CampaignsStoreRequest {
10999
+ /**
11000
+ * From name shown to the recipients.
11001
+ * @type {string}
11002
+ * @memberof ReachV1CampaignsStoreRequest
11003
+ */
11004
+ 'sender_name': string;
11005
+ /**
11006
+ * From address of the campaign. Its domain has to be verified on the profile before the campaign can be sent.
11007
+ * @type {string}
11008
+ * @memberof ReachV1CampaignsStoreRequest
11009
+ */
11010
+ 'sender_email': string;
11011
+ /**
11012
+ * Name the campaign is listed under. Not shown to the recipients.
11013
+ * @type {string}
11014
+ * @memberof ReachV1CampaignsStoreRequest
11015
+ */
11016
+ 'title': string;
11017
+ /**
11018
+ * Subject line of the email.
11019
+ * @type {string}
11020
+ * @memberof ReachV1CampaignsStoreRequest
11021
+ */
11022
+ 'subject': string;
11023
+ /**
11024
+ * Template to send, as returned by the template endpoints. Can be left out and attached later, but the campaign cannot be sent without one.
11025
+ * @type {string}
11026
+ * @memberof ReachV1CampaignsStoreRequest
11027
+ */
11028
+ 'template_uuid': string;
11029
+ /**
11030
+ *
11031
+ * @type {ReachV1CampaignsStoreRequestMetadata}
11032
+ * @memberof ReachV1CampaignsStoreRequest
11033
+ */
11034
+ 'metadata': ReachV1CampaignsStoreRequestMetadata | null;
11035
+ }
11036
+ /**
11037
+ * Extra campaign fields. Any key outside the listed ones is rejected.
11038
+ * @export
11039
+ * @interface ReachV1CampaignsStoreRequestMetadata
11040
+ */
11041
+ export interface ReachV1CampaignsStoreRequestMetadata {
11042
+ /**
11043
+ * Preview text shown after the subject line in the inbox.
11044
+ * @type {string}
11045
+ * @memberof ReachV1CampaignsStoreRequestMetadata
11046
+ */
11047
+ 'preheader': string;
11048
+ /**
11049
+ * Where the campaign was created from.
11050
+ * @type {string}
11051
+ * @memberof ReachV1CampaignsStoreRequestMetadata
11052
+ */
11053
+ 'source': string;
11054
+ }
10898
11055
  /**
10899
11056
  * Create many contacts in one call
10900
11057
  * @export
@@ -12961,6 +13118,56 @@ export interface ReachV1ProfilesProfileResourceProfilesInner {
12961
13118
  */
12962
13119
  'updated_at': string;
12963
13120
  }
13121
+ /**
13122
+ * Create a reusable email template
13123
+ * @export
13124
+ * @interface ReachV1TemplatesStoreRequest
13125
+ */
13126
+ export interface ReachV1TemplatesStoreRequest {
13127
+ /**
13128
+ * 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.
13129
+ * @type {string}
13130
+ * @memberof ReachV1TemplatesStoreRequest
13131
+ */
13132
+ 'template_content': string;
13133
+ /**
13134
+ * Name the template is listed under. Not shown to the recipients.
13135
+ * @type {string}
13136
+ * @memberof ReachV1TemplatesStoreRequest
13137
+ */
13138
+ 'title': string | null;
13139
+ }
13140
+ /**
13141
+ *
13142
+ * @export
13143
+ * @interface ReachV1TemplatesTemplateResource
13144
+ */
13145
+ export interface ReachV1TemplatesTemplateResource {
13146
+ /**
13147
+ * Pass this as the `template_uuid` of a campaign.
13148
+ * @type {string}
13149
+ * @memberof ReachV1TemplatesTemplateResource
13150
+ */
13151
+ 'uuid': string | null;
13152
+ /**
13153
+ * Null for templates that were never named.
13154
+ * @type {string}
13155
+ * @memberof ReachV1TemplatesTemplateResource
13156
+ */
13157
+ 'title': string | null;
13158
+ /**
13159
+ *
13160
+ * @type {string}
13161
+ * @memberof ReachV1TemplatesTemplateResource
13162
+ */
13163
+ 'created_at': string | null;
13164
+ /**
13165
+ *
13166
+ * @type {string}
13167
+ * @memberof ReachV1TemplatesTemplateResource
13168
+ */
13169
+ 'updated_at': string | null;
13170
+ }
12964
13171
  /**
12965
13172
  *
12966
13173
  * @export
@@ -25502,6 +25709,15 @@ export type ListAutomationsV1SortDirectionEnum = typeof ListAutomationsV1SortDir
25502
25709
  * @export
25503
25710
  */
25504
25711
  export declare const ReachCampaignsApiAxiosParamCreator: (configuration?: Configuration) => {
25712
+ /**
25713
+ * 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.
25714
+ * @summary Create a draft campaign
25715
+ * @param {string} profileUuid Profile uuid parameter
25716
+ * @param {ReachV1CampaignsStoreRequest} reachV1CampaignsStoreRequest
25717
+ * @param {*} [options] Override http request option.
25718
+ * @throws {RequiredError}
25719
+ */
25720
+ createADraftCampaignV1: (profileUuid: string, reachV1CampaignsStoreRequest: ReachV1CampaignsStoreRequest, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
25505
25721
  /**
25506
25722
  * 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.
25507
25723
  * @summary Get campaign details
@@ -25539,6 +25755,15 @@ export declare const ReachCampaignsApiAxiosParamCreator: (configuration?: Config
25539
25755
  * @export
25540
25756
  */
25541
25757
  export declare const ReachCampaignsApiFp: (configuration?: Configuration) => {
25758
+ /**
25759
+ * 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.
25760
+ * @summary Create a draft campaign
25761
+ * @param {string} profileUuid Profile uuid parameter
25762
+ * @param {ReachV1CampaignsStoreRequest} reachV1CampaignsStoreRequest
25763
+ * @param {*} [options] Override http request option.
25764
+ * @throws {RequiredError}
25765
+ */
25766
+ createADraftCampaignV1(profileUuid: string, reachV1CampaignsStoreRequest: ReachV1CampaignsStoreRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ReachV1CampaignsCreatedCampaignResource>>;
25542
25767
  /**
25543
25768
  * 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.
25544
25769
  * @summary Get campaign details
@@ -25576,6 +25801,15 @@ export declare const ReachCampaignsApiFp: (configuration?: Configuration) => {
25576
25801
  * @export
25577
25802
  */
25578
25803
  export declare const ReachCampaignsApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
25804
+ /**
25805
+ * 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.
25806
+ * @summary Create a draft campaign
25807
+ * @param {string} profileUuid Profile uuid parameter
25808
+ * @param {ReachV1CampaignsStoreRequest} reachV1CampaignsStoreRequest
25809
+ * @param {*} [options] Override http request option.
25810
+ * @throws {RequiredError}
25811
+ */
25812
+ createADraftCampaignV1(profileUuid: string, reachV1CampaignsStoreRequest: ReachV1CampaignsStoreRequest, options?: RawAxiosRequestConfig): AxiosPromise<ReachV1CampaignsCreatedCampaignResource>;
25579
25813
  /**
25580
25814
  * 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.
25581
25815
  * @summary Get campaign details
@@ -25615,6 +25849,16 @@ export declare const ReachCampaignsApiFactory: (configuration?: Configuration, b
25615
25849
  * @extends {BaseAPI}
25616
25850
  */
25617
25851
  export declare class ReachCampaignsApi extends BaseAPI {
25852
+ /**
25853
+ * 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.
25854
+ * @summary Create a draft campaign
25855
+ * @param {string} profileUuid Profile uuid parameter
25856
+ * @param {ReachV1CampaignsStoreRequest} reachV1CampaignsStoreRequest
25857
+ * @param {*} [options] Override http request option.
25858
+ * @throws {RequiredError}
25859
+ * @memberof ReachCampaignsApi
25860
+ */
25861
+ createADraftCampaignV1(profileUuid: string, reachV1CampaignsStoreRequest: ReachV1CampaignsStoreRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<ReachV1CampaignsCreatedCampaignResource, any, {}, any>>;
25618
25862
  /**
25619
25863
  * 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.
25620
25864
  * @summary Get campaign details
@@ -27493,6 +27737,102 @@ export declare class ReachTagsApi extends BaseAPI {
27493
27737
  */
27494
27738
  renameATagV1(profileUuid: string, tagUuid: string, reachV1ContactsTagsUpdateRequest: ReachV1ContactsTagsUpdateRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<ReachV1ContactsTagsTagResource, any, {}, any>>;
27495
27739
  }
27740
+ /**
27741
+ * ReachTemplatesApi - axios parameter creator
27742
+ * @export
27743
+ */
27744
+ export declare const ReachTemplatesApiAxiosParamCreator: (configuration?: Configuration) => {
27745
+ /**
27746
+ * 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.
27747
+ * @summary Create an email template
27748
+ * @param {string} profileUuid Profile uuid parameter
27749
+ * @param {ReachV1TemplatesStoreRequest} reachV1TemplatesStoreRequest
27750
+ * @param {*} [options] Override http request option.
27751
+ * @throws {RequiredError}
27752
+ */
27753
+ createAnEmailTemplateV1: (profileUuid: string, reachV1TemplatesStoreRequest: ReachV1TemplatesStoreRequest, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
27754
+ /**
27755
+ * 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.
27756
+ * @summary List email templates
27757
+ * @param {string} profileUuid Profile uuid parameter
27758
+ * @param {*} [options] Override http request option.
27759
+ * @throws {RequiredError}
27760
+ */
27761
+ listEmailTemplatesV1: (profileUuid: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
27762
+ };
27763
+ /**
27764
+ * ReachTemplatesApi - functional programming interface
27765
+ * @export
27766
+ */
27767
+ export declare const ReachTemplatesApiFp: (configuration?: Configuration) => {
27768
+ /**
27769
+ * 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.
27770
+ * @summary Create an email template
27771
+ * @param {string} profileUuid Profile uuid parameter
27772
+ * @param {ReachV1TemplatesStoreRequest} reachV1TemplatesStoreRequest
27773
+ * @param {*} [options] Override http request option.
27774
+ * @throws {RequiredError}
27775
+ */
27776
+ createAnEmailTemplateV1(profileUuid: string, reachV1TemplatesStoreRequest: ReachV1TemplatesStoreRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ReachV1TemplatesTemplateResource>>;
27777
+ /**
27778
+ * 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.
27779
+ * @summary List email templates
27780
+ * @param {string} profileUuid Profile uuid parameter
27781
+ * @param {*} [options] Override http request option.
27782
+ * @throws {RequiredError}
27783
+ */
27784
+ listEmailTemplatesV1(profileUuid: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<ReachV1TemplatesTemplateResource>>>;
27785
+ };
27786
+ /**
27787
+ * ReachTemplatesApi - factory interface
27788
+ * @export
27789
+ */
27790
+ export declare const ReachTemplatesApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
27791
+ /**
27792
+ * 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.
27793
+ * @summary Create an email template
27794
+ * @param {string} profileUuid Profile uuid parameter
27795
+ * @param {ReachV1TemplatesStoreRequest} reachV1TemplatesStoreRequest
27796
+ * @param {*} [options] Override http request option.
27797
+ * @throws {RequiredError}
27798
+ */
27799
+ createAnEmailTemplateV1(profileUuid: string, reachV1TemplatesStoreRequest: ReachV1TemplatesStoreRequest, options?: RawAxiosRequestConfig): AxiosPromise<ReachV1TemplatesTemplateResource>;
27800
+ /**
27801
+ * 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.
27802
+ * @summary List email templates
27803
+ * @param {string} profileUuid Profile uuid parameter
27804
+ * @param {*} [options] Override http request option.
27805
+ * @throws {RequiredError}
27806
+ */
27807
+ listEmailTemplatesV1(profileUuid: string, options?: RawAxiosRequestConfig): AxiosPromise<Array<ReachV1TemplatesTemplateResource>>;
27808
+ };
27809
+ /**
27810
+ * ReachTemplatesApi - object-oriented interface
27811
+ * @export
27812
+ * @class ReachTemplatesApi
27813
+ * @extends {BaseAPI}
27814
+ */
27815
+ export declare class ReachTemplatesApi extends BaseAPI {
27816
+ /**
27817
+ * 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.
27818
+ * @summary Create an email template
27819
+ * @param {string} profileUuid Profile uuid parameter
27820
+ * @param {ReachV1TemplatesStoreRequest} reachV1TemplatesStoreRequest
27821
+ * @param {*} [options] Override http request option.
27822
+ * @throws {RequiredError}
27823
+ * @memberof ReachTemplatesApi
27824
+ */
27825
+ createAnEmailTemplateV1(profileUuid: string, reachV1TemplatesStoreRequest: ReachV1TemplatesStoreRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<ReachV1TemplatesTemplateResource, any, {}, any>>;
27826
+ /**
27827
+ * 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.
27828
+ * @summary List email templates
27829
+ * @param {string} profileUuid Profile uuid parameter
27830
+ * @param {*} [options] Override http request option.
27831
+ * @throws {RequiredError}
27832
+ * @memberof ReachTemplatesApi
27833
+ */
27834
+ listEmailTemplatesV1(profileUuid: string, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<ReachV1TemplatesTemplateResource[], any, {}, any>>;
27835
+ }
27496
27836
  /**
27497
27837
  * VPSActionsApi - axios parameter creator
27498
27838
  * @export