swoop-common 2.2.4 → 2.2.6

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 (25) hide show
  1. package/README.md +1 -1
  2. package/dist/api/generated/core/exports.d.ts +0 -1
  3. package/dist/api/generated/core/index.d.ts +0 -2
  4. package/dist/api/generated/core/index.js +0 -1
  5. package/dist/api/generated/core/models/SortQueryParam.d.ts +1 -1
  6. package/dist/api/generated/core/models/SwooperPersonalInfo.d.ts +4 -4
  7. package/dist/api/generated/core/services/ComponentService.d.ts +5 -5
  8. package/dist/api/generated/core/services/ComponentService.js +19 -17
  9. package/dist/api/generated/core/services/CoreService.d.ts +25 -34
  10. package/dist/api/generated/core/services/CoreService.js +99 -127
  11. package/dist/api/generated/core/services/ItineraryService.d.ts +2 -2
  12. package/dist/api/generated/core/services/ItineraryService.js +22 -22
  13. package/dist/api/generated/core/services/RegionService.d.ts +4 -4
  14. package/dist/api/generated/core/services/RegionService.js +8 -9
  15. package/dist/api/generated/core/services/SnapshotService.d.ts +9 -7
  16. package/dist/api/generated/core/services/SnapshotService.js +20 -22
  17. package/dist/api/generated/core/services/SwooperService.d.ts +4 -3
  18. package/dist/api/generated/core/services/SwooperService.js +12 -13
  19. package/dist/api/generated/core/services/TemplateService.d.ts +3 -3
  20. package/dist/api/generated/core/services/TemplateService.js +18 -20
  21. package/package.json +1 -1
  22. package/dist/api/generated/core/models/B64StringQueryParam.d.ts +0 -4
  23. package/dist/api/generated/core/models/B64StringQueryParam.js +0 -1
  24. package/dist/api/generated/core/services/AuditService.d.ts +0 -13
  25. package/dist/api/generated/core/services/AuditService.js +0 -28
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # Swoop Library
1
+ .# Swoop Library
2
2
 
3
3
  This library is used for rendering **Swoop itinerary templates**.
4
4
  It provides tools for defining **custom field types**, registering **custom components**,
@@ -3,7 +3,6 @@ export { CancelablePromise, CancelError } from './index';
3
3
  export type { Amendment } from './index';
4
4
  export type { AssignedPassenger } from './index';
5
5
  export type { AssignedTravellerGroup } from './index';
6
- export type { B64StringQueryParam } from './index';
7
6
  export { BookingStatus } from './index';
8
7
  export type { Branches } from './index';
9
8
  export type { BranchId } from './index';
@@ -5,7 +5,6 @@ export type { OpenAPIConfig } from './core/OpenAPI';
5
5
  export type { Amendment } from './models/Amendment';
6
6
  export type { AssignedPassenger } from './models/AssignedPassenger';
7
7
  export type { AssignedTravellerGroup } from './models/AssignedTravellerGroup';
8
- export type { B64StringQueryParam } from './models/B64StringQueryParam';
9
8
  export { BookingStatus } from './models/BookingStatus';
10
9
  export type { Branches } from './models/Branches';
11
10
  export type { BranchId } from './models/BranchId';
@@ -97,7 +96,6 @@ export { UrgencyCTA } from './models/UrgencyCTA';
97
96
  export type { UserComponentInstanceField } from './models/UserComponentInstanceField';
98
97
  export type { ValidationSchemas } from './models/ValidationSchemas';
99
98
  export type { VersionPathParam } from './models/VersionPathParam';
100
- export { AuditService } from './services/AuditService';
101
99
  export { ComponentService } from './services/ComponentService';
102
100
  export { CoreService } from './services/CoreService';
103
101
  export { ItineraryService } from './services/ItineraryService';
@@ -13,7 +13,6 @@ export { Meals } from './models/Meals';
13
13
  export { OrderQueryParam } from './models/OrderQueryParam';
14
14
  export { OrgId } from './models/OrgId';
15
15
  export { UrgencyCTA } from './models/UrgencyCTA';
16
- export { AuditService } from './services/AuditService';
17
16
  export { ComponentService } from './services/ComponentService';
18
17
  export { CoreService } from './services/CoreService';
