@extrahorizon/javascript-sdk 8.12.0-feat-170-8c1c1e0 → 8.12.1-dev-180-2988738
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 +20 -0
- package/build/client.d.ts +3 -0
- package/build/index.cjs.js +12 -3
- package/build/index.mjs +12 -3
- package/build/types/client.d.ts +3 -0
- package/build/types/version.d.ts +1 -1
- package/build/version.d.ts +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -5,8 +5,28 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [8.12.1]
|
|
9
|
+
|
|
10
|
+
### Fixed
|
|
11
|
+
- Bumped qs version to resolve `CVE-2026-8723` (vulnerable code was not in use)
|
|
12
|
+
|
|
8
13
|
## [8.12.0]
|
|
9
14
|
|
|
15
|
+
### Added
|
|
16
|
+
- Added the error type `ServiceUnreachableError` to support detecting services that are no longer running
|
|
17
|
+
|
|
18
|
+
### Fixed
|
|
19
|
+
- Options are now correctly passed to the `findAll` method
|
|
20
|
+
- An error is now correctly thrown when providing the `skipCount` RQL operator to the `findAll` method
|
|
21
|
+
|
|
22
|
+
### Deprecated
|
|
23
|
+
- `exh.templates.*`
|
|
24
|
+
- The templates service has been deprecated in favor of the templates service V2
|
|
25
|
+
- `exh.profiles.*`
|
|
26
|
+
- The profiles service has been deprecated in favor of using a custom schema in the data service
|
|
27
|
+
- `exh.notifications.*`
|
|
28
|
+
- The notifications service has been deprecated in favor of the notifications service V2
|
|
29
|
+
|
|
10
30
|
## [8.11.0]
|
|
11
31
|
|
|
12
32
|
### Added
|
package/build/client.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ import { ClientParams, ParamsOauth1, ParamsOauth2, ParamsProxy } from './types';
|
|
|
5
5
|
export interface Client<T extends ClientParams> {
|
|
6
6
|
raw: AuthHttpClient;
|
|
7
7
|
/**
|
|
8
|
+
* @deprecated Use `templatesV2` instead.
|
|
8
9
|
* The template service manages templates used to build emails. It can be used to retrieve, create, update or delete templates as well as resolving them.
|
|
9
10
|
* @see https://swagger.extrahorizon.com/listing/?service=templates-service&redirectToVersion=1
|
|
10
11
|
*/
|
|
@@ -55,11 +56,13 @@ export interface Client<T extends ClientParams> {
|
|
|
55
56
|
*/
|
|
56
57
|
localizations: ReturnType<typeof localizationsService>;
|
|
57
58
|
/**
|
|
59
|
+
* @deprecated Use the `data` service with a custom schema instead.
|
|
58
60
|
* Storage service of profiles. A profile is a separate object on its own, comprising medical information like medication and medical history, as well as technical information, like what phone a user is using.
|
|
59
61
|
* @see https://swagger.extrahorizon.com/listing/?service=profiles-service&redirectToVersion=1
|
|
60
62
|
*/
|
|
61
63
|
profiles: ReturnType<typeof profilesService>;
|
|
62
64
|
/**
|
|
65
|
+
* @deprecated Use `notificationsV2` instead.
|
|
63
66
|
* A service that handles push notifications.
|
|
64
67
|
* @see https://swagger.extrahorizon.com/listing/?service=notifications-service&redirectToVersion=1
|
|
65
68
|
*/
|
package/build/index.cjs.js
CHANGED
|
@@ -1592,13 +1592,19 @@ async function* findAllIterator(find, options) {
|
|
|
1592
1592
|
return {};
|
|
1593
1593
|
}
|
|
1594
1594
|
async function findAllGeneric(find, options, level = 1) {
|
|
1595
|
-
if (level === 1 && (options === null || options === void 0 ? void 0 : options.rql)
|
|
1596
|
-
|
|
1595
|
+
if (level === 1 && (options === null || options === void 0 ? void 0 : options.rql)) {
|
|
1596
|
+
if (options.rql.includes('limit(')) {
|
|
1597
|
+
throw new Error('Do not pass in limit operator with findAll');
|
|
1598
|
+
}
|
|
1599
|
+
if (options.rql.includes('skipCount(')) {
|
|
1600
|
+
throw new Error('Do not pass in skipCount operator with findAll');
|
|
1601
|
+
}
|
|
1597
1602
|
}
|
|
1598
1603
|
// return async options => {
|
|
1599
1604
|
// Extra check is needed because this function is call recursively with updated RQL
|
|
1600
1605
|
// But on the first run, we need to set the limit to the max to optimize
|
|
1601
1606
|
const result = await find({
|
|
1607
|
+
...options,
|
|
1602
1608
|
rql: (options === null || options === void 0 ? void 0 : options.rql) && options.rql.includes('limit(') ?
|
|
1603
1609
|
options.rql :
|
|
1604
1610
|
rqlBuilder(options === null || options === void 0 ? void 0 : options.rql).limit(MAX_LIMIT).build(),
|
|
@@ -1610,6 +1616,7 @@ async function findAllGeneric(find, options, level = 1) {
|
|
|
1610
1616
|
[
|
|
1611
1617
|
...result.data,
|
|
1612
1618
|
...(await findAllGeneric(find, {
|
|
1619
|
+
...options,
|
|
1613
1620
|
rql: rqlBuilder(options === null || options === void 0 ? void 0 : options.rql)
|
|
1614
1621
|
.limit(result.page.limit, result.page.offset + result.page.limit)
|
|
1615
1622
|
.build(),
|
|
@@ -1621,6 +1628,7 @@ function addPagersFn(find, options, pagedResult) {
|
|
|
1621
1628
|
let result = pagedResult;
|
|
1622
1629
|
async function previous() {
|
|
1623
1630
|
result = await find({
|
|
1631
|
+
...options,
|
|
1624
1632
|
rql: rqlBuilder(options === null || options === void 0 ? void 0 : options.rql)
|
|
1625
1633
|
.limit(result.page.limit, result.page.offset > 0 ? result.page.offset - result.page.limit : 0)
|
|
1626
1634
|
.build(),
|
|
@@ -1629,6 +1637,7 @@ function addPagersFn(find, options, pagedResult) {
|
|
|
1629
1637
|
}
|
|
1630
1638
|
async function next() {
|
|
1631
1639
|
result = await find({
|
|
1640
|
+
...options,
|
|
1632
1641
|
rql: rqlBuilder(options === null || options === void 0 ? void 0 : options.rql)
|
|
1633
1642
|
.limit(result.page.limit, result.page.offset + result.page.limit < result.page.total ?
|
|
1634
1643
|
result.page.offset + result.page.limit :
|
|
@@ -5655,7 +5664,7 @@ const templatesV2Service = (httpWithAuth) => {
|
|
|
5655
5664
|
};
|
|
5656
5665
|
};
|
|
5657
5666
|
|
|
5658
|
-
const version = '8.12.
|
|
5667
|
+
const version = '8.12.1-dev-180-2988738';
|
|
5659
5668
|
|
|
5660
5669
|
/**
|
|
5661
5670
|
* Create ExtraHorizon client.
|
package/build/index.mjs
CHANGED
|
@@ -1562,13 +1562,19 @@ async function* findAllIterator(find, options) {
|
|
|
1562
1562
|
return {};
|
|
1563
1563
|
}
|
|
1564
1564
|
async function findAllGeneric(find, options, level = 1) {
|
|
1565
|
-
if (level === 1 && (options === null || options === void 0 ? void 0 : options.rql)
|
|
1566
|
-
|
|
1565
|
+
if (level === 1 && (options === null || options === void 0 ? void 0 : options.rql)) {
|
|
1566
|
+
if (options.rql.includes('limit(')) {
|
|
1567
|
+
throw new Error('Do not pass in limit operator with findAll');
|
|
1568
|
+
}
|
|
1569
|
+
if (options.rql.includes('skipCount(')) {
|
|
1570
|
+
throw new Error('Do not pass in skipCount operator with findAll');
|
|
1571
|
+
}
|
|
1567
1572
|
}
|
|
1568
1573
|
// return async options => {
|
|
1569
1574
|
// Extra check is needed because this function is call recursively with updated RQL
|
|
1570
1575
|
// But on the first run, we need to set the limit to the max to optimize
|
|
1571
1576
|
const result = await find({
|
|
1577
|
+
...options,
|
|
1572
1578
|
rql: (options === null || options === void 0 ? void 0 : options.rql) && options.rql.includes('limit(') ?
|
|
1573
1579
|
options.rql :
|
|
1574
1580
|
rqlBuilder(options === null || options === void 0 ? void 0 : options.rql).limit(MAX_LIMIT).build(),
|
|
@@ -1580,6 +1586,7 @@ async function findAllGeneric(find, options, level = 1) {
|
|
|
1580
1586
|
[
|
|
1581
1587
|
...result.data,
|
|
1582
1588
|
...(await findAllGeneric(find, {
|
|
1589
|
+
...options,
|
|
1583
1590
|
rql: rqlBuilder(options === null || options === void 0 ? void 0 : options.rql)
|
|
1584
1591
|
.limit(result.page.limit, result.page.offset + result.page.limit)
|
|
1585
1592
|
.build(),
|
|
@@ -1591,6 +1598,7 @@ function addPagersFn(find, options, pagedResult) {
|
|
|
1591
1598
|
let result = pagedResult;
|
|
1592
1599
|
async function previous() {
|
|
1593
1600
|
result = await find({
|
|
1601
|
+
...options,
|
|
1594
1602
|
rql: rqlBuilder(options === null || options === void 0 ? void 0 : options.rql)
|
|
1595
1603
|
.limit(result.page.limit, result.page.offset > 0 ? result.page.offset - result.page.limit : 0)
|
|
1596
1604
|
.build(),
|
|
@@ -1599,6 +1607,7 @@ function addPagersFn(find, options, pagedResult) {
|
|
|
1599
1607
|
}
|
|
1600
1608
|
async function next() {
|
|
1601
1609
|
result = await find({
|
|
1610
|
+
...options,
|
|
1602
1611
|
rql: rqlBuilder(options === null || options === void 0 ? void 0 : options.rql)
|
|
1603
1612
|
.limit(result.page.limit, result.page.offset + result.page.limit < result.page.total ?
|
|
1604
1613
|
result.page.offset + result.page.limit :
|
|
@@ -5625,7 +5634,7 @@ const templatesV2Service = (httpWithAuth) => {
|
|
|
5625
5634
|
};
|
|
5626
5635
|
};
|
|
5627
5636
|
|
|
5628
|
-
const version = '8.12.
|
|
5637
|
+
const version = '8.12.1-dev-180-2988738';
|
|
5629
5638
|
|
|
5630
5639
|
/**
|
|
5631
5640
|
* Create ExtraHorizon client.
|
package/build/types/client.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ import { ClientParams, ParamsOauth1, ParamsOauth2, ParamsProxy } from './types';
|
|
|
5
5
|
export interface Client<T extends ClientParams> {
|
|
6
6
|
raw: AuthHttpClient;
|
|
7
7
|
/**
|
|
8
|
+
* @deprecated Use `templatesV2` instead.
|
|
8
9
|
* The template service manages templates used to build emails. It can be used to retrieve, create, update or delete templates as well as resolving them.
|
|
9
10
|
* @see https://swagger.extrahorizon.com/listing/?service=templates-service&redirectToVersion=1
|
|
10
11
|
*/
|
|
@@ -55,11 +56,13 @@ export interface Client<T extends ClientParams> {
|
|
|
55
56
|
*/
|
|
56
57
|
localizations: ReturnType<typeof localizationsService>;
|
|
57
58
|
/**
|
|
59
|
+
* @deprecated Use the `data` service with a custom schema instead.
|
|
58
60
|
* Storage service of profiles. A profile is a separate object on its own, comprising medical information like medication and medical history, as well as technical information, like what phone a user is using.
|
|
59
61
|
* @see https://swagger.extrahorizon.com/listing/?service=profiles-service&redirectToVersion=1
|
|
60
62
|
*/
|
|
61
63
|
profiles: ReturnType<typeof profilesService>;
|
|
62
64
|
/**
|
|
65
|
+
* @deprecated Use `notificationsV2` instead.
|
|
63
66
|
* A service that handles push notifications.
|
|
64
67
|
* @see https://swagger.extrahorizon.com/listing/?service=notifications-service&redirectToVersion=1
|
|
65
68
|
*/
|
package/build/types/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "8.12.
|
|
1
|
+
export declare const version = "8.12.1-dev-180-2988738";
|
package/build/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "8.12.
|
|
1
|
+
export declare const version = "8.12.1-dev-180-2988738";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@extrahorizon/javascript-sdk",
|
|
3
|
-
"version": "8.12.
|
|
3
|
+
"version": "8.12.1-dev-180-2988738",
|
|
4
4
|
"description": "This package serves as a JavaScript wrapper around all Extra Horizon cloud services.",
|
|
5
5
|
"main": "build/index.cjs.js",
|
|
6
6
|
"types": "build/types/index.d.ts",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"fflate": "0.8.2",
|
|
38
38
|
"form-data": "4.0.4",
|
|
39
39
|
"platform-specific": "1.1.0",
|
|
40
|
-
"qs": "6.
|
|
40
|
+
"qs": "6.15.2",
|
|
41
41
|
"typescript-json-decoder": "1.0.11"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|