@roomstay/core 0.1.2 → 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 CHANGED
@@ -1 +1 @@
1
- (()=>{"use strict";var e={d:(t,o)=>{for(var n in o)e.o(o,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:o[n]})},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 o;function n(e){return e.toUpperCase()}e.r(t),e.d(t,{IBookingStatus:()=>o,calculateTotalForMemberBooking:()=>r,uppercaseString:()=>n}),function(e){e.Pending="Pending",e.Committed="Committed",e.Cancelled="Cancelled"}(o||(o={}));const r=e=>{let t=0;const o=Object.values(e.itinerary);for(const e of o){const o=Object.keys(e.nights);for(const n of o)t+=e.nights[n].total}return t};module.exports=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
+ };
@@ -11,6 +11,7 @@ export type IRoomstayMemberBookingItem = {
11
11
  profile: IRoomstayMemberBookingProfile;
12
12
  comments: string[];
13
13
  status: IBookingStatus;
14
+ isCancellable: boolean;
14
15
  checkInDate: string;
15
16
  checkOutDate: string;
16
17
  nights: {
@@ -3,6 +3,7 @@
3
3
  */
4
4
  export * from './Booking/IPrice.type';
5
5
  export * from './Booking/IBookingStatus.type';
6
+ export * from './Booking/IBookingPayment.type';
6
7
  /**
7
8
  * Member Details
8
9
  */
package/dist/web.js CHANGED
@@ -1 +1 @@
1
- define("@roomstay/core",[],(()=>(()=>{"use strict";var e={d:(t,o)=>{for(var n in o)e.o(o,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:o[n]})},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 o;function n(e){return e.toUpperCase()}e.r(t),e.d(t,{IBookingStatus:()=>o,calculateTotalForMemberBooking:()=>r,uppercaseString:()=>n}),function(e){e.Pending="Pending",e.Committed="Committed",e.Cancelled="Cancelled"}(o||(o={}));const r=e=>{let t=0;const o=Object.values(e.itinerary);for(const e of o){const o=Object.keys(e.nights);for(const n of o)t+=e.nights[n].total}return t};return 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})()));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@roomstay/core",
3
- "version": "0.1.2",
3
+ "version": "0.1.4",
4
4
  "description": "Details shared between Roomstay libraries. Anything from Currency, to Generic types",
5
5
  "types": "./dist/index.d.ts",
6
6
  "files": [