Skip to content

feat(credit-history): add credit credential domain types - #22

Merged
JosueBrenes merged 1 commit into
ACTA-Team:developfrom
Josue19-08:feat/credit-credential-types
Jun 18, 2026
Merged

JosueBrenes merged 1 commit into
ACTA-Team:developfrom
Josue19-08:feat/credit-credential-types

Conversation

@Josue19-08

@Josue19-08 Josue19-08 commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

🚀 ACTA Pull Request

Mark with an x all the checkboxes that apply (like [x])

⚠️ Required: Fill in the issue number below. This is how
platforms tracks your contribution and releases your reward.

Closes #6

  • Added tests (if necessary)
  • Run tests
  • Run formatting
  • Evidence attached
  • Commented the code

📌 Type of Change

  • Documentation (updates to README, docs, or comments)
  • Bug fix (non-breaking change which fixes an issue)
  • Enhancement (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

📝 Changes Description

This PR defines the domain model and TypeScript types for the "credit credential" in the credit-history product, unblocking the subsequent UI and mock issues.

Specifically, it adds:

  • CreditCategory: Union of credential categories with comments (INCOME, EMPLOYMENT, etc.).
  • CreditStatus: Explicit app-level status representing valid, revoked (with date), and invalid.
  • CreditCredential: The main app-level interface independent of the @acta-team/credentials SDK.
  • CreditProfileSummary: Interface for the summary view tracking totals and status counts.

Location Decision:
The types were intentionally placed in apps/credit-history/src/types/index.ts instead of @acta-products/types. This is because these types are strictly specific to the credit-history product, whereas @acta-products/types is intended to remain cross-product and free of product-specific domains.


📸 Evidence

VIDEO


🌌 Comments

Code compiles successfully with pnpm lint, pnpm typecheck, and pnpm build at the app level. No visible UI strings added, pure domain models.


Thank you for contributing to ACTA! We hope you can continue contributing to this project.

Summary by CodeRabbit

  • Chores
    • Added type definitions for credit history data modeling to support credit verification features.

- Define CreditCategory enum/union
- Define CreditStatus with valid, revoked (and revokedAt), and invalid app-level states
- Define CreditCredential interface independent from the SDK
- Define CreditProfileSummary interface
- Place domain types specifically inside apps/credit-history as they are not cross-product
@vercel

vercel Bot commented Jun 16, 2026

Copy link
Copy Markdown

@Josue19-08 is attempting to deploy a commit to the ACTA Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai

coderabbitai Bot commented Jun 16, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 11e52ef5-222a-4e29-a64a-c7a9d740de88

📥 Commits

Reviewing files that changed from the base of the PR and between 8a76eff and 93b227f.

📒 Files selected for processing (1)
  • apps/credit-history/src/types/index.ts

📝 Walkthrough

Walkthrough

A new barrel file apps/credit-history/src/types/index.ts is created with 40 lines, adding four exported TypeScript types: CreditCategory (union of five credential categories), CreditStatus (discriminated union of valid, revoked, and invalid app-level states), CreditCredential (core credential interface), and CreditProfileSummary (aggregated counts and totals interface).

Changes

Credit domain type definitions

Layer / File(s) Summary
Credit domain type declarations
apps/credit-history/src/types/index.ts
Adds CreditCategory (five-member string union), CreditStatus (discriminated union with optional revokedAt on the revoked variant), CreditCredential (core credential shape with id, category, issuerName, issuerDid, issuedAt, status, and loosely typed claims), and CreditProfileSummary (per-category totals, valid/revoked/invalid counts, and oldestIssuedAt). No external SDK dependencies are introduced.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

Poem

🐇 A barrel of types, fresh and new,
CreditCategory — five paths to construe,
valid, revoked, invalid in a row,
The credential shape all set to glow,
No SDK chains, just pure domain dew! ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'feat(credit-history): add credit credential domain types' accurately and concisely summarizes the main change: introducing new TypeScript domain types for credit credentials.
Linked Issues check ✅ Passed The pull request fully implements all technical objectives from issue #6: CreditCategory union, CreditStatus with three states, CreditCredential interface, CreditProfileSummary interface, all properly placed in product-specific directory.
Out of Scope Changes check ✅ Passed All changes are directly aligned with issue #6 requirements; the file only adds the four required type definitions with no unrelated modifications or scope creep.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@JosueBrenes
JosueBrenes merged commit 78d33ee into ACTA-Team:develop Jun 18, 2026
2 of 3 checks passed
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.

Domain model and types for "credit credential"

2 participants