@ooneex/payment 0.0.11 → 0.0.13
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/index.js +18 -2
- package/dist/index.js.map +2 -2
- package/package.json +6 -6
package/dist/index.js
CHANGED
|
@@ -1,3 +1,19 @@
|
|
|
1
|
-
|
|
1
|
+
// src/types.ts
|
|
2
|
+
var EDiscountType;
|
|
3
|
+
((EDiscountType2) => {
|
|
4
|
+
EDiscountType2["PERCENTAGE"] = "percentage";
|
|
5
|
+
EDiscountType2["FIXED"] = "fixed";
|
|
6
|
+
})(EDiscountType ||= {});
|
|
7
|
+
var ESubscriptionPeriod;
|
|
8
|
+
((ESubscriptionPeriod2) => {
|
|
9
|
+
ESubscriptionPeriod2["MONTHLY"] = "monthly";
|
|
10
|
+
ESubscriptionPeriod2["YEARLY"] = "yearly";
|
|
11
|
+
ESubscriptionPeriod2["WEEKLY"] = "weekly";
|
|
12
|
+
ESubscriptionPeriod2["DAILY"] = "daily";
|
|
13
|
+
})(ESubscriptionPeriod ||= {});
|
|
14
|
+
export {
|
|
15
|
+
ESubscriptionPeriod,
|
|
16
|
+
EDiscountType
|
|
17
|
+
};
|
|
2
18
|
|
|
3
|
-
//# debugId=
|
|
19
|
+
//# debugId=90C8BC77620FA1EF64756E2164756E21
|
package/dist/index.js.map
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"sourcesContent": [
|
|
5
5
|
"import type { ICategory } from \"@ooneex/category\";\nimport type { CurrencyCodeType } from \"@ooneex/currencies\";\nimport type { IImage } from \"@ooneex/image\";\nimport type { ITag } from \"@ooneex/tag\";\nimport type { IBase, ScalarType } from \"@ooneex/types\";\n\nexport enum EDiscountType {\n PERCENTAGE = \"percentage\",\n FIXED = \"fixed\",\n}\n\nexport enum ESubscriptionPeriod {\n MONTHLY = \"monthly\",\n YEARLY = \"yearly\",\n WEEKLY = \"weekly\",\n DAILY = \"daily\",\n}\n\nexport type DiscountType = `${EDiscountType}`;\nexport type SubscriptionPeriodType = `${ESubscriptionPeriod}`;\n\nexport interface IProduct extends IBase {\n name: string;\n description?: string;\n categories?: ICategory[];\n currency: CurrencyCodeType;\n price: number;\n barcode?: string;\n images?: IImage[];\n attributes?: Record<string, ScalarType>;\n tags?: ITag[];\n}\n\nexport interface IFeature extends IBase {\n name: string;\n description?: string;\n isEnabled?: boolean;\n limit?: number;\n}\n\nexport interface ICoupon extends IBase {\n code: string;\n name?: string;\n description?: string;\n discountType: EDiscountType;\n discountValue: number;\n currency?: CurrencyCodeType;\n maxUses?: number;\n usedCount?: number;\n startAt?: Date;\n endAt?: Date;\n isActive?: boolean;\n minimumAmount?: number;\n applicableProducts?: IProduct[];\n applicablePlans?: IPlan[];\n}\n\nexport interface IPlan extends IBase {\n name: string;\n description?: string;\n currency: CurrencyCodeType;\n price: number;\n period: ESubscriptionPeriod;\n periodCount?: number;\n features?: IFeature[];\n isActive?: boolean;\n trialDays?: number;\n}\n\nexport interface ICredit extends IBase {\n balance: number;\n currency?: CurrencyCodeType;\n expiresAt?: Date;\n description?: string;\n}\n\nexport interface ISubscription extends IBase {\n coupons?: ICoupon[];\n plans?: IPlan[];\n credits?: ICredit[];\n startAt: Date;\n endAt?: Date;\n isTrial?: boolean;\n isActive?: boolean;\n}\n"
|
|
6
6
|
],
|
|
7
|
-
"mappings": "AAMO,IAAK,
|
|
8
|
-
"debugId": "
|
|
7
|
+
"mappings": ";AAMO,IAAK;AAAA,CAAL,CAAK,mBAAL;AAAA,EACL,+BAAa;AAAA,EACb,0BAAQ;AAAA,GAFE;AAKL,IAAK;AAAA,CAAL,CAAK,yBAAL;AAAA,EACL,kCAAU;AAAA,EACV,iCAAS;AAAA,EACT,iCAAS;AAAA,EACT,gCAAQ;AAAA,GAJE;",
|
|
8
|
+
"debugId": "90C8BC77620FA1EF64756E2164756E21",
|
|
9
9
|
"names": []
|
|
10
10
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ooneex/payment",
|
|
3
3
|
"description": "Payment and pricing types with currency support, product categorization, and image handling for e-commerce",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.13",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
7
7
|
"dist",
|
|
@@ -28,11 +28,11 @@
|
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {},
|
|
30
30
|
"devDependencies": {
|
|
31
|
-
"@ooneex/category": "0.0.
|
|
32
|
-
"@ooneex/currencies": "0.0.
|
|
33
|
-
"@ooneex/image": "0.0.
|
|
34
|
-
"@ooneex/tag": "0.0.
|
|
35
|
-
"@ooneex/types": "0.0.
|
|
31
|
+
"@ooneex/category": "0.0.11",
|
|
32
|
+
"@ooneex/currencies": "0.0.11",
|
|
33
|
+
"@ooneex/image": "0.0.11",
|
|
34
|
+
"@ooneex/tag": "0.0.11",
|
|
35
|
+
"@ooneex/types": "0.0.11"
|
|
36
36
|
},
|
|
37
37
|
"keywords": [
|
|
38
38
|
"billing",
|