@techzunction/sdk 0.9.0 → 0.9.1
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/index.cjs +6 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +6 -6
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -377,16 +377,16 @@ var ScopedClient = class {
|
|
|
377
377
|
return new TZQuery((signal) => this.root.rawRequest("POST", fp, { body: formData, scope: s, signal, sendOrgKey: this.sendOrgKey }));
|
|
378
378
|
}
|
|
379
379
|
/** Paginated GET → TZPaginatedQuery<T> with .next(), .prev(), .goTo() */
|
|
380
|
-
paginated(path, params = {}) {
|
|
380
|
+
paginated(path, params = {}, scope) {
|
|
381
381
|
const page = params.page ?? 1;
|
|
382
382
|
const limit = params.limit ?? 20;
|
|
383
|
-
const
|
|
383
|
+
const resolvedScope = scope ?? this.defaultScope;
|
|
384
384
|
const factory = (p, l) => {
|
|
385
385
|
const merged = { ...params, page: p, limit: l };
|
|
386
386
|
const qs = toQs(merged);
|
|
387
387
|
const fp = this.fullPath(`${path}${qs}`);
|
|
388
388
|
const executor = async (signal) => {
|
|
389
|
-
const rawRes = await this.root.rawRequest("GET", fp, { scope, signal, sendOrgKey: this.sendOrgKey });
|
|
389
|
+
const rawRes = await this.root.rawRequest("GET", fp, { scope: resolvedScope, signal, sendOrgKey: this.sendOrgKey });
|
|
390
390
|
const envelope = rawRes.raw;
|
|
391
391
|
const pagination = envelope["pagination"] ?? { page: p, limit: l, total: 0, totalPages: 0, hasNextPage: false, hasPrevPage: false };
|
|
392
392
|
return {
|
|
@@ -1112,7 +1112,7 @@ function createStorefrontBanking(c) {
|
|
|
1112
1112
|
return c.patch(`/banking/accounts/${id}/auto-sweep`, data, "enduser");
|
|
1113
1113
|
},
|
|
1114
1114
|
getStatement(id, params) {
|
|
1115
|
-
return c.paginated(`/banking/accounts/${id}/statement`, params);
|
|
1115
|
+
return c.paginated(`/banking/accounts/${id}/statement`, params, "enduser");
|
|
1116
1116
|
}
|
|
1117
1117
|
},
|
|
1118
1118
|
// ─── Fixed Deposits ─────────────────────────────────────────────
|
|
@@ -1166,7 +1166,7 @@ function createStorefrontBanking(c) {
|
|
|
1166
1166
|
return c.post("/banking/transfers/bills", data, "enduser");
|
|
1167
1167
|
},
|
|
1168
1168
|
list(params) {
|
|
1169
|
-
return c.paginated("/banking/transfers/bills", params);
|
|
1169
|
+
return c.paginated("/banking/transfers/bills", params, "enduser");
|
|
1170
1170
|
}
|
|
1171
1171
|
},
|
|
1172
1172
|
// ─── Cards ──────────────────────────────────────────────────────
|
|
@@ -1232,7 +1232,7 @@ function createStorefrontBanking(c) {
|
|
|
1232
1232
|
// ─── Anomaly Alerts ─────────────────────────────────────────────
|
|
1233
1233
|
alerts: {
|
|
1234
1234
|
list(params) {
|
|
1235
|
-
return c.paginated("/banking/analytics/alerts", params);
|
|
1235
|
+
return c.paginated("/banking/analytics/alerts", params, "enduser");
|
|
1236
1236
|
},
|
|
1237
1237
|
markRead(id) {
|
|
1238
1238
|
return c.post(`/banking/analytics/alerts/${id}/read`, {}, "enduser");
|