swoop-common 2.1.49 → 2.1.51

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 (41) hide show
  1. package/dist/api/additions/templateHierarchyResolver.js +52 -49
  2. package/dist/api/bundler.js +57 -24
  3. package/dist/api/generated/core/core/OpenAPI.js +2 -2
  4. package/dist/api/generated/core/exports.d.ts +2 -0
  5. package/dist/api/generated/core/index.d.ts +4 -0
  6. package/dist/api/generated/core/index.js +2 -0
  7. package/dist/api/generated/core/models/DTOSnapshotCreate.d.ts +0 -1
  8. package/dist/api/generated/core/models/DTOSnapshotEntity.d.ts +0 -1
  9. package/dist/api/generated/core/models/DTOSnapshotRead.d.ts +0 -1
  10. package/dist/api/generated/core/models/Error.d.ts +1 -0
  11. package/dist/api/generated/core/models/Error.js +1 -0
  12. package/dist/api/generated/core/models/itineraryIdQuery.d.ts +4 -0
  13. package/dist/api/generated/core/models/itineraryIdQuery.js +1 -0
  14. package/dist/api/generated/core/services/ComponentService.d.ts +73 -0
  15. package/dist/api/generated/core/services/ComponentService.js +171 -0
  16. package/dist/api/generated/core/services/CoreService.d.ts +48 -36
  17. package/dist/api/generated/core/services/CoreService.js +131 -32
  18. package/dist/api/generated/core/services/TemplateService.d.ts +53 -0
  19. package/dist/api/generated/core/services/TemplateService.js +121 -0
  20. package/dist/api/generated/itinerary/core/OpenAPI.js +2 -2
  21. package/dist/api/generated/itinerary/index.d.ts +5 -0
  22. package/dist/api/generated/itinerary/index.js +3 -0
  23. package/dist/api/generated/itinerary/models/DTOSnapshotCreate.d.ts +0 -1
  24. package/dist/api/generated/itinerary/models/DTOSnapshotEntity.d.ts +0 -1
  25. package/dist/api/generated/itinerary/models/DTOSnapshotRead.d.ts +0 -1
  26. package/dist/api/generated/itinerary/models/Error.d.ts +1 -0
  27. package/dist/api/generated/itinerary/models/Error.js +1 -0
  28. package/dist/api/generated/itinerary/models/itineraryIdQuery.d.ts +4 -0
  29. package/dist/api/generated/itinerary/models/itineraryIdQuery.js +1 -0
  30. package/dist/api/generated/itinerary/services/AuditService.d.ts +12 -0
  31. package/dist/api/generated/itinerary/services/AuditService.js +28 -0
  32. package/dist/api/generated/itinerary/services/ItineraryService.d.ts +38 -34
  33. package/dist/api/generated/itinerary/services/ItineraryService.js +123 -22
  34. package/dist/api/generated/itinerary/services/RegionService.d.ts +27 -0
  35. package/dist/api/generated/itinerary/services/RegionService.js +51 -0
  36. package/dist/api/generated/itinerary/services/SnapshotService.d.ts +51 -0
  37. package/dist/api/generated/itinerary/services/SnapshotService.js +117 -0
  38. package/dist/rendering/components/ComponentPicker.d.ts +1 -1
  39. package/dist/rendering/components/ComponentPicker.js +33 -20
  40. package/dist/rendering/renderers/TemplatePicker.js +15 -15
  41. package/package.json +4 -1
