swoop-common 2.2.217 → 2.2.219

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 (34) hide show
  1. package/dist/api/generated/core/exports.d.ts +7 -0
  2. package/dist/api/generated/core/index.d.ts +8 -0
  3. package/dist/api/generated/core/index.js +1 -0
  4. package/dist/api/generated/core/models/DTOFavouriteCreate.d.ts +8 -0
  5. package/dist/api/generated/core/models/DTOFavouriteCreate.js +1 -0
  6. package/dist/api/generated/core/models/DTOFavouriteEntity.d.ts +12 -0
  7. package/dist/api/generated/core/models/DTOFavouriteEntity.js +1 -0
  8. package/dist/api/generated/core/models/DTOFavouriteRead.d.ts +12 -0
  9. package/dist/api/generated/core/models/DTOFavouriteRead.js +1 -0
  10. package/dist/api/generated/core/models/DTOFavouriteUpdate.d.ts +8 -0
  11. package/dist/api/generated/core/models/DTOFavouriteUpdate.js +1 -0
  12. package/dist/api/generated/core/models/FavouriteComponentRef.d.ts +10 -0
  13. package/dist/api/generated/core/models/FavouriteComponentRef.js +1 -0
  14. package/dist/api/generated/core/models/FavouriteId.d.ts +1 -0
  15. package/dist/api/generated/core/models/FavouriteId.js +1 -0
  16. package/dist/api/generated/core/models/FavouriteIdPathParam.d.ts +2 -0
  17. package/dist/api/generated/core/models/FavouriteIdPathParam.js +1 -0
  18. package/dist/api/generated/core/services/CoreService.d.ts +60 -0
  19. package/dist/api/generated/core/services/CoreService.js +134 -0
  20. package/dist/api/generated/core/services/FavouriteService.d.ts +64 -0
  21. package/dist/api/generated/core/services/FavouriteService.js +138 -0
  22. package/dist/api/generated/swoop/exports.d.ts +4 -0
  23. package/dist/api/generated/swoop/index.d.ts +4 -0
  24. package/dist/api/generated/swoop/models/MediaAsset.d.ts +13 -0
  25. package/dist/api/generated/swoop/models/MediaAsset.js +1 -0
  26. package/dist/api/generated/swoop/models/MediaAsset_jsonld.d.ts +13 -0
  27. package/dist/api/generated/swoop/models/MediaAsset_jsonld.js +1 -0
  28. package/dist/api/generated/swoop/models/MediaTag.d.ts +6 -0
  29. package/dist/api/generated/swoop/models/MediaTag.js +1 -0
  30. package/dist/api/generated/swoop/models/MediaTag_jsonld.d.ts +6 -0
  31. package/dist/api/generated/swoop/models/MediaTag_jsonld.js +1 -0
  32. package/dist/api/generated/swoop/services/SwoopService.d.ts +24 -0
  33. package/dist/api/generated/swoop/services/SwoopService.js +40 -0
  34. package/package.json +1 -1
@@ -41,6 +41,10 @@ export type { DTOComponentCreate } from './index';
41
41
  export type { DTOComponentEntity } from './index';
42
42
  export type { DTOComponentRead } from './index';
43
43
  export type { DTOComponentUpdate } from './index';
44
+ export type { DTOFavouriteCreate } from './index';
45
+ export type { DTOFavouriteEntity } from './index';
46
+ export type { DTOFavouriteRead } from './index';
47
+ export type { DTOFavouriteUpdate } from './index';
44
48
  export type { DTOItineraryCreate } from './index';
45
49
  export type { DTOItineraryEntity } from './index';
46
50
  export type { DTOItineraryRead } from './index';
@@ -71,6 +75,9 @@ export type { EnquiryIdPathParam } from './index';
71
75
  export type { EnquiryIdQueryParam } from './index';
72
76
  export type { ExcludeTemplateIdsQueryParam } from './index';
73
77
  export type { ExpandedMap } from './index';
78
+ export type { FavouriteComponentRef } from './index';
79
+ export type { FavouriteId } from './index';
80
+ export type { FavouriteIdPathParam } from './index';
74
81
  export type { Field } from './index';
75
82
  export type { Flag } from './index';
76
83
  export { InfoNote } from './index';
@@ -41,6 +41,10 @@ export type { DTOComponentCreate } from './models/DTOComponentCreate';
41
41
  export type { DTOComponentEntity } from './models/DTOComponentEntity';
