Files
accounted/lib/company-lookup/types.ts
T
Mattsson bf5a8d9195 Fix/multiple company (#203)
* Refactor onboarding and dashboard logic; add silent team creation for users

- Removed unnecessary useCompany context in DashboardContent and SettingsSidebar components.
- Simplified onboarding setup logic to allow direct access to the dashboard for users without companies.
- Introduced WelcomeOnboarding component to handle user onboarding steps.
- Added migration to create silent teams for all users at signup, backfilling existing users without teams, and cleaning up incomplete companies.

* fix: update greeting logic and improve email handling in TIC extension

* Redirect to onboarding for users without companies and update onboarding flow

* Build issue fix

* Enhance onboarding experience by adding existing companies check
2026-04-09 11:54:12 +02:00

34 lines
1.1 KiB
TypeScript

/**
* A person's role/position in a Swedish company, from BankID enrichment.
* Defined in core so onboarding components can import it without
* violating the CI constraint (no core → @/extensions/ imports).
*/
export interface EnrichmentCompanyRole {
companyId: number
companyRegistrationNumber: string
legalName: string
legalEntityType: string
positionTypes: string[]
positionDescriptions: string[]
positionStart: string
positionEnd: string | null
companyStatus: string
signatureDescription?: string
}
/**
* Generic company lookup result — provider-agnostic.
* Defined in core so onboarding components can import it without
* violating the CI constraint (no core → @/extensions/ imports).
*/
export interface CompanyLookupResult {
companyName: string
isCeased: boolean
address: { street: string | null; postalCode: string | null; city: string | null } | null
registration: { fTax: boolean; vat: boolean }
bankAccounts: { type: string; accountNumber: string; bic: string | null }[]
email: string | null
phone: string | null
sniCodes: { code: string; name: string }[]
}