@roomstay/core 0.1.3 → 0.1.4
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/node.js +1 -1
- package/dist/types/Booking/IBookingPayment.type.d.ts +29 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/web.js +1 -1
- package/package.json +1 -1
package/dist/node.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{"use strict";var e={d:(t,
|
|
1
|
+
(()=>{"use strict";var e={d:(t,n)=>{for(var o in n)e.o(n,o)&&!e.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:n[o]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};let n,o,r;function a(e){return e.toUpperCase()}e.r(t),e.d(t,{EBookingPaymentMethod:()=>o,EPlanpayBookingStatus:()=>r,IBookingStatus:()=>n,calculateTotalForMemberBooking:()=>c,uppercaseString:()=>a}),function(e){e.Pending="Pending",e.Committed="Committed",e.Cancelled="Cancelled"}(n||(n={})),function(e){e.Card="Card",e.Planpay="Planpay"}(o||(o={})),function(e){e.Unknown="unknown",e.Unpaid="unpaid",e.Accepted="accepted",e.Cancelled="cancelled",e.Refunded="refunded",e.Rejected="rejected"}(r||(r={}));const c=e=>{let t=0;const n=Object.values(e.itinerary);for(const e of n){const n=Object.keys(e.nights);for(const o of n)t+=e.nights[o].total}return t};module.exports=t})();
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export declare enum EBookingPaymentMethod {
|
|
2
|
+
Card = "Card",
|
|
3
|
+
Planpay = "Planpay"
|
|
4
|
+
}
|
|
5
|
+
export declare enum EPlanpayBookingStatus {
|
|
6
|
+
Unknown = "unknown",
|
|
7
|
+
Unpaid = "unpaid",
|
|
8
|
+
Accepted = "accepted",
|
|
9
|
+
Cancelled = "cancelled",
|
|
10
|
+
Refunded = "refunded",
|
|
11
|
+
Rejected = "rejected"
|
|
12
|
+
}
|
|
13
|
+
export type IBookingPaymentTokenizedCard = {
|
|
14
|
+
Type: string;
|
|
15
|
+
Number: string;
|
|
16
|
+
Expiry: number;
|
|
17
|
+
CVV: string;
|
|
18
|
+
Name: string;
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* Booking payment attached to a booking.
|
|
22
|
+
*
|
|
23
|
+
* Could be either Card or Planpay
|
|
24
|
+
*/
|
|
25
|
+
export type IBookingPayment = {
|
|
26
|
+
Method: EBookingPaymentMethod;
|
|
27
|
+
PlanpayCheckoutId?: string;
|
|
28
|
+
PaymentCard?: IBookingPaymentTokenizedCard;
|
|
29
|
+
};
|
package/dist/types/index.d.ts
CHANGED
package/dist/web.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
define("@roomstay/core",[],(()=>(()=>{"use strict";var e={d:(t,
|
|
1
|
+
define("@roomstay/core",[],(()=>(()=>{"use strict";var e={d:(t,n)=>{for(var o in n)e.o(n,o)&&!e.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:n[o]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};let n,o,r;function a(e){return e.toUpperCase()}e.r(t),e.d(t,{EBookingPaymentMethod:()=>o,EPlanpayBookingStatus:()=>r,IBookingStatus:()=>n,calculateTotalForMemberBooking:()=>c,uppercaseString:()=>a}),function(e){e.Pending="Pending",e.Committed="Committed",e.Cancelled="Cancelled"}(n||(n={})),function(e){e.Card="Card",e.Planpay="Planpay"}(o||(o={})),function(e){e.Unknown="unknown",e.Unpaid="unpaid",e.Accepted="accepted",e.Cancelled="cancelled",e.Refunded="refunded",e.Rejected="rejected"}(r||(r={}));const c=e=>{let t=0;const n=Object.values(e.itinerary);for(const e of n){const n=Object.keys(e.nights);for(const o of n)t+=e.nights[o].total}return t};return t})()));
|