@wtree/payload-ecommerce-coupon 3.76.1 → 3.76.3
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/README.md +97 -97
- package/dist/collections/createReferralCodesCollection.d.ts.map +1 -1
- package/dist/collections/createReferralProgramsCollection.d.ts.map +1 -1
- package/dist/components/PartnerDashboard/RecentReferrals.d.ts.map +1 -1
- package/dist/components/PartnerDashboard/index.d.ts.map +1 -1
- package/dist/endpoints/applyCoupon.d.ts.map +1 -1
- package/dist/endpoints/partnerStats.d.ts.map +1 -1
- package/dist/endpoints/validateCoupon.d.ts.map +1 -1
- package/dist/hooks/recalculateCart.d.ts.map +1 -1
- package/dist/index.js +275 -293
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +275 -293
- package/dist/index.mjs.map +1 -1
- package/dist/types.d.ts +0 -1
- package/dist/types.d.ts.map +1 -1
- package/dist/utilities/calculateValues.d.ts.map +1 -1
- package/dist/utilities/migrateReferralRulesV2.d.ts +6 -0
- package/dist/utilities/migrateReferralRulesV2.d.ts.map +1 -0
- package/dist/utilities/recordCouponUsageForOrder.d.ts +1 -1
- package/package.json +44 -47
package/README.md
CHANGED
|
@@ -65,9 +65,9 @@ npm install @wtree/payload-ecommerce-coupon
|
|
|
65
65
|
In your `payload.config.ts`:
|
|
66
66
|
|
|
67
67
|
```typescript
|
|
68
|
-
import { buildConfig } from
|
|
69
|
-
import { ecommercePlugin } from
|
|
70
|
-
import { payloadEcommerceCoupon } from
|
|
68
|
+
import { buildConfig } from "payload";
|
|
69
|
+
import { ecommercePlugin } from "@payloadcms/plugin-ecommerce";
|
|
70
|
+
import { payloadEcommerceCoupon } from "@wtree/payload-ecommerce-coupon";
|
|
71
71
|
|
|
72
72
|
export default buildConfig({
|
|
73
73
|
plugins: [
|
|
@@ -77,7 +77,7 @@ export default buildConfig({
|
|
|
77
77
|
payloadEcommerceCoupon({
|
|
78
78
|
enabled: true,
|
|
79
79
|
enableReferrals: true, // Enable referral system
|
|
80
|
-
defaultCurrency:
|
|
80
|
+
defaultCurrency: "USD",
|
|
81
81
|
|
|
82
82
|
// Referral-specific configuration
|
|
83
83
|
referralConfig: {
|
|
@@ -89,8 +89,8 @@ export default buildConfig({
|
|
|
89
89
|
|
|
90
90
|
// Custom admin panel groups
|
|
91
91
|
adminGroups: {
|
|
92
|
-
couponsGroup:
|
|
93
|
-
referralsGroup:
|
|
92
|
+
couponsGroup: "Coupons",
|
|
93
|
+
referralsGroup: "Referrals",
|
|
94
94
|
},
|
|
95
95
|
|
|
96
96
|
// Partner dashboard configuration
|
|
@@ -106,8 +106,8 @@ export default buildConfig({
|
|
|
106
106
|
access: {
|
|
107
107
|
canUseCoupons: () => true,
|
|
108
108
|
canUseReferrals: () => true,
|
|
109
|
-
isAdmin: ({ req }) => req.user?.role ===
|
|
110
|
-
isPartner: ({ req }) => req.user?.role ===
|
|
109
|
+
isAdmin: ({ req }) => req.user?.role === "admin",
|
|
110
|
+
isPartner: ({ req }) => req.user?.role === "partner",
|
|
111
111
|
},
|
|
112
112
|
|
|
113
113
|
// Optional: for per-customer coupon limit (defaults shown)
|
|
@@ -119,7 +119,7 @@ export default buildConfig({
|
|
|
119
119
|
// },
|
|
120
120
|
}),
|
|
121
121
|
],
|
|
122
|
-
})
|
|
122
|
+
});
|
|
123
123
|
```
|
|
124
124
|
|
|
125
125
|
### 2. Database Migration
|
|
@@ -142,37 +142,37 @@ To enable the partner dashboard and role-based access, add a `role` field to you
|
|
|
142
142
|
|
|
143
143
|
```typescript
|
|
144
144
|
// collections/Users.ts
|
|
145
|
-
import type { CollectionConfig } from
|
|
145
|
+
import type { CollectionConfig } from "payload";
|
|
146
146
|
|
|
147
147
|
export const Users: CollectionConfig = {
|
|
148
|
-
slug:
|
|
148
|
+
slug: "users",
|
|
149
149
|
auth: true,
|
|
150
150
|
fields: [
|
|
151
151
|
{
|
|
152
|
-
name:
|
|
153
|
-
type:
|
|
152
|
+
name: "role",
|
|
153
|
+
type: "select",
|
|
154
154
|
options: [
|
|
155
|
-
{ label:
|
|
156
|
-
{ label:
|
|
157
|
-
{ label:
|
|
155
|
+
{ label: "Admin", value: "admin" },
|
|
156
|
+
{ label: "Partner", value: "partner" },
|
|
157
|
+
{ label: "Customer", value: "customer" },
|
|
158
158
|
],
|
|
159
|
-
defaultValue:
|
|
159
|
+
defaultValue: "customer",
|
|
160
160
|
required: true,
|
|
161
161
|
},
|
|
162
162
|
// Or use multiple roles
|
|
163
163
|
{
|
|
164
|
-
name:
|
|
165
|
-
type:
|
|
164
|
+
name: "roles",
|
|
165
|
+
type: "select",
|
|
166
166
|
hasMany: true,
|
|
167
167
|
options: [
|
|
168
|
-
{ label:
|
|
169
|
-
{ label:
|
|
170
|
-
{ label:
|
|
168
|
+
{ label: "Admin", value: "admin" },
|
|
169
|
+
{ label: "Partner", value: "partner" },
|
|
170
|
+
{ label: "Customer", value: "customer" },
|
|
171
171
|
],
|
|
172
|
-
defaultValue: [
|
|
172
|
+
defaultValue: ["customer"],
|
|
173
173
|
},
|
|
174
174
|
],
|
|
175
|
-
}
|
|
175
|
+
};
|
|
176
176
|
```
|
|
177
177
|
|
|
178
178
|
### 4. Record Usage When Order Is Placed
|
|
@@ -190,11 +190,11 @@ Content-Type: application/json
|
|
|
190
190
|
**Option B – Use the server utility** (in your Payload config or Orders hook):
|
|
191
191
|
|
|
192
192
|
```typescript
|
|
193
|
-
import { recordCouponUsageForOrder } from
|
|
193
|
+
import { recordCouponUsageForOrder } from "@wtree/payload-ecommerce-coupon";
|
|
194
194
|
|
|
195
195
|
// In your Orders collection afterChange hook, when order is paid/completed:
|
|
196
|
-
if (doc.paymentStatus ===
|
|
197
|
-
await recordCouponUsageForOrder(payload, doc, pluginConfig)
|
|
196
|
+
if (doc.paymentStatus === "paid" && (doc.appliedCoupon || doc.appliedReferralCode)) {
|
|
197
|
+
await recordCouponUsageForOrder(payload, doc, pluginConfig);
|
|
198
198
|
}
|
|
199
199
|
```
|
|
200
200
|
|
|
@@ -217,10 +217,10 @@ if (doc.paymentStatus === 'paid' && (doc.appliedCoupon || doc.appliedReferralCod
|
|
|
217
217
|
- The plugin writes the reduced `total` when a code is applied. If your host app recalculates the cart total (e.g. in a `beforeChange` hook when items change), use the formula **total = subtotal − discountAmount − customerDiscount** so the discount is not overwritten. Use the provided helper in your Carts collection:
|
|
218
218
|
|
|
219
219
|
```typescript
|
|
220
|
-
import { getCartTotalWithDiscounts } from
|
|
220
|
+
import { getCartTotalWithDiscounts } from "@wtree/payload-ecommerce-coupon";
|
|
221
221
|
|
|
222
222
|
// In your Carts collection beforeChange hook, after setting items/subtotal:
|
|
223
|
-
data.total = getCartTotalWithDiscounts(data)
|
|
223
|
+
data.total = getCartTotalWithDiscounts(data);
|
|
224
224
|
```
|
|
225
225
|
|
|
226
226
|
- **Optional config** for per-customer limit: `orderIntegration` with `ordersSlug`, `orderCustomerEmailField`, `orderPaymentStatusField`, `orderPaidStatusValue` (defaults: `'orders'`, `'customerEmail'`, `'paymentStatus'`, `'paid'`).
|
|
@@ -464,69 +464,69 @@ curl -X GET http://localhost:3000/api/referrals/partner-stats \
|
|
|
464
464
|
|
|
465
465
|
```typescript
|
|
466
466
|
export type CouponPluginOptions = {
|
|
467
|
-
enabled?: boolean // Enable/disable the plugin (default: true)
|
|
468
|
-
enableReferrals?: boolean // Enable referral system (default: false)
|
|
469
|
-
allowStackWithOtherCoupons?: boolean // Allow multiple coupons (default: false)
|
|
470
|
-
defaultCurrency?: string // Currency code (default: 'USD')
|
|
471
|
-
autoIntegrate?: boolean // Auto-extend carts/orders (default: true)
|
|
467
|
+
enabled?: boolean; // Enable/disable the plugin (default: true)
|
|
468
|
+
enableReferrals?: boolean; // Enable referral system (default: false)
|
|
469
|
+
allowStackWithOtherCoupons?: boolean; // Allow multiple coupons (default: false)
|
|
470
|
+
defaultCurrency?: string; // Currency code (default: 'USD')
|
|
471
|
+
autoIntegrate?: boolean; // Auto-extend carts/orders (default: true)
|
|
472
472
|
|
|
473
473
|
collections?: {
|
|
474
|
-
couponsSlug?: string // Default: 'coupons'
|
|
475
|
-
referralProgramsSlug?: string // Default: 'referral-programs'
|
|
476
|
-
referralCodesSlug?: string // Default: 'referral-codes'
|
|
474
|
+
couponsSlug?: string; // Default: 'coupons'
|
|
475
|
+
referralProgramsSlug?: string; // Default: 'referral-programs'
|
|
476
|
+
referralCodesSlug?: string; // Default: 'referral-codes'
|
|
477
477
|
|
|
478
478
|
/** Override the default coupons collection configuration */
|
|
479
|
-
couponsCollectionOverride?: (params: { defaultCollection: any }) => any | Promise<any
|
|
479
|
+
couponsCollectionOverride?: (params: { defaultCollection: any }) => any | Promise<any>;
|
|
480
480
|
|
|
481
481
|
/** Override the default referral programs collection configuration */
|
|
482
|
-
referralProgramsCollectionOverride?: (params: { defaultCollection: any }) => any | Promise<any
|
|
482
|
+
referralProgramsCollectionOverride?: (params: { defaultCollection: any }) => any | Promise<any>;
|
|
483
483
|
|
|
484
484
|
/** Override the default referral codes collection configuration */
|
|
485
|
-
referralCodesCollectionOverride?: (params: { defaultCollection: any }) => any | Promise<any
|
|
486
|
-
}
|
|
485
|
+
referralCodesCollectionOverride?: (params: { defaultCollection: any }) => any | Promise<any>;
|
|
486
|
+
};
|
|
487
487
|
|
|
488
488
|
endpoints?: {
|
|
489
|
-
applyCoupon?: string // Default: '/coupons/apply'
|
|
490
|
-
validateCoupon?: string // Default: '/coupons/validate'
|
|
491
|
-
partnerStats?: string // Default: '/referrals/partner-stats'
|
|
492
|
-
recordOrderUsage?: string // Default: '/coupons/record-order-usage'
|
|
493
|
-
}
|
|
489
|
+
applyCoupon?: string; // Default: '/coupons/apply'
|
|
490
|
+
validateCoupon?: string; // Default: '/coupons/validate'
|
|
491
|
+
partnerStats?: string; // Default: '/referrals/partner-stats'
|
|
492
|
+
recordOrderUsage?: string; // Default: '/coupons/record-order-usage'
|
|
493
|
+
};
|
|
494
494
|
|
|
495
495
|
access?: {
|
|
496
|
-
canUseCoupons?: Access // Who can use coupons
|
|
497
|
-
canUseReferrals?: Access // Who can use referrals
|
|
498
|
-
isAdmin?: Access // Who can manage codes/programs
|
|
499
|
-
isPartner?: Access // Who has partner access
|
|
500
|
-
}
|
|
496
|
+
canUseCoupons?: Access; // Who can use coupons
|
|
497
|
+
canUseReferrals?: Access; // Who can use referrals
|
|
498
|
+
isAdmin?: Access; // Who can manage codes/programs
|
|
499
|
+
isPartner?: Access; // Who has partner access
|
|
500
|
+
};
|
|
501
501
|
|
|
502
502
|
referralConfig?: {
|
|
503
|
-
allowBothSystems?: boolean // Allow coupons + referrals (default: false)
|
|
504
|
-
singleCodePerCart?: boolean // One code per order (default: true)
|
|
505
|
-
defaultPartnerSplit?: number // Default partner % (default: 70)
|
|
506
|
-
defaultCustomerSplit?: number // Default customer % (default: 30)
|
|
507
|
-
}
|
|
503
|
+
allowBothSystems?: boolean; // Allow coupons + referrals (default: false)
|
|
504
|
+
singleCodePerCart?: boolean; // One code per order (default: true)
|
|
505
|
+
defaultPartnerSplit?: number; // Default partner % (default: 70)
|
|
506
|
+
defaultCustomerSplit?: number; // Default customer % (default: 30)
|
|
507
|
+
};
|
|
508
508
|
|
|
509
509
|
adminGroups?: {
|
|
510
|
-
couponsGroup?: string // Admin group for coupons (default: 'Coupons')
|
|
511
|
-
referralsGroup?: string // Admin group for referrals (default: 'Referrals')
|
|
512
|
-
}
|
|
510
|
+
couponsGroup?: string; // Admin group for coupons (default: 'Coupons')
|
|
511
|
+
referralsGroup?: string; // Admin group for referrals (default: 'Referrals')
|
|
512
|
+
};
|
|
513
513
|
|
|
514
514
|
partnerDashboard?: {
|
|
515
|
-
enabled?: boolean // Enable dashboard (default: true)
|
|
516
|
-
showEarningsSummary?: boolean // Show earnings widget (default: true)
|
|
517
|
-
showReferralPerformance?: boolean // Show performance widget (default: true)
|
|
518
|
-
showRecentReferrals?: boolean // Show recent referrals (default: true)
|
|
519
|
-
showCommissionBreakdown?: boolean // Show breakdown (default: true)
|
|
520
|
-
}
|
|
515
|
+
enabled?: boolean; // Enable dashboard (default: true)
|
|
516
|
+
showEarningsSummary?: boolean; // Show earnings widget (default: true)
|
|
517
|
+
showReferralPerformance?: boolean; // Show performance widget (default: true)
|
|
518
|
+
showRecentReferrals?: boolean; // Show recent referrals (default: true)
|
|
519
|
+
showCommissionBreakdown?: boolean; // Show breakdown (default: true)
|
|
520
|
+
};
|
|
521
521
|
|
|
522
522
|
/** Optional: for per-customer coupon limit (query paid orders by customer) */
|
|
523
523
|
orderIntegration?: {
|
|
524
|
-
ordersSlug?: string // Default: 'orders'
|
|
525
|
-
orderCustomerEmailField?: string // Default: 'customerEmail'
|
|
526
|
-
orderPaymentStatusField?: string // Default: 'paymentStatus'
|
|
527
|
-
orderPaidStatusValue?: string // Default: 'paid'
|
|
528
|
-
}
|
|
529
|
-
}
|
|
524
|
+
ordersSlug?: string; // Default: 'orders'
|
|
525
|
+
orderCustomerEmailField?: string; // Default: 'customerEmail'
|
|
526
|
+
orderPaymentStatusField?: string; // Default: 'paymentStatus'
|
|
527
|
+
orderPaidStatusValue?: string; // Default: 'paid'
|
|
528
|
+
};
|
|
529
|
+
};
|
|
530
530
|
```
|
|
531
531
|
|
|
532
532
|
### **Collection Overrides**
|
|
@@ -544,9 +544,9 @@ payloadEcommerceCoupon({
|
|
|
544
544
|
...defaultCollection.fields,
|
|
545
545
|
// Add custom field to coupons
|
|
546
546
|
{
|
|
547
|
-
name:
|
|
548
|
-
type:
|
|
549
|
-
label:
|
|
547
|
+
name: "customField",
|
|
548
|
+
type: "text",
|
|
549
|
+
label: "Custom Field",
|
|
550
550
|
},
|
|
551
551
|
],
|
|
552
552
|
hooks: {
|
|
@@ -556,11 +556,11 @@ payloadEcommerceCoupon({
|
|
|
556
556
|
...(defaultCollection.hooks?.beforeChange || []),
|
|
557
557
|
async ({ data, req, operation }) => {
|
|
558
558
|
// Custom beforeChange logic
|
|
559
|
-
return data
|
|
559
|
+
return data;
|
|
560
560
|
},
|
|
561
561
|
],
|
|
562
562
|
},
|
|
563
|
-
}
|
|
563
|
+
};
|
|
564
564
|
},
|
|
565
565
|
|
|
566
566
|
// Override referral programs collection
|
|
@@ -569,9 +569,9 @@ payloadEcommerceCoupon({
|
|
|
569
569
|
...defaultCollection,
|
|
570
570
|
admin: {
|
|
571
571
|
...defaultCollection.admin,
|
|
572
|
-
defaultColumns: [
|
|
572
|
+
defaultColumns: ["name", "isActive", "totalReferrals"],
|
|
573
573
|
},
|
|
574
|
-
}
|
|
574
|
+
};
|
|
575
575
|
},
|
|
576
576
|
|
|
577
577
|
// Override referral codes collection
|
|
@@ -581,17 +581,17 @@ payloadEcommerceCoupon({
|
|
|
581
581
|
fields: [
|
|
582
582
|
...defaultCollection.fields,
|
|
583
583
|
{
|
|
584
|
-
name:
|
|
585
|
-
type:
|
|
586
|
-
label:
|
|
587
|
-
options: [
|
|
588
|
-
defaultValue:
|
|
584
|
+
name: "customCodeField",
|
|
585
|
+
type: "select",
|
|
586
|
+
label: "Custom Code Type",
|
|
587
|
+
options: ["standard", "premium"],
|
|
588
|
+
defaultValue: "standard",
|
|
589
589
|
},
|
|
590
590
|
],
|
|
591
|
-
}
|
|
591
|
+
};
|
|
592
592
|
},
|
|
593
593
|
},
|
|
594
|
-
})
|
|
594
|
+
});
|
|
595
595
|
```
|
|
596
596
|
|
|
597
597
|
### **Access Control Examples**
|
|
@@ -606,18 +606,18 @@ payloadEcommerceCoupon({
|
|
|
606
606
|
canUseReferrals: ({ req }) => Boolean(req.user),
|
|
607
607
|
|
|
608
608
|
// Only admins can manage
|
|
609
|
-
isAdmin: ({ req }) => req.user?.role ===
|
|
609
|
+
isAdmin: ({ req }) => req.user?.role === "admin",
|
|
610
610
|
|
|
611
611
|
// Partner role check (supports both single role and array)
|
|
612
612
|
isPartner: ({ req }) => {
|
|
613
|
-
const user = req.user
|
|
614
|
-
if (!user) return false
|
|
615
|
-
if (user.role ===
|
|
616
|
-
if (Array.isArray(user.roles) && user.roles.includes(
|
|
617
|
-
return false
|
|
613
|
+
const user = req.user;
|
|
614
|
+
if (!user) return false;
|
|
615
|
+
if (user.role === "partner") return true;
|
|
616
|
+
if (Array.isArray(user.roles) && user.roles.includes("partner")) return true;
|
|
617
|
+
return false;
|
|
618
618
|
},
|
|
619
619
|
},
|
|
620
|
-
})
|
|
620
|
+
});
|
|
621
621
|
```
|
|
622
622
|
|
|
623
623
|
## 📦 API Reference
|
|
@@ -640,7 +640,7 @@ import {
|
|
|
640
640
|
|
|
641
641
|
// Server-only: record usage when order is placed
|
|
642
642
|
recordCouponUsageForOrder,
|
|
643
|
-
} from
|
|
643
|
+
} from "@wtree/payload-ecommerce-coupon";
|
|
644
644
|
```
|
|
645
645
|
|
|
646
646
|
Dashboard components (`PartnerDashboard`, `EarningsSummary`, `ReferralPerformance`, `RecentReferrals`, `ReferralCodes`) are available from the package source; see [Partner Dashboard docs](./docs/partner-dashboard.md) for usage.
|
|
@@ -650,9 +650,9 @@ Dashboard components (`PartnerDashboard`, `EarningsSummary`, `ReferralPerformanc
|
|
|
650
650
|
You can use the collection creation functions directly in your Payload config to customize collections before they're added to the config.
|
|
651
651
|
|
|
652
652
|
```typescript
|
|
653
|
-
import { buildConfig } from
|
|
654
|
-
import { ecommercePlugin } from
|
|
655
|
-
import { payloadEcommerceCoupon, createCouponsCollection } from
|
|
653
|
+
import { buildConfig } from "payload";
|
|
654
|
+
import { ecommercePlugin } from "@payloadcms/plugin-ecommerce";
|
|
655
|
+
import { payloadEcommerceCoupon, createCouponsCollection } from "@wtree/payload-ecommerce-coupon";
|
|
656
656
|
|
|
657
657
|
export default buildConfig({
|
|
658
658
|
plugins: [
|
|
@@ -666,7 +666,7 @@ export default buildConfig({
|
|
|
666
666
|
collections: [
|
|
667
667
|
// The plugin adds collections automatically; use overrides in plugin config to customize
|
|
668
668
|
],
|
|
669
|
-
})
|
|
669
|
+
});
|
|
670
670
|
```
|
|
671
671
|
|
|
672
672
|
## 🎨 Partner Dashboard
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createReferralCodesCollection.d.ts","sourceRoot":"","sources":["../../src/collections/createReferralCodesCollection.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAA;AAE/C,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,UAAU,CAAA;AAE5D,eAAO,MAAM,6BAA6B,GACxC,cAAc,4BAA4B,KACzC,
|
|
1
|
+
{"version":3,"file":"createReferralCodesCollection.d.ts","sourceRoot":"","sources":["../../src/collections/createReferralCodesCollection.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAA;AAE/C,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,UAAU,CAAA;AAE5D,eAAO,MAAM,6BAA6B,GACxC,cAAc,4BAA4B,KACzC,gBA+LF,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createReferralProgramsCollection.d.ts","sourceRoot":"","sources":["../../src/collections/createReferralProgramsCollection.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAA;AAE/C,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,UAAU,CAAA;
|
|
1
|
+
{"version":3,"file":"createReferralProgramsCollection.d.ts","sourceRoot":"","sources":["../../src/collections/createReferralProgramsCollection.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAA;AAE/C,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,UAAU,CAAA;AAwB5D,eAAO,MAAM,gCAAgC,GAC3C,cAAc,4BAA4B,KACzC,gBA6PF,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RecentReferrals.d.ts","sourceRoot":"","sources":["../../../src/components/PartnerDashboard/RecentReferrals.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAE/C,MAAM,MAAM,oBAAoB,GAAG;IACjC,SAAS,EAAE,YAAY,CAAC,iBAAiB,CAAC,CAAA;IAC1C,QAAQ,EAAE,MAAM,CAAA;CACjB,CAAA;AAkBD,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,
|
|
1
|
+
{"version":3,"file":"RecentReferrals.d.ts","sourceRoot":"","sources":["../../../src/components/PartnerDashboard/RecentReferrals.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAE/C,MAAM,MAAM,oBAAoB,GAAG;IACjC,SAAS,EAAE,YAAY,CAAC,iBAAiB,CAAC,CAAA;IAC1C,QAAQ,EAAE,MAAM,CAAA;CACjB,CAAA;AAkBD,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CAoC1D,CAAA;AAED,eAAe,eAAe,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/PartnerDashboard/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAA8B,MAAM,OAAO,CAAA;AASlD,OAAO,cAAc,CAAA;AAErB,MAAM,MAAM,qBAAqB,GAAG;IAClC,mBAAmB,CAAC,EAAE,OAAO,CAAA;IAC7B,uBAAuB,CAAC,EAAE,OAAO,CAAA;IACjC,mBAAmB,CAAC,EAAE,OAAO,CAAA;IAC7B,iBAAiB,CAAC,EAAE,OAAO,CAAA;IAC3B,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB,CAAA;AAED,eAAO,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,qBAAqB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/PartnerDashboard/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAA8B,MAAM,OAAO,CAAA;AASlD,OAAO,cAAc,CAAA;AAErB,MAAM,MAAM,qBAAqB,GAAG;IAClC,mBAAmB,CAAC,EAAE,OAAO,CAAA;IAC7B,uBAAuB,CAAC,EAAE,OAAO,CAAA;IACjC,mBAAmB,CAAC,EAAE,OAAO,CAAA;IAC7B,iBAAiB,CAAC,EAAE,OAAO,CAAA;IAC3B,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB,CAAA;AAED,eAAO,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,qBAAqB,CAqH5D,CAAA;AAED,eAAe,gBAAgB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"applyCoupon.d.ts","sourceRoot":"","sources":["../../src/endpoints/applyCoupon.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AACvD,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,UAAU,CAAA;AAO5D,KAAK,IAAI,GAAG;IACV,YAAY,EAAE,4BAA4B,CAAA;CAC3C,CAAA;
|
|
1
|
+
{"version":3,"file":"applyCoupon.d.ts","sourceRoot":"","sources":["../../src/endpoints/applyCoupon.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AACvD,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,UAAU,CAAA;AAO5D,KAAK,IAAI,GAAG;IACV,YAAY,EAAE,4BAA4B,CAAA;CAC3C,CAAA;AAcD,eAAO,MAAM,kBAAkB,GAC5B,kBAAkB,IAAI,KAAG,cAyFzB,CAAA;AA4SH,eAAO,MAAM,mBAAmB,GAAI,kBAAkB,IAAI,KAAG,QAI3D,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"partnerStats.d.ts","sourceRoot":"","sources":["../../src/endpoints/partnerStats.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAEvD,OAAO,KAAK,EAAsC,4BAA4B,EAAE,MAAM,UAAU,CAAA;AAEhG,KAAK,IAAI,GAAG;IACV,YAAY,EAAE,4BAA4B,CAAA;CAC3C,CAAA;AAED,eAAO,MAAM,mBAAmB,GAC7B,kBAAkB,IAAI,KAAG,
|
|
1
|
+
{"version":3,"file":"partnerStats.d.ts","sourceRoot":"","sources":["../../src/endpoints/partnerStats.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAEvD,OAAO,KAAK,EAAsC,4BAA4B,EAAE,MAAM,UAAU,CAAA;AAEhG,KAAK,IAAI,GAAG;IACV,YAAY,EAAE,4BAA4B,CAAA;CAC3C,CAAA;AAED,eAAO,MAAM,mBAAmB,GAC7B,kBAAkB,IAAI,KAAG,cA8KzB,CAAA;AAEH,eAAO,MAAM,oBAAoB,GAAI,kBAAkB,IAAI,KAAG,QAI5D,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validateCoupon.d.ts","sourceRoot":"","sources":["../../src/endpoints/validateCoupon.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAEvD,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,UAAU,CAAA;
|
|
1
|
+
{"version":3,"file":"validateCoupon.d.ts","sourceRoot":"","sources":["../../src/endpoints/validateCoupon.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAEvD,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,UAAU,CAAA;AAI5D,KAAK,IAAI,GAAG;IACV,YAAY,EAAE,4BAA4B,CAAA;CAC3C,CAAA;AAED,eAAO,MAAM,qBAAqB,GAC/B,kBAAkB,IAAI,KAAG,cAkCzB,CAAA;AA2QH,eAAO,MAAM,sBAAsB,GAAI,kBAAkB,IAAI,KAAG,QAI9D,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"recalculateCart.d.ts","sourceRoot":"","sources":["../../src/hooks/recalculateCart.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,SAAS,CAAA;AACzD,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,UAAU,CAAA;AAQ5D,eAAO,MAAM,mBAAmB,GAC7B,cAAc,4BAA4B,KAAG,
|
|
1
|
+
{"version":3,"file":"recalculateCart.d.ts","sourceRoot":"","sources":["../../src/hooks/recalculateCart.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,SAAS,CAAA;AACzD,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,UAAU,CAAA;AAQ5D,eAAO,MAAM,mBAAmB,GAC7B,cAAc,4BAA4B,KAAG,0BAiO7C,CAAA"}
|