@posx/core 5.5.380 → 5.5.381

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.
package/build/index.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ import { AxiosInstance } from "axios";
1
2
  import { QueryBuilder, QueryResponse } from "@litepos/autoquery";
2
3
 
3
4
  //#region src/types/wyo.customer.type.d.ts
@@ -1496,7 +1497,7 @@ interface IAppRemoteService<T extends IAppCoreModel> extends IAppCoreService<T>
1496
1497
  hardDeleteOne(model: T): Promise<T>;
1497
1498
  }
1498
1499
  declare class AppRemoteService<T extends IAppCoreModel> extends AppCoreService<T> implements IAppRemoteService<T> {
1499
- protected readonly http: AxiosInstance$4;
1500
+ protected readonly http: AxiosInstance;
1500
1501
  readonly moduleName: string;
1501
1502
  protected readonly methodName: string;
1502
1503
  protected readonly options: IServiceOptions;
@@ -4369,12 +4370,12 @@ type INoteGroupService = IAppRemoteService<INoteGroup>;
4369
4370
  type ISectionService = IAppRemoteService<ISection>;
4370
4371
  type ISubcategoryService = IAppRemoteService<ISubcategory>;
4371
4372
  declare class EmployeeRoleService extends AppRemoteService<IEmployeeRole> implements IEmployeeRoleService {
4372
- readonly http: AxiosInstance$3;
4373
+ readonly http: AxiosInstance;
4373
4374
  readonly db: Dexie;
4374
4375
  readonly options: IServiceOptions;
4375
4376
  readonly moduleName: string;
4376
4377
  readonly methodName: string;
4377
- constructor(http: AxiosInstance$3, db: Dexie, options: IServiceOptions, moduleName?: string, methodName?: string);
4378
+ constructor(http: AxiosInstance, db: Dexie, options: IServiceOptions, moduleName?: string, methodName?: string);
4378
4379
  }
4379
4380
  /**
4380
4381
  * Represents a service for managing items.
@@ -4548,12 +4549,12 @@ interface IItemService extends IAppRemoteService<IItem> {
4548
4549
  copyModifierGroupToItems(sourceModifierCategory: ICoreCategory, sourceModifiers: ICoreItem[], targetItems: IItem[]): Promise<IItem[]>;
4549
4550
  }
4550
4551
  declare class ItemService extends AppRemoteService<IItem> implements IItemService {
4551
- readonly http: AxiosInstance$3;
4552
+ readonly http: AxiosInstance;
4552
4553
  readonly db: Dexie;
4553
4554
  readonly options: IServiceOptions;
4554
4555
  readonly moduleName: string;
4555
4556
  readonly methodName: string;
4556
- constructor(http: AxiosInstance$3, db: Dexie, options: IServiceOptions, moduleName?: string, methodName?: string);
4557
+ constructor(http: AxiosInstance, db: Dexie, options: IServiceOptions, moduleName?: string, methodName?: string);
4557
4558
  search(query: string): Promise<IItem[]>;
4558
4559
  addModifierCategory(item: IItem, category: ICoreCategory): Promise<IItem>;
4559
4560
  updateModifierCategory(item: IItem, category: ICoreCategory): Promise<IItem>;
@@ -4604,12 +4605,12 @@ interface ICategoryService extends IAppRemoteService<ICategory> {
4604
4605
  removeSubcategory(category: ICategory, subcategoryUid: string): Promise<ICategory>;
4605
4606
  }
4606
4607
  declare class CategoryService extends AppRemoteService<Category> {
4607
- readonly http: AxiosInstance$3;
4608
+ readonly http: AxiosInstance;
4608
4609
  readonly db: Dexie;
4609
4610
  readonly options: IServiceOptions;
4610
4611
  readonly moduleName: string;
4611
4612
  readonly methodName: string;
4612
- constructor(http: AxiosInstance$3, db: Dexie, options: IServiceOptions, moduleName?: string, methodName?: string);
4613
+ constructor(http: AxiosInstance, db: Dexie, options: IServiceOptions, moduleName?: string, methodName?: string);
4613
4614
  addSubcategory(category: ICategory, subcategory: ISubcategory): Promise<ICategory>;
4614
4615
  updateSubcategory(category: ICategory, subcategory: ISubcategory): Promise<ICategory>;
4615
4616
  removeSubcategory(category: ICategory, subcategoryUid: string): Promise<ICategory>;
@@ -4638,12 +4639,12 @@ interface IConfigService extends IAppRemoteService<IAppConfig> {
4638
4639
  uploadFile(file: File): Promise<IFileUploadResponse>;
4639
4640
  }
4640
4641
  declare class ConfigService extends AppRemoteService<IAppConfig> implements IConfigService {
4641
- readonly http: AxiosInstance$3;
4642
+ readonly http: AxiosInstance;
4642
4643
  readonly db: Dexie;
4643
4644
  readonly options: IServiceOptions;
4644
4645
  readonly moduleName: string;
4645
4646
  readonly methodName: string;
4646
- constructor(http: AxiosInstance$3, db: Dexie, options: IServiceOptions, moduleName?: string, methodName?: string);
4647
+ constructor(http: AxiosInstance, db: Dexie, options: IServiceOptions, moduleName?: string, methodName?: string);
4647
4648
  private configFactories;
4648
4649
  updateConfig<T extends keyof IConfig>(configKey: T, options: Partial<IConfig[T]>): Promise<IAppConfig>;
4649
4650
  updateGeneralConfig(options: UpdateGeneralConfigOptions): Promise<IAppConfig>;
@@ -4651,32 +4652,32 @@ declare class ConfigService extends AppRemoteService<IAppConfig> implements ICon
4651
4652
  uploadFile(file: File): Promise<IFileUploadResponse>;
4652
4653
  }
4653
4654
  declare class SectionService extends AppRemoteService<ISection> implements ISectionService {
4654
- readonly http: AxiosInstance$3;
4655
+ readonly http: AxiosInstance;
4655
4656
  readonly db: Dexie;
4656
4657
  readonly options: IServiceOptions;
4657
4658
  readonly moduleName: string;
4658
4659
  readonly methodName: string;
4659
- constructor(http: AxiosInstance$3, db: Dexie, options: IServiceOptions, moduleName?: string, methodName?: string);
4660
+ constructor(http: AxiosInstance, db: Dexie, options: IServiceOptions, moduleName?: string, methodName?: string);
4660
4661
  }
4661
4662
  declare class SectionItemService extends AppRemoteService<ISectionItem> implements ISectionItemService {
4662
- readonly http: AxiosInstance$3;
4663
+ readonly http: AxiosInstance;
4663
4664
  readonly db: Dexie;
4664
4665
  readonly options: IServiceOptions;
4665
4666
  readonly moduleName: string;
4666
4667
  readonly methodName: string;
4667
- constructor(http: AxiosInstance$3, db: Dexie, options: IServiceOptions, moduleName?: string, methodName?: string);
4668
+ constructor(http: AxiosInstance, db: Dexie, options: IServiceOptions, moduleName?: string, methodName?: string);
4668
4669
  changeToTakeOut(uid: string): Promise<ISectionItem>;
4669
4670
  reset(sectionItem: ISectionItem): void;
4670
4671
  syncInvoiceData(sectionItem: ISectionItem, invoice: IInvoice): void;
4671
4672
  }
4672
4673
  type IProductService = IAppRemoteService<IItem>;
4673
4674
  declare class ProductService extends AppRemoteService<IItem> implements IProductService {
4674
- readonly http: AxiosInstance$3;
4675
+ readonly http: AxiosInstance;
4675
4676
  readonly db: Dexie;
4676
4677
  readonly options: IServiceOptions;
4677
4678
  readonly moduleName: string;
4678
4679
  readonly methodName: string;
4679
- constructor(http: AxiosInstance$3, db: Dexie, options: IServiceOptions, moduleName?: string, methodName?: string);
4680
+ constructor(http: AxiosInstance, db: Dexie, options: IServiceOptions, moduleName?: string, methodName?: string);
4680
4681
  }
4681
4682
  interface IShiftService extends IAppRemoteService<IShift> {
4682
4683
  closeShift(declareAmount: number, userUid: string): Promise<IShift>;
@@ -4685,13 +4686,13 @@ interface IShiftService extends IAppRemoteService<IShift> {
4685
4686
  cashOut(amount: number, note: string): Promise<ITill>;
4686
4687
  }
4687
4688
  declare class ShiftService extends AppRemoteService<IShift> implements IShiftService {
4688
- readonly http: AxiosInstance$3;
4689
+ readonly http: AxiosInstance;
4689
4690
  readonly db: Dexie;
4690
4691
  readonly options: IServiceOptions;
4691
4692
  readonly moduleName: string;
4692
4693
  readonly methodName: string;
4693
4694
  private tillService;
4694
- constructor(http: AxiosInstance$3, db: Dexie, options: IServiceOptions, moduleName?: string, methodName?: string);
4695
+ constructor(http: AxiosInstance, db: Dexie, options: IServiceOptions, moduleName?: string, methodName?: string);
4695
4696
  cashIn(amount: number, note: string): Promise<ITill>;
4696
4697
  cashOut(amount: number, note: string): Promise<ITill>;
4697
4698
  closeShift(declareAmount: number, userUid: string): Promise<IShift>;
@@ -4715,12 +4716,12 @@ interface ITillService extends IAppRemoteService<ITill> {
4715
4716
  createCashInvoiceTill(payments: IPayment[], shift_uid: string, user_uid: string, note?: string, invoice_uid?: string): ITill;
4716
4717
  }
4717
4718
  declare class TillService extends AppRemoteService<ITill> implements ITillService {
4718
- readonly http: AxiosInstance$3;
4719
+ readonly http: AxiosInstance;
4719
4720
  readonly db: Dexie;
4720
4721
  readonly options: IServiceOptions;
4721
4722
  readonly moduleName: string;
4722
4723
  readonly methodName: string;
4723
- constructor(http: AxiosInstance$3, db: Dexie, options: IServiceOptions, moduleName?: string, methodName?: string);
4724
+ constructor(http: AxiosInstance, db: Dexie, options: IServiceOptions, moduleName?: string, methodName?: string);
4724
4725
  createCashInvoiceTill(payments: IPayment[], shift_uid: string, user_uid: string, note?: string, invoice_uid?: string): ITill;
4725
4726
  }
4726
4727
  /**
@@ -4755,12 +4756,12 @@ interface IPaymentMethodService extends IAppRemoteService<IPaymentMethod> {
4755
4756
  changeSequence(paymentMethod: IPaymentMethod, sequence: number): Promise<IPaymentMethod>;
4756
4757
  }
4757
4758
  declare class PaymentMethodService extends AppRemoteService<IPaymentMethod> implements IPaymentMethodService {
4758
- readonly http: AxiosInstance$3;
4759
+ readonly http: AxiosInstance;
4759
4760
  readonly db: Dexie;
4760
4761
  readonly options: IServiceOptions;
4761
4762
  readonly moduleName: string;
4762
4763
  readonly methodName: string;
4763
- constructor(http: AxiosInstance$3, db: Dexie, options: IServiceOptions, moduleName?: string, methodName?: string);
4764
+ constructor(http: AxiosInstance, db: Dexie, options: IServiceOptions, moduleName?: string, methodName?: string);
4764
4765
  syncStandardPaymentMethods(): Promise<IPaymentMethod[]>;
4765
4766
  enablePaymentMethod(paymentMethod: IPaymentMethod): Promise<IPaymentMethod>;
4766
4767
  disablePaymentMethod(paymentMethod: IPaymentMethod): Promise<IPaymentMethod>;
@@ -4788,12 +4789,12 @@ interface IPaymentService extends IAppRemoteService<IPayment> {
4788
4789
  removePayment(invoice: IInvoice, payment_uid: string): Promise<IInvoice>;
4789
4790
  }
4790
4791
  declare class PaymentService extends AppRemoteService<IPayment> implements IPaymentService {
4791
- readonly http: AxiosInstance$3;
4792
+ readonly http: AxiosInstance;
4792
4793
  readonly db: Dexie;
4793
4794
  readonly options: IServiceOptions;
4794
4795
  readonly moduleName: string;
4795
4796
  readonly methodName: string;
4796
- constructor(http: AxiosInstance$3, db: Dexie, options: IServiceOptions, moduleName?: string, methodName?: string);
4797
+ constructor(http: AxiosInstance, db: Dexie, options: IServiceOptions, moduleName?: string, methodName?: string);
4797
4798
  addPayment(invoice: IInvoice, amount: number, paymentMethod: IPaymentMethod): Promise<IInvoice>;
4798
4799
  removePayment(invoice: IInvoice, payment_uid: string): Promise<IInvoice>;
4799
4800
  }
@@ -4838,7 +4839,7 @@ interface IAppReportService extends IAppRemoteService<IAppReport> {
4838
4839
  printReport(request: IReportRequest): Promise<void>;
4839
4840
  }
4840
4841
  declare class AppReportService extends AppRemoteService<IAppReport> implements IAppReportService {
4841
- readonly http: AxiosInstance$3;
4842
+ readonly http: AxiosInstance;
4842
4843
  readonly db: Dexie;
4843
4844
  readonly options: IServiceOptions;
4844
4845
  readonly moduleName: string;
@@ -4850,7 +4851,7 @@ declare class AppReportService extends AppRemoteService<IAppReport> implements I
4850
4851
  private printTemplateService;
4851
4852
  private printJobService;
4852
4853
  private configService;
4853
- constructor(http: AxiosInstance$3, db: Dexie, options: IServiceOptions, moduleName?: string, methodName?: string);
4854
+ constructor(http: AxiosInstance, db: Dexie, options: IServiceOptions, moduleName?: string, methodName?: string);
4854
4855
  syncStandardReports(): Promise<IAppReport>;
4855
4856
  printReport(request: IReportRequest): Promise<void>;
4856
4857
  private getReportData;
@@ -4871,23 +4872,23 @@ type IPrintJobService = IAppRemoteService<IPrintJob> & {
4871
4872
  replacePrinter(printJob: IPrintJob, printer: IPrinter): IPrintJob;
4872
4873
  };
4873
4874
  declare class PrintJobService extends AppRemoteService<IPrintJob> implements IPrintJobService {
4874
- readonly http: AxiosInstance$3;
4875
+ readonly http: AxiosInstance;
4875
4876
  readonly db: Dexie;
4876
4877
  readonly options: IServiceOptions;
4877
4878
  readonly moduleName: string;
4878
4879
  readonly methodName: string;
4879
- constructor(http: AxiosInstance$3, db: Dexie, options: IServiceOptions, moduleName?: string, methodName?: string);
4880
+ constructor(http: AxiosInstance, db: Dexie, options: IServiceOptions, moduleName?: string, methodName?: string);
4880
4881
  autoquery(builder: QueryBuilder<IPrintJob>): Promise<QueryResponse<IPrintJob>>;
4881
4882
  replacePrinter(printJob: IPrintJob, printer: IPrinter): IPrintJob;
4882
4883
  }
4883
4884
  type IMenuService = IAppRemoteService<IMenu>;
4884
4885
  declare class MenuService extends AppRemoteService<IMenu> implements IMenuService {
4885
- readonly http: AxiosInstance$3;
4886
+ readonly http: AxiosInstance;
4886
4887
  readonly db: Dexie;
4887
4888
  readonly options: IServiceOptions;
4888
4889
  readonly moduleName: string;
4889
4890
  readonly methodName: string;
4890
- constructor(http: AxiosInstance$3, db: Dexie, options: IServiceOptions, moduleName?: string, methodName?: string);
4891
+ constructor(http: AxiosInstance, db: Dexie, options: IServiceOptions, moduleName?: string, methodName?: string);
4891
4892
  }
4892
4893
  interface IPrintTemplateService extends IAppRemoteService<IPrintTemplate> {
4893
4894
  /**
@@ -4920,14 +4921,14 @@ interface IPrintTemplateService extends IAppRemoteService<IPrintTemplate> {
4920
4921
  renderPrintTemplateByData(template: IPrintTemplate, templateData: ITemplateData, options?: IRenderPrintTemplateOptions): Promise<IPrintCommand>;
4921
4922
  }
4922
4923
  declare class PrintTemplateService extends AppRemoteService<IPrintTemplate> implements IPrintTemplateService {
4923
- readonly http: AxiosInstance$3;
4924
+ readonly http: AxiosInstance;
4924
4925
  readonly db: Dexie;
4925
4926
  readonly options: IServiceOptions;
4926
4927
  readonly moduleName: string;
4927
4928
  readonly methodName: string;
4928
- httpClient: AxiosInstance$3;
4929
+ httpClient: AxiosInstance;
4929
4930
  private secretKey;
4930
- constructor(http: AxiosInstance$3, db: Dexie, options: IServiceOptions, moduleName?: string, methodName?: string);
4931
+ constructor(http: AxiosInstance, db: Dexie, options: IServiceOptions, moduleName?: string, methodName?: string);
4931
4932
  initialize(): Promise<void>;
4932
4933
  renderPrintTemplate(invoice: IInvoice, config: IConfig, template: IPrintTemplate, options?: RenderPrintTemplateOptions): Promise<IPrintCommand>;
4933
4934
  renderReportPrintTemplate(reportData: ReportData, config: IConfig, template: IPrintTemplate, options?: RenderPrintTemplateOptions): Promise<IPrintCommand>;
@@ -4938,12 +4939,12 @@ declare class PrintTemplateService extends AppRemoteService<IPrintTemplate> impl
4938
4939
  }
4939
4940
  type TStorageService<T = Record<string, unknown>> = IAppRemoteService<IStorage<T>>;
4940
4941
  declare class StorageService<T = Record<string, unknown>> extends AppRemoteService<IStorage<T>> implements TStorageService<T> {
4941
- readonly http: AxiosInstance$3;
4942
+ readonly http: AxiosInstance;
4942
4943
  readonly db: Dexie;
4943
4944
  readonly options: IServiceOptions;
4944
4945
  readonly moduleName: string;
4945
4946
  readonly methodName: string;
4946
- constructor(http: AxiosInstance$3, db: Dexie, options: IServiceOptions, moduleName?: string, methodName?: string);
4947
+ constructor(http: AxiosInstance, db: Dexie, options: IServiceOptions, moduleName?: string, methodName?: string);
4947
4948
  }
4948
4949
  //#endregion
4949
4950
  //#region src/service.factory.d.ts
@@ -5039,7 +5040,7 @@ interface IPrinterService extends IAppRemoteService<IPrinter> {
5039
5040
  openCashDrawer(): Promise<void>;
5040
5041
  }
5041
5042
  declare class PrinterService extends AppRemoteService<IPrinter> implements IPrinterService {
5042
- readonly http: AxiosInstance$2;
5043
+ readonly http: AxiosInstance;
5043
5044
  readonly db: Dexie;
5044
5045
  readonly options: IServiceOptions;
5045
5046
  readonly moduleName: string;
@@ -5047,7 +5048,7 @@ declare class PrinterService extends AppRemoteService<IPrinter> implements IPrin
5047
5048
  private configService;
5048
5049
  protected printJobService: PrintJobService;
5049
5050
  private printersFromCache;
5050
- constructor(http: AxiosInstance$2, db: Dexie, options: IServiceOptions, moduleName?: string, methodName?: string);
5051
+ constructor(http: AxiosInstance, db: Dexie, options: IServiceOptions, moduleName?: string, methodName?: string);
5051
5052
  private init;
5052
5053
  getPhysicalPrintersFromNode(): Promise<INodePrinter[]>;
5053
5054
  getUnpairedNode(): Promise<CustomResponse<INode>>;
@@ -5103,12 +5104,12 @@ interface IOrderDisplayService extends IAppRemoteService<IOrderDisplay> {
5103
5104
  undo(): Promise<IOrderDisplay>;
5104
5105
  }
5105
5106
  declare class OrderDisplayService extends AppRemoteService<IOrderDisplay> implements IOrderDisplayService {
5106
- readonly http: AxiosInstance$1;
5107
+ readonly http: AxiosInstance;
5107
5108
  readonly db: Dexie;
5108
5109
  readonly options: IServiceOptions;
5109
5110
  readonly moduleName: string;
5110
5111
  readonly methodName: string;
5111
- constructor(http: AxiosInstance$1, db: Dexie, options: IServiceOptions, moduleName?: string, methodName?: string);
5112
+ constructor(http: AxiosInstance, db: Dexie, options: IServiceOptions, moduleName?: string, methodName?: string);
5112
5113
  toPickUp(uid: string): Promise<IOrderDisplay>;
5113
5114
  toPreparing(uid: string): Promise<IOrderDisplay>;
5114
5115
  undo(): Promise<IOrderDisplay>;