sm-types 1.8.6 → 1.8.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/common/enums.d.ts CHANGED
@@ -76,3 +76,20 @@ export declare enum ServiceType {
76
76
  SMARTRIPS = "smartrips",
77
77
  INSURANCE = "insurance"
78
78
  }
79
+ export declare enum OfferStatus {
80
+ APPROVAL_DECLINED = "APPROVAL_DECLINED",
81
+ BOOKING_FAILED = "BOOKING_FAILED",
82
+ DRAFT = "DRAFT",
83
+ BOOKING_PROCESSING = "BOOKING_PROCESSING",
84
+ CANCELING = "CANCELING",
85
+ EMITTED = "EMITTED",
86
+ CANCELED = "CANCELED"
87
+ }
88
+ export interface ITagStatus {
89
+ pendingApproval: boolean;
90
+ negotiated: boolean;
91
+ preReserved: boolean;
92
+ preReserving: boolean;
93
+ preReserveFailed: boolean;
94
+ preReserveExpired: boolean;
95
+ }
package/common/enums.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ServiceType = exports.BookingStatus = exports.NavanStatus = exports.BookingFeeStatus = exports.EmailType = exports.IndicationStatus = exports.IndicationRewardStatus = exports.JustificationPolicy = exports.CabinClass = exports.DealOwnerEnum = exports.SuppliersEnum = exports.RentabilityTypeEnum = exports.TravelCustomFieldEnum = void 0;
3
+ exports.OfferStatus = exports.ServiceType = exports.BookingStatus = exports.NavanStatus = exports.BookingFeeStatus = exports.EmailType = exports.IndicationStatus = exports.IndicationRewardStatus = exports.JustificationPolicy = exports.CabinClass = exports.DealOwnerEnum = exports.SuppliersEnum = exports.RentabilityTypeEnum = exports.TravelCustomFieldEnum = void 0;
4
4
  var TravelCustomFieldEnum;
5
5
  (function (TravelCustomFieldEnum) {
6
6
  TravelCustomFieldEnum["TRIP_PURPOSE"] = "TRIP_PURPOSE";
@@ -92,3 +92,13 @@ var ServiceType;
92
92
  ServiceType["SMARTRIPS"] = "smartrips";
93
93
  ServiceType["INSURANCE"] = "insurance";
94
94
  })(ServiceType = exports.ServiceType || (exports.ServiceType = {}));
95
+ var OfferStatus;
96
+ (function (OfferStatus) {
97
+ OfferStatus["APPROVAL_DECLINED"] = "APPROVAL_DECLINED";
98
+ OfferStatus["BOOKING_FAILED"] = "BOOKING_FAILED";
99
+ OfferStatus["DRAFT"] = "DRAFT";
100
+ OfferStatus["BOOKING_PROCESSING"] = "BOOKING_PROCESSING";
101
+ OfferStatus["CANCELING"] = "CANCELING";
102
+ OfferStatus["EMITTED"] = "EMITTED";
103
+ OfferStatus["CANCELED"] = "CANCELED";
104
+ })(OfferStatus = exports.OfferStatus || (exports.OfferStatus = {}));
package/common/index.d.ts CHANGED
@@ -42,7 +42,6 @@ export declare const CABIN_CLASS_TYPES: {
42
42
  readonly value: "first";
43
43
  };
44
44
  };
45
- export type OfferJSON = IBusJSON | ICarJSON | IHotelJSON | IRideJSON | IFlightJSON;
46
45
  export interface IFlightJSON {
47
46
  price: number;
48
47
  search: IOfferSearch;
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "author": "Smartrips",
4
4
  "license": "ISC",
5
5
  "keywords": [],
6
- "version": "1.8.6",
6
+ "version": "1.8.8",
7
7
  "description": "",
8
8
  "repository": {
9
9
  "type": "git",
@@ -1,4 +1,4 @@
1
- import { BookingStatus, Nullable, OfferJSON, ServiceType } from "../../common";
1
+ import { BookingStatus, IBusJSON, ICarJSON, IFlightJSON, IHotelJSON, IRideJSON, ITagStatus, Nullable, OfferStatus, ServiceType } from "../../common";
2
2
  import { BookerParticipantType, EventInviteStatus, EventParticipantType, EventPrivacy, ParticipantioStatus } from "../enums";
3
3
  export type BasicCompanyEvent = {
4
4
  token: string;
@@ -27,10 +27,25 @@ export type CompleteTravelInfo = BasicTravelInfo & {
27
27
  };
28
28
  export type OfferInfo = {
29
29
  offer_token: string;
30
- status: BookingStatus;
31
- type: ServiceType;
32
- offer: OfferJSON;
33
- };
30
+ booking_status: BookingStatus;
31
+ offer_status: OfferStatus;
32
+ tag_status: ITagStatus;
33
+ } & ({
34
+ offer: IBusJSON;
35
+ type: ServiceType.BUS;
36
+ } | {
37
+ offer: ICarJSON;
38
+ type: ServiceType.CAR;
39
+ } | {
40
+ offer: IFlightJSON;
41
+ type: ServiceType.FLIGHT;
42
+ } | {
43
+ offer: IHotelJSON;
44
+ type: ServiceType.HOTEL;
45
+ } | {
46
+ offer: IRideJSON;
47
+ type: ServiceType.RIDE;
48
+ });
34
49
  export type BasicEventParticipant = {
35
50
  token: string;
36
51
  event_token: string;