/** * Role Service */ import { HttpClient } from '@angular/common/http'; import { Observable } from 'rxjs'; export declare enum PermissionsEnum { VIEWUSERS = "viewUsers", VIEWTRANSACTIONS = "viewTransactions", VIEWSMARTLINKS = "viewSmartLinks", LISTSMARTLINKS = "listSmartLinks", VIEWBANK = "viewBank", CREATEALLUSERS = "createAllUsers", VOIDANDREFUND = "voidAndRefund", PROCESSORSCRUD = "processorsCrud", ACCESSUSERMASTER = "accessUserMaster", ACCESSUSERMAKER = "accessUserMaker", ACCESSUSERREADER = "accessUserReader", ACCESSADMIN = "accessAdmin", AGENTSNR = "agentSnr", COORDINATORSNR = "coordinatorSnr", REVIEWERMGUAYAQUIL = "reviewerMguayaquil", ADMINCONCILIATION = "adminConciliation" } export interface IKushkiMenu { title: string; icon: string; link: string; home: boolean; } export interface IKushkiRol { name: string; cognito_group: string; permissions: string[]; menu: IKushkiMenu[]; } export interface IKushkiMultiRol { name: string; rols: { [name: string]: Function | string[]; }; permissions: string[]; menu: IKushkiMenu[]; } export declare const MENU_BACKOFFICE_ADMIN: IKushkiMenu[]; export declare const MENU_BACKOFFICE_USER_MASTER: IKushkiMenu[]; export declare const MENU_BACKOFFICE_USER_MAKER: IKushkiMenu[]; export declare const MENU_BACKOFFICE_USER_READER: IKushkiMenu[]; export declare const MENU_WEBCHECKOUT_BASIC: IKushkiMenu[]; export declare const MENU_WEBCHECKOUT_MASTER: IKushkiMenu[]; export declare const MENU_BACKOFFICE_BANK: IKushkiMenu[]; export declare const MENU_SNR: IKushkiMenu[]; export declare const MENU_MGUAYAQUIL: IKushkiMenu[]; export declare const MENU_BACKOFFICE_RESELLER: IKushkiMenu[]; export declare const PERMISSIONS_BACKOFFICE_ADMIN: string[]; export declare const PERMISSIONS_BACKOFFICE_BANK: string[]; export declare const PERMISSIONS_BACKOFFICE_USER_MASTER: string[]; export declare const PERMISSIONS_BACKOFFICE_USERMAKER: string[]; export declare const PERMISSIONS_BACKOFFICE_USER_READER: string[]; export declare const PERMISSIONS_WEBCHECKOUT_BASIC: string[]; export declare const PERMISSIONS_WEBCHECKOUT_MASTER: string[]; export declare const PERMISSIONS_SNR_AGENT: string[]; export declare const PERMISSIONS_SNR_COORDINATOR: string[]; export declare const PERMISSIONS_MGUAYAQUIL_REVIEWER: string[]; export declare const PERMISSIONS_RESELLER: string[]; export declare const ROL_BACKOFFICE_ADMIN: IKushkiRol; export declare const ROLL_BACKOFICCE_USER_MASTER: IKushkiRol; export declare const ROL_BACKOFFICE_USER_MAKER: IKushkiRol; export declare const ROL_BACKOFFICE_USER_READER: IKushkiRol; export declare const ROL_WEBCHECKOUT_BASIC: IKushkiRol; export declare const ROL_WEBCHECKOUT_MASTER: IKushkiRol; export declare const ROL_SNR_AGENT: IKushkiRol; export declare const ROL_SNR_COORDINATOR: IKushkiRol; export declare const ROL_MGUAYAQUIL_REVIEWER: IKushkiRol; export declare const ROL_BACKOFFICE_BANK: IKushkiRol; export declare const SYSTEM_ROLES: IKushkiRol[]; export interface IPayload { ['cognito:username']?: string; name?: string; family_name?: string; email?: string; token?: string; ['cognito:groups']?: string[]; preferred_username?: string; zoneinfo?: string; } export interface MerchantForm { name: string; inProd?: boolean; merchantType?: string; country: string; state: string; province?: string; city: string; contactPerson: string; phoneNumber: string; address: string; address2?: string; socialReason: string; zipCode: string; email: string; businessOwnerIdType: '0' | '1' | '2' | '3'; businessOwnerIdNumber: string; specialContributor: 0 | 1; taxId: string; url: string; webhook?: { lastRetry?: string[]; failedRetry?: string[]; subscriptionDelete?: string[]; succesfullCharge?: string[]; singleChargeNotification?: string[]; }; frequency?: '1' | '2' | '3'; siftScience: { SandboxApiKey?: string; ProdApiKey?: string; SandboxAccountId?: string; ProdAccountId?: string; BaconProdApiKey?: string; BaconSandboxApiKey?: string; [k: string]: any; }; vtex: { X_VTEX_API_APPTOKEN?: string; X_VTEX_API_APPKEY?: string; [k: string]: any; }; smartLinks?: { webhookEnable: string; smartLinkEnable: string; url?: string; [k: string]: any; }; multiMerchant?: { fixAmount: number; variableAmount: number; iva: number; description: string; merchantId: string; [k: string]: any; }[]; transfer: { webhookEnable: string; transferEnable: string; url?: string; [k: string]: any; }; vPos?: { webhookEnable: string; vPosEnable: string; url?: string; [k: string]: any; }; cash?: { cashEnable: boolean; preAuthorizationUrl?: string; notificationUrls?: string[]; [k: string]: any; }; deferredOptions?: DeferredOptions[]; publicMerchantId?: string; acceptCreditCards?: string[]; fraud: number; privateMerchantId?: string; defaultProcessor?: { card?: string; transfer?: string; cash?: string; [k: string]: any; }; rules?: { card?: any[]; transfer?: any[]; [k: string]: any; }; businessBank?: string; businessBankAccountType?: '0' | '1'; businessBankAccountNumber?: string; saasFeeDate?: string; [k: string]: any; } interface DeferredOptions { deferredType: string[]; months: string[]; monthsOfGrace: string[]; bank: string[]; [k: string]: any; } /** * Implementation */ export declare class RoleService { private _http; kushkiRoles: IKushkiRol[]; payload: IPayload; private readonly _cognitoGroups; constructor(_http: HttpClient); hasPayload(): boolean; getEmail(): string; getTimeZone(): string; hasTimeZone(): boolean; hasSystemTimeZone(): boolean; isJWTExpired(): boolean; getUsername(): string; getCompleteUserName(): string; getJWTLeftTime(): number; getMerchant(envName: string): Observable; isAdmin(): boolean; checkRol(rol: string): boolean; getRoles(): string[]; getMerchantId(): string; getMenus(): IKushkiMenu[]; setTimeZone(country: string): void; setSystemTimeZone(country: string): void; private _getRolByArrayofNames; private _getExpiration; private _getRolByName; private _mergeMenuItems; private static _getZoneCountry; } export {};