bizmatch-project/bizmatch-server/dist/models/main.model.d.ts

127 lines
2.8 KiB
TypeScript

export interface KeyValue {
name: string;
value: string;
}
export interface KeyValueStyle {
name: string;
value: string;
icon: string;
bgColorClass: string;
textColorClass: string;
}
export type SelectOption<T = number> = {
value: T;
label: string;
};
export interface Listing {
id: string;
userId: string;
title: string;
description: Array<string>;
location: string;
favoritesForUser: Array<string>;
hideImage?: boolean;
created: Date;
updated: Date;
}
export interface BusinessListing extends Listing {
listingsCategory: 'business';
summary: Array<string>;
type: string;
price?: number;
realEstateIncluded?: boolean;
salesRevenue?: number;
cashFlow?: number;
netProfit?: number;
inventory?: string;
employees?: number;
established?: number;
reasonForSale?: string;
brokerLicencing?: string;
internals?: string;
}
export interface ProfessionalsBrokersListing extends Listing {
listingsCategory: 'professionals_brokers';
summary: string;
address?: string;
email?: string;
website?: string;
category?: 'Professionals' | 'Broker';
}
export interface InvestmentsListing extends Listing {
listingsCategory: 'investment';
email?: string;
website?: string;
phoneNumber?: string;
}
export type ListingType = BusinessListing | ProfessionalsBrokersListing | InvestmentsListing;
export interface ListingCriteria {
type: string;
location: string;
minPrice: string;
maxPrice: string;
realEstateChecked: boolean;
listingsCategory: 'business' | 'professionals_brokers' | 'investment';
category: 'professional|broker';
}
export interface User {
id: string;
username: string;
firstname: string;
lastname: string;
email: string;
}
export interface Subscription {
id: string;
userId: string;
level: string;
start: Date;
modified: Date;
end: Date;
status: string;
invoices: Array<Invoice>;
}
export interface Invoice {
id: string;
date: Date;
price: number;
}
export interface JwtToken {
exp: number;
iat: number;
auth_time: number;
jti: string;
iss: string;
aud: string;
sub: string;
typ: string;
azp: string;
nonce: string;
session_state: string;
acr: string;
realm_access: Realmaccess;
resource_access: Resourceaccess;
scope: string;
sid: string;
email_verified: boolean;
name: string;
preferred_username: string;
given_name: string;
family_name: string;
email: string;
user_id: string;
}
interface Resourceaccess {
account: Realmaccess;
}
interface Realmaccess {
roles: string[];
}
export interface PageEvent {
first: number;
rows: number;
page: number;
pageCount: number;
}
export {};