@extrahorizon/javascript-sdk 8.12.0-dev-172-6fb7e9f → 8.12.0-dev-174-523a199
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/build/index.cjs.js +12 -3
- package/build/index.mjs +12 -3
- package/build/types/version.d.ts +1 -1
- package/build/version.d.ts +1 -1
- package/package.json +1 -1
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.0-dev-
|
|
5667
|
+
const version = '8.12.0-dev-174-523a199';
|
|
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.0-dev-
|
|
5637
|
+
const version = '8.12.0-dev-174-523a199';
|
|
5629
5638
|
|
|
5630
5639
|
/**
|
|
5631
5640
|
* Create ExtraHorizon client.
|
package/build/types/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "8.12.0-dev-
|
|
1
|
+
export declare const version = "8.12.0-dev-174-523a199";
|
package/build/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "8.12.0-dev-
|
|
1
|
+
export declare const version = "8.12.0-dev-174-523a199";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@extrahorizon/javascript-sdk",
|
|
3
|
-
"version": "8.12.0-dev-
|
|
3
|
+
"version": "8.12.0-dev-174-523a199",
|
|
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",
|