swoop-common 2.1.64 → 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.
@@ -72,6 +72,7 @@ export type { search } from './index';
72
72
  export type { SnapshotId } from './index';
73
73
  export type { snapshotIdParam } from './index';
74
74
  export type { sortParam } from './index';
75
+ export type { tag } from './index';
75
76
  export type { TemplateId } from './index';
76
77
  export type { templateIdParam } from './index';
77
78
  export type { TemplateRevisionGroupId } from './index';
@@ -79,3 +80,4 @@ export type { Title } from './index';
79
80
  export { UrgencyCTA } from './index';
80
81
  export type { UserComponentInstanceField } from './index';
81
82
  export type { ValidationSchemas } from './index';
83
+ export type { version } from './index';
@@ -74,6 +74,7 @@ export type { search } from './models/search';
74
74
  export type { SnapshotId } from './models/SnapshotId';
75
75
  export type { snapshotIdParam } from './models/snapshotIdParam';
76
76
  export type { sortParam } from './models/sortParam';
77
+ export type { tag } from './models/tag';
77
78
  export type { TemplateId } from './models/TemplateId';
78
79
  export type { templateIdParam } from './models/templateIdParam';
79
80
  export type { TemplateRevisionGroupId } from './models/TemplateRevisionGroupId';
@@ -81,6 +82,7 @@ export type { Title } from './models/Title';
81
82
  export { UrgencyCTA } from './models/UrgencyCTA';
82
83
  export type { UserComponentInstanceField } from './models/UserComponentInstanceField';
83
84
  export type { ValidationSchemas } from './models/ValidationSchemas';
85
+ export type { version } from './models/version';
84
86
  export { ComponentService } from './services/ComponentService';
85
87
  export { CoreService } from './services/CoreService';
86
88
  export { TemplateService } from './services/TemplateService';
@@ -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;
@@ -0,0 +1,4 @@
1
+ /**
2
+ * the branch tag
3
+ */
4
+ export type tag = string;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,4 @@
1
+ /**
2
+ * the version of a branch
3
+ */
4
+ export type version = string;
@@ -0,0 +1 @@
1
+ export {};
@@ -74,6 +74,7 @@ export type { search } from './models/search';
74
74
  export type { SnapshotId } from './models/SnapshotId';
75
75
  export type { snapshotIdParam } from './models/snapshotIdParam';
76
76
  export type { sortParam } from './models/sortParam';
77
+ export type { tag } from './models/tag';
77
78
  export type { TemplateId } from './models/TemplateId';
78
79
  export type { templateIdParam } from './models/templateIdParam';
79
80
  export type { TemplateRevisionGroupId } from './models/TemplateRevisionGroupId';
@@ -81,6 +82,7 @@ export type { Title } from './models/Title';
81
82
  export { UrgencyCTA } from './models/UrgencyCTA';
82
83
  export type { UserComponentInstanceField } from './models/UserComponentInstanceField';
83
84
  export type { ValidationSchemas } from './models/ValidationSchemas';
85
+ export type { version } from './models/version';
84
86
  export { AuditService } from './services/AuditService';
85
87
  export { ItineraryService } from './services/ItineraryService';
86
88
  export { RegionService } from './services/RegionService';
@@ -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;
@@ -0,0 +1,4 @@
1
+ /**
2
+ * the branch tag
3
+ */
4
+ export type tag = string;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,4 @@
1
+ /**
2
+ * the version of a branch
3
+ */
4
+ export type version = string;
@@ -0,0 +1 @@
1
+ export {};
@@ -1,3 +1,4 @@
1
+ import type { Branches } from '../models/Branches';
1
2
  import type { DTOItineraryCreate } from '../models/DTOItineraryCreate';
2
3
  import type { DTOItineraryRead } from '../models/DTOItineraryRead';
3
4
  import type { DTOItineraryUpdate } from '../models/DTOItineraryUpdate';
@@ -5,6 +6,7 @@ import type { DTORegionCreate } from '../models/DTORegionCreate';
5
6
  import type { DTORegionRead } from '../models/DTORegionRead';
6
7
  import type { DTOSnapshotCreate } from '../models/DTOSnapshotCreate';
7
8
  import type { DTOSnapshotRead } from '../models/DTOSnapshotRead';
9
+ import type { EnquiryId } from '../models/EnquiryId';
8
10
  import type { ItineraryId } from '../models/ItineraryId';
