@sarafapp/iron_core 1.0.63 → 1.0.66

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (157) hide show
  1. package/dist/IronCore.js +15 -5
  2. package/dist/core/index.d.ts +31 -0
  3. package/dist/core/vite.config.d.ts +2 -0
  4. package/dist/example-vue/vite.config.d.ts +2 -0
  5. package/dist/index.d.ts +2 -31
  6. package/index.ts +37 -0
  7. package/package.json +2 -5
  8. package/dist/src/BaseModel.d.ts +0 -45
  9. package/dist/src/Utils.d.ts +0 -4
  10. package/dist/src/accessHandling/AccessControl.d.ts +0 -10
  11. package/dist/src/accessHandling/AccessLevel.d.ts +0 -13
  12. package/dist/src/accessHandling/Accessible.d.ts +0 -3
  13. package/dist/src/accessHandling/EveryDirectiveAccess.d.ts +0 -4
  14. package/dist/src/accessHandling/SSO/AuthorizationDirective.d.ts +0 -17
  15. package/dist/src/accessHandling/SSO/AuthorizationService.d.ts +0 -17
  16. package/dist/src/accessHandling/SSO/EveryLevelAuthorizationDirective.d.ts +0 -4
  17. package/dist/src/accessHandling/SSO/SomeLevelsAuthorizationDirective.d.ts +0 -4
  18. package/dist/src/accessHandling/SomeDirectiveAccess.d.ts +0 -4
  19. package/dist/src/accessHandling/index.d.ts +0 -9
  20. package/dist/src/baseDirective/BeforeMountDirective.d.ts +0 -3
  21. package/dist/src/baseDirective/BeforeUnMountDirective.d.ts +0 -3
  22. package/dist/src/baseDirective/BeforeUpdateDirective.d.ts +0 -3
  23. package/dist/src/baseDirective/CreatedDirective.d.ts +0 -3
  24. package/dist/src/baseDirective/MountedDirective.d.ts +0 -3
  25. package/dist/src/baseDirective/UnMountedDirective.d.ts +0 -3
  26. package/dist/src/baseDirective/UpdateDirective.d.ts +0 -3
  27. package/dist/src/baseDirective/index.d.ts +0 -7
  28. package/dist/src/baseForm/BaseRequestBodyFilter.d.ts +0 -4
  29. package/dist/src/baseForm/FormManager.d.ts +0 -18
  30. package/dist/src/baseForm/InputControl.d.ts +0 -40
  31. package/dist/src/baseForm/InputControlBuilder.d.ts +0 -16
  32. package/dist/src/baseForm/InputControlData.d.ts +0 -15
  33. package/dist/src/baseForm/RequestBodyFilter.d.ts +0 -3
  34. package/dist/src/baseForm/TouchSensitiveForm.d.ts +0 -9
  35. package/dist/src/baseForm/UseForm.d.ts +0 -5
  36. package/dist/src/baseForm/index.d.ts +0 -8
  37. package/dist/src/baseSchedule/Schedule.d.ts +0 -3
  38. package/dist/src/baseSchedule/Scheduler.d.ts +0 -8
  39. package/dist/src/baseSchedule/index.d.ts +0 -2
  40. package/dist/src/baseTable/BaseTable.d.ts +0 -46
  41. package/dist/src/baseTable/Constants.d.ts +0 -12
  42. package/dist/src/baseTable/OnDestory.d.ts +0 -3
  43. package/dist/src/baseTable/RowActionSource.d.ts +0 -4
  44. package/dist/src/baseTable/RowClick.d.ts +0 -3
  45. package/dist/src/baseTable/RowDoubleClick.d.ts +0 -3
  46. package/dist/src/baseTable/RowMetaClick.d.ts +0 -3
  47. package/dist/src/baseTable/SelectableTable.d.ts +0 -19
  48. package/dist/src/baseTable/TableAction.d.ts +0 -8
  49. package/dist/src/baseTable/TableHeaderSchema.d.ts +0 -27
  50. package/dist/src/baseTable/TableLoader.d.ts +0 -3
  51. package/dist/src/baseTable/TablePaginate.d.ts +0 -3
  52. package/dist/src/baseTable/TableService.d.ts +0 -9
  53. package/dist/src/baseTable/TableSort.d.ts +0 -4
  54. package/dist/src/baseTable/TableSummarySchema.d.ts +0 -9
  55. package/dist/src/baseTable/generator/SelectableTableGenerator.d.ts +0 -14
  56. package/dist/src/baseTable/generator/TableCellComponentRegistry.d.ts +0 -7
  57. package/dist/src/baseTable/generator/TableConfig.d.ts +0 -7
  58. package/dist/src/baseTable/generator/TableGenerator.d.ts +0 -37
  59. package/dist/src/baseTable/generator/TableSource.d.ts +0 -24
  60. package/dist/src/baseTable/index.d.ts +0 -23
  61. package/dist/src/baseTable/moduleConnection/Action.d.ts +0 -3
  62. package/dist/src/baseTable/moduleConnection/Column.d.ts +0 -3
  63. package/dist/src/baseTable/moduleConnection/Table.d.ts +0 -4
  64. package/dist/src/baseTable/moduleConnection/TableDestroy.d.ts +0 -2
  65. package/dist/src/baseTable/moduleConnection/TableRowClick.d.ts +0 -2
  66. package/dist/src/baseTable/moduleConnection/generator/GColumn.d.ts +0 -2
  67. package/dist/src/baseTable/moduleConnection/generator/GTable.d.ts +0 -2
  68. package/dist/src/composables/UseCrud.d.ts +0 -10
  69. package/dist/src/composables/UseData.d.ts +0 -14
  70. package/dist/src/composables/UseLoadingStatus.d.ts +0 -15
  71. package/dist/src/composables/UseParams.d.ts +0 -15
  72. package/dist/src/composables/UseRepository.d.ts +0 -63
  73. package/dist/src/composables/UseState.d.ts +0 -2
  74. package/dist/src/composables/UseStaticTableService.d.ts +0 -4
  75. package/dist/src/composables/index.d.ts +0 -7
  76. package/dist/src/constants/Constants.d.ts +0 -108
  77. package/dist/src/constants/index.d.ts +0 -1
  78. package/dist/src/crudService/CrudService.d.ts +0 -22
  79. package/dist/src/crudService/index.d.ts +0 -1
  80. package/dist/src/dateHandling/Constants.d.ts +0 -5
  81. package/dist/src/dateHandling/Converter.d.ts +0 -5
  82. package/dist/src/dateHandling/JalaliDateSetup.d.ts +0 -1
  83. package/dist/src/dateHandling/Model.d.ts +0 -12
  84. package/dist/src/dateHandling/Utils.d.ts +0 -8
  85. package/dist/src/dateHandling/index.d.ts +0 -5
  86. package/dist/src/debounce/DebounceAction.d.ts +0 -4
  87. package/dist/src/debounce/DebounceService.d.ts +0 -9
  88. package/dist/src/debounce/index.d.ts +0 -2
  89. package/dist/src/deviceManagement/Constants.d.ts +0 -4
  90. package/dist/src/deviceManagement/Visibility.d.ts +0 -4
  91. package/dist/src/deviceManagement/VisibilityManager.d.ts +0 -6
  92. package/dist/src/deviceManagement/index.d.ts +0 -3
  93. package/dist/src/errorHandling/ErrorHandler.d.ts +0 -3
  94. package/dist/src/errorHandling/HandleError.d.ts +0 -2
  95. package/dist/src/errorHandling/index.d.ts +0 -2
  96. package/dist/src/eventSystem/CustomEventDispatcher.d.ts +0 -5
  97. package/dist/src/eventSystem/Model.d.ts +0 -8
  98. package/dist/src/eventSystem/OnEvent.d.ts +0 -1
  99. package/dist/src/eventSystem/index.d.ts +0 -3
  100. package/dist/src/feedbackHandling/FailureFeedback.d.ts +0 -3
  101. package/dist/src/feedbackHandling/Feedback.d.ts +0 -11
  102. package/dist/src/feedbackHandling/HandleFeedback.d.ts +0 -2
  103. package/dist/src/feedbackHandling/InfoFeedback.d.ts +0 -3
  104. package/dist/src/feedbackHandling/SuccessFeedback.d.ts +0 -3
  105. package/dist/src/feedbackHandling/WarningFeedback.d.ts +0 -3
  106. package/dist/src/feedbackHandling/index.d.ts +0 -6
  107. package/dist/src/httpClient/ApiBuilder.d.ts +0 -14
  108. package/dist/src/httpClient/ErrorHandlerRegistry.d.ts +0 -10
  109. package/dist/src/httpClient/HttpClient.d.ts +0 -14
  110. package/dist/src/httpClient/Interceptor.d.ts +0 -4
  111. package/dist/src/httpClient/index.d.ts +0 -4
  112. package/dist/src/initializer/ApplicationInitializer.d.ts +0 -6
  113. package/dist/src/initializer/Initializer.d.ts +0 -3
  114. package/dist/src/initializer/index.d.ts +0 -2
  115. package/dist/src/json/JsonMapper.d.ts +0 -18
  116. package/dist/src/json/index.d.ts +0 -1
  117. package/dist/src/layout/Constants.d.ts +0 -10
  118. package/dist/src/layout/DialogService.d.ts +0 -1
  119. package/dist/src/layout/DrawerService.d.ts +0 -1
  120. package/dist/src/layout/Toast.d.ts +0 -8
  121. package/dist/src/layout/index.d.ts +0 -4
  122. package/dist/src/lib/Constants.d.ts +0 -20
  123. package/dist/src/lib/Formatter.d.ts +0 -10
  124. package/dist/src/lib/Util.d.ts +0 -11
  125. package/dist/src/lib/index.d.ts +0 -3
  126. package/dist/src/observables/AbstractSubject.d.ts +0 -7
  127. package/dist/src/observables/BehaviorSubject.d.ts +0 -16
  128. package/dist/src/observables/Observer.d.ts +0 -3
  129. package/dist/src/observables/Subject.d.ts +0 -6
  130. package/dist/src/observables/index.d.ts +0 -4
  131. package/dist/src/process/Proccess.d.ts +0 -9
  132. package/dist/src/process/ProcessManager.d.ts +0 -10
  133. package/dist/src/process/index.d.ts +0 -2
  134. package/dist/src/repository/Params.d.ts +0 -11
  135. package/dist/src/repository/Repository.d.ts +0 -38
  136. package/dist/src/repository/SyncDetail.d.ts +0 -5
  137. package/dist/src/repository/index.d.ts +0 -4
  138. package/dist/src/repository/model.d.ts +0 -5
  139. package/dist/src/routeGuard/RouteGuard.d.ts +0 -7
  140. package/dist/src/routeGuard/index.d.ts +0 -1
  141. package/dist/src/search/client/ClientArraySearch.d.ts +0 -4
  142. package/dist/src/search/client/ClientSearch.d.ts +0 -3
  143. package/dist/src/search/index.d.ts +0 -2
  144. package/dist/src/sort/SortDetail.d.ts +0 -6
  145. package/dist/src/sort/client/Sorter.d.ts +0 -6
  146. package/dist/src/sort/index.d.ts +0 -4
  147. package/dist/src/sort/strategies/SimpleSort.d.ts +0 -5
  148. package/dist/src/sort/strategies/SortStrategy.d.ts +0 -4
  149. package/dist/src/types/Global.d.ts +0 -1
  150. package/dist/src/types/index.d.ts +0 -1
  151. package/dist/src/validators/Validator.d.ts +0 -4
  152. package/dist/src/validators/index.d.ts +0 -1
  153. package/dist/src/webSocket/Constants.d.ts +0 -6
  154. package/dist/src/webSocket/Model.d.ts +0 -6
  155. package/dist/src/webSocket/WebSocketService.d.ts +0 -30
  156. package/dist/src/webSocket/index.d.ts +0 -3
  157. package/dist/vite.config.d.ts +0 -2
