swoop-common 1.0.21 → 1.0.23

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 (56) hide show
  1. package/README.md +1 -0
  2. package/dist/api/gen.js +19 -53
  3. package/dist/api/generated/core/exports.d.ts +0 -1
  4. package/dist/api/generated/core/exports.js +0 -1
  5. package/dist/api/generated/core/services/CoreService.d.ts +12 -12
  6. package/dist/api/generated/core/services/CoreService.js +12 -12
  7. package/dist/api/generated/itinerary/exports.d.ts +0 -1
  8. package/dist/api/generated/itinerary/exports.js +1 -1
  9. package/dist/api/generated/itinerary/index.d.ts +2 -0
  10. package/dist/api/generated/itinerary/models/DTORegionCreate.d.ts +6 -0
  11. package/dist/api/generated/itinerary/models/DTORegionCreate.js +1 -0
  12. package/dist/api/generated/itinerary/models/DTORegionRead.d.ts +9 -0
  13. package/dist/api/generated/itinerary/models/DTORegionRead.js +1 -0
  14. package/dist/api/generated/itinerary/services/ItineraryService.d.ts +20 -80
  15. package/dist/api/generated/itinerary/services/ItineraryService.js +20 -128
  16. package/dist/api/generated/swoop/exports.d.ts +48 -66
  17. package/dist/api/generated/swoop/exports.js +1 -29
  18. package/dist/api/generated/swoop/index.d.ts +1 -12
  19. package/dist/api/generated/swoop/index.js +1 -12
  20. package/dist/api/generated/swoop/services/SwoopService.d.ts +387 -0
  21. package/dist/api/generated/swoop/services/SwoopService.js +329 -0
  22. package/dist/api/init.d.ts +8 -1
  23. package/dist/api/init.js +5 -0
  24. package/dist/index.d.ts +0 -1
  25. package/dist/index.js +1 -1
  26. package/dist/rendering/renderers/ComponentPicker.js +1 -1
  27. package/dist/rendering/renderers/TemplatePicker.js +1 -1
  28. package/dist/rendering/util/lib.d.ts +1 -0
  29. package/dist/rendering/util/lib.js +6 -0
  30. package/dist/rendering/util/string.d.ts +1 -0
  31. package/dist/rendering/util/string.js +1 -0
  32. package/package.json +1 -1
  33. package/dist/api/generated/swoop/services/BookingItemTypeService.d.ts +0 -35
  34. package/dist/api/generated/swoop/services/BookingItemTypeService.js +0 -22
  35. package/dist/api/generated/swoop/services/CategoryService.d.ts +0 -35
  36. package/dist/api/generated/swoop/services/CategoryService.js +0 -22
  37. package/dist/api/generated/swoop/services/CurrencyService.d.ts +0 -35
  38. package/dist/api/generated/swoop/services/CurrencyService.js +0 -22
  39. package/dist/api/generated/swoop/services/CustomerLookupService.d.ts +0 -13
  40. package/dist/api/generated/swoop/services/CustomerLookupService.js +0 -25
  41. package/dist/api/generated/swoop/services/CustomerService.d.ts +0 -45
  42. package/dist/api/generated/swoop/services/CustomerService.js +0 -45
  43. package/dist/api/generated/swoop/services/EnquiryService.d.ts +0 -12
  44. package/dist/api/generated/swoop/services/EnquiryService.js +0 -23
  45. package/dist/api/generated/swoop/services/EnquiryStatusService.d.ts +0 -34
  46. package/dist/api/generated/swoop/services/EnquiryStatusService.js +0 -20
  47. package/dist/api/generated/swoop/services/PartnerService.d.ts +0 -46
  48. package/dist/api/generated/swoop/services/PartnerService.js +0 -47
  49. package/dist/api/generated/swoop/services/PaymentService.d.ts +0 -34
  50. package/dist/api/generated/swoop/services/PaymentService.js +0 -20
  51. package/dist/api/generated/swoop/services/PersonService.d.ts +0 -42
  52. package/dist/api/generated/swoop/services/PersonService.js +0 -39
  53. package/dist/api/generated/swoop/services/TravellerService.d.ts +0 -43
  54. package/dist/api/generated/swoop/services/TravellerService.js +0 -41
  55. package/dist/api/generated/swoop/services/TripService.d.ts +0 -46
  56. package/dist/api/generated/swoop/services/TripService.js +0 -47
