@cranberry-money/shared-services 10.1.441 → 10.1.443
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.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/widgets.d.ts +29 -0
- package/dist/widgets.d.ts.map +1 -0
- package/dist/widgets.js +26 -0
- package/dist/widgets.js.map +1 -0
- package/package.json +3 -3
- package/dist/portfolioAllocations.d.ts +0 -13
- package/dist/portfolioAllocations.d.ts.map +0 -1
- package/dist/portfolioAllocations.js +0 -17
- package/dist/portfolioAllocations.js.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -3,7 +3,6 @@ export { getAccounts } from './user-accounts';
|
|
|
3
3
|
export { getCountries, getAvailableCountries } from './countries';
|
|
4
4
|
export { getAssets, getAssetByUuid } from './assets';
|
|
5
5
|
export { createFinancialProfile, updateFinancialProfile, getFinancialProfiles } from './financialProfile';
|
|
6
|
-
export { getPortfolioAllocations, createAssetAllocation, updateAssetAllocation, deleteAssetAllocation } from './portfolioAllocations';
|
|
7
6
|
export { getPortfolios, createPortfolio, updatePortfolio, deletePortfolio, getPortfolioSnapshots as getPortfolioSnapshotsTimeSeries, addWalletToPortfolio, removeWalletFromPortfolio } from './portfolios';
|
|
8
7
|
export { updateUserProfile, updateUserProfileCompletion, getUserProfiles } from './users';
|
|
9
8
|
export { getIdentityVerificationToken, getIdentityVerificationStatus } from './identityVerification';
|
|
@@ -16,4 +15,5 @@ export type { WalletHoldingsQueryParams } from './wallet-balances';
|
|
|
16
15
|
export { getTransactions } from './transactions';
|
|
17
16
|
export { getTransakWidgetUrl } from './fiat-transactions';
|
|
18
17
|
export { getOnRampQuotes, getOnRampWidgetUrl } from './onramp';
|
|
18
|
+
export { getWidgets, getWidgetByUuid, createWidget, updateWidget, deleteWidget, getWidgetsByUserAccount } from './widgets';
|
|
19
19
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,sBAAsB,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAChH,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AAClE,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AACrD,OAAO,EAAE,sBAAsB,EAAE,sBAAsB,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC1G,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,sBAAsB,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAChH,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AAClE,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AACrD,OAAO,EAAE,sBAAsB,EAAE,sBAAsB,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC1G,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,eAAe,EAAE,eAAe,EAAE,qBAAqB,IAAI,+BAA+B,EAAE,oBAAoB,EAAE,yBAAyB,EAAE,MAAM,cAAc,CAAC;AAC3M,OAAO,EAAE,iBAAiB,EAAE,2BAA2B,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAC1F,OAAO,EAAE,4BAA4B,EAAE,6BAA6B,EAAE,MAAM,wBAAwB,CAAC;AACrG,OAAO,EAAE,yBAAyB,EAAE,4BAA4B,EAAE,MAAM,mBAAmB,CAAC;AAC5F,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACjF,OAAO,EAAE,4BAA4B,EAAE,qBAAqB,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACxG,OAAO,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AACxE,OAAO,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAC1E,YAAY,EAAE,yBAAyB,EAAE,MAAM,mBAAmB,CAAC;AACnE,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,EAAE,eAAe,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAC/D,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,YAAY,EAAE,YAAY,EAAE,YAAY,EAAE,uBAAuB,EAAE,MAAM,WAAW,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -3,7 +3,6 @@ export { getAccounts } from './user-accounts';
|
|
|
3
3
|
export { getCountries, getAvailableCountries } from './countries';
|
|
4
4
|
export { getAssets, getAssetByUuid } from './assets';
|
|
5
5
|
export { createFinancialProfile, updateFinancialProfile, getFinancialProfiles } from './financialProfile';
|
|
6
|
-
export { getPortfolioAllocations, createAssetAllocation, updateAssetAllocation, deleteAssetAllocation } from './portfolioAllocations';
|
|
7
6
|
export { getPortfolios, createPortfolio, updatePortfolio, deletePortfolio, getPortfolioSnapshots as getPortfolioSnapshotsTimeSeries, addWalletToPortfolio, removeWalletFromPortfolio } from './portfolios';
|
|
8
7
|
export { updateUserProfile, updateUserProfileCompletion, getUserProfiles } from './users';
|
|
9
8
|
export { getIdentityVerificationToken, getIdentityVerificationStatus } from './identityVerification';
|
|
@@ -15,4 +14,5 @@ export { getWalletHoldings, fetchBatchBalances } from './wallet-balances';
|
|
|
15
14
|
export { getTransactions } from './transactions';
|
|
16
15
|
export { getTransakWidgetUrl } from './fiat-transactions';
|
|
17
16
|
export { getOnRampQuotes, getOnRampWidgetUrl } from './onramp';
|
|
17
|
+
export { getWidgets, getWidgetByUuid, createWidget, updateWidget, deleteWidget, getWidgetsByUserAccount } from './widgets';
|
|
18
18
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,sBAAsB,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAChH,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AAClE,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AACrD,OAAO,EAAE,sBAAsB,EAAE,sBAAsB,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC1G,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,sBAAsB,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAChH,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AAClE,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AACrD,OAAO,EAAE,sBAAsB,EAAE,sBAAsB,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC1G,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,eAAe,EAAE,eAAe,EAAE,qBAAqB,IAAI,+BAA+B,EAAE,oBAAoB,EAAE,yBAAyB,EAAE,MAAM,cAAc,CAAC;AAC3M,OAAO,EAAE,iBAAiB,EAAE,2BAA2B,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAC1F,OAAO,EAAE,4BAA4B,EAAE,6BAA6B,EAAE,MAAM,wBAAwB,CAAC;AACrG,OAAO,EAAE,yBAAyB,EAAE,4BAA4B,EAAE,MAAM,mBAAmB,CAAC;AAC5F,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACjF,OAAO,EAAE,4BAA4B,EAAE,qBAAqB,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACxG,OAAO,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AACxE,OAAO,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAE1E,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,EAAE,eAAe,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAC/D,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,YAAY,EAAE,YAAY,EAAE,YAAY,EAAE,uBAAuB,EAAE,MAAM,WAAW,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { AxiosInstance } from 'axios';
|
|
2
|
+
import type { Widget, CreateWidget, UpdateWidget, WidgetQueryParams, PaginatedResponse } from '@cranberry-money/shared-types';
|
|
3
|
+
type PaginatedWidgets = PaginatedResponse<Widget>;
|
|
4
|
+
/**
|
|
5
|
+
* Get all widgets for the authenticated user
|
|
6
|
+
*/
|
|
7
|
+
export declare const getWidgets: (apiClient: AxiosInstance, params?: WidgetQueryParams) => Promise<import("axios").AxiosResponse<PaginatedWidgets, any, {}>>;
|
|
8
|
+
/**
|
|
9
|
+
* Get a specific widget by UUID
|
|
10
|
+
*/
|
|
11
|
+
export declare const getWidgetByUuid: (apiClient: AxiosInstance, uuid: string) => Promise<import("axios").AxiosResponse<Widget, any, {}>>;
|
|
12
|
+
/**
|
|
13
|
+
* Create a new widget
|
|
14
|
+
*/
|
|
15
|
+
export declare const createWidget: (apiClient: AxiosInstance, data: CreateWidget) => Promise<import("axios").AxiosResponse<Widget, any, {}>>;
|
|
16
|
+
/**
|
|
17
|
+
* Update an existing widget
|
|
18
|
+
*/
|
|
19
|
+
export declare const updateWidget: (apiClient: AxiosInstance, uuid: string, data: UpdateWidget) => Promise<import("axios").AxiosResponse<Widget, any, {}>>;
|
|
20
|
+
/**
|
|
21
|
+
* Delete a widget
|
|
22
|
+
*/
|
|
23
|
+
export declare const deleteWidget: (apiClient: AxiosInstance, uuid: string) => Promise<import("axios").AxiosResponse<any, any, {}>>;
|
|
24
|
+
/**
|
|
25
|
+
* Get widgets for a specific user account (nested endpoint)
|
|
26
|
+
*/
|
|
27
|
+
export declare const getWidgetsByUserAccount: (apiClient: AxiosInstance, accountUuid: string, params?: Omit<WidgetQueryParams, "user_account">) => Promise<import("axios").AxiosResponse<Widget[], any, {}>>;
|
|
28
|
+
export {};
|
|
29
|
+
//# sourceMappingURL=widgets.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"widgets.d.ts","sourceRoot":"","sources":["../src/widgets.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAEtC,OAAO,KAAK,EAAE,MAAM,EAAE,YAAY,EAAE,YAAY,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAE9H,KAAK,gBAAgB,GAAG,iBAAiB,CAAC,MAAM,CAAC,CAAC;AAElD;;GAEG;AACH,eAAO,MAAM,UAAU,GAAI,WAAW,aAAa,EAAE,SAAS,iBAAiB,sEACX,CAAC;AAErE;;GAEG;AACH,eAAO,MAAM,eAAe,GAAI,WAAW,aAAa,EAAE,MAAM,MAAM,4DAChB,CAAC;AAEvD;;GAEG;AACH,eAAO,MAAM,YAAY,GAAI,WAAW,aAAa,EAAE,MAAM,YAAY,4DACpB,CAAC;AAEtD;;GAEG;AACH,eAAO,MAAM,YAAY,GAAI,WAAW,aAAa,EAAE,MAAM,MAAM,EAAE,MAAM,YAAY,4DACzB,CAAC;AAE/D;;GAEG;AACH,eAAO,MAAM,YAAY,GAAI,WAAW,aAAa,EAAE,MAAM,MAAM,yDAAoD,CAAC;AAExH;;GAEG;AACH,eAAO,MAAM,uBAAuB,GAClC,WAAW,aAAa,EACxB,aAAa,MAAM,EACnB,SAAS,IAAI,CAAC,iBAAiB,EAAE,cAAc,CAAC,8DAC+C,CAAC"}
|
package/dist/widgets.js
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { WIDGET_ENDPOINTS, USER_ACCOUNT_ENDPOINTS } from '@cranberry-money/shared-constants';
|
|
2
|
+
/**
|
|
3
|
+
* Get all widgets for the authenticated user
|
|
4
|
+
*/
|
|
5
|
+
export const getWidgets = (apiClient, params) => apiClient.get(WIDGET_ENDPOINTS.BASE, { params });
|
|
6
|
+
/**
|
|
7
|
+
* Get a specific widget by UUID
|
|
8
|
+
*/
|
|
9
|
+
export const getWidgetByUuid = (apiClient, uuid) => apiClient.get(WIDGET_ENDPOINTS.DETAIL(uuid));
|
|
10
|
+
/**
|
|
11
|
+
* Create a new widget
|
|
12
|
+
*/
|
|
13
|
+
export const createWidget = (apiClient, data) => apiClient.post(WIDGET_ENDPOINTS.BASE, data);
|
|
14
|
+
/**
|
|
15
|
+
* Update an existing widget
|
|
16
|
+
*/
|
|
17
|
+
export const updateWidget = (apiClient, uuid, data) => apiClient.patch(WIDGET_ENDPOINTS.DETAIL(uuid), data);
|
|
18
|
+
/**
|
|
19
|
+
* Delete a widget
|
|
20
|
+
*/
|
|
21
|
+
export const deleteWidget = (apiClient, uuid) => apiClient.delete(WIDGET_ENDPOINTS.DETAIL(uuid));
|
|
22
|
+
/**
|
|
23
|
+
* Get widgets for a specific user account (nested endpoint)
|
|
24
|
+
*/
|
|
25
|
+
export const getWidgetsByUserAccount = (apiClient, accountUuid, params) => apiClient.get(`${USER_ACCOUNT_ENDPOINTS.DETAIL(accountUuid)}widgets/`, { params });
|
|
26
|
+
//# sourceMappingURL=widgets.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"widgets.js","sourceRoot":"","sources":["../src/widgets.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,sBAAsB,EAAE,MAAM,mCAAmC,CAAC;AAK7F;;GAEG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,SAAwB,EAAE,MAA0B,EAAE,EAAE,CACjF,SAAS,CAAC,GAAG,CAAmB,gBAAgB,CAAC,IAAI,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC;AAErE;;GAEG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,SAAwB,EAAE,IAAY,EAAE,EAAE,CACxE,SAAS,CAAC,GAAG,CAAS,gBAAgB,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC;AAEvD;;GAEG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,SAAwB,EAAE,IAAkB,EAAE,EAAE,CAC3E,SAAS,CAAC,IAAI,CAAS,gBAAgB,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;AAEtD;;GAEG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,SAAwB,EAAE,IAAY,EAAE,IAAkB,EAAE,EAAE,CACzF,SAAS,CAAC,KAAK,CAAS,gBAAgB,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,IAAI,CAAC,CAAC;AAE/D;;GAEG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,SAAwB,EAAE,IAAY,EAAE,EAAE,CAAC,SAAS,CAAC,MAAM,CAAC,gBAAgB,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC;AAExH;;GAEG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,CACrC,SAAwB,EACxB,WAAmB,EACnB,MAAgD,EAChD,EAAE,CAAC,SAAS,CAAC,GAAG,CAAW,GAAG,sBAAsB,CAAC,MAAM,CAAC,WAAW,CAAC,UAAU,EAAE,EAAE,MAAM,EAAE,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.443",
|
|
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.468",
|
|
33
|
+
"@cranberry-money/shared-types": "^8.22.443",
|
|
34
34
|
"axios": "^1.9.0"
|
|
35
35
|
},
|
|
36
36
|
"peerDependencies": {
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import type { AxiosInstance } from 'axios';
|
|
2
|
-
import type { AssetAllocation, CreateAssetAllocation } from '@cranberry-money/shared-types';
|
|
3
|
-
export declare function getPortfolioAllocations(client: AxiosInstance, portfolioUuid: string): Promise<{
|
|
4
|
-
data: AssetAllocation[];
|
|
5
|
-
}>;
|
|
6
|
-
export declare function createAssetAllocation(client: AxiosInstance, data: CreateAssetAllocation): Promise<{
|
|
7
|
-
data: AssetAllocation;
|
|
8
|
-
}>;
|
|
9
|
-
export declare function updateAssetAllocation(client: AxiosInstance, uuid: string, data: Partial<CreateAssetAllocation>): Promise<{
|
|
10
|
-
data: AssetAllocation;
|
|
11
|
-
}>;
|
|
12
|
-
export declare function deleteAssetAllocation(client: AxiosInstance, uuid: string): Promise<void>;
|
|
13
|
-
//# sourceMappingURL=portfolioAllocations.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"portfolioAllocations.d.ts","sourceRoot":"","sources":["../src/portfolioAllocations.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,KAAK,EAAqB,eAAe,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AAG/G,wBAAsB,uBAAuB,CAAC,MAAM,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,GAAG,OAAO,CAAC;IAAE,IAAI,EAAE,eAAe,EAAE,CAAA;CAAE,CAAC,CAGhI;AAED,wBAAsB,qBAAqB,CAAC,MAAM,EAAE,aAAa,EAAE,IAAI,EAAE,qBAAqB,GAAG,OAAO,CAAC;IAAE,IAAI,EAAE,eAAe,CAAA;CAAE,CAAC,CAGlI;AAED,wBAAsB,qBAAqB,CAAC,MAAM,EAAE,aAAa,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,CAAC,qBAAqB,CAAC,GAAG,OAAO,CAAC;IAAE,IAAI,EAAE,eAAe,CAAA;CAAE,CAAC,CAGzJ;AAED,wBAAsB,qBAAqB,CAAC,MAAM,EAAE,aAAa,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAE9F"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { PORTFOLIO_ENDPOINTS } from '@cranberry-money/shared-constants';
|
|
2
|
-
export async function getPortfolioAllocations(client, portfolioUuid) {
|
|
3
|
-
const response = await client.get(PORTFOLIO_ENDPOINTS.ALLOCATIONS(portfolioUuid));
|
|
4
|
-
return { data: response.data.results };
|
|
5
|
-
}
|
|
6
|
-
export async function createAssetAllocation(client, data) {
|
|
7
|
-
const response = await client.post(PORTFOLIO_ENDPOINTS.ALLOCATIONS(data.portfolio), data);
|
|
8
|
-
return { data: response.data };
|
|
9
|
-
}
|
|
10
|
-
export async function updateAssetAllocation(client, uuid, data) {
|
|
11
|
-
const response = await client.patch(`/api/allocations/${uuid}/`, data);
|
|
12
|
-
return { data: response.data };
|
|
13
|
-
}
|
|
14
|
-
export async function deleteAssetAllocation(client, uuid) {
|
|
15
|
-
await client.delete(`/api/allocations/${uuid}/`);
|
|
16
|
-
}
|
|
17
|
-
//# sourceMappingURL=portfolioAllocations.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"portfolioAllocations.js","sourceRoot":"","sources":["../src/portfolioAllocations.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,mBAAmB,EAAE,MAAM,mCAAmC,CAAC;AAExE,MAAM,CAAC,KAAK,UAAU,uBAAuB,CAAC,MAAqB,EAAE,aAAqB;IACxF,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,GAAG,CAAqC,mBAAmB,CAAC,WAAW,CAAC,aAAa,CAAC,CAAC,CAAC;IACtH,OAAO,EAAE,IAAI,EAAE,QAAQ,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC;AACzC,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,qBAAqB,CAAC,MAAqB,EAAE,IAA2B;IAC5F,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,IAAI,CAAkB,mBAAmB,CAAC,WAAW,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE,IAAI,CAAC,CAAC;IAC3G,OAAO,EAAE,IAAI,EAAE,QAAQ,CAAC,IAAI,EAAE,CAAC;AACjC,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,qBAAqB,CAAC,MAAqB,EAAE,IAAY,EAAE,IAAoC;IACnH,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,KAAK,CAAkB,oBAAoB,IAAI,GAAG,EAAE,IAAI,CAAC,CAAC;IACxF,OAAO,EAAE,IAAI,EAAE,QAAQ,CAAC,IAAI,EAAE,CAAC;AACjC,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,qBAAqB,CAAC,MAAqB,EAAE,IAAY;IAC7E,MAAM,MAAM,CAAC,MAAM,CAAC,oBAAoB,IAAI,GAAG,CAAC,CAAC;AACnD,CAAC"}
|