@@ -1,5 +0,0 @@
1
- import { WebSocketEvent } from './Model';
2
- export declare class CustomEventDispatcher {
3
- dispatchOnWindow(eventName: string): void;
4
- dispatchWebSocketOnWindow(webSocketEvent: WebSocketEvent<unknown>): void;
5
- }
@@ -1,8 +0,0 @@
1
- export declare class WebSocketEvent<T> extends Event {
2
- private readonly messageEvent;
3
- private readonly data;
4
- constructor(messageEvent: MessageEvent);
5
- getMessageEvent(): MessageEvent<any>;
6
- getResult(): T;
7
- private static ParseData;
8
- }
@@ -1 +0,0 @@
1
- export declare function OnEvent(eventsToSubscribe: string[], unSubscribeAfterRun?: boolean): (_target: any, _propertyKey: string, descriptor: PropertyDescriptor) => void;
@@ -1,3 +0,0 @@
1
- export { CustomEventDispatcher } from './CustomEventDispatcher';
2
- export { WebSocketEvent } from './Model';
3
- export { OnEvent } from './OnEvent';
@@ -1,3 +0,0 @@
1
- export interface FailureFeedback<ErrorModel> {
2
- handleFailure(error: ErrorModel): Promise<void>;
3
- }
@@ -1,11 +0,0 @@
1
- export declare abstract class Feedback<Model, ErrorModel extends Error = Error> {
2
- protected successMessageResolver: (model: Model) => string;
3
- protected failureMessageResolver: (error: ErrorModel) => string;
4
- shouldResolveSuccess: (model: Model) => boolean;
5
- shouldResolveFailure: (error: ErrorModel) => boolean;
6
- constructor(successMessageResolver: (model: Model) => string, failureMessageResolver: (error: ErrorModel) => string, shouldResolveSuccess?: (model: Model) => boolean, shouldResolveFailure?: (error: ErrorModel) => boolean);
7
- handleSuccess(entity: Model): Promise<void>;
8
- handleFailure(error: ErrorModel): Promise<void>;
9
- handleInfo(): Promise<void>;
10
- handleWarning(): Promise<void>;
11
- }
@@ -1,2 +0,0 @@
1
- import { Feedback } from './Feedback';
2
- export declare function HandleFeedback<Model>(feedbacks: Feedback<Model>[]): (_name: unknown, _target: unknown, descriptor: PropertyDescriptor) => void;
@@ -1,3 +0,0 @@
1
- export interface InfoFeedback {
2
- handleInfo(): Promise<void>;
3
- }
@@ -1,3 +0,0 @@
1
- export interface SuccessFeedback<Model> {
2
- handleSuccess(model: Model): Promise<void>;
3
- }
@@ -1,3 +0,0 @@
1
- export interface WarningFeedback {
2
- handleWarning(): Promise<void>;
3
- }
@@ -1,6 +0,0 @@
1
- export { HandleFeedback } from './HandleFeedback';
2
- export { Feedback } from './Feedback';
3
- export type { FailureFeedback } from './FailureFeedback';
4
- export type { InfoFeedback } from './InfoFeedback';
5
- export type { SuccessFeedback } from './SuccessFeedback';
6
- export type { WarningFeedback } from './WarningFeedback';
@@ -1,14 +0,0 @@
1
- import { Axios } from 'axios';
2
- import { Interceptor } from './Interceptor';
3
- import { APIErrorHandlerRegistry } from './ErrorHandlerRegistry';
4
- export declare class ApiBuilder {
5
- private axiosInstance;
6
- constructor(axiosInstance: Axios);
7
- setBaseURL(baseURL: string): this;
8
- setTimeout(timeInMilliSeconds: number): this;
9
- setHeaders(headers: Record<string, string | string[]>): this;
10
- attachRequestInterceptors(interceptors: Interceptor[]): this;
11
- attachResponseInterceptors(apiErrorRegistry: APIErrorHandlerRegistry): this;
12
- build(): Axios;
13
- }
14
- export default ApiBuilder;
@@ -1,10 +0,0 @@
1
- import { AxiosError } from 'axios';
2
- import { ErrorHandler } from '../errorHandling';
3
- export declare class APIErrorHandlerRegistry {
4
- private static handlers;
5
- private static instance;
6
- private constructor();
7
- static GetInstance(): Nullable<APIErrorHandlerRegistry>;
8
- static registerHandler(statusCode: number, handler: ErrorHandler): void;
9
- handle(error: AxiosError): void;
10
- }
@@ -1,14 +0,0 @@
1
- import { Axios, AxiosHeaders, AxiosResponse, InternalAxiosRequestConfig } from 'axios';
2
- type axiosConfig = {
3
- headers?: AxiosHeaders;
4
- } & Omit<InternalAxiosRequestConfig, "headers">;
5
- export declare class HttpClient {
6
- private axiosInstance;
7
- constructor(instance: Axios);
8
- get<T>(url: string, config?: axiosConfig): Promise<AxiosResponse<T>>;
9
- post<T>(url: string, data?: unknown, config?: axiosConfig): Promise<AxiosResponse<T>>;
10
- patch<T>(url: string, data?: unknown, config?: axiosConfig): Promise<AxiosResponse<T>>;
11
- put<T>(url: string, data?: unknown, config?: axiosConfig): Promise<AxiosResponse<T>>;
12
- delete<T>(url: string, config?: axiosConfig): Promise<AxiosResponse<T>>;
13
- }
14
- export default HttpClient;
@@ -1,4 +0,0 @@
1
- import { InternalAxiosRequestConfig } from 'axios';
2
- export interface Interceptor {
3
- intercept(config: InternalAxiosRequestConfig): InternalAxiosRequestConfig;
4
- }
@@ -1,4 +0,0 @@
1
- export { APIErrorHandlerRegistry } from './ErrorHandlerRegistry';
2
- export { ApiBuilder } from './ApiBuilder';
3
- export { HttpClient } from './HttpClient';
4
- export { type Interceptor } from './Interceptor';
@@ -1,6 +0,0 @@
1
- import { Initializer } from './Initializer';
2
- export declare class ApplicationInitializer {
3
- private _initializer;
4
- setupInitializers(initializers: Initializer[]): void;
5
- initialize(): void;
6
- }
@@ -1,3 +0,0 @@
1
- export interface Initializer {
2
- initialize(): void;
3
- }
@@ -1,2 +0,0 @@
1
- export { ApplicationInitializer } from './ApplicationInitializer';
2
- export { type Initializer } from './Initializer';
@@ -1,18 +0,0 @@
1
- export declare class JsonMapper {
2
- private static Instance;
3
- private jsonConverter;
4
- private constructor();
5
- serializeObject<T extends object>(object: object, model: {
6
- new (): T;
7
- }): T;
8
- deserializeObject<T extends object>(object: object, model: {
9
- new (): T;
10
- }): T;
11
- deserializeArray<T extends object>(array: Array<T>, model: {
12
- new (): T[];
13
- }): Array<T>;
14
- tryDeserialize(object: object, models: {
15
- new (): any;
16
- }[]): any;
17
- static GetInstance(): Nullable<JsonMapper>;
18
- }
@@ -1 +0,0 @@
1
- export { JsonMapper } from './JsonMapper';
@@ -1,10 +0,0 @@
1
- export declare const enum ToastType {
2
- Success = "success",
3
- Failure = "error",
4
- Info = "info",
5
- Warning = "warning"
6
- }
7
- export declare const enum ToastLocation {
8
- BottomLeft = "bottomLeft",
9
- TopLeft = "topLeft"
10
- }
@@ -1 +0,0 @@
1
- export declare const useDialogService: any;
@@ -1 +0,0 @@
1
- export declare const useDrawerService: any;
@@ -1,8 +0,0 @@
1
- import { ToastLocation, ToastType } from './Constants';
2
- export declare class ToastMessage {
3
- type: ToastType;
4
- message: string;
5
- description: string;
6
- placement: ToastLocation;
7
- constructor(type: ToastType, message: string, description: string);
8
- }
@@ -1,4 +0,0 @@
1
- export { ToastLocation, ToastType } from './Constants';
2
- export { ToastMessage } from './Toast';
3
- export { useDialogService } from './DialogService';
4
- export { useDrawerService } from './DrawerService';
@@ -1,20 +0,0 @@
1
- export declare const enum CommonMaskFormats {
2
- BankCard = "####-####-####-####",
3
- Iban = "##-####-####-####-####-####-##"
4
- }
5
- export declare const enum DateFormat {
6
- FullDate = "YYYY/M/D HH:mm",
7
- SimpleDate = "YYYY/M/D",
8
- CompactGregorianDate = "YYYYMMDD",
9
- ShortJalaliDate = "YYMM",
10
- JustHour = "HH:mm:ss"
11
- }
12
- interface Bank {
13
- [identifier: string | number]: {
14
- persian: string;
15
- english: string;
16
- };
17
- }
18
- export declare const cards: Array<Bank>;
19
- export declare const ibans: Array<Bank>;
20
- export {};
@@ -1,10 +0,0 @@
1
- import { DateFormat } from './Constants';
2
- export declare class Formatter {
3
- static toCurrency(amount: number, options: unknown): string;
4
- static toCurrencyWithDotSeparator(amount: number): string;
5
- static applyMask(format: string, value: string): string;
6
- static applyBankCardMask(value: number | string): string;
7
- static applyIbanMask(value: number | string): string;
8
- static toEnglishDigits(value: string): string;
9
- static mapUnixToDate(unixValue: number, format: DateFormat): any;
10
- }
@@ -1,11 +0,0 @@
1
- import { AxiosResponse } from 'axios';
2
- export declare class Util {
3
- static getBankImageBaseOnCardInfo(account_number: string | undefined, type: "IBAN" | "CARD"): string;
4
- private static card;
5
- private static iban;
6
- static copyValueToClipboard(value: string | number): Promise<void>;
7
- static downloadBlob(response: AxiosResponse<Blob>, fileName?: string): void;
8
- private static extractFileNameFromHeader;
9
- static removeSpacesFromString(value: string): string;
10
- static isArraySorted<T>(items: T[], itemResolver?: (item: T) => T, order?: any): boolean;
11
- }
@@ -1,3 +0,0 @@
1
- export * from './Constants';
2
- export * from './Formatter';
3
- export * from './Util';
@@ -1,7 +0,0 @@
1
- import { Observer } from './Observer';
2
- export declare abstract class AbstractSubject {
3
- private observers;
4
- attach(observer: Observer<AbstractSubject>): void;
5
- detach(observer: Observer<AbstractSubject>): void;
6
- protected notify(): void;
7
- }
@@ -1,16 +0,0 @@
1
- import { Subject } from './Subject';
2
- import { Observer } from './Observer';
3
- export type ObserverCallback<T> = (value: T) => void;
4
- type ObserverUpdaterCallback<T> = (value: T) => T;
5
- export declare class BehaviorSubject<T> implements Subject<T> {
6
- private _value;
7
- private observers;
8
- constructor(value: T);
9
- attach(observer: Observer<T> | ObserverCallback<T>): void;
10
- detach(observer: Observer<T> | ObserverCallback<T>): void;
11
- notify(): void;
12
- private notifyObject;
13
- next(newValue: T | ObserverUpdaterCallback<T>): void;
14
- getValue(): T;
15
- }
16
- export {};
@@ -1,3 +0,0 @@
1
- export interface Observer<T> {
2
- update(subject: T): void;
3
- }
@@ -1,6 +0,0 @@
1
- import { Observer } from './Observer';
2
- export interface Subject<T> {
3
- attach(observer: Observer<T>): void;
4
- detach(observer: Observer<T>): void;
5
- notify(): void;
6
- }
@@ -1,4 +0,0 @@
1
- export { AbstractSubject } from './AbstractSubject';
2
- export { type Observer } from './Observer';
3
- export { type ObserverCallback, BehaviorSubject } from './BehaviorSubject';
4
- export { type Subject } from './Subject';
@@ -1,9 +0,0 @@
1
- import { Nullable } from '../types/Global';
2
- import { ProcessManager } from './ProcessManager';
3
- export declare abstract class Process {
4
- name: string;
5
- next: Nullable<Process>;
6
- constructor(name: string, next: Nullable<Process>);
7
- addToManager(manager: ProcessManager): void;
8
- abstract execute(): Promise<void>;
9
- }
@@ -1,10 +0,0 @@
1
- import { Process } from './Proccess';
2
- export declare class ProcessManager {
3
- private mapProcesses;
4
- private processes;
5
- constructor(process: Process);
6
- private assignProcessManager;
7
- setProcessToMap(process: Process): void;
8
- start(): Promise<void>;
9
- startFrom(processName: string): Promise<void>;
10
- }
@@ -1,2 +0,0 @@
1
- export { ProcessManager } from './ProcessManager.ts';
2
- export { Process } from './Proccess';
@@ -1,11 +0,0 @@
1
- import { SortDetail } from '../sort';
2
- import { BaseModel } from '../BaseModel';
3
- export declare class Params {
4
- pageNumber: number;
5
- itemCount: number;
6
- sortDetail: SortDetail<BaseModel>;
7
- filters: {
8
- key: string;
9
- value: unknown;
10
- }[];
11
- }
@@ -1,38 +0,0 @@
1
- import { BaseModel } from '../BaseModel';
2
- import { FetchListResponse } from './model';
3
- import { Nullable } from '../types';
4
- import { SyncDetail } from './SyncDetail';
5
- export interface Repository<Model extends BaseModel> {
6
- /**
7
- * Fetches a list of items based on optional query parameters.
8
- * @param query - Optional query parameters.
9
- * @returns A promise resolving to an array of items or undefined.
10
- */
11
- fetchList(query?: Record<string, unknown>): Promise<FetchListResponse<Model>>;
12
- /**
13
- * Fetches a single item by its ID.
14
- * @param id - ID of the item to retrieve.
15
- * @returns A promise resolving to the fetched item or undefined.
16
- */
17
- fetchItemById(id: number): Promise<Nullable<Model>>;
18
- /**
19
- * Creates a new item.
20
- * @param body - Data for creating the item.
21
- * @returns A promise resolving to the created item or undefined.
22
- */
23
- createItem<Body>(body: Body): Promise<Nullable<Model>>;
24
- /**
25
- * Updates an existing item by its ID.
26
- * @param id - ID of the item to update.
27
- * @param body - Updated data for the item.
28
- * @returns A promise resolving to the updated item or undefined.
29
- */
30
- updateItem<Body>(id: number, body: Body): Promise<Nullable<Model>>;
31
- /**
32
- * Deletes an item by its ID.
33
- * @param id - ID of the item to delete.
34
- * @returns A promise resolving to a boolean indicating if the deletion was successful.
35
- */
36
- deleteItem(id: number): Promise<boolean>;
37
- getSyncDetail(): SyncDetail;
38
- }
@@ -1,5 +0,0 @@
1
- export declare class SyncDetail {
2
- shouldKeepSync: boolean;
3
- intervalInMillisecond: number;
4
- constructor(shouldKeepSync: boolean, intervalInMillisecond: number);
5
- }
@@ -1,4 +0,0 @@
1
- export { Params } from './Params';
2
- export { type Repository } from './Repository';
3
- export { FetchListResponse } from './model';
4
- export { SyncDetail } from './SyncDetail';
@@ -1,5 +0,0 @@
1
- export declare class FetchListResponse<Model> {
2
- items: Model[];
3
- totalItems: number;
4
- constructor(items: Model[], totalItems: number);
5
- }
@@ -1,7 +0,0 @@
1
- export declare abstract class RouteGuard {
2
- protected constructor();
3
- checkAccessibility(to: unknown, from: unknown, next: CallableFunction): Promise<void>;
4
- protected abstract isAccessible(to: unknown, from: unknown): Promise<boolean>;
5
- protected getDestinationRouteName(): Promise<string>;
6
- protected getDestinationRouteLocation(to: unknown, from: unknown): Promise<unknown>;
7
- }
@@ -1 +0,0 @@
1
- export { RouteGuard } from './RouteGuard';
@@ -1,4 +0,0 @@
1
- import { ClientSearch } from './ClientSearch';
2
- export declare class ClientArraySearch<T> extends ClientSearch {
3
- search(items: T[], phrase: string, column: (item: T) => (string | number)[]): T[];
4
- }
@@ -1,3 +0,0 @@
1
- export declare abstract class ClientSearch {
2
- abstract search(items: unknown, phrase: string, column: (item: unknown) => (string | number)[]): unknown;
3
- }
@@ -1,2 +0,0 @@
1
- export { ClientSearch } from './client/ClientSearch';
2
- export { ClientArraySearch } from './client/ClientArraySearch';
@@ -1,6 +0,0 @@
1
- import { SortOrder } from '../constants';
2
- export declare class SortDetail<T> {
3
- key: keyof T;
4
- order: SortOrder;
5
- constructor(key: keyof T, order: SortOrder);
6
- }
@@ -1,6 +0,0 @@
1
- import { SortOrder } from '../../constants/Constants';
2
- import { SortStrategy } from '../strategies/SortStrategy';
3
- export declare class Sorter {
4
- arrayOfObjectSort<T>(items: T[], by: keyof T, order: SortOrder, strategy?: SortStrategy<T>): T[];
5
- arraySort(items: number[] | string[], order: SortOrder, strategy?: SortStrategy<string | number>): (string | number)[];
6
- }
@@ -1,4 +0,0 @@
1
- export { SortDetail } from './SortDetail';
2
- export * from './client/Sorter';
3
- export * from './strategies/SortStrategy';
4
- export * from './strategies/SimpleSort';
@@ -1,5 +0,0 @@
1
- import { SortStrategy } from './SortStrategy';
2
- export declare class SimpleSort<T> implements SortStrategy<T> {
3
- aSort(items: T[], by?: keyof T): T[];
4
- bSort(items: T[], by?: keyof T): T[];
5
- }
@@ -1,4 +0,0 @@
1
- export interface SortStrategy<T> {
2
- aSort(items: T[], by?: keyof T): T[];
3
- bSort(items: T[], by?: keyof T): T[];
4
- }
@@ -1 +0,0 @@
1
- export type Nullable<T> = T | null;
@@ -1 +0,0 @@
1
- export * from './Global';
@@ -1,4 +0,0 @@
1
- import { Nullable } from '../types';
2
- export interface Validator<T> {
3
- validate(value: Nullable<T>): string | Promise<string>;
4
- }
@@ -1 +0,0 @@
1
- export { type Validator } from './Validator';
@@ -1,6 +0,0 @@
1
- export declare const enum WebSocketEvents {
2
- CLOSE = "wsClose",
3
- OPEN = "wsOpen",
4
- ERROR = "wsError",
5
- TIMEOUT = "wsTimeout"
6
- }
@@ -1,6 +0,0 @@
1
- export declare class WebSocketPostMessage<T> {
2
- private type;
3
- private data;
4
- constructor(type: string, data: T);
5
- getPayload(): string;
6
- }
@@ -1,30 +0,0 @@
1
- import { CustomEventDispatcher } from '../eventSystem/CustomEventDispatcher';
2
- import { WebSocketPostMessage } from './Model';
3
- export declare class WebSocketService {
4
- private readonly customEventDispatcher;
5
- private webSocket;
6
- private retry;
7
- private url;
8
- private protocols;
9
- private delayTimeInMillieSeconds;
10
- private baseUrl;
11
- private intervalId;
12
- constructor(customEventDispatcher: CustomEventDispatcher, baseUrl: string);
13
- connect(url: string, protocols?: string[], retry?: number): void;
14
- private checkHealth;
15
- private sendPing;
16
- private reconnect;
17
- private fakeWait;
18
- private onError;
19
- private onOpen;
20
- private registerPingPontInterval;
21
- private onMessage;
22
- private onClose;
23
- closeConnection(): void;
24
- isConnectionOpen(): boolean;
25
- isConnecting(): boolean;
26
- isClosing(): boolean;
27
- isClosed(): boolean;
28
- send(data: WebSocketPostMessage<unknown>): void;
29
- private setBaseUrl;
30
- }
@@ -1,3 +0,0 @@
1
- export { WebSocketPostMessage } from './Model';
2
- export { WebSocketService } from './WebSocketService';
3
- export { WebSocketEvents } from './Constants';
@@ -1,2 +0,0 @@
1
- declare const _default: any;
2
- export default _default;