import { SecurityGroupId } from './privileges.interface'; export type ProductId = string; export type ProductLineId = string; export type ProductTier = 'basic' | 'standard' | 'pro'; export type RoleId = string; export interface ProductRole { id: RoleId; name: string; } export interface Product { id: ProductId; productLine: ProductLineId; name: string; description: string; color: string; sourceOrganization: string; rootElement: string; modules?: ProductModule[]; roles?: ProductRole[]; billing: Record; } export interface ProductModule { id: string; type: 'service' | 'feature'; name: string; description: string; lowestTier: ProductTier; billing: { id: string; }; securityGroups?: Record; } export type DefaultSecurityGroups = { system: string; members: string; }; export type ModuleSecurityGroup = { sgId: string; moduleId: string; }; export type RoleSecurityGroupsMap = Record; export type OrganizationState = 'uninitialized' | 'active' | 'inactive'; export interface ProductState { state: 'uninitialized' | 'active' | 'inactive'; subscriptionId?: string; billingId?: string; tier: ProductTier; landingPage?: string; } export interface PublicOrganizationProductsData { products: Record; state: OrganizationState; landingPage?: string; createdAt?: string; } export interface OrganizationProductDataResponse { state: OrganizationState; products?: { state: ProductState; id: ProductId; product: Product; }[]; createdAt?: string; } export interface CreatePortalResponse { id: string; token: string; access_url: string; redirect_url?: string; status: string; created_at: number; expires_at?: number; customer_id: string; login_at?: number; logout_at?: number; login_ipaddress?: string; logout_ipaddress?: string; linked_customers?: Array<{ customer_id: string; email?: string; has_billing_address: boolean; has_payment_method: boolean; has_active_subscription: boolean; }>; }