hostinger-api-sdk 1.30.7 → 1.31.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/esm/api.js CHANGED
@@ -3,7 +3,7 @@
3
3
  /**
4
4
  * Hostinger API
5
5
  *
6
- * API Version: 1.32.6
6
+ * API Version: 1.33.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
@@ -355,6 +355,41 @@ export const MailV1WebhooksWebhookSecretResourceStatusEnum = {
355
355
  Disabled: 'disabled',
356
356
  Paused: 'paused'
357
357
  };
358
+ export const ReachV1AutomationsAutomationResourceStatusEnum = {
359
+ Active: 'active',
360
+ Paused: 'paused',
361
+ Draft: 'draft'
362
+ };
363
+ export const ReachV1AutomationsAutomationResourceTypeEnum = {
364
+ Welcome: 'welcome',
365
+ WelcomeSeries: 'welcome_series',
366
+ PromotionalSeries: 'promotional_series',
367
+ TrustBuildingSeries: 'trust_building_series',
368
+ EcommerceAbandonedCart: 'ecommerce_abandoned_cart',
369
+ EcommerceRecommendAfterPurchase: 'ecommerce_recommend_after_purchase',
370
+ EcommercePostPurchase: 'ecommerce_post_purchase',
371
+ EcommerceDiscountAfterPurchase: 'ecommerce_discount_after_purchase',
372
+ ReEngagementNonOpeners: 're_engagement_non_openers',
373
+ ReEngagementNonClickers: 're_engagement_non_clickers',
374
+ FormSubmitted: 'form_submitted',
375
+ Custom: 'custom'
376
+ };
377
+ export const ReachV1AutomationsStepsAutomationStepResourceTypeEnum = {
378
+ Trigger: 'trigger',
379
+ Action: 'action',
380
+ Conditional: 'conditional'
381
+ };
382
+ export const ReachV1AutomationsStepsAutomationStepResourceValueEnum = {
383
+ NewContact: 'new_contact',
384
+ NewSegmentContact: 'new_segment_contact',
385
+ FormSubmitted: 'form_submitted',
386
+ Webhook: 'webhook',
387
+ SendWelcomeEmail: 'send_welcome_email',
388
+ SendEmail: 'send_email',
389
+ SendCampaign: 'send_campaign',
390
+ Decision: 'decision',
391
+ Delay: 'delay'
392
+ };
358
393
  export const ReachV1ContactsContactDetailsResourceSubscriptionStatusEnum = {
359
394
  Subscribed: 'subscribed',
360
395
  Unsubscribed: 'unsubscribed',
@@ -16100,6 +16135,301 @@ export const ListWebhooksV1StatusEnum = {
16100
16135
  Disabled: 'disabled',
16101
16136
  Paused: 'paused'
16102
16137
  };
16138
+ /**
16139
+ * ReachAutomationsApi - axios parameter creator
16140
+ * @export
16141
+ */
16142
+ export const ReachAutomationsApiAxiosParamCreator = function (configuration) {
16143
+ return {
16144
+ /**
16145
+ * Get a single automation with the counts of contacts that entered it, are moving through it, finished it or failed on the way. This describes the automation itself. To see the workflow it runs, use the steps endpoint.
16146
+ * @summary Get automation details
16147
+ * @param {string} profileUuid Profile uuid parameter
16148
+ * @param {string} automationUuid Automation uuid parameter
16149
+ * @param {*} [options] Override http request option.
16150
+ * @throws {RequiredError}
16151
+ */
16152
+ getAutomationDetailsV1: (profileUuid_1, automationUuid_1, ...args_1) => __awaiter(this, [profileUuid_1, automationUuid_1, ...args_1], void 0, function* (profileUuid, automationUuid, options = {}) {
16153
+ // verify required parameter 'profileUuid' is not null or undefined
16154
+ assertParamExists('getAutomationDetailsV1', 'profileUuid', profileUuid);
16155
+ // verify required parameter 'automationUuid' is not null or undefined
16156
+ assertParamExists('getAutomationDetailsV1', 'automationUuid', automationUuid);
16157
+ const localVarPath = `/api/reach/v1/profiles/{profileUuid}/automations/{automationUuid}`
16158
+ .replace(`{${"profileUuid"}}`, encodeURIComponent(String(profileUuid)))
16159
+ .replace(`{${"automationUuid"}}`, encodeURIComponent(String(automationUuid)));
16160
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
16161
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
16162
+ let baseOptions;
16163
+ if (configuration) {
16164
+ baseOptions = configuration.baseOptions;
16165
+ }
16166
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
16167
+ const localVarHeaderParameter = {};
16168
+ const localVarQueryParameter = {};
16169
+ // authentication apiToken required
16170
+ // http bearer authentication required
16171
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
16172
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
16173
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
16174
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
16175
+ return {
16176
+ url: toPathString(localVarUrlObj),
16177
+ options: localVarRequestOptions,
16178
+ };
16179
+ }),
16180
+ /**
16181
+ * Get the workflow of an automation as a flat list of steps. The steps form a tree rather than a straight line: follow `parent_uuid` to reconstruct the branches, and use `step_order` to order the steps that share a parent. An automation with no steps yet returns an empty list.
16182
+ * @summary List automation steps
16183
+ * @param {string} profileUuid Profile uuid parameter
16184
+ * @param {string} automationUuid Automation uuid parameter
16185
+ * @param {*} [options] Override http request option.
16186
+ * @throws {RequiredError}
16187
+ */
16188
+ listAutomationStepsV1: (profileUuid_1, automationUuid_1, ...args_1) => __awaiter(this, [profileUuid_1, automationUuid_1, ...args_1], void 0, function* (profileUuid, automationUuid, options = {}) {
16189
+ // verify required parameter 'profileUuid' is not null or undefined
16190
+ assertParamExists('listAutomationStepsV1', 'profileUuid', profileUuid);
16191
+ // verify required parameter 'automationUuid' is not null or undefined
16192
+ assertParamExists('listAutomationStepsV1', 'automationUuid', automationUuid);
16193
+ const localVarPath = `/api/reach/v1/profiles/{profileUuid}/automations/{automationUuid}/steps`
16194
+ .replace(`{${"profileUuid"}}`, encodeURIComponent(String(profileUuid)))
16195
+ .replace(`{${"automationUuid"}}`, encodeURIComponent(String(automationUuid)));
16196
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
16197
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
16198
+ let baseOptions;
16199
+ if (configuration) {
16200
+ baseOptions = configuration.baseOptions;
16201
+ }
16202
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
16203
+ const localVarHeaderParameter = {};
16204
+ const localVarQueryParameter = {};
16205
+ // authentication apiToken required
16206
+ // http bearer authentication required
16207
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
16208
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
16209
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
16210
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
16211
+ return {
16212
+ url: toPathString(localVarUrlObj),
16213
+ options: localVarRequestOptions,
16214
+ };
16215
+ }),
16216
+ /**
16217
+ * Get a paginated list of the automations in a profile. Every automation comes with the counts of contacts that entered it, are moving through it, finished it or failed on the way. Those counts describe the contact journey and are not email engagement metrics - for opens, clicks and unsubscribes use the campaign statistics endpoint instead.
16218
+ * @summary List automations
16219
+ * @param {string} profileUuid Profile uuid parameter
16220
+ * @param {ListAutomationsV1StatusEnum} [status] Filter automations by status. There is no `completed` status. An automation that has finished for every contact still reports `active`.
16221
+ * @param {ListAutomationsV1SortDirectionEnum} [sortDirection] Order automations by creation date. Newest first unless set to `asc`.
16222
+ * @param {number} [page] Page number
16223
+ * @param {number} [perPage] Number of items per page
16224
+ * @param {*} [options] Override http request option.
16225
+ * @throws {RequiredError}
16226
+ */
16227
+ listAutomationsV1: (profileUuid_1, status_1, sortDirection_1, page_1, perPage_1, ...args_1) => __awaiter(this, [profileUuid_1, status_1, sortDirection_1, page_1, perPage_1, ...args_1], void 0, function* (profileUuid, status, sortDirection, page, perPage, options = {}) {
16228
+ // verify required parameter 'profileUuid' is not null or undefined
16229
+ assertParamExists('listAutomationsV1', 'profileUuid', profileUuid);
16230
+ const localVarPath = `/api/reach/v1/profiles/{profileUuid}/automations`
16231
+ .replace(`{${"profileUuid"}}`, encodeURIComponent(String(profileUuid)));
16232
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
16233
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
16234
+ let baseOptions;
16235
+ if (configuration) {
16236
+ baseOptions = configuration.baseOptions;
16237
+ }
16238
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
16239
+ const localVarHeaderParameter = {};
16240
+ const localVarQueryParameter = {};
16241
+ // authentication apiToken required
16242
+ // http bearer authentication required
16243
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
16244
+ if (status !== undefined) {
16245
+ localVarQueryParameter['status'] = status;
16246
+ }
16247
+ if (sortDirection !== undefined) {
16248
+ localVarQueryParameter['sort_direction'] = sortDirection;
16249
+ }
16250
+ if (page !== undefined) {
16251
+ localVarQueryParameter['page'] = page;
16252
+ }
16253
+ if (perPage !== undefined) {
16254
+ localVarQueryParameter['per_page'] = perPage;
16255
+ }
16256
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
16257
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
16258
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
16259
+ return {
16260
+ url: toPathString(localVarUrlObj),
16261
+ options: localVarRequestOptions,
16262
+ };
16263
+ }),
16264
+ };
16265
+ };
16266
+ /**
16267
+ * ReachAutomationsApi - functional programming interface
16268
+ * @export
16269
+ */
16270
+ export const ReachAutomationsApiFp = function (configuration) {
16271
+ const localVarAxiosParamCreator = ReachAutomationsApiAxiosParamCreator(configuration);
16272
+ return {
16273
+ /**
16274
+ * Get a single automation with the counts of contacts that entered it, are moving through it, finished it or failed on the way. This describes the automation itself. To see the workflow it runs, use the steps endpoint.
16275
+ * @summary Get automation details
16276
+ * @param {string} profileUuid Profile uuid parameter
16277
+ * @param {string} automationUuid Automation uuid parameter
16278
+ * @param {*} [options] Override http request option.
16279
+ * @throws {RequiredError}
16280
+ */
16281
+ getAutomationDetailsV1(profileUuid, automationUuid, options) {
16282
+ return __awaiter(this, void 0, void 0, function* () {
16283
+ var _a, _b;
16284
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getAutomationDetailsV1(profileUuid, automationUuid, options);
16285
+ const localVarOperationServerBasePath = (_b = (_a = operationServerMap['ReachAutomationsApi.getAutomationDetailsV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
16286
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
16287
+ });
16288
+ },
16289
+ /**
16290
+ * Get the workflow of an automation as a flat list of steps. The steps form a tree rather than a straight line: follow `parent_uuid` to reconstruct the branches, and use `step_order` to order the steps that share a parent. An automation with no steps yet returns an empty list.
16291
+ * @summary List automation steps
16292
+ * @param {string} profileUuid Profile uuid parameter
16293
+ * @param {string} automationUuid Automation uuid parameter
16294
+ * @param {*} [options] Override http request option.
16295
+ * @throws {RequiredError}
16296
+ */
16297
+ listAutomationStepsV1(profileUuid, automationUuid, options) {
16298
+ return __awaiter(this, void 0, void 0, function* () {
16299
+ var _a, _b;
16300
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.listAutomationStepsV1(profileUuid, automationUuid, options);
16301
+ const localVarOperationServerBasePath = (_b = (_a = operationServerMap['ReachAutomationsApi.listAutomationStepsV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
16302
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
16303
+ });
16304
+ },
16305
+ /**
16306
+ * Get a paginated list of the automations in a profile. Every automation comes with the counts of contacts that entered it, are moving through it, finished it or failed on the way. Those counts describe the contact journey and are not email engagement metrics - for opens, clicks and unsubscribes use the campaign statistics endpoint instead.
16307
+ * @summary List automations
16308
+ * @param {string} profileUuid Profile uuid parameter
16309
+ * @param {ListAutomationsV1StatusEnum} [status] Filter automations by status. There is no `completed` status. An automation that has finished for every contact still reports `active`.
16310
+ * @param {ListAutomationsV1SortDirectionEnum} [sortDirection] Order automations by creation date. Newest first unless set to `asc`.
16311
+ * @param {number} [page] Page number
16312
+ * @param {number} [perPage] Number of items per page
16313
+ * @param {*} [options] Override http request option.
16314
+ * @throws {RequiredError}
16315
+ */
16316
+ listAutomationsV1(profileUuid, status, sortDirection, page, perPage, options) {
16317
+ return __awaiter(this, void 0, void 0, function* () {
16318
+ var _a, _b;
16319
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.listAutomationsV1(profileUuid, status, sortDirection, page, perPage, options);
16320
+ const localVarOperationServerBasePath = (_b = (_a = operationServerMap['ReachAutomationsApi.listAutomationsV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
16321
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
16322
+ });
16323
+ },
16324
+ };
16325
+ };
16326
+ /**
16327
+ * ReachAutomationsApi - factory interface
16328
+ * @export
16329
+ */
16330
+ export const ReachAutomationsApiFactory = function (configuration, basePath, axios) {
16331
+ const localVarFp = ReachAutomationsApiFp(configuration);
16332
+ return {
16333
+ /**
16334
+ * Get a single automation with the counts of contacts that entered it, are moving through it, finished it or failed on the way. This describes the automation itself. To see the workflow it runs, use the steps endpoint.
16335
+ * @summary Get automation details
16336
+ * @param {string} profileUuid Profile uuid parameter
16337
+ * @param {string} automationUuid Automation uuid parameter
16338
+ * @param {*} [options] Override http request option.
16339
+ * @throws {RequiredError}
16340
+ */
16341
+ getAutomationDetailsV1(profileUuid, automationUuid, options) {
16342
+ return localVarFp.getAutomationDetailsV1(profileUuid, automationUuid, options).then((request) => request(axios, basePath));
16343
+ },
16344
+ /**
16345
+ * Get the workflow of an automation as a flat list of steps. The steps form a tree rather than a straight line: follow `parent_uuid` to reconstruct the branches, and use `step_order` to order the steps that share a parent. An automation with no steps yet returns an empty list.
16346
+ * @summary List automation steps
16347
+ * @param {string} profileUuid Profile uuid parameter
16348
+ * @param {string} automationUuid Automation uuid parameter
16349
+ * @param {*} [options] Override http request option.
16350
+ * @throws {RequiredError}
16351
+ */
16352
+ listAutomationStepsV1(profileUuid, automationUuid, options) {
16353
+ return localVarFp.listAutomationStepsV1(profileUuid, automationUuid, options).then((request) => request(axios, basePath));
16354
+ },
16355
+ /**
16356
+ * Get a paginated list of the automations in a profile. Every automation comes with the counts of contacts that entered it, are moving through it, finished it or failed on the way. Those counts describe the contact journey and are not email engagement metrics - for opens, clicks and unsubscribes use the campaign statistics endpoint instead.
16357
+ * @summary List automations
16358
+ * @param {string} profileUuid Profile uuid parameter
16359
+ * @param {ListAutomationsV1StatusEnum} [status] Filter automations by status. There is no `completed` status. An automation that has finished for every contact still reports `active`.
16360
+ * @param {ListAutomationsV1SortDirectionEnum} [sortDirection] Order automations by creation date. Newest first unless set to `asc`.
16361
+ * @param {number} [page] Page number
16362
+ * @param {number} [perPage] Number of items per page
16363
+ * @param {*} [options] Override http request option.
16364
+ * @throws {RequiredError}
16365
+ */
16366
+ listAutomationsV1(profileUuid, status, sortDirection, page, perPage, options) {
16367
+ return localVarFp.listAutomationsV1(profileUuid, status, sortDirection, page, perPage, options).then((request) => request(axios, basePath));
16368
+ },
16369
+ };
16370
+ };
16371
+ /**
16372
+ * ReachAutomationsApi - object-oriented interface
16373
+ * @export
16374
+ * @class ReachAutomationsApi
16375
+ * @extends {BaseAPI}
16376
+ */
16377
+ export class ReachAutomationsApi extends BaseAPI {
16378
+ /**
16379
+ * Get a single automation with the counts of contacts that entered it, are moving through it, finished it or failed on the way. This describes the automation itself. To see the workflow it runs, use the steps endpoint.
16380
+ * @summary Get automation details
16381
+ * @param {string} profileUuid Profile uuid parameter
16382
+ * @param {string} automationUuid Automation uuid parameter
16383
+ * @param {*} [options] Override http request option.
16384
+ * @throws {RequiredError}
16385
+ * @memberof ReachAutomationsApi
16386
+ */
16387
+ getAutomationDetailsV1(profileUuid, automationUuid, options) {
16388
+ return ReachAutomationsApiFp(this.configuration).getAutomationDetailsV1(profileUuid, automationUuid, options).then((request) => request(this.axios, this.basePath));
16389
+ }
16390
+ /**
16391
+ * Get the workflow of an automation as a flat list of steps. The steps form a tree rather than a straight line: follow `parent_uuid` to reconstruct the branches, and use `step_order` to order the steps that share a parent. An automation with no steps yet returns an empty list.
16392
+ * @summary List automation steps
16393
+ * @param {string} profileUuid Profile uuid parameter
16394
+ * @param {string} automationUuid Automation uuid parameter
16395
+ * @param {*} [options] Override http request option.
16396
+ * @throws {RequiredError}
16397
+ * @memberof ReachAutomationsApi
16398
+ */
16399
+ listAutomationStepsV1(profileUuid, automationUuid, options) {
16400
+ return ReachAutomationsApiFp(this.configuration).listAutomationStepsV1(profileUuid, automationUuid, options).then((request) => request(this.axios, this.basePath));
16401
+ }
16402
+ /**
16403
+ * Get a paginated list of the automations in a profile. Every automation comes with the counts of contacts that entered it, are moving through it, finished it or failed on the way. Those counts describe the contact journey and are not email engagement metrics - for opens, clicks and unsubscribes use the campaign statistics endpoint instead.
16404
+ * @summary List automations
16405
+ * @param {string} profileUuid Profile uuid parameter
16406
+ * @param {ListAutomationsV1StatusEnum} [status] Filter automations by status. There is no `completed` status. An automation that has finished for every contact still reports `active`.
16407
+ * @param {ListAutomationsV1SortDirectionEnum} [sortDirection] Order automations by creation date. Newest first unless set to `asc`.
16408
+ * @param {number} [page] Page number
16409
+ * @param {number} [perPage] Number of items per page
16410
+ * @param {*} [options] Override http request option.
16411
+ * @throws {RequiredError}
16412
+ * @memberof ReachAutomationsApi
16413
+ */
16414
+ listAutomationsV1(profileUuid, status, sortDirection, page, perPage, options) {
16415
+ return ReachAutomationsApiFp(this.configuration).listAutomationsV1(profileUuid, status, sortDirection, page, perPage, options).then((request) => request(this.axios, this.basePath));
16416
+ }
16417
+ }
16418
+ /**
16419
+ * @export
16420
+ */
16421
+ export const ListAutomationsV1StatusEnum = {
16422
+ Active: 'active',
16423
+ Paused: 'paused',
16424
+ Draft: 'draft'
16425
+ };
16426
+ /**
16427
+ * @export
16428
+ */
16429
+ export const ListAutomationsV1SortDirectionEnum = {
16430
+ Asc: 'asc',
16431
+ Desc: 'desc'
16432
+ };
16103
16433
  /**
16104
16434
  * ReachContactFieldsApi - axios parameter creator
16105
16435
  * @export
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Hostinger API
3
3
  *
4
- * API Version: 1.32.6
4
+ * API Version: 1.33.0
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
package/dist/esm/base.js CHANGED
@@ -3,7 +3,7 @@
3
3
  /**
4
4
  * Hostinger API
5
5
  *
6
- * API Version: 1.32.6
6
+ * API Version: 1.33.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
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Hostinger API
3
3
  *
4
- * API Version: 1.32.6
4
+ * API Version: 1.33.0
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
@@ -3,7 +3,7 @@
3
3
  /**
4
4
  * Hostinger API
5
5
  *
6
- * API Version: 1.32.6
6
+ * API Version: 1.33.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
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Hostinger API
3
3
  *
4
- * API Version: 1.32.6
4
+ * API Version: 1.33.0
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
@@ -3,7 +3,7 @@
3
3
  /**
4
4
  * Hostinger API
5
5
  *
6
- * API Version: 1.32.6
6
+ * API Version: 1.33.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
@@ -13,7 +13,7 @@ export class Configuration {
13
13
  var _a;
14
14
  this.accessToken = param.accessToken;
15
15
  this.basePath = param.basePath;
16
- this.baseOptions = Object.assign(Object.assign({}, param.baseOptions), { headers: Object.assign({ 'User-Agent': "hostinger-typescript-sdk/1.30.7" }, (_a = param.baseOptions) === null || _a === void 0 ? void 0 : _a.headers) });
16
+ this.baseOptions = Object.assign(Object.assign({}, param.baseOptions), { headers: Object.assign({ 'User-Agent': "hostinger-typescript-sdk/1.31.0" }, (_a = param.baseOptions) === null || _a === void 0 ? void 0 : _a.headers) });
17
17
  this.formDataCtor = param.formDataCtor;
18
18
  }
19
19
  /**
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Hostinger API
3
3
  *
4
- * API Version: 1.32.6
4
+ * API Version: 1.33.0
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
package/dist/esm/index.js CHANGED
@@ -3,7 +3,7 @@
3
3
  /**
4
4
  * Hostinger API
5
5
  *
6
- * API Version: 1.32.6
6
+ * API Version: 1.33.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/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Hostinger API
3
3
  *
4
- * API Version: 1.32.6
4
+ * API Version: 1.33.0
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
package/dist/index.js CHANGED
@@ -4,7 +4,7 @@
4
4
  /**
5
5
  * Hostinger API
6
6
  *
7
- * API Version: 1.32.6
7
+ * API Version: 1.33.0
8
8
  *
9
9
  * NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
10
10
  * If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
@@ -0,0 +1,187 @@
1
+ # ReachAutomationsApi
2
+
3
+ All URIs are relative to *https://developers.hostinger.com*
4
+
5
+ |Method | HTTP request | Description|
6
+ |------------- | ------------- | -------------|
7
+ |[**getAutomationDetailsV1**](#getautomationdetailsv1) | **GET** /api/reach/v1/profiles/{profileUuid}/automations/{automationUuid} | Get automation details|
8
+ |[**listAutomationStepsV1**](#listautomationstepsv1) | **GET** /api/reach/v1/profiles/{profileUuid}/automations/{automationUuid}/steps | List automation steps|
9
+ |[**listAutomationsV1**](#listautomationsv1) | **GET** /api/reach/v1/profiles/{profileUuid}/automations | List automations|
10
+
11
+ # **getAutomationDetailsV1**
12
+ > ReachV1AutomationsAutomationResource getAutomationDetailsV1()
13
+
14
+ Get a single automation with the counts of contacts that entered it, are moving through it, finished it or failed on the way. This describes the automation itself. To see the workflow it runs, use the steps endpoint.
15
+
16
+ ### Example
17
+
18
+ ```typescript
19
+ import {
20
+ ReachAutomationsApi,
21
+ Configuration
22
+ } from 'hostinger-api-sdk';
23
+
24
+ const configuration = new Configuration();
25
+ const apiInstance = new ReachAutomationsApi(configuration);
26
+
27
+ let profileUuid: string; //Profile uuid parameter (default to undefined)
28
+ let automationUuid: string; //Automation uuid parameter (default to undefined)
29
+
30
+ const { status, data } = await apiInstance.getAutomationDetailsV1(
31
+ profileUuid,
32
+ automationUuid
33
+ );
34
+ ```
35
+
36
+ ### Parameters
37
+
38
+ |Name | Type | Description | Notes|
39
+ |------------- | ------------- | ------------- | -------------|
40
+ | **profileUuid** | [**string**] | Profile uuid parameter | defaults to undefined|
41
+ | **automationUuid** | [**string**] | Automation uuid parameter | defaults to undefined|
42
+
43
+
44
+ ### Return type
45
+
46
+ **ReachV1AutomationsAutomationResource**
47
+
48
+ ### Authorization
49
+
50
+ [apiToken](../README.md#apiToken)
51
+
52
+ ### HTTP request headers
53
+
54
+ - **Content-Type**: Not defined
55
+ - **Accept**: application/json
56
+
57
+
58
+ ### HTTP response details
59
+ | Status code | Description | Response headers |
60
+ |-------------|-------------|------------------|
61
+ |**200** | Success response | - |
62
+ |**401** | Unauthenticated response | - |
63
+ |**500** | Error response | - |
64
+
65
+ [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
66
+
67
+ # **listAutomationStepsV1**
68
+ > Array<ReachV1AutomationsStepsAutomationStepResource> listAutomationStepsV1()
69
+
70
+ Get the workflow of an automation as a flat list of steps. The steps form a tree rather than a straight line: follow `parent_uuid` to reconstruct the branches, and use `step_order` to order the steps that share a parent. An automation with no steps yet returns an empty list.
71
+
72
+ ### Example
73
+
74
+ ```typescript
75
+ import {
76
+ ReachAutomationsApi,
77
+ Configuration
78
+ } from 'hostinger-api-sdk';
79
+
80
+ const configuration = new Configuration();
81
+ const apiInstance = new ReachAutomationsApi(configuration);
82
+
83
+ let profileUuid: string; //Profile uuid parameter (default to undefined)
84
+ let automationUuid: string; //Automation uuid parameter (default to undefined)
85
+
86
+ const { status, data } = await apiInstance.listAutomationStepsV1(
87
+ profileUuid,
88
+ automationUuid
89
+ );
90
+ ```
91
+
92
+ ### Parameters
93
+
94
+ |Name | Type | Description | Notes|
95
+ |------------- | ------------- | ------------- | -------------|
96
+ | **profileUuid** | [**string**] | Profile uuid parameter | defaults to undefined|
97
+ | **automationUuid** | [**string**] | Automation uuid parameter | defaults to undefined|
98
+
99
+
100
+ ### Return type
101
+
102
+ **Array<ReachV1AutomationsStepsAutomationStepResource>**
103
+
104
+ ### Authorization
105
+
106
+ [apiToken](../README.md#apiToken)
107
+
108
+ ### HTTP request headers
109
+
110
+ - **Content-Type**: Not defined
111
+ - **Accept**: application/json
112
+
113
+
114
+ ### HTTP response details
115
+ | Status code | Description | Response headers |
116
+ |-------------|-------------|------------------|
117
+ |**200** | Success response | - |
118
+ |**401** | Unauthenticated response | - |
119
+ |**500** | Error response | - |
120
+
121
+ [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
122
+
123
+ # **listAutomationsV1**
124
+ > ReachListAutomationsV1200Response listAutomationsV1()
125
+
126
+ Get a paginated list of the automations in a profile. Every automation comes with the counts of contacts that entered it, are moving through it, finished it or failed on the way. Those counts describe the contact journey and are not email engagement metrics - for opens, clicks and unsubscribes use the campaign statistics endpoint instead.
127
+
128
+ ### Example
129
+
130
+ ```typescript
131
+ import {
132
+ ReachAutomationsApi,
133
+ Configuration
134
+ } from 'hostinger-api-sdk';
135
+
136
+ const configuration = new Configuration();
137
+ const apiInstance = new ReachAutomationsApi(configuration);
138
+
139
+ let profileUuid: string; //Profile uuid parameter (default to undefined)
140
+ let status: 'active' | 'paused' | 'draft'; //Filter automations by status. There is no `completed` status. An automation that has finished for every contact still reports `active`. (optional) (default to undefined)
141
+ let sortDirection: 'asc' | 'desc'; //Order automations by creation date. Newest first unless set to `asc`. (optional) (default to undefined)
142
+ let page: number; //Page number (optional) (default to undefined)
143
+ let perPage: number; //Number of items per page (optional) (default to 25)
144
+
145
+ const { status, data } = await apiInstance.listAutomationsV1(
146
+ profileUuid,
147
+ status,
148
+ sortDirection,
149
+ page,
150
+ perPage
151
+ );
152
+ ```
153
+
154
+ ### Parameters
155
+
156
+ |Name | Type | Description | Notes|
157
+ |------------- | ------------- | ------------- | -------------|
158
+ | **profileUuid** | [**string**] | Profile uuid parameter | defaults to undefined|
159
+ | **status** | [**&#39;active&#39; | &#39;paused&#39; | &#39;draft&#39;**]**Array<&#39;active&#39; &#124; &#39;paused&#39; &#124; &#39;draft&#39;>** | Filter automations by status. There is no &#x60;completed&#x60; status. An automation that has finished for every contact still reports &#x60;active&#x60;. | (optional) defaults to undefined|
160
+ | **sortDirection** | [**&#39;asc&#39; | &#39;desc&#39;**]**Array<&#39;asc&#39; &#124; &#39;desc&#39;>** | Order automations by creation date. Newest first unless set to &#x60;asc&#x60;. | (optional) defaults to undefined|
161
+ | **page** | [**number**] | Page number | (optional) defaults to undefined|
162
+ | **perPage** | [**number**] | Number of items per page | (optional) defaults to 25|
163
+
164
+
165
+ ### Return type
166
+
167
+ **ReachListAutomationsV1200Response**
168
+
169
+ ### Authorization
170
+
171
+ [apiToken](../README.md#apiToken)
172
+
173
+ ### HTTP request headers
174
+
175
+ - **Content-Type**: Not defined
176
+ - **Accept**: application/json
177
+
178
+
179
+ ### HTTP response details
180
+ | Status code | Description | Response headers |
181
+ |-------------|-------------|------------------|
182
+ |**200** | Success response | - |
183
+ |**401** | Unauthenticated response | - |
184
+ |**500** | Error response | - |
185
+
186
+ [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
187
+