package/README.md CHANGED
@@ -24,6 +24,7 @@ init({
24
24
  coreServiceUrl: 'https://your.core.service',
25
25
  swoopServiceForwardUrl: 'https://your.forward.service'
26
26
  });
27
+ ```
27
28
 
28
29
  ## Service Interfaces
29
30
 
package/dist/api/gen.js CHANGED
@@ -1,4 +1,7 @@
1
1
  import fs from "fs";
2
+ import { capitalise } from "../rendering/util/string";
3
+ // Really quick gen file dont judge
4
+ // Considering making a fork of the codegen lib instead of this
2
5
  // Export into one file, so i can export entire file out of the swoop lib
3
6
  const buildExports = (sdk, excludeCoreTypes, excludeServiceTypes, exclude) => {
4
7
  const existing = fs.readFileSync(`./src/api/generated/${sdk}/index.ts`, "utf-8");
@@ -7,6 +10,9 @@ const buildExports = (sdk, excludeCoreTypes, excludeServiceTypes, exclude) => {
7
10
  lines.forEach(l => {
8
11
  if (!l.startsWith("export"))
9
12
  return;
13
+ // Dont export service
14
+ if (l.includes("Service }"))
15
+ return;
10
16
  // Dont export openApi or openapi config
11
17
  if (l.includes("{ OpenAPI }"))
12
18
  return;
@@ -18,6 +24,9 @@ const buildExports = (sdk, excludeCoreTypes, excludeServiceTypes, exclude) => {
18
24
  return;
19
25
  if (exclude === null || exclude === void 0 ? void 0 : exclude.some(e => l.includes(e)))
20
26
  return;
27
+ if (sdk === "swoop" && l.includes(" as ")) {
28
+ l = l.split(" as ")[0] + "Swoop } from './index;'";
29
+ }
21
30
  if (excludeServiceTypes && !l.includes(`${sdk[0].toUpperCase()}${sdk.slice(1, sdk.length)}Service`))
22
31
  return;
23
32
  out.push(l.replace(/'(.*?)'/g, "'./index'"));
@@ -25,59 +34,16 @@ const buildExports = (sdk, excludeCoreTypes, excludeServiceTypes, exclude) => {
25
34
  const file = out.join("\n");
26
35
  fs.writeFileSync(`./src/api/generated/${sdk}/exports.ts`, file);
27
36
  };
28
- // Little different as it uses as
29
- const buildExportsSwoop = () => {
30
- const existing = fs.readFileSync(`./src/api/generated/swoop/index.ts`, "utf-8");
31
- const lines = existing.split("\n");
32
- // List of services
33
- const services = [];
34
- const types = [];
35
- lines.forEach(line => {
36
- if (line.includes("from './services/")) {
37
- const service = line.match(/\{\s*([^}]*?)\s*\}/);
38
- if (service && service[1])
39
- services.push(service[1]);
40
- }
41
- if (line.startsWith("export type")) {
42
- types.push(line);
43
- }
44
- });
45
- const servicesArray = `const services = [${services.join(", ")}]`;
46
- const servicesType = `type SwoopService = ${services.map(s => `StaticMethods<typeof ${s}>`).join("&\n")}`;
47
- const serviceImports = services.map(s => `import { ${s} } from './services/${s}';`).join("\n");
48
- // Base code to flatten
49
- const flatten = `type StaticMethods<T> = {
50
- [K in keyof T as T[K] extends (...args: any[]) => any ? K : never]: T[K];
51
- };
52
-
53
- function flatten(): SwoopService
54
- {
55
- const flattened: Record<string, any> = {};
56
-
57
- services.forEach((service) =>
58
- {
59
- const methodNames = Object.getOwnPropertyNames(service)
60
- .filter(name =>
61
- name !== 'constructor' &&
62
- name !== 'prototype' &&
63
- name !== 'length' &&
64
- name !== 'name' &&
65
- typeof (service as any)[name] === 'function'
66
- );
67
-
68
- methodNames.forEach(methodName =>
69
- {
70
- flattened[methodName] = (service as any)[methodName];
71
- })
72
- });
73
-
74
- return flattened as SwoopService;
75
- }
76
-
77
- export const SwoopService = flatten();`;
78
- const out = ["// GENERATED FILE DO NOT EDIT //", "", types.join("\n"), "", serviceImports, "", servicesType, "", servicesArray, "", flatten].join("\n");
79
- fs.writeFileSync(`./src/api/generated/swoop/exports.ts`, out);
37
+ // Edits the class to ensure all methods are not static (so it can be instanced)
38
+ const makeNotStatic = (sdk) => {
39
+ const existing = fs.readFileSync(`./src/api/generated/${sdk}/services/${capitalise(sdk)}Service.ts`, "utf-8");
40
+ // Replace static with nothing
41
+ const clean = existing.replace(/public static/g, "public");
42
+ fs.writeFileSync(`./src/api/generated/${sdk}/services/${capitalise(sdk)}Service.ts`, clean);
80
43
  };
81
44
  buildExports("core", false, false, ["{ Traveller }"]);
82
45
  buildExports("itinerary", true, true);
83
- buildExportsSwoop();
46
+ buildExports("swoop", true, false);
47
+ makeNotStatic("core");
48
+ makeNotStatic("itinerary");
49
+ makeNotStatic("swoop");
@@ -45,4 +45,3 @@ export type { templateId } from './index';
45
45
  export type { TravellerResponse } from './index';
46
46
  export type { UserComponentInstanceField } from './index';
47
47
  export type { ValidationSchemas } from './index';
48
- export { CoreService } from './index';
@@ -3,4 +3,3 @@ export { ApiError } from './index';
3
3
  export { CancelablePromise, CancelError } from './index';
4
4
  export { regionParam } from './index';
5
5
  export { regionRequired } from './index';
6
- export { CoreService } from './index';
@@ -14,7 +14,7 @@ export declare class CoreService {
14
14
  * @returns any OK
15
15
  * @throws ApiError
16
16
  */
17
- static templateList(page?: number): CancelablePromise<{
17
+ templateList(page?: number): CancelablePromise<{
18
18
  data: Array<DTOTemplateRead>;
19
19
  pagination?: Pagination;
20
20
  }>;
@@ -25,7 +25,7 @@ export declare class CoreService {
25
25
  * @returns DTOTemplateRead OK
26
26
  * @throws ApiError
27
27
  */
28
- static templateCreate(requestBody: DTOTemplateCreate): CancelablePromise<DTOTemplateRead>;
28
+ templateCreate(requestBody: DTOTemplateCreate): CancelablePromise<DTOTemplateRead>;
29
29
  /**
30
30
  * Get Template
31
31
  * Get a template via id
@@ -33,7 +33,7 @@ export declare class CoreService {
33
33
  * @returns DTOTemplateRead OK
34
34
  * @throws ApiError
35
35
  */
36
- static templateGet(templateId: string): CancelablePromise<DTOTemplateRead>;
36
+ templateGet(templateId: string): CancelablePromise<DTOTemplateRead>;
37
37
  /**
38
38
  * Update Template
39
39
  * Updates a template as a new revision
@@ -42,7 +42,7 @@ export declare class CoreService {
42
42
  * @returns DTOTemplateRead OK
43
43
  * @throws ApiError
44
44
  */
45
- static templateUpdate(templateId: string, requestBody: DTOTemplateUpdate): CancelablePromise<DTOTemplateRead>;
45
+ templateUpdate(templateId: string, requestBody: DTOTemplateUpdate): CancelablePromise<DTOTemplateRead>;
46
46
  /**
47
47
  * Delete Template
48
48
  * Delete a template via id
@@ -50,7 +50,7 @@ export declare class CoreService {
50
50
  * @returns any OK
51
51
  * @throws ApiError
52
52
  */
53
- static templateDelete(templateId: string): CancelablePromise<any>;
53
+ templateDelete(templateId: string): CancelablePromise<any>;
54
54
  /**
55
55
  * List components
56
56
  * List all components
@@ -59,7 +59,7 @@ export declare class CoreService {
59
59
  * @returns any OK
60
60
  * @throws ApiError
61
61
  */
62
- static componentList(page?: number, limit?: number): CancelablePromise<{
62
+ componentList(page?: number, limit?: number): CancelablePromise<{
63
63
  data: Array<DTOComponentRead>;
64
64
  pagination?: Pagination;
65
65
  }>;
@@ -70,7 +70,7 @@ export declare class CoreService {
70
70
  * @returns DTOComponentRead OK
71
71
  * @throws ApiError
72
72
  */
73
- static componentCreate(requestBody: DTOComponentCreate): CancelablePromise<DTOComponentRead>;
73
+ componentCreate(requestBody: DTOComponentCreate): CancelablePromise<DTOComponentRead>;
74
74
  /**
75
75
  * Get Component
76
76
  * Get a component via id
@@ -78,7 +78,7 @@ export declare class CoreService {
78
78
  * @returns DTOComponentRead OK
79
79
  * @throws ApiError
80
80
  */
81
- static componentGet(componentId: string): CancelablePromise<DTOComponentRead>;
81
+ componentGet(componentId: string): CancelablePromise<DTOComponentRead>;
82
82
  /**
83
83
  * Update Component
84
84
  * Update a component as a new revision
@@ -87,7 +87,7 @@ export declare class CoreService {
87
87
  * @returns DTOComponentRead OK
88
88
  * @throws ApiError
89
89
  */
90
- static componentUpdate(componentId: string, requestBody: DTOComponentUpdate): CancelablePromise<DTOComponentRead>;
90
+ componentUpdate(componentId: string, requestBody: DTOComponentUpdate): CancelablePromise<DTOComponentRead>;
91
91
  /**
92
92
  * Delete Component
93
93
  * Delete a component via id
@@ -95,7 +95,7 @@ export declare class CoreService {
95
95
  * @returns any OK
96
96
  * @throws ApiError
97
97
  */
98
- static componentDelete(componentId: string): CancelablePromise<any>;
98
+ componentDelete(componentId: string): CancelablePromise<any>;
99
99
  /**
100
100
  * Update Component State
101
101
  * Directly update component state. This does not create a new revision
@@ -104,7 +104,7 @@ export declare class CoreService {
104
104
  * @returns any OK
105
105
  * @throws ApiError
106
106
  */
107
- static componentStateUpdate(componentId: string, requestBody: {
107
+ componentStateUpdate(componentId: string, requestBody: {
108
108
  state?: 'published' | 'deprecated' | 'unpublished';
109
109
  }): CancelablePromise<any>;
110
110
  /**
@@ -113,5 +113,5 @@ export declare class CoreService {
113
113
  * @returns any OK
114
114
  * @throws ApiError
115
115
  */
116
- static itineraryGet(): CancelablePromise<any>;
116
+ itineraryGet(): CancelablePromise<any>;
117
117
  }
@@ -8,7 +8,7 @@ export class CoreService {
8
8
  * @returns any OK
9
9
  * @throws ApiError
10
10
  */
11
- static templateList(page) {
11
+ templateList(page) {
12
12
  return __request(OpenAPI, {
13
13
  method: 'GET',
14
14
  url: '/templates',
@@ -24,7 +24,7 @@ export class CoreService {
24
24
  * @returns DTOTemplateRead OK
25
25
  * @throws ApiError
26
26
  */
27
- static templateCreate(requestBody) {
27
+ templateCreate(requestBody) {
28
28
  return __request(OpenAPI, {
29
29
  method: 'POST',
30
30
  url: '/templates',
@@ -39,7 +39,7 @@ export class CoreService {
39
39
  * @returns DTOTemplateRead OK
40
40
  * @throws ApiError
41
41
  */
42
- static templateGet(templateId) {
42
+ templateGet(templateId) {
43
43
  return __request(OpenAPI, {
44
44
  method: 'GET',
45
45
  url: '/templates/{templateId}',
@@ -56,7 +56,7 @@ export class CoreService {
56
56
  * @returns DTOTemplateRead OK
57
57
  * @throws ApiError
58
58
  */
59
- static templateUpdate(templateId, requestBody) {
59
+ templateUpdate(templateId, requestBody) {
60
60
  return __request(OpenAPI, {
61
61
  method: 'PATCH',
62
62
  url: '/templates/{templateId}',
@@ -74,7 +74,7 @@ export class CoreService {
74
74
  * @returns any OK
75
75
  * @throws ApiError
76
76
  */
77
- static templateDelete(templateId) {
77
+ templateDelete(templateId) {
78
78
  return __request(OpenAPI, {
79
79
  method: 'DELETE',
80
80
  url: '/templates/{templateId}',
@@ -91,7 +91,7 @@ export class CoreService {
91
91
  * @returns any OK
92
92
  * @throws ApiError
93
93
  */
94
- static componentList(page, limit) {
94
+ componentList(page, limit) {
95
95
  return __request(OpenAPI, {
96
96
  method: 'GET',
97
97
  url: '/components',
@@ -108,7 +108,7 @@ export class CoreService {
108
108
  * @returns DTOComponentRead OK
109
109
  * @throws ApiError
110
110
  */
111
- static componentCreate(requestBody) {
111
+ componentCreate(requestBody) {
112
112
  return __request(OpenAPI, {
113
113
  method: 'POST',
114
114
  url: '/components',
@@ -123,7 +123,7 @@ export class CoreService {
123
123
  * @returns DTOComponentRead OK
124
124
  * @throws ApiError
125
125
  */
126
- static componentGet(componentId) {
126
+ componentGet(componentId) {
127
127
  return __request(OpenAPI, {
128
128
  method: 'GET',
129
129
  url: '/components/{componentId}',
@@ -140,7 +140,7 @@ export class CoreService {
140
140
  * @returns DTOComponentRead OK
141
141
  * @throws ApiError
142
142
  */
143
- static componentUpdate(componentId, requestBody) {
143
+ componentUpdate(componentId, requestBody) {
144
144
  return __request(OpenAPI, {
145
145
  method: 'PATCH',
146
146
  url: '/components/{componentId}',
@@ -158,7 +158,7 @@ export class CoreService {
158
158
  * @returns any OK
159
159
  * @throws ApiError
160
160
  */
161
- static componentDelete(componentId) {
161
+ componentDelete(componentId) {
162
162
  return __request(OpenAPI, {
163
163
  method: 'DELETE',
164
164
  url: '/components/{componentId}',
@@ -175,7 +175,7 @@ export class CoreService {
175
175
  * @returns any OK
176
176
  * @throws ApiError
177
177
  */
178
- static componentStateUpdate(componentId, requestBody) {
178
+ componentStateUpdate(componentId, requestBody) {
179
179
  return __request(OpenAPI, {
180
180
  method: 'GET',
181
181
  url: '/components/{componentId}/state',
@@ -192,7 +192,7 @@ export class CoreService {
192
192
  * @returns any OK
193
193
  * @throws ApiError
194
194
  */
195
- static itineraryGet() {
195
+ itineraryGet() {
196
196
  return __request(OpenAPI, {
197
197
  method: 'GET',
198
198
  url: '/itineraries',
@@ -1 +0,0 @@
1
- export { ItineraryService } from './index';
@@ -1,2 +1,2 @@
1
+ "use strict";
1
2
  // GENERATED FILE DO NOT EDIT //
2
- export { ItineraryService } from './index';
@@ -22,6 +22,8 @@ export type { DTOComponentUpdate } from './models/DTOComponentUpdate';
22
22
  export type { DTOItineraryCreate } from './models/DTOItineraryCreate';
23
23
  export type { DTOItineraryRead } from './models/DTOItineraryRead';
24
24
  export type { DTOItineraryUpdate } from './models/DTOItineraryUpdate';
25
+ export type { DTORegionCreate } from './models/DTORegionCreate';
26
+ export type { DTORegionRead } from './models/DTORegionRead';
25
27
  export type { DTOTemplateCreate } from './models/DTOTemplateCreate';
26
28
  export type { DTOTemplateRead } from './models/DTOTemplateRead';
27
29
  export type { DTOTemplateUpdate } from './models/DTOTemplateUpdate';
@@ -0,0 +1,6 @@
1
+ export type DTORegionCreate = {
2
+ name: string;
3
+ description: string;
4
+ destination: string;
5
+ images: Array<Array<any>>;
6
+ };
@@ -0,0 +1,9 @@
1
+ import type { Metadata } from './Metadata';
2
+ export type DTORegionRead = {
3
+ id: string;
4
+ metadata: Metadata;
5
+ name: string;
6
+ description: string;
7
+ destination: string;
8
+ images: Array<string>;
9
+ };
@@ -1,16 +1,9 @@
1
- import type { BookingItemResponse } from '../models/BookingItemResponse';
2
- import type { CurrencyItemResponse } from '../models/CurrencyItemResponse';
3
1
  import type { DTOItineraryCreate } from '../models/DTOItineraryCreate';
4
2
  import type { DTOItineraryRead } from '../models/DTOItineraryRead';
5
3
  import type { DTOItineraryUpdate } from '../models/DTOItineraryUpdate';
6
- import type { IBEvent } from '../models/IBEvent';
7
- import type { Member } from '../models/Member';
4
+ import type { DTORegionCreate } from '../models/DTORegionCreate';
5
+ import type { DTORegionRead } from '../models/DTORegionRead';
8
6
  import type { Pagination } from '../models/Pagination';
9
- import type { Partner } from '../models/Partner';
10
- import type { PartnerResponse } from '../models/PartnerResponse';
11
- import type { SwooperResponse } from '../models/SwooperResponse';
12
- import type { Traveller } from '../models/Traveller';
13
- import type { TravellerResponse } from '../models/TravellerResponse';
14
7
  import type { CancelablePromise } from '../core/CancelablePromise';
15
8
  export declare class ItineraryService {
16
9
  /**
@@ -22,7 +15,7 @@ export declare class ItineraryService {
22
15
  * @returns any OK
23
16
  * @throws ApiError
24
17
  */
25
- static itineraryList(page?: number, limit?: number, search?: string): CancelablePromise<{
18
+ itineraryList(page?: number, limit?: number, search?: string): CancelablePromise<{
26
19
  data: Array<DTOItineraryRead>;
27
20
  pagination?: Pagination;
28
21
  }>;
@@ -33,7 +26,7 @@ export declare class ItineraryService {
33
26
  * @returns DTOItineraryRead OK
34
27
  * @throws ApiError
35
28
  */
36
- static itineraryCreate(requestBody: DTOItineraryCreate): CancelablePromise<DTOItineraryRead>;
29
+ itineraryCreate(requestBody: DTOItineraryCreate): CancelablePromise<DTOItineraryRead>;
37
30
  /**
38
31
  * Get Itinerary
39
32
  * Get itinerary via id
@@ -41,7 +34,7 @@ export declare class ItineraryService {
41
34
  * @returns DTOItineraryRead OK
42
35
  * @throws ApiError
43
36
  */
44
- static itineraryGet(itineraryId: string): CancelablePromise<DTOItineraryRead>;
37
+ itineraryGet(itineraryId: string): CancelablePromise<DTOItineraryRead>;
45
38
  /**
46
39
  * Update Itinerary
47
40
  * Update itinerary
@@ -50,7 +43,7 @@ export declare class ItineraryService {
50
43
  * @returns DTOItineraryRead OK
51
44
  * @throws ApiError
52
45
  */
53
- static itineraryUpdate(itineraryId: string, requestBody: DTOItineraryUpdate): CancelablePromise<DTOItineraryRead>;
46
+ itineraryUpdate(itineraryId: string, requestBody: DTOItineraryUpdate): CancelablePromise<DTOItineraryRead>;
54
47
  /**
55
48
  * Delete Itinerary
56
49
  * Delete itinerary via id
@@ -58,23 +51,7 @@ export declare class ItineraryService {
58
51
  * @returns any OK
59
52
  * @throws ApiError
60
53
  */
61
- static itineraryDelete(itineraryId: string): CancelablePromise<any>;
62
- /**
63
- * List Persons
64
- * List swoopers
65
- * @param region Region name
66
- * @returns SwooperResponse OK
67
- * @throws ApiError
68
- */
69
- static personList(region?: 'patagonia' | 'antarctica' | 'arctic'): CancelablePromise<SwooperResponse>;
70
- /**
71
- * Get Person
72
- * Get swooper via id
73
- * @param id Object Id
74
- * @returns Member OK
75
- * @throws ApiError
76
- */
77
- static personGet(id: string): CancelablePromise<Member>;
54
+ itineraryDelete(itineraryId: string): CancelablePromise<any>;
78
55
  /**
79
56
  * Sync Itinerary
80
57
  * Sync an itinerary with swoop
@@ -82,62 +59,25 @@ export declare class ItineraryService {
82
59
  * @returns DTOItineraryRead OK
83
60
  * @throws ApiError
84
61
  */
85
- static sync(itineraryId: string): CancelablePromise<DTOItineraryRead>;
62
+ sync(itineraryId: string): CancelablePromise<DTOItineraryRead>;
86
63
  /**
87
- * List Partners
88
- * List all partners
64
+ * List Regions
65
+ * List all regions
89
66
  * @param page Pagination, starting at page 1
90
- * @param region Region name
91
- * @param itemsPerPage Items per page
92
- * @returns PartnerResponse OK
93
- * @throws ApiError
94
- */
95
- static partnerList(page?: number, region?: 'patagonia' | 'antarctica' | 'arctic', itemsPerPage?: string): CancelablePromise<PartnerResponse>;
96
- /**
97
- * Get Partner
98
- * Get partner via id
99
- * @param id Object Id
100
- * @returns Partner OK
101
- * @throws ApiError
102
- */
103
- static partnerGet(id: string): CancelablePromise<Partner>;
104
- /**
105
- * List Travellers
106
- * List all travellers
107
- * @param enquiryId Enquiry Id
108
- * @param region Region
109
- * @returns TravellerResponse OK
110
- * @throws ApiError
111
- */
112
- static travellerList(enquiryId: string, region: 'patagonia' | 'antarctica' | 'arctic'): CancelablePromise<TravellerResponse>;
113
- /**
114
- * Get Traveller
115
- * Get traveller via id
116
- * @param id Object Id
117
- * @returns Traveller OK
118
- * @throws ApiError
119
- */
120
- static travellerGet(id: string): CancelablePromise<Traveller>;
121
- /**
122
- * List Booking Items
123
- * List all booking items
124
- * @returns BookingItemResponse OK
125
- * @throws ApiError
126
- */
127
- static bookingItemList(): CancelablePromise<BookingItemResponse>;
128
- /**
129
- * List Currencies
130
- * List all currencies
131
- * @returns CurrencyItemResponse OK
67
+ * @param limit Number of items per page
68
+ * @returns any OK
132
69
  * @throws ApiError
133
70
  */
134
- static currencyList(): CancelablePromise<CurrencyItemResponse>;
71
+ regionList(page?: number, limit?: number): CancelablePromise<{
72
+ data: Array<DTORegionRead>;
73
+ pagination: Pagination;
74
+ }>;
135
75
  /**
136
- * Audit
137
- * Audit
76
+ * Create Region
77
+ * Create a region
138
78
  * @param requestBody
139
- * @returns any OK
79
+ * @returns DTORegionRead OK
140
80
  * @throws ApiError
141
81
  */
142
- static audit(requestBody: IBEvent): CancelablePromise<any>;
82
+ regionCreate(requestBody?: DTORegionCreate): CancelablePromise<DTORegionRead>;
143
83
  }