@cranberry-money/shared-services 10.0.11 → 10.0.12
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/accounts.d.ts +4 -5
- package/dist/accounts.d.ts.map +1 -1
- package/dist/accounts.js +8 -18
- package/dist/accounts.js.map +1 -1
- package/dist/auth.d.ts +6 -7
- package/dist/auth.d.ts.map +1 -1
- package/dist/auth.js +12 -22
- package/dist/auth.js.map +1 -1
- package/dist/banks.d.ts +2 -3
- package/dist/banks.d.ts.map +1 -1
- package/dist/banks.js +4 -14
- package/dist/banks.js.map +1 -1
- package/dist/cashAccountTransactions.d.ts +5 -6
- package/dist/cashAccountTransactions.d.ts.map +1 -1
- package/dist/cashAccountTransactions.js +10 -20
- package/dist/cashAccountTransactions.js.map +1 -1
- package/dist/cashAccounts.d.ts +3 -4
- package/dist/cashAccounts.d.ts.map +1 -1
- package/dist/cashAccounts.js +6 -16
- package/dist/cashAccounts.js.map +1 -1
- package/dist/countries.d.ts +4 -5
- package/dist/countries.d.ts.map +1 -1
- package/dist/countries.js +8 -18
- package/dist/countries.js.map +1 -1
- package/dist/documents.d.ts +12 -13
- package/dist/documents.d.ts.map +1 -1
- package/dist/documents.js +30 -40
- package/dist/documents.js.map +1 -1
- package/dist/index.d.ts +24 -24
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +24 -24
- package/dist/index.js.map +1 -1
- package/dist/industries.d.ts +4 -5
- package/dist/industries.d.ts.map +1 -1
- package/dist/industries.js +8 -18
- package/dist/industries.js.map +1 -1
- package/dist/instruments.d.ts +9 -10
- package/dist/instruments.d.ts.map +1 -1
- package/dist/instruments.js +18 -30
- package/dist/instruments.js.map +1 -1
- package/dist/investmentPreferences.d.ts +4 -5
- package/dist/investmentPreferences.d.ts.map +1 -1
- package/dist/investmentPreferences.js +8 -18
- package/dist/investmentPreferences.js.map +1 -1
- package/dist/portfolioAllocations.d.ts +4 -5
- package/dist/portfolioAllocations.d.ts.map +1 -1
- package/dist/portfolioAllocations.js +8 -18
- package/dist/portfolioAllocations.js.map +1 -1
- package/dist/portfolioHoldings.d.ts +5 -6
- package/dist/portfolioHoldings.d.ts.map +1 -1
- package/dist/portfolioHoldings.js +10 -20
- package/dist/portfolioHoldings.js.map +1 -1
- package/dist/portfolioTemplates.d.ts +4 -5
- package/dist/portfolioTemplates.d.ts.map +1 -1
- package/dist/portfolioTemplates.js +8 -18
- package/dist/portfolioTemplates.js.map +1 -1
- package/dist/portfolios.d.ts +5 -6
- package/dist/portfolios.d.ts.map +1 -1
- package/dist/portfolios.js +10 -20
- package/dist/portfolios.js.map +1 -1
- package/dist/sectors.d.ts +3 -4
- package/dist/sectors.d.ts.map +1 -1
- package/dist/sectors.js +6 -16
- package/dist/sectors.js.map +1 -1
- package/dist/stockExchanges.d.ts +2 -3
- package/dist/stockExchanges.d.ts.map +1 -1
- package/dist/stockExchanges.js +4 -14
- package/dist/stockExchanges.js.map +1 -1
- package/dist/targetTradeSheets.d.ts +8 -9
- package/dist/targetTradeSheets.d.ts.map +1 -1
- package/dist/targetTradeSheets.js +17 -27
- package/dist/targetTradeSheets.js.map +1 -1
- package/dist/targetTrades.d.ts +5 -6
- package/dist/targetTrades.d.ts.map +1 -1
- package/dist/targetTrades.js +10 -20
- package/dist/targetTrades.js.map +1 -1
- package/dist/taxResidencies.d.ts +4 -5
- package/dist/taxResidencies.d.ts.map +1 -1
- package/dist/taxResidencies.js +8 -18
- package/dist/taxResidencies.js.map +1 -1
- package/dist/tradeSheets.d.ts +2 -3
- package/dist/tradeSheets.d.ts.map +1 -1
- package/dist/tradeSheets.js +4 -14
- package/dist/tradeSheets.js.map +1 -1
- package/dist/trades.d.ts +2 -3
- package/dist/trades.d.ts.map +1 -1
- package/dist/trades.js +4 -14
- package/dist/trades.js.map +1 -1
- package/dist/users.d.ts +4 -5
- package/dist/users.d.ts.map +1 -1
- package/dist/users.js +8 -18
- package/dist/users.js.map +1 -1
- package/dist/withdrawalLiquidations.d.ts +6 -7
- package/dist/withdrawalLiquidations.d.ts.map +1 -1
- package/dist/withdrawalLiquidations.js +12 -22
- package/dist/withdrawalLiquidations.js.map +1 -1
- package/dist/withdrawalRequests.d.ts +5 -6
- package/dist/withdrawalRequests.d.ts.map +1 -1
- package/dist/withdrawalRequests.js +10 -20
- package/dist/withdrawalRequests.js.map +1 -1
- package/package.json +1 -1
package/dist/accounts.d.ts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { AxiosInstance } from 'axios';
|
|
2
2
|
import type { Account, CreateAccount, UpdateAccount, PaginatedResponse } from '@cranberry-money/shared-types';
|
|
3
|
-
export declare const
|
|
4
|
-
export declare const
|
|
5
|
-
export declare const
|
|
6
|
-
export declare const
|
|
7
|
-
export declare const getAccountByUuid: (uuid: string) => Promise<import("axios").AxiosResponse<Account, any>>;
|
|
3
|
+
export declare const getAccounts: (apiClient: AxiosInstance) => Promise<import("axios").AxiosResponse<PaginatedResponse<Account>, any>>;
|
|
4
|
+
export declare const createAccount: (apiClient: AxiosInstance, data: CreateAccount) => Promise<import("axios").AxiosResponse<Account, any>>;
|
|
5
|
+
export declare const updateAccount: (apiClient: AxiosInstance, uuid: string, data: UpdateAccount) => Promise<import("axios").AxiosResponse<Account, any>>;
|
|
6
|
+
export declare const getAccountByUuid: (apiClient: AxiosInstance, uuid: string) => Promise<import("axios").AxiosResponse<Account, any>>;
|
|
8
7
|
//# sourceMappingURL=accounts.d.ts.map
|
package/dist/accounts.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"accounts.d.ts","sourceRoot":"","sources":["../src/accounts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAEtC,OAAO,KAAK,EAAE,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;
|
|
1
|
+
{"version":3,"file":"accounts.d.ts","sourceRoot":"","sources":["../src/accounts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAEtC,OAAO,KAAK,EAAE,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAE9G,eAAO,MAAM,WAAW,GAAI,WAAW,aAAa,4EAEnD,CAAC;AAEF,eAAO,MAAM,aAAa,GAAI,WAAW,aAAa,EAAE,MAAM,aAAa,yDAE1E,CAAC;AAEF,eAAO,MAAM,aAAa,GAAI,WAAW,aAAa,EAAE,MAAM,MAAM,EAAE,MAAM,aAAa,yDAExF,CAAC;AAEF,eAAO,MAAM,gBAAgB,GAAI,WAAW,aAAa,EAAE,MAAM,MAAM,yDAEtE,CAAC"}
|
package/dist/accounts.js
CHANGED
|
@@ -1,24 +1,14 @@
|
|
|
1
1
|
import { ACCOUNT_ENDPOINTS } from '@cranberry-money/shared-constants';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
configuredApiClient = apiClient;
|
|
2
|
+
export const getAccounts = (apiClient) => {
|
|
3
|
+
return apiClient.get(ACCOUNT_ENDPOINTS.BASE);
|
|
5
4
|
};
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
throw new Error('Accounts service not configured. Call configureAccounts(apiClient) before using account functions.');
|
|
9
|
-
}
|
|
10
|
-
return configuredApiClient;
|
|
5
|
+
export const createAccount = (apiClient, data) => {
|
|
6
|
+
return apiClient.post(ACCOUNT_ENDPOINTS.BASE, data);
|
|
11
7
|
};
|
|
12
|
-
export const
|
|
13
|
-
return
|
|
8
|
+
export const updateAccount = (apiClient, uuid, data) => {
|
|
9
|
+
return apiClient.patch(`${ACCOUNT_ENDPOINTS.BASE}${uuid}/`, data);
|
|
14
10
|
};
|
|
15
|
-
export const
|
|
16
|
-
return
|
|
17
|
-
};
|
|
18
|
-
export const updateAccount = (uuid, data) => {
|
|
19
|
-
return getConfiguredClient().patch(`${ACCOUNT_ENDPOINTS.BASE}${uuid}/`, data);
|
|
20
|
-
};
|
|
21
|
-
export const getAccountByUuid = (uuid) => {
|
|
22
|
-
return getConfiguredClient().get(`${ACCOUNT_ENDPOINTS.BASE}${uuid}/`);
|
|
11
|
+
export const getAccountByUuid = (apiClient, uuid) => {
|
|
12
|
+
return apiClient.get(`${ACCOUNT_ENDPOINTS.BASE}${uuid}/`);
|
|
23
13
|
};
|
|
24
14
|
//# sourceMappingURL=accounts.js.map
|
package/dist/accounts.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"accounts.js","sourceRoot":"","sources":["../src/accounts.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AAGtE,
|
|
1
|
+
{"version":3,"file":"accounts.js","sourceRoot":"","sources":["../src/accounts.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AAGtE,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,SAAwB,EAAE,EAAE;IACtD,OAAO,SAAS,CAAC,GAAG,CAA6B,iBAAiB,CAAC,IAAI,CAAC,CAAC;AAC3E,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,SAAwB,EAAE,IAAmB,EAAE,EAAE;IAC7E,OAAO,SAAS,CAAC,IAAI,CAAU,iBAAiB,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;AAC/D,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,SAAwB,EAAE,IAAY,EAAE,IAAmB,EAAE,EAAE;IAC3F,OAAO,SAAS,CAAC,KAAK,CAAU,GAAG,iBAAiB,CAAC,IAAI,GAAG,IAAI,GAAG,EAAE,IAAI,CAAC,CAAC;AAC7E,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,SAAwB,EAAE,IAAY,EAAE,EAAE;IACzE,OAAO,SAAS,CAAC,GAAG,CAAU,GAAG,iBAAiB,CAAC,IAAI,GAAG,IAAI,GAAG,CAAC,CAAC;AACrE,CAAC,CAAC"}
|
package/dist/auth.d.ts
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { AxiosInstance } from 'axios';
|
|
2
2
|
import type { SigninPayload, SignupPayload, EmailVerificationPayload, TokenRefreshData as TokenRefreshResponse, TokenRefreshPayload } from '@cranberry-money/shared-types';
|
|
3
|
-
export declare const
|
|
4
|
-
export declare const
|
|
5
|
-
export declare const
|
|
6
|
-
export declare const
|
|
7
|
-
export declare const
|
|
8
|
-
export declare const
|
|
9
|
-
export declare const refreshToken: (data: TokenRefreshPayload) => Promise<import("axios").AxiosResponse<TokenRefreshResponse, any>>;
|
|
3
|
+
export declare const signin: (apiClient: AxiosInstance, data: SigninPayload) => Promise<import("axios").AxiosResponse<any, any>>;
|
|
4
|
+
export declare const signout: (apiClient: AxiosInstance) => Promise<import("axios").AxiosResponse<any, any>>;
|
|
5
|
+
export declare const signup: (apiClient: AxiosInstance, data: SignupPayload) => Promise<import("axios").AxiosResponse<any, any>>;
|
|
6
|
+
export declare const verifyEmail: (apiClient: AxiosInstance, data: EmailVerificationPayload) => Promise<import("axios").AxiosResponse<any, any>>;
|
|
7
|
+
export declare const resendVerificationCode: (apiClient: AxiosInstance) => Promise<import("axios").AxiosResponse<any, any>>;
|
|
8
|
+
export declare const refreshToken: (apiClient: AxiosInstance, data: TokenRefreshPayload) => Promise<import("axios").AxiosResponse<TokenRefreshResponse, any>>;
|
|
10
9
|
//# sourceMappingURL=auth.d.ts.map
|
package/dist/auth.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../src/auth.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAEtC,OAAO,KAAK,EACV,aAAa,EACb,aAAa,EACb,wBAAwB,EACxB,gBAAgB,IAAI,oBAAoB,EACxC,mBAAmB,EACpB,MAAM,+BAA+B,CAAC;
|
|
1
|
+
{"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../src/auth.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAEtC,OAAO,KAAK,EACV,aAAa,EACb,aAAa,EACb,wBAAwB,EACxB,gBAAgB,IAAI,oBAAoB,EACxC,mBAAmB,EACpB,MAAM,+BAA+B,CAAC;AAEvC,eAAO,MAAM,MAAM,GAAI,WAAW,aAAa,EAAE,MAAM,aAAa,qDAEnE,CAAC;AAEF,eAAO,MAAM,OAAO,GAAI,WAAW,aAAa,qDAE/C,CAAC;AAEF,eAAO,MAAM,MAAM,GAAI,WAAW,aAAa,EAAE,MAAM,aAAa,qDAEnE,CAAC;AAEF,eAAO,MAAM,WAAW,GAAI,WAAW,aAAa,EAAE,MAAM,wBAAwB,qDAEnF,CAAC;AAEF,eAAO,MAAM,sBAAsB,GAAI,WAAW,aAAa,qDAE9D,CAAC;AAEF,eAAO,MAAM,YAAY,GAAI,WAAW,aAAa,EAAE,MAAM,mBAAmB,sEAE/E,CAAC"}
|
package/dist/auth.js
CHANGED
|
@@ -1,30 +1,20 @@
|
|
|
1
1
|
import { AUTH_ENDPOINTS } from '@cranberry-money/shared-constants';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
configuredApiClient = apiClient;
|
|
2
|
+
export const signin = (apiClient, data) => {
|
|
3
|
+
return apiClient.post(AUTH_ENDPOINTS.SIGNIN, data);
|
|
5
4
|
};
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
throw new Error('Auth service not configured. Call configureAuth(apiClient) before using auth functions.');
|
|
9
|
-
}
|
|
10
|
-
return configuredApiClient;
|
|
5
|
+
export const signout = (apiClient) => {
|
|
6
|
+
return apiClient.post(AUTH_ENDPOINTS.SIGNOUT);
|
|
11
7
|
};
|
|
12
|
-
export const
|
|
13
|
-
return
|
|
8
|
+
export const signup = (apiClient, data) => {
|
|
9
|
+
return apiClient.post(AUTH_ENDPOINTS.SIGNUP, data);
|
|
14
10
|
};
|
|
15
|
-
export const
|
|
16
|
-
return
|
|
11
|
+
export const verifyEmail = (apiClient, data) => {
|
|
12
|
+
return apiClient.post(AUTH_ENDPOINTS.EMAIL_VERIFICATION, data);
|
|
17
13
|
};
|
|
18
|
-
export const
|
|
19
|
-
return
|
|
14
|
+
export const resendVerificationCode = (apiClient) => {
|
|
15
|
+
return apiClient.post(AUTH_ENDPOINTS.RESEND_VERIFICATION);
|
|
20
16
|
};
|
|
21
|
-
export const
|
|
22
|
-
return
|
|
23
|
-
};
|
|
24
|
-
export const resendVerificationCode = () => {
|
|
25
|
-
return getConfiguredClient().post(AUTH_ENDPOINTS.RESEND_VERIFICATION);
|
|
26
|
-
};
|
|
27
|
-
export const refreshToken = (data) => {
|
|
28
|
-
return getConfiguredClient().post(AUTH_ENDPOINTS.TOKEN_REFRESH, data);
|
|
17
|
+
export const refreshToken = (apiClient, data) => {
|
|
18
|
+
return apiClient.post(AUTH_ENDPOINTS.TOKEN_REFRESH, data);
|
|
29
19
|
};
|
|
30
20
|
//# sourceMappingURL=auth.js.map
|
package/dist/auth.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth.js","sourceRoot":"","sources":["../src/auth.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AASnE,
|
|
1
|
+
{"version":3,"file":"auth.js","sourceRoot":"","sources":["../src/auth.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AASnE,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,SAAwB,EAAE,IAAmB,EAAE,EAAE;IACtE,OAAO,SAAS,CAAC,IAAI,CAAC,cAAc,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;AACrD,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,OAAO,GAAG,CAAC,SAAwB,EAAE,EAAE;IAClD,OAAO,SAAS,CAAC,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC;AAChD,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,SAAwB,EAAE,IAAmB,EAAE,EAAE;IACtE,OAAO,SAAS,CAAC,IAAI,CAAC,cAAc,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;AACrD,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,SAAwB,EAAE,IAA8B,EAAE,EAAE;IACtF,OAAO,SAAS,CAAC,IAAI,CAAC,cAAc,CAAC,kBAAkB,EAAE,IAAI,CAAC,CAAC;AACjE,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,SAAwB,EAAE,EAAE;IACjE,OAAO,SAAS,CAAC,IAAI,CAAC,cAAc,CAAC,mBAAmB,CAAC,CAAC;AAC5D,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,SAAwB,EAAE,IAAyB,EAAE,EAAE;IAClF,OAAO,SAAS,CAAC,IAAI,CAAuB,cAAc,CAAC,aAAa,EAAE,IAAI,CAAC,CAAC;AAClF,CAAC,CAAC"}
|
package/dist/banks.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { AxiosInstance } from 'axios';
|
|
2
2
|
import type { BlueberryBankAccount as BankAccount, BlueberryBankAccountQueryParams as BankAccountQueryParams, PaginatedResponse } from '@cranberry-money/shared-types';
|
|
3
|
-
export declare const
|
|
4
|
-
export declare const
|
|
5
|
-
export declare const getBankAccountByUuid: (uuid: string) => Promise<import("axios").AxiosResponse<BankAccount, any>>;
|
|
3
|
+
export declare const getBankAccounts: (apiClient: AxiosInstance, params?: BankAccountQueryParams) => Promise<import("axios").AxiosResponse<PaginatedResponse<BankAccount>, any>>;
|
|
4
|
+
export declare const getBankAccountByUuid: (apiClient: AxiosInstance, uuid: string) => Promise<import("axios").AxiosResponse<BankAccount, any>>;
|
|
6
5
|
//# sourceMappingURL=banks.d.ts.map
|
package/dist/banks.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"banks.d.ts","sourceRoot":"","sources":["../src/banks.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAEtC,OAAO,KAAK,EACV,oBAAoB,IAAI,WAAW,EACnC,+BAA+B,IAAI,sBAAsB,EACzD,iBAAiB,EAClB,MAAM,+BAA+B,CAAC;
|
|
1
|
+
{"version":3,"file":"banks.d.ts","sourceRoot":"","sources":["../src/banks.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAEtC,OAAO,KAAK,EACV,oBAAoB,IAAI,WAAW,EACnC,+BAA+B,IAAI,sBAAsB,EACzD,iBAAiB,EAClB,MAAM,+BAA+B,CAAC;AAEvC,eAAO,MAAM,eAAe,GAAI,WAAW,aAAa,EAAE,SAAS,sBAAsB,gFA+BxF,CAAC;AAEF,eAAO,MAAM,oBAAoB,GAAI,WAAW,aAAa,EAAE,MAAM,MAAM,6DAE1E,CAAC"}
|
package/dist/banks.js
CHANGED
|
@@ -1,15 +1,5 @@
|
|
|
1
1
|
import { BANK_ENDPOINTS } from '@cranberry-money/shared-constants';
|
|
2
|
-
|
|
3
|
-
export const configureBanks = (apiClient) => {
|
|
4
|
-
configuredApiClient = apiClient;
|
|
5
|
-
};
|
|
6
|
-
const getConfiguredClient = () => {
|
|
7
|
-
if (!configuredApiClient) {
|
|
8
|
-
throw new Error('Banks service not configured. Call configureBanks(apiClient) before using bank functions.');
|
|
9
|
-
}
|
|
10
|
-
return configuredApiClient;
|
|
11
|
-
};
|
|
12
|
-
export const getBankAccounts = (params) => {
|
|
2
|
+
export const getBankAccounts = (apiClient, params) => {
|
|
13
3
|
const queryParams = {};
|
|
14
4
|
if (params?.account) {
|
|
15
5
|
queryParams.account = params.account;
|
|
@@ -35,11 +25,11 @@ export const getBankAccounts = (params) => {
|
|
|
35
25
|
if (params?.order_by) {
|
|
36
26
|
queryParams.order_by = params.order_by;
|
|
37
27
|
}
|
|
38
|
-
return
|
|
28
|
+
return apiClient.get(BANK_ENDPOINTS.ACCOUNTS, {
|
|
39
29
|
params: queryParams,
|
|
40
30
|
});
|
|
41
31
|
};
|
|
42
|
-
export const getBankAccountByUuid = (uuid) => {
|
|
43
|
-
return
|
|
32
|
+
export const getBankAccountByUuid = (apiClient, uuid) => {
|
|
33
|
+
return apiClient.get(`${BANK_ENDPOINTS.ACCOUNTS}${uuid}/`);
|
|
44
34
|
};
|
|
45
35
|
//# sourceMappingURL=banks.js.map
|
package/dist/banks.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"banks.js","sourceRoot":"","sources":["../src/banks.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AAOnE,
|
|
1
|
+
{"version":3,"file":"banks.js","sourceRoot":"","sources":["../src/banks.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AAOnE,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,SAAwB,EAAE,MAA+B,EAAE,EAAE;IAC3F,MAAM,WAAW,GAA2B,EAAE,CAAC;IAE/C,IAAI,MAAM,EAAE,OAAO,EAAE,CAAC;QACpB,WAAW,CAAC,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC;IACvC,CAAC;IACD,IAAI,MAAM,EAAE,SAAS,EAAE,CAAC;QACtB,WAAW,CAAC,SAAS,GAAG,MAAM,CAAC,SAAS,CAAC;IAC3C,CAAC;IACD,IAAI,MAAM,EAAE,YAAY,EAAE,CAAC;QACzB,WAAW,CAAC,YAAY,GAAG,MAAM,CAAC,YAAY,CAAC;IACjD,CAAC;IACD,IAAI,MAAM,EAAE,QAAQ,EAAE,CAAC;QACrB,WAAW,CAAC,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC;IACzC,CAAC;IACD,IAAI,MAAM,EAAE,WAAW,KAAK,SAAS,EAAE,CAAC;QACtC,WAAW,CAAC,WAAW,GAAG,MAAM,CAAC,WAAW,CAAC,QAAQ,EAAE,CAAC;IAC1D,CAAC;IACD,IAAI,MAAM,EAAE,UAAU,KAAK,SAAS,EAAE,CAAC;QACrC,WAAW,CAAC,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC,QAAQ,EAAE,CAAC;IACxD,CAAC;IACD,IAAI,MAAM,EAAE,SAAS,KAAK,SAAS,EAAE,CAAC;QACpC,WAAW,CAAC,SAAS,GAAG,MAAM,CAAC,SAAS,CAAC,QAAQ,EAAE,CAAC;IACtD,CAAC;IACD,IAAI,MAAM,EAAE,QAAQ,EAAE,CAAC;QACrB,WAAW,CAAC,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC;IACzC,CAAC;IAED,OAAO,SAAS,CAAC,GAAG,CAAiC,cAAc,CAAC,QAAQ,EAAE;QAC5E,MAAM,EAAE,WAAW;KACpB,CAAC,CAAC;AACL,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,SAAwB,EAAE,IAAY,EAAE,EAAE;IAC7E,OAAO,SAAS,CAAC,GAAG,CAAc,GAAG,cAAc,CAAC,QAAQ,GAAG,IAAI,GAAG,CAAC,CAAC;AAC1E,CAAC,CAAC"}
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { AxiosInstance } from 'axios';
|
|
2
2
|
import type { PaginatedResponse, BlueberryCashAccountTransaction as CashAccountTransaction, BlueberryCashAccountTransactionQueryParams as CashAccountTransactionQueryParams } from '@cranberry-money/shared-types';
|
|
3
3
|
import { formatTransactionAmount, getTransactionTypeLabel } from '@cranberry-money/shared-utils';
|
|
4
|
-
export declare const configureCashAccountTransactions: (apiClient: AxiosInstance) => void;
|
|
5
4
|
export type PaginatedCashAccountTransactions = PaginatedResponse<CashAccountTransaction>;
|
|
6
|
-
export declare const getCashAccountTransactions: (params?: CashAccountTransactionQueryParams) => Promise<import("axios").AxiosResponse<PaginatedCashAccountTransactions, any>>;
|
|
7
|
-
export declare const getCashAccountTransactionByUuid: (uuid: string) => Promise<import("axios").AxiosResponse<CashAccountTransaction, any>>;
|
|
8
|
-
export declare const getCashAccountTransactionsByAccount: (cashAccountUuid: string, params?: Omit<CashAccountTransactionQueryParams, "cash_account">) => Promise<import("axios").AxiosResponse<PaginatedCashAccountTransactions, any>>;
|
|
9
|
-
export declare const getTransactionsByDateRange: (startDate: string, endDate: string, params?: Omit<CashAccountTransactionQueryParams, "start_date" | "end_date">) => Promise<import("axios").AxiosResponse<PaginatedCashAccountTransactions, any>>;
|
|
10
|
-
export declare const getRecentTransactions: (days?: number, params?: Omit<CashAccountTransactionQueryParams, "start_date" | "end_date">) => Promise<import("axios").AxiosResponse<PaginatedCashAccountTransactions, any>>;
|
|
5
|
+
export declare const getCashAccountTransactions: (apiClient: AxiosInstance, params?: CashAccountTransactionQueryParams) => Promise<import("axios").AxiosResponse<PaginatedCashAccountTransactions, any>>;
|
|
6
|
+
export declare const getCashAccountTransactionByUuid: (apiClient: AxiosInstance, uuid: string) => Promise<import("axios").AxiosResponse<CashAccountTransaction, any>>;
|
|
7
|
+
export declare const getCashAccountTransactionsByAccount: (apiClient: AxiosInstance, cashAccountUuid: string, params?: Omit<CashAccountTransactionQueryParams, "cash_account">) => Promise<import("axios").AxiosResponse<PaginatedCashAccountTransactions, any>>;
|
|
8
|
+
export declare const getTransactionsByDateRange: (apiClient: AxiosInstance, startDate: string, endDate: string, params?: Omit<CashAccountTransactionQueryParams, "start_date" | "end_date">) => Promise<import("axios").AxiosResponse<PaginatedCashAccountTransactions, any>>;
|
|
9
|
+
export declare const getRecentTransactions: (apiClient: AxiosInstance, days?: number, params?: Omit<CashAccountTransactionQueryParams, "start_date" | "end_date">) => Promise<import("axios").AxiosResponse<PaginatedCashAccountTransactions, any>>;
|
|
11
10
|
export { formatTransactionAmount, getTransactionTypeLabel };
|
|
12
11
|
//# sourceMappingURL=cashAccountTransactions.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cashAccountTransactions.d.ts","sourceRoot":"","sources":["../src/cashAccountTransactions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AACtC,OAAO,KAAK,EACV,iBAAiB,EACjB,+BAA+B,IAAI,sBAAsB,EACzD,0CAA0C,IAAI,iCAAiC,EAChF,MAAM,+BAA+B,CAAC;AAOvC,OAAO,EAAE,uBAAuB,EAAE,uBAAuB,EAAE,MAAM,+BAA+B,CAAC;
|
|
1
|
+
{"version":3,"file":"cashAccountTransactions.d.ts","sourceRoot":"","sources":["../src/cashAccountTransactions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AACtC,OAAO,KAAK,EACV,iBAAiB,EACjB,+BAA+B,IAAI,sBAAsB,EACzD,0CAA0C,IAAI,iCAAiC,EAChF,MAAM,+BAA+B,CAAC;AAOvC,OAAO,EAAE,uBAAuB,EAAE,uBAAuB,EAAE,MAAM,+BAA+B,CAAC;AAGjG,MAAM,MAAM,gCAAgC,GAAG,iBAAiB,CAAC,sBAAsB,CAAC,CAAC;AAEzF,eAAO,MAAM,0BAA0B,GAAI,WAAW,aAAa,EAAE,SAAS,iCAAiC,kFA4B9G,CAAC;AAEF,eAAO,MAAM,+BAA+B,GAAI,WAAW,aAAa,EAAE,MAAM,MAAM,wEAErF,CAAC;AAEF,eAAO,MAAM,mCAAmC,GAC9C,WAAW,aAAa,EACxB,iBAAiB,MAAM,EACvB,SAAS,IAAI,CAAC,iCAAiC,EAAE,cAAc,CAAC,kFAMjE,CAAC;AAEF,eAAO,MAAM,0BAA0B,GACrC,WAAW,aAAa,EACxB,WAAW,MAAM,EACjB,SAAS,MAAM,EACf,SAAS,IAAI,CAAC,iCAAiC,EAAE,YAAY,GAAG,UAAU,CAAC,kFAO5E,CAAC;AAEF,eAAO,MAAM,qBAAqB,GAChC,WAAW,aAAa,EACxB,OAAM,MAAyC,EAC/C,SAAS,IAAI,CAAC,iCAAiC,EAAE,YAAY,GAAG,UAAU,CAAC,kFAQ5E,CAAC;AAEF,OAAO,EAAE,uBAAuB,EAAE,uBAAuB,EAAE,CAAC"}
|
|
@@ -1,16 +1,6 @@
|
|
|
1
1
|
import { CASH_ACCOUNT_TRANSACTION_ENDPOINTS, DEFAULT_RECENT_TRANSACTIONS_DAYS, MILLISECONDS_PER_DAY, DATE_ISO_TIME_SEPARATOR, } from '@cranberry-money/shared-constants';
|
|
2
2
|
import { formatTransactionAmount, getTransactionTypeLabel } from '@cranberry-money/shared-utils';
|
|
3
|
-
|
|
4
|
-
export const configureCashAccountTransactions = (apiClient) => {
|
|
5
|
-
configuredApiClient = apiClient;
|
|
6
|
-
};
|
|
7
|
-
const getConfiguredClient = () => {
|
|
8
|
-
if (!configuredApiClient) {
|
|
9
|
-
throw new Error('Cash account transactions service not configured. Call configureCashAccountTransactions(apiClient) before using cash account transaction functions.');
|
|
10
|
-
}
|
|
11
|
-
return configuredApiClient;
|
|
12
|
-
};
|
|
13
|
-
export const getCashAccountTransactions = (params) => {
|
|
3
|
+
export const getCashAccountTransactions = (apiClient, params) => {
|
|
14
4
|
const queryParams = {};
|
|
15
5
|
if (params?.cash_account) {
|
|
16
6
|
queryParams.cash_account = params.cash_account;
|
|
@@ -33,32 +23,32 @@ export const getCashAccountTransactions = (params) => {
|
|
|
33
23
|
if (params?.order_by) {
|
|
34
24
|
queryParams.order_by = params.order_by;
|
|
35
25
|
}
|
|
36
|
-
return
|
|
26
|
+
return apiClient.get(CASH_ACCOUNT_TRANSACTION_ENDPOINTS.BASE, {
|
|
37
27
|
params: queryParams,
|
|
38
28
|
});
|
|
39
29
|
};
|
|
40
|
-
export const getCashAccountTransactionByUuid = (uuid) => {
|
|
41
|
-
return
|
|
30
|
+
export const getCashAccountTransactionByUuid = (apiClient, uuid) => {
|
|
31
|
+
return apiClient.get(`${CASH_ACCOUNT_TRANSACTION_ENDPOINTS.BASE}${uuid}/`);
|
|
42
32
|
};
|
|
43
|
-
export const getCashAccountTransactionsByAccount = (cashAccountUuid, params) => {
|
|
44
|
-
return getCashAccountTransactions({
|
|
33
|
+
export const getCashAccountTransactionsByAccount = (apiClient, cashAccountUuid, params) => {
|
|
34
|
+
return getCashAccountTransactions(apiClient, {
|
|
45
35
|
...params,
|
|
46
36
|
cash_account: cashAccountUuid,
|
|
47
37
|
});
|
|
48
38
|
};
|
|
49
|
-
export const getTransactionsByDateRange = (startDate, endDate, params) => {
|
|
50
|
-
return getCashAccountTransactions({
|
|
39
|
+
export const getTransactionsByDateRange = (apiClient, startDate, endDate, params) => {
|
|
40
|
+
return getCashAccountTransactions(apiClient, {
|
|
51
41
|
...params,
|
|
52
42
|
start_date: startDate,
|
|
53
43
|
end_date: endDate,
|
|
54
44
|
});
|
|
55
45
|
};
|
|
56
|
-
export const getRecentTransactions = (days = DEFAULT_RECENT_TRANSACTIONS_DAYS, params) => {
|
|
46
|
+
export const getRecentTransactions = (apiClient, days = DEFAULT_RECENT_TRANSACTIONS_DAYS, params) => {
|
|
57
47
|
const endDate = new Date().toISOString().split(DATE_ISO_TIME_SEPARATOR)[0];
|
|
58
48
|
const startDate = new Date(Date.now() - days * MILLISECONDS_PER_DAY)
|
|
59
49
|
.toISOString()
|
|
60
50
|
.split(DATE_ISO_TIME_SEPARATOR)[0];
|
|
61
|
-
return getTransactionsByDateRange(startDate, endDate, params);
|
|
51
|
+
return getTransactionsByDateRange(apiClient, startDate, endDate, params);
|
|
62
52
|
};
|
|
63
53
|
export { formatTransactionAmount, getTransactionTypeLabel };
|
|
64
54
|
//# sourceMappingURL=cashAccountTransactions.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cashAccountTransactions.js","sourceRoot":"","sources":["../src/cashAccountTransactions.ts"],"names":[],"mappings":"AAMA,OAAO,EACL,kCAAkC,EAClC,gCAAgC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CAAC;IAE/C,OAAO,0BAA0B,CAAC,SAAS,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;AAC3E,CAAC,CAAC;AAEF,OAAO,EAAE,uBAAuB,EAAE,uBAAuB,EAAE,CAAC"}
|
package/dist/cashAccounts.d.ts
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { AxiosInstance } from 'axios';
|
|
2
2
|
import { formatBalance } from '@cranberry-money/shared-utils';
|
|
3
3
|
import type { CashAccount, CashAccountQueryParams, PaginatedResponse } from '@cranberry-money/shared-types';
|
|
4
|
-
export declare const
|
|
5
|
-
export declare const
|
|
6
|
-
export declare const
|
|
7
|
-
export declare const getAccountCashAccounts: (accountUuid: string) => Promise<import("axios").AxiosResponse<PaginatedResponse<CashAccount>, any>>;
|
|
4
|
+
export declare const getCashAccounts: (apiClient: AxiosInstance, params?: CashAccountQueryParams) => Promise<import("axios").AxiosResponse<PaginatedResponse<CashAccount>, any>>;
|
|
5
|
+
export declare const getCashAccountByUuid: (apiClient: AxiosInstance, uuid: string) => Promise<import("axios").AxiosResponse<CashAccount, any>>;
|
|
6
|
+
export declare const getAccountCashAccounts: (apiClient: AxiosInstance, accountUuid: string) => Promise<import("axios").AxiosResponse<PaginatedResponse<CashAccount>, any>>;
|
|
8
7
|
export { formatBalance };
|
|
9
8
|
//# sourceMappingURL=cashAccounts.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cashAccounts.d.ts","sourceRoot":"","sources":["../src/cashAccounts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAEtC,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAC9D,OAAO,KAAK,EAAE,WAAW,EAAE,sBAAsB,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;
|
|
1
|
+
{"version":3,"file":"cashAccounts.d.ts","sourceRoot":"","sources":["../src/cashAccounts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAEtC,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAC9D,OAAO,KAAK,EAAE,WAAW,EAAE,sBAAsB,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAE5G,eAAO,MAAM,eAAe,GAAI,WAAW,aAAa,EAAE,SAAS,sBAAsB,gFAsBxF,CAAC;AAEF,eAAO,MAAM,oBAAoB,GAAI,WAAW,aAAa,EAAE,MAAM,MAAM,6DAE1E,CAAC;AAEF,eAAO,MAAM,sBAAsB,GAAI,WAAW,aAAa,EAAE,aAAa,MAAM,gFAEnF,CAAC;AAEF,OAAO,EAAE,aAAa,EAAE,CAAC"}
|
package/dist/cashAccounts.js
CHANGED
|
@@ -1,16 +1,6 @@
|
|
|
1
1
|
import { CASH_ACCOUNT_ENDPOINTS } from '@cranberry-money/shared-constants';
|
|
2
2
|
import { formatBalance } from '@cranberry-money/shared-utils';
|
|
3
|
-
|
|
4
|
-
export const configureCashAccounts = (apiClient) => {
|
|
5
|
-
configuredApiClient = apiClient;
|
|
6
|
-
};
|
|
7
|
-
const getConfiguredClient = () => {
|
|
8
|
-
if (!configuredApiClient) {
|
|
9
|
-
throw new Error('Cash accounts service not configured. Call configureCashAccounts(apiClient) before using cash account functions.');
|
|
10
|
-
}
|
|
11
|
-
return configuredApiClient;
|
|
12
|
-
};
|
|
13
|
-
export const getCashAccounts = (params) => {
|
|
3
|
+
export const getCashAccounts = (apiClient, params) => {
|
|
14
4
|
const queryParams = {};
|
|
15
5
|
if (params?.account) {
|
|
16
6
|
queryParams.account = params.account;
|
|
@@ -27,15 +17,15 @@ export const getCashAccounts = (params) => {
|
|
|
27
17
|
if (params?.order_by) {
|
|
28
18
|
queryParams.order_by = params.order_by;
|
|
29
19
|
}
|
|
30
|
-
return
|
|
20
|
+
return apiClient.get(CASH_ACCOUNT_ENDPOINTS.BASE, {
|
|
31
21
|
params: queryParams,
|
|
32
22
|
});
|
|
33
23
|
};
|
|
34
|
-
export const getCashAccountByUuid = (uuid) => {
|
|
35
|
-
return
|
|
24
|
+
export const getCashAccountByUuid = (apiClient, uuid) => {
|
|
25
|
+
return apiClient.get(`${CASH_ACCOUNT_ENDPOINTS.BASE}${uuid}/`);
|
|
36
26
|
};
|
|
37
|
-
export const getAccountCashAccounts = (accountUuid) => {
|
|
38
|
-
return getCashAccounts({ account: accountUuid });
|
|
27
|
+
export const getAccountCashAccounts = (apiClient, accountUuid) => {
|
|
28
|
+
return getCashAccounts(apiClient, { account: accountUuid });
|
|
39
29
|
};
|
|
40
30
|
export { formatBalance };
|
|
41
31
|
//# sourceMappingURL=cashAccounts.js.map
|
package/dist/cashAccounts.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cashAccounts.js","sourceRoot":"","sources":["../src/cashAccounts.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,sBAAsB,EAAE,MAAM,mCAAmC,CAAC;AAC3E,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAG9D,
|
|
1
|
+
{"version":3,"file":"cashAccounts.js","sourceRoot":"","sources":["../src/cashAccounts.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,sBAAsB,EAAE,MAAM,mCAAmC,CAAC;AAC3E,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAG9D,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,SAAwB,EAAE,MAA+B,EAAE,EAAE;IAC3F,MAAM,WAAW,GAA2B,EAAE,CAAC;IAE/C,IAAI,MAAM,EAAE,OAAO,EAAE,CAAC;QACpB,WAAW,CAAC,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC;IACvC,CAAC;IACD,IAAI,MAAM,EAAE,QAAQ,EAAE,CAAC;QACrB,WAAW,CAAC,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC;IACzC,CAAC;IACD,IAAI,MAAM,EAAE,WAAW,KAAK,SAAS,EAAE,CAAC;QACtC,WAAW,CAAC,WAAW,GAAG,MAAM,CAAC,WAAW,CAAC,QAAQ,EAAE,CAAC;IAC1D,CAAC;IACD,IAAI,MAAM,EAAE,WAAW,KAAK,SAAS,EAAE,CAAC;QACtC,WAAW,CAAC,WAAW,GAAG,MAAM,CAAC,WAAW,CAAC,QAAQ,EAAE,CAAC;IAC1D,CAAC;IACD,IAAI,MAAM,EAAE,QAAQ,EAAE,CAAC;QACrB,WAAW,CAAC,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC;IACzC,CAAC;IAED,OAAO,SAAS,CAAC,GAAG,CAAiC,sBAAsB,CAAC,IAAI,EAAE;QAChF,MAAM,EAAE,WAAW;KACpB,CAAC,CAAC;AACL,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,SAAwB,EAAE,IAAY,EAAE,EAAE;IAC7E,OAAO,SAAS,CAAC,GAAG,CAAc,GAAG,sBAAsB,CAAC,IAAI,GAAG,IAAI,GAAG,CAAC,CAAC;AAC9E,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,SAAwB,EAAE,WAAmB,EAAE,EAAE;IACtF,OAAO,eAAe,CAAC,SAAS,EAAE,EAAE,OAAO,EAAE,WAAW,EAAE,CAAC,CAAC;AAC9D,CAAC,CAAC;AAEF,OAAO,EAAE,aAAa,EAAE,CAAC"}
|
package/dist/countries.d.ts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { AxiosInstance } from 'axios';
|
|
2
2
|
import type { Country, CountryQueryParams, PaginatedResponse } from '@cranberry-money/shared-types';
|
|
3
|
-
export declare const
|
|
4
|
-
export declare const
|
|
5
|
-
export declare const
|
|
6
|
-
export declare const
|
|
7
|
-
export declare const searchCountries: (searchTerm: string, params?: Omit<CountryQueryParams, "name">) => Promise<import("axios").AxiosResponse<PaginatedResponse<Country>, any>>;
|
|
3
|
+
export declare const getCountries: (apiClient: AxiosInstance, params?: CountryQueryParams) => Promise<import("axios").AxiosResponse<PaginatedResponse<Country>, any>>;
|
|
4
|
+
export declare const getCountryByUuid: (apiClient: AxiosInstance, uuid: string) => Promise<import("axios").AxiosResponse<Country, any>>;
|
|
5
|
+
export declare const getAvailableCountries: (apiClient: AxiosInstance, params?: Omit<CountryQueryParams, "is_available">) => Promise<import("axios").AxiosResponse<PaginatedResponse<Country>, any>>;
|
|
6
|
+
export declare const searchCountries: (apiClient: AxiosInstance, searchTerm: string, params?: Omit<CountryQueryParams, "name">) => Promise<import("axios").AxiosResponse<PaginatedResponse<Country>, any>>;
|
|
8
7
|
//# sourceMappingURL=countries.d.ts.map
|
package/dist/countries.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"countries.d.ts","sourceRoot":"","sources":["../src/countries.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AACtC,OAAO,KAAK,EAAE,OAAO,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;
|
|
1
|
+
{"version":3,"file":"countries.d.ts","sourceRoot":"","sources":["../src/countries.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AACtC,OAAO,KAAK,EAAE,OAAO,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAIpG,eAAO,MAAM,YAAY,GAAI,WAAW,aAAa,EAAE,SAAS,kBAAkB,4EAEjF,CAAC;AAEF,eAAO,MAAM,gBAAgB,GAAI,WAAW,aAAa,EAAE,MAAM,MAAM,yDAEtE,CAAC;AAEF,eAAO,MAAM,qBAAqB,GAAI,WAAW,aAAa,EAAE,SAAS,IAAI,CAAC,kBAAkB,EAAE,cAAc,CAAC,4EAKhH,CAAC;AAEF,eAAO,MAAM,eAAe,GAAI,WAAW,aAAa,EAAE,YAAY,MAAM,EAAE,SAAS,IAAI,CAAC,kBAAkB,EAAE,MAAM,CAAC,4EAKtH,CAAC"}
|
package/dist/countries.js
CHANGED
|
@@ -1,28 +1,18 @@
|
|
|
1
1
|
import { COUNTRY_ENDPOINTS } from '@cranberry-money/shared-constants';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
configuredApiClient = apiClient;
|
|
2
|
+
export const getCountries = (apiClient, params) => {
|
|
3
|
+
return apiClient.get(COUNTRY_ENDPOINTS.BASE, { params });
|
|
5
4
|
};
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
throw new Error('Countries service not configured. Call configureCountries(apiClient) before using country functions.');
|
|
9
|
-
}
|
|
10
|
-
return configuredApiClient;
|
|
5
|
+
export const getCountryByUuid = (apiClient, uuid) => {
|
|
6
|
+
return apiClient.get(`${COUNTRY_ENDPOINTS.BASE}${uuid}/`);
|
|
11
7
|
};
|
|
12
|
-
export const
|
|
13
|
-
return
|
|
14
|
-
};
|
|
15
|
-
export const getCountryByUuid = (uuid) => {
|
|
16
|
-
return getConfiguredClient().get(`${COUNTRY_ENDPOINTS.BASE}${uuid}/`);
|
|
17
|
-
};
|
|
18
|
-
export const getAvailableCountries = (params) => {
|
|
19
|
-
return getCountries({
|
|
8
|
+
export const getAvailableCountries = (apiClient, params) => {
|
|
9
|
+
return getCountries(apiClient, {
|
|
20
10
|
...params,
|
|
21
11
|
is_available: true,
|
|
22
12
|
});
|
|
23
13
|
};
|
|
24
|
-
export const searchCountries = (searchTerm, params) => {
|
|
25
|
-
return getCountries({
|
|
14
|
+
export const searchCountries = (apiClient, searchTerm, params) => {
|
|
15
|
+
return getCountries(apiClient, {
|
|
26
16
|
...params,
|
|
27
17
|
name: searchTerm,
|
|
28
18
|
});
|
package/dist/countries.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"countries.js","sourceRoot":"","sources":["../src/countries.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;
|
|
1
|
+
{"version":3,"file":"countries.js","sourceRoot":"","sources":["../src/countries.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AAGtE,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,SAAwB,EAAE,MAA2B,EAAE,EAAE;IACpF,OAAO,SAAS,CAAC,GAAG,CAA6B,iBAAiB,CAAC,IAAI,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC;AACvF,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,SAAwB,EAAE,IAAY,EAAE,EAAE;IACzE,OAAO,SAAS,CAAC,GAAG,CAAU,GAAG,iBAAiB,CAAC,IAAI,GAAG,IAAI,GAAG,CAAC,CAAC;AACrE,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,SAAwB,EAAE,MAAiD,EAAE,EAAE;IACnH,OAAO,YAAY,CAAC,SAAS,EAAE;QAC7B,GAAG,MAAM;QACT,YAAY,EAAE,IAAI;KACnB,CAAC,CAAC;AACL,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,SAAwB,EAAE,UAAkB,EAAE,MAAyC,EAAE,EAAE;IACzH,OAAO,YAAY,CAAC,SAAS,EAAE;QAC7B,GAAG,MAAM;QACT,IAAI,EAAE,UAAU;KACjB,CAAC,CAAC;AACL,CAAC,CAAC"}
|
package/dist/documents.d.ts
CHANGED
|
@@ -1,18 +1,17 @@
|
|
|
1
1
|
import { AxiosInstance } from 'axios';
|
|
2
2
|
import type { GenerateDocumentResponse, SignDocumentResponse } from '@cranberry-money/shared-types';
|
|
3
3
|
import { DOCUMENT_TYPE_MDA, DOCUMENT_TYPE_SOA, DOCUMENT_TYPE_AGREEMENT } from '@cranberry-money/shared-constants';
|
|
4
|
-
export declare const configureDocuments: (apiClient: AxiosInstance) => void;
|
|
5
4
|
export type DocumentType = typeof DOCUMENT_TYPE_MDA | typeof DOCUMENT_TYPE_SOA | typeof DOCUMENT_TYPE_AGREEMENT;
|
|
6
|
-
export declare const generateMDADocument: () => Promise<import("axios").AxiosResponse<GenerateDocumentResponse, any>>;
|
|
7
|
-
export declare const generateSOADocument: () => Promise<import("axios").AxiosResponse<GenerateDocumentResponse, any>>;
|
|
8
|
-
export declare const generateAgreementDocument: () => Promise<import("axios").AxiosResponse<GenerateDocumentResponse, any>>;
|
|
9
|
-
export declare const generateDocument: (documentType: DocumentType) => Promise<import("axios").AxiosResponse<GenerateDocumentResponse, any>>;
|
|
10
|
-
export declare const downloadMDADocument: (documentUuid: string) => Promise<import("axios").AxiosResponse<any, any>>;
|
|
11
|
-
export declare const downloadSOADocument: (documentUuid: string) => Promise<import("axios").AxiosResponse<any, any>>;
|
|
12
|
-
export declare const downloadAgreementDocument: (documentUuid: string) => Promise<import("axios").AxiosResponse<any, any>>;
|
|
13
|
-
export declare const downloadDocument: (documentType: DocumentType, documentUuid: string) => Promise<import("axios").AxiosResponse<any, any>>;
|
|
14
|
-
export declare const signMDADocument: (documentUuid: string) => Promise<import("axios").AxiosResponse<SignDocumentResponse, any>>;
|
|
15
|
-
export declare const signSOADocument: (documentUuid: string) => Promise<import("axios").AxiosResponse<SignDocumentResponse, any>>;
|
|
16
|
-
export declare const signAgreementDocument: (documentUuid: string) => Promise<import("axios").AxiosResponse<SignDocumentResponse, any>>;
|
|
17
|
-
export declare const signDocument: (documentType: DocumentType, documentUuid: string) => Promise<import("axios").AxiosResponse<SignDocumentResponse, any>>;
|
|
5
|
+
export declare const generateMDADocument: (apiClient: AxiosInstance) => Promise<import("axios").AxiosResponse<GenerateDocumentResponse, any>>;
|
|
6
|
+
export declare const generateSOADocument: (apiClient: AxiosInstance) => Promise<import("axios").AxiosResponse<GenerateDocumentResponse, any>>;
|
|
7
|
+
export declare const generateAgreementDocument: (apiClient: AxiosInstance) => Promise<import("axios").AxiosResponse<GenerateDocumentResponse, any>>;
|
|
8
|
+
export declare const generateDocument: (apiClient: AxiosInstance, documentType: DocumentType) => Promise<import("axios").AxiosResponse<GenerateDocumentResponse, any>>;
|
|
9
|
+
export declare const downloadMDADocument: (apiClient: AxiosInstance, documentUuid: string) => Promise<import("axios").AxiosResponse<any, any>>;
|
|
10
|
+
export declare const downloadSOADocument: (apiClient: AxiosInstance, documentUuid: string) => Promise<import("axios").AxiosResponse<any, any>>;
|
|
11
|
+
export declare const downloadAgreementDocument: (apiClient: AxiosInstance, documentUuid: string) => Promise<import("axios").AxiosResponse<any, any>>;
|
|
12
|
+
export declare const downloadDocument: (apiClient: AxiosInstance, documentType: DocumentType, documentUuid: string) => Promise<import("axios").AxiosResponse<any, any>>;
|
|
13
|
+
export declare const signMDADocument: (apiClient: AxiosInstance, documentUuid: string) => Promise<import("axios").AxiosResponse<SignDocumentResponse, any>>;
|
|
14
|
+
export declare const signSOADocument: (apiClient: AxiosInstance, documentUuid: string) => Promise<import("axios").AxiosResponse<SignDocumentResponse, any>>;
|
|
15
|
+
export declare const signAgreementDocument: (apiClient: AxiosInstance, documentUuid: string) => Promise<import("axios").AxiosResponse<SignDocumentResponse, any>>;
|
|
16
|
+
export declare const signDocument: (apiClient: AxiosInstance, documentType: DocumentType, documentUuid: string) => Promise<import("axios").AxiosResponse<SignDocumentResponse, any>>;
|
|
18
17
|
//# sourceMappingURL=documents.d.ts.map
|
package/dist/documents.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"documents.d.ts","sourceRoot":"","sources":["../src/documents.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AACtC,OAAO,KAAK,EAAE,wBAAwB,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AACpG,OAAO,EAEL,iBAAiB,EACjB,iBAAiB,EACjB,uBAAuB,EAExB,MAAM,mCAAmC,CAAC;
|
|
1
|
+
{"version":3,"file":"documents.d.ts","sourceRoot":"","sources":["../src/documents.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE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