@revolugo/booking-api-client 7.1.0-alpha.1 → 7.1.0
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/index.es.js +312 -294
- package/dist/index.umd.js +2 -2
- package/dist/types/booking-api-client.d.ts +8 -8
- package/dist/types/v1/apis/ResourceHotelOffersApi.d.ts +3 -3
- package/dist/types/v1/apis/ResourceHotelRoomOffersApi.d.ts +3 -3
- package/dist/types/v1/models/index.d.ts +76 -51
- package/package.json +5 -5
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { CurrencyBookingApiClient, HotelRoomOfferApiResponse, HotelRoomOffersApiResponse, HotelRoomOffersCreateApi } from '../models';
|
|
2
2
|
import { TPollerCallback } from '@revolugo/common/utils';
|
|
3
3
|
/**
|
|
4
4
|
* Revolugo Booking API Reference
|
|
@@ -13,7 +13,7 @@ import { TPollerCallback } from '@revolugo/common/utils';
|
|
|
13
13
|
*/
|
|
14
14
|
import * as runtime from '../runtime';
|
|
15
15
|
export interface HotelRoomOffersListPayload {
|
|
16
|
-
currency:
|
|
16
|
+
currency: CurrencyBookingApiClient;
|
|
17
17
|
hotelRoomOfferRequestId: string;
|
|
18
18
|
lang?: HotelRoomOffersLangEnum;
|
|
19
19
|
limit?: number | null;
|
|
@@ -31,7 +31,7 @@ export interface HotelRoomOffersInterface {
|
|
|
31
31
|
/**
|
|
32
32
|
* You\'ll make a call to the **Hotel Room Offers** endpoint in order to get a list of **Hotel Room Offers** resulting from your **Hotel Room Offer Request** parameters. We\'ll send your rate check request to the specific hotel matching the hotel ID you provided previously and the **Hotel Room Offers** endpoint will return the available rates at this specific hotel. An **Hotel Room Offer** describes hotel rooms: prices, remaining count available (when applicable), details about the room itself (e.g., beds, etc) and other information you\'ll find below. ⚠️ **Cancellation Policies** attached to each **Hotel Room Offer** returned by this endpoint will most likely be **<span style=\"color:red\">cached data</span>** and should not be considered as accurate, although in most case they will reflect the actual/live ones. In order to retrieve accurate and live **Cancellation Policies** for a specific **Hotel Room Offer** you need to make a call to the **[Create Booking Policies endpoint](/v1/documentation#operation/postV1Booking_policies)**. However, we do not recommend to systematically call **[Create Booking Policies endpoint](/v1/documentation#operation/postV1Booking_policies)** for each **Hotel Room Offer** retrieved as it will most likely trigger rate limiting on your API calls. Rather we recommend to do this as an explicit two-step process: first you check **Hotel Room Offers**, then, once your customer shows interest in a specific **Hotel Room Offer**, you make the call to the **[Create Booking Policies endpoint](/v1/documentation#operation/postV1Booking_policies)** on behalf of your customer. This endpoint requires ⚛️ **[Polling](/v1/documentation#tag/Polling)**.
|
|
33
33
|
* @summary ⚛️ Retrieve Hotel Room Offers
|
|
34
|
-
* @param {
|
|
34
|
+
* @param {CurrencyBookingApiClient} currency ISO 4217 currency code.
|
|
35
35
|
* @param {string} hotelRoomOfferRequestId id of the **Hotel Room Offer Request** previously created via [Create Hotel Room Offer Request](/v1/documentation#operation/postV1Hotel_room_offer_requests).
|
|
36
36
|
* @param {'de-DE' | 'en-US' | 'es-ES' | 'fr-FR' | 'it-IT' | 'nl-NL' | 'pt-PT'} [lang] Set the language for the returned content using a valid language code.
|
|
37
37
|
* @param {number} [limit] Limit the number of **Hotel Room Offers** returned, sorted by increasing price.
|
|
@@ -488,10 +488,10 @@ export interface BookingApi {
|
|
|
488
488
|
createdAt: string;
|
|
489
489
|
/**
|
|
490
490
|
*
|
|
491
|
-
* @type {
|
|
491
|
+
* @type {CurrencyBookingApiClient}
|
|
492
492
|
* @memberof BookingApi
|
|
493
493
|
*/
|
|
494
|
-
currency:
|
|
494
|
+
currency: CurrencyBookingApiClient;
|
|
495
495
|
/**
|
|
496
496
|
* Customer Reference of the requested Booking (sometimes to present by the customer at hotel check-in).
|
|
497
497
|
* @type {string}
|
|
@@ -773,10 +773,10 @@ export interface BookingPoliciesApi {
|
|
|
773
773
|
children?: string | null;
|
|
774
774
|
/**
|
|
775
775
|
*
|
|
776
|
-
* @type {
|
|
776
|
+
* @type {CurrencyBookingApiClient}
|
|
777
777
|
* @memberof BookingPoliciesApi
|
|
778
778
|
*/
|
|
779
|
-
currency:
|
|
779
|
+
currency: CurrencyBookingApiClient;
|
|
780
780
|
/**
|
|
781
781
|
* Expiration date for this **Booking Policy**.
|
|
782
782
|
*
|
|
@@ -861,12 +861,25 @@ export interface BookingPoliciesCreateApi {
|
|
|
861
861
|
*/
|
|
862
862
|
hotelRoomOfferId: string;
|
|
863
863
|
/**
|
|
864
|
-
*
|
|
865
|
-
* @type {
|
|
864
|
+
* Set the language for the returned content using a valid language code.
|
|
865
|
+
* @type {string}
|
|
866
866
|
* @memberof BookingPoliciesCreateApi
|
|
867
867
|
*/
|
|
868
|
-
lang?:
|
|
868
|
+
lang?: BookingPoliciesCreateApiLangEnum;
|
|
869
869
|
}
|
|
870
|
+
/**
|
|
871
|
+
* @export
|
|
872
|
+
*/
|
|
873
|
+
export declare const BookingPoliciesCreateApiLangEnum: {
|
|
874
|
+
readonly DeDe: "de-DE";
|
|
875
|
+
readonly EnUs: "en-US";
|
|
876
|
+
readonly EsEs: "es-ES";
|
|
877
|
+
readonly FrFr: "fr-FR";
|
|
878
|
+
readonly ItIt: "it-IT";
|
|
879
|
+
readonly NlNl: "nl-NL";
|
|
880
|
+
readonly PtPt: "pt-PT";
|
|
881
|
+
};
|
|
882
|
+
export type BookingPoliciesCreateApiLangEnum = typeof BookingPoliciesCreateApiLangEnum[keyof typeof BookingPoliciesCreateApiLangEnum];
|
|
870
883
|
/**
|
|
871
884
|
*
|
|
872
885
|
* @export
|
|
@@ -948,11 +961,11 @@ export interface ContactPersonApi {
|
|
|
948
961
|
*/
|
|
949
962
|
firstName: string;
|
|
950
963
|
/**
|
|
951
|
-
*
|
|
952
|
-
* @type {
|
|
964
|
+
* Set the prefered language to use when contacting the contact person for booking related communication(s).
|
|
965
|
+
* @type {string}
|
|
953
966
|
* @memberof ContactPersonApi
|
|
954
967
|
*/
|
|
955
|
-
lang?:
|
|
968
|
+
lang?: ContactPersonApiLangEnum;
|
|
956
969
|
/**
|
|
957
970
|
* Contact person's last name
|
|
958
971
|
* @type {string}
|
|
@@ -1002,6 +1015,19 @@ export interface ContactPersonApi {
|
|
|
1002
1015
|
*/
|
|
1003
1016
|
zipCode?: string | null;
|
|
1004
1017
|
}
|
|
1018
|
+
/**
|
|
1019
|
+
* @export
|
|
1020
|
+
*/
|
|
1021
|
+
export declare const ContactPersonApiLangEnum: {
|
|
1022
|
+
readonly DeDe: "de-DE";
|
|
1023
|
+
readonly EnUs: "en-US";
|
|
1024
|
+
readonly EsEs: "es-ES";
|
|
1025
|
+
readonly FrFr: "fr-FR";
|
|
1026
|
+
readonly ItIt: "it-IT";
|
|
1027
|
+
readonly NlNl: "nl-NL";
|
|
1028
|
+
readonly PtPt: "pt-PT";
|
|
1029
|
+
};
|
|
1030
|
+
export type ContactPersonApiLangEnum = typeof ContactPersonApiLangEnum[keyof typeof ContactPersonApiLangEnum];
|
|
1005
1031
|
/**
|
|
1006
1032
|
* @export
|
|
1007
1033
|
*/
|
|
@@ -1317,7 +1343,7 @@ export type CountryIso2Code = typeof CountryIso2Code[keyof typeof CountryIso2Cod
|
|
|
1317
1343
|
* ISO 4217 currency code.
|
|
1318
1344
|
* @export
|
|
1319
1345
|
*/
|
|
1320
|
-
export declare const
|
|
1346
|
+
export declare const CurrencyBookingApiClient: {
|
|
1321
1347
|
readonly Aed: "AED";
|
|
1322
1348
|
readonly Afn: "AFN";
|
|
1323
1349
|
readonly All: "ALL";
|
|
@@ -1457,7 +1483,7 @@ export declare const CurrencyClient: {
|
|
|
1457
1483
|
readonly Zar: "ZAR";
|
|
1458
1484
|
readonly Zmw: "ZMW";
|
|
1459
1485
|
};
|
|
1460
|
-
export type
|
|
1486
|
+
export type CurrencyBookingApiClient = typeof CurrencyBookingApiClient[keyof typeof CurrencyBookingApiClient];
|
|
1461
1487
|
/**
|
|
1462
1488
|
*
|
|
1463
1489
|
* @export
|
|
@@ -1628,10 +1654,10 @@ export interface HotelApi {
|
|
|
1628
1654
|
countryCode?: string | null;
|
|
1629
1655
|
/**
|
|
1630
1656
|
*
|
|
1631
|
-
* @type {
|
|
1657
|
+
* @type {CurrencyBookingApiClient}
|
|
1632
1658
|
* @memberof HotelApi
|
|
1633
1659
|
*/
|
|
1634
|
-
currency?:
|
|
1660
|
+
currency?: CurrencyBookingApiClient;
|
|
1635
1661
|
/**
|
|
1636
1662
|
* Hotel description.
|
|
1637
1663
|
* @type {string}
|
|
@@ -1807,49 +1833,49 @@ export interface HotelApiImages {
|
|
|
1807
1833
|
thumb?: boolean | null;
|
|
1808
1834
|
}
|
|
1809
1835
|
/**
|
|
1810
|
-
*
|
|
1836
|
+
*
|
|
1811
1837
|
* @export
|
|
1812
1838
|
* @interface HotelImageApi
|
|
1813
1839
|
*/
|
|
1814
1840
|
export interface HotelImageApi {
|
|
1815
1841
|
/**
|
|
1816
|
-
*
|
|
1842
|
+
*
|
|
1817
1843
|
* @type {string}
|
|
1818
1844
|
* @memberof HotelImageApi
|
|
1819
1845
|
*/
|
|
1820
1846
|
caption?: string | null;
|
|
1821
1847
|
/**
|
|
1822
|
-
*
|
|
1848
|
+
*
|
|
1823
1849
|
* @type {boolean}
|
|
1824
1850
|
* @memberof HotelImageApi
|
|
1825
1851
|
*/
|
|
1826
1852
|
isHeroImage: boolean;
|
|
1827
1853
|
/**
|
|
1828
|
-
*
|
|
1854
|
+
*
|
|
1829
1855
|
* @type {string}
|
|
1830
1856
|
* @memberof HotelImageApi
|
|
1831
1857
|
*/
|
|
1832
1858
|
l: string;
|
|
1833
1859
|
/**
|
|
1834
|
-
*
|
|
1860
|
+
*
|
|
1835
1861
|
* @type {string}
|
|
1836
1862
|
* @memberof HotelImageApi
|
|
1837
1863
|
*/
|
|
1838
1864
|
m: string;
|
|
1839
1865
|
/**
|
|
1840
|
-
*
|
|
1866
|
+
*
|
|
1841
1867
|
* @type {string}
|
|
1842
1868
|
* @memberof HotelImageApi
|
|
1843
1869
|
*/
|
|
1844
1870
|
s: string;
|
|
1845
1871
|
/**
|
|
1846
|
-
*
|
|
1872
|
+
*
|
|
1847
1873
|
* @type {string}
|
|
1848
1874
|
* @memberof HotelImageApi
|
|
1849
1875
|
*/
|
|
1850
1876
|
xl: string;
|
|
1851
1877
|
/**
|
|
1852
|
-
*
|
|
1878
|
+
*
|
|
1853
1879
|
* @type {string}
|
|
1854
1880
|
* @memberof HotelImageApi
|
|
1855
1881
|
*/
|
|
@@ -1911,10 +1937,10 @@ export interface HotelOfferApi {
|
|
|
1911
1937
|
countryCode?: string | null;
|
|
1912
1938
|
/**
|
|
1913
1939
|
*
|
|
1914
|
-
* @type {
|
|
1940
|
+
* @type {CurrencyBookingApiClient}
|
|
1915
1941
|
* @memberof HotelOfferApi
|
|
1916
1942
|
*/
|
|
1917
|
-
currency?:
|
|
1943
|
+
currency?: CurrencyBookingApiClient;
|
|
1918
1944
|
/**
|
|
1919
1945
|
* Hotel description.
|
|
1920
1946
|
* @type {string}
|
|
@@ -2350,10 +2376,10 @@ export interface HotelOffersDataApiResponse {
|
|
|
2350
2376
|
children?: string | null;
|
|
2351
2377
|
/**
|
|
2352
2378
|
*
|
|
2353
|
-
* @type {
|
|
2379
|
+
* @type {CurrencyBookingApiClient}
|
|
2354
2380
|
* @memberof HotelOffersDataApiResponse
|
|
2355
2381
|
*/
|
|
2356
|
-
currency:
|
|
2382
|
+
currency: CurrencyBookingApiClient;
|
|
2357
2383
|
/**
|
|
2358
2384
|
* List of Hotel Offers
|
|
2359
2385
|
* @type {Array<HotelOfferApi>}
|
|
@@ -2567,10 +2593,10 @@ export interface HotelRoomOfferApi {
|
|
|
2567
2593
|
count?: number | null;
|
|
2568
2594
|
/**
|
|
2569
2595
|
*
|
|
2570
|
-
* @type {
|
|
2596
|
+
* @type {CurrencyBookingApiClient}
|
|
2571
2597
|
* @memberof HotelRoomOfferApi
|
|
2572
2598
|
*/
|
|
2573
|
-
currency:
|
|
2599
|
+
currency: CurrencyBookingApiClient;
|
|
2574
2600
|
/**
|
|
2575
2601
|
* id of the associated Hotel.
|
|
2576
2602
|
* @type {string}
|
|
@@ -2720,10 +2746,10 @@ export interface HotelRoomOfferApiResponse {
|
|
|
2720
2746
|
children?: string | null;
|
|
2721
2747
|
/**
|
|
2722
2748
|
*
|
|
2723
|
-
* @type {
|
|
2749
|
+
* @type {CurrencyBookingApiClient}
|
|
2724
2750
|
* @memberof HotelRoomOfferApiResponse
|
|
2725
2751
|
*/
|
|
2726
|
-
currency:
|
|
2752
|
+
currency: CurrencyBookingApiClient;
|
|
2727
2753
|
/**
|
|
2728
2754
|
* Hotel id
|
|
2729
2755
|
* @type {string}
|
|
@@ -2992,10 +3018,10 @@ export interface HotelRoomOffersCreateApi {
|
|
|
2992
3018
|
breakfastCount?: number;
|
|
2993
3019
|
/**
|
|
2994
3020
|
*
|
|
2995
|
-
* @type {
|
|
3021
|
+
* @type {CurrencyBookingApiClient}
|
|
2996
3022
|
* @memberof HotelRoomOffersCreateApi
|
|
2997
3023
|
*/
|
|
2998
|
-
currency:
|
|
3024
|
+
currency: CurrencyBookingApiClient;
|
|
2999
3025
|
/**
|
|
3000
3026
|
*
|
|
3001
3027
|
* @type {Array<HotelRoomOffersDataCreateApi>}
|
|
@@ -3003,12 +3029,25 @@ export interface HotelRoomOffersCreateApi {
|
|
|
3003
3029
|
*/
|
|
3004
3030
|
hotelRoomOffers: Array<HotelRoomOffersDataCreateApi>;
|
|
3005
3031
|
/**
|
|
3006
|
-
*
|
|
3007
|
-
* @type {
|
|
3032
|
+
* Set the language for the returned content using a valid language code.
|
|
3033
|
+
* @type {string}
|
|
3008
3034
|
* @memberof HotelRoomOffersCreateApi
|
|
3009
3035
|
*/
|
|
3010
|
-
lang?:
|
|
3036
|
+
lang?: HotelRoomOffersCreateApiLangEnum;
|
|
3011
3037
|
}
|
|
3038
|
+
/**
|
|
3039
|
+
* @export
|
|
3040
|
+
*/
|
|
3041
|
+
export declare const HotelRoomOffersCreateApiLangEnum: {
|
|
3042
|
+
readonly DeDe: "de-DE";
|
|
3043
|
+
readonly EnUs: "en-US";
|
|
3044
|
+
readonly EsEs: "es-ES";
|
|
3045
|
+
readonly FrFr: "fr-FR";
|
|
3046
|
+
readonly ItIt: "it-IT";
|
|
3047
|
+
readonly NlNl: "nl-NL";
|
|
3048
|
+
readonly PtPt: "pt-PT";
|
|
3049
|
+
};
|
|
3050
|
+
export type HotelRoomOffersCreateApiLangEnum = typeof HotelRoomOffersCreateApiLangEnum[keyof typeof HotelRoomOffersCreateApiLangEnum];
|
|
3012
3051
|
/**
|
|
3013
3052
|
*
|
|
3014
3053
|
* @export
|
|
@@ -3041,10 +3080,10 @@ export interface HotelRoomOffersDataApiResponse {
|
|
|
3041
3080
|
children?: string | null;
|
|
3042
3081
|
/**
|
|
3043
3082
|
*
|
|
3044
|
-
* @type {
|
|
3083
|
+
* @type {CurrencyBookingApiClient}
|
|
3045
3084
|
* @memberof HotelRoomOffersDataApiResponse
|
|
3046
3085
|
*/
|
|
3047
|
-
currency:
|
|
3086
|
+
currency: CurrencyBookingApiClient;
|
|
3048
3087
|
/**
|
|
3049
3088
|
* Hotel id
|
|
3050
3089
|
* @type {string}
|
|
@@ -3315,20 +3354,6 @@ export declare const InvoiceApiTypeEnum: {
|
|
|
3315
3354
|
readonly Invoice: "invoice";
|
|
3316
3355
|
};
|
|
3317
3356
|
export type InvoiceApiTypeEnum = typeof InvoiceApiTypeEnum[keyof typeof InvoiceApiTypeEnum];
|
|
3318
|
-
/**
|
|
3319
|
-
* Set the language for the returned content using a valid language code.
|
|
3320
|
-
* @export
|
|
3321
|
-
*/
|
|
3322
|
-
export declare const Locale: {
|
|
3323
|
-
readonly DeDe: "de-DE";
|
|
3324
|
-
readonly EnUs: "en-US";
|
|
3325
|
-
readonly EsEs: "es-ES";
|
|
3326
|
-
readonly FrFr: "fr-FR";
|
|
3327
|
-
readonly ItIt: "it-IT";
|
|
3328
|
-
readonly NlNl: "nl-NL";
|
|
3329
|
-
readonly PtPt: "pt-PT";
|
|
3330
|
-
};
|
|
3331
|
-
export type Locale = typeof Locale[keyof typeof Locale];
|
|
3332
3357
|
/**
|
|
3333
3358
|
* Meta information about the response list, such as pagination cursors or status.
|
|
3334
3359
|
* @export
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@revolugo/booking-api-client",
|
|
3
|
-
"version": "7.1.0
|
|
3
|
+
"version": "7.1.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Javascript Revolugo Booking API Client (browser + server)",
|
|
6
6
|
"keywords": [
|
|
@@ -42,18 +42,18 @@
|
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"@hono/node-server": "1.19.9",
|
|
44
44
|
"hono": "4.11.9",
|
|
45
|
-
"@revolugo/booking-api": "7.1.0",
|
|
46
45
|
"@revolugo/engines": "7.1.0",
|
|
46
|
+
"@revolugo/node": "7.1.0",
|
|
47
47
|
"@revolugo/env": "7.1.0",
|
|
48
|
-
"@revolugo/
|
|
48
|
+
"@revolugo/booking-api": "7.1.0",
|
|
49
49
|
"@revolugo/root": "7.1.0",
|
|
50
|
-
"@revolugo/
|
|
50
|
+
"@revolugo/models": "7.1.0"
|
|
51
51
|
},
|
|
52
52
|
"publishConfig": {
|
|
53
53
|
"access": "public"
|
|
54
54
|
},
|
|
55
55
|
"scripts": {
|
|
56
|
-
"build": "openapi-generator-cli generate -i ../../../apps/back/booking-api/src/swagger.json -g typescript-fetch -o ./tmp --skip-validate-spec -c ./config.yaml && bun ./scripts/delete-client-extra-classes.ts && cp -r ./tmp/* ./tmp/.openapi* ./src/v1 && rm -rf dist tmp && vite build",
|
|
56
|
+
"build": "openapi-generator-cli generate -i ../../../apps/back/booking-api/src/swagger.json -g typescript-fetch -o ./tmp --skip-validate-spec -c ./config.yaml --skip-overwrite && bun ./scripts/delete-client-extra-classes.ts && cp -r ./tmp/* ./tmp/.openapi* ./src/v1 && rm -rf dist tmp && vite build",
|
|
57
57
|
"test": "pnpm run test:e2e && pnpm run test:poller",
|
|
58
58
|
"test:client-package:e2e": "bun --inspect ./client/examples/e2e-client.ts",
|
|
59
59
|
"test:e2e": "NODE_OPTIONS='--experimental-vm-modules' vitest ./tests/e2e-*.test.ts",
|