Description
Types like Invoice, ReputationScore, GovernanceProposal, and SupportedToken are defined separately in the SDK and must be duplicated or re-declared in the indexer and notifications service. A shared types package eliminates this duplication and ensures type consistency across the entire ecosystem.
Requirements and context
- Create
packages/types/src/ with shared domain types: Invoice, InvoiceState, ReputationScore, GovernanceProposal, ProposalAction, ContractStats, SupportedToken, TokenConfig, ILNEvent union type
- SDK, CLI, indexer, and notifications all import from
@invoice-liquidity/types
- Keep the types package dependency-free (no runtime dependencies)
- Write type-level tests using
tsd or expect-type
Suggested execution
git checkout -b feat/shared-types-package
- Create
packages/types/ package
- Extract types from SDK and indexer into the shared package
- Update all imports across the monorepo
Example commit message
feat: add shared types package for consistent domain types across monorepo
Description
Types like
Invoice,ReputationScore,GovernanceProposal, andSupportedTokenare defined separately in the SDK and must be duplicated or re-declared in the indexer and notifications service. A shared types package eliminates this duplication and ensures type consistency across the entire ecosystem.Requirements and context
packages/types/src/with shared domain types:Invoice,InvoiceState,ReputationScore,GovernanceProposal,ProposalAction,ContractStats,SupportedToken,TokenConfig,ILNEventunion type@invoice-liquidity/typestsdorexpect-typeSuggested execution
packages/types/packageExample commit message
feat: add shared types package for consistent domain types across monorepo