@cranberry-money/shared-services 10.1.445 → 10.1.446
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transactions.d.ts","sourceRoot":"","sources":["../src/transactions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AACrD,OAAO,KAAK,EAAE,WAAW,EAAE,sBAAsB,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;
|
|
1
|
+
{"version":3,"file":"transactions.d.ts","sourceRoot":"","sources":["../src/transactions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AACrD,OAAO,KAAK,EAAE,WAAW,EAAE,sBAAsB,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAG5G,eAAO,MAAM,eAAe,GAAI,WAAW,aAAa,EAAE,SAAS,sBAAsB,oEACR,CAAC;AAElF;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,uBAAuB,GAClC,UAAU,aAAa,CAAC,iBAAiB,CAAC,WAAW,CAAC,CAAC,KACtD,MAAM,GAAG,SAA4C,CAAC"}
|
package/dist/transactions.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { getNextPageParam } from '@cranberry-money/shared-utils';
|
|
1
2
|
export const getTransactions = (apiClient, params) => apiClient.get('/api/transactions/', { params });
|
|
2
3
|
/**
|
|
3
4
|
* Extract the next page number from a paginated transactions response.
|
|
@@ -12,12 +13,5 @@ export const getTransactions = (apiClient, params) => apiClient.get('/api/transa
|
|
|
12
13
|
* initialPageParam: 1,
|
|
13
14
|
* });
|
|
14
15
|
*/
|
|
15
|
-
export const getTransactionsNextPage = (lastPage) =>
|
|
16
|
-
const nextUrl = lastPage.data?.next;
|
|
17
|
-
if (!nextUrl)
|
|
18
|
-
return undefined;
|
|
19
|
-
const url = new URL(nextUrl);
|
|
20
|
-
const page = url.searchParams.get('page');
|
|
21
|
-
return page ? Number(page) : undefined;
|
|
22
|
-
};
|
|
16
|
+
export const getTransactionsNextPage = (lastPage) => getNextPageParam(lastPage.data);
|
|
23
17
|
//# sourceMappingURL=transactions.js.map
|
package/dist/transactions.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transactions.js","sourceRoot":"","sources":["../src/transactions.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"transactions.js","sourceRoot":"","sources":["../src/transactions.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAEjE,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,SAAwB,EAAE,MAA+B,EAAE,EAAE,CAC3F,SAAS,CAAC,GAAG,CAAiC,oBAAoB,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC;AAElF;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,CACrC,QAAuD,EACnC,EAAE,CAAC,gBAAgB,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cranberry-money/shared-services",
|
|
3
|
-
"version": "10.1.
|
|
3
|
+
"version": "10.1.446",
|
|
4
4
|
"description": "Platform-agnostic API services with pure functions and dependency injection. Includes auth, portfolios, assets, countries, sectors, and more.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -29,8 +29,8 @@
|
|
|
29
29
|
"prepublishOnly": "npm run clean && npm run typecheck && npm run build"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@cranberry-money/shared-constants": "^8.15.
|
|
33
|
-
"@cranberry-money/shared-types": "^8.22.
|
|
32
|
+
"@cranberry-money/shared-constants": "^8.15.471",
|
|
33
|
+
"@cranberry-money/shared-types": "^8.22.446",
|
|
34
34
|
"axios": "^1.9.0"
|
|
35
35
|
},
|
|
36
36
|
"peerDependencies": {
|