@cranberry-money/shared-constants 8.8.0 → 8.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/dist/api/auth.d.ts +0 -21
- package/dist/api/auth.d.ts.map +0 -1
- package/dist/api/auth.js +0 -23
- package/dist/api/config.d.ts +0 -36
- package/dist/api/config.d.ts.map +0 -1
- package/dist/api/config.js +0 -44
- package/dist/api/endpoints.d.ts +0 -157
- package/dist/api/endpoints.d.ts.map +0 -1
- package/dist/api/endpoints.js +0 -184
- package/dist/api/http.d.ts +0 -57
- package/dist/api/http.d.ts.map +0 -1
- package/dist/api/http.js +0 -62
- package/dist/api/index.d.ts +0 -9
- package/dist/api/index.d.ts.map +0 -1
- package/dist/api/index.js +0 -8
- package/dist/api/services.d.ts +0 -9
- package/dist/api/services.d.ts.map +0 -1
- package/dist/api/services.js +0 -8
- package/dist/business/accounts.d.ts +0 -38
- package/dist/business/accounts.d.ts.map +0 -1
- package/dist/business/accounts.js +0 -53
- package/dist/business/bank-accounts.d.ts +0 -71
- package/dist/business/bank-accounts.d.ts.map +0 -1
- package/dist/business/bank-accounts.js +0 -69
- package/dist/business/banking.d.ts +0 -44
- package/dist/business/banking.d.ts.map +0 -1
- package/dist/business/banking.js +0 -69
- package/dist/business/cache.d.ts +0 -9
- package/dist/business/cache.d.ts.map +0 -1
- package/dist/business/cache.js +0 -8
- package/dist/business/countries.d.ts +0 -11
- package/dist/business/countries.d.ts.map +0 -1
- package/dist/business/countries.js +0 -11
- package/dist/business/documents.d.ts +0 -48
- package/dist/business/documents.d.ts.map +0 -1
- package/dist/business/documents.js +0 -75
- package/dist/business/holdings.d.ts +0 -34
- package/dist/business/holdings.d.ts.map +0 -1
- package/dist/business/holdings.js +0 -34
- package/dist/business/index.d.ts +0 -16
- package/dist/business/index.d.ts.map +0 -1
- package/dist/business/index.js +0 -27
- package/dist/business/industries.d.ts +0 -9
- package/dist/business/industries.d.ts.map +0 -1
- package/dist/business/industries.js +0 -9
- package/dist/business/investments.d.ts +0 -87
- package/dist/business/investments.d.ts.map +0 -1
- package/dist/business/investments.js +0 -93
- package/dist/business/status/banks.d.ts +0 -29
- package/dist/business/status/banks.d.ts.map +0 -1
- package/dist/business/status/banks.js +0 -35
- package/dist/business/status/cash-accounts.d.ts +0 -56
- package/dist/business/status/cash-accounts.d.ts.map +0 -1
- package/dist/business/status/cash-accounts.js +0 -62
- package/dist/business/status/documents.d.ts +0 -25
- package/dist/business/status/documents.d.ts.map +0 -1
- package/dist/business/status/documents.js +0 -34
- package/dist/business/status/index.d.ts +0 -11
- package/dist/business/status/index.d.ts.map +0 -1
- package/dist/business/status/index.js +0 -10
- package/dist/business/status/instruments.d.ts +0 -42
- package/dist/business/status/instruments.d.ts.map +0 -1
- package/dist/business/status/instruments.js +0 -55
- package/dist/business/status/portfolios.d.ts +0 -18
- package/dist/business/status/portfolios.d.ts.map +0 -1
- package/dist/business/status/portfolios.js +0 -21
- package/dist/business/status/trades.d.ts +0 -89
- package/dist/business/status/trades.d.ts.map +0 -1
- package/dist/business/status/trades.js +0 -130
- package/dist/business/status/withdrawals.d.ts +0 -104
- package/dist/business/status/withdrawals.d.ts.map +0 -1
- package/dist/business/status/withdrawals.js +0 -153
- package/dist/business/trading.d.ts +0 -52
- package/dist/business/trading.d.ts.map +0 -1
- package/dist/business/trading.js +0 -68
- package/dist/common/index.d.ts +0 -2
- package/dist/common/index.d.ts.map +0 -1
- package/dist/common/index.js +0 -1
- package/dist/common/statuses.d.ts +0 -18
- package/dist/common/statuses.d.ts.map +0 -1
- package/dist/common/statuses.js +0 -17
- package/dist/config/defaults.d.ts +0 -68
- package/dist/config/defaults.d.ts.map +0 -1
- package/dist/config/defaults.js +0 -66
- package/dist/config/index.d.ts +0 -8
- package/dist/config/index.d.ts.map +0 -1
- package/dist/config/index.js +0 -7
- package/dist/config/pagination.d.ts +0 -28
- package/dist/config/pagination.d.ts.map +0 -1
- package/dist/config/pagination.js +0 -40
- package/dist/config/thresholds.d.ts +0 -65
- package/dist/config/thresholds.d.ts.map +0 -1
- package/dist/config/thresholds.js +0 -82
- package/dist/financial/currency.d.ts +0 -38
- package/dist/financial/currency.d.ts.map +0 -1
- package/dist/financial/currency.js +0 -75
- package/dist/financial/formatting.d.ts +0 -52
- package/dist/financial/formatting.d.ts.map +0 -1
- package/dist/financial/formatting.js +0 -49
- package/dist/financial/index.d.ts +0 -7
- package/dist/financial/index.d.ts.map +0 -1
- package/dist/financial/index.js +0 -6
- package/dist/financial/instruments.d.ts +0 -51
- package/dist/financial/instruments.d.ts.map +0 -1
- package/dist/financial/instruments.js +0 -68
- package/dist/index.d.ts +0 -15
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -22
- package/dist/ui/cache.d.ts +0 -47
- package/dist/ui/cache.d.ts.map +0 -1
- package/dist/ui/cache.js +0 -45
- package/dist/ui/chart-config.d.ts +0 -35
- package/dist/ui/chart-config.d.ts.map +0 -1
- package/dist/ui/chart-config.js +0 -33
- package/dist/ui/colors.d.ts +0 -53
- package/dist/ui/colors.d.ts.map +0 -1
- package/dist/ui/colors.js +0 -94
- package/dist/ui/display.d.ts +0 -69
- package/dist/ui/display.d.ts.map +0 -1
- package/dist/ui/display.js +0 -80
- package/dist/ui/index.d.ts +0 -13
- package/dist/ui/index.d.ts.map +0 -1
- package/dist/ui/index.js +0 -12
- package/dist/ui/labels/index.d.ts +0 -20
- package/dist/ui/labels/index.d.ts.map +0 -1
- package/dist/ui/labels/index.js +0 -23
- package/dist/ui/navigation.d.ts +0 -45
- package/dist/ui/navigation.d.ts.map +0 -1
- package/dist/ui/navigation.js +0 -47
- package/dist/ui/status-colors-unified.d.ts +0 -91
- package/dist/ui/status-colors-unified.d.ts.map +0 -1
- package/dist/ui/status-colors-unified.js +0 -106
- package/dist/ui/timing.d.ts +0 -26
- package/dist/ui/timing.d.ts.map +0 -1
- package/dist/ui/timing.js +0 -24
- package/dist/ui/zIndex.d.ts +0 -80
- package/dist/ui/zIndex.d.ts.map +0 -1
- package/dist/ui/zIndex.js +0 -77
- package/dist/utilities/common.d.ts +0 -29
- package/dist/utilities/common.d.ts.map +0 -1
- package/dist/utilities/common.js +0 -28
- package/dist/utilities/defaults.d.ts +0 -52
- package/dist/utilities/defaults.d.ts.map +0 -1
- package/dist/utilities/defaults.js +0 -68
- package/dist/utilities/index.d.ts +0 -9
- package/dist/utilities/index.d.ts.map +0 -1
- package/dist/utilities/index.js +0 -8
- package/dist/utilities/sorting.d.ts +0 -45
- package/dist/utilities/sorting.d.ts.map +0 -1
- package/dist/utilities/sorting.js +0 -51
- package/dist/utilities/time.d.ts +0 -53
- package/dist/utilities/time.d.ts.map +0 -1
- package/dist/utilities/time.js +0 -65
- package/dist/utilities/validation.d.ts +0 -57
- package/dist/utilities/validation.d.ts.map +0 -1
- package/dist/utilities/validation.js +0 -65
- package/dist/validation/index.d.ts +0 -27
- package/dist/validation/index.d.ts.map +0 -1
- package/dist/validation/index.js +0 -26
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Default values and common constants
|
|
3
|
-
*/
|
|
4
|
-
export declare const DEFAULT_VALUES: {
|
|
5
|
-
readonly ZERO: "0";
|
|
6
|
-
readonly EMPTY_STRING: "";
|
|
7
|
-
readonly UNKNOWN: "UNKNOWN";
|
|
8
|
-
readonly NOT_APPLICABLE: "N/A";
|
|
9
|
-
readonly NULL_UUID: "00000000-0000-0000-0000-000000000000";
|
|
10
|
-
};
|
|
11
|
-
export declare const NUMERIC_DEFAULTS: {
|
|
12
|
-
readonly MIN_AMOUNT: 0;
|
|
13
|
-
readonly MAX_AMOUNT: 999999999.99;
|
|
14
|
-
readonly DEFAULT_PRECISION: 2;
|
|
15
|
-
readonly PERCENTAGE_PRECISION: 2;
|
|
16
|
-
readonly QUANTITY_PRECISION: 6;
|
|
17
|
-
};
|
|
18
|
-
export declare const PAGINATION_DEFAULTS: {
|
|
19
|
-
readonly PAGE: 1;
|
|
20
|
-
readonly PAGE_SIZE: 20;
|
|
21
|
-
readonly MIN_PAGE_SIZE: 1;
|
|
22
|
-
readonly MAX_PAGE_SIZE: 100;
|
|
23
|
-
readonly PAGE_SIZE_OPTIONS: readonly [10, 20, 50, 100];
|
|
24
|
-
};
|
|
25
|
-
export declare const THRESHOLDS: {
|
|
26
|
-
readonly MIN_PORTFOLIO_VALUE: 1000;
|
|
27
|
-
readonly MIN_TRADE_AMOUNT: 10;
|
|
28
|
-
readonly MIN_WITHDRAWAL_AMOUNT: 100;
|
|
29
|
-
readonly MAX_PORTFOLIOS_PER_USER: 10;
|
|
30
|
-
readonly MAX_TRADES_PER_DAY: 100;
|
|
31
|
-
};
|
|
32
|
-
export declare const DISPLAY_LIMITS: {
|
|
33
|
-
readonly MAX_NAME_LENGTH: 100;
|
|
34
|
-
readonly MAX_DESCRIPTION_LENGTH: 500;
|
|
35
|
-
readonly MAX_NOTES_LENGTH: 1000;
|
|
36
|
-
readonly MAX_FILE_SIZE_MB: 10;
|
|
37
|
-
readonly MAX_FILE_NAME_LENGTH: 255;
|
|
38
|
-
readonly DASHBOARD_RECENT_TRADES: 5;
|
|
39
|
-
readonly DASHBOARD_TARGET_TRADES: 5;
|
|
40
|
-
readonly DASHBOARD_TRANSACTIONS: 5;
|
|
41
|
-
readonly DASHBOARD_WITHDRAWALS: 5;
|
|
42
|
-
readonly DEFAULT_PAGE_SIZE: 20;
|
|
43
|
-
readonly PAGE_SIZE_OPTIONS: readonly [10, 20, 50, 100];
|
|
44
|
-
readonly AUTOCOMPLETE_MAX_RESULTS: 10;
|
|
45
|
-
readonly RECENT_SEARCHES_MAX: 5;
|
|
46
|
-
};
|
|
47
|
-
export declare const ALLOCATION_DEFAULTS: {
|
|
48
|
-
readonly DEFAULT_PERCENTAGE: 10;
|
|
49
|
-
readonly PERCENTAGE_PRECISION: 0.01;
|
|
50
|
-
readonly TARGET_TOTAL: 100;
|
|
51
|
-
};
|
|
52
|
-
//# sourceMappingURL=defaults.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"defaults.d.ts","sourceRoot":"","sources":["../../src/utilities/defaults.ts"],"names":[],"mappings":"AAAA;;GAEG;AAYH,eAAO,MAAM,cAAc;;;;;;CAMjB,CAAC;AAIX,eAAO,MAAM,gBAAgB;;;;;;CAMnB,CAAC;AAIX,eAAO,MAAM,mBAAmB;;;;;;CAMtB,CAAC;AAIX,eAAO,MAAM,UAAU;;;;;;CAMb,CAAC;AAIX,eAAO,MAAM,cAAc;;;;;;;;;;;;;;CAiBjB,CAAC;AAIX,eAAO,MAAM,mBAAmB;;;;CAItB,CAAC"}
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Default values and common constants
|
|
3
|
-
*/
|
|
4
|
-
import { DEFAULT_STRINGS, DEFAULT_NUMBERS, PAGINATION_CONFIG, COMMON_THRESHOLDS, CONFIG_ALLOCATION_DEFAULTS, } from '../config';
|
|
5
|
-
// Default values
|
|
6
|
-
// Now references consolidated defaults
|
|
7
|
-
export const DEFAULT_VALUES = {
|
|
8
|
-
ZERO: DEFAULT_STRINGS.ZERO,
|
|
9
|
-
EMPTY_STRING: DEFAULT_STRINGS.EMPTY,
|
|
10
|
-
UNKNOWN: 'UNKNOWN', // Different from DEFAULT_STRINGS.UNKNOWN ('Unknown')
|
|
11
|
-
NOT_APPLICABLE: DEFAULT_STRINGS.NOT_APPLICABLE,
|
|
12
|
-
NULL_UUID: DEFAULT_STRINGS.NULL_UUID,
|
|
13
|
-
};
|
|
14
|
-
// Numeric defaults
|
|
15
|
-
// Now references consolidated thresholds
|
|
16
|
-
export const NUMERIC_DEFAULTS = {
|
|
17
|
-
MIN_AMOUNT: DEFAULT_NUMBERS.ZERO,
|
|
18
|
-
MAX_AMOUNT: 999999999.99, // Keep specific value
|
|
19
|
-
DEFAULT_PRECISION: DEFAULT_NUMBERS.PRECISION,
|
|
20
|
-
PERCENTAGE_PRECISION: DEFAULT_NUMBERS.PERCENTAGE_PRECISION,
|
|
21
|
-
QUANTITY_PRECISION: DEFAULT_NUMBERS.QUANTITY_PRECISION,
|
|
22
|
-
};
|
|
23
|
-
// Pagination defaults
|
|
24
|
-
// @deprecated Use PAGINATION_CONFIG from config/pagination instead
|
|
25
|
-
export const PAGINATION_DEFAULTS = {
|
|
26
|
-
PAGE: PAGINATION_CONFIG.DEFAULT_PAGE,
|
|
27
|
-
PAGE_SIZE: PAGINATION_CONFIG.DEFAULT_PAGE_SIZE,
|
|
28
|
-
MIN_PAGE_SIZE: PAGINATION_CONFIG.MIN_PAGE_SIZE,
|
|
29
|
-
MAX_PAGE_SIZE: PAGINATION_CONFIG.MAX_PAGE_SIZE,
|
|
30
|
-
PAGE_SIZE_OPTIONS: PAGINATION_CONFIG.PAGE_SIZE_OPTIONS,
|
|
31
|
-
};
|
|
32
|
-
// Common thresholds
|
|
33
|
-
// Now references consolidated thresholds
|
|
34
|
-
export const THRESHOLDS = {
|
|
35
|
-
MIN_PORTFOLIO_VALUE: COMMON_THRESHOLDS.MIN_PORTFOLIO_VALUE,
|
|
36
|
-
MIN_TRADE_AMOUNT: COMMON_THRESHOLDS.MIN_TRADE_AMOUNT,
|
|
37
|
-
MIN_WITHDRAWAL_AMOUNT: COMMON_THRESHOLDS.MIN_WITHDRAWAL_AMOUNT,
|
|
38
|
-
MAX_PORTFOLIOS_PER_USER: COMMON_THRESHOLDS.MAX_PORTFOLIOS_PER_USER,
|
|
39
|
-
MAX_TRADES_PER_DAY: COMMON_THRESHOLDS.MAX_TRADES_PER_DAY,
|
|
40
|
-
};
|
|
41
|
-
// Display limits
|
|
42
|
-
// Now references consolidated thresholds
|
|
43
|
-
export const DISPLAY_LIMITS = {
|
|
44
|
-
MAX_NAME_LENGTH: COMMON_THRESHOLDS.MAX_NAME_LENGTH,
|
|
45
|
-
MAX_DESCRIPTION_LENGTH: COMMON_THRESHOLDS.MAX_DESCRIPTION_LENGTH,
|
|
46
|
-
MAX_NOTES_LENGTH: COMMON_THRESHOLDS.MAX_NOTES_LENGTH,
|
|
47
|
-
MAX_FILE_SIZE_MB: COMMON_THRESHOLDS.MAX_FILE_SIZE_MB,
|
|
48
|
-
MAX_FILE_NAME_LENGTH: COMMON_THRESHOLDS.MAX_FILE_NAME_LENGTH,
|
|
49
|
-
// Dashboard display limits
|
|
50
|
-
DASHBOARD_RECENT_TRADES: 5,
|
|
51
|
-
DASHBOARD_TARGET_TRADES: 5,
|
|
52
|
-
DASHBOARD_TRANSACTIONS: 5,
|
|
53
|
-
DASHBOARD_WITHDRAWALS: 5,
|
|
54
|
-
// Table pagination
|
|
55
|
-
DEFAULT_PAGE_SIZE: 20,
|
|
56
|
-
PAGE_SIZE_OPTIONS: [10, 20, 50, 100],
|
|
57
|
-
// Search limits
|
|
58
|
-
AUTOCOMPLETE_MAX_RESULTS: 10,
|
|
59
|
-
RECENT_SEARCHES_MAX: 5,
|
|
60
|
-
};
|
|
61
|
-
// Asset allocation defaults
|
|
62
|
-
// Now references consolidated defaults
|
|
63
|
-
export const ALLOCATION_DEFAULTS = {
|
|
64
|
-
DEFAULT_PERCENTAGE: CONFIG_ALLOCATION_DEFAULTS.DEFAULT_PERCENTAGE,
|
|
65
|
-
PERCENTAGE_PRECISION: CONFIG_ALLOCATION_DEFAULTS.PERCENTAGE_PRECISION,
|
|
66
|
-
TARGET_TOTAL: CONFIG_ALLOCATION_DEFAULTS.TARGET_TOTAL,
|
|
67
|
-
};
|
|
68
|
-
// Note: DEFAULT_UNKNOWN_VALUE and DEFAULT_ERROR_MESSAGE are already exported from common.ts
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utilities/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC"}
|
package/dist/utilities/index.js
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Sorting-related constants
|
|
3
|
-
*/
|
|
4
|
-
export declare const SORT_DIRECTION: {
|
|
5
|
-
readonly ASC: "asc";
|
|
6
|
-
readonly DESC: "desc";
|
|
7
|
-
};
|
|
8
|
-
export type SortDirection = (typeof SORT_DIRECTION)[keyof typeof SORT_DIRECTION];
|
|
9
|
-
export declare const SORT_FIELDS: {
|
|
10
|
-
readonly CREATED_AT: "created_at";
|
|
11
|
-
readonly UPDATED_AT: "updated_at";
|
|
12
|
-
readonly DATE: "date";
|
|
13
|
-
readonly NAME: "name";
|
|
14
|
-
readonly TITLE: "title";
|
|
15
|
-
readonly AMOUNT: "amount";
|
|
16
|
-
readonly VALUE: "value";
|
|
17
|
-
readonly PRICE: "price";
|
|
18
|
-
readonly QUANTITY: "quantity";
|
|
19
|
-
readonly STATUS: "status";
|
|
20
|
-
readonly PRIORITY: "priority";
|
|
21
|
-
readonly SYMBOL: "symbol";
|
|
22
|
-
readonly TYPE: "type";
|
|
23
|
-
};
|
|
24
|
-
export type SortField = (typeof SORT_FIELDS)[keyof typeof SORT_FIELDS];
|
|
25
|
-
export declare const DEFAULT_SORT_CONFIG: {
|
|
26
|
-
readonly PORTFOLIOS: {
|
|
27
|
-
readonly field: "updated_at";
|
|
28
|
-
readonly direction: "desc";
|
|
29
|
-
};
|
|
30
|
-
readonly TRADES: {
|
|
31
|
-
readonly field: "created_at";
|
|
32
|
-
readonly direction: "desc";
|
|
33
|
-
};
|
|
34
|
-
readonly WITHDRAWALS: {
|
|
35
|
-
readonly field: "created_at";
|
|
36
|
-
readonly direction: "desc";
|
|
37
|
-
};
|
|
38
|
-
readonly TRANSACTIONS: {
|
|
39
|
-
readonly field: "date";
|
|
40
|
-
readonly direction: "desc";
|
|
41
|
-
};
|
|
42
|
-
};
|
|
43
|
-
export declare const SORT_DIRECTION_ASC: "asc";
|
|
44
|
-
export declare const SORT_DIRECTION_DESC: "desc";
|
|
45
|
-
//# sourceMappingURL=sorting.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"sorting.d.ts","sourceRoot":"","sources":["../../src/utilities/sorting.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,eAAO,MAAM,cAAc;;;CAGjB,CAAC;AAEX,MAAM,MAAM,aAAa,GAAG,CAAC,OAAO,cAAc,CAAC,CAAC,MAAM,OAAO,cAAc,CAAC,CAAC;AAGjF,eAAO,MAAM,WAAW;;;;;;;;;;;;;;CAuBd,CAAC;AAEX,MAAM,MAAM,SAAS,GAAG,CAAC,OAAO,WAAW,CAAC,CAAC,MAAM,OAAO,WAAW,CAAC,CAAC;AAGvE,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;CAiBtB,CAAC;AAGX,eAAO,MAAM,kBAAkB,OAAqB,CAAC;AACrD,eAAO,MAAM,mBAAmB,QAAsB,CAAC"}
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Sorting-related constants
|
|
3
|
-
*/
|
|
4
|
-
// Sort directions
|
|
5
|
-
export const SORT_DIRECTION = {
|
|
6
|
-
ASC: 'asc',
|
|
7
|
-
DESC: 'desc',
|
|
8
|
-
};
|
|
9
|
-
// Common sort fields
|
|
10
|
-
export const SORT_FIELDS = {
|
|
11
|
-
// Time-based
|
|
12
|
-
CREATED_AT: 'created_at',
|
|
13
|
-
UPDATED_AT: 'updated_at',
|
|
14
|
-
DATE: 'date',
|
|
15
|
-
// Name-based
|
|
16
|
-
NAME: 'name',
|
|
17
|
-
TITLE: 'title',
|
|
18
|
-
// Value-based
|
|
19
|
-
AMOUNT: 'amount',
|
|
20
|
-
VALUE: 'value',
|
|
21
|
-
PRICE: 'price',
|
|
22
|
-
QUANTITY: 'quantity',
|
|
23
|
-
// Status-based
|
|
24
|
-
STATUS: 'status',
|
|
25
|
-
PRIORITY: 'priority',
|
|
26
|
-
// Other
|
|
27
|
-
SYMBOL: 'symbol',
|
|
28
|
-
TYPE: 'type',
|
|
29
|
-
};
|
|
30
|
-
// Default sort configurations
|
|
31
|
-
export const DEFAULT_SORT_CONFIG = {
|
|
32
|
-
PORTFOLIOS: {
|
|
33
|
-
field: SORT_FIELDS.UPDATED_AT,
|
|
34
|
-
direction: SORT_DIRECTION.DESC,
|
|
35
|
-
},
|
|
36
|
-
TRADES: {
|
|
37
|
-
field: SORT_FIELDS.CREATED_AT,
|
|
38
|
-
direction: SORT_DIRECTION.DESC,
|
|
39
|
-
},
|
|
40
|
-
WITHDRAWALS: {
|
|
41
|
-
field: SORT_FIELDS.CREATED_AT,
|
|
42
|
-
direction: SORT_DIRECTION.DESC,
|
|
43
|
-
},
|
|
44
|
-
TRANSACTIONS: {
|
|
45
|
-
field: SORT_FIELDS.DATE,
|
|
46
|
-
direction: SORT_DIRECTION.DESC,
|
|
47
|
-
},
|
|
48
|
-
};
|
|
49
|
-
// Blueberry compatibility exports
|
|
50
|
-
export const SORT_DIRECTION_ASC = SORT_DIRECTION.ASC;
|
|
51
|
-
export const SORT_DIRECTION_DESC = SORT_DIRECTION.DESC;
|
package/dist/utilities/time.d.ts
DELETED
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Time-related constants
|
|
3
|
-
*/
|
|
4
|
-
export declare const MILLISECONDS: {
|
|
5
|
-
readonly SECOND: 1000;
|
|
6
|
-
readonly MINUTE: number;
|
|
7
|
-
readonly HOUR: number;
|
|
8
|
-
readonly DAY: number;
|
|
9
|
-
readonly WEEK: number;
|
|
10
|
-
};
|
|
11
|
-
export declare const SECONDS: {
|
|
12
|
-
readonly MINUTE: 60;
|
|
13
|
-
readonly HOUR: number;
|
|
14
|
-
readonly DAY: number;
|
|
15
|
-
readonly WEEK: number;
|
|
16
|
-
};
|
|
17
|
-
export declare const DATE_FORMATS: {
|
|
18
|
-
readonly DISPLAY_DATE: "MMM dd, yyyy";
|
|
19
|
-
readonly DISPLAY_DATE_TIME: "MMM dd, yyyy HH:mm";
|
|
20
|
-
readonly DISPLAY_DATE_TIME_SECONDS: "MMM dd, yyyy HH:mm:ss";
|
|
21
|
-
readonly DISPLAY_SHORT: "MM/dd/yy";
|
|
22
|
-
readonly API_DATE: "yyyy-MM-dd";
|
|
23
|
-
readonly API_DATETIME: "yyyy-MM-dd'T'HH:mm:ss";
|
|
24
|
-
readonly API_DATETIME_WITH_TIMEZONE: "yyyy-MM-dd'T'HH:mm:ss'Z'";
|
|
25
|
-
readonly MONTH_YEAR: "MMM yyyy";
|
|
26
|
-
readonly YEAR: "yyyy";
|
|
27
|
-
readonly TIME: "HH:mm";
|
|
28
|
-
readonly TIME_WITH_SECONDS: "HH:mm:ss";
|
|
29
|
-
};
|
|
30
|
-
export declare const TIME_ZONES: {
|
|
31
|
-
readonly UTC: "UTC";
|
|
32
|
-
readonly EST: "America/New_York";
|
|
33
|
-
readonly PST: "America/Los_Angeles";
|
|
34
|
-
readonly SYDNEY: "Australia/Sydney";
|
|
35
|
-
readonly MELBOURNE: "Australia/Melbourne";
|
|
36
|
-
};
|
|
37
|
-
export type TimeZone = (typeof TIME_ZONES)[keyof typeof TIME_ZONES];
|
|
38
|
-
export declare const SESSION_DURATIONS: {
|
|
39
|
-
readonly DEFAULT: number;
|
|
40
|
-
readonly EXTENDED: number;
|
|
41
|
-
readonly REMEMBER_ME: number;
|
|
42
|
-
};
|
|
43
|
-
export declare const MILLISECONDS_PER_DAY: number;
|
|
44
|
-
export declare const DEFAULT_RECENT_TRANSACTIONS_DAYS = 30;
|
|
45
|
-
export declare const DATE_ISO_TIME_SEPARATOR = "T";
|
|
46
|
-
export type TimeRange = '1W' | '1M' | '6M' | '1Y' | '3Y' | '5Y' | '10Y';
|
|
47
|
-
export interface TimeRangeConfig {
|
|
48
|
-
label: string;
|
|
49
|
-
value: TimeRange;
|
|
50
|
-
days: number;
|
|
51
|
-
}
|
|
52
|
-
export declare const TIME_RANGES: TimeRangeConfig[];
|
|
53
|
-
//# sourceMappingURL=time.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"time.d.ts","sourceRoot":"","sources":["../../src/utilities/time.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,eAAO,MAAM,YAAY;;;;;;CAMf,CAAC;AAGX,eAAO,MAAM,OAAO;;;;;CAKV,CAAC;AAGX,eAAO,MAAM,YAAY;;;;;;;;;;;;CAiBf,CAAC;AAGX,eAAO,MAAM,UAAU;;;;;;CAMb,CAAC;AAEX,MAAM,MAAM,QAAQ,GAAG,CAAC,OAAO,UAAU,CAAC,CAAC,MAAM,OAAO,UAAU,CAAC,CAAC;AAGpE,eAAO,MAAM,iBAAiB;;;;CAIpB,CAAC;AAGX,eAAO,MAAM,oBAAoB,QAAsB,CAAC;AAGxD,eAAO,MAAM,gCAAgC,KAAK,CAAC;AAGnD,eAAO,MAAM,uBAAuB,MAAM,CAAC;AAG3C,MAAM,MAAM,SAAS,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,KAAK,CAAC;AAGxE,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,SAAS,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;CACd;AAGD,eAAO,MAAM,WAAW,EAAE,eAAe,EAQxC,CAAC"}
|
package/dist/utilities/time.js
DELETED
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Time-related constants
|
|
3
|
-
*/
|
|
4
|
-
// Time conversions in milliseconds
|
|
5
|
-
export const MILLISECONDS = {
|
|
6
|
-
SECOND: 1000,
|
|
7
|
-
MINUTE: 60 * 1000,
|
|
8
|
-
HOUR: 60 * 60 * 1000,
|
|
9
|
-
DAY: 24 * 60 * 60 * 1000,
|
|
10
|
-
WEEK: 7 * 24 * 60 * 60 * 1000,
|
|
11
|
-
};
|
|
12
|
-
// Time conversions in seconds
|
|
13
|
-
export const SECONDS = {
|
|
14
|
-
MINUTE: 60,
|
|
15
|
-
HOUR: 60 * 60,
|
|
16
|
-
DAY: 24 * 60 * 60,
|
|
17
|
-
WEEK: 7 * 24 * 60 * 60,
|
|
18
|
-
};
|
|
19
|
-
// Common date formats
|
|
20
|
-
export const DATE_FORMATS = {
|
|
21
|
-
// Display formats
|
|
22
|
-
DISPLAY_DATE: 'MMM dd, yyyy',
|
|
23
|
-
DISPLAY_DATE_TIME: 'MMM dd, yyyy HH:mm',
|
|
24
|
-
DISPLAY_DATE_TIME_SECONDS: 'MMM dd, yyyy HH:mm:ss',
|
|
25
|
-
DISPLAY_SHORT: 'MM/dd/yy',
|
|
26
|
-
// API formats
|
|
27
|
-
API_DATE: 'yyyy-MM-dd',
|
|
28
|
-
API_DATETIME: "yyyy-MM-dd'T'HH:mm:ss",
|
|
29
|
-
API_DATETIME_WITH_TIMEZONE: "yyyy-MM-dd'T'HH:mm:ss'Z'",
|
|
30
|
-
// Other formats
|
|
31
|
-
MONTH_YEAR: 'MMM yyyy',
|
|
32
|
-
YEAR: 'yyyy',
|
|
33
|
-
TIME: 'HH:mm',
|
|
34
|
-
TIME_WITH_SECONDS: 'HH:mm:ss',
|
|
35
|
-
};
|
|
36
|
-
// Time zones
|
|
37
|
-
export const TIME_ZONES = {
|
|
38
|
-
UTC: 'UTC',
|
|
39
|
-
EST: 'America/New_York',
|
|
40
|
-
PST: 'America/Los_Angeles',
|
|
41
|
-
SYDNEY: 'Australia/Sydney',
|
|
42
|
-
MELBOURNE: 'Australia/Melbourne',
|
|
43
|
-
};
|
|
44
|
-
// Session durations
|
|
45
|
-
export const SESSION_DURATIONS = {
|
|
46
|
-
DEFAULT: 30 * 60 * 1000, // 30 minutes
|
|
47
|
-
EXTENDED: 24 * 60 * 60 * 1000, // 24 hours
|
|
48
|
-
REMEMBER_ME: 30 * 24 * 60 * 60 * 1000, // 30 days
|
|
49
|
-
};
|
|
50
|
-
// Time unit constants (matching Blueberry)
|
|
51
|
-
export const MILLISECONDS_PER_DAY = 24 * 60 * 60 * 1000;
|
|
52
|
-
// Default time periods
|
|
53
|
-
export const DEFAULT_RECENT_TRANSACTIONS_DAYS = 30;
|
|
54
|
-
// Date format patterns
|
|
55
|
-
export const DATE_ISO_TIME_SEPARATOR = 'T';
|
|
56
|
-
// Time range configurations with labels and day counts
|
|
57
|
-
export const TIME_RANGES = [
|
|
58
|
-
{ label: '1W', value: '1W', days: 7 },
|
|
59
|
-
{ label: '1M', value: '1M', days: 30 },
|
|
60
|
-
{ label: '6M', value: '6M', days: 180 },
|
|
61
|
-
{ label: '1Y', value: '1Y', days: 365 },
|
|
62
|
-
{ label: '3Y', value: '3Y', days: 1095 },
|
|
63
|
-
{ label: '5Y', value: '5Y', days: 1825 },
|
|
64
|
-
{ label: '10Y', value: '10Y', days: 3650 },
|
|
65
|
-
];
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Validation-related constants
|
|
3
|
-
*/
|
|
4
|
-
export declare const REGEX_PATTERNS: {
|
|
5
|
-
readonly EMAIL: RegExp;
|
|
6
|
-
readonly PHONE: RegExp;
|
|
7
|
-
readonly USERNAME: RegExp;
|
|
8
|
-
readonly PASSWORD: RegExp;
|
|
9
|
-
readonly UUID: RegExp;
|
|
10
|
-
readonly NUMERIC: RegExp;
|
|
11
|
-
readonly DECIMAL: RegExp;
|
|
12
|
-
readonly ALPHA_ONLY: RegExp;
|
|
13
|
-
readonly ALPHANUMERIC: RegExp;
|
|
14
|
-
readonly URL: RegExp;
|
|
15
|
-
};
|
|
16
|
-
export declare const VALIDATION_RULES: {
|
|
17
|
-
readonly MIN_USERNAME_LENGTH: 3;
|
|
18
|
-
readonly MAX_USERNAME_LENGTH: 30;
|
|
19
|
-
readonly MIN_PASSWORD_LENGTH: 8;
|
|
20
|
-
readonly MAX_PASSWORD_LENGTH: 128;
|
|
21
|
-
readonly MIN_NAME_LENGTH: 2;
|
|
22
|
-
readonly MAX_NAME_LENGTH: 50;
|
|
23
|
-
readonly MIN_PORTFOLIO_NAME_LENGTH: 3;
|
|
24
|
-
readonly MAX_PORTFOLIO_NAME_LENGTH: 100;
|
|
25
|
-
readonly MIN_PORTFOLIO_DESCRIPTION_LENGTH: 0;
|
|
26
|
-
readonly MAX_PORTFOLIO_DESCRIPTION_LENGTH: 500;
|
|
27
|
-
readonly MIN_TRADE_AMOUNT: 0.01;
|
|
28
|
-
readonly MAX_TRADE_AMOUNT: 1000000;
|
|
29
|
-
readonly MIN_TRADE_QUANTITY: 0.001;
|
|
30
|
-
readonly MAX_TRADE_QUANTITY: 1000000;
|
|
31
|
-
readonly MIN_PRICE: 0.01;
|
|
32
|
-
readonly MAX_PRICE: 1000000;
|
|
33
|
-
readonly MIN_WITHDRAWAL_AMOUNT: 100;
|
|
34
|
-
readonly MAX_WITHDRAWAL_AMOUNT: 1000000;
|
|
35
|
-
readonly MAX_DESCRIPTION_LENGTH: 500;
|
|
36
|
-
readonly MAX_NOTES_LENGTH: 1000;
|
|
37
|
-
readonly MAX_FILE_SIZE_MB: 10;
|
|
38
|
-
readonly MAX_FILE_NAME_LENGTH: 255;
|
|
39
|
-
readonly MIN_ADDRESS_LENGTH: 10;
|
|
40
|
-
readonly MAX_ADDRESS_LENGTH: 200;
|
|
41
|
-
readonly MIN_POSTAL_CODE_LENGTH: 3;
|
|
42
|
-
readonly MAX_POSTAL_CODE_LENGTH: 10;
|
|
43
|
-
};
|
|
44
|
-
export declare const VALIDATION_ERRORS: {
|
|
45
|
-
readonly REQUIRED: "This field is required";
|
|
46
|
-
readonly INVALID_EMAIL: "Please enter a valid email address";
|
|
47
|
-
readonly INVALID_PHONE: "Please enter a valid phone number";
|
|
48
|
-
readonly INVALID_USERNAME: "Username must be 3-30 characters, letters, numbers, underscores, and hyphens only";
|
|
49
|
-
readonly INVALID_PASSWORD: "Password must be at least 8 characters with uppercase, lowercase, and numbers";
|
|
50
|
-
readonly MIN_LENGTH: (field: string, min: number) => string;
|
|
51
|
-
readonly MAX_LENGTH: (field: string, max: number) => string;
|
|
52
|
-
readonly MIN_VALUE: (field: string, min: number) => string;
|
|
53
|
-
readonly MAX_VALUE: (field: string, max: number) => string;
|
|
54
|
-
readonly INVALID_FORMAT: (field: string) => string;
|
|
55
|
-
readonly PASSWORDS_DONT_MATCH: "Passwords do not match";
|
|
56
|
-
};
|
|
57
|
-
//# sourceMappingURL=validation.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"validation.d.ts","sourceRoot":"","sources":["../../src/utilities/validation.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,eAAO,MAAM,cAAc;;;;;;;;;;;CAWjB,CAAC;AAGX,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsCnB,CAAC;AAGX,eAAO,MAAM,iBAAiB;;;;;;iCAMR,MAAM,OAAO,MAAM;iCACnB,MAAM,OAAO,MAAM;gCACpB,MAAM,OAAO,MAAM;gCACnB,MAAM,OAAO,MAAM;qCACd,MAAM;;CAEtB,CAAC"}
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Validation-related constants
|
|
3
|
-
*/
|
|
4
|
-
// Regular expression patterns
|
|
5
|
-
export const REGEX_PATTERNS = {
|
|
6
|
-
EMAIL: /^[^\s@]+@[^\s@]+\.[^\s@]+$/,
|
|
7
|
-
PHONE: /^\+?[\d\s-()]+$/,
|
|
8
|
-
USERNAME: /^[a-zA-Z0-9_-]{3,30}$/,
|
|
9
|
-
PASSWORD: /^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)[a-zA-Z\d@$!%*?&]{8,}$/,
|
|
10
|
-
UUID: /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i,
|
|
11
|
-
NUMERIC: /^\d+$/,
|
|
12
|
-
DECIMAL: /^\d+(\.\d{1,2})?$/,
|
|
13
|
-
ALPHA_ONLY: /^[a-zA-Z]+$/,
|
|
14
|
-
ALPHANUMERIC: /^[a-zA-Z0-9]+$/,
|
|
15
|
-
URL: /^https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_+.~#?&//=]*)$/,
|
|
16
|
-
};
|
|
17
|
-
// Validation rules
|
|
18
|
-
export const VALIDATION_RULES = {
|
|
19
|
-
// User-related
|
|
20
|
-
MIN_USERNAME_LENGTH: 3,
|
|
21
|
-
MAX_USERNAME_LENGTH: 30,
|
|
22
|
-
MIN_PASSWORD_LENGTH: 8,
|
|
23
|
-
MAX_PASSWORD_LENGTH: 128,
|
|
24
|
-
MIN_NAME_LENGTH: 2,
|
|
25
|
-
MAX_NAME_LENGTH: 50,
|
|
26
|
-
// Portfolio-related
|
|
27
|
-
MIN_PORTFOLIO_NAME_LENGTH: 3,
|
|
28
|
-
MAX_PORTFOLIO_NAME_LENGTH: 100,
|
|
29
|
-
MIN_PORTFOLIO_DESCRIPTION_LENGTH: 0,
|
|
30
|
-
MAX_PORTFOLIO_DESCRIPTION_LENGTH: 500,
|
|
31
|
-
// Trade-related
|
|
32
|
-
MIN_TRADE_AMOUNT: 0.01,
|
|
33
|
-
MAX_TRADE_AMOUNT: 1000000,
|
|
34
|
-
MIN_TRADE_QUANTITY: 0.001,
|
|
35
|
-
MAX_TRADE_QUANTITY: 1000000,
|
|
36
|
-
MIN_PRICE: 0.01,
|
|
37
|
-
MAX_PRICE: 1000000,
|
|
38
|
-
// Withdrawal-related
|
|
39
|
-
MIN_WITHDRAWAL_AMOUNT: 100,
|
|
40
|
-
MAX_WITHDRAWAL_AMOUNT: 1000000,
|
|
41
|
-
// General
|
|
42
|
-
MAX_DESCRIPTION_LENGTH: 500,
|
|
43
|
-
MAX_NOTES_LENGTH: 1000,
|
|
44
|
-
MAX_FILE_SIZE_MB: 10,
|
|
45
|
-
MAX_FILE_NAME_LENGTH: 255,
|
|
46
|
-
// Address-related
|
|
47
|
-
MIN_ADDRESS_LENGTH: 10,
|
|
48
|
-
MAX_ADDRESS_LENGTH: 200,
|
|
49
|
-
MIN_POSTAL_CODE_LENGTH: 3,
|
|
50
|
-
MAX_POSTAL_CODE_LENGTH: 10,
|
|
51
|
-
};
|
|
52
|
-
// Error messages
|
|
53
|
-
export const VALIDATION_ERRORS = {
|
|
54
|
-
REQUIRED: 'This field is required',
|
|
55
|
-
INVALID_EMAIL: 'Please enter a valid email address',
|
|
56
|
-
INVALID_PHONE: 'Please enter a valid phone number',
|
|
57
|
-
INVALID_USERNAME: 'Username must be 3-30 characters, letters, numbers, underscores, and hyphens only',
|
|
58
|
-
INVALID_PASSWORD: 'Password must be at least 8 characters with uppercase, lowercase, and numbers',
|
|
59
|
-
MIN_LENGTH: (field, min) => `${field} must be at least ${min} characters`,
|
|
60
|
-
MAX_LENGTH: (field, max) => `${field} must be no more than ${max} characters`,
|
|
61
|
-
MIN_VALUE: (field, min) => `${field} must be at least ${min}`,
|
|
62
|
-
MAX_VALUE: (field, max) => `${field} must be no more than ${max}`,
|
|
63
|
-
INVALID_FORMAT: (field) => `${field} has an invalid format`,
|
|
64
|
-
PASSWORDS_DONT_MATCH: 'Passwords do not match',
|
|
65
|
-
};
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Validation constants for the MyPortfolio platform
|
|
3
|
-
*/
|
|
4
|
-
export declare const PASSWORD_VALIDATION: {
|
|
5
|
-
readonly MIN_LENGTH: 8;
|
|
6
|
-
};
|
|
7
|
-
export declare const EMAIL_CONFIRMATION_VALIDATION: {
|
|
8
|
-
readonly TOKEN_MIN_LENGTH: 6;
|
|
9
|
-
readonly TOKEN_MAX_LENGTH: 20;
|
|
10
|
-
};
|
|
11
|
-
export declare const USER_PROFILE_VALIDATION: {
|
|
12
|
-
readonly MIN_NAME_PARTS: 2;
|
|
13
|
-
readonly MIN_AGE: 13;
|
|
14
|
-
readonly MAX_AGE: 120;
|
|
15
|
-
readonly MIN_ADDRESS_LENGTH: 10;
|
|
16
|
-
readonly MIN_PHONE_LENGTH: 8;
|
|
17
|
-
};
|
|
18
|
-
export declare const INVESTMENT_PREFERENCES_VALIDATION: {
|
|
19
|
-
readonly MIN_INVESTMENT_AMOUNT: 100;
|
|
20
|
-
readonly MAX_INVESTMENT_AMOUNT: 10000000;
|
|
21
|
-
readonly MIN_SOURCE_OF_FUNDS: 1;
|
|
22
|
-
};
|
|
23
|
-
export type PasswordValidation = typeof PASSWORD_VALIDATION;
|
|
24
|
-
export type EmailConfirmationValidation = typeof EMAIL_CONFIRMATION_VALIDATION;
|
|
25
|
-
export type UserProfileValidation = typeof USER_PROFILE_VALIDATION;
|
|
26
|
-
export type InvestmentPreferencesValidation = typeof INVESTMENT_PREFERENCES_VALIDATION;
|
|
27
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/validation/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,eAAO,MAAM,mBAAmB;;CAEtB,CAAC;AAGX,eAAO,MAAM,6BAA6B;;;CAGhC,CAAC;AAGX,eAAO,MAAM,uBAAuB;;;;;;CAM1B,CAAC;AAGX,eAAO,MAAM,iCAAiC;;;;CAIpC,CAAC;AAGX,MAAM,MAAM,kBAAkB,GAAG,OAAO,mBAAmB,CAAC;AAC5D,MAAM,MAAM,2BAA2B,GAAG,OAAO,6BAA6B,CAAC;AAC/E,MAAM,MAAM,qBAAqB,GAAG,OAAO,uBAAuB,CAAC;AACnE,MAAM,MAAM,+BAA+B,GAAG,OAAO,iCAAiC,CAAC"}
|
package/dist/validation/index.js
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Validation constants for the MyPortfolio platform
|
|
3
|
-
*/
|
|
4
|
-
// ===== PASSWORD VALIDATION =====
|
|
5
|
-
export const PASSWORD_VALIDATION = {
|
|
6
|
-
MIN_LENGTH: 8,
|
|
7
|
-
};
|
|
8
|
-
// ===== EMAIL CONFIRMATION =====
|
|
9
|
-
export const EMAIL_CONFIRMATION_VALIDATION = {
|
|
10
|
-
TOKEN_MIN_LENGTH: 6,
|
|
11
|
-
TOKEN_MAX_LENGTH: 20,
|
|
12
|
-
};
|
|
13
|
-
// ===== USER PROFILE VALIDATION =====
|
|
14
|
-
export const USER_PROFILE_VALIDATION = {
|
|
15
|
-
MIN_NAME_PARTS: 2,
|
|
16
|
-
MIN_AGE: 13,
|
|
17
|
-
MAX_AGE: 120,
|
|
18
|
-
MIN_ADDRESS_LENGTH: 10,
|
|
19
|
-
MIN_PHONE_LENGTH: 8,
|
|
20
|
-
};
|
|
21
|
-
// ===== INVESTMENT PREFERENCES VALIDATION =====
|
|
22
|
-
export const INVESTMENT_PREFERENCES_VALIDATION = {
|
|
23
|
-
MIN_INVESTMENT_AMOUNT: 100,
|
|
24
|
-
MAX_INVESTMENT_AMOUNT: 10000000,
|
|
25
|
-
MIN_SOURCE_OF_FUNDS: 1,
|
|
26
|
-
};
|