shopoflex-types 1.0.201 → 1.0.204

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/dist/common.d.ts CHANGED
@@ -63,7 +63,38 @@ export interface Address {
63
63
  details: string;
64
64
  }
65
65
  export interface PaymentMethod {
66
- type: "cash" | "card_terminal" | "knet" | "bank_transfer" | "wallet" | "external_link" | "crypto" | "whish" | "paypal" | "gift_card" | "stc_pay" | "benefit" | "apple_pay" | "google_pay" | "online_card";
66
+ type: string;
67
+ }
68
+ export interface PaymentMethodSettingField {
69
+ name: string;
70
+ label: string;
71
+ type: 'text' | 'password' | 'email' | 'url' | 'select';
72
+ required: boolean;
73
+ placeholder?: string;
74
+ description?: string;
75
+ options?: string[];
76
+ }
77
+ export interface PaymentMethodSettings {
78
+ requiredFields: PaymentMethodSettingField[];
79
+ documentation?: string;
80
+ }
81
+ export interface PaymentMethodInfo {
82
+ id: string;
83
+ name: string;
84
+ description: string;
85
+ icon: string;
86
+ type: 'standalone' | 'gateway_required';
87
+ mode: 'online' | 'offline' | 'hybrid';
88
+ channels: ('pos' | 'online')[];
89
+ isActive: boolean;
90
+ settings?: PaymentMethodSettings;
91
+ }
92
+ export interface VendorPaymentMethodConfig {
93
+ methodId: string;
94
+ isActive: boolean;
95
+ channels: ('pos' | 'online')[];
96
+ settings?: Record<string, any>;
97
+ methodInfo?: Pick<PaymentMethodInfo, 'name' | 'description' | 'icon' | 'type' | 'mode' | 'settings'>;
67
98
  }
68
99
  export interface OrderStatus {
69
100
  status: "pending" | "cancelled" | "rejected" | "refunded" | "preparing" | "delivering" | "completed" | "awaiting_payment";
@@ -454,7 +485,7 @@ export interface IPrintStyleSettings {
454
485
  footerMessage?: string;
455
486
  headerMessage?: string;
456
487
  showQRCode?: boolean;
457
- qrSource?: 'menu' | 'website' | 'custom';
488
+ qrSource?: 'menu' | 'website' | 'custom' | 'payment_link';
458
489
  customQrUrl?: string;
459
490
  qrLabel?: string;
460
491
  }
@@ -238,6 +238,7 @@ export interface OrderType {
238
238
  printed?: boolean;
239
239
  notes?: string;
240
240
  refunded?: boolean;
241
+ generatePaymentLink?: boolean;
241
242
  addTimelineEntry?(action: string, userId?: mongoose.Types.ObjectId | string): this;
242
243
  getWhoDidAction?(action: string): any;
243
244
  getUserTimeline?(userId: mongoose.Types.ObjectId | string): any[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shopoflex-types",
3
- "version": "1.0.201",
3
+ "version": "1.0.204",
4
4
  "description": "Shared TypeScript types for Shopoflex applications",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",