"""Type Definitions.""" import datetime from dataclasses import dataclass from typing import NotRequired, TypedDict from account.constants.features import FEATURES @dataclass class ProfileInfo: """A minimal representation of a Profile.""" profile_type: str profile_id: int roles: list[str] uuid: str class Application(TypedDict): """Application type.""" application_id: str group_id: str class ApplicationRole(TypedDict): """Application role type.""" is_default: bool role_id: str application_id: str class CompanyBrand(TypedDict): id: int name: str class Feature(TypedDict): """Feature Type.""" feature_id: int feature_name: str class Subaccount(TypedDict): """Subaccount type.""" subaccount_id: int uuid: str class DeletedSubaccount(TypedDict): """Result of a subaccount soft-delete.""" subaccount_uuid: str date_deleted: datetime.datetime | None class UpdatedVendor(TypedDict): """Result of a vendor update.""" vendor_id: int vendor_uuid: str class UpdatedVendorClosers(TypedDict): """Result of a vendor closers update.""" vendor_id: int vendor_uuid: str closers: list[int] class DeletedVendor(TypedDict): """Result of a vendor soft-delete. status is 'deletion' when this call performed the soft-delete, or None when the vendor was already deleted or not found. """ vendor_id: int | None vendor_uuid: str status: str | None last_modified_by: int class TenantApplication(TypedDict): """Tenant application type.""" application_id: str roles: list[str] url: str class Vendor(TypedDict): vendor_id: int uuid: str migrated_to_abacus: bool owner: NotRequired[str] # Required when looking up the applications for a vendor class VendorAttributes(TypedDict): vendor_id: int uuid: str migrated_to_abacus: bool company_brand: CompanyBrand features: list[FEATURES] owner: NotRequired[str] # Required when looking up the applications for a vendor class SubaccountAttributes(TypedDict): """Subaccount attributes type.""" subaccount_id: int uuid: str vendor_attributes: VendorAttributes class CollaboratorAttributes(TypedDict): """Collaborator attributes type.""" collaborator_id: int uuid: str vendor_attributes: VendorAttributes dp_enabled_date: str class MasterContact(TypedDict): """Master contact type.""" vend_contact_id: int vendor_id: int subaccount_id: int active: str master: str auth0_user_id: str identity_id: str