/** * Copyright 2022 Agendize All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at. * * Http://www.apache.org/licenses/LICENSE-2.0. * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ export declare enum ApiErrors { UNKOWN = 0, INTERNAL_ERROR = 1, NOT_AUTHORIZED = 2, INVALID_PARAMETER = 3, UNKNOWN_ENTITY = 4, INSUFFICIENT_RIGHT = 5, CREDENTIAL_ERROR = 100, USER_ACCOUNT_LOCKED = 101, PASSWORD_POLICY_ERROR = 102, STAFF_NOT_AVAILABLE = 1000, MAX_APPOINTMENT_DAILY = 1001, MAX_APPOINTMENT_WEEKLY = 1002, APPOINTMENT_PERIOD_RULE = 1003, RESOURCE_NOT_AVAILABLE = 1004, DATE_NOT_AVAILABLE = 1005, USER_BLOCKED = 1006, ACCOUNT_NOT_FOUND = 2000, ACCOUNT_DISABLED = 3003, CONFERENCE_SESSION_FULL = 4000 } export declare function getErrorCode(apiName: string, dto: ErrorDto): ApiErrors; export declare class ErrorDto { errorCode?: number; reason: string; code: number; message: string; } export declare class NotFoundError extends ErrorDto { constructor(context?: string); } export declare class CalendarError { errorCode: ApiErrors; e: any; constructor(errorCode: ApiErrors, e?: any); }