@vita-mojo/types 1.0.39 → 1.0.40

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vita-mojo/types",
3
- "version": "1.0.39",
3
+ "version": "1.0.40",
4
4
  "main": "./src/index.js",
5
5
  "type": "commonjs"
6
6
  }
@@ -14,3 +14,4 @@ export * from './settings';
14
14
  export * as Subway from './subway';
15
15
  export * from './tenant-settings';
16
16
  export { Type } from './type';
17
+ export * from './provider-promotion';
@@ -15,4 +15,5 @@ tslib_1.__exportStar(require("./promotion"), exports);
15
15
  tslib_1.__exportStar(require("./settings"), exports);
16
16
  exports.Subway = require("./subway");
17
17
  tslib_1.__exportStar(require("./tenant-settings"), exports);
18
+ tslib_1.__exportStar(require("./provider-promotion"), exports);
18
19
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../packages/types/src/order/index.ts"],"names":[],"mappings":";;;;AAAA,iDAAuB;AACvB,oDAA0B;AAC1B,qCAAmC;AACnC,mDAAiD;AACjD,iCAA+B;AAG/B,uDAA6B;AAC7B,kEAAwC;AACxC,uCAAqC;AACrC,sDAA4B;AAC5B,sDAA4B;AAC5B,qDAA2B;AAC3B,qCAAmC;AACnC,4DAAkC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../packages/types/src/order/index.ts"],"names":[],"mappings":";;;;AAAA,iDAAuB;AACvB,oDAA0B;AAC1B,qCAAmC;AACnC,mDAAiD;AACjD,iCAA+B;AAG/B,uDAA6B;AAC7B,kEAAwC;AACxC,uCAAqC;AACrC,sDAA4B;AAC5B,sDAA4B;AAC5B,qDAA2B;AAC3B,qCAAmC;AACnC,4DAAkC;AAElC,+DAAqC"}
@@ -33,6 +33,22 @@ export interface Payment {
33
33
  deliveryFeeRefundTaxAmount?: number;
34
34
  requireExternalPayment?: boolean;
35
35
  }
