@posx/core 5.5.504 → 5.5.506

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/CLAUDE.md ADDED
@@ -0,0 +1,24 @@
1
+ # Claude AI Development Guidelines
2
+
3
+ ## Rules you have to follow strictly
4
+
5
+ - You are top-notch programmer who always write simplest code to achieve the ideal result
6
+ - you are one liner engineers and we believe "The Great Tao is Simple", so try to keep changes small and focused
7
+ - keep the changes as minimal as possible
8
+ - if or else has one line of code, then { } are not needed and it should be wrote into same line
9
+ - DO NOT write uncessary comment do not make newlines within a function and try to make the code compact
10
+ - All crucial code should have proper explanation in English
11
+ - Keep the simplifications as small and focused within the function or scope.
12
+ - Do not overhaul the whole file or codebase which is irrelevant to the current task.
13
+
14
+ ## Best Practices for AI-Assisted Development
15
+
16
+ 1. **在开始编码前先充分讨论和规划架构,确保理解用户的真实需求和使用场景,避免过度设计。**
17
+
18
+ 2. **不要急于提交代码,应该等待用户明确指示后再进行 commit 和 push 操作。**
19
+
20
+ 3. **优先选择简洁的实现方式(如函数导出而非类),并删除冗余的中间层方法以保持代码清晰。**
21
+
22
+ ---
23
+
24
+ *This file contains guidelines learned from AI-human collaboration to improve development efficiency and code quality.*
package/build/index.d.ts CHANGED
@@ -3466,6 +3466,10 @@ type TDynamicOrderQR = {
3466
3466
  select_order_flow: boolean;
3467
3467
  select_menus: boolean;
3468
3468
  };
