joopjs 2.0.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/CHANGELOG.md +678 -0
- package/README.md +583 -0
- package/dist/a11y.service-C-DQQfgO.d.mts +143 -0
- package/dist/a11y.service-CauEJrJe.d.ts +143 -0
- package/dist/adapters-B6slG6hQ.d.mts +84 -0
- package/dist/adapters-B6slG6hQ.d.ts +84 -0
- package/dist/aes.service-CkoupAww.d.mts +95 -0
- package/dist/aes.service-CkoupAww.d.ts +95 -0
- package/dist/ai/index.d.mts +99 -0
- package/dist/ai/index.d.ts +99 -0
- package/dist/ai/index.js +307 -0
- package/dist/ai/index.js.map +1 -0
- package/dist/ai/index.mjs +304 -0
- package/dist/ai/index.mjs.map +1 -0
- package/dist/analytics/index.d.mts +42 -0
- package/dist/analytics/index.d.ts +42 -0
- package/dist/analytics/index.js +139 -0
- package/dist/analytics/index.js.map +1 -0
- package/dist/analytics/index.mjs +136 -0
- package/dist/analytics/index.mjs.map +1 -0
- package/dist/angular/index.d.mts +148 -0
- package/dist/angular/index.d.ts +148 -0
- package/dist/angular/index.js +122 -0
- package/dist/angular/index.js.map +1 -0
- package/dist/angular/index.mjs +101 -0
- package/dist/angular/index.mjs.map +1 -0
- package/dist/api/index.d.mts +128 -0
- package/dist/api/index.d.ts +128 -0
- package/dist/api/index.js +1358 -0
- package/dist/api/index.js.map +1 -0
- package/dist/api/index.mjs +1332 -0
- package/dist/api/index.mjs.map +1 -0
- package/dist/auth/index.d.mts +105 -0
- package/dist/auth/index.d.ts +105 -0
- package/dist/auth/index.js +989 -0
- package/dist/auth/index.js.map +1 -0
- package/dist/auth/index.mjs +979 -0
- package/dist/auth/index.mjs.map +1 -0
- package/dist/auth.service-DNVB-L4U.d.mts +16 -0
- package/dist/auth.service-PjUUSUIt.d.ts +16 -0
- package/dist/banking/index.d.mts +1530 -0
- package/dist/banking/index.d.ts +1530 -0
- package/dist/banking/index.js +4739 -0
- package/dist/banking/index.js.map +1 -0
- package/dist/banking/index.mjs +4661 -0
- package/dist/banking/index.mjs.map +1 -0
- package/dist/cache/index.d.mts +40 -0
- package/dist/cache/index.d.ts +40 -0
- package/dist/cache/index.js +174 -0
- package/dist/cache/index.js.map +1 -0
- package/dist/cache/index.mjs +172 -0
- package/dist/cache/index.mjs.map +1 -0
- package/dist/client-profile.service-BuPeXVp5.d.mts +28 -0
- package/dist/client-profile.service-D5bRRYQp.d.ts +28 -0
- package/dist/config.models-Cqg04fAQ.d.mts +84 -0
- package/dist/config.models-Cqg04fAQ.d.ts +84 -0
- package/dist/config.service-CrCvI-JS.d.ts +31 -0
- package/dist/config.service-Cz4QQLlf.d.mts +31 -0
- package/dist/core/index.d.mts +4 -0
- package/dist/core/index.d.ts +4 -0
- package/dist/core/index.js +631 -0
- package/dist/core/index.js.map +1 -0
- package/dist/core/index.mjs +619 -0
- package/dist/core/index.mjs.map +1 -0
- package/dist/crypto-utils-DriNhLdx.d.mts +30 -0
- package/dist/crypto-utils-DriNhLdx.d.ts +30 -0
- package/dist/data-storage.service-DT6xaTxE.d.ts +51 -0
- package/dist/data-storage.service-LvhGRCmw.d.mts +51 -0
- package/dist/deeplink/index.d.mts +39 -0
- package/dist/deeplink/index.d.ts +39 -0
- package/dist/deeplink/index.js +268 -0
- package/dist/deeplink/index.js.map +1 -0
- package/dist/deeplink/index.mjs +265 -0
- package/dist/deeplink/index.mjs.map +1 -0
- package/dist/deeplink.service-Ctd5u243.d.mts +35 -0
- package/dist/deeplink.service-uUuTnY9_.d.ts +35 -0
- package/dist/dev/index.d.mts +20 -0
- package/dist/dev/index.d.ts +20 -0
- package/dist/dev/index.js +51 -0
- package/dist/dev/index.js.map +1 -0
- package/dist/dev/index.mjs +49 -0
- package/dist/dev/index.mjs.map +1 -0
- package/dist/device/index.d.mts +108 -0
- package/dist/device/index.d.ts +108 -0
- package/dist/device/index.js +960 -0
- package/dist/device/index.js.map +1 -0
- package/dist/device/index.mjs +951 -0
- package/dist/device/index.mjs.map +1 -0
- package/dist/differential-privacy-BcAv1G80.d.mts +210 -0
- package/dist/differential-privacy-C8mAUjZr.d.ts +210 -0
- package/dist/encryption/index.d.mts +75 -0
- package/dist/encryption/index.d.ts +75 -0
- package/dist/encryption/index.js +605 -0
- package/dist/encryption/index.js.map +1 -0
- package/dist/encryption/index.mjs +598 -0
- package/dist/encryption/index.mjs.map +1 -0
- package/dist/form-validator-3tkmzr_o.d.mts +72 -0
- package/dist/form-validator-3tkmzr_o.d.ts +72 -0
- package/dist/forms/index.d.mts +59 -0
- package/dist/forms/index.d.ts +59 -0
- package/dist/forms/index.js +446 -0
- package/dist/forms/index.js.map +1 -0
- package/dist/forms/index.mjs +442 -0
- package/dist/forms/index.mjs.map +1 -0
- package/dist/i18n/index.d.mts +37 -0
- package/dist/i18n/index.d.ts +37 -0
- package/dist/i18n/index.js +147 -0
- package/dist/i18n/index.js.map +1 -0
- package/dist/i18n/index.mjs +145 -0
- package/dist/i18n/index.mjs.map +1 -0
- package/dist/idempotency.service-_6LqhivP.d.mts +372 -0
- package/dist/idempotency.service-eOKoISRD.d.ts +372 -0
- package/dist/index-B_ksKpS1.d.mts +202 -0
- package/dist/index-CqDKWTUP.d.mts +28 -0
- package/dist/index-CqDKWTUP.d.ts +28 -0
- package/dist/index-DFqEoX_l.d.ts +202 -0
- package/dist/index-Dz0gOur2.d.mts +36 -0
- package/dist/index-Dz0gOur2.d.ts +36 -0
- package/dist/index.d.mts +1336 -0
- package/dist/index.d.ts +1336 -0
- package/dist/index.js +19464 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +19155 -0
- package/dist/index.mjs.map +1 -0
- package/dist/india/index.d.mts +75 -0
- package/dist/india/index.d.ts +75 -0
- package/dist/india/index.js +325 -0
- package/dist/india/index.js.map +1 -0
- package/dist/india/index.mjs +303 -0
- package/dist/india/index.mjs.map +1 -0
- package/dist/joop-Bx7Iwj5p.d.mts +155 -0
- package/dist/joop-CA3DMeOO.d.ts +155 -0
- package/dist/native-bridge/index.d.mts +27 -0
- package/dist/native-bridge/index.d.ts +27 -0
- package/dist/native-bridge/index.js +98 -0
- package/dist/native-bridge/index.js.map +1 -0
- package/dist/native-bridge/index.mjs +96 -0
- package/dist/native-bridge/index.mjs.map +1 -0
- package/dist/network/index.d.mts +85 -0
- package/dist/network/index.d.ts +85 -0
- package/dist/network/index.js +454 -0
- package/dist/network/index.js.map +1 -0
- package/dist/network/index.mjs +451 -0
- package/dist/network/index.mjs.map +1 -0
- package/dist/network-monitor-BIwPSXme.d.mts +179 -0
- package/dist/network-monitor-Bqp2hvZr.d.ts +179 -0
- package/dist/notification.service-Dm4fvfZf.d.mts +25 -0
- package/dist/notification.service-tEMKatWJ.d.ts +25 -0
- package/dist/observability/index.d.mts +179 -0
- package/dist/observability/index.d.ts +179 -0
- package/dist/observability/index.js +559 -0
- package/dist/observability/index.js.map +1 -0
- package/dist/observability/index.mjs +552 -0
- package/dist/observability/index.mjs.map +1 -0
- package/dist/oidc-client-DIJcClmB.d.mts +190 -0
- package/dist/oidc-client-DxhyE59t.d.ts +190 -0
- package/dist/platform/index.d.mts +73 -0
- package/dist/platform/index.d.ts +73 -0
- package/dist/platform/index.js +127 -0
- package/dist/platform/index.js.map +1 -0
- package/dist/platform/index.mjs +125 -0
- package/dist/platform/index.mjs.map +1 -0
- package/dist/pwa/index.d.mts +31 -0
- package/dist/pwa/index.d.ts +31 -0
- package/dist/pwa/index.js +247 -0
- package/dist/pwa/index.js.map +1 -0
- package/dist/pwa/index.mjs +244 -0
- package/dist/pwa/index.mjs.map +1 -0
- package/dist/react/index.d.mts +133 -0
- package/dist/react/index.d.ts +133 -0
- package/dist/react/index.js +632 -0
- package/dist/react/index.js.map +1 -0
- package/dist/react/index.mjs +630 -0
- package/dist/react/index.mjs.map +1 -0
- package/dist/router/index.d.mts +39 -0
- package/dist/router/index.d.ts +39 -0
- package/dist/router/index.js +168 -0
- package/dist/router/index.js.map +1 -0
- package/dist/router/index.mjs +166 -0
- package/dist/router/index.mjs.map +1 -0
- package/dist/security/index.d.mts +206 -0
- package/dist/security/index.d.ts +206 -0
- package/dist/security/index.js +1297 -0
- package/dist/security/index.js.map +1 -0
- package/dist/security/index.mjs +1285 -0
- package/dist/security/index.mjs.map +1 -0
- package/dist/session/index.d.mts +115 -0
- package/dist/session/index.d.ts +115 -0
- package/dist/session/index.js +297 -0
- package/dist/session/index.js.map +1 -0
- package/dist/session/index.mjs +292 -0
- package/dist/session/index.mjs.map +1 -0
- package/dist/state/index.d.mts +43 -0
- package/dist/state/index.d.ts +43 -0
- package/dist/state/index.js +156 -0
- package/dist/state/index.js.map +1 -0
- package/dist/state/index.mjs +152 -0
- package/dist/state/index.mjs.map +1 -0
- package/dist/statement-parser-BHQtXwCM.d.ts +260 -0
- package/dist/statement-parser-C2qNmb49.d.mts +260 -0
- package/dist/storage/index.d.mts +40 -0
- package/dist/storage/index.d.ts +40 -0
- package/dist/storage/index.js +256 -0
- package/dist/storage/index.js.map +1 -0
- package/dist/storage/index.mjs +252 -0
- package/dist/storage/index.mjs.map +1 -0
- package/dist/sync/index.d.mts +69 -0
- package/dist/sync/index.d.ts +69 -0
- package/dist/sync/index.js +330 -0
- package/dist/sync/index.js.map +1 -0
- package/dist/sync/index.mjs +323 -0
- package/dist/sync/index.mjs.map +1 -0
- package/dist/sync-engine-DCIMRG5s.d.ts +61 -0
- package/dist/sync-engine-DZqyKHkK.d.mts +61 -0
- package/dist/theme/index.d.mts +53 -0
- package/dist/theme/index.d.ts +53 -0
- package/dist/theme/index.js +169 -0
- package/dist/theme/index.js.map +1 -0
- package/dist/theme/index.mjs +167 -0
- package/dist/theme/index.mjs.map +1 -0
- package/dist/ui/index.d.mts +66 -0
- package/dist/ui/index.d.ts +66 -0
- package/dist/ui/index.js +811 -0
- package/dist/ui/index.js.map +1 -0
- package/dist/ui/index.mjs +803 -0
- package/dist/ui/index.mjs.map +1 -0
- package/dist/utilities/index.d.mts +199 -0
- package/dist/utilities/index.d.ts +199 -0
- package/dist/utilities/index.js +1991 -0
- package/dist/utilities/index.js.map +1 -0
- package/dist/utilities/index.mjs +1923 -0
- package/dist/utilities/index.mjs.map +1 -0
- package/dist/validation/index.d.mts +60 -0
- package/dist/validation/index.d.ts +60 -0
- package/dist/validation/index.js +460 -0
- package/dist/validation/index.js.map +1 -0
- package/dist/validation/index.mjs +455 -0
- package/dist/validation/index.mjs.map +1 -0
- package/dist/vue/index.d.mts +135 -0
- package/dist/vue/index.d.ts +135 -0
- package/dist/vue/index.js +621 -0
- package/dist/vue/index.js.map +1 -0
- package/dist/vue/index.mjs +619 -0
- package/dist/vue/index.mjs.map +1 -0
- package/dist/watermark.service-Detur5tq.d.ts +235 -0
- package/dist/watermark.service-QNegMeQZ.d.mts +235 -0
- package/dist/workers/index.d.mts +42 -0
- package/dist/workers/index.d.ts +42 -0
- package/dist/workers/index.js +359 -0
- package/dist/workers/index.js.map +1 -0
- package/dist/workers/index.mjs +356 -0
- package/dist/workers/index.mjs.map +1 -0
- package/dist/workflow/index.d.mts +99 -0
- package/dist/workflow/index.d.ts +99 -0
- package/dist/workflow/index.js +282 -0
- package/dist/workflow/index.js.map +1 -0
- package/dist/workflow/index.mjs +279 -0
- package/dist/workflow/index.mjs.map +1 -0
- package/package.json +226 -0
|
@@ -0,0 +1,1530 @@
|
|
|
1
|
+
export { e as JoopCsvStatementConfig, f as JoopFraudConfig, a as JoopFraudDetection, g as JoopFraudLevel, h as JoopFraudResult, i as JoopFraudSignalResult, j as JoopOBAccount, k as JoopOBAccountType, l as JoopOBConsentRequest, m as JoopOBConsentStatus, n as JoopOBCredentials, o as JoopOBPaymentRequest, p as JoopOBPaymentStatus, q as JoopOBTransaction, b as JoopOpenBankingClient, c as JoopPaymentOrchestrator, r as JoopPaymentOrchestratorConfig, s as JoopPaymentRequest, t as JoopPaymentSession, u as JoopPaymentStep, v as JoopReceiptData, A as JoopReceiptLine, J as JoopReceiptService, d as JoopStatementParser, w as JoopStatementResult, x as JoopThreeDsResult, B as JoopTransaction, y as JoopTransactionSignal, z as JoopTxnType } from '../statement-parser-BHQtXwCM.js';
|
|
2
|
+
import { J as JoopObservable, b as JoopSubject, a as JoopBehaviorSubject } from '../index-Dz0gOur2.js';
|
|
3
|
+
|
|
4
|
+
declare function maskCard(cardNumber: string, showLast?: number): string;
|
|
5
|
+
declare function formatCard(cardNumber: string): string;
|
|
6
|
+
declare function maskIban(iban: string, showChars?: number): string;
|
|
7
|
+
declare function maskAccountNumber(account: string, showLast?: number): string;
|
|
8
|
+
declare function maskEmail(email: string): string;
|
|
9
|
+
declare function maskPhone(phone: string, showLast?: number): string;
|
|
10
|
+
declare function maskName(name: string): string;
|
|
11
|
+
declare function validateNric(nric: string): boolean;
|
|
12
|
+
declare function maskNric(nric: string): string;
|
|
13
|
+
declare function validateMyKad(ic: string): boolean;
|
|
14
|
+
declare function maskMyKad(ic: string): string;
|
|
15
|
+
declare function formatMyKad(ic: string): string;
|
|
16
|
+
|
|
17
|
+
/** Mask a string showing the first N and last M characters, masking everything in between.
|
|
18
|
+
* maskRange('1234567890', 2, 4) → '12****7890'
|
|
19
|
+
* maskRange('1234567890', 0, 4) → '******7890'
|
|
20
|
+
* maskRange('1234567890', 2, 0) → '12********'
|
|
21
|
+
*/
|
|
22
|
+
declare function maskRange(value: string, firstVisible: number, lastVisible: number, maskChar?: string): string;
|
|
23
|
+
/** Show only the last N characters.
|
|
24
|
+
* maskShowLast('1234567890', 4) → '******7890'
|
|
25
|
+
*/
|
|
26
|
+
declare function maskShowLast(value: string, n: number, maskChar?: string): string;
|
|
27
|
+
/** Show only the first N characters.
|
|
28
|
+
* maskShowFirst('1234567890', 3) → '123*******'
|
|
29
|
+
*/
|
|
30
|
+
declare function maskShowFirst(value: string, n: number, maskChar?: string): string;
|
|
31
|
+
/** Pattern-based masking using a format string.
|
|
32
|
+
* '#' = reveal original character, 'X' = mask.
|
|
33
|
+
* maskPattern('4532015112830366', '####XXXXXXXX####') → '4532********0366'
|
|
34
|
+
* maskPattern('ABCPG1234C', 'XX*****XX*') → 'AB*****34*' (any non-# char = mask)
|
|
35
|
+
*
|
|
36
|
+
* Pattern characters:
|
|
37
|
+
* '#' — show original character
|
|
38
|
+
* '*' / 'X' / 'x' — replace with maskChar
|
|
39
|
+
* Any other char is passed through as-is (separator)
|
|
40
|
+
*/
|
|
41
|
+
declare function maskPattern(value: string, pattern: string, maskChar?: string): string;
|
|
42
|
+
/** Keep middle characters visible, mask the edges.
|
|
43
|
+
* maskKeepMiddle('1234567890', 4) → '***4567***'
|
|
44
|
+
*/
|
|
45
|
+
declare function maskKeepMiddle(value: string, visibleCount: number, maskChar?: string): string;
|
|
46
|
+
/** Mask every other character (interleaved masking).
|
|
47
|
+
* maskInterleaved('1234567890') → '1*3*5*7*9*'
|
|
48
|
+
*/
|
|
49
|
+
declare function maskInterleaved(value: string, maskChar?: string): string;
|
|
50
|
+
/** Mask all but keep separators in place (useful for formatted IBANs, phones etc).
|
|
51
|
+
* maskKeepSeparators('GB29 NWBK 6016 1331', 4) → 'GB29 **** **** 1331'
|
|
52
|
+
*/
|
|
53
|
+
declare function maskKeepSeparators(value: string, lastVisible: number, separators?: string, maskChar?: string): string;
|
|
54
|
+
|
|
55
|
+
declare function validateIban(iban: string): boolean;
|
|
56
|
+
declare function formatIban(iban: string): string;
|
|
57
|
+
declare function getIbanCountry(iban: string): string;
|
|
58
|
+
declare function parseIban(iban: string): {
|
|
59
|
+
country: string;
|
|
60
|
+
checkDigits: string;
|
|
61
|
+
bban: string;
|
|
62
|
+
} | null;
|
|
63
|
+
declare function getSupportedIbanCountries(): string[];
|
|
64
|
+
|
|
65
|
+
interface JoopCurrencyFormatOptions {
|
|
66
|
+
currency: string;
|
|
67
|
+
locale?: string;
|
|
68
|
+
showSymbol?: boolean;
|
|
69
|
+
minimumFractionDigits?: number;
|
|
70
|
+
maximumFractionDigits?: number;
|
|
71
|
+
}
|
|
72
|
+
declare function formatCurrency(amount: number | string, options: JoopCurrencyFormatOptions): string;
|
|
73
|
+
declare function parseCurrencyString(value: string): number;
|
|
74
|
+
declare function convertCurrency(amount: number, rate: number, decimals?: number): number;
|
|
75
|
+
declare function getCurrencySymbol(currency: string, locale?: string): string;
|
|
76
|
+
declare function formatAmount(amount: number, decimals?: number, locale?: string): string;
|
|
77
|
+
|
|
78
|
+
declare function safeAdd(a: number, b: number, decimals?: number): number;
|
|
79
|
+
declare function safeSubtract(a: number, b: number, decimals?: number): number;
|
|
80
|
+
declare function safeMultiply(a: number, b: number, decimals?: number): number;
|
|
81
|
+
declare function safeDivide(a: number, b: number, decimals?: number): number;
|
|
82
|
+
declare function roundAmount(amount: number, decimals?: number): number;
|
|
83
|
+
declare function isValidAmount(value: unknown): boolean;
|
|
84
|
+
declare function clampAmount(amount: number, min: number, max: number): number;
|
|
85
|
+
declare function toMinorUnits(amount: number, decimalPlaces?: number): number;
|
|
86
|
+
declare function fromMinorUnits(amount: number, decimalPlaces?: number): number;
|
|
87
|
+
declare function sumAmounts(...amounts: number[]): number;
|
|
88
|
+
|
|
89
|
+
interface JoopTransactionRef {
|
|
90
|
+
id: string;
|
|
91
|
+
timestamp: number;
|
|
92
|
+
prefix: string;
|
|
93
|
+
full: string;
|
|
94
|
+
}
|
|
95
|
+
declare function generateTransactionId(prefix?: string): JoopTransactionRef;
|
|
96
|
+
declare function generateReferenceNumber(length?: number): string;
|
|
97
|
+
declare function parseTransactionId(id: string): {
|
|
98
|
+
prefix: string;
|
|
99
|
+
timestamp: number;
|
|
100
|
+
random: string;
|
|
101
|
+
} | null;
|
|
102
|
+
declare function isValidTransactionId(id: string): boolean;
|
|
103
|
+
declare function generateBatchId(): string;
|
|
104
|
+
|
|
105
|
+
type JoopCardNetwork = 'visa' | 'mastercard' | 'amex' | 'discover' | 'unionpay' | 'jcb' | 'diners' | 'maestro' | 'unknown';
|
|
106
|
+
interface JoopCardInfo {
|
|
107
|
+
network: JoopCardNetwork;
|
|
108
|
+
valid: boolean;
|
|
109
|
+
lengths: number[];
|
|
110
|
+
cvvLength: number;
|
|
111
|
+
formatted: string;
|
|
112
|
+
}
|
|
113
|
+
/** Validate a card number using the Luhn algorithm */
|
|
114
|
+
declare function validateLuhn(cardNumber: string): boolean;
|
|
115
|
+
/** Compute the Luhn check digit for a partial card number */
|
|
116
|
+
declare function luhnCheckDigit(partial: string): number;
|
|
117
|
+
/** Detect the card network from the card number prefix */
|
|
118
|
+
declare function getCardNetwork(cardNumber: string): JoopCardNetwork;
|
|
119
|
+
/** Get full card validation info */
|
|
120
|
+
declare function getCardInfo(cardNumber: string): JoopCardInfo;
|
|
121
|
+
/** Format card number with spaces (e.g. 4111 1111 1111 1111 or 3714 496353 98431 for Amex) */
|
|
122
|
+
declare function formatCardNumber(cardNumber: string): string;
|
|
123
|
+
/** Validate card expiry (MM/YY or MM/YYYY) */
|
|
124
|
+
declare function isCardExpired(month: number | string, year: number | string): boolean;
|
|
125
|
+
/** Validate a CVV/CVC value */
|
|
126
|
+
declare function validateCvv(cvv: string, network?: JoopCardNetwork): boolean;
|
|
127
|
+
|
|
128
|
+
type JoopBeneficiaryType = 'domestic' | 'international' | 'upi' | 'mobile' | 'wallet' | 'crypto';
|
|
129
|
+
interface JoopBeneficiary {
|
|
130
|
+
id: string;
|
|
131
|
+
name: string;
|
|
132
|
+
nickname?: string;
|
|
133
|
+
type: JoopBeneficiaryType;
|
|
134
|
+
accountNumber?: string;
|
|
135
|
+
iban?: string;
|
|
136
|
+
bic?: string;
|
|
137
|
+
routingNumber?: string;
|
|
138
|
+
sortCode?: string;
|
|
139
|
+
bankName?: string;
|
|
140
|
+
bankCode?: string;
|
|
141
|
+
branchCode?: string;
|
|
142
|
+
upiId?: string;
|
|
143
|
+
mobile?: string;
|
|
144
|
+
email?: string;
|
|
145
|
+
walletId?: string;
|
|
146
|
+
currency?: string;
|
|
147
|
+
country?: string;
|
|
148
|
+
group?: string;
|
|
149
|
+
isFavorite: boolean;
|
|
150
|
+
isVerified: boolean;
|
|
151
|
+
transferLimit?: number;
|
|
152
|
+
notes?: string;
|
|
153
|
+
createdAt: number;
|
|
154
|
+
updatedAt: number;
|
|
155
|
+
lastUsedAt?: number;
|
|
156
|
+
useCount: number;
|
|
157
|
+
}
|
|
158
|
+
interface JoopBeneficiaryValidation {
|
|
159
|
+
valid: boolean;
|
|
160
|
+
errors: string[];
|
|
161
|
+
}
|
|
162
|
+
declare class JoopBeneficiaryService {
|
|
163
|
+
private _beneficiaries;
|
|
164
|
+
private _list$;
|
|
165
|
+
add(data: Omit<JoopBeneficiary, 'id' | 'createdAt' | 'updatedAt' | 'useCount'>): JoopBeneficiary;
|
|
166
|
+
update(id: string, patch: Partial<Omit<JoopBeneficiary, 'id' | 'createdAt'>>): JoopBeneficiary;
|
|
167
|
+
remove(id: string): void;
|
|
168
|
+
get(id: string): JoopBeneficiary | undefined;
|
|
169
|
+
getAll(): JoopBeneficiary[];
|
|
170
|
+
getByType(type: JoopBeneficiaryType): JoopBeneficiary[];
|
|
171
|
+
getByGroup(group: string): JoopBeneficiary[];
|
|
172
|
+
getFavorites(): JoopBeneficiary[];
|
|
173
|
+
getRecent(limit?: number): JoopBeneficiary[];
|
|
174
|
+
getFrequent(limit?: number): JoopBeneficiary[];
|
|
175
|
+
search(query: string): JoopBeneficiary[];
|
|
176
|
+
toggleFavorite(id: string): JoopBeneficiary;
|
|
177
|
+
verify(id: string): JoopBeneficiary;
|
|
178
|
+
markUsed(id: string): void;
|
|
179
|
+
getGroups(): string[];
|
|
180
|
+
count(): number;
|
|
181
|
+
validate(b: Partial<JoopBeneficiary>): JoopBeneficiaryValidation;
|
|
182
|
+
beneficiaries$(): JoopObservable<JoopBeneficiary[]>;
|
|
183
|
+
private _get;
|
|
184
|
+
private _emit;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
type JoopRecurrenceFrequency = 'once' | 'daily' | 'weekly' | 'biweekly' | 'monthly' | 'quarterly' | 'annually';
|
|
188
|
+
type JoopScheduledPaymentStatus = 'active' | 'paused' | 'completed' | 'cancelled' | 'failed';
|
|
189
|
+
interface JoopScheduledPayment {
|
|
190
|
+
id: string;
|
|
191
|
+
name: string;
|
|
192
|
+
fromAccount: string;
|
|
193
|
+
toAccount: string;
|
|
194
|
+
beneficiaryId?: string;
|
|
195
|
+
amount: number;
|
|
196
|
+
currency: string;
|
|
197
|
+
frequency: JoopRecurrenceFrequency;
|
|
198
|
+
startDate: number;
|
|
199
|
+
endDate?: number;
|
|
200
|
+
nextExecutionDate: number;
|
|
201
|
+
lastExecutionDate?: number;
|
|
202
|
+
executionCount: number;
|
|
203
|
+
maxExecutions?: number;
|
|
204
|
+
status: JoopScheduledPaymentStatus;
|
|
205
|
+
reference?: string;
|
|
206
|
+
description?: string;
|
|
207
|
+
createdAt: number;
|
|
208
|
+
updatedAt: number;
|
|
209
|
+
}
|
|
210
|
+
interface JoopPaymentExecution {
|
|
211
|
+
id: string;
|
|
212
|
+
paymentId: string;
|
|
213
|
+
executedAt: number;
|
|
214
|
+
amount: number;
|
|
215
|
+
currency: string;
|
|
216
|
+
status: 'success' | 'failed';
|
|
217
|
+
reference: string;
|
|
218
|
+
error?: string;
|
|
219
|
+
}
|
|
220
|
+
declare class JoopScheduledPaymentService {
|
|
221
|
+
private _payments;
|
|
222
|
+
private _executions;
|
|
223
|
+
private _payments$;
|
|
224
|
+
private _due$;
|
|
225
|
+
schedule(data: Omit<JoopScheduledPayment, 'id' | 'nextExecutionDate' | 'executionCount' | 'createdAt' | 'updatedAt' | 'status'>): JoopScheduledPayment;
|
|
226
|
+
update(id: string, patch: Partial<Omit<JoopScheduledPayment, 'id' | 'createdAt'>>): JoopScheduledPayment;
|
|
227
|
+
cancel(id: string): void;
|
|
228
|
+
pause(id: string): void;
|
|
229
|
+
resume(id: string): void;
|
|
230
|
+
get(id: string): JoopScheduledPayment | undefined;
|
|
231
|
+
getAll(): JoopScheduledPayment[];
|
|
232
|
+
getActive(): JoopScheduledPayment[];
|
|
233
|
+
getDue(asOf?: Date): JoopScheduledPayment[];
|
|
234
|
+
getUpcoming(days?: number, asOf?: Date): JoopScheduledPayment[];
|
|
235
|
+
recordExecution(paymentId: string, status: 'success' | 'failed', error?: string): JoopPaymentExecution;
|
|
236
|
+
getExecutionHistory(paymentId: string): JoopPaymentExecution[];
|
|
237
|
+
computeNextDate(current: number, frequency: JoopRecurrenceFrequency): number;
|
|
238
|
+
getSchedulePreview(startDate: number, frequency: JoopRecurrenceFrequency, count?: number, endDate?: number): number[];
|
|
239
|
+
payments$(): JoopObservable<JoopScheduledPayment[]>;
|
|
240
|
+
due$(): JoopObservable<JoopScheduledPayment>;
|
|
241
|
+
private _get;
|
|
242
|
+
private _emit;
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
type JoopCardStatus = 'active' | 'frozen' | 'blocked' | 'expired' | 'pending';
|
|
246
|
+
type JoopCardType = 'physical' | 'virtual';
|
|
247
|
+
type JoopManagedCardNetwork = 'visa' | 'mastercard' | 'amex' | 'discover' | 'unknown';
|
|
248
|
+
interface JoopCardSpendingLimits {
|
|
249
|
+
daily?: number;
|
|
250
|
+
weekly?: number;
|
|
251
|
+
monthly?: number;
|
|
252
|
+
perTransaction?: number;
|
|
253
|
+
}
|
|
254
|
+
interface JoopCardControls {
|
|
255
|
+
onlinePayments: boolean;
|
|
256
|
+
internationalPayments: boolean;
|
|
257
|
+
contactlessPayments: boolean;
|
|
258
|
+
atmWithdrawals: boolean;
|
|
259
|
+
ecommercePayments: boolean;
|
|
260
|
+
}
|
|
261
|
+
interface JoopManagedCard {
|
|
262
|
+
id: string;
|
|
263
|
+
cardNumber: string;
|
|
264
|
+
last4: string;
|
|
265
|
+
network: JoopManagedCardNetwork;
|
|
266
|
+
type: JoopCardType;
|
|
267
|
+
holderName: string;
|
|
268
|
+
expiryMonth: number;
|
|
269
|
+
expiryYear: number;
|
|
270
|
+
status: JoopCardStatus;
|
|
271
|
+
accountId: string;
|
|
272
|
+
spendingLimits: JoopCardSpendingLimits;
|
|
273
|
+
controls: JoopCardControls;
|
|
274
|
+
currency?: string;
|
|
275
|
+
createdAt: number;
|
|
276
|
+
updatedAt: number;
|
|
277
|
+
frozenAt?: number;
|
|
278
|
+
frozenReason?: string;
|
|
279
|
+
blockedAt?: number;
|
|
280
|
+
}
|
|
281
|
+
interface JoopCardTransactionCheck {
|
|
282
|
+
allowed: boolean;
|
|
283
|
+
reason?: string;
|
|
284
|
+
}
|
|
285
|
+
declare class JoopCardManagementService {
|
|
286
|
+
private _cards;
|
|
287
|
+
private _cards$;
|
|
288
|
+
add(data: Omit<JoopManagedCard, 'id' | 'createdAt' | 'updatedAt'>): JoopManagedCard;
|
|
289
|
+
get(id: string): JoopManagedCard | undefined;
|
|
290
|
+
getAll(): JoopManagedCard[];
|
|
291
|
+
getByAccount(accountId: string): JoopManagedCard[];
|
|
292
|
+
getActive(): JoopManagedCard[];
|
|
293
|
+
remove(id: string): void;
|
|
294
|
+
freeze(id: string, reason?: string): JoopManagedCard;
|
|
295
|
+
unfreeze(id: string): JoopManagedCard;
|
|
296
|
+
block(id: string): JoopManagedCard;
|
|
297
|
+
setSpendingLimits(id: string, limits: JoopCardSpendingLimits): JoopManagedCard;
|
|
298
|
+
setControls(id: string, controls: Partial<JoopCardControls>): JoopManagedCard;
|
|
299
|
+
generateVirtual(accountId: string, holderName: string, options?: {
|
|
300
|
+
expiryMonths?: number;
|
|
301
|
+
currency?: string;
|
|
302
|
+
}): JoopManagedCard;
|
|
303
|
+
isExpired(id: string): boolean;
|
|
304
|
+
canTransact(id: string, amount: number, type: keyof Omit<JoopCardControls, 'ecommercePayments'> | 'ecommerce'): JoopCardTransactionCheck;
|
|
305
|
+
validatePin(pin: string): boolean;
|
|
306
|
+
cards$(): JoopObservable<JoopManagedCard[]>;
|
|
307
|
+
private _require;
|
|
308
|
+
private _update;
|
|
309
|
+
private _emit;
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
type JoopStatementFormat = 'text' | 'csv' | 'html';
|
|
313
|
+
type JoopTransactionType = 'credit' | 'debit';
|
|
314
|
+
interface JoopStatementTransaction {
|
|
315
|
+
id: string;
|
|
316
|
+
date: number;
|
|
317
|
+
description: string;
|
|
318
|
+
type: JoopTransactionType;
|
|
319
|
+
amount: number;
|
|
320
|
+
currency: string;
|
|
321
|
+
reference?: string;
|
|
322
|
+
category?: string;
|
|
323
|
+
}
|
|
324
|
+
interface JoopStatementEntry extends JoopStatementTransaction {
|
|
325
|
+
runningBalance: number;
|
|
326
|
+
}
|
|
327
|
+
interface JoopStatementOptions {
|
|
328
|
+
accountId: string;
|
|
329
|
+
accountName?: string;
|
|
330
|
+
accountNumber?: string;
|
|
331
|
+
currency: string;
|
|
332
|
+
openingBalance: number;
|
|
333
|
+
fromDate: number;
|
|
334
|
+
toDate: number;
|
|
335
|
+
transactions: JoopStatementTransaction[];
|
|
336
|
+
}
|
|
337
|
+
interface JoopStatement {
|
|
338
|
+
accountId: string;
|
|
339
|
+
accountName: string;
|
|
340
|
+
accountNumber: string;
|
|
341
|
+
currency: string;
|
|
342
|
+
fromDate: number;
|
|
343
|
+
toDate: number;
|
|
344
|
+
openingBalance: number;
|
|
345
|
+
closingBalance: number;
|
|
346
|
+
totalCredits: number;
|
|
347
|
+
totalDebits: number;
|
|
348
|
+
transactionCount: number;
|
|
349
|
+
entries: JoopStatementEntry[];
|
|
350
|
+
generatedAt: number;
|
|
351
|
+
}
|
|
352
|
+
declare class JoopStatementGeneratorService {
|
|
353
|
+
generate(options: JoopStatementOptions): JoopStatement;
|
|
354
|
+
render(statement: JoopStatement, format?: JoopStatementFormat): string;
|
|
355
|
+
getSummary(statement: JoopStatement): Record<string, number>;
|
|
356
|
+
getTopCategories(statement: JoopStatement, limit?: number): Array<{
|
|
357
|
+
category: string;
|
|
358
|
+
total: number;
|
|
359
|
+
}>;
|
|
360
|
+
private _renderText;
|
|
361
|
+
private _renderCsv;
|
|
362
|
+
private _renderHtml;
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
type JoopNotificationType = 'info' | 'success' | 'warning' | 'error' | 'transfer' | 'security' | 'promo' | 'system';
|
|
366
|
+
type JoopNotificationPriority = 'low' | 'normal' | 'high' | 'urgent';
|
|
367
|
+
interface JoopNotification {
|
|
368
|
+
id: string;
|
|
369
|
+
type: JoopNotificationType;
|
|
370
|
+
title: string;
|
|
371
|
+
body: string;
|
|
372
|
+
priority: JoopNotificationPriority;
|
|
373
|
+
category?: string;
|
|
374
|
+
imageUrl?: string;
|
|
375
|
+
actionUrl?: string;
|
|
376
|
+
actionLabel?: string;
|
|
377
|
+
metadata?: Record<string, unknown>;
|
|
378
|
+
isRead: boolean;
|
|
379
|
+
isDismissed: boolean;
|
|
380
|
+
createdAt: number;
|
|
381
|
+
readAt?: number;
|
|
382
|
+
expiresAt?: number;
|
|
383
|
+
}
|
|
384
|
+
interface JoopNotificationSummary {
|
|
385
|
+
total: number;
|
|
386
|
+
unread: number;
|
|
387
|
+
byType: Record<JoopNotificationType, number>;
|
|
388
|
+
byPriority: Record<JoopNotificationPriority, number>;
|
|
389
|
+
}
|
|
390
|
+
declare class JoopNotificationCenterService {
|
|
391
|
+
private _notifications;
|
|
392
|
+
private _notifications$;
|
|
393
|
+
private _maxItems;
|
|
394
|
+
constructor(maxItems?: number);
|
|
395
|
+
add(data: Omit<JoopNotification, 'id' | 'isRead' | 'isDismissed' | 'createdAt'>): JoopNotification;
|
|
396
|
+
get(id: string): JoopNotification | undefined;
|
|
397
|
+
getAll(includeExpired?: boolean): JoopNotification[];
|
|
398
|
+
getUnread(): JoopNotification[];
|
|
399
|
+
getByType(type: JoopNotificationType): JoopNotification[];
|
|
400
|
+
getByCategory(category: string): JoopNotification[];
|
|
401
|
+
getByPriority(priority: JoopNotificationPriority): JoopNotification[];
|
|
402
|
+
markRead(id: string): void;
|
|
403
|
+
markAllRead(): void;
|
|
404
|
+
dismiss(id: string): void;
|
|
405
|
+
dismissAll(): void;
|
|
406
|
+
unreadCount(): number;
|
|
407
|
+
getSummary(): JoopNotificationSummary;
|
|
408
|
+
purgeExpired(): number;
|
|
409
|
+
clear(): void;
|
|
410
|
+
notifications$(): JoopObservable<JoopNotification[]>;
|
|
411
|
+
private _emit;
|
|
412
|
+
}
|
|
413
|
+
|
|
414
|
+
type JoopDisputeStatus = 'open' | 'under-review' | 'resolved' | 'rejected' | 'escalated' | 'closed';
|
|
415
|
+
type JoopDisputeReason = 'unauthorized-transaction' | 'duplicate-charge' | 'goods-not-received' | 'goods-not-as-described' | 'amount-mismatch' | 'cancelled-subscription' | 'atm-withdrawal-discrepancy' | 'other';
|
|
416
|
+
interface JoopDisputeEvidence {
|
|
417
|
+
id: string;
|
|
418
|
+
type: 'screenshot' | 'receipt' | 'email' | 'document' | 'photo' | 'other';
|
|
419
|
+
name: string;
|
|
420
|
+
url?: string;
|
|
421
|
+
base64?: string;
|
|
422
|
+
uploadedAt: number;
|
|
423
|
+
}
|
|
424
|
+
interface JoopDispute {
|
|
425
|
+
id: string;
|
|
426
|
+
referenceNumber: string;
|
|
427
|
+
transactionId?: string;
|
|
428
|
+
transactionDate?: number;
|
|
429
|
+
amount: number;
|
|
430
|
+
currency: string;
|
|
431
|
+
merchantName?: string;
|
|
432
|
+
reason: JoopDisputeReason;
|
|
433
|
+
description: string;
|
|
434
|
+
status: JoopDisputeStatus;
|
|
435
|
+
evidence: JoopDisputeEvidence[];
|
|
436
|
+
resolution?: string;
|
|
437
|
+
rejectionReason?: string;
|
|
438
|
+
escalationReason?: string;
|
|
439
|
+
assignedTo?: string;
|
|
440
|
+
createdAt: number;
|
|
441
|
+
updatedAt: number;
|
|
442
|
+
resolvedAt?: number;
|
|
443
|
+
}
|
|
444
|
+
interface JoopDisputeStats {
|
|
445
|
+
total: number;
|
|
446
|
+
open: number;
|
|
447
|
+
underReview: number;
|
|
448
|
+
resolved: number;
|
|
449
|
+
rejected: number;
|
|
450
|
+
escalated: number;
|
|
451
|
+
totalAmount: number;
|
|
452
|
+
}
|
|
453
|
+
declare class JoopDisputeService {
|
|
454
|
+
private _disputes;
|
|
455
|
+
private _disputes$;
|
|
456
|
+
private _counter;
|
|
457
|
+
create(data: Omit<JoopDispute, 'id' | 'referenceNumber' | 'status' | 'evidence' | 'createdAt' | 'updatedAt'>): JoopDispute;
|
|
458
|
+
update(id: string, patch: Partial<Pick<JoopDispute, 'description' | 'reason' | 'merchantName' | 'assignedTo'>>): JoopDispute;
|
|
459
|
+
get(id: string): JoopDispute | undefined;
|
|
460
|
+
getByRef(ref: string): JoopDispute | undefined;
|
|
461
|
+
getAll(): JoopDispute[];
|
|
462
|
+
getByStatus(status: JoopDisputeStatus): JoopDispute[];
|
|
463
|
+
startReview(id: string, assignedTo?: string): JoopDispute;
|
|
464
|
+
resolve(id: string, resolution: string): JoopDispute;
|
|
465
|
+
reject(id: string, reason: string): JoopDispute;
|
|
466
|
+
escalate(id: string, reason: string): JoopDispute;
|
|
467
|
+
close(id: string): JoopDispute;
|
|
468
|
+
addEvidence(disputeId: string, evidence: Omit<JoopDisputeEvidence, 'id' | 'uploadedAt'>): JoopDisputeEvidence;
|
|
469
|
+
removeEvidence(disputeId: string, evidenceId: string): void;
|
|
470
|
+
getStats(): JoopDisputeStats;
|
|
471
|
+
disputes$(): JoopObservable<JoopDispute[]>;
|
|
472
|
+
private _require;
|
|
473
|
+
private _transition;
|
|
474
|
+
private _generateRef;
|
|
475
|
+
private _emit;
|
|
476
|
+
}
|
|
477
|
+
|
|
478
|
+
type JoopBillerCategory = 'electricity' | 'water' | 'gas' | 'internet' | 'mobile' | 'insurance' | 'tax' | 'subscription' | 'rent' | 'loan' | 'other';
|
|
479
|
+
type JoopBillStatus = 'pending' | 'paid' | 'overdue' | 'cancelled';
|
|
480
|
+
type JoopBillPaymentStatus = 'success' | 'failed' | 'pending' | 'reversed';
|
|
481
|
+
interface JoopBiller {
|
|
482
|
+
id: string;
|
|
483
|
+
name: string;
|
|
484
|
+
category: JoopBillerCategory;
|
|
485
|
+
accountNumber?: string;
|
|
486
|
+
reference?: string;
|
|
487
|
+
currency: string;
|
|
488
|
+
defaultAmount?: number;
|
|
489
|
+
dueDayOfMonth?: number;
|
|
490
|
+
logoUrl?: string;
|
|
491
|
+
notes?: string;
|
|
492
|
+
isActive: boolean;
|
|
493
|
+
createdAt: number;
|
|
494
|
+
}
|
|
495
|
+
interface JoopBill {
|
|
496
|
+
id: string;
|
|
497
|
+
billerId: string;
|
|
498
|
+
billerName: string;
|
|
499
|
+
amount: number;
|
|
500
|
+
currency: string;
|
|
501
|
+
dueDate: number;
|
|
502
|
+
status: JoopBillStatus;
|
|
503
|
+
reference?: string;
|
|
504
|
+
createdAt: number;
|
|
505
|
+
}
|
|
506
|
+
interface JoopBillPayment {
|
|
507
|
+
id: string;
|
|
508
|
+
billerId: string;
|
|
509
|
+
billId?: string;
|
|
510
|
+
billerName: string;
|
|
511
|
+
amount: number;
|
|
512
|
+
currency: string;
|
|
513
|
+
status: JoopBillPaymentStatus;
|
|
514
|
+
reference: string;
|
|
515
|
+
fromAccount?: string;
|
|
516
|
+
paidAt: number;
|
|
517
|
+
errorMessage?: string;
|
|
518
|
+
}
|
|
519
|
+
interface JoopBillPaymentSummary {
|
|
520
|
+
totalPaidThisMonth: number;
|
|
521
|
+
totalPaidThisYear: number;
|
|
522
|
+
paymentCount: number;
|
|
523
|
+
billerCount: number;
|
|
524
|
+
currency: string;
|
|
525
|
+
}
|
|
526
|
+
declare class JoopBillPaymentService {
|
|
527
|
+
private _billers;
|
|
528
|
+
private _bills;
|
|
529
|
+
private _payments;
|
|
530
|
+
private _payments$;
|
|
531
|
+
addBiller(data: Omit<JoopBiller, 'id' | 'createdAt' | 'isActive'>): JoopBiller;
|
|
532
|
+
updateBiller(id: string, patch: Partial<Omit<JoopBiller, 'id' | 'createdAt'>>): JoopBiller;
|
|
533
|
+
removeBiller(id: string): void;
|
|
534
|
+
getBiller(id: string): JoopBiller | undefined;
|
|
535
|
+
getBillers(category?: JoopBillerCategory): JoopBiller[];
|
|
536
|
+
addBill(data: Omit<JoopBill, 'id' | 'createdAt' | 'status'>): JoopBill;
|
|
537
|
+
getBills(billerId?: string): JoopBill[];
|
|
538
|
+
getOverdueBills(asOf?: number): JoopBill[];
|
|
539
|
+
getUpcomingBills(days?: number, asOf?: number): JoopBill[];
|
|
540
|
+
pay(billerId: string, amount: number, options?: {
|
|
541
|
+
fromAccount?: string;
|
|
542
|
+
billId?: string;
|
|
543
|
+
reference?: string;
|
|
544
|
+
}): JoopBillPayment;
|
|
545
|
+
getPaymentHistory(billerId?: string): JoopBillPayment[];
|
|
546
|
+
getSummary(): JoopBillPaymentSummary;
|
|
547
|
+
payments$(): JoopObservable<JoopBillPayment[]>;
|
|
548
|
+
private _requireBiller;
|
|
549
|
+
}
|
|
550
|
+
|
|
551
|
+
type JoopPaymentUriScheme = 'upi' | 'bitcoin' | 'ethereum' | 'payto' | 'sepa' | 'generic';
|
|
552
|
+
interface JoopUpiParams {
|
|
553
|
+
pa: string;
|
|
554
|
+
pn?: string;
|
|
555
|
+
am?: number;
|
|
556
|
+
cu?: string;
|
|
557
|
+
tn?: string;
|
|
558
|
+
tr?: string;
|
|
559
|
+
mc?: string;
|
|
560
|
+
}
|
|
561
|
+
interface JoopBitcoinParams {
|
|
562
|
+
address: string;
|
|
563
|
+
amount?: number;
|
|
564
|
+
label?: string;
|
|
565
|
+
message?: string;
|
|
566
|
+
}
|
|
567
|
+
interface JoopEthereumParams {
|
|
568
|
+
address: string;
|
|
569
|
+
value?: number;
|
|
570
|
+
gas?: number;
|
|
571
|
+
data?: string;
|
|
572
|
+
}
|
|
573
|
+
interface JoopPayToParams {
|
|
574
|
+
payId: string;
|
|
575
|
+
amount?: number;
|
|
576
|
+
currency?: string;
|
|
577
|
+
description?: string;
|
|
578
|
+
}
|
|
579
|
+
interface JoopSepaParams {
|
|
580
|
+
iban: string;
|
|
581
|
+
bic?: string;
|
|
582
|
+
name?: string;
|
|
583
|
+
amount?: number;
|
|
584
|
+
currency?: string;
|
|
585
|
+
reference?: string;
|
|
586
|
+
purpose?: string;
|
|
587
|
+
}
|
|
588
|
+
interface JoopPaymentUri {
|
|
589
|
+
scheme: JoopPaymentUriScheme;
|
|
590
|
+
raw: string;
|
|
591
|
+
isValid: boolean;
|
|
592
|
+
errors: string[];
|
|
593
|
+
upi?: JoopUpiParams;
|
|
594
|
+
bitcoin?: JoopBitcoinParams;
|
|
595
|
+
ethereum?: JoopEthereumParams;
|
|
596
|
+
payto?: JoopPayToParams;
|
|
597
|
+
sepa?: JoopSepaParams;
|
|
598
|
+
generic?: {
|
|
599
|
+
recipient?: string;
|
|
600
|
+
amount?: number;
|
|
601
|
+
currency?: string;
|
|
602
|
+
reference?: string;
|
|
603
|
+
};
|
|
604
|
+
}
|
|
605
|
+
declare class JoopPaymentUriService {
|
|
606
|
+
parse(uri: string): JoopPaymentUri;
|
|
607
|
+
generateUpi(params: JoopUpiParams): string;
|
|
608
|
+
generateBitcoin(params: JoopBitcoinParams): string;
|
|
609
|
+
generateEthereum(params: JoopEthereumParams): string;
|
|
610
|
+
generatePayTo(params: JoopPayToParams): string;
|
|
611
|
+
generateSepa(params: JoopSepaParams): string;
|
|
612
|
+
isValid(uri: string): boolean;
|
|
613
|
+
getScheme(uri: string): JoopPaymentUriScheme | null;
|
|
614
|
+
private _parseUpi;
|
|
615
|
+
private _parseBitcoin;
|
|
616
|
+
private _parseEthereum;
|
|
617
|
+
private _parsePayTo;
|
|
618
|
+
private _parseSepa;
|
|
619
|
+
}
|
|
620
|
+
|
|
621
|
+
type JoopMandateType = 'nach' | 'upi-autopay' | 'standing-instruction' | 'direct-debit';
|
|
622
|
+
type JoopMandateStatus = 'pending' | 'active' | 'paused' | 'cancelled' | 'expired' | 'failed';
|
|
623
|
+
type JoopMandateFrequency = 'daily' | 'weekly' | 'biweekly' | 'monthly' | 'quarterly' | 'half-yearly' | 'yearly' | 'as-presented';
|
|
624
|
+
type JoopMandateExecutionStatus = 'success' | 'failed' | 'pending';
|
|
625
|
+
interface JoopMandate {
|
|
626
|
+
id: string;
|
|
627
|
+
ref: string;
|
|
628
|
+
type: JoopMandateType;
|
|
629
|
+
status: JoopMandateStatus;
|
|
630
|
+
accountId: string;
|
|
631
|
+
payeeName: string;
|
|
632
|
+
payeeRef: string;
|
|
633
|
+
maxAmount: number;
|
|
634
|
+
frequency: JoopMandateFrequency;
|
|
635
|
+
startDate: number;
|
|
636
|
+
endDate?: number;
|
|
637
|
+
description?: string;
|
|
638
|
+
executionCount: number;
|
|
639
|
+
lastExecutedAt?: number;
|
|
640
|
+
nextExecutionAt?: number;
|
|
641
|
+
createdAt: number;
|
|
642
|
+
updatedAt: number;
|
|
643
|
+
}
|
|
644
|
+
interface JoopMandateExecution {
|
|
645
|
+
id: string;
|
|
646
|
+
mandateId: string;
|
|
647
|
+
amount: number;
|
|
648
|
+
status: JoopMandateExecutionStatus;
|
|
649
|
+
date: number;
|
|
650
|
+
failureReason?: string;
|
|
651
|
+
}
|
|
652
|
+
declare class JoopMandateService {
|
|
653
|
+
private _mandates;
|
|
654
|
+
private _executions;
|
|
655
|
+
private _counter;
|
|
656
|
+
private _change$;
|
|
657
|
+
create(data: {
|
|
658
|
+
type: JoopMandateType;
|
|
659
|
+
accountId: string;
|
|
660
|
+
payeeName: string;
|
|
661
|
+
payeeRef: string;
|
|
662
|
+
maxAmount: number;
|
|
663
|
+
frequency: JoopMandateFrequency;
|
|
664
|
+
startDate: number;
|
|
665
|
+
endDate?: number;
|
|
666
|
+
description?: string;
|
|
667
|
+
}): JoopMandate;
|
|
668
|
+
get(id: string): JoopMandate | undefined;
|
|
669
|
+
getAll(): JoopMandate[];
|
|
670
|
+
activate(id: string): JoopMandate;
|
|
671
|
+
cancel(id: string): JoopMandate;
|
|
672
|
+
pause(id: string): JoopMandate;
|
|
673
|
+
resume(id: string): JoopMandate;
|
|
674
|
+
fail(id: string): JoopMandate;
|
|
675
|
+
getActive(): JoopMandate[];
|
|
676
|
+
getByAccount(accountId: string): JoopMandate[];
|
|
677
|
+
getByStatus(status: JoopMandateStatus): JoopMandate[];
|
|
678
|
+
getDue(asOf?: number): JoopMandate[];
|
|
679
|
+
isExpired(mandate: JoopMandate): boolean;
|
|
680
|
+
recordExecution(mandateId: string, amount: number, status: JoopMandateExecutionStatus, failureReason?: string): JoopMandateExecution;
|
|
681
|
+
getExecutions(mandateId: string): JoopMandateExecution[];
|
|
682
|
+
computeNextDate(mandate: JoopMandate, fromDate?: number): number | undefined;
|
|
683
|
+
change$(): JoopObservable<JoopMandate>;
|
|
684
|
+
private _require;
|
|
685
|
+
private _transition;
|
|
686
|
+
private _byStatus;
|
|
687
|
+
private _computeNextDate;
|
|
688
|
+
private _generateRef;
|
|
689
|
+
}
|
|
690
|
+
|
|
691
|
+
type JoopSplitMethod = 'equal' | 'percentage' | 'exact' | 'shares';
|
|
692
|
+
type JoopSplitStatus = 'open' | 'partial' | 'settled' | 'cancelled';
|
|
693
|
+
type JoopSplitParticipantStatus = 'pending' | 'paid' | 'partial';
|
|
694
|
+
interface JoopSplitParticipant {
|
|
695
|
+
id: string;
|
|
696
|
+
name: string;
|
|
697
|
+
share: number;
|
|
698
|
+
paid: number;
|
|
699
|
+
status: JoopSplitParticipantStatus;
|
|
700
|
+
}
|
|
701
|
+
interface JoopSplitExpense {
|
|
702
|
+
id: string;
|
|
703
|
+
title: string;
|
|
704
|
+
totalAmount: number;
|
|
705
|
+
currency: string;
|
|
706
|
+
paidBy: string;
|
|
707
|
+
method: JoopSplitMethod;
|
|
708
|
+
participants: JoopSplitParticipant[];
|
|
709
|
+
status: JoopSplitStatus;
|
|
710
|
+
notes?: string;
|
|
711
|
+
createdAt: number;
|
|
712
|
+
settledAt?: number;
|
|
713
|
+
}
|
|
714
|
+
interface JoopSplitSettlement {
|
|
715
|
+
from: string;
|
|
716
|
+
to: string;
|
|
717
|
+
amount: number;
|
|
718
|
+
}
|
|
719
|
+
interface JoopSplitBalance {
|
|
720
|
+
name: string;
|
|
721
|
+
owes: number;
|
|
722
|
+
owed: number;
|
|
723
|
+
net: number;
|
|
724
|
+
}
|
|
725
|
+
declare class JoopSplitPaymentService {
|
|
726
|
+
private _expenses;
|
|
727
|
+
private _change$;
|
|
728
|
+
create(title: string, totalAmount: number, paidBy: string, participantNames: string[], options?: {
|
|
729
|
+
method?: JoopSplitMethod;
|
|
730
|
+
currency?: string;
|
|
731
|
+
notes?: string;
|
|
732
|
+
amounts?: number[];
|
|
733
|
+
percentages?: number[];
|
|
734
|
+
shares?: number[];
|
|
735
|
+
}): JoopSplitExpense;
|
|
736
|
+
recordPayment(expenseId: string, participantId: string, amount: number): JoopSplitExpense;
|
|
737
|
+
settle(expenseId: string): void;
|
|
738
|
+
cancel(expenseId: string): void;
|
|
739
|
+
get(id: string): JoopSplitExpense | undefined;
|
|
740
|
+
getAll(): JoopSplitExpense[];
|
|
741
|
+
getOpen(): JoopSplitExpense[];
|
|
742
|
+
getSettlements(expenseId: string): JoopSplitSettlement[];
|
|
743
|
+
getSimplifiedSettlements(expenseId: string): JoopSplitSettlement[];
|
|
744
|
+
getBalance(name: string): JoopSplitBalance;
|
|
745
|
+
getSummary(expenseId: string): {
|
|
746
|
+
total: number;
|
|
747
|
+
paid: number;
|
|
748
|
+
remaining: number;
|
|
749
|
+
participantCount: number;
|
|
750
|
+
status: JoopSplitStatus;
|
|
751
|
+
};
|
|
752
|
+
change$(): JoopObservable<JoopSplitExpense>;
|
|
753
|
+
private _computeShares;
|
|
754
|
+
private _updateStatus;
|
|
755
|
+
private _require;
|
|
756
|
+
private _snapshot;
|
|
757
|
+
}
|
|
758
|
+
|
|
759
|
+
type JoopChequeStatus = 'available' | 'issued' | 'presented' | 'cleared' | 'bounced' | 'stopped' | 'cancelled' | 'expired';
|
|
760
|
+
interface JoopChequeLeaf {
|
|
761
|
+
chequeNumber: string;
|
|
762
|
+
chequebookId: string;
|
|
763
|
+
accountId: string;
|
|
764
|
+
status: JoopChequeStatus;
|
|
765
|
+
issuedTo?: string;
|
|
766
|
+
amount?: number;
|
|
767
|
+
issuedAt?: number;
|
|
768
|
+
presentedAt?: number;
|
|
769
|
+
clearedAt?: number;
|
|
770
|
+
stoppedAt?: number;
|
|
771
|
+
stopReason?: string;
|
|
772
|
+
bounceReason?: string;
|
|
773
|
+
expiresAt?: number;
|
|
774
|
+
notes?: string;
|
|
775
|
+
}
|
|
776
|
+
interface JoopChequebook {
|
|
777
|
+
id: string;
|
|
778
|
+
accountId: string;
|
|
779
|
+
seriesStart: string;
|
|
780
|
+
seriesEnd: string;
|
|
781
|
+
leaves: JoopChequeLeaf[];
|
|
782
|
+
issuedAt: number;
|
|
783
|
+
isActive: boolean;
|
|
784
|
+
}
|
|
785
|
+
interface JoopChequebookStats {
|
|
786
|
+
total: number;
|
|
787
|
+
available: number;
|
|
788
|
+
issued: number;
|
|
789
|
+
presented: number;
|
|
790
|
+
cleared: number;
|
|
791
|
+
bounced: number;
|
|
792
|
+
stopped: number;
|
|
793
|
+
cancelled: number;
|
|
794
|
+
expired: number;
|
|
795
|
+
}
|
|
796
|
+
declare class JoopChequebookService {
|
|
797
|
+
private _books;
|
|
798
|
+
private _leafIndex;
|
|
799
|
+
private _change$;
|
|
800
|
+
addChequebook(accountId: string, seriesStart: string, seriesEnd: string): JoopChequebook;
|
|
801
|
+
getChequebook(id: string): JoopChequebook | undefined;
|
|
802
|
+
getByAccount(accountId: string): JoopChequebook[];
|
|
803
|
+
deactivateChequebook(id: string): void;
|
|
804
|
+
issueCheque(chequeNumber: string, issuedTo: string, amount: number, options?: {
|
|
805
|
+
expiresAt?: number;
|
|
806
|
+
notes?: string;
|
|
807
|
+
}): JoopChequeLeaf;
|
|
808
|
+
stopPayment(chequeNumber: string, reason: string): JoopChequeLeaf;
|
|
809
|
+
markPresented(chequeNumber: string, presentedAt?: number): JoopChequeLeaf;
|
|
810
|
+
markCleared(chequeNumber: string, clearedAt?: number): JoopChequeLeaf;
|
|
811
|
+
markBounced(chequeNumber: string, reason?: string): JoopChequeLeaf;
|
|
812
|
+
cancelCheque(chequeNumber: string): JoopChequeLeaf;
|
|
813
|
+
getLeaf(chequeNumber: string): JoopChequeLeaf | undefined;
|
|
814
|
+
getByStatus(status: JoopChequeStatus, accountId?: string): JoopChequeLeaf[];
|
|
815
|
+
getAvailableLeaves(accountId?: string): JoopChequeLeaf[];
|
|
816
|
+
isValid(chequeNumber: string): boolean;
|
|
817
|
+
getStats(accountId?: string): JoopChequebookStats;
|
|
818
|
+
change$(): JoopObservable<JoopChequeLeaf>;
|
|
819
|
+
private _requireLeaf;
|
|
820
|
+
private _generateLeaves;
|
|
821
|
+
private _snapshotBook;
|
|
822
|
+
}
|
|
823
|
+
|
|
824
|
+
type JoopInsuranceType = 'life' | 'health' | 'auto' | 'home' | 'travel' | 'business' | 'other';
|
|
825
|
+
type JoopPolicyStatus = 'active' | 'expired' | 'cancelled' | 'lapsed' | 'pending';
|
|
826
|
+
type JoopClaimStatus = 'submitted' | 'under-review' | 'approved' | 'rejected' | 'paid' | 'withdrawn';
|
|
827
|
+
type JoopPremiumFrequency = 'monthly' | 'quarterly' | 'half-yearly' | 'yearly';
|
|
828
|
+
interface JoopInsurancePolicy {
|
|
829
|
+
id: string;
|
|
830
|
+
type: JoopInsuranceType;
|
|
831
|
+
policyNumber: string;
|
|
832
|
+
insurer: string;
|
|
833
|
+
holderName: string;
|
|
834
|
+
coverageAmount: number;
|
|
835
|
+
premiumAmount: number;
|
|
836
|
+
premiumFrequency: JoopPremiumFrequency;
|
|
837
|
+
status: JoopPolicyStatus;
|
|
838
|
+
startDate: number;
|
|
839
|
+
endDate: number;
|
|
840
|
+
nextPremiumDate?: number;
|
|
841
|
+
deductible?: number;
|
|
842
|
+
notes?: string;
|
|
843
|
+
createdAt: number;
|
|
844
|
+
updatedAt: number;
|
|
845
|
+
}
|
|
846
|
+
interface JoopInsuranceClaim {
|
|
847
|
+
id: string;
|
|
848
|
+
claimNumber: string;
|
|
849
|
+
policyId: string;
|
|
850
|
+
amount: number;
|
|
851
|
+
status: JoopClaimStatus;
|
|
852
|
+
description: string;
|
|
853
|
+
documents: string[];
|
|
854
|
+
submittedAt: number;
|
|
855
|
+
resolvedAt?: number;
|
|
856
|
+
paidAmount?: number;
|
|
857
|
+
rejectionReason?: string;
|
|
858
|
+
}
|
|
859
|
+
interface JoopPremiumPayment {
|
|
860
|
+
id: string;
|
|
861
|
+
policyId: string;
|
|
862
|
+
amount: number;
|
|
863
|
+
date: number;
|
|
864
|
+
method?: string;
|
|
865
|
+
}
|
|
866
|
+
declare class JoopInsuranceService {
|
|
867
|
+
private _policies;
|
|
868
|
+
private _claims;
|
|
869
|
+
private _payments;
|
|
870
|
+
private _claimCounter;
|
|
871
|
+
private _change$;
|
|
872
|
+
addPolicy(data: Omit<JoopInsurancePolicy, 'id' | 'createdAt' | 'updatedAt'>): JoopInsurancePolicy;
|
|
873
|
+
updatePolicy(id: string, patch: Partial<Omit<JoopInsurancePolicy, 'id' | 'createdAt'>>): JoopInsurancePolicy;
|
|
874
|
+
cancelPolicy(id: string, reason?: string): JoopInsurancePolicy;
|
|
875
|
+
renewPolicy(id: string, newEndDate: number): JoopInsurancePolicy;
|
|
876
|
+
getPolicy(id: string): JoopInsurancePolicy | undefined;
|
|
877
|
+
getAll(): JoopInsurancePolicy[];
|
|
878
|
+
getActive(): JoopInsurancePolicy[];
|
|
879
|
+
getByType(type: JoopInsuranceType): JoopInsurancePolicy[];
|
|
880
|
+
getExpiring(withinDays: number, asOf?: number): JoopInsurancePolicy[];
|
|
881
|
+
fileClaim(policyId: string, amount: number, description: string, documents?: string[]): JoopInsuranceClaim;
|
|
882
|
+
updateClaim(id: string, status: JoopClaimStatus, options?: {
|
|
883
|
+
paidAmount?: number;
|
|
884
|
+
rejectionReason?: string;
|
|
885
|
+
}): JoopInsuranceClaim;
|
|
886
|
+
getClaims(policyId?: string): JoopInsuranceClaim[];
|
|
887
|
+
recordPremiumPayment(policyId: string, amount: number, method?: string): JoopPremiumPayment;
|
|
888
|
+
getPremiumHistory(policyId: string): JoopPremiumPayment[];
|
|
889
|
+
getTotalCoverage(): number;
|
|
890
|
+
getTotalAnnualPremium(): number;
|
|
891
|
+
change$(): JoopObservable<JoopInsurancePolicy>;
|
|
892
|
+
private _require;
|
|
893
|
+
private _requireClaim;
|
|
894
|
+
}
|
|
895
|
+
|
|
896
|
+
type JoopRemittanceStatus = 'initiated' | 'processing' | 'completed' | 'failed' | 'cancelled' | 'returned';
|
|
897
|
+
type JoopRemittanceChannel = 'swift' | 'sepa' | 'ach' | 'wire' | 'crypto' | 'mobile-money' | 'cash-pickup';
|
|
898
|
+
interface JoopRemittanceQuote {
|
|
899
|
+
sendAmount: number;
|
|
900
|
+
sendCurrency: string;
|
|
901
|
+
receiveAmount: number;
|
|
902
|
+
receiveCurrency: string;
|
|
903
|
+
exchangeRate: number;
|
|
904
|
+
fee: number;
|
|
905
|
+
totalDebit: number;
|
|
906
|
+
estimatedArrivalMs: number;
|
|
907
|
+
channel: JoopRemittanceChannel;
|
|
908
|
+
}
|
|
909
|
+
interface JoopRemittance {
|
|
910
|
+
id: string;
|
|
911
|
+
ref: string;
|
|
912
|
+
sendAmount: number;
|
|
913
|
+
sendCurrency: string;
|
|
914
|
+
receiveAmount: number;
|
|
915
|
+
receiveCurrency: string;
|
|
916
|
+
exchangeRate: number;
|
|
917
|
+
fee: number;
|
|
918
|
+
totalDebit: number;
|
|
919
|
+
status: JoopRemittanceStatus;
|
|
920
|
+
channel: JoopRemittanceChannel;
|
|
921
|
+
senderName: string;
|
|
922
|
+
senderAccount: string;
|
|
923
|
+
recipientName: string;
|
|
924
|
+
recipientAccount: string;
|
|
925
|
+
recipientBankCode?: string;
|
|
926
|
+
recipientCountry: string;
|
|
927
|
+
purposeCode?: string;
|
|
928
|
+
notes?: string;
|
|
929
|
+
initiatedAt: number;
|
|
930
|
+
completedAt?: number;
|
|
931
|
+
estimatedArrival?: number;
|
|
932
|
+
}
|
|
933
|
+
declare class JoopRemittanceService {
|
|
934
|
+
private _remittances;
|
|
935
|
+
private _rates;
|
|
936
|
+
private _fees;
|
|
937
|
+
private _counter;
|
|
938
|
+
private _change$;
|
|
939
|
+
setExchangeRate(from: string, to: string, rate: number): void;
|
|
940
|
+
getExchangeRate(from: string, to: string): number | null;
|
|
941
|
+
setChannelFee(channel: JoopRemittanceChannel, fee: number): void;
|
|
942
|
+
getFee(channel: JoopRemittanceChannel): number;
|
|
943
|
+
getQuote(sendAmount: number, sendCurrency: string, receiveCurrency: string, channel?: JoopRemittanceChannel): JoopRemittanceQuote;
|
|
944
|
+
initiate(data: {
|
|
945
|
+
sendAmount: number;
|
|
946
|
+
sendCurrency: string;
|
|
947
|
+
receiveCurrency: string;
|
|
948
|
+
channel: JoopRemittanceChannel;
|
|
949
|
+
senderName: string;
|
|
950
|
+
senderAccount: string;
|
|
951
|
+
recipientName: string;
|
|
952
|
+
recipientAccount: string;
|
|
953
|
+
recipientCountry: string;
|
|
954
|
+
recipientBankCode?: string;
|
|
955
|
+
purposeCode?: string;
|
|
956
|
+
notes?: string;
|
|
957
|
+
}): JoopRemittance;
|
|
958
|
+
cancel(id: string): JoopRemittance;
|
|
959
|
+
updateStatus(id: string, status: JoopRemittanceStatus, options?: {
|
|
960
|
+
notes?: string;
|
|
961
|
+
}): JoopRemittance;
|
|
962
|
+
getById(id: string): JoopRemittance | undefined;
|
|
963
|
+
getByRef(ref: string): JoopRemittance | undefined;
|
|
964
|
+
getByStatus(status: JoopRemittanceStatus): JoopRemittance[];
|
|
965
|
+
getHistory(limit?: number): JoopRemittance[];
|
|
966
|
+
getTotalSent(currency?: string): number;
|
|
967
|
+
change$(): JoopObservable<JoopRemittance>;
|
|
968
|
+
private _transition;
|
|
969
|
+
private _generateRef;
|
|
970
|
+
}
|
|
971
|
+
|
|
972
|
+
type JoopVirtualAccountStatus = 'active' | 'inactive' | 'closed';
|
|
973
|
+
type JoopVirtualAccountPurpose = 'collection' | 'escrow' | 'payroll' | 'vendor' | 'customer' | 'project' | 'other';
|
|
974
|
+
interface JoopVirtualAccount {
|
|
975
|
+
id: string;
|
|
976
|
+
accountNumber: string;
|
|
977
|
+
iban?: string;
|
|
978
|
+
parentAccountId: string;
|
|
979
|
+
label: string;
|
|
980
|
+
purpose: JoopVirtualAccountPurpose;
|
|
981
|
+
status: JoopVirtualAccountStatus;
|
|
982
|
+
currency: string;
|
|
983
|
+
collectedAmount: number;
|
|
984
|
+
expectedAmount?: number;
|
|
985
|
+
reference?: string;
|
|
986
|
+
expiresAt?: number;
|
|
987
|
+
metadata?: Record<string, string>;
|
|
988
|
+
createdAt: number;
|
|
989
|
+
updatedAt: number;
|
|
990
|
+
}
|
|
991
|
+
interface JoopVirtualCredit {
|
|
992
|
+
id: string;
|
|
993
|
+
virtualAccountId: string;
|
|
994
|
+
amount: number;
|
|
995
|
+
currency: string;
|
|
996
|
+
senderName?: string;
|
|
997
|
+
senderRef?: string;
|
|
998
|
+
receivedAt: number;
|
|
999
|
+
notes?: string;
|
|
1000
|
+
}
|
|
1001
|
+
declare class JoopVirtualAccountService {
|
|
1002
|
+
private _accounts;
|
|
1003
|
+
private _credits;
|
|
1004
|
+
private _counter;
|
|
1005
|
+
private _change$;
|
|
1006
|
+
create(data: {
|
|
1007
|
+
parentAccountId: string;
|
|
1008
|
+
label: string;
|
|
1009
|
+
purpose: JoopVirtualAccountPurpose;
|
|
1010
|
+
currency?: string;
|
|
1011
|
+
expectedAmount?: number;
|
|
1012
|
+
reference?: string;
|
|
1013
|
+
expiresAt?: number;
|
|
1014
|
+
metadata?: Record<string, string>;
|
|
1015
|
+
ibanPrefix?: string;
|
|
1016
|
+
}): JoopVirtualAccount;
|
|
1017
|
+
close(id: string): JoopVirtualAccount;
|
|
1018
|
+
deactivate(id: string): JoopVirtualAccount;
|
|
1019
|
+
activate(id: string): JoopVirtualAccount;
|
|
1020
|
+
update(id: string, patch: Partial<Pick<JoopVirtualAccount, 'label' | 'expectedAmount' | 'reference' | 'expiresAt' | 'metadata'>>): JoopVirtualAccount;
|
|
1021
|
+
get(id: string): JoopVirtualAccount | undefined;
|
|
1022
|
+
getAll(): JoopVirtualAccount[];
|
|
1023
|
+
getActive(parentAccountId?: string): JoopVirtualAccount[];
|
|
1024
|
+
getByReference(reference: string): JoopVirtualAccount | undefined;
|
|
1025
|
+
getByPurpose(purpose: JoopVirtualAccountPurpose): JoopVirtualAccount[];
|
|
1026
|
+
getExpiring(withinMs: number, asOf?: number): JoopVirtualAccount[];
|
|
1027
|
+
recordCredit(virtualAccountId: string, amount: number, options?: {
|
|
1028
|
+
currency?: string;
|
|
1029
|
+
senderName?: string;
|
|
1030
|
+
senderRef?: string;
|
|
1031
|
+
notes?: string;
|
|
1032
|
+
}): JoopVirtualCredit;
|
|
1033
|
+
getCredits(virtualAccountId: string): JoopVirtualCredit[];
|
|
1034
|
+
getTotalCollected(virtualAccountId: string): number;
|
|
1035
|
+
isFullyCollected(virtualAccountId: string): boolean;
|
|
1036
|
+
generateAccountNumber(prefix?: string): string;
|
|
1037
|
+
change$(): JoopObservable<JoopVirtualAccount>;
|
|
1038
|
+
private _require;
|
|
1039
|
+
private _setStatus;
|
|
1040
|
+
}
|
|
1041
|
+
|
|
1042
|
+
type JoopAccountType = 'asset' | 'liability' | 'equity' | 'revenue' | 'expense';
|
|
1043
|
+
interface JoopLedgerAccount {
|
|
1044
|
+
code: string;
|
|
1045
|
+
name: string;
|
|
1046
|
+
type: JoopAccountType;
|
|
1047
|
+
description?: string;
|
|
1048
|
+
createdAt: number;
|
|
1049
|
+
}
|
|
1050
|
+
interface JoopJournalLine {
|
|
1051
|
+
accountCode: string;
|
|
1052
|
+
debit: number;
|
|
1053
|
+
credit: number;
|
|
1054
|
+
description?: string;
|
|
1055
|
+
}
|
|
1056
|
+
interface JoopJournalEntry {
|
|
1057
|
+
id: string;
|
|
1058
|
+
ref: string;
|
|
1059
|
+
description: string;
|
|
1060
|
+
date: number;
|
|
1061
|
+
lines: JoopJournalLine[];
|
|
1062
|
+
postedAt: number;
|
|
1063
|
+
postedBy?: string;
|
|
1064
|
+
tags?: string[];
|
|
1065
|
+
}
|
|
1066
|
+
interface JoopTrialBalanceRow {
|
|
1067
|
+
code: string;
|
|
1068
|
+
name: string;
|
|
1069
|
+
type: JoopAccountType;
|
|
1070
|
+
totalDebits: number;
|
|
1071
|
+
totalCredits: number;
|
|
1072
|
+
balance: number;
|
|
1073
|
+
}
|
|
1074
|
+
interface JoopTrialBalance {
|
|
1075
|
+
asOf: number;
|
|
1076
|
+
rows: JoopTrialBalanceRow[];
|
|
1077
|
+
totalDebits: number;
|
|
1078
|
+
totalCredits: number;
|
|
1079
|
+
isBalanced: boolean;
|
|
1080
|
+
}
|
|
1081
|
+
declare class JoopLedgerService {
|
|
1082
|
+
private _accounts;
|
|
1083
|
+
private _entries;
|
|
1084
|
+
private _seq;
|
|
1085
|
+
private _change$;
|
|
1086
|
+
addAccount(code: string, name: string, type: JoopAccountType, description?: string): JoopLedgerAccount;
|
|
1087
|
+
getAccount(code: string): JoopLedgerAccount | undefined;
|
|
1088
|
+
getAccounts(): JoopLedgerAccount[];
|
|
1089
|
+
removeAccount(code: string): void;
|
|
1090
|
+
postEntry(description: string, lines: JoopJournalLine[], opts?: {
|
|
1091
|
+
date?: number;
|
|
1092
|
+
postedBy?: string;
|
|
1093
|
+
tags?: string[];
|
|
1094
|
+
}): JoopJournalEntry;
|
|
1095
|
+
getEntry(id: string): JoopJournalEntry | undefined;
|
|
1096
|
+
getJournal(from?: number, to?: number): JoopJournalEntry[];
|
|
1097
|
+
getBalance(code: string): number;
|
|
1098
|
+
getTrialBalance(): JoopTrialBalance;
|
|
1099
|
+
getBalancesByType(type: JoopAccountType): Record<string, number>;
|
|
1100
|
+
change$(): JoopSubject<JoopJournalEntry>;
|
|
1101
|
+
}
|
|
1102
|
+
|
|
1103
|
+
type JoopReconItemSource = 'internal' | 'bank';
|
|
1104
|
+
type JoopReconMatchStatus = 'matched' | 'unmatched' | 'disputed';
|
|
1105
|
+
interface JoopReconItem {
|
|
1106
|
+
id: string;
|
|
1107
|
+
source: JoopReconItemSource;
|
|
1108
|
+
date: number;
|
|
1109
|
+
amount: number;
|
|
1110
|
+
description: string;
|
|
1111
|
+
reference?: string;
|
|
1112
|
+
}
|
|
1113
|
+
interface JoopReconMatch {
|
|
1114
|
+
id: string;
|
|
1115
|
+
internalId: string;
|
|
1116
|
+
bankId: string;
|
|
1117
|
+
matchedAt: number;
|
|
1118
|
+
isManual: boolean;
|
|
1119
|
+
difference: number;
|
|
1120
|
+
}
|
|
1121
|
+
interface JoopReconSession {
|
|
1122
|
+
id: string;
|
|
1123
|
+
accountId: string;
|
|
1124
|
+
startedAt: number;
|
|
1125
|
+
closedAt?: number;
|
|
1126
|
+
internalItems: JoopReconItem[];
|
|
1127
|
+
bankItems: JoopReconItem[];
|
|
1128
|
+
matches: JoopReconMatch[];
|
|
1129
|
+
}
|
|
1130
|
+
interface JoopReconSummary {
|
|
1131
|
+
sessionId: string;
|
|
1132
|
+
totalInternal: number;
|
|
1133
|
+
totalBank: number;
|
|
1134
|
+
matchedPairs: number;
|
|
1135
|
+
unmatchedInternal: number;
|
|
1136
|
+
unmatchedBank: number;
|
|
1137
|
+
totalDifference: number;
|
|
1138
|
+
isReconciled: boolean;
|
|
1139
|
+
}
|
|
1140
|
+
declare class JoopReconciliationService {
|
|
1141
|
+
private _sessions;
|
|
1142
|
+
private _change$;
|
|
1143
|
+
createSession(accountId: string, bankItems: Omit<JoopReconItem, 'id' | 'source'>[], internalItems?: Omit<JoopReconItem, 'id' | 'source'>[]): JoopReconSession;
|
|
1144
|
+
getSession(id: string): JoopReconSession | undefined;
|
|
1145
|
+
closeSession(id: string): JoopReconSession;
|
|
1146
|
+
addInternalItems(sessionId: string, items: Omit<JoopReconItem, 'id' | 'source'>[]): JoopReconSession;
|
|
1147
|
+
autoMatch(sessionId: string, toleranceAmount?: number, toleranceDays?: number): JoopReconMatch[];
|
|
1148
|
+
manualMatch(sessionId: string, internalId: string, bankId: string): JoopReconMatch;
|
|
1149
|
+
unmatch(sessionId: string, matchId: string): void;
|
|
1150
|
+
getUnmatched(sessionId: string): {
|
|
1151
|
+
internal: JoopReconItem[];
|
|
1152
|
+
bank: JoopReconItem[];
|
|
1153
|
+
};
|
|
1154
|
+
getSummary(sessionId: string): JoopReconSummary;
|
|
1155
|
+
change$(): JoopSubject<JoopReconSession>;
|
|
1156
|
+
private _get;
|
|
1157
|
+
}
|
|
1158
|
+
|
|
1159
|
+
type JoopLimitType = 'per-transaction' | 'daily' | 'weekly' | 'monthly' | 'yearly';
|
|
1160
|
+
type JoopLimitScope = 'account' | 'user' | 'card' | 'channel';
|
|
1161
|
+
interface JoopLimit {
|
|
1162
|
+
id: string;
|
|
1163
|
+
scope: JoopLimitScope;
|
|
1164
|
+
scopeId: string;
|
|
1165
|
+
type: JoopLimitType;
|
|
1166
|
+
maxAmount: number;
|
|
1167
|
+
currency: string;
|
|
1168
|
+
enabled: boolean;
|
|
1169
|
+
createdAt: number;
|
|
1170
|
+
notes?: string;
|
|
1171
|
+
}
|
|
1172
|
+
interface JoopLimitCheckResult {
|
|
1173
|
+
allowed: boolean;
|
|
1174
|
+
limit: JoopLimit;
|
|
1175
|
+
currentUsage: number;
|
|
1176
|
+
remaining: number;
|
|
1177
|
+
requestedAmount: number;
|
|
1178
|
+
reason?: string;
|
|
1179
|
+
}
|
|
1180
|
+
interface JoopUsageRecord {
|
|
1181
|
+
limitId: string;
|
|
1182
|
+
amount: number;
|
|
1183
|
+
recordedAt: number;
|
|
1184
|
+
reference?: string;
|
|
1185
|
+
}
|
|
1186
|
+
interface JoopUsageSummary {
|
|
1187
|
+
scope: JoopLimitScope;
|
|
1188
|
+
scopeId: string;
|
|
1189
|
+
limits: Array<{
|
|
1190
|
+
limitId: string;
|
|
1191
|
+
type: JoopLimitType;
|
|
1192
|
+
maxAmount: number;
|
|
1193
|
+
used: number;
|
|
1194
|
+
remaining: number;
|
|
1195
|
+
utilizationPercent: number;
|
|
1196
|
+
}>;
|
|
1197
|
+
}
|
|
1198
|
+
declare class JoopLimitManagementService {
|
|
1199
|
+
private _limits;
|
|
1200
|
+
private _usage;
|
|
1201
|
+
private _change$;
|
|
1202
|
+
setLimit(scope: JoopLimitScope, scopeId: string, type: JoopLimitType, maxAmount: number, currency?: string, notes?: string): JoopLimit;
|
|
1203
|
+
getLimit(id: string): JoopLimit | undefined;
|
|
1204
|
+
getLimits(scope?: JoopLimitScope, scopeId?: string): JoopLimit[];
|
|
1205
|
+
removeLimit(limitId: string): void;
|
|
1206
|
+
enableLimit(limitId: string): void;
|
|
1207
|
+
disableLimit(limitId: string): void;
|
|
1208
|
+
checkLimit(scope: JoopLimitScope, scopeId: string, type: JoopLimitType, amount: number, currency?: string): JoopLimitCheckResult | null;
|
|
1209
|
+
checkAllLimits(scope: JoopLimitScope, scopeId: string, amount: number, currency?: string): JoopLimitCheckResult[];
|
|
1210
|
+
recordUsage(scope: JoopLimitScope, scopeId: string, type: JoopLimitType, amount: number, currency?: string, reference?: string): void;
|
|
1211
|
+
resetUsage(limitId: string): void;
|
|
1212
|
+
getUsageSummary(scope: JoopLimitScope, scopeId: string): JoopUsageSummary;
|
|
1213
|
+
change$(): JoopSubject<JoopLimit>;
|
|
1214
|
+
private _findLimit;
|
|
1215
|
+
private _currentUsage;
|
|
1216
|
+
private _toggle;
|
|
1217
|
+
}
|
|
1218
|
+
|
|
1219
|
+
type JoopStandingOrderStatus = 'active' | 'paused' | 'cancelled' | 'completed';
|
|
1220
|
+
type JoopStandingOrderFrequency = 'daily' | 'weekly' | 'biweekly' | 'monthly' | 'quarterly' | 'half-yearly' | 'yearly';
|
|
1221
|
+
type JoopExecutionStatus = 'success' | 'failed' | 'skipped';
|
|
1222
|
+
interface JoopStandingOrder {
|
|
1223
|
+
id: string;
|
|
1224
|
+
ref: string;
|
|
1225
|
+
fromAccount: string;
|
|
1226
|
+
toAccount: string;
|
|
1227
|
+
toBeneficiaryName: string;
|
|
1228
|
+
amount: number;
|
|
1229
|
+
currency: string;
|
|
1230
|
+
frequency: JoopStandingOrderFrequency;
|
|
1231
|
+
startDate: number;
|
|
1232
|
+
endDate?: number;
|
|
1233
|
+
status: JoopStandingOrderStatus;
|
|
1234
|
+
nextExecutionAt?: number;
|
|
1235
|
+
executionCount: number;
|
|
1236
|
+
maxExecutions?: number;
|
|
1237
|
+
reference?: string;
|
|
1238
|
+
notes?: string;
|
|
1239
|
+
createdAt: number;
|
|
1240
|
+
}
|
|
1241
|
+
interface JoopStandingOrderExecution {
|
|
1242
|
+
id: string;
|
|
1243
|
+
orderId: string;
|
|
1244
|
+
executedAt: number;
|
|
1245
|
+
amount: number;
|
|
1246
|
+
currency: string;
|
|
1247
|
+
status: JoopExecutionStatus;
|
|
1248
|
+
failureReason?: string;
|
|
1249
|
+
transactionRef?: string;
|
|
1250
|
+
}
|
|
1251
|
+
declare class JoopStandingOrderService {
|
|
1252
|
+
private _orders;
|
|
1253
|
+
private _executions;
|
|
1254
|
+
private _seq;
|
|
1255
|
+
private _change$;
|
|
1256
|
+
create(params: {
|
|
1257
|
+
fromAccount: string;
|
|
1258
|
+
toAccount: string;
|
|
1259
|
+
toBeneficiaryName: string;
|
|
1260
|
+
amount: number;
|
|
1261
|
+
currency?: string;
|
|
1262
|
+
frequency: JoopStandingOrderFrequency;
|
|
1263
|
+
startDate: number;
|
|
1264
|
+
endDate?: number;
|
|
1265
|
+
maxExecutions?: number;
|
|
1266
|
+
reference?: string;
|
|
1267
|
+
notes?: string;
|
|
1268
|
+
}): JoopStandingOrder;
|
|
1269
|
+
update(id: string, patch: Partial<Pick<JoopStandingOrder, 'amount' | 'toBeneficiaryName' | 'endDate' | 'maxExecutions' | 'reference' | 'notes'>>): JoopStandingOrder;
|
|
1270
|
+
pause(id: string): JoopStandingOrder;
|
|
1271
|
+
resume(id: string): JoopStandingOrder;
|
|
1272
|
+
cancel(id: string): JoopStandingOrder;
|
|
1273
|
+
execute(id: string, status?: JoopExecutionStatus, opts?: {
|
|
1274
|
+
failureReason?: string;
|
|
1275
|
+
transactionRef?: string;
|
|
1276
|
+
}): JoopStandingOrderExecution;
|
|
1277
|
+
get(id: string): JoopStandingOrder | undefined;
|
|
1278
|
+
getAll(): JoopStandingOrder[];
|
|
1279
|
+
getActive(): JoopStandingOrder[];
|
|
1280
|
+
getByAccount(accountId: string): JoopStandingOrder[];
|
|
1281
|
+
getDue(asOf?: number): JoopStandingOrder[];
|
|
1282
|
+
getExecutions(orderId: string): JoopStandingOrderExecution[];
|
|
1283
|
+
change$(): JoopSubject<JoopStandingOrder>;
|
|
1284
|
+
private _get;
|
|
1285
|
+
}
|
|
1286
|
+
|
|
1287
|
+
type JoopLoanAccountStatus = 'active' | 'closed' | 'defaulted' | 'written-off';
|
|
1288
|
+
type JoopRepaymentStatus = 'pending' | 'paid' | 'partial' | 'overdue' | 'waived';
|
|
1289
|
+
interface JoopLoanAccount {
|
|
1290
|
+
id: string;
|
|
1291
|
+
ref: string;
|
|
1292
|
+
borrowerName: string;
|
|
1293
|
+
borrowerId: string;
|
|
1294
|
+
principalAmount: number;
|
|
1295
|
+
outstandingPrincipal: number;
|
|
1296
|
+
annualInterestRatePercent: number;
|
|
1297
|
+
tenureMonths: number;
|
|
1298
|
+
disbursedAt: number;
|
|
1299
|
+
status: JoopLoanAccountStatus;
|
|
1300
|
+
emiAmount: number;
|
|
1301
|
+
currency: string;
|
|
1302
|
+
nextDueDate: number;
|
|
1303
|
+
totalPaid: number;
|
|
1304
|
+
penaltyRatePercent: number;
|
|
1305
|
+
notes?: string;
|
|
1306
|
+
}
|
|
1307
|
+
interface JoopInstallment {
|
|
1308
|
+
installmentNumber: number;
|
|
1309
|
+
dueDate: number;
|
|
1310
|
+
principalComponent: number;
|
|
1311
|
+
interestComponent: number;
|
|
1312
|
+
totalDue: number;
|
|
1313
|
+
outstandingAfter: number;
|
|
1314
|
+
status: JoopRepaymentStatus;
|
|
1315
|
+
paidAmount: number;
|
|
1316
|
+
paidAt?: number;
|
|
1317
|
+
}
|
|
1318
|
+
interface JoopLoanPayment {
|
|
1319
|
+
id: string;
|
|
1320
|
+
loanId: string;
|
|
1321
|
+
amount: number;
|
|
1322
|
+
paidAt: number;
|
|
1323
|
+
interestPaid: number;
|
|
1324
|
+
principalPaid: number;
|
|
1325
|
+
penaltyPaid: number;
|
|
1326
|
+
reference?: string;
|
|
1327
|
+
}
|
|
1328
|
+
interface JoopLoanStatement {
|
|
1329
|
+
loan: JoopLoanAccount;
|
|
1330
|
+
schedule: JoopInstallment[];
|
|
1331
|
+
payments: JoopLoanPayment[];
|
|
1332
|
+
outstandingPrincipal: number;
|
|
1333
|
+
accruedInterest: number;
|
|
1334
|
+
totalOverdue: number;
|
|
1335
|
+
}
|
|
1336
|
+
declare class JoopLoanServicingService {
|
|
1337
|
+
private _loans;
|
|
1338
|
+
private _schedules;
|
|
1339
|
+
private _payments;
|
|
1340
|
+
private _seq;
|
|
1341
|
+
private _change$;
|
|
1342
|
+
createLoan(params: {
|
|
1343
|
+
borrowerName: string;
|
|
1344
|
+
borrowerId: string;
|
|
1345
|
+
principalAmount: number;
|
|
1346
|
+
annualInterestRatePercent: number;
|
|
1347
|
+
tenureMonths: number;
|
|
1348
|
+
disbursedAt?: number;
|
|
1349
|
+
currency?: string;
|
|
1350
|
+
penaltyRatePercent?: number;
|
|
1351
|
+
notes?: string;
|
|
1352
|
+
}): JoopLoanAccount;
|
|
1353
|
+
recordPayment(loanId: string, amount: number, opts?: {
|
|
1354
|
+
paidAt?: number;
|
|
1355
|
+
reference?: string;
|
|
1356
|
+
}): JoopLoanPayment;
|
|
1357
|
+
waveInstallment(loanId: string, installmentNumber: number): void;
|
|
1358
|
+
markDefaulted(loanId: string): JoopLoanAccount;
|
|
1359
|
+
getLoan(id: string): JoopLoanAccount | undefined;
|
|
1360
|
+
getAll(): JoopLoanAccount[];
|
|
1361
|
+
getActive(): JoopLoanAccount[];
|
|
1362
|
+
getByBorrower(borrowerId: string): JoopLoanAccount[];
|
|
1363
|
+
getSchedule(loanId: string): JoopInstallment[];
|
|
1364
|
+
getPendingInstallments(loanId: string): JoopInstallment[];
|
|
1365
|
+
getOverdueInstallments(loanId: string): JoopInstallment[];
|
|
1366
|
+
getOutstandingBalance(loanId: string): number;
|
|
1367
|
+
getAccruedInterest(loanId: string, asOf?: number): number;
|
|
1368
|
+
getLoanStatement(loanId: string): JoopLoanStatement;
|
|
1369
|
+
change$(): JoopSubject<JoopLoanAccount>;
|
|
1370
|
+
private _get;
|
|
1371
|
+
private _markOverdue;
|
|
1372
|
+
}
|
|
1373
|
+
|
|
1374
|
+
type JoopWalletStatus = 'active' | 'frozen' | 'closed';
|
|
1375
|
+
type JoopWalletTxnType = 'topup' | 'transfer-out' | 'transfer-in' | 'payment' | 'refund' | 'cashback' | 'withdrawal' | 'fee';
|
|
1376
|
+
interface JoopWallet {
|
|
1377
|
+
id: string;
|
|
1378
|
+
userId: string;
|
|
1379
|
+
label?: string;
|
|
1380
|
+
currency: string;
|
|
1381
|
+
balance: number;
|
|
1382
|
+
status: JoopWalletStatus;
|
|
1383
|
+
createdAt: number;
|
|
1384
|
+
dailyLimit?: number;
|
|
1385
|
+
monthlyLimit?: number;
|
|
1386
|
+
}
|
|
1387
|
+
interface JoopWalletTransaction {
|
|
1388
|
+
id: string;
|
|
1389
|
+
walletId: string;
|
|
1390
|
+
type: JoopWalletTxnType;
|
|
1391
|
+
amount: number;
|
|
1392
|
+
balanceBefore: number;
|
|
1393
|
+
balanceAfter: number;
|
|
1394
|
+
description: string;
|
|
1395
|
+
reference?: string;
|
|
1396
|
+
counterpartyId?: string;
|
|
1397
|
+
counterpartyName?: string;
|
|
1398
|
+
createdAt: number;
|
|
1399
|
+
metadata?: Record<string, unknown>;
|
|
1400
|
+
}
|
|
1401
|
+
interface JoopTransferResult {
|
|
1402
|
+
fromTxn: JoopWalletTransaction;
|
|
1403
|
+
toTxn: JoopWalletTransaction;
|
|
1404
|
+
}
|
|
1405
|
+
declare class JoopDigitalWalletService {
|
|
1406
|
+
private _wallets;
|
|
1407
|
+
private _transactions;
|
|
1408
|
+
private _balance$;
|
|
1409
|
+
createWallet(userId: string, opts?: {
|
|
1410
|
+
label?: string;
|
|
1411
|
+
currency?: string;
|
|
1412
|
+
dailyLimit?: number;
|
|
1413
|
+
monthlyLimit?: number;
|
|
1414
|
+
}): JoopWallet;
|
|
1415
|
+
freeze(walletId: string): JoopWallet;
|
|
1416
|
+
unfreeze(walletId: string): JoopWallet;
|
|
1417
|
+
close(walletId: string): JoopWallet;
|
|
1418
|
+
updateLimits(walletId: string, limits: {
|
|
1419
|
+
dailyLimit?: number;
|
|
1420
|
+
monthlyLimit?: number;
|
|
1421
|
+
}): JoopWallet;
|
|
1422
|
+
topUp(walletId: string, amount: number, opts?: {
|
|
1423
|
+
reference?: string;
|
|
1424
|
+
description?: string;
|
|
1425
|
+
}): JoopWalletTransaction;
|
|
1426
|
+
withdraw(walletId: string, amount: number, opts?: {
|
|
1427
|
+
reference?: string;
|
|
1428
|
+
description?: string;
|
|
1429
|
+
}): JoopWalletTransaction;
|
|
1430
|
+
pay(walletId: string, amount: number, merchantId: string, merchantName: string, opts?: {
|
|
1431
|
+
reference?: string;
|
|
1432
|
+
metadata?: Record<string, unknown>;
|
|
1433
|
+
}): JoopWalletTransaction;
|
|
1434
|
+
transfer(fromWalletId: string, toWalletId: string, amount: number, opts?: {
|
|
1435
|
+
note?: string;
|
|
1436
|
+
reference?: string;
|
|
1437
|
+
}): JoopTransferResult;
|
|
1438
|
+
refund(originalTxnId: string, opts?: {
|
|
1439
|
+
amount?: number;
|
|
1440
|
+
reason?: string;
|
|
1441
|
+
}): JoopWalletTransaction;
|
|
1442
|
+
getWallet(id: string): JoopWallet | undefined;
|
|
1443
|
+
getWalletsByUser(userId: string): JoopWallet[];
|
|
1444
|
+
getBalance(walletId: string): number;
|
|
1445
|
+
getTransactions(walletId: string, limit?: number): JoopWalletTransaction[];
|
|
1446
|
+
getTotalSpent(walletId: string, from?: number, to?: number): number;
|
|
1447
|
+
getTotalTopUp(walletId: string): number;
|
|
1448
|
+
balance$(): JoopBehaviorSubject<{
|
|
1449
|
+
walletId: string;
|
|
1450
|
+
balance: number;
|
|
1451
|
+
} | null>;
|
|
1452
|
+
private _get;
|
|
1453
|
+
private _getActive;
|
|
1454
|
+
private _assertSufficientBalance;
|
|
1455
|
+
private _record;
|
|
1456
|
+
}
|
|
1457
|
+
|
|
1458
|
+
type JoopForwardType = 'buy' | 'sell';
|
|
1459
|
+
type JoopForwardStatus = 'open' | 'settled' | 'cancelled' | 'expired';
|
|
1460
|
+
interface JoopFxForward {
|
|
1461
|
+
id: string;
|
|
1462
|
+
ref: string;
|
|
1463
|
+
type: JoopForwardType;
|
|
1464
|
+
baseCurrency: string;
|
|
1465
|
+
quoteCurrency: string;
|
|
1466
|
+
notionalAmount: number;
|
|
1467
|
+
contractRate: number;
|
|
1468
|
+
spotRateAtCreation: number;
|
|
1469
|
+
maturityDate: number;
|
|
1470
|
+
status: JoopForwardStatus;
|
|
1471
|
+
counterpartyId?: string;
|
|
1472
|
+
counterpartyName?: string;
|
|
1473
|
+
createdAt: number;
|
|
1474
|
+
settledAt?: number;
|
|
1475
|
+
settlementSpotRate?: number;
|
|
1476
|
+
pnl?: number;
|
|
1477
|
+
notes?: string;
|
|
1478
|
+
}
|
|
1479
|
+
interface JoopForwardSettlement {
|
|
1480
|
+
forwardId: string;
|
|
1481
|
+
ref: string;
|
|
1482
|
+
settledAt: number;
|
|
1483
|
+
contractRate: number;
|
|
1484
|
+
spotRate: number;
|
|
1485
|
+
notionalAmount: number;
|
|
1486
|
+
baseCurrency: string;
|
|
1487
|
+
quoteCurrency: string;
|
|
1488
|
+
pnl: number;
|
|
1489
|
+
}
|
|
1490
|
+
interface JoopFxExposure {
|
|
1491
|
+
currency: string;
|
|
1492
|
+
type: JoopForwardType;
|
|
1493
|
+
totalNotional: number;
|
|
1494
|
+
contractCount: number;
|
|
1495
|
+
}
|
|
1496
|
+
declare class JoopFxForwardService {
|
|
1497
|
+
private _forwards;
|
|
1498
|
+
private _settlements;
|
|
1499
|
+
private _spotRates;
|
|
1500
|
+
private _seq;
|
|
1501
|
+
private _change$;
|
|
1502
|
+
setSpotRate(baseCurrency: string, quoteCurrency: string, rate: number): void;
|
|
1503
|
+
getSpotRate(baseCurrency: string, quoteCurrency: string): number | undefined;
|
|
1504
|
+
createForward(params: {
|
|
1505
|
+
type: JoopForwardType;
|
|
1506
|
+
baseCurrency: string;
|
|
1507
|
+
quoteCurrency: string;
|
|
1508
|
+
notionalAmount: number;
|
|
1509
|
+
contractRate: number;
|
|
1510
|
+
maturityDate: number;
|
|
1511
|
+
counterpartyId?: string;
|
|
1512
|
+
counterpartyName?: string;
|
|
1513
|
+
notes?: string;
|
|
1514
|
+
}): JoopFxForward;
|
|
1515
|
+
settleForward(id: string, spotRate?: number): JoopForwardSettlement;
|
|
1516
|
+
cancelForward(id: string, notes?: string): JoopFxForward;
|
|
1517
|
+
expireForward(id: string): JoopFxForward;
|
|
1518
|
+
get(id: string): JoopFxForward | undefined;
|
|
1519
|
+
getAll(status?: JoopForwardStatus): JoopFxForward[];
|
|
1520
|
+
getExpiring(withinMs: number, asOf?: number): JoopFxForward[];
|
|
1521
|
+
getSettlements(): JoopForwardSettlement[];
|
|
1522
|
+
getSettlement(forwardId: string): JoopForwardSettlement | undefined;
|
|
1523
|
+
getExposure(currency: string, type?: JoopForwardType): JoopFxExposure[];
|
|
1524
|
+
getTotalPnL(): number;
|
|
1525
|
+
getMarkToMarket(id: string): number;
|
|
1526
|
+
change$(): JoopSubject<JoopFxForward>;
|
|
1527
|
+
private _get;
|
|
1528
|
+
}
|
|
1529
|
+
|
|
1530
|
+
export { type JoopAccountType, type JoopBeneficiary, JoopBeneficiaryService, type JoopBeneficiaryType, type JoopBeneficiaryValidation, type JoopBill, type JoopBillPayment, JoopBillPaymentService, type JoopBillPaymentStatus, type JoopBillPaymentSummary, type JoopBillStatus, type JoopBiller, type JoopBillerCategory, type JoopBitcoinParams, type JoopCardControls, type JoopCardInfo, JoopCardManagementService, type JoopCardNetwork, type JoopCardSpendingLimits, type JoopCardStatus, type JoopCardTransactionCheck, type JoopCardType, type JoopChequeLeaf, type JoopChequeStatus, type JoopChequebook, JoopChequebookService, type JoopChequebookStats, type JoopClaimStatus, type JoopCurrencyFormatOptions, JoopDigitalWalletService, type JoopDispute, type JoopDisputeEvidence, type JoopDisputeReason, JoopDisputeService, type JoopDisputeStats, type JoopDisputeStatus, type JoopEthereumParams, type JoopExecutionStatus, type JoopForwardSettlement, type JoopForwardStatus, type JoopForwardType, type JoopFxExposure, type JoopFxForward, JoopFxForwardService, type JoopInstallment, type JoopInsuranceClaim, type JoopInsurancePolicy, JoopInsuranceService, type JoopInsuranceType, type JoopJournalEntry, type JoopJournalLine, type JoopLedgerAccount, JoopLedgerService, type JoopLimit, type JoopLimitCheckResult, JoopLimitManagementService, type JoopLimitScope, type JoopLimitType, type JoopLoanAccount, type JoopLoanAccountStatus, type JoopLoanPayment, JoopLoanServicingService, type JoopLoanStatement, type JoopManagedCard, type JoopManagedCardNetwork, type JoopMandate, type JoopMandateExecution, type JoopMandateExecutionStatus, type JoopMandateFrequency, JoopMandateService, type JoopMandateStatus, type JoopMandateType, type JoopNotification, JoopNotificationCenterService, type JoopNotificationPriority, type JoopNotificationSummary, type JoopNotificationType, type JoopPayToParams, type JoopPaymentExecution, type JoopPaymentUri, type JoopPaymentUriScheme, JoopPaymentUriService, type JoopPolicyStatus, type JoopPremiumFrequency, type JoopPremiumPayment, type JoopReconItem, type JoopReconItemSource, type JoopReconMatch, type JoopReconMatchStatus, type JoopReconSession, type JoopReconSummary, JoopReconciliationService, type JoopRecurrenceFrequency, type JoopRemittance, type JoopRemittanceChannel, type JoopRemittanceQuote, JoopRemittanceService, type JoopRemittanceStatus, type JoopRepaymentStatus, type JoopScheduledPayment, JoopScheduledPaymentService, type JoopScheduledPaymentStatus, type JoopSepaParams, type JoopSplitBalance, type JoopSplitExpense, type JoopSplitMethod, type JoopSplitParticipant, type JoopSplitParticipantStatus, JoopSplitPaymentService, type JoopSplitSettlement, type JoopSplitStatus, type JoopStandingOrder, type JoopStandingOrderExecution, type JoopStandingOrderFrequency, JoopStandingOrderService, type JoopStandingOrderStatus, type JoopStatement, type JoopStatementEntry, type JoopStatementFormat, JoopStatementGeneratorService, type JoopStatementOptions, type JoopStatementTransaction, type JoopTransactionRef, type JoopTransactionType, type JoopTransferResult, type JoopTrialBalance, type JoopTrialBalanceRow, type JoopUpiParams, type JoopUsageRecord, type JoopUsageSummary, type JoopVirtualAccount, type JoopVirtualAccountPurpose, JoopVirtualAccountService, type JoopVirtualAccountStatus, type JoopVirtualCredit, type JoopWallet, type JoopWalletStatus, type JoopWalletTransaction, type JoopWalletTxnType, clampAmount, convertCurrency, formatAmount, formatCard, formatCardNumber, formatCurrency, formatIban, formatMyKad, fromMinorUnits, generateBatchId, generateReferenceNumber, generateTransactionId, getCardInfo, getCardNetwork, getCurrencySymbol, getIbanCountry, getSupportedIbanCountries, isCardExpired, isValidAmount, isValidTransactionId, luhnCheckDigit, maskAccountNumber, maskCard, maskEmail, maskIban, maskInterleaved, maskKeepMiddle, maskKeepSeparators, maskMyKad, maskName, maskNric, maskPattern, maskPhone, maskRange, maskShowFirst, maskShowLast, parseCurrencyString, parseIban, parseTransactionId, roundAmount, safeAdd, safeDivide, safeMultiply, safeSubtract, sumAmounts, toMinorUnits, validateCvv, validateIban, validateLuhn, validateMyKad, validateNric };
|