@quantcdn/quant-client 2.0.7 → 2.0.8
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/src/client.js +7 -0
- package/dist/src/response.js +3 -2
- package/dist/src/types.d.ts +2 -0
- package/package.json +1 -1
package/dist/src/client.js
CHANGED
|
@@ -116,6 +116,13 @@ class QuantClient {
|
|
|
116
116
|
if ((filters === null || filters === void 0 ? void 0 : filters.sort_field) != null) {
|
|
117
117
|
qs.sort_field = filters.sort_field;
|
|
118
118
|
}
|
|
119
|
+
if ((filters === null || filters === void 0 ? void 0 : filters.quant_type) != null) {
|
|
120
|
+
qs.quant_type = filters.quant_type;
|
|
121
|
+
}
|
|
122
|
+
if ((filters === null || filters === void 0 ? void 0 : filters.page_size) != null) {
|
|
123
|
+
// Ensure page_size is between 1 and 100
|
|
124
|
+
qs.page_size = Math.min(Math.max(1, filters.page_size), 100);
|
|
125
|
+
}
|
|
119
126
|
return yield this._project.get('global-meta', qs);
|
|
120
127
|
}),
|
|
121
128
|
/**
|
package/dist/src/response.js
CHANGED
|
@@ -25,13 +25,14 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
25
25
|
exports.PaginatedResponse = void 0;
|
|
26
26
|
class PaginatedResponse {
|
|
27
27
|
constructor(client, options) {
|
|
28
|
-
|
|
28
|
+
var _a, _b;
|
|
29
29
|
this.page = 0;
|
|
30
30
|
this.total = 0;
|
|
31
31
|
this.hasNext = true;
|
|
32
32
|
this.client = client;
|
|
33
33
|
this.request = options;
|
|
34
|
-
|
|
34
|
+
// Use page_size from query parameters or default to 10
|
|
35
|
+
this.per_page = (_b = (_a = this.request.qs) === null || _a === void 0 ? void 0 : _a.page_size) !== null && _b !== void 0 ? _b : 10;
|
|
35
36
|
this.page = 1;
|
|
36
37
|
if (typeof this.request.qs !== 'object') {
|
|
37
38
|
this.request.qs = {};
|
package/dist/src/types.d.ts
CHANGED