@eaera-com/cms-sdk 0.1.67 → 0.1.69

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.
Files changed (61) hide show
  1. package/LICENSE +28 -15
  2. package/THIRD-PARTY-NOTICES.md +135 -0
  3. package/dist/chunks/_shared-DZlTUzoa.js +0 -1
  4. package/dist/chunks/auth.constant-CMI1lqQc.js +0 -1
  5. package/dist/chunks/authz.constant-BAarvacV.js +0 -1
  6. package/dist/chunks/http.constant-BzH5tJTG.js +0 -1
  7. package/dist/chunks/mt5Retcode-DlZLQOLA.js +0 -1
  8. package/dist/chunks/storage.constant-CVWam5ls.js +0 -1
  9. package/dist/common/constants/people.constant.d.ts +2 -0
  10. package/dist/common/constants/people.constant.d.ts.map +1 -1
  11. package/dist/common/helpers/format.js +0 -1
  12. package/dist/common/helpers/mt5Retcode.js +0 -1
  13. package/dist/index.d.ts +2 -0
  14. package/dist/index.d.ts.map +1 -1
  15. package/dist/index.js +16 -3
  16. package/dist/nuxt.js +0 -1
  17. package/dist/runtime/plugin.js +0 -1
  18. package/dist/server/auth/cbs-callback.post.js +0 -1
  19. package/dist/server/auth/cbs-start.post.js +0 -1
  20. package/dist/server/auth/idp-callback.get.js +0 -1
  21. package/dist/server/auth/idp-link.post.js +0 -1
  22. package/dist/server/auth/idp-login.get.js +0 -1
  23. package/dist/server/auth/idp-unlink.delete.js +0 -1
  24. package/dist/server/auth/login.post.js +0 -1
  25. package/dist/server/auth/logout.post.js +0 -1
  26. package/dist/server/auth/refresh.post.js +0 -1
  27. package/dist/server/authz/portal-access.get.js +0 -1
  28. package/dist/server/clear-token.delete.js +0 -1
  29. package/dist/server/persist.post.js +0 -1
  30. package/dist/server/set-token.post.js +0 -1
  31. package/dist/services/people/index.d.ts +2 -0
  32. package/dist/services/people/index.d.ts.map +1 -1
  33. package/dist/services/people/uicopy/index.d.ts +13 -0
  34. package/dist/services/people/uicopy/index.d.ts.map +1 -0
  35. package/dist/services/people/uicopy/uicopy.type.d.ts +37 -0
  36. package/dist/services/people/uicopy/uicopy.type.d.ts.map +1 -0
  37. package/package.json +3 -2
  38. package/dist/chunks/_shared-DZlTUzoa.js.map +0 -1
  39. package/dist/chunks/auth.constant-CMI1lqQc.js.map +0 -1
  40. package/dist/chunks/authz.constant-BAarvacV.js.map +0 -1
  41. package/dist/chunks/http.constant-BzH5tJTG.js.map +0 -1
  42. package/dist/chunks/mt5Retcode-DlZLQOLA.js.map +0 -1
  43. package/dist/chunks/storage.constant-CVWam5ls.js.map +0 -1
  44. package/dist/common/helpers/format.js.map +0 -1
  45. package/dist/common/helpers/mt5Retcode.js.map +0 -1
  46. package/dist/index.js.map +0 -1
  47. package/dist/nuxt.js.map +0 -1
  48. package/dist/runtime/plugin.js.map +0 -1
  49. package/dist/server/auth/cbs-callback.post.js.map +0 -1
  50. package/dist/server/auth/cbs-start.post.js.map +0 -1
  51. package/dist/server/auth/idp-callback.get.js.map +0 -1
  52. package/dist/server/auth/idp-link.post.js.map +0 -1
  53. package/dist/server/auth/idp-login.get.js.map +0 -1
  54. package/dist/server/auth/idp-unlink.delete.js.map +0 -1
  55. package/dist/server/auth/login.post.js.map +0 -1
  56. package/dist/server/auth/logout.post.js.map +0 -1
  57. package/dist/server/auth/refresh.post.js.map +0 -1
  58. package/dist/server/authz/portal-access.get.js.map +0 -1
  59. package/dist/server/clear-token.delete.js.map +0 -1
  60. package/dist/server/persist.post.js.map +0 -1
  61. package/dist/server/set-token.post.js.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"file":"http.constant-BzH5tJTG.js","sources":["../../src/common/constants/http.constant.ts"],"sourcesContent":["/**\n * HTTP-layer constants shared by the core `createApi` factory.\n */\n\n/** Canonical request/response header names used across the SDK. */\nexport const HTTP_HEADER = {\n AUTHORIZATION: 'Authorization',\n DEVICE_ID: 'DeviceID',\n DEVICE_IP: 'DeviceIP',\n CLIENT_ID: 'X-Client-Id',\n USER_AGENT: 'user-agent',\n REQUEST_ID: 'x-request-id',\n /**\n * Backend response-casing selector. Default backend casing is camelCase\n * (omit the header); send `snake` to receive snake_case bodies.\n */\n RESPONSE_CASING: 'x-response-casing',\n /**\n * Backend request-casing selector. Default is camelCase (omit the header);\n * send `snake` to declare a snake_case request body.\n */\n REQUEST_CASING: 'x-request-casing',\n} as const;\n\n/** Supported response-casing values. camelCase is the backend default. */\nexport const RESPONSE_CASING_VALUE = {\n CAMEL: 'camel',\n SNAKE: 'snake',\n} as const;\nexport type ResponseCasing = (typeof RESPONSE_CASING_VALUE)[keyof typeof RESPONSE_CASING_VALUE];\nexport type RequestCasing = ResponseCasing;\n\n/**\n * Serialization format discriminator. Accepted by content / rules /\n * lenses list endpoints via `?format=json|yaml`.\n */\nexport const SERIALIZATION_FORMAT = {\n JSON: 'json',\n YAML: 'yaml',\n} as const;\nexport type SerializationFormat = (typeof SERIALIZATION_FORMAT)[keyof typeof SERIALIZATION_FORMAT];\n\n/** Default per-request tuning (overridable via `createCmsSDK` options). */\nexport const HTTP_DEFAULTS = {\n TIMEOUT_MS: 30000,\n RETRY: 0,\n} as const;\n\n/** Status codes eligible for automatic retry (transient failures). */\nexport const HTTP_RETRY_STATUS_CODES = [408, 425, 429, 500, 502, 503, 504] as const;\n"],"names":[],"mappings":"AAKO,MAAM,WAAA,GAAc;AAAA,EACzB,aAAA,EAAe,eAAA;AAAA,EACf,SAAA,EAAW,UAAA;AAAA,EACX,SAAA,EAAW,UAAA;AAAA,EACX,SAAA,EAAW,aAAA;AAAA,EACX,UAAA,EAAY,YAAA;AAAA,EACZ,UAAA,EAAY,cAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAKZ,eAAA,EAAiB,mBAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAKjB,cAAA,EAAgB;AAClB;AAGO,MAAM,qBAAA,GAAwB;AAAA,EAEnC,KAAA,EAAO;AACT;AAQO,MAAM,oBAAA,GAAuB;AAAA,EAClC,IAAA,EAAM,MAAA;AAAA,EACN,IAAA,EAAM;AACR;AAIO,MAAM,aAAA,GAAgB;AAAA,EAC3B,UAAA,EAAY,GAAA;AAAA,EACZ,KAAA,EAAO;AACT;AAGO,MAAM,uBAAA,GAA0B,CAAC,GAAA,EAAK,GAAA,EAAK,KAAK,GAAA,EAAK,GAAA,EAAK,KAAK,GAAG;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"mt5Retcode-DlZLQOLA.js","sources":["../../src/core/ws/ws.constants.ts","../../src/common/helpers/mt5Retcode.ts"],"sourcesContent":["/**\n * WebSocket-layer defaults + protocol constants.\n *\n * Pattern (per FE coding rules §1.5):\n * `export const X = { FOO: 'foo', BAR: 'bar' } as const;`\n * `export type XKey = (typeof X)[keyof typeof X];`\n *\n * See `eaera-docs/cbs/eaera-cms/docs/eaera-cms-websocket-integration-guide.md`\n * for the wire protocol this client implements.\n */\n\n/* ───────────────────────── Re-exports ─────────────────────────────────── */\n\n/**\n * Re-export the MT5 domain constants so WS consumers can grab the server\n * name + interval enum from the same place they import the topic builders.\n */\nexport { MT5_INTERVAL, MT5_SERVER_NAME } from '../../common/constants/mt5.constant';\nexport type { MT5Interval, MT5ServerName } from '../../common/constants/mt5.constant';\n\n/* ───────────────────────── Connection lifecycle ───────────────────────── */\n\n/** Lifecycle states surfaced by `IWsClient.connectionState`. */\nexport const WS_CONNECTION_STATE = {\n IDLE: 'idle',\n OPENING: 'opening',\n AUTHENTICATING: 'authenticating',\n OPEN: 'open',\n RECONNECTING: 'reconnecting',\n CLOSED: 'closed',\n} as const;\nexport type WsConnectionState = (typeof WS_CONNECTION_STATE)[keyof typeof WS_CONNECTION_STATE];\n\n/* ───────────────────────── WebSocket close codes ─────────────────────── */\n\n/**\n * WebSocket close codes. `NORMAL` is the only one the client sends; the\n * rest mirror what the CMS server uses (see FEAT-010 guide §3).\n */\nexport const WS_CLOSE_CODE = {\n /** RFC 6455 — clean shutdown (e.g. user logout). */\n NORMAL: 1000,\n /** RFC 6455 — `invalid_token` / `token_expired` / `auth_timeout`. */\n POLICY_VIOLATION: 1008,\n /** RFC 6455 — `service_unavailable` (token service not configured). */\n INTERNAL_ERROR: 1011,\n /** RFC 6455 — graceful server shutdown. */\n TRY_AGAIN_LATER: 1013,\n /**\n * Non-standard — client-side deadline: server did not reply to `auth`\n * within `WS_AUTH_TIMEOUT_MS`. Closes the socket so the consumer can\n * react.\n */\n CLIENT_AUTH_TIMEOUT: 4000,\n} as const;\nexport type WsCloseCode = (typeof WS_CLOSE_CODE)[keyof typeof WS_CLOSE_CODE];\n\n/* ───────────────────────── Auth error codes ──────────────────────────── */\n\n/** Server-emitted error codes during the `auth` handshake / mid-session (ws-guide §3.4). */\nexport const WS_AUTH_ERROR_CODE = {\n INVALID_TOKEN: 'invalid_token',\n TOKEN_EXPIRED: 'token_expired',\n AUTH_TIMEOUT: 'auth_timeout',\n INVALID_MESSAGE: 'invalid_message',\n SERVICE_UNAVAILABLE: 'service_unavailable',\n} as const;\nexport type WsAuthErrorCode = (typeof WS_AUTH_ERROR_CODE)[keyof typeof WS_AUTH_ERROR_CODE];\n\n/**\n * Close-frame reason strings (ws-guide §4.1). These accompany the RFC 6455\n * close codes in `WS_CLOSE_CODE` — they are NOT auth error codes. Surfaced so\n * consumers can match `CloseEvent.reason` against stable strings.\n */\nexport const WS_CLOSE_REASON = {\n NORMAL: 'normal',\n INVALID_TOKEN: 'invalid_token',\n TOKEN_EXPIRED: 'token_expired',\n AUTH_TIMEOUT: 'auth_timeout',\n PING_TIMEOUT: 'ping_timeout',\n AUTH_REQUIRED: 'auth required',\n AUTH_SERVICE_UNAVAILABLE: 'auth service unavailable',\n SERVER_SHUTTING_DOWN: 'server shutting down',\n} as const;\nexport type WsCloseReason = (typeof WS_CLOSE_REASON)[keyof typeof WS_CLOSE_REASON];\n\n/* ───────────────────────── Action error codes ────────────────────────── */\n\n/** Server-emitted error codes on the action invocation path (FEAT-008). */\n/** Accepted-stage error codes — returned on `action_accepted` (ws-guide §9.3). */\nexport const WS_ACTION_ACCEPTED_ERROR_CODE = {\n VALIDATION_ERROR: 'validation_error',\n NOT_FOUND: 'not_found',\n PERMISSION_DENIED: 'permission_denied',\n DUPLICATE: 'duplicate',\n INTERNAL_ERROR: 'internal_error',\n CONFIGURATION_ERROR: 'configuration_error',\n} as const;\nexport type WsActionAcceptedErrorCode =\n (typeof WS_ACTION_ACCEPTED_ERROR_CODE)[keyof typeof WS_ACTION_ACCEPTED_ERROR_CODE];\n\n/** Result-stage error codes — returned on `action_result` (ws-guide §9.4). */\nexport const WS_ACTION_RESULT_ERROR_CODE = {\n TIMEOUT: 'timeout',\n} as const;\nexport type WsActionResultErrorCode =\n (typeof WS_ACTION_RESULT_ERROR_CODE)[keyof typeof WS_ACTION_RESULT_ERROR_CODE];\n\n/**\n * All action error codes — union of the accepted-stage and result-stage maps\n * (ws-guide §9.3 + §9.4). Kept for back-compat with consumers that do not yet\n * distinguish the stage; prefer the stage-specific maps above for new code.\n */\nexport const WS_ACTION_ERROR_CODE = {\n ...WS_ACTION_ACCEPTED_ERROR_CODE,\n ...WS_ACTION_RESULT_ERROR_CODE,\n} as const;\nexport type WsActionErrorCode = (typeof WS_ACTION_ERROR_CODE)[keyof typeof WS_ACTION_ERROR_CODE];\n\n/* ───────────────────────── Message type discriminators ────────────────── */\n\n/**\n * Wire `type` field for every server→client and client→server message.\n *\n * TypeScript discriminated unions require the `type` field to be a string\n * literal (not a const reference) on each interface — so these constants are\n * used for **runtime comparisons** (`switch (msg.type)`) and the interfaces\n * in `ws.type.ts` keep their literal `type: '…'` annotations for narrowing.\n */\nexport const WS_MESSAGE_TYPE = {\n // server → client\n AUTH_OK: 'auth_ok',\n AUTH_FAIL: 'auth_fail',\n AUTH_EXPIRED: 'auth_expired',\n SUB_OK: 'sub_ok',\n SUB_ERROR: 'sub_error',\n UNSUB_OK: 'unsub_ok',\n PING: 'ping',\n EVENT: 'event',\n ACTION_ACCEPTED: 'action_accepted',\n ACTION_RESULT: 'action_result',\n ERROR: 'error',\n ADMIN_DISCONNECT: 'admin_disconnect',\n // client → server\n AUTH: 'auth',\n SUBSCRIBE: 'subscribe',\n UNSUBSCRIBE: 'unsubscribe',\n UNSUBSCRIBE_ALL: 'unsubscribe_all',\n PONG: 'pong',\n ACTION: 'action',\n FETCH_RESULT: 'fetch_result',\n} as const;\nexport type WsMessageType = (typeof WS_MESSAGE_TYPE)[keyof typeof WS_MESSAGE_TYPE];\n\n/* ───────────────────────── Built-in topic namespaces ─────────────────── */\n\n/**\n * Built-in topic namespaces (guide §5.4). Server-side permissions are\n * enforced (`risk:*` requires `content:read`, `mt5:*` requires `mt5:viewer`,\n * etc.). Use these as the first segment of every topic you publish /\n * subscribe to.\n */\nexport const WS_TOPIC_NAMESPACE = {\n RISK: 'risk',\n MT5: 'mt5',\n SYMBOL: 'symbol',\n ACCOUNT: 'account',\n USER: 'user',\n STREAM: 'stream',\n ADMIN: 'admin',\n} as const;\nexport type WsTopicNamespace = (typeof WS_TOPIC_NAMESPACE)[keyof typeof WS_TOPIC_NAMESPACE];\n\n/**\n * Canonical topic strings for the built-in namespaces. The server-side\n * authz pipeline (FEAT-011) checks the prefix against the user's effective\n * permissions.\n *\n * MT5 topics must be built with `mt5Topic(server, eventType)` — the server\n * segment must match `MT5_SERVER_NAME` exactly (including spaces).\n */\nexport const WS_TOPIC = {\n RISK_RULES: 'risk:rules',\n RISK_EXECUTIONS: 'risk:executions',\n} as const;\nexport type WsTopic = (typeof WS_TOPIC)[keyof typeof WS_TOPIC];\n\n/** MT5 event types — third segment of `mt5:events:{server}:{event_type}`. */\nexport const WS_MT5_EVENT_TYPE = {\n TICK: 'tick',\n ORDER: 'order',\n POSITION: 'position',\n STATEMENT: 'statement',\n DEAL: 'deal',\n} as const;\nexport type WsMt5EventType = (typeof WS_MT5_EVENT_TYPE)[keyof typeof WS_MT5_EVENT_TYPE];\n\n/**\n * Build an MT5 topic for a specific server + event type. The server segment\n * MUST match `MT5_SERVER_NAME` exactly (including spaces).\n */\nexport const mt5Topic = (serverName: string, eventType: WsMt5EventType): string =>\n `mt5:events:${serverName}:${eventType}`;\n\n/**\n * Build a per-account state topic: `account:<Mt5Account.uuid>`.\n * Subscribe with the account's UUID (NOT the numeric login) [ws§7.4, api-inventory §9.9].\n */\nexport const accountTopic = (accountUuid: string): string => `account:${accountUuid}`;\n\n/**\n * Build a per-symbol tick topic: `symbol:<server>:<SYMBOL>`.\n * The preferred live-tick path for charts (one topic per (server, symbol) isolates\n * per-connection cost to one symbol's tick rate) [ws§7.3, api-inventory §9.3].\n */\nexport const symbolTopic = (serverName: string, symbol: string): string =>\n `symbol:${serverName}:${symbol}`;\n\n/**\n * Build a user-scoped notification topic: `user:<id>` [ws§5].\n */\nexport const userTopic = (userId: number | string): string => `user:${userId}`;\n\n/**\n * Build a stream-processor output topic: `stream:<id>` [ws§5].\n */\nexport const streamTopic = (streamId: string): string => `stream:${streamId}`;\n\n/**\n * Build an admin topic: `admin:<name>` [ws§5].\n */\nexport const adminTopic = (name: string): string => `admin:${name}`;\n\n/* ───────────────────────── Numeric defaults ──────────────────────────── */\n\n/** Hard cap on topics per connection (server-side default). */\nexport const WS_MAX_SUBSCRIPTIONS = 50;\n\n/** Reconnect backoff schedule (matches the integration guide's recommendation). */\nexport const WS_RECONNECT_INITIAL_MS = 1000;\nexport const WS_RECONNECT_MAX_MS = 30000;\n/** Random jitter added to each reconnect delay, in milliseconds. */\nexport const WS_RECONNECT_JITTER_MS = 250;\n\n/** Server-driven ping interval (server sends `ping` every N seconds). */\nexport const WS_PING_INTERVAL_MS = 30000;\n\n/**\n * Client-side ping-watchdog multiplier. The watchdog force-closes the socket\n * after `pingIntervalMs * WS_PING_WATCHDOG_FACTOR` without a server `ping`,\n * catching half-open (sleep / NAT-timeout) connections before the server's\n * own 2-missed-pong timeout (ws-guide §8).\n */\nexport const WS_PING_WATCHDOG_FACTOR = 1.5;\n/** Floor for the watchdog interval check (never probe more often than this). */\nexport const WS_PING_WATCHDOG_CHECK_MS = 15000;\n\n/**\n * Max reconnect attempts before the client transitions to terminal `CLOSED`\n * (ws-guide §10). Prevents an infinite `RECONNECTING` loop on a prolonged\n * outage so consumers (e.g. the Nuxt recovery plugin) can surface a\n * \"connection lost\" notification instead of retrying silently forever.\n */\nexport const WS_MAX_RECONNECT_ATTEMPTS = 10;\n\n/** Window in which the server expects the first `auth` message. */\nexport const WS_AUTH_TIMEOUT_MS = 10000;\n\n/**\n * Server-side TTL for an in-flight `action` after disconnect. The client\n * uses `fetch_result` within this window to recover a missed `action_result`.\n */\nexport const WS_ACTION_RESULT_TTL_MS = 5 * 60 * 1000;\n\n/* ───────────────────────── MT5 broker retcodes ───────────────────────── */\n\n/**\n * MT5 broker retcodes surfaced through `action_result.output.data.retcode`.\n * Source: eaera-docs §7.5 / ws-guide §12.6.\n */\nexport const MT5_RETCODE = {\n REQ_REJECT: 10004,\n REQ_CANCELLED: 10006,\n PRICE_OFF_QUOTES: 10016,\n REQUEST_CHANGED: 10024,\n PRICE_OFF: 10030,\n CONNECTION_LOST: 10031,\n NETWORK_ERROR: 10032,\n} as const;\nexport type Mt5Retcode = (typeof MT5_RETCODE)[keyof typeof MT5_RETCODE];\n","/**\n * MT5 broker retcode → human-friendly message + suggested FE action.\n *\n * Source: eaera-docs/cbs/eaera-cms/docs/eaera-cms-api-inventory.md §7.5,\n * §12.3, §12.6 (mirrored in ws-guide §12.6).\n *\n * The retcode is delivered INSIDE `output.data.retcode` (NOT top-level\n * output) — pass the full `action_result.output.data` object here.\n */\nimport { MT5_RETCODE } from '../../core/ws/ws.constants';\n\nexport interface IMt5RetcodeView {\n /** Stable machine code (one of the MT5_RETCODE values). */\n code: number;\n /** Short human label, e.g. `PRICE_OFF_QUOTES`. */\n label: string;\n /** One-line FE-facing message. */\n message: string;\n /** What the FE should do — surface a toast, re-quote, retry, etc. */\n suggestion:\n | 'show-as-rejected'\n | 'show-as-cancelled'\n | 're-quote-and-retry'\n | 'show-new-params'\n | 'show-no-quotes'\n | 'retry-shortly';\n}\n\n/**\n * Look up an MT5 broker retcode. Returns `null` if the code is unknown —\n * FE should fall back to `error.message` from `action_result.error`.\n *\n * @param retcode — the integer from `action_result.output.data.retcode`\n */\nexport function viewMt5Retcode(retcode: number | null | undefined): IMt5RetcodeView | null {\n if (retcode == null) return null;\n switch (retcode) {\n case MT5_RETCODE.REQ_REJECT:\n return {\n code: retcode,\n label: 'REQ_REJECT',\n message: 'Order rejected by broker.',\n suggestion: 'show-as-rejected',\n };\n case MT5_RETCODE.REQ_CANCELLED:\n return {\n code: retcode,\n label: 'REQ_CANCELLED',\n message: 'Order cancelled by dealer.',\n suggestion: 'show-as-cancelled',\n };\n case MT5_RETCODE.PRICE_OFF_QUOTES:\n return {\n code: retcode,\n label: 'PRICE_OFF_QUOTES',\n message: 'Price moved past the band — please re-quote and try again.',\n suggestion: 're-quote-and-retry',\n };\n case MT5_RETCODE.REQUEST_CHANGED:\n return {\n code: retcode,\n label: 'REQUEST_CHANGED',\n message: 'The dealer mutated your order — refreshing the order book now.',\n suggestion: 'show-new-params',\n };\n case MT5_RETCODE.PRICE_OFF:\n return {\n code: retcode,\n label: 'PRICE_OFF',\n message: 'No quotes available — the market may be closed.',\n suggestion: 'show-no-quotes',\n };\n case MT5_RETCODE.CONNECTION_LOST:\n case MT5_RETCODE.NETWORK_ERROR:\n return {\n code: retcode,\n label: 'CONNECTION_LOST',\n message: 'Broker connection issue — please retry shortly.',\n suggestion: 'retry-shortly',\n };\n default:\n return null;\n }\n}\n"],"names":[],"mappings":"AAuBO,MAAM,mBAAA,GAAsB;AAAA,EACjC,IAAA,EAAM,MAAA;AAAA,EACN,OAAA,EAAS,SAAA;AAAA,EACT,cAAA,EAAgB,gBAAA;AAAA,EAChB,IAAA,EAAM,MAAA;AAAA,EACN,YAAA,EAAc,cAAA;AAAA,EACd,MAAA,EAAQ;AACV;AASO,MAAM,aAAA,GAAgB;AAAA;AAAA,EAE3B,MAAA,EAAQ,GAAA;AAAA;AAAA,EAER,gBAAA,EAAkB,IAAA;AAAA;AAAA,EAElB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AAAA,QACL,IAAA,EAAM,OAAA;AAAA,QACN,KAAA,EAAO,iBAAA;AAAA,QACP,OAAA,EAAS,gEAAA;AAAA,QACT,UAAA,EAAY;AAAA,OACd;AAAA,IACF,KAAK,WAAA,CAAY,SAAA;AACf,MAAA,OAAO;AAAA,QACL,IAAA,EAAM,OAAA;AAAA,QACN,KAAA,EAAO,WAAA;AAAA,QACP,OAAA,EAAS,iDAAA;AAAA,QACT,UAAA,EAAY;AAAA,OACd;AAAA,IACF,KAAK,WAAA,CAAY,eAAA;AAAA,IACjB,KAAK,WAAA,CAAY,aAAA;AACf,MAAA,OAAO;AAAA,QACL,IAAA,EAAM,OAAA;AAAA,QACN,KAAA,EAAO,iBAAA;AAAA,QACP,OAAA,EAAS,iDAAA;AAAA,QACT,UAAA,EAAY;AAAA,OACd;AAAA,IACF;AACE,MAAA,OAAO,IAAA;AAAA;AAEb;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"storage.constant-CVWam5ls.js","sources":["../../src/common/constants/storage.constant.ts"],"sourcesContent":["/**\n * Token storage constants — the single source for the storage key so the\n * memory/localStorage/cookie adapters never drift apart.\n */\nexport const TOKEN_STORAGE_KEY = 'cms_access_token' as const;\n\n/**\n * Refresh-token cookie key. Stored as an httpOnly cookie (parallel to the access\n * token) so the SDK can silently rotate the access token when it expires.\n */\nexport const REFRESH_TOKEN_STORAGE_KEY = 'cms_refresh_token' as const;\n\n/** Cookie adapter defaults (overridable via `credentials.cookie`). */\nexport const COOKIE_DEFAULTS = {\n MAX_AGE_SECONDS: 60 * 60 * 24 * 30, // 30 days\n PATH: '/',\n SECURE: true,\n SAME_SITE: 'Lax',\n HTTP_ONLY: true,\n} as const;\n\n/** Pinia persistence keys (versioned for schema migration). */\nexport const STORE_PERSIST_KEY = {\n AUTH: 'cms-auth-v1',\n AUTHZ: 'cms-authz-v1',\n CONTENT: 'cms-content-v1',\n RULES: 'cms-rules-v1',\n EXECUTIONS: 'cms-executions-v1',\n SETTINGS: 'cms-settings-v1',\n LLM: 'cms-llm-v1',\n LLM_PROVIDERS: 'cms-llm-providers-v1',\n BARS: 'cms-bars-v1',\n HISTORY: 'cms-history-v1',\n KALSHI: 'cms-kalshi-v1',\n GOV: 'cms-gov-v1',\n PEOPLE: 'cms-people-v1',\n} as const;\n\n/**\n * Internal cookie persistence (replaces pinia-plugin-persistedstate).\n *\n * Each persisted state → its own cookie `${PERSIST_KEY.<store>}.${field}`.\n * The common `/api/cms-sdk/persist` endpoint may only set keys in\n * `PERSIST_ALLOWED_KEYS` (single source of truth, shared by the plugin + the\n * endpoint). The token key is always excluded as a belt-and-suspenders guard.\n */\nexport const PERSIST_PREFIX = 'cms-persist-' as const;\n\nexport const PERSIST_KEY = {\n AUTH: 'cms-persist-auth',\n} as const;\n\n/** Max bytes per persisted cookie value (~4KB cookie cap, with headroom). */\nexport const PERSIST_MAX_BYTES = 3500;\n\n/** Allowlist of cookie keys the persist endpoint may set. */\nexport const PERSIST_ALLOWED_KEYS = [`${PERSIST_KEY.AUTH}.authUser`] as const;\n\n/**\n * Storage backend names accepted by `TokenManager`. Kept in sync with\n * `IStorageName` in `core/credentials/credential.type.ts`. The\n * `httpOnlyBridge` value is the recommended production backend (delegates\n * to a Nuxt server route).\n */\nexport const STORAGE_NAME = {\n MEMORY: 'memory',\n LOCAL_STORAGE: 'localStorage',\n COOKIE: 'cookie',\n HTTP_ONLY_BRIDGE: 'httpOnlyBridge',\n} as const;\nexport type StorageName = (typeof STORAGE_NAME)[keyof typeof STORAGE_NAME];\n\n/**\n * `Cookie SameSite` values (RFC 6265). Used by `cookieStorage` and the\n * SDK Nuxt module when setting the httpOnly access-token cookie. Mirrors\n * the `CookieSameSite` type in `core/credentials/storages/cookieStorage.ts`.\n */\nexport const COOKIE_SAME_SITE = {\n STRICT: 'Strict',\n LAX: 'Lax',\n NONE: 'None',\n} as const;\nexport type CookieSameSite = (typeof COOKIE_SAME_SITE)[keyof typeof COOKIE_SAME_SITE];\n"],"names":[],"mappings":"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digit precision. */\nexport function formatPrice(value: number, digits = 5): string {\n return value.toFixed(digits);\n}\n\n/** Compute spread from bid/ask at a given precision. */\nexport function computeSpread(bid: number, ask: number, digits = 5): number {\n return Number((ask - bid).toFixed(digits));\n}\n\n/** Human label for a symbol category. */\nexport function categoryLabel(category: string): string {\n const map: Record<string, string> = {\n fx: 'Forex',\n metal: 'Metals',\n crypto: 'Crypto',\n index: 'Indices',\n stock: 'Stocks',\n energy: 'Energy',\n };\n return map[category] ?? category;\n}\n"],"names":[],"mappings":"AACO,SAAS,WAAA,CAAY,KAAA,EAAe,MAAA,GAAS,CAAA,EAAW;AAC7D,EAAA,OAAO,KAAA,CAAM,QAAQ,MAAM,CAAA;AAC7B;AAGO,SAAS,aAAA,CAAc,GAAA,EAAa,GAAA,EAAa,MAAA,GAAS,CAAA,EAAW;AAC1E,EAAA,OAAO,MAAA,CAAA,CAAQ,GAAA,GAAM,GAAA,EAAK,OAAA,CAAQ,MAAM,CAAC,CAAA;AAC3C;AAGO,SAAS,cAAc,QAAA,EAA0B;AACtD,EAAA,MAAM,GAAA,GAA8B;AAAA,IAClC,EAAA,EAAI,OAAA;AAAA,IACJ,KAAA,EAAO,QAAA;AAAA,IACP,MAAA,EAAQ,QAAA;AAAA,IACR,KAAA,EAAO,SAAA;AAAA,IACP,KAAA,EAAO,QAAA;AAAA,IACP,MAAA,EAAQ;AAAA,GACV;AACA,EAAA,OAAO,GAAA,CAAI,QAAQ,CAAA,IAAK,QAAA;AAC1B;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"mt5Retcode.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}