19
18
  export { ItineraryService } from './services/ItineraryService';
@@ -1,4 +1,4 @@
1
1
  /**
2
2
  * List of fields to sort by, this requires the order query param
3
3
  */
4
- export type SortQueryParam = any[];
4
+ export type SortQueryParam = Array<string>;
@@ -1,7 +1,7 @@
1
1
  import type { SwooperHighlights } from './SwooperHighlights';
2
2
  export type SwooperPersonalInfo = {
3
- highlights?: SwooperHighlights;
4
- interests?: Array<string>;
5
- dayToDay?: string;
6
- startedInTravel?: number;
3
+ highlights: SwooperHighlights;
4
+ interests: Array<string>;
5
+ dayToDay: string;
6
+ startedInTravel: number;
7
7
  };
@@ -15,12 +15,12 @@ export declare class ComponentService {
15
15
  * @param sort List of fields to sort by, this requires the order query param
16
16
  * @param search The search strings to apply to the on query parameter values
17
17
  * @param on The fields to apply the search to, the list follows the order and length of the search values in the search query
18
- * @returns any The list of all component given the parameters used
18
+ * @returns any Paginated response of components
19
19
  * @throws ApiError
20
20
  */
21
- static componentList(page?: number, limit?: number, order?: 'asc' | 'desc', sort?: any[], search?: Array<string>, on?: Array<string>): CancelablePromise<{
22
- data?: Array<DTOComponentRead>;
21
+ static componentList(page?: number, limit?: number, order?: 'asc' | 'desc', sort?: Array<string>, search?: Array<string>, on?: Array<string>): CancelablePromise<{
23
22
  pagination?: Pagination;
23
+ data?: Array<DTOComponentRead>;
24
24
  }>;
25
25
  /**
26
26
  * Create a Component
@@ -69,8 +69,8 @@ export declare class ComponentService {
69
69
  * Directly update component state. This does not create a new revision
70
70
  * @param componentId Id of a component
71
71
  * @param state The publishing state of the component
72
- * @returns any OK
72
+ * @returns DTOComponentRead When the state was updated successfully
73
73
  * @throws ApiError
74
74
  */
75
- static componentStateUpdate(componentId: ComponentId, state: ComponentState): CancelablePromise<any>;
75
+ static componentStateUpdate(componentId: ComponentId, state: ComponentState): CancelablePromise<DTOComponentRead>;
76
76
  }
@@ -10,7 +10,7 @@ export class ComponentService {
10
10
  * @param sort List of fields to sort by, this requires the order query param
11
11
  * @param search The search strings to apply to the on query parameter values
12
12
  * @param on The fields to apply the search to, the list follows the order and length of the search values in the search query
13
- * @returns any The list of all component given the parameters used
13
+ * @returns any Paginated response of components
14
14
  * @throws ApiError
15
15
  */
16
16
  static componentList(page, limit, order, sort, search, on) {
@@ -26,10 +26,9 @@ export class ComponentService {
26
26
  'on': on,
27
27
  },
28
28
  errors: {
29
- 400: `If the filter options or query parameters contain invalid values`,
30
- 401: `Unauthorized - Missing or invalid Authorization header`,
31
- 403: `Forbidden - The client is authenticated but not authorized to access this resource`,
32
- 500: `When an internal server error occurs when listing all related component`,
29
+ 400: `If the payload is malformed`,
30
+ 401: `When the client is not authorised`,
31
+ 500: `When an unexpected error occurs`,
33
32
  },
34
33
  });
35
34
  }
@@ -69,9 +68,10 @@ export class ComponentService {
69
68
  'componentId': componentId,
70
69
  },
71
70
  errors: {
72
- 401: `Missing or invalid Authorization header`,
73
- 403: `The client is authenticated but not authorized to access this resource`,
74
- 404: `If a resource is not found`,
71
+ 400: `If the payload is malformed`,
72
+ 401: `Unauthorized - Missing or invalid Authorization header`,
73
+ 403: `Forbidden - The client is authenticated but not authorized to access this resource`,
74
+ 404: `If a resource does not exist`,
75
75
  500: `Internal Server Error`,
76
76
  },
77
77
  });