@@ -0,0 +1 @@
1
+ export type Error = Record<string, any>;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,4 @@
1
+ /**
2
+ * Itinerary Id
3
+ */
4
+ export type itineraryIdQuery = string;
@@ -0,0 +1,12 @@
1
+ import type { CancelablePromise } from '../core/CancelablePromise';
2
+ export declare class AuditService {
3
+ /**
4
+ * Audit a Copy to Clipboard
5
+ * Audits when a user copies something to their clipboard
6
+ * @param itineraryId Itinerary id
7
+ * @param content Base64 encoding of the copied content
8
+ * @returns void
9
+ * @throws ApiError
10
+ */
11
+ static auditCopyClipboard(itineraryId: string, content: string): CancelablePromise<void>;
12
+ }
@@ -0,0 +1,28 @@
1
+ import { OpenAPI } from '../core/OpenAPI';
2
+ import { request as __request } from '../core/request';
3
+ export class AuditService {
4
+ /**
5
+ * Audit a Copy to Clipboard
6
+ * Audits when a user copies something to their clipboard
7
+ * @param itineraryId Itinerary id
8
+ * @param content Base64 encoding of the copied content
9
+ * @returns void
10
+ * @throws ApiError
11
+ */
12
+ static auditCopyClipboard(itineraryId, content) {
13
+ return __request(OpenAPI, {
14
+ method: 'POST',
15
+ url: '/audit/copyClipboard/{itineraryId}',
16
+ path: {
17
+ 'itineraryId': itineraryId,
18
+ },
19
+ query: {
20
+ 'content': content,
21
+ },
22
+ errors: {
23
+ 400: `When the content query b64 string is invalid`,
24
+ 401: `Unauthorized - Missing or invalid Authorization header`,
25
+ },
26
+ });
27
+ }
28
+ }
@@ -8,56 +8,60 @@ import type { DTOSnapshotRead } from '../models/DTOSnapshotRead';
8
8
  import type { Pagination } from '../models/Pagination';
9
9
  import type { CancelablePromise } from '../core/CancelablePromise';
