@revolugo/common 7.2.2-alpha.2 → 7.2.2-alpha.21

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@revolugo/common",
3
- "version": "7.2.2-alpha.2",
3
+ "version": "7.2.2-alpha.21",
4
4
  "private": false,
5
5
  "description": "Revolugo common",
6
6
  "author": "Revolugo",
@@ -14,18 +14,18 @@ export enum RevolutEnv {
14
14
  }
15
15
 
16
16
  export enum StripeEnv {
17
+ Local = 'local',
17
18
  Production = 'live',
18
19
  Sandbox = 'sandbox',
19
20
  Staging = 'staging',
20
- Local = 'local',
21
21
  }
22
22
 
23
23
  export enum Environment {
24
+ CiCd = 'CI-CD',
25
+ Local = 'LOCAL',
24
26
  Production = 'LIVE',
25
27
  Sandbox = 'SANDBOX',
26
28
  Staging = 'STAGING',
27
- CiCd = 'CI-CD',
28
- Local = 'LOCAL',
29
29
  }
30
30
 
31
31
  export enum NodeEnv {
@@ -42,12 +42,12 @@ export enum LogLevel {
42
42
  Error = 50,
43
43
  }
44
44
  export enum BookingEnvironment {
45
+ // DEVELOPMENT: do NOT book hotel, do NOT send confirmation email
46
+ Development = 'development',
45
47
  // PRODUCTION: actually book hotel, send confirmation email
46
48
  Production = 'production',
47
49
  // SANDBOX: do NOT book hotel, still send confirmation email
48
50
  Sandbox = 'sandbox',
49
- // DEVELOPMENT: do NOT book hotel, do NOT send confirmation email
50
- Development = 'development',
51
51
  }
52
52
 
53
53
  /* @__PURE__ */
@@ -1,13 +1,13 @@
1
1
  export * from '../countries/constants.ts'
2
2
  export * from '../currencies/constants.ts'
3
3
  export * from './environment.ts'
4
- export * from './hotel.ts'
5
4
  export * from './hotel-offers.ts'
6
5
  export * from './hotel-room-offer.ts'
6
+ export * from './hotel.ts'
7
7
  export * from './locales.ts'
8
8
  export * from './measurement.ts'
9
9
  export * from './poller.ts'
10
+ export * from './stay-taxes-info.ts'
10
11
  export * from './tax.ts'
11
12
  export * from './time.ts'
12
- export * from './stay-taxes-info.ts'
13
13
  export * from './venue.ts'
package/src/http/index.ts CHANGED
@@ -1,4 +1,4 @@
1
- export * from 'ky'
2
1
  export * from './http.utils.ts'
2
+ export * from 'ky'
3
3
 
4
4
  export { default } from 'ky'
@@ -1,5 +1,5 @@
1
- export * from './breakfast.ts'
2
1
  export * from './booking-policy.ts'
2
+ export * from './breakfast.ts'
3
3
  export * from './cancellation-policies.ts'
4
4
  export * from './currency.ts'
5
5
  export * from './global.ts'
@@ -223,10 +223,10 @@ export enum BookingApiPayLaterEnum {
223
223
  type BookingApiPayLater = `${BookingApiPayLaterEnum}`
224
224
 
225
225
  export enum BookingStatusEnum {
226
- Cx = 'bkg-cx',
226
+ Af = 'bkg-af',
227
227
  Cf = 'bkg-cf',
228
228
  Created = 'bkg-created',
229
- Af = 'bkg-af',
229
+ Cx = 'bkg-cx',
230
230
  Ip = 'bkg-ip',
231
231
  Pc = 'bkg-pc',
232
232
  Pp = 'bkg-pp',
@@ -127,18 +127,16 @@ export interface HotelRoomOfferRequestResponse {
127
127
  sourceMarket: SourceMarket
128
128
  }
129
129
 
130
- // eslint-disable-next-line no-restricted-syntax
131
- export type HotelRoomOfferRequestCreate = Pick<
132
- HotelRoomOfferRequest,
133
- | 'adultCount'
134
- | 'checkInDate'
135
- | 'checkOutDate'
136
- | 'children'
137
- | 'eventMetadata'
138
- | 'hotelId'
139
- | 'roomCount'
140
- | 'sourceMarket'
141
- >
130
+ export interface HotelRoomOfferRequestCreate {
131
+ adultCount: HotelRoomOfferRequest['adultCount']
132
+ checkInDate: HotelRoomOfferRequest['checkInDate']
133
+ checkOutDate: HotelRoomOfferRequest['checkOutDate']
134
+ children?: HotelRoomOfferRequest['children']
135
+ eventMetadata?: HotelRoomOfferRequest['eventMetadata']
136
+ hotelId: HotelRoomOfferRequest['hotelId']
137
+ roomCount: HotelRoomOfferRequest['roomCount']
138
+ sourceMarket: HotelRoomOfferRequest['sourceMarket']
139
+ }
142
140
  export interface HotelRoomOfferRequestsCreatePayload {
143
141
  hotelRoomOfferRequestCreateApi?: HotelRoomOfferRequestCreate
144
142
  }
@@ -1,31 +1,31 @@
1
+ export * from './booking.ts'
2
+ export * from './contact-person.ts'
3
+ export * from './elements-events.ts'
4
+ export * from './hotel-offer-list.ts'
5
+ export * from './hotel-offer.ts'
6
+ export * from './hotel-offers-filters.ts'
7
+ export * from './hotel-room-offer-package-type.ts'
8
+ export * from './hotel-room-offer-type.ts'
9
+ export * from './invoice.ts'
10
+ export * from './payment-method.ts'
11
+ export * from './source-market.ts'
12
+ export * from './tax.ts'
13
+ export type * from './allowed-payment-method.ts'
1
14
  export type * from './bed.ts'
2
15
  export type * from './booking-flow.ts'
3
16
  export type * from './booking-policy.ts'
4
17
  export type * from './cancellation-policy.ts'
5
18
  export type * from './currency.ts'
6
- export * from './elements-events.ts'
7
19
  export type * from './event-metadata.ts'
8
20
  export type * from './hotel-image.ts'
9
21
  export type * from './hotel-images.ts'
10
22
  export type * from './hotel-offer-request.ts'
11
- export * from './hotel-offers-filters.ts'
12
- export type * from './hotel-room-offer.ts'
13
- export * from './hotel-room-offer-type.ts'
14
- export * from './hotel-room-offer-package-type.ts'
23
+ export type * from './hotel-review-rating.ts'
24
+ export type * from './hotel-room-offer-list.ts'
15
25
  export type * from './hotel-room-offer-request.ts'
26
+ export type * from './hotel-room-offer.ts'
16
27
  export type * from './hotel-room.ts'
17
- export * from './source-market.ts'
18
- export type * from './tag.ts'
19
- export * from './tax.ts'
20
- export * from './booking.ts'
21
- export * from './payment-method.ts'
22
- export * from './invoice.ts'
28
+ export type * from './hotel-rooming-list.ts'
23
29
  export type * from './hotel.ts'
24
- export * from './hotel-offer.ts'
25
- export * from './contact-person.ts'
26
- export type * from './hotel-review-rating.ts'
30
+ export type * from './tag.ts'
27
31
  export type * from './travel-times.ts'
28
- export * from './hotel-offer-list.ts'
29
- export type * from './hotel-room-offer-list.ts'
30
- export type * from './hotel-rooming-list.ts'
31
- export type * from './allowed-payment-method.ts'
@@ -1,8 +1,8 @@
1
1
  import type { PayLaterStatus } from '../booking.ts'
2
2
 
3
3
  export enum PaymentMethodNameEnum {
4
- CreditCard = 'CREDIT_CARD',
5
4
  Coupon = 'COUPON',
5
+ CreditCard = 'CREDIT_CARD',
6
6
  DepositAccount = 'DEPOSIT_ACCOUNT',
7
7
  PayLater = 'PAY_LATER',
8
8
  }
@@ -1,5 +1,5 @@
1
1
  export * from './bad-request.exception.ts'
2
2
  export * from './forbidden.exception.ts'
3
+ export * from './internal-server-error.exception.ts'
3
4
  export * from './unauthorized.exception.ts'
4
5
  export * from './unprocessable-entity.exception.ts'
5
- export * from './internal-server-error.exception.ts'
@@ -1,8 +1,15 @@
1
+ export * from './booking.ts'
2
+ export * from './elements/index.ts'
3
+
4
+ export * from './hotel-rooming-list.ts'
5
+ export * from './http-exception/index.ts'
6
+ export * from './pagination.ts'
7
+ export * from './payment.ts'
8
+ export * from './severities.ts'
9
+ export * from './taxable.ts'
1
10
  export type * from '../countries/types.ts'
2
11
  export type * from '../currencies/types.ts'
3
-
4
12
  export type * from './api.ts'
5
- export * from './booking.ts'
6
13
  export type * from './calendar.ts'
7
14
  export type * from './cancellation-policy.ts'
8
15
  export type * from './date.ts'
@@ -12,10 +19,3 @@ export type * from './hotel-contract.ts'
12
19
  export type * from './hotel-room-stock.ts'
13
20
  export type * from './money-object.ts'
14
21
  export type * from './paginated-queries.ts'
15
- export * from './pagination.ts'
16
- export * from './payment.ts'
17
- export * from './taxable.ts'
18
- export * from './severities.ts'
19
- export * from './http-exception/index.ts'
20
- export * from './hotel-rooming-list.ts'
21
- export * from './elements/index.ts'
@@ -4,8 +4,8 @@ export enum Order {
4
4
  }
5
5
 
6
6
  export enum PaginationMode {
7
- StartingAfter = 'STARTING_AFTER',
8
7
  EndingBefore = 'ENDING_BEFORE',
8
+ StartingAfter = 'STARTING_AFTER',
9
9
  }
10
10
 
11
11
  export interface IPaginationOptions {
@@ -11,10 +11,10 @@ export enum PaymentAssociationResourceType {
11
11
  }
12
12
 
13
13
  export enum PaymentProvider {
14
- Stripe = 'STRIPE',
15
- Qonto = 'QONTO',
16
14
  IbanFirst = 'IBANFIRST',
15
+ Qonto = 'QONTO',
17
16
  Revolut = 'REVOLUT',
17
+ Stripe = 'STRIPE',
18
18
  }
19
19
 
20
20
  export enum PublicPaymentMethod {
@@ -25,6 +25,6 @@ export enum PublicPaymentMethod {
25
25
 
26
26
  export enum PublicPaymentStatus {
27
27
  Confirmed = 'confirmed',
28
- Pending = 'pending',
29
28
  Failed = 'failed',
29
+ Pending = 'pending',
30
30
  }
@@ -1,12 +1,12 @@
1
1
  export enum Severity {
2
- Info = 'info',
3
- Success = 'success',
4
- Warn = 'warn',
2
+ Contrast = 'contrast',
3
+ Danger = 'danger',
4
+ Error = 'error',
5
5
  Help = 'help',
6
+ Info = 'info',
6
7
  Primary = 'primary',
7
8
  Secondary = 'secondary',
9
+ Success = 'success',
8
10
  Tertiary = 'tertiary',
9
- Danger = 'danger',
10
- Error = 'error',
11
- Contrast = 'contrast',
11
+ Warn = 'warn',
12
12
  }
@@ -1,7 +1,6 @@
1
1
  export * from './add-classes.ts'
2
2
  export * from './amount-from-percentage.ts'
3
3
  export * from './case-transformers.ts'
4
- export * from './keys-case-transformer.ts'
5
4
  export * from './chunk.ts'
6
5
  export * from './colors.ts'
7
6
  export * from './compact-object.ts'
@@ -9,6 +8,7 @@ export * from './compact.ts'
9
8
  export * from './compute-margin-rate.ts'
10
9
  export * from './compute-selling-price.ts'
11
10
  export * from './create-composite-key.ts'
11
+ export * from './create-dummy-hotel-images.ts'
12
12
  export * from './dates.ts'
13
13
  export * from './dayjs.ts'
14
14
  export * from './debounce.ts'
@@ -20,8 +20,8 @@ export * from './generate-numbers-from-str.ts'
20
20
  export * from './generate-pseudo-random-string.ts'
21
21
  export * from './generate-random-nearby-geolocation.ts'
22
22
  export * from './get-guest-count.ts'
23
- export * from './get-night-count.ts'
24
23
  export * from './get-hotel-room-offer-room-count.ts'
24
+ export * from './get-night-count.ts'
25
25
  export * from './get-random-element-from-array.ts'
26
26
  export * from './get-random-hex-color.ts'
27
27
  export * from './get-random-int.ts'
@@ -33,6 +33,7 @@ export * from './is-equal.ts'
33
33
  export * from './is-nil.ts'
34
34
  export * from './is-object.ts'
35
35
  export * from './key-by.ts'
36
+ export * from './keys-case-transformer.ts'
36
37
  export * from './lang-default-fallbacks.ts'
37
38
  export * from './map-keys.ts'
38
39
  export * from './map-values.ts'
@@ -55,9 +56,8 @@ export * from './to-boolean.ts'
55
56
  export * from './to-lang.ts'
56
57
  export * from './to-locale.ts'
57
58
  export * from './transform-schema-keys.ts'
58
- export * from './uniq.ts'
59
59
  export * from './uniq-by.ts'
60
60
  export * from './uniq-with.ts'
61
+ export * from './uniq.ts'
61
62
  export * from './validators.ts'
62
63
  export * from './weighted-mean.ts'
63
- export * from './create-dummy-hotel-images.ts'
package/src/utils/omit.ts CHANGED
@@ -3,6 +3,7 @@
3
3
  * Accepts a single key or an array of keys. Symbol keys are supported.
4
4
  * If `object` is nullish, returns an empty object.
5
5
  */
6
+ // eslint-disable-next-line no-restricted-syntax
6
7
  export function omit<T extends object, K extends keyof T>(
7
8
  object: T | null | undefined,
8
9
  keys: readonly K[] | K,
package/src/utils/pick.ts CHANGED
@@ -1,3 +1,4 @@
1
+ // eslint-disable-next-line no-restricted-syntax
1
2
  export function pick<T extends object, K extends keyof T>(
2
3
  obj: T,
3
4
  keys: readonly K[],
@@ -3,6 +3,7 @@
3
3
  * object. Optional second argument shakes out values
4
4
  * by custom evaluation.
5
5
  */
6
+ // eslint-disable-next-line no-restricted-syntax
6
7
  export function shake<RemovedKeys extends string, T>(
7
8
  obj: T,
8
9
  // eslint-disable-next-line @typescript-eslint/no-explicit-any