@cranberry-money/shared-constants 4.7.5 → 4.8.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.
@@ -112,6 +112,10 @@ export declare const USER_ENDPOINTS: {
112
112
  readonly PREFERENCES: "/api/users/preferences/";
113
113
  readonly INVESTMENT_PREFERENCES: "/api/users/investment-preferences/";
114
114
  };
115
+ export declare const USER_PROFILE_ENDPOINTS: {
116
+ readonly BASE: "/api/user-profiles/";
117
+ readonly DETAIL: (uuid: string) => `/api/user-profiles/${string}/`;
118
+ };
115
119
  export declare const WITHDRAWAL_ENDPOINTS: {
116
120
  readonly BASE: "/api/withdrawals/";
117
121
  readonly DETAIL: (uuid: string) => `/api/withdrawals/${string}/`;
@@ -1 +1 @@
1
- {"version":3,"file":"endpoints.d.ts","sourceRoot":"","sources":["../../src/api/endpoints.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,eAAO,MAAM,cAAc;;CAEjB,CAAC;AAGX,eAAO,MAAM,iBAAiB;;4BAEb,MAAM;CACb,CAAC;AAGX,eAAO,MAAM,cAAc;;;;;;;;;;;;CAYjB,CAAC;AAGX,eAAO,MAAM,cAAc;;4BAEV,MAAM;;oCAEE,MAAM;CACrB,CAAC;AAGX,eAAO,MAAM,sBAAsB;;4BAElB,MAAM;kCACA,MAAM;CACnB,CAAC;AAGX,eAAO,MAAM,kCAAkC;;4BAE9B,MAAM;CACb,CAAC;AAGX,eAAO,MAAM,iBAAiB;;4BAEb,MAAM;CACb,CAAC;AAGX,eAAO,MAAM,kBAAkB;;4BAEd,MAAM;8BACJ,MAAM;0BACV,MAAM;;;;CAIX,CAAC;AAGX,eAAO,MAAM,kBAAkB;;4BAEd,MAAM;CACb,CAAC;AAGX,eAAO,MAAM,oBAAoB;;4BAEhB,MAAM;4BACN,MAAM;2BACP,MAAM;CACZ,CAAC;AAGX,eAAO,MAAM,mBAAmB;;4BAEf,MAAM;iCACD,MAAM;8BACT,MAAM;iCACH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,eAAO,MAAM,4BAA4B;;4BAExB,MAAM;4BACN,MAAM;6BACL,MAAM;4BACP,MAAM;CACb,CAAC;AAGX,eAAO,MAAM,gCAAgC;;4BAE5B,MAAM;CACb,CAAC;AAGX,eAAO,MAAM,qBAAqB;;4BAEjB,MAAM;CACb,CAAC;AAGX,eAAO,MAAM,0BAA0B;;4BAEtB,MAAM;CACb,CAAC;AAGX,eAAO,MAAM,uBAAuB;;4BAEnB,MAAM;CACb,CAAC;AAGX,eAAO,MAAM,gCAAgC;;0BAE9B,MAAM;CACX,CAAC"}
@@ -3,7 +3,7 @@
3
3
  * API endpoint definitions for all services
4
4
  */
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.ASSET_HOLDING_SNAPSHOT_ENDPOINTS = exports.ASSET_HOLDING_ENDPOINTS = exports.ASSET_ALLOCATION_ENDPOINTS = exports.TRANSACTION_ENDPOINTS = exports.WITHDRAWAL_LIQUIDATION_ENDPOINTS = exports.WITHDRAWAL_REQUEST_ENDPOINTS = exports.WITHDRAWAL_ENDPOINTS = exports.USER_ENDPOINTS = exports.TARGET_TRADE_SHEET_ENDPOINTS = exports.TRADE_SHEET_ENDPOINTS = exports.TARGET_TRADE_ENDPOINTS = exports.TRADE_ENDPOINTS = exports.TAX_RESIDENCY_ENDPOINTS = exports.STOCK_EXCHANGE_ENDPOINTS = exports.SECTOR_ENDPOINTS = exports.PORTFOLIO_TEMPLATE_ENDPOINTS = exports.PORTFOLIO_ENDPOINTS = exports.INSTRUMENT_ENDPOINTS = exports.INDUSTRY_ENDPOINTS = exports.DOCUMENT_ENDPOINTS = exports.COUNTRY_ENDPOINTS = exports.CASH_ACCOUNT_TRANSACTION_ENDPOINTS = exports.CASH_ACCOUNT_ENDPOINTS = exports.BANK_ENDPOINTS = exports.AUTH_ENDPOINTS = exports.ACCOUNT_ENDPOINTS = exports.API_BASE_PATHS = void 0;
6
+ exports.ASSET_HOLDING_SNAPSHOT_ENDPOINTS = exports.ASSET_HOLDING_ENDPOINTS = exports.ASSET_ALLOCATION_ENDPOINTS = exports.TRANSACTION_ENDPOINTS = exports.WITHDRAWAL_LIQUIDATION_ENDPOINTS = exports.WITHDRAWAL_REQUEST_ENDPOINTS = exports.WITHDRAWAL_ENDPOINTS = exports.USER_PROFILE_ENDPOINTS = exports.USER_ENDPOINTS = exports.TARGET_TRADE_SHEET_ENDPOINTS = exports.TRADE_SHEET_ENDPOINTS = exports.TARGET_TRADE_ENDPOINTS = exports.TRADE_ENDPOINTS = exports.TAX_RESIDENCY_ENDPOINTS = exports.STOCK_EXCHANGE_ENDPOINTS = exports.SECTOR_ENDPOINTS = exports.PORTFOLIO_TEMPLATE_ENDPOINTS = exports.PORTFOLIO_ENDPOINTS = exports.INSTRUMENT_ENDPOINTS = exports.INDUSTRY_ENDPOINTS = exports.DOCUMENT_ENDPOINTS = exports.COUNTRY_ENDPOINTS = exports.CASH_ACCOUNT_TRANSACTION_ENDPOINTS = exports.CASH_ACCOUNT_ENDPOINTS = exports.BANK_ENDPOINTS = exports.AUTH_ENDPOINTS = exports.ACCOUNT_ENDPOINTS = exports.API_BASE_PATHS = void 0;
7
7
  exports.API_BASE_PATHS = {
8
8
  V1: '/api',
9
9
  };
@@ -134,6 +134,11 @@ exports.USER_ENDPOINTS = {
134
134
  PREFERENCES: '/api/users/preferences/',
135
135
  INVESTMENT_PREFERENCES: '/api/users/investment-preferences/',
136
136
  };
137
+ // User profile endpoints (separate collection resource)
138
+ exports.USER_PROFILE_ENDPOINTS = {
139
+ BASE: '/api/user-profiles/',
140
+ DETAIL: (uuid) => `/api/user-profiles/${uuid}/`,
141
+ };
137
142
  // Withdrawal endpoints
138
143
  exports.WITHDRAWAL_ENDPOINTS = {
139
144
  BASE: '/api/withdrawals/',
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * UI color constants
3
3
  */
4
- export declare const CHART_COLORS: readonly ["#8B5CF6", "#3B82F6", "#10B981", "#F59E0B", "#EF4444", "#06B6D4", "#F97316", "#84CC16", "#EC4899", "#6366F1"];
4
+ export declare const CHART_COLORS: readonly ["#3B82F6", "#EF4444", "#10B981", "#F59E0B", "#8B5CF6", "#EC4899", "#06B6D4", "#84CC16", "#F97316", "#6366F1"];
5
5
  export declare const STATUS_COLORS: {
6
6
  readonly SUCCESS: "text-green-600";
7
7
  readonly WARNING: "text-amber-600";
@@ -10,6 +10,16 @@ export declare const STATUS_COLORS: {
10
10
  readonly NEUTRAL: "text-gray-600";
11
11
  };
12
12
  export type StatusColor = typeof STATUS_COLORS[keyof typeof STATUS_COLORS];
13
+ export declare const STATUS_COLOR_PENDING = "text-warning-600";
14
+ export declare const STATUS_COLOR_AWAITING = "text-warning-600";
15
+ export declare const STATUS_COLOR_PROCESSING = "text-primary-600";
16
+ export declare const STATUS_COLOR_IN_PROGRESS = "text-primary-600";
17
+ export declare const STATUS_COLOR_APPROVED = "text-success-600";
18
+ export declare const STATUS_COLOR_COMPLETED = "text-success-700";
19
+ export declare const STATUS_COLOR_REJECTED = "text-error-600";
20
+ export declare const STATUS_COLOR_FAILED = "text-error-700";
21
+ export declare const STATUS_COLOR_CANCELLED = "text-content-subtle";
22
+ export declare const STATUS_COLOR_DEFAULT = "text-content-subtle";
13
23
  export declare const STATUS_BG_COLORS: {
14
24
  readonly SUCCESS: "bg-green-50";
15
25
  readonly WARNING: "bg-amber-50";
@@ -1 +1 @@
1
- {"version":3,"file":"colors.d.ts","sourceRoot":"","sources":["../../src/ui/colors.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,eAAO,MAAM,YAAY,yHAWf,CAAC;AAGX,eAAO,MAAM,aAAa;;;;;;CAMhB,CAAC;AAEX,MAAM,MAAM,WAAW,GAAG,OAAO,aAAa,CAAC,MAAM,OAAO,aAAa,CAAC,CAAC;AAG3E,eAAO,MAAM,gBAAgB;;;;;;CAMnB,CAAC;AAGX,eAAO,MAAM,YAAY;;;;;;;CAOf,CAAC;AAGX,eAAO,MAAM,eAAe;;;;CAIlB,CAAC;AAGX,eAAO,MA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
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.getChartColor = exports.TRADING_STATUS_COLORS = exports.PERFORMANCE_COLORS = exports.SEMANTIC_COLORS = exports.BADGE_COLORS = exports.STATUS_BG_COLORS = exports.STATUS_COLORS = exports.CHART_COLORS = void 0;
7
- // Chart color palette (10 colors for data visualization)
6
+ exports.getChartColor = exports.TRADING_STATUS_COLORS = exports.PERFORMANCE_COLORS = exports.SEMANTIC_COLORS = exports.BADGE_COLORS = exports.STATUS_BG_COLORS = exports.STATUS_COLOR_DEFAULT = exports.STATUS_COLOR_CANCELLED = exports.STATUS_COLOR_FAILED = exports.STATUS_COLOR_REJECTED = exports.STATUS_COLOR_COMPLETED = exports.STATUS_COLOR_APPROVED = exports.STATUS_COLOR_IN_PROGRESS = exports.STATUS_COLOR_PROCESSING = exports.STATUS_COLOR_AWAITING = exports.STATUS_COLOR_PENDING = exports.STATUS_COLORS = exports.CHART_COLORS = void 0;
7
+ // Chart color palette (10 colors for data visualization) - Blueberry compatible
8
8
  exports.CHART_COLORS = [
9
- '#8B5CF6', // Purple 500
10
- '#3B82F6', // Blue 500
11
- '#10B981', // Emerald 500
12
- '#F59E0B', // Amber 500
13
- '#EF4444', // Red 500
14
- '#06B6D4', // Cyan 500
15
- '#F97316', // Orange 500
16
- '#84CC16', // Lime 500
17
- '#EC4899', // Pink 500
18
- '#6366F1', // Indigo 500
9
+ '#3B82F6', // Blue - primary data color
10
+ '#EF4444', // Red - negative/loss indicators
11
+ '#10B981', // Green - positive/gain indicators
12
+ '#F59E0B', // Amber - warning/volatility
13
+ '#8B5CF6', // Purple - volume/secondary metrics
14
+ '#EC4899', // Pink - accent data
15
+ '#06B6D4', // Cyan - info/neutral data
16
+ '#84CC16', // Lime - growth indicators
17
+ '#F97316', // Orange - emphasis data
18
+ '#6366F1', // Indigo - brand accent
19
19
  ];
20
20
  // Status colors (Tailwind CSS classes)
21
21
  exports.STATUS_COLORS = {
@@ -25,6 +25,17 @@ exports.STATUS_COLORS = {
25
25
  INFO: 'text-blue-600',
26
26
  NEUTRAL: 'text-gray-600',
27
27
  };
28
+ // Individual status color constants for Blueberry compatibility
29
+ exports.STATUS_COLOR_PENDING = 'text-warning-600';
30
+ exports.STATUS_COLOR_AWAITING = 'text-warning-600';
31
+ exports.STATUS_COLOR_PROCESSING = 'text-primary-600';
32
+ exports.STATUS_COLOR_IN_PROGRESS = 'text-primary-600';
33
+ exports.STATUS_COLOR_APPROVED = 'text-success-600';
34
+ exports.STATUS_COLOR_COMPLETED = 'text-success-700';
35
+ exports.STATUS_COLOR_REJECTED = 'text-error-600';
36
+ exports.STATUS_COLOR_FAILED = 'text-error-700';
37
+ exports.STATUS_COLOR_CANCELLED = 'text-content-subtle';
38
+ exports.STATUS_COLOR_DEFAULT = 'text-content-subtle';
28
39
  // Background status colors
29
40
  exports.STATUS_BG_COLORS = {
30
41
  SUCCESS: 'bg-green-50',
@@ -36,4 +36,9 @@ export declare const DISPLAY_LIMITS: {
36
36
  readonly MAX_FILE_SIZE_MB: 10;
37
37
  readonly MAX_FILE_NAME_LENGTH: 255;
38
38
  };
39
+ export declare const ALLOCATION_DEFAULTS: {
40
+ readonly DEFAULT_PERCENTAGE: 10;
41
+ readonly PERCENTAGE_PRECISION: 0.01;
42
+ readonly TARGET_TOTAL: 100;
43
+ };
39
44
  //# sourceMappingURL=defaults.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"defaults.d.ts","sourceRoot":"","sources":["../../src/utilities/defaults.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,eAAO,MAAM,cAAc;;;;;;CAMjB,CAAC;AAGX,eAAO,MAAM,gBAAgB;;;;;;CAMnB,CAAC;AAGX,eAAO,MAAM,mBAAmB;;;;;;CAMtB,CAAC;AAGX,eAAO,MAAM,UAAU;;;;;;CAMb,CAAC;AAGX,eAAO,MAAM,cAAc;;;;;;CAMjB,CAAC"}
1
+ {"version":3,"file":"defaults.d.ts","sourceRoot":"","sources":["../../src/utilities/defaults.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,eAAO,MAAM,cAAc;;;;;;CAMjB,CAAC;AAGX,eAAO,MAAM,gBAAgB;;;;;;CAMnB,CAAC;AAGX,eAAO,MAAM,mBAAmB;;;;;;CAMtB,CAAC;AAGX,eAAO,MAAM,UAAU;;;;;;CAMb,CAAC;AAGX,eAAO,MAAM,cAAc;;;;;;CAMjB,CAAC;AAGX,eAAO,MAAM,mBAAmB;;;;CAItB,CAAC"}
@@ -3,7 +3,7 @@
3
3
  * Default values and common constants
4
4
  */
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.DISPLAY_LIMITS = exports.THRESHOLDS = exports.PAGINATION_DEFAULTS = exports.NUMERIC_DEFAULTS = exports.DEFAULT_VALUES = void 0;
6
+ exports.ALLOCATION_DEFAULTS = exports.DISPLAY_LIMITS = exports.THRESHOLDS = exports.PAGINATION_DEFAULTS = exports.NUMERIC_DEFAULTS = exports.DEFAULT_VALUES = void 0;
7
7
  // Default values
8
8
  exports.DEFAULT_VALUES = {
9
9
  ZERO: '0',
@@ -44,3 +44,10 @@ exports.DISPLAY_LIMITS = {
44
44
  MAX_FILE_SIZE_MB: 10,
45
45
  MAX_FILE_NAME_LENGTH: 255,
46
46
  };
47
+ // Asset allocation defaults
48
+ exports.ALLOCATION_DEFAULTS = {
49
+ DEFAULT_PERCENTAGE: 10,
50
+ PERCENTAGE_PRECISION: 0.01,
51
+ TARGET_TOTAL: 100,
52
+ };
53
+ // Note: DEFAULT_UNKNOWN_VALUE and DEFAULT_ERROR_MESSAGE are already exported from common.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cranberry-money/shared-constants",
3
- "version": "4.7.5",
3
+ "version": "4.8.0",
4
4
  "description": "Shared constants for MyPortfolio platform",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",