42
42
  export type { DTOComponentRead } from './models/DTOComponentRead';
43
43
  export type { DTOComponentUpdate } from './models/DTOComponentUpdate';
44
+ export type { DTOFavouriteCreate } from './models/DTOFavouriteCreate';
45
+ export type { DTOFavouriteEntity } from './models/DTOFavouriteEntity';
46
+ export type { DTOFavouriteRead } from './models/DTOFavouriteRead';
47
+ export type { DTOFavouriteUpdate } from './models/DTOFavouriteUpdate';
44
48
  export type { DTOItineraryCreate } from './models/DTOItineraryCreate';
45
49
  export type { DTOItineraryEntity } from './models/DTOItineraryEntity';
46
50
  export type { DTOItineraryRead } from './models/DTOItineraryRead';
@@ -71,6 +75,9 @@ export type { EnquiryIdPathParam } from './models/EnquiryIdPathParam';
71
75
  export type { EnquiryIdQueryParam } from './models/EnquiryIdQueryParam';
72
76
  export type { ExcludeTemplateIdsQueryParam } from './models/ExcludeTemplateIdsQueryParam';
73
77
  export type { ExpandedMap } from './models/ExpandedMap';
78
+ export type { FavouriteComponentRef } from './models/FavouriteComponentRef';
79
+ export type { FavouriteId } from './models/FavouriteId';
80
+ export type { FavouriteIdPathParam } from './models/FavouriteIdPathParam';
74
81
  export type { Field } from './models/Field';
75
82
  export type { Flag } from './models/Flag';
76
83
  export { InfoNote } from './models/InfoNote';
@@ -134,6 +141,7 @@ export type { ValidationSchemas } from './models/ValidationSchemas';
134
141
  export type { VersionPathParam } from './models/VersionPathParam';
135
142
  export { ComponentService } from './services/ComponentService';
136
143
  export { CoreService } from './services/CoreService';
144
+ export { FavouriteService } from './services/FavouriteService';
137
145
  export { ItineraryService } from './services/ItineraryService';
138
146
  export { PublicService } from './services/PublicService';
139
147
  export { RegionService } from './services/RegionService';
@@ -18,6 +18,7 @@ export { OrgId } from './models/OrgId';
18
18
  export { UrgencyCTA } from './models/UrgencyCTA';
19
19
  export { ComponentService } from './services/ComponentService';
20
20
  export { CoreService } from './services/CoreService';
21
+ export { FavouriteService } from './services/FavouriteService';
21
22
  export { ItineraryService } from './services/ItineraryService';
22
23
  export { PublicService } from './services/PublicService';
23
24
  export { RegionService } from './services/RegionService';
