Skip to content

fix: TS types for getSessionById#11

Open
famouswizard wants to merge 1 commit intoholonym-foundation:mainfrom
famouswizard:patch-1
Open

fix: TS types for getSessionById#11
famouswizard wants to merge 1 commit intoholonym-foundation:mainfrom
famouswizard:patch-1

Conversation

@famouswizard
Copy link
Copy Markdown

tightened up the types so TS stops complaining:

  • objectId is now ObjectId instead of null
  • added explicit return type for getSessionById

now TS knows we either get an error or a session with its ID.

calebtuttle added a commit that referenced this pull request Apr 30, 2026
- v3 returns 400 (was 404) for not-yet-IN_PROGRESS sessions, matching
  Onfido v3 — frontend retry policy treats 4xx alike (#7).
- v3 saveUserToDb gated by environment === 'live', matching Onfido sandbox
  semantics (#10).
- routes/idenfy.ts: explicit comment block listing the legacy endpoints
  removed in U0 so future readers see the deprecation paper trail (#11).
- IdenfyVerificationData.finishTime/creationTime added to type; drop
  'as any' casts in extractCreds (#12).
- Extract IDENFY_BASE_URL/getIdenfyCredentials/idenfyBasicAuthHeader to a
  shared services/idenfy/http.ts module; token.ts and data.ts both consume
  it (#14).
- console.log -> pino logger.error in saveCollisionMetadata and
  updateSessionStatus (#15).
- Drop noisy 'U0 audit:' inline comments in schemas.ts; collapse to one
  short comment explaining the legacy provider-history block (#16).
calebtuttle added a commit that referenced this pull request May 1, 2026
- v3 returns 400 (was 404) for not-yet-IN_PROGRESS sessions, matching
  Onfido v3 — frontend retry policy treats 4xx alike (#7).
- v3 saveUserToDb gated by environment === 'live', matching Onfido sandbox
  semantics (#10).
- routes/idenfy.ts: explicit comment block listing the legacy endpoints
  removed in U0 so future readers see the deprecation paper trail (#11).
- IdenfyVerificationData.finishTime/creationTime added to type; drop
  'as any' casts in extractCreds (#12).
- Extract IDENFY_BASE_URL/getIdenfyCredentials/idenfyBasicAuthHeader to a
  shared services/idenfy/http.ts module; token.ts and data.ts both consume
  it (#14).
- console.log -> pino logger.error in saveCollisionMetadata and
  updateSessionStatus (#15).
- Drop noisy 'U0 audit:' inline comments in schemas.ts; collapse to one
  short comment explaining the legacy provider-history block (#16).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant