@cranberry-money/shared-utils 8.17.6 → 8.17.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/auth.d.ts +1 -25
- package/dist/auth.d.ts.map +1 -1
- package/dist/badge-status.d.ts +2 -6
- package/dist/badge-status.d.ts.map +1 -1
- package/dist/badge.d.ts +1 -9
- package/dist/badge.d.ts.map +1 -1
- package/dist/date.d.ts +64 -0
- package/dist/instruments.d.ts +1 -33
- package/dist/instruments.d.ts.map +1 -1
- package/dist/portfolio-validation.d.ts +1 -5
- package/dist/portfolio-validation.d.ts.map +1 -1
- package/dist/text.d.ts +22 -0
- package/dist/validation.d.ts +1 -13
- package/dist/validation.d.ts.map +1 -1
- package/dist/withdrawal.d.ts +1 -9
- package/dist/withdrawal.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/auth.d.ts
CHANGED
|
@@ -1,30 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Authentication and token management utilities
|
|
3
3
|
*/
|
|
4
|
-
|
|
5
|
-
browser: string;
|
|
6
|
-
os: string;
|
|
7
|
-
}
|
|
8
|
-
interface TokenRefreshResponse {
|
|
9
|
-
status?: number;
|
|
10
|
-
data?: {
|
|
11
|
-
access?: string;
|
|
12
|
-
refresh?: string;
|
|
13
|
-
};
|
|
14
|
-
}
|
|
15
|
-
interface TokenRefreshError {
|
|
16
|
-
response?: {
|
|
17
|
-
data?: {
|
|
18
|
-
detail?: string;
|
|
19
|
-
message?: string;
|
|
20
|
-
};
|
|
21
|
-
};
|
|
22
|
-
message?: string;
|
|
23
|
-
}
|
|
24
|
-
interface AutoRefreshHandler {
|
|
25
|
-
start: () => void;
|
|
26
|
-
stop: () => void;
|
|
27
|
-
}
|
|
4
|
+
import type { DeviceInfo, TokenRefreshResponse, TokenRefreshError, AutoRefreshHandler } from '@cranberry-money/shared-types';
|
|
28
5
|
/**
|
|
29
6
|
* Check if a token has expired based on its expiration timestamp
|
|
30
7
|
* @param expiresAt - The expiration timestamp
|
|
@@ -75,5 +52,4 @@ export declare function getRefreshErrorMessage(error: TokenRefreshError): string
|
|
|
75
52
|
* @returns Auto refresh handler with start/stop methods
|
|
76
53
|
*/
|
|
77
54
|
export declare function createAutoRefreshHandler(refreshCallback: () => Promise<void>, checkInterval?: number): AutoRefreshHandler;
|
|
78
|
-
export {};
|
|
79
55
|
//# sourceMappingURL=auth.d.ts.map
|
package/dist/auth.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../src/auth.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,
|
|
1
|
+
{"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../src/auth.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,KAAK,EACV,UAAU,EACV,oBAAoB,EACpB,iBAAiB,EACjB,kBAAkB,EACnB,MAAM,+BAA+B,CAAC;AAkBvC;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAIzD;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,CACjC,SAAS,EAAE,MAAM,EACjB,mBAAmB,GAAE,MAA6C,GACjE,OAAO,CAMT;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAU5D;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAkB/D;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,SAAS,EAAE,MAAM,GAAG,UAAU,CAwB7D;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,oBAAoB,GAAG,OAAO,CAExE;AAED;;;;GAIG;AACH,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,iBAAiB,GAAG,MAAM,CAWvE;AAED;;;;;GAKG;AACH,wBAAgB,wBAAwB,CACtC,eAAe,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,EACpC,aAAa,GAAE,MAAc,GAC5B,kBAAkB,CAiBpB"}
|
package/dist/badge-status.d.ts
CHANGED
|
@@ -4,11 +4,8 @@
|
|
|
4
4
|
* This module provides pre-configured badge functions for common status types
|
|
5
5
|
* in the MyPortfolio platform. It builds on top of the core badge system.
|
|
6
6
|
*/
|
|
7
|
-
import type {
|
|
8
|
-
|
|
9
|
-
displayText: string;
|
|
10
|
-
}
|
|
11
|
-
type BadgeSize = 'sm' | 'md' | 'lg';
|
|
7
|
+
import type { StatusBadgeStyle, TradeStatus, WithdrawalStatus, LiquidationStatus, TargetTradeStatus } from '@cranberry-money/shared-types';
|
|
8
|
+
import type { BadgeSize } from '@cranberry-money/shared-types';
|
|
12
9
|
/**
|
|
13
10
|
* Creates a badge for trade status
|
|
14
11
|
*
|
|
@@ -65,5 +62,4 @@ export declare function getLiquidationStatusBadge(status: LiquidationStatus, siz
|
|
|
65
62
|
* ```
|
|
66
63
|
*/
|
|
67
64
|
export declare function getTargetTradeStatusBadge(status: TargetTradeStatus, size?: BadgeSize): StatusBadgeStyle;
|
|
68
|
-
export {};
|
|
69
65
|
//# sourceMappingURL=badge-status.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"badge-status.d.ts","sourceRoot":"","sources":["../src/badge-status.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,KAAK,EACV,
|
|
1
|
+
{"version":3,"file":"badge-status.d.ts","sourceRoot":"","sources":["../src/badge-status.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,KAAK,EACV,gBAAgB,EAChB,WAAW,EACX,gBAAgB,EAChB,iBAAiB,EACjB,iBAAiB,EAClB,MAAM,+BAA+B,CAAC;AAmDvC,OAAO,KAAK,EAAgB,SAAS,EAAE,MAAM,+BAA+B,CAAC;AAiF7E;;;;;;;;;;;;GAYG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,WAAW,EAAE,IAAI,GAAE,SAAgB,GAAG,gBAAgB,CAUjG;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,gBAAgB,EAAE,IAAI,GAAE,SAAgB,GAAG,gBAAgB,CAU3G;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,yBAAyB,CAAC,MAAM,EAAE,iBAAiB,EAAE,IAAI,GAAE,SAAgB,GAAG,gBAAgB,CAU7G;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,yBAAyB,CAAC,MAAM,EAAE,iBAAiB,EAAE,IAAI,GAAE,SAAgB,GAAG,gBAAgB,CAU7G"}
|
package/dist/badge.d.ts
CHANGED
|
@@ -8,14 +8,7 @@
|
|
|
8
8
|
* Note: The actual style classes are designed to work with Tailwind CSS
|
|
9
9
|
* and assume a specific color system is in place.
|
|
10
10
|
*/
|
|
11
|
-
import type { BadgeStyle } from '@cranberry-money/shared-types';
|
|
12
|
-
type BadgeVariant = 'default' | 'primary' | 'secondary' | 'success' | 'warning' | 'error' | 'info' | 'neutral';
|
|
13
|
-
type BadgeSize = 'sm' | 'md' | 'lg';
|
|
14
|
-
interface BadgeConfig {
|
|
15
|
-
variant: BadgeVariant;
|
|
16
|
-
size?: BadgeSize;
|
|
17
|
-
className?: string;
|
|
18
|
-
}
|
|
11
|
+
import type { BadgeVariant, BadgeSize, BadgeConfig, BadgeStyle } from '@cranberry-money/shared-types';
|
|
19
12
|
/**
|
|
20
13
|
* Creates a badge style configuration with appropriate CSS classes
|
|
21
14
|
*
|
|
@@ -45,5 +38,4 @@ export declare function createBadge({ variant, size, className }: BadgeConfig, v
|
|
|
45
38
|
*/
|
|
46
39
|
export declare const BADGE_VARIANTS: Record<BadgeVariant, string>;
|
|
47
40
|
export declare const BADGE_SIZES: Record<BadgeSize, string>;
|
|
48
|
-
export {};
|
|
49
41
|
//# sourceMappingURL=badge.d.ts.map
|
package/dist/badge.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"badge.d.ts","sourceRoot":"","sources":["../src/badge.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAGH,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"badge.d.ts","sourceRoot":"","sources":["../src/badge.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAGH,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AA+BtG;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,WAAW,CACzB,EAAE,OAAO,EAAE,IAAW,EAAE,SAAc,EAAE,EAAE,WAAW,EACrD,aAAa,GAAE,MAAM,CAAC,YAAY,EAAE,MAAM,CAA0B,EACpE,UAAU,GAAE,MAAM,CAAC,SAAS,EAAE,MAAM,CAAuB,GAC1D,UAAU,CAQZ;AAED;;;GAGG;AACH,eAAO,MAAM,cAAc,8BAAyB,CAAC;AACrD,eAAO,MAAM,WAAW,2BAAsB,CAAC"}
|
package/dist/date.d.ts
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Date and time formatting utility functions
|
|
3
|
+
*
|
|
4
|
+
* This module provides pure functions for formatting dates and times
|
|
5
|
+
* in various formats suitable for display in the application.
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Formats a date string to a localized date
|
|
9
|
+
*
|
|
10
|
+
* @param dateString - ISO date string or null
|
|
11
|
+
* @param fallback - Fallback text when date is null (default: 'No expiry')
|
|
12
|
+
* @returns Formatted date string
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```typescript
|
|
16
|
+
* formatDate('2024-03-15') // '3/15/2024' (in en-US)
|
|
17
|
+
* formatDate(null) // 'No expiry'
|
|
18
|
+
* formatDate(null, 'Not set') // 'Not set'
|
|
19
|
+
* ```
|
|
20
|
+
*/
|
|
21
|
+
export declare function formatDate(dateString: string | null, fallback?: string): string;
|
|
22
|
+
/**
|
|
23
|
+
* Formats a date string to a short date format (e.g., "Jan 15")
|
|
24
|
+
*
|
|
25
|
+
* @param dateString - ISO date string
|
|
26
|
+
* @param locale - Locale for formatting (default: 'en-AU')
|
|
27
|
+
* @returns Formatted short date string
|
|
28
|
+
*
|
|
29
|
+
* @example
|
|
30
|
+
* ```typescript
|
|
31
|
+
* formatShortDate('2024-01-15') // 'Jan 15'
|
|
32
|
+
* formatShortDate('2024-12-25', 'en-US') // 'Dec 25'
|
|
33
|
+
* ```
|
|
34
|
+
*/
|
|
35
|
+
export declare function formatShortDate(dateString: string, locale?: string): string;
|
|
36
|
+
/**
|
|
37
|
+
* Formats a date string to a time format (24-hour)
|
|
38
|
+
*
|
|
39
|
+
* @param dateString - ISO date string
|
|
40
|
+
* @param locale - Locale for formatting (default: 'en-AU')
|
|
41
|
+
* @returns Formatted time string in 24-hour format
|
|
42
|
+
*
|
|
43
|
+
* @example
|
|
44
|
+
* ```typescript
|
|
45
|
+
* formatTime('2024-01-15T14:30:00') // '14:30'
|
|
46
|
+
* formatTime('2024-01-15T09:05:00') // '09:05'
|
|
47
|
+
* ```
|
|
48
|
+
*/
|
|
49
|
+
export declare function formatTime(dateString: string, locale?: string): string;
|
|
50
|
+
/**
|
|
51
|
+
* Formats a date string to a combined short date and time format
|
|
52
|
+
*
|
|
53
|
+
* @param dateString - ISO date string
|
|
54
|
+
* @param locale - Locale for formatting (default: 'en-AU')
|
|
55
|
+
* @returns Formatted string like "Jan 15 14:30"
|
|
56
|
+
*
|
|
57
|
+
* @example
|
|
58
|
+
* ```typescript
|
|
59
|
+
* formatDateTime('2024-01-15T14:30:00') // 'Jan 15 14:30'
|
|
60
|
+
* formatDateTime('2024-12-25T09:00:00', 'en-US') // 'Dec 25 09:00'
|
|
61
|
+
* ```
|
|
62
|
+
*/
|
|
63
|
+
export declare function formatDateTime(dateString: string, locale?: string): string;
|
|
64
|
+
//# sourceMappingURL=date.d.ts.map
|
package/dist/instruments.d.ts
CHANGED
|
@@ -1,38 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Instrument and market data formatting utilities
|
|
3
3
|
*/
|
|
4
|
-
|
|
5
|
-
openPrice?: string | null;
|
|
6
|
-
dayHigh?: string | null;
|
|
7
|
-
dayLow?: string | null;
|
|
8
|
-
volume?: number | null;
|
|
9
|
-
}
|
|
10
|
-
interface TradeableInstrument {
|
|
11
|
-
isActive: boolean;
|
|
12
|
-
isActivelyTrading: boolean;
|
|
13
|
-
}
|
|
14
|
-
interface InstrumentTypeInfo {
|
|
15
|
-
isEtf?: boolean;
|
|
16
|
-
isFund?: boolean;
|
|
17
|
-
}
|
|
18
|
-
interface InstrumentBasicInfo {
|
|
19
|
-
symbol: string;
|
|
20
|
-
name: string;
|
|
21
|
-
}
|
|
22
|
-
interface PriceChangeResult {
|
|
23
|
-
change: number;
|
|
24
|
-
changePercent: number;
|
|
25
|
-
isPositive: boolean;
|
|
26
|
-
}
|
|
27
|
-
interface PriceSnapshot {
|
|
28
|
-
change: string;
|
|
29
|
-
changePercent: string;
|
|
30
|
-
}
|
|
31
|
-
interface FormattedPriceChange {
|
|
32
|
-
changeText: string;
|
|
33
|
-
changePercentText: string;
|
|
34
|
-
colorClass: string;
|
|
35
|
-
}
|
|
4
|
+
import type { InstrumentTypeInfo, InstrumentBasicInfo, PriceChangeResult, PriceSnapshot, FormattedPriceChange, TradeableInstrument, MarketDataInfo } from '@cranberry-money/shared-types';
|
|
36
5
|
/**
|
|
37
6
|
* Format instrument price with currency symbol
|
|
38
7
|
* @param price - The price as string
|
|
@@ -94,5 +63,4 @@ export declare function formatVolume(volume: number): string;
|
|
|
94
63
|
* @returns true if market data is available, false otherwise
|
|
95
64
|
*/
|
|
96
65
|
export declare function hasMarketData(marketData: MarketDataInfo): boolean;
|
|
97
|
-
export {};
|
|
98
66
|
//# sourceMappingURL=instruments.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"instruments.d.ts","sourceRoot":"","sources":["../src/instruments.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,
|
|
1
|
+
{"version":3,"file":"instruments.d.ts","sourceRoot":"","sources":["../src/instruments.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,KAAK,EACV,kBAAkB,EAClB,mBAAmB,EACnB,iBAAiB,EACjB,aAAa,EACb,oBAAoB,EACpB,mBAAmB,EACnB,cAAc,EACf,MAAM,+BAA+B,CAAC;AAUvC;;;;;GAKG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,MAAM,CAMrF;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,MAAM,CAalE;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,UAAU,EAAE,kBAAkB,GAAG,MAAM,CAIxE;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,UAAU,EAAE,mBAAmB,GAAG,MAAM,CAE5E;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,aAAa,GAAG,iBAAiB,CAS/E;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,aAAa,GAAG,oBAAoB,CAY/E;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,UAAU,EAAE,mBAAmB,GAAG,OAAO,CAE9E;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,MAAM,CAU5E;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAKnD;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,UAAU,EAAE,cAAc,GAAG,OAAO,CAEjE"}
|
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
import type { MessageFieldValidation } from '@cranberry-money/shared-types';
|
|
2
|
-
interface BaseFormValidation {
|
|
3
|
-
isFormValid: boolean;
|
|
4
|
-
}
|
|
1
|
+
import type { MessageFieldValidation, BaseFormValidation } from '@cranberry-money/shared-types';
|
|
5
2
|
/**
|
|
6
3
|
* Portfolio selection form validation interface
|
|
7
4
|
*/
|
|
@@ -42,5 +39,4 @@ export declare const isValidTemplateSelection: (selectedTemplateUuid: string | n
|
|
|
42
39
|
* // }
|
|
43
40
|
*/
|
|
44
41
|
export declare const validatePortfolioSelection: (state: PortfolioSelectionState) => PortfolioSelectionValidation;
|
|
45
|
-
export {};
|
|
46
42
|
//# sourceMappingURL=portfolio-validation.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"portfolio-validation.d.ts","sourceRoot":"","sources":["../src/portfolio-validation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;
|
|
1
|
+
{"version":3,"file":"portfolio-validation.d.ts","sourceRoot":"","sources":["../src/portfolio-validation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AAEhG;;GAEG;AACH,MAAM,WAAW,4BAA6B,SAAQ,kBAAkB;IACtE,QAAQ,CAAC,gBAAgB,EAAE,sBAAsB,CAAC;CACnD;AAED;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACtC,QAAQ,CAAC,oBAAoB,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7C,QAAQ,CAAC,qBAAqB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAChD;AAED;;;;;;;;;;GAUG;AACH,eAAO,MAAM,wBAAwB,GAAI,sBAAsB,MAAM,GAAG,IAAI,KAAG,OAE9E,CAAC;AAEF;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,0BAA0B,GAAI,OAAO,uBAAuB,KAAG,4BAa3E,CAAC"}
|
package/dist/text.d.ts
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Text manipulation utility functions
|
|
3
|
+
*
|
|
4
|
+
* This module provides pure functions for common text operations
|
|
5
|
+
* such as truncation, formatting, and manipulation.
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Truncates text to a specified maximum length and adds ellipsis if needed
|
|
9
|
+
*
|
|
10
|
+
* @param text - The text to truncate
|
|
11
|
+
* @param maxLength - The maximum length of the text (default: 30)
|
|
12
|
+
* @returns The truncated text with ellipsis if it exceeds maxLength
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```typescript
|
|
16
|
+
* truncateText('This is a very long text', 10) // 'This is a...'
|
|
17
|
+
* truncateText('Short', 10) // 'Short'
|
|
18
|
+
* truncateText('', 10) // ''
|
|
19
|
+
* ```
|
|
20
|
+
*/
|
|
21
|
+
export declare function truncateText(text: string, maxLength?: number): string;
|
|
22
|
+
//# sourceMappingURL=text.d.ts.map
|
package/dist/validation.d.ts
CHANGED
|
@@ -1,18 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Validation utility functions
|
|
3
3
|
*/
|
|
4
|
-
import type { PasswordValidation } from '@cranberry-money/shared-types';
|
|
5
|
-
interface EmailConfirmationValidation {
|
|
6
|
-
isValid: boolean;
|
|
7
|
-
isEmpty: boolean;
|
|
8
|
-
isValidFormat: boolean;
|
|
9
|
-
}
|
|
10
|
-
interface ExtendedPasswordValidation extends PasswordValidation {
|
|
11
|
-
hasUppercase: boolean;
|
|
12
|
-
hasLowercase: boolean;
|
|
13
|
-
hasSpecialCharacter: boolean;
|
|
14
|
-
hasDigit: boolean;
|
|
15
|
-
}
|
|
4
|
+
import type { PasswordValidation, EmailConfirmationValidation, ExtendedPasswordValidation } from '@cranberry-money/shared-types';
|
|
16
5
|
/**
|
|
17
6
|
* Checks if a string contains only numeric characters
|
|
18
7
|
* @param str - The string to validate
|
|
@@ -246,5 +235,4 @@ export declare function isInNumberRange(value: number, min: number, max: number)
|
|
|
246
235
|
* isValidPercentage(-10) // false
|
|
247
236
|
*/
|
|
248
237
|
export declare function isValidPercentage(percentage: number): boolean;
|
|
249
|
-
export {};
|
|
250
238
|
//# sourceMappingURL=validation.d.ts.map
|
package/dist/validation.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validation.d.ts","sourceRoot":"","sources":["../src/validation.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"validation.d.ts","sourceRoot":"","sources":["../src/validation.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,KAAK,EACV,kBAAkB,EAClB,2BAA2B,EAC3B,0BAA0B,EAC3B,MAAM,+BAA+B,CAAC;AAKvC;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAElD;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,EAAE,SAAS,SAAI,GAAG,kBAAkB,CAKpF;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,EAAE,SAAS,SAAI,GAAG,OAAO,CAIxE;AAED;;;;GAIG;AACH,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAE7D;AAED;;;;;GAKG;AACH,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,MAAM,EAAE,SAAS,SAAI,GAAG,2BAA2B,CAQnG;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAGnD;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAEjD;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAEjD;AAED;;;;GAIG;AACH,wBAAgB,m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
|
* calculating liquidation progress, and other withdrawal-related operations.
|
|
6
6
|
* Functions are designed to work with generic types to maintain flexibility.
|
|
7
7
|
*/
|
|
8
|
-
|
|
9
|
-
total: number;
|
|
10
|
-
pending: number;
|
|
11
|
-
inProgress: number;
|
|
12
|
-
completed: number;
|
|
13
|
-
failed: number;
|
|
14
|
-
completionRate: number;
|
|
15
|
-
}
|
|
8
|
+
import type { LiquidationProgress } from '@cranberry-money/shared-types';
|
|
16
9
|
/**
|
|
17
10
|
* Formats a withdrawal amount as currency
|
|
18
11
|
*
|
|
@@ -91,5 +84,4 @@ export declare function calculateLiquidationProgress<T extends {
|
|
|
91
84
|
export declare function getTotalEstimatedValue<T extends {
|
|
92
85
|
estimatedValue?: string | null;
|
|
93
86
|
}>(liquidations: T[]): number;
|
|
94
|
-
export {};
|
|
95
87
|
//# sourceMappingURL=withdrawal.d.ts.map
|
package/dist/withdrawal.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"withdrawal.d.ts","sourceRoot":"","sources":["../src/withdrawal.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,
|
|
1
|
+
{"version":3,"file":"withdrawal.d.ts","sourceRoot":"","sources":["../src/withdrawal.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AAazE;;;;;;;;;;;GAWG;AACH,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAMtE;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAMrE;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAK3D;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,4BAA4B,CAAC,CAAC,SAAS;IAAE,iBAAiB,EAAE,MAAM,CAAA;CAAE,EAClF,YAAY,EAAE,CAAC,EAAE,GAChB,mBAAmB,CAkBrB;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,sBAAsB,CAAC,CAAC,SAAS;IAAE,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,EAAE,YAAY,EAAE,CAAC,EAAE,GAAG,MAAM,CAI9G"}
|