10
10
  export declare class ItineraryService {
11
+ /**
12
+ * Audit a Copy to Clipboard
13
+ * Audits when a user copies something to their clipboard
14
+ * @param itineraryId Itinerary id
15
+ * @param content Base64 encoding of the copied content
16
+ * @returns void
17
+ * @throws ApiError
18
+ */
19
+ auditCopyClipboard(itineraryId: string, content: string): CancelablePromise<void>;
11
20
  /**
12
21
  * Create a Snapshot
13
22
  * Creates a new snapshot. A snapshot is a reference to a specific itinerary revision group id.
14
23
  * @param requestBody
15
- * @returns DTOSnapshotRead OK
24
+ * @returns DTOSnapshotRead When a snapshot is created
16
25
  * @throws ApiError
17
26
  */
18
27
  snapshotCreate(requestBody: DTOSnapshotCreate): CancelablePromise<DTOSnapshotRead>;
19
28
  /**
20
29
  * List Snapshots
21
30
  * List all available snapshots
22
- * @param enquiryId Enquiry Id
23
31
  * @param page Pagination, starting at page 1
24
32
  * @param limit Number of items per page
25
33
  * @param sort List of fields to sort by
26
- * @returns any OK
34
+ * @returns any The list of all snapshots given the parameters used
27
35
  * @throws ApiError
28
36
  */
29
- snapshotList(enquiryId: string, page?: number, limit?: number, sort?: any[]): CancelablePromise<{
30
- data: Array<DTOSnapshotRead>;
37
+ snapshotList(page?: number, limit?: number, sort?: any[]): CancelablePromise<{
38
+ data?: Array<DTOSnapshotRead>;
31
39
  pagination?: Pagination;
32
40
  }>;
33
41
  /**
34
42
  * Get Snapshot va ID
35
- * Returns the specific snapshot
43
+ * Returns the specific snapshot given its Id
36
44
  * @param snapshotId
37
45
  * @returns any OK
38
46
  * @throws ApiError
39
47
  */
40
- snapshotGet(snapshotId: string): CancelablePromise<{
41
- data: Array<DTOSnapshotRead>;
42
- }>;
48
+ snapshotGet(snapshotId: string): CancelablePromise<any>;
43
49
  /**
44
50
  * Delete Snapshot via ID
45
- * Deletes a specific snapshot
51
+ * Deletes a specific snapshot given its Id
46
52
  * @param snapshotId
47
- * @returns any OK
53
+ * @returns void
48
54
  * @throws ApiError
49
55
  */
50
- snapshotDelete(snapshotId: string): CancelablePromise<any>;
56
+ snapshotDelete(snapshotId: string): CancelablePromise<void>;
51
57
  /**
52
58
  * Restore Snapshot
53
59
  * Creates a new itinerary revision given the content the snapshot refers to
54
60
  * @param snapshotId
55
- * @returns any OK
61
+ * @returns any When a snapshot is restored as the latest version
56
62
  * @throws ApiError
57
63
  */
58
- snapshotRestore(snapshotId: string): CancelablePromise<{
59
- data: Array<DTOSnapshotRead>;
60
- }>;
64
+ snapshotRestore(snapshotId: string): CancelablePromise<any>;
61
65
  /**
62
66
  * List Itineraries
63
67
  * List all itineraries
@@ -66,18 +70,18 @@ export declare class ItineraryService {
66
70
  * @param search Search term
67
71
  * @param sort List of fields to sort by
68
72
  * @param enquiryId Filter itineraries via enquiryId
69
- * @returns any OK
73
+ * @returns any The list of all itineraries given the parameters used
70
74
  * @throws ApiError
71
75
  */
72
76
  itineraryList(page?: number, limit?: number, search?: string, sort?: any[], enquiryId?: string): CancelablePromise<{
73
- data: Array<DTOItineraryRead>;
77
+ data?: Array<DTOItineraryRead>;
74
78
  pagination?: Pagination;
75
79
  }>;
76
80
  /**
77
- * Create Itinerary
78
- * Creates an itinerary
81
+ * Create an Itinerary
82
+ * Creates a new itinerary
79
83
  * @param requestBody
80
- * @returns DTOItineraryRead OK
84
+ * @returns DTOItineraryRead When a itinerary is created
81
85
  * @throws ApiError
82
86
  */
83
87
  itineraryCreate(requestBody: DTOItineraryCreate): CancelablePromise<DTOItineraryRead>;
@@ -85,35 +89,35 @@ export declare class ItineraryService {
85
89
  * Get Itinerary
86
90
  * Get itinerary via ID
87
91
  * @param itineraryId Itinerary id
88
- * @returns DTOItineraryRead OK
92
+ * @returns any OK
89
93
  * @throws ApiError
90
94
  */
91
- itineraryGet(itineraryId: string): CancelablePromise<DTOItineraryRead>;
95
+ itineraryGet(itineraryId: string): CancelablePromise<any>;
92
96
  /**
93
- * Update Itinerary
97
+ * Update Itinerary as New Revision
94
98
  * Updates an itinerary as a new revision
95
99
  * @param itineraryId Itinerary id
96
100
  * @param requestBody
97
- * @returns DTOItineraryRead OK
101
+ * @returns DTOItineraryRead When a new revision is created successfully
98
102
  * @throws ApiError
99
103
  */
100
- itineraryUpdate(itineraryId: string, requestBody: DTOItineraryUpdate): CancelablePromise<DTOItineraryRead>;
104
+ itineraryUpdateAsNewRevision(itineraryId: string, requestBody: DTOItineraryUpdate): CancelablePromise<DTOItineraryRead>;
101
105
  /**
102
- * Delete Itinerary
103
- * Delete itinerary via ID
106
+ * Delete Itinerary via ID
107
+ * Deletes a specific itinerary given its Id
104
108
  * @param itineraryId Itinerary id
105
- * @returns any OK
109
+ * @returns void
106
110
  * @throws ApiError
107
111
  */
108
- itineraryDelete(itineraryId: string): CancelablePromise<any>;
112
+ itineraryDelete(itineraryId: string): CancelablePromise<void>;
109
113
  /**
110
114
  * Sync Itinerary
111
115
  * Sync an itinerary with swoop
112
116
  * @param itineraryId Itinerary id
113
- * @returns DTOItineraryRead OK
117
+ * @returns DTOItineraryRead When an itinerary has been posted to pub/sub successfully
114
118
  * @throws ApiError
115
119
  */
116
- sync(itineraryId: string): CancelablePromise<DTOItineraryRead>;
120
+ syncItinerary(itineraryId: string): CancelablePromise<DTOItineraryRead>;
117
121
  /**
118
122
  * List Regions
119
123
  * List all regions
@@ -124,8 +128,8 @@ export declare class ItineraryService {
124
128
  * @throws ApiError
125
129
  */
126
130
  regionList(page?: number, limit?: number, sort?: any[]): CancelablePromise<{
127
- data: Array<DTORegionRead>;
128
- pagination: Pagination;
131
+ data?: Array<DTORegionRead>;
132
+ pagination?: Pagination;
129
133
  }>;
130
134
  /**
131
135
  * Create Region
@@ -1,11 +1,35 @@
1
1
  import { OpenAPI } from '../core/OpenAPI';
2
2
  import { request as __request } from '../core/request';
3
3
  export class ItineraryService {
4
+ /**
5
+ * Audit a Copy to Clipboard
6
+ * Audits when a user copies something to their clipboard
7
+ * @param itineraryId Itinerary id
8
+ * @param content Base64 encoding of the copied content
9
+ * @returns void
10
+ * @throws ApiError
11
+ */
12
+ auditCopyClipboard(itineraryId, content) {
13
+ return __request(OpenAPI, {
14
+ method: 'POST',
15
+ url: '/audit/copyClipboard/{itineraryId}',
16
+ path: {
17
+ 'itineraryId': itineraryId,
18
+ },
19
+ query: {
20
+ 'content': content,
21
+ },
22
+ errors: {
23
+ 400: `When the content query b64 string is invalid`,
24
+ 401: `Unauthorized - Missing or invalid Authorization header`,
25
+ },
26
+ });
27
+ }
4
28
  /**
5
29
  * Create a Snapshot
6
30
  * Creates a new snapshot. A snapshot is a reference to a specific itinerary revision group id.
7
31
  * @param requestBody
8
- * @returns DTOSnapshotRead OK
32
+ * @returns DTOSnapshotRead When a snapshot is created
9
33
  * @throws ApiError
10
34
  */
11
35
  snapshotCreate(requestBody) {
@@ -14,19 +38,24 @@ export class ItineraryService {
14
38
  url: '/snapshots',
15
39
  body: requestBody,
16
40
  mediaType: 'application/json',
41
+ errors: {
42
+ 400: `If the payload is malformed`,
43
+ 401: `Unauthorized - Missing or invalid Authorization header`,
44
+ 500: `When an internal server error occurs when creating a snapshot entity`,
45
+ 503: `Service Unavailable - The server is temporarily unable to handle the request`,
46
+ },
17
47
  });
18
48
  }
19
49
  /**
20
50
  * List Snapshots
21
51
  * List all available snapshots
22
- * @param enquiryId Enquiry Id
23
52
  * @param page Pagination, starting at page 1
24
53
  * @param limit Number of items per page
25
54
  * @param sort List of fields to sort by
26
- * @returns any OK
55
+ * @returns any The list of all snapshots given the parameters used
27
56
  * @throws ApiError
28
57
  */
29
- snapshotList(enquiryId, page, limit, sort) {
58
+ snapshotList(page, limit, sort) {
30
59
  return __request(OpenAPI, {
31
60
  method: 'GET',
32
61
  url: '/snapshots',
@@ -34,13 +63,18 @@ export class ItineraryService {
34
63
  'page': page,
35
64
  'limit': limit,
36
65
  'sort': sort,
37
- 'enquiryId': enquiryId,
66
+ },
67
+ errors: {
68
+ 400: `If the filter options or query parameters contain invalid values`,
69
+ 401: `Unauthorized - Missing or invalid Authorization header`,
70
+ 500: `When an internal server error occurs when listing all related snapshots`,
71
+ 503: `Service Unavailable - The server is temporarily unable to handle the request`,
38
72
  },
39
73
  });
40
74
  }
41
75
  /**
42
76
  * Get Snapshot va ID
43
- * Returns the specific snapshot
77
+ * Returns the specific snapshot given its Id
44
78
  * @param snapshotId
45
79
  * @returns any OK
46
80
  * @throws ApiError
@@ -52,13 +86,18 @@ export class ItineraryService {
52
86
  path: {
53
87
  'snapshotId': snapshotId,
54
88
  },
89
+ errors: {
90
+ 401: `Unauthorized - Missing or invalid Authorization header`,
91
+ 404: `If the snapshot does not exist`,
92
+ 503: `Service Unavailable - The server is temporarily unable to handle the request`,
93
+ },
55
94
  });
56
95
  }
57
96
  /**
58
97
  * Delete Snapshot via ID
59
- * Deletes a specific snapshot
98
+ * Deletes a specific snapshot given its Id
60
99
  * @param snapshotId
61
- * @returns any OK
100
+ * @returns void
62
101
  * @throws ApiError
63
102
  */
64
103
  snapshotDelete(snapshotId) {
@@ -68,13 +107,19 @@ export class ItineraryService {
68
107
  path: {
69
108
  'snapshotId': snapshotId,
70
109
  },
110
+ errors: {
111
+ 400: `When the snapshot doesn't exist in the first place, or when a before hook fails before deleting the item`,
112
+ 401: `Unauthorized - Missing or invalid Authorization header`,
113
+ 500: `When the snapshot fails to delete due to an internal server error`,
114
+ 503: `Service Unavailable - The server is temporarily unable to handle the request`,
115
+ },
71
116
  });
72
117
  }
73
118
  /**
74
119
  * Restore Snapshot
75
120
  * Creates a new itinerary revision given the content the snapshot refers to
76
121
  * @param snapshotId
77
- * @returns any OK
122
+ * @returns any When a snapshot is restored as the latest version
78
123
  * @throws ApiError
79
124
  */
80
125
  snapshotRestore(snapshotId) {
@@ -84,6 +129,13 @@ export class ItineraryService {
84
129
  path: {
85
130
  'snapshotId': snapshotId,
86
131
  },
132
+ errors: {
133
+ 400: `If the payload is malformed`,
134
+ 401: `Unauthorized - Missing or invalid Authorization header`,
135
+ 404: `If the snapshot or itinerary to restore to does not exist`,
136
+ 500: `When the snapshot fails to restore due to an internal server error`,
137
+ 503: `Service Unavailable - The server is temporarily unable to handle the request`,
138
+ },
87
139
  });
88
140
  }
89
141
  /**
@@ -94,7 +146,7 @@ export class ItineraryService {
94
146
  * @param search Search term
95
147
  * @param sort List of fields to sort by
96
148
  * @param enquiryId Filter itineraries via enquiryId
97
- * @returns any OK
149
+ * @returns any The list of all itineraries given the parameters used
98
150
  * @throws ApiError
99
151
  */
100
152
  itineraryList(page, limit, search, sort, enquiryId) {
@@ -108,13 +160,19 @@ export class ItineraryService {
108
160
  'sort': sort,
109
161
  'enquiryId': enquiryId,
110
162
  },
163
+ errors: {
164
+ 400: `If the filter options or query parameters contain invalid values`,
165
+ 401: `Unauthorized - Missing or invalid Authorization header`,
166
+ 500: `When an internal server error occurs when listing all related itineraries`,
167
+ 503: `Service Unavailable - The server is temporarily unable to handle the request`,
168
+ },
111
169
  });
