@cranberry-money/shared-constants 8.15.39 → 8.15.44
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/api.d.ts +3 -92
- package/dist/api.d.ts.map +1 -1
- package/dist/api.js +3 -92
- package/dist/api.js.map +1 -1
- package/package.json +1 -1
package/dist/api.d.ts
CHANGED
|
@@ -39,23 +39,8 @@ export declare const CONTENT_TYPES: {
|
|
|
39
39
|
readonly PDF: "application/pdf";
|
|
40
40
|
};
|
|
41
41
|
export type ContentType = (typeof CONTENT_TYPES)[keyof typeof CONTENT_TYPES];
|
|
42
|
-
export declare const HTTP_METHODS: {
|
|
43
|
-
readonly GET: "GET";
|
|
44
|
-
readonly POST: "POST";
|
|
45
|
-
readonly PUT: "PUT";
|
|
46
|
-
readonly PATCH: "PATCH";
|
|
47
|
-
readonly DELETE: "DELETE";
|
|
48
|
-
readonly HEAD: "HEAD";
|
|
49
|
-
readonly OPTIONS: "OPTIONS";
|
|
50
|
-
};
|
|
51
|
-
export type HttpMethod = (typeof HTTP_METHODS)[keyof typeof HTTP_METHODS];
|
|
52
42
|
export declare const HTTP_HEADER_CONTENT_TYPE: "Content-Type";
|
|
53
43
|
export declare const CONTENT_TYPE_APPLICATION_JSON: "application/json";
|
|
54
|
-
export declare const API_VERSIONS: {
|
|
55
|
-
readonly V1: "v1";
|
|
56
|
-
readonly V2: "v2";
|
|
57
|
-
};
|
|
58
|
-
export type ApiVersion = (typeof API_VERSIONS)[keyof typeof API_VERSIONS];
|
|
59
44
|
export declare const API_CONFIG: {
|
|
60
45
|
readonly DEFAULT_TIMEOUT: 30000;
|
|
61
46
|
readonly DEFAULT_RETRY_ATTEMPTS: 3;
|
|
@@ -63,37 +48,6 @@ export declare const API_CONFIG: {
|
|
|
63
48
|
readonly MAX_RETRY_DELAY: 10000;
|
|
64
49
|
readonly REQUEST_DEBOUNCE_MS: 300;
|
|
65
50
|
};
|
|
66
|
-
export declare const API_ERROR_CODES: {
|
|
67
|
-
readonly INVALID_CREDENTIALS: "INVALID_CREDENTIALS";
|
|
68
|
-
readonly TOKEN_EXPIRED: "TOKEN_EXPIRED";
|
|
69
|
-
readonly INSUFFICIENT_PERMISSIONS: "INSUFFICIENT_PERMISSIONS";
|
|
70
|
-
readonly VALIDATION_FAILED: "VALIDATION_FAILED";
|
|
71
|
-
readonly INVALID_INPUT: "INVALID_INPUT";
|
|
72
|
-
readonly MISSING_REQUIRED_FIELD: "MISSING_REQUIRED_FIELD";
|
|
73
|
-
readonly INSUFFICIENT_FUNDS: "INSUFFICIENT_FUNDS";
|
|
74
|
-
readonly PORTFOLIO_LIMIT_EXCEEDED: "PORTFOLIO_LIMIT_EXCEEDED";
|
|
75
|
-
readonly TRADE_LIMIT_EXCEEDED: "TRADE_LIMIT_EXCEEDED";
|
|
76
|
-
readonly SERVICE_UNAVAILABLE: "SERVICE_UNAVAILABLE";
|
|
77
|
-
readonly RATE_LIMIT_EXCEEDED: "RATE_LIMIT_EXCEEDED";
|
|
78
|
-
readonly UNKNOWN_ERROR: "UNKNOWN_ERROR";
|
|
79
|
-
};
|
|
80
|
-
export type ApiErrorCode = (typeof API_ERROR_CODES)[keyof typeof API_ERROR_CODES];
|
|
81
|
-
export declare const DEFAULT_TOKEN_REFRESH_BUFFER_MINUTES = 5;
|
|
82
|
-
export declare const MILLISECONDS_PER_MINUTE: number;
|
|
83
|
-
export declare const MINUTES_PER_HOUR = 60;
|
|
84
|
-
export declare const HOURS_PER_DAY = 24;
|
|
85
|
-
export declare const TIME_LABEL_EXPIRED = "Expired";
|
|
86
|
-
export declare const TIME_LABEL_MINUTE = "minute";
|
|
87
|
-
export declare const TIME_LABEL_MINUTES = "minutes";
|
|
88
|
-
export declare const TIME_LABEL_HOUR = "hour";
|
|
89
|
-
export declare const TIME_LABEL_HOURS = "hours";
|
|
90
|
-
export declare const TIME_LABEL_DAY = "day";
|
|
91
|
-
export declare const TIME_LABEL_DAYS = "days";
|
|
92
|
-
export declare const TIME_LABEL_HOUR_SHORT = "h";
|
|
93
|
-
export declare const TIME_LABEL_MINUTE_SHORT = "m";
|
|
94
|
-
export declare const TIME_LABEL_DAY_SHORT = "d";
|
|
95
|
-
export declare const TOKEN_STORAGE_KEY_ACCESS = "access_token";
|
|
96
|
-
export declare const TOKEN_STORAGE_KEY_REFRESH = "refresh_token";
|
|
97
51
|
export declare const DOCUMENT_SERVICE: {
|
|
98
52
|
readonly RESPONSE_TYPE_BLOB: "blob";
|
|
99
53
|
readonly CONTENT_TYPE_ANY: "*/*";
|
|
@@ -107,11 +61,6 @@ export declare const ACCOUNT_ENDPOINTS: {
|
|
|
107
61
|
readonly DETAIL: (uuid: string) => `/api/accounts/${string}/`;
|
|
108
62
|
};
|
|
109
63
|
export declare const AUTH_ENDPOINTS: {
|
|
110
|
-
readonly BASE: "/api/auth/";
|
|
111
|
-
readonly LOGIN: "/api/auth/login/";
|
|
112
|
-
readonly LOGOUT: "/api/auth/logout/";
|
|
113
|
-
readonly REFRESH: "/api/auth/refresh/";
|
|
114
|
-
readonly VERIFY: "/api/auth/verify/";
|
|
115
64
|
readonly SIGNIN: "/api/signin/";
|
|
116
65
|
readonly SIGNOUT: "/api/signout/";
|
|
117
66
|
readonly SIGNUP: "/api/signup/";
|
|
@@ -119,16 +68,13 @@ export declare const AUTH_ENDPOINTS: {
|
|
|
119
68
|
readonly RESEND_VERIFICATION: "/api/resend-verification/";
|
|
120
69
|
readonly TOKEN_REFRESH: "/api/token/refresh/";
|
|
121
70
|
};
|
|
122
|
-
export declare const
|
|
123
|
-
readonly BASE: "/api/
|
|
124
|
-
readonly DETAIL: (uuid: string) => `/api/
|
|
125
|
-
readonly ACCOUNTS: "/api/bank-accounts/";
|
|
126
|
-
readonly ACCOUNT_DETAIL: (uuid: string) => `/api/bank-accounts/${string}/`;
|
|
71
|
+
export declare const BANK_ACCOUNT_ENDPOINTS: {
|
|
72
|
+
readonly BASE: "/api/bank-accounts/";
|
|
73
|
+
readonly DETAIL: (uuid: string) => `/api/bank-accounts/${string}/`;
|
|
127
74
|
};
|
|
128
75
|
export declare const CASH_ACCOUNT_ENDPOINTS: {
|
|
129
76
|
readonly BASE: "/api/cash-accounts/";
|
|
130
77
|
readonly DETAIL: (uuid: string) => `/api/cash-accounts/${string}/`;
|
|
131
|
-
readonly TRANSACTIONS: (uuid: string) => `/api/cash-accounts/${string}/transactions/`;
|
|
132
78
|
};
|
|
133
79
|
export declare const CASH_ACCOUNT_TRANSACTION_ENDPOINTS: {
|
|
134
80
|
readonly BASE: "/api/cash-account-transactions/";
|
|
@@ -139,10 +85,6 @@ export declare const COUNTRY_ENDPOINTS: {
|
|
|
139
85
|
readonly DETAIL: (uuid: string) => `/api/countries/${string}/`;
|
|
140
86
|
};
|
|
141
87
|
export declare const DOCUMENT_ENDPOINTS: {
|
|
142
|
-
readonly BASE: "/api/documents/";
|
|
143
|
-
readonly DETAIL: (uuid: string) => `/api/documents/${string}/`;
|
|
144
|
-
readonly DOWNLOAD: (uuid: string) => `/api/documents/${string}/download/`;
|
|
145
|
-
readonly SIGN: (uuid: string) => `/api/documents/${string}/sign/`;
|
|
146
88
|
readonly AGREEMENT: "/api/documents/agreement/";
|
|
147
89
|
readonly MDA: "/api/documents/mda/";
|
|
148
90
|
readonly SOA: "/api/documents/soa/";
|
|
@@ -154,21 +96,14 @@ export declare const INDUSTRY_ENDPOINTS: {
|
|
|
154
96
|
export declare const INSTRUMENT_ENDPOINTS: {
|
|
155
97
|
readonly BASE: "/api/instruments/";
|
|
156
98
|
readonly DETAIL: (uuid: string) => `/api/instruments/${string}/`;
|
|
157
|
-
readonly PRICES: (uuid: string) => `/api/instruments/${string}/prices/`;
|
|
158
|
-
readonly QUOTE: (uuid: string) => `/api/instruments/${string}/quote/`;
|
|
159
99
|
};
|
|
160
100
|
export declare const PORTFOLIO_ENDPOINTS: {
|
|
161
101
|
readonly BASE: "/api/portfolios/";
|
|
162
102
|
readonly DETAIL: (uuid: string) => `/api/portfolios/${string}/`;
|
|
163
|
-
readonly ALLOCATIONS: (uuid: string) => `/api/portfolios/${string}/allocations/`;
|
|
164
|
-
readonly HOLDINGS: (uuid: string) => `/api/portfolios/${string}/holdings/`;
|
|
165
|
-
readonly PERFORMANCE: (uuid: string) => `/api/portfolios/${string}/performance/`;
|
|
166
|
-
readonly TRANSACTIONS: (uuid: string) => `/api/portfolios/${string}/transactions/`;
|
|
167
103
|
};
|
|
168
104
|
export declare const PORTFOLIO_TEMPLATE_ENDPOINTS: {
|
|
169
105
|
readonly BASE: "/api/portfolio-templates/";
|
|
170
106
|
readonly DETAIL: (uuid: string) => `/api/portfolio-templates/${string}/`;
|
|
171
|
-
readonly ALLOCATIONS: (uuid: string) => `/api/portfolio-templates/${string}/allocations/`;
|
|
172
107
|
readonly RECOMMENDED: "/api/portfolio-templates/recommended/";
|
|
173
108
|
};
|
|
174
109
|
export declare const SECTOR_ENDPOINTS: {
|
|
@@ -186,14 +121,10 @@ export declare const TAX_RESIDENCY_ENDPOINTS: {
|
|
|
186
121
|
export declare const TRADE_ENDPOINTS: {
|
|
187
122
|
readonly BASE: "/api/trades/";
|
|
188
123
|
readonly DETAIL: (uuid: string) => `/api/trades/${string}/`;
|
|
189
|
-
readonly CANCEL: (uuid: string) => `/api/trades/${string}/cancel/`;
|
|
190
|
-
readonly CONFIRM: (uuid: string) => `/api/trades/${string}/confirm/`;
|
|
191
124
|
};
|
|
192
125
|
export declare const TARGET_TRADE_ENDPOINTS: {
|
|
193
126
|
readonly BASE: "/api/target-trades/";
|
|
194
127
|
readonly DETAIL: (uuid: string) => `/api/target-trades/${string}/`;
|
|
195
|
-
readonly APPROVE: (uuid: string) => `/api/target-trades/${string}/approve/`;
|
|
196
|
-
readonly SUBMIT: (uuid: string) => `/api/target-trades/${string}/submit/`;
|
|
197
128
|
};
|
|
198
129
|
export declare const TRADE_SHEET_ENDPOINTS: {
|
|
199
130
|
readonly BASE: "/api/trade-sheets/";
|
|
@@ -203,12 +134,6 @@ export declare const TARGET_TRADE_SHEET_ENDPOINTS: {
|
|
|
203
134
|
readonly BASE: "/api/target-trade-sheets/";
|
|
204
135
|
readonly DETAIL: (uuid: string) => `/api/target-trade-sheets/${string}/`;
|
|
205
136
|
};
|
|
206
|
-
export declare const USER_ENDPOINTS: {
|
|
207
|
-
readonly BASE: "/api/users/";
|
|
208
|
-
readonly DETAIL: (uuid: string) => `/api/users/${string}/`;
|
|
209
|
-
readonly PREFERENCES: "/api/users/preferences/";
|
|
210
|
-
readonly INVESTMENT_PREFERENCES: "/api/users/investment-preferences/";
|
|
211
|
-
};
|
|
212
137
|
export declare const USER_PROFILE_ENDPOINTS: {
|
|
213
138
|
readonly BASE: "/api/user-profiles/";
|
|
214
139
|
readonly DETAIL: (uuid: string) => `/api/user-profiles/${string}/`;
|
|
@@ -217,28 +142,14 @@ export declare const INVESTMENT_PREFERENCES_ENDPOINTS: {
|
|
|
217
142
|
readonly BASE: "/api/investment-preferences/";
|
|
218
143
|
readonly DETAIL: (uuid: string) => `/api/investment-preferences/${string}/`;
|
|
219
144
|
};
|
|
220
|
-
export declare const WITHDRAWAL_ENDPOINTS: {
|
|
221
|
-
readonly BASE: "/api/withdrawals/";
|
|
222
|
-
readonly DETAIL: (uuid: string) => `/api/withdrawals/${string}/`;
|
|
223
|
-
readonly CANCEL: (uuid: string) => `/api/withdrawals/${string}/cancel/`;
|
|
224
|
-
readonly APPROVE: (uuid: string) => `/api/withdrawals/${string}/approve/`;
|
|
225
|
-
readonly REJECT: (uuid: string) => `/api/withdrawals/${string}/reject/`;
|
|
226
|
-
};
|
|
227
145
|
export declare const WITHDRAWAL_REQUEST_ENDPOINTS: {
|
|
228
146
|
readonly BASE: "/api/withdrawal-requests/";
|
|
229
147
|
readonly DETAIL: (uuid: string) => `/api/withdrawal-requests/${string}/`;
|
|
230
|
-
readonly CANCEL: (uuid: string) => `/api/withdrawal-requests/${string}/cancel/`;
|
|
231
|
-
readonly APPROVE: (uuid: string) => `/api/withdrawal-requests/${string}/approve/`;
|
|
232
|
-
readonly REJECT: (uuid: string) => `/api/withdrawal-requests/${string}/reject/`;
|
|
233
148
|
};
|
|
234
149
|
export declare const WITHDRAWAL_LIQUIDATION_ENDPOINTS: {
|
|
235
150
|
readonly BASE: "/api/withdrawal-liquidations/";
|
|
236
151
|
readonly DETAIL: (uuid: string) => `/api/withdrawal-liquidations/${string}/`;
|
|
237
152
|
};
|
|
238
|
-
export declare const TRANSACTION_ENDPOINTS: {
|
|
239
|
-
readonly BASE: "/api/transactions/";
|
|
240
|
-
readonly DETAIL: (uuid: string) => `/api/transactions/${string}/`;
|
|
241
|
-
};
|
|
242
153
|
export declare const ASSET_ALLOCATION_ENDPOINTS: {
|
|
243
154
|
readonly BASE: "/api/asset-allocations/";
|
|
244
155
|
readonly DETAIL: (uuid: string) => `/api/asset-allocations/${string}/`;
|
package/dist/api.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../src/api.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;CAuBd,CAAC;AAEX,MAAM,MAAM,UAAU,GAAG,CAAC,OAAO,WAAW,CAAC,CAAC,MAAM,OAAO,WAAW,CAAC,CAAC;AAExE,eAAO,MAAM,YAAY;;;;;;;;CAQf,CAAC;AAEX,eAAO,MAAM,aAAa;;;;;;;;CAQhB,CAAC;AAEX,MAAM,MAAM,WAAW,GAAG,CAAC,OAAO,aAAa,CAAC,CAAC,MAAM,OAAO,aAAa,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../src/api.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;CAuBd,CAAC;AAEX,MAAM,MAAM,UAAU,GAAG,CAAC,OAAO,WAAW,CAAC,CAAC,MAAM,OAAO,WAAW,CAAC,CAAC;AAExE,eAAO,MAAM,YAAY;;;;;;;;CAQf,CAAC;A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AAqB;;4BAEjB,MAAM;CACb,CAAC;AAEX,eAAO,MAAM,4BAA4B;;4BAExB,MAAM;CACb,CAAC;AAEX,eAAO,MAAM,sBAAsB;;4BAElB,MAAM;CACb,CAAC;AAEX,eAAO,MAAM,gCAAgC;;4BAE5B,MAAM;CACb,CAAC;AAEX,eAAO,MAAM,4BAA4B;;4BAExB,MAAM;CACb,CAAC;AAEX,eAAO,MAAM,gCAAgC;;4BAE5B,MAAM;CACb,CAAC;AAGX,eAAO,MAAM,0BAA0B;;4BAEtB,MAAM;CACb,CAAC;AAEX,eAAO,MAAM,uBAAuB;;4BAEnB,MAAM;CACb,CAAC;AAEX,eAAO,MAAM,gCAAgC;;0BAE9B,MAAM;CACX,CAAC"}
|
package/dist/api.js
CHANGED
|
@@ -41,24 +41,11 @@ export const CONTENT_TYPES = {
|
|
|
41
41
|
XML: 'application/xml',
|
|
42
42
|
PDF: 'application/pdf',
|
|
43
43
|
};
|
|
44
|
-
export const HTTP_METHODS = {
|
|
45
|
-
GET: 'GET',
|
|
46
|
-
POST: 'POST',
|
|
47
|
-
PUT: 'PUT',
|
|
48
|
-
PATCH: 'PATCH',
|
|
49
|
-
DELETE: 'DELETE',
|
|
50
|
-
HEAD: 'HEAD',
|
|
51
|
-
OPTIONS: 'OPTIONS',
|
|
52
|
-
};
|
|
53
44
|
export const HTTP_HEADER_CONTENT_TYPE = HTTP_HEADERS.CONTENT_TYPE;
|
|
54
45
|
export const CONTENT_TYPE_APPLICATION_JSON = CONTENT_TYPES.JSON;
|
|
55
46
|
// ============================================
|
|
56
47
|
// API Configuration
|
|
57
48
|
// ============================================
|
|
58
|
-
export const API_VERSIONS = {
|
|
59
|
-
V1: 'v1',
|
|
60
|
-
V2: 'v2',
|
|
61
|
-
};
|
|
62
49
|
export const API_CONFIG = {
|
|
63
50
|
DEFAULT_TIMEOUT: COMMON_THRESHOLDS.DEFAULT_TIMEOUT_MS,
|
|
64
51
|
DEFAULT_RETRY_ATTEMPTS: COMMON_THRESHOLDS.DEFAULT_RETRY_ATTEMPTS,
|
|
@@ -66,39 +53,6 @@ export const API_CONFIG = {
|
|
|
66
53
|
MAX_RETRY_DELAY: COMMON_THRESHOLDS.MAX_RETRY_DELAY_MS,
|
|
67
54
|
REQUEST_DEBOUNCE_MS: COMMON_THRESHOLDS.REQUEST_DEBOUNCE_MS,
|
|
68
55
|
};
|
|
69
|
-
export const API_ERROR_CODES = {
|
|
70
|
-
INVALID_CREDENTIALS: 'INVALID_CREDENTIALS',
|
|
71
|
-
TOKEN_EXPIRED: 'TOKEN_EXPIRED',
|
|
72
|
-
INSUFFICIENT_PERMISSIONS: 'INSUFFICIENT_PERMISSIONS',
|
|
73
|
-
VALIDATION_FAILED: 'VALIDATION_FAILED',
|
|
74
|
-
INVALID_INPUT: 'INVALID_INPUT',
|
|
75
|
-
MISSING_REQUIRED_FIELD: 'MISSING_REQUIRED_FIELD',
|
|
76
|
-
INSUFFICIENT_FUNDS: 'INSUFFICIENT_FUNDS',
|
|
77
|
-
PORTFOLIO_LIMIT_EXCEEDED: 'PORTFOLIO_LIMIT_EXCEEDED',
|
|
78
|
-
TRADE_LIMIT_EXCEEDED: 'TRADE_LIMIT_EXCEEDED',
|
|
79
|
-
SERVICE_UNAVAILABLE: 'SERVICE_UNAVAILABLE',
|
|
80
|
-
RATE_LIMIT_EXCEEDED: 'RATE_LIMIT_EXCEEDED',
|
|
81
|
-
UNKNOWN_ERROR: 'UNKNOWN_ERROR',
|
|
82
|
-
};
|
|
83
|
-
// ============================================
|
|
84
|
-
// Authentication Constants
|
|
85
|
-
// ============================================
|
|
86
|
-
export const DEFAULT_TOKEN_REFRESH_BUFFER_MINUTES = 5;
|
|
87
|
-
export const MILLISECONDS_PER_MINUTE = 60 * 1000;
|
|
88
|
-
export const MINUTES_PER_HOUR = 60;
|
|
89
|
-
export const HOURS_PER_DAY = 24;
|
|
90
|
-
export const TIME_LABEL_EXPIRED = 'Expired';
|
|
91
|
-
export const TIME_LABEL_MINUTE = 'minute';
|
|
92
|
-
export const TIME_LABEL_MINUTES = 'minutes';
|
|
93
|
-
export const TIME_LABEL_HOUR = 'hour';
|
|
94
|
-
export const TIME_LABEL_HOURS = 'hours';
|
|
95
|
-
export const TIME_LABEL_DAY = 'day';
|
|
96
|
-
export const TIME_LABEL_DAYS = 'days';
|
|
97
|
-
export const TIME_LABEL_HOUR_SHORT = 'h';
|
|
98
|
-
export const TIME_LABEL_MINUTE_SHORT = 'm';
|
|
99
|
-
export const TIME_LABEL_DAY_SHORT = 'd';
|
|
100
|
-
export const TOKEN_STORAGE_KEY_ACCESS = 'access_token';
|
|
101
|
-
export const TOKEN_STORAGE_KEY_REFRESH = 'refresh_token';
|
|
102
56
|
// ============================================
|
|
103
57
|
// Service Constants
|
|
104
58
|
// ============================================
|
|
@@ -117,11 +71,6 @@ export const ACCOUNT_ENDPOINTS = {
|
|
|
117
71
|
DETAIL: (uuid) => `/api/accounts/${uuid}/`,
|
|
118
72
|
};
|
|
119
73
|
export const AUTH_ENDPOINTS = {
|
|
120
|
-
BASE: '/api/auth/',
|
|
121
|
-
LOGIN: '/api/auth/login/',
|
|
122
|
-
LOGOUT: '/api/auth/logout/',
|
|
123
|
-
REFRESH: '/api/auth/refresh/',
|
|
124
|
-
VERIFY: '/api/auth/verify/',
|
|
125
74
|
SIGNIN: '/api/signin/',
|
|
126
75
|
SIGNOUT: '/api/signout/',
|
|
127
76
|
SIGNUP: '/api/signup/',
|
|
@@ -129,16 +78,13 @@ export const AUTH_ENDPOINTS = {
|
|
|
129
78
|
RESEND_VERIFICATION: '/api/resend-verification/',
|
|
130
79
|
TOKEN_REFRESH: '/api/token/refresh/',
|
|
131
80
|
};
|
|
132
|
-
export const
|
|
133
|
-
BASE: '/api/
|
|
134
|
-
DETAIL: (uuid) => `/api/
|
|
135
|
-
ACCOUNTS: '/api/bank-accounts/',
|
|
136
|
-
ACCOUNT_DETAIL: (uuid) => `/api/bank-accounts/${uuid}/`,
|
|
81
|
+
export const BANK_ACCOUNT_ENDPOINTS = {
|
|
82
|
+
BASE: '/api/bank-accounts/',
|
|
83
|
+
DETAIL: (uuid) => `/api/bank-accounts/${uuid}/`,
|
|
137
84
|
};
|
|
138
85
|
export const CASH_ACCOUNT_ENDPOINTS = {
|
|
139
86
|
BASE: '/api/cash-accounts/',
|
|
140
87
|
DETAIL: (uuid) => `/api/cash-accounts/${uuid}/`,
|
|
141
|
-
TRANSACTIONS: (uuid) => `/api/cash-accounts/${uuid}/transactions/`,
|
|
142
88
|
};
|
|
143
89
|
export const CASH_ACCOUNT_TRANSACTION_ENDPOINTS = {
|
|
144
90
|
BASE: '/api/cash-account-transactions/',
|
|
@@ -149,10 +95,6 @@ export const COUNTRY_ENDPOINTS = {
|
|
|
149
95
|
DETAIL: (uuid) => `/api/countries/${uuid}/`,
|
|
150
96
|
};
|
|
151
97
|
export const DOCUMENT_ENDPOINTS = {
|
|
152
|
-
BASE: '/api/documents/',
|
|
153
|
-
DETAIL: (uuid) => `/api/documents/${uuid}/`,
|
|
154
|
-
DOWNLOAD: (uuid) => `/api/documents/${uuid}/download/`,
|
|
155
|
-
SIGN: (uuid) => `/api/documents/${uuid}/sign/`,
|
|
156
98
|
AGREEMENT: '/api/documents/agreement/',
|
|
157
99
|
MDA: '/api/documents/mda/',
|
|
158
100
|
SOA: '/api/documents/soa/',
|
|
@@ -164,21 +106,14 @@ export const INDUSTRY_ENDPOINTS = {
|
|
|
164
106
|
export const INSTRUMENT_ENDPOINTS = {
|
|
165
107
|
BASE: '/api/instruments/',
|
|
166
108
|
DETAIL: (uuid) => `/api/instruments/${uuid}/`,
|
|
167
|
-
PRICES: (uuid) => `/api/instruments/${uuid}/prices/`,
|
|
168
|
-
QUOTE: (uuid) => `/api/instruments/${uuid}/quote/`,
|
|
169
109
|
};
|
|
170
110
|
export const PORTFOLIO_ENDPOINTS = {
|
|
171
111
|
BASE: '/api/portfolios/',
|
|
172
112
|
DETAIL: (uuid) => `/api/portfolios/${uuid}/`,
|
|
173
|
-
ALLOCATIONS: (uuid) => `/api/portfolios/${uuid}/allocations/`,
|
|
174
|
-
HOLDINGS: (uuid) => `/api/portfolios/${uuid}/holdings/`,
|
|
175
|
-
PERFORMANCE: (uuid) => `/api/portfolios/${uuid}/performance/`,
|
|
176
|
-
TRANSACTIONS: (uuid) => `/api/portfolios/${uuid}/transactions/`,
|
|
177
113
|
};
|
|
178
114
|
export const PORTFOLIO_TEMPLATE_ENDPOINTS = {
|
|
179
115
|
BASE: '/api/portfolio-templates/',
|
|
180
116
|
DETAIL: (uuid) => `/api/portfolio-templates/${uuid}/`,
|
|
181
|
-
ALLOCATIONS: (uuid) => `/api/portfolio-templates/${uuid}/allocations/`,
|
|
182
117
|
RECOMMENDED: '/api/portfolio-templates/recommended/',
|
|
183
118
|
};
|
|
184
119
|
export const SECTOR_ENDPOINTS = {
|
|
@@ -196,14 +131,10 @@ export const TAX_RESIDENCY_ENDPOINTS = {
|
|
|
196
131
|
export const TRADE_ENDPOINTS = {
|
|
197
132
|
BASE: '/api/trades/',
|
|
198
133
|
DETAIL: (uuid) => `/api/trades/${uuid}/`,
|
|
199
|
-
CANCEL: (uuid) => `/api/trades/${uuid}/cancel/`,
|
|
200
|
-
CONFIRM: (uuid) => `/api/trades/${uuid}/confirm/`,
|
|
201
134
|
};
|
|
202
135
|
export const TARGET_TRADE_ENDPOINTS = {
|
|
203
136
|
BASE: '/api/target-trades/',
|
|
204
137
|
DETAIL: (uuid) => `/api/target-trades/${uuid}/`,
|
|
205
|
-
APPROVE: (uuid) => `/api/target-trades/${uuid}/approve/`,
|
|
206
|
-
SUBMIT: (uuid) => `/api/target-trades/${uuid}/submit/`,
|
|
207
138
|
};
|
|
208
139
|
export const TRADE_SHEET_ENDPOINTS = {
|
|
209
140
|
BASE: '/api/trade-sheets/',
|
|
@@ -213,12 +144,6 @@ export const TARGET_TRADE_SHEET_ENDPOINTS = {
|
|
|
213
144
|
BASE: '/api/target-trade-sheets/',
|
|
214
145
|
DETAIL: (uuid) => `/api/target-trade-sheets/${uuid}/`,
|
|
215
146
|
};
|
|
216
|
-
export const USER_ENDPOINTS = {
|
|
217
|
-
BASE: '/api/users/',
|
|
218
|
-
DETAIL: (uuid) => `/api/users/${uuid}/`,
|
|
219
|
-
PREFERENCES: '/api/users/preferences/',
|
|
220
|
-
INVESTMENT_PREFERENCES: '/api/users/investment-preferences/',
|
|
221
|
-
};
|
|
222
147
|
export const USER_PROFILE_ENDPOINTS = {
|
|
223
148
|
BASE: '/api/user-profiles/',
|
|
224
149
|
DETAIL: (uuid) => `/api/user-profiles/${uuid}/`,
|
|
@@ -227,28 +152,14 @@ export const INVESTMENT_PREFERENCES_ENDPOINTS = {
|
|
|
227
152
|
BASE: '/api/investment-preferences/',
|
|
228
153
|
DETAIL: (uuid) => `/api/investment-preferences/${uuid}/`,
|
|
229
154
|
};
|
|
230
|
-
export const WITHDRAWAL_ENDPOINTS = {
|
|
231
|
-
BASE: '/api/withdrawals/',
|
|
232
|
-
DETAIL: (uuid) => `/api/withdrawals/${uuid}/`,
|
|
233
|
-
CANCEL: (uuid) => `/api/withdrawals/${uuid}/cancel/`,
|
|
234
|
-
APPROVE: (uuid) => `/api/withdrawals/${uuid}/approve/`,
|
|
235
|
-
REJECT: (uuid) => `/api/withdrawals/${uuid}/reject/`,
|
|
236
|
-
};
|
|
237
155
|
export const WITHDRAWAL_REQUEST_ENDPOINTS = {
|
|
238
156
|
BASE: '/api/withdrawal-requests/',
|
|
239
157
|
DETAIL: (uuid) => `/api/withdrawal-requests/${uuid}/`,
|
|
240
|
-
CANCEL: (uuid) => `/api/withdrawal-requests/${uuid}/cancel/`,
|
|
241
|
-
APPROVE: (uuid) => `/api/withdrawal-requests/${uuid}/approve/`,
|
|
242
|
-
REJECT: (uuid) => `/api/withdrawal-requests/${uuid}/reject/`,
|
|
243
158
|
};
|
|
244
159
|
export const WITHDRAWAL_LIQUIDATION_ENDPOINTS = {
|
|
245
160
|
BASE: '/api/withdrawal-liquidations/',
|
|
246
161
|
DETAIL: (uuid) => `/api/withdrawal-liquidations/${uuid}/`,
|
|
247
162
|
};
|
|
248
|
-
export const TRANSACTION_ENDPOINTS = {
|
|
249
|
-
BASE: '/api/transactions/',
|
|
250
|
-
DETAIL: (uuid) => `/api/transactions/${uuid}/`,
|
|
251
|
-
};
|
|
252
163
|
export const ASSET_ALLOCATION_ENDPOINTS = {
|
|
253
164
|
BASE: '/api/asset-allocations/',
|
|
254
165
|
DETAIL: (uuid) => `/api/asset-allocations/${uuid}/`,
|
package/dist/api.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api.js","sourceRoot":"","sources":["../src/api.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAE7C,+CAA+C;AAC/C,iBAAiB;AACjB,+CAA+C;AAE/C,MAAM,CAAC,MAAM,WAAW,GAAG;IACzB,EAAE,EAAE,GAAG;IACP,OAAO,EAAE,GAAG;IACZ,QAAQ,EAAE,GAAG;IACb,UAAU,EAAE,GAAG;IAEf,iBAAiB,EAAE,GAAG;IACtB,KAAK,EAAE,GAAG;IACV,YAAY,EAAE,GAAG;IAEjB,WAAW,EAAE,GAAG;IAChB,YAAY,EAAE,GAAG;IACjB,SAAS,EAAE,GAAG;IACd,SAAS,EAAE,GAAG;IACd,kBAAkB,EAAE,GAAG;IACvB,QAAQ,EAAE,GAAG;IACb,oBAAoB,EAAE,GAAG;IACzB,iBAAiB,EAAE,GAAG;IAEtB,qBAAqB,EAAE,GAAG;IAC1B,WAAW,EAAE,GAAG;IAChB,mBAAmB,EAAE,GAAG;IACxB,eAAe,EAAE,GAAG;CACZ,CAAC;AAIX,MAAM,CAAC,MAAM,YAAY,GAAG;IAC1B,MAAM,EAAE,QAAQ;IAChB,aAAa,EAAE,eAAe;IAC9B,YAAY,EAAE,cAAc;IAC5B,aAAa,EAAE,eAAe;IAC9B,UAAU,EAAE,YAAY;IACxB,gBAAgB,EAAE,kBAAkB;IACpC,Y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