@roomstay/core 0.1.32 → 0.1.33-1

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.
Files changed (46) hide show
  1. package/dist/index.d.ts +0 -0
  2. package/dist/node.js +1 -1
  3. package/dist/types/Booking/IBookingCreateErrorResponse.d.ts +0 -0
  4. package/dist/types/Booking/IBookingPayment.type.d.ts +0 -0
  5. package/dist/types/Booking/IBookingQuote.type.d.ts +1 -0
  6. package/dist/types/Booking/IBookingStatus.type.d.ts +0 -0
  7. package/dist/types/Booking/IPrice.type.d.ts +0 -0
  8. package/dist/types/Company/ECompanyProvider.enum.d.ts +0 -0
  9. package/dist/types/Company/IAdminCompany.type.d.ts +0 -0
  10. package/dist/types/Company/IAdminCompanyUser.type.d.ts +0 -0
  11. package/dist/types/Events/IRoomstayEvent.type.d.ts +0 -0
  12. package/dist/types/General/HttpMethod.enum.d.ts +9 -0
  13. package/dist/types/General/IJsonString.type.d.ts +6 -0
  14. package/dist/types/Hotel/EHotelPriceModel.enum.d.ts +0 -0
  15. package/dist/types/Hotel/EHotelWeekdayStartsOn.enum.d.ts +0 -0
  16. package/dist/types/Hotel/IAuxiliaryFilter.type.d.ts +0 -0
  17. package/dist/types/Hotel/IHotelColorScheme.type.d.ts +0 -0
  18. package/dist/types/Hotel/IHotelOverrides.type.d.ts +0 -0
  19. package/dist/types/Hotel/IHotelReplica.type.d.ts +0 -0
  20. package/dist/types/Hotel/IHotelService.type.d.ts +0 -0
  21. package/dist/types/Image/IRoomstayImage.type.d.ts +0 -0
  22. package/dist/types/Member/IRoomstayCognitoMember.type.d.ts +0 -0
  23. package/dist/types/Member/IRoomstayMember.type.d.ts +0 -0
  24. package/dist/types/Member/IRoomstayMemberBooking.type.d.ts +0 -0
  25. package/dist/types/Member/IRoomstayMemberBookingAddress.type.d.ts +0 -0
  26. package/dist/types/Member/IRoomstayMemberBookingItem.type.d.ts +0 -0
  27. package/dist/types/Member/IRoomstayMemberBookingProfile.type.d.ts +0 -0
  28. package/dist/types/Member/IRoomstayMemberCards.type.d.ts +0 -0
  29. package/dist/types/Member/ISession.type.d.ts +0 -0
  30. package/dist/types/Policies/EGuaranteePolicy.enum.d.ts +0 -0
  31. package/dist/types/RMS/ERMSDiscountType.enum.d.ts +0 -0
  32. package/dist/types/RMS/IRMSPropertyDiscount.type.d.ts +0 -0
  33. package/dist/types/RMS/IRMSRequirement.type.d.ts +0 -0
  34. package/dist/types/Room/IRoomGroup.type.d.ts +0 -0
  35. package/dist/types/index.d.ts +5 -0
  36. package/dist/utils/bookingTotal.d.ts +0 -0
  37. package/dist/utils/index.d.ts +1 -0
  38. package/dist/utils/nameof.d.ts +2 -0
  39. package/dist/utils/reflection.d.ts +9 -0
  40. package/dist/utils/roomstayImageResize.d.ts +0 -0
  41. package/dist/utils/uppercaseString.d.ts +0 -0
  42. package/dist/web.js +1 -1
  43. package/package.json +48 -44
  44. package/dist/types/Company/IAdminCompanyDTO.type.d.ts +0 -8
  45. package/dist/types/Hotel/IHotelColorScheme.d.ts +0 -11
  46. package/dist/types/RMS/IPropertyDiscount.type.d.ts +0 -5
