tripstorekrabi-shared 1.21.1 → 1.21.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.
Files changed (2) hide show
  1. package/package.json +1 -1
  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.1",
3
+ "version": "1.21.2",
4
4
  "description": "Shared library for Trip Store Krabi",
5
5
  "author": "Stefan Sommer <tonprince@gmail.com>",
6
6
  "repository": {
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 TRIPSTORE_AGENCYID_IN_PHAYUN = '2Z5NPZTmd62tm22q0RNB';
34
- export const VIATOR_AGENCYID_IN_PHAYUN = 'eVxVUldoJhEiNUZyfcyt';
35
- export const GYG_AGENCYID_IN_PHAYUN = 'lPZIMbXgzaFwA366uzia';
36
- export const KLK_AGENCYID_IN_PHAYUN = 'JSYggp9yw8RBdIkhuPvo';
37
- export const MUS_AGENCYID_IN_PHAYUN = '6VBWnnTPn2wlfhGIxG5L';
38
- export const EXP_AGENCYID_IN_PHAYUN = 'ECf1LkUkd67Avjb8CoAB';
39
- export const TIQ_AGENCYID_IN_PHAYUN = 'HPiO2Z6OdD8A3O5Zbi96';
40
- export const CIV_AGENCYID_IN_PHAYUN = 'ZBoPc4cFtxyUJIxkFKnzG';
41
- export const CUR_AGENCYID_IN_PHAYUN = 'BSV3FQAM_pZx7QnC67dBC';
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(referenceNumber) {
698
- return referenceNumber.startsWith('GYG');
697
+ export function isGYGBooking(otaPartnerRef) {
698
+ return otaPartnerRef.id === GYG_AGENCY_ID;
699
699
  }
700
700
 
701
- export function isViatorBooking(referenceNumber) {
702
- return referenceNumber.startsWith('BR-');
701
+ export function isViatorBooking(otaPartnerRef) {
702
+ return otaPartnerRef.id === VIATOR_AGENCY_ID;
703
703
  }
704
704
 
705
- export function isExpediaBooking(referenceNumber) {
706
- return referenceNumber.startsWith('EXP-');
705
+ export function isExpediaBooking(otaPartnerRef) {
706
+ return otaPartnerRef.id === EXP_AGENCY_ID;
707
707
  }
708
708
 
709
- export function isKlookBooking(referenceNumber) {
710
- return referenceNumber.startsWith('KLK-');
709
+ export function isKlookBooking(otaPartnerRef) {
710
+ return otaPartnerRef.id === KLK_AGENCY_ID;
711
711
  }
712
712
 
713
- export function isMusementBooking(referenceNumber) {
714
- return referenceNumber.startsWith('MUS');
713
+ export function isMusementBooking(otaPartnerRef) {
714
+ return otaPartnerRef.id === MUS_AGENCY_ID;
715
715
  }
716
716
 
717
- export function isTiqetsBooking(referenceNumber) {
718
- return referenceNumber.startsWith('TIQ-');
717
+ export function isTiqetsBooking(otaPartnerRef) {
718
+ return otaPartnerRef.id === TIQ_AGENCY_ID;
719
719
  }
720
720
 
721
- export function isCivitatisBooking(referenceNumber) {
722
- return referenceNumber.startsWith('CIV-');
721
+ export function isCivitatisBooking(otaPartnerRef) {
722
+ return otaPartnerRef.id === CIV_AGENCY_ID;
723
723
  }
724
724
 
725
- export function isCuriosidad(referenceNumber) {
726
- return referenceNumber.startsWith('CUR-');
725
+ export function isCuriosidad(otaPartnerRef) {
726
+ return otaPartnerRef.id === CUR_AGENCY_ID
727
727
  }
728
728
 
729
- export function isTSKBooking(referenceNumber) {
730
- return referenceNumber.startsWith('TSK');
729
+ export function isTSKBooking(otaPartnerRef) {
730
+ return otaPartnerRef.id === TRIPSTORE_AGENCY_ID;
731
731
  }
732
732
 
733
733
  export function getBookingType(referenceNumber) {