112
170
  }
113
171
  /**
114
- * Create Itinerary
115
- * Creates an itinerary
172
+ * Create an Itinerary
173
+ * Creates a new itinerary
116
174
  * @param requestBody
117
- * @returns DTOItineraryRead OK
175
+ * @returns DTOItineraryRead When a itinerary is created
118
176
  * @throws ApiError
119
177
  */
120
178
  itineraryCreate(requestBody) {
@@ -123,13 +181,19 @@ export class ItineraryService {
123
181
  url: '/itineraries',
124
182
  body: requestBody,
125
183
  mediaType: 'application/json',
184
+ errors: {
185
+ 400: `If the payload is malformed`,
186
+ 401: `Unauthorized - Missing or invalid Authorization header`,
187
+ 500: `When an internal server error occurs when creating a itinerary entity`,
188
+ 503: `Service Unavailable - The server is temporarily unable to handle the request`,
189
+ },
126
190
  });
127
191
  }
128
192
  /**
129
193
  * Get Itinerary
130
194
  * Get itinerary via ID
131
195
  * @param itineraryId Itinerary id
132
- * @returns DTOItineraryRead OK
196
+ * @returns any OK
133
197
  * @throws ApiError
134
198
  */
135
199
  itineraryGet(itineraryId) {
@@ -139,17 +203,22 @@ export class ItineraryService {
139
203
  path: {
140
204
  'itineraryId': itineraryId,
141
205
  },
206
+ errors: {
207
+ 401: `Unauthorized - Missing or invalid Authorization header`,
208
+ 404: `If the itinerary does not exist`,
209
+ 503: `Service Unavailable - The server is temporarily unable to handle the request`,
210
+ },
142
211
  });
