@cranberry-money/shared-constants 3.0.2 → 4.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +103 -72
- package/package.json +5 -3
- package/dist/accounts.d.ts +0 -100
- package/dist/accounts.d.ts.map +0 -1
- package/dist/accounts.js +0 -99
- package/dist/allocation.d.ts +0 -15
- package/dist/allocation.d.ts.map +0 -1
- package/dist/allocation.js +0 -17
- package/dist/common.d.ts +0 -31
- package/dist/common.d.ts.map +0 -1
- package/dist/common.js +0 -35
- package/dist/currencies.d.ts +0 -38
- package/dist/currencies.d.ts.map +0 -1
- package/dist/currencies.js +0 -37
- package/dist/currency.d.ts +0 -51
- package/dist/currency.d.ts.map +0 -1
- package/dist/currency.js +0 -55
- package/dist/http.d.ts +0 -8
- package/dist/http.d.ts.map +0 -1
- package/dist/http.js +0 -9
- package/dist/index.d.ts +0 -17
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -18
- package/dist/jobs.d.ts +0 -19
- package/dist/jobs.d.ts.map +0 -1
- package/dist/jobs.js +0 -18
- package/dist/portfolios.d.ts +0 -17
- package/dist/portfolios.d.ts.map +0 -1
- package/dist/portfolios.js +0 -16
- package/dist/time.d.ts +0 -17
- package/dist/time.d.ts.map +0 -1
- package/dist/time.js +0 -22
- package/dist/trades.d.ts +0 -34
- package/dist/trades.d.ts.map +0 -1
- package/dist/trades.js +0 -34
- package/dist/transactions.d.ts +0 -145
- package/dist/transactions.d.ts.map +0 -1
- package/dist/transactions.js +0 -154
- package/dist/ui/colors.d.ts +0 -47
- package/dist/ui/colors.d.ts.map +0 -1
- package/dist/ui/colors.js +0 -59
- package/dist/ui/index.d.ts +0 -6
- package/dist/ui/index.d.ts.map +0 -1
- package/dist/ui/index.js +0 -5
- package/dist/ui/status.d.ts +0 -41
- package/dist/ui/status.d.ts.map +0 -1
- package/dist/ui/status.js +0 -53
- package/dist/validation.d.ts +0 -53
- package/dist/validation.d.ts.map +0 -1
- package/dist/validation.js +0 -60
- package/dist/withdrawals.d.ts +0 -8
- package/dist/withdrawals.d.ts.map +0 -1
- package/dist/withdrawals.js +0 -8
package/dist/currency.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"currency.d.ts","sourceRoot":"","sources":["../src/currency.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,eAAO,MAAM,QAAQ;;;;;;;;;CASX,CAAC;AAEX,eAAO,MAAM,eAAe;;;;;;;;;CASlB,CAAC;AAEX,eAAO,MAAM,gBAAgB;;;;;;;;;CASnB,CAAC;AAGX,eAAO,MAAM,gBAAgB,OAAe,CAAC;AAG7C,MAAM,MAAM,QAAQ,GAAG,OAAO,QAAQ,CAAC,MAAM,OAAO,QAAQ,CAAC,CAAC;AAC9D,MAAM,MAAM,YAAY,GAAG,QAAQ,CAAC;AAGpC,eAAO,MAAM,YAAY,OAAe,CAAC;AACzC,eAAO,MAAM,YAAY,OAAe,CAAC;AAGzC,eAAO,MAAM,kBAAkB,qBAAsB,CAAC;AACtD,eAAO,MAAM,kBAAkB,aAAsB,CAAC;AAGtD,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,QAAQ,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;CAChB;AAGD,eAAO,MAAM,UAAU,EAAE,YAAY,EAIlC,CAAC;AAGJ,eAAO,MAAM,eAAe,GAAI,MAAM,QAAQ,KAAG,YAAY,GAAG,SAE/D,CAAC"}
|
package/dist/currency.js
DELETED
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Currency-related constants sourced from backend Django constants
|
|
3
|
-
*
|
|
4
|
-
* Backend source: bilberry/shared/constants.py
|
|
5
|
-
* These constants serve as the single source of truth for currencies.
|
|
6
|
-
*/
|
|
7
|
-
// ===== CURRENCY CODES (ISO 4217) =====
|
|
8
|
-
export const CURRENCY = {
|
|
9
|
-
AUD: 'AUD',
|
|
10
|
-
USD: 'USD',
|
|
11
|
-
EUR: 'EUR',
|
|
12
|
-
GBP: 'GBP',
|
|
13
|
-
CAD: 'CAD',
|
|
14
|
-
JPY: 'JPY',
|
|
15
|
-
NZD: 'NZD',
|
|
16
|
-
SGD: 'SGD',
|
|
17
|
-
};
|
|
18
|
-
export const CURRENCY_LABELS = {
|
|
19
|
-
AUD: 'Australian Dollar',
|
|
20
|
-
USD: 'US Dollar',
|
|
21
|
-
EUR: 'Euro',
|
|
22
|
-
GBP: 'British Pound',
|
|
23
|
-
CAD: 'Canadian Dollar',
|
|
24
|
-
JPY: 'Japanese Yen',
|
|
25
|
-
NZD: 'New Zealand Dollar',
|
|
26
|
-
SGD: 'Singapore Dollar',
|
|
27
|
-
};
|
|
28
|
-
export const CURRENCY_SYMBOLS = {
|
|
29
|
-
AUD: 'A$',
|
|
30
|
-
USD: '$',
|
|
31
|
-
EUR: '€',
|
|
32
|
-
GBP: '£',
|
|
33
|
-
CAD: 'C$',
|
|
34
|
-
JPY: '¥',
|
|
35
|
-
NZD: 'NZ$',
|
|
36
|
-
SGD: 'S$',
|
|
37
|
-
};
|
|
38
|
-
// Default currency
|
|
39
|
-
export const DEFAULT_CURRENCY = CURRENCY.AUD;
|
|
40
|
-
// Legacy single currency exports for backward compatibility
|
|
41
|
-
export const CURRENCY_AUD = CURRENCY.AUD;
|
|
42
|
-
export const CURRENCY_USD = CURRENCY.USD;
|
|
43
|
-
// Legacy labels for backward compatibility
|
|
44
|
-
export const CURRENCY_LABEL_AUD = CURRENCY_LABELS.AUD;
|
|
45
|
-
export const CURRENCY_LABEL_USD = CURRENCY_LABELS.USD;
|
|
46
|
-
// Available currencies with display information
|
|
47
|
-
export const CURRENCIES = Object.entries(CURRENCY).map(([_, code]) => ({
|
|
48
|
-
code,
|
|
49
|
-
name: CURRENCY_LABELS[code],
|
|
50
|
-
symbol: CURRENCY_SYMBOLS[code],
|
|
51
|
-
}));
|
|
52
|
-
// Helper function to get currency info by code
|
|
53
|
-
export const getCurrencyInfo = (code) => {
|
|
54
|
-
return CURRENCIES.find((currency) => currency.code === code);
|
|
55
|
-
};
|
package/dist/http.d.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* HTTP and network-related constants for the MyPortfolio platform.
|
|
3
|
-
*
|
|
4
|
-
* Contains HTTP headers, content types, and other network-related constants.
|
|
5
|
-
*/
|
|
6
|
-
export declare const HTTP_HEADER_CONTENT_TYPE = "Content-Type";
|
|
7
|
-
export declare const CONTENT_TYPE_APPLICATION_JSON = "application/json";
|
|
8
|
-
//# sourceMappingURL=http.d.ts.map
|
package/dist/http.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"http.d.ts","sourceRoot":"","sources":["../src/http.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,eAAO,MAAM,wBAAwB,iBAAiB,CAAC;AAGvD,eAAO,MAAM,6BAA6B,qBAAqB,CAAC"}
|
package/dist/http.js
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* HTTP and network-related constants for the MyPortfolio platform.
|
|
3
|
-
*
|
|
4
|
-
* Contains HTTP headers, content types, and other network-related constants.
|
|
5
|
-
*/
|
|
6
|
-
// HTTP Headers
|
|
7
|
-
export const HTTP_HEADER_CONTENT_TYPE = 'Content-Type';
|
|
8
|
-
// Content Types
|
|
9
|
-
export const CONTENT_TYPE_APPLICATION_JSON = 'application/json';
|
package/dist/index.d.ts
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Centralized export of all shared constants
|
|
3
|
-
*/
|
|
4
|
-
export * from './common';
|
|
5
|
-
export * from './time';
|
|
6
|
-
export * from './currency';
|
|
7
|
-
export * from './http';
|
|
8
|
-
export * from './validation';
|
|
9
|
-
export * from './allocation';
|
|
10
|
-
export * from './transactions';
|
|
11
|
-
export * from './accounts';
|
|
12
|
-
export * from './portfolios';
|
|
13
|
-
export * from './jobs';
|
|
14
|
-
export * from './trades';
|
|
15
|
-
export * from './withdrawals';
|
|
16
|
-
export * from './ui';
|
|
17
|
-
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,QAAQ,CAAC;AACvB,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,eAAe,CAAC;AAG9B,cAAc,MAAM,CAAC"}
|
package/dist/index.js
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Centralized export of all shared constants
|
|
3
|
-
*/
|
|
4
|
-
// Re-export shared constants
|
|
5
|
-
export * from './common';
|
|
6
|
-
export * from './time';
|
|
7
|
-
export * from './currency';
|
|
8
|
-
export * from './http';
|
|
9
|
-
export * from './validation';
|
|
10
|
-
export * from './allocation';
|
|
11
|
-
export * from './transactions';
|
|
12
|
-
export * from './accounts';
|
|
13
|
-
export * from './portfolios';
|
|
14
|
-
export * from './jobs';
|
|
15
|
-
export * from './trades';
|
|
16
|
-
export * from './withdrawals';
|
|
17
|
-
// Re-export UI constants
|
|
18
|
-
export * from './ui';
|
package/dist/jobs.d.ts
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Job and Task status constants sourced from backend Django constants
|
|
3
|
-
*
|
|
4
|
-
* Backend source: bilberry/shared/constants.py
|
|
5
|
-
*/
|
|
6
|
-
export declare const JOB_STATUS: {
|
|
7
|
-
readonly SCHEDULED: "scheduled";
|
|
8
|
-
readonly RUNNING: "running";
|
|
9
|
-
readonly COMPLETED: "completed";
|
|
10
|
-
readonly FAILED: "failed";
|
|
11
|
-
};
|
|
12
|
-
export declare const JOB_STATUS_LABELS: {
|
|
13
|
-
readonly scheduled: "Scheduled";
|
|
14
|
-
readonly running: "Running";
|
|
15
|
-
readonly completed: "Completed";
|
|
16
|
-
readonly failed: "Failed";
|
|
17
|
-
};
|
|
18
|
-
export type JobStatus = typeof JOB_STATUS[keyof typeof JOB_STATUS];
|
|
19
|
-
//# sourceMappingURL=jobs.d.ts.map
|
package/dist/jobs.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"jobs.d.ts","sourceRoot":"","sources":["../src/jobs.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,eAAO,MAAM,UAAU;;;;;CAKb,CAAC;AAEX,eAAO,MAAM,iBAAiB;;;;;CAKpB,CAAC;AAEX,MAAM,MAAM,SAAS,GAAG,OAAO,UAAU,CAAC,MAAM,OAAO,UAAU,CAAC,CAAC"}
|
package/dist/jobs.js
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Job and Task status constants sourced from backend Django constants
|
|
3
|
-
*
|
|
4
|
-
* Backend source: bilberry/shared/constants.py
|
|
5
|
-
*/
|
|
6
|
-
// ===== JOB/TASK STATUSES =====
|
|
7
|
-
export const JOB_STATUS = {
|
|
8
|
-
SCHEDULED: 'scheduled',
|
|
9
|
-
RUNNING: 'running',
|
|
10
|
-
COMPLETED: 'completed',
|
|
11
|
-
FAILED: 'failed',
|
|
12
|
-
};
|
|
13
|
-
export const JOB_STATUS_LABELS = {
|
|
14
|
-
scheduled: 'Scheduled',
|
|
15
|
-
running: 'Running',
|
|
16
|
-
completed: 'Completed',
|
|
17
|
-
failed: 'Failed',
|
|
18
|
-
};
|
package/dist/portfolios.d.ts
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Portfolio-related constants sourced from backend Django constants
|
|
3
|
-
*
|
|
4
|
-
* Backend source: bilberry/portfolios/constants.py
|
|
5
|
-
*/
|
|
6
|
-
export declare const PORTFOLIO_RISK_LEVEL: {
|
|
7
|
-
readonly LOW: "LOW";
|
|
8
|
-
readonly MEDIUM: "MEDIUM";
|
|
9
|
-
readonly HIGH: "HIGH";
|
|
10
|
-
};
|
|
11
|
-
export declare const PORTFOLIO_RISK_LEVEL_LABELS: {
|
|
12
|
-
readonly LOW: "Low Risk";
|
|
13
|
-
readonly MEDIUM: "Medium Risk";
|
|
14
|
-
readonly HIGH: "High Risk";
|
|
15
|
-
};
|
|
16
|
-
export type PortfolioRiskLevel = typeof PORTFOLIO_RISK_LEVEL[keyof typeof PORTFOLIO_RISK_LEVEL];
|
|
17
|
-
//# sourceMappingURL=portfolios.d.ts.map
|
package/dist/portfolios.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"portfolios.d.ts","sourceRoot":"","sources":["../src/portfolios.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,eAAO,MAAM,oBAAoB;;;;CAIvB,CAAC;AAEX,eAAO,MAAM,2BAA2B;;;;CAI9B,CAAC;AAEX,MAAM,MAAM,kBAAkB,GAAG,OAAO,oBAAoB,CAAC,MAAM,OAAO,oBAAoB,CAAC,CAAC"}
|
package/dist/portfolios.js
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Portfolio-related constants sourced from backend Django constants
|
|
3
|
-
*
|
|
4
|
-
* Backend source: bilberry/portfolios/constants.py
|
|
5
|
-
*/
|
|
6
|
-
// ===== PORTFOLIO RISK LEVELS =====
|
|
7
|
-
export const PORTFOLIO_RISK_LEVEL = {
|
|
8
|
-
LOW: 'LOW',
|
|
9
|
-
MEDIUM: 'MEDIUM',
|
|
10
|
-
HIGH: 'HIGH',
|
|
11
|
-
};
|
|
12
|
-
export const PORTFOLIO_RISK_LEVEL_LABELS = {
|
|
13
|
-
LOW: 'Low Risk',
|
|
14
|
-
MEDIUM: 'Medium Risk',
|
|
15
|
-
HIGH: 'High Risk',
|
|
16
|
-
};
|
package/dist/time.d.ts
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Time and time range constants for the MyPortfolio platform.
|
|
3
|
-
*
|
|
4
|
-
* Contains time-related constants for formatting, intervals, calculations,
|
|
5
|
-
* and time ranges used for charts, analytics, and filtering data by time periods.
|
|
6
|
-
*/
|
|
7
|
-
export declare const MILLISECONDS_PER_DAY: number;
|
|
8
|
-
export declare const DEFAULT_RECENT_TRANSACTIONS_DAYS = 30;
|
|
9
|
-
export declare const DATE_ISO_TIME_SEPARATOR = "T";
|
|
10
|
-
export type TimeRange = '1W' | '1M' | '6M' | '1Y' | '3Y' | '5Y' | '10Y';
|
|
11
|
-
export interface TimeRangeConfig {
|
|
12
|
-
label: string;
|
|
13
|
-
value: TimeRange;
|
|
14
|
-
days: number;
|
|
15
|
-
}
|
|
16
|
-
export declare const TIME_RANGES: TimeRangeConfig[];
|
|
17
|
-
//# sourceMappingURL=time.d.ts.map
|
package/dist/time.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"time.d.ts","sourceRoot":"","sources":["../src/time.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,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/time.js
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Time and time range constants for the MyPortfolio platform.
|
|
3
|
-
*
|
|
4
|
-
* Contains time-related constants for formatting, intervals, calculations,
|
|
5
|
-
* and time ranges used for charts, analytics, and filtering data by time periods.
|
|
6
|
-
*/
|
|
7
|
-
// Time unit constants (in milliseconds) - only used constants
|
|
8
|
-
export const MILLISECONDS_PER_DAY = 24 * 60 * 60 * 1000;
|
|
9
|
-
// Default time periods - only used constants
|
|
10
|
-
export const DEFAULT_RECENT_TRANSACTIONS_DAYS = 30;
|
|
11
|
-
// Date format patterns
|
|
12
|
-
export const DATE_ISO_TIME_SEPARATOR = 'T';
|
|
13
|
-
// Time range configurations with labels and day counts
|
|
14
|
-
export const TIME_RANGES = [
|
|
15
|
-
{ label: '1W', value: '1W', days: 7 },
|
|
16
|
-
{ label: '1M', value: '1M', days: 30 },
|
|
17
|
-
{ label: '6M', value: '6M', days: 180 },
|
|
18
|
-
{ label: '1Y', value: '1Y', days: 365 },
|
|
19
|
-
{ label: '3Y', value: '3Y', days: 1095 },
|
|
20
|
-
{ label: '5Y', value: '5Y', days: 1825 },
|
|
21
|
-
{ label: '10Y', value: '10Y', days: 3650 },
|
|
22
|
-
];
|
package/dist/trades.d.ts
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Trade-related constants sourced from backend Django constants
|
|
3
|
-
*
|
|
4
|
-
* Backend source: bilberry/trades/constants.py
|
|
5
|
-
*
|
|
6
|
-
* Note: Trade status and action constants are already included in transactions.ts
|
|
7
|
-
* This file contains additional trade-specific constants for trade sheets.
|
|
8
|
-
*/
|
|
9
|
-
export declare const TARGET_TRADE_SHEET_STATUS: {
|
|
10
|
-
readonly DRAFT: "DRAFT";
|
|
11
|
-
readonly APPROVED: "APPROVED";
|
|
12
|
-
readonly SUBMITTED: "SUBMITTED";
|
|
13
|
-
readonly CANCELLED: "CANCELLED";
|
|
14
|
-
};
|
|
15
|
-
export declare const TARGET_TRADE_SHEET_STATUS_LABELS: {
|
|
16
|
-
readonly DRAFT: "Draft";
|
|
17
|
-
readonly APPROVED: "Approved";
|
|
18
|
-
readonly SUBMITTED: "Submitted to Broker";
|
|
19
|
-
readonly CANCELLED: "Cancelled";
|
|
20
|
-
};
|
|
21
|
-
export type TargetTradeSheetStatus = typeof TARGET_TRADE_SHEET_STATUS[keyof typeof TARGET_TRADE_SHEET_STATUS];
|
|
22
|
-
export declare const TRADE_SHEET_SETTLEMENT_STATUS: {
|
|
23
|
-
readonly PENDING: "PENDING";
|
|
24
|
-
readonly SETTLED: "SETTLED";
|
|
25
|
-
readonly FAILED: "FAILED";
|
|
26
|
-
};
|
|
27
|
-
export declare const TRADE_SHEET_SETTLEMENT_STATUS_LABELS: {
|
|
28
|
-
readonly PENDING: "Pending Settlement";
|
|
29
|
-
readonly SETTLED: "Settled";
|
|
30
|
-
readonly FAILED: "Settlement Failed";
|
|
31
|
-
};
|
|
32
|
-
export type TradeSheetSettlementStatus = typeof TRADE_SHEET_SETTLEMENT_STATUS[keyof typeof TRADE_SHEET_SETTLEMENT_STATUS];
|
|
33
|
-
export { TRADE_STATUS, TRADE_STATUS_LABELS, TARGET_TRADE_STATUS, TARGET_TRADE_STATUS_LABELS, TRADE_ACTION, TRADE_ACTION_LABELS, type TradeStatus, type TargetTradeStatus, type TradeAction, } from './transactions';
|
|
34
|
-
//# sourceMappingURL=trades.d.ts.map
|
package/dist/trades.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"trades.d.ts","sourceRoot":"","sources":["../src/trades.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,eAAO,MAAM,yBAAyB;;;;;CAK5B,CAAC;AAEX,eAAO,MAAM,gCAAgC;;;;;CAKnC,CAAC;AAEX,MAAM,MAAM,sBAAsB,GAAG,OAAO,yBAAyB,CAAC,MAAM,OAAO,yBAAyB,CAAC,CAAC;AAG9G,eAAO,MAAM,6BAA6B;;;;CAIhC,CAAC;AAEX,eAAO,MAAM,oCAAoC;;;;CAIvC,CAAC;AAEX,MAAM,MAAM,0BAA0B,GAAG,OAAO,6BAA6B,CAAC,MAAM,OAAO,6BAA6B,CAAC,CAAC;AAG1H,OAAO,EACL,YAAY,EACZ,mBAAmB,EACnB,mBAAmB,EACnB,0BAA0B,EAC1B,YAAY,EACZ,mBAAmB,EACnB,KAAK,WAAW,EAChB,KAAK,iBAAiB,EACtB,KAAK,WAAW,GACjB,MAAM,gBAAgB,CAAC"}
|
package/dist/trades.js
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Trade-related constants sourced from backend Django constants
|
|
3
|
-
*
|
|
4
|
-
* Backend source: bilberry/trades/constants.py
|
|
5
|
-
*
|
|
6
|
-
* Note: Trade status and action constants are already included in transactions.ts
|
|
7
|
-
* This file contains additional trade-specific constants for trade sheets.
|
|
8
|
-
*/
|
|
9
|
-
// ===== TARGET TRADE SHEET STATUSES =====
|
|
10
|
-
export const TARGET_TRADE_SHEET_STATUS = {
|
|
11
|
-
DRAFT: 'DRAFT',
|
|
12
|
-
APPROVED: 'APPROVED',
|
|
13
|
-
SUBMITTED: 'SUBMITTED',
|
|
14
|
-
CANCELLED: 'CANCELLED',
|
|
15
|
-
};
|
|
16
|
-
export const TARGET_TRADE_SHEET_STATUS_LABELS = {
|
|
17
|
-
DRAFT: 'Draft',
|
|
18
|
-
APPROVED: 'Approved',
|
|
19
|
-
SUBMITTED: 'Submitted to Broker',
|
|
20
|
-
CANCELLED: 'Cancelled',
|
|
21
|
-
};
|
|
22
|
-
// ===== TRADE SHEET SETTLEMENT STATUSES =====
|
|
23
|
-
export const TRADE_SHEET_SETTLEMENT_STATUS = {
|
|
24
|
-
PENDING: 'PENDING',
|
|
25
|
-
SETTLED: 'SETTLED',
|
|
26
|
-
FAILED: 'FAILED',
|
|
27
|
-
};
|
|
28
|
-
export const TRADE_SHEET_SETTLEMENT_STATUS_LABELS = {
|
|
29
|
-
PENDING: 'Pending Settlement',
|
|
30
|
-
SETTLED: 'Settled',
|
|
31
|
-
FAILED: 'Settlement Failed',
|
|
32
|
-
};
|
|
33
|
-
// Re-export trade constants from transactions.ts for convenience
|
|
34
|
-
export { TRADE_STATUS, TRADE_STATUS_LABELS, TARGET_TRADE_STATUS, TARGET_TRADE_STATUS_LABELS, TRADE_ACTION, TRADE_ACTION_LABELS, } from './transactions';
|
package/dist/transactions.d.ts
DELETED
|
@@ -1,145 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Transaction constants sourced from backend Django constants
|
|
3
|
-
*
|
|
4
|
-
* These constants maintain consistency between frontend and backend
|
|
5
|
-
* and serve as the single source of truth for transaction-related values.
|
|
6
|
-
*
|
|
7
|
-
* Backend sources:
|
|
8
|
-
* - bilberry/accounts/constants.py (Cash Account Transaction types)
|
|
9
|
-
* - bilberry/withdrawals/constants.py (Withdrawal statuses)
|
|
10
|
-
* - bilberry/trades/constants.py (Trade statuses)
|
|
11
|
-
*/
|
|
12
|
-
export declare const CASH_ACCOUNT_TRN_TYPE: {
|
|
13
|
-
readonly DEPOSIT: "DEPOSIT";
|
|
14
|
-
readonly WITHDRAWAL: "WITHDRAWAL";
|
|
15
|
-
readonly TRADE_SETTLEMENT: "TRADE_SETTLEMENT";
|
|
16
|
-
readonly DISTRIBUTION: "DISTRIBUTION";
|
|
17
|
-
readonly FEE: "FEE";
|
|
18
|
-
readonly INTEREST: "INTEREST";
|
|
19
|
-
readonly OTHER: "OTHER";
|
|
20
|
-
};
|
|
21
|
-
export declare const CASH_ACCOUNT_TRN_TYPE_LABELS: {
|
|
22
|
-
readonly DEPOSIT: "Deposit";
|
|
23
|
-
readonly WITHDRAWAL: "Withdrawal";
|
|
24
|
-
readonly TRADE_SETTLEMENT: "Trade Settlement";
|
|
25
|
-
readonly DISTRIBUTION: "Distribution";
|
|
26
|
-
readonly FEE: "Fee";
|
|
27
|
-
readonly INTEREST: "Interest";
|
|
28
|
-
readonly OTHER: "Adjustment";
|
|
29
|
-
};
|
|
30
|
-
export declare const CASH_TRANSACTION_TYPE: {
|
|
31
|
-
readonly DEPOSIT: "DEPOSIT";
|
|
32
|
-
readonly WITHDRAWAL: "WITHDRAWAL";
|
|
33
|
-
readonly TRANSFER: "TRANSFER";
|
|
34
|
-
readonly FEE: "FEE";
|
|
35
|
-
readonly DIVIDEND: "DIVIDEND";
|
|
36
|
-
readonly INTEREST: "INTEREST";
|
|
37
|
-
};
|
|
38
|
-
export declare const CASH_TRANSACTION_TYPE_LABELS: {
|
|
39
|
-
readonly DEPOSIT: "Deposit";
|
|
40
|
-
readonly WITHDRAWAL: "Withdrawal";
|
|
41
|
-
readonly TRANSFER: "Transfer";
|
|
42
|
-
readonly FEE: "Fee";
|
|
43
|
-
readonly DIVIDEND: "Dividend";
|
|
44
|
-
readonly INTEREST: "Interest";
|
|
45
|
-
};
|
|
46
|
-
export type CashAccountTrnType = typeof CASH_ACCOUNT_TRN_TYPE[keyof typeof CASH_ACCOUNT_TRN_TYPE];
|
|
47
|
-
export type CashTransactionType = typeof CASH_TRANSACTION_TYPE[keyof typeof CASH_TRANSACTION_TYPE];
|
|
48
|
-
export declare const WITHDRAWAL_STATUS: {
|
|
49
|
-
readonly PENDING_REVIEW: "PENDING_REVIEW";
|
|
50
|
-
readonly APPROVED: "APPROVED";
|
|
51
|
-
readonly REJECTED: "REJECTED";
|
|
52
|
-
readonly PROCESSING: "PROCESSING";
|
|
53
|
-
readonly AWAITING_LIQUIDATION: "AWAITING_LIQUIDATION";
|
|
54
|
-
readonly LIQUIDATION_IN_PROGRESS: "LIQUIDATION_IN_PROGRESS";
|
|
55
|
-
readonly COMPLETED: "COMPLETED";
|
|
56
|
-
readonly CANCELLED: "CANCELLED";
|
|
57
|
-
readonly FAILED: "FAILED";
|
|
58
|
-
};
|
|
59
|
-
export declare const WITHDRAWAL_STATUS_LABELS: {
|
|
60
|
-
readonly PENDING_REVIEW: "Pending Review";
|
|
61
|
-
readonly APPROVED: "Approved";
|
|
62
|
-
readonly REJECTED: "Rejected";
|
|
63
|
-
readonly PROCESSING: "Processing";
|
|
64
|
-
readonly AWAITING_LIQUIDATION: "Awaiting Asset Liquidation";
|
|
65
|
-
readonly LIQUIDATION_IN_PROGRESS: "Liquidation in Progress";
|
|
66
|
-
readonly COMPLETED: "Completed";
|
|
67
|
-
readonly CANCELLED: "Cancelled";
|
|
68
|
-
readonly FAILED: "Failed";
|
|
69
|
-
};
|
|
70
|
-
export type WithdrawalStatus = typeof WITHDRAWAL_STATUS[keyof typeof WITHDRAWAL_STATUS];
|
|
71
|
-
export declare const WITHDRAWAL_TYPE: {
|
|
72
|
-
readonly FULL_CASH: "FULL_CASH";
|
|
73
|
-
readonly PARTIAL_CASH: "PARTIAL_CASH";
|
|
74
|
-
};
|
|
75
|
-
export declare const WITHDRAWAL_TYPE_LABELS: {
|
|
76
|
-
readonly FULL_CASH: "Full Cash Withdrawal";
|
|
77
|
-
readonly PARTIAL_CASH: "Partial Cash Withdrawal";
|
|
78
|
-
};
|
|
79
|
-
export type WithdrawalType = typeof WITHDRAWAL_TYPE[keyof typeof WITHDRAWAL_TYPE];
|
|
80
|
-
export declare const WITHDRAWAL_REASON: {
|
|
81
|
-
readonly INVESTMENT_STRATEGY: "INVESTMENT_STRATEGY";
|
|
82
|
-
readonly PERSONAL_EXPENSES: "PERSONAL_EXPENSES";
|
|
83
|
-
readonly EMERGENCY: "EMERGENCY";
|
|
84
|
-
readonly OTHER: "OTHER";
|
|
85
|
-
};
|
|
86
|
-
export declare const WITHDRAWAL_REASON_LABELS: {
|
|
87
|
-
readonly INVESTMENT_STRATEGY: "Investment Strategy Change";
|
|
88
|
-
readonly PERSONAL_EXPENSES: "Personal Expenses";
|
|
89
|
-
readonly EMERGENCY: "Emergency";
|
|
90
|
-
readonly OTHER: "Other";
|
|
91
|
-
};
|
|
92
|
-
export type WithdrawalReason = typeof WITHDRAWAL_REASON[keyof typeof WITHDRAWAL_REASON];
|
|
93
|
-
export declare const LIQUIDATION_STATUS: {
|
|
94
|
-
readonly PENDING: "PENDING";
|
|
95
|
-
readonly TRADES_CREATED: "TRADES_CREATED";
|
|
96
|
-
readonly EXECUTED: "EXECUTED";
|
|
97
|
-
readonly SETTLED: "SETTLED";
|
|
98
|
-
readonly FAILED: "FAILED";
|
|
99
|
-
};
|
|
100
|
-
export declare const LIQUIDATION_STATUS_LABELS: {
|
|
101
|
-
readonly PENDING: "Pending";
|
|
102
|
-
readonly TRADES_CREATED: "Trades Created";
|
|
103
|
-
readonly EXECUTED: "Executed";
|
|
104
|
-
readonly SETTLED: "Settled";
|
|
105
|
-
readonly FAILED: "Failed";
|
|
106
|
-
};
|
|
107
|
-
export type LiquidationStatus = typeof LIQUIDATION_STATUS[keyof typeof LIQUIDATION_STATUS];
|
|
108
|
-
export declare const TRADE_STATUS: {
|
|
109
|
-
readonly EXECUTED: "EXECUTED";
|
|
110
|
-
readonly SETTLED: "SETTLED";
|
|
111
|
-
readonly CANCELLED: "CANCELLED";
|
|
112
|
-
readonly FAILED: "FAILED";
|
|
113
|
-
};
|
|
114
|
-
export declare const TRADE_STATUS_LABELS: {
|
|
115
|
-
readonly EXECUTED: "Executed";
|
|
116
|
-
readonly SETTLED: "Settled";
|
|
117
|
-
readonly CANCELLED: "Cancelled";
|
|
118
|
-
readonly FAILED: "Failed";
|
|
119
|
-
};
|
|
120
|
-
export type TradeStatus = typeof TRADE_STATUS[keyof typeof TRADE_STATUS];
|
|
121
|
-
export declare const TARGET_TRADE_STATUS: {
|
|
122
|
-
readonly PENDING: "PENDING";
|
|
123
|
-
readonly APPROVED: "APPROVED";
|
|
124
|
-
readonly SUBMITTED: "SUBMITTED";
|
|
125
|
-
readonly CANCELLED: "CANCELLED";
|
|
126
|
-
readonly EXPIRED: "EXPIRED";
|
|
127
|
-
};
|
|
128
|
-
export declare const TARGET_TRADE_STATUS_LABELS: {
|
|
129
|
-
readonly PENDING: "Pending Submission";
|
|
130
|
-
readonly APPROVED: "Approved";
|
|
131
|
-
readonly SUBMITTED: "Submitted to Broker";
|
|
132
|
-
readonly CANCELLED: "Cancelled";
|
|
133
|
-
readonly EXPIRED: "Expired";
|
|
134
|
-
};
|
|
135
|
-
export type TargetTradeStatus = typeof TARGET_TRADE_STATUS[keyof typeof TARGET_TRADE_STATUS];
|
|
136
|
-
export declare const TRADE_ACTION: {
|
|
137
|
-
readonly BUY: "BUY";
|
|
138
|
-
readonly SELL: "SELL";
|
|
139
|
-
};
|
|
140
|
-
export declare const TRADE_ACTION_LABELS: {
|
|
141
|
-
readonly BUY: "Buy";
|
|
142
|
-
readonly SELL: "Sell";
|
|
143
|
-
};
|
|
144
|
-
export type TradeAction = typeof TRADE_ACTION[keyof typeof TRADE_ACTION];
|
|
145
|
-
//# sourceMappingURL=transactions.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"transactions.d.ts","sourceRoot":"","sources":["../src/transactions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAOH,eAAO,MAAM,qBAAqB;;;;;;;;CAQxB,CAAC;AAEX,eAAO,MAAM,4BAA4B;;;;;;;;CAQ/B,CAAC;AAGX,eAAO,MAAM,qBAAqB;;;;;;;CAOxB,CAAC;AAEX,eAAO,MAAM,4BAA4B;;;;;;;CAO/B,CAAC;AAGX,MAAM,MAAM,kBAAkB,GAAG,OAAO,qBAAqB,CAAC,MAAM,OAAO,qBAAqB,CAAC,CAAC;AAClG,MAAM,MAAM,mBAAmB,GAAG,OAAO,qBAAqB,CAAC,MAAM,OAAO,qBAAqB,CAAC,CAAC;AAKnG,eAAO,MAAM,iBAAiB;;;;;;;;;;CAUpB,CAAC;AAEX,eAAO,MAAM,wBAAwB;;;;;;;;;;CAU3B,CAAC;AAEX,MAAM,MAAM,gBAAgB,GAAG,OAAO,iBAAiB,CAAC,MAAM,OAAO,iBAAiB,CAAC,CAAC;AAKxF,eAAO,MAAM,eAAe;;;CAGlB,CAAC;AAEX,eAAO,MAAM,sBAAsB;;;CAGzB,CAAC;AAEX,MAAM,MAAM,cAAc,GAAG,OAAO,eAAe,CAAC,MAAM,OAAO,eAAe,CAAC,CAAC;AAKlF,eAAO,MAAM,iBAAiB;;;;;CAKpB,CAAC;AAEX,eAAO,MAAM,wBAAwB;;;;;CAK3B,CAAC;AAEX,MAAM,MAAM,gBAAgB,GAAG,OAAO,iBAAiB,CAAC,MAAM,OAAO,iBAAiB,CAAC,CAAC;AAKxF,eAAO,MAAM,kBAAkB;;;;;;CAMrB,CAAC;AAEX,eAAO,MAAM,yBAAyB;;;;;;CAM5B,CAAC;AAEX,MAAM,MAAM,iBAAiB,GAAG,OAAO,kBAAkB,CAAC,MAAM,OAAO,kBAAkB,CAAC,CAAC;AAK3F,eAAO,MAAM,YAAY;;;;;CAKf,CAAC;AAEX,eAAO,MAAM,mBAAmB;;;;;CAKtB,CAAC;AAEX,MAAM,MAAM,WAAW,GAAG,OAAO,YAAY,CAAC,MAAM,OAAO,YAAY,CAAC,CAAC;AAKzE,eAAO,MAAM,mBAAmB;;;;;;CAMtB,CAAC;AAEX,eAAO,MAAM,0BAA0B;;;;;;CAM7B,CAAC;AAEX,MAAM,MAAM,iBAAiB,GAAG,OAAO,mBAAmB,CAAC,MAAM,OAAO,mBAAmB,CAAC,CAAC;AAK7F,eAAO,MAAM,YAAY;;;CAGf,CAAC;AAEX,eAAO,MAAM,mBAAmB;;;CAGtB,CAAC;AAEX,MAAM,MAAM,WAAW,GAAG,OAAO,YAAY,CAAC,MAAM,OAAO,YAAY,CAAC,CAAC"}
|
package/dist/transactions.js
DELETED
|
@@ -1,154 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Transaction constants sourced from backend Django constants
|
|
3
|
-
*
|
|
4
|
-
* These constants maintain consistency between frontend and backend
|
|
5
|
-
* and serve as the single source of truth for transaction-related values.
|
|
6
|
-
*
|
|
7
|
-
* Backend sources:
|
|
8
|
-
* - bilberry/accounts/constants.py (Cash Account Transaction types)
|
|
9
|
-
* - bilberry/withdrawals/constants.py (Withdrawal statuses)
|
|
10
|
-
* - bilberry/trades/constants.py (Trade statuses)
|
|
11
|
-
*/
|
|
12
|
-
// ===== CASH ACCOUNT TRANSACTION TYPES =====
|
|
13
|
-
// Source: bilberry/accounts/constants.py
|
|
14
|
-
// Note: Frontend v3.0.0 API uses a subset of these types
|
|
15
|
-
// Full backend cash account transaction types
|
|
16
|
-
export const CASH_ACCOUNT_TRN_TYPE = {
|
|
17
|
-
DEPOSIT: 'DEPOSIT',
|
|
18
|
-
WITHDRAWAL: 'WITHDRAWAL',
|
|
19
|
-
TRADE_SETTLEMENT: 'TRADE_SETTLEMENT',
|
|
20
|
-
DISTRIBUTION: 'DISTRIBUTION',
|
|
21
|
-
FEE: 'FEE',
|
|
22
|
-
INTEREST: 'INTEREST',
|
|
23
|
-
OTHER: 'OTHER',
|
|
24
|
-
};
|
|
25
|
-
export const CASH_ACCOUNT_TRN_TYPE_LABELS = {
|
|
26
|
-
DEPOSIT: 'Deposit',
|
|
27
|
-
WITHDRAWAL: 'Withdrawal',
|
|
28
|
-
TRADE_SETTLEMENT: 'Trade Settlement',
|
|
29
|
-
DISTRIBUTION: 'Distribution',
|
|
30
|
-
FEE: 'Fee',
|
|
31
|
-
INTEREST: 'Interest',
|
|
32
|
-
OTHER: 'Adjustment',
|
|
33
|
-
};
|
|
34
|
-
// Frontend v3.0.0 API subset (CashTransaction interface)
|
|
35
|
-
export const CASH_TRANSACTION_TYPE = {
|
|
36
|
-
DEPOSIT: 'DEPOSIT',
|
|
37
|
-
WITHDRAWAL: 'WITHDRAWAL',
|
|
38
|
-
TRANSFER: 'TRANSFER',
|
|
39
|
-
FEE: 'FEE',
|
|
40
|
-
DIVIDEND: 'DIVIDEND',
|
|
41
|
-
INTEREST: 'INTEREST',
|
|
42
|
-
};
|
|
43
|
-
export const CASH_TRANSACTION_TYPE_LABELS = {
|
|
44
|
-
DEPOSIT: 'Deposit',
|
|
45
|
-
WITHDRAWAL: 'Withdrawal',
|
|
46
|
-
TRANSFER: 'Transfer',
|
|
47
|
-
FEE: 'Fee',
|
|
48
|
-
DIVIDEND: 'Dividend',
|
|
49
|
-
INTEREST: 'Interest',
|
|
50
|
-
};
|
|
51
|
-
// ===== WITHDRAWAL STATUSES =====
|
|
52
|
-
// Source: bilberry/withdrawals/constants.py
|
|
53
|
-
export const WITHDRAWAL_STATUS = {
|
|
54
|
-
PENDING_REVIEW: 'PENDING_REVIEW',
|
|
55
|
-
APPROVED: 'APPROVED',
|
|
56
|
-
REJECTED: 'REJECTED',
|
|
57
|
-
PROCESSING: 'PROCESSING',
|
|
58
|
-
AWAITING_LIQUIDATION: 'AWAITING_LIQUIDATION',
|
|
59
|
-
LIQUIDATION_IN_PROGRESS: 'LIQUIDATION_IN_PROGRESS',
|
|
60
|
-
COMPLETED: 'COMPLETED',
|
|
61
|
-
CANCELLED: 'CANCELLED',
|
|
62
|
-
FAILED: 'FAILED',
|
|
63
|
-
};
|
|
64
|
-
export const WITHDRAWAL_STATUS_LABELS = {
|
|
65
|
-
PENDING_REVIEW: 'Pending Review',
|
|
66
|
-
APPROVED: 'Approved',
|
|
67
|
-
REJECTED: 'Rejected',
|
|
68
|
-
PROCESSING: 'Processing',
|
|
69
|
-
AWAITING_LIQUIDATION: 'Awaiting Asset Liquidation',
|
|
70
|
-
LIQUIDATION_IN_PROGRESS: 'Liquidation in Progress',
|
|
71
|
-
COMPLETED: 'Completed',
|
|
72
|
-
CANCELLED: 'Cancelled',
|
|
73
|
-
FAILED: 'Failed',
|
|
74
|
-
};
|
|
75
|
-
// ===== WITHDRAWAL TYPES =====
|
|
76
|
-
// Source: bilberry/withdrawals/constants.py
|
|
77
|
-
export const WITHDRAWAL_TYPE = {
|
|
78
|
-
FULL_CASH: 'FULL_CASH',
|
|
79
|
-
PARTIAL_CASH: 'PARTIAL_CASH',
|
|
80
|
-
};
|
|
81
|
-
export const WITHDRAWAL_TYPE_LABELS = {
|
|
82
|
-
FULL_CASH: 'Full Cash Withdrawal',
|
|
83
|
-
PARTIAL_CASH: 'Partial Cash Withdrawal',
|
|
84
|
-
};
|
|
85
|
-
// ===== WITHDRAWAL REASONS =====
|
|
86
|
-
// Source: bilberry/withdrawals/constants.py
|
|
87
|
-
export const WITHDRAWAL_REASON = {
|
|
88
|
-
INVESTMENT_STRATEGY: 'INVESTMENT_STRATEGY',
|
|
89
|
-
PERSONAL_EXPENSES: 'PERSONAL_EXPENSES',
|
|
90
|
-
EMERGENCY: 'EMERGENCY',
|
|
91
|
-
OTHER: 'OTHER',
|
|
92
|
-
};
|
|
93
|
-
export const WITHDRAWAL_REASON_LABELS = {
|
|
94
|
-
INVESTMENT_STRATEGY: 'Investment Strategy Change',
|
|
95
|
-
PERSONAL_EXPENSES: 'Personal Expenses',
|
|
96
|
-
EMERGENCY: 'Emergency',
|
|
97
|
-
OTHER: 'Other',
|
|
98
|
-
};
|
|
99
|
-
// ===== LIQUIDATION STATUSES =====
|
|
100
|
-
// Source: bilberry/withdrawals/constants.py
|
|
101
|
-
export const LIQUIDATION_STATUS = {
|
|
102
|
-
PENDING: 'PENDING',
|
|
103
|
-
TRADES_CREATED: 'TRADES_CREATED',
|
|
104
|
-
EXECUTED: 'EXECUTED',
|
|
105
|
-
SETTLED: 'SETTLED',
|
|
106
|
-
FAILED: 'FAILED',
|
|
107
|
-
};
|
|
108
|
-
export const LIQUIDATION_STATUS_LABELS = {
|
|
109
|
-
PENDING: 'Pending',
|
|
110
|
-
TRADES_CREATED: 'Trades Created',
|
|
111
|
-
EXECUTED: 'Executed',
|
|
112
|
-
SETTLED: 'Settled',
|
|
113
|
-
FAILED: 'Failed',
|
|
114
|
-
};
|
|
115
|
-
// ===== TRADE STATUSES =====
|
|
116
|
-
// Source: bilberry/trades/constants.py
|
|
117
|
-
export const TRADE_STATUS = {
|
|
118
|
-
EXECUTED: 'EXECUTED',
|
|
119
|
-
SETTLED: 'SETTLED',
|
|
120
|
-
CANCELLED: 'CANCELLED',
|
|
121
|
-
FAILED: 'FAILED',
|
|
122
|
-
};
|
|
123
|
-
export const TRADE_STATUS_LABELS = {
|
|
124
|
-
EXECUTED: 'Executed',
|
|
125
|
-
SETTLED: 'Settled',
|
|
126
|
-
CANCELLED: 'Cancelled',
|
|
127
|
-
FAILED: 'Failed',
|
|
128
|
-
};
|
|
129
|
-
// ===== TARGET TRADE STATUSES =====
|
|
130
|
-
// Source: bilberry/trades/constants.py
|
|
131
|
-
export const TARGET_TRADE_STATUS = {
|
|
132
|
-
PENDING: 'PENDING',
|
|
133
|
-
APPROVED: 'APPROVED',
|
|
134
|
-
SUBMITTED: 'SUBMITTED',
|
|
135
|
-
CANCELLED: 'CANCELLED',
|
|
136
|
-
EXPIRED: 'EXPIRED',
|
|
137
|
-
};
|
|
138
|
-
export const TARGET_TRADE_STATUS_LABELS = {
|
|
139
|
-
PENDING: 'Pending Submission',
|
|
140
|
-
APPROVED: 'Approved',
|
|
141
|
-
SUBMITTED: 'Submitted to Broker',
|
|
142
|
-
CANCELLED: 'Cancelled',
|
|
143
|
-
EXPIRED: 'Expired',
|
|
144
|
-
};
|
|
145
|
-
// ===== TRADE ACTIONS =====
|
|
146
|
-
// Source: bilberry/trades/constants.py
|
|
147
|
-
export const TRADE_ACTION = {
|
|
148
|
-
BUY: 'BUY',
|
|
149
|
-
SELL: 'SELL',
|
|
150
|
-
};
|
|
151
|
-
export const TRADE_ACTION_LABELS = {
|
|
152
|
-
BUY: 'Buy',
|
|
153
|
-
SELL: 'Sell',
|
|
154
|
-
};
|