/** * History endpoints (`eaera_cms/history/routes.py`, doc §5.6). * * ClickHouse-direct deal / position / order reads with email-bound authz: * the route resolves the caller's identity by **email** — it looks up * `users.email` for the JWT `sub`, then matches every `Mt5Account.data.email` * against that address. Callers do NOT pass accountUuid. * * The legacy CT-backed path (`/api/v1/content?type=Mt5*History`) still * works for backward compatibility but is no longer the recommended read * — see `eaera-docs/cbs/eaera-cms/docs/eaera-cms-api-inventory.md` §5.6. */ export declare const HISTORY_ENDPOINT: { readonly DEALS: "/api/v1/history/deals"; readonly DEALS_SUMMARY: "/api/v1/history/deals/summary"; readonly DEALS_EXPORT: "/api/v1/history/deals/export"; readonly POSITIONS: "/api/v1/history/positions"; readonly POSITIONS_SUMMARY: "/api/v1/history/positions/summary"; readonly POSITIONS_EXPORT: "/api/v1/history/positions/export"; readonly ORDERS: "/api/v1/history/orders"; readonly ORDERS_SUMMARY: "/api/v1/history/orders/summary"; readonly ORDERS_EXPORT: "/api/v1/history/orders/export"; readonly ACCOUNT_STATES: "/api/v1/history/account-states"; }; /** History query defaults (doc §5.6.2). */ export declare const HISTORY_DEFAULTS: { readonly PAGE: 1; readonly SIZE: 50; readonly SIZE_MIN: 1; readonly SIZE_MAX: 500; readonly SORT_DIRECTION: "desc"; }; /** * Per-entity sort whitelist (doc §5.6.2). The backend rejects anything * outside this list with a 400 — this prevents SQL injection through the * `sortBy` query parameter. */ export declare const HISTORY_SORT_BY: { readonly deals: readonly ["deal_id", "mt5_ts", "price", "volume", "profit_loss"]; readonly positions: readonly ["position_id", "mt5_ts_open", "mt5_ts_close", "volume", "profit_loss"]; readonly orders: readonly ["order_id", "mt5_ts_setup", "mt5_ts_done", "volume"]; }; export type HistoryDealsSortBy = (typeof HISTORY_SORT_BY.deals)[number]; export type HistoryPositionsSortBy = (typeof HISTORY_SORT_BY.positions)[number]; export type HistoryOrdersSortBy = (typeof HISTORY_SORT_BY.orders)[number]; /** Sort direction whitelist. */ export declare const HISTORY_SORT_DIRECTION: { readonly ASC: "asc"; readonly DESC: "desc"; }; export type HistorySortDirection = (typeof HISTORY_SORT_DIRECTION)[keyof typeof HISTORY_SORT_DIRECTION]; /** * Order status labels returned by the backend, decoded from `state_str` * (doc §5.6.2 row 3 + §5.6.5). Non-terminal states surface as `UNKNOWN`. */ export declare const HISTORY_ORDER_STATUS: { readonly FILLED: "FILLED"; readonly CANCELLED: "CANCELLED"; readonly EXPIRED: "EXPIRED"; readonly REJECTED: "REJECTED"; readonly UNKNOWN: "UNKNOWN"; }; export type HistoryOrderStatus = (typeof HISTORY_ORDER_STATUS)[keyof typeof HISTORY_ORDER_STATUS]; /** Deal `entry` values (doc §5.6.2 + §4.9). */ export declare const HISTORY_DEAL_ENTRY: { readonly IN: "IN"; readonly OUT: "OUT"; readonly INOUT: "INOUT"; readonly OUT_BY: "OUT_BY"; }; export type HistoryDealEntry = (typeof HISTORY_DEAL_ENTRY)[keyof typeof HISTORY_DEAL_ENTRY]; /** * Deal `action` values (doc §4.9 + §5.6.2 row 3). * Trade deals use BUY/SELL; non-trade rows use BALANCE/CREDIT/etc. * The FE splits BALANCE rows into deposits (profit_loss > 0) and * withdrawals (profit_loss < 0) for the Funding tab. */ export declare const HISTORY_DEAL_ACTION: { readonly BUY: "BUY"; readonly SELL: "SELL"; readonly BALANCE: "BALANCE"; readonly CREDIT: "CREDIT"; readonly CHARGE: "CHARGE"; readonly CORRECTION: "CORRECTION"; readonly BONUS: "BONUS"; readonly COMMISSION: "COMMISSION"; readonly COMMISSION_DAILY: "COMMISSION_DAILY"; readonly COMMISSION_MONTHLY: "COMMISSION_MONTHLY"; readonly AGENT_DAILY: "AGENT_DAILY"; readonly AGENT_MONTHLY: "AGENT_MONTHLY"; readonly INTERESTRATE: "INTERESTRATE"; readonly BUY_CANCELED: "BUY_CANCELED"; readonly SELL_CANCELED: "SELL_CANCELED"; readonly DIVIDEND: "DIVIDEND"; readonly DIVIDEND_FRANKED: "DIVIDEND_FRANKED"; readonly TAX: "TAX"; readonly AGENT: "AGENT"; readonly SO_COMPENSATION: "SO_COMPENSATION"; readonly SO_COMPENSATION_CREDIT: "SO_COMPENSATION_CREDIT"; }; export type HistoryDealAction = (typeof HISTORY_DEAL_ACTION)[keyof typeof HISTORY_DEAL_ACTION]; /** Tab identifier — discriminator for endpoints, mocks, and exports. */ export declare const HISTORY_TAB: { readonly DEALS: "deals"; readonly POSITIONS: "positions"; readonly ORDERS: "orders"; }; export type HistoryTab = (typeof HISTORY_TAB)[keyof typeof HISTORY_TAB]; //# sourceMappingURL=history.constant.d.ts.map