9
11
  import type { Pagination } from '../models/Pagination';
10
12
  import type { SnapshotId } from '../models/SnapshotId';
@@ -28,18 +30,14 @@ export declare class ItineraryService {
28
30
  */
29
31
  snapshotCreate(requestBody: DTOSnapshotCreate): CancelablePromise<DTOSnapshotRead>;
30
32
  /**
31
- * List Snapshots
32
- * List all available snapshots
33
+ * List Snapshots relating to a specific enquiry id
34
+ * List all available snapshots relating to a specific enquiry id
33
35
  * @param enquiryId Enquiry Id
34
- * @param page Pagination, starting at page 1
35
- * @param limit Number of items per page
36
- * @param sort List of fields to sort by
37
36
  * @returns any The list of all snapshots given the parameters used
38
37
  * @throws ApiError
39
38
  */
40
- snapshotList(enquiryId: string, page?: number, limit?: number, sort?: any[]): CancelablePromise<{
41
- data?: Array<DTOSnapshotRead>;
42
- pagination?: Pagination;
39
+ snapshotList(enquiryId: EnquiryId): CancelablePromise<{
40
+ snapshots?: Array<DTOSnapshotRead>;
43
41
  }>;
44
42
  /**
45
43
  * Get Snapshot va ID
@@ -48,7 +46,10 @@ export declare class ItineraryService {
48
46
  * @returns any OK
49
47
  * @throws ApiError
50
48
  */
51
- snapshotGet(snapshotId: SnapshotId): CancelablePromise<any>;
49
+ snapshotGet(snapshotId: SnapshotId): CancelablePromise<{
50
+ snapshot?: DTOSnapshotRead;
51
+ itinerary?: DTOItineraryRead;
52
+ }>;
52
53
  /**
53
54
  * Delete Snapshot via ID
54
55
  * Deletes a specific snapshot given its Id
@@ -64,55 +65,69 @@ export declare class ItineraryService {
64
65
  * @returns any When a snapshot is restored as the latest version
65
66
  * @throws ApiError
66
67
  */
67
- snapshotRestore(snapshotId: SnapshotId): CancelablePromise<any>;
68
+ snapshotRestore(snapshotId: SnapshotId): CancelablePromise<{
69
+ snapshot?: DTOSnapshotRead;
70
+ itinerary?: DTOItineraryRead;
71
+ }>;
68
72
  /**
69
- * List Itineraries
70
- * List all itineraries
71
- * @param page Pagination, starting at page 1
72
- * @param limit Number of items per page
73
- * @param search Search term
74
- * @param sort List of fields to sort by
75
- * @param enquiryId Filter itineraries via enquiryId
76
- * @returns any The list of all itineraries given the parameters used
73
+ * List Tree view of Itineraries
74
+ * List all itineraries in a tree view for a specific enquiry id
75
+ * @param enquiryId Enquiry Id
76
+ * @returns any The tree list view of all itineraries given the parameters used
77
77
  * @throws ApiError
78
78
  */
79
- itineraryList(page?: number, limit?: number, search?: string, sort?: any[], enquiryId?: string): CancelablePromise<{
80
- data?: Array<DTOItineraryRead>;
81
- pagination?: Pagination;
79
+ itineraryList(enquiryId: EnquiryId): CancelablePromise<{
80
+ tree?: Array<Branches>;
82
81
  }>;
83
82
  /**
84
- * Create an Itinerary
85
- * Creates a new itinerary
83
+ * Create an Itinerary on an Enquiry
84
+ * Creates a new itinerary on an Enquiry
85
+ * @param enquiryId Enquiry Id
86
86
  * @param requestBody
87
87
  * @returns DTOItineraryRead When a itinerary is created
88
88
  * @throws ApiError
89
89
  */
90
- itineraryCreate(requestBody: DTOItineraryCreate): CancelablePromise<DTOItineraryRead>;
90
+ itineraryCreate(enquiryId: EnquiryId, requestBody: DTOItineraryCreate): CancelablePromise<DTOItineraryRead>;
91
91
  /**
92
92
  * Get Itinerary
93
93
  * Get itinerary via ID
94
- * @param itineraryId Itinerary id
95
- * @returns any OK
94
+ * @param enquiryId Enquiry Id
95
+ * @param tag the branch tag
96
+ * @param version the version of a branch
97
+ * @returns any The corresponding itinerary that matches the enquiry id, tag, and version
96
98
  * @throws ApiError
97
99
  */
98
- itineraryGet(itineraryId: ItineraryId): CancelablePromise<any>;
100
+ itineraryGet(enquiryId: EnquiryId, tag: string, version: string): CancelablePromise<any>;
99
101
  /**
100
102
  * Update Itinerary as New Revision
101
- * Updates an itinerary as a new revision
102
- * @param itineraryId Itinerary id
103
+ * Updates an itinerary as a new revision on the latest version of a branch
104
+ * @param enquiryId Enquiry Id
105
+ * @param tag the branch tag
103
106
  * @param requestBody
104
107
  * @returns DTOItineraryRead When a new revision is created successfully
105
108
  * @throws ApiError
106
109
  */
107
- itineraryUpdateAsNewRevision(itineraryId: ItineraryId, requestBody: DTOItineraryUpdate): CancelablePromise<DTOItineraryRead>;
110
+ itineraryUpdateAsNewRevision(enquiryId: EnquiryId, tag: string, requestBody: DTOItineraryUpdate): CancelablePromise<DTOItineraryRead>;
108
111
  /**
109
- * Delete Itinerary via ID
110
- * Deletes a specific itinerary given its Id
111
- * @param itineraryId Itinerary id
112
- * @returns void
112
+ * Fork an Itinerary
113
+ * this will create a new sub branch off the corresponding itinerary (enquiry id/tag/version)
114
+ * @param enquiryId Enquiry Id
115
+ * @param tag the branch tag
116
+ * @param version the version of a branch
117
+ * @returns DTOItineraryRead When the fork was successful
118
+ * @throws ApiError
119
+ */
120
+ forkItinerary(enquiryId: EnquiryId, tag: string, version: string): CancelablePromise<DTOItineraryRead>;
121
+ /**
122
+ * Promote an Itinerary
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.
124
+ * @param enquiryId Enquiry Id
125
+ * @param tag the branch tag
126
+ * @param version the version of a branch
127
+ * @returns DTOItineraryRead The new head of the parent branch
113
128
  * @throws ApiError
114
129
  */
115
- itineraryDelete(itineraryId: ItineraryId): CancelablePromise<void>;
130
+ promoteItinerary(enquiryId: EnquiryId, tag: string, version: string): CancelablePromise<DTOItineraryRead>;
116
131
  /**
117
132
  * Sync Itinerary
118
133
  * Sync an itinerary with swoop
@@ -35,7 +35,7 @@ export class ItineraryService {
35
35
  snapshotCreate(requestBody) {
36
36
  return __request(OpenAPI, {
37
37
  method: 'POST',
38
- url: '/snapshots',
38
+ url: '/snapshot',
39
39
  body: requestBody,
40
40
  mediaType: 'application/json',
41
41
  errors: {
@@ -47,23 +47,17 @@ export class ItineraryService {
47
47
  });
48
48
  }
49
49
  /**
50
- * List Snapshots
51
- * List all available snapshots
50
+ * List Snapshots relating to a specific enquiry id
51
+ * List all available snapshots relating to a specific enquiry id
52
52
  * @param enquiryId Enquiry Id
53
- * @param page Pagination, starting at page 1
54
- * @param limit Number of items per page
55
- * @param sort List of fields to sort by
56
53
  * @returns any The list of all snapshots given the parameters used
57
54
  * @throws ApiError
58
55
  */
59
- snapshotList(enquiryId, page, limit, sort) {
56
+ snapshotList(enquiryId) {
60
57
  return __request(OpenAPI, {
61
58
  method: 'GET',
62
- url: '/snapshots',
63
- query: {
64
- 'page': page,
65
- 'limit': limit,
66
- 'sort': sort,
59
+ url: '/snapshot/view/{enquiryId}',
60
+ path: {
67
61
  'enquiryId': enquiryId,
68
62
  },
69
63
  errors: {
@@ -84,14 +78,15 @@ export class ItineraryService {
84
78
  snapshotGet(snapshotId) {
85
79
  return __request(OpenAPI, {
86
80
  method: 'GET',
87
- url: '/snapshots/{snapshotId}',
81
+ url: '/snapshot/{snapshotId}',
88
82
  path: {
89
83
  'snapshotId': snapshotId,
90
84
  },
91
85
  errors: {
86
+ 400: `If the payload is malformed`,
92
87
  401: `Unauthorized - Missing or invalid Authorization header`,
93
88
  404: `If the snapshot does not exist`,
94
- 503: `Service Unavailable - The server is temporarily unable to handle the request`,
89
+ 500: `When an internal server error occurs when reading snapshot`,
95
90
  },
96
91
  });
97
92
  }
@@ -105,13 +100,14 @@ export class ItineraryService {
105
100
  snapshotDelete(snapshotId) {
106
101
  return __request(OpenAPI, {
107
102
  method: 'DELETE',
108
- url: '/snapshots/{snapshotId}',
103
+ url: '/snapshot/{snapshotId}',
109
104
  path: {
110
105
  'snapshotId': snapshotId,
111
106
  },
112
107
  errors: {
113
108
  400: `When the snapshot doesn't exist in the first place, or when a before hook fails before deleting the item`,
114
109
  401: `Unauthorized - Missing or invalid Authorization header`,
110
+ 404: `If the snapshot to delete to does not exist`,
115
111
  500: `When the snapshot fails to delete due to an internal server error`,
116
112
  503: `Service Unavailable - The server is temporarily unable to handle the request`,
117
113
  },
@@ -127,7 +123,7 @@ export class ItineraryService {
127
123
  snapshotRestore(snapshotId) {
128
124
  return __request(OpenAPI, {
129
125
  method: 'PUT',
130
- url: '/snapshots/restore/{snapshotId}',
126
+ url: '/snapshot/restore/{snapshotId}',
131
127
  path: {
132
128
  'snapshotId': snapshotId,
133
129
  },
@@ -141,25 +137,17 @@ export class ItineraryService {
141
137
  });
142
138
  }
143
139
  /**
144
- * List Itineraries
145
- * List all itineraries
146
- * @param page Pagination, starting at page 1
147
- * @param limit Number of items per page
148
- * @param search Search term
149
- * @param sort List of fields to sort by
150
- * @param enquiryId Filter itineraries via enquiryId
151
- * @returns any The list of all itineraries given the parameters used
140
+ * List Tree view of Itineraries
141
+ * List all itineraries in a tree view for a specific enquiry id
142
+ * @param enquiryId Enquiry Id
143
+ * @returns any The tree list view of all itineraries given the parameters used
152
144
  * @throws ApiError
153
145
  */
154
- itineraryList(page, limit, search, sort, enquiryId) {
146
+ itineraryList(enquiryId) {
155
147
  return __request(OpenAPI, {
156
148
  method: 'GET',
157
- url: '/itineraries',
158
- query: {
159
- 'page': page,
160
- 'limit': limit,
161
- 'search': search,
162
- 'sort': sort,
149
+ url: '/itinerary/{enquiryId}/tree',
150
+ path: {
163
151
  'enquiryId': enquiryId,
164
152
  },
165
153
  errors: {
@@ -171,16 +159,20 @@ export class ItineraryService {
171
159
  });
172
160
  }
173
161
  /**
174
- * Create an Itinerary
175
- * Creates a new itinerary
162
+ * Create an Itinerary on an Enquiry
163
+ * Creates a new itinerary on an Enquiry
164
+ * @param enquiryId Enquiry Id
176
165
  * @param requestBody
177
166
  * @returns DTOItineraryRead When a itinerary is created
178
167
  * @throws ApiError
179
168
  */
180
- itineraryCreate(requestBody) {
169
+ itineraryCreate(enquiryId, requestBody) {
181
170
  return __request(OpenAPI, {
182
171
  method: 'POST',
183
- url: '/itineraries',
172
+ url: '/itinerary/create/{enquiryId}',
173
+ path: {
174
+ 'enquiryId': enquiryId,
175
+ },
184
176
  body: requestBody,
185
177
  mediaType: 'application/json',
186
178
  errors: {
@@ -194,69 +186,105 @@ export class ItineraryService {
194
186
  /**
195
187
  * Get Itinerary
196
188
  * Get itinerary via ID
197
- * @param itineraryId Itinerary id
198
- * @returns any OK
189
+ * @param enquiryId Enquiry Id
190
+ * @param tag the branch tag
191
+ * @param version the version of a branch
192
+ * @returns any The corresponding itinerary that matches the enquiry id, tag, and version
199
193
  * @throws ApiError
200
194
  */
201
- itineraryGet(itineraryId) {
195
+ itineraryGet(enquiryId, tag, version) {
202
196
  return __request(OpenAPI, {
203
197
  method: 'GET',
204
- url: '/itineraries/{itineraryId}',
198
+ url: '/itinerary/{enquiryId}/{tag}/{version}',
205
199
  path: {
206
- 'itineraryId': itineraryId,
200
+ 'enquiryId': enquiryId,
201
+ 'tag': tag,
202
+ 'version': version,
207
203
  },
208
204
  errors: {
205
+ 400: `If the payload is malformed`,
209
206
  401: `Unauthorized - Missing or invalid Authorization header`,
210
- 404: `If the itinerary does not exist`,
207
+ 404: `If the itinerary does not exist as it does not match the enquiry id, tag, and version`,
211
208
  503: `Service Unavailable - The server is temporarily unable to handle the request`,
212
209
  },
213
210
  });
214
211
  }
215
212
  /**
216
213
  * Update Itinerary as New Revision
217
- * Updates an itinerary as a new revision
218
- * @param itineraryId Itinerary id
214
+ * Updates an itinerary as a new revision on the latest version of a branch
215
+ * @param enquiryId Enquiry Id
216
+ * @param tag the branch tag
219
217
  * @param requestBody
220
218
  * @returns DTOItineraryRead When a new revision is created successfully
221
219
  * @throws ApiError
222
220
  */
223
- itineraryUpdateAsNewRevision(itineraryId, requestBody) {
221
+ itineraryUpdateAsNewRevision(enquiryId, tag, requestBody) {
224
222
  return __request(OpenAPI, {
225
- method: 'PATCH',
226
- url: '/itineraries/{itineraryId}',
223
+ method: 'PUT',
224
+ url: '/itinerary/{enquiryId}/{tag}',
227
225
  path: {
228
- 'itineraryId': itineraryId,
226
+ 'enquiryId': enquiryId,
227
+ 'tag': tag,
229
228
  },
230
229
  body: requestBody,
231
230
  mediaType: 'application/json',
232
231
  errors: {
233
232
  400: `If the payload is malformed`,
234
233
  401: `Unauthorized - Missing or invalid Authorization header`,
235
- 404: `When the itinerary id to create a new revision from is not found`,
234
+ 404: `When the itinerary enquiry id and tag do not exists`,
236
235
  500: `When an internal server error occurs updating an itinerary as a new revision`,
237
- 503: `Service Unavailable - The server is temporarily unable to handle the request`,
238
236
  },
239
237
  });
240
238
  }
241
239
  /**
242
- * Delete Itinerary via ID
243
- * Deletes a specific itinerary given its Id
244
- * @param itineraryId Itinerary id
245
- * @returns void
240
+ * Fork an Itinerary
241
+ * this will create a new sub branch off the corresponding itinerary (enquiry id/tag/version)
242
+ * @param enquiryId Enquiry Id
243
+ * @param tag the branch tag
244
+ * @param version the version of a branch
245
+ * @returns DTOItineraryRead When the fork was successful
246
246
  * @throws ApiError
247
247
  */
248
- itineraryDelete(itineraryId) {
248
+ forkItinerary(enquiryId, tag, version) {
249
249
  return __request(OpenAPI, {
250
- method: 'DELETE',
251
- url: '/itineraries/{itineraryId}',
250
+ method: 'POST',
251
+ url: '/itinerary/fork/{enquiryId}/{tag}/{version}',
252
252
  path: {
253
- 'itineraryId': itineraryId,
253
+ 'enquiryId': enquiryId,
254
+ 'tag': tag,
255
+ 'version': version,
254
256
  },
255
257
  errors: {
256
- 400: `When the itinerary doesn't exist in the first place, or when a before hook fails before deleting the item`,
258
+ 400: `If the payload is malformed`,
257
259
  401: `Unauthorized - Missing or invalid Authorization header`,
258
- 500: `When the itinerary fails to delete due to an internal server error`,
259
- 503: `Service Unavailable - The server is temporarily unable to handle the request`,
260
+ 404: `When the itinerary enquiry id and tag do not exists`,
261
+ 500: `When an internal server error occurs updating an itinerary as a new revision`,
262
+ },
263
+ });
264
+ }
265
+ /**
266
+ * Promote an Itinerary
267
+ * 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.
268
+ * @param enquiryId Enquiry Id
269
+ * @param tag the branch tag
270
+ * @param version the version of a branch
271
+ * @returns DTOItineraryRead The new head of the parent branch
272
+ * @throws ApiError
273
+ */
274
+ promoteItinerary(enquiryId, tag, version) {
275
+ return __request(OpenAPI, {
276
+ method: 'POST',
277
+ url: '/itinerary/promote/{enquiryId}/{tag}/{version}',
278
+ path: {
279
+ 'enquiryId': enquiryId,
280
+ 'tag': tag,
281
+ 'version': version,
282
+ },
283
+ errors: {
284
+ 400: `If the payload is malformed`,
285
+ 401: `Unauthorized - Missing or invalid Authorization header`,
286
+ 404: `When the itinerary enquiry id and tag do not exists`,
287
+ 500: `When an internal server error occurs updating an itinerary as a new revision`,
260
288
  },
261
289
  });
262
290
  }
@@ -295,7 +323,7 @@ export class ItineraryService {
295
323
  regionList(page, limit, sort) {
296
324
  return __request(OpenAPI, {
297
325
  method: 'GET',
298
- url: '/regions',
326
+ url: '/region',
299
327
  query: {
300
328
  'page': page,
301
329
  'limit': limit,
@@ -319,7 +347,7 @@ export class ItineraryService {
319
347
  regionCreate(requestBody) {
320
348
  return __request(OpenAPI, {
321
349
  method: 'POST',
322
- url: '/regions',
350
+ url: '/region',
323
351
  body: requestBody,
324
352
  mediaType: 'application/json',
325
353
  errors: {
@@ -13,7 +13,7 @@ export class RegionService {
13
13
  static regionList(page, limit, sort) {
14
14
  return __request(OpenAPI, {
15
15
  method: 'GET',
16
- url: '/regions',
16
+ url: '/region',
17
17
  query: {
18
18
  'page': page,
19
19
  'limit': limit,
@@ -37,7 +37,7 @@ export class RegionService {
37
37
  static regionCreate(requestBody) {
38
38
  return __request(OpenAPI, {
39
39
  method: 'POST',
40
- url: '/regions',
40
+ url: '/region',
41
41
  body: requestBody,
42
42
  mediaType: 'application/json',
43
43
  errors: {
@@ -1,6 +1,7 @@
1
+ import type { DTOItineraryRead } from '../models/DTOItineraryRead';
1
2
  import type { DTOSnapshotCreate } from '../models/DTOSnapshotCreate';
2
3
  import type { DTOSnapshotRead } from '../models/DTOSnapshotRead';
3
- import type { Pagination } from '../models/Pagination';
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 {
@@ -13,18 +14,14 @@ export declare class SnapshotService {
13
14
  */
14
15
  static snapshotCreate(requestBody: DTOSnapshotCreate): CancelablePromise<DTOSnapshotRead>;
15
16
  /**
16
- * List Snapshots
17
- * List all available snapshots
17
+ * List Snapshots relating to a specific enquiry id
18
+ * List all available snapshots relating to a specific enquiry id
18
19
  * @param enquiryId Enquiry Id
19
- * @param page Pagination, starting at page 1
20
- * @param limit Number of items per page
21
- * @param sort List of fields to sort by
22
20
  * @returns any The list of all snapshots given the parameters used
23
21
  * @throws ApiError
24
22
  */
25
- static snapshotList(enquiryId: string, page?: number, limit?: number, sort?: any[]): CancelablePromise<{
26
- data?: Array<DTOSnapshotRead>;
27
- pagination?: Pagination;
23
+ static snapshotList(enquiryId: EnquiryId): CancelablePromise<{
24
+ snapshots?: Array<DTOSnapshotRead>;
28
25
  }>;
29
26
  /**
30
27
  * Get Snapshot va ID
@@ -33,7 +30,10 @@ export declare class SnapshotService {
33
30
  * @returns any OK
34
31
  * @throws ApiError
35
32
  */
36
- static snapshotGet(snapshotId: SnapshotId): CancelablePromise<any>;
33
+ static snapshotGet(snapshotId: SnapshotId): CancelablePromise<{
34
+ snapshot?: DTOSnapshotRead;
35
+ itinerary?: DTOItineraryRead;
36
+ }>;
37
37
  /**
38
38
  * Delete Snapshot via ID
39
39
  * Deletes a specific snapshot given its Id
@@ -49,5 +49,8 @@ export declare class SnapshotService {
49
49
  * @returns any When a snapshot is restored as the latest version
50
50
  * @throws ApiError
51
51
  */
52
- static snapshotRestore(snapshotId: SnapshotId): CancelablePromise<any>;
52
+ static snapshotRestore(snapshotId: SnapshotId): CancelablePromise<{
53
+ snapshot?: DTOSnapshotRead;
54
+ itinerary?: DTOItineraryRead;
55
+ }>;
53
56
  }
@@ -11,7 +11,7 @@ export class SnapshotService {
11
11
  static snapshotCreate(requestBody) {
12
12
  return __request(OpenAPI, {
13
13
  method: 'POST',
14
- url: '/snapshots',
14
+ url: '/snapshot',
15
15
  body: requestBody,
16
16
  mediaType: 'application/json',
17
17
  errors: {
@@ -23,23 +23,17 @@ export class SnapshotService {
23
23
  });
24
24
  }
25
25
  /**
26
- * List Snapshots
27
- * List all available snapshots
26
+ * List Snapshots relating to a specific enquiry id
27
+ * List all available snapshots relating to a specific enquiry id
28
28
  * @param enquiryId Enquiry Id
29
- * @param page Pagination, starting at page 1
30
- * @param limit Number of items per page
31
- * @param sort List of fields to sort by
32
29
  * @returns any The list of all snapshots given the parameters used
33
30
  * @throws ApiError
34
31
  */
35
- static snapshotList(enquiryId, page, limit, sort) {
32
+ static snapshotList(enquiryId) {
36
33
  return __request(OpenAPI, {
37
34
  method: 'GET',
38
- url: '/snapshots',
39
- query: {
40
- 'page': page,
41
- 'limit': limit,
42
- 'sort': sort,
35
+ url: '/snapshot/view/{enquiryId}',
36
+ path: {
43
37
  'enquiryId': enquiryId,
44
38
  },
45
39
  errors: {
@@ -60,14 +54,15 @@ export class SnapshotService {
60
54
  static snapshotGet(snapshotId) {
61
55
  return __request(OpenAPI, {
62
56
  method: 'GET',
63
- url: '/snapshots/{snapshotId}',
57
+ url: '/snapshot/{snapshotId}',
64
58
  path: {
65
59
  'snapshotId': snapshotId,
66
60
  },
67
61
  errors: {
62
+ 400: `If the payload is malformed`,
68
63
  401: `Unauthorized - Missing or invalid Authorization header`,
69
64
  404: `If the snapshot does not exist`,
70
- 503: `Service Unavailable - The server is temporarily unable to handle the request`,
65
+ 500: `When an internal server error occurs when reading snapshot`,
71
66
  },
72
67
  });
73
68
  }
@@ -81,13 +76,14 @@ export class SnapshotService {
81
76
  static snapshotDelete(snapshotId) {
82
77
  return __request(OpenAPI, {
83
78
  method: 'DELETE',
84
- url: '/snapshots/{snapshotId}',
79
+ url: '/snapshot/{snapshotId}',
85
80
  path: {
86
81
  'snapshotId': snapshotId,
87
82
  },
88
83
  errors: {
89
84
  400: `When the snapshot doesn't exist in the first place, or when a before hook fails before deleting the item`,
90
85
  401: `Unauthorized - Missing or invalid Authorization header`,
86
+ 404: `If the snapshot to delete to does not exist`,
91
87
  500: `When the snapshot fails to delete due to an internal server error`,
92
88
  503: `Service Unavailable - The server is temporarily unable to handle the request`,
93
89
  },
@@ -103,7 +99,7 @@ export class SnapshotService {
103
99
  static snapshotRestore(snapshotId) {
104
100
  return __request(OpenAPI, {
105
101
  method: 'PUT',
106
- url: '/snapshots/restore/{snapshotId}',
102
+ url: '/snapshot/restore/{snapshotId}',
107
103
  path: {
108
104
  'snapshotId': snapshotId,
109
105
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "swoop-common",
3
- "version": "2.1.64",
3
+ "version": "2.1.66",
4
4
  "main": "dist/api/index.js",
5
5
  "types": "dist/api/index.d.ts",
6
6
  "exports": {