@wtree/payload-ecommerce-coupon 3.78.7 → 3.78.9
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/collections/createReferralProgramsCollection.d.ts +11 -0
- package/dist/collections/createReferralProgramsCollection.d.ts.map +1 -1
- package/dist/endpoints/applyCoupon.d.ts.map +1 -1
- package/dist/endpoints/validateCoupon.d.ts.map +1 -1
- package/dist/index.js +241 -179
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +241 -179
- package/dist/index.mjs.map +1 -1
- package/dist/utilities/calculateValues.d.ts +18 -1
- package/dist/utilities/calculateValues.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,15 @@
|
|
|
1
1
|
import { type CollectionConfig } from 'payload';
|
|
2
2
|
import type { SanitizedCouponPluginOptions } from '../types';
|
|
3
|
+
/**
|
|
4
|
+
* Scaling policy:
|
|
5
|
+
* - Admin inputs normal currency values (e.g. 100 means $100).
|
|
6
|
+
* - Internally, maxPartnerCommissionPerOrder, maxCustomerDiscountPerOrder, and
|
|
7
|
+
* minOrderAmount are stored in x100 (integer cents) form to avoid floating-point
|
|
8
|
+
* drift on monetary cap fields.
|
|
9
|
+
* - beforeChange → multiply by 100 before persisting.
|
|
10
|
+
* - afterRead → divide by 100 before returning to admin / calculation code.
|
|
11
|
+
* - partnerAmount / customerAmount per-rule fixed amounts are NOT scaled here;
|
|
12
|
+
* they represent per-item fixed currency amounts and are stored as-is.
|
|
13
|
+
*/
|
|
3
14
|
export declare const createReferralProgramsCollection: (pluginConfig: SanitizedCouponPluginOptions) => CollectionConfig;
|
|
4
15
|
//# sourceMappingURL=createReferralProgramsCollection.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createReferralProgramsCollection.d.ts","sourceRoot":"","sources":["../../src/collections/createReferralProgramsCollection.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,KAAK,gBAAgB,EAAE,MAAM,SAAS,CAAA;AAEzD,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,EAAY,KAAK,gBAAgB,EAAE,MAAM,SAAS,CAAA;AAEzD,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,UAAU,CAAA;AAsB5D;;;;;;;;;;GAUG;AAEH,eAAO,MAAM,gCAAgC,GAC3C,cAAc,4BAA4B,KACzC,gBAkcF,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"applyCoupon.d.ts","sourceRoot":"","sources":["../../src/endpoints/applyCoupon.ts"],"names":[],"mappings":"AAAA,OAAO,EAA2B,KAAK,QAAQ,EAAE,KAAK,cAAc,EAAE,MAAM,SAAS,CAAA;AACrF,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,UAAU,CAAA;AAQ5D,KAAK,IAAI,GAAG;IACV,YAAY,EAAE,4BAA4B,CAAA;CAC3C,CAAA;AAqGD,eAAO,MAAM,kBAAkB,GAC5B,kBAAkB,IAAI,KAAG,cAgHzB,CAAA;
|
|
1
|
+
{"version":3,"file":"applyCoupon.d.ts","sourceRoot":"","sources":["../../src/endpoints/applyCoupon.ts"],"names":[],"mappings":"AAAA,OAAO,EAA2B,KAAK,QAAQ,EAAE,KAAK,cAAc,EAAE,MAAM,SAAS,CAAA;AACrF,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,UAAU,CAAA;AAQ5D,KAAK,IAAI,GAAG;IACV,YAAY,EAAE,4BAA4B,CAAA;CAC3C,CAAA;AAqGD,eAAO,MAAM,kBAAkB,GAC5B,kBAAkB,IAAI,KAAG,cAgHzB,CAAA;AAqRH,eAAO,MAAM,mBAAmB,GAAI,kBAAkB,IAAI,KAAG,QAI3D,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validateCoupon.d.ts","sourceRoot":"","sources":["../../src/endpoints/validateCoupon.ts"],"names":[],"mappings":"AAAA,OAAO,EAA2B,KAAK,QAAQ,EAAE,KAAK,cAAc,EAAE,MAAM,SAAS,CAAA;AAErF,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,UAAU,CAAA;AAO5D,KAAK,IAAI,GAAG;IACV,YAAY,EAAE,4BAA4B,CAAA;CAC3C,CAAA;AA4FD,eAAO,MAAM,qBAAqB,GAC/B,kBAAkB,IAAI,KAAG,cAiEzB,CAAA;
|
|
1
|
+
{"version":3,"file":"validateCoupon.d.ts","sourceRoot":"","sources":["../../src/endpoints/validateCoupon.ts"],"names":[],"mappings":"AAAA,OAAO,EAA2B,KAAK,QAAQ,EAAE,KAAK,cAAc,EAAE,MAAM,SAAS,CAAA;AAErF,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,UAAU,CAAA;AAO5D,KAAK,IAAI,GAAG;IACV,YAAY,EAAE,4BAA4B,CAAA;CAC3C,CAAA;AA4FD,eAAO,MAAM,qBAAqB,GAC/B,kBAAkB,IAAI,KAAG,cAiEzB,CAAA;AAqPH,eAAO,MAAM,sBAAsB,GAAI,kBAAkB,IAAI,KAAG,QAI9D,CAAA"}
|