143
212
  }
144
213
  /**
145
- * Update Itinerary
214
+ * Update Itinerary as New Revision
146
215
  * Updates an itinerary as a new revision
147
216
  * @param itineraryId Itinerary id
148
217
  * @param requestBody
149
- * @returns DTOItineraryRead OK
218
+ * @returns DTOItineraryRead When a new revision is created successfully
150
219
  * @throws ApiError
151
220
  */
152
- itineraryUpdate(itineraryId, requestBody) {
221
+ itineraryUpdateAsNewRevision(itineraryId, requestBody) {
153
222
  return __request(OpenAPI, {
154
223
  method: 'PATCH',
155
224
  url: '/itineraries/{itineraryId}',
@@ -158,13 +227,20 @@ export class ItineraryService {
158
227
  },
159
228
  body: requestBody,
160
229
  mediaType: 'application/json',
230
+ errors: {
231
+ 400: `If the payload is malformed`,
232
+ 401: `Unauthorized - Missing or invalid Authorization header`,
233
+ 404: `When the itinerary id to create a new revision from is not found`,
234
+ 500: `When an internal server error occurs updating an itinerary as a new revision`,
235
+ 503: `Service Unavailable - The server is temporarily unable to handle the request`,
236
+ },
161
237
  });
162
238
  }
163
239
  /**
164
- * Delete Itinerary
165
- * Delete itinerary via ID
240
+ * Delete Itinerary via ID
241
+ * Deletes a specific itinerary given its Id
166
242
  * @param itineraryId Itinerary id
167
- * @returns any OK
243
+ * @returns void
168
244
  * @throws ApiError
169
245
  */
170
246
  itineraryDelete(itineraryId) {
@@ -174,22 +250,35 @@ export class ItineraryService {
174
250
  path: {
175
251
  'itineraryId': itineraryId,
176
252
  },
253
+ errors: {
254
+ 400: `When the itinerary doesn't exist in the first place, or when a before hook fails before deleting the item`,
255
+ 401: `Unauthorized - Missing or invalid Authorization header`,
256
+ 500: `When the itinerary fails to delete due to an internal server error`,
257
+ 503: `Service Unavailable - The server is temporarily unable to handle the request`,
258
+ },
177
259
  });
178
260
  }
