swoop-common 2.2.137 → 2.2.139

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.
@@ -101,6 +101,7 @@ export type { PublicSnapshotPricing } from './index';
101
101
  export type { PublicSnapshotTraveller } from './index';
102
102
  export type { QuoteOptions } from './index';
103
103
  export type { RegionId } from './index';
104
+ export type { ReserveTripRequest } from './index';
104
105
  export type { SearchQueryParam } from './index';
105
106
  export type { SnapshotId } from './index';
106
107
  export type { SnapshotIdPathParam } from './index';
@@ -101,6 +101,7 @@ export type { PublicSnapshotPricing } from './models/PublicSnapshotPricing';
101
101
  export type { PublicSnapshotTraveller } from './models/PublicSnapshotTraveller';
102
102
  export type { QuoteOptions } from './models/QuoteOptions';
103
103
  export type { RegionId } from './models/RegionId';
104
+ export type { ReserveTripRequest } from './models/ReserveTripRequest';
104
105
  export type { SearchQueryParam } from './models/SearchQueryParam';
105
106
  export type { SnapshotId } from './models/SnapshotId';
106
107
  export type { SnapshotIdPathParam } from './models/SnapshotIdPathParam';
@@ -0,0 +1,10 @@
1
+ export type ReserveTripRequest = {
2
+ /**
3
+ * ID of the cabin to select from alternativeCabinOptions
4
+ */
5
+ selectedAlternativeCabinId?: string;
6
+ /**
7
+ * IDs of activities to mark as selected
8
+ */
9
+ selectedActivityIds?: Array<string>;
10
+ };
@@ -25,6 +25,7 @@ import type { DTOTripComparisonUpdate } from '../models/DTOTripComparisonUpdate'
25
25
  import type { InternalSwoopId } from '../models/InternalSwoopId';
26
26
  import type { ItineraryCreateResponse } from '../models/ItineraryCreateResponse';
27
27
  import type { Pagination } from '../models/Pagination';
28
+ import type { ReserveTripRequest } from '../models/ReserveTripRequest';
28
29
  import type { SnapshotId } from '../models/SnapshotId';
29
30
  import type { TemplateId } from '../models/TemplateId';
30
31
  import type { TripComparisonItemId } from '../models/TripComparisonItemId';
