whitelabel-db 1.2.6 → 1.2.8
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.d.ts +1 -1
- package/dist/libs/liteapiv3.d.ts +246 -0
- package/dist/libs/liteapiv3.js +48 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -27,5 +27,5 @@ export { CollectionItem, CollectionType } from './models/CollectionItem';
|
|
|
27
27
|
export { CollectionItemCustomField } from './models/CollectionItemCustomField';
|
|
28
28
|
export { DeletedHotel } from './models/DeletedHotel';
|
|
29
29
|
export { LiteApiClient, HotelsRequest, AvailabilityResult, FullRateAvailabilityResult, RoomType, Rate, PrebookRateRequest, PrebookRate, CheckoutRequest, BookingInfo, CancelBooking, } from './libs/liteapi';
|
|
30
|
-
export { LiteApiClientV3, HotelsRequestV3, AvailabilityResultV3, FullRateAvailabilityResultV3, RoomTypeV3, RateV3, PrebookRateRequestV3, PrebookRateV3, CheckoutRequestV3, BookingInfoV3, CancelBookingV3, BookedRoomV3, OccupancyV3, GuestV3, GuestBookingV3, PromoCodeRequest, PromoCodeResponse, EsimplyPackage, Addon, AddonResponse, } from './libs/liteapiv3';
|
|
30
|
+
export { LiteApiClientV3, HotelsRequestV3, AvailabilityResultV3, FullRateAvailabilityResultV3, RoomTypeV3, RateV3, PrebookRateRequestV3, PrebookRateV3, CheckoutRequestV3, BookingInfoV3, CancelBookingV3, BookedRoomV3, OccupancyV3, GuestV3, GuestBookingV3, PromoCodeRequest, PromoCodeResponse, EsimplyPackage, Addon, AddonResponse, GetHotelRequestV3, HotelDataV3, HotelImageV3, CheckinCheckoutTimesV3, LocationV3, FacilityV3, RoomV3, BedTypeV3, RoomAmenityV3, RoomPhotoV3, PolicyV3, AccessibilityV3, AccessibilityAttributesV3, AccessibilityDisabilitiesV3, AccessibilityDisabilityScoresV3, SentimentAnalysisV3, SentimentCategoryV3, SemanticSearchRequestV3, SemanticSearchHotelV3, ConversationalHotelRequestV3, ConversationalHotelResponseV3, } from './libs/liteapiv3';
|
|
31
31
|
export { LiteApiUser, LiteApiUserRequest } from './libs/liteapiuser';
|
package/dist/libs/liteapiv3.d.ts
CHANGED
|
@@ -368,6 +368,249 @@ export interface EsimplyPackage {
|
|
|
368
368
|
originalAmount: number;
|
|
369
369
|
originalCurrency: string;
|
|
370
370
|
}
|
|
371
|
+
export interface SemanticSearchRequestV3 {
|
|
372
|
+
query: string;
|
|
373
|
+
limit?: number;
|
|
374
|
+
}
|
|
375
|
+
export interface SemanticSearchHotelV3 {
|
|
376
|
+
id: string;
|
|
377
|
+
name: string;
|
|
378
|
+
main_photo: string;
|
|
379
|
+
address: string;
|
|
380
|
+
city: string;
|
|
381
|
+
country: string;
|
|
382
|
+
tags: string[];
|
|
383
|
+
score: number;
|
|
384
|
+
persona: string;
|
|
385
|
+
style: string;
|
|
386
|
+
location_type: string;
|
|
387
|
+
story: string;
|
|
388
|
+
}
|
|
389
|
+
export interface ConversationalHotelRequestV3 {
|
|
390
|
+
hotelId: string;
|
|
391
|
+
query: string;
|
|
392
|
+
allowWebSearch?: boolean;
|
|
393
|
+
}
|
|
394
|
+
export interface ConversationalHotelResponseV3 {
|
|
395
|
+
answer: string;
|
|
396
|
+
citations: string[];
|
|
397
|
+
latency_ms: number;
|
|
398
|
+
search_used: boolean;
|
|
399
|
+
}
|
|
400
|
+
export interface GetHotelRequestV3 {
|
|
401
|
+
hotelId: string;
|
|
402
|
+
timeout?: number;
|
|
403
|
+
language?: string;
|
|
404
|
+
advancedAccessibilityOnly?: boolean;
|
|
405
|
+
}
|
|
406
|
+
export interface HotelImageV3 {
|
|
407
|
+
url: string;
|
|
408
|
+
urlHd: string;
|
|
409
|
+
caption: string;
|
|
410
|
+
order: number;
|
|
411
|
+
defaultImage: boolean;
|
|
412
|
+
}
|
|
413
|
+
export interface CheckinCheckoutTimesV3 {
|
|
414
|
+
checkout: string;
|
|
415
|
+
checkin: string;
|
|
416
|
+
}
|
|
417
|
+
export interface LocationV3 {
|
|
418
|
+
latitude: number;
|
|
419
|
+
longitude: number;
|
|
420
|
+
}
|
|
421
|
+
export interface FacilityV3 {
|
|
422
|
+
facilityId: number;
|
|
423
|
+
name: string;
|
|
424
|
+
}
|
|
425
|
+
export interface BedTypeV3 {
|
|
426
|
+
quantity: number;
|
|
427
|
+
bedType: string;
|
|
428
|
+
bedSize: string;
|
|
429
|
+
}
|
|
430
|
+
export interface RoomAmenityV3 {
|
|
431
|
+
amenitiesId: number;
|
|
432
|
+
name: string;
|
|
433
|
+
sort: number;
|
|
434
|
+
}
|
|
435
|
+
export interface RoomPhotoV3 {
|
|
436
|
+
url: string;
|
|
437
|
+
imageDescription: string;
|
|
438
|
+
imageClass1: string;
|
|
439
|
+
imageClass2: string;
|
|
440
|
+
failoverPhoto: string;
|
|
441
|
+
mainPhoto: boolean;
|
|
442
|
+
score: number;
|
|
443
|
+
classId: number;
|
|
444
|
+
classOrder: number;
|
|
445
|
+
hd_url: string;
|
|
446
|
+
}
|
|
447
|
+
export interface RoomV3 {
|
|
448
|
+
id: number;
|
|
449
|
+
roomName: string;
|
|
450
|
+
description: string;
|
|
451
|
+
roomSizeSquare: number;
|
|
452
|
+
roomSizeUnit: string;
|
|
453
|
+
hotelId: string;
|
|
454
|
+
maxAdults: number;
|
|
455
|
+
maxChildren: number;
|
|
456
|
+
maxOccupancy: number;
|
|
457
|
+
bedTypes: BedTypeV3[];
|
|
458
|
+
roomAmenities: RoomAmenityV3[];
|
|
459
|
+
photos: RoomPhotoV3[];
|
|
460
|
+
views: any[];
|
|
461
|
+
bedRelation: string;
|
|
462
|
+
}
|
|
463
|
+
export interface PolicyV3 {
|
|
464
|
+
policy_type: string;
|
|
465
|
+
name: string;
|
|
466
|
+
description: string;
|
|
467
|
+
child_allowed: string;
|
|
468
|
+
pets_allowed: string;
|
|
469
|
+
parking: string;
|
|
470
|
+
}
|
|
471
|
+
export interface AccessibilityAttributesV3 {
|
|
472
|
+
publicArea: {
|
|
473
|
+
hillLocated: boolean;
|
|
474
|
+
isRamp: boolean;
|
|
475
|
+
rampAngle: number;
|
|
476
|
+
rampLength: number;
|
|
477
|
+
entranceType: string;
|
|
478
|
+
entranceDoorWidth: number;
|
|
479
|
+
entranceLeveled: boolean;
|
|
480
|
+
distanceFromTheElevatorToTheAccessibleRoom: number;
|
|
481
|
+
roomMaxGuestsNumber: number;
|
|
482
|
+
petFriendly: string;
|
|
483
|
+
};
|
|
484
|
+
receptionAndRestaurant: {
|
|
485
|
+
receptionHearingAccessible: boolean;
|
|
486
|
+
receptionWheelchairAccessible: boolean;
|
|
487
|
+
restaurantWheelchairAccessible: boolean;
|
|
488
|
+
};
|
|
489
|
+
elevator: {
|
|
490
|
+
elevatorAudioSignals: boolean;
|
|
491
|
+
elevatorBrailleNumbers: boolean;
|
|
492
|
+
elevatorContrastingButtons: boolean;
|
|
493
|
+
elevatorVisualSigns: boolean;
|
|
494
|
+
liftsAccessible: boolean;
|
|
495
|
+
};
|
|
496
|
+
room: {
|
|
497
|
+
brailleRoomNumbers: boolean;
|
|
498
|
+
noticeableRoomNumber: boolean;
|
|
499
|
+
roomDoorPeephole: boolean;
|
|
500
|
+
roomKnockSign: boolean;
|
|
501
|
+
serviceFromTv: boolean;
|
|
502
|
+
hearingKit: boolean;
|
|
503
|
+
tvAlarmClock: boolean;
|
|
504
|
+
accessibleRoomConnectingDoors: boolean;
|
|
505
|
+
ttyHearingSpeechImpaired: boolean;
|
|
506
|
+
};
|
|
507
|
+
toiletAndShower: {
|
|
508
|
+
toiletBathroomDoorsIndicator: boolean;
|
|
509
|
+
toiletGrabbingHandles: boolean;
|
|
510
|
+
adjustableShowerHead: boolean;
|
|
511
|
+
bathroomBathtub: boolean;
|
|
512
|
+
bathroomEmergencyCord: boolean;
|
|
513
|
+
bathtubGrabbingHandles: boolean;
|
|
514
|
+
cabinUnderSink: boolean;
|
|
515
|
+
showerChair: string;
|
|
516
|
+
showerLevelFloor: boolean;
|
|
517
|
+
};
|
|
518
|
+
stairs: {
|
|
519
|
+
isHandrails: boolean;
|
|
520
|
+
isStairMarked: boolean;
|
|
521
|
+
};
|
|
522
|
+
poolAndSpa: {
|
|
523
|
+
isPoolHandrails: boolean;
|
|
524
|
+
liftInPool: boolean;
|
|
525
|
+
spaWheelchairAccessible: boolean;
|
|
526
|
+
};
|
|
527
|
+
parking: {
|
|
528
|
+
parkingWheelchairAccessible: boolean;
|
|
529
|
+
};
|
|
530
|
+
publicToilets: {
|
|
531
|
+
publicToiletsEmergencyCord: boolean;
|
|
532
|
+
publicToiletsGrabbingHandles: boolean;
|
|
533
|
+
publicToiletsVisualIndicators: boolean;
|
|
534
|
+
};
|
|
535
|
+
}
|
|
536
|
+
export interface AccessibilityDisabilitiesV3 {
|
|
537
|
+
crouchesCaneImpaired: boolean;
|
|
538
|
+
elderlyImpaired: boolean;
|
|
539
|
+
electricWheelchair: boolean;
|
|
540
|
+
hearingImpaired: boolean;
|
|
541
|
+
manualWheelchair: boolean;
|
|
542
|
+
visuallyImpaired: boolean;
|
|
543
|
+
wheelchairOrScooterImpaired: boolean;
|
|
544
|
+
}
|
|
545
|
+
export interface AccessibilityDisabilityScoresV3 {
|
|
546
|
+
crouchesCaneImpaired: number;
|
|
547
|
+
elderlyImpaired: number;
|
|
548
|
+
electricWheelchair: number;
|
|
549
|
+
hearingImpaired: number;
|
|
550
|
+
manualWheelchair: number;
|
|
551
|
+
visuallyImpaired: number;
|
|
552
|
+
wheelchairOrScooterImpaired: number;
|
|
553
|
+
}
|
|
554
|
+
export interface AccessibilityV3 {
|
|
555
|
+
certificateId: string;
|
|
556
|
+
certificateUrl: string;
|
|
557
|
+
certificateHtml: string;
|
|
558
|
+
attributes: AccessibilityAttributesV3;
|
|
559
|
+
totalDisabilityScore: number;
|
|
560
|
+
disabilities: AccessibilityDisabilitiesV3;
|
|
561
|
+
disabilityScores: AccessibilityDisabilityScoresV3;
|
|
562
|
+
}
|
|
563
|
+
export interface SentimentCategoryV3 {
|
|
564
|
+
name: string;
|
|
565
|
+
rating: number;
|
|
566
|
+
description: string;
|
|
567
|
+
}
|
|
568
|
+
export interface SentimentAnalysisV3 {
|
|
569
|
+
cons: string[];
|
|
570
|
+
pros: string[];
|
|
571
|
+
categories: SentimentCategoryV3[];
|
|
572
|
+
}
|
|
573
|
+
export interface HotelDataV3 {
|
|
574
|
+
id: string;
|
|
575
|
+
name: string;
|
|
576
|
+
hotelDescription: string;
|
|
577
|
+
hotelImportantInformation: string;
|
|
578
|
+
primaryId: string;
|
|
579
|
+
hotelMarkdownDescription: string;
|
|
580
|
+
checkinCheckoutTimes: CheckinCheckoutTimesV3;
|
|
581
|
+
hotelImages: HotelImageV3[];
|
|
582
|
+
main_photo: string;
|
|
583
|
+
thumbnail: string;
|
|
584
|
+
country: string;
|
|
585
|
+
city: string;
|
|
586
|
+
starRating: number;
|
|
587
|
+
location: LocationV3;
|
|
588
|
+
address: string;
|
|
589
|
+
hotelFacilities: string[];
|
|
590
|
+
zip: string;
|
|
591
|
+
chainId: number;
|
|
592
|
+
chain: string;
|
|
593
|
+
facilities: FacilityV3[];
|
|
594
|
+
rooms: RoomV3[];
|
|
595
|
+
phone: string;
|
|
596
|
+
fax: string;
|
|
597
|
+
email: string;
|
|
598
|
+
hotelType: string;
|
|
599
|
+
hotelTypeId: number;
|
|
600
|
+
airportCode: string;
|
|
601
|
+
rating: number;
|
|
602
|
+
reviewCount: number;
|
|
603
|
+
parking: string;
|
|
604
|
+
groupRoomMin: number;
|
|
605
|
+
childAllowed: boolean;
|
|
606
|
+
petsAllowed: boolean;
|
|
607
|
+
policies: PolicyV3[];
|
|
608
|
+
rohId: number;
|
|
609
|
+
accessibility: AccessibilityV3;
|
|
610
|
+
sentiment_analysis: SentimentAnalysisV3;
|
|
611
|
+
sentiment_updated_at: string;
|
|
612
|
+
deletedAt: string | null;
|
|
613
|
+
}
|
|
371
614
|
export declare class LiteApiClientV3 {
|
|
372
615
|
private apiKey;
|
|
373
616
|
private baseUrl;
|
|
@@ -403,4 +646,7 @@ export declare class LiteApiClientV3 {
|
|
|
403
646
|
currency: string;
|
|
404
647
|
guestId: number;
|
|
405
648
|
}): Promise<PromoCodeResponse>;
|
|
649
|
+
semanticSearchHotels(options: SemanticSearchRequestV3): Promise<SemanticSearchHotelV3[]>;
|
|
650
|
+
askHotel(options: ConversationalHotelRequestV3): Promise<ConversationalHotelResponseV3>;
|
|
651
|
+
getHotel(options: GetHotelRequestV3): Promise<HotelDataV3>;
|
|
406
652
|
}
|
package/dist/libs/liteapiv3.js
CHANGED
|
@@ -277,5 +277,53 @@ class LiteApiClientV3 {
|
|
|
277
277
|
})).data.data;
|
|
278
278
|
});
|
|
279
279
|
}
|
|
280
|
+
semanticSearchHotels(options) {
|
|
281
|
+
var _a;
|
|
282
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
283
|
+
return (yield (0, axios_1.default)({
|
|
284
|
+
url: `${this.baseUrl}/v3.0/data/hotels/semantic-search`,
|
|
285
|
+
params: {
|
|
286
|
+
query: options.query,
|
|
287
|
+
limit: (_a = options.limit) !== null && _a !== void 0 ? _a : 3,
|
|
288
|
+
},
|
|
289
|
+
headers: {
|
|
290
|
+
'X-API-Key': this.apiKey,
|
|
291
|
+
},
|
|
292
|
+
})).data.data;
|
|
293
|
+
});
|
|
294
|
+
}
|
|
295
|
+
askHotel(options) {
|
|
296
|
+
var _a;
|
|
297
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
298
|
+
return (yield (0, axios_1.default)({
|
|
299
|
+
url: `${this.baseUrl}/v3.0/data/hotel/ask`,
|
|
300
|
+
params: {
|
|
301
|
+
hotelId: options.hotelId,
|
|
302
|
+
query: options.query,
|
|
303
|
+
allowWebSearch: (_a = options.allowWebSearch) !== null && _a !== void 0 ? _a : false,
|
|
304
|
+
},
|
|
305
|
+
headers: {
|
|
306
|
+
'X-API-Key': this.apiKey,
|
|
307
|
+
},
|
|
308
|
+
})).data.data;
|
|
309
|
+
});
|
|
310
|
+
}
|
|
311
|
+
getHotel(options) {
|
|
312
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
313
|
+
return (yield (0, axios_1.default)({
|
|
314
|
+
url: `${this.baseUrl}/v3.0/data/hotel`,
|
|
315
|
+
params: {
|
|
316
|
+
hotelId: options.hotelId,
|
|
317
|
+
timeout: options.timeout,
|
|
318
|
+
language: options.language,
|
|
319
|
+
advancedAccessibilityOnly: options.advancedAccessibilityOnly,
|
|
320
|
+
},
|
|
321
|
+
headers: {
|
|
322
|
+
'X-API-Key': this.apiKey,
|
|
323
|
+
accept: 'application/json',
|
|
324
|
+
},
|
|
325
|
+
})).data.data;
|
|
326
|
+
});
|
|
327
|
+
}
|
|
280
328
|
}
|
|
281
329
|
exports.LiteApiClientV3 = LiteApiClientV3;
|