179
261
  /**
180
262
  * Sync Itinerary
181
263
  * Sync an itinerary with swoop
182
264
  * @param itineraryId Itinerary id
183
- * @returns DTOItineraryRead OK
265
+ * @returns DTOItineraryRead When an itinerary has been posted to pub/sub successfully
184
266
  * @throws ApiError
185
267
  */
186
- sync(itineraryId) {
268
+ syncItinerary(itineraryId) {
187
269
  return __request(OpenAPI, {
188
270
  method: 'POST',
189
271
  url: '/sync/{itineraryId}',
190
272
  path: {
191
273
  'itineraryId': itineraryId,
192
274
  },
275
+ errors: {
276
+ 400: `When the itinerary to sync does not exist`,
277
+ 401: `Unauthorized - Missing or invalid Authorization header`,
278
+ 404: `Related entity not found`,
279
+ 500: `When an internal server error occurs whilst syncing`,
280
+ 503: `Service Unavailable - The server is temporarily unable to handle the request`,
281
+ },
193
282
  });
194
283
  }
195
284
  /**
@@ -210,6 +299,12 @@ export class ItineraryService {
210
299
  'limit': limit,
211
300
  'sort': sort,
212
301
  },
302
+ errors: {
303
+ 400: `If the filter options or query parameters contain invalid values`,
304
+ 401: `Unauthorized - Missing or invalid Authorization header`,
305
+ 500: `When an internal server error occurs when listing all related regions`,
306
+ 503: `Service Unavailable - The server is temporarily unable to handle the request`,
307
+ },
213
308
  });
214
309
  }
215
310
  /**
@@ -225,6 +320,12 @@ export class ItineraryService {
225
320
  url: '/regions',
226
321
  body: requestBody,
227
322
  mediaType: 'application/json',
323
+ errors: {
324
+ 400: `If the payload is malformed`,
325
+ 401: `Unauthorized - Missing or invalid Authorization header`,
326
+ 500: `When an internal server error occurs when creating a region entity`,
327
+ 503: `Service Unavailable - The server is temporarily unable to handle the request`,
328
+ },
228
329
  });
229
330
  }
230
331
  }
@@ -0,0 +1,27 @@
1
+ import type { DTORegionCreate } from '../models/DTORegionCreate';
2
+ import type { DTORegionRead } from '../models/DTORegionRead';
3
+ import type { Pagination } from '../models/Pagination';
4
+ import type { CancelablePromise } from '../core/CancelablePromise';
5
+ export declare class RegionService {
6
+ /**
7
+ * List Regions
8
+ * List all regions
9
+ * @param page Pagination, starting at page 1
10
+ * @param limit Number of items per page
11
+ * @param sort List of fields to sort by
12
+ * @returns any OK
13
+ * @throws ApiError
14
+ */
15
+ static regionList(page?: number, limit?: number, sort?: any[]): CancelablePromise<{
16
+ data?: Array<DTORegionRead>;
17
+ pagination?: Pagination;
18
+ }>;
19
+ /**
20
+ * Create Region
21
+ * Create a region
22
+ * @param requestBody
23
+ * @returns DTORegionRead OK
24
+ * @throws ApiError
25
+ */
26
+ static regionCreate(requestBody?: DTORegionCreate): CancelablePromise<DTORegionRead>;
27
+ }
@@ -0,0 +1,51 @@
1
+ import { OpenAPI } from '../core/OpenAPI';
2
+ import { request as __request } from '../core/request';
3
+ export class RegionService {
4
+ /**
5
+ * List Regions
6
+ * List all regions
7
+ * @param page Pagination, starting at page 1
8
+ * @param limit Number of items per page
9
+ * @param sort List of fields to sort by
10
+ * @returns any OK
11
+ * @throws ApiError
12
+ */
13
+ static regionList(page, limit, sort) {
14
+ return __request(OpenAPI, {
15
+ method: 'GET',
16
+ url: '/regions',
17
+ query: {
18
+ 'page': page,
19
+ 'limit': limit,
20
+ 'sort': sort,
21
+ },
22
+ errors: {
23
+ 400: `If the filter options or query parameters contain invalid values`,
24
+ 401: `Unauthorized - Missing or invalid Authorization header`,
25
+ 500: `When an internal server error occurs when listing all related regions`,
26
+ 503: `Service Unavailable - The server is temporarily unable to handle the request`,
27
+ },
28
+ });
29
+ }
30
+ /**
31
+ * Create Region
32
+ * Create a region
33
+ * @param requestBody
34
+ * @returns DTORegionRead OK
35
+ * @throws ApiError
36
+ */
37
+ static regionCreate(requestBody) {
38
+ return __request(OpenAPI, {
39
+ method: 'POST',
40
+ url: '/regions',
41
+ body: requestBody,
42
+ mediaType: 'application/json',
43
+ errors: {
44
+ 400: `If the payload is malformed`,
45
+ 401: `Unauthorized - Missing or invalid Authorization header`,
46
+ 500: `When an internal server error occurs when creating a region entity`,
47
+ 503: `Service Unavailable - The server is temporarily unable to handle the request`,
48
+ },
49
+ });
50
+ }
51
+ }
@@ -0,0 +1,51 @@
1
+ import type { DTOSnapshotCreate } from '../models/DTOSnapshotCreate';
2
+ import type { DTOSnapshotRead } from '../models/DTOSnapshotRead';
3
+ import type { Pagination } from '../models/Pagination';
4
+ import type { CancelablePromise } from '../core/CancelablePromise';
5
+ export declare class SnapshotService {
6
+ /**
7
+ * Create a Snapshot
8
+ * Creates a new snapshot. A snapshot is a reference to a specific itinerary revision group id.
9
+ * @param requestBody
10
+ * @returns DTOSnapshotRead When a snapshot is created
11
+ * @throws ApiError
12
+ */
13
+ static snapshotCreate(requestBody: DTOSnapshotCreate): CancelablePromise<DTOSnapshotRead>;
14
+ /**
15
+ * List Snapshots
16
+ * List all available snapshots
17
+ * @param page Pagination, starting at page 1
18
+ * @param limit Number of items per page
19
+ * @param sort List of fields to sort by
20
+ * @returns any The list of all snapshots given the parameters used
21
+ * @throws ApiError
22
+ */
23
+ static snapshotList(page?: number, limit?: number, sort?: any[]): CancelablePromise<{
24
+ data?: Array<DTOSnapshotRead>;
25
+ pagination?: Pagination;
26
+ }>;
27
+ /**
28
+ * Get Snapshot va ID
29
+ * Returns the specific snapshot given its Id
30
+ * @param snapshotId
31
+ * @returns any OK
32
+ * @throws ApiError
33
+ */
34
+ static snapshotGet(snapshotId: string): CancelablePromise<any>;
35
+ /**
36
+ * Delete Snapshot via ID
37
+ * Deletes a specific snapshot given its Id
38
+ * @param snapshotId
39
+ * @returns void
40
+ * @throws ApiError
41
+ */
42
+ static snapshotDelete(snapshotId: string): CancelablePromise<void>;
43
+ /**
44
+ * Restore Snapshot
45
+ * Creates a new itinerary revision given the content the snapshot refers to
46
+ * @param snapshotId
47
+ * @returns any When a snapshot is restored as the latest version
48
+ * @throws ApiError
49
+ */
50
+ static snapshotRestore(snapshotId: string): CancelablePromise<any>;
51
+ }