@@ -329,6 +330,14 @@ export declare class CoreService {
329
330
  * @throws ApiError
330
331
  */
331
332
  tripComparisonCreate(requestBody: DTOTripComparisonCreate): CancelablePromise<DTOTripComparisonRead>;
333
+ /**
334
+ * Get Trip Comparison
335
+ * Fetches a single trip comparison item by UUID. This is a server-to-server endpoint protected by an API key.
336
+ * @param uuid UUID of a trip comparison item
337
+ * @returns DTOTripComparisonRead The trip comparison item
338
+ * @throws ApiError
339
+ */
340
+ tripComparisonGet(uuid: TripComparisonItemId): CancelablePromise<DTOTripComparisonRead>;
332
341
  /**
333
342
  * Update a Trip Comparison
334
343
  * Updates an existing trip comparison item by UUID. Finds the document by enquiryId, locates the item by UUID, and replaces the entire item's data. Updates metadata timestamps.
@@ -352,18 +361,11 @@ export declare class CoreService {
352
361
  * Sets the reserved flag to true on the trip at the specified index within the given TripComparisonItem. This is a server-to-server endpoint protected by an API key.
353
362
  * @param uuid UUID of a trip comparison item
354
363
  * @param tripIndex Zero-based index of the trip within the TripComparisonItem to reserve
364
+ * @param requestBody
355
365
  * @returns DTOTripComparisonRead The updated trip comparison item after reserving the trip
356
366
  * @throws ApiError
357
367
  */
358
- reserveTrip(uuid: TripComparisonItemId, tripIndex: number): CancelablePromise<DTOTripComparisonRead>;
359
- /**
360
- * Get Trip Comparison (Public)
361
- * Fetches a single trip comparison item by UUID. This is a public endpoint that doesn't require authentication.
362
- * @param uuid UUID of a trip comparison item
363
- * @returns DTOTripComparisonRead The trip comparison item
364
- * @throws ApiError
365
- */
366
- publicTripComparisonGet(uuid: TripComparisonItemId): CancelablePromise<DTOTripComparisonRead>;
368
+ reserveTrip(uuid: TripComparisonItemId, tripIndex: number, requestBody?: ReserveTripRequest): CancelablePromise<DTOTripComparisonRead>;
367
369
  /**
368
370
  * Resolve template hierarchy
369
371
  * @returns Array<DTOTemplateRead> OK
@@ -750,6 +750,27 @@ export class CoreService {
750
750
  },
751
751
  });
752
752
  }
753
+ /**
754
+ * Get Trip Comparison
755
+ * Fetches a single trip comparison item by UUID. This is a server-to-server endpoint protected by an API key.
756
+ * @param uuid UUID of a trip comparison item
757
+ * @returns DTOTripComparisonRead The trip comparison item
758
+ * @throws ApiError
759
+ */
760
+ tripComparisonGet(uuid) {
761
+ return __request(OpenAPI, {
762
+ method: 'GET',
763
+ url: '/trip-comparison/{uuid}',
764
+ path: {
765
+ 'uuid': uuid,
766
+ },
767
+ errors: {
768
+ 401: `When the API key is missing or invalid`,
769
+ 404: `If the trip comparison item does not exist`,
770
+ 500: `When an unexpected error occurs`,
771
+ },
772
+ });
773
+ }
753
774
  /**
754
775
  * Update a Trip Comparison
755
776
  * Updates an existing trip comparison item by UUID. Finds the document by enquiryId, locates the item by UUID, and replaces the entire item's data. Updates metadata timestamps.
@@ -806,10 +827,11 @@ export class CoreService {
806
827
  * Sets the reserved flag to true on the trip at the specified index within the given TripComparisonItem. This is a server-to-server endpoint protected by an API key.
807
828
  * @param uuid UUID of a trip comparison item
808
829
  * @param tripIndex Zero-based index of the trip within the TripComparisonItem to reserve
830
+ * @param requestBody
809
831
  * @returns DTOTripComparisonRead The updated trip comparison item after reserving the trip
810
832
  * @throws ApiError
811
833
  */
812
- reserveTrip(uuid, tripIndex) {
834
+ reserveTrip(uuid, tripIndex, requestBody) {
813
835
  return __request(OpenAPI, {
814
836
  method: 'PATCH',
815
837
  url: '/trip-comparison/{uuid}/trips/{tripIndex}/reserve',
@@ -817,6 +839,8 @@ export class CoreService {
817
839
  'uuid': uuid,
818
840
  'tripIndex': tripIndex,
819
841
  },
842
+ body: requestBody,
843
+ mediaType: 'application/json',
820
844
  errors: {
821
845
  400: `If the tripIndex is not a valid non-negative integer`,
822
846
  401: `When the API key is missing or invalid`,
@@ -825,26 +849,6 @@ export class CoreService {
825
849
  },
826
850
  });
827
851
  }
828
- /**
829
- * Get Trip Comparison (Public)
830
- * Fetches a single trip comparison item by UUID. This is a public endpoint that doesn't require authentication.
831
- * @param uuid UUID of a trip comparison item
832
- * @returns DTOTripComparisonRead The trip comparison item
833
- * @throws ApiError
834
- */
835
- publicTripComparisonGet(uuid) {
836
- return __request(OpenAPI, {
837
- method: 'GET',
838
- url: '/public/trip-comparison/{uuid}',
839
- path: {
840
- 'uuid': uuid,
841
- },
842
- errors: {
843
- 404: `If the trip comparison item does not exist`,
844
- 500: `When an unexpected error occurs`,
845
- },
846
- });
847
- }
848
852
  /**
849
853
  * Resolve template hierarchy
850
854
  * @returns Array<DTOTemplateRead> OK
@@ -1,7 +1,5 @@
1
1
  import type { DTOPublicSnapshotRead } from '../models/DTOPublicSnapshotRead';
2
- import type { DTOTripComparisonRead } from '../models/DTOTripComparisonRead';
3
2
  import type { SnapshotId } from '../models/SnapshotId';
4
- import type { TripComparisonItemId } from '../models/TripComparisonItemId';
5
3
  import type { CancelablePromise } from '../core/CancelablePromise';
6
4
  export declare class PublicService {
7
5
  /**
@@ -11,12 +9,4 @@ export declare class PublicService {
11
9
  * @throws ApiError
12
10
  */
13
11
  static publicSnapshotList(snapshotId: SnapshotId): CancelablePromise<DTOPublicSnapshotRead>;
14
- /**
15
- * Get Trip Comparison (Public)
16
- * Fetches a single trip comparison item by UUID. This is a public endpoint that doesn't require authentication.
17
- * @param uuid UUID of a trip comparison item
18
- * @returns DTOTripComparisonRead The trip comparison item
19
- * @throws ApiError
20
- */
21
- static publicTripComparisonGet(uuid: TripComparisonItemId): CancelablePromise<DTOTripComparisonRead>;
22
12
  }
@@ -23,24 +23,4 @@ export class PublicService {
23
23
  },
24
24
  });