@@ -0,0 +1,8 @@
1
+ import type { FavouriteComponentRef } from './FavouriteComponentRef';
2
+ import type { Title } from './Title';
3
+ export type DTOFavouriteCreate = {
4
+ title: Title;
5
+ description: string;
6
+ tags: Array<string>;
7
+ components: Array<FavouriteComponentRef>;
8
+ };
@@ -0,0 +1,12 @@
1
+ import type { FavouriteComponentRef } from './FavouriteComponentRef';
2
+ import type { FavouriteId } from './FavouriteId';
3
+ import type { Metadata } from './Metadata';
4
+ import type { Title } from './Title';
5
+ export type DTOFavouriteEntity = {
6
+ id: FavouriteId;
7
+ metadata: Metadata;
8
+ title: Title;
9
+ description: string;
10
+ tags: Array<string>;
11
+ components: Array<FavouriteComponentRef>;
12
+ };
@@ -0,0 +1,12 @@
1
+ import type { FavouriteComponentRef } from './FavouriteComponentRef';
2
+ import type { FavouriteId } from './FavouriteId';
3
+ import type { Metadata } from './Metadata';
4
+ import type { Title } from './Title';
5
+ export type DTOFavouriteRead = {
6
+ id: FavouriteId;
7
+ metadata: Metadata;
8
+ title: Title;
9
+ description: string;
10
+ tags: Array<string>;
11
+ components: Array<FavouriteComponentRef>;
12
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,8 @@
1
+ import type { FavouriteComponentRef } from './FavouriteComponentRef';
2
+ import type { Title } from './Title';
3
+ export type DTOFavouriteUpdate = {
4
+ title?: Title;
5
+ description?: string;
6
+ tags?: Array<string>;
7
+ components?: Array<FavouriteComponentRef>;
8
+ };
@@ -0,0 +1,10 @@
1
+ import type { ComponentId } from './ComponentId';
2
+ import type { TemplateId } from './TemplateId';
3
+ export type FavouriteComponentRef = {
4
+ componentId: ComponentId;
5
+ templateId: TemplateId;
6
+ partnerId: string;
7
+ dayOffset: number;
8
+ duration: number;
9
+ sortOrder: number;
10
+ };
@@ -0,0 +1 @@
1
+ export type FavouriteId = string;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,2 @@
1
+ import type { FavouriteId } from './FavouriteId';
2
+ export type FavouriteIdPathParam = FavouriteId;
@@ -11,6 +11,9 @@ import type { DTOBranchRead } from '../models/DTOBranchRead';
11
11
  import type { DTOComponentCreate } from '../models/DTOComponentCreate';
12
12
  import type { DTOComponentRead } from '../models/DTOComponentRead';
13
13
  import type { DTOComponentUpdate } from '../models/DTOComponentUpdate';
14
+ import type { DTOFavouriteCreate } from '../models/DTOFavouriteCreate';
15
+ import type { DTOFavouriteRead } from '../models/DTOFavouriteRead';
16
+ import type { DTOFavouriteUpdate } from '../models/DTOFavouriteUpdate';
14
17
  import type { DTOItineraryCreate } from '../models/DTOItineraryCreate';
15
18
  import type { DTOItineraryRead } from '../models/DTOItineraryRead';
16
19
  import type { DTOItineraryUpdate } from '../models/DTOItineraryUpdate';
@@ -25,6 +28,7 @@ import type { DTOTemplateUpdate } from '../models/DTOTemplateUpdate';
25
28
  import type { DTOTripComparisonCreate } from '../models/DTOTripComparisonCreate';
26
29
  import type { DTOTripComparisonRead } from '../models/DTOTripComparisonRead';
27
30
  import type { DTOTripComparisonUpdate } from '../models/DTOTripComparisonUpdate';
31
+ import type { FavouriteId } from '../models/FavouriteId';
28
32
  import type { InternalSwoopId } from '../models/InternalSwoopId';
29
33
  import type { ItineraryCreateResponse } from '../models/ItineraryCreateResponse';
30
34
  import type { Pagination } from '../models/Pagination';
@@ -113,6 +117,62 @@ export declare class CoreService {
113
117
  snapshot?: DTOSnapshotRead;
114
118
  itinerary?: DTOItineraryRead;
115
119
  }>;
120
+ /**
121
+ * Create a Favourite
122
+ * Creates a new favourite itinerary template. A favourite stores component references with relative day offsets so it can be re-applied to any enquiry.
123
+ * @param requestBody
124
+ * @returns DTOFavouriteRead When the favourite is created
125
+ * @throws ApiError
126
+ */
127
+ favouriteCreate(requestBody: DTOFavouriteCreate): CancelablePromise<DTOFavouriteRead>;
128
+ /**
129
+ * List Favourites
130
+ * Get a paginated response of all favourites across the team
131
+ * @param page Pagination, starting at page 1
132
+ * @param limit Number of items per page
133
+ * @param order Order the sort query parameter values either by ascending or descending order
134
+ * @param sort List of fields to sort by, this requires the order query param
135
+ * @returns any Paginated response of favourites
136
+ * @throws ApiError
137
+ */
138
+ favouriteList(page?: number, limit?: number, order?: 'asc' | 'desc', sort?: Array<string>): CancelablePromise<{
139
+ pagination?: Pagination;
140
+ data?: Array<DTOFavouriteRead>;
141
+ }>;
142
+ /**
143
+ * List Favourite Tags
144
+ * Returns the distinct set of tags in use across all favourites
145
+ * @returns any Distinct list of tags
146
+ * @throws ApiError
147
+ */
148
+ favouriteTagsList(): CancelablePromise<{
149
+ data?: Array<string>;
150
+ }>;
151
+ /**
152
+ * Get Favourite via ID
153
+ * Returns the specific favourite given its Id
154
+ * @param favouriteId
155
+ * @returns DTOFavouriteRead The favourite entity
156
+ * @throws ApiError
157
+ */
158
+ favouriteGet(favouriteId: FavouriteId): CancelablePromise<DTOFavouriteRead>;
159
+ /**
160
+ * Update Favourite
161
+ * Updates a favourite. Only the user who created the favourite can update it.
162
+ * @param favouriteId
163
+ * @param requestBody
164
+ * @returns DTOFavouriteRead When the favourite is updated successfully
165
+ * @throws ApiError
166
+ */
167
+ favouriteUpdate(favouriteId: FavouriteId, requestBody: DTOFavouriteUpdate): CancelablePromise<DTOFavouriteRead>;
168
+ /**
169
+ * Delete Favourite via ID
170
+ * Deletes a specific favourite given its Id. Only the user who created the favourite can delete it.
171
+ * @param favouriteId
172
+ * @returns void
173
+ * @throws ApiError
174
+ */
175
+ favouriteDelete(favouriteId: FavouriteId): CancelablePromise<void>;
116
176
  /**
117
177
  * List Tree view of Itineraries
118
178
  * List all itineraries in a tree view for a specific enquiry id
@@ -200,6 +200,140 @@ export class CoreService {
200
200
  },
201
201
  });
202
202
  }
203
+ /**
204
+ * Create a Favourite
205
+ * Creates a new favourite itinerary template. A favourite stores component references with relative day offsets so it can be re-applied to any enquiry.
206
+ * @param requestBody
207
+ * @returns DTOFavouriteRead When the favourite is created
208
+ * @throws ApiError
209
+ */
210
+ favouriteCreate(requestBody) {
211
+ return __request(OpenAPI, {
212
+ method: 'POST',
213
+ url: '/favourite',
214
+ body: requestBody,
215
+ mediaType: 'application/json',
216
+ errors: {
217
+ 400: `If the payload is malformed`,
218
+ 401: `When the client is not authorised`,
219
+ 500: `When an unexpected error occurs`,
220
+ },
221
+ });
222
+ }
223
+ /**
224
+ * List Favourites
225
+ * Get a paginated response of all favourites across the team
226
+ * @param page Pagination, starting at page 1
227
+ * @param limit Number of items per page
228
+ * @param order Order the sort query parameter values either by ascending or descending order
229
+ * @param sort List of fields to sort by, this requires the order query param
230
+ * @returns any Paginated response of favourites
231
+ * @throws ApiError
232
+ */
233
+ favouriteList(page, limit, order, sort) {
234
+ return __request(OpenAPI, {
235
+ method: 'GET',
236
+ url: '/favourite',
237
+ query: {
238
+ 'page': page,
239
+ 'limit': limit,
240
+ 'order': order,
241
+ 'sort': sort,
242
+ },
243
+ errors: {
244
+ 400: `If the payload is malformed`,
245
+ 401: `When the client is not authorised`,
246
+ 500: `When an unexpected error occurs`,
247
+ },
248
+ });
249
+ }
250
+ /**
251
+ * List Favourite Tags
252
+ * Returns the distinct set of tags in use across all favourites
253
+ * @returns any Distinct list of tags
254
+ * @throws ApiError
255
+ */
256
+ favouriteTagsList() {
257
+ return __request(OpenAPI, {
258
+ method: 'GET',
259
+ url: '/favourite/tags',
260
+ errors: {
261
+ 401: `When the client is not authorised`,
262
+ 500: `When an unexpected error occurs`,
263
+ },
264
+ });
265
+ }
266
+ /**
267
+ * Get Favourite via ID
268
+ * Returns the specific favourite given its Id
269
+ * @param favouriteId
270
+ * @returns DTOFavouriteRead The favourite entity
271
+ * @throws ApiError
272
+ */
273
+ favouriteGet(favouriteId) {
274
+ return __request(OpenAPI, {
275
+ method: 'GET',
276
+ url: '/favourite/{favouriteId}',
277
+ path: {
278
+ 'favouriteId': favouriteId,
279
+ },
280
+ errors: {
281
+ 400: `If the payload is malformed`,
282
+ 401: `When the client is not authorised`,
283
+ 404: `If a resource does not exist`,
284
+ 500: `When an unexpected error occurs`,
285
+ },
286
+ });
287
+ }
288
+ /**
289
+ * Update Favourite
290
+ * Updates a favourite. Only the user who created the favourite can update it.
291
+ * @param favouriteId
292
+ * @param requestBody
293
+ * @returns DTOFavouriteRead When the favourite is updated successfully
294
+ * @throws ApiError
295
+ */
296
+ favouriteUpdate(favouriteId, requestBody) {
297
+ return __request(OpenAPI, {
298
+ method: 'PATCH',
299
+ url: '/favourite/{favouriteId}',
300
+ path: {
301
+ 'favouriteId': favouriteId,
302
+ },
303
+ body: requestBody,
304
+ mediaType: 'application/json',
305
+ errors: {
306
+ 400: `If the payload is malformed`,
307
+ 401: `When the client is not authorised`,
308
+ 403: `When the client is not the owner of the favourite`,
309
+ 404: `If a resource does not exist`,
310
+ 500: `When an unexpected error occurs`,
311
+ },
312
+ });
313
+ }
314
+ /**
315
+ * Delete Favourite via ID
316
+ * Deletes a specific favourite given its Id. Only the user who created the favourite can delete it.
317
+ * @param favouriteId
318
+ * @returns void
319
+ * @throws ApiError
320
+ */
321
+ favouriteDelete(favouriteId) {
322
+ return __request(OpenAPI, {
323
+ method: 'DELETE',
324
+ url: '/favourite/{favouriteId}',
325
+ path: {
326
+ 'favouriteId': favouriteId,
327
+ },
328
+ errors: {
329
+ 400: `If the payload is malformed`,
330
+ 401: `When the client is not authorised`,
331
+ 403: `When the client is not the owner of the favourite`,
332
+ 404: `If a resource does not exist`,
333
+ 500: `When an unexpected error occurs`,
334
+ },
335
+ });
336
+ }
203
337
  /**
204
338
  * List Tree view of Itineraries
205
339
  * List all itineraries in a tree view for a specific enquiry id
@@ -0,0 +1,64 @@
1
+ import type { DTOFavouriteCreate } from '../models/DTOFavouriteCreate';
2
+ import type { DTOFavouriteRead } from '../models/DTOFavouriteRead';
3
+ import type { DTOFavouriteUpdate } from '../models/DTOFavouriteUpdate';
4
+ import type { FavouriteId } from '../models/FavouriteId';
5
+ import type { Pagination } from '../models/Pagination';
6
+ import type { CancelablePromise } from '../core/CancelablePromise';
7
+ export declare class FavouriteService {
8
+ /**
9
+ * Create a Favourite
10
+ * Creates a new favourite itinerary template. A favourite stores component references with relative day offsets so it can be re-applied to any enquiry.
11
+ * @param requestBody
12
+ * @returns DTOFavouriteRead When the favourite is created
13
+ * @throws ApiError
14
+ */
15
+ static favouriteCreate(requestBody: DTOFavouriteCreate): CancelablePromise<DTOFavouriteRead>;
16
+ /**
17
+ * List Favourites
18
+ * Get a paginated response of all favourites across the team
19
+ * @param page Pagination, starting at page 1
20
+ * @param limit Number of items per page
21
+ * @param order Order the sort query parameter values either by ascending or descending order
22
+ * @param sort List of fields to sort by, this requires the order query param
23
+ * @returns any Paginated response of favourites
24
+ * @throws ApiError
25
+ */
26
+ static favouriteList(page?: number, limit?: number, order?: 'asc' | 'desc', sort?: Array<string>): CancelablePromise<{
27
+ pagination?: Pagination;
28
+ data?: Array<DTOFavouriteRead>;
29
+ }>;
30
+ /**
31
+ * List Favourite Tags
32
+ * Returns the distinct set of tags in use across all favourites
33
+ * @returns any Distinct list of tags
34
+ * @throws ApiError
35
+ */
36
+ static favouriteTagsList(): CancelablePromise<{
37
+ data?: Array<string>;
38
+ }>;
39
+ /**
40
+ * Get Favourite via ID
41
+ * Returns the specific favourite given its Id
42
+ * @param favouriteId
43
+ * @returns DTOFavouriteRead The favourite entity
44
+ * @throws ApiError
45
+ */
46
+ static favouriteGet(favouriteId: FavouriteId): CancelablePromise<DTOFavouriteRead>;
47
+ /**
48
+ * Update Favourite
49
+ * Updates a favourite. Only the user who created the favourite can update it.
50
+ * @param favouriteId
51
+ * @param requestBody
52
+ * @returns DTOFavouriteRead When the favourite is updated successfully
53
+ * @throws ApiError
54
+ */
55
+ static favouriteUpdate(favouriteId: FavouriteId, requestBody: DTOFavouriteUpdate): CancelablePromise<DTOFavouriteRead>;
56
+ /**
57
+ * Delete Favourite via ID
58
+ * Deletes a specific favourite given its Id. Only the user who created the favourite can delete it.
59
+ * @param favouriteId
60
+ * @returns void
61
+ * @throws ApiError
62
+ */
63
+ static favouriteDelete(favouriteId: FavouriteId): CancelablePromise<void>;
64
+ }
@@ -0,0 +1,138 @@
1
+ import { OpenAPI } from '../core/OpenAPI';
2
+ import { request as __request } from '../core/request';
3
+ export class FavouriteService {
4
+ /**
5
+ * Create a Favourite
6
+ * Creates a new favourite itinerary template. A favourite stores component references with relative day offsets so it can be re-applied to any enquiry.
7
+ * @param requestBody
8
+ * @returns DTOFavouriteRead When the favourite is created
9
+ * @throws ApiError
10
+ */
11
+ static favouriteCreate(requestBody) {
12
+ return __request(OpenAPI, {
13
+ method: 'POST',
14
+ url: '/favourite',
15
+ body: requestBody,
16
+ mediaType: 'application/json',
17
+ errors: {
18
+ 400: `If the payload is malformed`,
19
+ 401: `When the client is not authorised`,
20
+ 500: `When an unexpected error occurs`,
21
+ },
22
+ });
23
+ }
24
+ /**
25
+ * List Favourites
26
+ * Get a paginated response of all favourites across the team
27
+ * @param page Pagination, starting at page 1
28
+ * @param limit Number of items per page
29
+ * @param order Order the sort query parameter values either by ascending or descending order
30
+ * @param sort List of fields to sort by, this requires the order query param
31
+ * @returns any Paginated response of favourites
32
+ * @throws ApiError
33
+ */
34
+ static favouriteList(page, limit, order, sort) {
35
+ return __request(OpenAPI, {
36
+ method: 'GET',
37
+ url: '/favourite',
38
+ query: {
39
+ 'page': page,
40
+ 'limit': limit,
41
+ 'order': order,
42
+ 'sort': sort,
43
+ },
44
+ errors: {
45
+ 400: `If the payload is malformed`,
46
+ 401: `When the client is not authorised`,
47
+ 500: `When an unexpected error occurs`,
48
+ },
49
+ });
50
+ }
51
+ /**
52
+ * List Favourite Tags
53
+ * Returns the distinct set of tags in use across all favourites
54
+ * @returns any Distinct list of tags
55
+ * @throws ApiError
56
+ */
57
+ static favouriteTagsList() {
58
+ return __request(OpenAPI, {
59
+ method: 'GET',
60
+ url: '/favourite/tags',
61
+ errors: {
62
+ 401: `When the client is not authorised`,
63
+ 500: `When an unexpected error occurs`,
64
+ },
65
+ });
66
+ }
67
+ /**
68
+ * Get Favourite via ID
69
+ * Returns the specific favourite given its Id
70
+ * @param favouriteId
71
+ * @returns DTOFavouriteRead The favourite entity
72
+ * @throws ApiError
73
+ */
74
+ static favouriteGet(favouriteId) {
75
+ return __request(OpenAPI, {
76
+ method: 'GET',
77
+ url: '/favourite/{favouriteId}',
78
+ path: {
79
+ 'favouriteId': favouriteId,
80
+ },
81
+ errors: {
82
+ 400: `If the payload is malformed`,
83
+ 401: `When the client is not authorised`,
84
+ 404: `If a resource does not exist`,
85
+ 500: `When an unexpected error occurs`,
86
+ },
87
+ });
88
+ }
89
+ /**
90
+ * Update Favourite
91
+ * Updates a favourite. Only the user who created the favourite can update it.
92
+ * @param favouriteId
93
+ * @param requestBody
94
+ * @returns DTOFavouriteRead When the favourite is updated successfully
95
+ * @throws ApiError
96
+ */
97
+ static favouriteUpdate(favouriteId, requestBody) {
98
+ return __request(OpenAPI, {
99
+ method: 'PATCH',
100
+ url: '/favourite/{favouriteId}',
101
+ path: {
102
+ 'favouriteId': favouriteId,
103
+ },
104
+ body: requestBody,
105
+ mediaType: 'application/json',
106
+ errors: {
107
+ 400: `If the payload is malformed`,
108
+ 401: `When the client is not authorised`,
109
+ 403: `When the client is not the owner of the favourite`,
110
+ 404: `If a resource does not exist`,
111
+ 500: `When an unexpected error occurs`,
112
+ },
113
+ });
114
+ }
115
+ /**
116
+ * Delete Favourite via ID
117
+ * Deletes a specific favourite given its Id. Only the user who created the favourite can delete it.
118
+ * @param favouriteId
119
+ * @returns void
120
+ * @throws ApiError
121
+ */
122
+ static favouriteDelete(favouriteId) {
123
+ return __request(OpenAPI, {
124
+ method: 'DELETE',
125
+ url: '/favourite/{favouriteId}',
126
+ path: {
127
+ 'favouriteId': favouriteId,
128
+ },
129
+ errors: {
130
+ 400: `If the payload is malformed`,
131
+ 401: `When the client is not authorised`,
132
+ 403: `When the client is not the owner of the favourite`,
133
+ 404: `If a resource does not exist`,
134
+ 500: `When an unexpected error occurs`,
135
+ },
136
+ });
137
+ }
138
+ }
@@ -56,6 +56,10 @@ export type { Itinerary_ItinerarySaveInputSwoop } from './index';
56
56
  export type { Itinerary_ItinerarySaveInput_jsonldSwoop } from './index';
