swoop-common 2.1.65 → 2.1.66

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.
@@ -1,4 +1,5 @@
1
+ import type { EnquiryId } from './EnquiryId';
1
2
  /**
2
3
  * Enquiry Id
3
4
  */
4
- export type enquiryIdParam = string;
5
+ export type enquiryIdParam = EnquiryId;
@@ -1,4 +1,5 @@
1
+ import type { EnquiryId } from './EnquiryId';
1
2
  /**
2
3
  * Enquiry Id
3
4
  */
4
- export type enquiryIdParam = string;
5
+ export type enquiryIdParam = EnquiryId;
@@ -6,6 +6,7 @@ import type { DTORegionCreate } from '../models/DTORegionCreate';
6
6
  import type { DTORegionRead } from '../models/DTORegionRead';
7
7
  import type { DTOSnapshotCreate } from '../models/DTOSnapshotCreate';
8
8
  import type { DTOSnapshotRead } from '../models/DTOSnapshotRead';
9
+ import type { EnquiryId } from '../models/EnquiryId';
9
10
  import type { ItineraryId } from '../models/ItineraryId';
10
11
  import type { Pagination } from '../models/Pagination';
11
12
  import type { SnapshotId } from '../models/SnapshotId';
@@ -35,7 +36,7 @@ export declare class ItineraryService {
35
36
  * @returns any The list of all snapshots given the parameters used
36
37
  * @throws ApiError
37
38
  */
38
- snapshotList(enquiryId: string): CancelablePromise<{
39
+ snapshotList(enquiryId: EnquiryId): CancelablePromise<{
39
40
  snapshots?: Array<DTOSnapshotRead>;
40
41
  }>;
41
42
  /**
@@ -75,7 +76,7 @@ export declare class ItineraryService {
75
76
  * @returns any The tree list view of all itineraries given the parameters used
76
77
  * @throws ApiError
77
78
  */
78
- itineraryList(enquiryId: string): CancelablePromise<{
79
+ itineraryList(enquiryId: EnquiryId): CancelablePromise<{
79
80
  tree?: Array<Branches>;
80
81
  }>;
81
82
  /**
@@ -86,7 +87,7 @@ export declare class ItineraryService {
86
87
  * @returns DTOItineraryRead When a itinerary is created
87
88
  * @throws ApiError
88
89
  */
89
- itineraryCreate(enquiryId: string, requestBody: DTOItineraryCreate): CancelablePromise<DTOItineraryRead>;
90
+ itineraryCreate(enquiryId: EnquiryId, requestBody: DTOItineraryCreate): CancelablePromise<DTOItineraryRead>;
90
91
  /**
91
92
  * Get Itinerary
92
93
  * Get itinerary via ID
@@ -96,7 +97,7 @@ export declare class ItineraryService {
96
97
  * @returns any The corresponding itinerary that matches the enquiry id, tag, and version
97
98
  * @throws ApiError
98
99
  */
99
- itineraryGet(enquiryId: string, tag: string, version: string): CancelablePromise<any>;
100
+ itineraryGet(enquiryId: EnquiryId, tag: string, version: string): CancelablePromise<any>;
100
101
  /**
101
102
  * Update Itinerary as New Revision
102
103
  * Updates an itinerary as a new revision on the latest version of a branch
@@ -106,7 +107,7 @@ export declare class ItineraryService {
106
107
  * @returns DTOItineraryRead When a new revision is created successfully
107
108
  * @throws ApiError
108
109
  */
109
- itineraryUpdateAsNewRevision(enquiryId: string, tag: string, requestBody: DTOItineraryUpdate): CancelablePromise<DTOItineraryRead>;
110
+ itineraryUpdateAsNewRevision(enquiryId: EnquiryId, tag: string, requestBody: DTOItineraryUpdate): CancelablePromise<DTOItineraryRead>;
110
111
  /**
111
112
  * Fork an Itinerary
112
113
  * this will create a new sub branch off the corresponding itinerary (enquiry id/tag/version)
@@ -116,7 +117,7 @@ export declare class ItineraryService {
116
117
  * @returns DTOItineraryRead When the fork was successful
117
118
  * @throws ApiError
118
119
  */
119
- forkItinerary(enquiryId: string, tag: string, version: string): CancelablePromise<DTOItineraryRead>;
120
+ forkItinerary(enquiryId: EnquiryId, tag: string, version: string): CancelablePromise<DTOItineraryRead>;
120
121
  /**
121
122
  * Promote an Itinerary
122
123
  * This will take itinerary that matches the enquiry id, tag, and version to create a new revision on the head of it's parent branch. This will delete the old sub branch that is being promoted as will exist as the new main head of its parent. Promotions of any tag will always promote into the main branch.
@@ -126,7 +127,7 @@ export declare class ItineraryService {
126
127
  * @returns DTOItineraryRead The new head of the parent branch
127
128
  * @throws ApiError
128
129
  */
129
- promoteItinerary(enquiryId: string, tag: string, version: string): CancelablePromise<DTOItineraryRead>;
130
+ promoteItinerary(enquiryId: EnquiryId, tag: string, version: string): CancelablePromise<DTOItineraryRead>;
130
131
  /**
131
132
  * Sync Itinerary
132
133
  * Sync an itinerary with swoop
@@ -57,7 +57,7 @@ export class ItineraryService {
57
57
  return __request(OpenAPI, {
58
58
  method: 'GET',
59
59
  url: '/snapshot/view/{enquiryId}',
60
- query: {
60
+ path: {
61
61
  'enquiryId': enquiryId,
62
62
  },
63
63
  errors: {
@@ -83,9 +83,10 @@ export class ItineraryService {
83
83
  'snapshotId': snapshotId,
84
84
  },
85
85
  errors: {
86
+ 400: `If the payload is malformed`,
86
87
  401: `Unauthorized - Missing or invalid Authorization header`,
87
88
  404: `If the snapshot does not exist`,
88
- 503: `Service Unavailable - The server is temporarily unable to handle the request`,
89
+ 500: `When an internal server error occurs when reading snapshot`,
89
90
  },
90
91
  });
91
92
  }
@@ -106,6 +107,7 @@ export class ItineraryService {
106
107
  errors: {
107
108
  400: `When the snapshot doesn't exist in the first place, or when a before hook fails before deleting the item`,
108
109
  401: `Unauthorized - Missing or invalid Authorization header`,
110
+ 404: `If the snapshot to delete to does not exist`,
109
111
  500: `When the snapshot fails to delete due to an internal server error`,
110
112
  503: `Service Unavailable - The server is temporarily unable to handle the request`,
111
113
  },
@@ -145,7 +147,7 @@ export class ItineraryService {
145
147
  return __request(OpenAPI, {
146
148
  method: 'GET',
147
149
  url: '/itinerary/{enquiryId}/tree',
148
- query: {
150
+ path: {
149
151
  'enquiryId': enquiryId,
150
152
  },
151
153
  errors: {
@@ -168,7 +170,7 @@ export class ItineraryService {
168
170
  return __request(OpenAPI, {
169
171
  method: 'POST',
170
172
  url: '/itinerary/create/{enquiryId}',
171
- query: {
173
+ path: {
172
174
  'enquiryId': enquiryId,
173
175
  },
174
176
  body: requestBody,
@@ -194,12 +196,13 @@ export class ItineraryService {
194
196
  return __request(OpenAPI, {
195
197
  method: 'GET',
196
198
  url: '/itinerary/{enquiryId}/{tag}/{version}',
197
- query: {
199
+ path: {
198
200
  'enquiryId': enquiryId,
199
201
  'tag': tag,
200
202
  'version': version,
201
203
  },
202
204
  errors: {
205
+ 400: `If the payload is malformed`,
203
206
  401: `Unauthorized - Missing or invalid Authorization header`,
204
207
  404: `If the itinerary does not exist as it does not match the enquiry id, tag, and version`,
205
208
  503: `Service Unavailable - The server is temporarily unable to handle the request`,
@@ -219,7 +222,7 @@ export class ItineraryService {
219
222
  return __request(OpenAPI, {
220
223
  method: 'PUT',
221
224
  url: '/itinerary/{enquiryId}/{tag}',
222
- query: {
225
+ path: {
223
226
  'enquiryId': enquiryId,
224
227
  'tag': tag,
225
228
  },
@@ -246,7 +249,7 @@ export class ItineraryService {
246
249
  return __request(OpenAPI, {
247
250
  method: 'POST',
248
251
  url: '/itinerary/fork/{enquiryId}/{tag}/{version}',
249
- query: {
252
+ path: {
250
253
  'enquiryId': enquiryId,
251
254
  'tag': tag,
252
255
  'version': version,
@@ -272,7 +275,7 @@ export class ItineraryService {
272
275
  return __request(OpenAPI, {
273
276
  method: 'POST',
274
277
  url: '/itinerary/promote/{enquiryId}/{tag}/{version}',
275
- query: {
278
+ path: {
276
279
  'enquiryId': enquiryId,
277
280
  'tag': tag,
278
281
  'version': version,
@@ -1,6 +1,7 @@
1
1
  import type { DTOItineraryRead } from '../models/DTOItineraryRead';
2
2
  import type { DTOSnapshotCreate } from '../models/DTOSnapshotCreate';
3
3
  import type { DTOSnapshotRead } from '../models/DTOSnapshotRead';
4
+ import type { EnquiryId } from '../models/EnquiryId';
4
5
  import type { SnapshotId } from '../models/SnapshotId';
5
6
  import type { CancelablePromise } from '../core/CancelablePromise';
6
7
  export declare class SnapshotService {
@@ -19,7 +20,7 @@ export declare class SnapshotService {
19
20
  * @returns any The list of all snapshots given the parameters used
20
21
  * @throws ApiError
21
22
  */
22
- static snapshotList(enquiryId: string): CancelablePromise<{
23
+ static snapshotList(enquiryId: EnquiryId): CancelablePromise<{
23
24
  snapshots?: Array<DTOSnapshotRead>;
24
25
  }>;
25
26
  /**
@@ -33,7 +33,7 @@ export class SnapshotService {
33
33
  return __request(OpenAPI, {
34
34
  method: 'GET',
35
35
  url: '/snapshot/view/{enquiryId}',
36
- query: {
36
+ path: {
37
37
  'enquiryId': enquiryId,
38
38
  },
39
39
  errors: {
@@ -59,9 +59,10 @@ export class SnapshotService {
59
59
  'snapshotId': snapshotId,
60
60
  },
61
61
  errors: {
62
+ 400: `If the payload is malformed`,
62
63
  401: `Unauthorized - Missing or invalid Authorization header`,
63
64
  404: `If the snapshot does not exist`,
64
- 503: `Service Unavailable - The server is temporarily unable to handle the request`,
65
+ 500: `When an internal server error occurs when reading snapshot`,
65
66
  },
66
67
  });
67
68
  }
@@ -82,6 +83,7 @@ export class SnapshotService {
82
83
  errors: {
83
84
  400: `When the snapshot doesn't exist in the first place, or when a before hook fails before deleting the item`,
84
85
  401: `Unauthorized - Missing or invalid Authorization header`,
86
+ 404: `If the snapshot to delete to does not exist`,
85
87
  500: `When the snapshot fails to delete due to an internal server error`,
86
88
  503: `Service Unavailable - The server is temporarily unable to handle the request`,
87
89
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "swoop-common",
3
- "version": "2.1.65",
3
+ "version": "2.1.66",
4
4
  "main": "dist/api/index.js",
5
5
  "types": "dist/api/index.d.ts",
6
6
  "exports": {