tripstorekrabi-shared 1.21.1 → 1.21.3
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 +2 -2
- package/utils.js +27 -27
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tripstorekrabi-shared",
|
|
3
|
-
"version": "1.21.
|
|
3
|
+
"version": "1.21.3",
|
|
4
4
|
"description": "Shared library for Trip Store Krabi",
|
|
5
5
|
"author": "Stefan Sommer <tonprince@gmail.com>",
|
|
6
6
|
"repository": {
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
19
|
"dayjs": "^1.11.13",
|
|
20
|
-
"libphonenumber-js": "^1.12.
|
|
20
|
+
"libphonenumber-js": "^1.12.13",
|
|
21
21
|
"nanoid": "^5.1.5"
|
|
22
22
|
},
|
|
23
23
|
"scripts": {
|
package/utils.js
CHANGED
|
@@ -30,15 +30,15 @@ export const CUSTOM_MEETING_POINT = {
|
|
|
30
30
|
description: 'Custom meeting point',
|
|
31
31
|
};
|
|
32
32
|
|
|
33
|
-
export const
|
|
34
|
-
export const
|
|
35
|
-
export const
|
|
36
|
-
export const
|
|
37
|
-
export const
|
|
38
|
-
export const
|
|
39
|
-
export const
|
|
40
|
-
export const
|
|
41
|
-
export const
|
|
33
|
+
export const TRIPSTORE_AGENCY_ID = '2Z5NPZTmd62tm22q0RNB';
|
|
34
|
+
export const VIATOR_AGENCY_ID = 'eVxVUldoJhEiNUZyfcyt';
|
|
35
|
+
export const GYG_AGENCY_ID = 'lPZIMbXgzaFwA366uzia';
|
|
36
|
+
export const KLK_AGENCY_ID = 'JSYggp9yw8RBdIkhuPvo';
|
|
37
|
+
export const MUS_AGENCY_ID = '6VBWnnTPn2wlfhGIxG5L';
|
|
38
|
+
export const EXP_AGENCY_ID = 'ECf1LkUkd67Avjb8CoAB';
|
|
39
|
+
export const TIQ_AGENCY_ID = 'HPiO2Z6OdD8A3O5Zbi96';
|
|
40
|
+
export const CIV_AGENCY_ID = 'ZBoPc4cFtxyUJIxkFKnzG';
|
|
41
|
+
export const CUR_AGENCY_ID = 'BSV3FQAM_pZx7QnC67dBC';
|
|
42
42
|
|
|
43
43
|
export const DIETARIES = [
|
|
44
44
|
'None',
|
|
@@ -694,40 +694,40 @@ export function createVoucherRequest(booking, product) {
|
|
|
694
694
|
return request;
|
|
695
695
|
}
|
|
696
696
|
|
|
697
|
-
export function isGYGBooking(
|
|
698
|
-
return
|
|
697
|
+
export function isGYGBooking(otaPartnerRef) {
|
|
698
|
+
return otaPartnerRef.id === GYG_AGENCY_ID;
|
|
699
699
|
}
|
|
700
700
|
|
|
701
|
-
export function isViatorBooking(
|
|
702
|
-
return
|
|
701
|
+
export function isViatorBooking(otaPartnerRef) {
|
|
702
|
+
return otaPartnerRef.id === VIATOR_AGENCY_ID;
|
|
703
703
|
}
|
|
704
704
|
|
|
705
|
-
export function isExpediaBooking(
|
|
706
|
-
return
|
|
705
|
+
export function isExpediaBooking(otaPartnerRef) {
|
|
706
|
+
return otaPartnerRef.id === EXP_AGENCY_ID;
|
|
707
707
|
}
|
|
708
708
|
|
|
709
|
-
export function isKlookBooking(
|
|
710
|
-
return
|
|
709
|
+
export function isKlookBooking(otaPartnerRef) {
|
|
710
|
+
return otaPartnerRef.id === KLK_AGENCY_ID;
|
|
711
711
|
}
|
|
712
712
|
|
|
713
|
-
export function isMusementBooking(
|
|
714
|
-
return
|
|
713
|
+
export function isMusementBooking(otaPartnerRef) {
|
|
714
|
+
return otaPartnerRef.id === MUS_AGENCY_ID;
|
|
715
715
|
}
|
|
716
716
|
|
|
717
|
-
export function isTiqetsBooking(
|
|
718
|
-
return
|
|
717
|
+
export function isTiqetsBooking(otaPartnerRef) {
|
|
718
|
+
return otaPartnerRef.id === TIQ_AGENCY_ID;
|
|
719
719
|
}
|
|
720
720
|
|
|
721
|
-
export function isCivitatisBooking(
|
|
722
|
-
return
|
|
721
|
+
export function isCivitatisBooking(otaPartnerRef) {
|
|
722
|
+
return otaPartnerRef.id === CIV_AGENCY_ID;
|
|
723
723
|
}
|
|
724
724
|
|
|
725
|
-
export function isCuriosidad(
|
|
726
|
-
return
|
|
725
|
+
export function isCuriosidad(otaPartnerRef) {
|
|
726
|
+
return otaPartnerRef.id === CUR_AGENCY_ID
|
|
727
727
|
}
|
|
728
728
|
|
|
729
|
-
export function isTSKBooking(
|
|
730
|
-
return
|
|
729
|
+
export function isTSKBooking(otaPartnerRef) {
|
|
730
|
+
return !otaPartnerRef || otaPartnerRef.id === TRIPSTORE_AGENCY_ID;
|
|
731
731
|
}
|
|
732
732
|
|
|
733
733
|
export function getBookingType(referenceNumber) {
|