package/dist/index.d.ts CHANGED
File without changes
package/dist/node.js CHANGED
@@ -1 +1 @@
1
- (()=>{"use strict";var e={d:(n,t)=>{for(var o in t)e.o(t,o)&&!e.o(n,o)&&Object.defineProperty(n,o,{enumerable:!0,get:t[o]})},o:(e,n)=>Object.prototype.hasOwnProperty.call(e,n),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},n={};let t,o,a,r,i,c,d,l,y,u,s;function m(e){return e.toUpperCase()}e.r(n),e.d(n,{EBookingPaymentMethod:()=>o,ECompanyProvider:()=>i,EDistanceUnitType:()=>c,EGuarantyPolicyPrepaymentType:()=>s,EHotelCardProcessor:()=>a,EHotelPriceModel:()=>d,EHotelWeekdayStartsOn:()=>l,EPlanpayBookingStatus:()=>r,ERMSDiscountType:()=>y,ERoomstayImageSize:()=>u,IBookingStatus:()=>t,calculateTotalForMemberBooking:()=>p,resizeRoomstayImageUrl:()=>g,uppercaseString:()=>m}),function(e){e.Pending="Pending",e.Committed="Committed",e.Cancelled="Cancelled"}(t||(t={})),function(e){e.Card="Card",e.SavedCard="SavedCard",e.Planpay="Planpay",e.Adyen="Adyen"}(o||(o={})),function(e){e.Passthrough="Passthrough",e.Adyen="Adyen",e.Till="Till",e.RMSPay="RMSPay"}(a||(a={})),function(e){e.Unknown="unknown",e.Unpaid="unpaid",e.Accepted="accepted",e.Cancelled="cancelled",e.Refunded="refunded",e.Rejected="rejected"}(r||(r={})),function(e){e.Synxis="Synxis",e.Availpro="Availpro",e.RMS="RMS",e.Siteminder="Siteminder",e.Roomstay="Roomstay"}(i||(i={})),function(e){e.Metric="metric",e.Imperial="imperial"}(c||(c={})),function(e){e.PerPerson="PerPerson",e.PerDay="PerDay",e.PerOccupancy="PerOccupancy"}(d||(d={})),function(e){e.Monday="monday",e.Sunday="sunday"}(l||(l={})),function(e){e.Percentage="Percentage",e.Amount="Amount",e.Bogo="BOGO",e.NightlyRateOverride="NightlyRateOverride"}(y||(y={})),function(e){e[e.Icon=128]="Icon",e[e.Tiny=256]="Tiny",e[e.Small=512]="Small",e[e.Medium=768]="Medium",e[e.Large=1024]="Large",e[e.ExtraLarge=1600]="ExtraLarge"}(u||(u={})),function(e){e.FixedAmount="fixed",e.Percentage="percentage",e.Nights="nights"}(s||(s={}));const p=e=>{let n=0;const t=Object.values(e.itinerary);for(const e of t){const t=Object.keys(e.nights);for(const o of t)n+=e.nights[o].total}return n},g=(e,n)=>e.includes("cdn.app.roomstay.io")?e+"?w="+n:e;module.exports=n})();
1
+ (()=>{"use strict";var e={d:(n,t)=>{for(var o in t)e.o(t,o)&&!e.o(n,o)&&Object.defineProperty(n,o,{enumerable:!0,get:t[o]})},o:(e,n)=>Object.prototype.hasOwnProperty.call(e,n),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},n={};let t,o,a,r,i,c,d,l,u,y,s,P;function m(e){return e.toUpperCase()}e.r(n),e.d(n,{EBookingPaymentMethod:()=>o,ECompanyProvider:()=>i,EDistanceUnitType:()=>c,EGuarantyPolicyPrepaymentType:()=>s,EHotelCardProcessor:()=>a,EHotelPriceModel:()=>d,EHotelWeekdayStartsOn:()=>l,EPlanpayBookingStatus:()=>r,ERMSDiscountType:()=>u,ERoomstayImageSize:()=>y,HttpMethod:()=>P,IBookingStatus:()=>t,calculateTotalForMemberBooking:()=>p,nameof:()=>f,resizeRoomstayImageUrl:()=>g,subset:()=>S,uppercaseString:()=>m}),function(e){e.Pending="Pending",e.Committed="Committed",e.Cancelled="Cancelled"}(t||(t={})),function(e){e.Card="Card",e.SavedCard="SavedCard",e.Planpay="Planpay",e.Adyen="Adyen"}(o||(o={})),function(e){e.Passthrough="Passthrough",e.Adyen="Adyen",e.Till="Till",e.RMSPay="RMSPay"}(a||(a={})),function(e){e.Unknown="unknown",e.Unpaid="unpaid",e.Accepted="accepted",e.Cancelled="cancelled",e.Refunded="refunded",e.Rejected="rejected"}(r||(r={})),function(e){e.Synxis="Synxis",e.Availpro="Availpro",e.RMS="RMS",e.Siteminder="Siteminder",e.Roomstay="Roomstay"}(i||(i={})),function(e){e.Metric="metric",e.Imperial="imperial"}(c||(c={})),function(e){e.PerPerson="PerPerson",e.PerDay="PerDay",e.PerOccupancy="PerOccupancy"}(d||(d={})),function(e){e.Monday="monday",e.Sunday="sunday"}(l||(l={})),function(e){e.Percentage="Percentage",e.Amount="Amount",e.Bogo="BOGO",e.NightlyRateOverride="NightlyRateOverride"}(u||(u={})),function(e){e[e.Icon=128]="Icon",e[e.Tiny=256]="Tiny",e[e.Small=512]="Small",e[e.Medium=768]="Medium",e[e.Large=1024]="Large",e[e.ExtraLarge=1600]="ExtraLarge"}(y||(y={})),function(e){e.FixedAmount="fixed",e.Percentage="percentage",e.Nights="nights"}(s||(s={})),function(e){e.GET="GET",e.POST="POST",e.PUT="PUT",e.DELETE="DELETE",e.PATCH="PATCH",e.OPTIONS="OPTIONS",e.HEAD="HEAD"}(P||(P={}));const p=e=>{let n=0;const t=Object.values(e.itinerary);for(const e of t){const t=Object.keys(e.nights);for(const o of t)n+=e.nights[o].total}return n},g=(e,n)=>e.includes("cdn.app.roomstay.io")?e+"?w="+n:e,f=e=>e,S=(e,n)=>{const t={};return n.forEach((n=>{n in e&&(t[n]=e[n])})),t};module.exports=n})();
File without changes
@@ -16,6 +16,7 @@ export type IBookingQuoteRequest = {
16
16
  */
17
17
  checkOut: string;
18
18
  memberNumber?: string;
19
+ totalDisplayedPrice?: number;
19
20
  }[];
