@extrahorizon/javascript-sdk 8.9.0-feat-134-c0f5b9d → 8.9.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/CHANGELOG.md +14 -1
- package/build/index.cjs.js +75 -119
- package/build/index.mjs +74 -120
- package/build/types/errors.d.ts +6 -0
- package/build/types/http/oAuth1Signature.d.ts +4 -0
- package/build/types/mockType.d.ts +30 -24
- package/build/types/services/auth/oidc/providers/types.d.ts +4 -0
- package/build/types/services/events/index.d.ts +1 -2
- package/build/types/services/events/types.d.ts +5 -0
- package/build/types/services/localizations/index.d.ts +1 -2
- package/build/types/services/localizations/types.d.ts +5 -0
- package/build/types/services/notifications/index.d.ts +1 -2
- package/build/types/services/notifications/types.d.ts +5 -0
- package/build/types/services/notificationsV2/index.d.ts +1 -2
- package/build/types/services/notificationsV2/types.d.ts +5 -0
- package/build/types/services/profiles/index.d.ts +1 -2
- package/build/types/services/profiles/types.d.ts +5 -0
- package/build/types/services/tasks/functions/types.d.ts +1 -1
- package/build/types/services/tasks/schedules/types.d.ts +4 -0
- package/build/types/services/tasks/types.d.ts +11 -0
- package/build/types/services/templates/types.d.ts +70 -32
- package/build/types/services/templatesV2/index.d.ts +1 -2
- package/build/types/services/templatesV2/types.d.ts +16 -5
- package/build/types/services/users/index.d.ts +2 -4
- package/build/types/services/users/types.d.ts +5 -0
- package/build/types/types.d.ts +1 -0
- package/build/types/version.d.ts +1 -1
- package/package.json +3 -3
- package/build/types/services/events/health.d.ts +0 -9
- package/build/types/services/localizations/health.d.ts +0 -9
- package/build/types/services/notifications/health.d.ts +0 -9
- package/build/types/services/notificationsV2/health.d.ts +0 -9
- package/build/types/services/profiles/health.d.ts +0 -9
- package/build/types/services/templatesV2/health.d.ts +0 -9
- package/build/types/services/users/health.d.ts +0 -9
package/CHANGELOG.md
CHANGED
|
@@ -8,11 +8,24 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
8
8
|
## [8.9.0]
|
|
9
9
|
|
|
10
10
|
### Added
|
|
11
|
-
- Added the `exh.tasks.functions` methods `find`, `getByName`, `update`, `enable`, `disable` and `
|
|
11
|
+
- Added the `exh.tasks.functions` methods `find`, `getByName`, `update`, `enable`, `disable` and `remove`
|
|
12
12
|
- Added a `exh.users.findByEmail` method to find a user by their email address.
|
|
13
|
+
- Completed the `Task` type for changes made in TaskService 1.3.0 a while ago:
|
|
14
|
+
- Added the `retriedByTaskId`, `retryForTaskIds`, and `error` properties.
|
|
15
|
+
- Added the `retried` status.
|
|
16
|
+
- Introduced `exh.templatesV2` with methods to manage and resolve V2 templates
|
|
17
|
+
- Added `template_name` to `exh.mails.*` to allow sending mails with a V2 template by name
|
|
18
|
+
|
|
19
|
+
### Deprecated
|
|
20
|
+
- `exh.tasks.schedules.delete` is deprecated in favor of `exh.tasks.schedules.remove`
|
|
21
|
+
- `exh.auth.oidc.providers.delete` is deprecated in favor of `exh.auth.oidc.providers.remove`
|
|
13
22
|
|
|
14
23
|
### Fixed
|
|
15
24
|
- Corrected the types for the `findFirst` (based) methods to indicate they may return `undefined` when no results are found.
|
|
25
|
+
- Corrected the types of the `schema` property in the `exh.templates.*`
|
|
26
|
+
- Corrected the types of `exh.mails.*`
|
|
27
|
+
- Bumped axios version to `0.30.3` to resolve warning about `CVE-2026-25639`
|
|
28
|
+
- Bumped qs version to `6.14.2` to resolve warning about `CVE-2026-2391`
|
|
16
29
|
|
|
17
30
|
|
|
18
31
|
## [8.8.2]
|
package/build/index.cjs.js
CHANGED
|
@@ -673,6 +673,8 @@ class RefreshTokenUnknownError extends BadRequestError {
|
|
|
673
673
|
}
|
|
674
674
|
class RefreshTokenExpiredError extends BadRequestError {
|
|
675
675
|
}
|
|
676
|
+
class LambdaInvocationError extends BadRequestError {
|
|
677
|
+
}
|
|
676
678
|
class FirebaseInvalidPlatformDataError extends BadRequestError {
|
|
677
679
|
constructor(apiError) {
|
|
678
680
|
super(apiError);
|
|
@@ -753,6 +755,8 @@ class NotFoundError extends ApiError {
|
|
|
753
755
|
}
|
|
754
756
|
class ResourceUnknownError extends NotFoundError {
|
|
755
757
|
}
|
|
758
|
+
class ServiceNotFoundError extends NotFoundError {
|
|
759
|
+
}
|
|
756
760
|
class NoConfiguredAppStoreProduct extends NotFoundError {
|
|
757
761
|
}
|
|
758
762
|
// 500 Server Error
|
|
@@ -927,10 +931,12 @@ const ErrorClassMap = {
|
|
|
927
931
|
414: StatusInUseError,
|
|
928
932
|
415: LockedDocumentError,
|
|
929
933
|
801: DefaultLocalizationMissingError,
|
|
934
|
+
903: ServiceNotFoundError,
|
|
930
935
|
1002: LocalizationKeyMissingError,
|
|
931
936
|
1003: TemplateFillingError,
|
|
932
937
|
1004: TemplateSyntaxError,
|
|
933
938
|
1005: TemplateResolvingError,
|
|
939
|
+
1405: LambdaInvocationError,
|
|
934
940
|
2605: InvalidTokenError,
|
|
935
941
|
2606: UnauthorizedTokenError,
|
|
936
942
|
2607: TokenNotDeleteableError,
|
|
@@ -1015,6 +1021,7 @@ exports.TaskStatus = void 0;
|
|
|
1015
1021
|
TaskStatus["IN_PROGRESS"] = "inProgress";
|
|
1016
1022
|
TaskStatus["COMPLETE"] = "complete";
|
|
1017
1023
|
TaskStatus["FAILED"] = "failed";
|
|
1024
|
+
TaskStatus["RETRIED"] = "retried";
|
|
1018
1025
|
TaskStatus["CANCELED"] = "canceled";
|
|
1019
1026
|
})(exports.TaskStatus || (exports.TaskStatus = {}));
|
|
1020
1027
|
|
|
@@ -1263,15 +1270,6 @@ exports.QueuedMailStatus = void 0;
|
|
|
1263
1270
|
QueuedMailStatus["FAILED"] = "failed";
|
|
1264
1271
|
})(exports.QueuedMailStatus || (exports.QueuedMailStatus = {}));
|
|
1265
1272
|
|
|
1266
|
-
exports.ObjectMinBytesOptionType = void 0;
|
|
1267
|
-
(function (ObjectMinBytesOptionType) {
|
|
1268
|
-
ObjectMinBytesOptionType["MIN_BYTES"] = "min_bytes";
|
|
1269
|
-
})(exports.ObjectMinBytesOptionType || (exports.ObjectMinBytesOptionType = {}));
|
|
1270
|
-
exports.ObjectMaxBytesOptionType = void 0;
|
|
1271
|
-
(function (ObjectMaxBytesOptionType) {
|
|
1272
|
-
ObjectMaxBytesOptionType["MAX_BYTES"] = "max_bytes";
|
|
1273
|
-
})(exports.ObjectMaxBytesOptionType || (exports.ObjectMaxBytesOptionType = {}));
|
|
1274
|
-
|
|
1275
1273
|
exports.ActionType = void 0;
|
|
1276
1274
|
(function (ActionType) {
|
|
1277
1275
|
ActionType["MAIL"] = "mail";
|
|
@@ -2060,8 +2058,7 @@ function getUrlInfoFromRequest(url) {
|
|
|
2060
2058
|
const { protocol, host, pathname, search } = new URL(url);
|
|
2061
2059
|
return {
|
|
2062
2060
|
baseUrl: `${protocol}//${host}${pathname}`,
|
|
2063
|
-
searchParameters: qs__namespace.parse(search.startsWith('?') ? search.slice(1) : search,
|
|
2064
|
-
),
|
|
2061
|
+
searchParameters: qs__namespace.parse(search.startsWith('?') ? search.slice(1) : search),
|
|
2065
2062
|
};
|
|
2066
2063
|
}
|
|
2067
2064
|
// Util functions
|
|
@@ -3483,10 +3480,13 @@ var providers = (oidcClient, httpWithAuth) => {
|
|
|
3483
3480
|
const { data } = await oidcClient.post(httpWithAuth, `/oidc/providers/${providerId}/disable`, {});
|
|
3484
3481
|
return data;
|
|
3485
3482
|
},
|
|
3486
|
-
async
|
|
3483
|
+
async remove(providerId) {
|
|
3487
3484
|
const { data } = await oidcClient.delete(httpWithAuth, `/oidc/providers/${providerId}`);
|
|
3488
3485
|
return data;
|
|
3489
3486
|
},
|
|
3487
|
+
delete(providerId) {
|
|
3488
|
+
return this.remove(providerId);
|
|
3489
|
+
},
|
|
3490
3490
|
};
|
|
3491
3491
|
};
|
|
3492
3492
|
|
|
@@ -4055,7 +4055,7 @@ var functions = (client, httpAuth) => ({
|
|
|
4055
4055
|
});
|
|
4056
4056
|
return response.data;
|
|
4057
4057
|
},
|
|
4058
|
-
async
|
|
4058
|
+
async remove(name, options) {
|
|
4059
4059
|
const response = await client.delete(httpAuth, `/functions/${name}`, options);
|
|
4060
4060
|
return response.data;
|
|
4061
4061
|
},
|
|
@@ -4106,10 +4106,13 @@ var schedules = (client, httpAuth) => {
|
|
|
4106
4106
|
});
|
|
4107
4107
|
return data;
|
|
4108
4108
|
},
|
|
4109
|
-
async
|
|
4109
|
+
async remove(scheduleId, options) {
|
|
4110
4110
|
const { data } = await client.delete(httpAuth, `/schedules/${scheduleId}`, options);
|
|
4111
4111
|
return data;
|
|
4112
4112
|
},
|
|
4113
|
+
delete(scheduleId, options) {
|
|
4114
|
+
return this.remove(scheduleId, options);
|
|
4115
|
+
},
|
|
4113
4116
|
async find(options) {
|
|
4114
4117
|
const result = await query(options);
|
|
4115
4118
|
return addPagersFn(query, options, result);
|
|
@@ -4317,17 +4320,6 @@ var groupRoles = (client, httpWithAuth) => ({
|
|
|
4317
4320
|
},
|
|
4318
4321
|
});
|
|
4319
4322
|
|
|
4320
|
-
var health$7 = (userClient, http) => ({
|
|
4321
|
-
/**
|
|
4322
|
-
* Perform a health check
|
|
4323
|
-
* @returns {boolean} success
|
|
4324
|
-
*/
|
|
4325
|
-
async health() {
|
|
4326
|
-
const result = await userClient.get(http, '/health');
|
|
4327
|
-
return result.status === exports.Results.Success;
|
|
4328
|
-
},
|
|
4329
|
-
});
|
|
4330
|
-
|
|
4331
4323
|
const settingsService = (client, httpWithAuth) => ({
|
|
4332
4324
|
async getVerificationSettings(options) {
|
|
4333
4325
|
const response = await client.get(httpWithAuth, '/settings/verification', options);
|
|
@@ -4510,6 +4502,10 @@ var users$1 = (userClient, httpWithAuth, http) => {
|
|
|
4510
4502
|
const { data } = await userClient.put(httpWithAuth, '/email_templates', templates);
|
|
4511
4503
|
return data;
|
|
4512
4504
|
},
|
|
4505
|
+
async health() {
|
|
4506
|
+
const result = await userClient.get(http, '/health');
|
|
4507
|
+
return result.status === 200;
|
|
4508
|
+
},
|
|
4513
4509
|
};
|
|
4514
4510
|
};
|
|
4515
4511
|
|
|
@@ -4518,7 +4514,6 @@ const usersService = (httpWithAuth, http) => {
|
|
|
4518
4514
|
basePath: USER_BASE,
|
|
4519
4515
|
transformRequestData: decamelizeRequestData,
|
|
4520
4516
|
});
|
|
4521
|
-
const healthMethods = health$7(userClient, httpWithAuth);
|
|
4522
4517
|
const usersMethods = users$1(userClient, httpWithAuth, http);
|
|
4523
4518
|
const groupRolesMethods = groupRoles(userClient, httpWithAuth);
|
|
4524
4519
|
const globalRolesMethods = globalRoles(userClient, httpWithAuth);
|
|
@@ -4526,7 +4521,6 @@ const usersService = (httpWithAuth, http) => {
|
|
|
4526
4521
|
const forgotPasswordRequestsMethods = forgotPasswordRequestsService(userClient, httpWithAuth);
|
|
4527
4522
|
const settingsMethods = settingsService(userClient, httpWithAuth);
|
|
4528
4523
|
return {
|
|
4529
|
-
...healthMethods,
|
|
4530
4524
|
...usersMethods,
|
|
4531
4525
|
groupRoles: groupRolesMethods,
|
|
4532
4526
|
globalRoles: globalRolesMethods,
|
|
@@ -4635,10 +4629,11 @@ var templates = (client, httpAuth) => ({
|
|
|
4635
4629
|
return result.status === exports.Results.Success;
|
|
4636
4630
|
},
|
|
4637
4631
|
async find(options) {
|
|
4638
|
-
|
|
4632
|
+
const result = await client.get(httpAuth, `/${(options === null || options === void 0 ? void 0 : options.rql) || ''}`, {
|
|
4639
4633
|
...options,
|
|
4640
4634
|
customResponseKeys: ['data.schema.fields', 'data.fields'],
|
|
4641
|
-
})
|
|
4635
|
+
});
|
|
4636
|
+
return result.data;
|
|
4642
4637
|
},
|
|
4643
4638
|
async findAll(options) {
|
|
4644
4639
|
return findAllGeneric(this.find, options);
|
|
@@ -4659,47 +4654,54 @@ var templates = (client, httpAuth) => ({
|
|
|
4659
4654
|
return res.data[0];
|
|
4660
4655
|
},
|
|
4661
4656
|
async create(requestBody, options) {
|
|
4662
|
-
|
|
4657
|
+
const result = await client.post(httpAuth, '/', requestBody, {
|
|
4663
4658
|
...options,
|
|
4664
4659
|
customKeys: ['schema.fields', 'fields'],
|
|
4665
|
-
})
|
|
4660
|
+
});
|
|
4661
|
+
return result.data;
|
|
4666
4662
|
},
|
|
4667
4663
|
async update(templateId, requestBody, options) {
|
|
4668
|
-
|
|
4664
|
+
const result = await client.put(httpAuth, `/${templateId}`, requestBody, {
|
|
4669
4665
|
...options,
|
|
4670
4666
|
customKeys: ['schema.fields', 'fields'],
|
|
4671
|
-
})
|
|
4667
|
+
});
|
|
4668
|
+
return result.data;
|
|
4672
4669
|
},
|
|
4673
4670
|
async remove(templateId, options) {
|
|
4674
|
-
|
|
4671
|
+
const result = await client.delete(httpAuth, `/${templateId}`, options);
|
|
4672
|
+
return result.data;
|
|
4675
4673
|
},
|
|
4676
4674
|
async resolveAsPdf(templateId, requestBody, options) {
|
|
4677
|
-
|
|
4675
|
+
const result = await client.post(httpAuth, `/${templateId}/pdf`, requestBody, {
|
|
4678
4676
|
...options,
|
|
4679
4677
|
customRequestKeys: ['content'],
|
|
4680
4678
|
responseType: 'arraybuffer',
|
|
4681
|
-
})
|
|
4679
|
+
});
|
|
4680
|
+
return result.data;
|
|
4682
4681
|
},
|
|
4683
4682
|
async resolveAsPdfUsingCode(templateId, localizationCode, requestBody, options) {
|
|
4684
|
-
|
|
4683
|
+
const result = await client.post(httpAuth, `/${templateId}/pdf/${localizationCode}`, requestBody, {
|
|
4685
4684
|
...options,
|
|
4686
4685
|
customRequestKeys: ['content'],
|
|
4687
4686
|
responseType: 'arraybuffer',
|
|
4688
|
-
})
|
|
4687
|
+
});
|
|
4688
|
+
return result.data;
|
|
4689
4689
|
},
|
|
4690
4690
|
async resolveAsJson(templateId, requestBody, options) {
|
|
4691
|
-
|
|
4691
|
+
const result = await client.post(httpAuth, `/${templateId}/resolve`, requestBody, {
|
|
4692
4692
|
...options,
|
|
4693
4693
|
customRequestKeys: ['content'],
|
|
4694
4694
|
customResponseKeys: ['*'],
|
|
4695
|
-
})
|
|
4695
|
+
});
|
|
4696
|
+
return result.data;
|
|
4696
4697
|
},
|
|
4697
4698
|
async resolveAsJsonUsingCode(templateId, localizationCode, requestBody, options) {
|
|
4698
|
-
|
|
4699
|
+
const result = await client.post(httpAuth, `/${templateId}/resolve/${localizationCode}`, requestBody, {
|
|
4699
4700
|
...options,
|
|
4700
4701
|
customRequestKeys: ['content'],
|
|
4701
4702
|
customResponseKeys: ['*'],
|
|
4702
|
-
})
|
|
4703
|
+
});
|
|
4704
|
+
return result.data;
|
|
4703
4705
|
},
|
|
4704
4706
|
});
|
|
4705
4707
|
|
|
@@ -4900,7 +4902,7 @@ var appStoreSubscriptions = (client, httpAuth) => ({
|
|
|
4900
4902
|
},
|
|
4901
4903
|
});
|
|
4902
4904
|
|
|
4903
|
-
var health
|
|
4905
|
+
var health = (client, httpAuth) => ({
|
|
4904
4906
|
/**
|
|
4905
4907
|
* Check if the service is available
|
|
4906
4908
|
* @returns true if service is up and running
|
|
@@ -5104,7 +5106,7 @@ const paymentsService = (httpWithAuth) => {
|
|
|
5104
5106
|
basePath: PAYMENTS_BASE,
|
|
5105
5107
|
});
|
|
5106
5108
|
return {
|
|
5107
|
-
...health
|
|
5109
|
+
...health(client, httpWithAuth),
|
|
5108
5110
|
products: products(client, httpWithAuth),
|
|
5109
5111
|
orders: orders(client, httpWithAuth),
|
|
5110
5112
|
subscriptions: subscriptions$1(client, httpWithAuth),
|
|
@@ -5126,17 +5128,6 @@ var countries = (client, httpAuth) => ({
|
|
|
5126
5128
|
},
|
|
5127
5129
|
});
|
|
5128
5130
|
|
|
5129
|
-
var health$5 = (client, http) => ({
|
|
5130
|
-
/**
|
|
5131
|
-
* Perform a health check
|
|
5132
|
-
* @returns {boolean} success
|
|
5133
|
-
*/
|
|
5134
|
-
async health() {
|
|
5135
|
-
const result = await client.get(http, '/health');
|
|
5136
|
-
return result.status === exports.Results.Success;
|
|
5137
|
-
},
|
|
5138
|
-
});
|
|
5139
|
-
|
|
5140
5131
|
var languages = (client, httpAuth) => ({
|
|
5141
5132
|
async getLanguages(options) {
|
|
5142
5133
|
return (await client.get(httpAuth, '/languages', options)).data.data;
|
|
@@ -5170,6 +5161,10 @@ var localizations = (client, httpAuth) => ({
|
|
|
5170
5161
|
customResponseKeys: ['*'],
|
|
5171
5162
|
})).data;
|
|
5172
5163
|
},
|
|
5164
|
+
async health() {
|
|
5165
|
+
const result = await client.get(httpAuth, '/health');
|
|
5166
|
+
return result.status === 200;
|
|
5167
|
+
},
|
|
5173
5168
|
});
|
|
5174
5169
|
|
|
5175
5170
|
const localizationsService = (httpWithAuth) => {
|
|
@@ -5178,7 +5173,6 @@ const localizationsService = (httpWithAuth) => {
|
|
|
5178
5173
|
basePath: LOCALIZATIONS_BASE,
|
|
5179
5174
|
});
|
|
5180
5175
|
return {
|
|
5181
|
-
...health$5(client, httpWithAuth),
|
|
5182
5176
|
...localizations(client, httpWithAuth),
|
|
5183
5177
|
...countries(client, httpWithAuth),
|
|
5184
5178
|
...languages(client, httpWithAuth),
|
|
@@ -5203,17 +5197,6 @@ var groups = (client, httpAuth) => ({
|
|
|
5203
5197
|
},
|
|
5204
5198
|
});
|
|
5205
5199
|
|
|
5206
|
-
var health$4 = (client, httpAuth) => ({
|
|
5207
|
-
/**
|
|
5208
|
-
* Perform a health check for profiles service
|
|
5209
|
-
* @returns {boolean} success
|
|
5210
|
-
*/
|
|
5211
|
-
async health() {
|
|
5212
|
-
const result = await client.get(httpAuth, '/health');
|
|
5213
|
-
return result.status === exports.Results.Success;
|
|
5214
|
-
},
|
|
5215
|
-
});
|
|
5216
|
-
|
|
5217
5200
|
var logs = (client, httpAuth) => {
|
|
5218
5201
|
function partialApplyFind(profileId, groupId) {
|
|
5219
5202
|
return async (options) => (await client.get(httpAuth, `/${profileId}/groups/${groupId}/logs/${(options === null || options === void 0 ? void 0 : options.rql) || ''}`, options)).data;
|
|
@@ -5284,6 +5267,10 @@ var profiles = (client, httpAuth) => ({
|
|
|
5284
5267
|
async getImpediments(options) {
|
|
5285
5268
|
return (await client.get(httpAuth, '/impediments', options)).data;
|
|
5286
5269
|
},
|
|
5270
|
+
async health() {
|
|
5271
|
+
const result = await client.get(httpAuth, '/health');
|
|
5272
|
+
return result.status === 200;
|
|
5273
|
+
},
|
|
5287
5274
|
});
|
|
5288
5275
|
|
|
5289
5276
|
const profilesService = (httpWithAuth) => {
|
|
@@ -5292,24 +5279,12 @@ const profilesService = (httpWithAuth) => {
|
|
|
5292
5279
|
basePath: PROFILES_BASE,
|
|
5293
5280
|
});
|
|
5294
5281
|
return {
|
|
5295
|
-
...health$4(client, httpWithAuth),
|
|
5296
5282
|
...profiles(client, httpWithAuth),
|
|
5297
5283
|
groups: groups(client, httpWithAuth),
|
|
5298
5284
|
logs: logs(client, httpWithAuth),
|
|
5299
5285
|
};
|
|
5300
5286
|
};
|
|
5301
5287
|
|
|
5302
|
-
var health$3 = (client, http) => ({
|
|
5303
|
-
/**
|
|
5304
|
-
* Perform a health check
|
|
5305
|
-
* @returns {boolean} success
|
|
5306
|
-
*/
|
|
5307
|
-
async health() {
|
|
5308
|
-
const result = await client.get(http, '/health');
|
|
5309
|
-
return result.status === exports.Results.Success;
|
|
5310
|
-
},
|
|
5311
|
-
});
|
|
5312
|
-
|
|
5313
5288
|
var notifications = (client, httpAuth) => {
|
|
5314
5289
|
async function find(options) {
|
|
5315
5290
|
return (await client.get(httpAuth, `/notifications${(options === null || options === void 0 ? void 0 : options.rql) || ''}`, options)).data;
|
|
@@ -5355,6 +5330,10 @@ var notifications = (client, httpAuth) => {
|
|
|
5355
5330
|
async getTypes(options) {
|
|
5356
5331
|
return (await client.get(httpAuth, '/types', options)).data;
|
|
5357
5332
|
},
|
|
5333
|
+
async health() {
|
|
5334
|
+
const result = await client.get(httpAuth, '/health');
|
|
5335
|
+
return result.status === 200;
|
|
5336
|
+
},
|
|
5358
5337
|
};
|
|
5359
5338
|
};
|
|
5360
5339
|
|
|
@@ -5384,23 +5363,11 @@ const notificationsService = (httpWithAuth) => {
|
|
|
5384
5363
|
transformRequestData: decamelizeRequestData,
|
|
5385
5364
|
});
|
|
5386
5365
|
return {
|
|
5387
|
-
...health$3(client, httpWithAuth),
|
|
5388
5366
|
...notifications(client, httpWithAuth),
|
|
5389
5367
|
settings: settings(client, httpWithAuth),
|
|
5390
5368
|
};
|
|
5391
5369
|
};
|
|
5392
5370
|
|
|
5393
|
-
var health$2 = (client, http) => ({
|
|
5394
|
-
/**
|
|
5395
|
-
* Perform a health check
|
|
5396
|
-
* @returns {boolean} success
|
|
5397
|
-
*/
|
|
5398
|
-
async health() {
|
|
5399
|
-
const result = await client.get(http, '/health');
|
|
5400
|
-
return result.status === exports.Results.Success;
|
|
5401
|
-
},
|
|
5402
|
-
});
|
|
5403
|
-
|
|
5404
5371
|
var notificationsV2 = (client, httpWithAuth) => {
|
|
5405
5372
|
async function find(options) {
|
|
5406
5373
|
const result = await client.get(httpWithAuth, `/${(options === null || options === void 0 ? void 0 : options.rql) || ''}`, {
|
|
@@ -5437,6 +5404,10 @@ var notificationsV2 = (client, httpWithAuth) => {
|
|
|
5437
5404
|
const rqlWithNotificationId = rqlBuilder().eq('id', notificationId).build();
|
|
5438
5405
|
return await this.findFirst({ ...options, rql: rqlWithNotificationId });
|
|
5439
5406
|
},
|
|
5407
|
+
async health() {
|
|
5408
|
+
const result = await client.get(httpWithAuth, '/health');
|
|
5409
|
+
return result.status === 200;
|
|
5410
|
+
},
|
|
5440
5411
|
};
|
|
5441
5412
|
};
|
|
5442
5413
|
|
|
@@ -5485,7 +5456,6 @@ const notificationsV2Service = (httpWithAuth) => {
|
|
|
5485
5456
|
basePath: NOTIFICATIONS_V2_BASE,
|
|
5486
5457
|
});
|
|
5487
5458
|
return {
|
|
5488
|
-
...health$2(client, httpWithAuth),
|
|
5489
5459
|
...notificationsV2(client, httpWithAuth),
|
|
5490
5460
|
userSettings: notificationV2UserSettings(client, httpWithAuth),
|
|
5491
5461
|
};
|
|
@@ -5511,16 +5481,9 @@ var events = (client, httpAuth) => ({
|
|
|
5511
5481
|
}
|
|
5512
5482
|
return (await client.post(httpAuth, '/', requestBody, requestOptions)).data;
|
|
5513
5483
|
},
|
|
5514
|
-
});
|
|
5515
|
-
|
|
5516
|
-
var health$1 = (client, http) => ({
|
|
5517
|
-
/**
|
|
5518
|
-
* Perform a health check
|
|
5519
|
-
* @returns {boolean} success
|
|
5520
|
-
*/
|
|
5521
5484
|
async health() {
|
|
5522
|
-
const result = await client.get(
|
|
5523
|
-
return result.status ===
|
|
5485
|
+
const result = await client.get(httpAuth, '/health');
|
|
5486
|
+
return result.status === 200;
|
|
5524
5487
|
},
|
|
5525
5488
|
});
|
|
5526
5489
|
|
|
@@ -5549,7 +5512,6 @@ const eventsService = (httpWithAuth) => {
|
|
|
5549
5512
|
transformRequestData: decamelizeRequestData,
|
|
5550
5513
|
});
|
|
5551
5514
|
return {
|
|
5552
|
-
...health$1(client, httpWithAuth),
|
|
5553
5515
|
...events(client, httpWithAuth),
|
|
5554
5516
|
subscriptions: subscriptions(client, httpWithAuth),
|
|
5555
5517
|
};
|
|
@@ -5581,22 +5543,11 @@ const logsService = (httpWithAuth) => {
|
|
|
5581
5543
|
};
|
|
5582
5544
|
};
|
|
5583
5545
|
|
|
5584
|
-
var health = (client, http) => ({
|
|
5585
|
-
/**
|
|
5586
|
-
* Perform a health check
|
|
5587
|
-
* @returns {boolean} success
|
|
5588
|
-
*/
|
|
5589
|
-
async health() {
|
|
5590
|
-
const result = await client.get(http, '/health');
|
|
5591
|
-
return result.status === exports.Results.Success;
|
|
5592
|
-
},
|
|
5593
|
-
});
|
|
5594
|
-
|
|
5595
5546
|
var templatesV2 = (client, httpWithAuth) => {
|
|
5596
5547
|
async function find(options) {
|
|
5597
5548
|
const result = await client.get(httpWithAuth, `/${(options === null || options === void 0 ? void 0 : options.rql) || ''}`, {
|
|
5598
5549
|
...options,
|
|
5599
|
-
customResponseKeys: ['data.
|
|
5550
|
+
customResponseKeys: ['data.inputs', 'data.outputs'],
|
|
5600
5551
|
});
|
|
5601
5552
|
return result.data;
|
|
5602
5553
|
}
|
|
@@ -5604,14 +5555,14 @@ var templatesV2 = (client, httpWithAuth) => {
|
|
|
5604
5555
|
async create(requestBody, options) {
|
|
5605
5556
|
const result = (await client.post(httpWithAuth, '/', requestBody, {
|
|
5606
5557
|
...options,
|
|
5607
|
-
customKeys: ['
|
|
5558
|
+
customKeys: ['inputs', 'outputs'],
|
|
5608
5559
|
}));
|
|
5609
5560
|
return result.data;
|
|
5610
5561
|
},
|
|
5611
5562
|
async update(templateId, requestBody, options) {
|
|
5612
5563
|
const result = (await client.put(httpWithAuth, `/${templateId}`, requestBody, {
|
|
5613
5564
|
...options,
|
|
5614
|
-
customKeys: ['
|
|
5565
|
+
customKeys: ['inputs', 'outputs'],
|
|
5615
5566
|
}));
|
|
5616
5567
|
return result.data;
|
|
5617
5568
|
},
|
|
@@ -5622,7 +5573,7 @@ var templatesV2 = (client, httpWithAuth) => {
|
|
|
5622
5573
|
async resolve(templateId, requestBody, options) {
|
|
5623
5574
|
const result = (await client.post(httpWithAuth, `/${templateId}/resolve`, requestBody, {
|
|
5624
5575
|
...options,
|
|
5625
|
-
customRequestKeys: ['
|
|
5576
|
+
customRequestKeys: ['inputs'],
|
|
5626
5577
|
customResponseKeys: ['*'],
|
|
5627
5578
|
}));
|
|
5628
5579
|
return result.data;
|
|
@@ -5648,6 +5599,10 @@ var templatesV2 = (client, httpWithAuth) => {
|
|
|
5648
5599
|
const result = await find(options);
|
|
5649
5600
|
return result.data[0];
|
|
5650
5601
|
},
|
|
5602
|
+
async health() {
|
|
5603
|
+
const result = await client.get(httpWithAuth, '/health');
|
|
5604
|
+
return result.status === 200;
|
|
5605
|
+
},
|
|
5651
5606
|
};
|
|
5652
5607
|
};
|
|
5653
5608
|
|
|
@@ -5656,12 +5611,11 @@ const templatesV2Service = (httpWithAuth) => {
|
|
|
5656
5611
|
basePath: TEMPLATES_V2_BASE,
|
|
5657
5612
|
});
|
|
5658
5613
|
return {
|
|
5659
|
-
...health(client, httpWithAuth),
|
|
5660
5614
|
...templatesV2(client, httpWithAuth),
|
|
5661
5615
|
};
|
|
5662
5616
|
};
|
|
5663
5617
|
|
|
5664
|
-
const version = '8.9.0
|
|
5618
|
+
const version = '8.9.0';
|
|
5665
5619
|
|
|
5666
5620
|
/**
|
|
5667
5621
|
* Create ExtraHorizon client.
|
|
@@ -5887,6 +5841,7 @@ exports.InvalidPresenceTokenError = InvalidPresenceTokenError;
|
|
|
5887
5841
|
exports.InvalidReceiptDataError = InvalidReceiptDataError;
|
|
5888
5842
|
exports.InvalidRequestError = InvalidRequestError;
|
|
5889
5843
|
exports.InvalidTokenError = InvalidTokenError;
|
|
5844
|
+
exports.LambdaInvocationError = LambdaInvocationError;
|
|
5890
5845
|
exports.LocalizationKeyMissingError = LocalizationKeyMissingError;
|
|
5891
5846
|
exports.LockedDocumentError = LockedDocumentError;
|
|
5892
5847
|
exports.LoginFreezeError = LoginFreezeError;
|
|
@@ -5927,6 +5882,7 @@ exports.RequestAbortedError = RequestAbortedError;
|
|
|
5927
5882
|
exports.ResourceAlreadyExistsError = ResourceAlreadyExistsError;
|
|
5928
5883
|
exports.ResourceUnknownError = ResourceUnknownError;
|
|
5929
5884
|
exports.ServerError = ServerError;
|
|
5885
|
+
exports.ServiceNotFoundError = ServiceNotFoundError;
|
|
5930
5886
|
exports.ServiceUnavailableError = ServiceUnavailableError;
|
|
5931
5887
|
exports.StatusInUseError = StatusInUseError;
|
|
5932
5888
|
exports.StripePaymentMethodError = StripePaymentMethodError;
|