@posx/core 5.5.71 → 5.5.72

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
@@ -428,7 +428,7 @@ declare module '@posx/core/services/app.service' {
428
428
  import { AppRemoteService, IAppRemoteService, IAppModelSequence } from '@posx/core/services/abstract.service';
429
429
  import { IAppConfig, IConfig, UpdateGeneralConfigOptions, ICache } from '@posx/core/types/config.type';
430
430
  import { IPrintJob, IPrintTemplate, IPrinter, IRenderPrintTemplateOptions, RenderPrintTemplateOptions } from '@posx/core/types/printer.type';
431
- import { IPayment, IPaymentMethod, IPaymentSyncData } from '@posx/core/types/payment.type';
431
+ import { IPayment, IPaymentMethod } from '@posx/core/types/payment.type';
432
432
  import { INote, INoteGroup } from '@posx/core/types/note.type';
433
433
  import { ISection, ISectionItem } from '@posx/core/types/section.type';
434
434
  import { Category, ICategory, ICoreItem, IItem, ISubcategory } from '@posx/core/types/product.type';
@@ -835,49 +835,16 @@ declare module '@posx/core/services/app.service' {
835
835
  * @returns A promise that resolves to the updated invoice.
836
836
  */
837
837
  removePayment(invoice: IInvoice, payment_uid: string): Promise<IInvoice>;
838
- /**
839
- * Sync payment status callback function type
840
- */
841
- onPaymentSync?: (data: IPaymentSyncData) => Promise<void>;
842
- /**
843
- * Sync payment status to external systems
844
- * @param data - Payment sync data
845
- */
846
- syncPaymentStatus(data: IPaymentSyncData): Promise<void>;
847
838
  }
848
- /**
849
- * Payment Service implementation
850
- *
851
- * Usage example for CDS payment status sync:
852
- * ```typescript
853
- * // Setup payment sync callback
854
- * paymentService.onPaymentSync = async (data: IPaymentSyncData) => {
855
- * // Send to CDS or other external systems
856
- * console.log('Payment status:', data.status, 'for payment:', data.payment_uid);
857
- * };
858
- *
859
- * // Manual payment status sync (for external payment flows)
860
- * await paymentService.syncPaymentStatus({
861
- * payment_uid: 'payment_123',
862
- * invoice_uid: 'invoice_456',
863
- * status: PaymentStatus.STARTED,
864
- * payment_method: paymentMethod,
865
- * amount: 100.00,
866
- * timestamp: new Date()
867
- * });
868
- * ```
869
- */
870
839
  export class PaymentService extends AppRemoteService<IPayment> implements IPaymentService {
871
840
  readonly http: AxiosInstance;
872
841
  readonly db: Dexie;
873
842
  readonly options: IServiceOptions;
874
843
  readonly moduleName: string;
875
844
  readonly methodName: string;
876
- onPaymentSync?: (data: IPaymentSyncData) => Promise<void>;
877
845
  constructor(http: AxiosInstance, db: Dexie, options: IServiceOptions, moduleName?: string, methodName?: string);
878
846
  addPayment(invoice: IInvoice, amount: number, paymentMethod: IPaymentMethod): Promise<IInvoice>;
879
847
  removePayment(invoice: IInvoice, payment_uid: string): Promise<IInvoice>;
880
- syncPaymentStatus(data: IPaymentSyncData): Promise<void>;
881
848
  }
882
849
  /**
883
850
  * Represents the interface for the AppMiscService.
@@ -2490,11 +2457,6 @@ declare module '@posx/core/types/hub.message.type' {
2490
2457
  SmoochPaymentEvent = "smooch_payment_event",
2491
2458
  SyncInvoice = "sync_invoice"
2492
2459
  }
2493
- export enum PaymentStatus {
2494
- STARTED = "payment_started",
2495
- COMPLETED = "payment_completed",
2496
- FAILED = "payment_failed"
2497
- }
2498
2460
  export type HubMessage<T> = {
2499
2461
  type: HubMessageType | string;
2500
2462
  data: T;
@@ -3370,41 +3332,9 @@ declare module '@posx/core/types/payment.type' {
3370
3332
  */
3371
3333
  export enum PaymentStatus {
3372
3334
  STARTED = "payment_started",
3373
- PROCESSING = "payment_processing",
3374
3335
  COMPLETED = "payment_completed",
3375
3336
  FAILED = "payment_failed"
3376
3337
  }
3377
- /**
3378
- * Payment sync data interface
3379
- */
3380
- export interface IPaymentSyncData {
3381
- /** Payment unique identifier */
3382
- payment_uid: string;
3383
- /** Associated invoice ID */
3384
- invoice_uid: string;
3385
- /** Table ID */
3386
- table_uid?: string;
3387
- /** Payment status */
3388
- status: PaymentStatus;
3389
- /** Payment method */
3390
- payment_method: IPaymentMethod;
3391
- /** Payment amount */
3392
- amount: number;
3393
- /** Actual tender amount */
3394
- tender_amount?: number;
3395
- /** Change amount */
3396
- change_amount?: number;
3397
- /** Payment result */
3398
- result?: 'success' | 'failed';
3399
- /** Error message */
3400
- error_message?: string;
3401
- /** Timestamp */
3402
- timestamp: Date;
3403
- /** Employee UID */
3404
- employee_uid?: string;
3405
- /** Terminal ID */
3406
- terminal_id?: string;
3407
- }
3408
3338
 
3409
3339
  }
3410
3340
  declare module '@posx/core/types/printer.type' {