@posx/core 5.5.376 → 5.5.377

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
@@ -2437,6 +2437,8 @@ interface IPaymentMethod extends IAppBaseModel, IAppModelSequence {
2437
2437
  enable_receipt: boolean;
2438
2438
  /** Image URL */
2439
2439
  image_url: string;
2440
+ /** Custom Image URL */
2441
+ custom_image_url: string;
2440
2442
  /** Is Cash */
2441
2443
  is_cash: boolean;
2442
2444
  /** Is Integrated */
@@ -2468,6 +2470,7 @@ declare class PaymentMethod extends AppBaseModel implements IPaymentMethod {
2468
2470
  enable_drawer: boolean;
2469
2471
  enable_receipt: boolean;
2470
2472
  image_url: string;
2473
+ custom_image_url: string;
2471
2474
  is_cash: boolean;
2472
2475
  is_integrated: boolean;
2473
2476
  is_disabled: boolean;
@@ -5621,7 +5624,9 @@ interface IInvoiceOperationService extends ILineOperationService {
5621
5624
  *
5622
5625
  * @returns Promise<QueryResponse<IInvoice>> Response containing filtered invoices and total count
5623
5626
  */
5624
- autoQuery<T extends Record<string, any> = Record<string, never>>(query: QueryBuilder<IInvoice & T>): Promise<QueryResponse<IInvoice>>;
5627
+ autoQuery<T extends Record<string, any> = Record<string, never>>(query: QueryBuilder<IInvoice & T>, options?: {
5628
+ timeout?: number;
5629
+ }): Promise<QueryResponse<IInvoice>>;
5625
5630
  getRefId(): Promise<string>;
5626
5631
  /**
5627
5632
  * Change payments of an invoice
@@ -5673,7 +5678,9 @@ declare class InvoiceOperationService extends LineOperationService implements II
5673
5678
  addSalesPersonToInvoice(invoice: IInvoice, salesUserUid: string): IInvoice;
5674
5679
  addPaxToInvoice(invoice: IInvoice, pax: number): IInvoice;
5675
5680
  addCustomerToInvoice(invoice: IInvoice, customer: ICustomer): IInvoice;
5676
- autoQuery<T extends Record<string, any> = Record<string, never>>(query: QueryBuilder<IInvoice & T>): Promise<QueryResponse<IInvoice>>;
5681
+ autoQuery<T extends Record<string, any> = Record<string, never>>(query: QueryBuilder<IInvoice & T>, options?: {
5682
+ timeout?: number;
5683
+ }): Promise<QueryResponse<IInvoice>>;
5677
5684
  appendInvoice(mainInvoice: IInvoice, addOnInvoice: IInvoice): IInvoice;
5678
5685
  mergeInvoice(targetInvoice: IInvoice, sourceInvoice: IInvoice): Promise<IInvoice>;
5679
5686
  getRefId(): Promise<string>;
package/build/index.js CHANGED
@@ -1498,6 +1498,7 @@ var PaymentMethod = class extends AppBaseModel {
1498
1498
  _defineProperty(this, "enable_drawer", false);
1499
1499
  _defineProperty(this, "enable_receipt", false);
1500
1500
  _defineProperty(this, "image_url", "");
1501
+ _defineProperty(this, "custom_image_url", "");
1501
1502
  _defineProperty(this, "is_cash", false);
1502
1503
  _defineProperty(this, "is_integrated", false);
1503
1504
  _defineProperty(this, "is_disabled", true);
@@ -4325,8 +4326,11 @@ var InvoiceOperationService = class extends LineOperationService {
4325
4326
  invoice.customer = _.cloneDeep(customer);
4326
4327
  return invoice;
4327
4328
  }
4328
- async autoQuery(query) {
4329
- return await this.http.get(`sapi/v5/merchants/${this.options.merchant_uid}/${this.moduleName}`, { params: query.build() });
4329
+ async autoQuery(query, options) {
4330
+ return await this.http.get(`sapi/v5/merchants/${this.options.merchant_uid}/${this.moduleName}`, {
4331
+ params: query.build(),
4332
+ ...options
4333
+ });
4330
4334
  }
4331
4335
  appendInvoice(mainInvoice, addOnInvoice) {
4332
4336
  if (mainInvoice?.id_in_server == 0) return addOnInvoice;
@@ -5372,7 +5376,7 @@ var AppReportService = class extends AppRemoteService {
5372
5376
  reportData.humanized_end_datetime = humanizedData(new Date(request.end_datetime), datetimeFormat);
5373
5377
  reportData.humanized_printed_datetime = humanizedData(/* @__PURE__ */ new Date(), datetimeFormat);
5374
5378
  const query = new QueryBuilder().addParam("paid_at", "GreaterThanOrEqualTo", new Date(request.start_datetime).toISOString()).addParam("paid_at", "LessThanOrEqualTo", new Date(request.end_datetime).toISOString()).addParam("deleted_at", "IsNull", true).includeTotal(true);
5375
- const invoices = (await this.invoiceService.autoQuery(query)).results || [];
5379
+ const invoices = (await this.invoiceService.autoQuery(query, { timeout: 6e5 })).results || [];
5376
5380
  return this.processReportInvoicesData(reportData, invoices);
5377
5381
  }
5378
5382
  async processReportInvoicesData(reportData, invoices = []) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@posx/core",
3
- "version": "5.5.376",
3
+ "version": "5.5.377",
4
4
  "description": "POSX core libraries",
5
5
  "main": "./build/index.js",
6
6
  "author": "Steven Lee",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@posx/core",
3
- "version": "5.5.376",
3
+ "version": "5.5.377",
4
4
  "description": "POSX core libraries",
5
5
  "type": "module",
6
6
  "main": "./build/index.js",