@cranberry-money/shared-services 4.0.0 → 4.1.0
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/package.json +4 -3
- package/dist/api/functional-client.d.ts +0 -66
- package/dist/api/functional-client.d.ts.map +0 -1
- package/dist/api/functional-client.js +0 -165
- package/dist/auth/functional/auth-operations.d.ts +0 -116
- package/dist/auth/functional/auth-operations.d.ts.map +0 -1
- package/dist/auth/functional/auth-operations.js +0 -246
- package/dist/auth/functional/auth-state.d.ts +0 -38
- package/dist/auth/functional/auth-state.d.ts.map +0 -1
- package/dist/auth/functional/auth-state.js +0 -87
- package/dist/auth/functional/token-storage.d.ts +0 -44
- package/dist/auth/functional/token-storage.d.ts.map +0 -1
- package/dist/auth/functional/token-storage.js +0 -178
- package/dist/auth/react/AuthProvider.d.ts +0 -92
- package/dist/auth/react/AuthProvider.d.ts.map +0 -1
- package/dist/auth/react/AuthProvider.js +0 -207
- package/dist/integration/blueberry-integration.d.ts +0 -21
- package/dist/integration/blueberry-integration.d.ts.map +0 -1
- package/dist/integration/blueberry-integration.js +0 -109
- package/dist/integration/index.d.ts +0 -8
- package/dist/integration/index.d.ts.map +0 -1
- package/dist/integration/index.js +0 -18
- package/dist/services/accounts.d.ts +0 -220
- package/dist/services/accounts.d.ts.map +0 -1
- package/dist/services/accounts.js +0 -175
- package/dist/services/banks.d.ts +0 -123
- package/dist/services/banks.d.ts.map +0 -1
- package/dist/services/banks.js +0 -151
- package/dist/services/cash-accounts.d.ts +0 -112
- package/dist/services/cash-accounts.d.ts.map +0 -1
- package/dist/services/cash-accounts.js +0 -222
- package/dist/services/documents.d.ts +0 -143
- package/dist/services/documents.d.ts.map +0 -1
- package/dist/services/documents.js +0 -253
- package/dist/services/factories/account-factory.d.ts +0 -16
- package/dist/services/factories/account-factory.d.ts.map +0 -1
- package/dist/services/factories/account-factory.js +0 -79
- package/dist/services/factories/auth-factory.d.ts +0 -23
- package/dist/services/factories/auth-factory.d.ts.map +0 -1
- package/dist/services/factories/auth-factory.js +0 -75
- package/dist/services/factories/bank-factory.d.ts +0 -16
- package/dist/services/factories/bank-factory.d.ts.map +0 -1
- package/dist/services/factories/bank-factory.js +0 -72
- package/dist/services/factories/cash-account-factory.d.ts +0 -16
- package/dist/services/factories/cash-account-factory.d.ts.map +0 -1
- package/dist/services/factories/cash-account-factory.js +0 -74
- package/dist/services/factories/document-factory.d.ts +0 -16
- package/dist/services/factories/document-factory.d.ts.map +0 -1
- package/dist/services/factories/document-factory.js +0 -85
- package/dist/services/factories/index.d.ts +0 -21
- package/dist/services/factories/index.d.ts.map +0 -1
- package/dist/services/factories/index.js +0 -40
- package/dist/services/factories/instrument-factory.d.ts +0 -16
- package/dist/services/factories/instrument-factory.d.ts.map +0 -1
- package/dist/services/factories/instrument-factory.js +0 -68
- package/dist/services/factories/master-factory.d.ts +0 -74
- package/dist/services/factories/master-factory.d.ts.map +0 -1
- package/dist/services/factories/master-factory.js +0 -183
- package/dist/services/factories/portfolio-factory.d.ts +0 -16
- package/dist/services/factories/portfolio-factory.d.ts.map +0 -1
- package/dist/services/factories/portfolio-factory.js +0 -74
- package/dist/services/factories/portfolio-template-factory.d.ts +0 -16
- package/dist/services/factories/portfolio-template-factory.d.ts.map +0 -1
- package/dist/services/factories/portfolio-template-factory.js +0 -76
- package/dist/services/factories/reference-data-factory.d.ts +0 -16
- package/dist/services/factories/reference-data-factory.d.ts.map +0 -1
- package/dist/services/factories/reference-data-factory.js +0 -86
- package/dist/services/factories/tax-residency-factory.d.ts +0 -16
- package/dist/services/factories/tax-residency-factory.d.ts.map +0 -1
- package/dist/services/factories/tax-residency-factory.js +0 -73
- package/dist/services/factories/trade-factory.d.ts +0 -16
- package/dist/services/factories/trade-factory.d.ts.map +0 -1
- package/dist/services/factories/trade-factory.js +0 -79
- package/dist/services/factories/types.d.ts +0 -250
- package/dist/services/factories/types.d.ts.map +0 -1
- package/dist/services/factories/types.js +0 -32
- package/dist/services/factories/withdrawal-factory.d.ts +0 -16
- package/dist/services/factories/withdrawal-factory.d.ts.map +0 -1
- package/dist/services/factories/withdrawal-factory.js +0 -78
- package/dist/services/instruments.d.ts +0 -138
- package/dist/services/instruments.d.ts.map +0 -1
- package/dist/services/instruments.js +0 -178
- package/dist/services/portfolio-templates.d.ts +0 -142
- package/dist/services/portfolio-templates.d.ts.map +0 -1
- package/dist/services/portfolio-templates.js +0 -201
- package/dist/services/portfolios.d.ts +0 -157
- package/dist/services/portfolios.d.ts.map +0 -1
- package/dist/services/portfolios.js +0 -144
- package/dist/services/reference-data.d.ts +0 -185
- package/dist/services/reference-data.d.ts.map +0 -1
- package/dist/services/reference-data.js +0 -245
- package/dist/services/tax-residencies.d.ts +0 -83
- package/dist/services/tax-residencies.d.ts.map +0 -1
- package/dist/services/tax-residencies.js +0 -179
- package/dist/services/trades.d.ts +0 -190
- package/dist/services/trades.d.ts.map +0 -1
- package/dist/services/trades.js +0 -207
- package/dist/services/withdrawals.d.ts +0 -236
- package/dist/services/withdrawals.d.ts.map +0 -1
- package/dist/services/withdrawals.js +0 -345
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"banks.d.ts","sourceRoot":"","sources":["../../src/services/banks.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAG1D,MAAM,MAAM,YAAY,GAAG,KAAK,GAAG,KAAK,CAAC;AACzC,MAAM,MAAM,WAAW,GAAG,SAAS,GAAG,UAAU,GAAG,UAAU,CAAC;AAE9D,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAC/B,Q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M,KAClB,OAAO,CAAC,WAAW,GAAG,IAAI,CAY5B,CAAC;AAEF,eAAO,MAAM,uBAAuB,GAClC,eAAe;IAAE,SAAS,EAAE,SAAS,CAAA;CAAE,EACvC,cAAc,MAAM,KACnB,OAAO,CAAC,qBAAqB,CAO/B,CAAC;AAGF,eAAO,MAAM,aAAa;;;;CAIhB,CAAC;AAEX,eAAO,MAAM,mBAAmB;;;;CAItB,CAAC;AAEX,eAAO,MAAM,oBAAoB;;;CAGvB,CAAC;AAEX,eAAO,MAAM,eAAe;;;CAGlB,CAAC"}
|
package/dist/services/banks.js
DELETED
|
@@ -1,151 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* Bank Services - Pure Functional Implementation
|
|
4
|
-
*
|
|
5
|
-
* Bank account management operations as pure functions with explicit dependencies.
|
|
6
|
-
* No global state, no side effects - everything is explicit and testable.
|
|
7
|
-
*/
|
|
8
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
exports.CURRENCY_LABELS = exports.SUPPORTED_CURRENCIES = exports.ACCOUNT_TYPE_LABELS = exports.ACCOUNT_TYPES = exports.getVerifiedBankAccounts = exports.getPrimaryBankAccount = exports.getActiveBankAccounts = exports.setPrimaryBankAccount = exports.verifyBankAccount = exports.deleteBankAccount = exports.updateBankAccount = exports.createBankAccount = exports.getBankAccount = exports.getBankAccounts = exports.getUserBankAccounts = void 0;
|
|
10
|
-
// Bank account operations with explicit dependencies
|
|
11
|
-
// Get bank accounts for a specific user
|
|
12
|
-
const getUserBankAccounts = async ({ apiClient }, userProfileUuid) => {
|
|
13
|
-
if (!userProfileUuid?.trim()) {
|
|
14
|
-
throw new Error('User profile UUID is required');
|
|
15
|
-
}
|
|
16
|
-
return (0, exports.getBankAccounts)({ apiClient }, { userProfile: userProfileUuid });
|
|
17
|
-
};
|
|
18
|
-
exports.getUserBankAccounts = getUserBankAccounts;
|
|
19
|
-
const getBankAccounts = async ({ apiClient }, filters) => {
|
|
20
|
-
const params = {};
|
|
21
|
-
if (filters?.account)
|
|
22
|
-
params.account = filters.account;
|
|
23
|
-
if (filters?.userProfile)
|
|
24
|
-
params.user_profile = filters.userProfile;
|
|
25
|
-
if (filters?.bankName)
|
|
26
|
-
params.bank_name = filters.bankName;
|
|
27
|
-
if (filters?.accountType)
|
|
28
|
-
params.account_type = filters.accountType;
|
|
29
|
-
if (filters?.currency)
|
|
30
|
-
params.currency = filters.currency;
|
|
31
|
-
if (filters?.isVerified !== undefined)
|
|
32
|
-
params.is_verified = String(filters.isVerified);
|
|
33
|
-
if (filters?.isPrimary !== undefined)
|
|
34
|
-
params.is_primary = String(filters.isPrimary);
|
|
35
|
-
if (filters?.isActive !== undefined)
|
|
36
|
-
params.is_active = String(filters.isActive);
|
|
37
|
-
if (filters?.ordering)
|
|
38
|
-
params.ordering = filters.ordering;
|
|
39
|
-
return apiClient.get('/api/bank-accounts/', { params });
|
|
40
|
-
};
|
|
41
|
-
exports.getBankAccounts = getBankAccounts;
|
|
42
|
-
const getBankAccount = async ({ apiClient }, uuid) => {
|
|
43
|
-
if (!uuid?.trim()) {
|
|
44
|
-
throw new Error('Bank account UUID is required');
|
|
45
|
-
}
|
|
46
|
-
return apiClient.get(`/api/bank-accounts/${uuid}/`);
|
|
47
|
-
};
|
|
48
|
-
exports.getBankAccount = getBankAccount;
|
|
49
|
-
const createBankAccount = async ({ apiClient }, data) => {
|
|
50
|
-
// Validation
|
|
51
|
-
if (!data.account?.trim()) {
|
|
52
|
-
throw new Error('Account UUID is required');
|
|
53
|
-
}
|
|
54
|
-
if (!data.bankName?.trim()) {
|
|
55
|
-
throw new Error('Bank name is required');
|
|
56
|
-
}
|
|
57
|
-
if (!data.accountNumber?.trim()) {
|
|
58
|
-
throw new Error('Account number is required');
|
|
59
|
-
}
|
|
60
|
-
if (!data.bsb?.trim()) {
|
|
61
|
-
throw new Error('BSB is required');
|
|
62
|
-
}
|
|
63
|
-
if (!data.accountName?.trim()) {
|
|
64
|
-
throw new Error('Account name is required');
|
|
65
|
-
}
|
|
66
|
-
if (!data.accountType) {
|
|
67
|
-
throw new Error('Account type is required');
|
|
68
|
-
}
|
|
69
|
-
if (!data.currency) {
|
|
70
|
-
throw new Error('Currency is required');
|
|
71
|
-
}
|
|
72
|
-
return apiClient.post('/api/bank-accounts/', data);
|
|
73
|
-
};
|
|
74
|
-
exports.createBankAccount = createBankAccount;
|
|
75
|
-
const updateBankAccount = async ({ apiClient }, uuid, data) => {
|
|
76
|
-
if (!uuid?.trim()) {
|
|
77
|
-
throw new Error('Bank account UUID is required');
|
|
78
|
-
}
|
|
79
|
-
return apiClient.patch(`/api/bank-accounts/${uuid}/`, data);
|
|
80
|
-
};
|
|
81
|
-
exports.updateBankAccount = updateBankAccount;
|
|
82
|
-
const deleteBankAccount = async ({ apiClient }, uuid) => {
|
|
83
|
-
if (!uuid?.trim()) {
|
|
84
|
-
throw new Error('Bank account UUID is required');
|
|
85
|
-
}
|
|
86
|
-
await apiClient.delete(`/api/bank-accounts/${uuid}/`);
|
|
87
|
-
};
|
|
88
|
-
exports.deleteBankAccount = deleteBankAccount;
|
|
89
|
-
const verifyBankAccount = async ({ apiClient }, uuid) => {
|
|
90
|
-
if (!uuid?.trim()) {
|
|
91
|
-
throw new Error('Bank account UUID is required');
|
|
92
|
-
}
|
|
93
|
-
return apiClient.post(`/api/bank-accounts/${uuid}/verify/`, {});
|
|
94
|
-
};
|
|
95
|
-
exports.verifyBankAccount = verifyBankAccount;
|
|
96
|
-
const setPrimaryBankAccount = async ({ apiClient }, uuid) => {
|
|
97
|
-
if (!uuid?.trim()) {
|
|
98
|
-
throw new Error('Bank account UUID is required');
|
|
99
|
-
}
|
|
100
|
-
return apiClient.post(`/api/bank-accounts/${uuid}/set-primary/`, {});
|
|
101
|
-
};
|
|
102
|
-
exports.setPrimaryBankAccount = setPrimaryBankAccount;
|
|
103
|
-
// Helper functions
|
|
104
|
-
const getActiveBankAccounts = async ({ apiClient }, accountUuid) => {
|
|
105
|
-
return (0, exports.getBankAccounts)({ apiClient }, {
|
|
106
|
-
account: accountUuid,
|
|
107
|
-
isActive: true,
|
|
108
|
-
ordering: '-is_primary,bank_name',
|
|
109
|
-
});
|
|
110
|
-
};
|
|
111
|
-
exports.getActiveBankAccounts = getActiveBankAccounts;
|
|
112
|
-
const getPrimaryBankAccount = async ({ apiClient }, accountUuid) => {
|
|
113
|
-
if (!accountUuid?.trim()) {
|
|
114
|
-
throw new Error('Account UUID is required');
|
|
115
|
-
}
|
|
116
|
-
const response = await (0, exports.getBankAccounts)({ apiClient }, {
|
|
117
|
-
account: accountUuid,
|
|
118
|
-
isPrimary: true,
|
|
119
|
-
isActive: true,
|
|
120
|
-
});
|
|
121
|
-
return response.results[0] || null;
|
|
122
|
-
};
|
|
123
|
-
exports.getPrimaryBankAccount = getPrimaryBankAccount;
|
|
124
|
-
const getVerifiedBankAccounts = async ({ apiClient }, accountUuid) => {
|
|
125
|
-
return (0, exports.getBankAccounts)({ apiClient }, {
|
|
126
|
-
account: accountUuid,
|
|
127
|
-
isVerified: true,
|
|
128
|
-
isActive: true,
|
|
129
|
-
ordering: '-is_primary,bank_name',
|
|
130
|
-
});
|
|
131
|
-
};
|
|
132
|
-
exports.getVerifiedBankAccounts = getVerifiedBankAccounts;
|
|
133
|
-
// Bank account constants
|
|
134
|
-
exports.ACCOUNT_TYPES = {
|
|
135
|
-
SAVINGS: 'SAVINGS',
|
|
136
|
-
CHECKING: 'CHECKING',
|
|
137
|
-
BUSINESS: 'BUSINESS',
|
|
138
|
-
};
|
|
139
|
-
exports.ACCOUNT_TYPE_LABELS = {
|
|
140
|
-
SAVINGS: 'Savings Account',
|
|
141
|
-
CHECKING: 'Checking Account',
|
|
142
|
-
BUSINESS: 'Business Account',
|
|
143
|
-
};
|
|
144
|
-
exports.SUPPORTED_CURRENCIES = {
|
|
145
|
-
AUD: 'AUD',
|
|
146
|
-
USD: 'USD',
|
|
147
|
-
};
|
|
148
|
-
exports.CURRENCY_LABELS = {
|
|
149
|
-
AUD: 'Australian Dollar',
|
|
150
|
-
USD: 'United States Dollar',
|
|
151
|
-
};
|
|
@@ -1,112 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Cash Accounts Services - Pure Functional Implementation
|
|
3
|
-
*
|
|
4
|
-
* Cash account and transaction operations as pure functions with explicit dependencies.
|
|
5
|
-
* No global state, no side effects - everything is explicit and testable.
|
|
6
|
-
*/
|
|
7
|
-
import type { ApiClient } from '../api/functional-client';
|
|
8
|
-
export type CurrencyCode = 'AUD' | 'USD' | 'EUR' | 'GBP' | 'CAD' | 'NZD' | 'SGD' | 'HKD' | 'JPY';
|
|
9
|
-
export type TransactionType = 'DEPOSIT' | 'WITHDRAWAL' | 'FEE' | 'DIVIDEND' | 'INTEREST' | 'TAX' | 'TRADE_SETTLEMENT' | 'TRANSFER_IN' | 'TRANSFER_OUT' | 'OTHER';
|
|
10
|
-
export type TransactionStatus = 'PENDING' | 'COMPLETED' | 'FAILED' | 'CANCELLED';
|
|
11
|
-
export interface CashAccount {
|
|
12
|
-
readonly uuid: string;
|
|
13
|
-
readonly account: string;
|
|
14
|
-
readonly accountNumber: string;
|
|
15
|
-
readonly bsb?: string;
|
|
16
|
-
readonly payid?: string;
|
|
17
|
-
readonly currency: CurrencyCode;
|
|
18
|
-
readonly balance: string;
|
|
19
|
-
}
|
|
20
|
-
export interface CashAccountQueryParams {
|
|
21
|
-
readonly account?: string;
|
|
22
|
-
readonly currency?: CurrencyCode;
|
|
23
|
-
readonly minBalance?: number;
|
|
24
|
-
readonly maxBalance?: number;
|
|
25
|
-
readonly ordering?: string;
|
|
26
|
-
}
|
|
27
|
-
export interface PaginatedCashAccounts {
|
|
28
|
-
readonly results: CashAccount[];
|
|
29
|
-
readonly count: number;
|
|
30
|
-
readonly next: string | null;
|
|
31
|
-
readonly previous: string | null;
|
|
32
|
-
}
|
|
33
|
-
export interface CashTransaction {
|
|
34
|
-
readonly uuid: string;
|
|
35
|
-
readonly cashAccount: string;
|
|
36
|
-
readonly type: 'DEPOSIT' | 'WITHDRAWAL' | 'TRANSFER' | 'FEE' | 'DIVIDEND' | 'INTEREST';
|
|
37
|
-
readonly amount: string;
|
|
38
|
-
readonly description?: string;
|
|
39
|
-
readonly reference?: string;
|
|
40
|
-
readonly status: 'PENDING' | 'COMPLETED' | 'CANCELLED' | 'FAILED';
|
|
41
|
-
readonly transactionDate: string;
|
|
42
|
-
readonly processedDate?: string;
|
|
43
|
-
readonly createdAt: string;
|
|
44
|
-
readonly updatedAt: string;
|
|
45
|
-
}
|
|
46
|
-
export interface CreateCashTransactionPayload {
|
|
47
|
-
readonly cashAccount: string;
|
|
48
|
-
readonly type: 'DEPOSIT' | 'WITHDRAWAL' | 'TRANSFER' | 'FEE' | 'DIVIDEND' | 'INTEREST';
|
|
49
|
-
readonly amount: string | number;
|
|
50
|
-
readonly description?: string;
|
|
51
|
-
readonly reference?: string;
|
|
52
|
-
}
|
|
53
|
-
export interface CashTransactionFilters {
|
|
54
|
-
readonly cashAccount?: string;
|
|
55
|
-
readonly type?: 'DEPOSIT' | 'WITHDRAWAL' | 'TRANSFER' | 'FEE' | 'DIVIDEND' | 'INTEREST';
|
|
56
|
-
readonly status?: 'PENDING' | 'COMPLETED' | 'CANCELLED' | 'FAILED';
|
|
57
|
-
readonly fromDate?: string;
|
|
58
|
-
readonly toDate?: string;
|
|
59
|
-
readonly minAmount?: number;
|
|
60
|
-
readonly maxAmount?: number;
|
|
61
|
-
readonly ordering?: string;
|
|
62
|
-
}
|
|
63
|
-
export interface PaginatedCashTransactions {
|
|
64
|
-
readonly results: CashTransaction[];
|
|
65
|
-
readonly count: number;
|
|
66
|
-
readonly next: string | null;
|
|
67
|
-
readonly previous: string | null;
|
|
68
|
-
}
|
|
69
|
-
export declare const getCashAccounts: ({ apiClient }: {
|
|
70
|
-
apiClient: ApiClient;
|
|
71
|
-
}, params?: CashAccountQueryParams) => Promise<PaginatedCashAccounts>;
|
|
72
|
-
export declare const getCashAccount: ({ apiClient }: {
|
|
73
|
-
apiClient: ApiClient;
|
|
74
|
-
}, uuid: string) => Promise<CashAccount>;
|
|
75
|
-
export declare const getAccountCashAccounts: ({ apiClient }: {
|
|
76
|
-
apiClient: ApiClient;
|
|
77
|
-
}, accountUuid: string) => Promise<PaginatedCashAccounts>;
|
|
78
|
-
export declare const getCashTransactions: ({ apiClient }: {
|
|
79
|
-
apiClient: ApiClient;
|
|
80
|
-
}, filters?: CashTransactionFilters) => Promise<PaginatedCashTransactions>;
|
|
81
|
-
export declare const getCashTransaction: ({ apiClient }: {
|
|
82
|
-
apiClient: ApiClient;
|
|
83
|
-
}, uuid: string) => Promise<CashTransaction>;
|
|
84
|
-
export declare const createCashTransaction: ({ apiClient }: {
|
|
85
|
-
apiClient: ApiClient;
|
|
86
|
-
}, data: CreateCashTransactionPayload) => Promise<CashTransaction>;
|
|
87
|
-
export declare const getCashAccountTransactions: ({ apiClient }: {
|
|
88
|
-
apiClient: ApiClient;
|
|
89
|
-
}, cashAccountUuid: string, filters?: Omit<CashTransactionFilters, "cashAccount">) => Promise<PaginatedCashTransactions>;
|
|
90
|
-
export declare const getCashAccountBalance: ({ apiClient }: {
|
|
91
|
-
apiClient: ApiClient;
|
|
92
|
-
}, cashAccountUuid: string) => Promise<string>;
|
|
93
|
-
export declare const getCashAccountsByCurrency: ({ apiClient }: {
|
|
94
|
-
apiClient: ApiClient;
|
|
95
|
-
}, currency: CurrencyCode, accountUuid?: string) => Promise<PaginatedCashAccounts>;
|
|
96
|
-
export declare const getPendingTransactions: ({ apiClient }: {
|
|
97
|
-
apiClient: ApiClient;
|
|
98
|
-
}, cashAccountUuid?: string) => Promise<PaginatedCashTransactions>;
|
|
99
|
-
export declare const getRecentTransactions: ({ apiClient }: {
|
|
100
|
-
apiClient: ApiClient;
|
|
101
|
-
}, cashAccountUuid: string, days?: number) => Promise<PaginatedCashTransactions>;
|
|
102
|
-
export declare const getTransactionsByDateRange: ({ apiClient }: {
|
|
103
|
-
apiClient: ApiClient;
|
|
104
|
-
}, cashAccountUuid: string, fromDate: string, toDate: string) => Promise<PaginatedCashTransactions>;
|
|
105
|
-
export declare const formatTransactionAmount: (amount: string | number, currency?: string) => string;
|
|
106
|
-
export declare const getTransactionTypeLabel: (type: TransactionType) => string;
|
|
107
|
-
export declare const getTransactionStatusLabel: (status: TransactionStatus) => string;
|
|
108
|
-
export declare const getTransactionStatusColor: (status: TransactionStatus) => string;
|
|
109
|
-
export declare const isDebitTransaction: (type: TransactionType) => boolean;
|
|
110
|
-
export declare const isCreditTransaction: (type: TransactionType) => boolean;
|
|
111
|
-
export declare const calculateCashAccountTotal: (cashAccounts: CashAccount[]) => Record<string, number>;
|
|
112
|
-
//# sourceMappingURL=cash-accounts.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cash-accounts.d.ts","sourceRoot":"","sources":["../../src/services/cash-accounts.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAG1D,MAAM,MAAM,YAAY,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,CAAC;AACjG,MAAM,MAAM,eAAe,GAAG,SAAS,GAAG,YAAY,GAAG,KAAK,GAAG,UAAU,GAAG,UAAU,GAAG,KAAK,GAAG,kBAAkB,GAAG,aAAa,GAAG,cAAc,GAAG,OAAO,CAAC;AACjK,MAAM,MAAM,iBAAiB,GAAG,SAAS,GAAG,WAAW,GAAG,QAAQ,GAAG,WAAW,CAAC;AAEjF,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAC/B,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC;IACt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;IAAE,SAAS,EAAE,SAAS,CAAA;CAAE,EACvC,kBAAkB,MAAM,KACvB,OAAO,CAAC,yBAAyB,CAMnC,CAAC;AAEF,eAAO,MAAM,qBAAqB,GAChC,eAAe;IAAE,SAAS,EAAE,SAAS,CAAA;CAAE,EACvC,iBAAiB,MAAM,EACvB,OAAM,MAAW,KAChB,OAAO,CAAC,yBAAyB,CAanC,CAAC;AAEF,eAAO,MAAM,0BAA0B,GACrC,eAAe;IAAE,SAAS,EAAE,SAAS,CAAA;CAAE,EACvC,iBAAiB,MAAM,EACvB,UAAU,MAAM,EAChB,QAAQ,MAAM,KACb,OAAO,CAAC,yBAAyB,CAiBnC,CAAC;AAGF,eAAO,MAAM,uBAAuB,GAAI,QAAQ,MAAM,GAAG,MAAM,EAAE,WAAW,MAAM,KAAG,MAQpF,CAAC;AAEF,eAAO,MAAM,uBAAuB,GAAI,MAAM,eAAe,KAAG,MAe/D,CAAC;AAEF,eAAO,MAAM,yBAAyB,GAAI,QAAQ,iBAAiB,KAAG,MASrE,CAAC;AAEF,eAAO,MAAM,yBAAyB,GAAI,QAAQ,iBAAiB,KAAG,MASrE,CAAC;AAEF,eAAO,MAAM,kBAAkB,GAAI,MAAM,eAAe,KAAG,OAE1D,CAAC;AAEF,eAAO,MAAM,mBAAmB,GAAI,MAAM,eAAe,KAAG,OAE3D,CAAC;AAEF,eAAO,MAAM,yBAAyB,GAAI,cAAc,WAAW,EAAE,KAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAe5F,CAAC"}
|
|
@@ -1,222 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* Cash Accounts Services - Pure Functional Implementation
|
|
4
|
-
*
|
|
5
|
-
* Cash account and transaction operations as pure functions with explicit dependencies.
|
|
6
|
-
* No global state, no side effects - everything is explicit and testable.
|
|
7
|
-
*/
|
|
8
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
exports.calculateCashAccountTotal = exports.isCreditTransaction = exports.isDebitTransaction = exports.getTransactionStatusColor = exports.getTransactionStatusLabel = exports.getTransactionTypeLabel = exports.formatTransactionAmount = exports.getTransactionsByDateRange = exports.getRecentTransactions = exports.getPendingTransactions = exports.getCashAccountsByCurrency = exports.getCashAccountBalance = exports.getCashAccountTransactions = exports.createCashTransaction = exports.getCashTransaction = exports.getCashTransactions = exports.getAccountCashAccounts = exports.getCashAccount = exports.getCashAccounts = void 0;
|
|
10
|
-
// Cash account operations with explicit dependencies
|
|
11
|
-
const getCashAccounts = async ({ apiClient }, params) => {
|
|
12
|
-
const queryParams = {};
|
|
13
|
-
if (params?.account) {
|
|
14
|
-
queryParams.account = params.account;
|
|
15
|
-
}
|
|
16
|
-
if (params?.currency) {
|
|
17
|
-
queryParams.currency = params.currency;
|
|
18
|
-
}
|
|
19
|
-
if (params?.minBalance !== undefined) {
|
|
20
|
-
queryParams.min_balance = String(params.minBalance);
|
|
21
|
-
}
|
|
22
|
-
if (params?.maxBalance !== undefined) {
|
|
23
|
-
queryParams.max_balance = String(params.maxBalance);
|
|
24
|
-
}
|
|
25
|
-
if (params?.ordering) {
|
|
26
|
-
queryParams.ordering = params.ordering;
|
|
27
|
-
}
|
|
28
|
-
return apiClient.get('/api/cash-accounts/', {
|
|
29
|
-
params: queryParams,
|
|
30
|
-
});
|
|
31
|
-
};
|
|
32
|
-
exports.getCashAccounts = getCashAccounts;
|
|
33
|
-
const getCashAccount = async ({ apiClient }, uuid) => {
|
|
34
|
-
if (!uuid?.trim()) {
|
|
35
|
-
throw new Error('Cash account UUID is required');
|
|
36
|
-
}
|
|
37
|
-
return apiClient.get(`/api/cash-accounts/${uuid}/`);
|
|
38
|
-
};
|
|
39
|
-
exports.getCashAccount = getCashAccount;
|
|
40
|
-
const getAccountCashAccounts = async ({ apiClient }, accountUuid) => {
|
|
41
|
-
if (!accountUuid?.trim()) {
|
|
42
|
-
throw new Error('Account UUID is required');
|
|
43
|
-
}
|
|
44
|
-
return (0, exports.getCashAccounts)({ apiClient }, { account: accountUuid });
|
|
45
|
-
};
|
|
46
|
-
exports.getAccountCashAccounts = getAccountCashAccounts;
|
|
47
|
-
// Cash transaction operations
|
|
48
|
-
const getCashTransactions = async ({ apiClient }, filters) => {
|
|
49
|
-
const params = {};
|
|
50
|
-
if (filters?.cashAccount)
|
|
51
|
-
params.cash_account = filters.cashAccount;
|
|
52
|
-
if (filters?.type)
|
|
53
|
-
params.type = filters.type;
|
|
54
|
-
if (filters?.status)
|
|
55
|
-
params.status = filters.status;
|
|
56
|
-
if (filters?.fromDate)
|
|
57
|
-
params.from_date = filters.fromDate;
|
|
58
|
-
if (filters?.toDate)
|
|
59
|
-
params.to_date = filters.toDate;
|
|
60
|
-
if (filters?.minAmount !== undefined)
|
|
61
|
-
params.min_amount = String(filters.minAmount);
|
|
62
|
-
if (filters?.maxAmount !== undefined)
|
|
63
|
-
params.max_amount = String(filters.maxAmount);
|
|
64
|
-
if (filters?.ordering)
|
|
65
|
-
params.ordering = filters.ordering;
|
|
66
|
-
return apiClient.get('/api/cash-transactions/', { params });
|
|
67
|
-
};
|
|
68
|
-
exports.getCashTransactions = getCashTransactions;
|
|
69
|
-
const getCashTransaction = async ({ apiClient }, uuid) => {
|
|
70
|
-
if (!uuid?.trim()) {
|
|
71
|
-
throw new Error('Cash transaction UUID is required');
|
|
72
|
-
}
|
|
73
|
-
return apiClient.get(`/api/cash-transactions/${uuid}/`);
|
|
74
|
-
};
|
|
75
|
-
exports.getCashTransaction = getCashTransaction;
|
|
76
|
-
const createCashTransaction = async ({ apiClient }, data) => {
|
|
77
|
-
if (!data.cashAccount?.trim()) {
|
|
78
|
-
throw new Error('Cash account UUID is required');
|
|
79
|
-
}
|
|
80
|
-
if (!data.type) {
|
|
81
|
-
throw new Error('Transaction type is required');
|
|
82
|
-
}
|
|
83
|
-
if (!data.amount) {
|
|
84
|
-
throw new Error('Transaction amount is required');
|
|
85
|
-
}
|
|
86
|
-
// Ensure amount is a string for API consistency
|
|
87
|
-
const payload = {
|
|
88
|
-
...data,
|
|
89
|
-
amount: String(data.amount),
|
|
90
|
-
};
|
|
91
|
-
return apiClient.post('/api/cash-transactions/', payload);
|
|
92
|
-
};
|
|
93
|
-
exports.createCashTransaction = createCashTransaction;
|
|
94
|
-
const getCashAccountTransactions = async ({ apiClient }, cashAccountUuid, filters) => {
|
|
95
|
-
if (!cashAccountUuid?.trim()) {
|
|
96
|
-
throw new Error('Cash account UUID is required');
|
|
97
|
-
}
|
|
98
|
-
return (0, exports.getCashTransactions)({ apiClient }, {
|
|
99
|
-
...filters,
|
|
100
|
-
cashAccount: cashAccountUuid,
|
|
101
|
-
});
|
|
102
|
-
};
|
|
103
|
-
exports.getCashAccountTransactions = getCashAccountTransactions;
|
|
104
|
-
// Helper functions for common operations
|
|
105
|
-
const getCashAccountBalance = async ({ apiClient }, cashAccountUuid) => {
|
|
106
|
-
const cashAccount = await (0, exports.getCashAccount)({ apiClient }, cashAccountUuid);
|
|
107
|
-
return cashAccount.balance;
|
|
108
|
-
};
|
|
109
|
-
exports.getCashAccountBalance = getCashAccountBalance;
|
|
110
|
-
const getCashAccountsByCurrency = async ({ apiClient }, currency, accountUuid) => {
|
|
111
|
-
return (0, exports.getCashAccounts)({ apiClient }, {
|
|
112
|
-
currency,
|
|
113
|
-
account: accountUuid,
|
|
114
|
-
});
|
|
115
|
-
};
|
|
116
|
-
exports.getCashAccountsByCurrency = getCashAccountsByCurrency;
|
|
117
|
-
const getPendingTransactions = async ({ apiClient }, cashAccountUuid) => {
|
|
118
|
-
return (0, exports.getCashTransactions)({ apiClient }, {
|
|
119
|
-
cashAccount: cashAccountUuid,
|
|
120
|
-
status: 'PENDING',
|
|
121
|
-
ordering: '-created_at',
|
|
122
|
-
});
|
|
123
|
-
};
|
|
124
|
-
exports.getPendingTransactions = getPendingTransactions;
|
|
125
|
-
const getRecentTransactions = async ({ apiClient }, cashAccountUuid, days = 30) => {
|
|
126
|
-
if (!cashAccountUuid?.trim()) {
|
|
127
|
-
throw new Error('Cash account UUID is required');
|
|
128
|
-
}
|
|
129
|
-
const fromDate = new Date();
|
|
130
|
-
fromDate.setDate(fromDate.getDate() - days);
|
|
131
|
-
return (0, exports.getCashTransactions)({ apiClient }, {
|
|
132
|
-
cashAccount: cashAccountUuid,
|
|
133
|
-
fromDate: fromDate.toISOString().split('T')[0],
|
|
134
|
-
ordering: '-transaction_date',
|
|
135
|
-
});
|
|
136
|
-
};
|
|
137
|
-
exports.getRecentTransactions = getRecentTransactions;
|
|
138
|
-
const getTransactionsByDateRange = async ({ apiClient }, cashAccountUuid, fromDate, toDate) => {
|
|
139
|
-
if (!cashAccountUuid?.trim()) {
|
|
140
|
-
throw new Error('Cash account UUID is required');
|
|
141
|
-
}
|
|
142
|
-
if (!fromDate?.trim()) {
|
|
143
|
-
throw new Error('From date is required');
|
|
144
|
-
}
|
|
145
|
-
if (!toDate?.trim()) {
|
|
146
|
-
throw new Error('To date is required');
|
|
147
|
-
}
|
|
148
|
-
return (0, exports.getCashTransactions)({ apiClient }, {
|
|
149
|
-
cashAccount: cashAccountUuid,
|
|
150
|
-
fromDate,
|
|
151
|
-
toDate,
|
|
152
|
-
ordering: '-transaction_date',
|
|
153
|
-
});
|
|
154
|
-
};
|
|
155
|
-
exports.getTransactionsByDateRange = getTransactionsByDateRange;
|
|
156
|
-
// Utility functions
|
|
157
|
-
const formatTransactionAmount = (amount, currency) => {
|
|
158
|
-
const numValue = typeof amount === 'string' ? parseFloat(amount) : amount;
|
|
159
|
-
const currencyCode = currency || 'AUD';
|
|
160
|
-
return new Intl.NumberFormat('en-AU', {
|
|
161
|
-
style: 'currency',
|
|
162
|
-
currency: currencyCode,
|
|
163
|
-
}).format(numValue);
|
|
164
|
-
};
|
|
165
|
-
exports.formatTransactionAmount = formatTransactionAmount;
|
|
166
|
-
const getTransactionTypeLabel = (type) => {
|
|
167
|
-
const labels = {
|
|
168
|
-
DEPOSIT: 'Deposit',
|
|
169
|
-
WITHDRAWAL: 'Withdrawal',
|
|
170
|
-
DIVIDEND: 'Dividend',
|
|
171
|
-
INTEREST: 'Interest',
|
|
172
|
-
FEE: 'Fee',
|
|
173
|
-
TAX: 'Tax',
|
|
174
|
-
TRADE_SETTLEMENT: 'Trade Settlement',
|
|
175
|
-
TRANSFER_IN: 'Transfer In',
|
|
176
|
-
TRANSFER_OUT: 'Transfer Out',
|
|
177
|
-
OTHER: 'Other',
|
|
178
|
-
};
|
|
179
|
-
return labels[type] || type;
|
|
180
|
-
};
|
|
181
|
-
exports.getTransactionTypeLabel = getTransactionTypeLabel;
|
|
182
|
-
const getTransactionStatusLabel = (status) => {
|
|
183
|
-
const labels = {
|
|
184
|
-
PENDING: 'Pending',
|
|
185
|
-
COMPLETED: 'Completed',
|
|
186
|
-
FAILED: 'Failed',
|
|
187
|
-
CANCELLED: 'Cancelled',
|
|
188
|
-
};
|
|
189
|
-
return labels[status] || status;
|
|
190
|
-
};
|
|
191
|
-
exports.getTransactionStatusLabel = getTransactionStatusLabel;
|
|
192
|
-
const getTransactionStatusColor = (status) => {
|
|
193
|
-
const colors = {
|
|
194
|
-
PENDING: 'text-warning-600',
|
|
195
|
-
COMPLETED: 'text-success-600',
|
|
196
|
-
FAILED: 'text-error-600',
|
|
197
|
-
CANCELLED: 'text-content-muted',
|
|
198
|
-
};
|
|
199
|
-
return colors[status] || 'text-content-muted';
|
|
200
|
-
};
|
|
201
|
-
exports.getTransactionStatusColor = getTransactionStatusColor;
|
|
202
|
-
const isDebitTransaction = (type) => {
|
|
203
|
-
return ['WITHDRAWAL', 'FEE', 'TAX', 'TRANSFER_OUT'].includes(type);
|
|
204
|
-
};
|
|
205
|
-
exports.isDebitTransaction = isDebitTransaction;
|
|
206
|
-
const isCreditTransaction = (type) => {
|
|
207
|
-
return ['DEPOSIT', 'DIVIDEND', 'INTEREST', 'TRANSFER_IN'].includes(type);
|
|
208
|
-
};
|
|
209
|
-
exports.isCreditTransaction = isCreditTransaction;
|
|
210
|
-
const calculateCashAccountTotal = (cashAccounts) => {
|
|
211
|
-
const totals = {};
|
|
212
|
-
cashAccounts.forEach(account => {
|
|
213
|
-
const currency = account.currency;
|
|
214
|
-
const balance = parseFloat(account.balance);
|
|
215
|
-
if (!totals[currency]) {
|
|
216
|
-
totals[currency] = 0;
|
|
217
|
-
}
|
|
218
|
-
totals[currency] += balance;
|
|
219
|
-
});
|
|
220
|
-
return totals;
|
|
221
|
-
};
|
|
222
|
-
exports.calculateCashAccountTotal = calculateCashAccountTotal;
|
|
@@ -1,143 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Document Services - Pure Functional Implementation
|
|
3
|
-
*
|
|
4
|
-
* Document generation, signing, and management operations as pure functions.
|
|
5
|
-
* Handles MDA, SOA, and Agreement documents for compliance.
|
|
6
|
-
* No global state, no side effects - everything is explicit and testable.
|
|
7
|
-
*/
|
|
8
|
-
import type { ApiClient } from '../api/functional-client';
|
|
9
|
-
export type DocumentType = 'MDA' | 'SOA' | 'AGREEMENT';
|
|
10
|
-
export type DocumentStatus = 'DRAFT' | 'GENERATED' | 'SIGNED' | 'EXPIRED';
|
|
11
|
-
export interface Document {
|
|
12
|
-
readonly uuid: string;
|
|
13
|
-
readonly documentType: DocumentType;
|
|
14
|
-
readonly status: DocumentStatus;
|
|
15
|
-
readonly generatedAt: string;
|
|
16
|
-
readonly signedAt?: string;
|
|
17
|
-
readonly expiresAt?: string;
|
|
18
|
-
readonly documentUrl?: string;
|
|
19
|
-
readonly metadata?: Record<string, any>;
|
|
20
|
-
}
|
|
21
|
-
export interface GenerateDocumentResponse {
|
|
22
|
-
readonly uuid: string;
|
|
23
|
-
readonly documentType: DocumentType;
|
|
24
|
-
readonly status: string;
|
|
25
|
-
readonly message: string;
|
|
26
|
-
readonly generatedAt: string;
|
|
27
|
-
readonly documentUrl?: string;
|
|
28
|
-
}
|
|
29
|
-
export interface SignDocumentResponse {
|
|
30
|
-
readonly uuid: string;
|
|
31
|
-
readonly documentType: DocumentType;
|
|
32
|
-
readonly status: string;
|
|
33
|
-
readonly signedAt: string;
|
|
34
|
-
readonly signedBy: string;
|
|
35
|
-
readonly message: string;
|
|
36
|
-
}
|
|
37
|
-
export interface DocumentFilters {
|
|
38
|
-
readonly documentType?: DocumentType;
|
|
39
|
-
readonly status?: DocumentStatus;
|
|
40
|
-
readonly fromDate?: string;
|
|
41
|
-
readonly toDate?: string;
|
|
42
|
-
readonly ordering?: string;
|
|
43
|
-
}
|
|
44
|
-
export interface PaginatedDocuments {
|
|
45
|
-
readonly results: Document[];
|
|
46
|
-
readonly count: number;
|
|
47
|
-
readonly next: string | null;
|
|
48
|
-
readonly previous: string | null;
|
|
49
|
-
}
|
|
50
|
-
export declare const generateMDADocument: ({ apiClient }: {
|
|
51
|
-
apiClient: ApiClient;
|
|
52
|
-
}) => Promise<GenerateDocumentResponse>;
|
|
53
|
-
export declare const generateSOADocument: ({ apiClient }: {
|
|
54
|
-
apiClient: ApiClient;
|
|
55
|
-
}) => Promise<GenerateDocumentResponse>;
|
|
56
|
-
export declare const generateAgreementDocument: ({ apiClient }: {
|
|
57
|
-
apiClient: ApiClient;
|
|
58
|
-
}) => Promise<GenerateDocumentResponse>;
|
|
59
|
-
export declare const generateDocument: ({ apiClient }: {
|
|
60
|
-
apiClient: ApiClient;
|
|
61
|
-
}, documentType: DocumentType) => Promise<GenerateDocumentResponse>;
|
|
62
|
-
export declare const downloadMDADocument: ({ apiClient }: {
|
|
63
|
-
apiClient: ApiClient;
|
|
64
|
-
}, documentUuid: string) => Promise<Blob>;
|
|
65
|
-
export declare const downloadSOADocument: ({ apiClient }: {
|
|
66
|
-
apiClient: ApiClient;
|
|
67
|
-
}, documentUuid: string) => Promise<Blob>;
|
|
68
|
-
export declare const downloadAgreementDocument: ({ apiClient }: {
|
|
69
|
-
apiClient: ApiClient;
|
|
70
|
-
}, documentUuid: string) => Promise<Blob>;
|
|
71
|
-
export declare const downloadDocument: ({ apiClient }: {
|
|
72
|
-
apiClient: ApiClient;
|
|
73
|
-
}, documentType: DocumentType, documentUuid: string) => Promise<Blob>;
|
|
74
|
-
export declare const signMDADocument: ({ apiClient }: {
|
|
75
|
-
apiClient: ApiClient;
|
|
76
|
-
}, documentUuid: string) => Promise<SignDocumentResponse>;
|
|
77
|
-
export declare const signSOADocument: ({ apiClient }: {
|
|
78
|
-
apiClient: ApiClient;
|
|
79
|
-
}, documentUuid: string) => Promise<SignDocumentResponse>;
|
|
80
|
-
export declare const signAgreementDocument: ({ apiClient }: {
|
|
81
|
-
apiClient: ApiClient;
|
|
82
|
-
}, documentUuid: string) => Promise<SignDocumentResponse>;
|
|
83
|
-
export declare const signDocument: ({ apiClient }: {
|
|
84
|
-
apiClient: ApiClient;
|
|
85
|
-
}, documentType: DocumentType, documentUuid: string) => Promise<SignDocumentResponse>;
|
|
86
|
-
export declare const getMDADocuments: ({ apiClient }: {
|
|
87
|
-
apiClient: ApiClient;
|
|
88
|
-
}, filters?: Omit<DocumentFilters, "documentType">) => Promise<PaginatedDocuments>;
|
|
89
|
-
export declare const getMDADocument: ({ apiClient }: {
|
|
90
|
-
apiClient: ApiClient;
|
|
91
|
-
}, uuid: string) => Promise<Document>;
|
|
92
|
-
export declare const getSOADocuments: ({ apiClient }: {
|
|
93
|
-
apiClient: ApiClient;
|
|
94
|
-
}, filters?: Omit<DocumentFilters, "documentType">) => Promise<PaginatedDocuments>;
|
|
95
|
-
export declare const getSOADocument: ({ apiClient }: {
|
|
96
|
-
apiClient: ApiClient;
|
|
97
|
-
}, uuid: string) => Promise<Document>;
|
|
98
|
-
export declare const getAgreementDocuments: ({ apiClient }: {
|
|
99
|
-
apiClient: ApiClient;
|
|
100
|
-
}, filters?: Omit<DocumentFilters, "documentType">) => Promise<PaginatedDocuments>;
|
|
101
|
-
export declare const getAgreementDocument: ({ apiClient }: {
|
|
102
|
-
apiClient: ApiClient;
|
|
103
|
-
}, uuid: string) => Promise<Document>;
|
|
104
|
-
export declare const getDocuments: ({ apiClient }: {
|
|
105
|
-
apiClient: ApiClient;
|
|
106
|
-
}, filters?: DocumentFilters) => Promise<PaginatedDocuments>;
|
|
107
|
-
export declare const getDocument: ({ apiClient }: {
|
|
108
|
-
apiClient: ApiClient;
|
|
109
|
-
}, uuid: string) => Promise<Document>;
|
|
110
|
-
export declare const getSignedDocuments: ({ apiClient }: {
|
|
111
|
-
apiClient: ApiClient;
|
|
112
|
-
}, documentType?: DocumentType) => Promise<PaginatedDocuments>;
|
|
113
|
-
export declare const getPendingDocuments: ({ apiClient }: {
|
|
114
|
-
apiClient: ApiClient;
|
|
115
|
-
}, documentType?: DocumentType) => Promise<PaginatedDocuments>;
|
|
116
|
-
export declare const getExpiredDocuments: ({ apiClient }: {
|
|
117
|
-
apiClient: ApiClient;
|
|
118
|
-
}, documentType?: DocumentType) => Promise<PaginatedDocuments>;
|
|
119
|
-
export declare const DOCUMENT_TYPES: {
|
|
120
|
-
readonly MDA: "MDA";
|
|
121
|
-
readonly SOA: "SOA";
|
|
122
|
-
readonly AGREEMENT: "AGREEMENT";
|
|
123
|
-
};
|
|
124
|
-
export declare const DOCUMENT_TYPE_LABELS: {
|
|
125
|
-
readonly MDA: "Managed Discretionary Account";
|
|
126
|
-
readonly SOA: "Statement of Advice";
|
|
127
|
-
readonly AGREEMENT: "Client Agreement";
|
|
128
|
-
};
|
|
129
|
-
export declare const DOCUMENT_STATUS_LABELS: {
|
|
130
|
-
readonly DRAFT: "Draft";
|
|
131
|
-
readonly GENERATED: "Generated";
|
|
132
|
-
readonly SIGNED: "Signed";
|
|
133
|
-
readonly EXPIRED: "Expired";
|
|
134
|
-
};
|
|
135
|
-
export declare const getUnsignedDocuments: ({ apiClient }: {
|
|
136
|
-
apiClient: ApiClient;
|
|
137
|
-
}, userProfileUuid?: string) => Promise<PaginatedDocuments>;
|
|
138
|
-
export declare const getDocumentTypeLabel: (documentType: DocumentType) => string;
|
|
139
|
-
export declare const getDocumentStatusLabel: (status: DocumentStatus) => string;
|
|
140
|
-
export declare const isDocumentSigned: (document: Document) => boolean;
|
|
141
|
-
export declare const isDocumentExpired: (document: Document) => boolean;
|
|
142
|
-
export declare const canSignDocument: (document: Document) => boolean;
|
|
143
|
-
//# sourceMappingURL=documents.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"documents.d.ts","sourceRoot":"","sources":["../../src/services/documents.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAG1D,MAAM,MAAM,YAAY,GAAG,KAAK,GAAG,KAAK,GAAG,WAAW,CAAC;AACvD,MAAM,MAAM,cAAc,GAAG,OAAO,GAAG,WAAW,GAAG,QAAQ,GAAG,SAAS,CAAC;AAE1E,MAAM,WAAW,QAAQ;IACvB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,YAAY,EAAE,YAAY,CAAC;IACpC,QAAQ,CAAC,MAAM,EAAE,cAAc,CAAC;IAChC,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CACzC;AAED,MAAM,WAAW,wBAAwB;IACvC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,YAAY,EAAE,YAAY,CAAC;IACpC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;CAC/B;AAED,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC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