57
57
  export type { Itinerary_ItinerarySaveOutputSwoop } from './index';
58
58
  export type { Itinerary_ItinerarySaveOutput_jsonldSwoop } from './index';
59
+ export type { MediaAssetSwoop } from './index';
60
+ export type { MediaAsset_jsonldSwoop } from './index';
61
+ export type { MediaTagSwoop } from './index';
62
+ export type { MediaTag_jsonldSwoop } from './index';
59
63
  export type { Note_jsonld_readSwoop } from './index';
60
64
  export type { Note_jsonld_write_createSwoop } from './index';
61
65
  export type { Note_jsonld_write_editSwoop } from './index';
@@ -60,6 +60,10 @@ export type { Itinerary_ItinerarySaveInput as Itinerary_ItinerarySaveInputSwoop
60
60
  export type { Itinerary_ItinerarySaveInput_jsonld as Itinerary_ItinerarySaveInput_jsonldSwoop } from './models/Itinerary_ItinerarySaveInput_jsonld';
61
61
  export type { Itinerary_ItinerarySaveOutput as Itinerary_ItinerarySaveOutputSwoop } from './models/Itinerary_ItinerarySaveOutput';
62
62
  export type { Itinerary_ItinerarySaveOutput_jsonld as Itinerary_ItinerarySaveOutput_jsonldSwoop } from './models/Itinerary_ItinerarySaveOutput_jsonld';
63
+ export type { MediaAsset as MediaAssetSwoop } from './models/MediaAsset';
64
+ export type { MediaAsset_jsonld as MediaAsset_jsonldSwoop } from './models/MediaAsset_jsonld';
65
+ export type { MediaTag as MediaTagSwoop } from './models/MediaTag';
66
+ export type { MediaTag_jsonld as MediaTag_jsonldSwoop } from './models/MediaTag_jsonld';
63
67
  export type { Note_jsonld_read as Note_jsonld_readSwoop } from './models/Note_jsonld_read';
64
68
  export type { Note_jsonld_write_create as Note_jsonld_write_createSwoop } from './models/Note_jsonld_write_create';
65
69
  export type { Note_jsonld_write_edit as Note_jsonld_write_editSwoop } from './models/Note_jsonld_write_edit';
@@ -0,0 +1,13 @@
1
+ export type MediaAsset = {
2
+ id?: string;
3
+ type?: string;
4
+ title?: string;
5
+ caption?: string | null;
6
+ filename?: string;
7
+ width?: number | null;
8
+ height?: number | null;
9
+ credit?: string | null;
10
+ copyright?: string | null;
11
+ qualityRating?: number | null;
12
+ resolutionRating?: number | null;
13
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,13 @@
1
+ export type MediaAsset_jsonld = {
2
+ id?: string;
3
+ type?: string;
4
+ title?: string;
5
+ caption?: string | null;
6
+ filename?: string;
7
+ width?: number | null;
8
+ height?: number | null;
9
+ credit?: string | null;
10
+ copyright?: string | null;
11
+ qualityRating?: number | null;
12
+ resolutionRating?: number | null;
13
+ };
@@ -0,0 +1,6 @@
1
+ export type MediaTag = {
2
+ id?: number;
3
+ title?: string;
4
+ alias?: string;
5
+ type?: string;
6
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,6 @@
1
+ export type MediaTag_jsonld = {
2
+ id?: number;
3
+ title?: string;
4
+ alias?: string;
5
+ type?: string;
6
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -16,6 +16,8 @@ import type { EnquiryStatus } from '../models/EnquiryStatus';
16
16
  import type { ExchangeRate } from '../models/ExchangeRate';
17
17
  import type { Itinerary_ItinerarySaveInput } from '../models/Itinerary_ItinerarySaveInput';
18
18
  import type { Itinerary_ItinerarySaveOutput } from '../models/Itinerary_ItinerarySaveOutput';
19
+ import type { MediaAsset } from '../models/MediaAsset';
20
+ import type { MediaTag } from '../models/MediaTag';
19
21
  import type { Note_read } from '../models/Note_read';
20
22
  import type { Note_write_create } from '../models/Note_write_create';
21
23
  import type { Note_write_edit } from '../models/Note_write_edit';
@@ -245,6 +247,28 @@ export declare class SwoopService {
245
247
  * @throws ApiError
246
248
  */
247
249
  saveItinerary(requestBody: Itinerary_ItinerarySaveInput): CancelablePromise<Itinerary_ItinerarySaveOutput>;
250
+ /**
251
+ * Retrieves the collection of MediaAsset resources.
252
+ * Retrieves the collection of MediaAsset resources.
253
+ * @param page The collection page number
254
+ * @param itemsPerPage The number of items per page
255
+ * @param region antarctica, arctic, patagonia
256
+ * @param q Keyword search on image title and filename
257
+ * @param tagId Filter to images tagged with this tag ID
258
+ * @returns MediaAsset MediaAsset collection
259
+ * @throws ApiError
260
+ */
261
+ mediaAssetsGetCollection(page?: number, itemsPerPage?: number, region?: string, q?: string, tagId?: string): CancelablePromise<Array<MediaAsset>>;
262
+ /**
263
+ * Media Tag Collection
264
+ * Tags that are applied to at least one image, for filtering media assets
265
+ * @param region antarctica, arctic, patagonia
266
+ * @returns any Successful response
267
+ * @throws ApiError
268
+ */
269
+ mediaTagsGetCollection(region?: string): CancelablePromise<{
270
+ mediaTags?: Array<MediaTag>;
271
+ }>;
248
272
  /**
249
273
  * Retrieves the collection of Note resources.
250
274
  * Retrieves the collection of Note resources.
@@ -363,6 +363,46 @@ export class SwoopService {
363
363
  },
364
364
  });
365
365
  }
366
+ /**
367
+ * Retrieves the collection of MediaAsset resources.
368
+ * Retrieves the collection of MediaAsset resources.
369
+ * @param page The collection page number
370
+ * @param itemsPerPage The number of items per page
371
+ * @param region antarctica, arctic, patagonia
372
+ * @param q Keyword search on image title and filename
373
+ * @param tagId Filter to images tagged with this tag ID
374
+ * @returns MediaAsset MediaAsset collection
375
+ * @throws ApiError
376
+ */
377
+ mediaAssetsGetCollection(page = 1, itemsPerPage = 30, region, q, tagId) {
378
+ return __request(OpenAPI, {
379
+ method: 'GET',
380
+ url: '/api/media-assets',
381
+ query: {
382
+ 'page': page,
383
+ 'itemsPerPage': itemsPerPage,
384
+ 'region': region,
385
+ 'q': q,
386
+ 'tagId': tagId,
387
+ },
388
+ });
389
+ }
390
+ /**
391
+ * Media Tag Collection
392
+ * Tags that are applied to at least one image, for filtering media assets
393
+ * @param region antarctica, arctic, patagonia
394
+ * @returns any Successful response
395
+ * @throws ApiError
396
+ */
397
+ mediaTagsGetCollection(region) {
398
+ return __request(OpenAPI, {
399
+ method: 'GET',
400
+ url: '/api/media-tags',
401
+ query: {
402
+ 'region': region,
403
+ },
404
+ });
405
+ }
366
406
  /**
367
407
  * Retrieves the collection of Note resources.
368
408
  * Retrieves the collection of Note resources.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "swoop-common",
3
- "version": "2.2.217",
3
+ "version": "2.2.219",
4
4
  "main": "dist/api/index.js",
5
5
  "types": "dist/api/index.d.ts",
6
6
  "exports": {