@@ -97,8 +97,8 @@ export class ComponentService {
97
97
  400: `If the payload is malformed`,
98
98
  401: `Unauthorized - Missing or invalid Authorization header`,
99
99
  403: `Forbidden - The client is authenticated but not authorized to access this resource`,
100
- 404: `When the component id to create a new revision from is not found`,
101
- 500: `When an internal server error occurs updating a component as a new revision`,
100
+ 404: `If a resource does not exist`,
101
+ 500: `Internal Server Error`,
102
102
  },
103
103
  });
104
104
  }
@@ -123,8 +123,8 @@ export class ComponentService {
123
123
  400: `If the payload is malformed`,
124
124
  401: `Unauthorized - Missing or invalid Authorization header`,
125
125
  403: `Forbidden - The client is authenticated but not authorized to access this resource`,
126
- 404: `When the component id to update is not found`,
127
- 500: `When an internal server error occurs updating a component`,
126
+ 404: `If a resource does not exist`,
127
+ 500: `Internal Server Error`,
128
128
  },
129
129
  });
130
130
  }
@@ -143,11 +143,11 @@ export class ComponentService {
143
143
  'componentId': componentId,
144
144
  },
145
145
  errors: {
146
- 400: `When the component doesn't exist in the first place, or when a before hook fails before deleting the item`,
146
+ 400: `If the payload is malformed`,
147
147
  401: `Unauthorized - Missing or invalid Authorization header`,
148
148
  403: `Forbidden - The client is authenticated but not authorized to access this resource`,
149
- 404: `Not Found`,
150
- 500: `When the component fails to delete due to an internal server error`,
149
+ 404: `If a resource does not exist`,
150
+ 500: `Internal Server Error`,
151
151
  },
152
152
  });
153
153
  }
@@ -156,7 +156,7 @@ export class ComponentService {
156
156
  * Directly update component state. This does not create a new revision
157
157
  * @param componentId Id of a component
158
158
  * @param state The publishing state of the component
159
- * @returns any OK
159
+ * @returns DTOComponentRead When the state was updated successfully
160
160
  * @throws ApiError
161
161
  */
162
162
  static componentStateUpdate(componentId, state) {
@@ -170,9 +170,11 @@ export class ComponentService {
170
170
  'state': state,
171
171
  },
172
172
  errors: {
173
+ 400: `If the payload is malformed`,
173
174
  401: `Unauthorized - Missing or invalid Authorization header`,
174
175
  403: `Forbidden - The client is authenticated but not authorized to access this resource`,
175
- 404: `Not Found`,
176
+ 404: `If a resource does not exist`,
177
+ 500: `Internal Server Error`,
176
178
  },
177
179
  });
178
180
  }
@@ -19,33 +19,23 @@ import type { DTOTemplateCreate } from '../models/DTOTemplateCreate';
19
19
  import { DTOTemplateRead } from '../models/DTOTemplateRead';
20
20
  import type { DTOTemplateUpdate } from '../models/DTOTemplateUpdate';
21
21
  import type { EnquiryId } from '../models/EnquiryId';
22
- import type { ItineraryId } from '../models/ItineraryId';
23
22
  import type { Pagination } from '../models/Pagination';
24
23
  import type { SnapshotId } from '../models/SnapshotId';
25
24
  import type { SwooperId } from '../models/SwooperId';
26
25
  import type { TemplateId } from '../models/TemplateId';
27
26
  import { CancelablePromise } from '../core/CancelablePromise';