25
25
  }
26
- /**
27
- * Get Trip Comparison (Public)
28
- * Fetches a single trip comparison item by UUID. This is a public endpoint that doesn't require authentication.
29
- * @param uuid UUID of a trip comparison item
30
- * @returns DTOTripComparisonRead The trip comparison item
31
- * @throws ApiError
32
- */
33
- static publicTripComparisonGet(uuid) {
34
- return __request(OpenAPI, {
35
- method: 'GET',
36
- url: '/public/trip-comparison/{uuid}',
37
- path: {
38
- 'uuid': uuid,
39
- },
40
- errors: {
41
- 404: `If the trip comparison item does not exist`,
42
- 500: `When an unexpected error occurs`,
43
- },
44
- });
45
- }
46
26
  }
@@ -2,6 +2,7 @@ import type { DTOTripComparisonCreate } from '../models/DTOTripComparisonCreate'
2
2
  import type { DTOTripComparisonRead } from '../models/DTOTripComparisonRead';
3
3
  import type { DTOTripComparisonUpdate } from '../models/DTOTripComparisonUpdate';
4
4
  import type { InternalSwoopId } from '../models/InternalSwoopId';
5
+ import type { ReserveTripRequest } from '../models/ReserveTripRequest';
5
6
  import type { TripComparisonItemId } from '../models/TripComparisonItemId';
6
7
  import type { CancelablePromise } from '../core/CancelablePromise';
7
8
  export declare class TripComparisonService {
@@ -21,6 +22,14 @@ export declare class TripComparisonService {
21
22
  * @throws ApiError
22
23
  */
23
24
  static tripComparisonCreate(requestBody: DTOTripComparisonCreate): CancelablePromise<DTOTripComparisonRead>;
25
+ /**
26
+ * Get Trip Comparison
27
+ * Fetches a single trip comparison item by UUID. This is a server-to-server endpoint protected by an API key.
28
+ * @param uuid UUID of a trip comparison item
29
+ * @returns DTOTripComparisonRead The trip comparison item
30
+ * @throws ApiError
31
+ */
32
+ static tripComparisonGet(uuid: TripComparisonItemId): CancelablePromise<DTOTripComparisonRead>;
24
33
  /**
25
34
  * Update a Trip Comparison
26
35
  * Updates an existing trip comparison item by UUID. Finds the document by enquiryId, locates the item by UUID, and replaces the entire item's data. Updates metadata timestamps.
@@ -44,16 +53,9 @@ export declare class TripComparisonService {
44
53
  * Sets the reserved flag to true on the trip at the specified index within the given TripComparisonItem. This is a server-to-server endpoint protected by an API key.
45
54
  * @param uuid UUID of a trip comparison item
46
55
  * @param tripIndex Zero-based index of the trip within the TripComparisonItem to reserve
56
+ * @param requestBody
47
57
  * @returns DTOTripComparisonRead The updated trip comparison item after reserving the trip
48
58
  * @throws ApiError
49
59
  */
50
- static reserveTrip(uuid: TripComparisonItemId, tripIndex: number): CancelablePromise<DTOTripComparisonRead>;
51
- /**
52
- * Get Trip Comparison (Public)
53
- * Fetches a single trip comparison item by UUID. This is a public endpoint that doesn't require authentication.
54
- * @param uuid UUID of a trip comparison item
55
- * @returns DTOTripComparisonRead The trip comparison item
56
- * @throws ApiError
57
- */
58
- static publicTripComparisonGet(uuid: TripComparisonItemId): CancelablePromise<DTOTripComparisonRead>;
60
+ static reserveTrip(uuid: TripComparisonItemId, tripIndex: number, requestBody?: ReserveTripRequest): CancelablePromise<DTOTripComparisonRead>;
59
61
  }
@@ -43,6 +43,27 @@ export class TripComparisonService {
43
43
  },
44
44
  });
