export interface LicenseRecord {
  id: string;
  expiration: Date;
  number: number;
  revoked: boolean | null;
  recurringOrder: RecurringOrderRecord;
}

export interface LicenseBundleRecord {
  id: string;
  expiration: Date;
  number: number;
  claimed: number;
  revoked: boolean | null;
  tokens: string[];
  months: number;
}

export interface RecurringOrderRecord {
  id: number;
  license_id: string;
  entity: string;
  email: string;
  name: string;
  name_of_purchaser: string;
  country: string;
  state: string;
  postal: string;
  city: string;
  address: string;
  tax_number: string;
  product: string;
  package: string;
  target: string;
  number: number;
  method: string;
  recurring_number: string;
  recurring_until: number;
  currency: string;
}

export interface NanoSlotRecord {
  id: number;
  expiration: number;
  isEtalonSlot: boolean;
  lastActive: number;
  sessionId: string;
  occupiedSlot: boolean;
  detail: NanoSlotDetailsRecord;
}

export interface NanoSlotDetailsRecord {
  name: string;
  version: string;
  remoteConfig: RemoteConfigRecord;
}

export interface RemoteConfigRecord {
  deny_anonymous: boolean;
  drives: Array<DriveRecord>;
  indexed_languages: Array<string>;
  indexer_extract_size_limit: number;
  indexer_extract_text_limit: number;
  indexer_force_sync_on_startup: boolean;
  indexer_ignored_mimes: Array<string>;
  indexer_minimum_delay_between_path_sync: number;
  indexer_remove_lost_count: number;
  indexer_reserved_space: number;
  indexer_sync_interval: number;
  remote_files_restriction?: boolean;
  require_explicit_peer_trust?: boolean; // available in 1.0.2+, but only works in 1.1+
  name: string;
  room_blocks: any;
  server_process_number: number;
}

export interface DriveRecord {
  path: string;
  rooms: Array<string>;
  roomDetails: Array<DriveRoomRecord>;
}

export interface DriveRoomRecord {
  id: string;
  name: string | undefined | null;
  isValid: boolean;
  avatar: ArrayBuffer;
}

export interface SaleCodeRecord {
  id: string;
  description: Uint8Array;
  descriptionDecoded: SaleCodeDescriptionRecord;
}

export interface SaleCodeDescriptionRecord {
  text: string;
  valid: boolean;
}
