shopoflex-types 1.0.83 → 1.0.85

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.
Files changed (2) hide show
  1. package/dist/common.d.ts +12 -25
  2. package/package.json +1 -1
package/dist/common.d.ts CHANGED
@@ -177,22 +177,6 @@ export interface Specification {
177
177
  active: boolean;
178
178
  values: any[];
179
179
  }
180
- export interface AddonType {
181
- _id: string;
182
- name: {
183
- en: string;
184
- ar: string;
185
- };
186
- price: number;
187
- enableQuantity?: boolean;
188
- stockHandle: StockHandle;
189
- files?: FileType[];
190
- sortOrder?: number;
191
- isActive: boolean;
192
- vendorId: string | any;
193
- createdAt?: Date;
194
- updatedAt?: Date;
195
- }
196
180
  export interface Modifier {
197
181
  name?: {
198
182
  en?: string;
@@ -204,7 +188,8 @@ export interface Modifier {
204
188
  minSelect?: number;
205
189
  active?: boolean;
206
190
  addons?: {
207
- addonId: AddonType | any;
191
+ productId?: any;
192
+ variantId?: any;
208
193
  enableQuantity?: boolean;
209
194
  priceOverride?: number;
210
195
  }[];
@@ -509,20 +494,22 @@ export interface Vendor {
509
494
  users: Array<unknown>;
510
495
  areas: Record<string, unknown>;
511
496
  payments: VendorPayments;
512
- subscription: {
513
- planId: string | null;
514
- planName: string;
515
- status: 'trial' | 'active' | 'cancelled' | 'expired';
516
- startDate: Date;
517
- nextBillingDate: Date;
518
- trialEndDate: Date;
519
- autoRenewal: boolean;
497
+ wallet: {
498
+ balance: number;
499
+ currency: string;
500
+ commissionRates: {
501
+ ecommerce: number;
502
+ pos: number;
503
+ };
520
504
  };
521
505
  usage: {
522
506
  productsCount: number;
523
507
  branchesCount: number;
524
508
  usersCount: number;
525
509
  };
510
+ addToWallet(amount: number): Promise<this>;
511
+ deductCommission(orderValue: number, source?: 'pos' | 'online'): Promise<this>;
512
+ canProcessOrder(orderValue: number, source?: 'pos' | 'online'): boolean;
526
513
  }
527
514
  export interface NotificationType {
528
515
  _id?: any;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shopoflex-types",
3
- "version": "1.0.83",
3
+ "version": "1.0.85",
4
4
  "description": "Shared TypeScript types for Shopoflex applications",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",