45
45
  }
46
+ /**
47
+ * Get Trip Comparison
48
+ * Fetches a single trip comparison item by UUID. This is a server-to-server endpoint protected by an API key.
49
+ * @param uuid UUID of a trip comparison item
50
+ * @returns DTOTripComparisonRead The trip comparison item
51
+ * @throws ApiError
52
+ */
53
+ static tripComparisonGet(uuid) {
54
+ return __request(OpenAPI, {
55
+ method: 'GET',
56
+ url: '/trip-comparison/{uuid}',
57
+ path: {
58
+ 'uuid': uuid,
59
+ },
60
+ errors: {
61
+ 401: `When the API key is missing or invalid`,
62
+ 404: `If the trip comparison item does not exist`,
63
+ 500: `When an unexpected error occurs`,
64
+ },
65
+ });
66
+ }
46
67
  /**
47
68
  * Update a Trip Comparison
48
69
  * Updates an existing trip comparison item by UUID. Finds the document by enquiryId, locates the item by UUID, and replaces the entire item's data. Updates metadata timestamps.
@@ -99,10 +120,11 @@ export class TripComparisonService {
99
120
  * Sets the reserved flag to true on the trip at the specified index within the given TripComparisonItem. This is a server-to-server endpoint protected by an API key.
100
121
  * @param uuid UUID of a trip comparison item
101
122
  * @param tripIndex Zero-based index of the trip within the TripComparisonItem to reserve
123
+ * @param requestBody
102
124
  * @returns DTOTripComparisonRead The updated trip comparison item after reserving the trip
103
125
  * @throws ApiError
104
126
  */
105
- static reserveTrip(uuid, tripIndex) {
127
+ static reserveTrip(uuid, tripIndex, requestBody) {
106
128
  return __request(OpenAPI, {
107
129
  method: 'PATCH',
108
130
  url: '/trip-comparison/{uuid}/trips/{tripIndex}/reserve',
@@ -110,6 +132,8 @@ export class TripComparisonService {
110
132
  'uuid': uuid,
111
133
  'tripIndex': tripIndex,
112
134
  },
135
+ body: requestBody,
136
+ mediaType: 'application/json',
113
137
  errors: {
114
138
  400: `If the tripIndex is not a valid non-negative integer`,
115
139
  401: `When the API key is missing or invalid`,
@@ -118,24 +142,4 @@ export class TripComparisonService {
118
142
  },
119
143
  });
120
144
  }
121
- /**
122
- * Get Trip Comparison (Public)
123
- * Fetches a single trip comparison item by UUID. This is a public endpoint that doesn't require authentication.
124
- * @param uuid UUID of a trip comparison item
125
- * @returns DTOTripComparisonRead The trip comparison item
126
- * @throws ApiError
127
- */
128
- static publicTripComparisonGet(uuid) {
129
- return __request(OpenAPI, {
130
- method: 'GET',
131
- url: '/public/trip-comparison/{uuid}',
132
- path: {
133
- 'uuid': uuid,
134
- },
135
- errors: {
136
- 404: `If the trip comparison item does not exist`,
137
- 500: `When an unexpected error occurs`,
138
- },
139
- });
140
- }
141
145
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "swoop-common",
3
- "version": "2.2.137",
3
+ "version": "2.2.139",
4
4
  "main": "dist/api/index.js",
5
5
  "types": "dist/api/index.d.ts",
6
6
  "exports": {