Cybersecurity-Projects/PROJECTS/beginner/canary-token-generator/frontend
CarterPerez-dev db98a0d497 feat(canary): Zod schemas + canary envelope error normalization
- Add Zod 4 schemas mirroring backend handler shapes:
  - api/types/token.ts: tokenResponseSchema, manageTokenViewSchema,
    artifactSchema (discriminatedUnion on kind), typeDescriptorSchema,
    createTokenRequestSchema (with superRefine for telegram/webhook
    conditional required), per-type metadata helpers.
  - api/types/event.ts: eventResponseSchema with GeoView, NotifyStatus,
    manageResponseSchema with cursor pagination.
  - api/types/error.ts: apiErrorEnvelopeSchema (canary {success,error}
    envelope) + successEnvelope<T> factory for typed unwrap.
- Refactor core/api/errors.ts: ApiError now carries canary error codes
  (VALIDATION_ERROR, TURNSTILE_FAILED, BAD_CURSOR, etc.) and a
  fields: Record<string,string> map. transformAxiosError parses the
  canary envelope first, falls back to HTTP status code if envelope
  shape is missing.
- Update core/api/query.config.ts no-retry list for canary codes
  (user-error codes plus RATE_LIMITED to avoid burning rate budget).
- Remove obsolete template apiClient at core/api/api.config.ts; the
  new canary client lives at api/client.ts (Phase 14 next commit).
2026-05-17 12:55:10 -04:00
..
public/asset feat(canary): import operator's React + Vite frontend template 2026-05-10 05:28:09 -04:00
src feat(canary): Zod schemas + canary envelope error normalization 2026-05-17 12:55:10 -04:00
.dockerignore feat(canary): import operator's React + Vite frontend template 2026-05-10 05:28:09 -04:00
.gitignore feat(canary): import operator's React + Vite frontend template 2026-05-10 05:28:09 -04:00
.stylelintignore fix(canary-phase1): clear all post-phase-1 audit observations + header normalization 2026-05-10 06:15:26 -04:00
biome.json feat(canary): import operator's React + Vite frontend template 2026-05-10 05:28:09 -04:00
index.html feat(canary): import operator's React + Vite frontend template 2026-05-10 05:28:09 -04:00
package.json feat(canary): import operator's React + Vite frontend template 2026-05-10 05:28:09 -04:00
pnpm-lock.yaml feat(canary): import operator's React + Vite frontend template 2026-05-10 05:28:09 -04:00
stylelint.config.js fix(canary-phase1): clear all post-phase-1 audit observations + header normalization 2026-05-10 06:15:26 -04:00
tsconfig.app.json feat(canary): import operator's React + Vite frontend template 2026-05-10 05:28:09 -04:00
tsconfig.json feat(canary): import operator's React + Vite frontend template 2026-05-10 05:28:09 -04:00
tsconfig.node.json feat(canary): import operator's React + Vite frontend template 2026-05-10 05:28:09 -04:00
vite.config.ts fix(canary-phase1): clear all post-phase-1 audit observations + header normalization 2026-05-10 06:15:26 -04:00