36
+ interface SubwayPointsAcquired {
37
+ basePoints?: number;
38
+ bonusPoints?: number;
39
+ }
40
+ interface SubwayRedemptionDetails {
41
+ redemptionId: string;
42
+ points: number;
43
+ redemptionAmount: number;
44
+ forfeitedAmount: number;
45
+ numberOfConversion: number;
46
+ }
47
+ interface SubwayTransactionLoyalty {
48
+ pointsAcquired?: SubwayPointsAcquired;
49
+ redemptionDetails?: SubwayRedemptionDetails;
50
+ }
51
+ type TransactionLoyalty = SubwayTransactionLoyalty;
36
52
  export interface Transaction {
37
53
  uuid: string;
38
54
  status: string;
@@ -50,4 +66,6 @@ export interface Transaction {
50
66
  updatedAt?: string;
51
67
  meta?: any;
52
68
  pat?: any;
69
+ loyalty?: TransactionLoyalty;
53
70
  }
71
+ export {};
@@ -1,3 +1,4 @@
1
+ import { PromotionProviderDetails } from './provider-promotion';
1
2
  export interface PromoCodeDto {
2
3
  code: string;
3
4
  phoneNumber?: string;
@@ -41,52 +42,8 @@ export interface UserReward {
41
42
  usableUntil: string | number | Date | null;
42
43
  uuid: string;
43
44
  }
44
- export interface PromotionProviderDetails {
45
- type?: string;
46
- expirationDate?: string;
47
- count?: number;
48
- code: string;
49
- name: string;
50
- productKey: string;
51
- vmosPromoUUID: string;
52
- voucherID: number;
53
- purchase: Purchase;
54
- }
55
- interface Purchase {
56
- transactionId: string;
57
- openTime: Date;
58
- relatedTransactionId?: string;
59
- totalAmount: number;
60
- totalTaxAmount?: number;
61
- totalGeneralDiscount?: number;
62
- orderType?: string;
63
- items?: Item[];
64
- meansOfPayment?: MeansOfPayment;
65
- tags?: string[];
66
- employee?: string;
67
- }
68
- interface Item {
69
- lineId: string;
70
- code: string;
71
- name: string;
72
- departmentCode: string;
73
- departmentName: string;
74
- quantity: number;
75
- weight?: number;
76
- grossAmount: number;
77
- netAmount: number;
78
- action?: 'sale' | 'refund';
79
- tags?: string[];
80
- }
81
- interface MeansOfPayment {
82
- type: string;
83
- details?: string;
84
- amount: number;
85
- paymentCard?: string;
86
- }
87
45
  export interface BundlePromotion {
88
46
  uuid: string;
89
47
  discount: number;
90
48
  meta?: Record<string, unknown>;
91
49
  }
92
- export {};
@@ -1 +1 @@
1
- {"version":3,"file":"promotion.js","sourceRoot":"","sources":["../../../../../packages/types/src/order/promotion.ts"],"names":[],"mappings":";;;AAOA,IAAY,cAKX;AALD,WAAY,cAAc;IACxB,gDAA8B,CAAA;IAC9B,6DAA2C,CAAA;IAC3C,+DAA6C,CAAA;IAC7C,iCAAe,CAAA;AACjB,CAAC,EALW,cAAc,8BAAd,cAAc,QAKzB"}
1
+ {"version":3,"file":"promotion.js","sourceRoot":"","sources":["../../../../../packages/types/src/order/promotion.ts"],"names":[],"mappings":";;;AASA,IAAY,cAKX;AALD,WAAY,cAAc;IACxB,gDAA8B,CAAA;IAC9B,6DAA2C,CAAA;IAC3C,+DAA6C,CAAA;IAC7C,iCAAe,CAAA;AACjB,CAAC,EALW,cAAc,8BAAd,cAAc,QAKzB"}
@@ -0,0 +1,14 @@
1
+ interface ActeolProviderPromotionBase {
2
+ vmosPromoUUID: string;
3
+ name: string;
4
+ code: string;
5
+ productKey: string;
6
+ }
7
+ interface ActeolProviderPromotionValidateVoucher extends ActeolProviderPromotionBase {
8
+ redemptionID: number;
9
+ }
10
+ interface ActeolProviderPromotionVoucher extends ActeolProviderPromotionBase {
11
+ voucherID: number;
12
+ }
13
+ export type ActeolProviderPromotion = ActeolProviderPromotionValidateVoucher | ActeolProviderPromotionVoucher;
14
+ export {};
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=acteol.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"acteol.js","sourceRoot":"","sources":["../../../../../../packages/types/src/order/provider-promotion/acteol.ts"],"names":[],"mappings":""}
@@ -0,0 +1,50 @@
1
+ export type AppliedDeal = {
2
+ key: string;
3
+ appliedAmount: number;
4
+ };
5
+ export type AppliedAsset = {
6
+ key?: string;
7
+ code?: string;
8
+ appliedAmount: number;
9
+ };
10
+ interface Purchase {
11
+ transactionId: string;
12
+ openTime: Date;
13
+ relatedTransactionId?: string;
14
+ totalAmount: number;
15
+ totalTaxAmount?: number;
16
+ totalGeneralDiscount?: number;
17
+ orderType?: string;
18
+ items?: Item[];
19
+ meansOfPayment?: MeansOfPayment;
20
+ tags?: string[];
21
+ employee?: string;
22
+ }
23
+ interface Item {
24
+ lineId: string;
25
+ code: string;
26
+ name: string;
27
+ departmentCode: string;
28
+ departmentName: string;
29
+ quantity: number;
30
+ weight?: number;
31
+ grossAmount: number;
32
+ netAmount: number;
33
+ action?: 'sale' | 'refund';
34
+ tags?: string[];
35
+ }
36
+ interface MeansOfPayment {
37
+ type: string;
38
+ details?: string;
39
+ amount: number;
40
+ paymentCard?: string;
41
+ }
42
+ export type ComoProviderPromotion = {
43
+ purchase?: Purchase;
44
+ deals?: AppliedDeal[];
45
+ redeemAssets?: AppliedAsset[];
46
+ deal?: AppliedDeal;
47
+ redeemAsset?: AppliedAsset;
48
+ useItemTypes?: boolean;
49
+ };
50
+ export {};
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=como.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"como.js","sourceRoot":"","sources":["../../../../../../packages/types/src/order/provider-promotion/como.ts"],"names":[],"mappings":""}
@@ -0,0 +1,5 @@
1
+ import { ActeolProviderPromotion } from './acteol';
2
+ import { ComoProviderPromotion } from './como';
3
+ import { SubwayProviderPromotion } from './subway';
4
+ export * from './acteol';
5
+ export type PromotionProviderDetails = ActeolProviderPromotion | ComoProviderPromotion | SubwayProviderPromotion;
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ tslib_1.__exportStar(require("./acteol"), exports);
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/types/src/order/provider-promotion/index.ts"],"names":[],"mappings":";;;AAIA,mDAAyB"}
@@ -0,0 +1,22 @@
1
+ export declare enum SubwayOfferStatus {
2
+ UNKNOWN = "Unknown",
3
+ ACTIVE = "Active",
4
+ REDEEMED = "Redeemed",
5
+ REDEEM_PENDING = "RedeemPending",
6
+ EXPIRED = "Expired",
7
+ CANCELLED = "Cancelled",
8
+ REVERSAL_PENDING = "ReversalPending",
9
+ REVERSAL_FAILED = "ReversalFailed",
10
+ VOID_PENDING = "VoidPending",
11
+ REFUND_PENDING = "RefundPending"
12
+ }
13
+ export interface SubwayProviderPromotion {
14
+ offerStatus: SubwayOfferStatus;
15
+ offerPLU: string;
16
+ promotionId: string | number;
17
+ couponProvider: string;
18
+ promoCode?: string;
19
+ offerType?: 'NON_SD' | 'SD';
20
+ propositionId?: string;
21
+ customerRefId?: string;
22
+ }
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SubwayOfferStatus = void 0;
4
+ var SubwayOfferStatus;
5
+ (function (SubwayOfferStatus) {
6
+ SubwayOfferStatus["UNKNOWN"] = "Unknown";
7
+ SubwayOfferStatus["ACTIVE"] = "Active";
8
+ SubwayOfferStatus["REDEEMED"] = "Redeemed";
9
+ SubwayOfferStatus["REDEEM_PENDING"] = "RedeemPending";
10
+ SubwayOfferStatus["EXPIRED"] = "Expired";
11
+ SubwayOfferStatus["CANCELLED"] = "Cancelled";
12
+ SubwayOfferStatus["REVERSAL_PENDING"] = "ReversalPending";
13
+ SubwayOfferStatus["REVERSAL_FAILED"] = "ReversalFailed";
14
+ SubwayOfferStatus["VOID_PENDING"] = "VoidPending";
15
+ SubwayOfferStatus["REFUND_PENDING"] = "RefundPending";
16
+ })(SubwayOfferStatus || (exports.SubwayOfferStatus = SubwayOfferStatus = {}));
17
+ //# sourceMappingURL=subway.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"subway.js","sourceRoot":"","sources":["../../../../../../packages/types/src/order/provider-promotion/subway.ts"],"names":[],"mappings":";;;AAAA,IAAY,iBAWX;AAXD,WAAY,iBAAiB;IAC3B,wCAAmB,CAAA;IACnB,sCAAiB,CAAA;IACjB,0CAAqB,CAAA;IACrB,qDAAgC,CAAA;IAChC,wCAAmB,CAAA;IACnB,4CAAuB,CAAA;IACvB,yDAAoC,CAAA;IACpC,uDAAkC,CAAA;IAClC,iDAA4B,CAAA;IAC5B,qDAAgC,CAAA;AAClC,CAAC,EAXW,iBAAiB,iCAAjB,iBAAiB,QAW5B"}