Files
lingxi/packages/shared/src/constants.ts
T
Stev_Wang 23067edb8f feat(api): 搭建 API 与 Worker 骨架及契约基线
NestJS 11 + Fastify 统一错误体与 trace_id,/health 真实探活 DB/Redis,OpenAPI 3.1 契约含 20 个错误码;shared 包提供错误码、权限点、ULID、分页与通用 schema;worker 完成队列进程骨架。
2026-11-02 17:20:46 +08:00

17 lines
471 B
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/**
* 跨端共享常量(A0)
* 约束:packages/shared 不依赖任何业务包(AGENTS §5)。
*/
export const API_PREFIX = '/api/v1';
export const DEFAULT_PAGE_SIZE = 20;
export const MAX_PAGE_SIZE = 100;
export const ULID_LENGTH = 26;
/** 任务提交必须携带的幂等键请求头(AGENTS §3.13) */
export const IDEMPOTENCY_KEY_HEADER = 'Idempotency-Key';
/** 请求追踪 ID 请求/响应头 */
export const REQUEST_ID_HEADER = 'x-request-id';