@roomstay/core 0.1.85-0 → 0.1.85-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,4 +1,4 @@
1
- import type { MediaType } from '../index.js';
1
+ import type { IRole, MediaType } from '../index.js';
2
2
  export declare enum EAdminCompanyUserRole {
3
3
  SuperAdmin = "SuperAdmin",
4
4
  Admin = "Admin",
@@ -19,7 +19,10 @@ export type IAdminCompanyUser = {
19
19
  newPassword?: string;
20
20
  deletedDate?: Date;
21
21
  role?: EAdminCompanyUserRole;
22
+ roles?: IRole[];
22
23
  companyUserHotels?: IAdminCompanyUserHotel[];
23
24
  hotelIds?: string[];
25
+ roleId?: string;
24
26
  viewAllHotels?: boolean;
27
+ skipPermissions?: boolean;
25
28
  };
@@ -0,0 +1,6 @@
1
+ export interface IFeeOptions {
2
+ includeInRates: boolean;
3
+ alreadyIncludedInRates: boolean;
4
+ appliesToAddons: boolean;
5
+ includePreviousFeesInCalculation: boolean;
6
+ }
@@ -0,0 +1,6 @@
1
+ export interface ILoyaltyTier {
2
+ /** Spending threshold in cents */
3
+ threshold: number;
4
+ /** Discount percentage awarded at this tier */
5
+ discountPercent: number;
6
+ }
@@ -0,0 +1,4 @@
1
+ export declare enum ENewbookSiteSelectionFeeType {
2
+ PerNight = "per_night",
3
+ PerBooking = "per_booking"
4
+ }
@@ -0,0 +1,6 @@
1
+ export declare enum ENewbookSiteSelectionType {
2
+ PmsAndNbo = "pms_and_nbo",
3
+ Pms = "pms",
4
+ Nbo = "nbo",
5
+ NoFee = "no_fee"
6
+ }
@@ -0,0 +1,3 @@
1
+ export declare enum ENewbookSyncType {
2
+ Rates = "rates"
3
+ }
@@ -0,0 +1,9 @@
1
+ import { EPMSSyncStatus } from '../PMS/EPMSSyncStatus.enum';
2
+ import { ENewbookSyncStrategy } from './ENewbookSyncStrategy.enum';
3
+ export interface INewbookSyncResponse {
4
+ id: number;
5
+ status: EPMSSyncStatus;
6
+ syncData: string | null;
7
+ syncType: ENewbookSyncStrategy;
8
+ additionalData?: any;
9
+ }
@@ -0,0 +1,8 @@
1
+ export declare enum EPMSSyncStatus {
2
+ New = "new",
3
+ Queued = "queued",
4
+ InProgress = "in_progress",
5
+ Success = "success",
6
+ Failure = "failure",
7
+ RequireResume = "require_resume"
8
+ }
@@ -0,0 +1,10 @@
1
+ import { ECompanyProvider } from '../Company/ECompanyProvider.enum';
2
+ import { EPMSSyncStatus } from './EPMSSyncStatus.enum';
3
+ export interface IPMSSyncResponse {
4
+ id: number;
5
+ provider: ECompanyProvider;
6
+ status: EPMSSyncStatus;
7
+ syncData: string | null;
8
+ syncType: string;
9
+ additionalData?: any;
10
+ }
@@ -0,0 +1,2 @@
1
+ export * from './EPMSSyncStatus.enum';
2
+ export * from './IPMSSyncResponse.type';
@@ -0,0 +1,172 @@
1
+ export type IPermission = {
2
+ id: number;
3
+ name: string;
4
+ label: string;
5
+ group: string;
6
+ deletedDate?: string;
7
+ };
8
+ export declare function getAllPermissions(): readonly Omit<IPermission, 'id'>[];
9
+ export declare function getAllLimitedPermissionNames(): readonly string[];
10
+ export declare const Permissions: {
11
+ readonly USER_VIEW: {
12
+ readonly name: "user:view";
13
+ readonly label: "View User";
14
+ readonly group: "User Management";
15
+ };
16
+ readonly USER_MODIFY: {
17
+ readonly name: "user:modify";
18
+ readonly label: "Modify User";
19
+ readonly group: "User Management";
20
+ };
21
+ readonly ROLE_VIEW: {
22
+ readonly name: "role:view";
23
+ readonly label: "View Role";
24
+ readonly group: "User Management";
25
+ };
26
+ readonly ROLE_MODIFY: {
27
+ readonly name: "role:modify";
28
+ readonly label: "Modify Role";
29
+ readonly group: "User Management";
30
+ };
31
+ readonly HOTEL_VIEW: {
32
+ readonly name: "hotel:view";
33
+ readonly label: "View Hotel";
34
+ readonly group: "Property Configuration";
35
+ };
36
+ readonly HOTEL_MODIFY: {
37
+ readonly name: "hotel:modify";
38
+ readonly label: "Modify Hotel";
39
+ readonly group: "Property Configuration";
40
+ };
41
+ readonly HOTEL_INTEGRATIONS: {
42
+ readonly name: "hotelIntegrations";
43
+ readonly label: "Modify Hotel Integrations";
44
+ readonly group: "Property Configuration";
45
+ };
46
+ readonly FEE_VIEW: {
47
+ readonly name: "fee:view";
48
+ readonly label: "View Fee";
49
+ readonly group: "Property Configuration";
50
+ };
51
+ readonly FEE_MODIFY: {
52
+ readonly name: "fee:modify";
53
+ readonly label: "Modify Fee";
54
+ readonly group: "Property Configuration";
55
+ };
56
+ readonly GUARANTEE_POLICIES_VIEW: {
57
+ readonly name: "guaranteePolicies:view";
58
+ readonly label: "View Guarantee Policies";
59
+ readonly group: "Policy Management";
60
+ };
61
+ readonly GUARANTEE_POLICIES_MODIFY: {
62
+ readonly name: "guaranteePolicies:modify";
63
+ readonly label: "Modify Guarantee Policies";
64
+ readonly group: "Policy Management";
65
+ };
66
+ readonly CANCELLATION_POLICIES_VIEW: {
67
+ readonly name: "cancellationPolicies:view";
68
+ readonly label: "View Cancellation Policies";
69
+ readonly group: "Policy Management";
70
+ };
71
+ readonly CANCELLATION_POLICIES_MODIFY: {
72
+ readonly name: "cancellationPolicies:modify";
73
+ readonly label: "Modify Cancellation Policies";
74
+ readonly group: "Policy Management";
75
+ };
76
+ readonly ROOM_VIEW: {
77
+ readonly name: "room:view";
78
+ readonly label: "View Room";
79
+ readonly group: "Room, Rate and Addon Management";
80
+ };
81
+ readonly ROOM_LIST: {
82
+ readonly name: "room:list";
83
+ readonly label: "List Room";
84
+ readonly group: "Room, Rate and Addon Management";
85
+ };
86
+ readonly ROOM_MODIFY: {
87
+ readonly name: "room:modify";
88
+ readonly label: "Modify Room";
89
+ readonly group: "Room, Rate and Addon Management";
90
+ };
91
+ readonly ROOM_GROUPING_VIEW: {
92
+ readonly name: "roomGrouping:view";
93
+ readonly label: "View Room Grouping";
94
+ readonly group: "Room, Rate and Addon Management";
95
+ };
96
+ readonly ROOM_GROUPING_MODIFY: {
97
+ readonly name: "roomGrouping:modify";
98
+ readonly label: "Modify Room Grouping";
99
+ readonly group: "Room, Rate and Addon Management";
100
+ };
101
+ readonly RATE_VIEW: {
102
+ readonly name: "rate:view";
103
+ readonly label: "View Rate";
104
+ readonly group: "Room, Rate and Addon Management";
105
+ };
106
+ readonly RATE_LIST: {
107
+ readonly name: "rate:list";
108
+ readonly label: "List Rate";
109
+ readonly group: "Room, Rate and Addon Management";
110
+ };
111
+ readonly RATE_MODIFY: {
112
+ readonly name: "rate:modify";
113
+ readonly label: "Modify Rate";
114
+ readonly group: "Room, Rate and Addon Management";
115
+ };
116
+ readonly ADDON_VIEW: {
117
+ readonly name: "addon:view";
118
+ readonly label: "View Addon";
119
+ readonly group: "Room, Rate and Addon Management";
120
+ };
121
+ readonly ADDON_MODIFY: {
122
+ readonly name: "addon:modify";
123
+ readonly label: "Modify Addon";
124
+ readonly group: "Room, Rate and Addon Management";
125
+ };
126
+ readonly PROMO_CODE_VIEW: {
127
+ readonly name: "promoCode:view";
128
+ readonly label: "View Promo Code";
129
+ readonly group: "Room, Rate and Addon Management";
130
+ };
131
+ readonly PROMO_CODE_MODIFY: {
132
+ readonly name: "promoCode:modify";
133
+ readonly label: "Modify Promo Code";
134
+ readonly group: "Room, Rate and Addon Management";
135
+ };
136
+ readonly BOOKING_VIEW: {
137
+ readonly name: "booking:view";
138
+ readonly label: "View Booking";
139
+ readonly group: "Booking Management";
140
+ };
141
+ readonly BOOKING_EXPORT: {
142
+ readonly name: "booking:export";
143
+ readonly label: "Export Booking";
144
+ readonly group: "Booking Management";
145
+ };
146
+ readonly ANALYTICS: {
147
+ readonly name: "analytics";
148
+ readonly label: "Modify Analytics";
149
+ readonly group: "View Analytics";
150
+ };
151
+ readonly EVENTS_VIEW: {
152
+ readonly name: "events:view";
153
+ readonly label: "View Event";
154
+ readonly group: "Events and Calendar Highlights";
155
+ };
156
+ readonly EVENTS_MODIFY: {
157
+ readonly name: "events:modify";
158
+ readonly label: "Modify Event";
159
+ readonly group: "Events and Calendar Highlights";
160
+ };
161
+ readonly CALENDAR_HIGHLIGHTS_VIEW: {
162
+ readonly name: "calendarHighlights:view";
163
+ readonly label: "View Calendar Highlight";
164
+ readonly group: "Events and Calendar Highlights";
165
+ };
166
+ readonly CALENDAR_HIGHLIGHTS_MODIFY: {
167
+ readonly name: "calendarHighlights:modify";
168
+ readonly label: "Modify Calendar Highlight";
169
+ readonly group: "Events and Calendar Highlights";
170
+ };
171
+ };
172
+ export type PermissionType = typeof Permissions[keyof typeof Permissions];
@@ -0,0 +1,8 @@
1
+ export declare enum ERMSAuthSyncHistoryStatus {
2
+ Success = "success",
3
+ Failure = "failure",
4
+ New = "new",
5
+ Queued = "queued",
6
+ InProgress = "in_progress",
7
+ RequireResume = "require_resume"
8
+ }
@@ -0,0 +1,8 @@
1
+ import { ERMSAuthSyncHistoryStatus } from './ERMSAuthSyncHistoryStatus.type';
2
+ export type IRMSSyncResponse = {
3
+ id: number;
4
+ status: ERMSAuthSyncHistoryStatus;
5
+ additionalData: any;
6
+ syncData: string | null;
7
+ syncType: string;
8
+ };
@@ -0,0 +1,13 @@
1
+ import { IPermission } from '../Permission/IPermission.type';
2
+ export interface IRole {
3
+ id: number;
4
+ name: string;
5
+ totalPermissions?: number;
6
+ permissions?: IPermission[];
7
+ deletedDate?: string;
8
+ }
9
+ export interface IRolePayload {
10
+ id: number;
11
+ name: string;
12
+ permissionIds?: IPermission['id'][];
13
+ }
@@ -39,6 +39,10 @@ export * from './Hotel/IHotelColorScheme.type';
39
39
  export * from './Hotel/IHotelOverrides.type';
40
40
  export * from './Hotel/IHotelReplica.type';
41
41
  export * from './Hotel/IHotelService.type';
42
+ /**
43
+ * Role
44
+ */
45
+ export * from './Role/IRole.type';
42
46
  /**
43
47
  * Room
44
48
  */
@@ -90,6 +94,10 @@ export * from './Member/EMembershipProvider.type';
90
94
  * Package
91
95
  */
92
96
  export * from './Package/Package.types';
97
+ /**
98
+ * Permission
99
+ */
100
+ export * from './Permission/IPermission.type';
93
101
  /**
94
102
  * Policies
95
103
  */
File without changes