3469
+ type AssetItem = {
3470
+ url: string;
3471
+ link?: string;
3472
+ };
3469
3473
  interface IOnlineOrderConfig {
3470
3474
  enable_membership: boolean;
3471
3475
  login_call_to_action_text: string;
@@ -3480,6 +3484,7 @@ interface IOnlineOrderConfig {
3480
3484
  disable_logo_for_item_photo_fallback: boolean;
3481
3485
  whatsapp_login_only: boolean;
3482
3486
  enable_whatsapp_login: boolean;
3487
+ assets: Record<string, AssetItem>;
3483
3488
  }
3484
3489
  declare class OnlineOrderConfig implements IOnlineOrderConfig {
3485
3490
  enable_membership: boolean;
@@ -3495,6 +3500,7 @@ declare class OnlineOrderConfig implements IOnlineOrderConfig {
3495
3500
  disable_logo_for_item_photo_fallback: boolean;
3496
3501
  whatsapp_login_only: boolean;
3497
3502
  enable_whatsapp_login: boolean;
3503
+ assets: Record<string, AssetItem>;
3498
3504
  constructor();
3499
3505
  }
3500
3506
  interface IGeneralConfig {
@@ -4946,8 +4952,6 @@ interface ITillService extends IAppRemoteService<ITill> {
4946
4952
  * @returns {Promise<ITill>} - A promise that resolves with the created till.
4947
4953
  */
4948
4954
  createCashInvoiceTill(payments: IPayment[], shift_uid: string, user_uid: string, note?: string, invoice_uid?: string): ITill;
4949
- /** Soft-delete all Till records by invoice_uid */
4950
- deleteByInvoiceUid(invoiceUid: string): Promise<ITill[]>;
4951
4955
  }
4952
4956
  declare class TillService extends AppRemoteService<ITill> implements ITillService {
4953
4957
  readonly http: AxiosInstance;
@@ -4957,7 +4961,6 @@ declare class TillService extends AppRemoteService<ITill> implements ITillServic
4957
4961
  readonly methodName: string;
4958
4962
  constructor(http: AxiosInstance, db: Dexie, options: IServiceOptions, moduleName?: string, methodName?: string);
4959
4963
  createCashInvoiceTill(payments: IPayment[], shift_uid: string, user_uid: string, note?: string, invoice_uid?: string): ITill;
4960
- deleteByInvoiceUid(invoiceUid: string): Promise<ITill[]>;
4961
4964
  }
4962
4965
  /**
4963
4966
  * Represents a service for managing payment methods.
@@ -5889,7 +5892,7 @@ interface IInvoiceOperationService extends ILineOperationService {
5889
5892
  * @param invoice invoice to change
5890
5893
  * @param payments payments to change
5891
5894
  */
5892
- changePayments(invoice: IInvoice, options: IChangePaymentMethodOption[], shiftUid: string, userUid: string): Promise<IInvoice>;
5895
+ changePayments(invoice: IInvoice, options: IChangePaymentMethodOption[]): Promise<IInvoice>;
5893
5896
  /**
5894
5897
  * Adds a charge to an invoice
5895
5898
  * @param invoice - The invoice to add the charge to
@@ -5940,7 +5943,7 @@ declare class InvoiceOperationService extends LineOperationService implements II
5940
5943
  appendInvoice(mainInvoice: IInvoice, addOnInvoice: IInvoice): IInvoice;
5941
5944
  mergeInvoice(targetInvoice: IInvoice, sourceInvoice: IInvoice): Promise<IInvoice>;
5942
5945
  getRefId(): Promise<string>;
5943
- changePayments(invoice: IInvoice, options: IChangePaymentMethodOption[], shiftUid: string, userUid: string): Promise<IInvoice>;
5946
+ changePayments(invoice: IInvoice, options: IChangePaymentMethodOption[]): Promise<IInvoice>;
5944
5947
  private formatDate;
5945
5948
  private addEmployeeToInvoice;
5946
5949
  createReceiptPrintJob(invoice: IInvoice, printerType: PrinterType, saveOnly?: boolean, printTimes?: number, specificPrinter?: IPrinter, specificDeviceUid?: string): Promise<PrintJob | null>;
@@ -6134,5 +6137,5 @@ interface ValidationResult {
6134
6137
  }
6135
6138
  declare function validateSTTemplate(jsonStr: string): ValidationResult;
6136
6139
  //#endregion
6137
- export { Address, AppBaseModel, AppConfig, AppCoreModel, AppCoreService, AppExtraModel, AppLocalService, AppMiscService, AppRemoteService, AppReport, AppReportService, Applying, AssetTags, AssetType, Between, BreakPeriod, Cache, CalcFlow, CalcType, CancelInvoiceOptions, CardPaymentCode, CashDrawerConfig, Category, CategorySalesSummary, CategoryService, CategoryType, Charge, ChargeConfig, CheckInvoiceOptions, Codepages, ComboGroup, ComboGroupItem, Condition, Config, ConfigService, CoreCategory, CoreItem, Coupon, CouponItemized, CouponUsage, CreateInvoiceOptions, CrmConfig, CurrencyConfig, CustomResponse, Customer, CustomerDisplaySystemConfig, DayOfWeek, DeployChannel, Device, DeviceEtc, DeviceType, DirectPayInvoiceOptions, DiscountType, DrawerSummary, ElectronSocket, Employee, EmployeeRole, EmployeeRoleService, EmployeeService, ErrorMsgs, EscPosCompatibility, EscPosPrinter, FileUploadRequest, GTOConfig, GeneralConfig, GetManyResult, Holiday, IAddress, IAppBase, IAppBaseModel, IAppConfig, IAppCore, IAppCoreModel, IAppCoreService, IAppExtra, IAppExtraModel, IAppLocalService, IAppMiscService, IAppModelSequence, IAppRemoteService, IAppReport, IAppReportService, IApplying, ICache, ICashDrawerConfig, ICategory, ICategoryService, IChangePaymentMethodOption, ICharge, IChargeConfig, IComboGroup, IComboGroupItem, IConfig, IConfigService, ICoreCategory, ICoreItem, ICoupon, ICouponItemized, ICouponUsage, ICredit, ICrmConfig, ICurrencyConfig, ICustomer, ICustomerDisplaySystemConfig, IDevice, IDiscount, IDrawerSummary, IEmployee, IEmployeeRole, IEmployeeRoleService, IEmployeeService, IEscPosPrinter, IEtc, IExportRow, IFileUploadRequest, IFileUploadResponse, IFontSize, IGeneralConfig, IGtoConfig, IInventoryConfig, IInvoice, IInvoiceActivity, IInvoiceBaseService, IInvoiceCharge, IInvoiceCoreLine, IInvoiceDiscount, IInvoiceLine, IInvoiceOperationService, IInvoiceService, IItem, IItemService, IKdsConfig, IKioskSystemConfig, IKitchenConfig, ILabelConfig, ILineOperationService, ILoyaltyProgram, ILoyaltyProgramSummary, IMarketing, IMenu, IMenuService, IMerchant, IMerchantAsset, INode, INodePrinter, INote, INoteEntity, INoteGroup, INoteGroupEntity, INoteGroupService, INoteService, IOnlineOrderConfig, IOrderConfig, IOrderDisplay, IOrderDisplayService, IOrderDisplaySystemConfig, IPaxConfig, IPayment, IPaymentConfig, IPaymentMethod, IPaymentMethodHistory, IPaymentMethodService, IPaymentService, IPaymentSummary, IPoint, IPrice, IPrintBarcode, IPrintCommand, IPrintCommandLine, IPrintImage, IPrintJob, IPrintJobService, IPrintQrcode, IPrintTable, IPrintTableRowItem, IPrintTemplate, IPrintTemplateCore, IPrintTemplateService, IPrintText, IPrinter, IPrinterService, IProductBase, IProductService, IPushData, IReceiptConfig, IRenderPrintTemplateOptions, IReport, IReportCategory, IReportConfig, IReportData, IReportRequest, IRoundingConfig, ISalesSummary, ISection, ISectionItem, ISectionItemService, ISectionService, IServiceOptions, IShift, IShiftService, IStandardPaymentMethod, IStockLog, IStockLogService, IStorage, ISubcategory, ISubcategoryService, ITaxConfig, ITemplateData, ITill, ITillConfig, ITillService, IUser, IUserConfig, IVisibility, In, Include, InventoryConfig, Invoice, InvoiceAction, InvoiceActivity, InvoiceBaseService, InvoiceCharge, InvoiceCoreLine, InvoiceDiscount, InvoiceLine, InvoiceOperationService, InvoiceService, InvoiceStatus, InvoiceType, Item, ItemSalesSummary, ItemService, KdsConfig, KioskSystemConfig, KitchenConfig, LabelConfig, LineOperationService, LineOptions, LoyaltyProgram, LoyaltyProgramSummary, MarketingConfig, Menu, MenuService, Merchant, MessageType, ModelPrefix, ModelType, ModifierSalesSummary, Node, NodePrinter, Not, Note, NoteEntity, NoteGroup, NoteGroupEntity, OnlineOrderConfig, OpenHours, OrderConfig, OrderDisplay, OrderDisplayService, OrderDisplayStatus, OrderDisplaySystemConfig, OrderFlow, PaxConfig, PayInvoiceOptions, Payment, PaymentConfig, PaymentMethod, PaymentMethodHistory, PaymentMethodService, PaymentService, PaymentStatus, PaymentSummary, PaynowMethod, Price, PrintAlign, PrintBarcode, PrintCommand, PrintImage, PrintJob, PrintJobService, PrintJobStatus, PrintQrcode, PrintSize, PrintStyle, PrintTemplate, PrintTemplateCore, PrintTemplateService, PrintType, Printer, PrinterConnections, PrinterProtocols, PrinterService, PrinterStatus, PrinterType, ProductBase, ProductPartialAssets, ProductPartialConfig, ProductService, ProductType, PushData, Raw, Receipt, RenderPrintTemplateOptions, Report, ReportCategory, ReportConfig, ReportData, ReportType, RoundingConfig, SalesSummary, Schedule, Section, SectionItem, SectionItemService, SectionItemStatus, SectionService, ServiceFactory, ServiceMode, ServiceOptions, Shift, ShiftService, ShiftStatus, SpecialDay, StandardPaymentMethod, StockChange, StockLog, StockLogEntityType, StockLogRefType, StockLogService, StockLogType, Storage, StorageService, Subcategory, SwitchInvoiceOptions, System, SystemError, TCategorySalesSummary, TDynamicOrderQR, TItemCoreSalesSummary, TItemSalesSummary, TModifierSalesSummary, TStockChange, TStockChangeItem, TStorageService, TaxConfig, TaxMethod, TemplateData, Till, TillConfig, TillService, TillType, UomType, UpdateGeneralConfigOptions, UpdateInvoiceOptions, User, UserConfig, type ValidationError, type ValidationResult, Visibility, VoidInvoiceOptions, createCSVExport, dbSchemas, filterByParams, humanizedData, importFromCSV, normalizedDate, transformer, validateSTTemplate };
6140
+ export { Address, AppBaseModel, AppConfig, AppCoreModel, AppCoreService, AppExtraModel, AppLocalService, AppMiscService, AppRemoteService, AppReport, AppReportService, Applying, AssetItem, AssetTags, AssetType, Between, BreakPeriod, Cache, CalcFlow, CalcType, CancelInvoiceOptions, CardPaymentCode, CashDrawerConfig, Category, CategorySalesSummary, CategoryService, CategoryType, Charge, ChargeConfig, CheckInvoiceOptions, Codepages, ComboGroup, ComboGroupItem, Condition, Config, ConfigService, CoreCategory, CoreItem, Coupon, CouponItemized, CouponUsage, CreateInvoiceOptions, CrmConfig, CurrencyConfig, CustomResponse, Customer, CustomerDisplaySystemConfig, DayOfWeek, DeployChannel, Device, DeviceEtc, DeviceType, DirectPayInvoiceOptions, DiscountType, DrawerSummary, ElectronSocket, Employee, EmployeeRole, EmployeeRoleService, EmployeeService, ErrorMsgs, EscPosCompatibility, EscPosPrinter, FileUploadRequest, GTOConfig, GeneralConfig, GetManyResult, Holiday, IAddress, IAppBase, IAppBaseModel, IAppConfig, IAppCore, IAppCoreModel, IAppCoreService, IAppExtra, IAppExtraModel, IAppLocalService, IAppMiscService, IAppModelSequence, IAppRemoteService, IAppReport, IAppReportService, IApplying, ICache, ICashDrawerConfig, ICategory, ICategoryService, IChangePaymentMethodOption, ICharge, IChargeConfig, IComboGroup, IComboGroupItem, IConfig, IConfigService, ICoreCategory, ICoreItem, ICoupon, ICouponItemized, ICouponUsage, ICredit, ICrmConfig, ICurrencyConfig, ICustomer, ICustomerDisplaySystemConfig, IDevice, IDiscount, IDrawerSummary, IEmployee, IEmployeeRole, IEmployeeRoleService, IEmployeeService, IEscPosPrinter, IEtc, IExportRow, IFileUploadRequest, IFileUploadResponse, IFontSize, IGeneralConfig, IGtoConfig, IInventoryConfig, IInvoice, IInvoiceActivity, IInvoiceBaseService, IInvoiceCharge, IInvoiceCoreLine, IInvoiceDiscount, IInvoiceLine, IInvoiceOperationService, IInvoiceService, IItem, IItemService, IKdsConfig, IKioskSystemConfig, IKitchenConfig, ILabelConfig, ILineOperationService, ILoyaltyProgram, ILoyaltyProgramSummary, IMarketing, IMenu, IMenuService, IMerchant, IMerchantAsset, INode, INodePrinter, INote, INoteEntity, INoteGroup, INoteGroupEntity, INoteGroupService, INoteService, IOnlineOrderConfig, IOrderConfig, IOrderDisplay, IOrderDisplayService, IOrderDisplaySystemConfig, IPaxConfig, IPayment, IPaymentConfig, IPaymentMethod, IPaymentMethodHistory, IPaymentMethodService, IPaymentService, IPaymentSummary, IPoint, IPrice, IPrintBarcode, IPrintCommand, IPrintCommandLine, IPrintImage, IPrintJob, IPrintJobService, IPrintQrcode, IPrintTable, IPrintTableRowItem, IPrintTemplate, IPrintTemplateCore, IPrintTemplateService, IPrintText, IPrinter, IPrinterService, IProductBase, IProductService, IPushData, IReceiptConfig, IRenderPrintTemplateOptions, IReport, IReportCategory, IReportConfig, IReportData, IReportRequest, IRoundingConfig, ISalesSummary, ISection, ISectionItem, ISectionItemService, ISectionService, IServiceOptions, IShift, IShiftService, IStandardPaymentMethod, IStockLog, IStockLogService, IStorage, ISubcategory, ISubcategoryService, ITaxConfig, ITemplateData, ITill, ITillConfig, ITillService, IUser, IUserConfig, IVisibility, In, Include, InventoryConfig, Invoice, InvoiceAction, InvoiceActivity, InvoiceBaseService, InvoiceCharge, InvoiceCoreLine, InvoiceDiscount, InvoiceLine, InvoiceOperationService, InvoiceService, InvoiceStatus, InvoiceType, Item, ItemSalesSummary, ItemService, KdsConfig, KioskSystemConfig, KitchenConfig, LabelConfig, LineOperationService, LineOptions, LoyaltyProgram, LoyaltyProgramSummary, MarketingConfig, Menu, MenuService, Merchant, MessageType, ModelPrefix, ModelType, ModifierSalesSummary, Node, NodePrinter, Not, Note, NoteEntity, NoteGroup, NoteGroupEntity, OnlineOrderConfig, OpenHours, OrderConfig, OrderDisplay, OrderDisplayService, OrderDisplayStatus, OrderDisplaySystemConfig, OrderFlow, PaxConfig, PayInvoiceOptions, Payment, PaymentConfig, PaymentMethod, PaymentMethodHistory, PaymentMethodService, PaymentService, PaymentStatus, PaymentSummary, PaynowMethod, Price, PrintAlign, PrintBarcode, PrintCommand, PrintImage, PrintJob, PrintJobService, PrintJobStatus, PrintQrcode, PrintSize, PrintStyle, PrintTemplate, PrintTemplateCore, PrintTemplateService, PrintType, Printer, PrinterConnections, PrinterProtocols, PrinterService, PrinterStatus, PrinterType, ProductBase, ProductPartialAssets, ProductPartialConfig, ProductService, ProductType, PushData, Raw, Receipt, RenderPrintTemplateOptions, Report, ReportCategory, ReportConfig, ReportData, ReportType, RoundingConfig, SalesSummary, Schedule, Section, SectionItem, SectionItemService, SectionItemStatus, SectionService, ServiceFactory, ServiceMode, ServiceOptions, Shift, ShiftService, ShiftStatus, SpecialDay, StandardPaymentMethod, StockChange, StockLog, StockLogEntityType, StockLogRefType, StockLogService, StockLogType, Storage, StorageService, Subcategory, SwitchInvoiceOptions, System, SystemError, TCategorySalesSummary, TDynamicOrderQR, TItemCoreSalesSummary, TItemSalesSummary, TModifierSalesSummary, TStockChange, TStockChangeItem, TStorageService, TaxConfig, TaxMethod, TemplateData, Till, TillConfig, TillService, TillType, UomType, UpdateGeneralConfigOptions, UpdateInvoiceOptions, User, UserConfig, type ValidationError, type ValidationResult, Visibility, VoidInvoiceOptions, createCSVExport, dbSchemas, filterByParams, humanizedData, importFromCSV, normalizedDate, transformer, validateSTTemplate };
6138
6141
  //# sourceMappingURL=index.d.ts.map