@roomstay/core 0.1.67-0 → 0.1.67-2

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.
@@ -1,6 +1,6 @@
1
- import { EGuaranteePolicyDepositMode } from '../Policies/EGuaranteePolicy.enum';
1
+ import { Warning } from '../index.js';
2
2
  import { IItemisedBookingFeeResponse } from '../Booking/Itinerary.types';
3
- import { Warning } from "../General/Warning.type";
3
+ import { EGuaranteePolicyDepositMode } from '../Policies/EGuaranteePolicy.enum';
4
4
  export type IAvailability = {
5
5
  roomTypes: {
6
6
  [roomTypeCode: string]: IRoomType;
@@ -52,6 +52,7 @@ export type IRoomType = {
52
52
  [auxiliaryFilterId: string]: string[];
53
53
  };
54
54
  order: number;
55
+ doNotUpsell: boolean;
55
56
  };
56
57
  export type IRatePlan = {
57
58
  name: string;
@@ -202,5 +202,8 @@ export type IAdminGiftCardLogDTO = {
202
202
  url?: string | null;
203
203
  username?: string | null;
204
204
  userId?: string | null;
205
- additionalData?: any;
205
+ changedFields?: Record<string, {
206
+ old: string;
207
+ new: string;
208
+ }> | null;
206
209
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@roomstay/core",
3
- "version": "0.1.67-0",
3
+ "version": "0.1.67-2",
4
4
  "description": "Details shared between Roomstay libraries. Anything from Currency, to Generic types",
5
5
  "types": "./dist/index.d.ts",
6
6
  "files": [
@@ -1,7 +0,0 @@
1
- /*!
2
- * decimal.js v10.4.3
3
- * An arbitrary-precision Decimal type for JavaScript.
4
- * https://github.com/MikeMcl/decimal.js
5
- * Copyright (c) 2022 Michael Mclaughlin <M8ch88l@gmail.com>
6
- * MIT Licence
7
- */
@@ -1,24 +0,0 @@
1
- export type IDailyRevenue = {
2
- date: string;
3
- revenue: number;
4
- };
5
- export type IDailyRoomBreakdown = {
6
- date: string;
7
- roomName: string;
8
- purchases: number;
9
- };
10
- export type IRegionBreakdown = {
11
- country: string;
12
- region: string;
13
- purchases: number;
14
- revenue: number;
15
- };
16
- export type IBigQueryResponse = {
17
- purchases: number;
18
- cancellations: number;
19
- revenue: number;
20
- conversionRate: number;
21
- dailyRevenue: IDailyRevenue[];
22
- dailyRoomsBreakdown: IDailyRoomBreakdown[];
23
- regionBreakdown: IRegionBreakdown[];
24
- };
@@ -1,11 +0,0 @@
1
- /**
2
- * This is the response body that comes down if a booking fails anywhere in the booking flow.
3
- *
4
- * Object will contain a public message only, with partial reservation data to be able to attempt to "resume" the booking
5
- */
6
- export type IBookingCreateErrorResponse = {
7
- canRetryPayment: boolean;
8
- isPaymentTaken: boolean;
9
- publicMessage: string;
10
- roomstayId: string;
11
- };
@@ -1,5 +0,0 @@
1
- export declare enum IBookingStatus {
2
- Pending = "Pending",
3
- Committed = "Committed",
4
- Cancelled = "Cancelled"
5
- }
@@ -1,7 +0,0 @@
1
- export type IPrice = {
2
- cost: number;
3
- discount: number;
4
- tax: number;
5
- fee: number;
6
- total: number;
7
- };
@@ -1,89 +0,0 @@
1
- import { EHotelCardProcessor } from './IBookingPayment.type';
2
- export declare enum ESplitPaymentState {
3
- INITIATED = "initiated",
4
- GIFTCARD_AUTHORIZED = "giftcard_authorized",
5
- CC_AUTHORIZED = "cc_authorized",
6
- CAPTURED = "captured",
7
- FAILED = "failed",
8
- ROLLED_BACK = "rolled_back"
9
- }
10
- export declare enum ESplitPaymentStatus {
11
- PENDING = "pending",
12
- AUTHORIZED = "authorized",
13
- CAPTURED = "captured",
14
- FAILED = "failed"
15
- }
16
- export interface IGiftCardPaymentDetails {
17
- amount: number;
18
- cardCode: string;
19
- authorizationId?: string;
20
- status: ESplitPaymentStatus;
21
- expiresAt?: Date;
22
- }
23
- export interface ICreditCardPaymentDetails {
24
- amount: number;
25
- processor: EHotelCardProcessor;
26
- authorizationId?: string;
27
- status: ESplitPaymentStatus;
28
- expiresAt?: Date;
29
- }
30
- export interface ISplitPayment {
31
- splitPaymentId: string;
32
- totalAmount: number;
33
- giftCard: IGiftCardPaymentDetails;
34
- creditCard: ICreditCardPaymentDetails;
35
- sessionState: ESplitPaymentState;
36
- createdAt: Date;
37
- updatedAt: Date;
38
- expiresAt: Date;
39
- }
40
- export interface ISplitPaymentSession {
41
- id: string;
42
- bookingId: number;
43
- companyId: number;
44
- hotelId: string;
45
- splitPayment: ISplitPayment;
46
- }
47
- export interface IInitiateSplitPaymentRequest {
48
- bookingId: number;
49
- giftCardCode: string;
50
- giftCardAmount: number;
51
- creditCardAmount: number;
52
- }
53
- export interface IInitiateSplitPaymentResponse {
54
- sessionId: string;
55
- giftCardAmount: number;
56
- creditCardAmount: number;
57
- expiresAt: Date;
58
- }
59
- export interface IAuthorizationResult {
60
- success: boolean;
61
- authorizationId?: string;
62
- expiresAt?: Date;
63
- error?: string;
64
- }
65
- export interface ICaptureResult {
66
- success: boolean;
67
- giftCardCaptured: boolean;
68
- creditCardCaptured: boolean;
69
- error?: string;
70
- }
71
- export interface ISplitPaymentCheckoutDetails {
72
- sessionId: string;
73
- currentStep: 'giftcard' | 'creditcard' | 'capture';
74
- giftCard: {
75
- amount: number;
76
- status: ESplitPaymentStatus;
77
- authorizationId?: string;
78
- expiresAt?: Date;
79
- };
80
- creditCard: {
81
- amount: number;
82
- status: ESplitPaymentStatus;
83
- processor?: EHotelCardProcessor;
84
- redirectUrl?: string;
85
- authorizationId?: string;
86
- expiresAt?: Date;
87
- };
88
- expiresAt: Date;
89
- }
@@ -1,6 +0,0 @@
1
- export interface IFeeOptions {
2
- includeInRates: boolean;
3
- alreadyIncludedInRates: boolean;
4
- appliesToAddons: boolean;
5
- includePreviousFeesInCalculation: boolean;
6
- }
File without changes
@@ -1,7 +0,0 @@
1
- /*!
2
- * decimal.js v10.4.3
3
- * An arbitrary-precision Decimal type for JavaScript.
4
- * https://github.com/MikeMcl/decimal.js
5
- * Copyright (c) 2022 Michael Mclaughlin <M8ch88l@gmail.com>
6
- * MIT Licence
7
- */