swoop-common 2.1.40 → 2.1.42

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  export const OpenAPI = {
2
2
  BASE: 'https://placeholder.com',
3
- VERSION: '1.0',
3
+ VERSION: '1.1',
4
4
  WITH_CREDENTIALS: false,
5
5
  CREDENTIALS: 'include',
6
6
  TOKEN: undefined,
@@ -65,3 +65,4 @@ export type { templateId } from './models/templateId';
65
65
  export type { UserComponentInstanceField } from './models/UserComponentInstanceField';
66
66
  export type { ValidationSchemas } from './models/ValidationSchemas';
67
67
  export { ItineraryService } from './services/ItineraryService';
68
+ export { SnapshotService } from './services/SnapshotService';
@@ -12,3 +12,4 @@ export { Meals } from './models/Meals';
12
12
  export { regionParam } from './models/regionParam';
13
13
  export { regionRequired } from './models/regionRequired';
14
14
  export { ItineraryService } from './services/ItineraryService';
15
+ export { SnapshotService } from './services/SnapshotService';
@@ -13,16 +13,17 @@ export declare class ItineraryService {
13
13
  * @param limit Number of items per page
14
14
  * @param search Search term
15
15
  * @param sort List of fields to sort by
16
+ * @param enquiryId Filter itineraries via enquiryId
16
17
  * @returns any OK
17
18
  * @throws ApiError
18
19
  */
19
- itineraryList(page?: number, limit?: number, search?: string, sort?: any[]): CancelablePromise<{
20
+ itineraryList(page?: number, limit?: number, search?: string, sort?: any[], enquiryId?: string): CancelablePromise<{
20
21
  data: Array<DTOItineraryRead>;
21
22
  pagination?: Pagination;
22
23
  }>;
23
24
  /**
24
25
  * Create Itinerary
25
- * Create itinerary
26
+ * Creates an itinerary
26
27
  * @param requestBody
27
28
  * @returns DTOItineraryRead OK
28
29
  * @throws ApiError
@@ -30,7 +31,7 @@ export declare class ItineraryService {
30
31
  itineraryCreate(requestBody: DTOItineraryCreate): CancelablePromise<DTOItineraryRead>;
31
32
  /**
32
33
  * Get Itinerary
33
- * Get itinerary via id
34
+ * Get itinerary via ID
34
35
  * @param itineraryId Itinerary id
35
36
  * @returns DTOItineraryRead OK
36
37
  * @throws ApiError
@@ -38,7 +39,7 @@ export declare class ItineraryService {
38
39
  itineraryGet(itineraryId: string): CancelablePromise<DTOItineraryRead>;
39
40
  /**
40
41
  * Update Itinerary
41
- * Update itinerary
42
+ * Updates an itinerary as a new revision
42
43
  * @param itineraryId Itinerary id
43
44
  * @param requestBody
44
45
  * @returns DTOItineraryRead OK
@@ -47,7 +48,7 @@ export declare class ItineraryService {
47
48
  itineraryUpdate(itineraryId: string, requestBody: DTOItineraryUpdate): CancelablePromise<DTOItineraryRead>;
48
49
  /**
49
50
  * Delete Itinerary
50
- * Delete itinerary via id
51
+ * Delete itinerary via ID
51
52
  * @param itineraryId Itinerary id
52
53
  * @returns any OK
53
54
  * @throws ApiError
@@ -8,10 +8,11 @@ export class ItineraryService {
8
8
  * @param limit Number of items per page
9
9
  * @param search Search term
10
10
  * @param sort List of fields to sort by
11
+ * @param enquiryId Filter itineraries via enquiryId
11
12
  * @returns any OK
12
13
  * @throws ApiError
13
14
  */
14
- itineraryList(page, limit, search, sort) {
15
+ itineraryList(page, limit, search, sort, enquiryId) {
15
16
  return __request(OpenAPI, {
16
17
  method: 'GET',
17
18
  url: '/itineraries',
@@ -20,12 +21,13 @@ export class ItineraryService {
20
21
  'limit': limit,
21
22
  'search': search,
22
23
  'sort': sort,
24
+ 'enquiryId': enquiryId,
23
25
  },
24
26
  });
25
27
  }
26
28
  /**
27
29
  * Create Itinerary
28
- * Create itinerary
30
+ * Creates an itinerary
29
31
  * @param requestBody
30
32
  * @returns DTOItineraryRead OK
31
33
  * @throws ApiError
@@ -40,7 +42,7 @@ export class ItineraryService {
40
42
  }
41
43
  /**
42
44
  * Get Itinerary
43
- * Get itinerary via id
45
+ * Get itinerary via ID
44
46
  * @param itineraryId Itinerary id
45
47
  * @returns DTOItineraryRead OK
46
48
  * @throws ApiError
@@ -56,7 +58,7 @@ export class ItineraryService {
56
58
  }
57
59
  /**
58
60
  * Update Itinerary
59
- * Update itinerary
61
+ * Updates an itinerary as a new revision
60
62
  * @param itineraryId Itinerary id
61
63
  * @param requestBody
62
64
  * @returns DTOItineraryRead OK
@@ -75,7 +77,7 @@ export class ItineraryService {
75
77
  }
76
78
  /**
77
79
  * Delete Itinerary
78
- * Delete itinerary via id
80
+ * Delete itinerary via ID
79
81
  * @param itineraryId Itinerary id
80
82
  * @returns any OK
81
83
  * @throws ApiError
@@ -0,0 +1,52 @@
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 OK
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 OK
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
30
+ * @returns any OK
31
+ * @throws ApiError
32
+ */
33
+ static snapshotGet(): CancelablePromise<{
34
+ data: Array<DTOSnapshotRead>;
35
+ }>;
36
+ /**
37
+ * Delete Snapshot via ID
38
+ * Deletes a specific snapshot
39
+ * @returns any OK
40
+ * @throws ApiError
41
+ */
42
+ static snapshotDelete(): CancelablePromise<any>;
43
+ /**
44
+ * Restore Snapshot
45
+ * Creates a new itinerary revision given the content the snapshot refers to
46
+ * @returns any OK
47
+ * @throws ApiError
48
+ */
49
+ static snapshotRestore(): CancelablePromise<{
50
+ data: Array<DTOSnapshotRead>;
51
+ }>;
52
+ }
@@ -0,0 +1,75 @@
1
+ import { OpenAPI } from '../core/OpenAPI';
2
+ import { request as __request } from '../core/request';
3
+ export class SnapshotService {
4
+ /**
5
+ * Create a Snapshot
6
+ * Creates a new snapshot. A snapshot is a reference to a specific itinerary revision group id.
7
+ * @param requestBody
8
+ * @returns DTOSnapshotRead OK
9
+ * @throws ApiError
10
+ */
11
+ static snapshotCreate(requestBody) {
12
+ return __request(OpenAPI, {
13
+ method: 'POST',
14
+ url: '/snapshots',
15
+ body: requestBody,
16
+ mediaType: 'application/json',
17
+ });
18
+ }
19
+ /**
20
+ * List Snapshots
21
+ * List all available snapshots
22
+ * @param page Pagination, starting at page 1
23
+ * @param limit Number of items per page
24
+ * @param sort List of fields to sort by
25
+ * @returns any OK
26
+ * @throws ApiError
27
+ */
28
+ static snapshotList(page, limit, sort) {
29
+ return __request(OpenAPI, {
30
+ method: 'GET',
31
+ url: '/snapshots',
32
+ query: {
33
+ 'page': page,
34
+ 'limit': limit,
35
+ 'sort': sort,
36
+ },
37
+ });
38
+ }
39
+ /**
40
+ * Get Snapshot va ID
41
+ * Returns the specific snapshot
42
+ * @returns any OK
43
+ * @throws ApiError
44
+ */
45
+ static snapshotGet() {
46
+ return __request(OpenAPI, {
47
+ method: 'GET',
48
+ url: '/snapshots/{snapshotId}',
49
+ });
50
+ }
51
+ /**
52
+ * Delete Snapshot via ID
53
+ * Deletes a specific snapshot
54
+ * @returns any OK
55
+ * @throws ApiError
56
+ */
57
+ static snapshotDelete() {
58
+ return __request(OpenAPI, {
59
+ method: 'DELETE',
60
+ url: '/snapshots/{snapshotId}',
61
+ });
62
+ }
63
+ /**
64
+ * Restore Snapshot
65
+ * Creates a new itinerary revision given the content the snapshot refers to
66
+ * @returns any OK
67
+ * @throws ApiError
68
+ */
69
+ static snapshotRestore() {
70
+ return __request(OpenAPI, {
71
+ method: 'PUT',
72
+ url: '/snapshots/restore/{snapshotId}',
73
+ });
74
+ }
75
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "swoop-common",
3
- "version": "2.1.40",
3
+ "version": "2.1.42",
4
4
  "main": "dist/api/index.js",
5
5
  "types": "dist/api/index.d.ts",
6
6
  "exports": {