28
27
  export declare class CoreService {
29
- /**
30
- * Audit a Copy to Clipboard
31
- * Audits when a user copies something to their clipboard
32
- * @param itineraryId Itinerary Id
33
- * @param content Base64 encoding of the copied content
34
- * @returns void
35
- * @throws ApiError
36
- */
37
- auditCopyClipboard(itineraryId: ItineraryId, content: string): CancelablePromise<void>;
38
28
  /**
39
29
  * Create a Snapshot
40
30
  * Creates a new snapshot. A snapshot is a reference to a specific itinerary revision group id.
41
31
  * @param requestBody
42
- * @returns DTOSnapshotRead When the entity is created
32
+ * @returns DTOSnapshotRead When the snapshot is created
43
33
  * @throws ApiError
44
34
  */
45
35
  snapshotCreate(requestBody: DTOSnapshotCreate): CancelablePromise<DTOSnapshotRead>;
46
36
  /**
47
37
  * List Snapshots
48
- * List all available snapshots relating to the query params
38
+ * Get a paginated response of available snapshots
49
39
  * @param enquiryId
50
40
  * @param page Pagination, starting at page 1
51
41
  * @param limit Number of items per page
@@ -53,17 +43,18 @@ export declare class CoreService {
53
43
  * @param sort List of fields to sort by, this requires the order query param
54
44
  * @param search The search strings to apply to the on query parameter values
55
45
  * @param on The fields to apply the search to, the list follows the order and length of the search values in the search query
56
- * @returns any The list of all snapshots given the parameters used
46
+ * @returns any Paginated response of snapshots
57
47
  * @throws ApiError
58
48
  */
59
- snapshotList(enquiryId?: string, page?: number, limit?: number, order?: 'asc' | 'desc', sort?: any[], search?: Array<string>, on?: Array<string>): CancelablePromise<{
60
- snapshots?: Array<DTOSnapshotRead>;
49
+ snapshotList(enquiryId?: string, page?: number, limit?: number, order?: 'asc' | 'desc', sort?: Array<string>, search?: Array<string>, on?: Array<string>): CancelablePromise<{
50
+ pagination?: Pagination;
51
+ data?: Array<DTOSnapshotRead>;
61
52
  }>;
62
53
  /**
63
54
  * Get Snapshot va ID
64
55
  * Returns the specific snapshot given its Id
65
56
  * @param snapshotId
66
- * @returns any OK
57
+ * @returns any A object containing the snapshot entity and the itinerary associated with it
67
58
  * @throws ApiError
68
59
  */
69
60
  snapshotGet(snapshotId: SnapshotId): CancelablePromise<{
@@ -82,7 +73,7 @@ export declare class CoreService {
82
73
  * Restore Snapshot
83
74
  * Creates a new itinerary revision given the content the snapshot refers to
84
75
  * @param snapshotId
85
- * @returns any When a snapshot is restored as the latest version
76
+ * @returns any When a snapshot is restored as the latest version. A object containing the snapshot entity and the itinerary associated with it.
86
77
  * @throws ApiError
87
78
  */
88
79
  snapshotRestore(snapshotId: SnapshotId): CancelablePromise<{
@@ -93,7 +84,7 @@ export declare class CoreService {
93
84
  * List Tree view of Itineraries
94
85
  * List all itineraries in a tree view for a specific enquiry id
95
86
  * @param enquiryId Enquiry Id
96
- * @returns any The tree list view of all itineraries given the parameters used
87
+ * @returns any The tree list view of all itineraries. This response is not paginated.
97
88
  * @throws ApiError
98
89
  */
99
90
  itineraryList(enquiryId: EnquiryId): CancelablePromise<{
@@ -105,7 +96,7 @@ export declare class CoreService {
105
96
  * @param enquiryId Enquiry Id
106
97
  * @param requestBody
107
98
  * @param error error can be set to 1, 100, 101, 200, and 201 to mock sync error responses
108
- * @returns any When a itinerary is created
99
+ * @returns any When a itinerary is created an object containing the tag, enquiry id, and the associated itinerary is returned.
109
100
  * @throws ApiError
110
101
  */
111
102
  itineraryCreate(enquiryId: EnquiryId, requestBody: DTOItineraryCreate, error?: number): CancelablePromise<{
@@ -169,18 +160,18 @@ export declare class CoreService {
169
160
  * @param sort List of fields to sort by, this requires the order query param
170
161
  * @param search The search strings to apply to the on query parameter values
171
162
  * @param on The fields to apply the search to, the list follows the order and length of the search values in the search query
172
- * @returns any OK
163
+ * @returns any Paginated response of regions
173
164
  * @throws ApiError
174
165
  */
175
- regionList(page?: number, limit?: number, order?: 'asc' | 'desc', sort?: any[], search?: Array<string>, on?: Array<string>): CancelablePromise<{
176
- data?: Array<DTORegionRead>;
166
+ regionList(page?: number, limit?: number, order?: 'asc' | 'desc', sort?: Array<string>, search?: Array<string>, on?: Array<string>): CancelablePromise<{
177
167
  pagination?: Pagination;
168
+ data?: Array<DTORegionRead>;
178
169
  }>;
179
170
  /**
180
171
  * Create Region
181
172
  * Create a region
182
173
  * @param requestBody
183
- * @returns DTORegionRead OK
174
+ * @returns DTORegionRead When a region is created
184
175
  * @throws ApiError
185
176
  */
186
177
  regionCreate(requestBody?: DTORegionCreate): CancelablePromise<DTORegionRead>;
@@ -193,12 +184,12 @@ export declare class CoreService {
193
184
  * @param sort List of fields to sort by, this requires the order query param
194
185
  * @param search The search strings to apply to the on query parameter values
195
186
  * @param on The fields to apply the search to, the list follows the order and length of the search values in the search query
196
- * @returns any The list of all templates given the parameters used
187
+ * @returns any Paginated response of templates
197
188
  * @throws ApiError
198
189
  */
199
- templateList(page?: number, limit?: number, order?: 'asc' | 'desc', sort?: any[], search?: Array<string>, on?: Array<string>): CancelablePromise<{
200
- data?: Array<DTOTemplateRead>;
190
+ templateList(page?: number, limit?: number, order?: 'asc' | 'desc', sort?: Array<string>, search?: Array<string>, on?: Array<string>): CancelablePromise<{
201
191
  pagination?: Pagination;
192
+ data?: Array<DTOTemplateRead>;
202
193
  }>;
203
194
  /**
204
195
  * Create a Template
@@ -242,12 +233,12 @@ export declare class CoreService {
242
233
  * @param sort List of fields to sort by, this requires the order query param
243
234
  * @param search The search strings to apply to the on query parameter values
244
235
  * @param on The fields to apply the search to, the list follows the order and length of the search values in the search query
245
- * @returns any The list of all component given the parameters used
236
+ * @returns any Paginated response of components
246
237
  * @throws ApiError
247
238
  */
248
- componentList(page?: number, limit?: number, order?: 'asc' | 'desc', sort?: any[], search?: Array<string>, on?: Array<string>): CancelablePromise<{
249
- data?: Array<DTOComponentRead>;
239
+ componentList(page?: number, limit?: number, order?: 'asc' | 'desc', sort?: Array<string>, search?: Array<string>, on?: Array<string>): CancelablePromise<{
250
240
  pagination?: Pagination;
241
+ data?: Array<DTOComponentRead>;
251
242
  }>;
252
243
  /**
253
244
  * Create a Component
@@ -296,10 +287,10 @@ export declare class CoreService {
296
287
  * Directly update component state. This does not create a new revision
297
288
  * @param componentId Id of a component
298
289
  * @param state The publishing state of the component
299
- * @returns any OK
290
+ * @returns DTOComponentRead When the state was updated successfully
300
291
  * @throws ApiError
301
292
  */
302
- componentStateUpdate(componentId: ComponentId, state: ComponentState): CancelablePromise<any>;
293
+ componentStateUpdate(componentId: ComponentId, state: ComponentState): CancelablePromise<DTOComponentRead>;
303
294
  /**
304
295
  * List Swoopers
305
296
  * List all swoopers
@@ -309,12 +300,12 @@ export declare class CoreService {
309
300
  * @param sort List of fields to sort by, this requires the order query param
310
301
  * @param search The search strings to apply to the on query parameter values
311
302
  * @param on The fields to apply the search to, the list follows the order and length of the search values in the search query
312
- * @returns any OK
303
+ * @returns any Paginated response of swoopers
313
304
  * @throws ApiError
314
305
  */
315
- swooperList(page?: number, limit?: number, order?: 'asc' | 'desc', sort?: any[], search?: Array<string>, on?: Array<string>): CancelablePromise<{
316
- data?: Array<DTOSwooperRead>;
306
+ swooperList(page?: number, limit?: number, order?: 'asc' | 'desc', sort?: Array<string>, search?: Array<string>, on?: Array<string>): CancelablePromise<{
317
307
  pagination?: Pagination;
308
+ data?: Array<DTOTemplateRead>;
318
309
  }>;
319
310
  /**
320
311
  * Create Swooper