20
21
  };
21
22
  export type IBookingQuoteResponse = {
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -0,0 +1,9 @@
1
+ export declare enum HttpMethod {
2
+ GET = "GET",
3
+ POST = "POST",
4
+ PUT = "PUT",
5
+ DELETE = "DELETE",
6
+ PATCH = "PATCH",
7
+ OPTIONS = "OPTIONS",
8
+ HEAD = "HEAD"
9
+ }
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Basic object to wrap a string that is de/encoded as JSON.
3
+ */
4
+ export type IJsonString = {
5
+ message: string;
6
+ };
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -55,3 +55,8 @@ export * from './Policies/EGuaranteePolicy.enum';
55
55
  * Roomstay Events
56
56
  */
57
57
  export * from './Events/IRoomstayEvent.type';
58
+ /**
59
+ * General
60
+ */
61
+ export * from './General/IJsonString.type';
62
+ export * from './General/HttpMethod.enum';
File without changes
@@ -1,3 +1,4 @@
1
1
  export * from './uppercaseString';
2
2
  export * from './bookingTotal';
3
3
  export * from './roomstayImageResize';
4
+ export * from './reflection';
@@ -0,0 +1,2 @@
1
+ export declare const nameof: <T>(name: Extract<keyof T, string>) => string;
2
+ export declare const nameofField: <T>(instance: T, name: keyof T) => string;
@@ -0,0 +1,9 @@
1
+ /**
2
+ *
3
+ * @param name Type-safe way to get the name of a property
4
+ */
5
+ export declare const nameof: <T>(name: Extract<keyof T, string>) => string;
6
+ /**
7
+ * Create a subset of an object based on the provided keys.
8
+ */
9
+ export declare const subset: <T extends object, K extends keyof T>(source: T, keys: K[]) => Pick<T, K>;
File without changes
File without changes
package/dist/web.js CHANGED
@@ -1 +1 @@
1
- define("@roomstay/core",[],(()=>(()=>{"use strict";var e={d:(n,t)=>{for(var o in t)e.o(t,o)&&!e.o(n,o)&&Object.defineProperty(n,o,{enumerable:!0,get:t[o]})},o:(e,n)=>Object.prototype.hasOwnProperty.call(e,n),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},n={};let t,o,a,r,i,c,d,l,y,u,s;function m(e){return e.toUpperCase()}e.r(n),e.d(n,{EBookingPaymentMethod:()=>o,ECompanyProvider:()=>i,EDistanceUnitType:()=>c,EGuarantyPolicyPrepaymentType:()=>s,EHotelCardProcessor:()=>a,EHotelPriceModel:()=>d,EHotelWeekdayStartsOn:()=>l,EPlanpayBookingStatus:()=>r,ERMSDiscountType:()=>y,ERoomstayImageSize:()=>u,IBookingStatus:()=>t,calculateTotalForMemberBooking:()=>p,resizeRoomstayImageUrl:()=>g,uppercaseString:()=>m}),function(e){e.Pending="Pending",e.Committed="Committed",e.Cancelled="Cancelled"}(t||(t={})),function(e){e.Card="Card",e.SavedCard="SavedCard",e.Planpay="Planpay",e.Adyen="Adyen"}(o||(o={})),function(e){e.Passthrough="Passthrough",e.Adyen="Adyen",e.Till="Till",e.RMSPay="RMSPay"}(a||(a={})),function(e){e.Unknown="unknown",e.Unpaid="unpaid",e.Accepted="accepted",e.Cancelled="cancelled",e.Refunded="refunded",e.Rejected="rejected"}(r||(r={})),function(e){e.Synxis="Synxis",e.Availpro="Availpro",e.RMS="RMS",e.Siteminder="Siteminder",e.Roomstay="Roomstay"}(i||(i={})),function(e){e.Metric="metric",e.Imperial="imperial"}(c||(c={})),function(e){e.PerPerson="PerPerson",e.PerDay="PerDay",e.PerOccupancy="PerOccupancy"}(d||(d={})),function(e){e.Monday="monday",e.Sunday="sunday"}(l||(l={})),function(e){e.Percentage="Percentage",e.Amount="Amount",e.Bogo="BOGO",e.NightlyRateOverride="NightlyRateOverride"}(y||(y={})),function(e){e[e.Icon=128]="Icon",e[e.Tiny=256]="Tiny",e[e.Small=512]="Small",e[e.Medium=768]="Medium",e[e.Large=1024]="Large",e[e.ExtraLarge=1600]="ExtraLarge"}(u||(u={})),function(e){e.FixedAmount="fixed",e.Percentage="percentage",e.Nights="nights"}(s||(s={}));const p=e=>{let n=0;const t=Object.values(e.itinerary);for(const e of t){const t=Object.keys(e.nights);for(const o of t)n+=e.nights[o].total}return n},g=(e,n)=>e.includes("cdn.app.roomstay.io")?e+"?w="+n:e;return n})()));
1
+ define("@roomstay/core",[],(()=>(()=>{"use strict";var e={d:(n,t)=>{for(var o in t)e.o(t,o)&&!e.o(n,o)&&Object.defineProperty(n,o,{enumerable:!0,get:t[o]})},o:(e,n)=>Object.prototype.hasOwnProperty.call(e,n),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},n={};let t,o,a,r,i,c,d,l,y,u,s,P;function m(e){return e.toUpperCase()}e.r(n),e.d(n,{EBookingPaymentMethod:()=>o,ECompanyProvider:()=>i,EDistanceUnitType:()=>c,EGuarantyPolicyPrepaymentType:()=>s,EHotelCardProcessor:()=>a,EHotelPriceModel:()=>d,EHotelWeekdayStartsOn:()=>l,EPlanpayBookingStatus:()=>r,ERMSDiscountType:()=>y,ERoomstayImageSize:()=>u,HttpMethod:()=>P,IBookingStatus:()=>t,calculateTotalForMemberBooking:()=>p,nameof:()=>f,resizeRoomstayImageUrl:()=>g,subset:()=>S,uppercaseString:()=>m}),function(e){e.Pending="Pending",e.Committed="Committed",e.Cancelled="Cancelled"}(t||(t={})),function(e){e.Card="Card",e.SavedCard="SavedCard",e.Planpay="Planpay",e.Adyen="Adyen"}(o||(o={})),function(e){e.Passthrough="Passthrough",e.Adyen="Adyen",e.Till="Till",e.RMSPay="RMSPay"}(a||(a={})),function(e){e.Unknown="unknown",e.Unpaid="unpaid",e.Accepted="accepted",e.Cancelled="cancelled",e.Refunded="refunded",e.Rejected="rejected"}(r||(r={})),function(e){e.Synxis="Synxis",e.Availpro="Availpro",e.RMS="RMS",e.Siteminder="Siteminder",e.Roomstay="Roomstay"}(i||(i={})),function(e){e.Metric="metric",e.Imperial="imperial"}(c||(c={})),function(e){e.PerPerson="PerPerson",e.PerDay="PerDay",e.PerOccupancy="PerOccupancy"}(d||(d={})),function(e){e.Monday="monday",e.Sunday="sunday"}(l||(l={})),function(e){e.Percentage="Percentage",e.Amount="Amount",e.Bogo="BOGO",e.NightlyRateOverride="NightlyRateOverride"}(y||(y={})),function(e){e[e.Icon=128]="Icon",e[e.Tiny=256]="Tiny",e[e.Small=512]="Small",e[e.Medium=768]="Medium",e[e.Large=1024]="Large",e[e.ExtraLarge=1600]="ExtraLarge"}(u||(u={})),function(e){e.FixedAmount="fixed",e.Percentage="percentage",e.Nights="nights"}(s||(s={})),function(e){e.GET="GET",e.POST="POST",e.PUT="PUT",e.DELETE="DELETE",e.PATCH="PATCH",e.OPTIONS="OPTIONS",e.HEAD="HEAD"}(P||(P={}));const p=e=>{let n=0;const t=Object.values(e.itinerary);for(const e of t){const t=Object.keys(e.nights);for(const o of t)n+=e.nights[o].total}return n},g=(e,n)=>e.includes("cdn.app.roomstay.io")?e+"?w="+n:e,f=e=>e,S=(e,n)=>{const t={};return n.forEach((n=>{n in e&&(t[n]=e[n])})),t};return n})()));
package/package.json CHANGED
@@ -1,44 +1,48 @@
1
- {
2
- "name": "@roomstay/core",
3
- "version": "0.1.32",
4
- "description": "Details shared between Roomstay libraries. Anything from Currency, to Generic types",
5
- "types": "./dist/index.d.ts",
6
- "files": [
7
- "dist/**/*"
8
- ],
9
- "exports": {
10
- "node": {
11
- "default": "./dist/node.js"
12
- },
13
- "default": "./dist/web.js"
14
- },
15
- "repository": "git@bitbucket.org:dijitallycom/roomstay-common.git",
16
- "author": "Roomstay <help@roomstay.io>",
17
- "license": "MIT",
18
- "scripts": {
19
- "build": "tsc --emitDeclarationOnly; resolve-tspaths; webpack",
20
- "release": "np",
21
- "prepublishOnly": "npm run build"
22
- },
23
- "np": {
24
- "name": "Roomstay Core",
25
- "anyBranch": true
26
- },
27
- "devDependencies": {
28
- "@babel/core": "^7.11.1",
29
- "@babel/plugin-proposal-class-properties": "^7.10.4",
30
- "@babel/plugin-proposal-decorators": "^7.10.5",
31
- "@babel/plugin-transform-runtime": "^7.11.0",
32
- "@babel/preset-env": "^7.11.0",
33
- "@babel/preset-typescript": "^7.10.4",
34
- "@babel/runtime": "^7.11.2",
35
- "babel": "^6.23.0",
36
- "babel-loader": "^8.1.0",
37
- "np": "^7.6.3",
38
- "resolve-tspaths": "^0.8.3",
39
- "ts-loader": "^9.4.1",
40
- "typescript": "^4.9.3",
41
- "webpack": "^5.75.0",
42
- "webpack-cli": "^5.0.0"
43
- }
44
- }
1
+ {
2
+ "name": "@roomstay/core",
3
+ "version": "0.1.33-1",
4
+ "description": "Details shared between Roomstay libraries. Anything from Currency, to Generic types",
5
+ "types": "./dist/index.d.ts",
6
+ "files": [
7
+ "dist/**/*"
8
+ ],
9
+ "exports": {
10
+ "node": {
11
+ "default": "./dist/node.js"
12
+ },
13
+ "default": "./dist/web.js"
14
+ },
15
+ "repository": "git@bitbucket.org:dijitallycom/roomstay-common.git",
16
+ "author": "Roomstay <help@roomstay.io>",
17
+ "license": "MIT",
18
+ "scripts": {
19
+ "build": "tsc --emitDeclarationOnly; resolve-tspaths; webpack",
20
+ "release": "np",
21
+ "prepublishOnly": "npm run build",
22
+ "updateLocal": "find ../../ -type d -path '*/node_modules/@roomstay/core' -exec shx cp -r ./dist {}/ \\;"
23
+ },
24
+ "np": {
25
+ "name": "Roomstay Core",
26
+ "anyBranch": true
27
+ },
28
+ "devDependencies": {
29
+ "@babel/core": "^7.11.1",
30
+ "@babel/plugin-proposal-class-properties": "^7.10.4",
31
+ "@babel/plugin-proposal-decorators": "^7.10.5",
32
+ "@babel/plugin-transform-runtime": "^7.11.0",
33
+ "@babel/preset-env": "^7.11.0",
34
+ "@babel/preset-typescript": "^7.10.4",
35
+ "@babel/runtime": "^7.11.2",
36
+ "babel": "^6.23.0",
37
+ "babel-loader": "^8.1.0",
38
+ "np": "^7.6.3",
39
+ "resolve-tspaths": "^0.8.3",
40
+ "ts-loader": "^9.4.1",
41
+ "typescript": "^4.9.3",
42
+ "webpack": "^5.75.0",
43
+ "webpack-cli": "^5.0.0"
44
+ },
45
+ "dependencies": {
46
+ "shx": "^0.3.4"
47
+ }
48
+ }
@@ -1,8 +0,0 @@
1
- export interface IAdminCompany {
2
- id: string;
3
- name: string;
4
- provider: string;
5
- }
6
- export interface IAdminGetCompaiesResponse {
7
- companies: IAdminCompany[];
8
- }
@@ -1,11 +0,0 @@
1
- export type IHotelColorScheme = {
2
- accent: string;
3
- accent2: string;
4
- accent3: string;
5
- success: string;
6
- navbar?: {
7
- background?: string;
8
- text?: string;
9
- textActive?: string;
10
- };
11
- };
@@ -1,5 +0,0 @@
1
- export type IPropertyDiscount = {
2
- name: string;
3
- hotelId: string;
4
- rmsDiscountId: string;
5
- };