@logcomex/aylawc-core
Version:
An experimental library of web components
96 lines (95 loc) • 2.58 kB
TypeScript
import type { STRING_IN_JSON, TranslationObject, URL, URLLanguageObject } from '../@shared/interfaces/value-objects.interface';
export interface LogcomexSessionUser {
allowWhatsappNotification: boolean;
avatar: string;
createdAt: string;
email: string;
hasToUpdateProfile: false;
id: number;
isLogcomexUser: boolean;
language: string;
name: string;
permissions: Array<{
id: number;
name: string;
slug: SLUG;
description: string;
dependency: any | null;
data: any | null;
}>;
phone: string;
userDepartment: number;
userRole: number;
}
interface LogcomexSessionCustomer {
id: number;
isBlocked: boolean;
blockedStatus: {
code: number;
name: string;
};
columnRestrictions: any[];
/**
* customerIsFake - Essa prorpriedade faz referêncai se a empresa é marcada
* como uma empresa de testes no CS.
*/
customerIsFake: boolean;
customerOrigin: null;
customization: {
customHexColor: null | string;
customLogo: null | URL;
customName: null | string;
};
firstPlanAt: string;
isOnboard: boolean;
name: string;
type: number;
typeTranslations: STRING_IN_JSON;
}
export interface ContractedProductModal {
id: number;
serviceId: 6;
planSubmoduleId: null | string;
hasCertificate: boolean;
slug: SLUG;
isActive: boolean;
hasContracted: boolean;
wasContracted: boolean;
name: TranslationObject;
description: null | TranslationObject;
planName: string;
landingPageUrl: URLLanguageObject;
datasetId: null | string;
show: boolean;
icon: string;
status: 'DATASET_CONTRACTED';
statusLabel: null;
productOrigin: string;
targetUrl: URL;
}
export interface ContractedProduct {
id: number;
slug: SLUG;
name: TranslationObject;
description: TranslationObject;
icon: URL;
status: 'PRODUCT_ACTIVE';
statusLabel: null;
activeTargetUrl: URL;
landingPageUrl: URLLanguageObject;
modals: Record<string, ContractedProductModal>;
selectedModal: Record<string, ContractedProductModal>;
order: number;
}
export interface LogcomexSession {
user: LogcomexSessionUser;
customer: LogcomexSessionCustomer;
groupedProducts: {
contracted: ContractedProduct[];
};
}
export type SystemEnvironment = 'homol' | 'production';
type SLUG = string;
export type ExtLink = Record<SLUG, URL>;
export type ExtLinkCollection = Record<SystemEnvironment, ExtLink>;
export {};